@toimc/vue 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +374 -0
  3. package/dist/attachment/Attachment.vue.d.ts +5 -3
  4. package/dist/attachment/Attachment.vue.d.ts.map +1 -1
  5. package/dist/attachment/AttachmentEmpty.vue.d.ts +5 -3
  6. package/dist/attachment/AttachmentEmpty.vue.d.ts.map +1 -1
  7. package/dist/attachment/AttachmentInfo.vue.d.ts.map +1 -1
  8. package/dist/attachment/AttachmentRemove.vue.d.ts.map +1 -1
  9. package/dist/attachment/Attachments.vue.d.ts +6 -4
  10. package/dist/attachment/Attachments.vue.d.ts.map +1 -1
  11. package/dist/citation/InlineCitation.vue.d.ts.map +1 -1
  12. package/dist/citation/Sources.vue.d.ts +8 -6
  13. package/dist/citation/Sources.vue.d.ts.map +1 -1
  14. package/dist/comparison/ComparisonMessage.vue.d.ts +15 -13
  15. package/dist/comparison/ComparisonMessage.vue.d.ts.map +1 -1
  16. package/dist/composables/useSpeechInput.d.ts +48 -0
  17. package/dist/composables/useSpeechInput.d.ts.map +1 -0
  18. package/dist/composables/useSpeechOutput.d.ts +31 -0
  19. package/dist/composables/useSpeechOutput.d.ts.map +1 -0
  20. package/dist/conversation/Conversation.vue.d.ts +5 -3
  21. package/dist/conversation/Conversation.vue.d.ts.map +1 -1
  22. package/dist/conversation/ConversationContent.vue.d.ts +5 -3
  23. package/dist/conversation/ConversationContent.vue.d.ts.map +1 -1
  24. package/dist/conversation/ConversationEmpty.vue.d.ts +7 -5
  25. package/dist/conversation/ConversationEmpty.vue.d.ts.map +1 -1
  26. package/dist/conversation/ConversationScrollBtn.vue.d.ts.map +1 -1
  27. package/dist/genui/GenUIRenderer.vue.d.ts +20 -0
  28. package/dist/genui/GenUIRenderer.vue.d.ts.map +1 -0
  29. package/dist/genui/PlanActions.vue.d.ts +12 -0
  30. package/dist/genui/PlanActions.vue.d.ts.map +1 -0
  31. package/dist/genui/WeatherCard.vue.d.ts +13 -0
  32. package/dist/genui/WeatherCard.vue.d.ts.map +1 -0
  33. package/dist/genui/index.d.ts +8 -0
  34. package/dist/genui/index.d.ts.map +1 -0
  35. package/dist/genui/registry.d.ts +8 -0
  36. package/dist/genui/registry.d.ts.map +1 -0
  37. package/dist/genui/sanitize.d.ts +19 -0
  38. package/dist/genui/sanitize.d.ts.map +1 -0
  39. package/dist/genui/types.d.ts +7 -0
  40. package/dist/genui/types.d.ts.map +1 -0
  41. package/dist/index.cjs +5 -5
  42. package/dist/index.d.ts +10 -2
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.mjs +2065 -1656
  45. package/dist/locales/en-US.d.ts +14 -0
  46. package/dist/locales/en-US.d.ts.map +1 -1
  47. package/dist/locales/index.d.ts +56 -0
  48. package/dist/locales/index.d.ts.map +1 -1
  49. package/dist/locales/zh-CN.d.ts +14 -0
  50. package/dist/locales/zh-CN.d.ts.map +1 -1
  51. package/dist/message/BranchPicker.vue.d.ts +5 -3
  52. package/dist/message/BranchPicker.vue.d.ts.map +1 -1
  53. package/dist/message/Message.vue.d.ts +13 -11
  54. package/dist/message/Message.vue.d.ts.map +1 -1
  55. package/dist/message/MessageAction.vue.d.ts +5 -3
  56. package/dist/message/MessageAction.vue.d.ts.map +1 -1
  57. package/dist/message/MessageActions.vue.d.ts +5 -3
  58. package/dist/message/MessageActions.vue.d.ts.map +1 -1
  59. package/dist/message/MessageAttachments.vue.d.ts +5 -3
  60. package/dist/message/MessageAttachments.vue.d.ts.map +1 -1
  61. package/dist/message/MessageContent.vue.d.ts +12 -4
  62. package/dist/message/MessageContent.vue.d.ts.map +1 -1
  63. package/dist/message/MessageFeedback.vue.d.ts.map +1 -1
  64. package/dist/message/actions/MessageActionCopy.vue.d.ts.map +1 -1
  65. package/dist/message/actions/MessageActionEdit.vue.d.ts.map +1 -1
  66. package/dist/message/actions/MessageActionFeedback.vue.d.ts.map +1 -1
  67. package/dist/message/actions/MessageActionRetry.vue.d.ts.map +1 -1
  68. package/dist/message/actions/MessageActionSpeak.vue.d.ts +12 -0
  69. package/dist/message/actions/MessageActionSpeak.vue.d.ts.map +1 -0
  70. package/dist/message/actions/index.d.ts +1 -0
  71. package/dist/message/actions/index.d.ts.map +1 -1
  72. package/dist/preview/ImageLightbox.vue.d.ts.map +1 -1
  73. package/dist/prompt-input/PromptInput.vue.d.ts +10 -8
  74. package/dist/prompt-input/PromptInput.vue.d.ts.map +1 -1
  75. package/dist/prompt-input/PromptInputAttachments.vue.d.ts.map +1 -1
  76. package/dist/prompt-input/PromptInputBody.vue.d.ts +5 -3
  77. package/dist/prompt-input/PromptInputBody.vue.d.ts.map +1 -1
  78. package/dist/prompt-input/PromptInputButton.vue.d.ts +5 -3
  79. package/dist/prompt-input/PromptInputButton.vue.d.ts.map +1 -1
  80. package/dist/prompt-input/PromptInputFooter.vue.d.ts +7 -5
  81. package/dist/prompt-input/PromptInputFooter.vue.d.ts.map +1 -1
  82. package/dist/prompt-input/PromptInputHeader.vue.d.ts +5 -3
  83. package/dist/prompt-input/PromptInputHeader.vue.d.ts.map +1 -1
  84. package/dist/prompt-input/PromptInputMicButton.vue.d.ts +13 -0
  85. package/dist/prompt-input/PromptInputMicButton.vue.d.ts.map +1 -0
  86. package/dist/prompt-input/PromptInputSubmit.vue.d.ts +5 -3
  87. package/dist/prompt-input/PromptInputSubmit.vue.d.ts.map +1 -1
  88. package/dist/prompt-input/PromptInputSuggestion.vue.d.ts.map +1 -1
  89. package/dist/prompt-input/PromptInputTextarea.vue.d.ts.map +1 -1
  90. package/dist/prompt-input/PromptInputTools.vue.d.ts +5 -3
  91. package/dist/prompt-input/PromptInputTools.vue.d.ts.map +1 -1
  92. package/dist/prompt-input/PromptInputUploadButton.vue.d.ts +5 -3
  93. package/dist/prompt-input/PromptInputUploadButton.vue.d.ts.map +1 -1
  94. package/dist/prompt-input/index.d.ts +1 -0
  95. package/dist/prompt-input/index.d.ts.map +1 -1
  96. package/dist/provider/ProviderSettingsDialog.vue.d.ts.map +1 -1
  97. package/dist/provider/ProviderSettingsForm.vue.d.ts.map +1 -1
  98. package/dist/shared/Button.vue.d.ts +5 -3
  99. package/dist/shared/Button.vue.d.ts.map +1 -1
  100. package/dist/shared/Input.vue.d.ts.map +1 -1
  101. package/dist/shared/JsonDiffView.vue.d.ts.map +1 -1
  102. package/dist/shared/LanguageToggle.vue.d.ts.map +1 -1
  103. package/dist/shared/ModelIcon.vue.d.ts +5 -3
  104. package/dist/shared/ModelIcon.vue.d.ts.map +1 -1
  105. package/dist/shared/Radio.vue.d.ts.map +1 -1
  106. package/dist/shared/Select.vue.d.ts +5 -3
  107. package/dist/shared/Select.vue.d.ts.map +1 -1
  108. package/dist/shared/Shimmer.vue.d.ts +5 -3
  109. package/dist/shared/Shimmer.vue.d.ts.map +1 -1
  110. package/dist/shared/StreamText.vue.d.ts.map +1 -1
  111. package/dist/shared/Toast.vue.d.ts +1 -1
  112. package/dist/shared/Toast.vue.d.ts.map +1 -1
  113. package/dist/thinking/ThinkingBlock.vue.d.ts +5 -3
  114. package/dist/thinking/ThinkingBlock.vue.d.ts.map +1 -1
  115. package/dist/thinking/ThinkingChain.vue.d.ts +1 -1
  116. package/dist/thinking/ThinkingChain.vue.d.ts.map +1 -1
  117. package/dist/tool-call/ToolCall.vue.d.ts +12 -10
  118. package/dist/tool-call/ToolCall.vue.d.ts.map +1 -1
  119. package/dist/tool-call/ToolCallContent.vue.d.ts.map +1 -1
  120. package/dist/tool-call/ToolCallHeader.vue.d.ts.map +1 -1
  121. package/dist/tool-call/ToolCallInput.vue.d.ts.map +1 -1
  122. package/dist/tool-call/ToolCallOutput.vue.d.ts.map +1 -1
  123. package/dist/tool-call/ToolConfirmation.vue.d.ts.map +1 -1
  124. package/dist/utils/compress-image.d.ts +21 -0
  125. package/dist/utils/compress-image.d.ts.map +1 -0
  126. package/dist/vue.css +1 -1
  127. package/dist/welcome/Prompts.vue.d.ts +7 -5
  128. package/dist/welcome/Prompts.vue.d.ts.map +1 -1
  129. package/dist/welcome/Welcome.vue.d.ts +9 -7
  130. package/dist/welcome/Welcome.vue.d.ts.map +1 -1
  131. package/package.json +14 -13
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("vue");c=s(c,1);let l=require("@toimc/core");var u={class:`ai-chat-stream-text`},d={key:0,class:`ai-chat-stream-text__cursor`},f=(0,c.defineComponent)({__name:`StreamText`,props:{stream:{}},setup(e){let t=e,n=(0,c.ref)(``),r=(0,c.ref)(!0);return(0,c.watch)(()=>t.stream,e=>{e!==void 0&&(n.value=e,r.value=!0)}),(0,c.watch)(()=>t.stream,e=>{e===void 0&&(r.value=!1)}),(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`span`,u,[(0,c.createTextVNode)((0,c.toDisplayString)(n.value)+` `,1),r.value?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,d,`▉`)):(0,c.createCommentVNode)(``,!0)]))}}),p=[`type`,`disabled`],m=(0,c.defineComponent)({__name:`Button`,props:{type:{},nativeType:{},size:{},disabled:{type:Boolean}},emits:[`click`],setup(e){return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{class:(0,c.normalizeClass)([`ai-chat-btn`,[e.type?`ai-chat-btn--${e.type}`:`ai-chat-btn--primary`,e.size?`ai-chat-btn--${e.size}`:`ai-chat-btn--medium`]]),type:e.nativeType??`button`,disabled:e.disabled,onClick:n[0]||=e=>t.$emit(`click`,e)},[(0,c.renderSlot)(t.$slots,`default`,{},void 0,!0)],10,p))}}),h=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},g=h(m,[[`__scopeId`,`data-v-9a46add5`]]),_=[`type`,`value`,`placeholder`,`disabled`,`aria-invalid`,`autocomplete`],v=h((0,c.defineComponent)({__name:`Input`,props:(0,c.mergeModels)({type:{default:`text`},placeholder:{default:void 0},disabled:{type:Boolean},invalid:{type:Boolean},size:{default:`md`},autocomplete:{default:void 0}},{modelValue:{default:``},modelModifiers:{}}),emits:(0,c.mergeModels)([`blur`],[`update:modelValue`]),setup(e,{emit:t}){let n=e,r=t,i=(0,c.useModel)(e,`modelValue`);function a(e){n.disabled||(i.value=e.target.value)}return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`input`,{class:(0,c.normalizeClass)([`ai-chat-input`,[`ai-chat-input--${e.size}`,{"ai-chat-input--invalid":e.invalid}]]),type:e.type,value:i.value,placeholder:e.placeholder,disabled:e.disabled,"aria-invalid":e.invalid?`true`:void 0,autocomplete:e.autocomplete,onInput:a,onBlur:n[0]||=e=>r(`blur`,e)},null,42,_))}}),[[`__scopeId`,`data-v-f77a31ae`]]),y=[`value`,`disabled`,`aria-invalid`],b=h((0,c.defineComponent)({__name:`Select`,props:(0,c.mergeModels)({disabled:{type:Boolean},invalid:{type:Boolean},size:{default:`md`}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=(0,c.useModel)(e,`modelValue`);function r(e){t.disabled||(n.value=e.target.value)}return(t,i)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-select`,[`ai-chat-select--${e.size}`,{"ai-chat-select--invalid":e.invalid}]])},[(0,c.createElementVNode)(`select`,{class:`ai-chat-select__control`,value:n.value,disabled:e.disabled,"aria-invalid":e.invalid?`true`:void 0,onChange:r},[(0,c.renderSlot)(t.$slots,`default`,{},void 0,!0)],40,y),i[0]||=(0,c.createElementVNode)(`svg`,{class:`ai-chat-select__chevron`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{d:`M4 6l4 4 4-4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1)],2))}}),[[`__scopeId`,`data-v-78a5cde3`]]),ee=[`value`,`name`,`checked`,`disabled`],te={key:0,class:`ai-chat-radio__label`},x=h((0,c.defineComponent)({__name:`Radio`,props:(0,c.mergeModels)({value:{},label:{},disabled:{type:Boolean},name:{}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=(0,c.useModel)(e,`modelValue`);function r(){t.disabled||n.value===t.value||(n.value=t.value)}return(t,i)=>((0,c.openBlock)(),(0,c.createElementBlock)(`label`,{class:(0,c.normalizeClass)([`ai-chat-radio`,{"ai-chat-radio--checked":n.value===e.value,"ai-chat-radio--disabled":e.disabled}])},[(0,c.createElementVNode)(`input`,{class:`ai-chat-radio__input`,type:`radio`,value:e.value,name:e.name,checked:n.value===e.value,disabled:e.disabled,onChange:r},null,40,ee),i[0]||=(0,c.createElementVNode)(`span`,{class:`ai-chat-radio__circle`,"aria-hidden":`true`},[(0,c.createElementVNode)(`span`,{class:`ai-chat-radio__dot`})],-1),e.label?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,te,(0,c.toDisplayString)(e.label),1)):(0,c.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-88d1f717`]]),S=(0,c.defineComponent)({__name:`Shimmer`,props:{as:{default:`span`},duration:{default:2e3}},setup(e){return(t,n)=>((0,c.openBlock)(),(0,c.createBlock)((0,c.resolveDynamicComponent)(e.as),{class:`ai-chat-shimmer`,style:(0,c.normalizeStyle)({animationDuration:e.duration+`ms`})},{default:(0,c.withCtx)(()=>[(0,c.renderSlot)(t.$slots,`default`)]),_:3},8,[`style`]))}}),C=typeof window<`u`,w,T;if(process.env.NODE_ENV!==`production`){let e=C&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(w=t=>{e.mark(t)},T=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}var E=/\{([0-9a-zA-Z]+)\}/g;function ne(e,...t){return t.length===1&&L(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(E,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var D=(e,t=!1)=>t?Symbol.for(e):Symbol(e),re=(e,t,n)=>ie({l:e,k:t,s:n}),ie=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),O=e=>typeof e==`number`&&isFinite(e),ae=e=>pe(e)===`[object Date]`,oe=e=>pe(e)===`[object RegExp]`,se=e=>R(e)&&Object.keys(e).length===0,k=Object.assign,ce=Object.create,A=(e=null)=>ce(e),le,j=()=>le||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:A(),ue=Object.prototype.hasOwnProperty;function M(e,t){return ue.call(e,t)}var N=Array.isArray,P=e=>typeof e==`function`,F=e=>typeof e==`string`,I=e=>typeof e==`boolean`,L=e=>typeof e==`object`&&!!e,de=e=>L(e)&&P(e.then)&&P(e.catch),fe=Object.prototype.toString,pe=e=>fe.call(e),R=e=>pe(e)===`[object Object]`,me=e=>e==null?``:N(e)||R(e)&&e.toString===fe?JSON.stringify(e,null,2):String(e);function he(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var ge=2;function _e(e,t=0,n=e.length){let r=e.split(/\r?\n/),i=0,a=[];for(let e=0;e<r.length;e++)if(i+=r[e].length+1,i>=t){for(let o=e-ge;o<=e+ge||n>i;o++){if(o<0||o>=r.length)continue;let s=o+1;a.push(`${s}${` `.repeat(3-String(s).length)}| ${r[o]}`);let c=r[o].length;if(o===e){let e=t-(i-c)+1,r=Math.max(1,n>i?c-e:n-t);a.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(o>e){if(n>i){let e=Math.max(Math.min(n-i,c),1);a.push(` | `+`^`.repeat(e))}i+=c+1}}break}return a.join(`
2
- `)}function z(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var ve={};function ye(e){ve[e]||(ve[e]=!0,z(e))}function be(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function xe(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}var Se=/^javascript:/i,Ce=/^(?:href|src|action|formaction)$/i,we=/&#(?:x([0-9a-f]+)|(\d+));?/gi,Te=/&(?:Tab|NewLine);/g,Ee=/&colon;?/gi,De=/[\u0000-\u0020\u007f-\u009f]/g,Oe=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,ke=/(^|[\s"'<>/])on(\w+\s*=)/gi,Ae=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function B(e,t,n){let r=t||n;if(!r)return e;let i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function je(e){let t=e.replace(we,B).replace(Te,``).replace(Ee,`:`).replace(De,``);return Se.test(t)}function Me(e){let t=/url\s*\(/gi,n=``,r=0,i;for(;(i=t.exec(e))!==null;){let a=i.index,o=t.lastIndex-1,s=o+1,c=1,l=null;for(;s<e.length;s++){let t=e[s];if(l){t===l&&(l=null);continue}if(t===`"`||t===`'`)l=t;else if(t===`(`)c++;else if(t===`)`&&(c--,c===0))break}if(c!==0)break;let u=e.slice(o+1,s).trim(),d=u.startsWith(`"`)&&u.endsWith(`"`)||u.startsWith(`'`)&&u.endsWith(`'`)?u.slice(1,-1).trim():u;n+=e.slice(r,a),n+=je(d)?`url(about:blank)`:e.slice(a,s+1),r=s+1}return n+e.slice(r)}function Ne(e,t){return Ce.test(e)&&je(t)?`about:blank`:xe(e.toLowerCase()===`style`?Me(t):t)}function Pe(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${Ne(t,n)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${Ne(t,n)}'`),Oe.test(e)&&(process.env.NODE_ENV!==`production`&&z(`Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages.`),e=e.replace(ke,`$1&#111;n$2`)),e=e.replace(Ae,(e,t,n,r)=>je(r)?`${t}${n}about:blank`:e),e}function Fe(){let e=new Map;return{events:e,on(t,n){let r=e.get(t);r&&r.push(n)||e.set(t,[n])},off(t,n){let r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit(t,n){(e.get(t)||[]).slice().map(e=>e(n)),(e.get(`*`)||[]).slice().map(e=>e(t,n))}}}var Ie=e=>!L(e)||N(e);function Le(e,t){if(Ie(e)||Ie(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(L(e[r])&&!L(t[r])&&(t[r]=Array.isArray(e[r])?[]:A()),Ie(t[r])||Ie(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function Re(e,t,n){return{line:e,column:t,offset:n}}function ze(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var V={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},Be={[V.EXPECTED_TOKEN]:`Expected token: '{0}'`,[V.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[V.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[V.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[V.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[V.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[V.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[V.EMPTY_PLACEHOLDER]:`Empty placeholder`,[V.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[V.INVALID_LINKED_FORMAT]:`Invalid linked format`,[V.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[V.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[V.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[V.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[V.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[V.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function Ve(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=process.env.NODE_ENV===`production`?e:ne((i||Be)[e]||``,...a||[]),s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function He(e){throw e}var Ue=/<\/?[\w\s="/.':;#-\/]+>/,We=e=>Ue.test(e),H=` `,Ge=`\r`,U=`
3
- `,Ke=`\u2028`,qe=`\u2029`;function Je(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Ge&&t[e+1]===U,s=e=>t[e]===U,c=e=>t[e]===qe,l=e=>t[e]===Ke,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?U:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function ee(e=0){a=e}function te(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:ee,skipToPeek:te}}var Ye=void 0,Xe=`'`,Ze=`tokenizer`;function Qe(e,t={}){let n=t.location!==!1,r=Je(e),i=()=>r.index(),a=()=>Re(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();if(t.column+=r,t.offset+=r,u){let r=Ve(e,n?ze(a.startLoc,t):null,{domain:Ze,args:i});u(r)}}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=ze(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(V.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===H||e.currentPeek()===U;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Ye)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Ye)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function ee(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Xe;return e.resetPeek(),r}function te(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7&&n!==11)return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===H||!t?!1:t===U?(e.peek(),r()):T(e,!1)},i=r();return e.resetPeek(),i}function w(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function T(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?r!==H&&r!==U:i===H?(e.peek(),n(!0,H)):i!==U||(e.peek(),n(!0,U))},r=n();return t&&e.resetPeek(),r}function E(e,t){let n=e.currentChar();if(n!==Ye)return t(n)?(e.next(),n):null}function ne(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function D(e){return E(e,ne)}function re(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function ie(e){return E(e,re)}function O(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function ae(e){return E(e,O)}function oe(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function se(e){return E(e,oe)}function k(e){let t=``,n=``;for(;t=ae(e);)n+=t;return n}function ce(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===H||n===U){if(T(e))t+=n,e.next();else if(w(e))break;else t+=n,e.next()}else t+=n,e.next()}return t}function A(e){g(e);let t=``,n=``;for(;t=ie(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==Ye&&r!==H&&r!==U&&r!==` `){let t=F(e);return d(V.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===Ye&&d(V.UNTERMINATED_CLOSING_BRACE,a(),0),n}function le(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${k(e)}`):t+=k(e),e.currentChar()===Ye&&d(V.UNTERMINATED_CLOSING_BRACE,a(),0),t}function j(e){return e!==Xe&&e!==U}function ue(e){g(e),m(e,`'`);let t=``,n=``;for(;t=E(e,j);)n+=t===`\\`?M(e):t;let r=e.currentChar();return r===U||r===Ye?(d(V.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===U&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function M(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return N(e,t,4);case`U`:return N(e,t,6);default:return d(V.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function N(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=se(e);if(!n){d(V.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function P(e){return e!==`{`&&e!==`}`&&e!==H&&e!==U}function F(e){g(e);let t=``,n=``;for(;t=E(e,P);)n+=t;return n}function I(e){let t=``,n=``;for(;t=D(e);)n+=t;return n}function L(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===H?n:(n+=r,e.next(),t(n))};return t(``)}function de(e){g(e);let t=m(e,`|`);return g(e),t}function fe(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(V.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(V.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(V.UNTERMINATED_CLOSING_BRACE,a(),0),n=pe(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(w(e))return t.braceNest>0&&d(V.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(V.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,R(e,t);if(r=y(e,t))return n=f(t,4,A(e)),g(e),n;if(i=b(e,t))return n=f(t,5,le(e)),g(e),n;if(o=ee(e,t))return n=f(t,6,ue(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,F(e)),d(V.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function pe(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===U||i===H)&&d(V.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return w(e)?(r=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,r):te(e,t)||S(e,t)?(g(e),pe(e,t)):x(e,t)?(g(e),f(t,11,I(e))):C(e,t)?(g(e),i===`{`?fe(e,t)||r:f(t,10,L(e))):(n===7&&d(V.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,R(e,t))}}function R(e,t){let n={type:13};if(t.braceNest>0)return fe(e,t)||p(t);if(t.inLinked)return pe(e,t)||p(t);switch(e.currentChar()){case`{`:return fe(e,t)||p(t);case`}`:return d(V.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return pe(e,t)||p(t);default:if(w(e))return n=f(t,1,de(e)),t.braceNest=0,t.inLinked=!1,n;if(T(e))return f(t,0,ce(e))}return n}function me(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Ye?f(c,13):R(r,c)}return{nextToken:me,currentOffset:i,currentPosition:a,context:l}}var $e=`parser`,et=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,tt=/\\([\\@{}|])/g;function nt(e,t){return t}function rt(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function it(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();if(s.offset+=a,s.column+=a,n){let e=Ve(r,t?ze(i,s):null,{domain:$e,args:o});n(e)}}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(tt,nt),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(et,rt),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,W(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,V.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(o)),n.key=l(e,o.value||``);break;default:{r(e,V.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,V.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,W(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,V.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=Qe(n,k({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,V.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function W(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function at(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function ot(e,t){for(let n=0;n<e.length;n++)st(e[n],t)}function st(e,t){switch(e.type){case 1:ot(e.cases,t),t.helper(`plural`);break;case 2:ot(e.items,t);break;case 6:st(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`)}}function ct(e,t={}){let n=at(e);n.helper(`normalize`),e.body&&st(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function lt(e){let t=e.body;return t.type===2?ut(t):t.cases.forEach(e=>ut(e)),e}function ut(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(r.type!==3&&r.type!==9||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=he(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}var dt=`minifier`;function ft(e){switch(e.t=e.type,e.type){case 0:{let t=e;ft(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)ft(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)ft(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;ft(t.key),t.k=t.key,delete t.key,t.modifier&&(ft(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!==`production`)throw Ve(V.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:dt,args:[e.type]})}delete e.type}var pt=`parser`;function mt(e,t){let{filename:n,breakLineCode:r,needIndent:i}=t,a=t.location!==!1,o={filename:n,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};a&&e.loc&&(o.source=e.loc.source);let s=()=>o;function c(e,t){o.code+=e}function l(e,t=!0){let n=t?r:``;c(i?n+` `.repeat(e):n)}function u(e=!0){let t=++o.indentLevel;e&&l(t)}function d(e=!0){let t=--o.indentLevel;e&&l(t)}function f(){l(o.indentLevel)}return{context:s,push:c,indent:u,deindent:d,newline:f,helper:e=>`_${e}`,needIndent:()=>o.needIndent}}function ht(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),yt(e,t.key),t.modifier?(e.push(`, `),yt(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function gt(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(yt(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function _t(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(yt(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function vt(e,t){t.body?yt(e,t.body):e.push(`null`)}function yt(e,t){let{helper:n}=e;switch(t.type){case 0:vt(e,t);break;case 1:_t(e,t);break;case 2:gt(e,t);break;case 6:ht(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!==`production`)throw Ve(V.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:pt,args:[t.type]})}}var bt=(e,t={})=>{let n=F(t.mode)?t.mode:`normal`,r=F(t.filename)?t.filename:`message.intl`;t.sourceMap;let i=t.breakLineCode==null?n===`arrow`?`;`:`
4
- `:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=mt(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${he(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),yt(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function xt(e,t={}){let n=k({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null||n.optimize,o=it(n).parse(e);return r?(a&&lt(o),i&&ft(o),{ast:o,code:``}):(ct(o,n),bt(o,n))}function St(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function G(e){return L(e)&&Mt(e)===0&&(M(e,`b`)||M(e,`body`))}var Ct=[`b`,`body`];function wt(e){return zt(e,Ct)}var Tt=[`c`,`cases`];function Et(e){return zt(e,Tt,[])}var Dt=[`s`,`static`];function Ot(e){return zt(e,Dt)}var kt=[`i`,`items`];function At(e){return zt(e,kt,[])}var jt=[`t`,`type`];function Mt(e){return zt(e,jt)}var Nt=[`v`,`value`];function Pt(e,t){let n=zt(e,Nt);if(n!=null)return n;throw Vt(t)}var Ft=[`m`,`modifier`];function It(e){return zt(e,Ft)}var Lt=[`k`,`key`];function Rt(e){let t=zt(e,Lt);if(t)return t;throw Vt(6)}function zt(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(M(e,r)&&e[r]!=null)return e[r]}return n}var Bt=[...Ct,...Tt,...Dt,...kt,...Lt,...Ft,...Nt,...jt];function Vt(e){return Error(`unhandled node type: ${e}`)}function Ht(e){return t=>Ut(t,e)}function Ut(e,t){let n=wt(t);if(n==null)throw Vt(0);if(Mt(n)===1){let t=Et(n);return e.plural(t.reduce((t,n)=>[...t,Wt(e,n)],[]))}return Wt(e,n)}function Wt(e,t){let n=Ot(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=At(t).reduce((t,n)=>[...t,Gt(e,n)],[]);return e.normalize(n)}}function Gt(e,t){let n=Mt(t);switch(n){case 3:return Pt(t,n);case 9:return Pt(t,n);case 4:{let r=t;if(M(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(M(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw Vt(n)}case 5:{let r=t;if(M(r,`i`)&&O(r.i))return e.interpolate(e.list(r.i));if(M(r,`index`)&&O(r.index))return e.interpolate(e.list(r.index));throw Vt(n)}case 6:{let n=t,r=It(n),i=Rt(n);return e.linked(Gt(e,i),r?Gt(e,r):void 0,e.type)}case 7:return Pt(t,n);case 8:return Pt(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Kt=`Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;function qt(e,t){t&&We(e)&&z(ne(Kt,{source:e}))}var Jt=e=>e,Yt=A();function Xt(e,t={}){let n=!1,r=t.onError||He;return t.onError=e=>{n=!0,r(e)},{...xt(e,t),detectError:n}}function Zt(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&F(e)){let n=!I(t.warnHtmlMessage)||t.warnHtmlMessage;process.env.NODE_ENV!==`production`&&qt(e,n);let r=(t.onCacheKey||Jt)(e),i=Yt[r];if(i)return i;let{ast:a,detectError:o}=Xt(e,{...t,location:process.env.NODE_ENV!==`production`,jit:!0}),s=Ht(a);return o?s:Yt[r]=s}{if(process.env.NODE_ENV!==`production`&&!G(e))return z(`the message that is resolve with key '${t.key}' is not supported for jit compilation`),(()=>e);let n=e.cacheKey;return n?Yt[n]||(Yt[n]=Ht(e)):Ht(e)}}var Qt=null;function $t(e){Qt=e}function en(e,t,n){Qt&&Qt.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var tn=nn(`function:translate`);function nn(e){return t=>Qt&&Qt.emit(e,t)}var K={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function q(e){return Ve(e,null,process.env.NODE_ENV===`production`?void 0:{messages:rn})}var rn={[K.INVALID_ARGUMENT]:`Invalid arguments`,[K.INVALID_DATE_ARGUMENT]:`The date provided is an invalid Date object.Make sure your Date represents a valid date.`,[K.INVALID_ISO_DATE_ARGUMENT]:`The argument provided is not a valid ISO date string`,[K.NOT_SUPPORT_NON_STRING_MESSAGE]:`Not support non-string message`,[K.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:`cannot support promise value`,[K.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:`cannot support async function`,[K.NOT_SUPPORT_LOCALE_TYPE]:`cannot support locale type`};function an(e,t){return t.locale==null?sn(e.locale):sn(t.locale)}var on;function sn(e){if(F(e))return e;if(P(e)){if(e.resolvedOnce&&on!=null)return on;if(e.constructor.name===`Function`){let t=e();if(de(t))throw q(K.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return on=t}throw q(K.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw q(K.NOT_SUPPORT_LOCALE_TYPE)}function cn(e,t,n){return[...new Set([n,...N(t)?t:L(t)?Object.keys(t):F(t)?[t]:[n]])]}function ln(e,t,n){let r=F(n)?n:En,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;N(e);)e=un(a,e,t);let o=N(t)||!R(t)?t:t.default?t.default:null;e=F(o)?[o]:o,N(e)&&un(a,e,!1),i.__localeChainCache.set(r,a)}return a}function un(e,t,n){let r=!0;for(let i=0;i<t.length&&I(r);i++){let a=t[i];F(a)&&(r=dn(e,t[i],n))}return r}function dn(e,t,n){let r,i=t.split(`-`);do r=fn(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function fn(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(N(n)||R(n))&&n[i]&&(r=n[i])}return r}var pn=[];pn[0]={w:[0],i:[3,0],"[":[4],o:[7]},pn[1]={w:[1],".":[2],"[":[4],o:[7]},pn[2]={w:[2],i:[3,0],0:[3,0]},pn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},pn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},pn[5]={"'":[4,0],o:8,l:[5,0]},pn[6]={'"':[4,0],o:8,l:[6,0]};var mn=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function hn(e){return mn.test(e)}function gn(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function _n(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function vn(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:hn(t)?gn(t):`*`+t}function yn(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=vn(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=_n(a),d=pn[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var bn=new Map;function xn(e,t){return L(e)?e[t]:null}function Sn(e,t){if(!L(e))return null;let n=bn.get(t);if(n||(n=yn(t),n&&bn.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Bt.includes(e)&&G(i)||!L(i)||!M(i,e))return null;let t=i[e];if(t===void 0||P(i))return null;i=t,a++}return i}var J={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9},Cn={[J.NOT_FOUND_KEY]:`Not found '{key}' key in '{locale}' locale messages.`,[J.FALLBACK_TO_TRANSLATE]:`Fall back to translate '{key}' key with '{target}' locale.`,[J.CANNOT_FORMAT_NUMBER]:`Cannot format a number value due to not supported Intl.NumberFormat.`,[J.FALLBACK_TO_NUMBER_FORMAT]:`Fall back to number format '{key}' key with '{target}' locale.`,[J.CANNOT_FORMAT_DATE]:`Cannot format a date value due to not supported Intl.DateTimeFormat.`,[J.FALLBACK_TO_DATE_FORMAT]:`Fall back to datetime format '{key}' key with '{target}' locale.`,[J.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:`This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,[J.INVALID_NUMBER_ARGUMENT]:`Invalid argument for number formatting: expected a number but received '{value}'.`,[J.INVALID_DATE_ARGUMENT]:`Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`};function wn(e,...t){return ne(Cn[e],...t)}var Tn=`11.4.8`,En=`en-US`,Dn=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function On(){return{upper:(e,t)=>t===`text`&&F(e)?e.toUpperCase():t===`vnode`&&L(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&F(e)?e.toLowerCase():t===`vnode`&&L(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&F(e)?Dn(e):t===`vnode`&&L(e)&&`__v_isVNode`in e?Dn(e.children):e}}var kn;function An(e){kn=e}var jn;function Mn(e){jn=e}var Nn;function Pn(e){Nn=e}var Fn=null,In=()=>Fn,Ln=null,Rn=e=>{Ln=e},zn=()=>Ln,Bn=0;function Vn(e={}){let t=P(e.onWarn)?e.onWarn:z,n=F(e.version)?e.version:Tn,r=F(e.locale)||P(e.locale)?e.locale:En,i=P(r)?En:r,a=N(e.fallbackLocale)||R(e.fallbackLocale)||F(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=R(e.messages)?e.messages:Hn(i),s=R(e.datetimeFormats)?e.datetimeFormats:Hn(i),c=R(e.numberFormats)?e.numberFormats:Hn(i),l=k(A(),e.modifiers,On()),u=e.pluralRules||A(),d=P(e.missing)?e.missing:null,f=I(e.missingWarn)||oe(e.missingWarn)?e.missingWarn:!0,p=I(e.fallbackWarn)||oe(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=P(e.postTranslation)?e.postTranslation:null,_=R(e.processor)?e.processor:null,v=!I(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=P(e.messageCompiler)?e.messageCompiler:kn;process.env.NODE_ENV!==`production`&&P(e.messageCompiler)&&ye(wn(J.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));let ee=P(e.messageResolver)?e.messageResolver:jn||xn,te=P(e.localeFallbacker)?e.localeFallbacker:Nn||cn,x=L(e.fallbackContext)?e.fallbackContext:void 0,S=e,C=L(S.__datetimeFormatters)?S.__datetimeFormatters:new Map,w=L(S.__numberFormatters)?S.__numberFormatters:new Map,T=L(S.__meta)?S.__meta:{};Bn++;let E={version:n,cid:Bn,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:ee,localeFallbacker:te,fallbackContext:x,onWarn:t,__meta:T};return E.datetimeFormats=s,E.numberFormats=c,E.__datetimeFormatters=C,E.__numberFormatters=w,process.env.NODE_ENV!==`production`&&(E.__v_emitter=S.__v_emitter==null?void 0:S.__v_emitter),(process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__)&&en(E,n,T),E}var Hn=e=>({[e]:A()});function Un(e,t){return e instanceof RegExp?e.test(t):e}function Wn(e,t){return e instanceof RegExp?e.test(t):e}function Gn(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(process.env.NODE_ENV!==`production`){let r=e.__v_emitter;r&&r.emit(`missing`,{locale:n,key:t,type:i,groupId:`${i}:${t}`})}if(a!==null){let r=a(e,n,t,i);return F(r)?r:t}return process.env.NODE_ENV!==`production`&&Wn(r,t)&&o(wn(J.NOT_FOUND_KEY,{key:t,locale:n})),t}function Kn(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function qn(e,t){return e!==t&&e.split(`-`)[0]===t.split(`-`)[0]}function Jn(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(qn(e,t[r]))return!0;return!1}function Yn(e,t,n,r,i,a,o){let{fallbackLocale:s,localeFallbacker:c,onWarn:l}=e,u=c(e,s,n),d=n;for(let s=0;s<u.length;s++){let c=u[s];if(process.env.NODE_ENV!==`production`&&n!==c&&Un(a,t)&&l(wn(o===`datetime format`?J.FALLBACK_TO_DATE_FORMAT:J.FALLBACK_TO_NUMBER_FORMAT,{key:t,target:c})),process.env.NODE_ENV!==`production`&&n!==c){let n=e.__v_emitter;n&&n.emit(`fallback`,{type:o,key:t,from:d,to:c,groupId:`${o}:${t}`})}let f=(r[c]||{})[t];if(R(f)&&F(c))return c;Gn(e,t,c,i,o),d=c}return null}function Xn(e,t,n){let r=`${e}__${t}`;return R(n)&&!se(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function Zn(e,t,n){for(let r in n){let n=`${t}__${r}`;for(let t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function Qn(e,t,n,r){let[,i,a,o]=e,s=n;return F(i)?t.key=i:R(i)&&Object.keys(i).forEach(e=>{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),F(a)?t.locale=a:R(a)&&(s=a),R(o)&&(s=o),s}var $n=typeof Intl<`u`,er={dateTimeFormat:$n&&Intl.DateTimeFormat!==void 0,numberFormat:$n&&Intl.NumberFormat!==void 0};function tr(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(process.env.NODE_ENV!==`production`&&!er.dateTimeFormat)return i(wn(J.CANNOT_FORMAT_DATE)),``;if(!F(t[0])&&!ae(t[0])&&!O(t[0]))return process.env.NODE_ENV!==`production`&&i(wn(J.INVALID_DATE_ARGUMENT,{value:String(t[0])})),``;let[o,s,c,l]=rr(...t),u=I(c.missingWarn)?c.missingWarn:e.missingWarn,d=I(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=an(e,c);if(!F(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Yn(e,o,p,n,u,d,`datetime format`);if(!F(m))return r?-1:o;let h=n[m][o],g=Xn(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,k({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var nr=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function rr(...e){let[t]=e,n=A(),r=A(),i;if(F(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw q(K.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw q(K.INVALID_ISO_DATE_ARGUMENT)}}else if(ae(t)){if(isNaN(t.getTime()))throw q(K.INVALID_DATE_ARGUMENT);i=t}else if(O(t))i=t;else throw q(K.INVALID_ARGUMENT);let a=Qn(e,n,r,nr);return[n.key||``,i,n,a]}function ir(e,t,n){Zn(e.__datetimeFormatters,t,n)}function ar(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(process.env.NODE_ENV!==`production`&&!er.numberFormat)return i(wn(J.CANNOT_FORMAT_NUMBER)),``;if(!O(t[0]))return process.env.NODE_ENV!==`production`&&i(wn(J.INVALID_NUMBER_ARGUMENT,{value:String(t[0])})),``;let[o,s,c,l]=sr(...t),u=I(c.missingWarn)?c.missingWarn:e.missingWarn,d=I(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=an(e,c);if(!F(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Yn(e,o,p,n,u,d,`number format`);if(!F(m))return r?-1:o;let h=n[m][o],g=Xn(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,k({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var or=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function sr(...e){let[t]=e,n=A(),r=A();if(!O(t))throw q(K.INVALID_ARGUMENT);let i=t,a=Qn(e,n,r,or);return[n.key||``,i,n,a]}function cr(e,t,n){Zn(e.__numberFormatters,t,n)}var lr=e=>e,ur=e=>``,dr=`text`,fr=e=>e.length===0?``:he(e),pr=me;function mr(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function hr(e){let t=O(e.pluralIndex)?e.pluralIndex:-1;return O(e.named?.count)?e.named.count:O(e.named?.n)?e.named.n:t}function gr(e={}){let t=e.locale,n=hr(e),r=F(t)&&P(e.pluralRules?.[t])?e.pluralRules[t]:mr,i=r===mr?void 0:mr,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||A();O(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(P(e.messages)?e.messages(t,!!n):L(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):ur)}let d=t=>e.modifiers?e.modifiers[t]:lr,f=P(e.processor?.normalize)?e.processor.normalize:fr,p=P(e.processor?.interpolate)?e.processor.interpolate:pr,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?L(n)?(a=n.modifier||a,i=n.type||i):F(n)&&(a=n||a):t.length===2&&(F(n)&&(a=n||a),F(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&N(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:F(e.processor?.type)?e.processor.type:dr,interpolate:p,normalize:f,values:k(A(),o,c)};return m}var _r=()=>``,Y=e=>P(e);function vr(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=Cr(...t),u=I(l.missingWarn)?l.missingWarn:e.missingWarn,d=I(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=I(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=F(l.default)||I(l.default)?I(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(F(m)||P(m)),g=an(e,l);f&&yr(l);let[_,v,y]=p?[c,g,s[g]||A()]:br(e,c,g,o,d,u),b=_,ee=c;if(!p&&!(F(b)||G(b)||Y(b))&&h&&(b=m,ee=b),!p&&(!(F(b)||G(b)||Y(b))||!F(v)))return i?-1:c;if(process.env.NODE_ENV!==`production`&&F(b)&&e.messageCompiler==null)return z(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${c}'.`),c;let te=!1,x=Y(b)?b:xr(e,c,v,b,ee,()=>{te=!0});if(te)return b;let S=Sr(e,x,gr(Er(e,v,y,l))),C=r?r(S,c):S;if(f&&F(C)&&(C=Pe(C)),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:F(c)?c:Y(b)?b.key:``,locale:v||(Y(b)?b.locale:``),format:F(b)?b:Y(b)?b.source:``,message:C};t.meta=k({},e.__meta,In()||{}),tn(t)}return C}function yr(e){N(e.list)?e.list=e.list.map(e=>F(e)?be(e):e):L(e.named)&&Object.keys(e.named).forEach(t=>{F(e.named[t])&&(e.named[t]=be(e.named[t]))})}function br(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=A(),f,p=null,m=n,h=null,g=`translate`;for(let r=0;r<u.length;r++){f=h=u[r],process.env.NODE_ENV!==`production`&&n!==f&&!qn(n,f)&&Un(i,t)&&s(wn(J.FALLBACK_TO_TRANSLATE,{key:t,target:f}));let l=process.env.NODE_ENV===`production`?void 0:e.__v_emitter;process.env.NODE_ENV!==`production`&&n!==f&&l&&l.emit(`fallback`,{type:g,key:t,from:m,to:h,groupId:`${g}:${t}`}),d=o[f]||A();let _=null,v,y;if(process.env.NODE_ENV!==`production`&&C&&l&&(_=window.performance.now(),v=`intlify-message-resolve-start`,y=`intlify-message-resolve-end`,w&&w(v)),(p=c(d,t))===null&&(p=d[t]),process.env.NODE_ENV!==`production`&&C&&l){let e=window.performance.now();l&&_&&p&&l.emit(`message-resolve`,{type:`message-resolve`,key:t,message:p,time:e-_,groupId:`${g}:${t}`}),v&&y&&w&&T&&(w(y),T(`intlify message resolve`,v,y))}if(F(p)||G(p)||Y(p))break;if(!Jn(f,u)){let n=Gn(e,t,f,a,g);n!==t&&(p=n)}m=h}return[p,f,d]}function xr(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(Y(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=process.env.NODE_ENV===`production`?void 0:e.__v_emitter,l=null,u,d;process.env.NODE_ENV!==`production`&&C&&c&&(l=window.performance.now(),u=`intlify-message-compilation-start`,d=`intlify-message-compilation-end`,w&&w(u));let f=o(r,wr(e,n,i,r,s,a));if(process.env.NODE_ENV!==`production`&&C&&c){let e=window.performance.now();c&&l&&c.emit(`message-compilation`,{type:`message-compilation`,message:r,time:e-l,groupId:`translate:${t}`}),u&&d&&w&&T&&(w(d),T(`intlify message compilation`,u,d))}return f.locale=n,f.key=t,f.source=r,f}function Sr(e,t,n){let r=process.env.NODE_ENV===`production`?void 0:e.__v_emitter,i=null,a,o;process.env.NODE_ENV!==`production`&&C&&r&&(i=window.performance.now(),a=`intlify-message-evaluation-start`,o=`intlify-message-evaluation-end`,w&&w(a));let s=t(n);if(process.env.NODE_ENV!==`production`&&C&&r){let e=window.performance.now();r&&i&&r.emit(`message-evaluation`,{type:`message-evaluation`,value:s,time:e-i,groupId:`translate:${t.key}`}),a&&o&&w&&T&&(w(o),T(`intlify message evaluation`,a,o))}return s}function Cr(...e){let[t,n,r]=e,i=A();if(!F(t)&&!O(t)&&!Y(t)&&!G(t))throw q(K.INVALID_ARGUMENT);let a=O(t)?String(t):(Y(t),t);return O(n)?i.plural=n:F(n)?i.default=n:R(n)&&!se(n)?i.named=n:N(n)&&(i.list=n),O(r)?i.plural=r:F(r)?i.default=r:R(r)&&k(i,r),[a,i]}function wr(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:t=>{if(a&&a(t),process.env.NODE_ENV!==`production`){let i=Tr(r),a=t.location&&i&&_e(i,t.location.start.offset,t.location.end.offset),o=e.__v_emitter;o&&i&&o.emit(`compile-error`,{message:i,error:t.message,start:t.location&&t.location.start.offset,end:t.location&&t.location.end.offset,groupId:`translate:${n}`});let s=`Message compilation error: ${t.message}`;throw SyntaxError(a?`${s}\n${a}`:s)}throw t},onCacheKey:e=>re(t,n,e)}}function Tr(e){if(F(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function Er(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=br(u||e,r,t,s,c,l);a=n??o(i,r)}if(F(a)||G(a)){let n=!1,i=xr(e,r,t,a,r,()=>{n=!0});return n?_r:i}return Y(a)?a:_r}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),O(r.plural)&&(d.pluralIndex=r.plural),d}St();function Dr(){return Or().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Or(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}var kr=typeof Proxy==`function`,Ar=`devtools-plugin:setup`,jr=`plugin:settings:set`,Mr,Nr;function Pr(){return Mr===void 0&&(typeof window<`u`&&window.performance?(Mr=!0,Nr=window.performance):typeof globalThis<`u`&&globalThis.perf_hooks?.performance?(Mr=!0,Nr=globalThis.perf_hooks.performance):Mr=!1),Mr}function Fr(){return Pr()?Nr.now():Date.now()}var Ir=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings)n[t]=e.settings[t].defaultValue;let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return Fr()}},t&&t.on(jr,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function Lr(e,t){let n=e,r=Or(),i=Dr(),a=kr&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(Ar,e,t);else{let e=a?new Ir(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}var Rr=`11.4.8`;function zr(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(j().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(j().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1)}var X={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Z(e,...t){return Ve(e,null,process.env.NODE_ENV===`production`?void 0:{messages:Br,args:t})}var Br={[X.UNEXPECTED_RETURN_TYPE]:`Unexpected return type in composer`,[X.INVALID_ARGUMENT]:`Invalid argument`,[X.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[X.NOT_INSTALLED]:"Need to install with `app.use` function",[X.UNEXPECTED_ERROR]:`Unexpected error`,[X.REQUIRED_VALUE]:`Required in value: {0}`,[X.INVALID_VALUE]:`Invalid value`,[X.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:`Cannot setup vue-devtools plugin`,[X.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[X.NOT_COMPATIBLE_LEGACY_VUE_I18N]:`Not compatible legacy VueI18n.`,[X.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:`Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly`},Vr=D(`__translateVNode`),Hr=D(`__datetimeParts`),Ur=D(`__numberParts`),Wr=D(`__enableEmitter`),Gr=D(`__disableEmitter`),Kr=D(`__setPluralRules`);D(`__intlifyMeta`);var qr=D(`__injectWithOption`),Jr=D(`__dispose`),Q={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15},Yr={[Q.FALLBACK_TO_ROOT]:`Fall back to {type} '{key}' with root locale.`,[Q.NOT_FOUND_PARENT_SCOPE]:`Not found parent scope. use the global scope.`,[Q.IGNORE_OBJ_FLATTEN]:`Ignore object flatten: '{key}' key has an string value`,[Q.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
5
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Q.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`,[Q.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Xr(e,...t){return ne(Yr[e],...t)}function Zr(e){if(!L(e)||G(e))return e;for(let t in e)if(M(e,t)){if(!t.includes(`.`))L(e[t])&&Zr(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=A()),!L(i[n[e]])){process.env.NODE_ENV!==`production`&&z(Xr(Q.IGNORE_OBJ_FLATTEN,{key:n[e]})),a=!0;break}i=i[n[e]]}if(a||(G(i)?Bt.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!G(i)){let e=i[n[r]];L(e)&&Zr(e)}}}return e}function Qr(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=R(n)?n:N(r)?A():{[e]:A()};if(N(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||A(),Le(n,o[t])):Le(n,o)}else F(e)&&Le(JSON.parse(e),o)}),i==null&&a)for(let e in o)M(o,e)&&Zr(o[e]);return o}function $r(e){return e.type}function ei(e,t,n){let r=L(t.messages)?t.messages:A();`__i18nGlobal`in n&&(r=Qr(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),L(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(L(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function ti(e){return(0,c.createVNode)(c.Text,null,e,0)}function ni(){let e=`currentInstance`;return e in c?c[e]:c.getCurrentInstance()}var ri=()=>[],ii=()=>!1,ai=0;function oi(e){return((t,n,r,i)=>e(n,r,ni()||void 0,i))}function si(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=C?c.ref:c.shallowRef,o=!I(e.inheritLocale)||e.inheritLocale,s=a(t&&o?t.locale.value:F(e.locale)?e.locale:En),l=a(t&&o?t.fallbackLocale.value:F(e.fallbackLocale)||N(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),u=a(Qr(s.value,e)),d=a(R(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),f=a(R(e.numberFormats)?e.numberFormats:{[s.value]:{}}),p=t?t.missingWarn:I(e.missingWarn)||oe(e.missingWarn)?e.missingWarn:!0,m=t?t.fallbackWarn:I(e.fallbackWarn)||oe(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:!I(e.fallbackRoot)||e.fallbackRoot,g=!!e.fallbackFormat,_=P(e.missing)?e.missing:null,v=P(e.missing)?oi(e.missing):null,y=P(e.postTranslation)?e.postTranslation:null,b=t?t.warnHtmlMessage:!I(e.warnHtmlMessage)||e.warnHtmlMessage,ee=!!e.escapeParameter,te=t?t.modifiers:R(e.modifiers)?e.modifiers:{},x=e.pluralRules||t&&t.pluralRules,S;S=(()=>{r&&Rn(null);let t={version:Rr,locale:s.value,fallbackLocale:l.value,messages:u.value,modifiers:te,pluralRules:x,missing:v===null?void 0:v,missingWarn:p,fallbackWarn:m,fallbackFormat:g,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:b,escapeParameter:ee,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=d.value,t.numberFormats=f.value,t.__datetimeFormatters=R(S)?S.__datetimeFormatters:void 0,t.__numberFormatters=R(S)?S.__numberFormatters:void 0,process.env.NODE_ENV!==`production`&&(t.__v_emitter=R(S)?S.__v_emitter:void 0);let n=Vn(t);return r&&Rn(n),n})(),Kn(S,s.value,l.value);function w(){return[s.value,l.value,u.value,d.value,f.value]}let T=(0,c.computed)({get:()=>s.value,set:e=>{S.locale=e,s.value=e}}),E=(0,c.computed)({get:()=>l.value,set:e=>{S.fallbackLocale=e,l.value=e,Kn(S,s.value,e)}}),ne=(0,c.computed)(()=>u.value),D=(0,c.computed)(()=>d.value),re=(0,c.computed)(()=>f.value);function ie(){return P(y)?y:null}function ae(e){y=e,S.postTranslation=e}function se(){return _}function ce(e){e!==null&&(v=oi(e)),_=e,S.missing=v}function A(e,t){return e!==`translate`||!t.resolvedMessage}let le=(e,n,i,a,o,s)=>{w();let c;try{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__,r||(S.fallbackContext=t?zn():void 0),c=e(S)}finally{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__,r||(S.fallbackContext=void 0)}if(i!==`translate exists`&&O(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();if(process.env.NODE_ENV!==`production`&&t&&F(e)&&A(i,r)&&(h&&(Un(m,e)||Wn(p,e))&&z(Xr(Q.FALLBACK_TO_ROOT,{key:e,type:i})),process.env.NODE_ENV!==`production`)){let{__v_emitter:t}=S;t&&h&&t.emit(`fallback`,{type:i,key:e,to:`global`,groupId:`${i}:${e}`})}return t&&h?a(t):o(e)}if(s(c))return c;throw Z(X.UNEXPECTED_RETURN_TYPE)};function j(...e){return le(t=>Reflect.apply(vr,null,[t,...e]),()=>Cr(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>F(e))}function ue(...e){let[t,n,r]=e;if(r&&!L(r))throw Z(X.INVALID_ARGUMENT);return j(t,n,k({resolvedMessage:!0},r||{}))}function de(...e){return le(t=>Reflect.apply(tr,null,[t,...e]),()=>rr(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>F(e)||N(e))}function fe(...e){return le(t=>Reflect.apply(ar,null,[t,...e]),()=>sr(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>F(e)||N(e))}function pe(e){return e.map(e=>F(e)||O(e)||I(e)?ti(String(e)):e)}let me={normalize:pe,interpolate:e=>e,type:`vnode`};function he(...e){return le(t=>{let n,r=t;try{r.processor=me,n=Reflect.apply(vr,null,[r,...e])}finally{r.processor=null}return n},()=>Cr(...e),`translate`,t=>t[Vr](...e),e=>[ti(e)],e=>N(e))}function ge(...e){return le(t=>Reflect.apply(ar,null,[t,...e]),()=>sr(...e),`number format`,t=>t[Ur](...e),ri,e=>F(e)||N(e))}function _e(...e){return le(t=>Reflect.apply(tr,null,[t,...e]),()=>rr(...e),`datetime format`,t=>t[Hr](...e),ri,e=>F(e)||N(e))}function ve(e){x=e,S.pluralRules=x}function ye(e,t){return le(()=>{if(!e)return!1;let n=F(t)?t:s.value,r=F(t)?[n]:ln(S,l.value,n);for(let t=0;t<r.length;t++){let n=Se(r[t]),i=S.messageResolver(n,e);if(i===null&&(i=n[e]),G(i)||Y(i)||F(i))return!0}return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),ii,e=>I(e))}function be(e){let t=null,n=ln(S,l.value,s.value);for(let r=0;r<n.length;r++){let i=u.value[n[r]]||{},a=S.messageResolver(i,e);if(a!=null){t=a;break}}return t}function xe(e){return be(e)??(t&&t.tm(e)||{})}function Se(e){return u.value[e]||{}}function Ce(e,t){if(i){let n={[e]:t};for(let e in n)M(n,e)&&Zr(n[e]);t=n[e]}u.value[e]=t,S.messages=u.value}function we(e,t){u.value[e]=u.value[e]||{};let n={[e]:t};if(i)for(let e in n)M(n,e)&&Zr(n[e]);t=n[e],Le(t,u.value[e]),S.messages=u.value}function Te(e){return d.value[e]||{}}function Ee(e,t){d.value[e]=t,S.datetimeFormats=d.value,ir(S,e,t)}function De(e,t){d.value[e]=k(d.value[e]||{},t),S.datetimeFormats=d.value,ir(S,e,t)}function Oe(e){return f.value[e]||{}}function ke(e,t){f.value[e]=t,S.numberFormats=f.value,cr(S,e,t)}function Ae(e,t){f.value[e]=k(f.value[e]||{},t),S.numberFormats=f.value,cr(S,e,t)}ai++,t&&C&&((0,c.watch)(t.locale,e=>{o&&(s.value=e,S.locale=e,Kn(S,s.value,l.value))}),(0,c.watch)(t.fallbackLocale,e=>{o&&(l.value=e,S.fallbackLocale=e,Kn(S,s.value,l.value))}));let B={id:ai,locale:T,fallbackLocale:E,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(s.value=t.locale.value,l.value=t.fallbackLocale.value,Kn(S,s.value,l.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:ne,get modifiers(){return te},get pluralRules(){return x||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(e){p=e,S.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(e){m=e,S.fallbackWarn=m},get fallbackRoot(){return h},set fallbackRoot(e){h=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,S.fallbackFormat=g},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,S.warnHtmlMessage=e},get escapeParameter(){return ee},set escapeParameter(e){ee=e,S.escapeParameter=e},t:j,getLocaleMessage:Se,setLocaleMessage:Ce,mergeLocaleMessage:we,getPostTranslationHandler:ie,setPostTranslationHandler:ae,getMissingHandler:se,setMissingHandler:ce,[Kr]:ve};return B.datetimeFormats=D,B.numberFormats=re,B.rt=ue,B.te=ye,B.tm=xe,B.d=de,B.n=fe,B.getDateTimeFormat=Te,B.setDateTimeFormat=Ee,B.mergeDateTimeFormat=De,B.getNumberFormat=Oe,B.setNumberFormat=ke,B.mergeNumberFormat=Ae,B[qr]=n,B[Vr]=he,B[Hr]=_e,B[Ur]=ge,process.env.NODE_ENV!==`production`&&(B[Wr]=e=>{S.__v_emitter=e},B[Gr]=()=>{S.__v_emitter=void 0}),B}var ci=`vue-i18n: composer properties`,li={"vue-devtools-plugin-vue-i18n":`Vue I18n DevTools`,"vue-i18n-resource-inspector":`Vue I18n DevTools`,"vue-i18n-timeline":`Vue I18n`},ui={"vue-i18n-resource-inspector":`Search for scopes ...`},di={"vue-i18n-timeline":16764185},fi;async function pi(e,t){return new Promise((n,r)=>{try{Lr({id:`vue-devtools-plugin-vue-i18n`,label:li[`vue-devtools-plugin-vue-i18n`],packageName:`vue-i18n`,homepage:`https://vue-i18n.intlify.dev`,logo:`https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png`,componentStateTypes:[ci],app:e},r=>{fi=r,r.on.visitComponentTree(({componentInstance:e,treeNode:n})=>{hi(e,n,t)}),r.on.inspectComponent(({componentInstance:e,instanceData:n})=>{e.__VUE_I18N__&&n&&(t.mode===`legacy`?e.__VUE_I18N__!==t.global.__composer&&gi(n,e.__VUE_I18N__):gi(n,e.__VUE_I18N__))}),r.addInspector({id:`vue-i18n-resource-inspector`,label:li[`vue-i18n-resource-inspector`],icon:`language`,treeFilterPlaceholder:ui[`vue-i18n-resource-inspector`]}),r.on.getInspectorTree(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&Si(n,t)});let i=new Map;r.on.getInspectorState(async n=>{if(n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`){if(r.unhighlightElement(),Ti(n,t),n.nodeId===`global`){if(!i.has(n.app)){let[e]=await r.getComponentInstances(n.app);i.set(n.app,e)}r.highlightElement(i.get(n.app))}else{let e=Ci(n.nodeId,t);e&&r.highlightElement(e)}}}),r.on.editInspectorState(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&Oi(n,t)}),r.addTimelineLayer({id:`vue-i18n-timeline`,label:li[`vue-i18n-timeline`],color:di[`vue-i18n-timeline`]}),n(!0)})}catch(e){console.error(e),r(!1)}})}function mi(e){return e.type.name||e.type.displayName||e.type.__file||`Anonymous`}function hi(e,t,n){let r=n.mode===`composition`?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==r){let n={label:`i18n (${mi(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(n)}}function gi(e,t){let n=ci;e.state.push({type:n,key:`locale`,editable:!0,value:t.locale.value}),e.state.push({type:n,key:`availableLocales`,editable:!1,value:t.availableLocales}),e.state.push({type:n,key:`fallbackLocale`,editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:`inheritLocale`,editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:`messages`,editable:!1,value:_i(t.messages.value)}),e.state.push({type:n,key:`datetimeFormats`,editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:`numberFormats`,editable:!1,value:t.numberFormats.value})}function _i(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];P(r)&&`source`in r?t[n]=xi(r):G(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:L(r)?t[n]=_i(r):t[n]=r}),t}var vi={"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"&":`&amp;`};function yi(e){return e.replace(/[<>"&]/g,bi)}function bi(e){return vi[e]||e}function xi(e){return{_custom:{type:`function`,display:`<span>ƒ</span> ${e.source?`("${yi(e.source)}")`:`(?)`}`}}}function Si(e,t){e.rootNodes.push({id:`global`,label:`Global Scope`});let n=t.mode===`composition`?t.global:t.global.__composer;for(let[r,i]of t.__instances){let a=t.mode===`composition`?i:i.__composer;n!==a&&e.rootNodes.push({id:a.id.toString(),label:`${mi(r)} Scope`})}}function Ci(e,t){let n=null;if(e!==`global`){for(let[r,i]of t.__instances.entries())if(i.id.toString()===e){n=r;break}}return n}function wi(e,t){if(e===`global`)return t.mode===`composition`?t.global:t.global.__composer;{let n=Array.from(t.__instances.values()).find(t=>t.id.toString()===e);return n?t.mode===`composition`?n:n.__composer:null}}function Ti(e,t){let n=wi(e.nodeId,t);return n&&(e.state=Ei(n)),null}function Ei(e){let t={},n=`Locale related info`;t[n]=[{type:n,key:`locale`,editable:!0,value:e.locale.value},{type:n,key:`fallbackLocale`,editable:!0,value:e.fallbackLocale.value},{type:n,key:`availableLocales`,editable:!1,value:e.availableLocales},{type:n,key:`inheritLocale`,editable:!0,value:e.inheritLocale}];let r=`Locale messages info`;t[r]=[{type:r,key:`messages`,editable:!1,value:_i(e.messages.value)}];{let n=`Datetime formats info`;t[n]=[{type:n,key:`datetimeFormats`,editable:!1,value:e.datetimeFormats.value}];let r=`Datetime formats info`;t[r]=[{type:r,key:`numberFormats`,editable:!1,value:e.numberFormats.value}]}return t}function Di(e,t){if(fi){let n;t&&`groupId`in t&&(n=t.groupId,delete t.groupId),fi.addTimelineEvent({layerId:`vue-i18n-timeline`,event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e===`compile-error`?`error`:e===`fallback`||e===`missing`?`warning`:`default`}})}}function Oi(e,t){let n=wi(e.nodeId,t);if(n){let[t]=e.path;t===`locale`&&F(e.state.value)?n.locale.value=e.state.value:t===`fallbackLocale`&&(F(e.state.value)||N(e.state.value)||L(e.state.value))?n.fallbackLocale.value=e.state.value:t===`inheritLocale`&&I(e.state.value)&&(n.inheritLocale=e.state.value)}}function ki(e){let t=F(e.locale)?e.locale:En,n=F(e.fallbackLocale)||N(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=P(e.missing)?e.missing:void 0,i=I(e.silentTranslationWarn)||oe(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=I(e.silentFallbackWarn)||oe(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=!I(e.fallbackRoot)||e.fallbackRoot,s=!!e.formatFallbackMessages,c=R(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=P(e.postTranslation)?e.postTranslation:void 0,d=!F(e.warnHtmlInMessage)||e.warnHtmlInMessage!==`off`,f=!!e.escapeParameterHtml,p=!I(e.sync)||e.sync,m=e.messages;if(R(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(k(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function Ai(e={}){let t=si(ki(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return I(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=I(e)?!e:e},get silentFallbackWarn(){return I(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=I(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,process.env.NODE_ENV!==`production`&&(r.__enableEmitter=e=>{let n=t;n[Wr]&&n[Wr](e)},r.__disableEmitter=()=>{let e=t;e[Gr]&&e[Gr]()}),r}function ji(e,t,n){return{beforeCreate(){let r=ni();if(!r)throw Z(X.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=Mi(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Ai(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n){if(this===this.$root)this.$i18n=Mi(e,i);else{this.$i18n=Ai({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else this.$i18n=e;i.__i18nGlobal&&ei(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!==`production`&&this.$i18n){let e=ni();if(!e)return;let t=this.$i18n;e.__VUE_I18N__=t.__composer;let n=this.__v_emitter=Fe();t.__enableEmitter&&t.__enableEmitter(n),n.on(`*`,Di)}},unmounted(){let e=ni();if(!e)throw Z(X.UNEXPECTED_ERROR);let t=this.$i18n;process.env.NODE_ENV!==`production`&&e.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off(`*`,Di),delete this.__v_emitter),t&&(t.__disableEmitter&&t.__disableEmitter(),delete e.__VUE_I18N__)),t&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t?.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n)}}}function Mi(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[Kr](t.pluralizationRules||e.pluralizationRules);let n=Qr(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var Ni={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function Pi({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===c.Fragment?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},A())}function Fi(){return c.Fragment}var Ii=(0,c.defineComponent)({name:`i18n-t`,props:k({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>O(e)||!isNaN(e)}},Ni),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||qi({useScope:e.scope,__useComponent:!0});return()=>{let a=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=A();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=F(e.plural)?+e.plural:e.plural);let o=Pi(t,r);return i[Vr](e.keypath,o,a)},o=k(A(),r),s=F(e.tag)||L(e.tag)?e.tag:Fi();return L(s)?(0,c.h)(s,o,{default:a}):(0,c.h)(s,o,a())}}});function Li(e){return N(e)&&!F(e[0])}function Ri(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t=()=>{let t={part:!0},a=A();e.locale&&(t.locale=e.locale),F(e.format)?t.key=e.format:L(e.format)&&(F(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?k(A(),t,{[r]:e.format[r]}):t,A()));let o=r(e.value,t,a),s=[t.key];return N(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Li(r)&&(r[0].key=`${e.type}-${t}`),r}):F(o)&&(s=[o]),s},o=k(A(),a),s=F(e.tag)||L(e.tag)?e.tag:Fi();return L(s)?(0,c.h)(s,o,{default:t}):(0,c.h)(s,o,t())}}var zi=(0,c.defineComponent)({name:`i18n-n`,props:k({value:{type:Number,required:!0},format:{type:[String,Object]}},Ni),setup(e,t){let n=e.i18n||qi({useScope:e.scope,__useComponent:!0});return Ri(e,t,or,(...e)=>n[Ur](...e))}});function Bi(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Vi(e){let t=t=>{process.env.NODE_ENV!==`production`&&ye(Xr(Q.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));let{instance:n,value:r}=t;if(!n||!n.$)throw Z(X.UNEXPECTED_ERROR);let i=Bi(e,n.$),a=Hi(r);return[Reflect.apply(i.t,i,[...Ui(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);C&&(e.__i18nWatcher=(0,c.watch)(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{C&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Hi(t);e.textContent=Reflect.apply(n.t,n,[...Ui(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Hi(e){if(F(e))return{path:e};if(R(e)){if(!(`path`in e))throw Z(X.REQUIRED_VALUE,`path`);return e}throw Z(X.INVALID_VALUE)}function Ui(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return F(n)&&(o.locale=n),O(i)&&(o.plural=i),O(a)&&(o.plural=a),[t,s,o]}function Wi(e,t,...n){let r=R(n[0])?n[0]:{};(!I(r.globalInstall)||r.globalInstall)&&([Ii.name,`I18nT`].forEach(t=>e.component(t,Ii)),[zi.name,`I18nN`].forEach(t=>e.component(t,zi)),[ia.name,`I18nD`].forEach(t=>e.component(t,ia))),e.directive(`t`,Vi(t))}var Gi=D(`global-vue-i18n`);function Ki(e={}){let t=__VUE_I18N_LEGACY_API__&&I(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!==`production`&&t&&ye(Xr(Q.DEPRECATE_LEGACY_MODE));let n=!I(e.globalInjection)||e.globalInjection,r=new Map,[i,a]=Ji(e,t),o=D(process.env.NODE_ENV===`production`?``:`vue-i18n`);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(process.env.NODE_ENV!==`production`&&(e.__VUE_I18N__=u),e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),R(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=ra(e,u.global)),__VUE_I18N_FULL_INSTALL__&&Wi(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(ji(a,a.__composer,u));let s=e.unmount;if(e.unmount=()=>{i&&i(),u.dispose(),s()},process.env.NODE_ENV!==`production`){if(!await pi(e,u))throw Z(X.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);let n=Fe();if(t){let e=a;e.__enableEmitter&&e.__enableEmitter(n)}else{let e=a;e[Wr]&&e[Wr](n)}n.on(`*`,Di)}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function qi(e={}){let t=ni();if(t==null)throw Z(X.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Z(X.NOT_INSTALLED);let n=Yi(t),r=Zi(n),i=$r(t),a=Xi(e,i);if(a===`global`)return ei(r,e,i),r;if(a===`parent`){let i=Qi(n,t,e.__useComponent);return i??=(process.env.NODE_ENV!==`production`&&z(Xr(Q.NOT_FOUND_PARENT_SCOPE)),r),i}if(a===`isolated`){if(n.mode!==`composition`)throw Z(X.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let i=n,a=k({},e);a.__root=Qi(n,t)||r;let o=si(a);i.__composerExtend&&(o[Jr]=i.__composerExtend(o));let s=null;if(process.env.NODE_ENV!==`production`){s=Fe();let e=o;e[Wr]&&e[Wr](s),s.on(`*`,Di)}return(0,c.getCurrentScope)()&&(0,c.onScopeDispose)(()=>{if(process.env.NODE_ENV!==`production`){s&&s.off(`*`,Di);let e=o;e[Gr]&&e[Gr]()}let e=o[Jr];e&&(e(),delete o[Jr])}),o}let o=n,s=o.__getInstance(t);if(s==null){let n=k({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=si(n),o.__composerExtend&&(s[Jr]=o.__composerExtend(s)),ea(o,t,s),o.__setInstance(t,s)}else process.env.NODE_ENV!==`production`&&a===`local`&&z(Xr(Q.DUPLICATE_USE_I18N_CALLING));return s}function Ji(e,t){let n=(0,c.effectScope)(),r=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Ai(e)):n.run(()=>si(e));if(r==null)throw Z(X.UNEXPECTED_ERROR);return[n,r]}function Yi(e){let t=(0,c.inject)(e.isCE?Gi:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Z(e.isCE?X.NOT_INSTALLED_WITH_PROVIDE:X.UNEXPECTED_ERROR);return t}function Xi(e,t){return se(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Zi(e){return e.mode===`composition`?e.global:e.global.__composer}function Qi(e,t,n=!1){let r=null,i=t.root,a=$i(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[qr]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function $i(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function ea(e,t,n){let r=null;(0,c.onMounted)(()=>{if(process.env.NODE_ENV!==`production`){t.__VUE_I18N__=n,r=Fe();let e=n;e[Wr]&&e[Wr](r),r.on(`*`,Di)}},t),(0,c.onUnmounted)(()=>{let i=n;process.env.NODE_ENV!==`production`&&(r&&r.off(`*`,Di),i[Gr]&&i[Gr](),delete t.__VUE_I18N__),e.__deleteInstance(t);let a=i[Jr];a&&(a(),delete i[Jr])},t)}var ta=[`locale`,`fallbackLocale`,`availableLocales`],na=[`t`,`rt`,`d`,`n`,`tm`,`te`];function ra(e,t){let n=Object.create(null);return ta.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw Z(X.UNEXPECTED_ERROR);let i=(0,c.isRef)(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,na.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw Z(X.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,na.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var ia=(0,c.defineComponent)({name:`i18n-d`,props:k({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ni),setup(e,t){let n=e.i18n||qi({useScope:e.scope,__useComponent:!0});return Ri(e,t,nr,(...e)=>n[Hr](...e))}});if(zr(),An(Zt),Mn(Sn),Pn(ln),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let e=j();e.__INTLIFY__=!0,$t(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;var aa={shared:{close:`关闭`,copy:`复制代码`,copied:`已复制`},promptInput:{placeholder:`给 AI Chat UI 发送消息...`,disclaimer:`AI Chat UI 可能会产生不准确的信息,请注意甄别内容的准确性`,send:`发送`,stop:`停止`,previewAttachment:`预览 {name}`,removeAttachment:`移除 {name}`,uploading:`上传中`,uploadFailed:`上传失败`},conversation:{emptyTitle:`有什么可以帮你的?`,emptyDescription:`选择一个话题开始,或直接输入你的问题`,scrollUnread:`{count} 条新消息`},message:{you:`你`,assistant:`AI Chat UI`,typingAria:`AI 正在输入`},toolCall:{parameters:`参数`,result:`结果`,error:`错误`,statusPending:`准备中`,statusCalling:`运行中`,statusAwaitingApproval:`等待确认`,statusCompleted:`已完成`,statusDenied:`已拒绝`,statusError:`失败`},citation:{source:`来源`,sources:`来源 {count} 条`,viewSource:`查看来源`,prevSource:`上一个来源`,nextSource:`下一个来源`,openLink:`打开链接`},attachments:{empty:`暂无附件`},comparison:{leftLabel:`回复 A`,rightLabel:`回复 B`,buttonLabel:`喜欢这个`},markdown:{rendering:`图表渲染中…`,renderFailed:`图表渲染失败:`},thinking:{title:`思考过程`,thoughtFor:`已思考 {duration} 秒`,thinking:`正在思考…`,stepCount:`{count} 个步骤`,stepPending:`等待中`,stepActive:`进行中`,stepComplete:`完成`,stepError:`失败`},welcome:{title:`有什么可以帮你的?`,description:`选择一个话题开始,或直接输入你的问题`},prompts:{title:`试试这样问`},feedback:{like:`点赞`,dislike:`点踩`,commentHint:`帮助我们改进`,commentPlaceholder:`告诉我们哪里可以做得更好…`,submit:`提交`,cancel:`取消`},confirmation:{title:`需要确认操作`,description:`AI 请求执行以下工具,请确认:`,approve:`允许`,reject:`拒绝`,denied:`已拒绝`,awaiting:`等待确认…`},branchPicker:{prev:`上一个版本`,next:`下一个版本`,label:`版本 {current}/{total}`},jsonDiff:{oldLabel:`修改前`,newLabel:`修改后`,identical:`内容相同`,changedOnly:`仅显示差异`},modelIcon:{unknown:`未知模型`},messageActions:{copy:`复制`,retry:`重新生成`,edit:`编辑`,saveEdit:`保存并重发`,cancelEdit:`取消`,editPlaceholder:`编辑消息内容…`},suggestion:{empty:`无匹配项`},provider:{title:`Provider 设置`,typeLabel:`服务类型`,typeOpenaiCompat:`OpenAI 兼容`,typeAnthropic:`Anthropic`,nameLabel:`展示名称`,namePlaceholder:`例如 My DeepSeek`,baseURLLabel:`Base URL`,baseURLPlaceholder:`https://api.example.com/v1`,baseURLPresetsLabel:`快捷预设:`,presetOpenai:`OpenAI`,presetDeepseek:`DeepSeek`,presetGlm:`GLM`,presetKimi:`Kimi`,apiKeyLabel:`API Key`,apiKeyPlaceholder:`sk-...`,modelLabel:`模型名`,modelPlaceholder:`如 deepseek-chat / claude-sonnet-4-5`,rememberLabel:`记住此配置(存入浏览器,服务重启后自动恢复)`,edit:`编辑`,submitEdit:`保存修改`,cancelEdit:`取消编辑`,submit:`注册`,remove:`删除`,listTitle:`已注册模型`,listEmpty:`暂无已注册模型`,errorRequired:`该项为必填项`},imageLightbox:{previewTitle:`图片预览`,prevImage:`上一张`,nextImage:`下一张`},codeBlock:{expand:`展开`,collapse:`收起`}},oa={shared:{close:`Close`,copy:`Copy code`,copied:`Copied`},promptInput:{placeholder:`Send a message to AI Chat UI...`,disclaimer:`AI Chat UI may produce inaccurate information. Please double-check.`,send:`Send`,stop:`Stop`,previewAttachment:`Preview {name}`,removeAttachment:`Remove {name}`,uploading:`Uploading`,uploadFailed:`Upload failed`},conversation:{emptyTitle:`How can I help you?`,emptyDescription:`Pick a topic to get started, or type your question`,scrollUnread:`{count} new messages`},message:{you:`You`,assistant:`AI Chat UI`,typingAria:`AI is typing`},toolCall:{parameters:`Parameters`,result:`Result`,error:`Error`,statusPending:`Pending`,statusCalling:`Running`,statusAwaitingApproval:`Awaiting approval`,statusCompleted:`Completed`,statusDenied:`Denied`,statusError:`Failed`},citation:{source:`Source`,sources:`{count} sources`,viewSource:`View source`,prevSource:`Previous source`,nextSource:`Next source`,openLink:`Open link`},attachments:{empty:`No attachments`},comparison:{leftLabel:`Response A`,rightLabel:`Response B`,buttonLabel:`Like this`},markdown:{rendering:`Rendering diagram…`,renderFailed:`Failed to render diagram: `},thinking:{title:`Thinking Process`,thoughtFor:`Thought for {duration}s`,thinking:`Thinking…`,stepCount:`{count} steps`,stepPending:`Pending`,stepActive:`In progress`,stepComplete:`Done`,stepError:`Failed`},welcome:{title:`How can I help you?`,description:`Pick a topic to get started, or type your question`},prompts:{title:`Try asking`},feedback:{like:`Like`,dislike:`Dislike`,commentHint:`Help us improve`,commentPlaceholder:`Tell us what could be better…`,submit:`Submit`,cancel:`Cancel`},confirmation:{title:`Confirmation required`,description:`The AI requests to run the following tool. Please confirm:`,approve:`Allow`,reject:`Deny`,denied:`Denied`,awaiting:`Awaiting confirmation…`},branchPicker:{prev:`Previous version`,next:`Next version`,label:`Version {current}/{total}`},jsonDiff:{oldLabel:`Before`,newLabel:`After`,identical:`Identical content`,changedOnly:`Changed only`},modelIcon:{unknown:`Unknown model`},messageActions:{copy:`Copy`,retry:`Regenerate`,edit:`Edit`,saveEdit:`Save & resend`,cancelEdit:`Cancel`,editPlaceholder:`Edit message…`},suggestion:{empty:`No matches`},provider:{title:`Provider Settings`,typeLabel:`Service type`,typeOpenaiCompat:`OpenAI compatible`,typeAnthropic:`Anthropic`,nameLabel:`Display name`,namePlaceholder:`e.g. My DeepSeek`,baseURLLabel:`Base URL`,baseURLPlaceholder:`https://api.example.com/v1`,baseURLPresetsLabel:`Quick presets: `,presetOpenai:`OpenAI`,presetDeepseek:`DeepSeek`,presetGlm:`GLM`,presetKimi:`Kimi`,apiKeyLabel:`API Key`,apiKeyPlaceholder:`sk-...`,modelLabel:`Model`,modelPlaceholder:`e.g. deepseek-chat / claude-sonnet-4-5`,rememberLabel:`Remember this provider (stored in browser, auto-restored after server restart)`,edit:`Edit`,submitEdit:`Save changes`,cancelEdit:`Cancel edit`,submit:`Register`,remove:`Delete`,listTitle:`Registered models`,listEmpty:`No registered models yet`,errorRequired:`This field is required`},imageLightbox:{previewTitle:`Image preview`,prevImage:`Previous image`,nextImage:`Next image`},codeBlock:{expand:`Expand`,collapse:`Collapse`}},sa=`ai-chat-locale`,ca=[`zh-CN`,`en-US`],$=Ki({legacy:!1,locale:`zh-CN`,fallbackLocale:`zh-CN`,messages:{"zh-CN":aa,"en-US":oa}}),la=$.global;function ua(){if(typeof window>`u`)return`zh-CN`;let e=localStorage.getItem(sa);return e&&ca.includes(e)?e:navigator.language.startsWith(`en`)?`en-US`:`zh-CN`}function da(e,t={}){let{persist:n=!0}=t;la.locale.value=e,typeof document<`u`&&(document.documentElement.lang=e),n&&typeof window<`u`&&localStorage.setItem(sa,e)}da(ua(),{persist:!1});var fa=[`role`,`aria-live`],pa={class:`ai-chat-toast__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},ma={key:0,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z`},ha={key:1,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z`},ga={key:2,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z`},_a={key:3,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.008v.008H12v-.008z`},va={class:`ai-chat-toast__message`},ya=[`aria-label`],ba=(0,c.defineComponent)({__name:`Toast`,props:{message:{},type:{default:`info`},duration:{default:3e3},placement:{default:`top`}},emits:[`close`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a;function o(){a!==void 0&&(clearTimeout(a),a=void 0)}function s(){o(),r.duration>0&&(a=setTimeout(()=>{a=void 0,i(`close`)},r.duration))}function l(){o(),i(`close`)}return(0,c.onMounted)(s),(0,c.watch)(()=>r.duration,s),(0,c.onBeforeUnmount)(o),(t,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-toast`,[`ai-chat-toast--${e.type}`,`ai-chat-toast--${e.placement}`]]),role:e.type===`error`?`alert`:`status`,"aria-live":e.type===`error`?void 0:`polite`},[((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,pa,[e.type===`info`?((0,c.openBlock)(),(0,c.createElementBlock)(`path`,ma)):e.type===`success`?((0,c.openBlock)(),(0,c.createElementBlock)(`path`,ha)):e.type===`error`?((0,c.openBlock)(),(0,c.createElementBlock)(`path`,ga)):((0,c.openBlock)(),(0,c.createElementBlock)(`path`,_a))])),(0,c.createElementVNode)(`span`,va,(0,c.toDisplayString)(e.message),1),(0,c.createElementVNode)(`button`,{class:`ai-chat-toast__close`,type:`button`,"aria-label":(0,c.unref)(n)(`shared.close`),onClick:l},[...r[0]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,ya)],10,fa))}}),xa={class:`ai-chat-lang-toggle`},Sa=[`aria-expanded`],Ca={class:`ai-chat-lang-toggle__label`},wa=[`aria-selected`,`onClick`],Ta={class:`ai-chat-lang-toggle__option-label`},Ea={key:0,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Da=(0,c.defineComponent)({__name:`LanguageToggle`,props:{locales:{default:()=>[{value:`zh-CN`,label:`简体中文`},{value:`en-US`,label:`English`}]},modelValue:{default:void 0}},emits:[`update:modelValue`,`change`],setup(e,{emit:t}){let n=e,r=t,i=(0,c.ref)(!1),a=(0,c.ref)(null),o=(0,c.ref)(null),s=(0,c.ref)({}),l=(0,c.computed)(()=>n.modelValue??$.global.locale.value),u=(0,c.computed)(()=>n.locales.find(e=>e.value===l.value)?.label??l.value);function d(){let e=a.value;if(!e)return;let t=e.getBoundingClientRect(),r=8+n.locales.length*34,i=t.bottom+r>window.innerHeight&&t.top>r;s.value={top:`${i?t.top-r-6:t.bottom+6}px`,left:`${t.left}px`}}function f(){i.value?i.value=!1:(d(),i.value=!0)}function p(e){e!==l.value&&(n.modelValue===void 0&&da(e),r(`update:modelValue`,e),r(`change`,e)),i.value=!1}function m(e){if(!i.value)return;let t=e.target;a.value?.contains(t)||o.value?.contains(t)||(i.value=!1)}function h(e){e.key===`Escape`&&(i.value=!1)}return(0,c.onMounted)(()=>{document.addEventListener(`click`,m),document.addEventListener(`keydown`,h)}),(0,c.onBeforeUnmount)(()=>{document.removeEventListener(`click`,m),document.removeEventListener(`keydown`,h)}),(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,xa,[(0,c.createElementVNode)(`button`,{ref_key:`triggerRef`,ref:a,type:`button`,class:`ai-chat-lang-toggle__trigger`,"aria-expanded":i.value,"aria-haspopup":`listbox`,onClick:f},[n[1]||=(0,c.createElementVNode)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,c.createElementVNode)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,c.createElementVNode)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,c.createElementVNode)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})],-1),(0,c.createElementVNode)(`span`,Ca,(0,c.toDisplayString)(u.value),1),((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,{class:(0,c.normalizeClass)([`ai-chat-lang-toggle__caret`,{"is-open":i.value}]),width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[...n[0]||=[(0,c.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2))],8,Sa),((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:`body`},[i.value?((0,c.openBlock)(),(0,c.createElementBlock)(`ul`,{key:0,ref_key:`popupRef`,ref:o,class:`ai-chat-lang-toggle__menu`,role:`listbox`,style:(0,c.normalizeStyle)(s.value)},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e.locales,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`li`,{key:e.value,role:`option`,class:(0,c.normalizeClass)([`ai-chat-lang-toggle__option`,{"is-selected":e.value===l.value}]),"aria-selected":e.value===l.value,onClick:t=>p(e.value)},[(0,c.createElementVNode)(`span`,Ta,(0,c.toDisplayString)(e.label),1),e.value===l.value?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,Ea,[...n[2]||=[(0,c.createElementVNode)(`polyline`,{points:`20 6 9 17 4 12`},null,-1)]])):(0,c.createCommentVNode)(``,!0)],10,wa))),128))],4)):(0,c.createCommentVNode)(``,!0)]))]))}}),Oa=[`aria-label`],ka=[`width`,`height`,`aria-label`],Aa=[`d`,`fill`],ja=[`aria-label`],Ma=(0,c.defineComponent)({__name:`ModelIcon`,props:{model:{},vendor:{default:void 0},size:{default:18}},setup(e){let{t}=$.global,n=e,r=(0,c.useSlots)(),i={anthropic:{color:`#D97706`,paths:[`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`]},openai:{color:`#000000`,paths:[`M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z`]},google:{color:`#4285F4`,paths:[`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`]},zhipu:{color:`#3859FF`,paths:[`M11.991 23.503a.24.24 0 00-.244.248.24.24 0 00.244.249.24.24 0 00.245-.249.24.24 0 00-.22-.247l-.025-.001zM9.671 5.365a1.697 1.697 0 011.099 2.132l-.071.172-.016.04-.018.054c-.07.16-.104.32-.104.498-.035.71.47 1.279 1.186 1.314h.366c1.309.053 2.338 1.173 2.286 2.523-.052 1.332-1.152 2.38-2.478 2.327h-.174c-.715.018-1.274.64-1.239 1.368 0 .124.018.23.053.337.209.373.54.658.96.8.75.23 1.517-.125 1.9-.782l.018-.035c.402-.64 1.17-.96 1.92-.711.854.284 1.378 1.226 1.099 2.167a1.661 1.661 0 01-2.077 1.102 1.711 1.711 0 01-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646 1.646 0 00-1.954.746 1.66 1.66 0 01-1.065.764 1.677 1.677 0 01-1.989-1.279c-.209-.906.332-1.83 1.257-2.043a1.51 1.51 0 01.296-.035h.018c.68-.071 1.151-.622 1.116-1.333a1.307 1.307 0 00-.227-.693 2.515 2.515 0 01-.366-1.403 2.39 2.39 0 01.366-1.208c.14-.195.21-.444.227-.693.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.43 1.43 0 01-.299-.07l-.05-.019a1.7 1.7 0 01-1.047-2.114 1.68 1.68 0 012.094-1.101zm-5.575 10.11c.26-.264.639-.367.994-.27.355.096.633.379.728.74.095.362-.007.748-.267 1.013-.402.41-1.053.41-1.455 0a1.062 1.062 0 010-1.482zm14.845-.294c.359-.09.738.024.992.297.254.274.344.665.237 1.025-.107.36-.396.634-.756.718-.551.128-1.1-.22-1.23-.781a1.05 1.05 0 01.757-1.26zm-.064-4.39c.314.32.49.753.49 1.206 0 .452-.176.886-.49 1.206-.315.32-.74.5-1.185.5-.444 0-.87-.18-1.184-.5a1.727 1.727 0 010-2.412 1.654 1.654 0 012.369 0zm-11.243.163c.364.484.447 1.128.218 1.691a1.665 1.665 0 01-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68 1.68 0 011.33-1.038c.593-.08 1.183.169 1.547.652zm11.545-4.221c.368 0 .708.2.892.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.892.524c-.568 0-1.03-.47-1.03-1.048 0-.579.462-1.048 1.03-1.048zm-14.358 0c.368 0 .707.2.891.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.891.524c-.569 0-1.03-.47-1.03-1.048 0-.579.461-1.048 1.03-1.048zm10.031-1.475c.925 0 1.675.764 1.675 1.706s-.75 1.705-1.675 1.705-1.674-.763-1.674-1.705c0-.942.75-1.706 1.674-1.706zm-2.626-.684c.362-.082.653-.356.761-.718a1.062 1.062 0 00-.238-1.028 1.017 1.017 0 00-.996-.294c-.547.14-.881.7-.752 1.257.13.558.675.907 1.225.783zm0 16.876c.359-.087.644-.36.75-.72a1.062 1.062 0 00-.237-1.019 1.018 1.018 0 00-.985-.301 1.037 1.037 0 00-.762.717c-.108.361-.017.754.239 1.028.245.263.606.377.953.305l.043-.01zM17.19 3.5a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64a.631.631 0 00-.628.64c0 .355.28.64.628.64zm-10.38 0a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64a.631.631 0 00-.628.64c0 .355.279.64.628.64zm-5.182 7.852a.631.631 0 00-.628.64c0 .354.28.639.628.639a.63.63 0 00.627-.606l.001-.034a.62.62 0 00-.628-.64zm5.182 9.13a.631.631 0 00-.628.64c0 .355.279.64.628.64a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm10.38.018a.631.631 0 00-.628.64c0 .355.279.64.628.64a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm5.182-9.148a.631.631 0 00-.628.64c0 .354.279.639.628.639a.63.63 0 00.628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24 0 00.244-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249c0 .142.122.249.244.249zM11.991.497a.24.24 0 00.245-.248A.24.24 0 0011.99 0a.24.24 0 00-.244.249c0 .133.108.236.223.247l.021.001zM2.011 6.36a.24.24 0 00.245-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249.24.24 0 00.244.249zm0 11.263a.24.24 0 00-.243.248.24.24 0 00.244.249.24.24 0 00.244-.249.252.252 0 00-.244-.248zm19.995-.018a.24.24 0 00-.245.248.24.24 0 00.245.25.24.24 0 00.244-.25.252.252 0 00-.244-.248z`]},qwen:{color:`#615EFF`,paths:[`M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z`]},deepseek:{color:`#4D6BFE`,paths:[`M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z`]},mistral:{color:`#F7D046`,paths:[`M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z`]},meta:{color:`#0668E1`,paths:[`M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z`]},cohere:{color:`#39594D`,paths:[`M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z`,`M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z`,`M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z`]},yi:{color:`#003425`,paths:[`M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5`]},xai:{color:`#000000`,paths:[`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`]},moonshot:{color:`#16191E`,paths:[`M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z`]},doubao:{color:`#1C64F2`,paths:[`M5.31 15.756c.172-3.75 1.883-5.999 2.549-6.739-3.26 2.058-5.425 5.658-6.358 8.308v1.12C1.501 21.513 4.226 24 7.59 24a6.59 6.59 0 002.2-.375c.353-.12.7-.248 1.039-.378.913-.899 1.65-1.91 2.243-2.992-4.877 2.431-7.974.072-7.763-4.5l.002.001z`,`M22.57 10.283c-1.212-.901-4.109-2.404-7.397-2.8.295 3.792.093 8.766-2.1 12.773a12.782 12.782 0 01-2.244 2.992c3.764-1.448 6.746-3.457 8.596-5.219 2.82-2.683 3.353-5.178 3.361-6.66a2.737 2.737 0 00-.216-1.084v-.002zM14.303 1.867C12.955.7 11.248 0 9.39 0 7.532 0 5.883.677 4.545 1.807 2.791 3.29 1.627 5.557 1.5 8.125v9.201c.932-2.65 3.097-6.25 6.357-8.307.5-.318 1.025-.595 1.569-.829 1.883-.801 3.878-.932 5.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z`,`M17.305 4.961a199.47 199.47 0 01-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648 2.786.869 5.617 3.288.395 6.185 1.898 7.396 2.8-1.306-1.275-3.475-3.487-5.266-5.323z`]},minimax:{color:`#F23F5D`,paths:[`M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z`]},wenxin:{color:`#167ADF`,paths:[`M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z`]}},a=(0,c.computed)(()=>n.vendor?{vendor:n.vendor,label:l.VENDOR_LABELS[n.vendor]}:(0,l.detectModelVendor)(n.model)),o=(0,c.computed)(()=>{let{vendor:e}=a.value;return e===`unknown`?null:i[e]}),s=(0,c.computed)(()=>a.value.label||t(`modelIcon.unknown`)),u=(0,c.computed)(()=>{let e=n.model.trim().charAt(0);return e?e.toUpperCase():`?`}),d=(0,c.computed)(()=>({width:`${n.size}px`,height:`${n.size}px`})),f=(0,c.computed)(()=>!!r.default);return(t,n)=>f.value?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:0,class:`ai-chat-model-icon ai-chat-model-icon--custom`,role:`img`,"aria-label":s.value,style:(0,c.normalizeStyle)(d.value)},[(0,c.renderSlot)(t.$slots,`default`)],12,Oa)):o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,{key:1,class:`ai-chat-model-icon`,width:e.size,height:e.size,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,"aria-label":s.value,"fill-rule":`evenodd`},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(o.value.paths,(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`path`,{key:t,d:e,fill:o.value.color},null,8,Aa))),128))],8,ka)):((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:2,class:`ai-chat-model-icon ai-chat-model-icon--fallback`,role:`img`,"aria-label":s.value,style:(0,c.normalizeStyle)({...d.value,fontSize:`${Math.round(e.size/2)}px`})},(0,c.toDisplayString)(u.value),13,ja))}}),Na={class:`ai-chat-jsondiff`},Pa={class:`ai-chat-jsondiff__header`},Fa={class:`ai-chat-jsondiff__label`},Ia={class:`ai-chat-jsondiff__label`},La={key:0,class:`ai-chat-jsondiff__empty`},Ra={key:1,class:`ai-chat-jsondiff__body`},za={class:`ai-chat-jsondiff__value`},Ba={key:0,class:`ai-chat-jsondiff__key`},Va={class:`ai-chat-jsondiff__char--old`},Ha={class:`ai-chat-jsondiff__value`},Ua={key:0,class:`ai-chat-jsondiff__key`},Wa={class:`ai-chat-jsondiff__char--new`},Ga=`[Circular]`,Ka=32,qa=(0,c.defineComponent)({__name:`JsonDiffView`,props:{oldValue:{},newValue:{},oldLabel:{default:void 0},newLabel:{default:void 0},onlyChanged:{type:Boolean,default:!1}},setup(e){let{t}=$.global,n=e;function r(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??`null`}catch{return String(e)}}function i(e,t,n,a,o){if(typeof e==`object`&&e&&!Array.isArray(e)){if(a.has(e)){n.set(t,Ga);return}if(o>=Ka){n.set(t,r(e));return}a.add(e);let s=e,c=Object.keys(s);if(c.length===0)n.set(t,`{}`);else for(let e of c)i(s[e],t?`${t}.${e}`:e,n,a,o+1);a.delete(e);return}n.set(t,r(e))}function a(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;let i=e.length,a=t.length;for(;i>n&&a>n&&e[i-1]===t[a-1];)i--,a--;return{prefix:e.slice(0,n),midOld:e.slice(n,i),midNew:t.slice(n,a),suffix:e.slice(i)}}let o=(0,c.computed)(()=>{let e=new Map,t=new Map;i(n.oldValue,``,e,new WeakSet,0),i(n.newValue,``,t,new WeakSet,0);let r=[...e.keys()];for(let n of t.keys())e.has(n)||r.push(n);return r.map(n=>{let r=e.has(n),i=t.has(n),o=e.get(n)??``,s=t.get(n)??``,c;return c=r&&i?o===s?`same`:`modified`:r?`removed`:`added`,{key:n,status:c,oldStr:r?o:``,newStr:i?s:``,hl:c===`modified`?a(o,s):null}})}),s=(0,c.computed)(()=>n.onlyChanged?o.value.filter(e=>e.status!==`same`):o.value),l=(0,c.computed)(()=>n.oldLabel??t(`jsonDiff.oldLabel`)),u=(0,c.computed)(()=>n.newLabel??t(`jsonDiff.newLabel`));function d(e,t){return e===`same`?[]:e===`removed`?t===`old`?[`is-del`]:[`is-void`]:e===`added`?t===`new`?[`is-add`]:[`is-void`]:t===`old`?[`is-del`]:[`is-add`]}function f(e,t){return e===`removed`?t===`old`?`−`:``:e===`added`?t===`new`?`+`:``:e===`modified`?t===`old`?`−`:`+`:``}return(e,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Na,[(0,c.createElementVNode)(`div`,Pa,[(0,c.createElementVNode)(`div`,Fa,(0,c.toDisplayString)(l.value),1),(0,c.createElementVNode)(`div`,Ia,(0,c.toDisplayString)(u.value),1)]),s.value.length===0?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,La,(0,c.toDisplayString)((0,c.unref)(t)(`jsonDiff.identical`)),1)):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Ra,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(s.value,e=>((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:e.key},[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-jsondiff__cell`,d(e.status,`old`)])},[(0,c.createElementVNode)(`span`,{class:(0,c.normalizeClass)([`ai-chat-jsondiff__sign`,{"is-del":f(e.status,`old`)===`−`}])},(0,c.toDisplayString)(f(e.status,`old`)),3),(0,c.createElementVNode)(`span`,za,[e.key?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Ba,(0,c.toDisplayString)(e.key)+`:`,1)):(0,c.createCommentVNode)(``,!0),e.status===`modified`&&e.hl?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(e.hl.prefix),1),(0,c.createElementVNode)(`span`,Va,(0,c.toDisplayString)(e.hl.midOld),1),(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(e.hl.suffix),1)],64)):((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:2,class:(0,c.normalizeClass)([`ai-chat-jsondiff__scalar`,{"is-del-text":e.status===`removed`}])},(0,c.toDisplayString)(e.oldStr),3))])],2),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-jsondiff__cell`,d(e.status,`new`)])},[(0,c.createElementVNode)(`span`,{class:(0,c.normalizeClass)([`ai-chat-jsondiff__sign`,{"is-add":f(e.status,`new`)===`+`}])},(0,c.toDisplayString)(f(e.status,`new`)),3),(0,c.createElementVNode)(`span`,Ha,[e.key?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Ua,(0,c.toDisplayString)(e.key)+`:`,1)):(0,c.createCommentVNode)(``,!0),e.status===`modified`&&e.hl?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(e.hl.prefix),1),(0,c.createElementVNode)(`span`,Wa,(0,c.toDisplayString)(e.hl.midNew),1),(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)(e.hl.suffix),1)],64)):((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:2,class:(0,c.normalizeClass)([`ai-chat-jsondiff__scalar`,{"is-add-text":e.status===`added`}])},(0,c.toDisplayString)(e.newStr),3))])],2)],64))),128))]))]))}});function Ja(e=50){let t=(0,c.ref)(!0),n=(0,c.ref)(0),r=null,i=null,a=null,o=0,s=!1;function l(){if(!r)return;let{scrollTop:i,scrollHeight:a,clientHeight:o}=r;t.value=a-i-o<e,t.value&&(n.value=0)}function u(){n.value=0,r&&requestAnimationFrame(()=>{r.scrollTop=r.scrollHeight})}function d(){if(!r)return;let e=r.scrollHeight,i=e>o;o=e,t.value?u():i&&n.value++}function f(){s||(s=!0,requestAnimationFrame(()=>{s=!1,d()}))}function p(e){i&&=(i.disconnect(),null),a&&=(a.disconnect(),null),r=e,r&&(n.value=0,o=r.scrollHeight,r.addEventListener(`scroll`,l,{passive:!0}),i=new ResizeObserver(f),i.observe(r),a=new MutationObserver(f),a.observe(r,{childList:!0,subtree:!0,characterData:!0}))}return{isAtBottom:t,unreadCount:n,scrollToBottom:u,bindContainer:p}}var Ya={default:{name:`默认靛蓝`,vars:{"--ai-chat-color-accent-500":`#6366f1`,"--ai-chat-color-accent-600":`#4f46e5`,"--ai-chat-color-accent-400":`#818cf8`}},purple:{name:`优雅紫`,vars:{"--ai-chat-color-accent-500":`#8b5cf6`,"--ai-chat-color-accent-600":`#7c3aed`,"--ai-chat-color-accent-400":`#a78bfa`}},green:{name:`自然绿`,vars:{"--ai-chat-color-accent-500":`#059669`,"--ai-chat-color-accent-600":`#047857`,"--ai-chat-color-accent-400":`#10b981`}},warm:{name:`暖橙`,vars:{"--ai-chat-color-accent-500":`#ea580c`,"--ai-chat-color-accent-600":`#c2410c`,"--ai-chat-color-accent-400":`#f97316`}}};function Xa(e,t,n){function r(){let r=e.value;if(!r)return;let i=new Set;t.value&&Object.keys(Ya[t.value].vars).forEach(e=>i.add(e)),n.value&&Object.keys(n.value).forEach(e=>i.add(e)),i.forEach(e=>r.style.removeProperty(e));let a=Ya[t.value||`default`];if(a)for(let[e,t]of Object.entries(a.vars))r.style.setProperty(e,t);if(n.value)for(let[e,t]of Object.entries(n.value))r.style.setProperty(e,t)}(0,c.onMounted)(r),(0,c.watch)([t,n],r,{deep:!0})}var Za=Symbol(`messageLayout`);function Qa(){return(0,c.inject)(Za,void 0)}var $a=[`data-theme`],eo=(0,c.defineComponent)({__name:`Conversation`,props:{autoScroll:{type:Boolean,default:!0},theme:{},customTheme:{},darkMode:{type:[Boolean,String],default:void 0},layout:{default:`stacked`},messageAlign:{default:`left`}},setup(e){let t=e,n=(0,c.ref)(),r=Ja();(0,c.provide)(`scrollAnchor`,r),(0,c.provide)(`autoScroll`,t.autoScroll),(0,c.provide)(Za,(0,c.computed)(()=>({layout:t.layout,messageAlign:t.messageAlign}))),Xa((0,c.computed)(()=>n.value),(0,c.computed)(()=>t.theme),(0,c.computed)(()=>t.customTheme));let i=(0,c.computed)(()=>{if(t.darkMode!==void 0&&t.darkMode!==`auto`)return t.darkMode?`dark`:`light`});return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{ref_key:`rootRef`,ref:n,class:`ai-chat-conversation`,"data-theme":i.value},[(0,c.renderSlot)(e.$slots,`default`)],8,$a))}}),to={class:`ai-chat-conversation-messages`},no=(0,c.defineComponent)({__name:`ConversationContent`,setup(e){let t=(0,c.inject)(`scrollAnchor`),n=(0,c.inject)(`autoScroll`,!0),r=(0,c.ref)(null),i=null;return(0,c.onMounted)(()=>{r.value&&t&&(t.bindContainer(r.value),i=new MutationObserver(()=>{n&&t.isAtBottom.value&&t.scrollToBottom()}),i.observe(r.value,{childList:!0,subtree:!0}))}),(0,c.onBeforeUnmount)(()=>{i?.disconnect()}),(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{ref_key:`scrollEl`,ref:r,class:`ai-chat-conversation-content ai-chat-scrollbar`},[(0,c.createElementVNode)(`div`,to,[(0,c.renderSlot)(e.$slots,`default`)])],512))}}),ro={class:`ai-chat-conversation-empty`},io={class:`ai-chat-conversation-empty__logo`},ao={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},oo={class:`ai-chat-conversation-empty__title`},so={class:`ai-chat-conversation-empty__desc`},co={class:`ai-chat-conversation-empty__suggestions`},lo=(0,c.defineComponent)({__name:`ConversationEmpty`,props:{icon:{default:void 0},title:{},description:{}},setup(e){let t=e,{t:n}=$.global,r=(0,c.computed)(()=>t.title??n(`conversation.emptyTitle`)),i=(0,c.computed)(()=>t.description??n(`conversation.emptyDescription`));return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ro,[(0,c.createElementVNode)(`div`,io,[(0,c.renderSlot)(t.$slots,`icon`,{},()=>[e.icon?((0,c.openBlock)(),(0,c.createBlock)((0,c.resolveDynamicComponent)(e.icon),{key:1})):((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,ao,[...n[0]||=[(0,c.createElementVNode)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`},null,-1)]]))])]),(0,c.createElementVNode)(`h1`,oo,(0,c.toDisplayString)(r.value),1),(0,c.createElementVNode)(`p`,so,(0,c.toDisplayString)(i.value),1),(0,c.createElementVNode)(`div`,co,[(0,c.renderSlot)(t.$slots,`suggestions`)])]))}}),uo=[`aria-label`],fo={key:0,class:`ai-chat-scroll-btn__badge`},po=(0,c.defineComponent)({__name:`ConversationScrollBtn`,props:{badge:{}},setup(e){let t=e,n=(0,c.inject)(`scrollAnchor`),{t:r}=$.global,i=(0,c.computed)(()=>t.badge??n?.unreadCount.value??0),a=(0,c.computed)(()=>r(`conversation.scrollUnread`,{count:i.value}));return(e,t)=>(0,c.unref)(n)?((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,class:`ai-chat-scroll-btn`,style:(0,c.normalizeStyle)({visibility:(0,c.unref)(n).isAtBottom.value?`hidden`:`visible`}),"aria-label":i.value>0?a.value:void 0,onClick:t[0]||=e=>(0,c.unref)(n).scrollToBottom()},[t[1]||=(0,c.createElementVNode)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1),i.value>0?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,fo,(0,c.toDisplayString)(i.value),1)):(0,c.createCommentVNode)(``,!0)],12,uo)):(0,c.createCommentVNode)(``,!0)}}),mo=Symbol(`ai-chat-markdown-renderer`);function ho(e){(0,c.provide)(mo,e)}function go(){return(0,c.inject)(mo,null)}var _o={class:`ai-chat-message__avatar`},vo={key:0,class:`ai-chat-avatar ai-chat-avatar--user`},yo={key:1,class:`ai-chat-avatar ai-chat-avatar--assistant`},bo={class:`ai-chat-message__body`},xo={class:`ai-chat-message__role`},So=(0,c.defineComponent)({__name:`Message`,props:{from:{}},setup(e){let{t}=$.global;(0,c.provide)(`messageFrom`,e.from);let n=Qa(),r=(0,c.computed)(()=>{let e=n?.value;return!e||e.layout===`stacked`?[`ai-chat-message--layout-stacked`]:[`ai-chat-message--layout-im`,`ai-chat-message--user-side-${e.messageAlign}`]});return(n,i)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-message ai-chat-animate-fade-in-up`,[`ai-chat-message--${e.from}`,...r.value]])},[(0,c.createElementVNode)(`div`,_o,[(0,c.renderSlot)(n.$slots,`avatar`,{},()=>[e.from===`user`?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,vo,[(0,c.renderSlot)(n.$slots,`avatar-text`,{},()=>[i[0]||=(0,c.createTextVNode)(`U`,-1)])])):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,yo,[(0,c.renderSlot)(n.$slots,`avatar-icon`,{},()=>[i[1]||=(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})],-1)])]))])]),(0,c.createElementVNode)(`div`,bo,[(0,c.createElementVNode)(`div`,xo,[(0,c.renderSlot)(n.$slots,`role`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)(e.from===`user`?(0,c.unref)(t)(`message.you`):(0,c.unref)(t)(`message.assistant`)),1)])]),(0,c.renderSlot)(n.$slots,`default`)])],2))}}),Co={class:`ai-chat-thinking__label`},wo={key:0,class:`ai-chat-thinking__body`},To={key:0,class:`ai-chat-thinking__cursor`},Eo=h((0,c.defineComponent)({__name:`ThinkingBlock`,props:{content:{},duration:{},showDuration:{type:Boolean,default:!0},streaming:{type:Boolean,default:!1}},setup(e){let{t}=$.global,n=e,r=(0,c.ref)(!1),i=!1;(0,c.watch)(()=>n.streaming,e=>{i||(r.value=e)},{immediate:!0});let a=(0,c.computed)(()=>{if(!n.duration||n.duration<=0)return``;let e=n.duration/1e3;return e>=10?`${Math.round(e)}`:`${Number(e.toFixed(1))}`}),o=(0,c.computed)(()=>n.streaming?t(`thinking.thinking`):n.showDuration&&a.value?t(`thinking.thoughtFor`,{duration:a.value}):t(`thinking.title`));function s(){i=!0,r.value=!r.value}return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-thinking`,{"ai-chat-thinking--expanded":r.value,"ai-chat-thinking--streaming":e.streaming}])},[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking__trigger`,onClick:s},[n[0]||=(0,c.createElementVNode)(`svg`,{class:`ai-chat-thinking__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{d:`M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3L12 3z`})],-1),(0,c.createElementVNode)(`span`,Co,(0,c.toDisplayString)(o.value),1),n[1]||=(0,c.createElementVNode)(`svg`,{class:`ai-chat-thinking__chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,c.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1)]),(0,c.createVNode)(c.Transition,{name:`ai-chat-thinking`},{default:(0,c.withCtx)(()=>[r.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,wo,[(0,c.createTextVNode)((0,c.toDisplayString)(e.content),1),(0,c.renderSlot)(t.$slots,`default`,{},void 0,!0),e.streaming?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,To)):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0)]),_:3})],2))}}),[[`__scopeId`,`data-v-f179b552`]]),Do={class:`ai-chat-message-content`},Oo=[`aria-label`],ko=(0,c.defineComponent)({__name:`MessageContent`,props:{content:{},thinking:{},streaming:{type:Boolean}},setup(e){let{t}=$.global,n=e,r=go(),i=(0,c.computed)(()=>{if(n.thinking)return{content:n.thinking.content,duration:n.thinking.duration,showDuration:!0,streaming:n.streaming&&n.thinking.active!==!1}});return(e,a)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Do,[i.value?((0,c.openBlock)(),(0,c.createBlock)(Eo,(0,c.normalizeProps)((0,c.mergeProps)({key:0},i.value)),null,16)):(0,c.createCommentVNode)(``,!0),n.streaming&&!n.content&&!n.thinking?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:1,class:`ai-chat-typing`,"aria-label":(0,c.unref)(t)(`message.typingAria`)},[...a[0]||=[(0,c.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1),(0,c.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1),(0,c.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1)]],8,Oo)):(0,c.createCommentVNode)(``,!0),(0,c.unref)(r)&&n.content!==void 0?((0,c.openBlock)(),(0,c.createBlock)((0,c.resolveDynamicComponent)((0,c.unref)(r)),{key:2,content:n.content,streaming:n.streaming},null,8,[`content`,`streaming`])):(0,c.renderSlot)(e.$slots,`default`,{},void 0,void 0,3)]))}}),Ao={},jo={class:`ai-chat-message-actions`};function Mo(e,t){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,jo,[(0,c.renderSlot)(e.$slots,`default`)])}var No=h(Ao,[[`render`,Mo]]),Po=[`title`,`disabled`],Fo={key:0,class:`ai-chat-message-action__label`},Io=h((0,c.defineComponent)({__name:`MessageAction`,props:{label:{},tooltip:{},disabled:{type:Boolean}},emits:[`click`],setup(e){return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{class:`ai-chat-message-action`,title:e.tooltip||e.label,disabled:e.disabled,onClick:n[0]||=e=>t.$emit(`click`)},[(0,c.renderSlot)(t.$slots,`default`,{},()=>[e.label?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Fo,(0,c.toDisplayString)(e.label),1)):(0,c.createCommentVNode)(``,!0)],!0)],8,Po))}}),[[`__scopeId`,`data-v-aac9798b`]]),Lo={},Ro={class:`ai-chat-message-attachments`};function zo(e,t){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,Ro,[(0,c.renderSlot)(e.$slots,`default`)])}var Bo=h(Lo,[[`render`,zo]]),Vo={class:`ai-chat-message-feedback__buttons`},Ho=[`aria-label`,`aria-pressed`],Uo=[`aria-label`,`aria-pressed`],Wo={key:1,class:`ai-chat-message-feedback__comment`},Go=[`placeholder`,`aria-label`],Ko={class:`ai-chat-message-feedback__comment-actions`},qo=[`disabled`],Jo=h((0,c.defineComponent)({__name:`MessageFeedback`,props:{value:{default:null},allowComment:{type:Boolean,default:!0}},emits:[`change`,`comment`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.ref)(r.value),o=(0,c.ref)(!1),s=(0,c.ref)(``),l=(0,c.ref)(null);(0,c.watch)(()=>r.value,e=>{a.value=e??null,e!==`down`&&(o.value=!1)}),(0,c.watch)(o,async e=>{e&&(await(0,c.nextTick)(),l.value?.focus())});function u(e){let t=a.value===e?null:e;a.value=t,t!==`down`&&(o.value=!1),i(`change`,t)}function d(){let e=s.value.trim();e&&(i(`comment`,e),s.value=``,o.value=!1)}function f(){s.value=``,o.value=!1}return(t,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-message-feedback`,{"ai-chat-message-feedback--rated":!!a.value}])},[(0,c.createElementVNode)(`div`,Vo,[(0,c.createElementVNode)(`button`,{type:`button`,class:(0,c.normalizeClass)([`ai-chat-message-feedback__btn ai-chat-message-feedback__btn--up`,{"is-active":a.value===`up`}]),"aria-label":(0,c.unref)(n)(`feedback.like`),"aria-pressed":a.value===`up`,onClick:r[0]||=e=>u(`up`)},[...r[4]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`path`,{d:`M7 10v12`}),(0,c.createElementVNode)(`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`})],-1)]],10,Ho),(0,c.createElementVNode)(`button`,{type:`button`,class:(0,c.normalizeClass)([`ai-chat-message-feedback__btn ai-chat-message-feedback__btn--down`,{"is-active":a.value===`down`}]),"aria-label":(0,c.unref)(n)(`feedback.dislike`),"aria-pressed":a.value===`down`,onClick:r[1]||=e=>u(`down`)},[...r[5]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`path`,{d:`M17 14V2`}),(0,c.createElementVNode)(`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`})],-1)]],10,Uo)]),e.allowComment&&a.value===`down`&&!o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`ai-chat-message-feedback__hint`,onClick:r[2]||=e=>o.value=!0},[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`feedback.commentHint`))+` `,1),r[6]||=(0,c.createElementVNode)(`span`,{class:`ai-chat-message-feedback__hint-arrow`,"aria-hidden":`true`},`→`,-1)])):(0,c.createCommentVNode)(``,!0),e.allowComment&&a.value===`down`&&o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Wo,[(0,c.withDirectives)((0,c.createElementVNode)(`textarea`,{ref_key:`commentEl`,ref:l,"onUpdate:modelValue":r[3]||=e=>s.value=e,rows:`3`,class:`ai-chat-message-feedback__comment-input`,placeholder:(0,c.unref)(n)(`feedback.commentPlaceholder`),"aria-label":(0,c.unref)(n)(`feedback.commentPlaceholder`)},null,8,Go),[[c.vModelText,s.value]]),(0,c.createElementVNode)(`div`,Ko,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-feedback__submit`,disabled:!s.value.trim(),onClick:d},(0,c.toDisplayString)((0,c.unref)(n)(`feedback.submit`)),9,qo),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-feedback__cancel`,onClick:f},(0,c.toDisplayString)((0,c.unref)(n)(`feedback.cancel`)),1)])])):(0,c.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-d66edaab`]]),Yo={key:0,class:`ai-chat-branch-picker`},Xo={class:`ai-chat-branch-picker__bar`},Zo=[`disabled`,`aria-label`,`title`],Qo={key:0,class:`ai-chat-branch-picker__label`},$o=[`disabled`,`aria-label`,`title`],es={class:`ai-chat-branch-picker__content`},ts=h((0,c.defineComponent)({__name:`BranchPicker`,props:{branchCount:{},activeBranch:{},showLabel:{type:Boolean,default:!0}},emits:[`change`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.computed)(()=>Math.min(Math.max(r.activeBranch,0),Math.max(r.branchCount-1,0))),o=(0,c.computed)(()=>n(`branchPicker.label`,{current:a.value+1,total:r.branchCount})),s=(0,c.computed)(()=>a.value<=0),l=(0,c.computed)(()=>a.value>=r.branchCount-1);function u(){s.value||i(`change`,a.value-1)}function d(){l.value||i(`change`,a.value+1)}return(t,r)=>e.branchCount>1?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Yo,[(0,c.createElementVNode)(`div`,Xo,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-branch-picker__btn ai-chat-branch-picker__btn--prev`,disabled:s.value,"aria-label":(0,c.unref)(n)(`branchPicker.prev`),title:(0,c.unref)(n)(`branchPicker.prev`),onClick:u},[...r[0]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`path`,{d:`m15 18-6-6 6-6`})],-1)]],8,Zo),e.showLabel?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Qo,(0,c.toDisplayString)(o.value),1)):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-branch-picker__btn ai-chat-branch-picker__btn--next`,disabled:l.value,"aria-label":(0,c.unref)(n)(`branchPicker.next`),title:(0,c.unref)(n)(`branchPicker.next`),onClick:d},[...r[1]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`path`,{d:`m9 18 6-6-6-6`})],-1)]],8,$o)]),(0,c.createElementVNode)(`div`,es,[(0,c.renderSlot)(t.$slots,`default`,{},void 0,!0)])])):(0,c.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-43f4372b`]]),ns={key:0,class:`ai-chat-message-action-copy__icon-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},rs={key:1,class:`ai-chat-message-action-copy__icon-copy`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},is=2e3,as=(0,c.defineComponent)({__name:`MessageActionCopy`,props:{text:{},tooltip:{}},setup(e){let{t}=$.global,n=e,r=(0,c.ref)(!1),i,a=(0,c.computed)(()=>n.tooltip??t(`messageActions.copy`));async function o(){if(r.value)return;let e;try{e=await(0,l.copyText)(n.text)}catch{e=!1}e&&(r.value=!0,i=setTimeout(()=>{r.value=!1},is))}return(0,c.onUnmounted)(()=>{i&&clearTimeout(i)}),(e,t)=>((0,c.openBlock)(),(0,c.createBlock)(Io,{tooltip:a.value,onClick:o},{default:(0,c.withCtx)(()=>[r.value?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,ns,[...t[0]||=[(0,c.createElementVNode)(`path`,{d:`M20 6 9 17l-5-5`},null,-1)]])):((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,rs,[...t[1]||=[(0,c.createElementVNode)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`},null,-1),(0,c.createElementVNode)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`},null,-1)]]))]),_:1},8,[`tooltip`]))}}),os=(0,c.defineComponent)({__name:`MessageActionRetry`,props:{disabled:{type:Boolean,default:!1}},emits:[`retry`],setup(e,{emit:t}){let{t:n}=$.global,r=t,i=(0,c.computed)(()=>n(`messageActions.retry`));return(t,n)=>((0,c.openBlock)(),(0,c.createBlock)(Io,{tooltip:i.value,disabled:e.disabled,onClick:n[0]||=e=>r(`retry`)},{default:(0,c.withCtx)(()=>[...n[1]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`polyline`,{points:`23 4 23 10 17 10`}),(0,c.createElementVNode)(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`})],-1)]]),_:1},8,[`tooltip`,`disabled`]))}}),ss={key:1,class:`ai-chat-message-action-edit`},cs=[`placeholder`,`aria-label`],ls={class:`ai-chat-message-action-edit__actions`},us=[`disabled`],ds=h((0,c.defineComponent)({__name:`MessageActionEdit`,props:{initialText:{},placeholder:{}},emits:[`edit`,`cancel`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.ref)(!1),o=(0,c.ref)(``),s=(0,c.ref)(null),l=(0,c.computed)(()=>r.placeholder??n(`messageActions.editPlaceholder`));(0,c.watch)(a,async e=>{e&&(o.value=r.initialText,await(0,c.nextTick)(),s.value?.focus())});function u(){a.value=!0}function d(){let e=o.value.trim();e&&(i(`edit`,e),a.value=!1)}function f(){i(`cancel`),a.value=!1}return(e,t)=>a.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,ss,[(0,c.withDirectives)((0,c.createElementVNode)(`textarea`,{ref_key:`inputEl`,ref:s,"onUpdate:modelValue":t[0]||=e=>o.value=e,rows:`3`,class:`ai-chat-message-action-edit__input`,placeholder:l.value,"aria-label":(0,c.unref)(n)(`messageActions.edit`)},null,8,cs),[[c.vModelText,o.value]]),(0,c.createElementVNode)(`div`,ls,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-action-edit__save`,disabled:!o.value.trim(),onClick:d},(0,c.toDisplayString)((0,c.unref)(n)(`messageActions.saveEdit`)),9,us),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-action-edit__cancel`,onClick:f},(0,c.toDisplayString)((0,c.unref)(n)(`messageActions.cancelEdit`)),1)])])):((0,c.openBlock)(),(0,c.createBlock)(Io,{key:0,tooltip:(0,c.unref)(n)(`messageActions.edit`),onClick:u},{default:(0,c.withCtx)(()=>[...t[1]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`path`,{d:`M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z`}),(0,c.createElementVNode)(`path`,{d:`m15 5 4 4`})],-1)]]),_:1},8,[`tooltip`]))}}),[[`__scopeId`,`data-v-436ff919`]]),fs={class:`ai-chat-message-action-feedback`},ps=h((0,c.defineComponent)({__name:`MessageActionFeedback`,props:{value:{default:null}},emits:[`change`,`comment`],setup(e,{emit:t}){let n=e,r=t;function i(e){r(`change`,e)}function a(e){r(`comment`,e)}return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,fs,[(0,c.createVNode)(Jo,{"data-always-visible":``,value:n.value,onChange:i,onComment:a},null,8,[`value`])]))}}),[[`__scopeId`,`data-v-dcf024bc`]]);function ms(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=Math.floor(Math.log(e)/Math.log(1024));return(e/1024**n).toFixed(n===0?0:1)+` `+t[n]}function hs(e){return e<1e3?e+`ms`:(e/1e3).toFixed(1)+`s`}var gs=[`aria-expanded`],_s={class:`ai-chat-thinking-chain__header-title`},vs={class:`ai-chat-thinking-chain__header-meta`},ys={key:0,class:`ai-chat-thinking-chain__header-duration`},bs={class:`ai-chat-thinking-chain__header-count`},xs={key:0,class:`ai-chat-thinking-chain__body`},Ss=[`aria-expanded`,`onClick`],Cs={class:`ai-chat-thinking-chain__step-icon`},ws={class:`ai-chat-thinking-chain__step-title`},Ts={class:`ai-chat-thinking-chain__step-status`},Es={key:0,class:`ai-chat-thinking-chain__step-duration`},Ds={key:1,class:`ai-chat-thinking-chain__step-chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Os={key:0,class:`ai-chat-thinking-chain__step-content`},ks=h((0,c.defineComponent)({__name:`ThinkingChain`,props:{steps:{},title:{},totalDuration:{},line:{default:`solid`},streaming:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:void 0}},setup(e){let{t}=$.global,n=e,r=(0,c.ref)(n.defaultExpanded??n.streaming),i=!1;(0,c.watch)(()=>n.streaming,e=>{i||(r.value=e)});function a(){i=!0,r.value=!r.value}let o=(0,c.computed)(()=>n.title??(n.streaming?t(`thinking.thinking`):t(`thinking.title`))),s=(0,c.computed)(()=>n.totalDuration??n.steps.reduce((e,t)=>e+(t.duration??0),0)),l=(0,c.computed)(()=>s.value>0?hs(s.value):``),u=(0,c.computed)(()=>t(`thinking.stepCount`,{count:n.steps.length})),d=(0,c.ref)(new Set);function f(e){let t=new Set(d.value);t.has(e.id)?t.delete(e.id):t.add(e.id),d.value=t}let p={pending:`○`,active:`●`,complete:`✓`,error:`✗`},m={pending:`thinking.stepPending`,active:`thinking.stepActive`,complete:`thinking.stepComplete`,error:`thinking.stepError`};return(n,i)=>e.steps.length?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:(0,c.normalizeClass)([`ai-chat-thinking-chain`,[`ai-chat-thinking-chain--line-${e.line}`,{"ai-chat-thinking-chain--expanded":r.value,"ai-chat-thinking-chain--streaming":e.streaming}]])},[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking-chain__header`,"aria-expanded":r.value,onClick:a},[i[0]||=(0,c.createElementVNode)(`svg`,{class:`ai-chat-thinking-chain__header-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{d:`M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3L12 3z`})],-1),(0,c.createElementVNode)(`span`,_s,(0,c.toDisplayString)(o.value),1),(0,c.createElementVNode)(`span`,vs,[l.value?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ys,(0,c.toDisplayString)(l.value),1)):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`span`,bs,(0,c.toDisplayString)(u.value),1)]),i[1]||=(0,c.createElementVNode)(`svg`,{class:`ai-chat-thinking-chain__header-chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,c.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1)],8,gs),(0,c.createVNode)(c.Transition,{name:`ai-chat-thinking-chain`},{default:(0,c.withCtx)(()=>[r.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,xs,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e.steps,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:e.id,class:(0,c.normalizeClass)([`ai-chat-thinking-chain__step`,`ai-chat-thinking-chain__step--${e.status}`])},[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking-chain__step-row`,"aria-expanded":d.value.has(e.id),onClick:t=>f(e)},[(0,c.createElementVNode)(`span`,Cs,(0,c.toDisplayString)(p[e.status]),1),(0,c.createElementVNode)(`span`,ws,(0,c.toDisplayString)(e.title),1),(0,c.createElementVNode)(`span`,Ts,(0,c.toDisplayString)((0,c.unref)(t)(m[e.status])),1),e.duration&&e.duration>0?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Es,(0,c.toDisplayString)((0,c.unref)(hs)(e.duration)),1)):(0,c.createCommentVNode)(``,!0),e.content?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,Ds,[...i[2]||=[(0,c.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]])):(0,c.createCommentVNode)(``,!0)],8,Ss),d.value.has(e.id)&&e.content?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Os,(0,c.toDisplayString)(e.content),1)):(0,c.createCommentVNode)(``,!0)],2))),128))])):(0,c.createCommentVNode)(``,!0)]),_:1})],2)):(0,c.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-b77f5889`]]);function As(e,t){return!t||!t.trim()||t.split(`,`).some(t=>{let n=t.trim().toLowerCase();return n?n.startsWith(`.`)?e.name.toLowerCase().endsWith(n):n.endsWith(`/*`)?e.type.startsWith(n.slice(0,-1)):e.type===n:!1})}function js(e={}){let t=(0,c.ref)([]),n=[];function r(r){let i=Array.from(r),a=[],o=[],s=e.maxFiles??1/0;for(let r of i){if(!As(r,e.accept)){o.push({file:r,reason:`不支持的文件类型:${r.name}`});continue}if(e.maxSize&&r.size>e.maxSize){o.push({file:r,reason:`文件超过大小上限:${r.name}`});continue}if(t.value.length+a.length>=s){o.push({file:r,reason:`附件数量已达上限(${e.maxFiles} 个):${r.name}`});continue}let i=r.type.startsWith(`image/`)&&typeof URL.createObjectURL==`function`?URL.createObjectURL(r):``;i&&n.push(i),a.push({id:(0,l.generateId)(),file:r,previewUrl:i,status:`ready`})}return t.value.push(...a),{accepted:a,rejected:o}}function i(e){let t=n.indexOf(e);t>=0&&n.splice(t,1),URL.revokeObjectURL(e)}function a(e){let n=t.value.find(t=>t.id===e);n&&(n.previewUrl&&i(n.previewUrl),t.value=t.value.filter(t=>t.id!==e))}function o(){for(let e of t.value)e.previewUrl&&i(e.previewUrl);t.value=[]}function s(e,n,r){let i=t.value.find(t=>t.id===e);i&&(i.status=n,i.error=r)}return(0,c.onScopeDispose)(()=>{for(let e of[...n])URL.revokeObjectURL(e);n.length=0}),{pendingFiles:t,addFiles:r,remove:a,clear:o,setStatus:s}}var Ms=Symbol(`prompt-input`),Ns={class:`ai-chat-prompt-input`},Ps={class:`ai-chat-prompt-input__disclaimer`},Fs=(0,c.defineComponent)({__name:`PromptInput`,props:{disabled:{type:Boolean,default:!1},placeholder:{},maxHeight:{default:200},accept:{default:``},multiple:{type:Boolean,default:!1},maxFiles:{default:5},maxSize:{default:void 0},sendKey:{default:`alt-enter`},beforeSend:{type:Function,default:void 0}},emits:[`send`,`abort`,`error`],setup(e,{emit:t}){let n=e,r=t,i=(0,c.ref)(``),a=(0,c.ref)(`ready`),o=(0,c.ref)(``),s=js({accept:n.accept,maxFiles:n.maxFiles,maxSize:n.maxSize});function l(e){let{rejected:t}=s.addFiles(e);if(!t.length)return;let n=t.length>1?`${t[0].reason} 等 ${t.length} 个文件被拒绝`:t[0].reason;o.value=n,r(`error`,{files:t.map(e=>e.file),reason:t[0].reason})}let{t:u}=$.global,d=(0,c.computed)(()=>n.placeholder??u(`promptInput.placeholder`));(0,c.provide)(Ms,{inputText:i,pendingFiles:s.pendingFiles,status:a,disabled:()=>n.disabled,maxHeight:()=>n.maxHeight,placeholder:()=>d.value,addFiles:l,remove:s.remove,sendKey:()=>n.sendKey,multiple:()=>n.multiple,accept:()=>n.accept,submit:f});async function f(){let e=i.value,t=e.trim(),a=[...s.pendingFiles.value];if(!(!t&&!a.length||n.disabled)&&!a.some(e=>e.status===`uploading`)){if(n.beforeSend&&a.length>0){let c=a.map(e=>e.file);a.forEach(e=>s.setStatus(e.id,`uploading`));try{let o=await n.beforeSend(c);r(`send`,{text:t,attachments:o.length?o:void 0}),i.value===e&&(i.value=``),a.forEach(e=>s.remove(e.id))}catch(e){let t=e instanceof Error?e.message:String(e);a.forEach(e=>s.setStatus(e.id,`error`,t)),o.value=`附件上传失败:${t}`}return}r(`send`,{text:t,files:a.length?a.map(e=>e.file):void 0}),i.value=``,s.clear()}}function p(){r(`abort`)}let m=(0,c.ref)(0);function h(e){n.disabled||e.dataTransfer?.types.includes(`Files`)&&(e.preventDefault(),m.value++)}function g(e){e.dataTransfer?.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function _(){m.value=Math.max(0,m.value-1)}function v(e){n.disabled||(m.value=0,e.dataTransfer?.files?.length&&(e.preventDefault(),l(e.dataTransfer.files)))}return(0,c.provide)(`promptSubmit`,f),(0,c.provide)(`promptAbort`,p),(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Ns,[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-prompt-input__wrapper`,{"ai-chat-prompt-input__wrapper--dragover":m.value>0}]),onDragenter:h,onDragover:g,onDragleave:_,onDrop:v},[(0,c.renderSlot)(e.$slots,`default`),(0,c.renderSlot)(e.$slots,`footer`)],34),(0,c.createElementVNode)(`p`,Ps,[(0,c.renderSlot)(e.$slots,`disclaimer`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(u)(`promptInput.disclaimer`)),1)])]),o.value?((0,c.openBlock)(),(0,c.createBlock)(ba,{key:0,message:o.value,type:`error`,onClose:t[0]||=e=>o.value=``},null,8,[`message`])):(0,c.createCommentVNode)(``,!0)]))}}),Is={},Ls={class:`ai-chat-prompt-input-body`};function Rs(e,t){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,Ls,[(0,c.renderSlot)(e.$slots,`default`)])}var zs=h(Is,[[`render`,Rs]]),Bs=[`value`,`placeholder`,`disabled`],Vs=h((0,c.defineComponent)({__name:`PromptInputTextarea`,setup(e){let{inputText:t,disabled:n,maxHeight:r,placeholder:i,sendKey:a,addFiles:o}=(0,c.inject)(Ms),s=(0,c.inject)(`promptSubmit`);function l(e){let n=e.target;t.value=n.value,n.style.height=`auto`,n.style.height=Math.min(n.scrollHeight,r())+`px`}function u(e){if(!(e.isComposing||e.keyCode===229)&&e.key===`Enter`){if(a()===`enter`){e.shiftKey||(e.preventDefault(),s());return}(e.altKey||e.metaKey)&&!e.shiftKey&&(e.preventDefault(),s())}}function d(e){let t=e.clipboardData?.files;t&&t.length>0&&(e.preventDefault(),o(t))}return(e,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`textarea`,{value:(0,c.unref)(t),class:`ai-chat-prompt-textarea`,placeholder:(0,c.unref)(i)(),disabled:(0,c.unref)(n)(),rows:`1`,onInput:l,onKeydown:u,onPaste:d},null,40,Bs))}}),[[`__scopeId`,`data-v-0c31f17c`]]),Hs={},Us={class:`ai-chat-prompt-input-footer`},Ws={class:`ai-chat-prompt-input-footer__tools`},Gs={class:`ai-chat-prompt-input-footer__hint`};function Ks(e,t){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,Us,[(0,c.createElementVNode)(`div`,Ws,[(0,c.renderSlot)(e.$slots,`tools`)]),(0,c.createElementVNode)(`div`,Gs,[(0,c.renderSlot)(e.$slots,`hint`)])])}var qs=h(Hs,[[`render`,Ks]]),Js={},Ys={class:`ai-chat-prompt-input-tools`};function Xs(e,t){return(0,c.openBlock)(),(0,c.createElementBlock)(`div`,Ys,[(0,c.renderSlot)(e.$slots,`default`)])}var Zs=h(Js,[[`render`,Xs]]),Qs=[`title`,`disabled`],$s=(0,c.defineComponent)({__name:`PromptInputButton`,props:{tooltip:{default:``},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`click`],setup(e){return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{class:(0,c.normalizeClass)([`ai-chat-prompt-input-btn`,{"ai-chat-prompt-input-btn--active":e.active}]),title:e.tooltip,disabled:e.disabled,onClick:n[0]||=e=>t.$emit(`click`)},[(0,c.renderSlot)(t.$slots,`default`)],10,Qs))}}),ec=[`accept`,`multiple`],tc=[`title`,`aria-label`,`disabled`],nc={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},rc={key:1,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},ic=(0,c.defineComponent)({__name:`PromptInputUploadButton`,props:{kind:{default:`file`}},setup(e){let t=e,{disabled:n,multiple:r,accept:i,addFiles:a}=(0,c.inject)(Ms),o=(0,c.computed)(()=>t.kind===`image`?`上传图片`:`上传附件`),s=(0,c.ref)(null);function l(){s.value?.click()}function u(e){let t=e.target;t.files?.length&&a(t.files),t.value=``}return(t,a)=>((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,null,[(0,c.createElementVNode)(`input`,{ref_key:`fileInput`,ref:s,type:`file`,accept:e.kind===`image`?`image/*`:(0,c.unref)(i)()||void 0,multiple:(0,c.unref)(r)(),hidden:``,onChange:u},null,40,ec),(0,c.createElementVNode)(`button`,{class:`ai-chat-prompt-input-btn`,type:`button`,title:o.value,"aria-label":o.value,disabled:(0,c.unref)(n)(),onClick:l},[(0,c.renderSlot)(t.$slots,`default`,{},()=>[e.kind===`image`?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,nc,[...a[0]||=[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A1.5 1.5 0 0021.75 19.5V4.5A1.5 1.5 0 0020.25 3H3.75A1.5 1.5 0 002.25 4.5v15A1.5 1.5 0 003.75 21zM10.5 8.25h.008v.008H10.5V8.25z`},null,-1)]])):((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,rc,[...a[1]||=[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01a5.25 5.25 0 01-7.424-7.424l10.939-10.94`},null,-1)]]))])],8,tc)],64))}}),ac=[`aria-label`],oc=[`aria-label`],sc=[`src`,`alt`],cc=[`aria-label`],lc=[`aria-label`],uc={class:`ai-chat-lightbox__count`},dc=(0,c.defineComponent)({__name:`ImageLightbox`,props:{attachments:{},index:{default:0}},emits:[`close`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.ref)(null),o=null;function s(e){let t=r.attachments.length;return t===0?0:Math.min(Math.max(e,0),t-1)}let l=(0,c.ref)(s(r.index));(0,c.watch)(()=>r.index,e=>{l.value=s(e)});let u=(0,c.computed)(()=>r.attachments[l.value]);function d(){r.attachments.length&&(l.value=(l.value+1)%r.attachments.length)}function f(){r.attachments.length&&(l.value=(l.value-1+r.attachments.length)%r.attachments.length)}function p(e){e.defaultPrevented||e.isComposing||e.metaKey||e.ctrlKey||e.altKey||(e.key===`Escape`?i(`close`):e.key===`ArrowRight`?(e.preventDefault(),d()):e.key===`ArrowLeft`&&(e.preventDefault(),f()))}return(0,c.onMounted)(()=>{window.addEventListener(`keydown`,p),o=document.activeElement,a.value?.focus()}),(0,c.onBeforeUnmount)(()=>{window.removeEventListener(`keydown`,p),o?.focus?.()}),(t,r)=>((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:`body`},[(0,c.createElementVNode)(`div`,{ref_key:`overlayRef`,ref:a,class:`ai-chat-lightbox__overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":(0,c.unref)(n)(`imageLightbox.previewTitle`),tabindex:`-1`,onClick:r[1]||=(0,c.withModifiers)(e=>i(`close`),[`self`])},[(0,c.createElementVNode)(`button`,{class:`ai-chat-lightbox__nav ai-chat-lightbox__prev`,type:`button`,"aria-label":(0,c.unref)(n)(`imageLightbox.prevImage`),onClick:f},[...r[2]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15.75 19.5L8.25 12l7.5-7.5`})],-1)]],8,oc),(0,c.createElementVNode)(`img`,{class:`ai-chat-lightbox__image`,src:u.value?.url,alt:u.value?.name},null,8,sc),(0,c.createElementVNode)(`button`,{class:`ai-chat-lightbox__nav ai-chat-lightbox__next`,type:`button`,"aria-label":(0,c.unref)(n)(`imageLightbox.nextImage`),onClick:d},[...r[3]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M8.25 4.5l7.5 7.5-7.5 7.5`})],-1)]],8,cc),(0,c.createElementVNode)(`button`,{class:`ai-chat-lightbox__close`,type:`button`,"aria-label":(0,c.unref)(n)(`shared.close`),onClick:r[0]||=e=>i(`close`)},[...r[4]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,lc),(0,c.createElementVNode)(`span`,uc,(0,c.toDisplayString)(l.value+1)+` / `+(0,c.toDisplayString)(e.attachments.length),1)],8,ac)]))}});function fc(e){return e.startsWith(`image/`)?`image`:e.startsWith(`video/`)?`video`:e.startsWith(`audio/`)?`audio`:`document`}function pc(e){return{document:`📄`,audio:`🎵`,video:`🎬`}[fc(e)]||`📄`}function mc(e){return{"application/pdf":`PDF`,"text/plain":`TXT`,"text/csv":`CSV`,"application/json":`JSON`,"application/zip":`ZIP`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`DOCX`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`XLSX`}[e]||e.split(`/`)[1]?.toUpperCase()||`FILE`}var hc={key:0,class:`ai-chat-prompt-attachments`},gc=[`aria-busy`,`title`],_c=[`aria-label`,`onClick`],vc=[`src`,`alt`],yc={key:0,class:`ai-chat-prompt-attachments__loading`},bc={key:1,class:`ai-chat-prompt-attachments__thumb ai-chat-prompt-attachments__thumb--static`},xc={class:`ai-chat-prompt-attachments__icon`,"aria-hidden":`true`},Sc={key:0,class:`ai-chat-prompt-attachments__loading`},Cc={class:`ai-chat-prompt-attachments__meta`},wc={class:`ai-chat-prompt-attachments__name`},Tc={class:`ai-chat-prompt-attachments__size`},Ec={key:0,class:`ai-chat-sr-only`},Dc={key:1,class:`ai-chat-sr-only`},Oc=[`aria-label`,`onClick`],kc=(0,c.defineComponent)({__name:`PromptInputAttachments`,emits:[`preview`],setup(e,{emit:t}){let{pendingFiles:n,remove:r}=(0,c.inject)(Ms),{t:i}=$.global,a=(0,c.getCurrentInstance)(),o=t,s=(0,c.ref)(!1),l=(0,c.ref)(0);function u(e){return e.file.type.startsWith(`image/`)&&!!e.previewUrl}let d=(0,c.computed)(()=>n.value.filter(u).map(e=>({id:e.id,name:e.file.name,mediaType:e.file.type,url:e.previewUrl,size:e.file.size})));function f(){let e=a?.vnode.props;return!!e&&`onPreview`in e}function p(e){if(!u(e))return;let t=Math.max(0,d.value.findIndex(t=>t.id===e.id));if(f()){o(`preview`,{attachments:d.value,index:t});return}l.value=t,s.value=!0}return(e,t)=>(0,c.unref)(n).length?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,hc,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)((0,c.unref)(n),e=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:e.id,class:(0,c.normalizeClass)([`ai-chat-prompt-attachments__item`,{"ai-chat-prompt-attachments__item--uploading":e.status===`uploading`,"ai-chat-prompt-attachments__item--error":e.status===`error`}]),"aria-busy":e.status===`uploading`||void 0,title:e.error||e.file.name},[u(e)?((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:0,type:`button`,class:`ai-chat-prompt-attachments__thumb`,"aria-label":(0,c.unref)(i)(`promptInput.previewAttachment`,{name:e.file.name}),onClick:t=>p(e)},[(0,c.createElementVNode)(`img`,{src:e.previewUrl,alt:e.file.name},null,8,vc),e.status===`uploading`?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,yc)):(0,c.createCommentVNode)(``,!0)],8,_c)):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,bc,[(0,c.createElementVNode)(`span`,xc,(0,c.toDisplayString)((0,c.unref)(pc)(e.file.type)),1),e.status===`uploading`?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Sc)):(0,c.createCommentVNode)(``,!0)])),(0,c.createElementVNode)(`div`,Cc,[(0,c.createElementVNode)(`span`,wc,(0,c.toDisplayString)(e.file.name),1),(0,c.createElementVNode)(`span`,Tc,(0,c.toDisplayString)((0,c.unref)(ms)(e.file.size)),1),e.status===`uploading`?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Ec,(0,c.toDisplayString)((0,c.unref)(i)(`promptInput.uploading`)),1)):e.status===`error`?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Dc,(0,c.toDisplayString)((0,c.unref)(i)(`promptInput.uploadFailed`)),1)):(0,c.createCommentVNode)(``,!0)]),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-prompt-attachments__remove`,"aria-label":(0,c.unref)(i)(`promptInput.removeAttachment`,{name:e.file.name}),onClick:t=>(0,c.unref)(r)(e.id)},[...t[1]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,Oc)],10,gc))),128)),s.value?((0,c.openBlock)(),(0,c.createBlock)((0,c.unref)(dc),{key:0,attachments:d.value,index:l.value,onClose:t[0]||=e=>s.value=!1},null,8,[`attachments`,`index`])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0)}}),Ac=[`aria-label`,`disabled`],jc={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},Mc={key:1,viewBox:`0 0 24 24`,fill:`currentColor`},Nc=h((0,c.defineComponent)({__name:`PromptInputSubmit`,setup(e){let{status:t,disabled:n}=(0,c.inject)(Ms),r=(0,c.inject)(`promptSubmit`),i=(0,c.inject)(`promptAbort`),{t:a}=$.global,o=(0,c.computed)(()=>t.value===`streaming`?a(`promptInput.stop`):a(`promptInput.send`));return(e,a)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{class:`ai-chat-prompt-submit`,type:`button`,"aria-label":o.value,disabled:(0,c.unref)(n)(),onClick:a[0]||=e=>(0,c.unref)(t)===`streaming`?(0,c.unref)(i)():(0,c.unref)(r)()},[(0,c.renderSlot)(e.$slots,`default`,{},()=>[(0,c.unref)(t)===`ready`?((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,jc,[...a[1]||=[(0,c.createElementVNode)(`path`,{d:`M12 19V5M5 12l7-7 7 7`},null,-1)]])):((0,c.openBlock)(),(0,c.createElementBlock)(`svg`,Mc,[...a[2]||=[(0,c.createElementVNode)(`rect`,{x:`6.5`,y:`6.5`,width:`11`,height:`11`,rx:`2`},null,-1)]]))],!0)],8,Ac))}}),[[`__scopeId`,`data-v-0cec5624`]]),Pc={},Fc={key:0,class:`ai-chat-prompt-input-header`};function Ic(e,t){return e.$slots.default?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Fc,[(0,c.renderSlot)(e.$slots,`default`)])):(0,c.createCommentVNode)(``,!0)}var Lc=h(Pc,[[`render`,Ic]]),Rc=/\s/;function zc(e,t,n){if(n.length===0)return null;let r=Math.min(Math.max(Math.trunc(t)||0,0),e.length),i=r;for(;i>0;){if(Rc.test(e[i-1]))return null;let t=n.find(t=>t.char!==``&&e.endsWith(t.char,i));if(t){let n=i-t.char.length;return n===0||Rc.test(e[n-1])?{trigger:t,query:e.slice(i,r),replaceRange:[n,r]}:null}--i}return null}function Bc(e,t){let n=t.toLowerCase();if(n===``)return e.slice();let r=[],i=[];for(let t of e){let e=t.label.toLowerCase();e.startsWith(n)?r.push(t):e.includes(n)&&i.push(t)}return[...r,...i]}var Vc=[`aria-selected`,`onMousedown`],Hc={class:`ai-chat-prompt-input-suggestion__label`},Uc={key:0,class:`ai-chat-prompt-input-suggestion__desc`},Wc={key:0,class:`ai-chat-prompt-input-suggestion__empty`},Gc=(0,c.defineComponent)({__name:`PromptInputSuggestion`,props:{text:{},caret:{},triggers:{},anchor:{default:null}},emits:[`select`,`close`],setup(e,{emit:t}){let n=e,r=t,{t:i}=$.global,a=(0,c.computed)(()=>zc(n.text,n.caret,n.triggers)),o=(0,c.computed)(()=>{let e=a.value;return e?Bc(e.trigger.items,e.query):[]}),s=(0,c.ref)(!1);(0,c.watch)(()=>a.value===null,(e,t)=>{e&&!t&&(s.value=!1)});let l=(0,c.computed)(()=>a.value!==null&&!s.value),u=(0,c.ref)(0);(0,c.watch)(()=>[a.value?.trigger.char,a.value?.query],()=>{u.value=0});let d=(0,c.ref)([]);(0,c.watch)(o,e=>{u.value>=e.length&&(u.value=0),d.value.length=e.length}),(0,c.watch)(u,e=>{d.value[e]?.scrollIntoView?.({block:`nearest`})});let f=(0,c.computed)(()=>n.anchor??`body`);function p(e){let t=a.value;if(!t)return;let[i,o]=t.replaceRange,c=n.text.slice(0,i)+e.label+n.text.slice(o);s.value=!0,r(`select`,e,c)}function m(){l.value&&(s.value=!0,r(`close`))}function h(e){if(l.value){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),m();return}if(!(o.value.length===0||e.isComposing)){if(e.key===`ArrowUp`)e.preventDefault(),e.stopPropagation(),u.value=(u.value-1+o.value.length)%o.value.length;else if(e.key===`ArrowDown`)e.preventDefault(),e.stopPropagation(),u.value=(u.value+1)%o.value.length;else if(e.key===`Enter`||e.key===`NumpadEnter`){let t=o.value[u.value];if(!t)return;e.preventDefault(),e.stopPropagation(),p(t)}}}}function g(e){let t=e.target;t&&_.value?.contains(t)||m()}let _=(0,c.ref)(null);function v(e,t){e instanceof HTMLElement&&(d.value[t]=e)}return(0,c.onMounted)(()=>{document.addEventListener(`keydown`,h,!0),document.addEventListener(`pointerdown`,g,!0)}),(0,c.onBeforeUnmount)(()=>{document.removeEventListener(`keydown`,h,!0),document.removeEventListener(`pointerdown`,g,!0)}),(t,n)=>((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:f.value},[l.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,ref_key:`rootEl`,ref:_,class:(0,c.normalizeClass)([`ai-chat-prompt-input-suggestion`,{"ai-chat-prompt-input-suggestion--fixed":!e.anchor}]),role:`listbox`},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(o.value,(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:e.key,ref_for:!0,ref:e=>v(e,t),class:(0,c.normalizeClass)([`ai-chat-prompt-input-suggestion__item`,{"ai-chat-prompt-input-suggestion__item--active":t===u.value}]),role:`option`,"aria-selected":t===u.value,onMousedown:(0,c.withModifiers)(t=>p(e),[`prevent`])},[(0,c.createElementVNode)(`span`,Hc,(0,c.toDisplayString)(e.label),1),e.description?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Uc,(0,c.toDisplayString)(e.description),1)):(0,c.createCommentVNode)(``,!0)],42,Vc))),128)),o.value.length===0?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Wc,(0,c.toDisplayString)((0,c.unref)(i)(`suggestion.empty`)),1)):(0,c.createCommentVNode)(``,!0)],2)):(0,c.createCommentVNode)(``,!0)],8,[`to`]))}}),Kc={class:`ai-chat-comparison__label`},qc={class:`ai-chat-comparison__content`},Jc={class:`ai-chat-comparison__action`},Yc=[`disabled`],Xc={class:`ai-chat-comparison__label`},Zc={class:`ai-chat-comparison__content`},Qc={class:`ai-chat-comparison__action`},$c=[`disabled`],el=h((0,c.defineComponent)({__name:`ComparisonMessage`,props:{left:{},right:{},leftLabel:{},rightLabel:{},chosen:{default:null},buttonLabel:{},stackOnMobile:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`prefer`],setup(e,{emit:t}){let n=e,{t:r}=$.global,i=(0,c.computed)(()=>n.leftLabel??r(`comparison.leftLabel`)),a=(0,c.computed)(()=>n.rightLabel??r(`comparison.rightLabel`)),o=(0,c.computed)(()=>n.buttonLabel??r(`comparison.buttonLabel`)),s=t,l=(0,c.ref)(n.chosen);(0,c.watch)(()=>n.chosen,e=>l.value=e);let u=(0,c.computed)(()=>n.chosen!==null),d=(0,c.computed)(()=>u.value?n.chosen:l.value);function f(e){n.disabled||(u.value||(l.value=e),s(`prefer`,{chosen:e,left:n.left,right:n.right}))}return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-comparison`,{"is-stack-mobile":e.stackOnMobile}])},[(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-comparison__col`,{"is-selected":d.value===`A`}])},[(0,c.createElementVNode)(`div`,Kc,(0,c.toDisplayString)(i.value),1),(0,c.createElementVNode)(`div`,qc,[(0,c.renderSlot)(t.$slots,`left`,{label:i.value},()=>[(0,c.createVNode)(ko,{content:e.left},null,8,[`content`])],!0)]),(0,c.createElementVNode)(`div`,Jc,[(0,c.renderSlot)(t.$slots,`action-left`,{},()=>[(0,c.createElementVNode)(`button`,{class:`ai-chat-comparison__btn`,disabled:e.disabled,onClick:n[0]||=e=>f(`A`)},(0,c.toDisplayString)(o.value),9,Yc)],!0)])],2),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-comparison__col`,{"is-selected":d.value===`B`}])},[(0,c.createElementVNode)(`div`,Xc,(0,c.toDisplayString)(a.value),1),(0,c.createElementVNode)(`div`,Zc,[(0,c.renderSlot)(t.$slots,`right`,{label:a.value},()=>[(0,c.createVNode)(ko,{content:e.right},null,8,[`content`])],!0)]),(0,c.createElementVNode)(`div`,Qc,[(0,c.renderSlot)(t.$slots,`action-right`,{},()=>[(0,c.createElementVNode)(`button`,{class:`ai-chat-comparison__btn`,disabled:e.disabled,onClick:n[1]||=e=>f(`B`)},(0,c.toDisplayString)(o.value),9,$c)],!0)])],2)],2))}}),[[`__scopeId`,`data-v-6c9000c8`]]),tl=(0,c.defineComponent)({__name:`Attachments`,props:{variant:{default:`grid`}},setup(e){return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-attachments`,[`ai-chat-attachments--${e.variant}`]])},[(0,c.renderSlot)(t.$slots,`default`)],2))}}),nl={class:`ai-chat-attachment`},rl=(0,c.defineComponent)({__name:`Attachment`,props:{data:{}},setup(e){return(0,c.provide)(`attachmentData`,e.data),(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,nl,[(0,c.renderSlot)(e.$slots,`default`)]))}}),il=[`src`,`alt`],al={key:1,class:`ai-chat-attachment-preview__icon`},ol=(0,c.defineComponent)({__name:`AttachmentPreview`,emits:[`preview`],setup(e,{emit:t}){let n=(0,c.inject)(`attachmentData`),r=t,i=fc(n.mediaType);return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-attachment-preview`,[`ai-chat-attachment-preview--${(0,c.unref)(i)}`]])},[(0,c.unref)(i)===`image`&&(0,c.unref)(n).url?((0,c.openBlock)(),(0,c.createElementBlock)(`img`,{key:0,src:(0,c.unref)(n).url,alt:(0,c.unref)(n).name,class:`ai-chat-attachment-preview__img`,onClick:t[0]||=e=>r(`preview`)},null,8,il)):((0,c.openBlock)(),(0,c.createElementBlock)(`span`,al,(0,c.toDisplayString)((0,c.unref)(pc)((0,c.unref)(n).mediaType)),1))],2))}}),sl={class:`ai-chat-attachment-info`},cl={class:`ai-chat-attachment-info__name`},ll={class:`ai-chat-attachment-info__meta`},ul=(0,c.defineComponent)({__name:`AttachmentInfo`,setup(e){let t=(0,c.inject)(`attachmentData`);return(e,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,sl,[(0,c.createElementVNode)(`span`,cl,(0,c.toDisplayString)((0,c.unref)(t).name),1),(0,c.createElementVNode)(`span`,ll,[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(mc)((0,c.unref)(t).mediaType))+` `,1),(0,c.unref)(t).size?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[(0,c.createTextVNode)(` · `+(0,c.toDisplayString)((0,c.unref)(ms)((0,c.unref)(t).size)),1)],64)):(0,c.createCommentVNode)(``,!0)])]))}}),dl=(0,c.defineComponent)({__name:`AttachmentRemove`,emits:[`remove`],setup(e){return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{class:`ai-chat-attachment-remove`,onClick:t[0]||=t=>e.$emit(`remove`)},[...t[1]||=[(0,c.createElementVNode)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,c.createElementVNode)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]]))}}),fl={class:`ai-chat-attachment-empty`},pl=(0,c.defineComponent)({__name:`AttachmentEmpty`,setup(e){let{t}=$.global;return(e,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,fl,[(0,c.renderSlot)(e.$slots,`default`,{},()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(t)(`attachments.empty`)),1)])]))}}),ml={class:`ai-chat-tool-call-header__icon`},hl={class:`ai-chat-tool-call-header__name`},gl={class:`ai-chat-tool-call-header__status`},_l={key:0,class:`ai-chat-tool-call-header__duration`},vl=(0,c.defineComponent)({__name:`ToolCallHeader`,setup(e){let{t}=$.global,n=(0,c.inject)(`toolCallData`),r={pending:`⏳`,calling:`⚡`,"awaiting-approval":`⛨`,completed:`✓`,denied:`⊘`,error:`✗`},i={pending:`toolCall.statusPending`,calling:`toolCall.statusCalling`,"awaiting-approval":`toolCall.statusAwaitingApproval`,completed:`toolCall.statusCompleted`,denied:`toolCall.statusDenied`,error:`toolCall.statusError`},a=(0,c.computed)(()=>r[n.status]??`⚡`),o=(0,c.computed)(()=>t(i[n.status])),s=(0,c.computed)(()=>`ai-chat-tool-call-header--${n.status}`);return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{class:(0,c.normalizeClass)([`ai-chat-tool-call-header`,[s.value]])},[(0,c.createElementVNode)(`span`,ml,(0,c.toDisplayString)(a.value),1),(0,c.createElementVNode)(`span`,hl,(0,c.toDisplayString)((0,c.unref)(n).name),1),(0,c.createElementVNode)(`span`,gl,(0,c.toDisplayString)(o.value),1),(0,c.unref)(n).duration?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,_l,(0,c.toDisplayString)((0,c.unref)(hs)((0,c.unref)(n).duration)),1)):(0,c.createCommentVNode)(``,!0)],2))}}),yl={class:`ai-chat-tool-call-input`},bl={class:`ai-chat-tool-call-input__label`},xl={class:`ai-chat-tool-call-input__code`},Sl=(0,c.defineComponent)({__name:`ToolCallInput`,setup(e){let t=(0,c.inject)(`toolCallData`),{t:n}=$.global;return(e,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,yl,[(0,c.createElementVNode)(`div`,bl,(0,c.toDisplayString)((0,c.unref)(n)(`toolCall.parameters`)),1),(0,c.createElementVNode)(`pre`,xl,(0,c.toDisplayString)(JSON.stringify((0,c.unref)(t).arguments,null,2)),1)]))}}),Cl={class:`ai-chat-tool-call-output`},wl={class:`ai-chat-tool-call-output__label ai-chat-tool-call-output__label--error`},Tl={class:`ai-chat-tool-call-output__code ai-chat-tool-call-output__code--error`},El={class:`ai-chat-tool-call-output__label`},Dl={class:`ai-chat-tool-call-output__code`},Ol=(0,c.defineComponent)({__name:`ToolCallOutput`,setup(e){let t=(0,c.inject)(`toolCallData`),{t:n}=$.global;return(e,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Cl,[(0,c.unref)(t).error?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[(0,c.createElementVNode)(`div`,wl,(0,c.toDisplayString)((0,c.unref)(n)(`toolCall.error`)),1),(0,c.createElementVNode)(`pre`,Tl,(0,c.toDisplayString)((0,c.unref)(t).error),1)],64)):((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`div`,El,(0,c.toDisplayString)((0,c.unref)(n)(`toolCall.result`)),1),(0,c.createElementVNode)(`pre`,Dl,(0,c.toDisplayString)(JSON.stringify((0,c.unref)(t).result,null,2)),1)],64))]))}}),kl={class:`ai-chat-tool-call-content`},Al=(0,c.defineComponent)({__name:`ToolCallContent`,setup(e){let t=(0,c.inject)(`toolCallData`);return(e,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,kl,[(0,c.createVNode)(Sl),(0,c.unref)(t).result!==void 0||(0,c.unref)(t).error?((0,c.openBlock)(),(0,c.createBlock)(Ol,{key:0})):(0,c.createCommentVNode)(``,!0)]))}}),jl=[`open`],Ml={class:`ai-chat-tool-call__summary`},Nl={class:`ai-chat-tool-call__body`},Pl=(0,c.defineComponent)({__name:`ToolCall`,props:{data:{}},setup(e){(0,c.provide)(`toolCallData`,e.data);let t=(0,c.ref)(!1);return(n,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`details`,{class:`ai-chat-tool-call`,open:t.value,onToggle:r[0]||=e=>t.value=e.target.open},[(0,c.createElementVNode)(`summary`,Ml,[(0,c.renderSlot)(n.$slots,`header`,{data:e.data,open:t.value},()=>[(0,c.createVNode)(vl)])]),(0,c.createElementVNode)(`div`,Nl,[(0,c.renderSlot)(n.$slots,`default`,{data:e.data},()=>[(0,c.createVNode)(Al)])])],40,jl))}}),Fl={class:`ai-chat-tool-confirmation__head`},Il={class:`ai-chat-tool-confirmation__title`},Ll={class:`ai-chat-tool-confirmation__desc`},Rl={class:`ai-chat-tool-confirmation__tool`},zl={class:`ai-chat-tool-confirmation__tool-name`},Bl={key:0,class:`ai-chat-tool-confirmation__args`},Vl={key:1,class:`ai-chat-tool-confirmation__actions`,role:`group`},Hl={key:2,class:`ai-chat-tool-confirmation__denied`},Ul=h((0,c.defineComponent)({__name:`ToolConfirmation`,props:{toolName:{},arguments:{},reason:{},status:{}},emits:[`approve`,`reject`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.computed)(()=>r.status===`denied`),o=(0,c.computed)(()=>r.reason??n(`confirmation.description`)),s=(0,c.computed)(()=>r.arguments!==void 0),l=(0,c.computed)(()=>{if(r.arguments===void 0)return``;try{return JSON.stringify(r.arguments,null,2)??`{}`}catch{return String(r.arguments)}});return(t,r)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-tool-confirmation`,{"ai-chat-tool-confirmation--denied":a.value}])},[(0,c.createElementVNode)(`div`,Fl,[r[2]||=(0,c.createElementVNode)(`span`,{class:`ai-chat-tool-confirmation__icon`,"aria-hidden":`true`},`⛨`,-1),(0,c.createElementVNode)(`span`,Il,(0,c.toDisplayString)((0,c.unref)(n)(`confirmation.title`)),1)]),(0,c.createElementVNode)(`p`,Ll,(0,c.toDisplayString)(o.value),1),(0,c.createElementVNode)(`div`,Rl,[(0,c.createElementVNode)(`span`,zl,(0,c.toDisplayString)(e.toolName),1)]),s.value?((0,c.openBlock)(),(0,c.createElementBlock)(`pre`,Bl,(0,c.toDisplayString)(l.value),1)):(0,c.createCommentVNode)(``,!0),a.value?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Hl,(0,c.toDisplayString)((0,c.unref)(n)(`confirmation.denied`)),1)):((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Vl,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-tool-confirmation__btn ai-chat-tool-confirmation__btn--reject`,onClick:r[0]||=e=>i(`reject`)},(0,c.toDisplayString)((0,c.unref)(n)(`confirmation.reject`)),1),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-tool-confirmation__btn ai-chat-tool-confirmation__btn--approve`,onClick:r[1]||=e=>i(`approve`)},(0,c.toDisplayString)((0,c.unref)(n)(`confirmation.approve`)),1)]))],2))}}),[[`__scopeId`,`data-v-a8e6375a`]]);function Wl(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}var Gl=[`onKeydown`],Kl=[`aria-label`],ql={key:0,class:`ai-chat-inline-citation__nav`},Jl=[`aria-label`],Yl={class:`ai-chat-inline-citation__count`},Xl=[`aria-label`],Zl=[`href`],Ql={key:3,class:`ai-chat-inline-citation__snippet`},$l=[`href`,`aria-label`],eu=(0,c.defineComponent)({__name:`InlineCitation`,props:{index:{},sources:{},cardWidth:{default:300}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{t:i}=$.global,a=(0,c.ref)(null),o=(0,c.ref)(!1),s=(0,c.ref)(0),l=(0,c.computed)(()=>n.sources.length),u=(0,c.computed)(()=>n.sources[s.value]),d=(0,c.computed)(()=>{let e=u.value?.url;return e!==void 0&&Wl(e)?e:void 0});function f(){l.value>0&&(o.value=!0)}function p(){o.value=!1,s.value=0}function m(){a.value?.contains(document.activeElement)||p()}function h(){a.value?.contains(document.activeElement)||p()}function g(){l.value>0&&(s.value=(s.value-1+l.value)%l.value)}function _(){l.value>0&&(s.value=(s.value+1)%l.value)}function v(){u.value!==void 0&&r(`select`,u.value)}return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{ref_key:`rootEl`,ref:a,class:`ai-chat-inline-citation`,onMouseenter:f,onMouseleave:m,onFocusin:f,onFocusout:h,onKeydown:(0,c.withKeys)((0,c.withModifiers)(p,[`prevent`]),[`esc`])},[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__trigger`,"aria-label":(0,c.unref)(i)(`citation.source`)},(0,c.toDisplayString)(e.index),9,Kl),o.value&&u.value?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,{key:0,class:`ai-chat-inline-citation__card`,style:(0,c.normalizeStyle)({width:`${e.cardWidth}px`})},[l.value>1?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ql,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__nav-btn ai-chat-inline-citation__nav-prev`,"aria-label":(0,c.unref)(i)(`citation.prevSource`),onClick:g},` ‹ `,8,Jl),(0,c.createElementVNode)(`span`,Yl,(0,c.toDisplayString)(s.value+1)+`/`+(0,c.toDisplayString)(l.value),1),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__nav-btn ai-chat-inline-citation__nav-next`,"aria-label":(0,c.unref)(i)(`citation.nextSource`),onClick:_},` › `,8,Xl)])):(0,c.createCommentVNode)(``,!0),d.value?((0,c.openBlock)(),(0,c.createElementBlock)(`a`,{key:1,class:`ai-chat-inline-citation__title`,href:d.value,target:`_blank`,rel:`noopener noreferrer`,onClick:v},(0,c.toDisplayString)(u.value.title??u.value.id),9,Zl)):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:2,type:`button`,class:`ai-chat-inline-citation__title`,onClick:v},(0,c.toDisplayString)(u.value.title??u.value.id),1)),u.value.snippet?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Ql,(0,c.toDisplayString)(u.value.snippet),1)):(0,c.createCommentVNode)(``,!0),d.value?((0,c.openBlock)(),(0,c.createElementBlock)(`a`,{key:4,class:`ai-chat-inline-citation__link`,href:d.value,target:`_blank`,rel:`noopener noreferrer`,"aria-label":(0,c.unref)(i)(`citation.openLink`)},(0,c.toDisplayString)((0,c.unref)(i)(`citation.viewSource`)),9,$l)):(0,c.createCommentVNode)(``,!0)],4)):(0,c.createCommentVNode)(``,!0)],40,Gl))}}),tu={key:0,class:`ai-chat-sources__inline-title`},nu=[`onClick`],ru={key:1,class:`ai-chat-sources__overflow`},iu=[`aria-expanded`],au={key:0,class:`ai-chat-sources__popover`},ou=[`href`,`onClick`],su=[`onClick`],cu=[`aria-expanded`],lu={class:`ai-chat-sources__title`},uu={key:0,class:`ai-chat-sources__list`},du=[`href`,`onClick`],fu={class:`ai-chat-sources__link-index`},pu={class:`ai-chat-sources__link-title`},mu=[`onClick`],hu={class:`ai-chat-sources__doc-index`},gu={class:`ai-chat-sources__doc-body`},_u={class:`ai-chat-sources__doc-title`},vu={key:0,class:`ai-chat-sources__doc-snippet`},yu=(0,c.defineComponent)({__name:`Sources`,props:{sources:{},title:{default:void 0},inline:{type:Boolean,default:!1},maxInline:{default:3},defaultOpen:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{t:i}=$.global,a=(0,c.ref)(n.defaultOpen),o=(0,c.ref)(!1),s=(0,c.computed)(()=>n.title??i(`citation.sources`,{count:n.sources.length})),l=(0,c.computed)(()=>Math.min(n.maxInline,n.sources.length)),u=(0,c.computed)(()=>n.sources.slice(0,l.value)),d=(0,c.computed)(()=>n.sources.slice(l.value).map((e,t)=>({source:e,index:l.value+t})));function f(e){return e.url!==void 0&&Wl(e.url)?e.url:void 0}function p(e,t){r(`select`,e,t)}return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{class:(0,c.normalizeClass)([`ai-chat-sources`,{"ai-chat-sources--inline":e.inline}])},[e.inline?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[e.title===void 0?(0,c.createCommentVNode)(``,!0):((0,c.openBlock)(),(0,c.createElementBlock)(`span`,tu,(0,c.toDisplayString)(e.title),1)),((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(u.value,(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:e.id,type:`button`,class:`ai-chat-sources__badge ai-chat-sources__badge--seq`,onClick:n=>p(e,t)},(0,c.toDisplayString)(t+1),9,nu))),128)),d.value.length>0?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,ru,[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-sources__badge ai-chat-sources__badge--more`,"aria-expanded":o.value,onClick:n[0]||=e=>o.value=!o.value},` +`+(0,c.toDisplayString)(d.value.length),9,iu),o.value?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,au,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(d.value,e=>((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:e.source.id},[f(e.source)?((0,c.openBlock)(),(0,c.createElementBlock)(`a`,{key:0,class:`ai-chat-sources__popover-item`,href:f(e.source),target:`_blank`,rel:`noopener noreferrer`,onClick:t=>p(e.source,e.index)},(0,c.toDisplayString)(e.source.title??e.source.url),9,ou)):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:1,type:`button`,class:`ai-chat-sources__popover-item`,onClick:t=>p(e.source,e.index)},(0,c.toDisplayString)(e.source.title??e.source.id),9,su))],64))),128))])):(0,c.createCommentVNode)(``,!0)])):(0,c.createCommentVNode)(``,!0)],64)):((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:1},[(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-sources__header`,"aria-expanded":a.value,onClick:n[1]||=e=>a.value=!a.value},[n[2]||=(0,c.createElementVNode)(`span`,{class:`ai-chat-sources__arrow`},`▶`,-1),(0,c.createElementVNode)(`span`,lu,(0,c.toDisplayString)(s.value),1)],8,cu),a.value?((0,c.openBlock)(),(0,c.createElementBlock)(`ul`,uu,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e.sources,(e,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`li`,{key:e.id,class:`ai-chat-sources__item`},[(0,c.renderSlot)(t.$slots,`source`,{source:e,index:n},()=>[f(e)?((0,c.openBlock)(),(0,c.createElementBlock)(`a`,{key:0,class:`ai-chat-sources__link`,href:f(e),target:`_blank`,rel:`noopener noreferrer`,onClick:t=>p(e,n)},[(0,c.createElementVNode)(`span`,fu,(0,c.toDisplayString)(n+1),1),(0,c.createElementVNode)(`span`,pu,(0,c.toDisplayString)(e.title??e.url),1)],8,du)):((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:1,type:`button`,class:`ai-chat-sources__doc`,onClick:t=>p(e,n)},[(0,c.createElementVNode)(`span`,hu,(0,c.toDisplayString)(n+1),1),(0,c.createElementVNode)(`span`,gu,[(0,c.createElementVNode)(`span`,_u,(0,c.toDisplayString)(e.title??e.id),1),e.snippet?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,vu,(0,c.toDisplayString)(e.snippet),1)):(0,c.createCommentVNode)(``,!0)])],8,mu))])]))),128))])):(0,c.createCommentVNode)(``,!0)],64))],2))}}),bu={class:`ai-chat-welcome`},xu={class:`ai-chat-welcome__icon`},Su={class:`ai-chat-welcome__title`},Cu={key:0,class:`ai-chat-welcome__desc`},wu={class:`ai-chat-welcome__content`},Tu={key:1,class:`ai-chat-welcome__extra`},Eu=(0,c.defineComponent)({__name:`Welcome`,props:{title:{},description:{}},setup(e){let t=e,{t:n}=$.global,r=(0,c.computed)(()=>t.title??n(`welcome.title`)),i=(0,c.computed)(()=>t.description??n(`welcome.description`));return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,bu,[(0,c.createElementVNode)(`div`,xu,[(0,c.renderSlot)(e.$slots,`icon`,{},()=>[t[0]||=(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,c.createElementVNode)(`polygon`,{points:`12 3 14 10 21 12 14 14 12 21 10 14 3 12 10 10`})],-1)])]),(0,c.createElementVNode)(`h2`,Su,(0,c.toDisplayString)(r.value),1),i.value?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Cu,(0,c.toDisplayString)(i.value),1)):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`div`,wu,[(0,c.renderSlot)(e.$slots,`default`)]),e.$slots.extra?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Tu,[(0,c.renderSlot)(e.$slots,`extra`)])):(0,c.createCommentVNode)(``,!0)]))}}),Du={class:`ai-chat-prompts`},Ou={class:`ai-chat-prompts__title`},ku=[`onClick`],Au={key:0,class:`ai-chat-prompts__icon`},ju={class:`ai-chat-prompts__content`},Mu={class:`ai-chat-prompts__label`},Nu={key:0,class:`ai-chat-prompts__desc`},Pu=(0,c.defineComponent)({__name:`Prompts`,props:{items:{},title:{default:void 0},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{t:i}=$.global,a=(0,c.computed)(()=>n.title??i(`prompts.title`)),o=(0,c.computed)(()=>({"ai-chat-prompts__list--vertical":n.vertical,"ai-chat-prompts__list--wrap":n.wrap}));return(t,n)=>((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Du,[(0,c.createElementVNode)(`div`,Ou,(0,c.toDisplayString)(a.value),1),(0,c.createElementVNode)(`div`,{class:(0,c.normalizeClass)([`ai-chat-prompts__list`,o.value])},[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e.items,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`button`,{key:e.key,type:`button`,class:`ai-chat-prompts__item`,onClick:t=>r(`select`,e)},[(0,c.renderSlot)(t.$slots,`item`,{item:e},()=>[e.icon?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Au,(0,c.toDisplayString)(e.icon),1)):(0,c.createCommentVNode)(``,!0),(0,c.createElementVNode)(`span`,ju,[(0,c.createElementVNode)(`span`,Mu,(0,c.toDisplayString)(e.label),1),e.description?((0,c.openBlock)(),(0,c.createElementBlock)(`span`,Nu,(0,c.toDisplayString)(e.description),1)):(0,c.createCommentVNode)(``,!0)])])],8,ku))),128))],2)]))}}),Fu={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--type`},Iu={class:`ai-chat-provider-dialog__label`},Lu={class:`ai-chat-provider-dialog__radios`},Ru={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--name`},zu={class:`ai-chat-provider-dialog__label`},Bu={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Vu={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--baseURL`},Hu={class:`ai-chat-provider-dialog__label`},Uu={key:0,class:`ai-chat-provider-dialog__presets`},Wu={class:`ai-chat-provider-dialog__presets-label`},Gu={key:1,class:`ai-chat-provider-dialog__error`,role:`alert`},Ku={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--apiKey`},qu={class:`ai-chat-provider-dialog__label`},Ju={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Yu={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--model`},Xu={class:`ai-chat-provider-dialog__label`},Zu={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Qu={class:`ai-chat-provider-dialog__remember`},$u={class:`ai-chat-provider-dialog__actions`},ed=(0,c.defineComponent)({__name:`ProviderSettingsForm`,props:{editing:{}},emits:[`create`,`update`,`cancel-edit`],setup(e,{emit:t}){let{t:n}=$.global,r=e,i=t,a=(0,c.reactive)({name:``,provider:`openai-compat`,baseURL:``,apiKey:``,model:``,persist:!0}),o=(0,c.reactive)({name:!1,baseURL:!1,apiKey:!1,model:!1}),s=[{id:`openai`,labelKey:`provider.presetOpenai`,url:`https://api.openai.com/v1`},{id:`deepseek`,labelKey:`provider.presetDeepseek`,url:`https://api.deepseek.com/v1`},{id:`glm`,labelKey:`provider.presetGlm`,url:`https://open.bigmodel.cn/api/paas/v4`},{id:`kimi`,labelKey:`provider.presetKimi`,url:`https://api.moonshot.cn/v1`}],l=(0,c.computed)(()=>a.provider===`openai-compat`),u=(0,c.computed)(()=>({name:o.name&&!a.name.trim()?n(`provider.errorRequired`):``,baseURL:o.baseURL&&l.value&&!a.baseURL.trim()?n(`provider.errorRequired`):``,apiKey:o.apiKey&&!a.apiKey.trim()?n(`provider.errorRequired`):``,model:o.model&&!a.model.trim()?n(`provider.errorRequired`):``})),d=(0,c.computed)(()=>a.name.trim()!==``&&a.apiKey.trim()!==``&&a.model.trim()!==``&&(!l.value||a.baseURL.trim()!==``));function f(){a.baseURL=``,o.baseURL=!1}(0,c.watch)(()=>a.provider,f);let p=(0,c.computed)(()=>r.editing?.id??null);(0,c.watch)(()=>r.editing,e=>{e?(a.name=e.name,a.provider=e.provider===`anthropic`?`anthropic`:`openai-compat`,a.baseURL=e.baseURL??``,a.apiKey=``,a.model=e.model??``):(a.name=``,a.provider=`openai-compat`,a.baseURL=``,a.apiKey=``,a.model=``),Object.assign(o,{name:!1,baseURL:!1,apiKey:!1,model:!1})},{immediate:!0});function m(){i(`cancel-edit`)}function h(e,t){t.preventDefault(),a.baseURL=e.url}function _(){if(Object.assign(o,{name:!0,baseURL:!0,apiKey:!0,model:!0}),!d.value)return;let e=a.baseURL.trim(),t={name:a.name.trim(),provider:a.provider,...e?{baseURL:e}:{},apiKey:a.apiKey.trim(),model:a.model.trim(),persist:a.persist};p.value?i(`update`,p.value,t):i(`create`,t)}return(e,t)=>((0,c.openBlock)(),(0,c.createElementBlock)(`form`,{class:`ai-chat-provider-dialog__form`,novalidate:``,onSubmit:(0,c.withModifiers)(_,[`prevent`])},[(0,c.createElementVNode)(`fieldset`,Fu,[(0,c.createElementVNode)(`legend`,Iu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.typeLabel`)),1),(0,c.createElementVNode)(`div`,Lu,[(0,c.createVNode)(x,{modelValue:a.provider,"onUpdate:modelValue":t[0]||=e=>a.provider=e,name:`ai-chat-provider-type`,value:`openai-compat`,label:(0,c.unref)(n)(`provider.typeOpenaiCompat`)},null,8,[`modelValue`,`label`]),(0,c.createVNode)(x,{modelValue:a.provider,"onUpdate:modelValue":t[1]||=e=>a.provider=e,name:`ai-chat-provider-type`,value:`anthropic`,label:(0,c.unref)(n)(`provider.typeAnthropic`)},null,8,[`modelValue`,`label`])])]),(0,c.createElementVNode)(`div`,Ru,[(0,c.createElementVNode)(`span`,zu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.nameLabel`)),1),(0,c.createVNode)(v,{modelValue:a.name,"onUpdate:modelValue":t[2]||=e=>a.name=e,size:`sm`,placeholder:(0,c.unref)(n)(`provider.namePlaceholder`),"aria-label":(0,c.unref)(n)(`provider.nameLabel`),onBlur:t[3]||=e=>o.name=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),u.value.name?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Bu,(0,c.toDisplayString)(u.value.name),1)):(0,c.createCommentVNode)(``,!0)]),(0,c.createElementVNode)(`div`,Vu,[(0,c.createElementVNode)(`span`,Hu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.baseURLLabel`)),1),(0,c.createVNode)(v,{modelValue:a.baseURL,"onUpdate:modelValue":t[4]||=e=>a.baseURL=e,size:`sm`,placeholder:(0,c.unref)(n)(`provider.baseURLPlaceholder`),"aria-label":(0,c.unref)(n)(`provider.baseURLLabel`),onBlur:t[5]||=e=>o.baseURL=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),l.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,Uu,[(0,c.createElementVNode)(`span`,Wu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.baseURLPresetsLabel`)),1),((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(s,e=>(0,c.createVNode)(g,{key:e.url,type:`secondary`,size:`small`,class:(0,c.normalizeClass)([`ai-chat-provider-dialog__preset`,`ai-chat-provider-dialog__preset--${e.id}`]),"aria-pressed":a.baseURL===e.url,onClick:t=>h(e,t)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(e.labelKey)),1)]),_:2},1032,[`class`,`aria-pressed`,`onClick`])),64))])):(0,c.createCommentVNode)(``,!0),u.value.baseURL?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Gu,(0,c.toDisplayString)(u.value.baseURL),1)):(0,c.createCommentVNode)(``,!0)]),(0,c.createElementVNode)(`div`,Ku,[(0,c.createElementVNode)(`span`,qu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.apiKeyLabel`)),1),(0,c.createVNode)(v,{modelValue:a.apiKey,"onUpdate:modelValue":t[6]||=e=>a.apiKey=e,type:`password`,autocomplete:`new-password`,size:`sm`,placeholder:(0,c.unref)(n)(`provider.apiKeyPlaceholder`),"aria-label":(0,c.unref)(n)(`provider.apiKeyLabel`),onBlur:t[7]||=e=>o.apiKey=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),u.value.apiKey?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Ju,(0,c.toDisplayString)(u.value.apiKey),1)):(0,c.createCommentVNode)(``,!0)]),(0,c.createElementVNode)(`div`,Yu,[(0,c.createElementVNode)(`span`,Xu,(0,c.toDisplayString)((0,c.unref)(n)(`provider.modelLabel`)),1),(0,c.createVNode)(v,{modelValue:a.model,"onUpdate:modelValue":t[8]||=e=>a.model=e,size:`sm`,placeholder:(0,c.unref)(n)(`provider.modelPlaceholder`),"aria-label":(0,c.unref)(n)(`provider.modelLabel`),onBlur:t[9]||=e=>o.model=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),u.value.model?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,Zu,(0,c.toDisplayString)(u.value.model),1)):(0,c.createCommentVNode)(``,!0)]),(0,c.createElementVNode)(`label`,Qu,[(0,c.withDirectives)((0,c.createElementVNode)(`input`,{"onUpdate:modelValue":t[10]||=e=>a.persist=e,type:`checkbox`,class:`ai-chat-provider-dialog__remember-input`},null,512),[[c.vModelCheckbox,a.persist]]),(0,c.createElementVNode)(`span`,null,(0,c.toDisplayString)((0,c.unref)(n)(`provider.rememberLabel`)),1)]),(0,c.createElementVNode)(`div`,$u,[p.value?((0,c.openBlock)(),(0,c.createBlock)(g,{key:0,type:`secondary`,class:`ai-chat-provider-dialog__cancel-edit`,onClick:m},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`provider.cancelEdit`)),1)]),_:1})):(0,c.createCommentVNode)(``,!0),(0,c.createVNode)(g,{class:`ai-chat-provider-dialog__submit`,disabled:!d.value,onClick:_},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)(p.value?(0,c.unref)(n)(`provider.submitEdit`):(0,c.unref)(n)(`provider.submit`)),1)]),_:1},8,[`disabled`])])],32))}}),td=[`aria-label`],nd={class:`ai-chat-provider-dialog`},rd={class:`ai-chat-provider-dialog__header`},id={class:`ai-chat-provider-dialog__title`},ad=[`aria-label`],od={class:`ai-chat-provider-dialog__list`},sd={class:`ai-chat-provider-dialog__list-title`},cd={key:0,class:`ai-chat-provider-dialog__list-empty`},ld={key:1,class:`ai-chat-provider-dialog__items`},ud={class:`ai-chat-provider-dialog__item-info`},dd={class:`ai-chat-provider-dialog__item-name`},fd={class:`ai-chat-provider-dialog__item-meta`},pd={class:`ai-chat-provider-dialog__item-actions`},md=(0,c.defineComponent)({__name:`ProviderSettingsDialog`,props:(0,c.mergeModels)({providers:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:(0,c.mergeModels)([`create`,`update`,`remove`],[`update:open`]),setup(e,{emit:t}){let{t:n}=$.global,r=t,i=(0,c.useModel)(e,`open`),a=(0,c.ref)(null);function o(e){r(`create`,e)}function s(e,t){a.value=null,r(`update`,e,t)}function l(){a.value=null}function u(e){a.value=e}function d(e){a.value?.id===e&&(a.value=null),r(`remove`,e)}function f(){i.value=!1}function p(e){e.key===`Escape`&&i.value&&f()}return(0,c.onMounted)(()=>window.addEventListener(`keydown`,p)),(0,c.onBeforeUnmount)(()=>window.removeEventListener(`keydown`,p)),(t,r)=>((0,c.openBlock)(),(0,c.createBlock)(c.Teleport,{to:`body`},[i.value?((0,c.openBlock)(),(0,c.createElementBlock)(`div`,{key:0,class:`ai-chat-provider-dialog__overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":(0,c.unref)(n)(`provider.title`),onClick:(0,c.withModifiers)(f,[`self`])},[(0,c.createElementVNode)(`div`,nd,[(0,c.createElementVNode)(`header`,rd,[(0,c.createElementVNode)(`h2`,id,(0,c.toDisplayString)((0,c.unref)(n)(`provider.title`)),1),(0,c.createElementVNode)(`button`,{type:`button`,class:`ai-chat-provider-dialog__close`,"aria-label":(0,c.unref)(n)(`shared.close`),onClick:f},[...r[0]||=[(0,c.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,c.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,ad)]),(0,c.createVNode)(ed,{editing:a.value,onCreate:o,onUpdate:s,onCancelEdit:l},null,8,[`editing`]),(0,c.createElementVNode)(`section`,od,[(0,c.createElementVNode)(`h3`,sd,(0,c.toDisplayString)((0,c.unref)(n)(`provider.listTitle`)),1),e.providers.length===0?((0,c.openBlock)(),(0,c.createElementBlock)(`p`,cd,(0,c.toDisplayString)((0,c.unref)(n)(`provider.listEmpty`)),1)):((0,c.openBlock)(),(0,c.createElementBlock)(`ul`,ld,[((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(e.providers,e=>((0,c.openBlock)(),(0,c.createElementBlock)(`li`,{key:e.id,class:`ai-chat-provider-dialog__item`},[(0,c.createElementVNode)(`div`,ud,[(0,c.createElementVNode)(`span`,dd,(0,c.toDisplayString)(e.name),1),(0,c.createElementVNode)(`span`,fd,[(0,c.createTextVNode)((0,c.toDisplayString)(e.provider),1),e.model?((0,c.openBlock)(),(0,c.createElementBlock)(c.Fragment,{key:0},[(0,c.createTextVNode)(` · `+(0,c.toDisplayString)(e.model),1)],64)):(0,c.createCommentVNode)(``,!0)])]),(0,c.createElementVNode)(`div`,pd,[(0,c.createVNode)(g,{class:`ai-chat-provider-dialog__edit`,type:`secondary`,size:`small`,onClick:t=>u(e)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`provider.edit`)),1)]),_:1},8,[`onClick`]),(0,c.createVNode)(g,{class:`ai-chat-provider-dialog__remove`,type:`danger`,size:`small`,onClick:t=>d(e.id)},{default:(0,c.withCtx)(()=>[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(n)(`provider.remove`)),1)]),_:1},8,[`onClick`])])]))),128))]))])])],8,td)):(0,c.createCommentVNode)(``,!0)]))}}),hd=`ai-chat-theme`,gd=(0,c.ref)(`system`),_d=(0,c.ref)(!1),vd=(0,c.reactive)({target:`html`,persist:!0}),yd=!1,bd=!1,xd=null;function Sd(e){return e===`system`?_d.value?`dark`:`light`:e}var Cd=(0,c.computed)(()=>Sd(gd.value)),wd=(0,c.computed)(()=>vd.target===`component`?Cd.value:void 0);function Td(e){_d.value=e.matches}function Ed(){if(!(bd||typeof window>`u`)){if(bd=!0,vd.persist){let e=localStorage.getItem(hd);e&&(gd.value=e)}xd=window.matchMedia(`(prefers-color-scheme: dark)`),_d.value=xd.matches,xd.addEventListener(`change`,Td)}}typeof window<`u`&&((0,c.watch)([Cd,()=>vd.target],([e])=>{vd.target===`html`?document.documentElement.setAttribute(`data-theme`,e):document.documentElement.removeAttribute(`data-theme`)},{immediate:!0}),(0,c.watch)(gd,e=>{vd.persist&&localStorage.setItem(hd,e)}));function Dd(e){return e&&!yd&&(yd=!0,e.target&&(vd.target=e.target),e.persist!==void 0&&(vd.persist=e.persist)),(0,c.onMounted)(Ed),{theme:gd,resolvedTheme:Cd,setTheme:e=>{gd.value=e},toggleTheme:()=>{gd.value=Cd.value===`dark`?`light`:`dark`}}}var Od=[{key:`--ai-chat-color-accent-500`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 500`,type:`color`,light:`#6366f1`},{key:`--ai-chat-color-accent-600`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 600`,type:`color`,light:`#4f46e5`},{key:`--ai-chat-color-accent-400`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 400`,type:`color`,light:`#818cf8`},{key:`--ai-chat-neutral-0`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 0`,type:`color`,light:`#ffffff`},{key:`--ai-chat-neutral-50`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 50`,type:`color`,light:`#f9fafb`},{key:`--ai-chat-neutral-100`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 100`,type:`color`,light:`#f3f4f6`},{key:`--ai-chat-neutral-200`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 200`,type:`color`,light:`#e5e7eb`},{key:`--ai-chat-neutral-300`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 300`,type:`color`,light:`#d1d5db`},{key:`--ai-chat-neutral-500`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 500`,type:`color`,light:`#6b7280`},{key:`--ai-chat-neutral-600`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 600`,type:`color`,light:`#4b5563`},{key:`--ai-chat-neutral-700`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 700`,type:`color`,light:`#404040`},{key:`--ai-chat-neutral-800`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 800`,type:`color`,light:`#262626`},{key:`--ai-chat-neutral-900`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 900`,type:`color`,light:`#171717`},{key:`--ai-chat-neutral-950`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 950`,type:`color`,light:`#0a0a0a`},{key:`--ai-chat-color-danger-500`,layer:`primitive`,group:`原始·功能色`,label:`危险 500`,type:`color`,light:`#ef4444`},{key:`--ai-chat-radius-sm`,layer:`primitive`,group:`原始·圆角`,label:`圆角 sm`,type:`size`,light:`6px`,unit:`px`,min:0,max:24},{key:`--ai-chat-radius-md`,layer:`primitive`,group:`原始·圆角`,label:`圆角 md`,type:`size`,light:`8px`,unit:`px`,min:0,max:24},{key:`--ai-chat-radius-lg`,layer:`primitive`,group:`原始·圆角`,label:`圆角 lg`,type:`size`,light:`12px`,unit:`px`,min:0,max:32},{key:`--ai-chat-radius-xl`,layer:`primitive`,group:`原始·圆角`,label:`圆角 xl`,type:`size`,light:`16px`,unit:`px`,min:0,max:40},{key:`--ai-chat-font-sans`,layer:`primitive`,group:`原始·字体`,label:`正文字体`,type:`font`,light:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},{key:`--ai-chat-font-mono`,layer:`primitive`,group:`原始·字体`,label:`等宽字体`,type:`font`,light:`'SF Mono', 'Fira Code', 'Consolas', monospace`},{key:`--ai-chat-duration-fast`,layer:`primitive`,group:`原始·动画`,label:`动画 快`,type:`duration`,light:`0.12s`,unit:`s`,min:0,max:1},{key:`--ai-chat-duration-normal`,layer:`primitive`,group:`原始·动画`,label:`动画 常规`,type:`duration`,light:`0.2s`,unit:`s`,min:0,max:1},{key:`--ai-chat-easing`,layer:`primitive`,group:`原始·动画`,label:`缓动函数`,type:`text`,light:`ease`},{key:`--ai-chat-sidebar-width`,layer:`primitive`,group:`原始·尺寸`,label:`侧边栏宽`,type:`size`,light:`260px`,unit:`px`,min:200,max:400},{key:`--ai-chat-content-max-width`,layer:`primitive`,group:`原始·尺寸`,label:`内容最大宽`,type:`size`,light:`768px`,unit:`px`,min:480,max:1200},{key:`--ai-chat-input-max-height`,layer:`primitive`,group:`原始·尺寸`,label:`输入框最大高`,type:`size`,light:`200px`,unit:`px`,min:80,max:600},{key:`--ai-chat-avatar-size`,layer:`primitive`,group:`原始·尺寸`,label:`头像大小`,type:`size`,light:`30px`,unit:`px`,min:20,max:64},{key:`--ai-chat-btn-icon-size`,layer:`primitive`,group:`原始·尺寸`,label:`图标按钮`,type:`size`,light:`36px`,unit:`px`,min:24,max:56},{key:`--ai-chat-btn-tool-size`,layer:`primitive`,group:`原始·尺寸`,label:`工具按钮`,type:`size`,light:`32px`,unit:`px`,min:20,max:48},{key:`--ai-chat-msg-gap`,layer:`primitive`,group:`原始·尺寸`,label:`消息间距`,type:`size`,light:`16px`,unit:`px`,min:0,max:48},{key:`--ai-chat-msg-padding-y`,layer:`primitive`,group:`原始·尺寸`,label:`消息纵向内边距`,type:`size`,light:`20px`,unit:`px`,min:0,max:48},{key:`--ai-chat-content-max-width-wide`,layer:`primitive`,group:`原始·尺寸`,label:`宽屏内容最大宽`,type:`size`,light:`1024px`,unit:`px`,min:768,max:1600},{key:`--ai-chat-message-max-width`,layer:`primitive`,group:`原始·尺寸`,label:`消息气泡最大宽`,type:`size`,light:`480px`,unit:`px`,min:240,max:960},{key:`--ai-chat-input-max-height-mobile`,layer:`primitive`,group:`原始·尺寸`,label:`移动端输入框最大高`,type:`size`,light:`120px`,unit:`px`,min:60,max:240},{key:`--ai-chat-z-toast`,layer:`primitive`,group:`原始·尺寸`,label:`Toast 层级`,type:`size`,light:`1000`,unit:``,min:0,max:2e3},{key:`--ai-chat-z-popup`,layer:`primitive`,group:`原始·尺寸`,label:`弹层层级`,type:`size`,light:`1000`,unit:``,min:0,max:2e3},{key:`--ai-chat-breakpoint-sm`,layer:`primitive`,group:`原始·断点`,label:`小屏断点 sm`,type:`size`,light:`480px`,unit:`px`,min:320,max:640},{key:`--ai-chat-breakpoint-md`,layer:`primitive`,group:`原始·断点`,label:`中屏断点 md`,type:`size`,light:`640px`,unit:`px`,min:480,max:1024},{key:`--ai-chat-breakpoint-lg`,layer:`primitive`,group:`原始·断点`,label:`大屏断点 lg`,type:`size`,light:`1024px`,unit:`px`,min:768,max:1280},{key:`--ai-chat-breakpoint-xl`,layer:`primitive`,group:`原始·断点`,label:`超大屏断点 xl`,type:`size`,light:`1280px`,unit:`px`,min:1024,max:1920},{key:`--ai-chat-color-accent`,layer:`semantic`,group:`语义·强调`,label:`主色`,type:`color`,light:`var(--ai-chat-color-accent-500)`,derived:!0,ref:`--ai-chat-color-accent-500`},{key:`--ai-chat-color-accent-hover`,layer:`semantic`,group:`语义·强调`,label:`主色 hover`,type:`color`,light:`var(--ai-chat-color-accent-400)`,derived:!0,ref:`--ai-chat-color-accent-400`},{key:`--ai-chat-color-text-on-accent`,layer:`semantic`,group:`语义·强调`,label:`主色上的文字`,type:`color`,light:`#ffffff`},{key:`--ai-chat-color-accent-dim`,layer:`semantic`,group:`语义·强调`,label:`主色淡底`,type:`text`,light:`rgba(99, 102, 241, 0.15)`,dark:`rgba(99, 102, 241, 0.2)`},{key:`--ai-chat-color-bg-primary`,layer:`semantic`,group:`语义·背景`,label:`主背景`,type:`color`,light:`var(--ai-chat-neutral-0)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-secondary`,layer:`semantic`,group:`语义·背景`,label:`次背景`,type:`color`,light:`var(--ai-chat-neutral-50)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-chat`,layer:`semantic`,group:`语义·背景`,label:`聊天区背景`,type:`color`,light:`var(--ai-chat-neutral-0)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar`,layer:`semantic`,group:`语义·背景`,label:`侧边栏背景`,type:`color`,light:`var(--ai-chat-neutral-50)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar-hover`,layer:`semantic`,group:`语义·背景`,label:`侧边栏悬停`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar-active`,layer:`semantic`,group:`语义·背景`,label:`侧边栏选中`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2a2a2a`},{key:`--ai-chat-color-text-primary`,layer:`semantic`,group:`语义·文本`,label:`主文本`,type:`color`,light:`var(--ai-chat-neutral-900)`,dark:`var(--ai-chat-neutral-50)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-text-secondary`,layer:`semantic`,group:`语义·文本`,label:`次文本`,type:`color`,light:`var(--ai-chat-neutral-600)`,dark:`#a1a1aa`},{key:`--ai-chat-color-text-muted`,layer:`semantic`,group:`语义·文本`,label:`弱文本`,type:`color`,light:`#9ca3af`,dark:`#71717a`},{key:`--ai-chat-color-sidebar-text`,layer:`semantic`,group:`语义·文本`,label:`侧边栏文本`,type:`color`,light:`var(--ai-chat-neutral-500)`,dark:`#a1a1aa`},{key:`--ai-chat-color-sidebar-text-active`,layer:`semantic`,group:`语义·文本`,label:`侧边栏选中文本`,type:`color`,light:`var(--ai-chat-neutral-900)`,dark:`var(--ai-chat-neutral-50)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-border`,layer:`semantic`,group:`语义·边框`,label:`边框`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2e2e2e`},{key:`--ai-chat-color-sidebar-border`,layer:`semantic`,group:`语义·边框`,label:`侧边栏边框`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2e2e2e`},{key:`--ai-chat-scrollbar-thumb`,layer:`semantic`,group:`语义·边框`,label:`滚动条拇指`,type:`color`,light:`var(--ai-chat-neutral-300)`,dark:`var(--ai-chat-neutral-700)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-scrollbar-track`,layer:`semantic`,group:`语义·边框`,label:`滚动条轨道`,type:`text`,light:`transparent`},{key:`--ai-chat-color-input-bg`,layer:`semantic`,group:`语义·输入`,label:`输入框背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#2f2f2f`},{key:`--ai-chat-color-input-border`,layer:`semantic`,group:`语义·输入`,label:`输入框边框`,type:`color`,light:`var(--ai-chat-neutral-300)`,dark:`var(--ai-chat-neutral-700)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-input-focus-border`,layer:`semantic`,group:`语义·输入`,label:`输入框聚焦边框`,type:`color`,light:`var(--ai-chat-color-accent-500)`,derived:!0,ref:`--ai-chat-color-accent-500`},{key:`--ai-chat-color-msg-user-bg`,layer:`semantic`,group:`语义·消息`,label:`用户消息背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#2f2f2f`},{key:`--ai-chat-color-msg-assistant-bg`,layer:`semantic`,group:`语义·消息`,label:`AI 消息背景`,type:`text`,light:`transparent`},{key:`--ai-chat-color-code-bg`,layer:`semantic`,group:`语义·代码`,label:`代码块背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-code-header-bg`,layer:`semantic`,group:`语义·代码`,label:`代码块头背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#242427`},{key:`--ai-chat-color-code-inline-bg`,layer:`semantic`,group:`语义·代码`,label:`行内代码背景`,type:`text`,light:`rgba(0, 0, 0, 0.06)`,dark:`rgba(255, 255, 255, 0.06)`},{key:`--ai-chat-color-status-error`,layer:`semantic`,group:`语义·状态`,label:`错误`,type:`color`,light:`#ef4444`,dark:`#f87171`},{key:`--ai-chat-color-status-warning`,layer:`semantic`,group:`语义·状态`,label:`警告`,type:`color`,light:`#f59e0b`,dark:`#fbbf24`},{key:`--ai-chat-color-status-success`,layer:`semantic`,group:`语义·状态`,label:`成功`,type:`color`,light:`#10b981`,dark:`#34d399`},{key:`--ai-chat-hover-neutral`,layer:`semantic`,group:`语义·交互`,label:`中性悬停`,type:`text`,light:`rgba(128, 128, 128, 0.15)`},{key:`--ai-chat-bubble-radius`,layer:`component`,group:`组件·消息`,label:`气泡圆角`,type:`color`,light:`var(--ai-chat-radius-lg)`,derived:!0,ref:`--ai-chat-radius-lg`}],kd=[[`contentMaxWidth`,`--ai-chat-content-max-width`],[`contentMaxWidthWide`,`--ai-chat-content-max-width-wide`],[`messageMaxWidth`,`--ai-chat-message-max-width`],[`inputMaxHeight`,`--ai-chat-input-max-height`],[`inputMaxHeightMobile`,`--ai-chat-input-max-height-mobile`],[`breakpointSm`,`--ai-chat-breakpoint-sm`],[`breakpointMd`,`--ai-chat-breakpoint-md`],[`breakpointLg`,`--ai-chat-breakpoint-lg`],[`breakpointXl`,`--ai-chat-breakpoint-xl`]];function Ad(e){let t=(0,c.computed)(()=>(0,c.toValue)(e));return{vars:(0,c.computed)(()=>{let e=t.value,n={};for(let[t,r]of kd){let i=e[t];typeof i==`number`&&(n[r]=`${i}px`)}return n}),layoutProps:(0,c.computed)(()=>({layout:t.value.layout,messageAlign:t.value.messageAlign})),state:t}}function jd(e=1500){let t=(0,c.ref)(!1),n=null;function r(){n!==null&&(clearTimeout(n),n=null)}async function i(i){let a;try{a=await(0,l.copyText)(i)}catch{a=!1}return a&&(t.value=!0,r(),n=setTimeout(()=>{t.value=!1,n=null},e)),a}return(0,c.getCurrentScope)()&&(0,c.onScopeDispose)(r),{copied:t,copy:i}}exports.Attachment=rl,exports.AttachmentEmpty=pl,exports.AttachmentInfo=ul,exports.AttachmentPreview=ol,exports.AttachmentRemove=dl,exports.Attachments=tl,exports.BranchPicker=ts,exports.Button=g,exports.ComparisonMessage=el,exports.Conversation=eo,exports.ConversationContent=no,exports.ConversationEmpty=lo,exports.ConversationScrollBtn=po,exports.ImageLightbox=dc,exports.InlineCitation=eu,exports.Input=v,exports.JsonDiffView=qa,exports.LanguageToggle=Da,exports.Message=So,exports.MessageAction=Io,exports.MessageActionCopy=as,exports.MessageActionEdit=ds,exports.MessageActionFeedback=ps,exports.MessageActionRetry=os,exports.MessageActions=No,exports.MessageAttachments=Bo,exports.MessageContent=ko,exports.MessageFeedback=Jo,exports.ModelIcon=Ma,exports.PromptInput=Fs,exports.PromptInputAttachments=kc,exports.PromptInputBody=zs,exports.PromptInputButton=$s,exports.PromptInputFooter=qs,exports.PromptInputHeader=Lc,exports.PromptInputSubmit=Nc,exports.PromptInputSuggestion=Gc,exports.PromptInputTextarea=Vs,exports.PromptInputTools=Zs,exports.PromptInputUploadButton=ic,exports.Prompts=Pu,exports.ProviderSettingsDialog=md,exports.Radio=x,exports.Select=b,exports.Shimmer=S,exports.Sources=yu,exports.StreamText=f,exports.ThinkingBlock=Eo,exports.ThinkingChain=ks,exports.Toast=ba,exports.ToolCall=Pl,exports.ToolCallContent=Al,exports.ToolCallHeader=vl,exports.ToolCallInput=Sl,exports.ToolCallOutput=Ol,exports.ToolConfirmation=Ul,exports.Welcome=Eu,exports.aiChatI18n=$,exports.componentTheme=wd,exports.filterSuggestions=Bc,exports.getInitialLocale=ua,exports.isSafeHttpUrl=Wl,exports.markdownRendererKey=mo,exports.parseSuggestion=zc,exports.presets=Ya,exports.provideMarkdownRenderer=ho,exports.resolvedTheme=Cd,exports.setAiChatLocale=da,exports.tokensMeta=Od,exports.useClipboard=jd,exports.useLayoutConfig=Ad,exports.useMarkdownRenderer=go,exports.useScrollAnchor=Ja,exports.useTheme=Dd,exports.useThemePreset=Xa;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("vue"),t=require("@toimc/core");var n={class:`ai-chat-stream-text`},r={key:0,class:`ai-chat-stream-text__cursor`},i=(0,e.defineComponent)({__name:`StreamText`,props:{stream:{}},setup(t){let i=t,a=(0,e.ref)(``),o=(0,e.ref)(!0);return(0,e.watch)(()=>i.stream,e=>{e!==void 0&&(a.value=e,o.value=!0)}),(0,e.watch)(()=>i.stream,e=>{e===void 0&&(o.value=!1)}),(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,n,[(0,e.createTextVNode)((0,e.toDisplayString)(a.value)+` `,1),o.value?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,r,`▉`)):(0,e.createCommentVNode)(``,!0)]))}}),a=[`type`,`disabled`],o=(0,e.defineComponent)({__name:`Button`,props:{type:{},nativeType:{},size:{},disabled:{type:Boolean}},emits:[`click`],setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:(0,e.normalizeClass)([`ai-chat-btn`,[t.type?`ai-chat-btn--${t.type}`:`ai-chat-btn--primary`,t.size?`ai-chat-btn--${t.size}`:`ai-chat-btn--medium`]]),type:t.nativeType??`button`,disabled:t.disabled,onClick:r[0]||=e=>n.$emit(`click`,e)},[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)],10,a))}}),s=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},c=s(o,[[`__scopeId`,`data-v-9a46add5`]]),l=[`type`,`value`,`placeholder`,`disabled`,`aria-invalid`,`autocomplete`],u=s((0,e.defineComponent)({__name:`Input`,props:(0,e.mergeModels)({type:{default:`text`},placeholder:{default:void 0},disabled:{type:Boolean},invalid:{type:Boolean},size:{default:`md`},autocomplete:{default:void 0}},{modelValue:{default:``},modelModifiers:{}}),emits:(0,e.mergeModels)([`blur`],[`update:modelValue`]),setup(t,{emit:n}){let r=t,i=n,a=(0,e.useModel)(t,`modelValue`);function o(e){r.disabled||(a.value=e.target.value)}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`input`,{class:(0,e.normalizeClass)([`ai-chat-input`,[`ai-chat-input--${t.size}`,{"ai-chat-input--invalid":t.invalid}]]),type:t.type,value:a.value,placeholder:t.placeholder,disabled:t.disabled,"aria-invalid":t.invalid?`true`:void 0,autocomplete:t.autocomplete,onInput:o,onBlur:r[0]||=e=>i(`blur`,e)},null,42,l))}}),[[`__scopeId`,`data-v-f77a31ae`]]),d=[`value`,`disabled`,`aria-invalid`],f=s((0,e.defineComponent)({__name:`Select`,props:(0,e.mergeModels)({disabled:{type:Boolean},invalid:{type:Boolean},size:{default:`md`}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let n=t,r=(0,e.useModel)(t,`modelValue`);function i(e){n.disabled||(r.value=e.target.value)}return(n,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-select`,[`ai-chat-select--${t.size}`,{"ai-chat-select--invalid":t.invalid}]])},[(0,e.createElementVNode)(`select`,{class:`ai-chat-select__control`,value:r.value,disabled:t.disabled,"aria-invalid":t.invalid?`true`:void 0,onChange:i},[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)],40,d),a[0]||=(0,e.createElementVNode)(`svg`,{class:`ai-chat-select__chevron`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{d:`M4 6l4 4 4-4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`})],-1)],2))}}),[[`__scopeId`,`data-v-78a5cde3`]]),p=[`value`,`name`,`checked`,`disabled`],m={key:0,class:`ai-chat-radio__label`},h=s((0,e.defineComponent)({__name:`Radio`,props:(0,e.mergeModels)({value:{},label:{},disabled:{type:Boolean},name:{}},{modelValue:{default:``},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let n=t,r=(0,e.useModel)(t,`modelValue`);function i(){n.disabled||r.value===n.value||(r.value=n.value)}return(n,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`label`,{class:(0,e.normalizeClass)([`ai-chat-radio`,{"ai-chat-radio--checked":r.value===t.value,"ai-chat-radio--disabled":t.disabled}])},[(0,e.createElementVNode)(`input`,{class:`ai-chat-radio__input`,type:`radio`,value:t.value,name:t.name,checked:r.value===t.value,disabled:t.disabled,onChange:i},null,40,p),a[0]||=(0,e.createElementVNode)(`span`,{class:`ai-chat-radio__circle`,"aria-hidden":`true`},[(0,e.createElementVNode)(`span`,{class:`ai-chat-radio__dot`})],-1),t.label?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,m,(0,e.toDisplayString)(t.label),1)):(0,e.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-88d1f717`]]),g=(0,e.defineComponent)({__name:`Shimmer`,props:{as:{default:`span`},duration:{default:2e3}},setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.as),{class:`ai-chat-shimmer`,style:(0,e.normalizeStyle)({animationDuration:t.duration+`ms`})},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,`default`)]),_:3},8,[`style`]))}}),_=typeof window<`u`,v,y;if(process.env.NODE_ENV!==`production`){let e=_&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(v=t=>{e.mark(t)},y=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}var b=/\{([0-9a-zA-Z]+)\}/g;function x(e,...t){return t.length===1&&R(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(b,(e,n)=>t.hasOwnProperty(n)?t[n]:``)}var S=(e,t=!1)=>t?Symbol.for(e):Symbol(e),ee=(e,t,n)=>C({l:e,k:t,s:n}),C=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),w=e=>typeof e==`number`&&isFinite(e);function T(e,t){return I(t)||w(t)?`${e}:${t}`:e}var E=e=>se(e)===`[object Date]`,D=e=>se(e)===`[object RegExp]`,O=e=>z(e)&&Object.keys(e).length===0,k=Object.assign,te=Object.create,A=(e=null)=>te(e),ne,j=()=>ne||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:A(),re=Object.prototype.hasOwnProperty;function M(e,t){return re.call(e,t)}function N(e,t){let n=e[t];return M(e,t)?n:void 0}function ie(e){return M(Object.prototype,e)}var P=Array.isArray,F=e=>typeof e==`function`,I=e=>typeof e==`string`,L=e=>typeof e==`boolean`,R=e=>typeof e==`object`&&!!e,ae=e=>R(e)&&F(e.then)&&F(e.catch),oe=Object.prototype.toString,se=e=>oe.call(e),z=e=>se(e)===`[object Object]`,ce=e=>e==null?``:P(e)||z(e)&&e.toString===oe?JSON.stringify(e,null,2):String(e);function le(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var B=2;function ue(e,t=0,n=e.length){let r=e.split(/\r?\n/),i=0,a=[];for(let e=0;e<r.length;e++)if(i+=r[e].length+1,i>=t){for(let o=e-B;o<=e+B||n>i;o++){if(o<0||o>=r.length)continue;let s=o+1;a.push(`${s}${` `.repeat(3-String(s).length)}| ${r[o]}`);let c=r[o].length;if(o===e){let e=t-(i-c)+1,r=Math.max(1,n>i?c-e:n-t);a.push(` | `+` `.repeat(e)+`^`.repeat(r))}else if(o>e){if(n>i){let e=Math.max(Math.min(n-i,c),1);a.push(` | `+`^`.repeat(e))}i+=c+1}}break}return a.join(`
2
+ `)}function V(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var de={};function fe(e){de[e]||(de[e]=!0,V(e))}function pe(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function me(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}var he=/^javascript:/i,ge=/^(?:href|xlink:href|src|action|formaction)$/i,_e=/&#(?:x([0-9a-f]+)|(\d+));?/gi,ve=/&(?:Tab|NewLine);/g,ye=/&colon;?/gi,be=/[\u0000-\u0020\u007f-\u009f]/g,xe=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,Se=/(^|[\s"'<>/])on(\w+\s*=)/gi,Ce=/(?:^|[\s"'<>/])srcdoc\s*=/i,we=/(^|[\s"'<>/])s(rcdoc\s*=)/gi,Te=/<(?:base|animate|set|script)(?=[\s/>]|$)/i,Ee=/<(base|animate|set|script)(?=[\s/>]|$)/gi,De=/(^|[\s"'<>/])((?:href|xlink:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function Oe(e,t,n){let r=t||n;if(!r)return e;let i=Number.parseInt(r,t?16:10);return i<=127?String.fromCharCode(i):e}function ke(e){let t=e.replace(_e,Oe).replace(ve,``).replace(ye,`:`).replace(be,``);return he.test(t)}function Ae(e){let t=/url\s*\(/gi,n=``,r=0,i;for(;(i=t.exec(e))!==null;){let a=i.index,o=t.lastIndex-1,s=o+1,c=1,l=null;for(;s<e.length;s++){let t=e[s];if(l)t===l&&(l=null);else if(t===`"`||t===`'`)l=t;else if(t===`(`)c++;else if(t===`)`&&(c--,c===0))break}if(c!==0)break;let u=e.slice(o+1,s).trim(),d=u.startsWith(`"`)&&u.endsWith(`"`)||u.startsWith(`'`)&&u.endsWith(`'`)?u.slice(1,-1).trim():u;n+=e.slice(r,a),n+=ke(d)?`url(about:blank)`:e.slice(a,s+1),r=s+1}return n+e.slice(r)}function je(e,t){return ge.test(e)&&ke(t)?`about:blank`:me(e.toLowerCase()===`style`?Ae(t):t)}function Me(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${je(t,n)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${je(t,n)}'`),xe.test(e)&&(process.env.NODE_ENV!==`production`&&V(`Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages.`),e=e.replace(Se,`$1&#111;n$2`)),Ce.test(e)&&(process.env.NODE_ENV!==`production`&&V(`Potentially dangerous srcdoc attribute detected in translation. Consider removing srcdoc from your translation messages.`),e=e.replace(we,`$1&#115;$2`)),Te.test(e)&&(process.env.NODE_ENV!==`production`&&V(`Potentially dangerous element (<base>, <animate>, <set> or <script>) detected in translation. Consider removing it from your translation messages.`),e=e.replace(Ee,`&lt;$1`)),e=e.replace(De,(e,t,n,r)=>ke(r)?`${t}${n}about:blank`:e),e}function H(){let e=new Map;return{events:e,on(t,n){let r=e.get(t);r&&r.push(n)||e.set(t,[n])},off(t,n){let r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit(t,n){(e.get(t)||[]).slice().map(e=>e(n)),(e.get(`*`)||[]).slice().map(e=>e(t,n))}}}var Ne=e=>!R(e)||P(e);function Pe(e,t){if(Ne(e)||Ne(t)||t===Object.prototype)throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{if(r===`__proto__`)return;let i=e[r];if(P(i)){let e=[];e.length=i.length,t[r]=e,n.push({src:i,des:e})}else R(i)?((!R(t[r])||P(t[r]))&&(t[r]=A()),n.push({src:i,des:t[r]})):t[r]=i})}}function Fe(e,t,n){return{line:e,column:t,offset:n}}function Ie(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var U={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},Le={[U.EXPECTED_TOKEN]:`Expected token: '{0}'`,[U.INVALID_TOKEN_IN_PLACEHOLDER]:`Invalid token in placeholder: '{0}'`,[U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:`Unterminated single quote in placeholder`,[U.UNKNOWN_ESCAPE_SEQUENCE]:`Unknown escape sequence: \\{0}`,[U.INVALID_UNICODE_ESCAPE_SEQUENCE]:`Invalid unicode escape sequence: {0}`,[U.UNBALANCED_CLOSING_BRACE]:`Unbalanced closing brace`,[U.UNTERMINATED_CLOSING_BRACE]:`Unterminated closing brace`,[U.EMPTY_PLACEHOLDER]:`Empty placeholder`,[U.NOT_ALLOW_NEST_PLACEHOLDER]:`Not allowed nest placeholder`,[U.INVALID_LINKED_FORMAT]:`Invalid linked format`,[U.MUST_HAVE_MESSAGES_IN_PLURAL]:`Plural must have messages`,[U.UNEXPECTED_EMPTY_LINKED_MODIFIER]:`Unexpected empty linked modifier`,[U.UNEXPECTED_EMPTY_LINKED_KEY]:`Unexpected empty linked key`,[U.UNEXPECTED_LEXICAL_ANALYSIS]:`Unexpected lexical analysis in token: '{0}'`,[U.UNHANDLED_CODEGEN_NODE_TYPE]:`unhandled codegen node type: '{0}'`,[U.UNHANDLED_MINIFIER_NODE_TYPE]:`unhandled mimifier node type: '{0}'`};function Re(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=process.env.NODE_ENV===`production`?e:x((i||Le)[e]||``,...a||[]),s=SyntaxError(String(o));return s.code=e,t&&(s.location=t),s.domain=r,s}function ze(e){throw e}var Be=/<\/?[\w\s="/.':;#-\/]+>/,Ve=e=>Be.test(e),W=` `,He=`\r`,G=`
3
+ `,Ue=`\u2028`,We=`\u2029`;function Ge(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===He&&t[e+1]===G,s=e=>t[e]===G,c=e=>t[e]===We,l=e=>t[e]===Ue,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?G:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Ke=void 0,qe=`'`,Je=`tokenizer`;function Ye(e,t={}){let n=t.location!==!1,r=Ge(e),i=()=>r.index(),a=()=>Fe(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();if(t.column+=r,t.offset+=r,u){let r=Re(e,n?Ie(a.startLoc,t):null,{domain:Je,args:i});u(r)}}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Ie(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(U.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===W||e.currentPeek()===G;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Ke)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Ke)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===qe;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function ee(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==7&&n!==11)return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===W||!t?!1:t===G?(e.peek(),r()):E(e,!1)},i=r();return e.resetPeek(),i}function T(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function E(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?r!==W&&r!==G:i===W?(e.peek(),n(!0,W)):i!==G||(e.peek(),n(!0,G))},r=n();return t&&e.resetPeek(),r}function D(e,t){let n=e.currentChar();if(n!==Ke)return t(n)?(e.next(),n):null}function O(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function k(e){return D(e,O)}function te(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function A(e){return D(e,te)}function ne(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function j(e){return D(e,ne)}function re(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function M(e){return D(e,re)}function N(e){let t=``,n=``;for(;t=j(e);)n+=t;return n}function ie(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===W||n===G){if(E(e))t+=n,e.next();else if(T(e))break;else t+=n,e.next()}else t+=n,e.next()}return t}function P(e){g(e);let t=``,n=``;for(;t=A(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==Ke&&r!==W&&r!==G&&r!==` `){let t=se(e);return d(U.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===Ke&&d(U.UNTERMINATED_CLOSING_BRACE,a(),0),n}function F(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${N(e)}`):t+=N(e),e.currentChar()===Ke&&d(U.UNTERMINATED_CLOSING_BRACE,a(),0),t}function I(e){return e!==qe&&e!==G}function L(e){g(e),m(e,`'`);let t=``,n=``;for(;t=D(e,I);)n+=t===`\\`?R(e):t;let r=e.currentChar();return r===G||r===Ke?(d(U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===G&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function R(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return ae(e,t,4);case`U`:return ae(e,t,6);default:return d(U.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function ae(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=M(e);if(!n){d(U.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function oe(e){return e!==`{`&&e!==`}`&&e!==W&&e!==G}function se(e){g(e);let t=``,n=``;for(;t=D(e,oe);)n+=t;return n}function z(e){let t=``,n=``;for(;t=k(e);)n+=t;return n}function ce(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===W?n:(n+=r,e.next(),t(n))};return t(``)}function le(e){g(e);let t=m(e,`|`);return g(e),t}function B(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(U.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(U.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(U.UNTERMINATED_CLOSING_BRACE,a(),0),n=ue(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(T(e))return t.braceNest>0&&d(U.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,le(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(U.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,V(e,t);if(r=y(e,t))return n=f(t,4,P(e)),g(e),n;if(i=b(e,t))return n=f(t,5,F(e)),g(e),n;if(o=x(e,t))return n=f(t,6,L(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,se(e)),d(U.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function ue(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch(n!==7&&n!==8&&n!==11&&n!==9||i!==G&&i!==W||d(U.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return T(e)?(r=f(t,1,le(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||C(e,t)?(g(e),ue(e,t)):ee(e,t)?(g(e),f(t,11,z(e))):w(e,t)?(g(e),i===`{`?B(e,t)||r:f(t,10,ce(e))):(n===7&&d(U.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,V(e,t))}}function V(e,t){let n={type:13};if(t.braceNest>0)return B(e,t)||p(t);if(t.inLinked)return ue(e,t)||p(t);switch(e.currentChar()){case`{`:return B(e,t)||p(t);case`}`:return d(U.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return ue(e,t)||p(t);default:if(T(e))return n=f(t,1,le(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,ie(e))}return n}function de(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Ke?f(c,13):V(r,c)}return{nextToken:de,currentOffset:i,currentPosition:a,context:l}}var Xe=`parser`,Ze=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Qe=/\\([\\@{}|])/g;function $e(e,t){return t}function et(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function tt(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();if(s.offset+=a,s.column+=a,n){let e=Re(r,t?Ie(i,s):null,{domain:Xe,args:o});n(e)}}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(Qe,$e),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(Ze,et),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,K(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,U.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(o)),n.key=l(e,o.value||``);break;default:{r(e,U.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,U.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,K(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,U.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=Ye(n,k({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,U.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function K(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function nt(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function rt(e,t){for(let n=0;n<e.length;n++)it(e[n],t)}function it(e,t){switch(e.type){case 1:rt(e.cases,t),t.helper(`plural`);break;case 2:rt(e.items,t);break;case 6:it(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`)}}function at(e,t={}){let n=nt(e);n.helper(`normalize`),e.body&&it(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function ot(e){let t=e.body;return t.type===2?st(t):t.cases.forEach(e=>st(e)),e}function st(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(r.type!==3&&r.type!==9||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=le(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}var ct=`minifier`;function lt(e){switch(e.t=e.type,e.type){case 0:{let t=e;lt(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)lt(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)lt(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;lt(t.key),t.k=t.key,delete t.key,t.modifier&&(lt(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:if(process.env.NODE_ENV!==`production`)throw Re(U.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:ct,args:[e.type]})}delete e.type}var ut=`parser`;function dt(e,t){let{filename:n,breakLineCode:r,needIndent:i}=t,a=t.location!==!1,o={filename:n,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};a&&e.loc&&(o.source=e.loc.source);let s=()=>o;function c(e,t){o.code+=e}function l(e,t=!0){let n=t?r:``;c(i?n+` `.repeat(e):n)}function u(e=!0){let t=++o.indentLevel;e&&l(t)}function d(e=!0){let t=--o.indentLevel;e&&l(t)}function f(){l(o.indentLevel)}return{context:s,push:c,indent:u,deindent:d,newline:f,helper:e=>`_${e}`,needIndent:()=>o.needIndent}}function ft(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),gt(e,t.key),t.modifier?(e.push(`, `),gt(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function pt(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(gt(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function mt(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(gt(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function ht(e,t){t.body?gt(e,t.body):e.push(`null`)}function gt(e,t){let{helper:n}=e;switch(t.type){case 0:ht(e,t);break;case 1:mt(e,t);break;case 2:pt(e,t);break;case 6:ft(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:if(process.env.NODE_ENV!==`production`)throw Re(U.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:ut,args:[t.type]})}}var _t=(e,t={})=>{let n=I(t.mode)?t.mode:`normal`,r=I(t.filename)?t.filename:`message.intl`;t.sourceMap;let i=t.breakLineCode==null?n===`arrow`?`;`:`
4
+ `:t.breakLineCode,a=t.needIndent?t.needIndent:n!==`arrow`,o=e.helpers||[],s=dt(e,{filename:r,breakLineCode:i,needIndent:a});s.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),s.indent(a),o.length>0&&(s.push(`const { ${le(o.map(e=>`${e}: _${e}`),`, `)} } = ctx`),s.newline()),s.push(`return `),gt(s,e),s.deindent(a),s.push(`}`),delete e.helpers;let{code:c,map:l}=s.context();return{ast:e,code:c,map:l?l.toJSON():void 0}};function vt(e,t={}){let n=k({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null||n.optimize,o=tt(n).parse(e);return r?(a&&ot(o),i&&lt(o),{ast:o,code:``}):(at(o,n),_t(o,n))}function yt(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function bt(e){return R(e)&&At(e)===0&&(M(e,`b`)||M(e,`body`))}var xt=[`b`,`body`];function St(e){return Lt(e,xt)}var Ct=[`c`,`cases`];function wt(e){return Lt(e,Ct,[])}var Tt=[`s`,`static`];function Et(e){return Lt(e,Tt)}var Dt=[`i`,`items`];function Ot(e){return Lt(e,Dt,[])}var kt=[`t`,`type`];function At(e){return Lt(e,kt)}var jt=[`v`,`value`];function Mt(e,t){let n=Lt(e,jt);if(n!=null)return n;throw zt(t)}var Nt=[`m`,`modifier`];function Pt(e){return Lt(e,Nt)}var Ft=[`k`,`key`];function It(e){let t=Lt(e,Ft);if(t)return t;throw zt(6)}function Lt(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(M(e,r)&&e[r]!=null)return e[r]}return n}var Rt=[...xt,...Ct,...Tt,...Dt,...Ft,...Nt,...jt,...kt];function zt(e){return Error(`unhandled node type: ${e}`)}function Bt(e){return t=>Vt(t,e)}function Vt(e,t){let n=St(t);if(n==null)throw zt(0);if(At(n)===1){let t=wt(n);return e.plural(t.reduce((t,n)=>[...t,Ht(e,n)],[]))}return Ht(e,n)}function Ht(e,t){let n=Et(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=Ot(t).reduce((t,n)=>[...t,Ut(e,n)],[]);return e.normalize(n)}}function Ut(e,t){let n=At(t);switch(n){case 3:return Mt(t,n);case 9:return Mt(t,n);case 4:{let r=t;if(M(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(M(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw zt(n)}case 5:{let r=t;if(M(r,`i`)&&w(r.i))return e.interpolate(e.list(r.i));if(M(r,`index`)&&w(r.index))return e.interpolate(e.list(r.index));throw zt(n)}case 6:{let n=t,r=Pt(n),i=It(n);return e.linked(Ut(e,i),r?Ut(e,r):void 0,e.type)}case 7:return Mt(t,n);case 8:return Mt(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var Wt=`Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;function Gt(e,t){t&&Ve(e)&&V(x(Wt,{source:e}))}var Kt=e=>e,qt=A();function Jt(e,t={}){let n=!1,r=t.onError||ze;return t.onError=e=>{n=!0,r(e)},{...vt(e,t),detectError:n}}function Yt(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&I(e)){let n=!L(t.warnHtmlMessage)||t.warnHtmlMessage;process.env.NODE_ENV!==`production`&&Gt(e,n);let r=(t.onCacheKey||Kt)(e),i=qt[r];if(i)return i;let{ast:a,detectError:o}=Jt(e,{...t,location:process.env.NODE_ENV!==`production`,jit:!0}),s=Bt(a);return o?s:qt[r]=s}{if(!bt(e))return process.env.NODE_ENV!==`production`&&V(`Cannot compile the message of '${t.key}' key, because the message compiler is not included in this build. Pre-compile the message. So translate function returns the message as is.`),(()=>e);let n=e.cacheKey;return n?qt[n]||(qt[n]=Bt(e)):Bt(e)}}var Xt=null;function Zt(e){Xt=e}function Qt(e,t,n){Xt&&Xt.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var $t=en(`function:translate`);function en(e){return t=>Xt&&Xt.emit(e,t)}var q={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function J(e){return Re(e,null,process.env.NODE_ENV===`production`?void 0:{messages:tn})}var tn={[q.INVALID_ARGUMENT]:`Invalid arguments`,[q.INVALID_DATE_ARGUMENT]:`The date provided is an invalid Date object.Make sure your Date represents a valid date.`,[q.INVALID_ISO_DATE_ARGUMENT]:`The argument provided is not a valid ISO date string`,[q.NOT_SUPPORT_NON_STRING_MESSAGE]:`Not support non-string message`,[q.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:`cannot support promise value`,[q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:`cannot support async function`,[q.NOT_SUPPORT_LOCALE_TYPE]:`cannot support locale type`};function nn(e,t){return t.locale==null?an(e.locale):an(t.locale)}var rn;function an(e){if(I(e))return e;if(F(e)){if(e.resolvedOnce&&rn!=null)return rn;if(e.constructor.name===`Function`){let t=e();if(ae(t))throw J(q.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return rn=t}throw J(q.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw J(q.NOT_SUPPORT_LOCALE_TYPE)}function on(e,t,n){return[...new Set([n,...P(t)?t:R(t)?Object.keys(t).filter(e=>e!=="default"):I(t)?[t]:[n]])]}function sn(e,t,n){let r=I(n)?n:wn,i=e,a;R(t)?(i.__localeChainObjectCache||=new WeakMap,a=i.__localeChainObjectCache.get(t),a||(a=new Map,i.__localeChainObjectCache.set(t,a))):(i.__localeChainCache||=new Map,a=i.__localeChainCache.get(t),a||(a=new Map,i.__localeChainCache.set(t,a)));let o=a.get(r);if(o)return o;let s=[],c=[n];for(;P(c);)c=cn(s,c,t);let l=P(t)||!z(t)?t:t.default?t.default:null;return c=I(l)?[l]:l,P(c)&&cn(s,c,!1),a.set(r,s),s}function cn(e,t,n){let r=!0;for(let i=0;i<t.length&&L(r);i++){let a=t[i];I(a)&&(r=ln(e,t[i],n))}return r}function ln(e,t,n){let r,i=t.split(`-`);do r=un(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function un(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(P(n)||z(n))&&n[i]&&(r=n[i])}return r}var dn=[];dn[0]={w:[0],i:[3,0],"[":[4],o:[7]},dn[1]={w:[1],".":[2],"[":[4],o:[7]},dn[2]={w:[2],i:[3,0],0:[3,0]},dn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},dn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},dn[5]={"'":[4,0],o:8,l:[5,0]},dn[6]={'"':[4,0],o:8,l:[6,0]};var fn=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function pn(e){return fn.test(e)}function mn(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function hn(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function gn(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:pn(t)?mn(t):`*`+t}function _n(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=gn(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=hn(a),d=dn[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var vn=new Map;function yn(e,t){return R(e)?N(e,t):null}function bn(e,t){if(!R(e))return null;let n=vn.get(t);if(n||(n=_n(t),n&&vn.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(Rt.includes(e)&&bt(i)||!R(i)||!M(i,e))return null;let t=i[e];if(t===void 0||F(i))return null;i=t,a++}return i}var Y={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9},xn={[Y.NOT_FOUND_KEY]:`Not found '{key}' key in '{locale}' locale {resource}.`,[Y.FALLBACK_TO_TRANSLATE]:`Fall back to translate '{key}' key with '{target}' locale.`,[Y.CANNOT_FORMAT_NUMBER]:`Cannot format a number value due to not supported Intl.NumberFormat.`,[Y.FALLBACK_TO_NUMBER_FORMAT]:`Fall back to number format '{key}' key with '{target}' locale.`,[Y.CANNOT_FORMAT_DATE]:`Cannot format a date value due to not supported Intl.DateTimeFormat.`,[Y.FALLBACK_TO_DATE_FORMAT]:`Fall back to datetime format '{key}' key with '{target}' locale.`,[Y.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:`This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`,[Y.INVALID_NUMBER_ARGUMENT]:`Invalid argument for number formatting: expected a number but received '{value}'.`,[Y.INVALID_DATE_ARGUMENT]:`Invalid argument for datetime formatting: expected a Date, number, or ISO string but received '{value}'.`};function Sn(e,...t){return x(xn[e],...t)}var Cn=`11.4.18`,wn=`en-US`,Tn=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function En(){return{upper:(e,t)=>t===`text`&&I(e)?e.toUpperCase():t===`vnode`&&R(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&I(e)?e.toLowerCase():t===`vnode`&&R(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&I(e)?Tn(e):t===`vnode`&&R(e)&&`__v_isVNode`in e?Tn(e.children):e}}var Dn;function On(e){Dn=e}var kn;function An(e){kn=e}var jn;function Mn(e){jn=e}var Nn=null,Pn=()=>Nn,Fn=null,In=e=>{Fn=e},Ln=()=>Fn,Rn=0;function zn(e={}){let t=F(e.onWarn)?e.onWarn:V,n=I(e.version)?e.version:Cn,r=I(e.locale)||F(e.locale)?e.locale:wn,i=F(r)?wn:r,a=P(e.fallbackLocale)||z(e.fallbackLocale)||I(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=z(e.messages)?e.messages:Bn(i),s=z(e.datetimeFormats)?e.datetimeFormats:Bn(i),c=z(e.numberFormats)?e.numberFormats:Bn(i),l=k(A(),e.modifiers,En()),u=e.pluralRules||A(),d=F(e.missing)?e.missing:null,f=L(e.missingWarn)||D(e.missingWarn)?e.missingWarn:!0,p=L(e.fallbackWarn)||D(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=F(e.postTranslation)?e.postTranslation:null,_=z(e.processor)?e.processor:null,v=!L(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,b=F(e.messageCompiler)?e.messageCompiler:Dn;process.env.NODE_ENV!==`production`&&F(e.messageCompiler)&&fe(Sn(Y.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));let x=F(e.messageResolver)?e.messageResolver:kn||yn,S=F(e.localeFallbacker)?e.localeFallbacker:jn||on,ee=R(e.fallbackContext)?e.fallbackContext:void 0,C=e,w=R(C.__datetimeFormatters)?C.__datetimeFormatters:new Map,T=R(C.__numberFormatters)?C.__numberFormatters:new Map,E=R(C.__meta)?C.__meta:{};Rn++;let O={version:n,cid:Rn,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:ee,onWarn:t,__meta:E};return O.datetimeFormats=s,O.numberFormats=c,O.__datetimeFormatters=w,O.__numberFormatters=T,process.env.NODE_ENV!==`production`&&(O.__v_emitter=C.__v_emitter==null?void 0:C.__v_emitter),(process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__)&&Qt(O,n,E),O}var Bn=e=>({[e]:A()});function Vn(e,t){return e instanceof RegExp?e.test(t):e}function Hn(e,t){return e instanceof RegExp?e.test(t):e}function Un(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(process.env.NODE_ENV!==`production`){let r=e.__v_emitter;r&&r.emit(`missing`,{locale:n,key:t,type:i,groupId:T(i,t)})}if(a!==null){let r=a(e,n,t,i);return I(r)?r:t}return process.env.NODE_ENV!==`production`&&Hn(r,t)&&o(Sn(Y.NOT_FOUND_KEY,{key:t,locale:n,resource:i===`datetime format`?`datetime formats`:i===`number format`?`number formats`:`messages`})),t}function Wn(e,t){let n=e;R(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function Gn(e,t,n){Wn(e,n),e.fallbackContext&&Wn(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function Kn(e,t){return e!==t&&e.split(`-`)[0]===t.split(`-`)[0]}function qn(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(Kn(e,t[r]))return!0;return!1}function Jn(e,t,n,r,i,a,o){let{fallbackLocale:s,localeFallbacker:c,onWarn:l}=e,u=c(e,s,n),d=n;for(let s=0;s<u.length;s++){let c=u[s];if(process.env.NODE_ENV!==`production`&&n!==c&&Vn(a,t)&&l(Sn(o===`datetime format`?Y.FALLBACK_TO_DATE_FORMAT:Y.FALLBACK_TO_NUMBER_FORMAT,{key:t,target:c})),process.env.NODE_ENV!==`production`&&n!==c){let n=e.__v_emitter;n&&n.emit(`fallback`,{type:o,key:t,from:d,to:c,groupId:T(o,t)})}if(z(N(N(r,c)||{},t))&&I(c))return c;Un(e,t,c,i,o),d=c}return null}function Yn(e,t,n){let r=`${e}__${t}`;return z(n)&&!O(n)&&(r=`${r}__${JSON.stringify(n)}`),r}function Xn(e,t,n){for(let r in n){let n=`${t}__${r}`;for(let t of e.keys())(t===n||t.startsWith(`${n}__`))&&e.delete(t)}}function Zn(e,t,n,r){let[,i,a,o]=e,s=n;return I(i)?t.key=i:z(i)&&Object.keys(i).forEach(e=>{r.includes(e)?s[e]=i[e]:t[e]=i[e]}),I(a)?t.locale=a:z(a)&&(s=a),z(o)&&(s=o),s}var Qn=typeof Intl<`u`,$n={dateTimeFormat:Qn&&Intl.DateTimeFormat!==void 0,numberFormat:Qn&&Intl.NumberFormat!==void 0};function er(e,...t){let{datetimeFormats:n,unresolving:r,onWarn:i}=e,{__datetimeFormatters:a}=e;if(process.env.NODE_ENV!==`production`&&!$n.dateTimeFormat)return i(Sn(Y.CANNOT_FORMAT_DATE)),``;if(!I(t[0])&&!E(t[0])&&!w(t[0]))return process.env.NODE_ENV!==`production`&&i(Sn(Y.INVALID_DATE_ARGUMENT,{value:String(t[0])})),``;let[o,s,c,l]=nr(...t),u=L(c.missingWarn)?c.missingWarn:e.missingWarn,d=L(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=nn(e,c);if(!I(o)||o===``){let e=new Intl.DateTimeFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Jn(e,o,p,n,u,d,`datetime format`);if(!I(m))return r?-1:o;let h=n[m][o],g=Yn(m,o,l),_=a.get(g);return _||(_=new Intl.DateTimeFormat(m,k({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var tr=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function nr(...e){let[t]=e,n=A(),r=A(),i;if(I(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw J(q.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch{throw J(q.INVALID_ISO_DATE_ARGUMENT)}}else if(E(t)){if(isNaN(t.getTime()))throw J(q.INVALID_DATE_ARGUMENT);i=t}else if(w(t))i=t;else throw J(q.INVALID_ARGUMENT);let a=Zn(e,n,r,tr);return[n.key||``,i,n,a]}function rr(e,t,n){Xn(e.__datetimeFormatters,t,n)}function ir(e,...t){let{numberFormats:n,unresolving:r,onWarn:i}=e,{__numberFormatters:a}=e;if(process.env.NODE_ENV!==`production`&&!$n.numberFormat)return i(Sn(Y.CANNOT_FORMAT_NUMBER)),``;if(!w(t[0]))return process.env.NODE_ENV!==`production`&&i(Sn(Y.INVALID_NUMBER_ARGUMENT,{value:String(t[0])})),``;let[o,s,c,l]=or(...t),u=L(c.missingWarn)?c.missingWarn:e.missingWarn,d=L(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,f=!!c.part,p=nn(e,c);if(!I(o)||o===``){let e=new Intl.NumberFormat(p.replace(/!/g,``),l);return f?e.formatToParts(s):e.format(s)}let m=Jn(e,o,p,n,u,d,`number format`);if(!I(m))return r?-1:o;let h=n[m][o],g=Yn(m,o,l),_=a.get(g);return _||(_=new Intl.NumberFormat(m,k({},h,l)),a.set(g,_)),f?_.formatToParts(s):_.format(s)}var ar=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function or(...e){let[t]=e,n=A(),r=A();if(!w(t))throw J(q.INVALID_ARGUMENT);let i=t,a=Zn(e,n,r,ar);return[n.key||``,i,n,a]}function sr(e,t,n){Xn(e.__numberFormatters,t,n)}var cr=e=>e,lr=e=>``,ur=`text`,dr=e=>e.length===0?``:le(e),fr=ce;function pr(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function mr(e){let t=w(e.pluralIndex)?e.pluralIndex:-1;return w(e.named?.count)?e.named.count:w(e.named?.n)?e.named.n:t}function hr(e={}){let t=e.locale,n=mr(e),r=I(t)&&e.pluralRules&&F(N(e.pluralRules,t))?e.pluralRules[t]:pr,i=r===pr?void 0:pr,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||A(),l=w(e.pluralIndex),u=t=>{let n=ie(t)?N(c,t):c[t];return l&&!n&&(t===`count`||t===`n`)?e.pluralIndex:n};function d(t,n){return(F(e.messages)?e.messages(t,!!n):R(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):lr)}let f=t=>e.modifiers?N(e.modifiers,t):cr,p=F(e.processor?.normalize)?e.processor.normalize:dr,m=F(e.processor?.interpolate)?e.processor.interpolate:fr,h={list:s,named:u,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?R(n)?(a=n.modifier||a,i=n.type||i):I(n)&&(a=n||a):t.length===2&&(I(n)&&(a=n||a),I(r)&&(i=r||i));let o=d(e,!0)(h),s=o===``||o===void 0?e:o,c=i===`vnode`&&P(s)&&a?s[0]:s;if(!a)return c;let l=f(a);return F(l)?l(c,i):(process.env.NODE_ENV!==`production`&&fe(`Not found '${a}' modifier for the linked message of '${e}' key. Use a built-in modifier, or set a custom modifier with 'modifiers' option. So the linked message is used as is.`),c)},message:d,type:I(e.processor?.type)?e.processor.type:ur,interpolate:m,normalize:p,values:k(A(),o,c,l?{count:u(`count`),n:u(`n`)}:{})};return h}var gr=()=>``,_r=e=>F(e),vr=e=>I(e)||bt(e)||_r(e);function yr(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=wr(...t),u=L(l.missingWarn)?l.missingWarn:e.missingWarn,d=L(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=L(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=I(l.default)||L(l.default)?L(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(I(m)||F(m)),g=nn(e,l);f&&br(l);let[_,v,y]=p?[c,g,N(s,g)||A()]:xr(e,c,g,o,d,u),b=_,x=c;if(!p&&!vr(b)&&h&&(b=m,x=b),!p&&(!vr(b)||!I(v)))return i?-1:c;process.env.NODE_ENV!==`production`&&I(b)&&e.messageCompiler==null&&V(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function returns the message as is.`);let S=!1,ee=_r(b)?b:Sr(e,c,v,b,x,()=>{S=!0});if(S)return b;let C=Cr(e,ee,hr(Dr(e,v,y,l))),w=r?r(C,c):C;if(f&&I(w)&&(w=Me(w)),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:I(c)?c:_r(b)?b.key:``,locale:v||(_r(b)?b.locale:``),format:I(b)?b:_r(b)?b.source:``,message:w};t.meta=k({},e.__meta,Pn()||{}),$t(t)}return w}function br(e){if(P(e.list)&&(e.list=e.list.map(e=>I(e)?pe(e):e)),R(e.named)){let t=e.named,n=A();for(let e of Object.keys(t)){let r=t[e];n[e]=I(r)?pe(r):r}e.named=n}}function xr(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=A(),f,p=null,m=n,h=null,g=`translate`;for(let r=0;r<u.length;r++){f=h=u[r],process.env.NODE_ENV!==`production`&&n!==f&&!Kn(n,f)&&Vn(i,t)&&s(Sn(Y.FALLBACK_TO_TRANSLATE,{key:t,target:f}));let l=process.env.NODE_ENV===`production`?void 0:e.__v_emitter;process.env.NODE_ENV!==`production`&&n!==f&&l&&l.emit(`fallback`,{type:g,key:t,from:m,to:h,groupId:T(g,t)}),d=N(o,f)||A();let b=null,x,S;if(process.env.NODE_ENV!==`production`&&_&&l&&(b=window.performance.now(),x=`intlify-message-resolve-start`,S=`intlify-message-resolve-end`,v&&v(x)),(p=c(d,t))===null&&(p=N(d,t)),process.env.NODE_ENV!==`production`&&_&&l){let e=window.performance.now();l&&b&&p&&l.emit(`message-resolve`,{type:`message-resolve`,key:t,message:p,time:e-b,groupId:T(g,t)}),x&&S&&v&&y&&(v(S),y(`intlify message resolve`,x,S))}if(vr(p))break;if(!qn(f,u)){let n=Un(e,t,f,a,g);n!==t&&(p=n)}m=h}return[p,f,d]}function Sr(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(_r(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=process.env.NODE_ENV===`production`?void 0:e.__v_emitter,l=null,u,d;process.env.NODE_ENV!==`production`&&_&&c&&(l=window.performance.now(),u=`intlify-message-compilation-start`,d=`intlify-message-compilation-end`,v&&v(u));let f=o(r,Tr(e,n,i,r,s,a));if(process.env.NODE_ENV!==`production`&&_&&c){let e=window.performance.now();c&&l&&c.emit(`message-compilation`,{type:`message-compilation`,message:r,time:e-l,groupId:T(`translate`,t)}),u&&d&&v&&y&&(v(d),y(`intlify message compilation`,u,d))}return f.locale=n,f.key=t,f.source=r,f}function Cr(e,t,n){let r=process.env.NODE_ENV===`production`?void 0:e.__v_emitter,i=null,a,o;process.env.NODE_ENV!==`production`&&_&&r&&(i=window.performance.now(),a=`intlify-message-evaluation-start`,o=`intlify-message-evaluation-end`,v&&v(a));let s=t(n);if(process.env.NODE_ENV!==`production`&&_&&r){let e=window.performance.now();r&&i&&r.emit(`message-evaluation`,{type:`message-evaluation`,value:s,time:e-i,groupId:T(`translate`,t.key)}),a&&o&&v&&y&&(v(o),y(`intlify message evaluation`,a,o))}return s}function wr(...e){let[t,n,r]=e,i=A();if(!I(t)&&!w(t)&&!_r(t)&&!bt(t))throw J(q.INVALID_ARGUMENT);let a=w(t)?String(t):(_r(t),t);return w(n)?i.plural=n:I(n)?i.default=n:z(n)&&!O(n)?i.named=n:P(n)&&(i.list=n),w(r)?i.plural=r:I(r)?i.default=r:z(r)&&k(i,r),[a,i]}function Tr(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:t=>{if(a&&a(t),process.env.NODE_ENV!==`production`){let i=Er(r),a=t.location&&i&&ue(i,t.location.start.offset,t.location.end.offset),o=e.__v_emitter;o&&i&&o.emit(`compile-error`,{message:i,error:t.message,start:t.location&&t.location.start.offset,end:t.location&&t.location.end.offset,groupId:T(`translate`,n)});let s=`Message compilation error: ${t.message}`;throw SyntaxError(a?`${s}\n${a}`:s)}throw t},onCacheKey:e=>ee(t,n,e)}}function Er(e){if(I(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function Dr(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=xr(u||e,r,t,s,c,l);a=n??o(i,r)}if(I(a)||bt(a)){let n=!1,i=Sr(e,r,t,a,r,()=>{n=!0});return n?gr:i}return _r(a)?a:gr}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),w(r.plural)&&(d.pluralIndex=r.plural),d}yt();function Or(){return kr().__VUE_DEVTOOLS_GLOBAL_HOOK__}function kr(){return typeof navigator<`u`&&typeof window<`u`?window:typeof globalThis<`u`?globalThis:{}}var Ar=typeof Proxy==`function`,jr=`devtools-plugin:setup`,Mr=`plugin:settings:set`,Nr,Pr;function Fr(){return Nr===void 0&&(typeof window<`u`&&window.performance?(Nr=!0,Pr=window.performance):typeof globalThis<`u`&&globalThis.perf_hooks?.performance?(Nr=!0,Pr=globalThis.perf_hooks.performance):Nr=!1),Nr}function Ir(){return Fr()?Pr.now():Date.now()}var Lr=class{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;let n={};if(e.settings)for(let t in e.settings)n[t]=e.settings[t].defaultValue;let r=`__vue-devtools-plugin-settings__${e.id}`,i=Object.assign({},n);try{let e=localStorage.getItem(r),t=JSON.parse(e);Object.assign(i,t)}catch{}this.fallbacks={getSettings(){return i},setSettings(e){try{localStorage.setItem(r,JSON.stringify(e))}catch{}i=e},now(){return Ir()}},t&&t.on(Mr,(e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)}),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:t===`on`?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise(n=>{this.targetQueue.push({method:t,args:e,resolve:n})})})}async setRealTarget(e){this.target=e;for(let e of this.onQueue)this.target.on[e.method](...e.args);for(let e of this.targetQueue)e.resolve(await this.target[e.method](...e.args))}};function Rr(e,t){let n=e,r=kr(),i=Or(),a=Ar&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))i.emit(jr,e,t);else{let e=a?new Lr(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:e}),e&&t(e.proxiedTarget)}}var zr=`11.4.18`;function Br(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(j().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(j().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1)}var X={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Z(e,...t){return Re(e,null,process.env.NODE_ENV===`production`?void 0:{messages:Vr,args:t})}var Vr={[X.UNEXPECTED_RETURN_TYPE]:`Unexpected return type in composer`,[X.INVALID_ARGUMENT]:`Invalid argument`,[X.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[X.NOT_INSTALLED]:"Need to install with `app.use` function",[X.UNEXPECTED_ERROR]:`Unexpected error`,[X.REQUIRED_VALUE]:`Required in value: {0}`,[X.INVALID_VALUE]:`Invalid value`,[X.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:`Cannot setup vue-devtools plugin`,[X.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[X.NOT_COMPATIBLE_LEGACY_VUE_I18N]:`Not compatible legacy VueI18n.`,[X.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:`Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly`},Hr=S(`__translateVNode`),Ur=S(`__datetimeParts`),Wr=S(`__numberParts`),Gr=S(`__enableEmitter`),Kr=S(`__disableEmitter`),qr=S(`__setPluralRules`);S(`__intlifyMeta`);var Jr=S(`__injectWithOption`),Yr=S(`__dispose`),Q={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15,IGNORE_UNSAFE_LOCALE:16},Xr={[Q.FALLBACK_TO_ROOT]:`Fall back to {type} '{key}' with root locale.`,[Q.NOT_FOUND_PARENT_SCOPE]:`Not found parent scope. use the global scope.`,[Q.IGNORE_OBJ_FLATTEN]:`Ignore object flatten: '{key}' key has an string value`,[Q.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
5
+ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Q.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:`'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.`,[Q.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component.",[Q.IGNORE_UNSAFE_LOCALE]:`Ignore '{locale}' locale: it is a property name of Object.prototype`};function Zr(e,...t){return x(Xr[e],...t)}var Qr=null;{let e=j().__VUE_INSTANCE_SETTERS__;P(e)&&e.push(e=>{Qr=e})}function $r(e){return ie(e)?(process.env.NODE_ENV!==`production`&&V(Zr(Q.IGNORE_UNSAFE_LOCALE,{locale:e})),!0):!1}function ei(e){if(!R(e)||bt(e))return e;for(let t in e)if(M(e,t)){if(!t.includes(`.`))R(e[t])&&ei(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=A()),!R(i[n[e]])){process.env.NODE_ENV!==`production`&&V(Zr(Q.IGNORE_OBJ_FLATTEN,{key:n[e]})),a=!0;break}if(bt(i[n[e]])&&(Rt.includes(n[e+1])||n[e+1]===`cacheKey`)){a=!0;break}i=i[n[e]]}a||(i[n[r]]=e[t],delete e[t]);let o=i[n[r]];R(o)&&ei(o)}}return e}function ti(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=z(n)?n:P(r)?A():{[e]:A()};if(P(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;if(t){if($r(t))return;o[t]=N(o,t)||A(),Pe(n,o[t])}else Pe(n,o)}else I(e)&&Pe(JSON.parse(e),o)}),i==null&&a)for(let e in o)M(o,e)&&ei(o[e]);return o}function ni(e){return e.type}function ri(e,t,n){let r=R(t.messages)?t.messages:A();`__i18nGlobal`in n&&(r=ti(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),R(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(R(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function ii(t){return(0,e.createVNode)(e.Text,null,t,0)}function ai(){return Qr??(0,e.getCurrentInstance)()}var oi=()=>[],si=()=>!1,ci=0;function li(e){return((t,n,r,i)=>e(n,r,ai()||void 0,i))}function ui(t={}){let{__root:n,__injectWithOption:r}=t,i=n===void 0,a=t.flatJson,o=_?e.ref:e.shallowRef,s=!L(t.inheritLocale)||t.inheritLocale,c=o(n&&s?n.locale.value:I(t.locale)?t.locale:wn),l=o(n&&s?n.fallbackLocale.value:I(t.fallbackLocale)||P(t.fallbackLocale)||z(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:c.value),u=o(ti(c.value,t)),d=o(z(t.datetimeFormats)?t.datetimeFormats:{[c.value]:{}}),f=o(z(t.numberFormats)?t.numberFormats:{[c.value]:{}}),p=n?n.missingWarn:L(t.missingWarn)||D(t.missingWarn)?t.missingWarn:!0,m=n?n.fallbackWarn:L(t.fallbackWarn)||D(t.fallbackWarn)?t.fallbackWarn:!0,h=n?n.fallbackRoot:!L(t.fallbackRoot)||t.fallbackRoot,g=!!t.fallbackFormat,v=F(t.missing)?t.missing:null,y=F(t.missing)?li(t.missing):null,b=F(t.postTranslation)?t.postTranslation:null,x=n?n.warnHtmlMessage:!L(t.warnHtmlMessage)||t.warnHtmlMessage,S=!!t.escapeParameter,ee=n?n.modifiers:z(t.modifiers)?t.modifiers:{},C=t.pluralRules||n&&n.pluralRules,E;E=(()=>{i&&In(null);let e={version:zr,locale:c.value,fallbackLocale:l.value,messages:u.value,modifiers:ee,pluralRules:C,missing:y===null?void 0:y,missingWarn:p,fallbackWarn:m,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:x,escapeParameter:S,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:`vue`}};e.datetimeFormats=d.value,e.numberFormats=f.value;let n=zn(e);return i&&In(n),n})(),Gn(E,c.value,l.value);function O(){return[c.value,l.value,u.value,d.value,f.value]}let te=(0,e.computed)({get:()=>c.value,set:e=>{E.locale=e,c.value=e}});function A(e){i||(E.fallbackContext=Ln());try{return e()}finally{i||(E.fallbackContext=void 0)}}function ne(e){A(()=>Gn(E,c.value,e))}let j=(0,e.computed)({get:()=>l.value,set:e=>{l.value=e,E.fallbackLocale=l.value,ne(l.value)}}),re=(0,e.computed)(()=>u.value),M=(0,e.computed)(()=>d.value),ie=(0,e.computed)(()=>f.value);function ae(){return F(b)?b:null}function oe(e){b=e,E.postTranslation=e}function se(){return v}function ce(e){e!==null&&(y=li(e)),v=e,E.missing=y}function le(e,t){return e!==`translate`||!t.resolvedMessage}let B=(e,t,r,i,a,o)=>{O();let s;try{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__,s=A(()=>e(E))}finally{process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__}if(r!==`translate exists`&&w(s)&&s===-1||r===`translate exists`&&!s){let[e,o]=t();if(process.env.NODE_ENV!==`production`&&n&&I(e)&&le(r,o)&&(h&&(Vn(m,e)||Hn(p,e))&&V(Zr(Q.FALLBACK_TO_ROOT,{key:e,type:r})),process.env.NODE_ENV!==`production`)){let{__v_emitter:t}=E;t&&h&&t.emit(`fallback`,{type:r,key:e,to:`global`,groupId:T(r,e)})}return n&&h?i(n):a(e)}if(o(s))return s;throw Z(X.UNEXPECTED_RETURN_TYPE)};function ue(...e){return B(t=>Reflect.apply(yr,null,[t,...e]),()=>wr(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>I(e))}function de(...e){let[t,n,r]=e;if(r&&!R(r))throw Z(X.INVALID_ARGUMENT);return ue(t,n,k({resolvedMessage:!0},r||{}))}function fe(...e){return B(t=>Reflect.apply(er,null,[t,...e]),()=>nr(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>I(e)||P(e))}function pe(...e){return B(t=>Reflect.apply(ir,null,[t,...e]),()=>or(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>I(e)||P(e))}function me(e){return e.map(e=>I(e)||w(e)||L(e)?ii(String(e)):e)}let he={normalize:me,interpolate:e=>e,type:`vnode`};function ge(...e){return B(t=>{let n,r=t;try{r.processor=he,n=Reflect.apply(yr,null,[r,...e])}finally{r.processor=null}return n},()=>wr(...e),`translate`,t=>t[Hr](...e),e=>[ii(e)],e=>P(e))}function _e(...e){return B(t=>Reflect.apply(ir,null,[t,...e]),()=>or(...e),`number format`,t=>t[Wr](...e),oi,e=>I(e)||P(e))}function ve(...e){return B(t=>Reflect.apply(er,null,[t,...e]),()=>nr(...e),`datetime format`,t=>t[Ur](...e),oi,e=>I(e)||P(e))}function ye(e){C=e,E.pluralRules=C}function be(e,t){let n=we(e),r=E.messageResolver(n,t);return r===null?N(n,t):r}function xe(e,t){return B(()=>{if(!e)return!1;let n=I(t)?t:c.value,r=I(t)?[n]:E.localeFallbacker(E,l.value,n);for(let t=0;t<r.length;t++)if(vr(be(r[t],e)))return!0;return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),si,e=>L(e))}function Se(e){let t=null,n=E.localeFallbacker(E,l.value,c.value);for(let r=0;r<n.length;r++){let i=be(n[r],e);if(i!=null){t=i;break}}return t}function Ce(e){return Se(e)??(n&&n.tm(e)||{})}function we(e){return N(u.value,e)||{}}function Te(e,t){$r(e)||(a&&ei(t),u.value[e]=t,E.messages=u.value)}function Ee(e,t){$r(e)||(u.value[e]=N(u.value,e)||{},a&&ei(t),Pe(t,u.value[e]),E.messages=u.value)}function De(e){return N(d.value,e)||{}}function Oe(e,t){$r(e)||(d.value[e]=t,E.datetimeFormats=d.value,rr(E,e,t))}function ke(e,t){$r(e)||(d.value[e]=k(N(d.value,e)||{},t),E.datetimeFormats=d.value,rr(E,e,t))}function Ae(e){return N(f.value,e)||{}}function je(e,t){$r(e)||(f.value[e]=t,E.numberFormats=f.value,sr(E,e,t))}function Me(e,t){$r(e)||(f.value[e]=k(N(f.value,e)||{},t),E.numberFormats=f.value,sr(E,e,t))}ci++,(0,e.watch)(l,()=>ne(l.value),{deep:!0,flush:`sync`}),n&&_&&((0,e.watch)(n.locale,e=>{s&&(c.value=e,E.locale=e,Gn(E,c.value,l.value))}),(0,e.watch)(n.fallbackLocale,e=>{s&&(l.value=e,E.fallbackLocale=l.value,Gn(E,c.value,l.value))}));let H={id:ci,locale:te,fallbackLocale:j,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&n&&(te.value=n.locale.value,j.value=n.fallbackLocale.value)},get availableLocales(){return Object.keys(u.value).sort()},messages:re,get modifiers(){return ee},get pluralRules(){return C||{}},get isGlobal(){return i},get missingWarn(){return p},set missingWarn(e){p=e,E.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(e){m=e,E.fallbackWarn=m},get fallbackRoot(){return h},set fallbackRoot(e){h=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,E.fallbackFormat=g},get warnHtmlMessage(){return x},set warnHtmlMessage(e){x=e,E.warnHtmlMessage=e},get escapeParameter(){return S},set escapeParameter(e){S=e,E.escapeParameter=e},t:ue,getLocaleMessage:we,setLocaleMessage:Te,mergeLocaleMessage:Ee,getPostTranslationHandler:ae,setPostTranslationHandler:oe,getMissingHandler:se,setMissingHandler:ce,[qr]:ye};return H.datetimeFormats=M,H.numberFormats=ie,H.rt=de,H.te=xe,H.tm=Ce,H.d=fe,H.n=pe,H.getDateTimeFormat=De,H.setDateTimeFormat=Oe,H.mergeDateTimeFormat=ke,H.getNumberFormat=Ae,H.setNumberFormat=je,H.mergeNumberFormat=Me,H[Jr]=r,H[Hr]=ge,H[Ur]=ve,H[Wr]=_e,process.env.NODE_ENV!==`production`&&(H[Gr]=e=>{E.__v_emitter=e},H[Kr]=()=>{E.__v_emitter=void 0}),H}var di=`vue-i18n: composer properties`,fi={"vue-devtools-plugin-vue-i18n":`Vue I18n DevTools`,"vue-i18n-resource-inspector":`Vue I18n DevTools`,"vue-i18n-timeline":`Vue I18n`},pi={"vue-i18n-resource-inspector":`Search for scopes ...`},mi={"vue-i18n-timeline":16764185},hi;async function gi(e,t){return new Promise((n,r)=>{try{Rr({id:`vue-devtools-plugin-vue-i18n`,label:fi[`vue-devtools-plugin-vue-i18n`],packageName:`vue-i18n`,homepage:`https://vue-i18n.intlify.dev`,logo:`https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png`,componentStateTypes:[di],app:e},r=>{hi=r,r.on.visitComponentTree(({componentInstance:e,treeNode:n})=>{vi(e,n,t)}),r.on.inspectComponent(({componentInstance:e,instanceData:n})=>{e.__VUE_I18N__&&n&&(t.mode===`legacy`?e.__VUE_I18N__!==t.global.__composer&&yi(n,e.__VUE_I18N__):yi(n,e.__VUE_I18N__))}),r.addInspector({id:`vue-i18n-resource-inspector`,label:fi[`vue-i18n-resource-inspector`],icon:`language`,treeFilterPlaceholder:pi[`vue-i18n-resource-inspector`]}),r.on.getInspectorTree(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&Ti(n,t)});let i=new Map;r.on.getInspectorState(async n=>{if(n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`){if(r.unhighlightElement(),Oi(n,t),n.nodeId===`global`){if(!i.has(n.app)){let[e]=await r.getComponentInstances(n.app);i.set(n.app,e)}r.highlightElement(i.get(n.app))}else{let e=Ei(n.nodeId,t);e&&r.highlightElement(e)}}}),r.on.editInspectorState(n=>{n.app===e&&n.inspectorId===`vue-i18n-resource-inspector`&&ji(n,t)}),r.addTimelineLayer({id:`vue-i18n-timeline`,label:fi[`vue-i18n-timeline`],color:mi[`vue-i18n-timeline`]}),n(!0)})}catch(e){console.error(e),r(!1)}})}function _i(e){return e.type.name||e.type.displayName||e.type.__file||`Anonymous`}function vi(e,t,n){let r=n.mode===`composition`?n.global:n.global.__composer;if(e&&e.__VUE_I18N__&&e.__VUE_I18N__!==r){let n={label:`i18n (${_i(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(n)}}function yi(e,t){let n=di;e.state.push({type:n,key:`locale`,editable:!0,value:t.locale.value}),e.state.push({type:n,key:`availableLocales`,editable:!1,value:t.availableLocales}),e.state.push({type:n,key:`fallbackLocale`,editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:`inheritLocale`,editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:`messages`,editable:!1,value:bi(t.messages.value)}),e.state.push({type:n,key:`datetimeFormats`,editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:`numberFormats`,editable:!1,value:t.numberFormats.value})}function bi(e){let t={};return Object.keys(e).forEach(n=>{let r=e[n];F(r)&&`source`in r?t[n]=wi(r):bt(r)&&r.loc&&r.loc.source?t[n]=r.loc.source:R(r)?t[n]=bi(r):t[n]=r}),t}var xi={"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"&":`&amp;`};function Si(e){return e.replace(/[<>"&]/g,Ci)}function Ci(e){return xi[e]||e}function wi(e){return{_custom:{type:`function`,display:`<span>ƒ</span> ${e.source?`("${Si(e.source)}")`:`(?)`}`}}}function Ti(e,t){e.rootNodes.push({id:`global`,label:`Global Scope`});let n=t.mode===`composition`?t.global:t.global.__composer;for(let[r,i]of t.__instances){let a=t.mode===`composition`?i:i.__composer;n!==a&&e.rootNodes.push({id:a.id.toString(),label:`${_i(r)} Scope`})}}function Ei(e,t){let n=null;if(e!==`global`){for(let[r,i]of t.__instances.entries())if(i.id.toString()===e){n=r;break}}return n}function Di(e,t){if(e===`global`)return t.mode===`composition`?t.global:t.global.__composer;{let n=Array.from(t.__instances.values()).find(t=>t.id.toString()===e);return n?t.mode===`composition`?n:n.__composer:null}}function Oi(e,t){let n=Di(e.nodeId,t);return n&&(e.state=ki(n)),null}function ki(e){let t={},n=`Locale related info`;t[n]=[{type:n,key:`locale`,editable:!0,value:e.locale.value},{type:n,key:`fallbackLocale`,editable:!0,value:e.fallbackLocale.value},{type:n,key:`availableLocales`,editable:!1,value:e.availableLocales},{type:n,key:`inheritLocale`,editable:!0,value:e.inheritLocale}];let r=`Locale messages info`;t[r]=[{type:r,key:`messages`,editable:!1,value:bi(e.messages.value)}];{let n=`Datetime formats info`;t[n]=[{type:n,key:`datetimeFormats`,editable:!1,value:e.datetimeFormats.value}];let r=`Datetime formats info`;t[r]=[{type:r,key:`numberFormats`,editable:!1,value:e.numberFormats.value}]}return t}function Ai(e,t){if(hi){let n;t&&`groupId`in t&&(n=t.groupId,delete t.groupId),hi.addTimelineEvent({layerId:`vue-i18n-timeline`,event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e===`compile-error`?`error`:e===`fallback`||e===`missing`?`warning`:`default`}})}}function ji(e,t){let n=Di(e.nodeId,t);if(n){let[t]=e.path;t===`locale`&&I(e.state.value)?n.locale.value=e.state.value:t===`fallbackLocale`&&(I(e.state.value)||P(e.state.value)||R(e.state.value))?n.fallbackLocale.value=e.state.value:t===`inheritLocale`&&L(e.state.value)&&(n.inheritLocale=e.state.value)}}var Mi=new WeakMap;function Ni(e){if(!D(e))return!e;let t=Mi.get(e);return t||(t=RegExp(`^(?![\\s\\S]*(?:${e.source}))`,e.flags.replace(/[gy]/g,``)),Mi.set(e,t),Mi.set(t,e)),t}function Pi(e){let t=I(e.locale)?e.locale:wn,n=I(e.fallbackLocale)||P(e.fallbackLocale)||z(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=F(e.missing)?e.missing:void 0,i=L(e.silentTranslationWarn)||D(e.silentTranslationWarn)?Ni(e.silentTranslationWarn):!0,a=L(e.silentFallbackWarn)||D(e.silentFallbackWarn)?Ni(e.silentFallbackWarn):!0,o=!L(e.fallbackRoot)||e.fallbackRoot,s=!!e.formatFallbackMessages,c=z(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=F(e.postTranslation)?e.postTranslation:void 0,d=!I(e.warnHtmlInMessage)||e.warnHtmlInMessage!==`off`,f=!!e.escapeParameterHtml,p=!L(e.sync)||e.sync,m=e.messages;if(z(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>($r(n)||k(N(e,n)||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function Fi(e={}){let t=ui(Pi(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return Ni(t.missingWarn)},set silentTranslationWarn(e){t.missingWarn=Ni(e)},get silentFallbackWarn(){return Ni(t.fallbackWarn)},set silentFallbackWarn(e){t.fallbackWarn=Ni(e)},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,process.env.NODE_ENV!==`production`&&(r.__enableEmitter=e=>{let n=t;n[Gr]&&n[Gr](e)},r.__disableEmitter=()=>{let e=t;e[Kr]&&e[Kr]()}),r}function Ii(e,t,n){return{beforeCreate(){let r=ai();if(!r)throw Z(X.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=k({},i.i18n);if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=Li(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=Fi(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n){if(this===this.$root)this.$i18n=Li(e,i);else{this.$i18n=Fi({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else this.$i18n=e;i.__i18nGlobal&&ri(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!==`production`&&this.$i18n){let e=ai();if(!e)return;let t=this.$i18n;e.__VUE_I18N__=t.__composer;let n=this.__v_emitter=H();t.__enableEmitter&&t.__enableEmitter(n),n.on(`*`,Ai)}},unmounted(){let e=ai();if(!e)throw Z(X.UNEXPECTED_ERROR);let t=this.$i18n;process.env.NODE_ENV!==`production`&&e.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off(`*`,Ai),delete this.__v_emitter),t&&(t.__disableEmitter&&t.__disableEmitter(),delete e.__VUE_I18N__)),t&&(delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t?.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n)}}}function Li(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[qr](t.pluralizationRules||e.pluralizationRules);let n=ti(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var Ri={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function zi({slots:t},n){return n.length===1&&n[0]==="default"?(t.default?t.default():[]).reduce((t,n)=>[...t,...n.type===e.Fragment?n.children:[n]],[]):n.reduce((e,n)=>{let r=t[n];return r&&(e[n]=r()),e},A())}function Bi(){return e.Fragment}var Vi=(0,e.defineComponent)({name:`i18n-t`,props:k({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>w(e)||!isNaN(e)}},Ri),setup(t,n){let{slots:r,attrs:i}=n,a=t.i18n||Qi({useScope:t.scope,__useComponent:!0});return()=>{let o=()=>{let e=Object.keys(r).filter(e=>e[0]!==`_`),i=A();t.locale&&(i.locale=t.locale),t.plural!==void 0&&(i.plural=I(t.plural)?+t.plural:t.plural);let o=zi(n,e);return a[Hr](t.keypath,o,i)},s=k(A(),i),c=I(t.tag)||R(t.tag)?t.tag:Bi();return R(c)?(0,e.h)(c,s,{default:o}):(0,e.h)(c,s,o())}}});function Hi(e){return P(e)&&!I(e[0])}function Ui(t,n,r,i){let{slots:a,attrs:o}=n;return()=>{let n=()=>{let e={part:!0},n=A();t.locale&&(e.locale=t.locale),I(t.format)?e.key=t.format:R(t.format)&&(I(t.format.key)&&(e.key=t.format.key),n=Object.keys(t.format).reduce((e,n)=>r.includes(n)?k(A(),e,{[n]:t.format[n]}):e,A()));let o=i(t.value,e,n),s=[e.key];return P(o)?s=o.map((e,t)=>{let n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Hi(r)&&(r[0].key=`${e.type}-${t}`),r}):I(o)&&(s=[o]),s},s=k(A(),o),c=I(t.tag)||R(t.tag)?t.tag:Bi();return R(c)?(0,e.h)(c,s,{default:n}):(0,e.h)(c,s,n())}}var Wi=(0,e.defineComponent)({name:`i18n-n`,props:k({value:{type:Number,required:!0},format:{type:[String,Object]}},Ri),setup(e,t){let n=e.i18n||Qi({useScope:e.scope,__useComponent:!0});return Ui(e,t,ar,(...e)=>n[Wr](...e))}});function Gi(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Ki(t){let n=e=>{process.env.NODE_ENV!==`production`&&fe(Zr(Q.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));let{instance:n,value:r}=e;if(!n||!n.$)throw Z(X.UNEXPECTED_ERROR);let i=Gi(t,n.$),a=qi(r);return[Reflect.apply(i.t,i,[...Ji(a)]),i]};return{created:(t,r)=>{let[i,a]=n(r);_&&(t.__i18nWatcher=(0,e.watch)(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),t.__composer=a,t.textContent=i},unmounted:e=>{_&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=qi(t);e.textContent=Reflect.apply(n.t,n,[...Ji(r)])}},getSSRProps:e=>{let[t]=n(e);return{textContent:t}}}}function qi(e){if(I(e))return{path:e};if(z(e)){if(!(`path`in e))throw Z(X.REQUIRED_VALUE,`path`);return e}throw Z(X.INVALID_VALUE)}function Ji(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return I(n)&&(o.locale=n),w(i)&&(o.plural=i),w(a)&&(o.plural=a),[t,s,o]}function Yi(e,t,...n){let r=z(n[0])?n[0]:{};(!L(r.globalInstall)||r.globalInstall)&&([Vi.name,`I18nT`].forEach(t=>e.component(t,Vi)),[Wi.name,`I18nN`].forEach(t=>e.component(t,Wi)),[la.name,`I18nD`].forEach(t=>e.component(t,la))),e.directive(`t`,Ki(t))}var Xi=S(`global-vue-i18n`);function Zi(e={}){let t=__VUE_I18N_LEGACY_API__&&L(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__;process.env.NODE_ENV!==`production`&&t&&fe(Zr(Q.DEPRECATE_LEGACY_MODE));let n=!L(e.globalInjection)||e.globalInjection,r=new Map,[i,a]=$i(e,t),o=S(process.env.NODE_ENV===`production`?``:`vue-i18n`);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},install(e,...r){if(process.env.NODE_ENV!==`production`&&(e.__VUE_I18N__=u),e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),z(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=ca(e,u.global)),__VUE_I18N_FULL_INSTALL__&&Yi(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(Ii(a,a.__composer,u));let s=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),s()},process.env.NODE_ENV!==`production`&&gi(e,u).then(e=>{if(!e)throw Z(X.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);let n=H();if(t){let e=a;e.__enableEmitter&&e.__enableEmitter(n)}else{let e=a;e[Gr]&&e[Gr](n)}n.on(`*`,Ai)}).catch(()=>{process.env.NODE_ENV!==`production`&&V(Vr[X.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN])})},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function Qi(t={}){let n=ai();if(n==null)throw Z(X.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&n.appContext.app!=null&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw Z(X.NOT_INSTALLED);let r=ea(n),i=na(r),a=ni(n),o=ta(t,a);if(o===`global`)return ri(i,t,a),i;if(o===`parent`){let e=ra(r,n,t.__useComponent);return e??=(process.env.NODE_ENV!==`production`&&V(Zr(Q.NOT_FOUND_PARENT_SCOPE)),i),e}if(o===`isolated`){if(r.mode!==`composition`)throw Z(X.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let a=r,o=k({},t);o.__root=ra(r,n)||i;let s=ui(o);a.__composerExtend&&(s[Yr]=a.__composerExtend(s));let c=null;if(process.env.NODE_ENV!==`production`){c=H();let e=s;e[Gr]&&e[Gr](c),c.on(`*`,Ai)}return(0,e.getCurrentScope)()&&(0,e.onScopeDispose)(()=>{if(process.env.NODE_ENV!==`production`){c&&c.off(`*`,Ai);let e=s;e[Kr]&&e[Kr]()}let e=s[Yr];e&&(e(),delete s[Yr])}),s}let s=r,c=s.__getInstance(n);if(c==null){let e=k({},t);`__i18n`in a&&(e.__i18n=a.__i18n),i&&(e.__root=i),c=ui(e),s.__composerExtend&&(c[Yr]=s.__composerExtend(c)),aa(s,n,c),s.__setInstance(n,c)}else process.env.NODE_ENV!==`production`&&o===`local`&&V(Zr(Q.DUPLICATE_USE_I18N_CALLING));return c}function $i(t,n){let r=(0,e.effectScope)(),i=__VUE_I18N_LEGACY_API__&&n?r.run(()=>Fi(t)):r.run(()=>ui(t));if(i==null)throw Z(X.UNEXPECTED_ERROR);return[r,i]}function ea(t){let n=(0,e.inject)(t.isCE?Xi:t.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw Z(t.isCE?X.NOT_INSTALLED_WITH_PROVIDE:X.UNEXPECTED_ERROR);return n}function ta(e,t){return O(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function na(e){return e.mode===`composition`?e.global:e.global.__composer}function ra(e,t,n=!1){let r=null,i=t.root,a=ia(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[Jr]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function ia(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function aa(t,n,r){let i=null;(0,e.onMounted)(()=>{if(process.env.NODE_ENV!==`production`){n.__VUE_I18N__=r,i=H();let e=r;e[Gr]&&e[Gr](i),i.on(`*`,Ai)}},n),(0,e.onUnmounted)(()=>{let e=r;process.env.NODE_ENV!==`production`&&(i&&i.off(`*`,Ai),e[Kr]&&e[Kr](),delete n.__VUE_I18N__),t.__deleteInstance(n);let a=e[Yr];a&&(a(),delete e[Yr])},n)}var oa=[`locale`,`fallbackLocale`,`availableLocales`],sa=[`t`,`rt`,`d`,`n`,`tm`,`te`];function ca(t,n){let r=Object.create(null);return oa.forEach(t=>{let i=Object.getOwnPropertyDescriptor(n,t);if(!i)throw Z(X.UNEXPECTED_ERROR);let a=(0,e.isRef)(i.value)?{get(){return i.value.value},set(e){i.value.value=e}}:{get(){return i.get&&i.get()}};Object.defineProperty(r,t,a)}),t.config.globalProperties.$i18n=r,sa.forEach(e=>{let r=Object.getOwnPropertyDescriptor(n,e);if(!r||!r.value)throw Z(X.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${e}`,r)}),()=>{delete t.config.globalProperties.$i18n,sa.forEach(e=>{delete t.config.globalProperties[`$${e}`]})}}var la=(0,e.defineComponent)({name:`i18n-d`,props:k({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ri),setup(e,t){let n=e.i18n||Qi({useScope:e.scope,__useComponent:!0});return Ui(e,t,tr,(...e)=>n[Ur](...e))}});if(Br(),On(Yt),An(bn),Mn(sn),process.env.NODE_ENV!==`production`||__INTLIFY_PROD_DEVTOOLS__){let e=j();e.__INTLIFY__=!0,Zt(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;var ua={shared:{close:`关闭`,copy:`复制代码`,copied:`已复制`},promptInput:{placeholder:`给 AI Chat UI 发送消息...`,disclaimer:`AI Chat UI 可能会产生不准确的信息,请注意甄别内容的准确性`,send:`发送`,stop:`停止`,micStart:`语音输入`,micStop:`停止录音`,previewAttachment:`预览 {name}`,removeAttachment:`移除 {name}`,uploading:`上传中`,uploadFailed:`上传失败`},conversation:{emptyTitle:`有什么可以帮你的?`,emptyDescription:`选择一个话题开始,或直接输入你的问题`,scrollUnread:`{count} 条新消息`},message:{you:`你`,assistant:`AI Chat UI`,typingAria:`AI 正在输入`},toolCall:{parameters:`参数`,result:`结果`,error:`错误`,statusPending:`准备中`,statusCalling:`运行中`,statusAwaitingApproval:`等待确认`,statusCompleted:`已完成`,statusDenied:`已拒绝`,statusError:`失败`},citation:{source:`来源`,sources:`来源 {count} 条`,viewSource:`查看来源`,prevSource:`上一个来源`,nextSource:`下一个来源`,openLink:`打开链接`},attachments:{empty:`暂无附件`},comparison:{leftLabel:`回复 A`,rightLabel:`回复 B`,buttonLabel:`喜欢这个`},markdown:{rendering:`图表渲染中…`,renderFailed:`图表渲染失败:`},thinking:{title:`思考过程`,thoughtFor:`已思考 {duration} 秒`,thinking:`正在思考…`,stepCount:`{count} 个步骤`,stepPending:`等待中`,stepActive:`进行中`,stepComplete:`完成`,stepError:`失败`},welcome:{title:`有什么可以帮你的?`,description:`选择一个话题开始,或直接输入你的问题`},prompts:{title:`试试这样问`},feedback:{like:`点赞`,dislike:`点踩`,commentHint:`帮助我们改进`,commentPlaceholder:`告诉我们哪里可以做得更好…`,submit:`提交`,cancel:`取消`},confirmation:{title:`需要确认操作`,description:`AI 请求执行以下工具,请确认:`,approve:`允许`,reject:`拒绝`,denied:`已拒绝`,awaiting:`等待确认…`},branchPicker:{prev:`上一个版本`,next:`下一个版本`,label:`版本 {current}/{total}`},jsonDiff:{oldLabel:`修改前`,newLabel:`修改后`,identical:`内容相同`,changedOnly:`仅显示差异`},modelIcon:{unknown:`未知模型`},messageActions:{copy:`复制`,retry:`重新生成`,speak:`朗读`,stopSpeak:`停止朗读`,edit:`编辑`,saveEdit:`保存并重发`,cancelEdit:`取消`,editPlaceholder:`编辑消息内容…`},suggestion:{empty:`无匹配项`},provider:{title:`Provider 设置`,typeLabel:`服务类型`,typeOpenaiCompat:`OpenAI 兼容`,typeAnthropic:`Anthropic`,nameLabel:`展示名称`,namePlaceholder:`例如 My DeepSeek`,baseURLLabel:`Base URL`,baseURLPlaceholder:`https://api.example.com/v1`,baseURLPresetsLabel:`快捷预设:`,presetOpenai:`OpenAI`,presetDeepseek:`DeepSeek`,presetGlm:`GLM`,presetKimi:`Kimi`,apiKeyLabel:`API Key`,apiKeyPlaceholder:`sk-...`,modelLabel:`模型名`,modelPlaceholder:`如 deepseek-chat / claude-sonnet-4-5`,rememberLabel:`记住此配置(存入浏览器,服务重启后自动恢复)`,edit:`编辑`,submitEdit:`保存修改`,cancelEdit:`取消编辑`,submit:`注册`,remove:`删除`,listTitle:`已注册模型`,listEmpty:`暂无已注册模型`,errorRequired:`该项为必填项`},imageLightbox:{previewTitle:`图片预览`,prevImage:`上一张`,nextImage:`下一张`},codeBlock:{expand:`展开`,collapse:`收起`},genui:{invalidSchema:`界面数据格式无效`,unsupportedType:`未注册的界面组件:{type}`,adopt:`采纳`},speechErrors:{unsupported:`当前浏览器不支持语音识别`,noSpeech:`没有听到语音,请再试一次`,notAllowed:`麦克风权限被拒绝,请在浏览器设置中允许`}},da={shared:{close:`Close`,copy:`Copy code`,copied:`Copied`},promptInput:{placeholder:`Send a message to AI Chat UI...`,disclaimer:`AI Chat UI may produce inaccurate information. Please double-check.`,send:`Send`,stop:`Stop`,micStart:`Voice input`,micStop:`Stop recording`,previewAttachment:`Preview {name}`,removeAttachment:`Remove {name}`,uploading:`Uploading`,uploadFailed:`Upload failed`},conversation:{emptyTitle:`How can I help you?`,emptyDescription:`Pick a topic to get started, or type your question`,scrollUnread:`{count} new messages`},message:{you:`You`,assistant:`AI Chat UI`,typingAria:`AI is typing`},toolCall:{parameters:`Parameters`,result:`Result`,error:`Error`,statusPending:`Pending`,statusCalling:`Running`,statusAwaitingApproval:`Awaiting approval`,statusCompleted:`Completed`,statusDenied:`Denied`,statusError:`Failed`},citation:{source:`Source`,sources:`{count} sources`,viewSource:`View source`,prevSource:`Previous source`,nextSource:`Next source`,openLink:`Open link`},attachments:{empty:`No attachments`},comparison:{leftLabel:`Response A`,rightLabel:`Response B`,buttonLabel:`Like this`},markdown:{rendering:`Rendering diagram…`,renderFailed:`Failed to render diagram: `},thinking:{title:`Thinking Process`,thoughtFor:`Thought for {duration}s`,thinking:`Thinking…`,stepCount:`{count} steps`,stepPending:`Pending`,stepActive:`In progress`,stepComplete:`Done`,stepError:`Failed`},welcome:{title:`How can I help you?`,description:`Pick a topic to get started, or type your question`},prompts:{title:`Try asking`},feedback:{like:`Like`,dislike:`Dislike`,commentHint:`Help us improve`,commentPlaceholder:`Tell us what could be better…`,submit:`Submit`,cancel:`Cancel`},confirmation:{title:`Confirmation required`,description:`The AI requests to run the following tool. Please confirm:`,approve:`Allow`,reject:`Deny`,denied:`Denied`,awaiting:`Awaiting confirmation…`},branchPicker:{prev:`Previous version`,next:`Next version`,label:`Version {current}/{total}`},jsonDiff:{oldLabel:`Before`,newLabel:`After`,identical:`Identical content`,changedOnly:`Changed only`},modelIcon:{unknown:`Unknown model`},messageActions:{copy:`Copy`,retry:`Regenerate`,speak:`Read aloud`,stopSpeak:`Stop reading`,edit:`Edit`,saveEdit:`Save & resend`,cancelEdit:`Cancel`,editPlaceholder:`Edit message…`},suggestion:{empty:`No matches`},provider:{title:`Provider Settings`,typeLabel:`Service type`,typeOpenaiCompat:`OpenAI compatible`,typeAnthropic:`Anthropic`,nameLabel:`Display name`,namePlaceholder:`e.g. My DeepSeek`,baseURLLabel:`Base URL`,baseURLPlaceholder:`https://api.example.com/v1`,baseURLPresetsLabel:`Quick presets: `,presetOpenai:`OpenAI`,presetDeepseek:`DeepSeek`,presetGlm:`GLM`,presetKimi:`Kimi`,apiKeyLabel:`API Key`,apiKeyPlaceholder:`sk-...`,modelLabel:`Model`,modelPlaceholder:`e.g. deepseek-chat / claude-sonnet-4-5`,rememberLabel:`Remember this provider (stored in browser, auto-restored after server restart)`,edit:`Edit`,submitEdit:`Save changes`,cancelEdit:`Cancel edit`,submit:`Register`,remove:`Delete`,listTitle:`Registered models`,listEmpty:`No registered models yet`,errorRequired:`This field is required`},imageLightbox:{previewTitle:`Image preview`,prevImage:`Previous image`,nextImage:`Next image`},codeBlock:{expand:`Expand`,collapse:`Collapse`},genui:{invalidSchema:`Invalid UI data format`,unsupportedType:`Unregistered UI component: {type}`,adopt:`Adopt`},speechErrors:{unsupported:`Speech recognition is not supported in this browser`,noSpeech:`No speech detected. Please try again`,notAllowed:`Microphone permission denied. Allow it in browser settings`}},fa=`ai-chat-locale`,pa=[`zh-CN`,`en-US`],$=Zi({legacy:!1,locale:`zh-CN`,fallbackLocale:`zh-CN`,messages:{"zh-CN":ua,"en-US":da}}),ma=$.global;function ha(){if(typeof window>`u`)return`zh-CN`;let e=localStorage.getItem(fa);return e&&pa.includes(e)?e:navigator.language.startsWith(`en`)?`en-US`:`zh-CN`}function ga(e,t={}){let{persist:n=!0}=t;ma.locale.value=e,typeof document<`u`&&(document.documentElement.lang=e),n&&typeof window<`u`&&localStorage.setItem(fa,e)}ga(ha(),{persist:!1});var _a=[`role`,`aria-live`],va={class:`ai-chat-toast__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},ya={key:0,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z`},ba={key:1,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z`},xa={key:2,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z`},Sa={key:3,"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.008v.008H12v-.008z`},Ca={class:`ai-chat-toast__message`},wa=[`aria-label`],Ta=(0,e.defineComponent)({__name:`Toast`,props:{message:{},type:{default:`info`},duration:{default:3e3},placement:{default:`top`}},emits:[`close`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o;function s(){o!==void 0&&(clearTimeout(o),o=void 0)}function c(){s(),i.duration>0&&(o=setTimeout(()=>{o=void 0,a(`close`)},i.duration))}function l(){s(),a(`close`)}return(0,e.onMounted)(c),(0,e.watch)(()=>i.duration,c),(0,e.onBeforeUnmount)(s),(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-toast`,[`ai-chat-toast--${t.type}`,`ai-chat-toast--${t.placement}`]]),role:t.type===`error`?`alert`:`status`,"aria-live":t.type===`error`?void 0:`polite`},[((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,va,[t.type===`info`?((0,e.openBlock)(),(0,e.createElementBlock)(`path`,ya)):t.type===`success`?((0,e.openBlock)(),(0,e.createElementBlock)(`path`,ba)):t.type===`error`?((0,e.openBlock)(),(0,e.createElementBlock)(`path`,xa)):((0,e.openBlock)(),(0,e.createElementBlock)(`path`,Sa))])),(0,e.createElementVNode)(`span`,Ca,(0,e.toDisplayString)(t.message),1),(0,e.createElementVNode)(`button`,{class:`ai-chat-toast__close`,type:`button`,"aria-label":(0,e.unref)(r)(`shared.close`),onClick:l},[...i[0]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,wa)],10,_a))}}),Ea={class:`ai-chat-lang-toggle`},Da=[`aria-expanded`],Oa={class:`ai-chat-lang-toggle__label`},ka=[`aria-selected`,`onClick`],Aa={class:`ai-chat-lang-toggle__option-label`},ja={key:0,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Ma=(0,e.defineComponent)({__name:`LanguageToggle`,props:{locales:{default:()=>[{value:`zh-CN`,label:`简体中文`},{value:`en-US`,label:`English`}]},modelValue:{default:void 0}},emits:[`update:modelValue`,`change`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.ref)(!1),o=(0,e.ref)(null),s=(0,e.ref)(null),c=(0,e.ref)({}),l=(0,e.computed)(()=>r.modelValue??$.global.locale.value),u=(0,e.computed)(()=>r.locales.find(e=>e.value===l.value)?.label??l.value);function d(){let e=o.value;if(!e)return;let t=e.getBoundingClientRect(),n=8+r.locales.length*34,i=t.bottom+n>window.innerHeight&&t.top>n;c.value={top:`${i?t.top-n-6:t.bottom+6}px`,left:`${t.left}px`}}function f(){a.value?a.value=!1:(d(),a.value=!0)}function p(e){e!==l.value&&(r.modelValue===void 0&&ga(e),i(`update:modelValue`,e),i(`change`,e)),a.value=!1}function m(e){if(!a.value)return;let t=e.target;o.value?.contains(t)||s.value?.contains(t)||(a.value=!1)}function h(e){e.key===`Escape`&&(a.value=!1)}return(0,e.onMounted)(()=>{document.addEventListener(`click`,m),document.addEventListener(`keydown`,h)}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`click`,m),document.removeEventListener(`keydown`,h)}),(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ea,[(0,e.createElementVNode)(`button`,{ref_key:`triggerRef`,ref:o,type:`button`,class:`ai-chat-lang-toggle__trigger`,"aria-expanded":a.value,"aria-haspopup":`listbox`,onClick:f},[r[1]||=(0,e.createElementVNode)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,e.createElementVNode)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,e.createElementVNode)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})],-1),(0,e.createElementVNode)(`span`,Oa,(0,e.toDisplayString)(u.value),1),((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{class:(0,e.normalizeClass)([`ai-chat-lang-toggle__caret`,{"is-open":a.value}]),width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[...r[0]||=[(0,e.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2))],8,Da),((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[a.value?((0,e.openBlock)(),(0,e.createElementBlock)(`ul`,{key:0,ref_key:`popupRef`,ref:s,class:`ai-chat-lang-toggle__menu`,role:`listbox`,style:(0,e.normalizeStyle)(c.value)},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.locales,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`li`,{key:t.value,role:`option`,class:(0,e.normalizeClass)([`ai-chat-lang-toggle__option`,{"is-selected":t.value===l.value}]),"aria-selected":t.value===l.value,onClick:e=>p(t.value)},[(0,e.createElementVNode)(`span`,Aa,(0,e.toDisplayString)(t.label),1),t.value===l.value?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,ja,[...r[2]||=[(0,e.createElementVNode)(`polyline`,{points:`20 6 9 17 4 12`},null,-1)]])):(0,e.createCommentVNode)(``,!0)],10,ka))),128))],4)):(0,e.createCommentVNode)(``,!0)]))]))}}),Na=[`aria-label`],Pa=[`width`,`height`,`aria-label`],Fa=[`d`,`fill`],Ia=[`aria-label`],La=(0,e.defineComponent)({__name:`ModelIcon`,props:{model:{},vendor:{default:void 0},size:{default:18}},setup(n){let{t:r}=$.global,i=n,a=(0,e.useSlots)(),o={anthropic:{color:`#D97706`,paths:[`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`]},openai:{color:`#000000`,paths:[`M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z`]},google:{color:`#4285F4`,paths:[`M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z`]},zhipu:{color:`#3859FF`,paths:[`M11.991 23.503a.24.24 0 00-.244.248.24.24 0 00.244.249.24.24 0 00.245-.249.24.24 0 00-.22-.247l-.025-.001zM9.671 5.365a1.697 1.697 0 011.099 2.132l-.071.172-.016.04-.018.054c-.07.16-.104.32-.104.498-.035.71.47 1.279 1.186 1.314h.366c1.309.053 2.338 1.173 2.286 2.523-.052 1.332-1.152 2.38-2.478 2.327h-.174c-.715.018-1.274.64-1.239 1.368 0 .124.018.23.053.337.209.373.54.658.96.8.75.23 1.517-.125 1.9-.782l.018-.035c.402-.64 1.17-.96 1.92-.711.854.284 1.378 1.226 1.099 2.167a1.661 1.661 0 01-2.077 1.102 1.711 1.711 0 01-.907-.711l-.017-.035c-.2-.323-.463-.58-.851-.711l-.056-.018a1.646 1.646 0 00-1.954.746 1.66 1.66 0 01-1.065.764 1.677 1.677 0 01-1.989-1.279c-.209-.906.332-1.83 1.257-2.043a1.51 1.51 0 01.296-.035h.018c.68-.071 1.151-.622 1.116-1.333a1.307 1.307 0 00-.227-.693 2.515 2.515 0 01-.366-1.403 2.39 2.39 0 01.366-1.208c.14-.195.21-.444.227-.693.018-.71-.506-1.261-1.186-1.332l-.07-.018a1.43 1.43 0 01-.299-.07l-.05-.019a1.7 1.7 0 01-1.047-2.114 1.68 1.68 0 012.094-1.101zm-5.575 10.11c.26-.264.639-.367.994-.27.355.096.633.379.728.74.095.362-.007.748-.267 1.013-.402.41-1.053.41-1.455 0a1.062 1.062 0 010-1.482zm14.845-.294c.359-.09.738.024.992.297.254.274.344.665.237 1.025-.107.36-.396.634-.756.718-.551.128-1.1-.22-1.23-.781a1.05 1.05 0 01.757-1.26zm-.064-4.39c.314.32.49.753.49 1.206 0 .452-.176.886-.49 1.206-.315.32-.74.5-1.185.5-.444 0-.87-.18-1.184-.5a1.727 1.727 0 010-2.412 1.654 1.654 0 012.369 0zm-11.243.163c.364.484.447 1.128.218 1.691a1.665 1.665 0 01-2.188.923c-.855-.36-1.26-1.358-.907-2.228a1.68 1.68 0 011.33-1.038c.593-.08 1.183.169 1.547.652zm11.545-4.221c.368 0 .708.2.892.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.892.524c-.568 0-1.03-.47-1.03-1.048 0-.579.462-1.048 1.03-1.048zm-14.358 0c.368 0 .707.2.891.524.184.324.184.724 0 1.048a1.026 1.026 0 01-.891.524c-.569 0-1.03-.47-1.03-1.048 0-.579.461-1.048 1.03-1.048zm10.031-1.475c.925 0 1.675.764 1.675 1.706s-.75 1.705-1.675 1.705-1.674-.763-1.674-1.705c0-.942.75-1.706 1.674-1.706zm-2.626-.684c.362-.082.653-.356.761-.718a1.062 1.062 0 00-.238-1.028 1.017 1.017 0 00-.996-.294c-.547.14-.881.7-.752 1.257.13.558.675.907 1.225.783zm0 16.876c.359-.087.644-.36.75-.72a1.062 1.062 0 00-.237-1.019 1.018 1.018 0 00-.985-.301 1.037 1.037 0 00-.762.717c-.108.361-.017.754.239 1.028.245.263.606.377.953.305l.043-.01zM17.19 3.5a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64a.631.631 0 00-.628.64c0 .355.28.64.628.64zm-10.38 0a.631.631 0 00.628-.64c0-.355-.279-.64-.628-.64a.631.631 0 00-.628.64c0 .355.279.64.628.64zm-5.182 7.852a.631.631 0 00-.628.64c0 .354.28.639.628.639a.63.63 0 00.627-.606l.001-.034a.62.62 0 00-.628-.64zm5.182 9.13a.631.631 0 00-.628.64c0 .355.279.64.628.64a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm10.38.018a.631.631 0 00-.628.64c0 .355.279.64.628.64a.631.631 0 00.628-.64c0-.355-.28-.64-.628-.64zm5.182-9.148a.631.631 0 00-.628.64c0 .354.279.639.628.639a.63.63 0 00.628-.64c0-.355-.28-.64-.628-.64zm-.384-4.992a.24.24 0 00.244-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249c0 .142.122.249.244.249zM11.991.497a.24.24 0 00.245-.248A.24.24 0 0011.99 0a.24.24 0 00-.244.249c0 .133.108.236.223.247l.021.001zM2.011 6.36a.24.24 0 00.245-.249.24.24 0 00-.244-.249.24.24 0 00-.244.249.24.24 0 00.244.249zm0 11.263a.24.24 0 00-.243.248.24.24 0 00.244.249.24.24 0 00.244-.249.252.252 0 00-.244-.248zm19.995-.018a.24.24 0 00-.245.248.24.24 0 00.245.25.24.24 0 00.244-.25.252.252 0 00-.244-.248z`]},qwen:{color:`#615EFF`,paths:[`M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z`]},deepseek:{color:`#4D6BFE`,paths:[`M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z`]},mistral:{color:`#F7D046`,paths:[`M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z`]},meta:{color:`#0668E1`,paths:[`M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z`]},cohere:{color:`#39594D`,paths:[`M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z`,`M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z`,`M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z`]},yi:{color:`#003425`,paths:[`M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5`]},xai:{color:`#000000`,paths:[`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`]},moonshot:{color:`#16191E`,paths:[`M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z`]},doubao:{color:`#1C64F2`,paths:[`M5.31 15.756c.172-3.75 1.883-5.999 2.549-6.739-3.26 2.058-5.425 5.658-6.358 8.308v1.12C1.501 21.513 4.226 24 7.59 24a6.59 6.59 0 002.2-.375c.353-.12.7-.248 1.039-.378.913-.899 1.65-1.91 2.243-2.992-4.877 2.431-7.974.072-7.763-4.5l.002.001z`,`M22.57 10.283c-1.212-.901-4.109-2.404-7.397-2.8.295 3.792.093 8.766-2.1 12.773a12.782 12.782 0 01-2.244 2.992c3.764-1.448 6.746-3.457 8.596-5.219 2.82-2.683 3.353-5.178 3.361-6.66a2.737 2.737 0 00-.216-1.084v-.002zM14.303 1.867C12.955.7 11.248 0 9.39 0 7.532 0 5.883.677 4.545 1.807 2.791 3.29 1.627 5.557 1.5 8.125v9.201c.932-2.65 3.097-6.25 6.357-8.307.5-.318 1.025-.595 1.569-.829 1.883-.801 3.878-.932 5.746-.706-.222-2.83-.718-5.002-.87-5.617h.001z`,`M17.305 4.961a199.47 199.47 0 01-1.08-1.094c-.202-.213-.398-.419-.586-.622l-1.333-1.378c.151.615.648 2.786.869 5.617 3.288.395 6.185 1.898 7.396 2.8-1.306-1.275-3.475-3.487-5.266-5.323z`]},minimax:{color:`#F23F5D`,paths:[`M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z`]},wenxin:{color:`#167ADF`,paths:[`M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z`]}},s=(0,e.computed)(()=>i.vendor?{vendor:i.vendor,label:t.VENDOR_LABELS[i.vendor]}:(0,t.detectModelVendor)(i.model)),c=(0,e.computed)(()=>{let{vendor:e}=s.value;return e===`unknown`?null:o[e]}),l=(0,e.computed)(()=>s.value.label||r(`modelIcon.unknown`)),u=(0,e.computed)(()=>{let e=i.model.trim().charAt(0);return e?e.toUpperCase():`?`}),d=(0,e.computed)(()=>({width:`${i.size}px`,height:`${i.size}px`})),f=(0,e.computed)(()=>!!a.default);return(t,r)=>f.value?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:0,class:`ai-chat-model-icon ai-chat-model-icon--custom`,role:`img`,"aria-label":l.value,style:(0,e.normalizeStyle)(d.value)},[(0,e.renderSlot)(t.$slots,`default`)],12,Na)):c.value?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{key:1,class:`ai-chat-model-icon`,width:n.size,height:n.size,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,role:`img`,"aria-label":l.value,"fill-rule":`evenodd`},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value.paths,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`path`,{key:n,d:t,fill:c.value.color},null,8,Fa))),128))],8,Pa)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:2,class:`ai-chat-model-icon ai-chat-model-icon--fallback`,role:`img`,"aria-label":l.value,style:(0,e.normalizeStyle)({...d.value,fontSize:`${Math.round(n.size/2)}px`})},(0,e.toDisplayString)(u.value),13,Ia))}}),Ra={class:`ai-chat-jsondiff`},za={class:`ai-chat-jsondiff__header`},Ba={class:`ai-chat-jsondiff__label`},Va={class:`ai-chat-jsondiff__label`},Ha={key:0,class:`ai-chat-jsondiff__empty`},Ua={key:1,class:`ai-chat-jsondiff__body`},Wa={class:`ai-chat-jsondiff__value`},Ga={key:0,class:`ai-chat-jsondiff__key`},Ka={class:`ai-chat-jsondiff__char--old`},qa={class:`ai-chat-jsondiff__value`},Ja={key:0,class:`ai-chat-jsondiff__key`},Ya={class:`ai-chat-jsondiff__char--new`},Xa=`[Circular]`,Za=32,Qa=(0,e.defineComponent)({__name:`JsonDiffView`,props:{oldValue:{},newValue:{},oldLabel:{default:void 0},newLabel:{default:void 0},onlyChanged:{type:Boolean,default:!1}},setup(t){let{t:n}=$.global,r=t;function i(e){if(e===void 0)return`undefined`;try{return JSON.stringify(e)??`null`}catch{return String(e)}}function a(e,t,n,r,o){if(typeof e==`object`&&e&&!Array.isArray(e)){if(r.has(e)){n.set(t,Xa);return}if(o>=Za){n.set(t,i(e));return}r.add(e);let s=e,c=Object.keys(s);if(c.length===0)n.set(t,`{}`);else for(let e of c)a(s[e],t?`${t}.${e}`:e,n,r,o+1);r.delete(e)}else n.set(t,i(e))}function o(e,t){let n=0,r=Math.min(e.length,t.length);for(;n<r&&e[n]===t[n];)n++;let i=e.length,a=t.length;for(;i>n&&a>n&&e[i-1]===t[a-1];)i--,a--;return{prefix:e.slice(0,n),midOld:e.slice(n,i),midNew:t.slice(n,a),suffix:e.slice(i)}}let s=(0,e.computed)(()=>{let e=new Map,t=new Map;a(r.oldValue,``,e,new WeakSet,0),a(r.newValue,``,t,new WeakSet,0);let n=[...e.keys()];for(let r of t.keys())e.has(r)||n.push(r);return n.map(n=>{let r=e.has(n),i=t.has(n),a=e.get(n)??``,s=t.get(n)??``,c;return c=r&&i?a===s?`same`:`modified`:r?`removed`:`added`,{key:n,status:c,oldStr:r?a:``,newStr:i?s:``,hl:c===`modified`?o(a,s):null}})}),c=(0,e.computed)(()=>r.onlyChanged?s.value.filter(e=>e.status!==`same`):s.value),l=(0,e.computed)(()=>r.oldLabel??n(`jsonDiff.oldLabel`)),u=(0,e.computed)(()=>r.newLabel??n(`jsonDiff.newLabel`));function d(e,t){return e===`same`?[]:e===`removed`?t===`old`?[`is-del`]:[`is-void`]:e===`added`?t===`new`?[`is-add`]:[`is-void`]:t===`old`?[`is-del`]:[`is-add`]}function f(e,t){return e===`removed`?t===`old`?`−`:``:e===`added`?t===`new`?`+`:``:e===`modified`?t===`old`?`−`:`+`:``}return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ra,[(0,e.createElementVNode)(`div`,za,[(0,e.createElementVNode)(`div`,Ba,(0,e.toDisplayString)(l.value),1),(0,e.createElementVNode)(`div`,Va,(0,e.toDisplayString)(u.value),1)]),c.value.length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ha,(0,e.toDisplayString)((0,e.unref)(n)(`jsonDiff.identical`)),1)):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ua,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:t.key},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-jsondiff__cell`,d(t.status,`old`)])},[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`ai-chat-jsondiff__sign`,{"is-del":f(t.status,`old`)===`−`}])},(0,e.toDisplayString)(f(t.status,`old`)),3),(0,e.createElementVNode)(`span`,Wa,[t.key?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Ga,(0,e.toDisplayString)(t.key)+`:`,1)):(0,e.createCommentVNode)(``,!0),t.status===`modified`&&t.hl?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.hl.prefix),1),(0,e.createElementVNode)(`span`,Ka,(0,e.toDisplayString)(t.hl.midOld),1),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.hl.suffix),1)],64)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:2,class:(0,e.normalizeClass)([`ai-chat-jsondiff__scalar`,{"is-del-text":t.status===`removed`}])},(0,e.toDisplayString)(t.oldStr),3))])],2),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-jsondiff__cell`,d(t.status,`new`)])},[(0,e.createElementVNode)(`span`,{class:(0,e.normalizeClass)([`ai-chat-jsondiff__sign`,{"is-add":f(t.status,`new`)===`+`}])},(0,e.toDisplayString)(f(t.status,`new`)),3),(0,e.createElementVNode)(`span`,qa,[t.key?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Ja,(0,e.toDisplayString)(t.key)+`:`,1)):(0,e.createCommentVNode)(``,!0),t.status===`modified`&&t.hl?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.hl.prefix),1),(0,e.createElementVNode)(`span`,Ya,(0,e.toDisplayString)(t.hl.midNew),1),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)(t.hl.suffix),1)],64)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:2,class:(0,e.normalizeClass)([`ai-chat-jsondiff__scalar`,{"is-add-text":t.status===`added`}])},(0,e.toDisplayString)(t.newStr),3))])],2)],64))),128))]))]))}});function $a(t=50){let n=(0,e.ref)(!0),r=(0,e.ref)(0),i=null,a=null,o=null,s=0,c=!1;function l(){if(!i)return;let{scrollTop:e,scrollHeight:a,clientHeight:o}=i;n.value=a-e-o<t,n.value&&(r.value=0)}function u(){r.value=0,i&&requestAnimationFrame(()=>{i.scrollTop=i.scrollHeight})}function d(){if(!i)return;let e=i.scrollHeight,t=e>s;s=e,n.value?u():t&&r.value++}function f(){c||(c=!0,requestAnimationFrame(()=>{c=!1,d()}))}function p(e){a&&=(a.disconnect(),null),o&&=(o.disconnect(),null),i=e,i&&(r.value=0,s=i.scrollHeight,i.addEventListener(`scroll`,l,{passive:!0}),a=new ResizeObserver(f),a.observe(i),o=new MutationObserver(f),o.observe(i,{childList:!0,subtree:!0,characterData:!0}))}return{isAtBottom:n,unreadCount:r,scrollToBottom:u,bindContainer:p}}var eo={default:{name:`默认靛蓝`,vars:{"--ai-chat-color-accent-500":`#6366f1`,"--ai-chat-color-accent-600":`#4f46e5`,"--ai-chat-color-accent-400":`#818cf8`}},purple:{name:`优雅紫`,vars:{"--ai-chat-color-accent-500":`#8b5cf6`,"--ai-chat-color-accent-600":`#7c3aed`,"--ai-chat-color-accent-400":`#a78bfa`}},green:{name:`自然绿`,vars:{"--ai-chat-color-accent-500":`#059669`,"--ai-chat-color-accent-600":`#047857`,"--ai-chat-color-accent-400":`#10b981`}},warm:{name:`暖橙`,vars:{"--ai-chat-color-accent-500":`#ea580c`,"--ai-chat-color-accent-600":`#c2410c`,"--ai-chat-color-accent-400":`#f97316`}}};function to(t,n,r){function i(){let e=t.value;if(!e)return;let i=new Set;n.value&&Object.keys(eo[n.value].vars).forEach(e=>i.add(e)),r.value&&Object.keys(r.value).forEach(e=>i.add(e)),i.forEach(t=>e.style.removeProperty(t));let a=eo[n.value||`default`];if(a)for(let[t,n]of Object.entries(a.vars))e.style.setProperty(t,n);if(r.value)for(let[t,n]of Object.entries(r.value))e.style.setProperty(t,n)}(0,e.onMounted)(i),(0,e.watch)([n,r],i,{deep:!0})}var no=Symbol(`messageLayout`);function ro(){return(0,e.inject)(no,void 0)}var io=[`data-theme`],ao=(0,e.defineComponent)({__name:`Conversation`,props:{autoScroll:{type:Boolean,default:!0},theme:{},customTheme:{},darkMode:{type:[Boolean,String],default:void 0},layout:{default:`stacked`},messageAlign:{default:`left`}},setup(t){let n=t,r=(0,e.ref)(),i=$a();(0,e.provide)(`scrollAnchor`,i),(0,e.provide)(`autoScroll`,n.autoScroll),(0,e.provide)(no,(0,e.computed)(()=>({layout:n.layout,messageAlign:n.messageAlign}))),to((0,e.computed)(()=>r.value),(0,e.computed)(()=>n.theme),(0,e.computed)(()=>n.customTheme));let a=(0,e.computed)(()=>{if(n.darkMode!==void 0&&n.darkMode!==`auto`)return n.darkMode?`dark`:`light`});return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`rootRef`,ref:r,class:`ai-chat-conversation`,"data-theme":a.value},[(0,e.renderSlot)(t.$slots,`default`)],8,io))}}),oo={class:`ai-chat-conversation-messages`},so=(0,e.defineComponent)({__name:`ConversationContent`,setup(t){let n=(0,e.inject)(`scrollAnchor`),r=(0,e.inject)(`autoScroll`,!0),i=(0,e.ref)(null),a=null;return(0,e.onMounted)(()=>{i.value&&n&&(n.bindContainer(i.value),a=new MutationObserver(()=>{r&&n.isAtBottom.value&&n.scrollToBottom()}),a.observe(i.value,{childList:!0,subtree:!0}))}),(0,e.onBeforeUnmount)(()=>{a?.disconnect()}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`scrollEl`,ref:i,class:`ai-chat-conversation-content ai-chat-scrollbar`},[(0,e.createElementVNode)(`div`,oo,[(0,e.renderSlot)(t.$slots,`default`)])],512))}}),co={class:`ai-chat-conversation-empty`},lo={class:`ai-chat-conversation-empty__logo`},uo={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},fo={class:`ai-chat-conversation-empty__title`},po={class:`ai-chat-conversation-empty__desc`},mo={class:`ai-chat-conversation-empty__suggestions`},ho=(0,e.defineComponent)({__name:`ConversationEmpty`,props:{icon:{default:void 0},title:{},description:{}},setup(t){let n=t,{t:r}=$.global,i=(0,e.computed)(()=>n.title??r(`conversation.emptyTitle`)),a=(0,e.computed)(()=>n.description??r(`conversation.emptyDescription`));return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,co,[(0,e.createElementVNode)(`div`,lo,[(0,e.renderSlot)(n.$slots,`icon`,{},()=>[t.icon?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(t.icon),{key:1})):((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,uo,[...r[0]||=[(0,e.createElementVNode)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`},null,-1)]]))])]),(0,e.createElementVNode)(`h1`,fo,(0,e.toDisplayString)(i.value),1),(0,e.createElementVNode)(`p`,po,(0,e.toDisplayString)(a.value),1),(0,e.createElementVNode)(`div`,mo,[(0,e.renderSlot)(n.$slots,`suggestions`)])]))}}),go=[`aria-label`],_o={key:0,class:`ai-chat-scroll-btn__badge`},vo=(0,e.defineComponent)({__name:`ConversationScrollBtn`,props:{badge:{}},setup(t){let n=t,r=(0,e.inject)(`scrollAnchor`),{t:i}=$.global,a=(0,e.computed)(()=>n.badge??r?.unreadCount.value??0),o=(0,e.computed)(()=>i(`conversation.scrollUnread`,{count:a.value}));return(t,n)=>(0,e.unref)(r)?((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:0,class:`ai-chat-scroll-btn`,style:(0,e.normalizeStyle)({visibility:(0,e.unref)(r).isAtBottom.value?`hidden`:`visible`}),"aria-label":a.value>0?o.value:void 0,onClick:n[0]||=t=>(0,e.unref)(r).scrollToBottom()},[n[1]||=(0,e.createElementVNode)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1),a.value>0?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,_o,(0,e.toDisplayString)(a.value),1)):(0,e.createCommentVNode)(``,!0)],12,go)):(0,e.createCommentVNode)(``,!0)}}),yo=Symbol(`ai-chat-markdown-renderer`);function bo(t){(0,e.provide)(yo,t)}function xo(){return(0,e.inject)(yo,null)}var So={class:`ai-chat-message__avatar`},Co={key:0,class:`ai-chat-avatar ai-chat-avatar--user`},wo={key:1,class:`ai-chat-avatar ai-chat-avatar--assistant`},To={class:`ai-chat-message__body`},Eo={class:`ai-chat-message__role`},Do=(0,e.defineComponent)({__name:`Message`,props:{from:{}},setup(t){let{t:n}=$.global;(0,e.provide)(`messageFrom`,t.from);let r=ro(),i=(0,e.computed)(()=>{let e=r?.value;return!e||e.layout===`stacked`?[`ai-chat-message--layout-stacked`]:[`ai-chat-message--layout-im`,`ai-chat-message--user-side-${e.messageAlign}`]});return(r,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-message ai-chat-animate-fade-in-up`,[`ai-chat-message--${t.from}`,...i.value]])},[(0,e.createElementVNode)(`div`,So,[(0,e.renderSlot)(r.$slots,`avatar`,{},()=>[t.from===`user`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Co,[(0,e.renderSlot)(r.$slots,`avatar-text`,{},()=>[a[0]||=(0,e.createTextVNode)(`U`,-1)])])):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,wo,[(0,e.renderSlot)(r.$slots,`avatar-icon`,{},()=>[a[1]||=(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})],-1)])]))])]),(0,e.createElementVNode)(`div`,To,[(0,e.createElementVNode)(`div`,Eo,[(0,e.renderSlot)(r.$slots,`role`,{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)(t.from===`user`?(0,e.unref)(n)(`message.you`):(0,e.unref)(n)(`message.assistant`)),1)])]),(0,e.renderSlot)(r.$slots,`default`)])],2))}}),Oo={class:`ai-chat-thinking__label`},ko={key:0,class:`ai-chat-thinking__body`},Ao={key:0,class:`ai-chat-thinking__cursor`},jo=s((0,e.defineComponent)({__name:`ThinkingBlock`,props:{content:{},duration:{},showDuration:{type:Boolean,default:!0},streaming:{type:Boolean,default:!1}},setup(t){let{t:n}=$.global,r=t,i=(0,e.ref)(!1),a=!1;(0,e.watch)(()=>r.streaming,e=>{a||(i.value=e)},{immediate:!0});let o=(0,e.computed)(()=>{if(!r.duration||r.duration<=0)return``;let e=r.duration/1e3;return e>=10?`${Math.round(e)}`:`${Number(e.toFixed(1))}`}),s=(0,e.computed)(()=>r.streaming?n(`thinking.thinking`):r.showDuration&&o.value?n(`thinking.thoughtFor`,{duration:o.value}):n(`thinking.title`));function c(){a=!0,i.value=!i.value}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-thinking`,{"ai-chat-thinking--expanded":i.value,"ai-chat-thinking--streaming":t.streaming}])},[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking__trigger`,onClick:c},[r[0]||=(0,e.createElementVNode)(`svg`,{class:`ai-chat-thinking__icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{d:`M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3L12 3z`})],-1),(0,e.createElementVNode)(`span`,Oo,(0,e.toDisplayString)(s.value),1),r[1]||=(0,e.createElementVNode)(`svg`,{class:`ai-chat-thinking__chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1)]),(0,e.createVNode)(e.Transition,{name:`ai-chat-thinking`},{default:(0,e.withCtx)(()=>[i.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ko,[(0,e.createTextVNode)((0,e.toDisplayString)(t.content),1),(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0),t.streaming?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Ao)):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0)]),_:3})],2))}}),[[`__scopeId`,`data-v-f179b552`]]),Mo=new Map;function No(e,t){e.trim()&&Mo.set(e,t)}function Po(e){return Mo.get(e)}function Fo(e){Mo.delete(e)}function Io(e){try{let{protocol:t}=new URL(e);return t===`http:`||t===`https:`}catch{return!1}}var Lo=/^[a-z][a-z0-9+.-]*:/i,Ro=/^-?\d+(\.\d+)?$/,zo=/^blob:/i;function Bo(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Vo(e){if(typeof e==`function`||typeof e==`symbol`||e===void 0)return{ok:!1};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(typeof e==`string`)return Lo.test(e)?Io(e)||zo.test(e)?{ok:!0,value:e}:{ok:!1}:Ro.test(e)?{ok:!0,value:Number(e)}:{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n of e){let e=Vo(n);e.ok&&t.push(e.value)}return{ok:!0,value:t}}return Bo(e)?{ok:!0,value:Ho(e)}:{ok:!1}}function Ho(e){let t={};for(let n of Object.keys(e)){let r=Vo(e[n]);r.ok&&(t[n]=r.value)}return t}var Uo={class:`ai-chat-genui-fallback`,role:`note`},Wo=(0,e.defineComponent)({__name:`GenUIRenderer`,props:{schema:{}},setup(n){let{t:r}=$.global,i=n,a=(0,e.computed)(()=>(0,t.isUISchema)(i.schema)?i.schema:null),o=(0,e.computed)(()=>a.value?Po(a.value.type):void 0),s=(0,e.computed)(()=>a.value?Ho(a.value.props):{});return(t,n)=>o.value?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(o.value),(0,e.normalizeProps)((0,e.mergeProps)({key:0},s.value)),null,16)):(0,e.renderSlot)(t.$slots,`fallback`,{},()=>[(0,e.createElementVNode)(`div`,Uo,(0,e.toDisplayString)(a.value?(0,e.unref)(r)(`genui.unsupportedType`,{type:a.value.type}):(0,e.unref)(r)(`genui.invalidSchema`)),1)],void 0,1)}});function Go(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`],n=Math.floor(Math.log(e)/Math.log(1024));return(e/1024**n).toFixed(n===0?0:1)+` `+t[n]}function Ko(e){return e<1e3?e+`ms`:(e/1e3).toFixed(1)+`s`}var qo={class:`ai-chat-tool-call-header__icon`},Jo={class:`ai-chat-tool-call-header__name`},Yo={class:`ai-chat-tool-call-header__status`},Xo={key:0,class:`ai-chat-tool-call-header__duration`},Zo=(0,e.defineComponent)({__name:`ToolCallHeader`,setup(t){let{t:n}=$.global,r=(0,e.inject)(`toolCallData`),i={pending:`⏳`,calling:`⚡`,"awaiting-approval":`⛨`,completed:`✓`,denied:`⊘`,error:`✗`},a={pending:`toolCall.statusPending`,calling:`toolCall.statusCalling`,"awaiting-approval":`toolCall.statusAwaitingApproval`,completed:`toolCall.statusCompleted`,denied:`toolCall.statusDenied`,error:`toolCall.statusError`},o=(0,e.computed)(()=>i[r.status]??`⚡`),s=(0,e.computed)(()=>n(a[r.status])),c=(0,e.computed)(()=>`ai-chat-tool-call-header--${r.status}`);return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{class:(0,e.normalizeClass)([`ai-chat-tool-call-header`,[c.value]])},[(0,e.createElementVNode)(`span`,qo,(0,e.toDisplayString)(o.value),1),(0,e.createElementVNode)(`span`,Jo,(0,e.toDisplayString)((0,e.unref)(r).name),1),(0,e.createElementVNode)(`span`,Yo,(0,e.toDisplayString)(s.value),1),(0,e.unref)(r).duration?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Xo,(0,e.toDisplayString)((0,e.unref)(Ko)((0,e.unref)(r).duration)),1)):(0,e.createCommentVNode)(``,!0)],2))}}),Qo={class:`ai-chat-tool-call-input`},$o={class:`ai-chat-tool-call-input__label`},es={class:`ai-chat-tool-call-input__code`},ts=(0,e.defineComponent)({__name:`ToolCallInput`,setup(t){let n=(0,e.inject)(`toolCallData`),{t:r}=$.global;return(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Qo,[(0,e.createElementVNode)(`div`,$o,(0,e.toDisplayString)((0,e.unref)(r)(`toolCall.parameters`)),1),(0,e.createElementVNode)(`pre`,es,(0,e.toDisplayString)(JSON.stringify((0,e.unref)(n).arguments,null,2)),1)]))}}),ns={class:`ai-chat-tool-call-output`},rs={class:`ai-chat-tool-call-output__label ai-chat-tool-call-output__label--error`},is={class:`ai-chat-tool-call-output__code ai-chat-tool-call-output__code--error`},as={class:`ai-chat-tool-call-output__label`},os={class:`ai-chat-tool-call-output__code`},ss=(0,e.defineComponent)({__name:`ToolCallOutput`,setup(t){let n=(0,e.inject)(`toolCallData`),{t:r}=$.global;return(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ns,[(0,e.unref)(n).error?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createElementVNode)(`div`,rs,(0,e.toDisplayString)((0,e.unref)(r)(`toolCall.error`)),1),(0,e.createElementVNode)(`pre`,is,(0,e.toDisplayString)((0,e.unref)(n).error),1)],64)):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createElementVNode)(`div`,as,(0,e.toDisplayString)((0,e.unref)(r)(`toolCall.result`)),1),(0,e.createElementVNode)(`pre`,os,(0,e.toDisplayString)(JSON.stringify((0,e.unref)(n).result,null,2)),1)],64))]))}}),cs={class:`ai-chat-tool-call-content`},ls=(0,e.defineComponent)({__name:`ToolCallContent`,setup(t){let n=(0,e.inject)(`toolCallData`);return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,cs,[(0,e.createVNode)(ts),(0,e.unref)(n).result!==void 0||(0,e.unref)(n).error?((0,e.openBlock)(),(0,e.createBlock)(ss,{key:0})):(0,e.createCommentVNode)(``,!0)]))}}),us=[`open`],ds={class:`ai-chat-tool-call__summary`},fs={class:`ai-chat-tool-call__body`},ps=(0,e.defineComponent)({__name:`ToolCall`,props:{data:{}},setup(t){(0,e.provide)(`toolCallData`,t.data);let n=(0,e.ref)(!1);return(r,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`details`,{class:`ai-chat-tool-call`,open:n.value,onToggle:i[0]||=e=>n.value=e.target.open},[(0,e.createElementVNode)(`summary`,ds,[(0,e.renderSlot)(r.$slots,`header`,{data:t.data,open:n.value},()=>[(0,e.createVNode)(Zo)])]),(0,e.createElementVNode)(`div`,fs,[(0,e.renderSlot)(r.$slots,`default`,{data:t.data},()=>[(0,e.createVNode)(ls)])])],40,us))}}),ms={class:`ai-chat-message-content`},hs={key:0,class:`ai-chat-message-content__tools`},gs=[`aria-label`],_s=(0,e.defineComponent)({__name:`MessageContent`,props:{content:{},thinking:{},streaming:{type:Boolean},toolCalls:{}},setup(n){let{t:r}=$.global,i=n,a=xo();function o(e){if(e.status!==`completed`)return null;let n=e.result?.ui;return(0,t.isUISchema)(n)?n:null}let s=(0,e.computed)(()=>{if(i.thinking)return{content:i.thinking.content,duration:i.thinking.duration,showDuration:!0,streaming:i.streaming&&i.thinking.active!==!1}});return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ms,[i.toolCalls?.length?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,hs,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(i.toolCalls,t=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:t.id},[o(t)?((0,e.openBlock)(),(0,e.createBlock)(Wo,{key:0,schema:o(t)},{fallback:(0,e.withCtx)(()=>[(0,e.createVNode)(ps,{data:t},null,8,[`data`])]),_:2},1032,[`schema`])):((0,e.openBlock)(),(0,e.createBlock)(ps,{key:1,data:t},null,8,[`data`]))],64))),128))])):(0,e.createCommentVNode)(``,!0),s.value?((0,e.openBlock)(),(0,e.createBlock)(jo,(0,e.normalizeProps)((0,e.mergeProps)({key:1},s.value)),null,16)):(0,e.createCommentVNode)(``,!0),i.streaming&&!i.content&&!i.thinking?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:2,class:`ai-chat-typing`,"aria-label":(0,e.unref)(r)(`message.typingAria`)},[...n[0]||=[(0,e.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1),(0,e.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1),(0,e.createElementVNode)(`span`,{class:`ai-chat-typing-dot`},null,-1)]],8,gs)):(0,e.createCommentVNode)(``,!0),(0,e.unref)(a)&&i.content!==void 0?((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)((0,e.unref)(a)),{key:3,content:i.content,streaming:i.streaming},null,8,[`content`,`streaming`])):(0,e.renderSlot)(t.$slots,`default`,{},void 0,void 0,4)]))}}),vs={},ys={class:`ai-chat-message-actions`};function bs(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,ys,[(0,e.renderSlot)(t.$slots,`default`)])}var xs=s(vs,[[`render`,bs]]),Ss=[`title`,`disabled`],Cs={key:0,class:`ai-chat-message-action__label`},ws=s((0,e.defineComponent)({__name:`MessageAction`,props:{label:{},tooltip:{},disabled:{type:Boolean}},emits:[`click`],setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:`ai-chat-message-action`,title:t.tooltip||t.label,disabled:t.disabled,onClick:r[0]||=e=>n.$emit(`click`)},[(0,e.renderSlot)(n.$slots,`default`,{},()=>[t.label?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Cs,(0,e.toDisplayString)(t.label),1)):(0,e.createCommentVNode)(``,!0)],!0)],8,Ss))}}),[[`__scopeId`,`data-v-aac9798b`]]),Ts={},Es={class:`ai-chat-message-attachments`};function Ds(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,Es,[(0,e.renderSlot)(t.$slots,`default`)])}var Os=s(Ts,[[`render`,Ds]]),ks={class:`ai-chat-message-feedback__buttons`},As=[`aria-label`,`aria-pressed`],js=[`aria-label`,`aria-pressed`],Ms={key:1,class:`ai-chat-message-feedback__comment`},Ns=[`placeholder`,`aria-label`],Ps={class:`ai-chat-message-feedback__comment-actions`},Fs=[`disabled`],Is=s((0,e.defineComponent)({__name:`MessageFeedback`,props:{value:{default:null},allowComment:{type:Boolean,default:!0}},emits:[`change`,`comment`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.ref)(i.value),s=(0,e.ref)(!1),c=(0,e.ref)(``),l=(0,e.ref)(null);(0,e.watch)(()=>i.value,e=>{o.value=e??null,e!==`down`&&(s.value=!1)}),(0,e.watch)(s,async t=>{t&&(await(0,e.nextTick)(),l.value?.focus())});function u(e){let t=o.value===e?null:e;o.value=t,t!==`down`&&(s.value=!1),a(`change`,t)}function d(){let e=c.value.trim();e&&(a(`comment`,e),c.value=``,s.value=!1)}function f(){c.value=``,s.value=!1}return(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-message-feedback`,{"ai-chat-message-feedback--rated":!!o.value}])},[(0,e.createElementVNode)(`div`,ks,[(0,e.createElementVNode)(`button`,{type:`button`,class:(0,e.normalizeClass)([`ai-chat-message-feedback__btn ai-chat-message-feedback__btn--up`,{"is-active":o.value===`up`}]),"aria-label":(0,e.unref)(r)(`feedback.like`),"aria-pressed":o.value===`up`,onClick:i[0]||=e=>u(`up`)},[...i[4]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`path`,{d:`M7 10v12`}),(0,e.createElementVNode)(`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`})],-1)]],10,As),(0,e.createElementVNode)(`button`,{type:`button`,class:(0,e.normalizeClass)([`ai-chat-message-feedback__btn ai-chat-message-feedback__btn--down`,{"is-active":o.value===`down`}]),"aria-label":(0,e.unref)(r)(`feedback.dislike`),"aria-pressed":o.value===`down`,onClick:i[1]||=e=>u(`down`)},[...i[5]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`path`,{d:`M17 14V2`}),(0,e.createElementVNode)(`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`})],-1)]],10,js)]),t.allowComment&&o.value===`down`&&!s.value?((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:0,type:`button`,class:`ai-chat-message-feedback__hint`,onClick:i[2]||=e=>s.value=!0},[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)(`feedback.commentHint`))+` `,1),i[6]||=(0,e.createElementVNode)(`span`,{class:`ai-chat-message-feedback__hint-arrow`,"aria-hidden":`true`},`→`,-1)])):(0,e.createCommentVNode)(``,!0),t.allowComment&&o.value===`down`&&s.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ms,[(0,e.withDirectives)((0,e.createElementVNode)(`textarea`,{ref_key:`commentEl`,ref:l,"onUpdate:modelValue":i[3]||=e=>c.value=e,rows:`3`,class:`ai-chat-message-feedback__comment-input`,placeholder:(0,e.unref)(r)(`feedback.commentPlaceholder`),"aria-label":(0,e.unref)(r)(`feedback.commentPlaceholder`)},null,8,Ns),[[e.vModelText,c.value]]),(0,e.createElementVNode)(`div`,Ps,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-feedback__submit`,disabled:!c.value.trim(),onClick:d},(0,e.toDisplayString)((0,e.unref)(r)(`feedback.submit`)),9,Fs),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-feedback__cancel`,onClick:f},(0,e.toDisplayString)((0,e.unref)(r)(`feedback.cancel`)),1)])])):(0,e.createCommentVNode)(``,!0)],2))}}),[[`__scopeId`,`data-v-d66edaab`]]),Ls={key:0,class:`ai-chat-branch-picker`},Rs={class:`ai-chat-branch-picker__bar`},zs=[`disabled`,`aria-label`,`title`],Bs={key:0,class:`ai-chat-branch-picker__label`},Vs=[`disabled`,`aria-label`,`title`],Hs={class:`ai-chat-branch-picker__content`},Us=s((0,e.defineComponent)({__name:`BranchPicker`,props:{branchCount:{},activeBranch:{},showLabel:{type:Boolean,default:!0}},emits:[`change`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.computed)(()=>Math.min(Math.max(i.activeBranch,0),Math.max(i.branchCount-1,0))),s=(0,e.computed)(()=>r(`branchPicker.label`,{current:o.value+1,total:i.branchCount})),c=(0,e.computed)(()=>o.value<=0),l=(0,e.computed)(()=>o.value>=i.branchCount-1);function u(){c.value||a(`change`,o.value-1)}function d(){l.value||a(`change`,o.value+1)}return(n,i)=>t.branchCount>1?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ls,[(0,e.createElementVNode)(`div`,Rs,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-branch-picker__btn ai-chat-branch-picker__btn--prev`,disabled:c.value,"aria-label":(0,e.unref)(r)(`branchPicker.prev`),title:(0,e.unref)(r)(`branchPicker.prev`),onClick:u},[...i[0]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`path`,{d:`m15 18-6-6 6-6`})],-1)]],8,zs),t.showLabel?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Bs,(0,e.toDisplayString)(s.value),1)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-branch-picker__btn ai-chat-branch-picker__btn--next`,disabled:l.value,"aria-label":(0,e.unref)(r)(`branchPicker.next`),title:(0,e.unref)(r)(`branchPicker.next`),onClick:d},[...i[1]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`path`,{d:`m9 18 6-6-6-6`})],-1)]],8,Vs)]),(0,e.createElementVNode)(`div`,Hs,[(0,e.renderSlot)(n.$slots,`default`,{},void 0,!0)])])):(0,e.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-43f4372b`]]),Ws={key:0,class:`ai-chat-message-action-copy__icon-check`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},Gs={key:1,class:`ai-chat-message-action-copy__icon-copy`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},Ks=2e3,qs=(0,e.defineComponent)({__name:`MessageActionCopy`,props:{text:{},tooltip:{}},setup(n){let{t:r}=$.global,i=n,a=(0,e.ref)(!1),o,s=(0,e.computed)(()=>i.tooltip??r(`messageActions.copy`));async function c(){if(a.value)return;let e;try{e=await(0,t.copyText)(i.text)}catch{e=!1}e&&(a.value=!0,o=setTimeout(()=>{a.value=!1},Ks))}return(0,e.onUnmounted)(()=>{o&&clearTimeout(o)}),(t,n)=>((0,e.openBlock)(),(0,e.createBlock)(ws,{tooltip:s.value,onClick:c},{default:(0,e.withCtx)(()=>[a.value?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,Ws,[...n[0]||=[(0,e.createElementVNode)(`path`,{d:`M20 6 9 17l-5-5`},null,-1)]])):((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,Gs,[...n[1]||=[(0,e.createElementVNode)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`},null,-1),(0,e.createElementVNode)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`},null,-1)]]))]),_:1},8,[`tooltip`]))}}),Js=(0,e.defineComponent)({__name:`MessageActionRetry`,props:{disabled:{type:Boolean,default:!1}},emits:[`retry`],setup(t,{emit:n}){let{t:r}=$.global,i=n,a=(0,e.computed)(()=>r(`messageActions.retry`));return(n,r)=>((0,e.openBlock)(),(0,e.createBlock)(ws,{tooltip:a.value,disabled:t.disabled,onClick:r[0]||=e=>i(`retry`)},{default:(0,e.withCtx)(()=>[...r[1]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`polyline`,{points:`23 4 23 10 17 10`}),(0,e.createElementVNode)(`path`,{d:`M20.49 15a9 9 0 1 1-2.12-9.36L23 10`})],-1)]]),_:1},8,[`tooltip`,`disabled`]))}}),Ys=/(?<=[。?!\n])/,Xs=/[。?!\n]$/;function Zs(e){let t=e.split(Ys),n=t.pop()??``;return Xs.test(n)&&(t.push(n),n=``),{complete:t.filter(e=>e.trim()!==``),rest:n}}var Qs=`ai-chat-speech-output`,$s=(0,e.ref)(!1);if(typeof window<`u`){try{localStorage.getItem(Qs)===`true`&&($s.value=!0)}catch{}(0,e.watch)($s,e=>{try{localStorage.setItem(Qs,String(e))}catch{}})}function ec(t){let n=t?.lang??`zh-CN`,r=(0,e.ref)(!1),i=``,a=0,o=null,s=typeof window<`u`&&`speechSynthesis`in window?window.speechSynthesis:void 0;function c(){if(!s)return;let e=n.split(`-`)[0].toLowerCase();o=s.getVoices().find(t=>t.lang.toLowerCase().startsWith(e))??null}function l(){a=Math.max(0,a-1),a===0&&(r.value=!1)}function u(e){if(!s)return;let t=new SpeechSynthesisUtterance(e);t.lang=n,o&&(t.voice=o),a+=1,r.value=!0,t.onend=()=>l(),t.onerror=()=>l(),s.speak(t)}function d(e){if(!$s.value||!s)return;i+=e;let{complete:t,rest:n}=Zs(i);i=n;for(let e of t)u(e)}function f(){i=``,a=0,r.value=!1,s?.cancel()}function p(e){if(!s)return;f();let{complete:t,rest:n}=Zs(e);for(let e of t)u(e);n.trim()!==``&&u(n)}function m(){$s.value=!$s.value}return s&&(c(),s.addEventListener(`voiceschanged`,c)),(0,e.getCurrentScope)()&&(0,e.onScopeDispose)(()=>{f(),s?.removeEventListener(`voiceschanged`,c)}),{enabled:$s,speaking:r,feedChunk:d,speak:p,stop:f,toggle:m}}var tc={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},nc={key:1,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},rc=(0,e.defineComponent)({__name:`MessageActionSpeak`,props:{text:{},tooltip:{},speakingTooltip:{}},setup(t){let n=t,{speaking:r,speak:i,stop:a}=ec(),{t:o}=$.global,s=(0,e.computed)(()=>r.value?n.speakingTooltip??o(`messageActions.stopSpeak`):n.tooltip??o(`messageActions.speak`));function c(){r.value?a():i(n.text)}return(t,n)=>((0,e.openBlock)(),(0,e.createBlock)(ws,{tooltip:s.value,onClick:c},{default:(0,e.withCtx)(()=>[(0,e.unref)(r)?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,tc,[...n[0]||=[(0,e.createElementVNode)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`},null,-1),(0,e.createElementVNode)(`line`,{x1:`23`,y1:`9`,x2:`17`,y2:`15`},null,-1),(0,e.createElementVNode)(`line`,{x1:`17`,y1:`9`,x2:`23`,y2:`15`},null,-1)]])):((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,nc,[...n[1]||=[(0,e.createElementVNode)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`},null,-1),(0,e.createElementVNode)(`path`,{d:`M15.54 8.46a5 5 0 0 1 0 7.07`},null,-1),(0,e.createElementVNode)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14`},null,-1)]]))]),_:1},8,[`tooltip`]))}}),ic={key:1,class:`ai-chat-message-action-edit`},ac=[`placeholder`,`aria-label`],oc={class:`ai-chat-message-action-edit__actions`},sc=[`disabled`],cc=s((0,e.defineComponent)({__name:`MessageActionEdit`,props:{initialText:{},placeholder:{}},emits:[`edit`,`cancel`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.ref)(!1),s=(0,e.ref)(``),c=(0,e.ref)(null),l=(0,e.computed)(()=>i.placeholder??r(`messageActions.editPlaceholder`));(0,e.watch)(o,async t=>{t&&(s.value=i.initialText,await(0,e.nextTick)(),c.value?.focus())});function u(){o.value=!0}function d(){let e=s.value.trim();e&&(a(`edit`,e),o.value=!1)}function f(){a(`cancel`),o.value=!1}return(t,n)=>o.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ic,[(0,e.withDirectives)((0,e.createElementVNode)(`textarea`,{ref_key:`inputEl`,ref:c,"onUpdate:modelValue":n[0]||=e=>s.value=e,rows:`3`,class:`ai-chat-message-action-edit__input`,placeholder:l.value,"aria-label":(0,e.unref)(r)(`messageActions.edit`)},null,8,ac),[[e.vModelText,s.value]]),(0,e.createElementVNode)(`div`,oc,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-action-edit__save`,disabled:!s.value.trim(),onClick:d},(0,e.toDisplayString)((0,e.unref)(r)(`messageActions.saveEdit`)),9,sc),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-message-action-edit__cancel`,onClick:f},(0,e.toDisplayString)((0,e.unref)(r)(`messageActions.cancelEdit`)),1)])])):((0,e.openBlock)(),(0,e.createBlock)(ws,{key:0,tooltip:(0,e.unref)(r)(`messageActions.edit`),onClick:u},{default:(0,e.withCtx)(()=>[...n[1]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`path`,{d:`M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z`}),(0,e.createElementVNode)(`path`,{d:`m15 5 4 4`})],-1)]]),_:1},8,[`tooltip`]))}}),[[`__scopeId`,`data-v-436ff919`]]),lc={class:`ai-chat-message-action-feedback`},uc=s((0,e.defineComponent)({__name:`MessageActionFeedback`,props:{value:{default:null}},emits:[`change`,`comment`],setup(t,{emit:n}){let r=t,i=n;function a(e){i(`change`,e)}function o(e){i(`comment`,e)}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,lc,[(0,e.createVNode)(Is,{"data-always-visible":``,value:r.value,onChange:a,onComment:o},null,8,[`value`])]))}}),[[`__scopeId`,`data-v-dcf024bc`]]),dc=[`aria-expanded`],fc={class:`ai-chat-thinking-chain__header-title`},pc={class:`ai-chat-thinking-chain__header-meta`},mc={key:0,class:`ai-chat-thinking-chain__header-duration`},hc={class:`ai-chat-thinking-chain__header-count`},gc={key:0,class:`ai-chat-thinking-chain__body`},_c=[`aria-expanded`,`onClick`],vc={class:`ai-chat-thinking-chain__step-icon`},yc={class:`ai-chat-thinking-chain__step-title`},bc={class:`ai-chat-thinking-chain__step-status`},xc={key:0,class:`ai-chat-thinking-chain__step-duration`},Sc={key:1,class:`ai-chat-thinking-chain__step-chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},Cc={key:0,class:`ai-chat-thinking-chain__step-content`},wc=s((0,e.defineComponent)({__name:`ThinkingChain`,props:{steps:{},title:{},totalDuration:{},line:{default:`solid`},streaming:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:void 0}},setup(t){let{t:n}=$.global,r=t,i=(0,e.ref)(r.defaultExpanded??r.streaming),a=!1;(0,e.watch)(()=>r.streaming,e=>{a||(i.value=e)});function o(){a=!0,i.value=!i.value}let s=(0,e.computed)(()=>r.title??(r.streaming?n(`thinking.thinking`):n(`thinking.title`))),c=(0,e.computed)(()=>r.totalDuration??r.steps.reduce((e,t)=>e+(t.duration??0),0)),l=(0,e.computed)(()=>c.value>0?Ko(c.value):``),u=(0,e.computed)(()=>n(`thinking.stepCount`,{count:r.steps.length})),d=(0,e.ref)(new Set);function f(e){let t=new Set(d.value);t.has(e.id)?t.delete(e.id):t.add(e.id),d.value=t}let p={pending:`○`,active:`●`,complete:`✓`,error:`✗`},m={pending:`thinking.stepPending`,active:`thinking.stepActive`,complete:`thinking.stepComplete`,error:`thinking.stepError`};return(r,a)=>t.steps.length?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:(0,e.normalizeClass)([`ai-chat-thinking-chain`,[`ai-chat-thinking-chain--line-${t.line}`,{"ai-chat-thinking-chain--expanded":i.value,"ai-chat-thinking-chain--streaming":t.streaming}]])},[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking-chain__header`,"aria-expanded":i.value,onClick:o},[a[0]||=(0,e.createElementVNode)(`svg`,{class:`ai-chat-thinking-chain__header-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.8`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{d:`M12 3l1.9 5.8a2 2 0 0 0 1.3 1.3L21 12l-5.8 1.9a2 2 0 0 0-1.3 1.3L12 21l-1.9-5.8a2 2 0 0 0-1.3-1.3L3 12l5.8-1.9a2 2 0 0 0 1.3-1.3L12 3z`})],-1),(0,e.createElementVNode)(`span`,fc,(0,e.toDisplayString)(s.value),1),(0,e.createElementVNode)(`span`,pc,[l.value?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,mc,(0,e.toDisplayString)(l.value),1)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,hc,(0,e.toDisplayString)(u.value),1)]),a[1]||=(0,e.createElementVNode)(`svg`,{class:`ai-chat-thinking-chain__header-chevron`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`},[(0,e.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`})],-1)],8,dc),(0,e.createVNode)(e.Transition,{name:`ai-chat-thinking-chain`},{default:(0,e.withCtx)(()=>[i.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,gc,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.steps,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id,class:(0,e.normalizeClass)([`ai-chat-thinking-chain__step`,`ai-chat-thinking-chain__step--${t.status}`])},[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-thinking-chain__step-row`,"aria-expanded":d.value.has(t.id),onClick:e=>f(t)},[(0,e.createElementVNode)(`span`,vc,(0,e.toDisplayString)(p[t.status]),1),(0,e.createElementVNode)(`span`,yc,(0,e.toDisplayString)(t.title),1),(0,e.createElementVNode)(`span`,bc,(0,e.toDisplayString)((0,e.unref)(n)(m[t.status])),1),t.duration&&t.duration>0?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,xc,(0,e.toDisplayString)((0,e.unref)(Ko)(t.duration)),1)):(0,e.createCommentVNode)(``,!0),t.content?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,Sc,[...a[2]||=[(0,e.createElementVNode)(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]])):(0,e.createCommentVNode)(``,!0)],8,_c),d.value.has(t.id)&&t.content?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Cc,(0,e.toDisplayString)(t.content),1)):(0,e.createCommentVNode)(``,!0)],2))),128))])):(0,e.createCommentVNode)(``,!0)]),_:1})],2)):(0,e.createCommentVNode)(``,!0)}}),[[`__scopeId`,`data-v-b77f5889`]]);function Tc(e,t){return!t||!t.trim()||t.split(`,`).some(t=>{let n=t.trim().toLowerCase();return n?n.startsWith(`.`)?e.name.toLowerCase().endsWith(n):n.endsWith(`/*`)?e.type.startsWith(n.slice(0,-1)):e.type===n:!1})}function Ec(n={}){let r=(0,e.ref)([]),i=[];function a(e){let a=Array.from(e),o=[],s=[],c=n.maxFiles??1/0;for(let e of a){if(!Tc(e,n.accept)){s.push({file:e,reason:`不支持的文件类型:${e.name}`});continue}if(n.maxSize&&e.size>n.maxSize){s.push({file:e,reason:`文件超过大小上限:${e.name}`});continue}if(r.value.length+o.length>=c){s.push({file:e,reason:`附件数量已达上限(${n.maxFiles} 个):${e.name}`});continue}let a=e.type.startsWith(`image/`)&&typeof URL.createObjectURL==`function`?URL.createObjectURL(e):``;a&&i.push(a),o.push({id:(0,t.generateId)(),file:e,previewUrl:a,status:`ready`})}return r.value.push(...o),{accepted:o,rejected:s}}function o(e){let t=i.indexOf(e);t>=0&&i.splice(t,1),URL.revokeObjectURL(e)}function s(e){let t=r.value.find(t=>t.id===e);t&&(t.previewUrl&&o(t.previewUrl),r.value=r.value.filter(t=>t.id!==e))}function c(){for(let e of r.value)e.previewUrl&&o(e.previewUrl);r.value=[]}function l(e,t,n){let i=r.value.find(t=>t.id===e);i&&(i.status=t,i.error=n)}return(0,e.onScopeDispose)(()=>{for(let e of[...i])URL.revokeObjectURL(e);i.length=0}),{pendingFiles:r,addFiles:a,remove:s,clear:c,setStatus:l}}var Dc=Symbol(`prompt-input`),Oc={class:`ai-chat-prompt-input`},kc={class:`ai-chat-prompt-input__disclaimer`},Ac=(0,e.defineComponent)({__name:`PromptInput`,props:{disabled:{type:Boolean,default:!1},placeholder:{},maxHeight:{default:200},accept:{default:``},multiple:{type:Boolean,default:!1},maxFiles:{default:5},maxSize:{default:void 0},sendKey:{default:`alt-enter`},beforeSend:{type:Function,default:void 0}},emits:[`send`,`abort`,`error`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.ref)(``),o=(0,e.ref)(`ready`),s=(0,e.ref)(``),c=Ec({accept:r.accept,maxFiles:r.maxFiles,maxSize:r.maxSize});function l(e){let{rejected:t}=c.addFiles(e);if(!t.length)return;let n=t.length>1?`${t[0].reason} 等 ${t.length} 个文件被拒绝`:t[0].reason;s.value=n,i(`error`,{files:t.map(e=>e.file),reason:t[0].reason})}let{t:u}=$.global,d=(0,e.computed)(()=>r.placeholder??u(`promptInput.placeholder`));(0,e.provide)(Dc,{inputText:a,pendingFiles:c.pendingFiles,status:o,disabled:()=>r.disabled,maxHeight:()=>r.maxHeight,placeholder:()=>d.value,addFiles:l,remove:c.remove,sendKey:()=>r.sendKey,multiple:()=>r.multiple,accept:()=>r.accept,submit:f});async function f(){let e=a.value,t=e.trim(),n=[...c.pendingFiles.value];if(!(!t&&!n.length||r.disabled)&&!n.some(e=>e.status===`uploading`)){if(r.beforeSend&&n.length>0){let o=n.map(e=>e.file);n.forEach(e=>c.setStatus(e.id,`uploading`));try{let s=await r.beforeSend(o);i(`send`,{text:t,attachments:s.length?s:void 0}),a.value===e&&(a.value=``),n.forEach(e=>c.remove(e.id))}catch(e){let t=e instanceof Error?e.message:String(e);n.forEach(e=>c.setStatus(e.id,`error`,t)),s.value=`附件上传失败:${t}`}}else i(`send`,{text:t,files:n.length?n.map(e=>e.file):void 0}),a.value=``,c.clear()}}function p(){i(`abort`)}let m=(0,e.ref)(0);function h(e){r.disabled||e.dataTransfer?.types.includes(`Files`)&&(e.preventDefault(),m.value++)}function g(e){e.dataTransfer?.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function _(){m.value=Math.max(0,m.value-1)}function v(e){r.disabled||(m.value=0,e.dataTransfer?.files?.length&&(e.preventDefault(),l(e.dataTransfer.files)))}return(0,e.provide)(`promptSubmit`,f),(0,e.provide)(`promptAbort`,p),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Oc,[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-prompt-input__wrapper`,{"ai-chat-prompt-input__wrapper--dragover":m.value>0}]),onDragenter:h,onDragover:g,onDragleave:_,onDrop:v},[(0,e.renderSlot)(t.$slots,`default`),(0,e.renderSlot)(t.$slots,`footer`)],34),(0,e.createElementVNode)(`p`,kc,[(0,e.renderSlot)(t.$slots,`disclaimer`,{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(u)(`promptInput.disclaimer`)),1)])]),s.value?((0,e.openBlock)(),(0,e.createBlock)(Ta,{key:0,message:s.value,type:`error`,onClose:n[0]||=e=>s.value=``},null,8,[`message`])):(0,e.createCommentVNode)(``,!0)]))}}),jc={},Mc={class:`ai-chat-prompt-input-body`};function Nc(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,Mc,[(0,e.renderSlot)(t.$slots,`default`)])}var Pc=s(jc,[[`render`,Nc]]),Fc=[`value`,`placeholder`,`disabled`],Ic=s((0,e.defineComponent)({__name:`PromptInputTextarea`,setup(t){let{inputText:n,disabled:r,maxHeight:i,placeholder:a,sendKey:o,addFiles:s}=(0,e.inject)(Dc),c=(0,e.inject)(`promptSubmit`);function l(e){let t=e.target;n.value=t.value,t.style.height=`auto`,t.style.height=Math.min(t.scrollHeight,i())+`px`}function u(e){e.isComposing||e.keyCode===229||e.key===`Enter`&&(o()===`enter`?e.shiftKey||(e.preventDefault(),c()):(e.altKey||e.metaKey)&&!e.shiftKey&&(e.preventDefault(),c()))}function d(e){let t=e.clipboardData?.files;t&&t.length>0&&(e.preventDefault(),s(t))}return(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`textarea`,{value:(0,e.unref)(n),class:`ai-chat-prompt-textarea`,placeholder:(0,e.unref)(a)(),disabled:(0,e.unref)(r)(),rows:`1`,onInput:l,onKeydown:u,onPaste:d},null,40,Fc))}}),[[`__scopeId`,`data-v-0c31f17c`]]),Lc={},Rc={class:`ai-chat-prompt-input-footer`},zc={class:`ai-chat-prompt-input-footer__tools`},Bc={class:`ai-chat-prompt-input-footer__hint`};function Vc(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,Rc,[(0,e.createElementVNode)(`div`,zc,[(0,e.renderSlot)(t.$slots,`tools`)]),(0,e.createElementVNode)(`div`,Bc,[(0,e.renderSlot)(t.$slots,`hint`)])])}var Hc=s(Lc,[[`render`,Vc]]),Uc={},Wc={class:`ai-chat-prompt-input-tools`};function Gc(t,n){return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,Wc,[(0,e.renderSlot)(t.$slots,`default`)])}var Kc=s(Uc,[[`render`,Gc]]),qc=[`title`,`disabled`],Jc=(0,e.defineComponent)({__name:`PromptInputButton`,props:{tooltip:{default:``},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:[`click`],setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:(0,e.normalizeClass)([`ai-chat-prompt-input-btn`,{"ai-chat-prompt-input-btn--active":t.active}]),title:t.tooltip,disabled:t.disabled,onClick:r[0]||=e=>n.$emit(`click`)},[(0,e.renderSlot)(n.$slots,`default`)],10,qc))}});function Yc(){if(typeof window>`u`)return;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition}function Xc(t){let n=Yc(),r=!!n,i=(0,e.ref)(`idle`),a=(0,e.ref)(``),o=(0,e.ref)(``),s=(0,e.computed)(()=>i.value!==`idle`),c=null;function l(){if(!n){o.value=`unsupported`;return}c&&=(c.onresult=null,c.onerror=null,c.onend=null,c.abort(),null),a.value=``,o.value=``;let e=new n;c=e,e.lang=t?.lang??`zh-CN`,e.interimResults=!0,e.continuous=!1,e.onresult=e=>{a.value=Array.from(e.results).map(e=>e[0].transcript).join(``)},e.onerror=e=>{o.value=e.error},e.onend=()=>{c===e&&(c=null,i.value=`idle`)},e.start(),i.value=`recording`}function u(){c&&(i.value=`recognizing`,c.stop())}function d(){s.value?u():l()}return(0,e.getCurrentScope)()&&(0,e.onScopeDispose)(()=>{c&&=(c.onresult=null,c.onerror=null,c.onend=null,c.abort(),null)}),{supported:r,status:i,isRecording:s,interimText:a,error:o,start:l,stop:u,toggle:d}}var Zc={key:0,class:`ai-chat-prompt-mic`},Qc=[`title`,`aria-label`,`disabled`],$c={key:0,class:`ai-chat-prompt-mic__panel`,role:`status`},el={key:0,class:`ai-chat-prompt-mic__error`},tl=[`aria-label`],nl=(0,e.defineComponent)({__name:`PromptInputMicButton`,props:{lang:{default:`zh-CN`}},emits:[`transcribed`],setup(t,{emit:n}){let r=t,i=n,{inputText:a,disabled:o}=(0,e.inject)(Dc),{supported:s,isRecording:c,interimText:l,error:u,toggle:d}=Xc({lang:r.lang}),{t:f}=$.global,p=(0,e.computed)(()=>c.value?f(`promptInput.micStop`):f(`promptInput.micStart`)),m={unsupported:`speechErrors.unsupported`,"no-speech":`speechErrors.noSpeech`,"not-allowed":`speechErrors.notAllowed`},h=(0,e.computed)(()=>{let e=u.value;if(!e)return``;let t=m[e];return t?f(t):e});return(0,e.watch)(c,(e,t)=>{if(t&&!e){let e=l.value.trim();if(!e)return;a.value=a.value?`${a.value} ${e}`:e,i(`transcribed`,e)}}),(t,n)=>(0,e.unref)(s)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Zc,[(0,e.createElementVNode)(`button`,{class:(0,e.normalizeClass)([`ai-chat-prompt-input-btn ai-chat-prompt-mic__btn`,{"ai-chat-prompt-mic__btn--recording":(0,e.unref)(c)}]),type:`button`,title:p.value,"aria-label":p.value,disabled:(0,e.unref)(o)(),onClick:n[0]||=(...t)=>(0,e.unref)(d)&&(0,e.unref)(d)(...t)},[...n[1]||=[(0,e.createStaticVNode)(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line></svg>`,1)]],10,Qc),(0,e.unref)(c)||h.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,$c,[h.value?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,el,(0,e.toDisplayString)(h.value),1)):((0,e.openBlock)(),(0,e.createElementBlock)(`p`,{key:1,class:`ai-chat-prompt-mic__interim`,"aria-label":(0,e.unref)(f)(`promptInput.micStop`)},(0,e.toDisplayString)((0,e.unref)(l)),9,tl))])):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0)}}),rl=[`accept`,`multiple`],il=[`title`,`aria-label`,`disabled`],al={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},ol={key:1,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},sl=(0,e.defineComponent)({__name:`PromptInputUploadButton`,props:{kind:{default:`file`}},setup(t){let n=t,{disabled:r,multiple:i,accept:a,addFiles:o}=(0,e.inject)(Dc),s=(0,e.computed)(()=>n.kind===`image`?`上传图片`:`上传附件`),c=(0,e.ref)(null);function l(){c.value?.click()}function u(e){let t=e.target;t.files?.length&&o(t.files),t.value=``}return(n,o)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[(0,e.createElementVNode)(`input`,{ref_key:`fileInput`,ref:c,type:`file`,accept:t.kind===`image`?`image/*`:(0,e.unref)(a)()||void 0,multiple:(0,e.unref)(i)(),hidden:``,onChange:u},null,40,rl),(0,e.createElementVNode)(`button`,{class:`ai-chat-prompt-input-btn`,type:`button`,title:s.value,"aria-label":s.value,disabled:(0,e.unref)(r)(),onClick:l},[(0,e.renderSlot)(n.$slots,`default`,{},()=>[t.kind===`image`?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,al,[...o[0]||=[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A1.5 1.5 0 0021.75 19.5V4.5A1.5 1.5 0 0020.25 3H3.75A1.5 1.5 0 002.25 4.5v15A1.5 1.5 0 003.75 21zM10.5 8.25h.008v.008H10.5V8.25z`},null,-1)]])):((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,ol,[...o[1]||=[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01a5.25 5.25 0 01-7.424-7.424l10.939-10.94`},null,-1)]]))])],8,il)],64))}}),cl=[`aria-label`],ll=[`aria-label`],ul=[`src`,`alt`],dl=[`aria-label`],fl=[`aria-label`],pl={class:`ai-chat-lightbox__count`},ml=(0,e.defineComponent)({__name:`ImageLightbox`,props:{attachments:{},index:{default:0}},emits:[`close`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.ref)(null),s=null;function c(e){let t=i.attachments.length;return t===0?0:Math.min(Math.max(e,0),t-1)}let l=(0,e.ref)(c(i.index));(0,e.watch)(()=>i.index,e=>{l.value=c(e)});let u=(0,e.computed)(()=>i.attachments[l.value]);function d(){i.attachments.length&&(l.value=(l.value+1)%i.attachments.length)}function f(){i.attachments.length&&(l.value=(l.value-1+i.attachments.length)%i.attachments.length)}function p(e){e.defaultPrevented||e.isComposing||e.metaKey||e.ctrlKey||e.altKey||(e.key===`Escape`?a(`close`):e.key===`ArrowRight`?(e.preventDefault(),d()):e.key===`ArrowLeft`&&(e.preventDefault(),f()))}return(0,e.onMounted)(()=>{window.addEventListener(`keydown`,p),s=document.activeElement,o.value?.focus()}),(0,e.onBeforeUnmount)(()=>{window.removeEventListener(`keydown`,p),s?.focus?.()}),(n,i)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[(0,e.createElementVNode)(`div`,{ref_key:`overlayRef`,ref:o,class:`ai-chat-lightbox__overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":(0,e.unref)(r)(`imageLightbox.previewTitle`),tabindex:`-1`,onClick:i[1]||=(0,e.withModifiers)(e=>a(`close`),[`self`])},[(0,e.createElementVNode)(`button`,{class:`ai-chat-lightbox__nav ai-chat-lightbox__prev`,type:`button`,"aria-label":(0,e.unref)(r)(`imageLightbox.prevImage`),onClick:f},[...i[2]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M15.75 19.5L8.25 12l7.5-7.5`})],-1)]],8,ll),(0,e.createElementVNode)(`img`,{class:`ai-chat-lightbox__image`,src:u.value?.url,alt:u.value?.name},null,8,ul),(0,e.createElementVNode)(`button`,{class:`ai-chat-lightbox__nav ai-chat-lightbox__next`,type:`button`,"aria-label":(0,e.unref)(r)(`imageLightbox.nextImage`),onClick:d},[...i[3]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M8.25 4.5l7.5 7.5-7.5 7.5`})],-1)]],8,dl),(0,e.createElementVNode)(`button`,{class:`ai-chat-lightbox__close`,type:`button`,"aria-label":(0,e.unref)(r)(`shared.close`),onClick:i[0]||=e=>a(`close`)},[...i[4]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,fl),(0,e.createElementVNode)(`span`,pl,(0,e.toDisplayString)(l.value+1)+` / `+(0,e.toDisplayString)(t.attachments.length),1)],8,cl)]))}});function hl(e){return e.startsWith(`image/`)?`image`:e.startsWith(`video/`)?`video`:e.startsWith(`audio/`)?`audio`:`document`}function gl(e){return{document:`📄`,audio:`🎵`,video:`🎬`}[hl(e)]||`📄`}function _l(e){return{"application/pdf":`PDF`,"text/plain":`TXT`,"text/csv":`CSV`,"application/json":`JSON`,"application/zip":`ZIP`,"application/vnd.openxmlformats-officedocument.wordprocessingml.document":`DOCX`,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":`XLSX`}[e]||e.split(`/`)[1]?.toUpperCase()||`FILE`}var vl={key:0,class:`ai-chat-prompt-attachments`},yl=[`aria-busy`,`title`],bl=[`aria-label`,`onClick`],xl=[`src`,`alt`],Sl={key:0,class:`ai-chat-prompt-attachments__loading`},Cl={key:1,class:`ai-chat-prompt-attachments__thumb ai-chat-prompt-attachments__thumb--static`},wl={class:`ai-chat-prompt-attachments__icon`,"aria-hidden":`true`},Tl={key:0,class:`ai-chat-prompt-attachments__loading`},El={class:`ai-chat-prompt-attachments__meta`},Dl={class:`ai-chat-prompt-attachments__name`},Ol={class:`ai-chat-prompt-attachments__size`},kl={key:0,class:`ai-chat-sr-only`},Al={key:1,class:`ai-chat-sr-only`},jl=[`aria-label`,`onClick`],Ml=(0,e.defineComponent)({__name:`PromptInputAttachments`,emits:[`preview`],setup(t,{emit:n}){let{pendingFiles:r,remove:i}=(0,e.inject)(Dc),{t:a}=$.global,o=(0,e.getCurrentInstance)(),s=n,c=(0,e.ref)(!1),l=(0,e.ref)(0);function u(e){return e.file.type.startsWith(`image/`)&&!!e.previewUrl}let d=(0,e.computed)(()=>r.value.filter(u).map(e=>({id:e.id,name:e.file.name,mediaType:e.file.type,url:e.previewUrl,size:e.file.size})));function f(){let e=o?.vnode.props;return!!e&&`onPreview`in e}function p(e){if(!u(e))return;let t=Math.max(0,d.value.findIndex(t=>t.id===e.id));f()?s(`preview`,{attachments:d.value,index:t}):(l.value=t,c.value=!0)}return(t,n)=>(0,e.unref)(r).length?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,vl,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)((0,e.unref)(r),t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id,class:(0,e.normalizeClass)([`ai-chat-prompt-attachments__item`,{"ai-chat-prompt-attachments__item--uploading":t.status===`uploading`,"ai-chat-prompt-attachments__item--error":t.status===`error`}]),"aria-busy":t.status===`uploading`||void 0,title:t.error||t.file.name},[u(t)?((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:0,type:`button`,class:`ai-chat-prompt-attachments__thumb`,"aria-label":(0,e.unref)(a)(`promptInput.previewAttachment`,{name:t.file.name}),onClick:e=>p(t)},[(0,e.createElementVNode)(`img`,{src:t.previewUrl,alt:t.file.name},null,8,xl),t.status===`uploading`?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Sl)):(0,e.createCommentVNode)(``,!0)],8,bl)):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Cl,[(0,e.createElementVNode)(`span`,wl,(0,e.toDisplayString)((0,e.unref)(gl)(t.file.type)),1),t.status===`uploading`?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Tl)):(0,e.createCommentVNode)(``,!0)])),(0,e.createElementVNode)(`div`,El,[(0,e.createElementVNode)(`span`,Dl,(0,e.toDisplayString)(t.file.name),1),(0,e.createElementVNode)(`span`,Ol,(0,e.toDisplayString)((0,e.unref)(Go)(t.file.size)),1),t.status===`uploading`?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,kl,(0,e.toDisplayString)((0,e.unref)(a)(`promptInput.uploading`)),1)):t.status===`error`?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Al,(0,e.toDisplayString)((0,e.unref)(a)(`promptInput.uploadFailed`)),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-prompt-attachments__remove`,"aria-label":(0,e.unref)(a)(`promptInput.removeAttachment`,{name:t.file.name}),onClick:n=>(0,e.unref)(i)(t.id)},[...n[1]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,jl)],10,yl))),128)),c.value?((0,e.openBlock)(),(0,e.createBlock)((0,e.unref)(ml),{key:0,attachments:d.value,index:l.value,onClose:n[0]||=e=>c.value=!1},null,8,[`attachments`,`index`])):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0)}}),Nl=[`aria-label`,`disabled`],Pl={key:0,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2.2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},Fl={key:1,viewBox:`0 0 24 24`,fill:`currentColor`},Il=s((0,e.defineComponent)({__name:`PromptInputSubmit`,setup(t){let{status:n,disabled:r}=(0,e.inject)(Dc),i=(0,e.inject)(`promptSubmit`),a=(0,e.inject)(`promptAbort`),{t:o}=$.global,s=(0,e.computed)(()=>n.value===`streaming`?o(`promptInput.stop`):o(`promptInput.send`));return(t,o)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:`ai-chat-prompt-submit`,type:`button`,"aria-label":s.value,disabled:(0,e.unref)(r)(),onClick:o[0]||=t=>(0,e.unref)(n)===`streaming`?(0,e.unref)(a)():(0,e.unref)(i)()},[(0,e.renderSlot)(t.$slots,`default`,{},()=>[(0,e.unref)(n)===`ready`?((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,Pl,[...o[1]||=[(0,e.createElementVNode)(`path`,{d:`M12 19V5M5 12l7-7 7 7`},null,-1)]])):((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,Fl,[...o[2]||=[(0,e.createElementVNode)(`rect`,{x:`6.5`,y:`6.5`,width:`11`,height:`11`,rx:`2`},null,-1)]]))],!0)],8,Nl))}}),[[`__scopeId`,`data-v-0cec5624`]]),Ll={},Rl={key:0,class:`ai-chat-prompt-input-header`};function zl(t,n){return t.$slots.default?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Rl,[(0,e.renderSlot)(t.$slots,`default`)])):(0,e.createCommentVNode)(``,!0)}var Bl=s(Ll,[[`render`,zl]]),Vl=/\s/;function Hl(e,t,n){if(n.length===0)return null;let r=Math.min(Math.max(Math.trunc(t)||0,0),e.length),i=r;for(;i>0;){if(Vl.test(e[i-1]))return null;let t=n.find(t=>t.char!==``&&e.endsWith(t.char,i));if(t){let n=i-t.char.length;return n===0||Vl.test(e[n-1])?{trigger:t,query:e.slice(i,r),replaceRange:[n,r]}:null}--i}return null}function Ul(e,t){let n=t.toLowerCase();if(n===``)return e.slice();let r=[],i=[];for(let t of e){let e=t.label.toLowerCase();e.startsWith(n)?r.push(t):e.includes(n)&&i.push(t)}return[...r,...i]}var Wl=[`aria-selected`,`onMousedown`],Gl={class:`ai-chat-prompt-input-suggestion__label`},Kl={key:0,class:`ai-chat-prompt-input-suggestion__desc`},ql={key:0,class:`ai-chat-prompt-input-suggestion__empty`},Jl=(0,e.defineComponent)({__name:`PromptInputSuggestion`,props:{text:{},caret:{},triggers:{},anchor:{default:null}},emits:[`select`,`close`],setup(t,{emit:n}){let r=t,i=n,{t:a}=$.global,o=(0,e.computed)(()=>Hl(r.text,r.caret,r.triggers)),s=(0,e.computed)(()=>{let e=o.value;return e?Ul(e.trigger.items,e.query):[]}),c=(0,e.ref)(!1);(0,e.watch)(()=>o.value===null,(e,t)=>{e&&!t&&(c.value=!1)});let l=(0,e.computed)(()=>o.value!==null&&!c.value),u=(0,e.ref)(0);(0,e.watch)(()=>[o.value?.trigger.char,o.value?.query],()=>{u.value=0});let d=(0,e.ref)([]);(0,e.watch)(s,e=>{u.value>=e.length&&(u.value=0),d.value.length=e.length}),(0,e.watch)(u,e=>{d.value[e]?.scrollIntoView?.({block:`nearest`})});let f=(0,e.computed)(()=>r.anchor??`body`);function p(e){let t=o.value;if(!t)return;let[n,a]=t.replaceRange,s=r.text.slice(0,n)+e.label+r.text.slice(a);c.value=!0,i(`select`,e,s)}function m(){l.value&&(c.value=!0,i(`close`))}function h(e){if(l.value){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),m();else if(!(s.value.length===0||e.isComposing)){if(e.key===`ArrowUp`)e.preventDefault(),e.stopPropagation(),u.value=(u.value-1+s.value.length)%s.value.length;else if(e.key===`ArrowDown`)e.preventDefault(),e.stopPropagation(),u.value=(u.value+1)%s.value.length;else if(e.key===`Enter`||e.key===`NumpadEnter`){let t=s.value[u.value];if(!t)return;e.preventDefault(),e.stopPropagation(),p(t)}}}}function g(e){let t=e.target;t&&_.value?.contains(t)||m()}let _=(0,e.ref)(null);function v(e,t){e instanceof HTMLElement&&(d.value[t]=e)}return(0,e.onMounted)(()=>{document.addEventListener(`keydown`,h,!0),document.addEventListener(`pointerdown`,g,!0)}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`keydown`,h,!0),document.removeEventListener(`pointerdown`,g,!0)}),(n,r)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:f.value},[l.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,ref_key:`rootEl`,ref:_,class:(0,e.normalizeClass)([`ai-chat-prompt-input-suggestion`,{"ai-chat-prompt-input-suggestion--fixed":!t.anchor}]),role:`listbox`},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(s.value,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.key,ref_for:!0,ref:e=>v(e,n),class:(0,e.normalizeClass)([`ai-chat-prompt-input-suggestion__item`,{"ai-chat-prompt-input-suggestion__item--active":n===u.value}]),role:`option`,"aria-selected":n===u.value,onMousedown:(0,e.withModifiers)(e=>p(t),[`prevent`])},[(0,e.createElementVNode)(`span`,Gl,(0,e.toDisplayString)(t.label),1),t.description?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Kl,(0,e.toDisplayString)(t.description),1)):(0,e.createCommentVNode)(``,!0)],42,Wl))),128)),s.value.length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,ql,(0,e.toDisplayString)((0,e.unref)(a)(`suggestion.empty`)),1)):(0,e.createCommentVNode)(``,!0)],2)):(0,e.createCommentVNode)(``,!0)],8,[`to`]))}}),Yl={class:`ai-chat-comparison__label`},Xl={class:`ai-chat-comparison__content`},Zl={class:`ai-chat-comparison__action`},Ql=[`disabled`],$l={class:`ai-chat-comparison__label`},eu={class:`ai-chat-comparison__content`},tu={class:`ai-chat-comparison__action`},nu=[`disabled`],ru=s((0,e.defineComponent)({__name:`ComparisonMessage`,props:{left:{},right:{},leftLabel:{},rightLabel:{},chosen:{default:null},buttonLabel:{},stackOnMobile:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1}},emits:[`prefer`],setup(t,{emit:n}){let r=t,{t:i}=$.global,a=(0,e.computed)(()=>r.leftLabel??i(`comparison.leftLabel`)),o=(0,e.computed)(()=>r.rightLabel??i(`comparison.rightLabel`)),s=(0,e.computed)(()=>r.buttonLabel??i(`comparison.buttonLabel`)),c=n,l=(0,e.ref)(r.chosen);(0,e.watch)(()=>r.chosen,e=>l.value=e);let u=(0,e.computed)(()=>r.chosen!==null),d=(0,e.computed)(()=>u.value?r.chosen:l.value);function f(e){r.disabled||(u.value||(l.value=e),c(`prefer`,{chosen:e,left:r.left,right:r.right}))}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-comparison`,{"is-stack-mobile":t.stackOnMobile}])},[(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-comparison__col`,{"is-selected":d.value===`A`}])},[(0,e.createElementVNode)(`div`,Yl,(0,e.toDisplayString)(a.value),1),(0,e.createElementVNode)(`div`,Xl,[(0,e.renderSlot)(n.$slots,`left`,{label:a.value},()=>[(0,e.createVNode)(_s,{content:t.left},null,8,[`content`])],!0)]),(0,e.createElementVNode)(`div`,Zl,[(0,e.renderSlot)(n.$slots,`action-left`,{},()=>[(0,e.createElementVNode)(`button`,{class:`ai-chat-comparison__btn`,disabled:t.disabled,onClick:r[0]||=e=>f(`A`)},(0,e.toDisplayString)(s.value),9,Ql)],!0)])],2),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-comparison__col`,{"is-selected":d.value===`B`}])},[(0,e.createElementVNode)(`div`,$l,(0,e.toDisplayString)(o.value),1),(0,e.createElementVNode)(`div`,eu,[(0,e.renderSlot)(n.$slots,`right`,{label:o.value},()=>[(0,e.createVNode)(_s,{content:t.right},null,8,[`content`])],!0)]),(0,e.createElementVNode)(`div`,tu,[(0,e.renderSlot)(n.$slots,`action-right`,{},()=>[(0,e.createElementVNode)(`button`,{class:`ai-chat-comparison__btn`,disabled:t.disabled,onClick:r[1]||=e=>f(`B`)},(0,e.toDisplayString)(s.value),9,nu)],!0)])],2)],2))}}),[[`__scopeId`,`data-v-6c9000c8`]]),iu=(0,e.defineComponent)({__name:`Attachments`,props:{variant:{default:`grid`}},setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-attachments`,[`ai-chat-attachments--${t.variant}`]])},[(0,e.renderSlot)(n.$slots,`default`)],2))}}),au={class:`ai-chat-attachment`},ou=(0,e.defineComponent)({__name:`Attachment`,props:{data:{}},setup(t){return(0,e.provide)(`attachmentData`,t.data),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,au,[(0,e.renderSlot)(t.$slots,`default`)]))}}),su=[`src`,`alt`],cu={key:1,class:`ai-chat-attachment-preview__icon`},lu=(0,e.defineComponent)({__name:`AttachmentPreview`,emits:[`preview`],setup(t,{emit:n}){let r=(0,e.inject)(`attachmentData`),i=n,a=hl(r.mediaType);return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-attachment-preview`,[`ai-chat-attachment-preview--${(0,e.unref)(a)}`]])},[(0,e.unref)(a)===`image`&&(0,e.unref)(r).url?((0,e.openBlock)(),(0,e.createElementBlock)(`img`,{key:0,src:(0,e.unref)(r).url,alt:(0,e.unref)(r).name,class:`ai-chat-attachment-preview__img`,onClick:n[0]||=e=>i(`preview`)},null,8,su)):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,cu,(0,e.toDisplayString)((0,e.unref)(gl)((0,e.unref)(r).mediaType)),1))],2))}}),uu={class:`ai-chat-attachment-info`},du={class:`ai-chat-attachment-info__name`},fu={class:`ai-chat-attachment-info__meta`},pu=(0,e.defineComponent)({__name:`AttachmentInfo`,setup(t){let n=(0,e.inject)(`attachmentData`);return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,uu,[(0,e.createElementVNode)(`span`,du,(0,e.toDisplayString)((0,e.unref)(n).name),1),(0,e.createElementVNode)(`span`,fu,[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(_l)((0,e.unref)(n).mediaType))+` `,1),(0,e.unref)(n).size?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createTextVNode)(` · `+(0,e.toDisplayString)((0,e.unref)(Go)((0,e.unref)(n).size)),1)],64)):(0,e.createCommentVNode)(``,!0)])]))}}),mu=(0,e.defineComponent)({__name:`AttachmentRemove`,emits:[`remove`],setup(t){return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{class:`ai-chat-attachment-remove`,onClick:n[0]||=e=>t.$emit(`remove`)},[...n[1]||=[(0,e.createElementVNode)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,e.createElementVNode)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})],-1)]]))}}),hu={class:`ai-chat-attachment-empty`},gu=(0,e.defineComponent)({__name:`AttachmentEmpty`,setup(t){let{t:n}=$.global;return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,hu,[(0,e.renderSlot)(t.$slots,`default`,{},()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(n)(`attachments.empty`)),1)])]))}}),_u={class:`ai-chat-tool-confirmation__head`},vu={class:`ai-chat-tool-confirmation__title`},yu={class:`ai-chat-tool-confirmation__desc`},bu={class:`ai-chat-tool-confirmation__tool`},xu={class:`ai-chat-tool-confirmation__tool-name`},Su={key:0,class:`ai-chat-tool-confirmation__args`},Cu={key:1,class:`ai-chat-tool-confirmation__actions`,role:`group`},wu={key:2,class:`ai-chat-tool-confirmation__denied`},Tu=s((0,e.defineComponent)({__name:`ToolConfirmation`,props:{toolName:{},arguments:{},reason:{},status:{}},emits:[`approve`,`reject`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.computed)(()=>i.status===`denied`),s=(0,e.computed)(()=>i.reason??r(`confirmation.description`)),c=(0,e.computed)(()=>i.arguments!==void 0),l=(0,e.computed)(()=>{if(i.arguments===void 0)return``;try{return JSON.stringify(i.arguments,null,2)??`{}`}catch{return String(i.arguments)}});return(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-tool-confirmation`,{"ai-chat-tool-confirmation--denied":o.value}])},[(0,e.createElementVNode)(`div`,_u,[i[2]||=(0,e.createElementVNode)(`span`,{class:`ai-chat-tool-confirmation__icon`,"aria-hidden":`true`},`⛨`,-1),(0,e.createElementVNode)(`span`,vu,(0,e.toDisplayString)((0,e.unref)(r)(`confirmation.title`)),1)]),(0,e.createElementVNode)(`p`,yu,(0,e.toDisplayString)(s.value),1),(0,e.createElementVNode)(`div`,bu,[(0,e.createElementVNode)(`span`,xu,(0,e.toDisplayString)(t.toolName),1)]),c.value?((0,e.openBlock)(),(0,e.createElementBlock)(`pre`,Su,(0,e.toDisplayString)(l.value),1)):(0,e.createCommentVNode)(``,!0),o.value?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,wu,(0,e.toDisplayString)((0,e.unref)(r)(`confirmation.denied`)),1)):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Cu,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-tool-confirmation__btn ai-chat-tool-confirmation__btn--reject`,onClick:i[0]||=e=>a(`reject`)},(0,e.toDisplayString)((0,e.unref)(r)(`confirmation.reject`)),1),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-tool-confirmation__btn ai-chat-tool-confirmation__btn--approve`,onClick:i[1]||=e=>a(`approve`)},(0,e.toDisplayString)((0,e.unref)(r)(`confirmation.approve`)),1)]))],2))}}),[[`__scopeId`,`data-v-a8e6375a`]]),Eu=[`onKeydown`],Du=[`aria-label`],Ou={key:0,class:`ai-chat-inline-citation__nav`},ku=[`aria-label`],Au={class:`ai-chat-inline-citation__count`},ju=[`aria-label`],Mu=[`href`],Nu={key:3,class:`ai-chat-inline-citation__snippet`},Pu=[`href`,`aria-label`],Fu=(0,e.defineComponent)({__name:`InlineCitation`,props:{index:{},sources:{},cardWidth:{default:300}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n,{t:a}=$.global,o=(0,e.ref)(null),s=(0,e.ref)(!1),c=(0,e.ref)(0),l=(0,e.computed)(()=>r.sources.length),u=(0,e.computed)(()=>r.sources[c.value]),d=(0,e.computed)(()=>{let e=u.value?.url;return e!==void 0&&Io(e)?e:void 0});function f(){l.value>0&&(s.value=!0)}function p(){s.value=!1,c.value=0}function m(){o.value?.contains(document.activeElement)||p()}function h(){o.value?.contains(document.activeElement)||p()}function g(){l.value>0&&(c.value=(c.value-1+l.value)%l.value)}function _(){l.value>0&&(c.value=(c.value+1)%l.value)}function v(){u.value!==void 0&&i(`select`,u.value)}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{ref_key:`rootEl`,ref:o,class:`ai-chat-inline-citation`,onMouseenter:f,onMouseleave:m,onFocusin:f,onFocusout:h,onKeydown:(0,e.withKeys)((0,e.withModifiers)(p,[`prevent`]),[`esc`])},[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__trigger`,"aria-label":(0,e.unref)(a)(`citation.source`)},(0,e.toDisplayString)(t.index),9,Du),s.value&&u.value?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,{key:0,class:`ai-chat-inline-citation__card`,style:(0,e.normalizeStyle)({width:`${t.cardWidth}px`})},[l.value>1?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Ou,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__nav-btn ai-chat-inline-citation__nav-prev`,"aria-label":(0,e.unref)(a)(`citation.prevSource`),onClick:g},` ‹ `,8,ku),(0,e.createElementVNode)(`span`,Au,(0,e.toDisplayString)(c.value+1)+`/`+(0,e.toDisplayString)(l.value),1),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-inline-citation__nav-btn ai-chat-inline-citation__nav-next`,"aria-label":(0,e.unref)(a)(`citation.nextSource`),onClick:_},` › `,8,ju)])):(0,e.createCommentVNode)(``,!0),d.value?((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:1,class:`ai-chat-inline-citation__title`,href:d.value,target:`_blank`,rel:`noopener noreferrer`,onClick:v},(0,e.toDisplayString)(u.value.title??u.value.id),9,Mu)):((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:2,type:`button`,class:`ai-chat-inline-citation__title`,onClick:v},(0,e.toDisplayString)(u.value.title??u.value.id),1)),u.value.snippet?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Nu,(0,e.toDisplayString)(u.value.snippet),1)):(0,e.createCommentVNode)(``,!0),d.value?((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:4,class:`ai-chat-inline-citation__link`,href:d.value,target:`_blank`,rel:`noopener noreferrer`,"aria-label":(0,e.unref)(a)(`citation.openLink`)},(0,e.toDisplayString)((0,e.unref)(a)(`citation.viewSource`)),9,Pu)):(0,e.createCommentVNode)(``,!0)],4)):(0,e.createCommentVNode)(``,!0)],40,Eu))}}),Iu={key:0,class:`ai-chat-sources__inline-title`},Lu=[`onClick`],Ru={key:1,class:`ai-chat-sources__overflow`},zu=[`aria-expanded`],Bu={key:0,class:`ai-chat-sources__popover`},Vu=[`href`,`onClick`],Hu=[`onClick`],Uu=[`aria-expanded`],Wu={class:`ai-chat-sources__title`},Gu={key:0,class:`ai-chat-sources__list`},Ku=[`href`,`onClick`],qu={class:`ai-chat-sources__link-index`},Ju={class:`ai-chat-sources__link-title`},Yu=[`onClick`],Xu={class:`ai-chat-sources__doc-index`},Zu={class:`ai-chat-sources__doc-body`},Qu={class:`ai-chat-sources__doc-title`},$u={key:0,class:`ai-chat-sources__doc-snippet`},ed=(0,e.defineComponent)({__name:`Sources`,props:{sources:{},title:{default:void 0},inline:{type:Boolean,default:!1},maxInline:{default:3},defaultOpen:{type:Boolean,default:!1}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n,{t:a}=$.global,o=(0,e.ref)(r.defaultOpen),s=(0,e.ref)(!1),c=(0,e.computed)(()=>r.title??a(`citation.sources`,{count:r.sources.length})),l=(0,e.computed)(()=>Math.min(r.maxInline,r.sources.length)),u=(0,e.computed)(()=>r.sources.slice(0,l.value)),d=(0,e.computed)(()=>r.sources.slice(l.value).map((e,t)=>({source:e,index:l.value+t})));function f(e){return e.url!==void 0&&Io(e.url)?e.url:void 0}function p(e,t){i(`select`,e,t)}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:(0,e.normalizeClass)([`ai-chat-sources`,{"ai-chat-sources--inline":t.inline}])},[t.inline?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[t.title===void 0?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Iu,(0,e.toDisplayString)(t.title),1)),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(u.value,(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:t.id,type:`button`,class:`ai-chat-sources__badge ai-chat-sources__badge--seq`,onClick:e=>p(t,n)},(0,e.toDisplayString)(n+1),9,Lu))),128)),d.value.length>0?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Ru,[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-sources__badge ai-chat-sources__badge--more`,"aria-expanded":s.value,onClick:r[0]||=e=>s.value=!s.value},` +`+(0,e.toDisplayString)(d.value.length),9,zu),s.value?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Bu,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(d.value,t=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:t.source.id},[f(t.source)?((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:0,class:`ai-chat-sources__popover-item`,href:f(t.source),target:`_blank`,rel:`noopener noreferrer`,onClick:e=>p(t.source,t.index)},(0,e.toDisplayString)(t.source.title??t.source.url),9,Vu)):((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:1,type:`button`,class:`ai-chat-sources__popover-item`,onClick:e=>p(t.source,t.index)},(0,e.toDisplayString)(t.source.title??t.source.id),9,Hu))],64))),128))])):(0,e.createCommentVNode)(``,!0)])):(0,e.createCommentVNode)(``,!0)],64)):((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:1},[(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-sources__header`,"aria-expanded":o.value,onClick:r[1]||=e=>o.value=!o.value},[r[2]||=(0,e.createElementVNode)(`span`,{class:`ai-chat-sources__arrow`},`▶`,-1),(0,e.createElementVNode)(`span`,Wu,(0,e.toDisplayString)(c.value),1)],8,Uu),o.value?((0,e.openBlock)(),(0,e.createElementBlock)(`ul`,Gu,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.sources,(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`li`,{key:t.id,class:`ai-chat-sources__item`},[(0,e.renderSlot)(n.$slots,`source`,{source:t,index:r},()=>[f(t)?((0,e.openBlock)(),(0,e.createElementBlock)(`a`,{key:0,class:`ai-chat-sources__link`,href:f(t),target:`_blank`,rel:`noopener noreferrer`,onClick:e=>p(t,r)},[(0,e.createElementVNode)(`span`,qu,(0,e.toDisplayString)(r+1),1),(0,e.createElementVNode)(`span`,Ju,(0,e.toDisplayString)(t.title??t.url),1)],8,Ku)):((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:1,type:`button`,class:`ai-chat-sources__doc`,onClick:e=>p(t,r)},[(0,e.createElementVNode)(`span`,Xu,(0,e.toDisplayString)(r+1),1),(0,e.createElementVNode)(`span`,Zu,[(0,e.createElementVNode)(`span`,Qu,(0,e.toDisplayString)(t.title??t.id),1),t.snippet?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,$u,(0,e.toDisplayString)(t.snippet),1)):(0,e.createCommentVNode)(``,!0)])],8,Yu))])]))),128))])):(0,e.createCommentVNode)(``,!0)],64))],2))}}),td=[`aria-label`],nd={class:`ai-chat-weather-card__city`},rd={class:`ai-chat-weather-card__temp`},id={class:`ai-chat-weather-card__desc`},ad=(0,e.defineComponent)({__name:`WeatherCard`,props:{city:{},temperatureC:{},description:{}},emits:[`detail`],setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{class:`ai-chat-weather-card`,role:`group`,"aria-label":t.city,onClick:r[0]||=e=>n.$emit(`detail`,t.city)},[(0,e.createElementVNode)(`div`,nd,(0,e.toDisplayString)(t.city),1),(0,e.createElementVNode)(`div`,rd,(0,e.toDisplayString)(t.temperatureC)+`°C`,1),(0,e.createElementVNode)(`div`,id,(0,e.toDisplayString)(t.description),1)],8,td))}}),od={class:`ai-chat-plan-actions`},sd={class:`ai-chat-plan-actions__text`},cd={class:`ai-chat-plan-actions__title`},ld={class:`ai-chat-plan-actions__summary`},ud=[`onClick`],dd=(0,e.defineComponent)({__name:`PlanActions`,props:{plans:{}},emits:[`adopt`],setup(t){let{t:n}=$.global;return(r,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,od,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.plans,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:t.id,class:`ai-chat-plan-actions__item`},[(0,e.createElementVNode)(`div`,sd,[(0,e.createElementVNode)(`div`,cd,(0,e.toDisplayString)(t.title),1),(0,e.createElementVNode)(`div`,ld,(0,e.toDisplayString)(t.summary),1)]),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-plan-actions__adopt`,onClick:e=>r.$emit(`adopt`,t.id)},(0,e.toDisplayString)((0,e.unref)(n)(`genui.adopt`)),9,ud)]))),128))]))}}),fd={class:`ai-chat-welcome`},pd={class:`ai-chat-welcome__icon`},md={class:`ai-chat-welcome__title`},hd={key:0,class:`ai-chat-welcome__desc`},gd={class:`ai-chat-welcome__content`},_d={key:1,class:`ai-chat-welcome__extra`},vd=(0,e.defineComponent)({__name:`Welcome`,props:{title:{},description:{}},setup(t){let n=t,{t:r}=$.global,i=(0,e.computed)(()=>n.title??r(`welcome.title`)),a=(0,e.computed)(()=>n.description??r(`welcome.description`));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,fd,[(0,e.createElementVNode)(`div`,pd,[(0,e.renderSlot)(t.$slots,`icon`,{},()=>[n[0]||=(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`polygon`,{points:`12 3 14 10 21 12 14 14 12 21 10 14 3 12 10 10`})],-1)])]),(0,e.createElementVNode)(`h2`,md,(0,e.toDisplayString)(i.value),1),a.value?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,hd,(0,e.toDisplayString)(a.value),1)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,gd,[(0,e.renderSlot)(t.$slots,`default`)]),t.$slots.extra?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,_d,[(0,e.renderSlot)(t.$slots,`extra`)])):(0,e.createCommentVNode)(``,!0)]))}}),yd={class:`ai-chat-prompts`},bd={class:`ai-chat-prompts__title`},xd=[`onClick`],Sd={key:0,class:`ai-chat-prompts__icon`},Cd={class:`ai-chat-prompts__content`},wd={class:`ai-chat-prompts__label`},Td={key:0,class:`ai-chat-prompts__desc`},Ed=(0,e.defineComponent)({__name:`Prompts`,props:{items:{},title:{default:void 0},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n,{t:a}=$.global,o=(0,e.computed)(()=>r.title??a(`prompts.title`)),s=(0,e.computed)(()=>({"ai-chat-prompts__list--vertical":r.vertical,"ai-chat-prompts__list--wrap":r.wrap}));return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,yd,[(0,e.createElementVNode)(`div`,bd,(0,e.toDisplayString)(o.value),1),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)([`ai-chat-prompts__list`,s.value])},[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.items,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,{key:t.key,type:`button`,class:`ai-chat-prompts__item`,onClick:e=>i(`select`,t)},[(0,e.renderSlot)(n.$slots,`item`,{item:t},()=>[t.icon?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Sd,(0,e.toDisplayString)(t.icon),1)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,Cd,[(0,e.createElementVNode)(`span`,wd,(0,e.toDisplayString)(t.label),1),t.description?((0,e.openBlock)(),(0,e.createElementBlock)(`span`,Td,(0,e.toDisplayString)(t.description),1)):(0,e.createCommentVNode)(``,!0)])])],8,xd))),128))],2)]))}}),Dd={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--type`},Od={class:`ai-chat-provider-dialog__label`},kd={class:`ai-chat-provider-dialog__radios`},Ad={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--name`},jd={class:`ai-chat-provider-dialog__label`},Md={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Nd={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--baseURL`},Pd={class:`ai-chat-provider-dialog__label`},Fd={key:0,class:`ai-chat-provider-dialog__presets`},Id={class:`ai-chat-provider-dialog__presets-label`},Ld={key:1,class:`ai-chat-provider-dialog__error`,role:`alert`},Rd={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--apiKey`},zd={class:`ai-chat-provider-dialog__label`},Bd={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Vd={class:`ai-chat-provider-dialog__field ai-chat-provider-dialog__field--model`},Hd={class:`ai-chat-provider-dialog__label`},Ud={key:0,class:`ai-chat-provider-dialog__error`,role:`alert`},Wd={class:`ai-chat-provider-dialog__remember`},Gd={class:`ai-chat-provider-dialog__actions`},Kd=(0,e.defineComponent)({__name:`ProviderSettingsForm`,props:{editing:{}},emits:[`create`,`update`,`cancel-edit`],setup(t,{emit:n}){let{t:r}=$.global,i=t,a=n,o=(0,e.reactive)({name:``,provider:`openai-compat`,baseURL:``,apiKey:``,model:``,persist:!0}),s=(0,e.reactive)({name:!1,baseURL:!1,apiKey:!1,model:!1}),l=[{id:`openai`,labelKey:`provider.presetOpenai`,url:`https://api.openai.com/v1`},{id:`deepseek`,labelKey:`provider.presetDeepseek`,url:`https://api.deepseek.com/v1`},{id:`glm`,labelKey:`provider.presetGlm`,url:`https://open.bigmodel.cn/api/paas/v4`},{id:`kimi`,labelKey:`provider.presetKimi`,url:`https://api.moonshot.cn/v1`}],d=(0,e.computed)(()=>o.provider===`openai-compat`),f=(0,e.computed)(()=>({name:s.name&&!o.name.trim()?r(`provider.errorRequired`):``,baseURL:s.baseURL&&d.value&&!o.baseURL.trim()?r(`provider.errorRequired`):``,apiKey:s.apiKey&&!o.apiKey.trim()?r(`provider.errorRequired`):``,model:s.model&&!o.model.trim()?r(`provider.errorRequired`):``})),p=(0,e.computed)(()=>o.name.trim()!==``&&o.apiKey.trim()!==``&&o.model.trim()!==``&&(!d.value||o.baseURL.trim()!==``));function m(){o.baseURL=``,s.baseURL=!1}(0,e.watch)(()=>o.provider,m);let g=(0,e.computed)(()=>i.editing?.id??null);(0,e.watch)(()=>i.editing,e=>{e?(o.name=e.name,o.provider=e.provider===`anthropic`?`anthropic`:`openai-compat`,o.baseURL=e.baseURL??``,o.apiKey=``,o.model=e.model??``):(o.name=``,o.provider=`openai-compat`,o.baseURL=``,o.apiKey=``,o.model=``),Object.assign(s,{name:!1,baseURL:!1,apiKey:!1,model:!1})},{immediate:!0});function _(){a(`cancel-edit`)}function v(e,t){t.preventDefault(),o.baseURL=e.url}function y(){if(Object.assign(s,{name:!0,baseURL:!0,apiKey:!0,model:!0}),!p.value)return;let e=o.baseURL.trim(),t={name:o.name.trim(),provider:o.provider,...e?{baseURL:e}:{},apiKey:o.apiKey.trim(),model:o.model.trim(),persist:o.persist};g.value?a(`update`,g.value,t):a(`create`,t)}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`form`,{class:`ai-chat-provider-dialog__form`,novalidate:``,onSubmit:(0,e.withModifiers)(y,[`prevent`])},[(0,e.createElementVNode)(`fieldset`,Dd,[(0,e.createElementVNode)(`legend`,Od,(0,e.toDisplayString)((0,e.unref)(r)(`provider.typeLabel`)),1),(0,e.createElementVNode)(`div`,kd,[(0,e.createVNode)(h,{modelValue:o.provider,"onUpdate:modelValue":n[0]||=e=>o.provider=e,name:`ai-chat-provider-type`,value:`openai-compat`,label:(0,e.unref)(r)(`provider.typeOpenaiCompat`)},null,8,[`modelValue`,`label`]),(0,e.createVNode)(h,{modelValue:o.provider,"onUpdate:modelValue":n[1]||=e=>o.provider=e,name:`ai-chat-provider-type`,value:`anthropic`,label:(0,e.unref)(r)(`provider.typeAnthropic`)},null,8,[`modelValue`,`label`])])]),(0,e.createElementVNode)(`div`,Ad,[(0,e.createElementVNode)(`span`,jd,(0,e.toDisplayString)((0,e.unref)(r)(`provider.nameLabel`)),1),(0,e.createVNode)(u,{modelValue:o.name,"onUpdate:modelValue":n[2]||=e=>o.name=e,size:`sm`,placeholder:(0,e.unref)(r)(`provider.namePlaceholder`),"aria-label":(0,e.unref)(r)(`provider.nameLabel`),onBlur:n[3]||=e=>s.name=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),f.value.name?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,Md,(0,e.toDisplayString)(f.value.name),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`div`,Nd,[(0,e.createElementVNode)(`span`,Pd,(0,e.toDisplayString)((0,e.unref)(r)(`provider.baseURLLabel`)),1),(0,e.createVNode)(u,{modelValue:o.baseURL,"onUpdate:modelValue":n[4]||=e=>o.baseURL=e,size:`sm`,placeholder:(0,e.unref)(r)(`provider.baseURLPlaceholder`),"aria-label":(0,e.unref)(r)(`provider.baseURLLabel`),onBlur:n[5]||=e=>s.baseURL=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),d.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Fd,[(0,e.createElementVNode)(`span`,Id,(0,e.toDisplayString)((0,e.unref)(r)(`provider.baseURLPresetsLabel`)),1),((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l,t=>(0,e.createVNode)(c,{key:t.url,type:`secondary`,size:`small`,class:(0,e.normalizeClass)([`ai-chat-provider-dialog__preset`,`ai-chat-provider-dialog__preset--${t.id}`]),"aria-pressed":o.baseURL===t.url,onClick:e=>v(t,e)},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)(t.labelKey)),1)]),_:2},1032,[`class`,`aria-pressed`,`onClick`])),64))])):(0,e.createCommentVNode)(``,!0),f.value.baseURL?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,Ld,(0,e.toDisplayString)(f.value.baseURL),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`div`,Rd,[(0,e.createElementVNode)(`span`,zd,(0,e.toDisplayString)((0,e.unref)(r)(`provider.apiKeyLabel`)),1),(0,e.createVNode)(u,{modelValue:o.apiKey,"onUpdate:modelValue":n[6]||=e=>o.apiKey=e,type:`password`,autocomplete:`new-password`,size:`sm`,placeholder:(0,e.unref)(r)(`provider.apiKeyPlaceholder`),"aria-label":(0,e.unref)(r)(`provider.apiKeyLabel`),onBlur:n[7]||=e=>s.apiKey=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),f.value.apiKey?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,Bd,(0,e.toDisplayString)(f.value.apiKey),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`div`,Vd,[(0,e.createElementVNode)(`span`,Hd,(0,e.toDisplayString)((0,e.unref)(r)(`provider.modelLabel`)),1),(0,e.createVNode)(u,{modelValue:o.model,"onUpdate:modelValue":n[8]||=e=>o.model=e,size:`sm`,placeholder:(0,e.unref)(r)(`provider.modelPlaceholder`),"aria-label":(0,e.unref)(r)(`provider.modelLabel`),onBlur:n[9]||=e=>s.model=!0},null,8,[`modelValue`,`placeholder`,`aria-label`]),f.value.model?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,Ud,(0,e.toDisplayString)(f.value.model),1)):(0,e.createCommentVNode)(``,!0)]),(0,e.createElementVNode)(`label`,Wd,[(0,e.withDirectives)((0,e.createElementVNode)(`input`,{"onUpdate:modelValue":n[10]||=e=>o.persist=e,type:`checkbox`,class:`ai-chat-provider-dialog__remember-input`},null,512),[[e.vModelCheckbox,o.persist]]),(0,e.createElementVNode)(`span`,null,(0,e.toDisplayString)((0,e.unref)(r)(`provider.rememberLabel`)),1)]),(0,e.createElementVNode)(`div`,Gd,[g.value?((0,e.openBlock)(),(0,e.createBlock)(c,{key:0,type:`secondary`,class:`ai-chat-provider-dialog__cancel-edit`,onClick:_},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)(`provider.cancelEdit`)),1)]),_:1})):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(c,{class:`ai-chat-provider-dialog__submit`,disabled:!p.value,onClick:y},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)(g.value?(0,e.unref)(r)(`provider.submitEdit`):(0,e.unref)(r)(`provider.submit`)),1)]),_:1},8,[`disabled`])])],32))}}),qd=[`aria-label`],Jd={class:`ai-chat-provider-dialog`},Yd={class:`ai-chat-provider-dialog__header`},Xd={class:`ai-chat-provider-dialog__title`},Zd=[`aria-label`],Qd={class:`ai-chat-provider-dialog__list`},$d={class:`ai-chat-provider-dialog__list-title`},ef={key:0,class:`ai-chat-provider-dialog__list-empty`},tf={key:1,class:`ai-chat-provider-dialog__items`},nf={class:`ai-chat-provider-dialog__item-info`},rf={class:`ai-chat-provider-dialog__item-name`},af={class:`ai-chat-provider-dialog__item-meta`},of={class:`ai-chat-provider-dialog__item-actions`},sf=(0,e.defineComponent)({__name:`ProviderSettingsDialog`,props:(0,e.mergeModels)({providers:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:(0,e.mergeModels)([`create`,`update`,`remove`],[`update:open`]),setup(t,{emit:n}){let{t:r}=$.global,i=n,a=(0,e.useModel)(t,`open`),o=(0,e.ref)(null);function s(e){i(`create`,e)}function l(e,t){o.value=null,i(`update`,e,t)}function u(){o.value=null}function d(e){o.value=e}function f(e){o.value?.id===e&&(o.value=null),i(`remove`,e)}function p(){a.value=!1}function m(e){e.key===`Escape`&&a.value&&p()}return(0,e.onMounted)(()=>window.addEventListener(`keydown`,m)),(0,e.onBeforeUnmount)(()=>window.removeEventListener(`keydown`,m)),(n,i)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[a.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,class:`ai-chat-provider-dialog__overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":(0,e.unref)(r)(`provider.title`),onClick:(0,e.withModifiers)(p,[`self`])},[(0,e.createElementVNode)(`div`,Jd,[(0,e.createElementVNode)(`header`,Yd,[(0,e.createElementVNode)(`h2`,Xd,(0,e.toDisplayString)((0,e.unref)(r)(`provider.title`)),1),(0,e.createElementVNode)(`button`,{type:`button`,class:`ai-chat-provider-dialog__close`,"aria-label":(0,e.unref)(r)(`shared.close`),onClick:p},[...i[0]||=[(0,e.createElementVNode)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1.5`,"aria-hidden":`true`},[(0,e.createElementVNode)(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,d:`M6 18L18 6M6 6l12 12`})],-1)]],8,Zd)]),(0,e.createVNode)(Kd,{editing:o.value,onCreate:s,onUpdate:l,onCancelEdit:u},null,8,[`editing`]),(0,e.createElementVNode)(`section`,Qd,[(0,e.createElementVNode)(`h3`,$d,(0,e.toDisplayString)((0,e.unref)(r)(`provider.listTitle`)),1),t.providers.length===0?((0,e.openBlock)(),(0,e.createElementBlock)(`p`,ef,(0,e.toDisplayString)((0,e.unref)(r)(`provider.listEmpty`)),1)):((0,e.openBlock)(),(0,e.createElementBlock)(`ul`,tf,[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.providers,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`li`,{key:t.id,class:`ai-chat-provider-dialog__item`},[(0,e.createElementVNode)(`div`,nf,[(0,e.createElementVNode)(`span`,rf,(0,e.toDisplayString)(t.name),1),(0,e.createElementVNode)(`span`,af,[(0,e.createTextVNode)((0,e.toDisplayString)(t.provider),1),t.model?((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,{key:0},[(0,e.createTextVNode)(` · `+(0,e.toDisplayString)(t.model),1)],64)):(0,e.createCommentVNode)(``,!0)])]),(0,e.createElementVNode)(`div`,of,[(0,e.createVNode)(c,{class:`ai-chat-provider-dialog__edit`,type:`secondary`,size:`small`,onClick:e=>d(t)},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)(`provider.edit`)),1)]),_:1},8,[`onClick`]),(0,e.createVNode)(c,{class:`ai-chat-provider-dialog__remove`,type:`danger`,size:`small`,onClick:e=>f(t.id)},{default:(0,e.withCtx)(()=>[(0,e.createTextVNode)((0,e.toDisplayString)((0,e.unref)(r)(`provider.remove`)),1)]),_:1},8,[`onClick`])])]))),128))]))])])],8,qd)):(0,e.createCommentVNode)(``,!0)]))}}),cf=`ai-chat-theme`,lf=(0,e.ref)(`system`),uf=(0,e.ref)(!1),df=(0,e.reactive)({target:`html`,persist:!0}),ff=!1,pf=!1,mf=null;function hf(e){return e===`system`?uf.value?`dark`:`light`:e}var gf=(0,e.computed)(()=>hf(lf.value)),_f=(0,e.computed)(()=>df.target===`component`?gf.value:void 0);function vf(e){uf.value=e.matches}function yf(){if(!(pf||typeof window>`u`)){if(pf=!0,df.persist){let e=localStorage.getItem(cf);e&&(lf.value=e)}mf=window.matchMedia(`(prefers-color-scheme: dark)`),uf.value=mf.matches,mf.addEventListener(`change`,vf)}}typeof window<`u`&&((0,e.watch)([gf,()=>df.target],([e])=>{df.target===`html`?document.documentElement.setAttribute(`data-theme`,e):document.documentElement.removeAttribute(`data-theme`)},{immediate:!0}),(0,e.watch)(lf,e=>{df.persist&&localStorage.setItem(cf,e)}));function bf(t){return t&&!ff&&(ff=!0,t.target&&(df.target=t.target),t.persist!==void 0&&(df.persist=t.persist)),(0,e.onMounted)(yf),{theme:lf,resolvedTheme:gf,setTheme:e=>{lf.value=e},toggleTheme:()=>{lf.value=gf.value===`dark`?`light`:`dark`}}}var xf=[{key:`--ai-chat-color-accent-500`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 500`,type:`color`,light:`#6366f1`},{key:`--ai-chat-color-accent-600`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 600`,type:`color`,light:`#4f46e5`},{key:`--ai-chat-color-accent-400`,layer:`primitive`,group:`原始·主色色阶`,label:`主色 400`,type:`color`,light:`#818cf8`},{key:`--ai-chat-neutral-0`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 0`,type:`color`,light:`#ffffff`},{key:`--ai-chat-neutral-50`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 50`,type:`color`,light:`#f9fafb`},{key:`--ai-chat-neutral-100`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 100`,type:`color`,light:`#f3f4f6`},{key:`--ai-chat-neutral-200`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 200`,type:`color`,light:`#e5e7eb`},{key:`--ai-chat-neutral-300`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 300`,type:`color`,light:`#d1d5db`},{key:`--ai-chat-neutral-500`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 500`,type:`color`,light:`#6b7280`},{key:`--ai-chat-neutral-600`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 600`,type:`color`,light:`#4b5563`},{key:`--ai-chat-neutral-700`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 700`,type:`color`,light:`#404040`},{key:`--ai-chat-neutral-800`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 800`,type:`color`,light:`#262626`},{key:`--ai-chat-neutral-900`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 900`,type:`color`,light:`#171717`},{key:`--ai-chat-neutral-950`,layer:`primitive`,group:`原始·中性灰阶`,label:`中性 950`,type:`color`,light:`#0a0a0a`},{key:`--ai-chat-color-danger-500`,layer:`primitive`,group:`原始·功能色`,label:`危险 500`,type:`color`,light:`#ef4444`},{key:`--ai-chat-radius-sm`,layer:`primitive`,group:`原始·圆角`,label:`圆角 sm`,type:`size`,light:`6px`,unit:`px`,min:0,max:24},{key:`--ai-chat-radius-md`,layer:`primitive`,group:`原始·圆角`,label:`圆角 md`,type:`size`,light:`8px`,unit:`px`,min:0,max:24},{key:`--ai-chat-radius-lg`,layer:`primitive`,group:`原始·圆角`,label:`圆角 lg`,type:`size`,light:`12px`,unit:`px`,min:0,max:32},{key:`--ai-chat-radius-xl`,layer:`primitive`,group:`原始·圆角`,label:`圆角 xl`,type:`size`,light:`16px`,unit:`px`,min:0,max:40},{key:`--ai-chat-font-sans`,layer:`primitive`,group:`原始·字体`,label:`正文字体`,type:`font`,light:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif`},{key:`--ai-chat-font-mono`,layer:`primitive`,group:`原始·字体`,label:`等宽字体`,type:`font`,light:`'SF Mono', 'Fira Code', 'Consolas', monospace`},{key:`--ai-chat-duration-fast`,layer:`primitive`,group:`原始·动画`,label:`动画 快`,type:`duration`,light:`0.12s`,unit:`s`,min:0,max:1},{key:`--ai-chat-duration-normal`,layer:`primitive`,group:`原始·动画`,label:`动画 常规`,type:`duration`,light:`0.2s`,unit:`s`,min:0,max:1},{key:`--ai-chat-easing`,layer:`primitive`,group:`原始·动画`,label:`缓动函数`,type:`text`,light:`ease`},{key:`--ai-chat-sidebar-width`,layer:`primitive`,group:`原始·尺寸`,label:`侧边栏宽`,type:`size`,light:`260px`,unit:`px`,min:200,max:400},{key:`--ai-chat-content-max-width`,layer:`primitive`,group:`原始·尺寸`,label:`内容最大宽`,type:`size`,light:`768px`,unit:`px`,min:480,max:1200},{key:`--ai-chat-input-max-height`,layer:`primitive`,group:`原始·尺寸`,label:`输入框最大高`,type:`size`,light:`200px`,unit:`px`,min:80,max:600},{key:`--ai-chat-avatar-size`,layer:`primitive`,group:`原始·尺寸`,label:`头像大小`,type:`size`,light:`30px`,unit:`px`,min:20,max:64},{key:`--ai-chat-btn-icon-size`,layer:`primitive`,group:`原始·尺寸`,label:`图标按钮`,type:`size`,light:`36px`,unit:`px`,min:24,max:56},{key:`--ai-chat-btn-tool-size`,layer:`primitive`,group:`原始·尺寸`,label:`工具按钮`,type:`size`,light:`32px`,unit:`px`,min:20,max:48},{key:`--ai-chat-msg-gap`,layer:`primitive`,group:`原始·尺寸`,label:`消息间距`,type:`size`,light:`16px`,unit:`px`,min:0,max:48},{key:`--ai-chat-msg-padding-y`,layer:`primitive`,group:`原始·尺寸`,label:`消息纵向内边距`,type:`size`,light:`20px`,unit:`px`,min:0,max:48},{key:`--ai-chat-content-max-width-wide`,layer:`primitive`,group:`原始·尺寸`,label:`宽屏内容最大宽`,type:`size`,light:`1024px`,unit:`px`,min:768,max:1600},{key:`--ai-chat-message-max-width`,layer:`primitive`,group:`原始·尺寸`,label:`消息气泡最大宽`,type:`size`,light:`480px`,unit:`px`,min:240,max:960},{key:`--ai-chat-input-max-height-mobile`,layer:`primitive`,group:`原始·尺寸`,label:`移动端输入框最大高`,type:`size`,light:`120px`,unit:`px`,min:60,max:240},{key:`--ai-chat-z-toast`,layer:`primitive`,group:`原始·尺寸`,label:`Toast 层级`,type:`size`,light:`1000`,unit:``,min:0,max:2e3},{key:`--ai-chat-z-popup`,layer:`primitive`,group:`原始·尺寸`,label:`弹层层级`,type:`size`,light:`1000`,unit:``,min:0,max:2e3},{key:`--ai-chat-breakpoint-sm`,layer:`primitive`,group:`原始·断点`,label:`小屏断点 sm`,type:`size`,light:`480px`,unit:`px`,min:320,max:640},{key:`--ai-chat-breakpoint-md`,layer:`primitive`,group:`原始·断点`,label:`中屏断点 md`,type:`size`,light:`640px`,unit:`px`,min:480,max:1024},{key:`--ai-chat-breakpoint-lg`,layer:`primitive`,group:`原始·断点`,label:`大屏断点 lg`,type:`size`,light:`1024px`,unit:`px`,min:768,max:1280},{key:`--ai-chat-breakpoint-xl`,layer:`primitive`,group:`原始·断点`,label:`超大屏断点 xl`,type:`size`,light:`1280px`,unit:`px`,min:1024,max:1920},{key:`--ai-chat-color-accent`,layer:`semantic`,group:`语义·强调`,label:`主色`,type:`color`,light:`var(--ai-chat-color-accent-500)`,derived:!0,ref:`--ai-chat-color-accent-500`},{key:`--ai-chat-color-accent-hover`,layer:`semantic`,group:`语义·强调`,label:`主色 hover`,type:`color`,light:`var(--ai-chat-color-accent-400)`,derived:!0,ref:`--ai-chat-color-accent-400`},{key:`--ai-chat-color-text-on-accent`,layer:`semantic`,group:`语义·强调`,label:`主色上的文字`,type:`color`,light:`#ffffff`},{key:`--ai-chat-color-accent-dim`,layer:`semantic`,group:`语义·强调`,label:`主色淡底`,type:`text`,light:`rgba(99, 102, 241, 0.15)`,dark:`rgba(99, 102, 241, 0.2)`},{key:`--ai-chat-color-bg-primary`,layer:`semantic`,group:`语义·背景`,label:`主背景`,type:`color`,light:`var(--ai-chat-neutral-0)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-secondary`,layer:`semantic`,group:`语义·背景`,label:`次背景`,type:`color`,light:`var(--ai-chat-neutral-50)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-chat`,layer:`semantic`,group:`语义·背景`,label:`聊天区背景`,type:`color`,light:`var(--ai-chat-neutral-0)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar`,layer:`semantic`,group:`语义·背景`,label:`侧边栏背景`,type:`color`,light:`var(--ai-chat-neutral-50)`,dark:`var(--ai-chat-neutral-900)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar-hover`,layer:`semantic`,group:`语义·背景`,label:`侧边栏悬停`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-bg-sidebar-active`,layer:`semantic`,group:`语义·背景`,label:`侧边栏选中`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2a2a2a`},{key:`--ai-chat-color-text-primary`,layer:`semantic`,group:`语义·文本`,label:`主文本`,type:`color`,light:`var(--ai-chat-neutral-900)`,dark:`var(--ai-chat-neutral-50)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-text-secondary`,layer:`semantic`,group:`语义·文本`,label:`次文本`,type:`color`,light:`var(--ai-chat-neutral-600)`,dark:`#a1a1aa`},{key:`--ai-chat-color-text-muted`,layer:`semantic`,group:`语义·文本`,label:`弱文本`,type:`color`,light:`#9ca3af`,dark:`#71717a`},{key:`--ai-chat-color-sidebar-text`,layer:`semantic`,group:`语义·文本`,label:`侧边栏文本`,type:`color`,light:`var(--ai-chat-neutral-500)`,dark:`#a1a1aa`},{key:`--ai-chat-color-sidebar-text-active`,layer:`semantic`,group:`语义·文本`,label:`侧边栏选中文本`,type:`color`,light:`var(--ai-chat-neutral-900)`,dark:`var(--ai-chat-neutral-50)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-border`,layer:`semantic`,group:`语义·边框`,label:`边框`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2e2e2e`},{key:`--ai-chat-color-sidebar-border`,layer:`semantic`,group:`语义·边框`,label:`侧边栏边框`,type:`color`,light:`var(--ai-chat-neutral-200)`,dark:`#2e2e2e`},{key:`--ai-chat-scrollbar-thumb`,layer:`semantic`,group:`语义·边框`,label:`滚动条拇指`,type:`color`,light:`var(--ai-chat-neutral-300)`,dark:`var(--ai-chat-neutral-700)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-scrollbar-track`,layer:`semantic`,group:`语义·边框`,label:`滚动条轨道`,type:`text`,light:`transparent`},{key:`--ai-chat-color-input-bg`,layer:`semantic`,group:`语义·输入`,label:`输入框背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#2f2f2f`},{key:`--ai-chat-color-input-border`,layer:`semantic`,group:`语义·输入`,label:`输入框边框`,type:`color`,light:`var(--ai-chat-neutral-300)`,dark:`var(--ai-chat-neutral-700)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-input-focus-border`,layer:`semantic`,group:`语义·输入`,label:`输入框聚焦边框`,type:`color`,light:`var(--ai-chat-color-accent-500)`,derived:!0,ref:`--ai-chat-color-accent-500`},{key:`--ai-chat-color-msg-user-bg`,layer:`semantic`,group:`语义·消息`,label:`用户消息背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#2f2f2f`},{key:`--ai-chat-color-msg-assistant-bg`,layer:`semantic`,group:`语义·消息`,label:`AI 消息背景`,type:`text`,light:`transparent`},{key:`--ai-chat-color-code-bg`,layer:`semantic`,group:`语义·代码`,label:`代码块背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`var(--ai-chat-neutral-800)`,derived:!0,ref:`中性阶`},{key:`--ai-chat-color-code-header-bg`,layer:`semantic`,group:`语义·代码`,label:`代码块头背景`,type:`color`,light:`var(--ai-chat-neutral-100)`,dark:`#242427`},{key:`--ai-chat-color-code-inline-bg`,layer:`semantic`,group:`语义·代码`,label:`行内代码背景`,type:`text`,light:`rgba(0, 0, 0, 0.06)`,dark:`rgba(255, 255, 255, 0.06)`},{key:`--ai-chat-color-status-error`,layer:`semantic`,group:`语义·状态`,label:`错误`,type:`color`,light:`#ef4444`,dark:`#f87171`},{key:`--ai-chat-color-status-warning`,layer:`semantic`,group:`语义·状态`,label:`警告`,type:`color`,light:`#f59e0b`,dark:`#fbbf24`},{key:`--ai-chat-color-status-success`,layer:`semantic`,group:`语义·状态`,label:`成功`,type:`color`,light:`#10b981`,dark:`#34d399`},{key:`--ai-chat-hover-neutral`,layer:`semantic`,group:`语义·交互`,label:`中性悬停`,type:`text`,light:`rgba(128, 128, 128, 0.15)`},{key:`--ai-chat-bubble-radius`,layer:`component`,group:`组件·消息`,label:`气泡圆角`,type:`color`,light:`var(--ai-chat-radius-lg)`,derived:!0,ref:`--ai-chat-radius-lg`}],Sf=[[`contentMaxWidth`,`--ai-chat-content-max-width`],[`contentMaxWidthWide`,`--ai-chat-content-max-width-wide`],[`messageMaxWidth`,`--ai-chat-message-max-width`],[`inputMaxHeight`,`--ai-chat-input-max-height`],[`inputMaxHeightMobile`,`--ai-chat-input-max-height-mobile`],[`breakpointSm`,`--ai-chat-breakpoint-sm`],[`breakpointMd`,`--ai-chat-breakpoint-md`],[`breakpointLg`,`--ai-chat-breakpoint-lg`],[`breakpointXl`,`--ai-chat-breakpoint-xl`]];function Cf(t){let n=(0,e.computed)(()=>(0,e.toValue)(t));return{vars:(0,e.computed)(()=>{let e=n.value,t={};for(let[n,r]of Sf){let i=e[n];typeof i==`number`&&(t[r]=`${i}px`)}return t}),layoutProps:(0,e.computed)(()=>({layout:n.value.layout,messageAlign:n.value.messageAlign})),state:n}}function wf(n=1500){let r=(0,e.ref)(!1),i=null;function a(){i!==null&&(clearTimeout(i),i=null)}async function o(e){let o;try{o=await(0,t.copyText)(e)}catch{o=!1}return o&&(r.value=!0,a(),i=setTimeout(()=>{r.value=!1,i=null},n)),o}return(0,e.getCurrentScope)()&&(0,e.onScopeDispose)(a),{copied:r,copy:o}}function Tf(e){if(e?.aborted)throw new DOMException(`图片压缩已取消`,`AbortError`)}function Ef(e){return e!==void 0&&Number.isFinite(e)&&e>0?e:t.DEFAULT_IMAGE_MAX_SIDE}async function Df(e,n={}){if(Tf(n.signal),!e.type.startsWith(`image/`))throw Error(`仅支持图片文件,已忽略:${e.name||e.type||`未知文件`}`);let r=n.deps?.decodeImage??(e=>createImageBitmap(e)),i;try{i=await r(e)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)throw e;let t=e instanceof Error?e.message:String(e),n=Error(`图片解码失败,请确认文件完整(${t})`);throw n.cause=e,n}try{if(Tf(n.signal),!Number.isFinite(i.width)||!Number.isFinite(i.height)||i.width<=0||i.height<=0)throw Error(`无法读取图片尺寸,文件可能已损坏`);let e=(0,t.computeScaledSize)(i.width,i.height,Ef(n.maxSide)),r=(n.deps?.createCanvas??(()=>document.createElement(`canvas`)))();r.width=e.width,r.height=e.height;let a=r.getContext(`2d`);if(!a)throw Error(`当前环境不支持 canvas 2d 绘制`);return a.fillStyle=`#ffffff`,a.fillRect(0,0,e.width,e.height),a.drawImage(i,0,0,e.width,e.height),r.toDataURL(`image/jpeg`,(0,t.clampImageQuality)(n.quality))}finally{let e=i;typeof e.close==`function`&&e.close()}}exports.Attachment=ou,exports.AttachmentEmpty=gu,exports.AttachmentInfo=pu,exports.AttachmentPreview=lu,exports.AttachmentRemove=mu,exports.Attachments=iu,exports.BranchPicker=Us,exports.Button=c,exports.ComparisonMessage=ru,exports.Conversation=ao,exports.ConversationContent=so,exports.ConversationEmpty=ho,exports.ConversationScrollBtn=vo,exports.GenUIRenderer=Wo,exports.ImageLightbox=ml,exports.InlineCitation=Fu,exports.Input=u,exports.JsonDiffView=Qa,exports.LanguageToggle=Ma,exports.Message=Do,exports.MessageAction=ws,exports.MessageActionCopy=qs,exports.MessageActionEdit=cc,exports.MessageActionFeedback=uc,exports.MessageActionRetry=Js,exports.MessageActionSpeak=rc,exports.MessageActions=xs,exports.MessageAttachments=Os,exports.MessageContent=_s,exports.MessageFeedback=Is,exports.ModelIcon=La,exports.PlanActions=dd,exports.PromptInput=Ac,exports.PromptInputAttachments=Ml,exports.PromptInputBody=Pc,exports.PromptInputButton=Jc,exports.PromptInputFooter=Hc,exports.PromptInputHeader=Bl,exports.PromptInputMicButton=nl,exports.PromptInputSubmit=Il,exports.PromptInputSuggestion=Jl,exports.PromptInputTextarea=Ic,exports.PromptInputTools=Kc,exports.PromptInputUploadButton=sl,exports.Prompts=Ed,exports.ProviderSettingsDialog=sf,exports.Radio=h,exports.Select=f,exports.Shimmer=g,exports.Sources=ed,exports.StreamText=i,exports.ThinkingBlock=jo,exports.ThinkingChain=wc,exports.Toast=Ta,exports.ToolCall=ps,exports.ToolCallContent=ls,exports.ToolCallHeader=Zo,exports.ToolCallInput=ts,exports.ToolCallOutput=ss,exports.ToolConfirmation=Tu,exports.WeatherCard=ad,exports.Welcome=vd,exports.aiChatI18n=$,exports.componentTheme=_f,exports.compressImageToDataUrl=Df,exports.filterSuggestions=Ul,exports.getInitialLocale=ha,exports.isSafeHttpUrl=Io,exports.markdownRendererKey=yo,exports.parseSuggestion=Hl,exports.presets=eo,exports.provideMarkdownRenderer=bo,exports.registerGenuiComponent=No,exports.resolveGenuiComponent=Po,exports.resolvedTheme=gf,exports.sanitizeGenuiProps=Ho,exports.setAiChatLocale=ga,exports.splitSentences=Zs,exports.tokensMeta=xf,exports.unregisterGenuiComponent=Fo,exports.useClipboard=wf,exports.useLayoutConfig=Cf,exports.useMarkdownRenderer=xo,exports.useScrollAnchor=$a,exports.useSpeechInput=Xc,exports.useSpeechOutput=ec,exports.useTheme=bf,exports.useThemePreset=to;