@runtypelabs/persona 4.31.0 → 4.32.1

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 (141) hide show
  1. package/dist/activity-ui.cjs +2 -2
  2. package/dist/activity-ui.d.cts +11 -3
  3. package/dist/activity-ui.d.ts +11 -3
  4. package/dist/activity-ui.js +1 -1
  5. package/dist/animations/glyph-cycle.d.cts +1 -1
  6. package/dist/animations/glyph-cycle.d.ts +1 -1
  7. package/dist/animations/wipe.d.cts +1 -1
  8. package/dist/animations/wipe.d.ts +1 -1
  9. package/dist/approval-ui.d.cts +2 -2
  10. package/dist/approval-ui.d.ts +2 -2
  11. package/dist/artifacts-ui.d.cts +3 -3
  12. package/dist/artifacts-ui.d.ts +3 -3
  13. package/dist/background-runtime.d.cts +1 -1
  14. package/dist/background-runtime.d.ts +1 -1
  15. package/dist/{chunk-BrptyKSq.js → chunk-B3l7TOOv.js} +1 -1
  16. package/dist/chunk-B4ecQzeK.js +2 -0
  17. package/dist/{chunk-BWCo3rCm.js → chunk-B_H0l3u2.js} +1 -1
  18. package/dist/{chunk-MdlQetfC.js → chunk-BbXc58OA.js} +1 -1
  19. package/dist/chunk-BkOYJ11B.js +1 -0
  20. package/dist/{chunk-DE0cSmku.js → chunk-BpjtKnGI.js} +1 -1
  21. package/dist/{chunk-Co4LmTFv.js → chunk-C9uOhfk5.js} +1 -1
  22. package/dist/{chunk-CHAwCqpk.js → chunk-CdpVP6LZ.js} +1 -1
  23. package/dist/{chunk-WA9UucGf.js → chunk-CumoXK3u.js} +1 -1
  24. package/dist/{chunk-BBtVdcKU.js → chunk-DM-OJt5q.js} +1 -1
  25. package/dist/{chunk-Cb7qy0c7.js → chunk-DNdeIFJ6.js} +1 -1
  26. package/dist/{chunk-VaT6xry9.js → chunk-DTGvDx8o.js} +1 -1
  27. package/dist/{chunk-ezlpsYGk.js → chunk-DVZ8ri1z.js} +1 -1
  28. package/dist/{chunk-DhedQnek.js → chunk-DgZZqy14.js} +1 -1
  29. package/dist/{chunk-C2IbR39s.js → chunk-UWMfWW2a.js} +1 -1
  30. package/dist/client-dispatch.js +1 -1
  31. package/dist/client-history.js +1 -1
  32. package/dist/codegen.cjs +1 -1
  33. package/dist/codegen.js +1 -1
  34. package/dist/composer-actions-runtime.d.cts +2 -2
  35. package/dist/composer-actions-runtime.d.ts +2 -2
  36. package/dist/{composer-input-C2_WizXV.d.cts → composer-input-dwg_o9Z-.d.cts} +1 -1
  37. package/dist/{composer-input-C2_WizXV.d.ts → composer-input-dwg_o9Z-.d.ts} +1 -1
  38. package/dist/{composer-store-BV6kTlKv.d.cts → composer-store-Dw7Zbqxr.d.cts} +1 -1
  39. package/dist/{composer-store-BV6kTlKv.d.ts → composer-store-Dw7Zbqxr.d.ts} +1 -1
  40. package/dist/{context-mention-manager-BfZzcydV.d.cts → context-mention-manager-D2p0-JH-.d.cts} +2 -2
  41. package/dist/{context-mention-manager-BfZzcydV.d.ts → context-mention-manager-D2p0-JH-.d.ts} +2 -2
  42. package/dist/context-mentions-inline.d.cts +2 -2
  43. package/dist/context-mentions-inline.d.ts +2 -2
  44. package/dist/context-mentions.d.cts +3 -3
  45. package/dist/context-mentions.d.ts +3 -3
  46. package/dist/{defaults-DiTeXyr3.d.cts → defaults-CjX0kKzb.d.cts} +1 -1
  47. package/dist/{defaults-DiTeXyr3.d.ts → defaults-CjX0kKzb.d.ts} +1 -1
  48. package/dist/dictation-runtime.d.cts +2 -2
  49. package/dist/dictation-runtime.d.ts +2 -2
  50. package/dist/event-stream-view.d.cts +1 -1
  51. package/dist/event-stream-view.d.ts +1 -1
  52. package/dist/{fallback-speech-engine-DZ6Of7VU.d.cts → fallback-speech-engine-DmF7MczI.d.cts} +1 -1
  53. package/dist/{fallback-speech-engine-DZ6Of7VU.d.ts → fallback-speech-engine-DmF7MczI.d.ts} +1 -1
  54. package/dist/{feature-preferences-BT549D_E.d.cts → feature-preferences-CVFDt9Xf.d.cts} +1 -1
  55. package/dist/{feature-preferences-BT549D_E.d.ts → feature-preferences-CVFDt9Xf.d.ts} +1 -1
  56. package/dist/forms-ui.d.cts +2 -2
  57. package/dist/forms-ui.d.ts +2 -2
  58. package/dist/{history-confirm-dialog-Cm4oK4am.d.cts → history-confirm-dialog-DJEXsTyE.d.cts} +1 -1
  59. package/dist/{history-confirm-dialog-Cm4oK4am.d.ts → history-confirm-dialog-DJEXsTyE.d.ts} +1 -1
  60. package/dist/history-shell.d.cts +6 -6
  61. package/dist/history-shell.d.ts +6 -6
  62. package/dist/history-view.d.cts +1 -1
  63. package/dist/history-view.d.ts +1 -1
  64. package/dist/index.cjs +11 -10
  65. package/dist/index.cjs.map +1 -1
  66. package/dist/index.d.cts +9 -9
  67. package/dist/index.d.ts +9 -9
  68. package/dist/index.global.js +1 -1
  69. package/dist/index.global.js.map +1 -1
  70. package/dist/index.js +23 -22
  71. package/dist/index.js.map +1 -1
  72. package/dist/launcher.global.js +1 -1
  73. package/dist/launcher.global.js.map +1 -1
  74. package/dist/{loading-label-runtime-loader-DmiPDkBu.d.cts → loading-label-runtime-loader-CPxnoaoi.d.cts} +1 -1
  75. package/dist/{loading-label-runtime-loader-DmiPDkBu.d.ts → loading-label-runtime-loader-CPxnoaoi.d.ts} +1 -1
  76. package/dist/loading-label-runtime.d.cts +1 -1
  77. package/dist/loading-label-runtime.d.ts +1 -1
  78. package/dist/{message-bubble-D0rosKuK.d.cts → message-bubble-CkZGlCLC.d.cts} +1 -1
  79. package/dist/{message-bubble-D0rosKuK.d.ts → message-bubble-CkZGlCLC.d.ts} +1 -1
  80. package/dist/preferences-runtime.d.cts +1 -1
  81. package/dist/preferences-runtime.d.ts +1 -1
  82. package/dist/{preview-DRU27q-X.d.cts → preview-DdUvoLb4.d.cts} +2 -2
  83. package/dist/{preview-DRU27q-X.d.ts → preview-DdUvoLb4.d.ts} +2 -2
  84. package/dist/{registry-DRk3VMFc.d.cts → registry-Dz4iHNST.d.cts} +1 -1
  85. package/dist/{registry-DRk3VMFc.d.ts → registry-Dz4iHNST.d.ts} +1 -1
  86. package/dist/{session-Dj4bOm5y.d.cts → session-Baxp9iRK.d.cts} +14 -8
  87. package/dist/{session-Dj4bOm5y.d.ts → session-Baxp9iRK.d.ts} +14 -8
  88. package/dist/session-reconnect.d.cts +2 -2
  89. package/dist/session-reconnect.d.ts +2 -2
  90. package/dist/smart-dom-reader.d.cts +1 -1
  91. package/dist/smart-dom-reader.d.ts +1 -1
  92. package/dist/theme-editor-preview.cjs +46 -45
  93. package/dist/theme-editor-preview.d.cts +1 -1
  94. package/dist/theme-editor-preview.d.ts +1 -1
  95. package/dist/theme-editor-preview.js +19 -18
  96. package/dist/theme-editor.cjs +1 -1
  97. package/dist/theme-editor.d.cts +2 -2
  98. package/dist/theme-editor.d.ts +2 -2
  99. package/dist/theme-editor.js +1 -1
  100. package/dist/theme-reference.cjs +1 -1
  101. package/dist/theme-reference.d.cts +2 -2
  102. package/dist/theme-reference.d.ts +2 -2
  103. package/dist/theme-reference.js +1 -1
  104. package/dist/{tool-loading-animation-D1MS5Ace.d.cts → tool-loading-animation-un3kA5Ur.d.cts} +1 -1
  105. package/dist/{tool-loading-animation-D1MS5Ace.d.ts → tool-loading-animation-un3kA5Ur.d.ts} +1 -1
  106. package/dist/{turn-activity-ui-CorwdlI0.d.cts → turn-activity-ui-BGNhtMcH.d.cts} +2 -2
  107. package/dist/{turn-activity-ui-CorwdlI0.d.ts → turn-activity-ui-BGNhtMcH.d.ts} +2 -2
  108. package/dist/turn-activity-ui.d.cts +1 -1
  109. package/dist/turn-activity-ui.d.ts +1 -1
  110. package/dist/{types-CSXHl5cN.d.cts → types-BOZHQIk0.d.cts} +8 -1
  111. package/dist/{types-CSXHl5cN.d.ts → types-BOZHQIk0.d.ts} +8 -1
  112. package/dist/voice-client-tools.d.cts +1 -1
  113. package/dist/voice-client-tools.d.ts +1 -1
  114. package/dist/voice-runtime.cjs +1 -1
  115. package/dist/voice-runtime.d.cts +2 -2
  116. package/dist/voice-runtime.d.ts +2 -2
  117. package/dist/voice-runtime.js +1 -1
  118. package/dist/voice-worklet-player.d.cts +2 -2
  119. package/dist/voice-worklet-player.d.ts +2 -2
  120. package/dist/{webmcp-runtime-entry-DpDN6k-6.d.cts → webmcp-runtime-entry-DuAG1_yF.d.cts} +1 -1
  121. package/dist/{webmcp-runtime-entry-DpDN6k-6.d.ts → webmcp-runtime-entry-DuAG1_yF.d.ts} +1 -1
  122. package/dist/webmcp-runtime.d.cts +1 -1
  123. package/dist/webmcp-runtime.d.ts +1 -1
  124. package/dist/widget.css +1 -1
  125. package/package.json +1 -1
  126. package/src/activity-ui.ts +23 -0
  127. package/src/components/disclosure-animation.ts +5 -0
  128. package/src/components/tool-bubble.ts +1 -0
  129. package/src/index-core.ts +1 -0
  130. package/src/styles/widget.css +18 -0
  131. package/src/types.ts +8 -0
  132. package/src/ui.footer-visibility.test.ts +54 -0
  133. package/src/ui.reveal-tool-call.test.ts +258 -0
  134. package/src/ui.ts +127 -5
  135. package/src/utils/brand.test.ts +50 -0
  136. package/src/utils/brand.ts +6 -2
  137. package/src/utils/tokens.ts +2 -1
  138. package/src/utils/tool-activity-summary.test.ts +8 -0
  139. package/src/utils/tool-activity-summary.ts +2 -1
  140. package/dist/chunk-B3OrH9Ng.js +0 -2
  141. package/dist/chunk-CjhA_5Jk.js +0 -1
@@ -1 +1 @@
1
- var e,t,a,o,r,l,s,i,n,c,d,p,u,m,h,g,f,b,y;function v(e,t){if(!e)return t;if(!t)return e;let a={...e};for(let[e,o]of Object.entries(t)){let t=a[e];a[e]=l(t)&&l(o)?v(t,o):o}return a}function w(e){return!0===e?.future?.v5Defaults?"v5":"v4"}function x(e){let t="v5"===w(e)?u:p;return v(d,t)}function k(e,t){let a={...e};for(let[e,o]of Object.entries(t)){let t=a[e];a[e]=t&&"object"==typeof t&&!Array.isArray(t)&&o&&"object"==typeof o&&!Array.isArray(o)?k(t,o):o}return a}function S(e,t={}){let a=Ye(t.future),o=e?.components,r={palette:{...a.palette,...e?.palette,colors:{...a.palette.colors,...e?.palette?.colors},spacing:{...a.palette.spacing,...e?.palette?.spacing},typography:{...a.palette.typography,...e?.palette?.typography},shadows:{...a.palette.shadows,...e?.palette?.shadows},borders:{...a.palette.borders,...e?.palette?.borders},radius:{...a.palette.radius,...e?.palette?.radius}},semantic:{...a.semantic,...e?.semantic,colors:{...a.semantic.colors,...e?.semantic?.colors,interactive:{...a.semantic.colors.interactive,...e?.semantic?.colors?.interactive},feedback:{...a.semantic.colors.feedback,...e?.semantic?.colors?.feedback}},spacing:{...a.semantic.spacing,...e?.semantic?.spacing},typography:{...a.semantic.typography,...e?.semantic?.typography}},components:o?k(a.components,o):a.components},l=o?.activity;for(let e of["toolBubble","reasoningBubble"]){let t=r.components[e]={...r.components[e]};for(let a of["rowHeight","labelSize","iconSize","indent","bodySurface"])void 0!==l?.[a]&&("bodySurface"!==a||void 0===o?.[e]?.bodySurface)&&(t[a]=l[a])}let s=o?.collapsibleWidget?.surface;"v4"===w(t)&&void 0!==s&&void 0===l?.bodySurface&&(r.components.activity={...r.components.activity,bodySurface:s});let i=o?.header;void 0!==i?.padding&&void 0===i.minimalPadding&&(r.components.header.minimalPadding=r.components.header.padding);let n=o?.composer;r.components.composer={...r.components.composer},void 0!==n?.padding&&void 0===n.expandedPadding&&(r.components.composer.expandedPadding=n.padding),void 0!==o?.input?.borderRadius&&void 0===n?.expandedBorderRadius&&(r.components.composer.expandedBorderRadius=o.input.borderRadius);let c=o?.message;if(void 0!==c?.gap&&void 0===c.fullscreenGap&&(r.components.message.fullscreenGap=r.components.message.gap),!1!==t.validate){let e=function(e){let t=[],a=[];return e.palette||t.push({path:"palette",message:"Theme must include a palette",severity:"error"}),e.semantic||a.push({path:"semantic",message:"No semantic tokens defined - defaults will be used",severity:"warning"}),e.components||a.push({path:"components",message:"No component tokens defined - defaults will be used",severity:"warning"}),{valid:0===t.length,errors:t,warnings:a}}(r);if(!e.valid)throw Error(`Theme validation failed: ${e.errors.map(e=>e.message).join(", ")}`)}if(t.plugins)for(let e of t.plugins)r=e.transform(r);return r}function C(e,t){let a=t.split("."),o=e;for(let e of a){if(null==o)return;o=o[e]}return o}function T(e,t,a){let o=t.split(".");if(1===o.length)return{...e,[o[0]]:a};let[r,...l]=o,s=e;return{...s,[r]:T(s?.[r]??{},l.join("."),a)}}function A(e,t){let a=t.split(".");if(1===a.length){let t={...e};return delete t[a[0]],t}let[o,...r]=a,l=e,s=A(l?.[o]??{},r.join(".")),i={...l};return"object"==typeof s&&s&&!Array.isArray(s)&&0===Object.keys(s).length?delete i[o]:i[o]=s,i}function B(e){return Array.isArray(e)?e.map(B):e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,B(t)])):e}function I(e,t){if(Object.is(e,t))return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let a=Object.keys(e),o=Object.keys(t);return a.length===o.length&&a.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&I(e[a],t[a]))}function M(e){let t=e.trim();if("9999px"===t)return{value:100,unit:"px"};let a=t.match(/^([\d.]+)(px|rem)$/);if(!a){let e=parseFloat(t);return{value:isNaN(e)?0:e,unit:"px"}}return{value:parseFloat(a[1]),unit:a[2]}}function R(e,t){return"rem"===t?`${e}rem`:`${e}px`}function V(e,t){return"rem"===t?16*e:e}function E(e,t){return"rem"===t?e/16:e}function P(e){if(!e)return"#000000";let t=e.trim().toLowerCase();return"transparent"===t?"transparent":t.startsWith("rgba")||t.startsWith("rgb")?t:t.startsWith("#")?4===t.length?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t:`#${t}`}function $(e){return/^#[0-9A-Fa-f]{6}$/.test(e)}function O(e){let t=e.trim().toLowerCase().match(/^rgba?\(([^)]+)\)$/);if(!t)return null;let a=t[1].split(",").map(e=>e.trim());if(a.length<3)return null;let o=e=>{let t=e.endsWith("%"),a=parseFloat(t?e.slice(0,-1):e);return Number.isFinite(a)?Math.max(0,Math.min(255,Math.round(t?a/100*255:a))):NaN},r=o(a[0]),l=o(a[1]),s=o(a[2]);if(!Number.isFinite(r)||!Number.isFinite(l)||!Number.isFinite(s))return null;let i=e=>e.toString(16).padStart(2,"0");return`#${i(r)}${i(l)}${i(s)}`}function F(e,t){let a=e=>{let t=P(e),a=t.startsWith("rgb")?O(t)??"#000000":t,o=[1,3,5].map(e=>{let t=parseInt(a.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*o[0]+.7152*o[1]+.0722*o[2]},o=a(e),r=a(t);return(Math.max(o,r)+.05)/(Math.min(o,r)+.05)}function L(e){let t=P(e),a=t.startsWith("rgb")?O(t)??"#000000":t,o=parseInt(a.slice(1,3),16)/255,r=parseInt(a.slice(3,5),16)/255,l=parseInt(a.slice(5,7),16)/255,s=Math.max(o,r,l),i=Math.min(o,r,l),n=(s+i)/2;if(s===i)return{h:0,s:0,l:n};let c,d=s-i,p=n>.5?d/(2-s-i):d/(s+i);switch(s){case o:c=((r-l)/d+(r<l?6:0))/6;break;case r:c=((l-o)/d+2)/6;break;default:c=((o-r)/d+4)/6}return{h:360*c,s:p,l:n}}function W(e,t,a){let o,r,l,s=(e%360+360)%360,i=(1-Math.abs(2*a-1))*t,n=i*(1-Math.abs(s/60%2-1)),c=a-i/2;[o,r,l]=s<60?[i,n,0]:s<120?[n,i,0]:s<180?[0,i,n]:s<240?[0,n,i]:s<300?[n,0,i]:[i,0,n];let d=e=>{let t=Math.round(255*(e+c)).toString(16);return 1===t.length?"0"+t:t};return`#${d(o)}${d(r)}${d(l)}`}function z(e){let{h:t,s:a,l:o}=L(e),r={50:.97,100:.94,200:.87,300:.77,400:.64,500:o,600:Math.max(.05,o-.1),700:Math.max(.05,o-.2),800:Math.max(.05,o-.28),900:Math.max(.05,o-.35),950:Math.max(.03,o-.42)},l={50:Math.min(1,.85*a),100:Math.min(1,.9*a),200:Math.min(1,.95*a),300:a,400:a,500:a,600:Math.min(1,1.05*a),700:Math.min(1,1.05*a),800:Math.min(1,1*a),900:Math.min(1,.95*a),950:Math.min(1,.9*a)},s={};for(let[e,a]of Object.entries(r)){let o=l[e];s[e]=W(t,o,a)}return s}function H(e,t){return`palette.colors.${e}.${t}`}function D(e,t,a=0){if(a>5)return"#cbd5e1";let o=e(t);return"string"==typeof o?o.startsWith("#")||o.startsWith("rgb")||"transparent"===o?o:o.startsWith("palette.")||o.startsWith("semantic.")||o.startsWith("components.")?D(e,`theme.${o}`,a+1):"#cbd5e1":"#cbd5e1"}function N(e){if(!e.startsWith("palette.")&&!e.startsWith("semantic."))return e;let t=e.split(".");if("palette"===t[0]&&"colors"===t[1]){let e=t[2],a=t[3];return`${e.charAt(0).toUpperCase()+e.slice(1)} ${a}`}return"semantic"===t[0]?t.slice(1).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):t[t.length-1]}function _(e,t,a){let o={},r="neutral"===e?"gray":e;for(let e of a.targets){let l=j(r,t,e,a.roleId);o[`theme.${e.path}`]=l,o[`darkTheme.${e.path}`]=l}if("role-primary-actions"===a.roleId){let e="solid"===t?`palette.colors.${r}.700`:`palette.colors.${r}.200`;o["theme.semantic.colors.interactive.hover"]=e,o["darkTheme.semantic.colors.interactive.hover"]=e}return o}function j(e,t,a,o){let r="solid"===t;if("role-header"===o)return function(e,t,a){let o=a.path;return o.endsWith(".background")?t?`palette.colors.${e}.500`:`palette.colors.${e}.${"gray"===e?"50":"100"}`:o.endsWith(".border")?t?`palette.colors.${e}.600`:`palette.colors.${e}.200`:o.endsWith(".iconBackground")?t?`palette.colors.${e}.${"gray"===e?"700":"600"}`:`palette.colors.${e}.500`:o.endsWith(".iconForeground")?`palette.colors.${e}.50`:o.endsWith(".foreground")||o.endsWith(".titleForeground")?t?`palette.colors.${e}.50`:`palette.colors.${e}.${"gray"===e?"900":"700"}`:(o.endsWith(".subtitleForeground")||o.endsWith(".actionIconForeground"))&&t?`palette.colors.${e}.200`:`palette.colors.${e}.500`}(e,r,a);if("role-input"===o)return function(e,t,a){let o=a.path;return o.endsWith(".background")?t?`palette.colors.${e}.${"gray"===e?"100":"50"}`:`palette.colors.${e}.50`:o.endsWith(".placeholder")?`palette.colors.${e}.400`:o.endsWith(".border")||o.endsWith(".ring")?t?`palette.colors.${e}.500`:`palette.colors.${e}.400`:`palette.colors.${e}.500`}(e,r,a);switch(a.kind){case"background":return r?`palette.colors.${e}.500`:`palette.colors.${e}.${"gray"===e?"50":"100"}`;case"foreground":return r?`palette.colors.${"gray"===e?"gray":e}.50`:`palette.colors.${"gray"===e?"gray":e}.900`;case"border":return r?`palette.colors.${e}.600`:`palette.colors.${e}.200`;case"accent":return r?`palette.colors.${e}.600`:`palette.colors.${e}.400`}}function U(e,t){let a=t.targets.find(e=>"background"===e.kind)??t.targets[0];if(!a)return null;let o=String(e(a.path)??"").match(dt);if(!o)return null;let r=o[1],l=Xe.includes(r)?r:null;if(!l)return null;for(let a of["solid","soft"]){let o=_(l,a,t);if(t.targets.every(t=>String(e(t.path)??"")===o[`theme.${t.path}`]))return{family:l,intensity:a}}return null}function q(){return{id:"brand-palette",title:"Brand Palette",description:"Define your color palette. Edit the base color (500) to auto-generate the full scale.",collapsed:!1,fields:Ze.map(e=>({id:`palette-${e}`,label:`${e.charAt(0).toUpperCase()+e.slice(1)}`,description:`${e} color palette (edit shade 500, auto-generate scale)`,type:"color-scale",path:`theme.palette.colors.${e}`,colorScale:{colorFamily:e}}))}}function G(e,t){let a=x({future:t}),o=Ye(t),r=e.path,l=r.startsWith("theme.")?r.slice(6):r.startsWith("darkTheme.")?r.slice(10):void 0,s=l?Pa(o,l):Pa(a,r);return void 0===s?e.defaultValue:s}function Y(e){return Ea.map(t=>({...t,sections:t.sections.map(t=>({...t,fields:t.fields.map(t=>({...t,defaultValue:G(t,e)}))}))}))}function J(e,t){return e.startsWith("theme.")?e.replace(/^theme\./,`${t}.`):e}function Z(e,t){let a=e.find(e=>e.id===t);if(!a)throw Error(`Section "${t}" not found in definitions`);return a}function K(e,t,a,o=e.collapsed){let r="light"===a?"Light":"Dark",l="light"===a?"Applies when the widget is in light mode.":"Applies when the widget is in dark mode.";return{...e,id:`${a}-${e.id}`,title:`${r} ${e.title}`,description:e.description?`${l} ${e.description}`:l,collapsed:o,fields:e.fields.map(e=>function(e,t,a){return{...e,id:`${a}-${e.id}`,path:J(e.path,t)}}(e,t,a)),presets:e.presets?.map(e=>({...e,id:`${a}-${e.id}`,values:Object.fromEntries(Object.entries(e.values).map(([e,a])=>[J(e,t),a]))}))}}function X(e){return Wa.find(t=>t.id===e)}function Q(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ee(e){return"dark"===e?{pageBg:"linear-gradient(180deg, #0f172a 0%, #020617 100%)",chromeBg:"#111827",chromeBorder:"#1f2937",dot:"#475569",skeleton:"#334155",cardBg:"#1e293b",cardBorder:"rgba(148, 163, 184, 0.16)"}:{pageBg:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)",chromeBg:"#ffffff",chromeBorder:"#e5e7eb",dot:"#cbd5e1",skeleton:"#e2e8f0",cardBg:"#e2e8f0",cardBorder:"rgba(148, 163, 184, 0.18)"}}function te(e){let t=ee(e);return`* { box-sizing: border-box; }\n html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }\n html { color-scheme: ${e}; }\n body { font-family: system-ui, sans-serif; background: ${t.pageBg}; }\n .preview-iframe-mock { min-height: 100%; }\n .preview-iframe-chrome { height: 44px; border-bottom: 1px solid ${t.chromeBorder}; background: ${t.chromeBg}; display: flex; align-items: center; gap: 8px; padding: 0 14px; }\n .preview-iframe-dot { width: 10px; height: 10px; border-radius: 50%; background: ${t.dot}; }\n .preview-iframe-copy { padding: 32px; }\n .preview-iframe-line { border-radius: 999px; background: ${t.skeleton}; margin-bottom: 12px; }\n .preview-iframe-line.hero { width: 48%; height: 16px; }\n .preview-iframe-line.body { width: 72%; height: 10px; }\n .preview-iframe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }\n .preview-iframe-card { height: 84px; border-radius: 14px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-shell { height: 100%; min-height: 100%; display: flex; flex-direction: column; }\n .preview-workspace-topbar { height: 52px; flex-shrink: 0; border-bottom: 1px solid ${t.chromeBorder}; background: ${t.chromeBg}; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }\n .preview-workspace-topbar-left { display: flex; align-items: center; gap: 12px; }\n .preview-workspace-topbar-badge { width: 18px; height: 18px; border-radius: 6px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-topbar-line { width: 180px; height: 10px; border-radius: 999px; background: ${t.skeleton}; }\n .preview-workspace-topbar-pill { width: 64px; height: 28px; border-radius: 999px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-body { flex: 1; min-height: 0; display: flex; padding: 20px; }\n .preview-workspace-content { position: relative; display: flex; flex-direction: column; flex: 1; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; border-radius: 24px; background: rgba(255,255,255,0.72); box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-content-shell { position: relative; z-index: 1; flex: 1 1 auto; min-height: 100%; padding: 24px; }\n .preview-workspace-row { display: flex; gap: 16px; margin-top: 20px; }\n .preview-workspace-card { flex: 1; min-width: 0; height: 168px; border-radius: 18px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-card.short { height: 96px; }`}function ae(e,t){let a=e.contentDocument;if(!a?.documentElement)return;let o=a.getElementById(Na);o||(o=a.createElement("style"),o.id=Na,a.head.appendChild(o)),o.textContent=te(t)}function oe(e,t,a,o){let r=`\n ${Ua}\n <div style="position:fixed;inset:0;z-index:9999;"><div id="${e}" data-mount-id="${e}"></div></div>`,l=`\n <div class="preview-workspace-shell">\n <div class="preview-workspace-topbar">\n <div class="preview-workspace-topbar-left">\n <span class="preview-workspace-topbar-badge"></span>\n <span class="preview-workspace-topbar-line"></span>\n </div>\n <span class="preview-workspace-topbar-pill"></span>\n </div>\n <div class="preview-workspace-body">\n <div id="preview-content-${e}" class="preview-workspace-content" data-mount-id="${e}">\n ${qa}\n </div>\n </div>\n </div>`;return`<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <link rel="stylesheet" href="${Q(o)}">\n <style id="${Na}">${te(t)}</style>\n</head>\n<body>\n ${a?l:r}\n</body>\n</html>`}function re(e){return Ga[e]}function le(e,t=0){let a=new Date(Date.now()-1e3*Math.max(0,60-t)).toISOString(),o=`${e}-${t}`;switch(e){case"user-message":return{id:`preview-seq-user-${o}`,role:"user",content:"Can you continue with the next step?",createdAt:a};case"assistant-message":return{id:`preview-seq-assistant-${o}`,role:"assistant",content:"Absolutely. I can keep going and explain what happens next.",createdAt:a};case"assistant-code-block":return{id:`preview-seq-assistant-code-${o}`,role:"assistant",content:["Here's how you'd wire up a streaming animation:","","```ts","import { createAgentExperience } from '@runtypelabs/persona';","","createAgentExperience(el, {"," features: {",' streamAnimation: { type: "letter-rise", speed: 120 },'," },","});","```","","Swap the `type` value to try the other presets."].join("\n"),createdAt:a};case"assistant-markdown-table":return{id:`preview-seq-assistant-table-${o}`,role:"assistant",content:["Here are the built-in streaming animations at a glance:","","| Preset | Wrap unit | Best for |","| ------------ | --------- | --------------------------- |","| Typewriter | Character | Classic terminal feel |","| Letter rise | Character | Soft, staggered entrance |","| Word fade | Word | Longer-form assistant replies |","| Pop bubble | Bubble | Short, punchy affirmations |"].join("\n"),createdAt:a};case"assistant-image":return{id:`preview-seq-assistant-image-${o}`,role:"assistant",content:["Here's the reference diagram you asked for: let me know if you'd like a different view:","","![Stream animation reference](https://placehold.co/320x200/png?text=Stream+Animation)","","The gradient shows how per-unit delays stagger across the reply."].join("\n"),createdAt:a};case"reasoning-streaming":return{id:`preview-seq-reasoning-stream-${o}`,role:"assistant",content:"",createdAt:a,streaming:!0,variant:"reasoning",reasoning:{id:`preview-reasoning-stream-${o}`,status:"streaming",chunks:["Thinking through the next step in the workflow..."]}};case"reasoning-complete":return{id:`preview-seq-reasoning-complete-${o}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"reasoning",reasoning:{id:`preview-reasoning-complete-${o}`,status:"complete",chunks:["Reviewed the requirements and finalized the reasoning output."],durationMs:1200}};case"approval-request":{let e=`preview-approval-${o}`;return{id:`approval-${e}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"approval",approval:{id:e,status:"pending",agentId:"preview-agent",executionId:`preview-exec-${o}`,toolName:"add_to_cart",description:"Add the selected item to the shopping cart. Approve to let the assistant continue.",parameters:{items:[{productEntityId:129,quantity:1}]}}}}case"tool-complete":return{id:`preview-seq-tool-complete-${o}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"tool",toolCall:{id:`preview-tool-complete-${o}`,name:"Create build instructions",status:"complete",chunks:["Prepared the build instructions and validated the inputs."],result:{ok:!0},duration:420}};default:return{id:`preview-seq-tool-running-${o}`,role:"assistant",content:"",createdAt:a,streaming:!0,variant:"tool",toolCall:{id:`preview-tool-running-${o}`,name:"Get platform documentation",status:"running",chunks:["Fetching the relevant platform documentation..."]}}}}function se(e,t){return[...e,le(t,e.length)]}function ie(e){return"assistant-message"===e||"assistant-code-block"===e||"assistant-markdown-table"===e||"assistant-image"===e}function ne(e,t,a){let o=le(e,t);if(!ie(e)||"string"!=typeof o.content)return[{message:o,delayMs:0,done:!0}];let r=Math.max(1,a?.chunkSize??24),l=Math.max(0,a?.delayMs??42),s=o.content,i=[];i.push({message:{...o,content:"",streaming:!0},delayMs:0,done:!1});for(let e=r;e<s.length;e+=r)i.push({message:{...o,content:s.slice(0,e),streaming:!0},delayMs:l,done:!1});return i.push({message:{...o,content:s,streaming:!1},delayMs:l,done:!0}),i}function ce(e,t,a=[]){if("follow-ups"===e){let e=Date.now();return[{id:"preview-follow-up-user",role:"user",content:"What can Persona help me build?",createdAt:new Date(e-12e4).toISOString()},{id:"preview-follow-up-assistant",role:"assistant",content:"Persona gives you a themeable streaming chat interface with flexible integrations and interaction patterns. Where would you like to go next?",createdAt:new Date(e-6e4).toISOString()},{id:"preview-follow-up-suggestions",role:"assistant",content:"",createdAt:new Date(e-59e3).toISOString(),streaming:!1,variant:"tool",toolCall:{id:"preview-follow-up-suggestions",name:"suggest_replies",status:"complete",args:{suggestions:[{id:"preview-implementation",label:"Show me an implementation",prompt:"Show me a practical implementation",description:"See a complete integration example",icon:"code-2",emphasis:"primary"},{id:"preview-theming",label:"Explore theming",prompt:"Tell me how theming works",description:"Customize colors, type, and component styles",icon:"palette"},{id:"preview-security",label:"Review security",prompt:"Explain the security model",description:"Learn about isolation and safe rendering",icon:"shield-check"},{id:"preview-support",label:"Talk to support",prompt:"Help me contact support",description:"Get help choosing the right approach",icon:"messages-square"}]},chunks:[]}},...a]}return"home"===e?[]:"minimized"===e?[{id:"preview-min-1",role:"assistant",content:"We are here whenever you are ready.",createdAt:(new Date).toISOString()}]:"artifact"===e?[{id:"preview-art-1",role:"user",content:"Can you draft a quick overview of the project?",createdAt:new Date(Date.now()-12e4).toISOString()},{id:"preview-art-2",role:"assistant",content:"Here’s a project overview document for you.",createdAt:new Date(Date.now()-6e4).toISOString()}]:"conversation"===e&&(e=>!!(e?.features?.toolCallDisplay?.activePreview||e?.features?.toolCallDisplay?.grouped||e?.features?.toolCallDisplay?.collapsedMode&&"tool-call"!==e.features.toolCallDisplay.collapsedMode||e?.features?.reasoningDisplay?.activePreview))(t)?[{id:"preview-adv-1",role:"user",content:"Can you create the product and gather the docs?",createdAt:new Date(Date.now()-18e4).toISOString()},{id:"preview-adv-2",role:"assistant",content:"",createdAt:new Date(Date.now()-15e4).toISOString(),streaming:!0,variant:"reasoning",reasoning:{id:"preview-reasoning",status:"streaming",chunks:["Now let me get the Persona embed documentation and builtin tools catalog."]}},{id:"preview-adv-3",role:"assistant",content:"",createdAt:new Date(Date.now()-12e4).toISOString(),streaming:!0,variant:"tool",toolCall:{id:"preview-tool-1",name:"Load tools",status:"running",chunks:["Loaded tools, used Runtype integration"]}},{id:"preview-adv-4",role:"assistant",content:"",createdAt:new Date(Date.now()-9e4).toISOString(),streaming:!0,variant:"tool",toolCall:{id:"preview-tool-2",name:"Get platform documentation",status:"running",chunks:["Get platform documentation"]}},{id:"preview-adv-5",role:"assistant",content:"I loaded the tools and fetched the docs. Next I can assemble the product details.",createdAt:new Date(Date.now()-3e4).toISOString()},...a]:[{id:"preview-conv-1",role:"assistant",content:"Hello! How can I help you today?",createdAt:new Date(Date.now()-18e4).toISOString()},{id:"preview-conv-2",role:"user",content:"I want to customize the theme editor preview.",createdAt:new Date(Date.now()-12e4).toISOString()},{id:"preview-conv-3",role:"assistant",content:"Absolutely. Check out the [getting started guide](https://example.com) to see what’s possible, then adjust colors and tokens to match your brand.",createdAt:new Date(Date.now()-6e4).toISOString()},...a]}function de(e,t,a=[]){let o={...e.launcher,enabled:!0,autoExpand:"minimized"!==t},r={...e,launcher:o,suggestions:"home"===t?{...e.suggestions,starters:{...e.suggestions?.starters?{}:{variant:"chip",placement:"composer"},...e.suggestions?.starters,items:e.suggestions?.starters?.items?.length?e.suggestions.starters.items:e.suggestionChips?.length?e.suggestionChips:ja}}:e.suggestions,initialMessages:ce(t,e,a),storageAdapter:_a};return"artifact"===t&&(r.features={...r.features,artifacts:{...r.features?.artifacts,enabled:!0}}),"messages"===t&&(r.features={...r.features,history:{presentation:"panel",...r.features?.history,enabled:!0}}),r}function pe(e,t){let a=x(e.config),o=e.config?.future,r=e.theme?S(e.theme,{validate:!1,future:o}):S(void 0,{future:o});return{...a,...e.config,theme:r,darkTheme:e.darkTheme,colorScheme:t??e.config?.colorScheme??"light"}}function ue(e,t){let a=e.scene??"conversation";return de(pe(e,t),a,e.appendedMessages??[])}function me(e,t,a){let o=e.scene??"conversation";return de(pe(e,a),o,t)}function he(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function ge(e){if("string"!=typeof e||""===e.trim())throw Error('Color must be a non-empty string (e.g. "#2563eb" or "blue").');let t=e.trim().toLowerCase(),a=Ya[t];if(a)return a;let o=P(t);if($(o)||"transparent"===o||function(e){return Ja.test(e)}(o))return o;throw Error(`"${e}" is not a recognized color. Pass a hex value like "#ef4444" or a CSS color name (e.g. ${Object.keys(Ya).slice(0,6).join(", ")}).`)}function fe(e,t=!0){let a=String(e??"").trim().toLowerCase(),o=Ka[a];if(!o||!t&&"neutral"===o)throw Error(`Unknown color family "${e}". Valid families: ${t?"primary, secondary, accent, neutral":"primary, secondary, accent"}.`);return o}function be(e){let t=String(e??"solid").trim().toLowerCase();if("solid"===t||"soft"===t)return t;throw Error(`Unknown intensity "${e}". Valid intensities: solid, soft.`)}function ye(e){let t=String(e??"").trim().toLowerCase();if("light"===t||"dark"===t||"auto"===t)return t;if("system"===t)return"auto";throw Error(`Unknown color scheme "${e}". Valid: light, dark, auto.`)}function ve(e){let t=String(e??"").trim().toLowerCase(),a=Xa[t];if(!a)throw Error(`Unknown roundness "${e}". Valid: sharp, default, rounded, pill.`);return a}function we(e){if("number"==typeof e&&Number.isFinite(e))return`${e}px`;if("string"==typeof e&&""!==e.trim()){let t=e.trim();if("9999px"===t||/^(100%|9999px)$/.test(t))return"9999px";let a=M(t);return R(a.value,a.unit)}throw Error('Radius must be a number (px) or a CSS length string like "0.5rem".')}function xe(e){for(let t of bt){let a=t.fields.find(t=>t.id===e);if(a?.options){let e={};for(let t of a.options){let a=t.value.split(".").pop();a&&(e[a]=t.value)}return e}}return{}}function ke(e,t,a="theme",o=0){if(o>6)return null;let r=e.get(`${a}.${t}`);return"string"!=typeof r||""===r?"darkTheme"===a?ke(e,t,"theme",o):null:r.startsWith("#")||r.startsWith("rgb")||"transparent"===r?r:r.startsWith("palette.")||r.startsWith("semantic.")||r.startsWith("components.")?ke(e,r,a,o+1):null}function Se(e,t){let a=e.get(t);if("string"!=typeof a)return"unknown";let o=a.split(".");return o[o.length-1]||String(a)}function Ce(e){return e.replace(/^role-/,"")}function Te(e){for(let[t,a]of Object.entries(io))if(no.every(t=>e[t]===a[t]))return t;return"custom"}function Ae(e){let t={};for(let a of no)t[a]=String(e.get(`theme.palette.radius.${a}`)??"");let a={};for(let t of ct)a[Ce(t.roleId)]=U(t=>e.get(`theme.${t}`),t);return{brand:{primary:Be(e.get("theme.palette.colors.primary.500")),secondary:Be(e.get("theme.palette.colors.secondary.500")),accent:Be(e.get("theme.palette.colors.accent.500"))},roles:a,typography:{fontFamily:Se(e,"theme.semantic.typography.fontFamily"),fontSize:Se(e,"theme.semantic.typography.fontSize"),fontWeight:Se(e,"theme.semantic.typography.fontWeight"),lineHeight:Se(e,"theme.semantic.typography.lineHeight")},roundness:{style:Te(t),radius:t},colorScheme:String(e.get("colorScheme")??"light"),history:{index:e.getHistoryIndex(),canUndo:e.canUndo(),canRedo:e.canRedo()}}}function Be(e){return"string"==typeof e&&""!==e?e:null}function Ie(e,t,a){for(let o of[t.fg,...t.fgFallbacks??[]]){let t=ke(e,o,a);if(t)return t}return null}function Me(e){return Math.round(100*e)/100}function Re(e,t,a,o,r){let l=e.get(`${r}.${t}`);if("string"!=typeof l)return null;let s=l.match(/^palette\.colors\.(\w+)\.(\d+)$/);if(!s)return null;let i=s[1],n=Je.indexOf(s[2]),c=null,d=1/0;return Je.forEach((t,l)=>{let s=e.get(`${r}.palette.colors.${i}.${t}`);if("string"==typeof s&&(s.startsWith("#")||s.startsWith("rgb"))&&F(s,a)>=o){let e=n>=0?Math.abs(l-n):l;e<d&&(d=e,c=`palette.colors.${i}.${t}`)}}),c}function Ve(e,t="AA",a="both",o){let r=po[t],l="both"===a?["light","dark"]:[a],s=o?co.filter(e=>o.includes(e.key)):co,i=[];for(let t of l){let a="light"===t?"theme":"darkTheme";for(let o of s){let l=Ie(e,o,a),s=ke(e,o.bg,a);if(!l||!s)continue;let n=Me(F(l,s)),c=n>=r,d={pair:o.key,label:o.label,variant:t,fg:l,bg:s,ratio:n,threshold:r,passes:c};if(!c){let t=Re(e,o.fg,s,r,a);t&&(d.suggestion=t)}i.push(d)}}return{level:t,checks:i,failures:i.filter(e=>!e.passes)}}function Ee(e,t,a="light",o="AA"){return 0===t.length?[]:Ve(e,o,a,t).failures.map(e=>({code:"contrast",pair:e.pair,variant:e.variant,ratio:e.ratio,threshold:e.threshold,message:`${e.label} (${e.variant}) has a contrast ratio of ${e.ratio}:1, below the ${o} threshold of ${e.threshold}:1${e.suggestion?`. Try ${e.suggestion} for the foreground.`:"."}`}))}function Pe(){let e=new Map,t=t=>{for(let a of t)for(let t of a.fields)e.has(t.id)||e.set(t.id,t)};for(let e of $a)t(e.sections);for(let e of Sa)t(e.sections);return e}function $e(e,t){let a=t?.editTarget??"both",o=null,r=e=>e&&"object"==typeof e?e:{},l=(e,t,o=a)=>{let r={};return("light"===o||"both"===o)&&(r[`theme.${e}`]=t),("dark"===o||"both"===o)&&(r[`darkTheme.${e}`]=t),r},s=e=>{if("both"===a)return e;let t={};for(let[o,r]of Object.entries(e))("light"===a&&o.startsWith("theme.")||"dark"===a&&o.startsWith("darkTheme."))&&(t[o]=r);return t},i=()=>"dark"===a?"dark":"light",n=(t,a=[])=>he({ok:!0,summary:Ae(e),warnings:a,applied:t});return[{name:"get_theme_overview",title:"Get current theme & what is editable",description:"Read theme summary, presets, and real editable paths. Call before editing. Fresh authoring starts with brand, then theme.semantic, then theme.components; defaults remain V4 unless future.v5Defaults is true.",annotations:{readOnlyHint:!0},inputSchema:{type:"object",properties:{verbosity:{type:"string",enum:["summary","full"],description:"'full' includes the field-id index."}},additionalProperties:!1},execute(t){let{verbosity:a}=r(t),l={summary:Ae(e),authoringGuide:"docs/configuration.md: content in welcome/copy/suggestions, behavior in features/providers, geometry in layout/launcher. Idle send uses theme.components.composer.send; stop uses theme.components.button.stop. Explicit legacy styles win until cleared; modern welcome wins over legacy copy. Backups/resolved previews include defaults; unknown-origin imports must stay explicit.",availableRoles:ct.map(e=>({role:Ce(e.roleId),helper:e.helper})),availableFamilies:Za,presets:Wa.map(e=>({id:e.id,name:e.name,description:e.description,tags:e.tags??[]})),tools:[{tool:"set_brand_colors",hint:"Recolor primary/secondary/accent and generate shade scales."},{tool:"assign_color_role",hint:"Recolor a widget region with family + intensity."},{tool:"set_typography",hint:"Set font family, size, weight, line height."},{tool:"set_roundness",hint:"Set corner roundness or granular radii."},{tool:"set_color_scheme",hint:"Set light/dark/auto and edit target."},{tool:"apply_preset",hint:"Apply a built-in preset."},{tool:"configure_widget",hint:"Toggle launcher position, features, and layout."},{tool:"set_copy_and_suggestions",hint:"Set welcome copy, placeholder, and suggestion chips."},{tool:"set_theme_fields",hint:"Set any field by id or dot-path."},{tool:"check_contrast",hint:"Audit WCAG contrast."},{tool:"manage_session",hint:"Undo, redo, reset, or export the theme."}]};return"full"===a&&(o??=Pe(),l.fieldIndex=Array.from(o.values()).map(e=>({id:e.id,path:e.path,type:e.type,label:e.label,description:e.description,options:e.options?.map(e=>e.value)}))),he(l)}},{name:"set_brand_colors",title:"Set brand colors",description:"Set primary, secondary, and/or accent colors. Generates shade scales and accepts hex, rgb/rgba, or CSS names.",inputSchema:{type:"object",properties:{primary:{type:"string",description:"Hex, rgb/rgba, or CSS name."},secondary:{type:"string",description:"Hex, rgb/rgba, or CSS name."},accent:{type:"string",description:"Hex, rgb/rgba, or CSS name."}},additionalProperties:!1},execute(t){let a=r(t),o=["primary","secondary","accent"],s={},c={};for(let e of o){if(void 0===a[e])continue;let t=ge(a[e]);c[e]=t;let o=z(t);for(let t of Je){let a=o[t];void 0!==a&&Object.assign(s,l(`palette.colors.${e}.${t}`,a))}}if(0===Object.keys(c).length)throw Error("Provide at least one of: primary, secondary, accent.");e.setBatch(s);let d=Ee(e,["primary-button","user-message"],i());return n(c,d)}},{name:"assign_color_role",title:"Assign a color family to an interface role",description:"Recolor a widget region by role, palette family, and intensity.",inputSchema:{type:"object",properties:{role:{type:"string",description:"Role, e.g. header or user-messages."},family:{type:"string",enum:Za},intensity:{type:"string",enum:["solid","soft"],description:"Default: solid."}},required:["role","family"],additionalProperties:!1},execute(t){let a=r(t),o=function(e){let t=String(e??"").trim().toLowerCase(),a=uo[t];if(!a){let t=ct.map(e=>Ce(e.roleId)).join(", ");throw Error(`Unknown role "${e}". Valid roles: ${t}.`)}return a}(a.role),l=fe(a.family,!0),c=be(a.intensity),d=s(_(l,c,o)),p=Object.keys(d).length;e.setBatch(d);let u=Ee(e,function(e){let t=new Set(e.targets.map(e=>e.path));return co.filter(e=>t.has(e.fg)||t.has(e.bg)).map(e=>e.key)}(o),i());return n({role:Ce(o.roleId),family:l,intensity:c,tokensWritten:p},u)}},{name:"set_typography",title:"Set typography",description:"Set font family, size, weight, and line height.",inputSchema:{type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:["string","number"]},lineHeight:{type:["string","number"]}},additionalProperties:!1},execute(t){let a=r(t),o={},s={},i=(e,t)=>{if(void 0===a[e])return;let r=function(e,t,a){let o=t[String(e??"").trim().toLowerCase()];if(!o){let o=[...new Set(Object.values(t).map(e=>e.split(".").pop()))].join(", ");throw Error(`Unknown ${a} "${e}". Valid: ${o}.`)}return o}(a[e],t,e);s[e]=r.split(".").pop()??r,Object.assign(o,l(`semantic.typography.${e}`,r))};if(i("fontFamily",oo),i("fontSize",ro),i("fontWeight",lo),i("lineHeight",so),0===Object.keys(s).length)throw Error("Provide at least one of: fontFamily, fontSize, fontWeight, lineHeight.");return e.setBatch(o),n(s)}},{name:"set_roundness",title:"Set corner roundness",description:"Set roundness by style or granular radius values.",inputSchema:{type:"object",properties:{style:{type:"string",enum:["sharp","default","rounded","pill"]},radius:{type:"object",description:"Granular px or CSS length overrides.",properties:{sm:{type:["string","number"]},md:{type:["string","number"]},lg:{type:["string","number"]},xl:{type:["string","number"]},full:{type:["string","number"]}},additionalProperties:!1}},additionalProperties:!1},execute(t){let a=r(t),o={},s={};if(void 0!==a.style){let e=ve(a.style);s.style=e;for(let[t,a]of Object.entries(io[e]))Object.assign(o,l(`palette.radius.${t}`,a))}if(void 0!==a.radius){let e=r(a.radius),t={};for(let a of["sm","md","lg","xl","full"]){if(void 0===e[a])continue;let r=we(e[a]);t[a]=r,Object.assign(o,l(`palette.radius.${a}`,r))}s.radius=t}if(0===Object.keys(o).length)throw Error("Provide `style` (sharp|default|rounded|pill) or a `radius` object.");return e.setBatch(o),n(s)}},{name:"set_color_scheme",title:"Set color scheme",description:"Set light/dark/auto color scheme and optional edit target.",inputSchema:{type:"object",properties:{scheme:{type:"string",enum:["light","dark","auto"]},editTarget:{type:"string",enum:["light","dark","both"]}},additionalProperties:!1},execute(t){let o=r(t),l={};if(void 0!==o.scheme){let t=ye(o.scheme);e.set("colorScheme",t),l.scheme=t}if(void 0!==o.editTarget){let e=String(o.editTarget).trim().toLowerCase();if("light"!==e&&"dark"!==e&&"both"!==e)throw Error(`Unknown editTarget "${o.editTarget}". Valid: light, dark, both.`);a=e,l.editTarget=e}if(0===Object.keys(l).length)throw Error("Provide `scheme` and/or `editTarget`.");return he({ok:!0,summary:Ae(e),warnings:[],applied:l,editTarget:a})}},{name:"apply_preset",title:"Apply a built-in theme preset",description:"Apply a complete built-in preset, replacing theme tokens. Call get_theme_overview to list preset ids.",inputSchema:{type:"object",properties:{presetId:{type:"string"}},required:["presetId"],additionalProperties:!1},async execute(t){let{presetId:a}=r(t),o=X(String(a??""));if(!o){let e=Wa.map(e=>e.id).join(", ");throw Error(`Unknown preset "${a}". Valid presets: ${e}.`)}let l=o.behavior?await import("@runtypelabs/persona/preferences-runtime"):null,s=S(o.theme,{validate:!1}),i={...e.getConfig()};o.darkTheme&&(i.darkTheme=S(o.darkTheme,{validate:!1}),i.colorScheme="auto"),o.toolCall&&(i.toolCall=o.toolCall),o.behavior&&l&&(i.features=l.applyFeaturePreferences(i.features,[o.behavior])),e.setFullConfig(i,s);let c=Ee(e,["body","assistant-message"],"light");return n({appliedPreset:{id:o.id,name:o.name}},c)}},{name:"configure_widget",title:"Configure launcher, features, and layout",description:"Toggle launcher position, feature flags, and message layout.",inputSchema:{type:"object",properties:{launcherPosition:{type:"string",enum:go},features:{type:"object",properties:{voice:{type:"boolean"},artifacts:{type:"boolean"},attachments:{type:"boolean"},toolCalls:{type:"boolean"},reasoning:{type:"boolean"},feedback:{type:"boolean"}},additionalProperties:!1},layout:{type:"object",properties:{avatars:{type:"boolean"},timestamps:{type:"boolean"},showHeader:{type:"boolean"},messageStyle:{type:"string",enum:fo}},additionalProperties:!1}},additionalProperties:!1},execute(t){let a=r(t),o={},l={};if(void 0!==a.launcherPosition){let e=String(a.launcherPosition);if(!go.includes(e))throw Error(`Unknown launcherPosition "${e}". Valid: ${go.join(", ")}.`);o["launcher.position"]=e,l.launcherPosition=e}let s=r(a.features);for(let[e,t]of Object.entries(mo))void 0!==s[e]&&(o[t]=!!s[e],l.features??={},l.features[e]=!!s[e]);let i=r(a.layout);for(let[e,t]of Object.entries(ho))if(void 0!==i[e])if("messageStyle"===e){let a=String(i[e]);if(!fo.includes(a))throw Error(`Unknown messageStyle "${a}". Valid: ${fo.join(", ")}.`);o[t]=a,l.layout??={},l.layout[e]=a}else o[t]=!!i[e],l.layout??={},l.layout[e]=!!i[e];if(0===Object.keys(o).length)throw Error("Provide launcherPosition, features, and/or layout.");return e.setBatch(o),n(l)}},{name:"set_copy_and_suggestions",title:"Set welcome copy and suggestion chips",description:"Set welcome copy, input placeholder, send label, and suggestion chips.",inputSchema:{type:"object",properties:{title:{type:"string"},subtitle:{type:"string"},placeholder:{type:"string"},sendLabel:{type:"string"},suggestions:{type:"array",items:{type:"string"}}},additionalProperties:!1},execute(t){let a=r(t),o={},l={};for(let[e,t]of Object.entries(bo))void 0!==a[e]&&(o[t]=String(a[e]),l[e]=String(a[e]));if(void 0!==a.suggestions){if(!Array.isArray(a.suggestions))throw Error("`suggestions` must be an array of strings.");let e=a.suggestions.filter(e=>"string"==typeof e);o["suggestions.starters.items"]=e,l.suggestions=e}if(0===Object.keys(o).length)throw Error("Provide at least one of: title, subtitle, placeholder, sendLabel, suggestions.");return e.setBatch(o),n(l)}},{name:"set_theme_fields",title:"Set theme fields by id or path (advanced)",description:"Advanced escape hatch: set fields by id or real dot-path, e.g. theme.components.composer.send.foreground, theme.components.button.stop.background, welcome.variant, suggestions.starters.placement. Metadata supplies value kinds; border colors and full CSS border shorthands differ. Clearing legacy overrides is a separate migration operation.",inputSchema:{type:"object",properties:{updates:{type:"array",items:{type:"object",properties:{field:{type:"string",description:"Field id or path."},value:{type:["string","number","boolean"]}},required:["field","value"],additionalProperties:!1}}},required:["updates"],additionalProperties:!1},execute(t){let{updates:a}=r(t);if(!Array.isArray(a)||0===a.length)throw Error("`updates` must be a non-empty array of { field, value }.");o??=Pe();let s={},i=[];for(let e of a){let t=r(e),a=String(t.field??"");try{let e=o.get(a),r=e?e.path:a;if(!e&&!/^(theme|darkTheme)\.|\./.test(r))throw Error(`Unknown field "${a}". Pass a known field id or a dot-path (e.g. theme.palette.radius.md).`);let n=Oe(e,t.value);if(e&&r.startsWith("theme.")){let e=l(r.slice(6),n);Object.assign(s,e),i.push({field:a,resolvedPath:Object.keys(e),ok:!0})}else s[r]=n,i.push({field:a,resolvedPath:r,ok:!0})}catch(e){i.push({field:a,ok:!1,error:e.message})}}let n=i.filter(e=>e.ok);return Object.keys(s).length>0&&e.setBatch(s),he({ok:n.length>0,summary:Ae(e),warnings:[],applied:{updates:i}})}},{name:"check_contrast",title:"Check accessibility contrast",description:"Run WCAG checks over key text/background pairs.",annotations:{readOnlyHint:!0},inputSchema:{type:"object",properties:{level:{type:"string",enum:["AA","AAA"],description:"Default: AA."},variant:{type:"string",enum:["light","dark","both"],description:"Default: both."}},additionalProperties:!1},execute(t){let a=r(t),o=Ve(e,"AAA"===a.level?"AAA":"AA","light"===a.variant||"dark"===a.variant?a.variant:"both");return he({level:o.level,passing:o.checks.length-o.failures.length,total:o.checks.length,checks:o.checks,failures:o.failures})}},{name:"manage_session",title:"Undo, redo, reset, or export the theme",description:"Undo, redo, reset defaults, or export the theme snapshot.",inputSchema:{type:"object",properties:{action:{type:"string",enum:["undo","redo","reset","export"]}},required:["action"],additionalProperties:!1},execute(t){let{action:a}=r(t);switch(a){case"undo":return e.undo(),n({action:"undo"});case"redo":return e.redo(),n({action:"redo"});case"reset":return e.resetToDefaults(),n({action:"reset"});case"export":return he({ok:!0,snapshot:e.exportSnapshot()});default:throw Error(`Unknown action "${a}". Valid: undo, redo, reset, export.`)}}}]}function Oe(e,t){if(!e)return t;switch(e.type){case"color":return e.parseValue?e.parseValue(ge(t)):ge(t);case"toggle":return"boolean"==typeof t?t:"true"===t||1===t;case"slider":{let a=Number(t);if(!Number.isFinite(a))throw Error(`"${e.id}" expects a number.`);if(e.slider){let{min:t,max:o}=e.slider;if(a<t||a>o)throw Error(`"${e.id}" must be between ${t} and ${o}.`)}return e.parseValue?e.parseValue(a):a}case"select":{let a=String(t);if(e.options&&!e.options.some(e=>e.value===a))throw Error(`"${e.id}" must be one of: ${e.options.map(e=>e.value).join(", ")}.`);return e.parseValue?e.parseValue(a):a}default:return e.parseValue?e.parseValue(t):t}}e=(e,t,a)=>()=>{if(a)throw a[0];try{return e&&(t=e(e=0)),t}catch(e){throw a=[e],e}},m=e(()=>{t={collapsedMode:"tool-call",activePreview:!1,grouped:!1,groupedMode:"stack",groupBoundary:"adjacent",previewMaxLines:3,expandable:!0,loadingAnimation:"none"},a={activePreview:!1,previewMaxLines:3,expandable:!0,loadingAnimation:"none"},o={layout:"row",variant:"row",iconVisibility:"active",autoExpand:!1,grouped:!0,groupedMode:"collapsible",groupAppearance:"inset",loadingAnimation:"shimmer"},r={appearance:"inset",layout:"row",variant:"row",iconVisibility:"active",autoExpand:!1,loadingAnimation:"shimmer"}}),h=e(()=>{l=e=>"object"==typeof e&&!!e&&!Array.isArray(e)}),g=e(()=>{s={resolvedDisplay:"row",primaryAction:"allow-once",keyboardShortcuts:"focused"}}),f=e(()=>{}),(b=e(()=>{m(),h(),g(),f(),n="440px",d={apiUrl:"https://api.runtype.com/api/chat/dispatch",clientToken:void 0,agentId:void 0,target:void 0,theme:void 0,darkTheme:void 0,colorScheme:"light",tooltip:{delayMs:400,skipDelayMs:300},launcher:{enabled:!0,mountMode:"floating",dock:{side:"right",width:"420px"},title:"Chat Assistant",subtitle:"Here to help you get answers fast",agentIconText:"💬",agentIconName:"bot",headerIconName:"bot",position:"bottom-right",width:i="min(440px, calc(100vw - 24px))",heightOffset:0,autoExpand:!1,callToActionIconHidden:!1,agentIconSize:"40px",headerIconSize:"40px",closeButtonPaddingX:"0px",closeButtonPaddingY:"0px",callToActionIconName:"arrow-up-right",callToActionIconText:"",callToActionIconSize:"32px",callToActionIconPadding:"5px",callToActionIconColor:void 0,callToActionIconBackgroundColor:void 0,closeButtonBackgroundColor:"transparent",clearChat:{backgroundColor:"transparent",borderColor:"transparent",enabled:!0,placement:"inline",iconName:"refresh-cw",showTooltip:!0,tooltipText:"Clear chat",paddingX:"0px",paddingY:"0px"},headerIconHidden:!1,border:void 0,shadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"},copy:{inputPlaceholder:c="How can I help...",sendButtonLabel:"Send"},sendButton:{borderWidth:"0px",paddingX:"12px",paddingY:"10px",borderColor:void 0,useIcon:!0,iconText:"↑",showTooltip:!0,tooltipText:"Send message",iconName:"send"},statusIndicator:{visible:!0,idleText:"Online",connectingText:"Connecting…",connectedText:"Streaming…",errorText:"Offline"},voiceRecognition:{enabled:!0,pauseDuration:2e3,iconName:"mic",borderWidth:"0px",iconColor:void 0,backgroundColor:"transparent",borderColor:"transparent",recordingIconColor:void 0,recordingBackgroundColor:void 0,recordingBorderColor:"transparent",showTooltip:!0,tooltipText:"Start voice recognition"},features:{showReasoning:!0,showToolCalls:!0,scrollToBottom:{enabled:!0,iconName:"arrow-down",label:"",streamingIndicator:"arrow",scrollBehavior:"instant",scrollDurationMs:220,transition:"none"},scrollBehavior:{mode:"anchor-top",anchorTopOffset:16,showActivityWhilePinned:!0},toolCallDisplay:t,reasoningDisplay:a,streamAnimation:{type:"none",placeholder:"none",speed:120,duration:1800},askUserQuestion:{enabled:!0,slideInMs:180,freeTextLabel:"Other…",freeTextPlaceholder:"Type your answer…",submitLabel:"Send"},history:{enabled:!1,presentation:"panel",showScopeStatus:!0,showDelete:!0,showDeleteAll:!0}},suggestionChips:["Show me what you can help with","Walk me through getting started","Answer a question about this page"],suggestionChipsConfig:{fontFamily:"sans-serif",fontWeight:"500",paddingX:"12px",paddingY:"6px"},layout:{header:{layout:"default",showIcon:!0,showTitle:!0,showSubtitle:!0,showCloseButton:!0,showClearChat:!0},messages:{layout:"bubble",avatar:{show:!1,position:"left"},timestamp:{show:!1,position:"below"},groupConsecutive:!1},slots:{}},markdown:{options:{gfm:!0,breaks:!0},disableDefaultStyles:!1},messageActions:{enabled:!0,showCopy:!0,showUpvote:!1,showDownvote:!1,visibility:"hover",align:"right",layout:"pill-inside"},debug:!1},p={},u={colorScheme:"light",errorDisplay:"block",messageActions:{visibility:void 0},suggestionChipsConfig:{fontWeight:void 0},approval:s,loadingIndicator:{variant:"label"},launcher:{variant:"circle",width:"min(400px, calc(100vw - 24px))",headerIconSize:"20px"},features:{artifacts:{enabled:!0},scrollToBottom:{streamingIndicator:"dots",transition:"fade",scrollBehavior:"smooth"},toolCallDisplay:o,reasoningDisplay:r},composer:{layout:"single-row",placement:"overlay"},sendButton:{iconName:"arrow-up"},statusIndicator:{mode:"transient"},layout:{contentMaxWidth:"768px",topFade:!0,header:{showSubtitle:!1},messages:{assistant:{width:"full"}}}},x()}))();const Fe="16px",Le="transparent",We={colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},info:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"}},spacing:(()=>{let e={};for(let t of[0,1,2,3,4,5,6,8,10,12,16,20,24,32,40,48,56,64])e[t]=0===t?"0px":t/4+"rem";return e})(),typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.625"}},shadows:{none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},borders:{none:"none",sm:"1px solid",md:"2px solid",lg:"4px solid"},radius:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}},ze={colors:{primary:"palette.colors.primary.500",secondary:"palette.colors.secondary.500",accent:"palette.colors.primary.600",surface:"palette.colors.gray.50",background:"palette.colors.gray.50",container:"palette.colors.gray.50",text:"palette.colors.gray.900",textMuted:"palette.colors.gray.500",textInverse:"palette.colors.gray.50",border:"palette.colors.gray.200",divider:"palette.colors.gray.200",interactive:{default:"palette.colors.primary.600",hover:"palette.colors.primary.700",focus:"palette.colors.primary.600",active:"palette.colors.primary.600",disabled:"palette.colors.gray.300"},feedback:{success:"palette.colors.success.500",warning:"palette.colors.warning.500",error:"palette.colors.error.500",info:"palette.colors.info.500"}},spacing:{xs:"palette.spacing.1",sm:"palette.spacing.2",md:"palette.spacing.4",lg:"palette.spacing.6",xl:"palette.spacing.8","2xl":"palette.spacing.10"},typography:{fontFamily:"palette.typography.fontFamily.sans",fontSize:"palette.typography.fontSize.base",fontWeight:"palette.typography.fontWeight.normal",lineHeight:"palette.typography.lineHeight.normal"}},He={button:{primary:{background:"palette.colors.primary.500",foreground:"palette.colors.primary.50",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md"},secondary:{background:"semantic.colors.surface",foreground:"semantic.colors.secondary",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md"},ghost:{background:"transparent",foreground:"semantic.colors.text",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm",hoverBackground:"rgba(0, 0, 0, 0.05)"}},input:{background:"semantic.colors.surface",placeholder:"semantic.colors.textMuted",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md",focus:{border:"palette.colors.gray.400",ring:"palette.colors.gray.400"}},launcher:{background:"semantic.colors.surface",foreground:"semantic.colors.primary",border:"semantic.colors.border",size:"60px",iconSize:"28px",borderRadius:"palette.radius.full",shadow:"palette.shadows.lg"},panel:{width:i,maxWidth:"none",height:"min(640px, max(200px, calc(100vh - 64px)))",maxHeight:"none",borderRadius:"palette.radius.xl",shadow:"palette.shadows.xl",inset:Fe,canvasBackground:Le,modes:{floating:{border:"1px solid var(--persona-border)",shadow:"palette.shadows.xl",borderRadius:"palette.radius.xl"},inline:{border:"1px solid var(--persona-border)",shadow:"none",borderRadius:"palette.radius.xl"},docked:{border:"none",shadow:"none",borderRadius:"palette.radius.xl"},sidebar:{border:"none",borderRadius:"0"},mobile:{border:"none",shadow:"none",borderRadius:"0"}}},header:{background:"palette.colors.primary.500",foreground:"palette.colors.primary.50",borderRadius:"palette.radius.xl palette.radius.xl 0 0",padding:"20px 24px",minimalPadding:"16px 24px",iconBackground:"palette.colors.primary.600",iconForeground:"palette.colors.primary.50"},message:{gap:"12px",user:{background:"palette.colors.primary.500",text:"palette.colors.primary.50",borderRadius:"palette.radius.lg",shadow:"palette.shadows.sm"},assistant:{background:"semantic.colors.container",text:"semantic.colors.text",borderRadius:"palette.radius.lg",border:"semantic.colors.border",shadow:"palette.shadows.sm"},border:"semantic.colors.border"},introCard:{background:"transparent",borderRadius:"palette.radius.2xl",padding:"semantic.spacing.lg",shadow:"palette.shadows.none"},suggestion:{chip:{background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.full",padding:"0.5rem 0.875rem",gap:"0.5rem",itemGap:"8px",minHeight:"36px",fontSize:"0.8125rem",lineHeight:"1.25",iconSize:"16px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"},card:{background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.xl",padding:"1rem",shadow:"palette.shadows.sm",gap:"0.625rem",itemGap:"8px",minHeight:"72px",fontSize:"0.875rem",lineHeight:"1.35",iconSize:"18px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"},list:{background:"transparent",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.md",padding:"0.75rem",gap:"0.625rem",itemGap:"8px",minHeight:"44px",fontSize:"0.875rem",lineHeight:"1.35",iconSize:"17px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"}},toolBubble:{shadow:"palette.shadows.sm"},reasoningBubble:{shadow:"palette.shadows.sm"},composer:{shadow:"palette.shadows.none"},scrollbar:{thumb:"semantic.colors.border",track:"transparent"},markdown:{inlineCode:{background:"palette.colors.gray.50",foreground:"palette.colors.gray.900"},link:{foreground:"palette.colors.primary.600"},prose:{fontFamily:"inherit"},codeBlock:{background:"semantic.colors.container",borderColor:"semantic.colors.border",textColor:"inherit",borderRadius:"palette.radius.md"},table:{headerBackground:"semantic.colors.container",borderColor:"semantic.colors.border"},hr:{color:"semantic.colors.divider"},blockquote:{borderColor:"palette.colors.gray.900",background:"transparent",textColor:"palette.colors.gray.500"}},collapsibleWidget:{container:"palette.colors.gray.50",surface:"semantic.colors.surface",border:"semantic.colors.border"},voice:{recording:{indicator:"palette.colors.error.500",background:"palette.colors.error.50",border:"palette.colors.error.200"},processing:{icon:"palette.colors.primary.500",background:"palette.colors.primary.50"},speaking:{icon:"palette.colors.success.500"}},approval:{requested:{background:"semantic.colors.surface",border:"semantic.colors.border",text:"palette.colors.gray.900",shadow:"0 1px 2px 0 rgba(11, 11, 11, 0.06), 0 2px 8px 0 rgba(11, 11, 11, 0.04)"},approve:{background:"semantic.colors.primary",foreground:"semantic.colors.textInverse",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm"},deny:{background:"semantic.colors.container",foreground:"semantic.colors.text",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm"}},attachment:{image:{background:"palette.colors.gray.100",border:"palette.colors.gray.200"}},eventStream:{badge:{flow:{background:"palette.colors.success.100",foreground:"palette.colors.success.700"},step:{background:"palette.colors.primary.100",foreground:"palette.colors.primary.700"},reasoning:{background:"palette.colors.warning.100",foreground:"palette.colors.warning.700"},tool:{background:"palette.colors.purple.100",foreground:"palette.colors.purple.800"},agent:{background:"palette.colors.teal.100",foreground:"palette.colors.teal.800"},error:{background:"palette.colors.error.100",foreground:"palette.colors.error.700"},default:{background:"palette.colors.gray.100",foreground:"palette.colors.gray.600"}}},scrollToBottom:{background:"components.button.primary.background",foreground:"components.button.primary.foreground",border:"semantic.colors.primary",size:"40px",borderRadius:"palette.radius.full",shadow:"palette.shadows.sm",padding:"0.5rem 0.875rem",gap:"0.5rem",fontSize:"0.875rem",iconSize:"14px"},artifact:{pane:{background:"semantic.colors.container",toolbarBackground:"semantic.colors.container"}}},De=We.colors.gray,Ne={...We,colors:{...We.colors,gray:De}},_e={...We,colors:{...We.colors,gray:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"}},radius:{none:"0px",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",full:"9999px"}},je=ze,Ue={...ze,colors:{...ze.colors,surface:"#ffffff",background:"#ffffff",container:"semantic.colors.surface",textInverse:"#ffffff"},typography:{...ze.typography,fontSize:"14px",lineHeight:"1.5"}},qe=He,Ge={...He,scrollToBottom:{...He.scrollToBottom,background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",size:"32px"},messageActions:{background:"transparent",border:"none",hoverBackground:"components.button.ghost.hoverBackground",hoverForeground:"semantic.colors.text",borderRadius:"palette.radius.md"},launcher:{background:"semantic.colors.primary",foreground:"semantic.colors.textInverse",border:"transparent",size:"48px",iconSize:"24px",borderRadius:"palette.radius.full",shadow:"0 8px 24px rgba(0,0,0,.16)",offset:"20px"},activity:{rowHeight:"32px",labelSize:"13px",iconSize:"16px",indent:"0px",transcriptGap:"0px",responseGap:"12px",groupIndent:"16px",groupGap:"2px",groupPadding:"2px 0",bodyPadding:"4px 0",bodyFontWeight:"400",sectionGap:"8px",bodySurface:"transparent"},toolBubble:{shadow:"none"},reasoningBubble:{shadow:"none"},input:{...He.input,borderRadius:"palette.radius.full"},introCard:{...He.introCard,title:{fontSize:"22px",fontWeight:"500"}},suggestion:{chip:{...He.suggestion.chip,fontWeight:"400"},card:{...He.suggestion.card,fontWeight:"400"},list:{...He.suggestion.list,fontWeight:"400"}},panel:{...He.panel,width:"min(400px, calc(100vw - 24px))",height:"min(704px, calc(100dvh - 104px))",borderRadius:"palette.radius.xl"},header:{...He.header,background:"semantic.colors.container",foreground:"semantic.colors.text",padding:"8px 8px 8px 16px",minimalPadding:"8px 8px 8px 16px",minHeight:"48px",borderBottom:"none",iconBackground:"transparent",iconForeground:"semantic.colors.text",iconScale:"1",iconPadding:"auto",controlSize:"28px",controlIconSize:"16px",controlStrokeWidth:"1.5",actionIconForeground:"semantic.colors.textMuted",controlBorderRadius:"8px",controlHoverBackground:"color-mix(in srgb, var(--persona-text) 8%, transparent)",controlHoverForeground:"semantic.colors.text",controlFocusOutline:"2px solid color-mix(in srgb, var(--persona-text) 50%, transparent)",title:{fontSize:"14px",fontWeight:"500",lineHeight:"1.5"}},message:{...He.message,gap:"20px",fullscreenGap:"28px",topFadeHeight:"18px",user:{...He.message.user,background:"palette.colors.gray.100",text:"semantic.colors.text",borderRadius:"palette.radius.xl",shadow:"none",padding:"8px 14px",fontSize:"14px",lineHeight:"1.5"},assistant:{...He.message.assistant,background:"transparent",border:"transparent",borderWidth:"0px",borderRadius:"0px",shadow:"none",padding:"0px",fontSize:"14px",lineHeight:"1.55"}},artifact:{...He.artifact,card:{background:"semantic.colors.surface",border:"1px solid var(--persona-border)",borderRadius:"palette.radius.lg",hoverBackground:"components.button.ghost.hoverBackground",hoverBorderColor:"semantic.colors.border"},inline:{background:"semantic.colors.surface",border:"1px solid var(--persona-border)",borderRadius:"palette.radius.lg",chromeBackground:"semantic.colors.surface",chromeBorder:"semantic.colors.border",titleColor:"semantic.colors.text",mutedColor:"semantic.colors.textMuted"}},composer:{...He.composer,padding:"8px",fontSize:"15px",lineHeight:"1.5",controlSize:"32px",controlIconSize:"20px",expandedPadding:"12px 16px",expandedBorderRadius:"24px",sendIconSize:"18px",sendButtonRadius:"9999px",footerBorder:"none",overflowMenu:{borderRadius:"12px"},overlayBand:"linear-gradient(to bottom, transparent, var(--persona-container) 24px)",focusBorderColor:"color-mix(in srgb, var(--persona-text) 28%, var(--persona-border))",focusRing:"1px solid color-mix(in srgb, var(--persona-text) 12%, transparent)"}},Ye=e=>"v5"===(e=>w({future:e}))(e)?{palette:_e,semantic:Ue,components:Ge}:{palette:Ne,semantic:je,components:qe};b(),h(),y=class{#e;#t;#a;#o;#r;#l;#s;#i;constructor(e,t,a){this.#e=[],this.#t=[],this.#a=-1,this.#o=!1,this.#r={},this.#l={},this.#s=!0,this.origin="authored",this.#i=new WeakMap;let o=a?.mergeDefaults??!0;this.#s=o,this.#r=B({...t}),delete this.#r.theme,this.#l=B(e??t?.theme??{});let r=x(t);this.config=o?{...r,...t}:t??r,this.theme=S(this.#l,{validate:!1,future:this.config.future}),this.#n(),this.#c(this.exportSnapshot(),!0)}get(e){return e.startsWith("theme.")?C(this.theme,e.replace("theme.","")):e.startsWith("darkTheme.")?C(this.config.darkTheme??{},e.replace("darkTheme.","")):C(this.config,e)}getTheme(){return this.theme}getConfig(){return this.config}set(e,t){let a=w(this.config);if(this.#d(e,t),e.startsWith("theme.")){let a=e.replace("theme.","");this.theme=T(this.theme,a,t),this.#n()}else if(e.startsWith("darkTheme.")){let a=e.replace("darkTheme.",""),o=this.config.darkTheme??S(void 0,{future:this.config.future});this.config={...this.config,darkTheme:T(o,a,t)}}else this.config=T(this.config,e,t);this.#p(a),this.#u(),this.#m()}unset(e){let t=w(this.config);if(this.#d(e,void 0,!0),e.startsWith("theme.")){let t=e.replace("theme.","");this.theme=A(this.theme,t),this.#n()}else if(e.startsWith("darkTheme.")){let t=e.replace("darkTheme.","");this.config={...this.config,darkTheme:A(this.config.darkTheme??{},t)}}else this.config=A(this.config,e);this.#p(t),this.#u(),this.#m()}setBatch(e){let t=w(this.config),a=!1,o=!1,r=!1;for(let[t,l]of Object.entries(e))if(this.#d(t,l),t.startsWith("theme.")){let e=t.replace("theme.","");this.theme=T(this.theme,e,l),a=!0}else if(t.startsWith("darkTheme.")){let e=t.replace("darkTheme.",""),a=this.config.darkTheme??S(void 0,{future:this.config.future});this.config={...this.config,darkTheme:T(a,e,l)},o=!0}else this.config=T(this.config,t,l),r=!0;a&&this.#n(),this.#p(t),(a||o||r)&&(this.#u(),this.#m())}setTheme(e){this.#l=B(e),this.theme=e,this.#n(),this.#u(),this.#m()}setFullConfig(e,t){this.origin="imported",this.#r=B({...e}),delete this.#r.theme,(t||e.theme)&&(this.#l=B(t??e.theme??{})),this.config={...e},(t||e.theme)&&(this.theme=S(t??e.theme,{validate:!1,future:e.future})),this.#n(),this.#u(),this.#m()}importSnapshot(e){if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Snapshot must be a JSON object");let t=e;if(this.origin="imported","config"in t||"theme"in t||2===t.version){let e=t.config??this.config;this.#r=B({...e}),delete this.#r.theme,this.#l=B(t.theme??e.theme??this.#l),this.config={...e},this.theme=S(this.#l,{validate:!1,future:e.future})}else this.#l=B(t),this.theme=S(this.#l,{validate:!1,future:this.config.future});this.#n(),this.#u(),this.#m()}resetToDefaults(){let e=this.config.future;this.origin="authored",this.#r=e?{future:e}:{},this.#l={},this.config={...x({future:e}),...e?{future:e}:{}},this.theme=S(void 0,{future:this.config.future}),this.#n(),this.#t=[],this.#a=-1,this.#c(this.exportSnapshot()),this.#m()}canUndo(){return this.#a>0}canRedo(){return this.#a>=0&&this.#a<this.#t.length-1}getHistoryLength(){return this.#t.length}getHistoryIndex(){return this.#a}undo(){this.canUndo()&&(--this.#a,this.#h(this.#t[this.#a]))}redo(){this.canRedo()&&(this.#a+=1,this.#h(this.#t[this.#a]))}exportAuthoredConfig(){return{origin:this.origin,config:B({...this.#r,...Object.keys(this.#l).length?{theme:this.#l}:{}})}}exportSnapshot(){return{version:2,config:{...this.config,theme:void 0},theme:this.theme}}onChange(e){return this.#e.push(e),()=>{let t=this.#e.indexOf(e);t>=0&&this.#e.splice(t,1)}}#d(e,t,a=!1){let o=(e,o)=>a||void 0===t?A(e,o):T(e,o,B(t));e.startsWith("theme.")?this.#l=o(this.#l,e.slice(6)):"theme"===e?this.#l=B(t??{}):this.#r=o(this.#r,e)}#p(e){e!==w(this.config)&&(this.config=this.#s?v(x(this.#r),this.#r):{...this.#r},this.theme=S(this.#l,{validate:!1,future:this.config.future}),this.#n())}#n(){this.config={...this.config,theme:this.theme}}#m(){for(let e of this.#e)e(this.config,this.theme)}#u(){this.#c(this.exportSnapshot())}#c(e,t=!1){if(this.#o)return;this.#i.set(e,{config:this.#r,theme:this.#l,origin:this.origin});let a=JSON.stringify(e),o=this.#a>=0&&this.#t[this.#a]?JSON.stringify(this.#t[this.#a]):null;if(t&&this.#a>=0)return void(this.#t[this.#a]=e);let r=this.#a>=0?this.#i.get(this.#t[this.#a]):void 0;a===o&&I(this.#i.get(e),r)||(this.#t=this.#t.slice(0,this.#a+1),this.#t.push(e),this.#a=this.#t.length-1)}#h(e){this.#o=!0;let t=this.#i.get(e);this.origin=t?.origin??"imported",this.#r=t?.config??e.config,this.#l=t?.theme??e.theme,this.config=e.config,this.theme=S(e.theme,{validate:!1,future:this.config.future}),this.#n(),this.#o=!1,this.#m()}};const Je=["50","100","200","300","400","500","600","700","800","900","950"],Ze=["primary","secondary","accent","gray","success","warning","error","info"],Ke=[{id:"solid",label:"Solid"},{id:"soft",label:"Soft"}],Xe=["primary","secondary","accent","gray"],Qe={primary:"Primary",secondary:"Secondary",accent:"Accent",gray:"Neutral"},et={roleId:"role-surfaces",helper:"Page and panel backgrounds",previewZone:"container",intensities:Ke,targets:[{path:"semantic.colors.background",kind:"background"},{path:"semantic.colors.surface",kind:"background"},{path:"semantic.colors.container",kind:"background"}]},tt={roleId:"role-header",helper:"Widget header bar",previewZone:"header",intensities:Ke,targets:[{path:"components.header.background",kind:"background"},{path:"components.header.foreground",kind:"foreground"},{path:"components.header.border",kind:"border"},{path:"components.header.iconBackground",kind:"accent"},{path:"components.header.iconForeground",kind:"foreground"},{path:"components.header.titleForeground",kind:"accent"},{path:"components.header.subtitleForeground",kind:"foreground"},{path:"components.header.actionIconForeground",kind:"foreground"}]},at={roleId:"role-user-messages",helper:"User chat bubbles",previewZone:"user-message",intensities:Ke,targets:[{path:"components.message.user.background",kind:"background"},{path:"components.message.user.text",kind:"foreground"}]},ot={roleId:"role-assistant-messages",helper:"Assistant chat bubbles",previewZone:"assistant-message",intensities:Ke,targets:[{path:"components.message.assistant.background",kind:"background"},{path:"components.message.assistant.text",kind:"foreground"}]},rt={roleId:"role-primary-actions",helper:"Send button and primary buttons",intensities:Ke,targets:[{path:"components.button.primary.background",kind:"background"},{path:"components.button.primary.foreground",kind:"foreground"},{path:"semantic.colors.interactive.default",kind:"accent"},{path:"semantic.colors.interactive.hover",kind:"accent"}]},lt={roleId:"role-scroll-to-bottom",helper:"Scroll-to-bottom affordances in transcript and event stream",intensities:Ke,targets:[{path:"components.scrollToBottom.background",kind:"background"},{path:"components.scrollToBottom.foreground",kind:"foreground"},{path:"components.scrollToBottom.border",kind:"border"}]},st={roleId:"role-input",helper:"Message input field",previewZone:"composer",intensities:Ke,targets:[{path:"components.input.background",kind:"background"},{path:"components.input.placeholder",kind:"foreground"},{path:"components.input.focus.border",kind:"accent"},{path:"components.input.focus.ring",kind:"accent"}]},it={roleId:"role-links-focus",helper:"Links, focus rings, and interactive highlights",intensities:Ke,targets:[{path:"semantic.colors.accent",kind:"accent"},{path:"semantic.colors.interactive.focus",kind:"accent"},{path:"semantic.colors.interactive.active",kind:"accent"},{path:"components.markdown.link.foreground",kind:"accent"}]},nt={roleId:"role-borders",helper:"Borders, dividers, and separators",intensities:Ke,targets:[{path:"semantic.colors.border",kind:"border"},{path:"semantic.colors.divider",kind:"border"}]},ct=[et,tt,at,ot,rt,lt,st,it,nt],dt=/^palette\.colors\.(\w+)\.(\d+)$/;b();const pt=(e,t,a,o,r)=>({id:e,label:t,type:"token-ref",path:a,defaultValue:o,tokenRef:{tokenType:"color"},...void 0===r?{}:{description:r}}),ut=(e,t,a,o,r,l)=>({id:t,label:a,type:e,path:o,defaultValue:r,...void 0===l?{}:{description:l}}),mt=(e,t,a,o,r,l)=>({id:e,label:t,type:"slider",path:a,defaultValue:o,slider:r,...void 0===l?{}:{description:l}}),ht=e=>String(e??"").trim()||void 0,gt=e=>"number"==typeof e?`${e}px`:String(e??"").trim(),ft=e=>String(e??"").trim(),bt=[{id:"brand-colors",title:"Brand Colors",description:"Pick your brand colors. A full shade scale is generated automatically for both light and dark themes.",collapsed:!1,fields:[ut("color","brand-primary","Primary","theme.palette.colors.primary.500","#171717","Main brand color for buttons, links, and accents"),ut("color","brand-secondary","Secondary","theme.palette.colors.secondary.500","#7c3aed","Supporting brand color"),ut("color","brand-accent","Accent","theme.palette.colors.accent.500","#06b6d4","Highlight and decorative color")]},{id:"chat-colors",title:"Chat Colors",description:"Customize the main colors of the chat interface.",collapsed:!0,fields:[pt("chat-header-bg","Header Background","theme.components.header.background","semantic.colors.surface"),pt("chat-header-fg","Header Foreground","theme.components.header.foreground","","Anchors the header text. The title takes it, the subtitle and button icons take a 72% mix of it over the background"),pt("chat-header-icon-bg","Header Icon Background","theme.components.header.iconBackground","semantic.colors.primary"),pt("chat-header-icon-fg","Header Icon Color","theme.components.header.iconForeground","semantic.colors.textInverse"),pt("chat-header-title-fg","Header Title Color","theme.components.header.titleForeground","","Blank follows the header foreground"),pt("chat-header-subtitle-fg","Header Subtitle Color","theme.components.header.subtitleForeground","","Blank follows the 72% foreground mix"),pt("chat-header-action-icons-fg","Header Button Icons","theme.components.header.actionIconForeground","","Blank follows the 72% foreground mix"),pt("chat-msg-user-bg","User Message Background","theme.components.message.user.background","semantic.colors.primary"),pt("chat-msg-user-text","User Message Text","theme.components.message.user.text","semantic.colors.textInverse"),pt("chat-msg-assistant-bg","Assistant Message Background","theme.components.message.assistant.background","semantic.colors.container"),pt("chat-msg-assistant-text","Assistant Message Text","theme.components.message.assistant.text","semantic.colors.text")]},{id:"launcher-style",title:"Launcher",description:"Control launcher appearance.",collapsed:!0,fields:[mt("style-launcher-size","Launcher Size","theme.components.launcher.size","60px",{min:32,max:80,step:2}),{id:"style-launcher-shape",label:"Launcher Shape",type:"select",path:"theme.components.launcher.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Rounded Square"},{value:"palette.radius.lg",label:"Rounded"},{value:"palette.radius.xl",label:"Very Rounded"},{value:"palette.radius.full",label:"Circle"}]},{id:"style-launcher-shadow",label:"Launcher Shadow",type:"select",path:"theme.components.launcher.shadow",defaultValue:"palette.shadows.lg",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]}]},{id:"typography",title:"Typography",collapsed:!0,fields:[{id:"typo-font-family",label:"Font Family",type:"select",path:"theme.semantic.typography.fontFamily",defaultValue:"palette.typography.fontFamily.sans",options:[{value:"palette.typography.fontFamily.sans",label:"Sans Serif"},{value:"palette.typography.fontFamily.serif",label:"Serif"},{value:"palette.typography.fontFamily.mono",label:"Monospace"}]},{id:"typo-font-size",label:"Base Font Size",type:"select",path:"theme.semantic.typography.fontSize",defaultValue:"palette.typography.fontSize.base",options:[{value:"palette.typography.fontSize.xs",label:"Extra Small (0.75rem)"},{value:"palette.typography.fontSize.sm",label:"Small (0.875rem)"},{value:"palette.typography.fontSize.base",label:"Base (1rem)"},{value:"palette.typography.fontSize.lg",label:"Large (1.125rem)"},{value:"palette.typography.fontSize.xl",label:"Extra Large (1.25rem)"}]},{id:"typo-font-weight",label:"Font Weight",type:"select",path:"theme.semantic.typography.fontWeight",defaultValue:"palette.typography.fontWeight.normal",options:[{value:"palette.typography.fontWeight.normal",label:"Normal (400)"},{value:"palette.typography.fontWeight.medium",label:"Medium (500)"},{value:"palette.typography.fontWeight.semibold",label:"Semibold (600)"},{value:"palette.typography.fontWeight.bold",label:"Bold (700)"}]},{id:"typo-line-height",label:"Line Height",type:"select",path:"theme.semantic.typography.lineHeight",defaultValue:"palette.typography.lineHeight.normal",options:[{value:"palette.typography.lineHeight.tight",label:"Tight (1.25)"},{value:"palette.typography.lineHeight.normal",label:"Normal (1.5)"},{value:"palette.typography.lineHeight.relaxed",label:"Relaxed (1.625)"}]}]},{id:"theme-mode",title:"Runtime Theme",description:"Controls how the shipped widget picks light or dark mode.",collapsed:!1,fields:[{id:"theme-mode",label:"Runtime Theme",description:"Always Light, Always Dark, or follow the visitor system preference",type:"select",path:"colorScheme",defaultValue:"auto",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"auto",label:"Follow System"}]}]},{id:"shape",title:"Shape",description:"Control the corner roundness across the widget.",collapsed:!0,fields:[mt("radius-sm","Small","theme.palette.radius.sm","0.125rem",{min:0,max:16,step:1}),mt("radius-md","Medium","theme.palette.radius.md","0.375rem",{min:0,max:24,step:1}),mt("radius-lg","Large","theme.palette.radius.lg","0.5rem",{min:0,max:32,step:1}),mt("radius-xl","Extra Large","theme.palette.radius.xl","0.75rem",{min:0,max:48,step:1}),mt("radius-full","Full","theme.palette.radius.full","9999px",{min:0,max:100,step:1,isRadiusFull:!0})],presets:[{id:"radius-default",label:"Default",values:{"theme.palette.radius.sm":"0.125rem","theme.palette.radius.md":"0.375rem","theme.palette.radius.lg":"0.5rem","theme.palette.radius.xl":"0.75rem","theme.palette.radius.full":"9999px"}},{id:"radius-sharp",label:"Sharp",values:{"theme.palette.radius.sm":"1px","theme.palette.radius.md":"2px","theme.palette.radius.lg":"3px","theme.palette.radius.xl":"4px","theme.palette.radius.full":"4px"}},{id:"radius-rounded",label:"Rounded",values:{"theme.palette.radius.sm":"0.5rem","theme.palette.radius.md":"0.75rem","theme.palette.radius.lg":"1rem","theme.palette.radius.xl":"1.5rem","theme.palette.radius.full":"9999px"}}]},{id:"shadows",title:"Shadows",collapsed:!0,fields:[ut("text","shadow-sm","Small","theme.palette.shadows.sm","0 1px 2px 0 rgb(0 0 0 / 0.05)"),ut("text","shadow-md","Medium","theme.palette.shadows.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),ut("text","shadow-lg","Large","theme.palette.shadows.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),ut("text","shadow-xl","Extra Large","theme.palette.shadows.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)")]},{id:"widget-style",title:"Widget Surface",description:"Adjust the main panel and message bubble treatment.",collapsed:!0,fields:[{id:"style-panel-radius",label:"Panel Corner Radius",type:"select",path:"theme.components.panel.borderRadius",defaultValue:"palette.radius.xl",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"style-panel-shadow",label:"Panel Shadow",type:"select",path:"theme.components.panel.shadow",defaultValue:"palette.shadows.xl",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},pt("style-panel-canvas-bg","Detached Canvas Background","theme.components.panel.canvasBackground",Le,"Fills the region behind a detached panel; defaults to transparent"),{id:"style-msg-user-radius",label:"User Message Radius",type:"select",path:"theme.components.message.user.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"style-msg-assistant-radius",label:"Assistant Message Radius",type:"select",path:"theme.components.message.assistant.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]}],yt={id:"semantic-colors",title:"Semantic Colors",description:"Map intents to palette colors.",collapsed:!0,fields:[pt("sem-primary","Primary","theme.semantic.colors.primary","palette.colors.primary.500","Main brand/action color"),pt("sem-secondary","Secondary","theme.semantic.colors.secondary","palette.colors.gray.500","Secondary actions"),pt("sem-accent","Accent","theme.semantic.colors.accent","palette.colors.primary.600","Accent/highlight color"),pt("sem-surface","Surface","theme.semantic.colors.surface","palette.colors.gray.50","Primary surface background"),pt("sem-background","Background","theme.semantic.colors.background","palette.colors.gray.50","Page/widget background"),pt("sem-container","Container","theme.semantic.colors.container","palette.colors.gray.100","Container/card background"),pt("sem-text","Text","theme.semantic.colors.text","palette.colors.gray.900","Primary text color"),pt("sem-text-muted","Text Muted","theme.semantic.colors.textMuted","palette.colors.gray.500","Secondary/muted text"),pt("sem-text-inverse","Text Inverse","theme.semantic.colors.textInverse","palette.colors.gray.50","Text on dark backgrounds"),pt("sem-border","Border","theme.semantic.colors.border","palette.colors.gray.200","Default border color"),pt("sem-divider","Divider","theme.semantic.colors.divider","palette.colors.gray.200","Divider/separator color"),pt("sem-interactive-default","Interactive Default","theme.semantic.colors.interactive.default","palette.colors.primary.500"),pt("sem-interactive-hover","Interactive Hover","theme.semantic.colors.interactive.hover","palette.colors.primary.600"),pt("sem-interactive-focus","Interactive Focus","theme.semantic.colors.interactive.focus","palette.colors.primary.700"),pt("sem-interactive-active","Interactive Active","theme.semantic.colors.interactive.active","palette.colors.primary.800"),pt("sem-interactive-disabled","Interactive Disabled","theme.semantic.colors.interactive.disabled","palette.colors.gray.300"),pt("sem-feedback-success","Success","theme.semantic.colors.feedback.success","palette.colors.success.500"),pt("sem-feedback-warning","Warning","theme.semantic.colors.feedback.warning","palette.colors.warning.500"),pt("sem-feedback-error","Error","theme.semantic.colors.feedback.error","palette.colors.error.500"),pt("sem-feedback-info","Info","theme.semantic.colors.feedback.info","palette.colors.primary.500")]},vt=q(),wt=yt,xt=[q(),yt],kt={id:"comp-panel",title:"Panel",collapsed:!1,fields:[ut("text","panel-width","Width","theme.components.panel.width",i),ut("text","panel-max-width","Max Width","theme.components.panel.maxWidth",n),ut("text","panel-height","Height","theme.components.panel.height","600px"),ut("text","panel-max-height","Max Height","theme.components.panel.maxHeight","calc(100vh - 80px)"),{id:"panel-border-radius",label:"Border Radius",type:"select",path:"theme.components.panel.borderRadius",defaultValue:"palette.radius.xl",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"panel-shadow",label:"Shadow",type:"select",path:"theme.components.panel.shadow",defaultValue:"palette.shadows.xl",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},ut("text","panel-inset","Detached Inset","theme.components.panel.inset",Fe,"Gap around the card when launcher.detachedPanel is on")]},St={id:"comp-launcher",title:"Launcher",collapsed:!0,fields:[mt("launcher-size","Size","theme.components.launcher.size","60px",{min:32,max:80,step:2}),mt("launcher-icon-size","Icon Size","theme.components.launcher.iconSize","28px",{min:16,max:48,step:2}),{id:"launcher-icon-stroke-width",label:"Icon Stroke Width",description:"Unitless line weight for the agent glyph and the call-to-action arrow",type:"slider",path:"theme.components.launcher.iconStrokeWidth",defaultValue:"1.5",slider:{min:1,max:2.5,step:.25,unit:"none"},parseValue:ft},{id:"launcher-border-radius",label:"Border Radius",type:"select",path:"theme.components.launcher.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"},{value:"palette.radius.full",label:"Full (Circle)"}]},{id:"launcher-shadow",label:"Shadow",type:"select",path:"theme.components.launcher.shadow",defaultValue:"palette.shadows.lg",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]}]},Ct={id:"comp-header-controls",title:"Header Controls",description:"One box, glyph, and stroke shared by every header icon button: close, clear chat, trailing actions, and Messages, plus the strip height.",collapsed:!0,fields:[{id:"header-min-height",label:"Header Min Height",description:"CSS length, e.g. 65px. Blank stays at the natural height",type:"text",path:"theme.components.header.minHeight",defaultValue:"",parseValue:ht},{id:"header-control-size",label:"Control Size",description:"The button box. Coarse pointers still floor the hit area at 40px",type:"slider",path:"theme.components.header.controlSize",defaultValue:"32px",slider:{min:24,max:64,step:2},parseValue:gt},{id:"header-control-icon-size",label:"Icon Size",description:"The glyph inside the button",type:"slider",path:"theme.components.header.controlIconSize",defaultValue:"16px",slider:{min:12,max:40,step:1},parseValue:gt},{id:"header-control-stroke-width",label:"Icon Stroke Width",description:"Unitless line weight. The close X renders at 0.7 of it so its sparser glyph matches",type:"slider",path:"theme.components.header.controlStrokeWidth",defaultValue:"1.5",slider:{min:1,max:2.5,step:.25,unit:"none"},parseValue:ft}]},Tt={id:"comp-history-rail-header",title:"Messages Rail Header",description:"The Messages rail top strip. Match its height to the header so both read as one band.",collapsed:!0,fields:[{id:"rail-header-min-height",label:"Min Height",description:"CSS length. Blank follows the header min height",type:"text",path:"theme.components.history.railHeader.minHeight",defaultValue:"",parseValue:ht},{id:"rail-header-border",label:"Bottom Border",description:"Full border-bottom shorthand, e.g. 1px solid #333",type:"text",path:"theme.components.history.railHeader.border",defaultValue:"",parseValue:ht}]},At={id:"comp-history-rail-header-colors",title:"Messages Rail Header Colors",collapsed:!0,fields:[pt("rail-header-bg","Background","theme.components.history.railHeader.background","semantic.colors.container")]},Bt={id:"comp-history-overlay",title:"Messages Floating Rail",description:"The Messages rail floating over the conversation, when a collapsed rail opens on hover.",collapsed:!0,fields:[{id:"history-overlay-margin",label:"Margin",description:"Gap from the trigger, the docked edge and the bottom",type:"text",path:"theme.components.history.overlay.margin",defaultValue:"",parseValue:ht},{id:"history-overlay-radius",label:"Corner Radius",description:"CSS length on all four corners. Blank keeps 16px",type:"text",path:"theme.components.history.overlay.borderRadius",defaultValue:"",parseValue:ht},{id:"history-overlay-shadow",label:"Shadow",description:"Full box-shadow shorthand. Blank keeps the built-in elevation",type:"text",path:"theme.components.history.overlay.shadow",defaultValue:"",parseValue:ht}]},It={id:"comp-history-overlay-colors",title:"Messages Floating Rail Colors",collapsed:!0,fields:[pt("history-overlay-bg","Background","theme.components.history.overlay.background","semantic.colors.container")]},Mt={id:"comp-history-motion",title:"Messages Motion",description:"Enter and exit animation of the Messages body. The bar is persistent chrome and never animates; reduced-motion preferences always win.",collapsed:!0,fields:[{id:"history-motion-enter-ms",label:"Enter Duration",description:"Milliseconds, e.g. 180. 0 disables the entrance. Blank keeps 180",type:"text",path:"theme.components.history.motion.enterDurationMs",defaultValue:"",parseValue:ht},{id:"history-motion-enter-easing",label:"Enter Easing",description:"CSS easing, e.g. ease-out or cubic-bezier(0, 0, 0.2, 1)",type:"text",path:"theme.components.history.motion.enterEasing",defaultValue:"",parseValue:ht},{id:"history-motion-exit-ms",label:"Exit Duration",description:"Milliseconds, e.g. 160. 0 disables the exit. Blank keeps 160",type:"text",path:"theme.components.history.motion.exitDurationMs",defaultValue:"",parseValue:ht},{id:"history-motion-exit-easing",label:"Exit Easing",description:"CSS easing, e.g. ease-in or cubic-bezier(0.4, 0, 1, 1)",type:"text",path:"theme.components.history.motion.exitEasing",defaultValue:"",parseValue:ht}]},Rt={id:"comp-tooltip",title:"Tooltip",description:"The hover and focus tooltip on icon controls, including its shortcut hint chip.",collapsed:!0,fields:[{id:"tooltip-radius",label:"Corner Radius",type:"select",path:"theme.components.tooltip.borderRadius",defaultValue:"palette.radius.sm",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"tooltip-font-size",label:"Font Size",description:"CSS length. Blank stays at 12px",type:"text",path:"theme.components.tooltip.fontSize",defaultValue:"",parseValue:ht},ut("toggle","tooltip-arrow","Show Arrow","theme.components.tooltip.arrow",!0,"The caret pointing at the control")]},Vt={id:"comp-tooltip-colors",title:"Tooltip Colors",collapsed:!0,fields:[pt("tooltip-bg","Background","theme.components.tooltip.background","palette.colors.gray.900"),pt("tooltip-fg","Label","theme.components.tooltip.foreground","palette.colors.primary.50"),pt("tooltip-hint-fg","Shortcut Hint","theme.components.tooltip.hintForeground","palette.colors.gray.400")]},Et={id:"comp-composer-spacing",title:"Composer Spacing",collapsed:!0,fields:[ut("text","composer-padding","Padding","theme.components.composer.padding","0.75rem 1rem"),ut("text","composer-expanded-padding","Expanded Padding","theme.components.composer.expandedPadding","12px 16px"),ut("text","composer-expanded-radius","Expanded Corners","theme.components.composer.expandedBorderRadius","24px"),ut("text","composer-gap","Row Gap","theme.components.composer.gap","0.5rem","Space between the textarea row and the actions row"),ut("text","composer-control-gap","Control Gap","theme.components.composer.controlGap","0.5rem"),ut("text","composer-editor-min-height","Editor Minimum Height","theme.components.composer.editorMinHeight","24px"),ut("text","composer-editor-padding","Editor Padding","theme.components.composer.editorPadding","2px"),ut("text","composer-suggestions-gap","Below Composer Suggestions Gap","theme.components.composer.suggestionsGap","0.5rem"),ut("text","composer-segmented-gap","Segment Gap","theme.components.composer.segmented.gap","2px"),ut("text","composer-segmented-font-size","Segment Font Size","theme.components.composer.segmented.fontSize","0.875rem"),ut("text","composer-segmented-line-height","Segment Line Height","theme.components.composer.segmented.lineHeight","1.25rem"),ut("text","composer-segmented-height","Segment Minimum Height","theme.components.composer.segmented.minHeight","0px"),ut("text","composer-segmented-font-weight","Segment Font Weight","theme.components.composer.segmented.fontWeight","400"),ut("text","composer-mode-font-size","Mode Font Size","theme.components.composer.mode.fontSize","0.875rem"),ut("text","composer-mode-height","Mode Height","theme.components.composer.mode.height","40px"),ut("text","composer-mode-padding","Mode Horizontal Padding","theme.components.composer.mode.paddingInline","0.625rem"),ut("text","composer-mode-gap","Mode Label Gap","theme.components.composer.mode.gap","0.25rem"),ut("text","composer-model-font-size","Model Font Size","theme.components.composer.modelPicker.fontSize","0.8125rem"),ut("text","composer-model-font-weight","Model Font Weight","theme.components.composer.modelPicker.fontWeight","400"),ut("text","composer-model-height","Model Height","theme.components.composer.modelPicker.height","40px"),ut("text","composer-model-width","Model Minimum Width","theme.components.composer.modelPicker.minWidth","0px"),ut("text","composer-model-padding","Model Horizontal Padding","theme.components.composer.modelPicker.paddingInline","0.625rem 1.75rem"),ut("text","composer-font-size","Font Size","theme.components.composer.fontSize","0.875rem"),ut("text","composer-line-height","Line Height","theme.components.composer.lineHeight","1.25rem"),mt("composer-control-size","Control Size","theme.components.composer.controlSize","40px",{min:24,max:64,step:2},"Edge of every icon control in the action row"),mt("composer-control-icon-size","Control Icon Size","theme.components.composer.controlIconSize","24px",{min:12,max:40,step:1},"Glyph inside those controls")]},Pt={id:"comp-header-colors",title:"Header Colors",collapsed:!0,fields:[pt("header-bg","Background","theme.components.header.background","semantic.colors.surface"),pt("header-fg","Foreground","theme.components.header.foreground","","Anchors the header text. Background and foreground together derive every color left blank below"),pt("header-icon-bg","Icon background","theme.components.header.iconBackground","semantic.colors.primary"),pt("header-icon-fg","Icon color","theme.components.header.iconForeground","semantic.colors.textInverse"),pt("header-title-fg","Title color","theme.components.header.titleForeground","","Blank follows the header foreground"),pt("header-subtitle-fg","Subtitle color","theme.components.header.subtitleForeground","","Blank follows a 72% mix of the foreground over the background"),pt("header-action-icons-fg","Clear / close icons","theme.components.header.actionIconForeground","","Blank follows the same 72% foreground mix as the subtitle"),pt("header-border","Border","theme.components.header.border","","Border color or token reference; blank follows a 14% mix of foreground over background")]},$t={id:"comp-message-colors",title:"Message Colors",collapsed:!0,fields:[pt("msg-user-bg","User Bubble Background","theme.components.message.user.background","semantic.colors.primary"),pt("msg-user-text","User Bubble Text","theme.components.message.user.text","semantic.colors.textInverse"),pt("msg-assistant-bg","Assistant Bubble Background","theme.components.message.assistant.background","semantic.colors.container"),pt("msg-assistant-text","Assistant Bubble Text","theme.components.message.assistant.text","semantic.colors.text")]},Ot={id:"comp-input-colors",title:"Input Colors",collapsed:!0,fields:[pt("input-bg","Background","theme.components.input.background","semantic.colors.surface"),pt("input-placeholder","Placeholder Color","theme.components.input.placeholder","semantic.colors.textMuted"),pt("input-focus-border","Focus Border","theme.components.input.focus.border","semantic.colors.interactive.focus"),pt("input-focus-ring","Focus Ring","theme.components.input.focus.ring","semantic.colors.interactive.focus")]},Ft={id:"comp-button-colors",title:"Button Colors",collapsed:!0,fields:[pt("btn-primary-bg","Primary Background","theme.components.button.primary.background","semantic.colors.primary"),pt("btn-primary-fg","Primary Foreground","theme.components.button.primary.foreground","semantic.colors.textInverse"),pt("btn-secondary-bg","Secondary Background","theme.components.button.secondary.background","semantic.colors.surface"),pt("btn-secondary-fg","Secondary Foreground","theme.components.button.secondary.foreground","semantic.colors.text"),ut("color","btn-ghost-bg","Ghost Background","theme.components.button.ghost.background","transparent"),pt("btn-ghost-fg","Ghost Foreground","theme.components.button.ghost.foreground","semantic.colors.text")]},Lt={id:"scroll-to-bottom-style",title:"Scroll To Bottom",description:"Style the floating jump-to-latest affordance.",collapsed:!0,fields:[pt("scroll-bottom-bg","Background","theme.components.scrollToBottom.background","components.button.primary.background"),pt("scroll-bottom-fg","Foreground","theme.components.scrollToBottom.foreground","components.button.primary.foreground"),pt("scroll-bottom-border","Border","theme.components.scrollToBottom.border","semantic.colors.primary"),ut("text","scroll-bottom-size","Size","theme.components.scrollToBottom.size","40px"),{id:"scroll-bottom-radius",label:"Border Radius",type:"select",path:"theme.components.scrollToBottom.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"},{value:"palette.radius.full",label:"Full"}]},{id:"scroll-bottom-shadow",label:"Shadow",type:"select",path:"theme.components.scrollToBottom.shadow",defaultValue:"palette.shadows.sm",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},ut("text","scroll-bottom-padding","Padding","theme.components.scrollToBottom.padding","0.5rem 0.875rem"),ut("text","scroll-bottom-gap","Gap","theme.components.scrollToBottom.gap","0.5rem"),ut("text","scroll-bottom-font-size","Font Size","theme.components.scrollToBottom.fontSize","0.875rem"),ut("text","scroll-bottom-icon-size","Icon Size","theme.components.scrollToBottom.iconSize","14px")]},Wt={id:"comp-suggestions",title:"Suggestions",description:"Style starter cards, follow-up chips, and list rows.",collapsed:!0,fields:[pt("suggestion-chip-bg","Chip Background","theme.components.suggestion.chip.background","semantic.colors.surface"),pt("suggestion-chip-fg","Chip Text","theme.components.suggestion.chip.foreground","semantic.colors.text"),pt("suggestion-chip-border","Chip Border","theme.components.suggestion.chip.border","semantic.colors.border"),pt("suggestion-chip-hover","Chip Hover","theme.components.suggestion.chip.hoverBackground","palette.colors.gray.100"),pt("suggestion-chip-focus","Chip Focus Ring","theme.components.suggestion.chip.focusRing","semantic.colors.interactive.focus"),pt("suggestion-card-bg","Card Background","theme.components.suggestion.card.background","semantic.colors.surface"),pt("suggestion-card-fg","Card Text","theme.components.suggestion.card.foreground","semantic.colors.text"),pt("suggestion-card-border","Card Border","theme.components.suggestion.card.border","semantic.colors.border"),pt("suggestion-card-hover","Card Hover","theme.components.suggestion.card.hoverBackground","palette.colors.gray.100"),{id:"suggestion-card-shadow",label:"Card Shadow",type:"select",path:"theme.components.suggestion.card.shadow",defaultValue:"palette.shadows.sm",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"}]},ut("color","suggestion-list-bg","List Background","theme.components.suggestion.list.background","transparent"),pt("suggestion-list-border","List Border","theme.components.suggestion.list.border","semantic.colors.border"),ut("text","suggestion-chip-item-gap","Chip Spacing","theme.components.suggestion.chip.itemGap","8px","Space between chips"),ut("text","suggestion-card-item-gap","Card Spacing","theme.components.suggestion.card.itemGap","8px","Space between cards"),ut("text","suggestion-list-item-gap","List Spacing","theme.components.suggestion.list.itemGap","8px","Space between list rows")]},zt=[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}],Ht="0 5px 15px rgba(15, 23, 42, 0.08)",Dt=[{value:Ht,label:"Default"},...zt],Nt={id:"comp-shadows",title:"Component Shadows",description:"Box-shadow for chat bubbles and surfaces.",collapsed:!0,fields:[{id:"shadow-msg-user",label:"User Message",type:"select",path:"theme.components.message.user.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-msg-assistant",label:"Assistant Message",type:"select",path:"theme.components.message.assistant.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-tool-bubble",label:"Tool Call Bubble",type:"select",path:"theme.components.toolBubble.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-reasoning-bubble",label:"Reasoning Bubble",type:"select",path:"theme.components.reasoningBubble.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-approval",label:"Approval Bubble",type:"select",path:"theme.components.approval.requested.shadow",defaultValue:Ht,options:Dt},{id:"shadow-intro-card",label:"Intro Card",type:"select",path:"theme.components.introCard.shadow",defaultValue:"palette.shadows.none",options:Dt},{id:"shadow-composer",label:"Composer",type:"select",path:"theme.components.composer.shadow",defaultValue:"palette.shadows.none",options:zt}]},_t=[{value:"",label:"Default"},{value:"400",label:"Normal (400)"},{value:"500",label:"Medium (500)"},{value:"600",label:"Semibold (600)"},{value:"700",label:"Bold (700)"}],jt={id:"comp-text-styles",title:"Header & Welcome Text",description:"Typography for the header title and the welcome greeting. Leave blank to keep the built-in defaults.",collapsed:!0,fields:[{id:"header-title-font-family",label:"Header Title Font",description:"CSS font-family, e.g. Georgia, serif",type:"text",path:"theme.components.header.title.fontFamily",defaultValue:"",parseValue:ht},{id:"header-title-font-size",label:"Header Title Size",description:"CSS length, e.g. 1.125rem",type:"text",path:"theme.components.header.title.fontSize",defaultValue:"",parseValue:ht},{id:"header-title-font-weight",label:"Header Title Weight",type:"select",path:"theme.components.header.title.fontWeight",defaultValue:"",options:_t,parseValue:ht},{id:"welcome-title-font-family",label:"Welcome Title Font",description:"CSS font-family, e.g. Georgia, serif",type:"text",path:"theme.components.introCard.title.fontFamily",defaultValue:"",parseValue:ht},{id:"welcome-title-font-size",label:"Welcome Title Size",description:"CSS length, e.g. 1.5rem",type:"text",path:"theme.components.introCard.title.fontSize",defaultValue:"",parseValue:ht},{id:"welcome-title-font-weight",label:"Welcome Title Weight",type:"select",path:"theme.components.introCard.title.fontWeight",defaultValue:"",options:_t,parseValue:ht}]},Ut=(e,t,a=!1)=>t.split(" ").map(t=>({id:`component-${e.replace(/\./g,"-")}-${t.replace(/\./g,"-")}`,label:t.replace(/\./g," / ").replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()),path:`theme.components.${e}.${t}`,type:a?"token-ref":"text",...a?{tokenRef:{tokenType:"color"}}:{},defaultValue:"",parseValue:ht,unsettable:!0,description:a?"Color or token reference (border fields here are colors). Unset restores the component fallback.":"CSS value; use lengths for sizes/padding, unitless stroke width, and ms/s for duration. Unset restores the component fallback."})),qt=[["header.close","Close Control"],["header.clear","Clear Chat Control"],["composer.send","Submit Control"],["voice.control","Microphone Control"]],Gt=qt.map(([e,t])=>({id:`comp-${e.replace(".","-")}-shape`,title:t,collapsed:!0,description:"composer.send"===e?"Submit only. Size applies to icon mode; theme padding also supports text mode.":"voice.control"===e?"Idle mic only. Set both box and glyph size to migrate legacy voiceRecognition.iconSize.":"This header control only; Messages and trailing actions keep their own styling.",fields:Ut(e,"size iconSize iconStrokeWidth borderWidth borderRadius padding")})),Yt=[...qt,["button.stop","Stop Control"]].map(([e,t])=>({id:`comp-${e.replace(".","-")}-colors`,title:`${t} Colors`,collapsed:!0,fields:Ut(e,"button.stop"===e?"background foreground":"background foreground borderColor",!0)})),Jt=[...Gt,{id:"comp-composer-menu-shape",title:"More Menu Shape",collapsed:!0,fields:Ut("composer.overflowMenu","borderRadius padding rowGap rowPadding rowBorderRadius fontSize lineHeight iconSize iconGap descriptionFontSize dividerSpacing minWidth maxHeight shadow")},{id:"comp-attachment-shape",title:"Attachment Preview Shape",collapsed:!0,fields:Ut("attachment.composer","gap image.width image.height image.borderRadius image.chip.width image.chip.minHeight image.chip.borderRadius image.chip.padding image.chip.gap image.chip.fontSize file.width file.minHeight file.borderRadius file.padding file.gap file.iconSize file.fontSize remove.size remove.iconSize remove.borderRadius remove.inset remove.borderWidth image.remove.size image.remove.iconSize image.remove.borderRadius image.remove.inset image.remove.borderWidth file.remove.size file.remove.iconSize file.remove.borderRadius file.remove.inset file.remove.borderWidth")},{id:"comp-tool-chrome",title:"Tool Card & Row Chrome",collapsed:!0,fields:Ut("toolBubble","borderWidth borderRadius header.padding content.padding loading.duration")},{id:"comp-question-chrome",title:"Question Sheet Chrome",collapsed:!0,fields:Ut("askUserQuestion","sheet.shadow pill.borderRadius")},{id:"comp-artifact-chrome",title:"Artifact Chrome",collapsed:!0,description:"pane.border and pane.borderLeft accept full CSS border shorthands; padding/radius/fadeSize are CSS lengths and shadows are CSS box-shadow values.",fields:Ut("artifact","pane.padding pane.borderRadius pane.shadow pane.border pane.borderLeft chat.shadow split.outerRadius tab.fadeSize")},{id:"comp-suggestion-chip-type",title:"Suggestion Chip Type & Padding",collapsed:!0,fields:Ut("suggestion.chip","fontWeight padding")},kt,St,Ct,Tt,Bt,Mt,Rt,{id:"comp-message-shape",title:"Message Shape",collapsed:!0,fields:[{id:"msg-user-radius",label:"User Bubble Radius",type:"select",path:"theme.components.message.user.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"msg-assistant-radius",label:"Assistant Bubble Radius",type:"select",path:"theme.components.message.assistant.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]},{id:"comp-input-shape",title:"Input Shape",collapsed:!0,fields:[{id:"input-radius",label:"Border Radius",type:"select",path:"theme.components.input.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]},Et,{id:"comp-button-shape",title:"Button Shape",collapsed:!0,fields:[{id:"btn-primary-radius",label:"Primary Radius",type:"select",path:"theme.components.button.primary.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.full",label:"Full"}]}]},jt,Nt],Zt=[...Yt,{id:"comp-composer-menu-colors",title:"More Menu Colors",collapsed:!0,fields:Ut("composer.overflowMenu","background foreground borderColor hoverBackground focusBackground descriptionColor dividerColor",!0)},{id:"comp-attachment-colors",title:"Attachment Preview Colors",collapsed:!0,fields:Ut("attachment.composer","image.background image.borderColor image.chip.background image.chip.borderColor image.chip.foreground file.background file.borderColor file.foreground file.mutedForeground file.iconBackground file.iconForeground remove.background remove.foreground remove.hoverBackground remove.hoverForeground remove.borderColor image.remove.background image.remove.foreground image.remove.hoverBackground image.remove.hoverForeground image.remove.borderColor file.remove.background file.remove.foreground file.remove.hoverBackground file.remove.hoverForeground file.remove.borderColor",!0)},{id:"comp-voice-states",title:"Voice State Colors",collapsed:!0,description:"Explicit values activate state colors. Unset preserves historical provider/browser defaults.",fields:Ut("voice","recording.indicator recording.background recording.border processing.icon processing.background processing.border speaking.icon speaking.background speaking.border",!0)},{id:"comp-tool-colors",title:"Tool Card & Row Colors",collapsed:!0,fields:Ut("toolBubble","background borderColor header.background header.foreground content.background content.foreground codeBlock.background codeBlock.foreground codeBlock.borderColor toggleForeground labelForeground loading.primary loading.secondary",!0)},{id:"comp-approval-colors",title:"Approval Colors",collapsed:!0,fields:Ut("approval","requested.background requested.border requested.text requested.titleColor requested.descriptionColor requested.reasonColor requested.parameters.background requested.parameters.foreground approve.background approve.foreground deny.background deny.foreground",!0)},{id:"comp-question-colors",title:"Question Sheet Colors",collapsed:!0,fields:Ut("askUserQuestion","sheet.background sheet.border pill.background pill.foreground pill.selectedBackground pill.selectedForeground customInput.background",!0)},{id:"comp-artifact-colors",title:"Artifact Chrome Colors",collapsed:!0,fields:Ut("artifact","pane.background toolbar.iconColor toolbar.toggleActiveBackground toolbar.toggleActiveBorderColor toolbar.toggleActiveColor",!0)},Pt,At,It,Vt,$t,Ot,Ft,Lt,Wt],Kt=[...Jt,...Zt],Xt=1048576,Qt={images:["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp"],"images-pdf":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf"],"images-text-pdf":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf","text/plain","text/markdown","text/csv","application/json"],all:["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf","text/plain","text/markdown","text/csv","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/json"]},ea={id:"copy",title:"Content & Copy",collapsed:!1,fields:[{id:"copy-show-welcome-card",label:"Welcome Surface",description:"Choose a welcome layout, or hide it.",type:"select",path:"welcome.variant",defaultValue:"card",options:[{value:"card",label:"Card"},{value:"hero",label:"Hero"},{value:"none",label:"Hidden"}]},ut("text","copy-welcome-title","Welcome Title","welcome.title","Hello 👋"),ut("text","copy-welcome-subtitle","Welcome Subtitle","welcome.subtitle","I can answer questions and help you get things done here."),ut("text","copy-placeholder","Input Placeholder","copy.inputPlaceholder",c),ut("text","copy-send-label","Send Button Label","copy.sendButtonLabel","Send")]},ta={id:"suggestions",title:"Suggestions",description:"Choose the suggested prompts, where they appear, and what happens when selected. Remove all prompts to hide them.",collapsed:!0,fields:[{id:"suggestions-list",label:"Starter Prompts",description:"Add, edit, and remove starter prompts directly.",type:"chip-list",path:"suggestions.starters.items",defaultValue:["Show me what you can help with","Walk me through getting started","Answer a question about this page"]},{id:"suggestions-starter-variant",label:"Starter Style",type:"select",path:"suggestions.starters.variant",defaultValue:"card",options:[{value:"card",label:"Cards"},{value:"chip",label:"Chips"},{value:"list",label:"List"}]},{id:"suggestions-starter-placement",label:"Starter Placement",type:"select",path:"suggestions.starters.placement",defaultValue:"auto",options:[{value:"auto",label:"Automatic"},{value:"welcome",label:"Welcome Surface"},{value:"composer",label:"Above Composer"},{value:"below-composer",label:"Below Composer"}]},{id:"suggestions-starter-behavior",label:"Starter Click",type:"select",path:"suggestions.starters.behavior",defaultValue:"send",options:[{value:"send",label:"Send Immediately"},{value:"fill",label:"Fill Composer"}]},{id:"suggestions-starter-overflow",label:"Starter Overflow",type:"select",path:"suggestions.starters.overflow",defaultValue:"wrap",options:[{value:"wrap",label:"Wrap Rows"},{value:"scroll",label:"Horizontal Scroll"}]},{id:"suggestions-followup-variant",label:"Follow-up Style",type:"select",path:"suggestions.followUps.variant",defaultValue:"chip",options:[{value:"chip",label:"Chips"},{value:"card",label:"Cards"},{value:"list",label:"List"}]},{id:"suggestions-followup-placement",label:"Follow-up Placement",type:"select",path:"suggestions.followUps.placement",defaultValue:"auto",options:[{value:"auto",label:"Automatic"},{value:"after-message",label:"After Messages"},{value:"composer",label:"Above Composer"}]},{id:"suggestions-followup-behavior",label:"Follow-up Click",type:"select",path:"suggestions.followUps.behavior",defaultValue:"send",options:[{value:"send",label:"Send Immediately"},{value:"fill",label:"Fill Composer"}]},{id:"suggestions-followup-overflow",label:"Follow-up Overflow",type:"select",path:"suggestions.followUps.overflow",defaultValue:"scroll",options:[{value:"scroll",label:"Horizontal Scroll"},{value:"wrap",label:"Wrap Rows"}]}]},aa={id:"general-layout",title:"Layout Basics",collapsed:!0,fields:[ut("toggle","layout-show-header","Show Header","layout.showHeader",!0),ut("toggle","layout-show-footer","Show Footer","layout.showFooter",!0),ut("text","layout-content-max-width","Content Max Width","layout.contentMaxWidth","","Max width for messages + composer")]},oa={id:"header-layout",title:"Header",collapsed:!0,fields:[{id:"layout-header",label:"Header Layout",type:"select",path:"layout.header.layout",defaultValue:"default",options:[{value:"default",label:"Default"},{value:"minimal",label:"Minimal"}]},ut("toggle","layout-show-icon","Show Header Icon","layout.header.showIcon",!0),ut("toggle","layout-show-title","Show Header Title","layout.header.showTitle",!0),ut("toggle","layout-show-subtitle","Show Header Subtitle","layout.header.showSubtitle",!0),ut("toggle","layout-show-close","Show Close Button","layout.header.showCloseButton",!0),ut("toggle","layout-show-clear","Show Clear Chat","layout.header.showClearChat",!0)]},ra={id:"messages-layout",title:"Messages",collapsed:!0,fields:[{id:"layout-messages",label:"Message Style",description:"Minimal uses a user bubble with an open assistant response",type:"select",path:"layout.messages.layout",defaultValue:"bubble",options:[{value:"bubble",label:"Bubble — bubbles for both"},{value:"minimal",label:"Minimal — user bubble, open assistant"},{value:"flat",label:"Flat — open messages for both"}]},{id:"layout-message-user-width",label:"User Width",description:"Content hugs the message; Full fills the transcript track",type:"select",path:"layout.messages.user.width",defaultValue:"content",options:[{value:"content",label:"Content"},{value:"full",label:"Full"}]},{id:"layout-message-user-max-width",label:"User Max Width",description:"Optional CSS width such as 80%, 42rem, or 72ch; blank uses the width mode default",type:"text",path:"layout.messages.user.maxWidth",defaultValue:"",parseValue:ht},{id:"layout-message-assistant-width",label:"Assistant Width",description:"Content hugs the message; Full fills the transcript track",type:"select",path:"layout.messages.assistant.width",defaultValue:"content",options:[{value:"content",label:"Content"},{value:"full",label:"Full"}]},{id:"layout-message-assistant-max-width",label:"Assistant Max Width",description:"Optional CSS width such as 80%, 42rem, or 72ch; blank uses the width mode default",type:"text",path:"layout.messages.assistant.maxWidth",defaultValue:"",parseValue:ht},ut("toggle","layout-group","Group Consecutive","layout.messages.groupConsecutive",!1),ut("toggle","layout-avatar-show","Show Avatars","layout.messages.avatar.show",!1),{id:"layout-avatar-pos",label:"Avatar Position",type:"select",path:"layout.messages.avatar.position",defaultValue:"left",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}]},ut("text","layout-avatar-user","User Avatar URL","layout.messages.avatar.userAvatar",""),ut("text","layout-avatar-assistant","Assistant Avatar URL","layout.messages.avatar.assistantAvatar",""),ut("toggle","layout-timestamp-show","Show Timestamps","layout.messages.timestamp.show",!1),{id:"layout-timestamp-pos",label:"Timestamp Position",type:"select",path:"layout.messages.timestamp.position",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"below",label:"Below"}]}]},la={id:"message-actions",title:"Message Actions",collapsed:!0,fields:[ut("toggle","msg-actions-enabled","Enabled","messageActions.enabled",!0),ut("toggle","msg-actions-copy","Show Copy","messageActions.showCopy",!0),ut("toggle","msg-actions-upvote","Show Upvote","messageActions.showUpvote",!0),ut("toggle","msg-actions-downvote","Show Downvote","messageActions.showDownvote",!0),ut("toggle","msg-actions-read-aloud","Show Read Aloud","messageActions.showReadAloud",!1),{id:"msg-actions-visibility",label:"Visibility",type:"select",path:"messageActions.visibility",defaultValue:"hover",options:[{value:"hover",label:"On Hover"},{value:"always",label:"Always Visible"}]},{id:"msg-actions-align",label:"Alignment",type:"select",path:"messageActions.align",defaultValue:"right",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}]},{id:"msg-actions-layout",label:"Layout",type:"select",path:"messageActions.layout",defaultValue:"pill-inside",options:[{value:"pill-inside",label:"Pill"},{value:"row-inside",label:"Row"}]}]},sa={id:"launcher-basics",title:"Launcher",collapsed:!0,fields:[ut("toggle","launch-enabled","Enabled","launcher.enabled",!0),{id:"launch-mount-mode",label:"Mount Mode",type:"select",path:"launcher.mountMode",defaultValue:"floating",options:[{value:"floating",label:"Floating"},{value:"docked",label:"Docked"}]},{id:"launch-position",label:"Position",type:"select",path:"launcher.position",defaultValue:"bottom-right",options:[{value:"bottom-right",label:"Bottom Right"},{value:"bottom-left",label:"Bottom Left"},{value:"top-right",label:"Top Right"},{value:"top-left",label:"Top Left"}]},ut("text","launch-width","Width","launcher.width",i),ut("toggle","launch-auto-expand","Auto Expand","launcher.autoExpand",!1),ut("text","launch-title","Title","launcher.title","Chat Assistant"),ut("text","launch-subtitle","Subtitle","launcher.subtitle","Here to help you get answers fast")]},ia={id:"launcher-advanced",title:"Launcher Advanced",collapsed:!0,fields:[{id:"launch-dock-side",label:"Dock Side",type:"select",path:"launcher.dock.side",defaultValue:"right",options:[{value:"right",label:"Right"},{value:"left",label:"Left"}]},ut("text","launch-dock-width","Dock Width","launcher.dock.width","420px"),ut("toggle","launch-dock-animate","Dock Animate","launcher.dock.animate",!0),{id:"launch-dock-reveal",label:"Dock Reveal",type:"select",path:"launcher.dock.reveal",defaultValue:"resize",options:[{value:"resize",label:"Resize"},{value:"overlay",label:"Overlay"},{value:"push",label:"Push"},{value:"emerge",label:"Emerge"}]},ut("toggle","launch-text-hidden","Hide Text","launcher.textHidden",!1),ut("text","launch-icon-text","Agent Icon Text","launcher.agentIconText","💬"),ut("text","launch-icon-name","Agent Icon Name (Lucide)","launcher.agentIconName","bot"),ut("toggle","launch-icon-hidden","Hide Agent Icon","launcher.agentIconHidden",!1),mt("launch-icon-size","Agent Icon Size","launcher.agentIconSize","40px",{min:16,max:72,step:2}),ut("text","launch-icon-url","Icon Image URL","launcher.iconUrl","","Custom image URL (overrides emoji/lucide)"),ut("text","launch-header-icon-name","Header Icon Name (Lucide)","launcher.headerIconName","bot"),mt("launch-header-icon-size","Header Icon Size","launcher.headerIconSize","48px",{min:24,max:80,step:2}),ut("toggle","launch-header-icon-hidden","Hide Header Icon","launcher.headerIconHidden",!1),ut("toggle","launch-full-height","Full Height","launcher.fullHeight",!1),ut("toggle","launch-sidebar","Sidebar Mode","launcher.sidebarMode",!1),ut("text","launch-sidebar-width","Sidebar Width","launcher.sidebarWidth","420px"),ut("toggle","launch-mobile-fullscreen","Mobile Fullscreen","launcher.mobileFullscreen",!0,"Fullscreen on mobile devices"),{id:"launch-mobile-breakpoint",label:"Mobile Breakpoint (px)",type:"text",path:"launcher.mobileBreakpoint",defaultValue:640,formatValue:e=>String(e??640),parseValue:e=>Number(e)},{id:"launch-height-offset",label:"Height Offset (px)",type:"text",path:"launcher.heightOffset",defaultValue:0,formatValue:e=>String(e??0),parseValue:e=>Number(e)},ut("text","launch-collapsed-max-width","Collapsed Max Width","launcher.collapsedMaxWidth","","Max width of launcher pill when closed"),ut("text","launch-cta-text","CTA Icon Text","launcher.callToActionIconText","↗"),ut("text","launch-cta-name","CTA Icon Name","launcher.callToActionIconName",""),ut("toggle","launch-cta-hidden","Hide CTA Icon","launcher.callToActionIconHidden",!1),mt("launch-cta-size","CTA Icon Size","launcher.callToActionIconSize","32px",{min:16,max:64,step:2}),mt("launch-cta-padding","CTA Icon Padding","launcher.callToActionIconPadding","5px",{min:0,max:24,step:1}),ut("color","launch-cta-bg","CTA Icon Background","launcher.callToActionIconBackgroundColor","")]},na={id:"send-button",title:"Send Button",collapsed:!0,fields:[ut("toggle","send-use-icon","Use Icon","sendButton.useIcon",!1),ut("text","send-icon-text","Icon Text","sendButton.iconText","↑"),ut("text","send-icon-name","Icon Name (Lucide)","sendButton.iconName",""),ut("toggle","send-show-tooltip","Show Tooltip","sendButton.showTooltip",!1),ut("text","send-tooltip-text","Tooltip Text","sendButton.tooltipText","Send message")]},ca={id:"close-button",title:"Close Button",collapsed:!0,fields:[{id:"close-placement",label:"Placement",type:"select",path:"launcher.closeButtonPlacement",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"top-right",label:"Top Right"}]},ut("text","close-icon-name","Icon Name","launcher.closeButtonIconName","x"),ut("text","close-icon-text","Icon Text","launcher.closeButtonIconText","×"),ut("toggle","close-show-tooltip","Show Tooltip","launcher.closeButtonShowTooltip",!0),ut("text","close-tooltip-text","Tooltip Text","launcher.closeButtonTooltipText","Close chat")]},da={id:"clear-chat",title:"Clear Chat Button",collapsed:!0,fields:[ut("toggle","clear-enabled","Enabled","launcher.clearChat.enabled",!0),{id:"clear-placement",label:"Placement",type:"select",path:"launcher.clearChat.placement",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"top-right",label:"Top Right"}]},ut("text","clear-icon-name","Icon Name","launcher.clearChat.iconName","refresh-cw"),ut("toggle","clear-show-tooltip","Show Tooltip","launcher.clearChat.showTooltip",!0),ut("text","clear-tooltip-text","Tooltip Text","launcher.clearChat.tooltipText","Clear chat")]},pa={id:"status-indicator",title:"Status Indicator",collapsed:!0,fields:[ut("toggle","status-visible","Visible","statusIndicator.visible",!0),{id:"status-align",label:"Alignment",type:"select",path:"statusIndicator.align",defaultValue:"right",options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}]},ut("text","status-idle-text","Idle Text","statusIndicator.idleText","Online"),ut("text","status-connecting-text","Connecting Text","statusIndicator.connectingText","Connecting…"),ut("text","status-connected-text","Connected Text","statusIndicator.connectedText","Streaming…"),ut("text","status-error-text","Error Text","statusIndicator.errorText","Offline")]},ua={id:"features",title:"Features",collapsed:!0,fields:[ut("toggle","feat-voice","Voice Recognition","voiceRecognition.enabled",!1,"Enable voice input"),ut("toggle","feat-auto-focus","Auto Focus Input","autoFocusInput",!1,"Focus input after panel opens"),ut("toggle","feat-scroll-bottom-enabled","Scroll To Bottom","features.scrollToBottom.enabled",!0,"Show a button to return to the latest messages."),ut("text","feat-scroll-bottom-icon","Scroll To Bottom Icon","features.scrollToBottom.iconName","arrow-down"),ut("text","feat-scroll-bottom-label","Scroll To Bottom Label","features.scrollToBottom.label","","Leave empty for icon-only mode"),{id:"feat-scroll-bottom-streaming",label:"Streaming Below",type:"select",path:"features.scrollToBottom.streamingIndicator",defaultValue:"arrow",options:[{value:"arrow",label:"Arrow"},{value:"dots",label:"Dots"}]},{id:"feat-scroll-bottom-behavior",label:"Jump To Latest Motion",description:"How the conversation scrolls when you click the jump button.",type:"select",path:"features.scrollToBottom.scrollBehavior",defaultValue:"instant",options:[{value:"instant",label:"Instant"},{value:"smooth",label:"Smooth"}]},{id:"feat-scroll-bottom-duration",label:"Jump Duration (ms)",description:"How long smooth scrolling takes. Set to 0 for an instant jump.",type:"text",path:"features.scrollToBottom.scrollDurationMs",defaultValue:220,formatValue:e=>String(e??220),parseValue:e=>""===String(e).trim()?void 0:Number(e)},{id:"feat-scroll-bottom-transition",label:"Scroll Button Transition",type:"select",path:"features.scrollToBottom.transition",defaultValue:"none",options:[{value:"none",label:"None"},{value:"fade",label:"Fade"}]}]},ma={id:"stream-animation",title:"Stream Animation",description:"Choose how text appears as the assistant responds.",collapsed:!0,fields:[{id:"stream-anim-type",label:"Animation",description:"The visual effect used to reveal a reply.",type:"select",path:"features.streamAnimation.type",defaultValue:"none",options:[{value:"none",label:"None"},{value:"typewriter",label:"Typewriter"},{value:"word-fade",label:"Word fade"},{value:"letter-rise",label:"Letter rise"},{value:"glyph-cycle",label:"Glyph cycle"},{value:"wipe",label:"Wipe"},{value:"pop-bubble",label:"Pop bubble"}]},{id:"stream-anim-placeholder",label:"Before the Reply Starts",description:"What to show while waiting for a reply.",type:"select",path:"features.streamAnimation.placeholder",defaultValue:"none",options:[{value:"none",label:"Typing indicator (default)"},{value:"skeleton",label:"Skeleton shimmer"}]},{id:"stream-anim-buffer",label:"Reveal Text By",description:"Show text as it arrives, or wait for a complete word or line.",type:"select",path:"features.streamAnimation.buffer",defaultValue:"none",options:[{value:"none",label:"Each character"},{value:"word",label:"Complete words"},{value:"line",label:"Complete lines"}]},{id:"stream-anim-speed",label:"Text Animation Duration (ms)",description:"Animation length for each character or word.",type:"select",path:"features.streamAnimation.speed",defaultValue:120,options:[{value:"40",label:"40ms: snappy"},{value:"80",label:"80ms"},{value:"120",label:"120ms (default)"},{value:"200",label:"200ms"},{value:"320",label:"320ms"},{value:"480",label:"480ms: slow"}],formatValue:e=>String(e??120),parseValue:e=>Number(e)},{id:"stream-anim-duration",label:"Bubble Animation Duration (ms)",description:"How long effects on the whole reply bubble take.",type:"select",path:"features.streamAnimation.duration",defaultValue:1800,options:[{value:"600",label:"600ms"},{value:"1200",label:"1200ms"},{value:"1800",label:"1800ms (default)"},{value:"2400",label:"2400ms"},{value:"3600",label:"3600ms: slow"}],formatValue:e=>String(e??1800),parseValue:e=>Number(e)}]},ha={id:"composer-menu-config",title:"More Menu",collapsed:!0,fields:[ut("toggle","composer-menu-enabled","Show More Menu","composer.actionOverflow.enabled",!1),{id:"composer-menu-width",label:"Menu Width",type:"select",path:"composer.actionOverflow.menu.width",defaultValue:"content",options:[{value:"content",label:"Fit contents"},{value:"composer",label:"Match message box"},{value:"240px",label:"Compact (240px)"},{value:"320px",label:"Wide (320px)"}]},{id:"composer-menu-placement",label:"Open Menu",description:"Moves to fit the available space.",type:"select",path:"composer.actionOverflow.menu.placement",defaultValue:"above",options:[{value:"above",label:"Above message box"},{value:"below",label:"Below message box"}]},{id:"composer-menu-descriptions",label:"Menu Descriptions",type:"select",path:"composer.actionOverflow.menu.descriptionLayout",defaultValue:"stacked",options:[{value:"stacked",label:"Below labels"},{value:"inline",label:"Beside labels"}]},ut("text","composer-menu-icon","Menu Icon","composer.actionOverflow.menu.triggerIconName","plus"),{id:"composer-menu-open-icon",label:"Open Menu Icon",type:"select",path:"composer.actionOverflow.menu.openTriggerIconName",defaultValue:"plus",options:[{value:"plus",label:"Plus"},{value:"x",label:"Close"}]}]},ga={id:"attachments-config",title:"Attachments",collapsed:!0,fields:[ut("toggle","attach-enabled","Enabled","attachments.enabled",!1),{id:"attach-max-files",label:"Max Files",type:"select",path:"attachments.maxFiles",defaultValue:4,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"4",label:"4"},{value:"6",label:"6"},{value:"8",label:"8"},{value:"10",label:"10"}],formatValue:e=>String(e??4),parseValue:e=>Number(e)},{id:"attach-max-size",label:"Max File Size (MB)",type:"select",path:"attachments.maxFileSize",defaultValue:10*Xt,options:[{value:"1",label:"1 MB"},{value:"5",label:"5 MB"},{value:"10",label:"10 MB"},{value:"25",label:"25 MB"},{value:"50",label:"50 MB"}],formatValue:function(e){let t=Number(e);return Number.isFinite(t)?String(t>1024?Math.round(t/Xt):t):"10"},parseValue:function(e){return Number(e)*Xt}},{id:"attach-types",label:"Allowed File Types",type:"select",path:"attachments.allowedTypes",defaultValue:Qt.images,options:[{value:"images",label:"Images only"},{value:"images-pdf",label:"Images + PDF"},{value:"images-text-pdf",label:"Images + text + PDF"},{value:"all",label:"All supported types"}],formatValue:function(e){let t=Array.isArray(e)?e:Qt.images,a=[...new Set(t)].sort();for(let[e,t]of Object.entries(Qt)){let o=[...t].sort();if(a.length===o.length&&a.every((e,t)=>e===o[t]))return e}return a.some(e=>e.startsWith("application/vnd")||"application/msword"===e)?"all":a.some(e=>"text/plain"===e||"text/markdown"===e||"text/csv"===e)?"images-text-pdf":a.includes("application/pdf")?"images-pdf":"images"},parseValue:function(e){return Qt[String(e)]??Qt.images}},{id:"attach-file-layout",label:"File Card Layout",type:"select",path:"attachments.preview.file.layout",defaultValue:"tile",options:[{value:"tile",label:"Compact tile"},{value:"horizontal",label:"Horizontal card"},{value:"vertical",label:"Vertical card"}]},ut("toggle","attach-file-icon","Show File Icon","attachments.preview.file.icon",!0),{id:"attach-file-icon-name",label:"File Icon",type:"text",path:"attachments.preview.file.iconName",defaultValue:"",unsettable:!0},{id:"attach-file-icon-placement",label:"File Icon Position",type:"select",path:"attachments.preview.file.iconPlacement",defaultValue:"start",options:[{value:"start",label:"At the start"},{value:"center",label:"Centered"}]},{id:"attach-file-name",label:"File Name",type:"select",path:"attachments.preview.file.name",defaultValue:"hidden",options:[{value:"hidden",label:"Hidden"},{value:"full",label:"Full name"},{value:"basename",label:"Without extension"}]},{id:"attach-file-metadata",label:"File Details",description:"Line count is available for supported text files.",type:"select",path:"attachments.preview.file.metadata",defaultValue:"none",options:[{value:"none",label:"None"},{value:"size",label:"File size"},{value:"line-count",label:"Line count"}]},{id:"attach-file-badge",label:"File Badge",type:"select",path:"attachments.preview.file.badge",defaultValue:"type",options:[{value:"none",label:"None"},{value:"extension",label:"Extension"},{value:"type",label:"File type"}]},{id:"attach-image-layout",label:"Image Preview",type:"select",path:"attachments.preview.image.layout",defaultValue:"thumbnail",options:[{value:"thumbnail",label:"Thumbnail"},{value:"chip",label:"Compact chip"}]},{id:"attach-image-name",label:"Image File Name",type:"select",path:"attachments.preview.image.name",defaultValue:"hidden",options:[{value:"hidden",label:"Hidden"},{value:"full",label:"Full name"},{value:"basename",label:"Without extension"}]},{id:"attach-image-fit",label:"Image Fit",type:"select",path:"attachments.preview.image.fit",defaultValue:"cover",options:[{value:"cover",label:"Fill thumbnail"},{value:"contain",label:"Show whole image"}]},{id:"attach-file-remove-visibility",label:"File Remove Button",description:"Always visible on touch devices.",type:"select",path:"attachments.preview.file.remove.visibility",defaultValue:"always",options:[{value:"always",label:"Always visible"},{value:"hover",label:"On hover or focus"}]},{id:"attach-file-remove-placement",label:"File Remove Position",type:"select",path:"attachments.preview.file.remove.placement",defaultValue:"overlap",options:[{value:"overlap",label:"Overlapping corner"},{value:"inside",label:"Inside corner"},{value:"inline",label:"Beside content"}]},{id:"attach-image-remove-visibility",label:"Image Remove Button",description:"Always visible on touch devices.",type:"select",path:"attachments.preview.image.remove.visibility",defaultValue:"always",options:[{value:"always",label:"Always visible"},{value:"hover",label:"On hover or focus"}]},{id:"attach-image-remove-placement",label:"Image Remove Position",type:"select",path:"attachments.preview.image.remove.placement",defaultValue:"overlap",options:[{value:"overlap",label:"Overlapping corner"},{value:"inside",label:"Inside corner"},{value:"inline",label:"Beside content"}]},{id:"attach-composer-layout",label:"Input Below Attachments",description:"Uses separate rows when space is limited.",type:"select",path:"composer.attachmentLayout",defaultValue:"stacked",options:[{value:"stacked",label:"Text above controls"},{value:"single-row",label:"Text beside controls"}]}]},fa={id:"artifacts-config",title:"Artifacts",collapsed:!0,fields:[ut("toggle","art-enabled","Enabled","features.artifacts.enabled",!1,"Show artifact sidebar for documents and components"),{id:"art-appearance",label:"Pane Appearance",type:"select",path:"features.artifacts.layout.paneAppearance",defaultValue:"panel",options:[{value:"panel",label:"Panel (bordered)"},{value:"seamless",label:"Seamless"}]}]},ba={id:"artifacts-customization",title:"Artifact Customization",collapsed:!0,fields:[{id:"art-toolbar",label:"Toolbar Preset",type:"select",path:"features.artifacts.layout.toolbarPreset",defaultValue:"default",options:[{value:"default",label:"Default"},{value:"document",label:"Document"}]},ut("text","art-toolbar-title","Toolbar Title","features.artifacts.layout.toolbarTitle","Artifacts"),ut("text","art-close-label","Close Button Label","features.artifacts.layout.closeButtonLabel","Close"),ut("text","art-pane-width","Pane Width","features.artifacts.layout.paneWidth","40%","CSS width (e.g. 40%, 28rem)"),ut("text","art-pane-max-width","Pane Max Width","features.artifacts.layout.paneMaxWidth","28rem"),ut("text","art-split-gap","Split Gap","features.artifacts.layout.splitGap","0"),ut("toggle","art-resizable","Resizable","features.artifacts.layout.resizable",!1,"Allow dragging the pane divider"),ut("toggle","art-expand-panel","Expand Panel When Open","features.artifacts.layout.expandLauncherPanelWhenOpen",!0,"Widen the launcher panel to fit artifacts")]},ya={id:"api-integration",title:"API & Integration",description:"Runtime and integration options.",collapsed:!0,fields:[ut("text","dev-api-url","API URL","apiUrl",""),ut("text","dev-flow","Flow ID","flowId",""),{id:"dev-parser",label:"Stream Parser",type:"select",path:"parserType",defaultValue:"plain",options:[{value:"plain",label:"Plain Text"},{value:"json",label:"JSON"},{value:"regex-json",label:"Regex JSON"},{value:"xml",label:"XML"}]}]},va={type:"select",defaultValue:"panel",options:[{value:"collapsed",label:"Collapsed card"},{value:"panel",label:"Side panel"},{value:"inline",label:"In conversation"}],unsettable:!0,unsetLabel:"Use default",requiresCapability:"artifacts"},wa={id:"artifact-display-preferences",title:"Artifact display",description:"Choose where generated files and other content appear.",requiresCapability:"artifacts",fields:[{...va,id:"artifact-display-files",label:"Generated files",description:"Default for HTML, CSV, documents, and code files.",path:"features.artifacts.display.files"},{...va,id:"artifact-display-components",label:"Interactive content",description:"Charts, forms, cards, and other interactive content.",path:"features.artifacts.display.byKind.component"},{...va,id:"artifact-display-default",label:"Other artifacts",description:"Plain documents and anything without a narrower rule.",path:"features.artifacts.display.default"},{id:"artifact-file-preview",label:"Render supported file previews",type:"toggle",path:"features.artifacts.filePreview.enabled",defaultValue:!0,unsettable:!0,unsetLabel:"Use default",requiresCapability:"artifacts"}]},xa={label:"Stream and artifacts",sections:[{id:"stream-display-preferences",title:"Tool calls and reasoning",fields:[{id:"pref-show-tools",label:"Show tool calls",type:"toggle",path:"features.showToolCalls",defaultValue:!0,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-layout",label:"Tool layout",type:"select",path:"features.toolCallDisplay.layout",defaultValue:"card",options:[{value:"row",label:"Row"},{value:"card",label:"Card"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-collapsed-mode",label:"Tool call summary",type:"select",path:"features.toolCallDisplay.collapsedMode",defaultValue:"tool-call",options:[{value:"tool-call",label:"Tool call"},{value:"tool-name",label:"Tool name"},{value:"tool-preview",label:"Tool preview"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-expandable",label:"Expandable tools",type:"toggle",path:"features.toolCallDisplay.expandable",defaultValue:!0,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-grouped",label:"Group tool calls",type:"toggle",path:"features.toolCallDisplay.grouped",defaultValue:!1,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-group-boundary",label:"Group tools by",type:"select",path:"features.toolCallDisplay.groupBoundary",defaultValue:"adjacent",options:[{value:"adjacent",label:"Adjacent tools"},{value:"iteration",label:"Agent iteration"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-grouped-mode",label:"Group details",type:"select",path:"features.toolCallDisplay.groupedMode",defaultValue:"stack",options:[{value:"stack",label:"Show steps"},{value:"summary",label:"Summary only"},{value:"collapsible",label:"Expandable group"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-group-appearance",label:"Appearance",type:"select",path:"features.toolCallDisplay.groupAppearance",options:[{value:"plain",label:"Plain"},{value:"inset",label:"Inset"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-loading-animation",label:"Tool animation",type:"select",path:"features.toolCallDisplay.loadingAnimation",defaultValue:"none",options:[{value:"none",label:"None"},{value:"pulse",label:"Pulse"},{value:"shimmer",label:"Shimmer"},{value:"shimmer-color",label:"Color shimmer"},{value:"rainbow",label:"Rainbow"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-show-reasoning",label:"Show reasoning",type:"toggle",path:"features.showReasoning",defaultValue:!0,unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-layout",label:"Reasoning layout",type:"select",path:"features.reasoningDisplay.layout",defaultValue:"card",options:[{value:"row",label:"Row"},{value:"card",label:"Card"}],unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-appearance",label:"Reasoning details",type:"select",path:"features.reasoningDisplay.appearance",options:[{value:"plain",label:"Plain"},{value:"inset",label:"Inset"},{value:"panel",label:"Panel"}],unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-expandable",label:"Reasoning expandable",type:"toggle",path:"features.reasoningDisplay.expandable",defaultValue:!0,unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-active-preview",label:"Active reasoning preview",type:"toggle",path:"features.reasoningDisplay.activePreview",defaultValue:!1,unsettable:!0,requiresCapability:"reasoning"}]},wa]},ka={id:"debug-inspection",title:"Debug & Inspection",collapsed:!0,fields:[ut("toggle","dev-tool-active-preview","Tool Preview While Active","features.toolCallDisplay.activePreview",!1,"Show a lightweight preview in collapsed active tool rows"),{id:"dev-tool-preview-lines",label:"Tool Preview Lines",type:"select",path:"features.toolCallDisplay.previewMaxLines",defaultValue:3,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],formatValue:e=>String(e??3),parseValue:e=>Number(e)},ut("text","dev-tool-active-min-height","Tool Active Min Height","features.toolCallDisplay.activeMinHeight","","CSS min-height for collapsed active tool rows (e.g. 5rem)"),{id:"dev-reasoning-preview-lines",label:"Reasoning Preview Lines",type:"select",path:"features.reasoningDisplay.previewMaxLines",defaultValue:3,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],formatValue:e=>String(e??3),parseValue:e=>Number(e)},ut("text","dev-reasoning-active-min-height","Reasoning Active Min Height","features.reasoningDisplay.activeMinHeight","","CSS min-height for collapsed active reasoning rows (e.g. 5rem)"),ut("toggle","dev-debug","Debug Mode","debug",!1,"Show debug information")]},Sa=[{label:"Content",sections:[ea,ta]},{label:"Layout",sections:[aa,oa,ra,la]},{label:"Widget",sections:[sa,ia,na,ca,da,pa]},{label:"Features",sections:[ua,ma,ha,ga,fa,ba]},xa,{label:"Developer",collapsedByDefault:!0,sections:[ya,ka,{id:"markdown",title:"Markdown Options",collapsed:!0,fields:[ut("toggle","md-gfm","GitHub Flavored Markdown","markdown.options.gfm",!0),ut("toggle","md-breaks","Line Breaks","markdown.options.breaks",!0),ut("toggle","md-header-ids","Header IDs","markdown.options.headerIds",!1),ut("toggle","md-pedantic","Pedantic Mode","markdown.options.pedantic",!1),ut("toggle","md-silent","Silent","markdown.options.silent",!1),ut("toggle","md-disable-styles","Disable Default Styles","markdown.disableDefaultStyles",!1)]}]}],Ca=Sa.flatMap(e=>e.sections),Ta={id:"theme-mode-v2",title:"Theme",description:"Choose how the interface adapts across light and dark mode.",collapsed:!1,fields:[{id:"color-mode",label:"Color Mode",type:"select",path:"colorScheme",defaultValue:"auto",options:[{value:"auto",label:"Auto"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]}]},Aa={id:"brand-palette-v2",title:"Brand Palette",description:"Set your brand, accent, and neutral colors. These are used to generate the interface theme.",collapsed:!1,fields:[ut("color","bp-primary","Primary","theme.palette.colors.primary.500","#171717","Main brand color"),ut("color","bp-secondary","Secondary","theme.palette.colors.secondary.500","#8b5cf6","Supporting brand color"),ut("color","bp-accent","Accent","theme.palette.colors.accent.500","#06b6d4","Highlight and decorative color"),ut("color","bp-neutral","Neutral","theme.palette.colors.gray.500","#6b7280","Backgrounds, text, and borders")]},Ba={id:"status-palette",title:"Status Palette",description:"Colors for system feedback states.",collapsed:!0,fields:[ut("color","sp-success","Success","theme.palette.colors.success.500","#22c55e"),ut("color","sp-warning","Warning","theme.palette.colors.warning.500","#eab308"),ut("color","sp-error","Error","theme.palette.colors.error.500","#ef4444"),ut("color","sp-notice","Notice","theme.semantic.colors.feedback.info","palette.colors.primary.500","Info and notice states")]},Ia={id:"interface-roles",title:"Interface Roles",description:"Control where brand and neutral colors appear across the interface.",collapsed:!1,fields:[{id:"role-surfaces",label:"Background Surfaces",type:"role-assignment",path:"theme.semantic.colors.background",roleAssignment:et},{id:"role-header",label:"Header",type:"role-assignment",path:"theme.components.header.background",roleAssignment:tt},{id:"role-user-messages",label:"User Messages",type:"role-assignment",path:"theme.components.message.user.background",roleAssignment:at},{id:"role-assistant-messages",label:"Assistant Messages",type:"role-assignment",path:"theme.components.message.assistant.background",roleAssignment:ot},{id:"role-primary-actions",label:"Primary Actions",type:"role-assignment",path:"theme.components.button.primary.background",roleAssignment:rt},{id:"role-scroll-to-bottom",label:"Scroll To Bottom",type:"role-assignment",path:"theme.components.scrollToBottom.background",roleAssignment:lt},{id:"role-input",label:"Input Field",type:"role-assignment",path:"theme.components.input.background",roleAssignment:st},{id:"role-links-focus",label:"Links & Focus",type:"role-assignment",path:"theme.semantic.colors.accent",roleAssignment:it},{id:"role-borders",label:"Borders & Dividers",type:"role-assignment",path:"theme.semantic.colors.border",roleAssignment:nt}]},Ma={id:"status-colors",title:"Status Colors",description:"Used for system states like success, warning, notice, and error.",collapsed:!0,fields:[pt("sc-notice","Notice","theme.semantic.colors.feedback.info","palette.colors.primary.500"),pt("sc-success","Success","theme.semantic.colors.feedback.success","palette.colors.success.500"),pt("sc-warning","Warning","theme.semantic.colors.feedback.warning","palette.colors.warning.500"),pt("sc-error","Error","theme.semantic.colors.feedback.error","palette.colors.error.500")]},Ra={id:"advanced-tokens",title:"Advanced Tokens",description:"Override individual semantic and component values when you need precise control.",collapsed:!0,fields:[]},Va=[Ta,Aa,Ba,Ia,Ma,Ra],Ea=[{id:"style",label:"Style",sections:bt},{id:"design-system",label:"Design System",sections:Kt},{id:"configure",label:"Configure",sections:Ca}],Pa=(e,t)=>t.split(".").reduce((e,t)=>e&&"object"==typeof e?e[t]:void 0,e),$a=Y(),Oa={id:"default-light",name:"Default Light",description:"Clean monochrome light theme",theme:{components:{artifact:{pane:{background:"semantic.colors.container",toolbarBackground:"semantic.colors.container"}}}},preview:{primary:"#171717",surface:"#ffffff",accent:"#0f0f0f"},tags:["light"]},Fa={id:"default-dark",name:"Default Dark",description:"Monochrome dark theme",theme:{palette:{colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"}}},semantic:{colors:{primary:"palette.colors.primary.400",secondary:"palette.colors.gray.400",accent:"palette.colors.primary.500",surface:"palette.colors.gray.800",background:"palette.colors.gray.900",container:"palette.colors.gray.800",text:"palette.colors.gray.100",textMuted:"palette.colors.gray.400",textInverse:"palette.colors.gray.900",border:"palette.colors.gray.700",divider:"palette.colors.gray.700",interactive:{default:"palette.colors.primary.400",hover:"palette.colors.primary.300",focus:"palette.colors.primary.500",active:"palette.colors.primary.600",disabled:"palette.colors.gray.600"},feedback:{success:"palette.colors.success.400",warning:"palette.colors.warning.400",error:"palette.colors.error.400",info:"palette.colors.primary.400"}}},components:{markdown:{link:{foreground:"palette.colors.primary.300"}}}},preview:{primary:"#171717",surface:"#1f2937",accent:"#0f0f0f"},tags:["dark"]},La=[{id:"persona-default",name:"Persona Default",description:"Adaptive Persona theme with light and dark modes",theme:Oa.theme,darkTheme:Fa.theme,preview:Oa.preview,darkPreview:Fa.preview,tags:["light","dark","adaptive"]},Oa,Fa,{id:"high-contrast",name:"High Contrast",description:"Maximum contrast for accessibility",theme:{semantic:{colors:{primary:"palette.colors.primary.700",secondary:"palette.colors.gray.700",accent:"palette.colors.primary.800",surface:"palette.colors.gray.50",background:"palette.colors.gray.50",container:"palette.colors.gray.200",text:"palette.colors.gray.950",textMuted:"palette.colors.gray.700",textInverse:"palette.colors.gray.50",border:"palette.colors.gray.400",divider:"palette.colors.gray.400",interactive:{default:"palette.colors.primary.700",hover:"palette.colors.primary.800",focus:"palette.colors.primary.900",active:"palette.colors.primary.950",disabled:"palette.colors.gray.400"},feedback:{success:"palette.colors.success.700",warning:"palette.colors.warning.700",error:"palette.colors.error.700",info:"palette.colors.primary.700"}}}},preview:{primary:"#0a0a0a",surface:"#f9fafb",accent:"#050505"},tags:["light","high-contrast","accessibility"]}],Wa=[...La];b();const za={desktop:{w:1280,h:800},mobile:{w:390,h:844}},Ha=.15,Da=1.5,Na="persona-preview-shell-theme",_a={load:()=>null,save:()=>{},clear:()=>{}},ja=["How do I get started?","Pricing & plans","Talk to support"],Ua='\n <div class="preview-iframe-mock" aria-hidden="true">\n <div class="preview-iframe-chrome">\n <span class="preview-iframe-dot"></span>\n <span class="preview-iframe-dot"></span>\n <span class="preview-iframe-dot"></span>\n </div>\n <div class="preview-iframe-copy">\n <div class="preview-iframe-line hero"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-grid">\n <div class="preview-iframe-card"></div>\n <div class="preview-iframe-card"></div>\n <div class="preview-iframe-card"></div>\n </div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-line body"></div>\n </div>\n </div>',qa='\n <div class="preview-workspace-content-shell" aria-hidden="true">\n <div class="preview-iframe-line hero"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-workspace-row">\n <div class="preview-workspace-card"></div>\n <div class="preview-workspace-card"></div>\n </div>\n <div class="preview-workspace-row">\n <div class="preview-workspace-card short"></div>\n <div class="preview-workspace-card short"></div>\n <div class="preview-workspace-card short"></div>\n </div>\n </div>',Ga={"user-message":"User message","assistant-message":"Assistant message","assistant-code-block":"Assistant: code block","assistant-markdown-table":"Assistant: markdown table","assistant-image":"Assistant: image","reasoning-streaming":"Reasoning (streaming)","reasoning-complete":"Reasoning (complete)","tool-running":"Tool call (running)","tool-complete":"Tool call (complete)","approval-request":"Approval request"},Ya={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",lime:"#00ff00",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",aqua:"#00ffff",magenta:"#ff00ff",fuchsia:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",purple:"#800080",teal:"#008080",navy:"#000080",orange:"#ffa500",pink:"#ffc0cb",hotpink:"#ff69b4",gold:"#ffd700",indigo:"#4b0082",violet:"#ee82ee",brown:"#a52a2a",beige:"#f5f5dc",ivory:"#fffff0",khaki:"#f0e68c",coral:"#ff7f50",salmon:"#fa8072",tomato:"#ff6347",crimson:"#dc143c",turquoise:"#40e0d0",lavender:"#e6e6fa",plum:"#dda0dd",orchid:"#da70d6",tan:"#d2b48c",chocolate:"#d2691e",sienna:"#a0522d",slategray:"#708090",slategrey:"#708090",steelblue:"#4682b4",royalblue:"#4169e1",dodgerblue:"#1e90ff",skyblue:"#87ceeb",lightblue:"#add8e6",midnightblue:"#191970",forestgreen:"#228b22",seagreen:"#2e8b57",limegreen:"#32cd32",olivedrab:"#6b8e23",darkgreen:"#006400",emerald:"#50c878",mint:"#3eb489",goldenrod:"#daa520",firebrick:"#b22222",darkred:"#8b0000",indianred:"#cd5c5c",deeppink:"#ff1493",mediumpurple:"#9370db",rebeccapurple:"#663399",darkviolet:"#9400d3",slateblue:"#6a5acd",cornflowerblue:"#6495ed",teal2:"#008080",charcoal:"#36454f",graphite:"#3b3b3b",transparent:"transparent"},Ja=/^rgba?\(\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*(,\s*(0|1|0?\.\d+|\d{1,3}%)\s*)?\)$/,Za=Xe.map(e=>"gray"===e?"neutral":e),Ka={...Object.fromEntries(Za.map(e=>[e,e])),gray:"neutral",grey:"neutral"},Xa={sharp:"sharp",square:"sharp",none:"sharp",default:"default",normal:"default",rounded:"rounded",round:"rounded",soft:"rounded",pill:"pill",circle:"pill",full:"pill"},Qa=xe("typo-font-family"),eo=xe("typo-font-size"),to=xe("typo-font-weight"),ao=xe("typo-line-height"),oo={...Qa,monospace:Qa.mono},ro={...eo,small:eo.sm,md:eo.base,medium:eo.base,large:eo.lg},lo={...to,400:to.normal,500:to.medium,600:to.semibold,700:to.bold},so={...ao,1.25:ao.tight,1.5:ao.normal,1.625:ao.relaxed},io=function(){let e={pill:{sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}};for(let t of bt)for(let a of t.presets??[]){let t=a.id.match(/^radius-(\w+)$/);if(!t)continue;let o={};for(let[e,t]of Object.entries(a.values))e.startsWith("theme.palette.radius.")&&"string"==typeof t&&(o[e.slice(21)]=t);e[t[1]]=o}return e}(),no=["sm","md","lg","xl","full"],co=[{key:"user-message",label:"User message text",fg:"components.message.user.text",bg:"components.message.user.background"},{key:"assistant-message",label:"Assistant message text",fg:"components.message.assistant.text",bg:"components.message.assistant.background"},{key:"header",label:"Header title",fg:"components.header.titleForeground",fgFallbacks:["components.header.foreground"],bg:"components.header.background"},{key:"primary-button",label:"Primary button label",fg:"components.button.primary.foreground",bg:"components.button.primary.background"},{key:"input",label:"Input placeholder",fg:"components.input.placeholder",bg:"components.input.background"},{key:"link",label:"Link text",fg:"components.markdown.link.foreground",bg:"semantic.colors.background"},{key:"scroll",label:"Scroll-to-bottom icon",fg:"components.scrollToBottom.foreground",bg:"components.scrollToBottom.background"},{key:"body",label:"Body text on background",fg:"semantic.colors.text",bg:"semantic.colors.background"},{key:"surface",label:"Body text on surface",fg:"semantic.colors.text",bg:"semantic.colors.surface"}],po={AA:4.5,AAA:7},uo={};for(let e of ct){let t=Ce(e.roleId);uo[t]=e,uo[e.roleId]=e}Object.assign(uo,{surface:uo.surfaces,background:uo.surfaces,backgrounds:uo.surfaces,user:uo["user-messages"],"user-message":uo["user-messages"],assistant:uo["assistant-messages"],"assistant-message":uo["assistant-messages"],actions:uo["primary-actions"],buttons:uo["primary-actions"],composer:uo.input,links:uo["links-focus"],focus:uo["links-focus"],border:uo.borders,dividers:uo.borders,scroll:uo["scroll-to-bottom"]});const mo={voice:"voiceRecognition.enabled",artifacts:"features.artifacts.enabled",attachments:"attachments.enabled",toolCalls:"features.showToolCalls",reasoning:"features.showReasoning",feedback:"messageActions.enabled"},ho={avatars:"layout.messages.avatar.show",timestamps:"layout.messages.timestamp.show",showHeader:"layout.showHeader",messageStyle:"layout.messages.layout"},go=["bottom-right","bottom-left","top-right","top-left"],fo=["bubble","flat","minimal"],bo={title:"welcome.title",subtitle:"welcome.subtitle",placeholder:"copy.inputPlaceholder",sendLabel:"copy.sendButtonLabel"};export{Ra as ADVANCED_TOKENS_SECTION,ct as ALL_ROLES,$a as ALL_TABS,wa as ARTIFACT_DISPLAY_PREFERENCE_SECTION,Aa as BRAND_PALETTE_SECTION,La as BUILT_IN_PRESETS,xt as COLORS_SECTIONS,Ze as COLOR_FAMILIES,Kt as COMPONENTS_SECTIONS,Zt as COMPONENT_COLOR_SECTIONS,Jt as COMPONENT_SHAPE_SECTIONS,Ca as CONFIGURE_SECTIONS,Sa as CONFIGURE_SUB_GROUPS,co as CONTRAST_PAIRS,Ya as CSS_NAMED_COLORS,za as DEVICE_DIMENSIONS,ja as HOME_SUGGESTION_CHIPS,Ia as INTERFACE_ROLES_SECTION,Ua as MOCK_BROWSER_CONTENT,qa as MOCK_WORKSPACE_CONTENT,vt as PALETTE_SECTION,_a as PREVIEW_STORAGE_ADAPTER,io as RADIUS_PRESETS,ot as ROLE_ASSISTANT_MESSAGES,nt as ROLE_BORDERS,Xe as ROLE_FAMILIES,Qe as ROLE_FAMILY_LABELS,tt as ROLE_HEADER,st as ROLE_INPUT,Ke as ROLE_INTENSITIES,it as ROLE_LINKS_FOCUS,rt as ROLE_PRIMARY_ACTIONS,lt as ROLE_SCROLL_TO_BOTTOM,et as ROLE_SURFACES,at as ROLE_USER_MESSAGES,wt as SEMANTIC_COLORS_SECTION,Je as SHADE_KEYS,Na as SHELL_STYLE_ID,Ma as STATUS_COLORS_SECTION,Ba as STATUS_PALETTE_SECTION,xa as STREAM_AND_ARTIFACTS_SUB_GROUP,bt as STYLE_SECTIONS,Va as STYLE_SECTIONS_V2,Wa as THEME_EDITOR_PRESETS,Ta as THEME_SECTION,y as ThemeEditorState,Da as ZOOM_MAX,Ha as ZOOM_MIN,se as appendPreviewTranscriptEntry,de as applySceneConfig,ae as applyShellTheme,ue as buildPreviewConfig,me as buildPreviewConfigWithMessages,te as buildShellCss,oe as buildSrcdoc,Ae as buildSummary,ne as buildTranscriptStreamFrames,ge as coerceColor,fe as coerceFamily,be as coerceIntensity,we as coerceRadius,ve as coerceRoundnessStyle,ye as coerceScheme,E as convertFromPx,V as convertToPx,ce as createPreviewMessages,le as createPreviewTranscriptEntry,$e as createThemeEditorTools,U as detectRoleAssignment,Q as escapeHtml,Z as findSection,R as formatCssValue,z as generateColorScale,re as getPreviewTranscriptPresetLabel,ee as getShellPalette,X as getThemeEditorPreset,Y as getThemeEditorTabs,L as hexToHsl,W as hslToHex,$ as isValidHex,P as normalizeColorValue,H as paletteColorPath,M as parseCssValue,ie as presetStreamsText,Ee as quickContrastWarnings,G as resolveEditorFieldDefault,_ as resolveRoleAssignment,D as resolveThemeColorPath,O as rgbToHex,Ve as runContrastChecks,K as scopeSection,N as tokenRefDisplayName,he as toolResult,F as wcagContrastRatio};
1
+ var e,t,a,o,r,l,s,i,n,c,d,p,u,m,h,g,f,b,y;function v(e,t){if(!e)return t;if(!t)return e;let a={...e};for(let[e,o]of Object.entries(t)){let t=a[e];a[e]=l(t)&&l(o)?v(t,o):o}return a}function w(e){return!0===e?.future?.v5Defaults?"v5":"v4"}function x(e){let t="v5"===w(e)?u:p;return v(d,t)}function k(e,t){let a={...e};for(let[e,o]of Object.entries(t)){let t=a[e];a[e]=t&&"object"==typeof t&&!Array.isArray(t)&&o&&"object"==typeof o&&!Array.isArray(o)?k(t,o):o}return a}function S(e,t={}){let a=Ye(t.future),o=e?.components,r={palette:{...a.palette,...e?.palette,colors:{...a.palette.colors,...e?.palette?.colors},spacing:{...a.palette.spacing,...e?.palette?.spacing},typography:{...a.palette.typography,...e?.palette?.typography},shadows:{...a.palette.shadows,...e?.palette?.shadows},borders:{...a.palette.borders,...e?.palette?.borders},radius:{...a.palette.radius,...e?.palette?.radius}},semantic:{...a.semantic,...e?.semantic,colors:{...a.semantic.colors,...e?.semantic?.colors,interactive:{...a.semantic.colors.interactive,...e?.semantic?.colors?.interactive},feedback:{...a.semantic.colors.feedback,...e?.semantic?.colors?.feedback}},spacing:{...a.semantic.spacing,...e?.semantic?.spacing},typography:{...a.semantic.typography,...e?.semantic?.typography}},components:o?k(a.components,o):a.components},l=o?.activity;for(let e of["toolBubble","reasoningBubble"]){let t=r.components[e]={...r.components[e]};for(let a of["rowHeight","labelSize","iconSize","indent","bodySurface"])void 0!==l?.[a]&&("bodySurface"!==a||void 0===o?.[e]?.bodySurface)&&(t[a]=l[a])}let s=o?.collapsibleWidget?.surface;"v4"===w(t)&&void 0!==s&&void 0===l?.bodySurface&&(r.components.activity={...r.components.activity,bodySurface:s});let i=o?.header;void 0!==i?.padding&&void 0===i.minimalPadding&&(r.components.header.minimalPadding=r.components.header.padding);let n=o?.composer;r.components.composer={...r.components.composer},void 0!==n?.padding&&void 0===n.expandedPadding&&(r.components.composer.expandedPadding=n.padding),void 0!==o?.input?.borderRadius&&void 0===n?.expandedBorderRadius&&(r.components.composer.expandedBorderRadius=o.input.borderRadius);let c=o?.message;if(void 0!==c?.gap&&void 0===c.fullscreenGap&&(r.components.message.fullscreenGap=r.components.message.gap),!1!==t.validate){let e=function(e){let t=[],a=[];return e.palette||t.push({path:"palette",message:"Theme must include a palette",severity:"error"}),e.semantic||a.push({path:"semantic",message:"No semantic tokens defined - defaults will be used",severity:"warning"}),e.components||a.push({path:"components",message:"No component tokens defined - defaults will be used",severity:"warning"}),{valid:0===t.length,errors:t,warnings:a}}(r);if(!e.valid)throw Error(`Theme validation failed: ${e.errors.map(e=>e.message).join(", ")}`)}if(t.plugins)for(let e of t.plugins)r=e.transform(r);return r}function C(e,t){let a=t.split("."),o=e;for(let e of a){if(null==o)return;o=o[e]}return o}function T(e,t,a){let o=t.split(".");if(1===o.length)return{...e,[o[0]]:a};let[r,...l]=o,s=e;return{...s,[r]:T(s?.[r]??{},l.join("."),a)}}function A(e,t){let a=t.split(".");if(1===a.length){let t={...e};return delete t[a[0]],t}let[o,...r]=a,l=e,s=A(l?.[o]??{},r.join(".")),i={...l};return"object"==typeof s&&s&&!Array.isArray(s)&&0===Object.keys(s).length?delete i[o]:i[o]=s,i}function B(e){return Array.isArray(e)?e.map(B):e&&"object"==typeof e&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,B(t)])):e}function I(e,t){if(Object.is(e,t))return!0;if(!e||!t||"object"!=typeof e||"object"!=typeof t||Array.isArray(e)!==Array.isArray(t))return!1;let a=Object.keys(e),o=Object.keys(t);return a.length===o.length&&a.every(a=>Object.prototype.hasOwnProperty.call(t,a)&&I(e[a],t[a]))}function M(e){let t=e.trim();if("9999px"===t)return{value:100,unit:"px"};let a=t.match(/^([\d.]+)(px|rem)$/);if(!a){let e=parseFloat(t);return{value:isNaN(e)?0:e,unit:"px"}}return{value:parseFloat(a[1]),unit:a[2]}}function R(e,t){return"rem"===t?`${e}rem`:`${e}px`}function V(e,t){return"rem"===t?16*e:e}function E(e,t){return"rem"===t?e/16:e}function P(e){if(!e)return"#000000";let t=e.trim().toLowerCase();return"transparent"===t?"transparent":t.startsWith("rgba")||t.startsWith("rgb")?t:t.startsWith("#")?4===t.length?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t:`#${t}`}function $(e){return/^#[0-9A-Fa-f]{6}$/.test(e)}function O(e){let t=e.trim().toLowerCase().match(/^rgba?\(([^)]+)\)$/);if(!t)return null;let a=t[1].split(",").map(e=>e.trim());if(a.length<3)return null;let o=e=>{let t=e.endsWith("%"),a=parseFloat(t?e.slice(0,-1):e);return Number.isFinite(a)?Math.max(0,Math.min(255,Math.round(t?a/100*255:a))):NaN},r=o(a[0]),l=o(a[1]),s=o(a[2]);if(!Number.isFinite(r)||!Number.isFinite(l)||!Number.isFinite(s))return null;let i=e=>e.toString(16).padStart(2,"0");return`#${i(r)}${i(l)}${i(s)}`}function F(e,t){let a=e=>{let t=P(e),a=t.startsWith("rgb")?O(t)??"#000000":t,o=[1,3,5].map(e=>{let t=parseInt(a.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*o[0]+.7152*o[1]+.0722*o[2]},o=a(e),r=a(t);return(Math.max(o,r)+.05)/(Math.min(o,r)+.05)}function L(e){let t=P(e),a=t.startsWith("rgb")?O(t)??"#000000":t,o=parseInt(a.slice(1,3),16)/255,r=parseInt(a.slice(3,5),16)/255,l=parseInt(a.slice(5,7),16)/255,s=Math.max(o,r,l),i=Math.min(o,r,l),n=(s+i)/2;if(s===i)return{h:0,s:0,l:n};let c,d=s-i,p=n>.5?d/(2-s-i):d/(s+i);switch(s){case o:c=((r-l)/d+(r<l?6:0))/6;break;case r:c=((l-o)/d+2)/6;break;default:c=((o-r)/d+4)/6}return{h:360*c,s:p,l:n}}function W(e,t,a){let o,r,l,s=(e%360+360)%360,i=(1-Math.abs(2*a-1))*t,n=i*(1-Math.abs(s/60%2-1)),c=a-i/2;[o,r,l]=s<60?[i,n,0]:s<120?[n,i,0]:s<180?[0,i,n]:s<240?[0,n,i]:s<300?[n,0,i]:[i,0,n];let d=e=>{let t=Math.round(255*(e+c)).toString(16);return 1===t.length?"0"+t:t};return`#${d(o)}${d(r)}${d(l)}`}function z(e){let{h:t,s:a,l:o}=L(e),r={50:.97,100:.94,200:.87,300:.77,400:.64,500:o,600:Math.max(.05,o-.1),700:Math.max(.05,o-.2),800:Math.max(.05,o-.28),900:Math.max(.05,o-.35),950:Math.max(.03,o-.42)},l={50:Math.min(1,.85*a),100:Math.min(1,.9*a),200:Math.min(1,.95*a),300:a,400:a,500:a,600:Math.min(1,1.05*a),700:Math.min(1,1.05*a),800:Math.min(1,1*a),900:Math.min(1,.95*a),950:Math.min(1,.9*a)},s={};for(let[e,a]of Object.entries(r)){let o=l[e];s[e]=W(t,o,a)}return s}function H(e,t){return`palette.colors.${e}.${t}`}function D(e,t,a=0){if(a>5)return"#cbd5e1";let o=e(t);return"string"==typeof o?o.startsWith("#")||o.startsWith("rgb")||"transparent"===o?o:o.startsWith("palette.")||o.startsWith("semantic.")||o.startsWith("components.")?D(e,`theme.${o}`,a+1):"#cbd5e1":"#cbd5e1"}function N(e){if(!e.startsWith("palette.")&&!e.startsWith("semantic."))return e;let t=e.split(".");if("palette"===t[0]&&"colors"===t[1]){let e=t[2],a=t[3];return`${e.charAt(0).toUpperCase()+e.slice(1)} ${a}`}return"semantic"===t[0]?t.slice(1).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):t[t.length-1]}function _(e,t,a){let o={},r="neutral"===e?"gray":e;for(let e of a.targets){let l=j(r,t,e,a.roleId);o[`theme.${e.path}`]=l,o[`darkTheme.${e.path}`]=l}if("role-primary-actions"===a.roleId){let e="solid"===t?`palette.colors.${r}.700`:`palette.colors.${r}.200`;o["theme.semantic.colors.interactive.hover"]=e,o["darkTheme.semantic.colors.interactive.hover"]=e}return o}function j(e,t,a,o){let r="solid"===t;if("role-header"===o)return function(e,t,a){let o=a.path;return o.endsWith(".background")?t?`palette.colors.${e}.500`:`palette.colors.${e}.${"gray"===e?"50":"100"}`:o.endsWith(".border")?t?`palette.colors.${e}.600`:`palette.colors.${e}.200`:o.endsWith(".iconBackground")?t?`palette.colors.${e}.${"gray"===e?"700":"600"}`:`palette.colors.${e}.500`:o.endsWith(".iconForeground")?`palette.colors.${e}.50`:o.endsWith(".foreground")||o.endsWith(".titleForeground")?t?`palette.colors.${e}.50`:`palette.colors.${e}.${"gray"===e?"900":"700"}`:(o.endsWith(".subtitleForeground")||o.endsWith(".actionIconForeground"))&&t?`palette.colors.${e}.200`:`palette.colors.${e}.500`}(e,r,a);if("role-input"===o)return function(e,t,a){let o=a.path;return o.endsWith(".background")?t?`palette.colors.${e}.${"gray"===e?"100":"50"}`:`palette.colors.${e}.50`:o.endsWith(".placeholder")?`palette.colors.${e}.400`:o.endsWith(".border")||o.endsWith(".ring")?t?`palette.colors.${e}.500`:`palette.colors.${e}.400`:`palette.colors.${e}.500`}(e,r,a);switch(a.kind){case"background":return r?`palette.colors.${e}.500`:`palette.colors.${e}.${"gray"===e?"50":"100"}`;case"foreground":return r?`palette.colors.${"gray"===e?"gray":e}.50`:`palette.colors.${"gray"===e?"gray":e}.900`;case"border":return r?`palette.colors.${e}.600`:`palette.colors.${e}.200`;case"accent":return r?`palette.colors.${e}.600`:`palette.colors.${e}.400`}}function U(e,t){let a=t.targets.find(e=>"background"===e.kind)??t.targets[0];if(!a)return null;let o=String(e(a.path)??"").match(dt);if(!o)return null;let r=o[1],l=Xe.includes(r)?r:null;if(!l)return null;for(let a of["solid","soft"]){let o=_(l,a,t);if(t.targets.every(t=>String(e(t.path)??"")===o[`theme.${t.path}`]))return{family:l,intensity:a}}return null}function q(){return{id:"brand-palette",title:"Brand Palette",description:"Define your color palette. Edit the base color (500) to auto-generate the full scale.",collapsed:!1,fields:Ze.map(e=>({id:`palette-${e}`,label:`${e.charAt(0).toUpperCase()+e.slice(1)}`,description:`${e} color palette (edit shade 500, auto-generate scale)`,type:"color-scale",path:`theme.palette.colors.${e}`,colorScale:{colorFamily:e}}))}}function G(e,t){let a=x({future:t}),o=Ye(t),r=e.path,l=r.startsWith("theme.")?r.slice(6):r.startsWith("darkTheme.")?r.slice(10):void 0,s=l?Pa(o,l):Pa(a,r);return void 0===s?e.defaultValue:s}function Y(e){return Ea.map(t=>({...t,sections:t.sections.map(t=>({...t,fields:t.fields.map(t=>({...t,defaultValue:G(t,e)}))}))}))}function J(e,t){return e.startsWith("theme.")?e.replace(/^theme\./,`${t}.`):e}function Z(e,t){let a=e.find(e=>e.id===t);if(!a)throw Error(`Section "${t}" not found in definitions`);return a}function K(e,t,a,o=e.collapsed){let r="light"===a?"Light":"Dark",l="light"===a?"Applies when the widget is in light mode.":"Applies when the widget is in dark mode.";return{...e,id:`${a}-${e.id}`,title:`${r} ${e.title}`,description:e.description?`${l} ${e.description}`:l,collapsed:o,fields:e.fields.map(e=>function(e,t,a){return{...e,id:`${a}-${e.id}`,path:J(e.path,t)}}(e,t,a)),presets:e.presets?.map(e=>({...e,id:`${a}-${e.id}`,values:Object.fromEntries(Object.entries(e.values).map(([e,a])=>[J(e,t),a]))}))}}function X(e){return Wa.find(t=>t.id===e)}function Q(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function ee(e){return"dark"===e?{pageBg:"linear-gradient(180deg, #0f172a 0%, #020617 100%)",chromeBg:"#111827",chromeBorder:"#1f2937",dot:"#475569",skeleton:"#334155",cardBg:"#1e293b",cardBorder:"rgba(148, 163, 184, 0.16)"}:{pageBg:"linear-gradient(180deg, #ffffff 0%, #f8fafc 100%)",chromeBg:"#ffffff",chromeBorder:"#e5e7eb",dot:"#cbd5e1",skeleton:"#e2e8f0",cardBg:"#e2e8f0",cardBorder:"rgba(148, 163, 184, 0.18)"}}function te(e){let t=ee(e);return`* { box-sizing: border-box; }\n html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; }\n html { color-scheme: ${e}; }\n body { font-family: system-ui, sans-serif; background: ${t.pageBg}; }\n .preview-iframe-mock { min-height: 100%; }\n .preview-iframe-chrome { height: 44px; border-bottom: 1px solid ${t.chromeBorder}; background: ${t.chromeBg}; display: flex; align-items: center; gap: 8px; padding: 0 14px; }\n .preview-iframe-dot { width: 10px; height: 10px; border-radius: 50%; background: ${t.dot}; }\n .preview-iframe-copy { padding: 32px; }\n .preview-iframe-line { border-radius: 999px; background: ${t.skeleton}; margin-bottom: 12px; }\n .preview-iframe-line.hero { width: 48%; height: 16px; }\n .preview-iframe-line.body { width: 72%; height: 10px; }\n .preview-iframe-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }\n .preview-iframe-card { height: 84px; border-radius: 14px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-shell { height: 100%; min-height: 100%; display: flex; flex-direction: column; }\n .preview-workspace-topbar { height: 52px; flex-shrink: 0; border-bottom: 1px solid ${t.chromeBorder}; background: ${t.chromeBg}; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }\n .preview-workspace-topbar-left { display: flex; align-items: center; gap: 12px; }\n .preview-workspace-topbar-badge { width: 18px; height: 18px; border-radius: 6px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-topbar-line { width: 180px; height: 10px; border-radius: 999px; background: ${t.skeleton}; }\n .preview-workspace-topbar-pill { width: 64px; height: 28px; border-radius: 999px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-body { flex: 1; min-height: 0; display: flex; padding: 20px; }\n .preview-workspace-content { position: relative; display: flex; flex-direction: column; flex: 1; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; border-radius: 24px; background: rgba(255,255,255,0.72); box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-content-shell { position: relative; z-index: 1; flex: 1 1 auto; min-height: 100%; padding: 24px; }\n .preview-workspace-row { display: flex; gap: 16px; margin-top: 20px; }\n .preview-workspace-card { flex: 1; min-width: 0; height: 168px; border-radius: 18px; background: ${t.cardBg}; box-shadow: inset 0 0 0 1px ${t.cardBorder}; }\n .preview-workspace-card.short { height: 96px; }`}function ae(e,t){let a=e.contentDocument;if(!a?.documentElement)return;let o=a.getElementById(Na);o||(o=a.createElement("style"),o.id=Na,a.head.appendChild(o)),o.textContent=te(t)}function oe(e,t,a,o){let r=`\n ${Ua}\n <div style="position:fixed;inset:0;z-index:9999;"><div id="${e}" data-mount-id="${e}"></div></div>`,l=`\n <div class="preview-workspace-shell">\n <div class="preview-workspace-topbar">\n <div class="preview-workspace-topbar-left">\n <span class="preview-workspace-topbar-badge"></span>\n <span class="preview-workspace-topbar-line"></span>\n </div>\n <span class="preview-workspace-topbar-pill"></span>\n </div>\n <div class="preview-workspace-body">\n <div id="preview-content-${e}" class="preview-workspace-content" data-mount-id="${e}">\n ${qa}\n </div>\n </div>\n </div>`;return`<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1">\n <link rel="stylesheet" href="${Q(o)}">\n <style id="${Na}">${te(t)}</style>\n</head>\n<body>\n ${a?l:r}\n</body>\n</html>`}function re(e){return Ga[e]}function le(e,t=0){let a=new Date(Date.now()-1e3*Math.max(0,60-t)).toISOString(),o=`${e}-${t}`;switch(e){case"user-message":return{id:`preview-seq-user-${o}`,role:"user",content:"Can you continue with the next step?",createdAt:a};case"assistant-message":return{id:`preview-seq-assistant-${o}`,role:"assistant",content:"Absolutely. I can keep going and explain what happens next.",createdAt:a};case"assistant-code-block":return{id:`preview-seq-assistant-code-${o}`,role:"assistant",content:["Here's how you'd wire up a streaming animation:","","```ts","import { createAgentExperience } from '@runtypelabs/persona';","","createAgentExperience(el, {"," features: {",' streamAnimation: { type: "letter-rise", speed: 120 },'," },","});","```","","Swap the `type` value to try the other presets."].join("\n"),createdAt:a};case"assistant-markdown-table":return{id:`preview-seq-assistant-table-${o}`,role:"assistant",content:["Here are the built-in streaming animations at a glance:","","| Preset | Wrap unit | Best for |","| ------------ | --------- | --------------------------- |","| Typewriter | Character | Classic terminal feel |","| Letter rise | Character | Soft, staggered entrance |","| Word fade | Word | Longer-form assistant replies |","| Pop bubble | Bubble | Short, punchy affirmations |"].join("\n"),createdAt:a};case"assistant-image":return{id:`preview-seq-assistant-image-${o}`,role:"assistant",content:["Here's the reference diagram you asked for: let me know if you'd like a different view:","","![Stream animation reference](https://placehold.co/320x200/png?text=Stream+Animation)","","The gradient shows how per-unit delays stagger across the reply."].join("\n"),createdAt:a};case"reasoning-streaming":return{id:`preview-seq-reasoning-stream-${o}`,role:"assistant",content:"",createdAt:a,streaming:!0,variant:"reasoning",reasoning:{id:`preview-reasoning-stream-${o}`,status:"streaming",chunks:["Thinking through the next step in the workflow..."]}};case"reasoning-complete":return{id:`preview-seq-reasoning-complete-${o}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"reasoning",reasoning:{id:`preview-reasoning-complete-${o}`,status:"complete",chunks:["Reviewed the requirements and finalized the reasoning output."],durationMs:1200}};case"approval-request":{let e=`preview-approval-${o}`;return{id:`approval-${e}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"approval",approval:{id:e,status:"pending",agentId:"preview-agent",executionId:`preview-exec-${o}`,toolName:"add_to_cart",description:"Add the selected item to the shopping cart. Approve to let the assistant continue.",parameters:{items:[{productEntityId:129,quantity:1}]}}}}case"tool-complete":return{id:`preview-seq-tool-complete-${o}`,role:"assistant",content:"",createdAt:a,streaming:!1,variant:"tool",toolCall:{id:`preview-tool-complete-${o}`,name:"Create build instructions",status:"complete",chunks:["Prepared the build instructions and validated the inputs."],result:{ok:!0},duration:420}};default:return{id:`preview-seq-tool-running-${o}`,role:"assistant",content:"",createdAt:a,streaming:!0,variant:"tool",toolCall:{id:`preview-tool-running-${o}`,name:"Get platform documentation",status:"running",chunks:["Fetching the relevant platform documentation..."]}}}}function se(e,t){return[...e,le(t,e.length)]}function ie(e){return"assistant-message"===e||"assistant-code-block"===e||"assistant-markdown-table"===e||"assistant-image"===e}function ne(e,t,a){let o=le(e,t);if(!ie(e)||"string"!=typeof o.content)return[{message:o,delayMs:0,done:!0}];let r=Math.max(1,a?.chunkSize??24),l=Math.max(0,a?.delayMs??42),s=o.content,i=[];i.push({message:{...o,content:"",streaming:!0},delayMs:0,done:!1});for(let e=r;e<s.length;e+=r)i.push({message:{...o,content:s.slice(0,e),streaming:!0},delayMs:l,done:!1});return i.push({message:{...o,content:s,streaming:!1},delayMs:l,done:!0}),i}function ce(e,t,a=[]){if("follow-ups"===e){let e=Date.now();return[{id:"preview-follow-up-user",role:"user",content:"What can Persona help me build?",createdAt:new Date(e-12e4).toISOString()},{id:"preview-follow-up-assistant",role:"assistant",content:"Persona gives you a themeable streaming chat interface with flexible integrations and interaction patterns. Where would you like to go next?",createdAt:new Date(e-6e4).toISOString()},{id:"preview-follow-up-suggestions",role:"assistant",content:"",createdAt:new Date(e-59e3).toISOString(),streaming:!1,variant:"tool",toolCall:{id:"preview-follow-up-suggestions",name:"suggest_replies",status:"complete",args:{suggestions:[{id:"preview-implementation",label:"Show me an implementation",prompt:"Show me a practical implementation",description:"See a complete integration example",icon:"code-2",emphasis:"primary"},{id:"preview-theming",label:"Explore theming",prompt:"Tell me how theming works",description:"Customize colors, type, and component styles",icon:"palette"},{id:"preview-security",label:"Review security",prompt:"Explain the security model",description:"Learn about isolation and safe rendering",icon:"shield-check"},{id:"preview-support",label:"Talk to support",prompt:"Help me contact support",description:"Get help choosing the right approach",icon:"messages-square"}]},chunks:[]}},...a]}return"home"===e?[]:"minimized"===e?[{id:"preview-min-1",role:"assistant",content:"We are here whenever you are ready.",createdAt:(new Date).toISOString()}]:"artifact"===e?[{id:"preview-art-1",role:"user",content:"Can you draft a quick overview of the project?",createdAt:new Date(Date.now()-12e4).toISOString()},{id:"preview-art-2",role:"assistant",content:"Here’s a project overview document for you.",createdAt:new Date(Date.now()-6e4).toISOString()}]:"conversation"===e&&(e=>!!(e?.features?.toolCallDisplay?.activePreview||e?.features?.toolCallDisplay?.grouped||e?.features?.toolCallDisplay?.collapsedMode&&"tool-call"!==e.features.toolCallDisplay.collapsedMode||e?.features?.reasoningDisplay?.activePreview))(t)?[{id:"preview-adv-1",role:"user",content:"Can you create the product and gather the docs?",createdAt:new Date(Date.now()-18e4).toISOString()},{id:"preview-adv-2",role:"assistant",content:"",createdAt:new Date(Date.now()-15e4).toISOString(),streaming:!0,variant:"reasoning",reasoning:{id:"preview-reasoning",status:"streaming",chunks:["Now let me get the Persona embed documentation and builtin tools catalog."]}},{id:"preview-adv-3",role:"assistant",content:"",createdAt:new Date(Date.now()-12e4).toISOString(),streaming:!0,variant:"tool",toolCall:{id:"preview-tool-1",name:"Load tools",status:"running",chunks:["Loaded tools, used Runtype integration"]}},{id:"preview-adv-4",role:"assistant",content:"",createdAt:new Date(Date.now()-9e4).toISOString(),streaming:!0,variant:"tool",toolCall:{id:"preview-tool-2",name:"Get platform documentation",status:"running",chunks:["Get platform documentation"]}},{id:"preview-adv-5",role:"assistant",content:"I loaded the tools and fetched the docs. Next I can assemble the product details.",createdAt:new Date(Date.now()-3e4).toISOString()},...a]:[{id:"preview-conv-1",role:"assistant",content:"Hello! How can I help you today?",createdAt:new Date(Date.now()-18e4).toISOString()},{id:"preview-conv-2",role:"user",content:"I want to customize the theme editor preview.",createdAt:new Date(Date.now()-12e4).toISOString()},{id:"preview-conv-3",role:"assistant",content:"Absolutely. Check out the [getting started guide](https://example.com) to see what’s possible, then adjust colors and tokens to match your brand.",createdAt:new Date(Date.now()-6e4).toISOString()},...a]}function de(e,t,a=[]){let o={...e.launcher,enabled:!0,autoExpand:"minimized"!==t},r={...e,launcher:o,suggestions:"home"===t?{...e.suggestions,starters:{...e.suggestions?.starters?{}:{variant:"chip",placement:"composer"},...e.suggestions?.starters,items:e.suggestions?.starters?.items?.length?e.suggestions.starters.items:e.suggestionChips?.length?e.suggestionChips:ja}}:e.suggestions,initialMessages:ce(t,e,a),storageAdapter:_a};return"artifact"===t&&(r.features={...r.features,artifacts:{...r.features?.artifacts,enabled:!0}}),"messages"===t&&(r.features={...r.features,history:{presentation:"panel",...r.features?.history,enabled:!0}}),r}function pe(e,t){let a=x(e.config),o=e.config?.future,r=e.theme?S(e.theme,{validate:!1,future:o}):S(void 0,{future:o});return{...a,...e.config,theme:r,darkTheme:e.darkTheme,colorScheme:t??e.config?.colorScheme??"light"}}function ue(e,t){let a=e.scene??"conversation";return de(pe(e,t),a,e.appendedMessages??[])}function me(e,t,a){let o=e.scene??"conversation";return de(pe(e,a),o,t)}function he(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function ge(e){if("string"!=typeof e||""===e.trim())throw Error('Color must be a non-empty string (e.g. "#2563eb" or "blue").');let t=e.trim().toLowerCase(),a=Ya[t];if(a)return a;let o=P(t);if($(o)||"transparent"===o||function(e){return Ja.test(e)}(o))return o;throw Error(`"${e}" is not a recognized color. Pass a hex value like "#ef4444" or a CSS color name (e.g. ${Object.keys(Ya).slice(0,6).join(", ")}).`)}function fe(e,t=!0){let a=String(e??"").trim().toLowerCase(),o=Ka[a];if(!o||!t&&"neutral"===o)throw Error(`Unknown color family "${e}". Valid families: ${t?"primary, secondary, accent, neutral":"primary, secondary, accent"}.`);return o}function be(e){let t=String(e??"solid").trim().toLowerCase();if("solid"===t||"soft"===t)return t;throw Error(`Unknown intensity "${e}". Valid intensities: solid, soft.`)}function ye(e){let t=String(e??"").trim().toLowerCase();if("light"===t||"dark"===t||"auto"===t)return t;if("system"===t)return"auto";throw Error(`Unknown color scheme "${e}". Valid: light, dark, auto.`)}function ve(e){let t=String(e??"").trim().toLowerCase(),a=Xa[t];if(!a)throw Error(`Unknown roundness "${e}". Valid: sharp, default, rounded, pill.`);return a}function we(e){if("number"==typeof e&&Number.isFinite(e))return`${e}px`;if("string"==typeof e&&""!==e.trim()){let t=e.trim();if("9999px"===t||/^(100%|9999px)$/.test(t))return"9999px";let a=M(t);return R(a.value,a.unit)}throw Error('Radius must be a number (px) or a CSS length string like "0.5rem".')}function xe(e){for(let t of bt){let a=t.fields.find(t=>t.id===e);if(a?.options){let e={};for(let t of a.options){let a=t.value.split(".").pop();a&&(e[a]=t.value)}return e}}return{}}function ke(e,t,a="theme",o=0){if(o>6)return null;let r=e.get(`${a}.${t}`);return"string"!=typeof r||""===r?"darkTheme"===a?ke(e,t,"theme",o):null:r.startsWith("#")||r.startsWith("rgb")||"transparent"===r?r:r.startsWith("palette.")||r.startsWith("semantic.")||r.startsWith("components.")?ke(e,r,a,o+1):null}function Se(e,t){let a=e.get(t);if("string"!=typeof a)return"unknown";let o=a.split(".");return o[o.length-1]||String(a)}function Ce(e){return e.replace(/^role-/,"")}function Te(e){for(let[t,a]of Object.entries(io))if(no.every(t=>e[t]===a[t]))return t;return"custom"}function Ae(e){let t={};for(let a of no)t[a]=String(e.get(`theme.palette.radius.${a}`)??"");let a={};for(let t of ct)a[Ce(t.roleId)]=U(t=>e.get(`theme.${t}`),t);return{brand:{primary:Be(e.get("theme.palette.colors.primary.500")),secondary:Be(e.get("theme.palette.colors.secondary.500")),accent:Be(e.get("theme.palette.colors.accent.500"))},roles:a,typography:{fontFamily:Se(e,"theme.semantic.typography.fontFamily"),fontSize:Se(e,"theme.semantic.typography.fontSize"),fontWeight:Se(e,"theme.semantic.typography.fontWeight"),lineHeight:Se(e,"theme.semantic.typography.lineHeight")},roundness:{style:Te(t),radius:t},colorScheme:String(e.get("colorScheme")??"light"),history:{index:e.getHistoryIndex(),canUndo:e.canUndo(),canRedo:e.canRedo()}}}function Be(e){return"string"==typeof e&&""!==e?e:null}function Ie(e,t,a){for(let o of[t.fg,...t.fgFallbacks??[]]){let t=ke(e,o,a);if(t)return t}return null}function Me(e){return Math.round(100*e)/100}function Re(e,t,a,o,r){let l=e.get(`${r}.${t}`);if("string"!=typeof l)return null;let s=l.match(/^palette\.colors\.(\w+)\.(\d+)$/);if(!s)return null;let i=s[1],n=Je.indexOf(s[2]),c=null,d=1/0;return Je.forEach((t,l)=>{let s=e.get(`${r}.palette.colors.${i}.${t}`);if("string"==typeof s&&(s.startsWith("#")||s.startsWith("rgb"))&&F(s,a)>=o){let e=n>=0?Math.abs(l-n):l;e<d&&(d=e,c=`palette.colors.${i}.${t}`)}}),c}function Ve(e,t="AA",a="both",o){let r=po[t],l="both"===a?["light","dark"]:[a],s=o?co.filter(e=>o.includes(e.key)):co,i=[];for(let t of l){let a="light"===t?"theme":"darkTheme";for(let o of s){let l=Ie(e,o,a),s=ke(e,o.bg,a);if(!l||!s)continue;let n=Me(F(l,s)),c=n>=r,d={pair:o.key,label:o.label,variant:t,fg:l,bg:s,ratio:n,threshold:r,passes:c};if(!c){let t=Re(e,o.fg,s,r,a);t&&(d.suggestion=t)}i.push(d)}}return{level:t,checks:i,failures:i.filter(e=>!e.passes)}}function Ee(e,t,a="light",o="AA"){return 0===t.length?[]:Ve(e,o,a,t).failures.map(e=>({code:"contrast",pair:e.pair,variant:e.variant,ratio:e.ratio,threshold:e.threshold,message:`${e.label} (${e.variant}) has a contrast ratio of ${e.ratio}:1, below the ${o} threshold of ${e.threshold}:1${e.suggestion?`. Try ${e.suggestion} for the foreground.`:"."}`}))}function Pe(){let e=new Map,t=t=>{for(let a of t)for(let t of a.fields)e.has(t.id)||e.set(t.id,t)};for(let e of $a)t(e.sections);for(let e of Sa)t(e.sections);return e}function $e(e,t){let a=t?.editTarget??"both",o=null,r=e=>e&&"object"==typeof e?e:{},l=(e,t,o=a)=>{let r={};return("light"===o||"both"===o)&&(r[`theme.${e}`]=t),("dark"===o||"both"===o)&&(r[`darkTheme.${e}`]=t),r},s=e=>{if("both"===a)return e;let t={};for(let[o,r]of Object.entries(e))("light"===a&&o.startsWith("theme.")||"dark"===a&&o.startsWith("darkTheme."))&&(t[o]=r);return t},i=()=>"dark"===a?"dark":"light",n=(t,a=[])=>he({ok:!0,summary:Ae(e),warnings:a,applied:t});return[{name:"get_theme_overview",title:"Get current theme & what is editable",description:"Read theme summary, presets, and real editable paths. Call before editing. Fresh authoring starts with brand, then theme.semantic, then theme.components; defaults remain V4 unless future.v5Defaults is true.",annotations:{readOnlyHint:!0},inputSchema:{type:"object",properties:{verbosity:{type:"string",enum:["summary","full"],description:"'full' includes the field-id index."}},additionalProperties:!1},execute(t){let{verbosity:a}=r(t),l={summary:Ae(e),authoringGuide:"docs/configuration.md: content in welcome/copy/suggestions, behavior in features/providers, geometry in layout/launcher. Idle send uses theme.components.composer.send; stop uses theme.components.button.stop. Explicit legacy styles win until cleared; modern welcome wins over legacy copy. Backups/resolved previews include defaults; unknown-origin imports must stay explicit.",availableRoles:ct.map(e=>({role:Ce(e.roleId),helper:e.helper})),availableFamilies:Za,presets:Wa.map(e=>({id:e.id,name:e.name,description:e.description,tags:e.tags??[]})),tools:[{tool:"set_brand_colors",hint:"Recolor primary/secondary/accent and generate shade scales."},{tool:"assign_color_role",hint:"Recolor a widget region with family + intensity."},{tool:"set_typography",hint:"Set font family, size, weight, line height."},{tool:"set_roundness",hint:"Set corner roundness or granular radii."},{tool:"set_color_scheme",hint:"Set light/dark/auto and edit target."},{tool:"apply_preset",hint:"Apply a built-in preset."},{tool:"configure_widget",hint:"Toggle launcher position, features, and layout."},{tool:"set_copy_and_suggestions",hint:"Set welcome copy, placeholder, and suggestion chips."},{tool:"set_theme_fields",hint:"Set any field by id or dot-path."},{tool:"check_contrast",hint:"Audit WCAG contrast."},{tool:"manage_session",hint:"Undo, redo, reset, or export the theme."}]};return"full"===a&&(o??=Pe(),l.fieldIndex=Array.from(o.values()).map(e=>({id:e.id,path:e.path,type:e.type,label:e.label,description:e.description,options:e.options?.map(e=>e.value)}))),he(l)}},{name:"set_brand_colors",title:"Set brand colors",description:"Set primary, secondary, and/or accent colors. Generates shade scales and accepts hex, rgb/rgba, or CSS names.",inputSchema:{type:"object",properties:{primary:{type:"string",description:"Hex, rgb/rgba, or CSS name."},secondary:{type:"string",description:"Hex, rgb/rgba, or CSS name."},accent:{type:"string",description:"Hex, rgb/rgba, or CSS name."}},additionalProperties:!1},execute(t){let a=r(t),o=["primary","secondary","accent"],s={},c={};for(let e of o){if(void 0===a[e])continue;let t=ge(a[e]);c[e]=t;let o=z(t);for(let t of Je){let a=o[t];void 0!==a&&Object.assign(s,l(`palette.colors.${e}.${t}`,a))}}if(0===Object.keys(c).length)throw Error("Provide at least one of: primary, secondary, accent.");e.setBatch(s);let d=Ee(e,["primary-button","user-message"],i());return n(c,d)}},{name:"assign_color_role",title:"Assign a color family to an interface role",description:"Recolor a widget region by role, palette family, and intensity.",inputSchema:{type:"object",properties:{role:{type:"string",description:"Role, e.g. header or user-messages."},family:{type:"string",enum:Za},intensity:{type:"string",enum:["solid","soft"],description:"Default: solid."}},required:["role","family"],additionalProperties:!1},execute(t){let a=r(t),o=function(e){let t=String(e??"").trim().toLowerCase(),a=uo[t];if(!a){let t=ct.map(e=>Ce(e.roleId)).join(", ");throw Error(`Unknown role "${e}". Valid roles: ${t}.`)}return a}(a.role),l=fe(a.family,!0),c=be(a.intensity),d=s(_(l,c,o)),p=Object.keys(d).length;e.setBatch(d);let u=Ee(e,function(e){let t=new Set(e.targets.map(e=>e.path));return co.filter(e=>t.has(e.fg)||t.has(e.bg)).map(e=>e.key)}(o),i());return n({role:Ce(o.roleId),family:l,intensity:c,tokensWritten:p},u)}},{name:"set_typography",title:"Set typography",description:"Set font family, size, weight, and line height.",inputSchema:{type:"object",properties:{fontFamily:{type:"string"},fontSize:{type:"string"},fontWeight:{type:["string","number"]},lineHeight:{type:["string","number"]}},additionalProperties:!1},execute(t){let a=r(t),o={},s={},i=(e,t)=>{if(void 0===a[e])return;let r=function(e,t,a){let o=t[String(e??"").trim().toLowerCase()];if(!o){let o=[...new Set(Object.values(t).map(e=>e.split(".").pop()))].join(", ");throw Error(`Unknown ${a} "${e}". Valid: ${o}.`)}return o}(a[e],t,e);s[e]=r.split(".").pop()??r,Object.assign(o,l(`semantic.typography.${e}`,r))};if(i("fontFamily",oo),i("fontSize",ro),i("fontWeight",lo),i("lineHeight",so),0===Object.keys(s).length)throw Error("Provide at least one of: fontFamily, fontSize, fontWeight, lineHeight.");return e.setBatch(o),n(s)}},{name:"set_roundness",title:"Set corner roundness",description:"Set roundness by style or granular radius values.",inputSchema:{type:"object",properties:{style:{type:"string",enum:["sharp","default","rounded","pill"]},radius:{type:"object",description:"Granular px or CSS length overrides.",properties:{sm:{type:["string","number"]},md:{type:["string","number"]},lg:{type:["string","number"]},xl:{type:["string","number"]},full:{type:["string","number"]}},additionalProperties:!1}},additionalProperties:!1},execute(t){let a=r(t),o={},s={};if(void 0!==a.style){let e=ve(a.style);s.style=e;for(let[t,a]of Object.entries(io[e]))Object.assign(o,l(`palette.radius.${t}`,a))}if(void 0!==a.radius){let e=r(a.radius),t={};for(let a of["sm","md","lg","xl","full"]){if(void 0===e[a])continue;let r=we(e[a]);t[a]=r,Object.assign(o,l(`palette.radius.${a}`,r))}s.radius=t}if(0===Object.keys(o).length)throw Error("Provide `style` (sharp|default|rounded|pill) or a `radius` object.");return e.setBatch(o),n(s)}},{name:"set_color_scheme",title:"Set color scheme",description:"Set light/dark/auto color scheme and optional edit target.",inputSchema:{type:"object",properties:{scheme:{type:"string",enum:["light","dark","auto"]},editTarget:{type:"string",enum:["light","dark","both"]}},additionalProperties:!1},execute(t){let o=r(t),l={};if(void 0!==o.scheme){let t=ye(o.scheme);e.set("colorScheme",t),l.scheme=t}if(void 0!==o.editTarget){let e=String(o.editTarget).trim().toLowerCase();if("light"!==e&&"dark"!==e&&"both"!==e)throw Error(`Unknown editTarget "${o.editTarget}". Valid: light, dark, both.`);a=e,l.editTarget=e}if(0===Object.keys(l).length)throw Error("Provide `scheme` and/or `editTarget`.");return he({ok:!0,summary:Ae(e),warnings:[],applied:l,editTarget:a})}},{name:"apply_preset",title:"Apply a built-in theme preset",description:"Apply a complete built-in preset, replacing theme tokens. Call get_theme_overview to list preset ids.",inputSchema:{type:"object",properties:{presetId:{type:"string"}},required:["presetId"],additionalProperties:!1},async execute(t){let{presetId:a}=r(t),o=X(String(a??""));if(!o){let e=Wa.map(e=>e.id).join(", ");throw Error(`Unknown preset "${a}". Valid presets: ${e}.`)}let l=o.behavior?await import("@runtypelabs/persona/preferences-runtime"):null,s=S(o.theme,{validate:!1}),i={...e.getConfig()};o.darkTheme&&(i.darkTheme=S(o.darkTheme,{validate:!1}),i.colorScheme="auto"),o.toolCall&&(i.toolCall=o.toolCall),o.behavior&&l&&(i.features=l.applyFeaturePreferences(i.features,[o.behavior])),e.setFullConfig(i,s);let c=Ee(e,["body","assistant-message"],"light");return n({appliedPreset:{id:o.id,name:o.name}},c)}},{name:"configure_widget",title:"Configure launcher, features, and layout",description:"Toggle launcher position, feature flags, and message layout.",inputSchema:{type:"object",properties:{launcherPosition:{type:"string",enum:go},features:{type:"object",properties:{voice:{type:"boolean"},artifacts:{type:"boolean"},attachments:{type:"boolean"},toolCalls:{type:"boolean"},reasoning:{type:"boolean"},feedback:{type:"boolean"}},additionalProperties:!1},layout:{type:"object",properties:{avatars:{type:"boolean"},timestamps:{type:"boolean"},showHeader:{type:"boolean"},messageStyle:{type:"string",enum:fo}},additionalProperties:!1}},additionalProperties:!1},execute(t){let a=r(t),o={},l={};if(void 0!==a.launcherPosition){let e=String(a.launcherPosition);if(!go.includes(e))throw Error(`Unknown launcherPosition "${e}". Valid: ${go.join(", ")}.`);o["launcher.position"]=e,l.launcherPosition=e}let s=r(a.features);for(let[e,t]of Object.entries(mo))void 0!==s[e]&&(o[t]=!!s[e],l.features??={},l.features[e]=!!s[e]);let i=r(a.layout);for(let[e,t]of Object.entries(ho))if(void 0!==i[e])if("messageStyle"===e){let a=String(i[e]);if(!fo.includes(a))throw Error(`Unknown messageStyle "${a}". Valid: ${fo.join(", ")}.`);o[t]=a,l.layout??={},l.layout[e]=a}else o[t]=!!i[e],l.layout??={},l.layout[e]=!!i[e];if(0===Object.keys(o).length)throw Error("Provide launcherPosition, features, and/or layout.");return e.setBatch(o),n(l)}},{name:"set_copy_and_suggestions",title:"Set welcome copy and suggestion chips",description:"Set welcome copy, input placeholder, send label, and suggestion chips.",inputSchema:{type:"object",properties:{title:{type:"string"},subtitle:{type:"string"},placeholder:{type:"string"},sendLabel:{type:"string"},suggestions:{type:"array",items:{type:"string"}}},additionalProperties:!1},execute(t){let a=r(t),o={},l={};for(let[e,t]of Object.entries(bo))void 0!==a[e]&&(o[t]=String(a[e]),l[e]=String(a[e]));if(void 0!==a.suggestions){if(!Array.isArray(a.suggestions))throw Error("`suggestions` must be an array of strings.");let e=a.suggestions.filter(e=>"string"==typeof e);o["suggestions.starters.items"]=e,l.suggestions=e}if(0===Object.keys(o).length)throw Error("Provide at least one of: title, subtitle, placeholder, sendLabel, suggestions.");return e.setBatch(o),n(l)}},{name:"set_theme_fields",title:"Set theme fields by id or path (advanced)",description:"Advanced escape hatch: set fields by id or real dot-path, e.g. theme.components.composer.send.foreground, theme.components.button.stop.background, welcome.variant, suggestions.starters.placement. Metadata supplies value kinds; border colors and full CSS border shorthands differ. Clearing legacy overrides is a separate migration operation.",inputSchema:{type:"object",properties:{updates:{type:"array",items:{type:"object",properties:{field:{type:"string",description:"Field id or path."},value:{type:["string","number","boolean"]}},required:["field","value"],additionalProperties:!1}}},required:["updates"],additionalProperties:!1},execute(t){let{updates:a}=r(t);if(!Array.isArray(a)||0===a.length)throw Error("`updates` must be a non-empty array of { field, value }.");o??=Pe();let s={},i=[];for(let e of a){let t=r(e),a=String(t.field??"");try{let e=o.get(a),r=e?e.path:a;if(!e&&!/^(theme|darkTheme)\.|\./.test(r))throw Error(`Unknown field "${a}". Pass a known field id or a dot-path (e.g. theme.palette.radius.md).`);let n=Oe(e,t.value);if(e&&r.startsWith("theme.")){let e=l(r.slice(6),n);Object.assign(s,e),i.push({field:a,resolvedPath:Object.keys(e),ok:!0})}else s[r]=n,i.push({field:a,resolvedPath:r,ok:!0})}catch(e){i.push({field:a,ok:!1,error:e.message})}}let n=i.filter(e=>e.ok);return Object.keys(s).length>0&&e.setBatch(s),he({ok:n.length>0,summary:Ae(e),warnings:[],applied:{updates:i}})}},{name:"check_contrast",title:"Check accessibility contrast",description:"Run WCAG checks over key text/background pairs.",annotations:{readOnlyHint:!0},inputSchema:{type:"object",properties:{level:{type:"string",enum:["AA","AAA"],description:"Default: AA."},variant:{type:"string",enum:["light","dark","both"],description:"Default: both."}},additionalProperties:!1},execute(t){let a=r(t),o=Ve(e,"AAA"===a.level?"AAA":"AA","light"===a.variant||"dark"===a.variant?a.variant:"both");return he({level:o.level,passing:o.checks.length-o.failures.length,total:o.checks.length,checks:o.checks,failures:o.failures})}},{name:"manage_session",title:"Undo, redo, reset, or export the theme",description:"Undo, redo, reset defaults, or export the theme snapshot.",inputSchema:{type:"object",properties:{action:{type:"string",enum:["undo","redo","reset","export"]}},required:["action"],additionalProperties:!1},execute(t){let{action:a}=r(t);switch(a){case"undo":return e.undo(),n({action:"undo"});case"redo":return e.redo(),n({action:"redo"});case"reset":return e.resetToDefaults(),n({action:"reset"});case"export":return he({ok:!0,snapshot:e.exportSnapshot()});default:throw Error(`Unknown action "${a}". Valid: undo, redo, reset, export.`)}}}]}function Oe(e,t){if(!e)return t;switch(e.type){case"color":return e.parseValue?e.parseValue(ge(t)):ge(t);case"toggle":return"boolean"==typeof t?t:"true"===t||1===t;case"slider":{let a=Number(t);if(!Number.isFinite(a))throw Error(`"${e.id}" expects a number.`);if(e.slider){let{min:t,max:o}=e.slider;if(a<t||a>o)throw Error(`"${e.id}" must be between ${t} and ${o}.`)}return e.parseValue?e.parseValue(a):a}case"select":{let a=String(t);if(e.options&&!e.options.some(e=>e.value===a))throw Error(`"${e.id}" must be one of: ${e.options.map(e=>e.value).join(", ")}.`);return e.parseValue?e.parseValue(a):a}default:return e.parseValue?e.parseValue(t):t}}e=(e,t,a)=>()=>{if(a)throw a[0];try{return e&&(t=e(e=0)),t}catch(e){throw a=[e],e}},m=e(()=>{t={collapsedMode:"tool-call",activePreview:!1,grouped:!1,groupedMode:"stack",groupBoundary:"adjacent",previewMaxLines:3,expandable:!0,loadingAnimation:"none"},a={activePreview:!1,previewMaxLines:3,expandable:!0,loadingAnimation:"none"},o={layout:"row",variant:"row",iconVisibility:"active",autoExpand:!1,grouped:!0,groupedMode:"collapsible",groupAppearance:"inset",loadingAnimation:"shimmer"},r={appearance:"inset",layout:"row",variant:"row",iconVisibility:"active",autoExpand:!1,loadingAnimation:"shimmer"}}),h=e(()=>{l=e=>"object"==typeof e&&!!e&&!Array.isArray(e)}),g=e(()=>{s={resolvedDisplay:"row",primaryAction:"allow-once",keyboardShortcuts:"focused"}}),f=e(()=>{}),(b=e(()=>{m(),h(),g(),f(),n="440px",d={apiUrl:"https://api.runtype.com/api/chat/dispatch",clientToken:void 0,agentId:void 0,target:void 0,theme:void 0,darkTheme:void 0,colorScheme:"light",tooltip:{delayMs:400,skipDelayMs:300},launcher:{enabled:!0,mountMode:"floating",dock:{side:"right",width:"420px"},title:"Chat Assistant",subtitle:"Here to help you get answers fast",agentIconText:"💬",agentIconName:"bot",headerIconName:"bot",position:"bottom-right",width:i="min(440px, calc(100vw - 24px))",heightOffset:0,autoExpand:!1,callToActionIconHidden:!1,agentIconSize:"40px",headerIconSize:"40px",closeButtonPaddingX:"0px",closeButtonPaddingY:"0px",callToActionIconName:"arrow-up-right",callToActionIconText:"",callToActionIconSize:"32px",callToActionIconPadding:"5px",callToActionIconColor:void 0,callToActionIconBackgroundColor:void 0,closeButtonBackgroundColor:"transparent",clearChat:{backgroundColor:"transparent",borderColor:"transparent",enabled:!0,placement:"inline",iconName:"refresh-cw",showTooltip:!0,tooltipText:"Clear chat",paddingX:"0px",paddingY:"0px"},headerIconHidden:!1,border:void 0,shadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)"},copy:{inputPlaceholder:c="How can I help...",sendButtonLabel:"Send"},sendButton:{borderWidth:"0px",paddingX:"12px",paddingY:"10px",borderColor:void 0,useIcon:!0,iconText:"↑",showTooltip:!0,tooltipText:"Send message",iconName:"send"},statusIndicator:{visible:!0,idleText:"Online",connectingText:"Connecting…",connectedText:"Streaming…",errorText:"Offline"},voiceRecognition:{enabled:!0,pauseDuration:2e3,iconName:"mic",borderWidth:"0px",iconColor:void 0,backgroundColor:"transparent",borderColor:"transparent",recordingIconColor:void 0,recordingBackgroundColor:void 0,recordingBorderColor:"transparent",showTooltip:!0,tooltipText:"Start voice recognition"},features:{showReasoning:!0,showToolCalls:!0,scrollToBottom:{enabled:!0,iconName:"arrow-down",label:"",streamingIndicator:"arrow",scrollBehavior:"instant",scrollDurationMs:220,transition:"none"},scrollBehavior:{mode:"anchor-top",anchorTopOffset:16,showActivityWhilePinned:!0},toolCallDisplay:t,reasoningDisplay:a,streamAnimation:{type:"none",placeholder:"none",speed:120,duration:1800},askUserQuestion:{enabled:!0,slideInMs:180,freeTextLabel:"Other…",freeTextPlaceholder:"Type your answer…",submitLabel:"Send"},history:{enabled:!1,presentation:"panel",showScopeStatus:!0,showDelete:!0,showDeleteAll:!0}},suggestionChips:["Show me what you can help with","Walk me through getting started","Answer a question about this page"],suggestionChipsConfig:{fontFamily:"sans-serif",fontWeight:"500",paddingX:"12px",paddingY:"6px"},layout:{header:{layout:"default",showIcon:!0,showTitle:!0,showSubtitle:!0,showCloseButton:!0,showClearChat:!0},messages:{layout:"bubble",avatar:{show:!1,position:"left"},timestamp:{show:!1,position:"below"},groupConsecutive:!1},slots:{}},markdown:{options:{gfm:!0,breaks:!0},disableDefaultStyles:!1},messageActions:{enabled:!0,showCopy:!0,showUpvote:!1,showDownvote:!1,visibility:"hover",align:"right",layout:"pill-inside"},debug:!1},p={},u={colorScheme:"light",errorDisplay:"block",messageActions:{visibility:void 0},suggestionChipsConfig:{fontWeight:void 0},approval:s,loadingIndicator:{variant:"label"},launcher:{variant:"circle",width:"min(400px, calc(100vw - 24px))",headerIconSize:"20px"},features:{artifacts:{enabled:!0},scrollToBottom:{streamingIndicator:"dots",transition:"fade",scrollBehavior:"smooth"},toolCallDisplay:o,reasoningDisplay:r},composer:{layout:"single-row",placement:"overlay"},sendButton:{iconName:"arrow-up"},statusIndicator:{mode:"transient"},layout:{contentMaxWidth:"768px",topFade:!0,header:{showSubtitle:!1},messages:{assistant:{width:"full"}}}},x()}))();const Fe="16px",Le="transparent",We={colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},info:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"}},spacing:(()=>{let e={};for(let t of[0,1,2,3,4,5,6,8,10,12,16,20,24,32,40,48,56,64])e[t]=0===t?"0px":t/4+"rem";return e})(),typography:{fontFamily:{sans:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',serif:'Georgia, Cambria, "Times New Roman", Times, serif',mono:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace"},fontSize:{xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},lineHeight:{tight:"1.25",normal:"1.5",relaxed:"1.625"}},shadows:{none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)"},borders:{none:"none",sm:"1px solid",md:"2px solid",lg:"4px solid"},radius:{none:"0px",sm:"0.125rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem",full:"9999px"}},ze={colors:{primary:"palette.colors.primary.500",secondary:"palette.colors.secondary.500",accent:"palette.colors.primary.600",surface:"palette.colors.gray.50",background:"palette.colors.gray.50",container:"palette.colors.gray.50",text:"palette.colors.gray.900",textMuted:"palette.colors.gray.500",textInverse:"palette.colors.gray.50",border:"palette.colors.gray.200",divider:"palette.colors.gray.200",interactive:{default:"palette.colors.primary.600",hover:"palette.colors.primary.700",focus:"palette.colors.primary.600",active:"palette.colors.primary.600",disabled:"palette.colors.gray.300"},feedback:{success:"palette.colors.success.500",warning:"palette.colors.warning.500",error:"palette.colors.error.500",info:"palette.colors.info.500"}},spacing:{xs:"palette.spacing.1",sm:"palette.spacing.2",md:"palette.spacing.4",lg:"palette.spacing.6",xl:"palette.spacing.8","2xl":"palette.spacing.10"},typography:{fontFamily:"palette.typography.fontFamily.sans",fontSize:"palette.typography.fontSize.base",fontWeight:"palette.typography.fontWeight.normal",lineHeight:"palette.typography.lineHeight.normal"}},He={button:{primary:{background:"palette.colors.primary.500",foreground:"palette.colors.primary.50",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md"},secondary:{background:"semantic.colors.surface",foreground:"semantic.colors.secondary",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md"},ghost:{background:"transparent",foreground:"semantic.colors.text",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm",hoverBackground:"rgba(0, 0, 0, 0.05)"}},input:{background:"semantic.colors.surface",placeholder:"semantic.colors.textMuted",borderRadius:"palette.radius.lg",padding:"semantic.spacing.md",focus:{border:"palette.colors.gray.400",ring:"palette.colors.gray.400"}},launcher:{background:"semantic.colors.surface",foreground:"semantic.colors.primary",border:"semantic.colors.border",size:"60px",iconSize:"28px",borderRadius:"palette.radius.full",shadow:"palette.shadows.lg"},panel:{width:i,maxWidth:"none",height:"min(640px, max(200px, calc(100vh - 64px)))",maxHeight:"none",borderRadius:"palette.radius.xl",shadow:"palette.shadows.xl",inset:Fe,canvasBackground:Le,modes:{floating:{border:"1px solid var(--persona-border)",shadow:"palette.shadows.xl",borderRadius:"palette.radius.xl"},inline:{border:"1px solid var(--persona-border)",shadow:"none",borderRadius:"palette.radius.xl"},docked:{border:"none",shadow:"none",borderRadius:"palette.radius.xl"},sidebar:{border:"none",borderRadius:"0"},mobile:{border:"none",shadow:"none",borderRadius:"0"}}},header:{background:"palette.colors.primary.500",foreground:"palette.colors.primary.50",borderRadius:"palette.radius.xl palette.radius.xl 0 0",padding:"20px 24px",minimalPadding:"16px 24px",iconBackground:"palette.colors.primary.600",iconForeground:"palette.colors.primary.50"},message:{gap:"12px",user:{background:"palette.colors.primary.500",text:"palette.colors.primary.50",borderRadius:"palette.radius.lg",shadow:"palette.shadows.sm"},assistant:{background:"semantic.colors.container",text:"semantic.colors.text",borderRadius:"palette.radius.lg",border:"semantic.colors.border",shadow:"palette.shadows.sm"},border:"semantic.colors.border"},introCard:{background:"transparent",borderRadius:"palette.radius.2xl",padding:"semantic.spacing.lg",shadow:"palette.shadows.none"},suggestion:{chip:{background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.full",padding:"0.5rem 0.875rem",gap:"0.5rem",itemGap:"8px",minHeight:"36px",fontSize:"0.8125rem",lineHeight:"1.25",iconSize:"16px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"},card:{background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.xl",padding:"1rem",shadow:"palette.shadows.sm",gap:"0.625rem",itemGap:"8px",minHeight:"72px",fontSize:"0.875rem",lineHeight:"1.35",iconSize:"18px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"},list:{background:"transparent",foreground:"semantic.colors.text",border:"semantic.colors.border",borderRadius:"palette.radius.md",padding:"0.75rem",gap:"0.625rem",itemGap:"8px",minHeight:"44px",fontSize:"0.875rem",lineHeight:"1.35",iconSize:"17px",hoverBackground:"palette.colors.gray.100",hoverBorder:"palette.colors.gray.300",pressedBackground:"palette.colors.gray.200",focusRing:"semantic.colors.interactive.focus",disabledOpacity:"0.5"}},toolBubble:{shadow:"palette.shadows.sm"},reasoningBubble:{shadow:"palette.shadows.sm"},composer:{shadow:"palette.shadows.none"},scrollbar:{thumb:"semantic.colors.border",track:"transparent"},markdown:{inlineCode:{background:"palette.colors.gray.50",foreground:"palette.colors.gray.900"},link:{foreground:"palette.colors.primary.600"},prose:{fontFamily:"inherit"},codeBlock:{background:"semantic.colors.container",borderColor:"semantic.colors.border",textColor:"inherit",borderRadius:"palette.radius.md"},table:{headerBackground:"semantic.colors.container",borderColor:"semantic.colors.border"},hr:{color:"semantic.colors.divider"},blockquote:{borderColor:"palette.colors.gray.900",background:"transparent",textColor:"palette.colors.gray.500"}},collapsibleWidget:{container:"palette.colors.gray.50",surface:"semantic.colors.surface",border:"semantic.colors.border"},voice:{recording:{indicator:"palette.colors.error.500",background:"palette.colors.error.50",border:"palette.colors.error.200"},processing:{icon:"palette.colors.primary.500",background:"palette.colors.primary.50"},speaking:{icon:"palette.colors.success.500"}},approval:{requested:{background:"semantic.colors.surface",border:"semantic.colors.border",text:"palette.colors.gray.900",shadow:"0 1px 2px 0 rgba(11, 11, 11, 0.06), 0 2px 8px 0 rgba(11, 11, 11, 0.04)"},approve:{background:"semantic.colors.primary",foreground:"semantic.colors.textInverse",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm"},deny:{background:"semantic.colors.container",foreground:"semantic.colors.text",borderRadius:"palette.radius.md",padding:"semantic.spacing.sm"}},attachment:{image:{background:"palette.colors.gray.100",border:"palette.colors.gray.200"}},eventStream:{badge:{flow:{background:"palette.colors.success.100",foreground:"palette.colors.success.700"},step:{background:"palette.colors.primary.100",foreground:"palette.colors.primary.700"},reasoning:{background:"palette.colors.warning.100",foreground:"palette.colors.warning.700"},tool:{background:"palette.colors.purple.100",foreground:"palette.colors.purple.800"},agent:{background:"palette.colors.teal.100",foreground:"palette.colors.teal.800"},error:{background:"palette.colors.error.100",foreground:"palette.colors.error.700"},default:{background:"palette.colors.gray.100",foreground:"palette.colors.gray.600"}}},scrollToBottom:{background:"components.button.primary.background",foreground:"components.button.primary.foreground",border:"semantic.colors.primary",size:"40px",borderRadius:"palette.radius.full",shadow:"palette.shadows.sm",padding:"0.5rem 0.875rem",gap:"0.5rem",fontSize:"0.875rem",iconSize:"14px"},artifact:{pane:{background:"semantic.colors.container",toolbarBackground:"semantic.colors.container"}}},De=We.colors.gray,Ne={...We,colors:{...We.colors,gray:De}},_e={...We,colors:{...We.colors,gray:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"}},radius:{none:"0px",sm:"4px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",full:"9999px"}},je=ze,Ue={...ze,colors:{...ze.colors,surface:"#ffffff",background:"#ffffff",container:"semantic.colors.surface",textInverse:"#ffffff"},typography:{...ze.typography,fontSize:"14px",lineHeight:"1.5"}},qe=He,Ge={...He,scrollToBottom:{...He.scrollToBottom,background:"semantic.colors.surface",foreground:"semantic.colors.text",border:"semantic.colors.border",size:"32px"},messageActions:{background:"transparent",border:"none",hoverBackground:"components.button.ghost.hoverBackground",hoverForeground:"semantic.colors.text",borderRadius:"palette.radius.md"},launcher:{background:"semantic.colors.primary",foreground:"semantic.colors.textInverse",border:"transparent",size:"48px",iconSize:"24px",borderRadius:"palette.radius.full",shadow:"0 8px 24px rgba(0,0,0,.16)",offset:"20px"},activity:{labelSize:"13px",iconSize:"16px",indent:"0px",transcriptGap:"0px",responseGap:"12px",groupIndent:"16px",groupGap:"2px",groupPadding:"2px 0",bodyPadding:"4px 0",bodyFontWeight:"400",sectionGap:"8px",bodySurface:"transparent"},toolBubble:{shadow:"none"},reasoningBubble:{shadow:"none"},input:{...He.input,borderRadius:"palette.radius.full"},introCard:{...He.introCard,title:{fontSize:"22px",fontWeight:"500"}},suggestion:{chip:{...He.suggestion.chip,fontWeight:"400"},card:{...He.suggestion.card,fontWeight:"400"},list:{...He.suggestion.list,fontWeight:"400"}},panel:{...He.panel,width:"min(400px, calc(100vw - 24px))",height:"min(704px, calc(100dvh - 104px))",borderRadius:"palette.radius.xl"},header:{...He.header,background:"semantic.colors.container",foreground:"semantic.colors.text",padding:"8px 8px 8px 16px",minimalPadding:"8px 8px 8px 16px",minHeight:"48px",borderBottom:"none",iconBackground:"transparent",iconForeground:"semantic.colors.text",iconScale:"1",iconPadding:"auto",controlSize:"28px",controlIconSize:"16px",controlStrokeWidth:"1.5",actionIconForeground:"semantic.colors.textMuted",controlBorderRadius:"8px",controlHoverBackground:"color-mix(in srgb, var(--persona-text) 8%, transparent)",controlHoverForeground:"semantic.colors.text",controlFocusOutline:"2px solid color-mix(in srgb, var(--persona-text) 50%, transparent)",title:{fontSize:"14px",fontWeight:"500",lineHeight:"1.5"}},message:{...He.message,gap:"20px",fullscreenGap:"28px",topFadeHeight:"18px",user:{...He.message.user,background:"palette.colors.gray.100",text:"semantic.colors.text",borderRadius:"palette.radius.xl",shadow:"none",padding:"8px 14px",fontSize:"14px",lineHeight:"1.5"},assistant:{...He.message.assistant,background:"transparent",border:"transparent",borderWidth:"0px",borderRadius:"0px",shadow:"none",padding:"0px",fontSize:"14px",lineHeight:"1.55"}},artifact:{...He.artifact,card:{background:"semantic.colors.surface",border:"1px solid var(--persona-border)",borderRadius:"palette.radius.lg",hoverBackground:"components.button.ghost.hoverBackground",hoverBorderColor:"semantic.colors.border"},inline:{background:"semantic.colors.surface",border:"1px solid var(--persona-border)",borderRadius:"palette.radius.lg",chromeBackground:"semantic.colors.surface",chromeBorder:"semantic.colors.border",titleColor:"semantic.colors.text",mutedColor:"semantic.colors.textMuted"}},composer:{...He.composer,padding:"8px",fontSize:"15px",lineHeight:"1.5",controlSize:"32px",controlIconSize:"20px",expandedPadding:"12px 16px",expandedBorderRadius:"24px",sendIconSize:"18px",sendButtonRadius:"9999px",footerBorder:"none",overflowMenu:{borderRadius:"12px"},overlayBand:"linear-gradient(to bottom, transparent, var(--persona-container) 24px)",focusBorderColor:"color-mix(in srgb, var(--persona-text) 28%, var(--persona-border))",focusRing:"1px solid color-mix(in srgb, var(--persona-text) 12%, transparent)"}},Ye=e=>"v5"===(e=>w({future:e}))(e)?{palette:_e,semantic:Ue,components:Ge}:{palette:Ne,semantic:je,components:qe};b(),h(),y=class{#e;#t;#a;#o;#r;#l;#s;#i;constructor(e,t,a){this.#e=[],this.#t=[],this.#a=-1,this.#o=!1,this.#r={},this.#l={},this.#s=!0,this.origin="authored",this.#i=new WeakMap;let o=a?.mergeDefaults??!0;this.#s=o,this.#r=B({...t}),delete this.#r.theme,this.#l=B(e??t?.theme??{});let r=x(t);this.config=o?{...r,...t}:t??r,this.theme=S(this.#l,{validate:!1,future:this.config.future}),this.#n(),this.#c(this.exportSnapshot(),!0)}get(e){return e.startsWith("theme.")?C(this.theme,e.replace("theme.","")):e.startsWith("darkTheme.")?C(this.config.darkTheme??{},e.replace("darkTheme.","")):C(this.config,e)}getTheme(){return this.theme}getConfig(){return this.config}set(e,t){let a=w(this.config);if(this.#d(e,t),e.startsWith("theme.")){let a=e.replace("theme.","");this.theme=T(this.theme,a,t),this.#n()}else if(e.startsWith("darkTheme.")){let a=e.replace("darkTheme.",""),o=this.config.darkTheme??S(void 0,{future:this.config.future});this.config={...this.config,darkTheme:T(o,a,t)}}else this.config=T(this.config,e,t);this.#p(a),this.#u(),this.#m()}unset(e){let t=w(this.config);if(this.#d(e,void 0,!0),e.startsWith("theme.")){let t=e.replace("theme.","");this.theme=A(this.theme,t),this.#n()}else if(e.startsWith("darkTheme.")){let t=e.replace("darkTheme.","");this.config={...this.config,darkTheme:A(this.config.darkTheme??{},t)}}else this.config=A(this.config,e);this.#p(t),this.#u(),this.#m()}setBatch(e){let t=w(this.config),a=!1,o=!1,r=!1;for(let[t,l]of Object.entries(e))if(this.#d(t,l),t.startsWith("theme.")){let e=t.replace("theme.","");this.theme=T(this.theme,e,l),a=!0}else if(t.startsWith("darkTheme.")){let e=t.replace("darkTheme.",""),a=this.config.darkTheme??S(void 0,{future:this.config.future});this.config={...this.config,darkTheme:T(a,e,l)},o=!0}else this.config=T(this.config,t,l),r=!0;a&&this.#n(),this.#p(t),(a||o||r)&&(this.#u(),this.#m())}setTheme(e){this.#l=B(e),this.theme=e,this.#n(),this.#u(),this.#m()}setFullConfig(e,t){this.origin="imported",this.#r=B({...e}),delete this.#r.theme,(t||e.theme)&&(this.#l=B(t??e.theme??{})),this.config={...e},(t||e.theme)&&(this.theme=S(t??e.theme,{validate:!1,future:e.future})),this.#n(),this.#u(),this.#m()}importSnapshot(e){if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Snapshot must be a JSON object");let t=e;if(this.origin="imported","config"in t||"theme"in t||2===t.version){let e=t.config??this.config;this.#r=B({...e}),delete this.#r.theme,this.#l=B(t.theme??e.theme??this.#l),this.config={...e},this.theme=S(this.#l,{validate:!1,future:e.future})}else this.#l=B(t),this.theme=S(this.#l,{validate:!1,future:this.config.future});this.#n(),this.#u(),this.#m()}resetToDefaults(){let e=this.config.future;this.origin="authored",this.#r=e?{future:e}:{},this.#l={},this.config={...x({future:e}),...e?{future:e}:{}},this.theme=S(void 0,{future:this.config.future}),this.#n(),this.#t=[],this.#a=-1,this.#c(this.exportSnapshot()),this.#m()}canUndo(){return this.#a>0}canRedo(){return this.#a>=0&&this.#a<this.#t.length-1}getHistoryLength(){return this.#t.length}getHistoryIndex(){return this.#a}undo(){this.canUndo()&&(--this.#a,this.#h(this.#t[this.#a]))}redo(){this.canRedo()&&(this.#a+=1,this.#h(this.#t[this.#a]))}exportAuthoredConfig(){return{origin:this.origin,config:B({...this.#r,...Object.keys(this.#l).length?{theme:this.#l}:{}})}}exportSnapshot(){return{version:2,config:{...this.config,theme:void 0},theme:this.theme}}onChange(e){return this.#e.push(e),()=>{let t=this.#e.indexOf(e);t>=0&&this.#e.splice(t,1)}}#d(e,t,a=!1){let o=(e,o)=>a||void 0===t?A(e,o):T(e,o,B(t));e.startsWith("theme.")?this.#l=o(this.#l,e.slice(6)):"theme"===e?this.#l=B(t??{}):this.#r=o(this.#r,e)}#p(e){e!==w(this.config)&&(this.config=this.#s?v(x(this.#r),this.#r):{...this.#r},this.theme=S(this.#l,{validate:!1,future:this.config.future}),this.#n())}#n(){this.config={...this.config,theme:this.theme}}#m(){for(let e of this.#e)e(this.config,this.theme)}#u(){this.#c(this.exportSnapshot())}#c(e,t=!1){if(this.#o)return;this.#i.set(e,{config:this.#r,theme:this.#l,origin:this.origin});let a=JSON.stringify(e),o=this.#a>=0&&this.#t[this.#a]?JSON.stringify(this.#t[this.#a]):null;if(t&&this.#a>=0)return void(this.#t[this.#a]=e);let r=this.#a>=0?this.#i.get(this.#t[this.#a]):void 0;a===o&&I(this.#i.get(e),r)||(this.#t=this.#t.slice(0,this.#a+1),this.#t.push(e),this.#a=this.#t.length-1)}#h(e){this.#o=!0;let t=this.#i.get(e);this.origin=t?.origin??"imported",this.#r=t?.config??e.config,this.#l=t?.theme??e.theme,this.config=e.config,this.theme=S(e.theme,{validate:!1,future:this.config.future}),this.#n(),this.#o=!1,this.#m()}};const Je=["50","100","200","300","400","500","600","700","800","900","950"],Ze=["primary","secondary","accent","gray","success","warning","error","info"],Ke=[{id:"solid",label:"Solid"},{id:"soft",label:"Soft"}],Xe=["primary","secondary","accent","gray"],Qe={primary:"Primary",secondary:"Secondary",accent:"Accent",gray:"Neutral"},et={roleId:"role-surfaces",helper:"Page and panel backgrounds",previewZone:"container",intensities:Ke,targets:[{path:"semantic.colors.background",kind:"background"},{path:"semantic.colors.surface",kind:"background"},{path:"semantic.colors.container",kind:"background"}]},tt={roleId:"role-header",helper:"Widget header bar",previewZone:"header",intensities:Ke,targets:[{path:"components.header.background",kind:"background"},{path:"components.header.foreground",kind:"foreground"},{path:"components.header.border",kind:"border"},{path:"components.header.iconBackground",kind:"accent"},{path:"components.header.iconForeground",kind:"foreground"},{path:"components.header.titleForeground",kind:"accent"},{path:"components.header.subtitleForeground",kind:"foreground"},{path:"components.header.actionIconForeground",kind:"foreground"}]},at={roleId:"role-user-messages",helper:"User chat bubbles",previewZone:"user-message",intensities:Ke,targets:[{path:"components.message.user.background",kind:"background"},{path:"components.message.user.text",kind:"foreground"}]},ot={roleId:"role-assistant-messages",helper:"Assistant chat bubbles",previewZone:"assistant-message",intensities:Ke,targets:[{path:"components.message.assistant.background",kind:"background"},{path:"components.message.assistant.text",kind:"foreground"}]},rt={roleId:"role-primary-actions",helper:"Send button and primary buttons",intensities:Ke,targets:[{path:"components.button.primary.background",kind:"background"},{path:"components.button.primary.foreground",kind:"foreground"},{path:"semantic.colors.interactive.default",kind:"accent"},{path:"semantic.colors.interactive.hover",kind:"accent"}]},lt={roleId:"role-scroll-to-bottom",helper:"Scroll-to-bottom affordances in transcript and event stream",intensities:Ke,targets:[{path:"components.scrollToBottom.background",kind:"background"},{path:"components.scrollToBottom.foreground",kind:"foreground"},{path:"components.scrollToBottom.border",kind:"border"}]},st={roleId:"role-input",helper:"Message input field",previewZone:"composer",intensities:Ke,targets:[{path:"components.input.background",kind:"background"},{path:"components.input.placeholder",kind:"foreground"},{path:"components.input.focus.border",kind:"accent"},{path:"components.input.focus.ring",kind:"accent"}]},it={roleId:"role-links-focus",helper:"Links, focus rings, and interactive highlights",intensities:Ke,targets:[{path:"semantic.colors.accent",kind:"accent"},{path:"semantic.colors.interactive.focus",kind:"accent"},{path:"semantic.colors.interactive.active",kind:"accent"},{path:"components.markdown.link.foreground",kind:"accent"}]},nt={roleId:"role-borders",helper:"Borders, dividers, and separators",intensities:Ke,targets:[{path:"semantic.colors.border",kind:"border"},{path:"semantic.colors.divider",kind:"border"}]},ct=[et,tt,at,ot,rt,lt,st,it,nt],dt=/^palette\.colors\.(\w+)\.(\d+)$/;b();const pt=(e,t,a,o,r)=>({id:e,label:t,type:"token-ref",path:a,defaultValue:o,tokenRef:{tokenType:"color"},...void 0===r?{}:{description:r}}),ut=(e,t,a,o,r,l)=>({id:t,label:a,type:e,path:o,defaultValue:r,...void 0===l?{}:{description:l}}),mt=(e,t,a,o,r,l)=>({id:e,label:t,type:"slider",path:a,defaultValue:o,slider:r,...void 0===l?{}:{description:l}}),ht=e=>String(e??"").trim()||void 0,gt=e=>"number"==typeof e?`${e}px`:String(e??"").trim(),ft=e=>String(e??"").trim(),bt=[{id:"brand-colors",title:"Brand Colors",description:"Pick your brand colors. A full shade scale is generated automatically for both light and dark themes.",collapsed:!1,fields:[ut("color","brand-primary","Primary","theme.palette.colors.primary.500","#171717","Main brand color for buttons, links, and accents"),ut("color","brand-secondary","Secondary","theme.palette.colors.secondary.500","#7c3aed","Supporting brand color"),ut("color","brand-accent","Accent","theme.palette.colors.accent.500","#06b6d4","Highlight and decorative color")]},{id:"chat-colors",title:"Chat Colors",description:"Customize the main colors of the chat interface.",collapsed:!0,fields:[pt("chat-header-bg","Header Background","theme.components.header.background","semantic.colors.surface"),pt("chat-header-fg","Header Foreground","theme.components.header.foreground","","Anchors the header text. The title takes it, the subtitle and button icons take a 72% mix of it over the background"),pt("chat-header-icon-bg","Header Icon Background","theme.components.header.iconBackground","semantic.colors.primary"),pt("chat-header-icon-fg","Header Icon Color","theme.components.header.iconForeground","semantic.colors.textInverse"),pt("chat-header-title-fg","Header Title Color","theme.components.header.titleForeground","","Blank follows the header foreground"),pt("chat-header-subtitle-fg","Header Subtitle Color","theme.components.header.subtitleForeground","","Blank follows the 72% foreground mix"),pt("chat-header-action-icons-fg","Header Button Icons","theme.components.header.actionIconForeground","","Blank follows the 72% foreground mix"),pt("chat-msg-user-bg","User Message Background","theme.components.message.user.background","semantic.colors.primary"),pt("chat-msg-user-text","User Message Text","theme.components.message.user.text","semantic.colors.textInverse"),pt("chat-msg-assistant-bg","Assistant Message Background","theme.components.message.assistant.background","semantic.colors.container"),pt("chat-msg-assistant-text","Assistant Message Text","theme.components.message.assistant.text","semantic.colors.text")]},{id:"launcher-style",title:"Launcher",description:"Control launcher appearance.",collapsed:!0,fields:[mt("style-launcher-size","Launcher Size","theme.components.launcher.size","60px",{min:32,max:80,step:2}),{id:"style-launcher-shape",label:"Launcher Shape",type:"select",path:"theme.components.launcher.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Rounded Square"},{value:"palette.radius.lg",label:"Rounded"},{value:"palette.radius.xl",label:"Very Rounded"},{value:"palette.radius.full",label:"Circle"}]},{id:"style-launcher-shadow",label:"Launcher Shadow",type:"select",path:"theme.components.launcher.shadow",defaultValue:"palette.shadows.lg",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]}]},{id:"typography",title:"Typography",collapsed:!0,fields:[{id:"typo-font-family",label:"Font Family",type:"select",path:"theme.semantic.typography.fontFamily",defaultValue:"palette.typography.fontFamily.sans",options:[{value:"palette.typography.fontFamily.sans",label:"Sans Serif"},{value:"palette.typography.fontFamily.serif",label:"Serif"},{value:"palette.typography.fontFamily.mono",label:"Monospace"}]},{id:"typo-font-size",label:"Base Font Size",type:"select",path:"theme.semantic.typography.fontSize",defaultValue:"palette.typography.fontSize.base",options:[{value:"palette.typography.fontSize.xs",label:"Extra Small (0.75rem)"},{value:"palette.typography.fontSize.sm",label:"Small (0.875rem)"},{value:"palette.typography.fontSize.base",label:"Base (1rem)"},{value:"palette.typography.fontSize.lg",label:"Large (1.125rem)"},{value:"palette.typography.fontSize.xl",label:"Extra Large (1.25rem)"}]},{id:"typo-font-weight",label:"Font Weight",type:"select",path:"theme.semantic.typography.fontWeight",defaultValue:"palette.typography.fontWeight.normal",options:[{value:"palette.typography.fontWeight.normal",label:"Normal (400)"},{value:"palette.typography.fontWeight.medium",label:"Medium (500)"},{value:"palette.typography.fontWeight.semibold",label:"Semibold (600)"},{value:"palette.typography.fontWeight.bold",label:"Bold (700)"}]},{id:"typo-line-height",label:"Line Height",type:"select",path:"theme.semantic.typography.lineHeight",defaultValue:"palette.typography.lineHeight.normal",options:[{value:"palette.typography.lineHeight.tight",label:"Tight (1.25)"},{value:"palette.typography.lineHeight.normal",label:"Normal (1.5)"},{value:"palette.typography.lineHeight.relaxed",label:"Relaxed (1.625)"}]}]},{id:"theme-mode",title:"Runtime Theme",description:"Controls how the shipped widget picks light or dark mode.",collapsed:!1,fields:[{id:"theme-mode",label:"Runtime Theme",description:"Always Light, Always Dark, or follow the visitor system preference",type:"select",path:"colorScheme",defaultValue:"auto",options:[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"auto",label:"Follow System"}]}]},{id:"shape",title:"Shape",description:"Control the corner roundness across the widget.",collapsed:!0,fields:[mt("radius-sm","Small","theme.palette.radius.sm","0.125rem",{min:0,max:16,step:1}),mt("radius-md","Medium","theme.palette.radius.md","0.375rem",{min:0,max:24,step:1}),mt("radius-lg","Large","theme.palette.radius.lg","0.5rem",{min:0,max:32,step:1}),mt("radius-xl","Extra Large","theme.palette.radius.xl","0.75rem",{min:0,max:48,step:1}),mt("radius-full","Full","theme.palette.radius.full","9999px",{min:0,max:100,step:1,isRadiusFull:!0})],presets:[{id:"radius-default",label:"Default",values:{"theme.palette.radius.sm":"0.125rem","theme.palette.radius.md":"0.375rem","theme.palette.radius.lg":"0.5rem","theme.palette.radius.xl":"0.75rem","theme.palette.radius.full":"9999px"}},{id:"radius-sharp",label:"Sharp",values:{"theme.palette.radius.sm":"1px","theme.palette.radius.md":"2px","theme.palette.radius.lg":"3px","theme.palette.radius.xl":"4px","theme.palette.radius.full":"4px"}},{id:"radius-rounded",label:"Rounded",values:{"theme.palette.radius.sm":"0.5rem","theme.palette.radius.md":"0.75rem","theme.palette.radius.lg":"1rem","theme.palette.radius.xl":"1.5rem","theme.palette.radius.full":"9999px"}}]},{id:"shadows",title:"Shadows",collapsed:!0,fields:[ut("text","shadow-sm","Small","theme.palette.shadows.sm","0 1px 2px 0 rgb(0 0 0 / 0.05)"),ut("text","shadow-md","Medium","theme.palette.shadows.md","0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"),ut("text","shadow-lg","Large","theme.palette.shadows.lg","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),ut("text","shadow-xl","Extra Large","theme.palette.shadows.xl","0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)")]},{id:"widget-style",title:"Widget Surface",description:"Adjust the main panel and message bubble treatment.",collapsed:!0,fields:[{id:"style-panel-radius",label:"Panel Corner Radius",type:"select",path:"theme.components.panel.borderRadius",defaultValue:"palette.radius.xl",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"style-panel-shadow",label:"Panel Shadow",type:"select",path:"theme.components.panel.shadow",defaultValue:"palette.shadows.xl",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},pt("style-panel-canvas-bg","Detached Canvas Background","theme.components.panel.canvasBackground",Le,"Fills the region behind a detached panel; defaults to transparent"),{id:"style-msg-user-radius",label:"User Message Radius",type:"select",path:"theme.components.message.user.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"style-msg-assistant-radius",label:"Assistant Message Radius",type:"select",path:"theme.components.message.assistant.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]}],yt={id:"semantic-colors",title:"Semantic Colors",description:"Map intents to palette colors.",collapsed:!0,fields:[pt("sem-primary","Primary","theme.semantic.colors.primary","palette.colors.primary.500","Main brand/action color"),pt("sem-secondary","Secondary","theme.semantic.colors.secondary","palette.colors.gray.500","Secondary actions"),pt("sem-accent","Accent","theme.semantic.colors.accent","palette.colors.primary.600","Accent/highlight color"),pt("sem-surface","Surface","theme.semantic.colors.surface","palette.colors.gray.50","Primary surface background"),pt("sem-background","Background","theme.semantic.colors.background","palette.colors.gray.50","Page/widget background"),pt("sem-container","Container","theme.semantic.colors.container","palette.colors.gray.100","Container/card background"),pt("sem-text","Text","theme.semantic.colors.text","palette.colors.gray.900","Primary text color"),pt("sem-text-muted","Text Muted","theme.semantic.colors.textMuted","palette.colors.gray.500","Secondary/muted text"),pt("sem-text-inverse","Text Inverse","theme.semantic.colors.textInverse","palette.colors.gray.50","Text on dark backgrounds"),pt("sem-border","Border","theme.semantic.colors.border","palette.colors.gray.200","Default border color"),pt("sem-divider","Divider","theme.semantic.colors.divider","palette.colors.gray.200","Divider/separator color"),pt("sem-interactive-default","Interactive Default","theme.semantic.colors.interactive.default","palette.colors.primary.500"),pt("sem-interactive-hover","Interactive Hover","theme.semantic.colors.interactive.hover","palette.colors.primary.600"),pt("sem-interactive-focus","Interactive Focus","theme.semantic.colors.interactive.focus","palette.colors.primary.700"),pt("sem-interactive-active","Interactive Active","theme.semantic.colors.interactive.active","palette.colors.primary.800"),pt("sem-interactive-disabled","Interactive Disabled","theme.semantic.colors.interactive.disabled","palette.colors.gray.300"),pt("sem-feedback-success","Success","theme.semantic.colors.feedback.success","palette.colors.success.500"),pt("sem-feedback-warning","Warning","theme.semantic.colors.feedback.warning","palette.colors.warning.500"),pt("sem-feedback-error","Error","theme.semantic.colors.feedback.error","palette.colors.error.500"),pt("sem-feedback-info","Info","theme.semantic.colors.feedback.info","palette.colors.primary.500")]},vt=q(),wt=yt,xt=[q(),yt],kt={id:"comp-panel",title:"Panel",collapsed:!1,fields:[ut("text","panel-width","Width","theme.components.panel.width",i),ut("text","panel-max-width","Max Width","theme.components.panel.maxWidth",n),ut("text","panel-height","Height","theme.components.panel.height","600px"),ut("text","panel-max-height","Max Height","theme.components.panel.maxHeight","calc(100vh - 80px)"),{id:"panel-border-radius",label:"Border Radius",type:"select",path:"theme.components.panel.borderRadius",defaultValue:"palette.radius.xl",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"panel-shadow",label:"Shadow",type:"select",path:"theme.components.panel.shadow",defaultValue:"palette.shadows.xl",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},ut("text","panel-inset","Detached Inset","theme.components.panel.inset",Fe,"Gap around the card when launcher.detachedPanel is on")]},St={id:"comp-launcher",title:"Launcher",collapsed:!0,fields:[mt("launcher-size","Size","theme.components.launcher.size","60px",{min:32,max:80,step:2}),mt("launcher-icon-size","Icon Size","theme.components.launcher.iconSize","28px",{min:16,max:48,step:2}),{id:"launcher-icon-stroke-width",label:"Icon Stroke Width",description:"Unitless line weight for the agent glyph and the call-to-action arrow",type:"slider",path:"theme.components.launcher.iconStrokeWidth",defaultValue:"1.5",slider:{min:1,max:2.5,step:.25,unit:"none"},parseValue:ft},{id:"launcher-border-radius",label:"Border Radius",type:"select",path:"theme.components.launcher.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"},{value:"palette.radius.full",label:"Full (Circle)"}]},{id:"launcher-shadow",label:"Shadow",type:"select",path:"theme.components.launcher.shadow",defaultValue:"palette.shadows.lg",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]}]},Ct={id:"comp-header-controls",title:"Header Controls",description:"One box, glyph, and stroke shared by every header icon button: close, clear chat, trailing actions, and Messages, plus the strip height.",collapsed:!0,fields:[{id:"header-min-height",label:"Header Min Height",description:"CSS length, e.g. 65px. Blank stays at the natural height",type:"text",path:"theme.components.header.minHeight",defaultValue:"",parseValue:ht},{id:"header-control-size",label:"Control Size",description:"The button box. Coarse pointers still floor the hit area at 40px",type:"slider",path:"theme.components.header.controlSize",defaultValue:"32px",slider:{min:24,max:64,step:2},parseValue:gt},{id:"header-control-icon-size",label:"Icon Size",description:"The glyph inside the button",type:"slider",path:"theme.components.header.controlIconSize",defaultValue:"16px",slider:{min:12,max:40,step:1},parseValue:gt},{id:"header-control-stroke-width",label:"Icon Stroke Width",description:"Unitless line weight. The close X renders at 0.7 of it so its sparser glyph matches",type:"slider",path:"theme.components.header.controlStrokeWidth",defaultValue:"1.5",slider:{min:1,max:2.5,step:.25,unit:"none"},parseValue:ft}]},Tt={id:"comp-history-rail-header",title:"Messages Rail Header",description:"The Messages rail top strip. Match its height to the header so both read as one band.",collapsed:!0,fields:[{id:"rail-header-min-height",label:"Min Height",description:"CSS length. Blank follows the header min height",type:"text",path:"theme.components.history.railHeader.minHeight",defaultValue:"",parseValue:ht},{id:"rail-header-border",label:"Bottom Border",description:"Full border-bottom shorthand, e.g. 1px solid #333",type:"text",path:"theme.components.history.railHeader.border",defaultValue:"",parseValue:ht}]},At={id:"comp-history-rail-header-colors",title:"Messages Rail Header Colors",collapsed:!0,fields:[pt("rail-header-bg","Background","theme.components.history.railHeader.background","semantic.colors.container")]},Bt={id:"comp-history-overlay",title:"Messages Floating Rail",description:"The Messages rail floating over the conversation, when a collapsed rail opens on hover.",collapsed:!0,fields:[{id:"history-overlay-margin",label:"Margin",description:"Gap from the trigger, the docked edge and the bottom",type:"text",path:"theme.components.history.overlay.margin",defaultValue:"",parseValue:ht},{id:"history-overlay-radius",label:"Corner Radius",description:"CSS length on all four corners. Blank keeps 16px",type:"text",path:"theme.components.history.overlay.borderRadius",defaultValue:"",parseValue:ht},{id:"history-overlay-shadow",label:"Shadow",description:"Full box-shadow shorthand. Blank keeps the built-in elevation",type:"text",path:"theme.components.history.overlay.shadow",defaultValue:"",parseValue:ht}]},It={id:"comp-history-overlay-colors",title:"Messages Floating Rail Colors",collapsed:!0,fields:[pt("history-overlay-bg","Background","theme.components.history.overlay.background","semantic.colors.container")]},Mt={id:"comp-history-motion",title:"Messages Motion",description:"Enter and exit animation of the Messages body. The bar is persistent chrome and never animates; reduced-motion preferences always win.",collapsed:!0,fields:[{id:"history-motion-enter-ms",label:"Enter Duration",description:"Milliseconds, e.g. 180. 0 disables the entrance. Blank keeps 180",type:"text",path:"theme.components.history.motion.enterDurationMs",defaultValue:"",parseValue:ht},{id:"history-motion-enter-easing",label:"Enter Easing",description:"CSS easing, e.g. ease-out or cubic-bezier(0, 0, 0.2, 1)",type:"text",path:"theme.components.history.motion.enterEasing",defaultValue:"",parseValue:ht},{id:"history-motion-exit-ms",label:"Exit Duration",description:"Milliseconds, e.g. 160. 0 disables the exit. Blank keeps 160",type:"text",path:"theme.components.history.motion.exitDurationMs",defaultValue:"",parseValue:ht},{id:"history-motion-exit-easing",label:"Exit Easing",description:"CSS easing, e.g. ease-in or cubic-bezier(0.4, 0, 1, 1)",type:"text",path:"theme.components.history.motion.exitEasing",defaultValue:"",parseValue:ht}]},Rt={id:"comp-tooltip",title:"Tooltip",description:"The hover and focus tooltip on icon controls, including its shortcut hint chip.",collapsed:!0,fields:[{id:"tooltip-radius",label:"Corner Radius",type:"select",path:"theme.components.tooltip.borderRadius",defaultValue:"palette.radius.sm",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"tooltip-font-size",label:"Font Size",description:"CSS length. Blank stays at 12px",type:"text",path:"theme.components.tooltip.fontSize",defaultValue:"",parseValue:ht},ut("toggle","tooltip-arrow","Show Arrow","theme.components.tooltip.arrow",!0,"The caret pointing at the control")]},Vt={id:"comp-tooltip-colors",title:"Tooltip Colors",collapsed:!0,fields:[pt("tooltip-bg","Background","theme.components.tooltip.background","palette.colors.gray.900"),pt("tooltip-fg","Label","theme.components.tooltip.foreground","palette.colors.primary.50"),pt("tooltip-hint-fg","Shortcut Hint","theme.components.tooltip.hintForeground","palette.colors.gray.400")]},Et={id:"comp-composer-spacing",title:"Composer Spacing",collapsed:!0,fields:[ut("text","composer-padding","Padding","theme.components.composer.padding","0.75rem 1rem"),ut("text","composer-expanded-padding","Expanded Padding","theme.components.composer.expandedPadding","12px 16px"),ut("text","composer-expanded-radius","Expanded Corners","theme.components.composer.expandedBorderRadius","24px"),ut("text","composer-gap","Row Gap","theme.components.composer.gap","0.5rem","Space between the textarea row and the actions row"),ut("text","composer-control-gap","Control Gap","theme.components.composer.controlGap","0.5rem"),ut("text","composer-editor-min-height","Editor Minimum Height","theme.components.composer.editorMinHeight","24px"),ut("text","composer-editor-padding","Editor Padding","theme.components.composer.editorPadding","2px"),ut("text","composer-suggestions-gap","Below Composer Suggestions Gap","theme.components.composer.suggestionsGap","0.5rem"),ut("text","composer-segmented-gap","Segment Gap","theme.components.composer.segmented.gap","2px"),ut("text","composer-segmented-font-size","Segment Font Size","theme.components.composer.segmented.fontSize","0.875rem"),ut("text","composer-segmented-line-height","Segment Line Height","theme.components.composer.segmented.lineHeight","1.25rem"),ut("text","composer-segmented-height","Segment Minimum Height","theme.components.composer.segmented.minHeight","0px"),ut("text","composer-segmented-font-weight","Segment Font Weight","theme.components.composer.segmented.fontWeight","400"),ut("text","composer-mode-font-size","Mode Font Size","theme.components.composer.mode.fontSize","0.875rem"),ut("text","composer-mode-height","Mode Height","theme.components.composer.mode.height","40px"),ut("text","composer-mode-padding","Mode Horizontal Padding","theme.components.composer.mode.paddingInline","0.625rem"),ut("text","composer-mode-gap","Mode Label Gap","theme.components.composer.mode.gap","0.25rem"),ut("text","composer-model-font-size","Model Font Size","theme.components.composer.modelPicker.fontSize","0.8125rem"),ut("text","composer-model-font-weight","Model Font Weight","theme.components.composer.modelPicker.fontWeight","400"),ut("text","composer-model-height","Model Height","theme.components.composer.modelPicker.height","40px"),ut("text","composer-model-width","Model Minimum Width","theme.components.composer.modelPicker.minWidth","0px"),ut("text","composer-model-padding","Model Horizontal Padding","theme.components.composer.modelPicker.paddingInline","0.625rem 1.75rem"),ut("text","composer-font-size","Font Size","theme.components.composer.fontSize","0.875rem"),ut("text","composer-line-height","Line Height","theme.components.composer.lineHeight","1.25rem"),mt("composer-control-size","Control Size","theme.components.composer.controlSize","40px",{min:24,max:64,step:2},"Edge of every icon control in the action row"),mt("composer-control-icon-size","Control Icon Size","theme.components.composer.controlIconSize","24px",{min:12,max:40,step:1},"Glyph inside those controls")]},Pt={id:"comp-header-colors",title:"Header Colors",collapsed:!0,fields:[pt("header-bg","Background","theme.components.header.background","semantic.colors.surface"),pt("header-fg","Foreground","theme.components.header.foreground","","Anchors the header text. Background and foreground together derive every color left blank below"),pt("header-icon-bg","Icon background","theme.components.header.iconBackground","semantic.colors.primary"),pt("header-icon-fg","Icon color","theme.components.header.iconForeground","semantic.colors.textInverse"),pt("header-title-fg","Title color","theme.components.header.titleForeground","","Blank follows the header foreground"),pt("header-subtitle-fg","Subtitle color","theme.components.header.subtitleForeground","","Blank follows a 72% mix of the foreground over the background"),pt("header-action-icons-fg","Clear / close icons","theme.components.header.actionIconForeground","","Blank follows the same 72% foreground mix as the subtitle"),pt("header-border","Border","theme.components.header.border","","Border color or token reference; blank follows a 14% mix of foreground over background")]},$t={id:"comp-message-colors",title:"Message Colors",collapsed:!0,fields:[pt("msg-user-bg","User Bubble Background","theme.components.message.user.background","semantic.colors.primary"),pt("msg-user-text","User Bubble Text","theme.components.message.user.text","semantic.colors.textInverse"),pt("msg-assistant-bg","Assistant Bubble Background","theme.components.message.assistant.background","semantic.colors.container"),pt("msg-assistant-text","Assistant Bubble Text","theme.components.message.assistant.text","semantic.colors.text")]},Ot={id:"comp-input-colors",title:"Input Colors",collapsed:!0,fields:[pt("input-bg","Background","theme.components.input.background","semantic.colors.surface"),pt("input-placeholder","Placeholder Color","theme.components.input.placeholder","semantic.colors.textMuted"),pt("input-focus-border","Focus Border","theme.components.input.focus.border","semantic.colors.interactive.focus"),pt("input-focus-ring","Focus Ring","theme.components.input.focus.ring","semantic.colors.interactive.focus")]},Ft={id:"comp-button-colors",title:"Button Colors",collapsed:!0,fields:[pt("btn-primary-bg","Primary Background","theme.components.button.primary.background","semantic.colors.primary"),pt("btn-primary-fg","Primary Foreground","theme.components.button.primary.foreground","semantic.colors.textInverse"),pt("btn-secondary-bg","Secondary Background","theme.components.button.secondary.background","semantic.colors.surface"),pt("btn-secondary-fg","Secondary Foreground","theme.components.button.secondary.foreground","semantic.colors.text"),ut("color","btn-ghost-bg","Ghost Background","theme.components.button.ghost.background","transparent"),pt("btn-ghost-fg","Ghost Foreground","theme.components.button.ghost.foreground","semantic.colors.text")]},Lt={id:"scroll-to-bottom-style",title:"Scroll To Bottom",description:"Style the floating jump-to-latest affordance.",collapsed:!0,fields:[pt("scroll-bottom-bg","Background","theme.components.scrollToBottom.background","components.button.primary.background"),pt("scroll-bottom-fg","Foreground","theme.components.scrollToBottom.foreground","components.button.primary.foreground"),pt("scroll-bottom-border","Border","theme.components.scrollToBottom.border","semantic.colors.primary"),ut("text","scroll-bottom-size","Size","theme.components.scrollToBottom.size","40px"),{id:"scroll-bottom-radius",label:"Border Radius",type:"select",path:"theme.components.scrollToBottom.borderRadius",defaultValue:"palette.radius.full",options:[{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"},{value:"palette.radius.full",label:"Full"}]},{id:"scroll-bottom-shadow",label:"Shadow",type:"select",path:"theme.components.scrollToBottom.shadow",defaultValue:"palette.shadows.sm",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}]},ut("text","scroll-bottom-padding","Padding","theme.components.scrollToBottom.padding","0.5rem 0.875rem"),ut("text","scroll-bottom-gap","Gap","theme.components.scrollToBottom.gap","0.5rem"),ut("text","scroll-bottom-font-size","Font Size","theme.components.scrollToBottom.fontSize","0.875rem"),ut("text","scroll-bottom-icon-size","Icon Size","theme.components.scrollToBottom.iconSize","14px")]},Wt={id:"comp-suggestions",title:"Suggestions",description:"Style starter cards, follow-up chips, and list rows.",collapsed:!0,fields:[pt("suggestion-chip-bg","Chip Background","theme.components.suggestion.chip.background","semantic.colors.surface"),pt("suggestion-chip-fg","Chip Text","theme.components.suggestion.chip.foreground","semantic.colors.text"),pt("suggestion-chip-border","Chip Border","theme.components.suggestion.chip.border","semantic.colors.border"),pt("suggestion-chip-hover","Chip Hover","theme.components.suggestion.chip.hoverBackground","palette.colors.gray.100"),pt("suggestion-chip-focus","Chip Focus Ring","theme.components.suggestion.chip.focusRing","semantic.colors.interactive.focus"),pt("suggestion-card-bg","Card Background","theme.components.suggestion.card.background","semantic.colors.surface"),pt("suggestion-card-fg","Card Text","theme.components.suggestion.card.foreground","semantic.colors.text"),pt("suggestion-card-border","Card Border","theme.components.suggestion.card.border","semantic.colors.border"),pt("suggestion-card-hover","Card Hover","theme.components.suggestion.card.hoverBackground","palette.colors.gray.100"),{id:"suggestion-card-shadow",label:"Card Shadow",type:"select",path:"theme.components.suggestion.card.shadow",defaultValue:"palette.shadows.sm",options:[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"}]},ut("color","suggestion-list-bg","List Background","theme.components.suggestion.list.background","transparent"),pt("suggestion-list-border","List Border","theme.components.suggestion.list.border","semantic.colors.border"),ut("text","suggestion-chip-item-gap","Chip Spacing","theme.components.suggestion.chip.itemGap","8px","Space between chips"),ut("text","suggestion-card-item-gap","Card Spacing","theme.components.suggestion.card.itemGap","8px","Space between cards"),ut("text","suggestion-list-item-gap","List Spacing","theme.components.suggestion.list.itemGap","8px","Space between list rows")]},zt=[{value:"palette.shadows.none",label:"None"},{value:"palette.shadows.sm",label:"Small"},{value:"palette.shadows.md",label:"Medium"},{value:"palette.shadows.lg",label:"Large"},{value:"palette.shadows.xl",label:"Extra Large"}],Ht="0 5px 15px rgba(15, 23, 42, 0.08)",Dt=[{value:Ht,label:"Default"},...zt],Nt={id:"comp-shadows",title:"Component Shadows",description:"Box-shadow for chat bubbles and surfaces.",collapsed:!0,fields:[{id:"shadow-msg-user",label:"User Message",type:"select",path:"theme.components.message.user.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-msg-assistant",label:"Assistant Message",type:"select",path:"theme.components.message.assistant.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-tool-bubble",label:"Tool Call Bubble",type:"select",path:"theme.components.toolBubble.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-reasoning-bubble",label:"Reasoning Bubble",type:"select",path:"theme.components.reasoningBubble.shadow",defaultValue:"palette.shadows.sm",options:zt},{id:"shadow-approval",label:"Approval Bubble",type:"select",path:"theme.components.approval.requested.shadow",defaultValue:Ht,options:Dt},{id:"shadow-intro-card",label:"Intro Card",type:"select",path:"theme.components.introCard.shadow",defaultValue:"palette.shadows.none",options:Dt},{id:"shadow-composer",label:"Composer",type:"select",path:"theme.components.composer.shadow",defaultValue:"palette.shadows.none",options:zt}]},_t=[{value:"",label:"Default"},{value:"400",label:"Normal (400)"},{value:"500",label:"Medium (500)"},{value:"600",label:"Semibold (600)"},{value:"700",label:"Bold (700)"}],jt={id:"comp-text-styles",title:"Header & Welcome Text",description:"Typography for the header title and the welcome greeting. Leave blank to keep the built-in defaults.",collapsed:!0,fields:[{id:"header-title-font-family",label:"Header Title Font",description:"CSS font-family, e.g. Georgia, serif",type:"text",path:"theme.components.header.title.fontFamily",defaultValue:"",parseValue:ht},{id:"header-title-font-size",label:"Header Title Size",description:"CSS length, e.g. 1.125rem",type:"text",path:"theme.components.header.title.fontSize",defaultValue:"",parseValue:ht},{id:"header-title-font-weight",label:"Header Title Weight",type:"select",path:"theme.components.header.title.fontWeight",defaultValue:"",options:_t,parseValue:ht},{id:"welcome-title-font-family",label:"Welcome Title Font",description:"CSS font-family, e.g. Georgia, serif",type:"text",path:"theme.components.introCard.title.fontFamily",defaultValue:"",parseValue:ht},{id:"welcome-title-font-size",label:"Welcome Title Size",description:"CSS length, e.g. 1.5rem",type:"text",path:"theme.components.introCard.title.fontSize",defaultValue:"",parseValue:ht},{id:"welcome-title-font-weight",label:"Welcome Title Weight",type:"select",path:"theme.components.introCard.title.fontWeight",defaultValue:"",options:_t,parseValue:ht}]},Ut=(e,t,a=!1)=>t.split(" ").map(t=>({id:`component-${e.replace(/\./g,"-")}-${t.replace(/\./g,"-")}`,label:t.replace(/\./g," / ").replace(/([A-Z])/g," $1").replace(/^./,e=>e.toUpperCase()),path:`theme.components.${e}.${t}`,type:a?"token-ref":"text",...a?{tokenRef:{tokenType:"color"}}:{},defaultValue:"",parseValue:ht,unsettable:!0,description:a?"Color or token reference (border fields here are colors). Unset restores the component fallback.":"CSS value; use lengths for sizes/padding, unitless stroke width, and ms/s for duration. Unset restores the component fallback."})),qt=[["header.close","Close Control"],["header.clear","Clear Chat Control"],["composer.send","Submit Control"],["voice.control","Microphone Control"]],Gt=qt.map(([e,t])=>({id:`comp-${e.replace(".","-")}-shape`,title:t,collapsed:!0,description:"composer.send"===e?"Submit only. Size applies to icon mode; theme padding also supports text mode.":"voice.control"===e?"Idle mic only. Set both box and glyph size to migrate legacy voiceRecognition.iconSize.":"This header control only; Messages and trailing actions keep their own styling.",fields:Ut(e,"size iconSize iconStrokeWidth borderWidth borderRadius padding")})),Yt=[...qt,["button.stop","Stop Control"]].map(([e,t])=>({id:`comp-${e.replace(".","-")}-colors`,title:`${t} Colors`,collapsed:!0,fields:Ut(e,"button.stop"===e?"background foreground":"background foreground borderColor",!0)})),Jt=[...Gt,{id:"comp-composer-menu-shape",title:"More Menu Shape",collapsed:!0,fields:Ut("composer.overflowMenu","borderRadius padding rowGap rowPadding rowBorderRadius fontSize lineHeight iconSize iconGap descriptionFontSize dividerSpacing minWidth maxHeight shadow")},{id:"comp-attachment-shape",title:"Attachment Preview Shape",collapsed:!0,fields:Ut("attachment.composer","gap image.width image.height image.borderRadius image.chip.width image.chip.minHeight image.chip.borderRadius image.chip.padding image.chip.gap image.chip.fontSize file.width file.minHeight file.borderRadius file.padding file.gap file.iconSize file.fontSize remove.size remove.iconSize remove.borderRadius remove.inset remove.borderWidth image.remove.size image.remove.iconSize image.remove.borderRadius image.remove.inset image.remove.borderWidth file.remove.size file.remove.iconSize file.remove.borderRadius file.remove.inset file.remove.borderWidth")},{id:"comp-tool-chrome",title:"Tool Card & Row Chrome",collapsed:!0,fields:Ut("toolBubble","borderWidth borderRadius header.padding content.padding loading.duration")},{id:"comp-question-chrome",title:"Question Sheet Chrome",collapsed:!0,fields:Ut("askUserQuestion","sheet.shadow pill.borderRadius")},{id:"comp-artifact-chrome",title:"Artifact Chrome",collapsed:!0,description:"pane.border and pane.borderLeft accept full CSS border shorthands; padding/radius/fadeSize are CSS lengths and shadows are CSS box-shadow values.",fields:Ut("artifact","pane.padding pane.borderRadius pane.shadow pane.border pane.borderLeft chat.shadow split.outerRadius tab.fadeSize")},{id:"comp-suggestion-chip-type",title:"Suggestion Chip Type & Padding",collapsed:!0,fields:Ut("suggestion.chip","fontWeight padding")},kt,St,Ct,Tt,Bt,Mt,Rt,{id:"comp-message-shape",title:"Message Shape",collapsed:!0,fields:[{id:"msg-user-radius",label:"User Bubble Radius",type:"select",path:"theme.components.message.user.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]},{id:"msg-assistant-radius",label:"Assistant Bubble Radius",type:"select",path:"theme.components.message.assistant.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]},{id:"comp-input-shape",title:"Input Shape",collapsed:!0,fields:[{id:"input-radius",label:"Border Radius",type:"select",path:"theme.components.input.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.none",label:"None"},{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.xl",label:"Extra Large"}]}]},Et,{id:"comp-button-shape",title:"Button Shape",collapsed:!0,fields:[{id:"btn-primary-radius",label:"Primary Radius",type:"select",path:"theme.components.button.primary.borderRadius",defaultValue:"palette.radius.lg",options:[{value:"palette.radius.sm",label:"Small"},{value:"palette.radius.md",label:"Medium"},{value:"palette.radius.lg",label:"Large"},{value:"palette.radius.full",label:"Full"}]}]},jt,Nt],Zt=[...Yt,{id:"comp-composer-menu-colors",title:"More Menu Colors",collapsed:!0,fields:Ut("composer.overflowMenu","background foreground borderColor hoverBackground focusBackground descriptionColor dividerColor",!0)},{id:"comp-attachment-colors",title:"Attachment Preview Colors",collapsed:!0,fields:Ut("attachment.composer","image.background image.borderColor image.chip.background image.chip.borderColor image.chip.foreground file.background file.borderColor file.foreground file.mutedForeground file.iconBackground file.iconForeground remove.background remove.foreground remove.hoverBackground remove.hoverForeground remove.borderColor image.remove.background image.remove.foreground image.remove.hoverBackground image.remove.hoverForeground image.remove.borderColor file.remove.background file.remove.foreground file.remove.hoverBackground file.remove.hoverForeground file.remove.borderColor",!0)},{id:"comp-voice-states",title:"Voice State Colors",collapsed:!0,description:"Explicit values activate state colors. Unset preserves historical provider/browser defaults.",fields:Ut("voice","recording.indicator recording.background recording.border processing.icon processing.background processing.border speaking.icon speaking.background speaking.border",!0)},{id:"comp-tool-colors",title:"Tool Card & Row Colors",collapsed:!0,fields:Ut("toolBubble","background borderColor header.background header.foreground content.background content.foreground codeBlock.background codeBlock.foreground codeBlock.borderColor toggleForeground labelForeground loading.primary loading.secondary",!0)},{id:"comp-approval-colors",title:"Approval Colors",collapsed:!0,fields:Ut("approval","requested.background requested.border requested.text requested.titleColor requested.descriptionColor requested.reasonColor requested.parameters.background requested.parameters.foreground approve.background approve.foreground deny.background deny.foreground",!0)},{id:"comp-question-colors",title:"Question Sheet Colors",collapsed:!0,fields:Ut("askUserQuestion","sheet.background sheet.border pill.background pill.foreground pill.selectedBackground pill.selectedForeground customInput.background",!0)},{id:"comp-artifact-colors",title:"Artifact Chrome Colors",collapsed:!0,fields:Ut("artifact","pane.background toolbar.iconColor toolbar.toggleActiveBackground toolbar.toggleActiveBorderColor toolbar.toggleActiveColor",!0)},Pt,At,It,Vt,$t,Ot,Ft,Lt,Wt],Kt=[...Jt,...Zt],Xt=1048576,Qt={images:["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp"],"images-pdf":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf"],"images-text-pdf":["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf","text/plain","text/markdown","text/csv","application/json"],all:["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/bmp","application/pdf","text/plain","text/markdown","text/csv","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/json"]},ea={id:"copy",title:"Content & Copy",collapsed:!1,fields:[{id:"copy-show-welcome-card",label:"Welcome Surface",description:"Choose a welcome layout, or hide it.",type:"select",path:"welcome.variant",defaultValue:"card",options:[{value:"card",label:"Card"},{value:"hero",label:"Hero"},{value:"none",label:"Hidden"}]},ut("text","copy-welcome-title","Welcome Title","welcome.title","Hello 👋"),ut("text","copy-welcome-subtitle","Welcome Subtitle","welcome.subtitle","I can answer questions and help you get things done here."),ut("text","copy-placeholder","Input Placeholder","copy.inputPlaceholder",c),ut("text","copy-send-label","Send Button Label","copy.sendButtonLabel","Send")]},ta={id:"suggestions",title:"Suggestions",description:"Choose the suggested prompts, where they appear, and what happens when selected. Remove all prompts to hide them.",collapsed:!0,fields:[{id:"suggestions-list",label:"Starter Prompts",description:"Add, edit, and remove starter prompts directly.",type:"chip-list",path:"suggestions.starters.items",defaultValue:["Show me what you can help with","Walk me through getting started","Answer a question about this page"]},{id:"suggestions-starter-variant",label:"Starter Style",type:"select",path:"suggestions.starters.variant",defaultValue:"card",options:[{value:"card",label:"Cards"},{value:"chip",label:"Chips"},{value:"list",label:"List"}]},{id:"suggestions-starter-placement",label:"Starter Placement",type:"select",path:"suggestions.starters.placement",defaultValue:"auto",options:[{value:"auto",label:"Automatic"},{value:"welcome",label:"Welcome Surface"},{value:"composer",label:"Above Composer"},{value:"below-composer",label:"Below Composer"}]},{id:"suggestions-starter-behavior",label:"Starter Click",type:"select",path:"suggestions.starters.behavior",defaultValue:"send",options:[{value:"send",label:"Send Immediately"},{value:"fill",label:"Fill Composer"}]},{id:"suggestions-starter-overflow",label:"Starter Overflow",type:"select",path:"suggestions.starters.overflow",defaultValue:"wrap",options:[{value:"wrap",label:"Wrap Rows"},{value:"scroll",label:"Horizontal Scroll"}]},{id:"suggestions-followup-variant",label:"Follow-up Style",type:"select",path:"suggestions.followUps.variant",defaultValue:"chip",options:[{value:"chip",label:"Chips"},{value:"card",label:"Cards"},{value:"list",label:"List"}]},{id:"suggestions-followup-placement",label:"Follow-up Placement",type:"select",path:"suggestions.followUps.placement",defaultValue:"auto",options:[{value:"auto",label:"Automatic"},{value:"after-message",label:"After Messages"},{value:"composer",label:"Above Composer"}]},{id:"suggestions-followup-behavior",label:"Follow-up Click",type:"select",path:"suggestions.followUps.behavior",defaultValue:"send",options:[{value:"send",label:"Send Immediately"},{value:"fill",label:"Fill Composer"}]},{id:"suggestions-followup-overflow",label:"Follow-up Overflow",type:"select",path:"suggestions.followUps.overflow",defaultValue:"scroll",options:[{value:"scroll",label:"Horizontal Scroll"},{value:"wrap",label:"Wrap Rows"}]}]},aa={id:"general-layout",title:"Layout Basics",collapsed:!0,fields:[ut("toggle","layout-show-header","Show Header","layout.showHeader",!0),ut("toggle","layout-show-footer","Show Footer","layout.showFooter",!0),ut("text","layout-content-max-width","Content Max Width","layout.contentMaxWidth","","Max width for messages + composer")]},oa={id:"header-layout",title:"Header",collapsed:!0,fields:[{id:"layout-header",label:"Header Layout",type:"select",path:"layout.header.layout",defaultValue:"default",options:[{value:"default",label:"Default"},{value:"minimal",label:"Minimal"}]},ut("toggle","layout-show-icon","Show Header Icon","layout.header.showIcon",!0),ut("toggle","layout-show-title","Show Header Title","layout.header.showTitle",!0),ut("toggle","layout-show-subtitle","Show Header Subtitle","layout.header.showSubtitle",!0),ut("toggle","layout-show-close","Show Close Button","layout.header.showCloseButton",!0),ut("toggle","layout-show-clear","Show Clear Chat","layout.header.showClearChat",!0)]},ra={id:"messages-layout",title:"Messages",collapsed:!0,fields:[{id:"layout-messages",label:"Message Style",description:"Minimal uses a user bubble with an open assistant response",type:"select",path:"layout.messages.layout",defaultValue:"bubble",options:[{value:"bubble",label:"Bubble — bubbles for both"},{value:"minimal",label:"Minimal — user bubble, open assistant"},{value:"flat",label:"Flat — open messages for both"}]},{id:"layout-message-user-width",label:"User Width",description:"Content hugs the message; Full fills the transcript track",type:"select",path:"layout.messages.user.width",defaultValue:"content",options:[{value:"content",label:"Content"},{value:"full",label:"Full"}]},{id:"layout-message-user-max-width",label:"User Max Width",description:"Optional CSS width such as 80%, 42rem, or 72ch; blank uses the width mode default",type:"text",path:"layout.messages.user.maxWidth",defaultValue:"",parseValue:ht},{id:"layout-message-assistant-width",label:"Assistant Width",description:"Content hugs the message; Full fills the transcript track",type:"select",path:"layout.messages.assistant.width",defaultValue:"content",options:[{value:"content",label:"Content"},{value:"full",label:"Full"}]},{id:"layout-message-assistant-max-width",label:"Assistant Max Width",description:"Optional CSS width such as 80%, 42rem, or 72ch; blank uses the width mode default",type:"text",path:"layout.messages.assistant.maxWidth",defaultValue:"",parseValue:ht},ut("toggle","layout-group","Group Consecutive","layout.messages.groupConsecutive",!1),ut("toggle","layout-avatar-show","Show Avatars","layout.messages.avatar.show",!1),{id:"layout-avatar-pos",label:"Avatar Position",type:"select",path:"layout.messages.avatar.position",defaultValue:"left",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}]},ut("text","layout-avatar-user","User Avatar URL","layout.messages.avatar.userAvatar",""),ut("text","layout-avatar-assistant","Assistant Avatar URL","layout.messages.avatar.assistantAvatar",""),ut("toggle","layout-timestamp-show","Show Timestamps","layout.messages.timestamp.show",!1),{id:"layout-timestamp-pos",label:"Timestamp Position",type:"select",path:"layout.messages.timestamp.position",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"below",label:"Below"}]}]},la={id:"message-actions",title:"Message Actions",collapsed:!0,fields:[ut("toggle","msg-actions-enabled","Enabled","messageActions.enabled",!0),ut("toggle","msg-actions-copy","Show Copy","messageActions.showCopy",!0),ut("toggle","msg-actions-upvote","Show Upvote","messageActions.showUpvote",!0),ut("toggle","msg-actions-downvote","Show Downvote","messageActions.showDownvote",!0),ut("toggle","msg-actions-read-aloud","Show Read Aloud","messageActions.showReadAloud",!1),{id:"msg-actions-visibility",label:"Visibility",type:"select",path:"messageActions.visibility",defaultValue:"hover",options:[{value:"hover",label:"On Hover"},{value:"always",label:"Always Visible"}]},{id:"msg-actions-align",label:"Alignment",type:"select",path:"messageActions.align",defaultValue:"right",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}]},{id:"msg-actions-layout",label:"Layout",type:"select",path:"messageActions.layout",defaultValue:"pill-inside",options:[{value:"pill-inside",label:"Pill"},{value:"row-inside",label:"Row"}]}]},sa={id:"launcher-basics",title:"Launcher",collapsed:!0,fields:[ut("toggle","launch-enabled","Enabled","launcher.enabled",!0),{id:"launch-mount-mode",label:"Mount Mode",type:"select",path:"launcher.mountMode",defaultValue:"floating",options:[{value:"floating",label:"Floating"},{value:"docked",label:"Docked"}]},{id:"launch-position",label:"Position",type:"select",path:"launcher.position",defaultValue:"bottom-right",options:[{value:"bottom-right",label:"Bottom Right"},{value:"bottom-left",label:"Bottom Left"},{value:"top-right",label:"Top Right"},{value:"top-left",label:"Top Left"}]},ut("text","launch-width","Width","launcher.width",i),ut("toggle","launch-auto-expand","Auto Expand","launcher.autoExpand",!1),ut("text","launch-title","Title","launcher.title","Chat Assistant"),ut("text","launch-subtitle","Subtitle","launcher.subtitle","Here to help you get answers fast")]},ia={id:"launcher-advanced",title:"Launcher Advanced",collapsed:!0,fields:[{id:"launch-dock-side",label:"Dock Side",type:"select",path:"launcher.dock.side",defaultValue:"right",options:[{value:"right",label:"Right"},{value:"left",label:"Left"}]},ut("text","launch-dock-width","Dock Width","launcher.dock.width","420px"),ut("toggle","launch-dock-animate","Dock Animate","launcher.dock.animate",!0),{id:"launch-dock-reveal",label:"Dock Reveal",type:"select",path:"launcher.dock.reveal",defaultValue:"resize",options:[{value:"resize",label:"Resize"},{value:"overlay",label:"Overlay"},{value:"push",label:"Push"},{value:"emerge",label:"Emerge"}]},ut("toggle","launch-text-hidden","Hide Text","launcher.textHidden",!1),ut("text","launch-icon-text","Agent Icon Text","launcher.agentIconText","💬"),ut("text","launch-icon-name","Agent Icon Name (Lucide)","launcher.agentIconName","bot"),ut("toggle","launch-icon-hidden","Hide Agent Icon","launcher.agentIconHidden",!1),mt("launch-icon-size","Agent Icon Size","launcher.agentIconSize","40px",{min:16,max:72,step:2}),ut("text","launch-icon-url","Icon Image URL","launcher.iconUrl","","Custom image URL (overrides emoji/lucide)"),ut("text","launch-header-icon-name","Header Icon Name (Lucide)","launcher.headerIconName","bot"),mt("launch-header-icon-size","Header Icon Size","launcher.headerIconSize","48px",{min:24,max:80,step:2}),ut("toggle","launch-header-icon-hidden","Hide Header Icon","launcher.headerIconHidden",!1),ut("toggle","launch-full-height","Full Height","launcher.fullHeight",!1),ut("toggle","launch-sidebar","Sidebar Mode","launcher.sidebarMode",!1),ut("text","launch-sidebar-width","Sidebar Width","launcher.sidebarWidth","420px"),ut("toggle","launch-mobile-fullscreen","Mobile Fullscreen","launcher.mobileFullscreen",!0,"Fullscreen on mobile devices"),{id:"launch-mobile-breakpoint",label:"Mobile Breakpoint (px)",type:"text",path:"launcher.mobileBreakpoint",defaultValue:640,formatValue:e=>String(e??640),parseValue:e=>Number(e)},{id:"launch-height-offset",label:"Height Offset (px)",type:"text",path:"launcher.heightOffset",defaultValue:0,formatValue:e=>String(e??0),parseValue:e=>Number(e)},ut("text","launch-collapsed-max-width","Collapsed Max Width","launcher.collapsedMaxWidth","","Max width of launcher pill when closed"),ut("text","launch-cta-text","CTA Icon Text","launcher.callToActionIconText","↗"),ut("text","launch-cta-name","CTA Icon Name","launcher.callToActionIconName",""),ut("toggle","launch-cta-hidden","Hide CTA Icon","launcher.callToActionIconHidden",!1),mt("launch-cta-size","CTA Icon Size","launcher.callToActionIconSize","32px",{min:16,max:64,step:2}),mt("launch-cta-padding","CTA Icon Padding","launcher.callToActionIconPadding","5px",{min:0,max:24,step:1}),ut("color","launch-cta-bg","CTA Icon Background","launcher.callToActionIconBackgroundColor","")]},na={id:"send-button",title:"Send Button",collapsed:!0,fields:[ut("toggle","send-use-icon","Use Icon","sendButton.useIcon",!1),ut("text","send-icon-text","Icon Text","sendButton.iconText","↑"),ut("text","send-icon-name","Icon Name (Lucide)","sendButton.iconName",""),ut("toggle","send-show-tooltip","Show Tooltip","sendButton.showTooltip",!1),ut("text","send-tooltip-text","Tooltip Text","sendButton.tooltipText","Send message")]},ca={id:"close-button",title:"Close Button",collapsed:!0,fields:[{id:"close-placement",label:"Placement",type:"select",path:"launcher.closeButtonPlacement",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"top-right",label:"Top Right"}]},ut("text","close-icon-name","Icon Name","launcher.closeButtonIconName","x"),ut("text","close-icon-text","Icon Text","launcher.closeButtonIconText","×"),ut("toggle","close-show-tooltip","Show Tooltip","launcher.closeButtonShowTooltip",!0),ut("text","close-tooltip-text","Tooltip Text","launcher.closeButtonTooltipText","Close chat")]},da={id:"clear-chat",title:"Clear Chat Button",collapsed:!0,fields:[ut("toggle","clear-enabled","Enabled","launcher.clearChat.enabled",!0),{id:"clear-placement",label:"Placement",type:"select",path:"launcher.clearChat.placement",defaultValue:"inline",options:[{value:"inline",label:"Inline"},{value:"top-right",label:"Top Right"}]},ut("text","clear-icon-name","Icon Name","launcher.clearChat.iconName","refresh-cw"),ut("toggle","clear-show-tooltip","Show Tooltip","launcher.clearChat.showTooltip",!0),ut("text","clear-tooltip-text","Tooltip Text","launcher.clearChat.tooltipText","Clear chat")]},pa={id:"status-indicator",title:"Status Indicator",collapsed:!0,fields:[ut("toggle","status-visible","Visible","statusIndicator.visible",!0),{id:"status-align",label:"Alignment",type:"select",path:"statusIndicator.align",defaultValue:"right",options:[{value:"left",label:"Left"},{value:"center",label:"Center"},{value:"right",label:"Right"}]},ut("text","status-idle-text","Idle Text","statusIndicator.idleText","Online"),ut("text","status-connecting-text","Connecting Text","statusIndicator.connectingText","Connecting…"),ut("text","status-connected-text","Connected Text","statusIndicator.connectedText","Streaming…"),ut("text","status-error-text","Error Text","statusIndicator.errorText","Offline")]},ua={id:"features",title:"Features",collapsed:!0,fields:[ut("toggle","feat-voice","Voice Recognition","voiceRecognition.enabled",!1,"Enable voice input"),ut("toggle","feat-auto-focus","Auto Focus Input","autoFocusInput",!1,"Focus input after panel opens"),ut("toggle","feat-scroll-bottom-enabled","Scroll To Bottom","features.scrollToBottom.enabled",!0,"Show a button to return to the latest messages."),ut("text","feat-scroll-bottom-icon","Scroll To Bottom Icon","features.scrollToBottom.iconName","arrow-down"),ut("text","feat-scroll-bottom-label","Scroll To Bottom Label","features.scrollToBottom.label","","Leave empty for icon-only mode"),{id:"feat-scroll-bottom-streaming",label:"Streaming Below",type:"select",path:"features.scrollToBottom.streamingIndicator",defaultValue:"arrow",options:[{value:"arrow",label:"Arrow"},{value:"dots",label:"Dots"}]},{id:"feat-scroll-bottom-behavior",label:"Jump To Latest Motion",description:"How the conversation scrolls when you click the jump button.",type:"select",path:"features.scrollToBottom.scrollBehavior",defaultValue:"instant",options:[{value:"instant",label:"Instant"},{value:"smooth",label:"Smooth"}]},{id:"feat-scroll-bottom-duration",label:"Jump Duration (ms)",description:"How long smooth scrolling takes. Set to 0 for an instant jump.",type:"text",path:"features.scrollToBottom.scrollDurationMs",defaultValue:220,formatValue:e=>String(e??220),parseValue:e=>""===String(e).trim()?void 0:Number(e)},{id:"feat-scroll-bottom-transition",label:"Scroll Button Transition",type:"select",path:"features.scrollToBottom.transition",defaultValue:"none",options:[{value:"none",label:"None"},{value:"fade",label:"Fade"}]}]},ma={id:"stream-animation",title:"Stream Animation",description:"Choose how text appears as the assistant responds.",collapsed:!0,fields:[{id:"stream-anim-type",label:"Animation",description:"The visual effect used to reveal a reply.",type:"select",path:"features.streamAnimation.type",defaultValue:"none",options:[{value:"none",label:"None"},{value:"typewriter",label:"Typewriter"},{value:"word-fade",label:"Word fade"},{value:"letter-rise",label:"Letter rise"},{value:"glyph-cycle",label:"Glyph cycle"},{value:"wipe",label:"Wipe"},{value:"pop-bubble",label:"Pop bubble"}]},{id:"stream-anim-placeholder",label:"Before the Reply Starts",description:"What to show while waiting for a reply.",type:"select",path:"features.streamAnimation.placeholder",defaultValue:"none",options:[{value:"none",label:"Typing indicator (default)"},{value:"skeleton",label:"Skeleton shimmer"}]},{id:"stream-anim-buffer",label:"Reveal Text By",description:"Show text as it arrives, or wait for a complete word or line.",type:"select",path:"features.streamAnimation.buffer",defaultValue:"none",options:[{value:"none",label:"Each character"},{value:"word",label:"Complete words"},{value:"line",label:"Complete lines"}]},{id:"stream-anim-speed",label:"Text Animation Duration (ms)",description:"Animation length for each character or word.",type:"select",path:"features.streamAnimation.speed",defaultValue:120,options:[{value:"40",label:"40ms: snappy"},{value:"80",label:"80ms"},{value:"120",label:"120ms (default)"},{value:"200",label:"200ms"},{value:"320",label:"320ms"},{value:"480",label:"480ms: slow"}],formatValue:e=>String(e??120),parseValue:e=>Number(e)},{id:"stream-anim-duration",label:"Bubble Animation Duration (ms)",description:"How long effects on the whole reply bubble take.",type:"select",path:"features.streamAnimation.duration",defaultValue:1800,options:[{value:"600",label:"600ms"},{value:"1200",label:"1200ms"},{value:"1800",label:"1800ms (default)"},{value:"2400",label:"2400ms"},{value:"3600",label:"3600ms: slow"}],formatValue:e=>String(e??1800),parseValue:e=>Number(e)}]},ha={id:"composer-menu-config",title:"More Menu",collapsed:!0,fields:[ut("toggle","composer-menu-enabled","Show More Menu","composer.actionOverflow.enabled",!1),{id:"composer-menu-width",label:"Menu Width",type:"select",path:"composer.actionOverflow.menu.width",defaultValue:"content",options:[{value:"content",label:"Fit contents"},{value:"composer",label:"Match message box"},{value:"240px",label:"Compact (240px)"},{value:"320px",label:"Wide (320px)"}]},{id:"composer-menu-placement",label:"Open Menu",description:"Moves to fit the available space.",type:"select",path:"composer.actionOverflow.menu.placement",defaultValue:"above",options:[{value:"above",label:"Above message box"},{value:"below",label:"Below message box"}]},{id:"composer-menu-descriptions",label:"Menu Descriptions",type:"select",path:"composer.actionOverflow.menu.descriptionLayout",defaultValue:"stacked",options:[{value:"stacked",label:"Below labels"},{value:"inline",label:"Beside labels"}]},ut("text","composer-menu-icon","Menu Icon","composer.actionOverflow.menu.triggerIconName","plus"),{id:"composer-menu-open-icon",label:"Open Menu Icon",type:"select",path:"composer.actionOverflow.menu.openTriggerIconName",defaultValue:"plus",options:[{value:"plus",label:"Plus"},{value:"x",label:"Close"}]}]},ga={id:"attachments-config",title:"Attachments",collapsed:!0,fields:[ut("toggle","attach-enabled","Enabled","attachments.enabled",!1),{id:"attach-max-files",label:"Max Files",type:"select",path:"attachments.maxFiles",defaultValue:4,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"4",label:"4"},{value:"6",label:"6"},{value:"8",label:"8"},{value:"10",label:"10"}],formatValue:e=>String(e??4),parseValue:e=>Number(e)},{id:"attach-max-size",label:"Max File Size (MB)",type:"select",path:"attachments.maxFileSize",defaultValue:10*Xt,options:[{value:"1",label:"1 MB"},{value:"5",label:"5 MB"},{value:"10",label:"10 MB"},{value:"25",label:"25 MB"},{value:"50",label:"50 MB"}],formatValue:function(e){let t=Number(e);return Number.isFinite(t)?String(t>1024?Math.round(t/Xt):t):"10"},parseValue:function(e){return Number(e)*Xt}},{id:"attach-types",label:"Allowed File Types",type:"select",path:"attachments.allowedTypes",defaultValue:Qt.images,options:[{value:"images",label:"Images only"},{value:"images-pdf",label:"Images + PDF"},{value:"images-text-pdf",label:"Images + text + PDF"},{value:"all",label:"All supported types"}],formatValue:function(e){let t=Array.isArray(e)?e:Qt.images,a=[...new Set(t)].sort();for(let[e,t]of Object.entries(Qt)){let o=[...t].sort();if(a.length===o.length&&a.every((e,t)=>e===o[t]))return e}return a.some(e=>e.startsWith("application/vnd")||"application/msword"===e)?"all":a.some(e=>"text/plain"===e||"text/markdown"===e||"text/csv"===e)?"images-text-pdf":a.includes("application/pdf")?"images-pdf":"images"},parseValue:function(e){return Qt[String(e)]??Qt.images}},{id:"attach-file-layout",label:"File Card Layout",type:"select",path:"attachments.preview.file.layout",defaultValue:"tile",options:[{value:"tile",label:"Compact tile"},{value:"horizontal",label:"Horizontal card"},{value:"vertical",label:"Vertical card"}]},ut("toggle","attach-file-icon","Show File Icon","attachments.preview.file.icon",!0),{id:"attach-file-icon-name",label:"File Icon",type:"text",path:"attachments.preview.file.iconName",defaultValue:"",unsettable:!0},{id:"attach-file-icon-placement",label:"File Icon Position",type:"select",path:"attachments.preview.file.iconPlacement",defaultValue:"start",options:[{value:"start",label:"At the start"},{value:"center",label:"Centered"}]},{id:"attach-file-name",label:"File Name",type:"select",path:"attachments.preview.file.name",defaultValue:"hidden",options:[{value:"hidden",label:"Hidden"},{value:"full",label:"Full name"},{value:"basename",label:"Without extension"}]},{id:"attach-file-metadata",label:"File Details",description:"Line count is available for supported text files.",type:"select",path:"attachments.preview.file.metadata",defaultValue:"none",options:[{value:"none",label:"None"},{value:"size",label:"File size"},{value:"line-count",label:"Line count"}]},{id:"attach-file-badge",label:"File Badge",type:"select",path:"attachments.preview.file.badge",defaultValue:"type",options:[{value:"none",label:"None"},{value:"extension",label:"Extension"},{value:"type",label:"File type"}]},{id:"attach-image-layout",label:"Image Preview",type:"select",path:"attachments.preview.image.layout",defaultValue:"thumbnail",options:[{value:"thumbnail",label:"Thumbnail"},{value:"chip",label:"Compact chip"}]},{id:"attach-image-name",label:"Image File Name",type:"select",path:"attachments.preview.image.name",defaultValue:"hidden",options:[{value:"hidden",label:"Hidden"},{value:"full",label:"Full name"},{value:"basename",label:"Without extension"}]},{id:"attach-image-fit",label:"Image Fit",type:"select",path:"attachments.preview.image.fit",defaultValue:"cover",options:[{value:"cover",label:"Fill thumbnail"},{value:"contain",label:"Show whole image"}]},{id:"attach-file-remove-visibility",label:"File Remove Button",description:"Always visible on touch devices.",type:"select",path:"attachments.preview.file.remove.visibility",defaultValue:"always",options:[{value:"always",label:"Always visible"},{value:"hover",label:"On hover or focus"}]},{id:"attach-file-remove-placement",label:"File Remove Position",type:"select",path:"attachments.preview.file.remove.placement",defaultValue:"overlap",options:[{value:"overlap",label:"Overlapping corner"},{value:"inside",label:"Inside corner"},{value:"inline",label:"Beside content"}]},{id:"attach-image-remove-visibility",label:"Image Remove Button",description:"Always visible on touch devices.",type:"select",path:"attachments.preview.image.remove.visibility",defaultValue:"always",options:[{value:"always",label:"Always visible"},{value:"hover",label:"On hover or focus"}]},{id:"attach-image-remove-placement",label:"Image Remove Position",type:"select",path:"attachments.preview.image.remove.placement",defaultValue:"overlap",options:[{value:"overlap",label:"Overlapping corner"},{value:"inside",label:"Inside corner"},{value:"inline",label:"Beside content"}]},{id:"attach-composer-layout",label:"Input Below Attachments",description:"Uses separate rows when space is limited.",type:"select",path:"composer.attachmentLayout",defaultValue:"stacked",options:[{value:"stacked",label:"Text above controls"},{value:"single-row",label:"Text beside controls"}]}]},fa={id:"artifacts-config",title:"Artifacts",collapsed:!0,fields:[ut("toggle","art-enabled","Enabled","features.artifacts.enabled",!1,"Show artifact sidebar for documents and components"),{id:"art-appearance",label:"Pane Appearance",type:"select",path:"features.artifacts.layout.paneAppearance",defaultValue:"panel",options:[{value:"panel",label:"Panel (bordered)"},{value:"seamless",label:"Seamless"}]}]},ba={id:"artifacts-customization",title:"Artifact Customization",collapsed:!0,fields:[{id:"art-toolbar",label:"Toolbar Preset",type:"select",path:"features.artifacts.layout.toolbarPreset",defaultValue:"default",options:[{value:"default",label:"Default"},{value:"document",label:"Document"}]},ut("text","art-toolbar-title","Toolbar Title","features.artifacts.layout.toolbarTitle","Artifacts"),ut("text","art-close-label","Close Button Label","features.artifacts.layout.closeButtonLabel","Close"),ut("text","art-pane-width","Pane Width","features.artifacts.layout.paneWidth","40%","CSS width (e.g. 40%, 28rem)"),ut("text","art-pane-max-width","Pane Max Width","features.artifacts.layout.paneMaxWidth","28rem"),ut("text","art-split-gap","Split Gap","features.artifacts.layout.splitGap","0"),ut("toggle","art-resizable","Resizable","features.artifacts.layout.resizable",!1,"Allow dragging the pane divider"),ut("toggle","art-expand-panel","Expand Panel When Open","features.artifacts.layout.expandLauncherPanelWhenOpen",!0,"Widen the launcher panel to fit artifacts")]},ya={id:"api-integration",title:"API & Integration",description:"Runtime and integration options.",collapsed:!0,fields:[ut("text","dev-api-url","API URL","apiUrl",""),ut("text","dev-flow","Flow ID","flowId",""),{id:"dev-parser",label:"Stream Parser",type:"select",path:"parserType",defaultValue:"plain",options:[{value:"plain",label:"Plain Text"},{value:"json",label:"JSON"},{value:"regex-json",label:"Regex JSON"},{value:"xml",label:"XML"}]}]},va={type:"select",defaultValue:"panel",options:[{value:"collapsed",label:"Collapsed card"},{value:"panel",label:"Side panel"},{value:"inline",label:"In conversation"}],unsettable:!0,unsetLabel:"Use default",requiresCapability:"artifacts"},wa={id:"artifact-display-preferences",title:"Artifact display",description:"Choose where generated files and other content appear.",requiresCapability:"artifacts",fields:[{...va,id:"artifact-display-files",label:"Generated files",description:"Default for HTML, CSV, documents, and code files.",path:"features.artifacts.display.files"},{...va,id:"artifact-display-components",label:"Interactive content",description:"Charts, forms, cards, and other interactive content.",path:"features.artifacts.display.byKind.component"},{...va,id:"artifact-display-default",label:"Other artifacts",description:"Plain documents and anything without a narrower rule.",path:"features.artifacts.display.default"},{id:"artifact-file-preview",label:"Render supported file previews",type:"toggle",path:"features.artifacts.filePreview.enabled",defaultValue:!0,unsettable:!0,unsetLabel:"Use default",requiresCapability:"artifacts"}]},xa={label:"Stream and artifacts",sections:[{id:"stream-display-preferences",title:"Tool calls and reasoning",fields:[{id:"pref-show-tools",label:"Show tool calls",type:"toggle",path:"features.showToolCalls",defaultValue:!0,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-layout",label:"Tool layout",type:"select",path:"features.toolCallDisplay.layout",defaultValue:"card",options:[{value:"row",label:"Row"},{value:"card",label:"Card"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-collapsed-mode",label:"Tool call summary",type:"select",path:"features.toolCallDisplay.collapsedMode",defaultValue:"tool-call",options:[{value:"tool-call",label:"Tool call"},{value:"tool-name",label:"Tool name"},{value:"tool-preview",label:"Tool preview"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-expandable",label:"Expandable tools",type:"toggle",path:"features.toolCallDisplay.expandable",defaultValue:!0,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-grouped",label:"Group tool calls",type:"toggle",path:"features.toolCallDisplay.grouped",defaultValue:!1,unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-group-boundary",label:"Group tools by",type:"select",path:"features.toolCallDisplay.groupBoundary",defaultValue:"adjacent",options:[{value:"adjacent",label:"Adjacent tools"},{value:"iteration",label:"Agent iteration"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-grouped-mode",label:"Group details",type:"select",path:"features.toolCallDisplay.groupedMode",defaultValue:"stack",options:[{value:"stack",label:"Show steps"},{value:"summary",label:"Summary only"},{value:"collapsible",label:"Expandable group"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-group-appearance",label:"Appearance",type:"select",path:"features.toolCallDisplay.groupAppearance",options:[{value:"plain",label:"Plain"},{value:"inset",label:"Inset"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-tool-loading-animation",label:"Tool animation",type:"select",path:"features.toolCallDisplay.loadingAnimation",defaultValue:"none",options:[{value:"none",label:"None"},{value:"pulse",label:"Pulse"},{value:"shimmer",label:"Shimmer"},{value:"shimmer-color",label:"Color shimmer"},{value:"rainbow",label:"Rainbow"}],unsettable:!0,requiresCapability:"tools"},{id:"pref-show-reasoning",label:"Show reasoning",type:"toggle",path:"features.showReasoning",defaultValue:!0,unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-layout",label:"Reasoning layout",type:"select",path:"features.reasoningDisplay.layout",defaultValue:"card",options:[{value:"row",label:"Row"},{value:"card",label:"Card"}],unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-appearance",label:"Reasoning details",type:"select",path:"features.reasoningDisplay.appearance",options:[{value:"plain",label:"Plain"},{value:"inset",label:"Inset"},{value:"panel",label:"Panel"}],unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-expandable",label:"Reasoning expandable",type:"toggle",path:"features.reasoningDisplay.expandable",defaultValue:!0,unsettable:!0,requiresCapability:"reasoning"},{id:"pref-reasoning-active-preview",label:"Active reasoning preview",type:"toggle",path:"features.reasoningDisplay.activePreview",defaultValue:!1,unsettable:!0,requiresCapability:"reasoning"}]},wa]},ka={id:"debug-inspection",title:"Debug & Inspection",collapsed:!0,fields:[ut("toggle","dev-tool-active-preview","Tool Preview While Active","features.toolCallDisplay.activePreview",!1,"Show a lightweight preview in collapsed active tool rows"),{id:"dev-tool-preview-lines",label:"Tool Preview Lines",type:"select",path:"features.toolCallDisplay.previewMaxLines",defaultValue:3,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],formatValue:e=>String(e??3),parseValue:e=>Number(e)},ut("text","dev-tool-active-min-height","Tool Active Min Height","features.toolCallDisplay.activeMinHeight","","CSS min-height for collapsed active tool rows (e.g. 5rem)"),{id:"dev-reasoning-preview-lines",label:"Reasoning Preview Lines",type:"select",path:"features.reasoningDisplay.previewMaxLines",defaultValue:3,options:[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],formatValue:e=>String(e??3),parseValue:e=>Number(e)},ut("text","dev-reasoning-active-min-height","Reasoning Active Min Height","features.reasoningDisplay.activeMinHeight","","CSS min-height for collapsed active reasoning rows (e.g. 5rem)"),ut("toggle","dev-debug","Debug Mode","debug",!1,"Show debug information")]},Sa=[{label:"Content",sections:[ea,ta]},{label:"Layout",sections:[aa,oa,ra,la]},{label:"Widget",sections:[sa,ia,na,ca,da,pa]},{label:"Features",sections:[ua,ma,ha,ga,fa,ba]},xa,{label:"Developer",collapsedByDefault:!0,sections:[ya,ka,{id:"markdown",title:"Markdown Options",collapsed:!0,fields:[ut("toggle","md-gfm","GitHub Flavored Markdown","markdown.options.gfm",!0),ut("toggle","md-breaks","Line Breaks","markdown.options.breaks",!0),ut("toggle","md-header-ids","Header IDs","markdown.options.headerIds",!1),ut("toggle","md-pedantic","Pedantic Mode","markdown.options.pedantic",!1),ut("toggle","md-silent","Silent","markdown.options.silent",!1),ut("toggle","md-disable-styles","Disable Default Styles","markdown.disableDefaultStyles",!1)]}]}],Ca=Sa.flatMap(e=>e.sections),Ta={id:"theme-mode-v2",title:"Theme",description:"Choose how the interface adapts across light and dark mode.",collapsed:!1,fields:[{id:"color-mode",label:"Color Mode",type:"select",path:"colorScheme",defaultValue:"auto",options:[{value:"auto",label:"Auto"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]}]},Aa={id:"brand-palette-v2",title:"Brand Palette",description:"Set your brand, accent, and neutral colors. These are used to generate the interface theme.",collapsed:!1,fields:[ut("color","bp-primary","Primary","theme.palette.colors.primary.500","#171717","Main brand color"),ut("color","bp-secondary","Secondary","theme.palette.colors.secondary.500","#8b5cf6","Supporting brand color"),ut("color","bp-accent","Accent","theme.palette.colors.accent.500","#06b6d4","Highlight and decorative color"),ut("color","bp-neutral","Neutral","theme.palette.colors.gray.500","#6b7280","Backgrounds, text, and borders")]},Ba={id:"status-palette",title:"Status Palette",description:"Colors for system feedback states.",collapsed:!0,fields:[ut("color","sp-success","Success","theme.palette.colors.success.500","#22c55e"),ut("color","sp-warning","Warning","theme.palette.colors.warning.500","#eab308"),ut("color","sp-error","Error","theme.palette.colors.error.500","#ef4444"),ut("color","sp-notice","Notice","theme.semantic.colors.feedback.info","palette.colors.primary.500","Info and notice states")]},Ia={id:"interface-roles",title:"Interface Roles",description:"Control where brand and neutral colors appear across the interface.",collapsed:!1,fields:[{id:"role-surfaces",label:"Background Surfaces",type:"role-assignment",path:"theme.semantic.colors.background",roleAssignment:et},{id:"role-header",label:"Header",type:"role-assignment",path:"theme.components.header.background",roleAssignment:tt},{id:"role-user-messages",label:"User Messages",type:"role-assignment",path:"theme.components.message.user.background",roleAssignment:at},{id:"role-assistant-messages",label:"Assistant Messages",type:"role-assignment",path:"theme.components.message.assistant.background",roleAssignment:ot},{id:"role-primary-actions",label:"Primary Actions",type:"role-assignment",path:"theme.components.button.primary.background",roleAssignment:rt},{id:"role-scroll-to-bottom",label:"Scroll To Bottom",type:"role-assignment",path:"theme.components.scrollToBottom.background",roleAssignment:lt},{id:"role-input",label:"Input Field",type:"role-assignment",path:"theme.components.input.background",roleAssignment:st},{id:"role-links-focus",label:"Links & Focus",type:"role-assignment",path:"theme.semantic.colors.accent",roleAssignment:it},{id:"role-borders",label:"Borders & Dividers",type:"role-assignment",path:"theme.semantic.colors.border",roleAssignment:nt}]},Ma={id:"status-colors",title:"Status Colors",description:"Used for system states like success, warning, notice, and error.",collapsed:!0,fields:[pt("sc-notice","Notice","theme.semantic.colors.feedback.info","palette.colors.primary.500"),pt("sc-success","Success","theme.semantic.colors.feedback.success","palette.colors.success.500"),pt("sc-warning","Warning","theme.semantic.colors.feedback.warning","palette.colors.warning.500"),pt("sc-error","Error","theme.semantic.colors.feedback.error","palette.colors.error.500")]},Ra={id:"advanced-tokens",title:"Advanced Tokens",description:"Override individual semantic and component values when you need precise control.",collapsed:!0,fields:[]},Va=[Ta,Aa,Ba,Ia,Ma,Ra],Ea=[{id:"style",label:"Style",sections:bt},{id:"design-system",label:"Design System",sections:Kt},{id:"configure",label:"Configure",sections:Ca}],Pa=(e,t)=>t.split(".").reduce((e,t)=>e&&"object"==typeof e?e[t]:void 0,e),$a=Y(),Oa={id:"default-light",name:"Default Light",description:"Clean monochrome light theme",theme:{components:{artifact:{pane:{background:"semantic.colors.container",toolbarBackground:"semantic.colors.container"}}}},preview:{primary:"#171717",surface:"#ffffff",accent:"#0f0f0f"},tags:["light"]},Fa={id:"default-dark",name:"Default Dark",description:"Monochrome dark theme",theme:{palette:{colors:{primary:{50:"#ffffff",100:"#f5f5f5",200:"#d4d4d4",300:"#a3a3a3",400:"#737373",500:"#171717",600:"#0f0f0f",700:"#0a0a0a",800:"#050505",900:"#030303",950:"#000000"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},secondary:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},accent:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},success:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},warning:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},error:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"}}},semantic:{colors:{primary:"palette.colors.primary.400",secondary:"palette.colors.gray.400",accent:"palette.colors.primary.500",surface:"palette.colors.gray.800",background:"palette.colors.gray.900",container:"palette.colors.gray.800",text:"palette.colors.gray.100",textMuted:"palette.colors.gray.400",textInverse:"palette.colors.gray.900",border:"palette.colors.gray.700",divider:"palette.colors.gray.700",interactive:{default:"palette.colors.primary.400",hover:"palette.colors.primary.300",focus:"palette.colors.primary.500",active:"palette.colors.primary.600",disabled:"palette.colors.gray.600"},feedback:{success:"palette.colors.success.400",warning:"palette.colors.warning.400",error:"palette.colors.error.400",info:"palette.colors.primary.400"}}},components:{markdown:{link:{foreground:"palette.colors.primary.300"}}}},preview:{primary:"#171717",surface:"#1f2937",accent:"#0f0f0f"},tags:["dark"]},La=[{id:"persona-default",name:"Persona Default",description:"Adaptive Persona theme with light and dark modes",theme:Oa.theme,darkTheme:Fa.theme,preview:Oa.preview,darkPreview:Fa.preview,tags:["light","dark","adaptive"]},Oa,Fa,{id:"high-contrast",name:"High Contrast",description:"Maximum contrast for accessibility",theme:{semantic:{colors:{primary:"palette.colors.primary.700",secondary:"palette.colors.gray.700",accent:"palette.colors.primary.800",surface:"palette.colors.gray.50",background:"palette.colors.gray.50",container:"palette.colors.gray.200",text:"palette.colors.gray.950",textMuted:"palette.colors.gray.700",textInverse:"palette.colors.gray.50",border:"palette.colors.gray.400",divider:"palette.colors.gray.400",interactive:{default:"palette.colors.primary.700",hover:"palette.colors.primary.800",focus:"palette.colors.primary.900",active:"palette.colors.primary.950",disabled:"palette.colors.gray.400"},feedback:{success:"palette.colors.success.700",warning:"palette.colors.warning.700",error:"palette.colors.error.700",info:"palette.colors.primary.700"}}}},preview:{primary:"#0a0a0a",surface:"#f9fafb",accent:"#050505"},tags:["light","high-contrast","accessibility"]}],Wa=[...La];b();const za={desktop:{w:1280,h:800},mobile:{w:390,h:844}},Ha=.15,Da=1.5,Na="persona-preview-shell-theme",_a={load:()=>null,save:()=>{},clear:()=>{}},ja=["How do I get started?","Pricing & plans","Talk to support"],Ua='\n <div class="preview-iframe-mock" aria-hidden="true">\n <div class="preview-iframe-chrome">\n <span class="preview-iframe-dot"></span>\n <span class="preview-iframe-dot"></span>\n <span class="preview-iframe-dot"></span>\n </div>\n <div class="preview-iframe-copy">\n <div class="preview-iframe-line hero"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-grid">\n <div class="preview-iframe-card"></div>\n <div class="preview-iframe-card"></div>\n <div class="preview-iframe-card"></div>\n </div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-iframe-line body"></div>\n </div>\n </div>',qa='\n <div class="preview-workspace-content-shell" aria-hidden="true">\n <div class="preview-iframe-line hero"></div>\n <div class="preview-iframe-line body"></div>\n <div class="preview-workspace-row">\n <div class="preview-workspace-card"></div>\n <div class="preview-workspace-card"></div>\n </div>\n <div class="preview-workspace-row">\n <div class="preview-workspace-card short"></div>\n <div class="preview-workspace-card short"></div>\n <div class="preview-workspace-card short"></div>\n </div>\n </div>',Ga={"user-message":"User message","assistant-message":"Assistant message","assistant-code-block":"Assistant: code block","assistant-markdown-table":"Assistant: markdown table","assistant-image":"Assistant: image","reasoning-streaming":"Reasoning (streaming)","reasoning-complete":"Reasoning (complete)","tool-running":"Tool call (running)","tool-complete":"Tool call (complete)","approval-request":"Approval request"},Ya={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#008000",lime:"#00ff00",blue:"#0000ff",yellow:"#ffff00",cyan:"#00ffff",aqua:"#00ffff",magenta:"#ff00ff",fuchsia:"#ff00ff",silver:"#c0c0c0",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",purple:"#800080",teal:"#008080",navy:"#000080",orange:"#ffa500",pink:"#ffc0cb",hotpink:"#ff69b4",gold:"#ffd700",indigo:"#4b0082",violet:"#ee82ee",brown:"#a52a2a",beige:"#f5f5dc",ivory:"#fffff0",khaki:"#f0e68c",coral:"#ff7f50",salmon:"#fa8072",tomato:"#ff6347",crimson:"#dc143c",turquoise:"#40e0d0",lavender:"#e6e6fa",plum:"#dda0dd",orchid:"#da70d6",tan:"#d2b48c",chocolate:"#d2691e",sienna:"#a0522d",slategray:"#708090",slategrey:"#708090",steelblue:"#4682b4",royalblue:"#4169e1",dodgerblue:"#1e90ff",skyblue:"#87ceeb",lightblue:"#add8e6",midnightblue:"#191970",forestgreen:"#228b22",seagreen:"#2e8b57",limegreen:"#32cd32",olivedrab:"#6b8e23",darkgreen:"#006400",emerald:"#50c878",mint:"#3eb489",goldenrod:"#daa520",firebrick:"#b22222",darkred:"#8b0000",indianred:"#cd5c5c",deeppink:"#ff1493",mediumpurple:"#9370db",rebeccapurple:"#663399",darkviolet:"#9400d3",slateblue:"#6a5acd",cornflowerblue:"#6495ed",teal2:"#008080",charcoal:"#36454f",graphite:"#3b3b3b",transparent:"transparent"},Ja=/^rgba?\(\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*(,\s*(0|1|0?\.\d+|\d{1,3}%)\s*)?\)$/,Za=Xe.map(e=>"gray"===e?"neutral":e),Ka={...Object.fromEntries(Za.map(e=>[e,e])),gray:"neutral",grey:"neutral"},Xa={sharp:"sharp",square:"sharp",none:"sharp",default:"default",normal:"default",rounded:"rounded",round:"rounded",soft:"rounded",pill:"pill",circle:"pill",full:"pill"},Qa=xe("typo-font-family"),eo=xe("typo-font-size"),to=xe("typo-font-weight"),ao=xe("typo-line-height"),oo={...Qa,monospace:Qa.mono},ro={...eo,small:eo.sm,md:eo.base,medium:eo.base,large:eo.lg},lo={...to,400:to.normal,500:to.medium,600:to.semibold,700:to.bold},so={...ao,1.25:ao.tight,1.5:ao.normal,1.625:ao.relaxed},io=function(){let e={pill:{sm:"9999px",md:"9999px",lg:"9999px",xl:"9999px",full:"9999px"}};for(let t of bt)for(let a of t.presets??[]){let t=a.id.match(/^radius-(\w+)$/);if(!t)continue;let o={};for(let[e,t]of Object.entries(a.values))e.startsWith("theme.palette.radius.")&&"string"==typeof t&&(o[e.slice(21)]=t);e[t[1]]=o}return e}(),no=["sm","md","lg","xl","full"],co=[{key:"user-message",label:"User message text",fg:"components.message.user.text",bg:"components.message.user.background"},{key:"assistant-message",label:"Assistant message text",fg:"components.message.assistant.text",bg:"components.message.assistant.background"},{key:"header",label:"Header title",fg:"components.header.titleForeground",fgFallbacks:["components.header.foreground"],bg:"components.header.background"},{key:"primary-button",label:"Primary button label",fg:"components.button.primary.foreground",bg:"components.button.primary.background"},{key:"input",label:"Input placeholder",fg:"components.input.placeholder",bg:"components.input.background"},{key:"link",label:"Link text",fg:"components.markdown.link.foreground",bg:"semantic.colors.background"},{key:"scroll",label:"Scroll-to-bottom icon",fg:"components.scrollToBottom.foreground",bg:"components.scrollToBottom.background"},{key:"body",label:"Body text on background",fg:"semantic.colors.text",bg:"semantic.colors.background"},{key:"surface",label:"Body text on surface",fg:"semantic.colors.text",bg:"semantic.colors.surface"}],po={AA:4.5,AAA:7},uo={};for(let e of ct){let t=Ce(e.roleId);uo[t]=e,uo[e.roleId]=e}Object.assign(uo,{surface:uo.surfaces,background:uo.surfaces,backgrounds:uo.surfaces,user:uo["user-messages"],"user-message":uo["user-messages"],assistant:uo["assistant-messages"],"assistant-message":uo["assistant-messages"],actions:uo["primary-actions"],buttons:uo["primary-actions"],composer:uo.input,links:uo["links-focus"],focus:uo["links-focus"],border:uo.borders,dividers:uo.borders,scroll:uo["scroll-to-bottom"]});const mo={voice:"voiceRecognition.enabled",artifacts:"features.artifacts.enabled",attachments:"attachments.enabled",toolCalls:"features.showToolCalls",reasoning:"features.showReasoning",feedback:"messageActions.enabled"},ho={avatars:"layout.messages.avatar.show",timestamps:"layout.messages.timestamp.show",showHeader:"layout.showHeader",messageStyle:"layout.messages.layout"},go=["bottom-right","bottom-left","top-right","top-left"],fo=["bubble","flat","minimal"],bo={title:"welcome.title",subtitle:"welcome.subtitle",placeholder:"copy.inputPlaceholder",sendLabel:"copy.sendButtonLabel"};export{Ra as ADVANCED_TOKENS_SECTION,ct as ALL_ROLES,$a as ALL_TABS,wa as ARTIFACT_DISPLAY_PREFERENCE_SECTION,Aa as BRAND_PALETTE_SECTION,La as BUILT_IN_PRESETS,xt as COLORS_SECTIONS,Ze as COLOR_FAMILIES,Kt as COMPONENTS_SECTIONS,Zt as COMPONENT_COLOR_SECTIONS,Jt as COMPONENT_SHAPE_SECTIONS,Ca as CONFIGURE_SECTIONS,Sa as CONFIGURE_SUB_GROUPS,co as CONTRAST_PAIRS,Ya as CSS_NAMED_COLORS,za as DEVICE_DIMENSIONS,ja as HOME_SUGGESTION_CHIPS,Ia as INTERFACE_ROLES_SECTION,Ua as MOCK_BROWSER_CONTENT,qa as MOCK_WORKSPACE_CONTENT,vt as PALETTE_SECTION,_a as PREVIEW_STORAGE_ADAPTER,io as RADIUS_PRESETS,ot as ROLE_ASSISTANT_MESSAGES,nt as ROLE_BORDERS,Xe as ROLE_FAMILIES,Qe as ROLE_FAMILY_LABELS,tt as ROLE_HEADER,st as ROLE_INPUT,Ke as ROLE_INTENSITIES,it as ROLE_LINKS_FOCUS,rt as ROLE_PRIMARY_ACTIONS,lt as ROLE_SCROLL_TO_BOTTOM,et as ROLE_SURFACES,at as ROLE_USER_MESSAGES,wt as SEMANTIC_COLORS_SECTION,Je as SHADE_KEYS,Na as SHELL_STYLE_ID,Ma as STATUS_COLORS_SECTION,Ba as STATUS_PALETTE_SECTION,xa as STREAM_AND_ARTIFACTS_SUB_GROUP,bt as STYLE_SECTIONS,Va as STYLE_SECTIONS_V2,Wa as THEME_EDITOR_PRESETS,Ta as THEME_SECTION,y as ThemeEditorState,Da as ZOOM_MAX,Ha as ZOOM_MIN,se as appendPreviewTranscriptEntry,de as applySceneConfig,ae as applyShellTheme,ue as buildPreviewConfig,me as buildPreviewConfigWithMessages,te as buildShellCss,oe as buildSrcdoc,Ae as buildSummary,ne as buildTranscriptStreamFrames,ge as coerceColor,fe as coerceFamily,be as coerceIntensity,we as coerceRadius,ve as coerceRoundnessStyle,ye as coerceScheme,E as convertFromPx,V as convertToPx,ce as createPreviewMessages,le as createPreviewTranscriptEntry,$e as createThemeEditorTools,U as detectRoleAssignment,Q as escapeHtml,Z as findSection,R as formatCssValue,z as generateColorScale,re as getPreviewTranscriptPresetLabel,ee as getShellPalette,X as getThemeEditorPreset,Y as getThemeEditorTabs,L as hexToHsl,W as hslToHex,$ as isValidHex,P as normalizeColorValue,H as paletteColorPath,M as parseCssValue,ie as presetStreamsText,Ee as quickContrastWarnings,G as resolveEditorFieldDefault,_ as resolveRoleAssignment,D as resolveThemeColorPath,O as rgbToHex,Ve as runContrastChecks,K as scopeSection,N as tokenRefDisplayName,he as toolResult,F as wcagContrastRatio};