@useinsider/ab-components 0.0.159 → 0.0.161
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.
- package/dist/ab-components.cjs.js +1 -1
- package/dist/ab-components.cjs.js.map +1 -1
- package/dist/ab-components.css +1 -1
- package/dist/ab-components.es.js +1 -1
- package/dist/ab-components.iife.js +1 -1
- package/dist/ab-components.iife.js.map +1 -1
- package/dist/ab-components.umd.js +1 -1
- package/dist/ab-components.umd.js.map +1 -1
- package/dist/{index-BSRekeK7.js → index-DJN2b0Iq.js} +42 -42
- package/dist/{index-BSRekeK7.js.map → index-DJN2b0Iq.js.map} +1 -1
- package/dist/{liquid-F-LyKJQo.js → liquid-5ddyfYc6.js} +2 -2
- package/dist/{liquid-F-LyKJQo.js.map → liquid-5ddyfYc6.js.map} +1 -1
- package/package.json +1 -1
|
@@ -208,7 +208,7 @@ From `+this.originalError.stack)}static is(e){return(e==null?void 0:e[$9])==="Li
|
|
|
208
208
|
/* Deliberate byte-for-byte copy of what skeleton-design-bundle ships today (placeholder
|
|
209
209
|
as dark as typed text). A dimmer placeholder color is an open design question. */
|
|
210
210
|
html .monaco-editor .monaco-placeholder { color: var(--ins-text-default, #101727) !important; }
|
|
211
|
-
`,MP=i.defineComponent({__name:"OnsiteMonacoEditor",props:{language:{default:"javascript"},code:{default:""},disableValidation:{type:Boolean,default:!1},monacoVsPath:{},editorOptions:{default:()=>({})},errorGlyph:{type:Boolean,default:!1},placeholder:{default:""},nonce:{}},emits:["update:codeEditorLength","update:shouldShowLengthError","update:valid","ready","destroyed"],setup(n,{expose:e,emit:t}){const r=t,a=n,o=i.ref(null);let u,s=!1;const d=i.computed(()=>({...NP,...a.editorOptions}));function p(){var y,S,E;const F=(y=o.value)==null?void 0:y.$el,C=F==null?void 0:F.contentDocument,v=(S=F==null?void 0:F.contentWindow)==null?void 0:S.monaco;if(!C||!v||C.head.querySelector(`style[${ad}]`))return;const g=C.createElement("style");g.setAttribute(ad,""),a.nonce&&g.setAttribute("nonce",a.nonce),g.textContent=PP,C.head.appendChild(g),(E=C.fonts)==null||E.load(IP).then(()=>{s||v.editor.remeasureFonts()}).catch(()=>{})}function f(F){u=F,p(),r("ready",F)}function m(){u=void 0,r("destroyed")}return i.onUnmounted(()=>{s=!0}),e({getCode:async()=>!u||!o.value?{code:"",valid:!1}:o.value.getCode(),getValue:()=>(u==null?void 0:u.getValue())??""}),(F,C)=>(i.openBlock(),i.createBlock(xg,{ref_key:"inner",ref:o,code:F.code,"disable-validation":F.disableValidation,"editor-options":d.value,"error-glyph":F.errorGlyph,language:F.language,"monaco-vs-path":F.monacoVsPath,placeholder:F.placeholder,onDestroyed:m,onReady:f,"onUpdate:codeEditorLength":C[0]||(C[0]=v=>r("update:codeEditorLength",v)),"onUpdate:shouldShowLengthError":C[1]||(C[1]=v=>r("update:shouldShowLengthError",v)),"onUpdate:valid":C[2]||(C[2]=v=>r("update:valid",v))},null,8,["code","disable-validation","editor-options","error-glyph","language","monaco-vs-path","placeholder"]))}}),VP="_wrapper_efha2_39",qP="_button_efha2_46",zP="_button__label_efha2_75",jP="_button__icon_efha2_78",zt={wrapper:VP,"wrapper--horizontal":"_wrapper--horizontal_efha2_43",button:qP,"button--first":"_button--first_efha2_49","button--last":"_button--last_efha2_52","wrapper--vertical":"_wrapper--vertical_efha2_55","wrapper--disabled":"_wrapper--disabled_efha2_67","wrapper--icon-only":"_wrapper--icon-only_efha2_71",button__label:zP,button__icon:jP,"wrapper--label-only":"_wrapper--label-only_efha2_81","button--selected":"_button--selected_efha2_107","button--disabled":"_button--disabled_efha2_127","wrapper--small":"_wrapper--small_efha2_140"},UP=["data-mode","disabled","onClick"],HP=["data-mode","disabled","onClick"],WP=i.defineComponent({__name:"SegmentButton",props:{size:{default:"default"},orientation:{default:"horizontal"},disabled:{type:Boolean,default:!1},segments:{},iconOnly:{type:Boolean,default:!1},labelOnly:{type:Boolean,default:!1},modelValue:{}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(t.modelValue||""),o=u=>{t.disabled||u.disabled||(r("update:modelValue",u.value),r("click",u.value))};return i.watch(()=>t.modelValue,u=>{a.value!==u&&(a.value=u||"")}),i.watch(()=>t.segments,u=>{u.some(s=>s.value===a.value)||(a.value="",r("update:modelValue",""))},{deep:!0}),(u,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(zt).wrapper,i.unref(zt)[`wrapper--${u.orientation}`],i.unref(zt)[`wrapper--${u.size}`],{[i.unref(zt)["wrapper--disabled"]]:u.disabled,[i.unref(zt)["wrapper--icon-only"]]:u.iconOnly,[i.unref(zt)["wrapper--label-only"]]:u.labelOnly}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.segments,(d,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:`${d.value}-${p}`},[d.tooltip?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:`segment-tooltip-${d.value}-${p}`,text:d.tooltip},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(zt).button,{[i.unref(zt)["button--selected"]]:d.value===a.value,[i.unref(zt)["button--disabled"]]:d.disabled||u.disabled,[i.unref(zt)["button--first"]]:p===0,[i.unref(zt)["button--last"]]:p===u.segments.length-1}]),"data-mode":d.mode,disabled:d.disabled||u.disabled,onClick:f=>o(d)},[u.iconOnly&&d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon,size:24},null,8,["class","name"])):i.createCommentVNode("",!0),u.labelOnly&&d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon},null,8,["class","name"])):i.createCommentVNode("",!0),d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)],10,UP)]),_:2},1032,["id","text"])):(i.openBlock(),i.createElementBlock("button",{key:1,type:"button",class:i.normalizeClass([i.unref(zt).button,{[i.unref(zt)["button--selected"]]:d.value===a.value,[i.unref(zt)["button--disabled"]]:d.disabled||u.disabled,[i.unref(zt)["button--first"]]:p===0,[i.unref(zt)["button--last"]]:p===u.segments.length-1}]),"data-mode":d.mode,disabled:d.disabled||u.disabled,onClick:f=>o(d)},[u.iconOnly&&d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon,size:24},null,8,["class","name"])):i.createCommentVNode("",!0),u.labelOnly&&d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon},null,8,["class","name"])):i.createCommentVNode("",!0),d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)],10,HP))],64))),128))],2))}}),GP="_wrapper__counter_1ynlu_1",ZP="_wrapper__errorMessage_1ynlu_1",YP="_wrapper__label_1ynlu_1",KP="_wrapper__field_1ynlu_1",XP="_wrapper_1ynlu_1",JP="_wrapper__bottom_1ynlu_93",xi={wrapper__counter:GP,wrapper__errorMessage:ZP,wrapper__label:YP,wrapper__field:KP,wrapper:XP,wrapper__bottom:JP,"wrapper--error":"_wrapper--error_1ynlu_106","wrapper--primary":"_wrapper--primary_1ynlu_109","wrapper--smart":"_wrapper--smart_1ynlu_117"},QP=["for"],eM=["id","maxlength","name","placeholder","value"],tM=["id","maxlength","name","placeholder","value"],nM=i.defineComponent({__name:"TextInput",props:{id:{},name:{},modelValue:{default:""},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},maxHeight:{default:void 0},error:{default:""},multiline:{type:Boolean,default:!1},autoGrow:{type:Boolean,default:!1},counter:{type:Boolean},mode:{default:"primary"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(null),o=()=>{if(t.autoGrow&&a.value){a.value.style.height="";const s=Math.min(a.value.scrollHeight,t.maxHeight||a.value.scrollHeight);a.value.style.height=`${s}px`}},u=s=>{const d=s.target;r("input",s),r("update:modelValue",d.value),o()};return i.onMounted(()=>{o()}),(s,d)=>{var p;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(xi).wrapper,i.unref(xi)[`wrapper--${t.mode}`]])},[s.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:i.normalizeClass(i.unref(xi).wrapper__label),for:s.id},i.toDisplayString(s.label),11,QP)):i.createCommentVNode("",!0),s.multiline?(i.openBlock(),i.createElementBlock("textarea",{key:1,id:s.id,ref_key:"textareaRef",ref:a,class:i.normalizeClass([i.unref(xi).wrapper__field,{[i.unref(xi)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,style:i.normalizeStyle(s.maxHeight?{maxHeight:`${s.maxHeight}px`}:void 0),value:s.modelValue,onBlur:d[0]||(d[0]=f=>r("blur",f)),onChange:d[1]||(d[1]=f=>s.$emit("change",f)),onFocus:d[2]||(d[2]=f=>r("focus",f)),onInput:u,onPaste:d[3]||(d[3]=f=>r("paste",f))},null,46,eM)):(i.openBlock(),i.createElementBlock("input",{key:2,id:s.id,type:"text",class:i.normalizeClass([i.unref(xi).wrapper__field,{[i.unref(xi)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:d[4]||(d[4]=f=>r("blur",f)),onChange:d[5]||(d[5]=f=>s.$emit("change",f)),onFocus:d[6]||(d[6]=f=>r("focus",f)),onInput:u,onPaste:d[7]||(d[7]=f=>r("paste",f))},null,42,tM)),i.createElementVNode("div",{class:i.normalizeClass(i.unref(xi).wrapper__bottom)},[s.error?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(xi).wrapper__errorMessage)},i.toDisplayString(s.error),3)):i.createCommentVNode("",!0),s.counter?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(i.unref(xi).wrapper__counter)},i.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):i.createCommentVNode("",!0)],2)],2)}}}),rM="_wrapper_14neq_39",iM="_wrapper__label_14neq_46",aM="_wrapper__input_14neq_70",sM="_wrapper_checked_14neq_80",oM="_wrapper_disabled_14neq_87",b1={wrapper:rM,wrapper__label:iM,wrapper__input:aM,wrapper_checked:sM,wrapper_disabled:oM},lM=["id","checked","disabled","name"],uM=["for"],cM=i.defineComponent({__name:"Toggle",props:{id:{},name:{},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("click",!t.checked)};return(o,u)=>(i.openBlock(),i.createElementBlock("fieldset",{class:i.normalizeClass([i.unref(b1).wrapper,{[i.unref(b1).wrapper_checked]:o.checked,[i.unref(b1).wrapper_disabled]:o.disabled}])},[i.createElementVNode("input",{id:o.id,type:"checkbox",checked:o.checked,class:i.normalizeClass(i.unref(b1).wrapper__input),disabled:o.disabled,name:o.name,onClick:a},null,10,lM),i.createElementVNode("label",{class:i.normalizeClass(i.unref(b1).wrapper__label),for:o.id},null,10,uM)],2))}}),dM={class:"ab-toast__text"},fM=["aria-label"],pM=i.defineComponent({__name:"Toast",props:{modelValue:{type:Boolean},text:{},variant:{default:"info"},duration:{default:4e3},icon:{default:void 0},closeAriaLabel:{default:"Close notification"}},emits:["update:modelValue","dismiss"],setup(n,{emit:e}){const t=n,r=e,a={info:"filled-info-circle",error:"filled-error-box",warning:"filled-caution-triangle"},o=i.computed(()=>t.icon??a[t.variant]);let u=null;function s(){u&&(clearTimeout(u),u=null)}function d(){s(),r("update:modelValue",!1),r("dismiss")}function p(){s(),!(t.duration<=0)&&(u=setTimeout(()=>{d()},t.duration))}return i.watch(()=>t.modelValue,f=>{f?p():s()},{immediate:!0}),i.onBeforeUnmount(s),(f,m)=>(i.openBlock(),i.createBlock(i.Transition,{name:"ab-toast"},{default:i.withCtx(()=>[f.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,"aria-live":"polite",class:i.normalizeClass(["ab-toast",`ab-toast--${f.variant}`]),role:"status"},[i.createVNode(Le,{class:"ab-toast__icon",name:o.value,size:24},null,8,["name"]),i.createElementVNode("span",dM,i.toDisplayString(f.text),1),i.createElementVNode("button",{class:"ab-toast__close",type:"button","aria-label":f.closeAriaLabel,onClick:d},[i.createVNode(Le,{name:"line-close-netural",size:24})],8,fM)],2)):i.createCommentVNode("",!0)]),_:1}))}}),hM=bt(pM,[["__scopeId","data-v-e00fa8e4"]]),mM=["id"],gM={class:"ab-onsite-toolbar__wrapper"},bM={key:0,class:"ab-onsite-toolbar__close"},yM=i.defineComponent({__name:"OnsiteToolbar",props:{id:{default:void 0}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{id:e.id,class:"ab-onsite-toolbar",role:"toolbar"},[i.createElementVNode("div",gM,[i.renderSlot(e.$slots,"default",{},void 0,!0)]),e.$slots.close?(i.openBlock(),i.createElementBlock("div",bM,[i.renderSlot(e.$slots,"close",{},void 0,!0)])):i.createCommentVNode("",!0)],8,mM))}}),vM=bt(yM,[["__scopeId","data-v-392ba9d4"]]),od={"line-shapes-add":{d:"M9.14258 13C10.1683 13 11 13.8318 11 14.8574V19.1426C11 20.1683 10.1683 21 9.14258 21H4.85742C3.83175 21 3 20.1683 3 19.1426V14.8574C3 13.8318 3.83175 13 4.85742 13H9.14258ZM17 13C17.5523 13 18 13.4477 18 14V16H20C20.5523 16 21 16.4477 21 17C21 17.5523 20.5523 18 20 18H18V20C18 20.5523 17.5523 21 17 21C16.4477 21 16 20.5523 16 20V18H14C13.4477 18 13 17.5523 13 17C13 16.4477 13.4477 16 14 16H16V14C16 13.4477 16.4477 13 17 13ZM5 19H9V15H5V19ZM12 3C14.2091 3 16 4.79086 16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3ZM12 5C10.8954 5 10 5.89543 10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 5.89543 13.1046 5 12 5Z"},"line-paint-brush":{d:"M7.9541 12.9912C8.3415 13.0145 8.71985 13.1143 9.07129 13.2822C9.47224 13.4738 9.82772 13.7487 10.1201 14.085C10.4123 14.4211 10.6375 14.8133 10.7891 15.2354C10.9403 15.6564 11.0166 16.1037 11.0156 16.5527L11.0107 16.7695C10.9113 19.0026 9.28332 20.9862 7.04004 20.9863C5.47103 20.9863 4.17116 19.9236 3.31348 18.9277L3.3125 18.9287C3.10333 18.6897 2.91867 18.2839 3.07031 17.8135C3.18404 17.4611 3.43843 17.2587 3.53613 17.1846C3.65966 17.0909 3.79506 17.0135 3.88867 16.9619C4.01898 16.89 4.0658 16.8676 4.17969 16.8037C4.37028 16.6968 4.47797 16.6189 4.53613 16.5566C4.54415 16.548 4.54909 16.54 4.55273 16.5352C4.56124 14.7064 5.87634 12.9863 7.78418 12.9863H7.78809L7.9541 12.9912ZM7.78223 14.9863C7.22709 14.9876 6.55285 15.5509 6.55273 16.5527C6.55273 17.4557 5.98056 18.007 5.53418 18.3164C6.05812 18.7475 6.57639 18.9863 7.04004 18.9863C7.9972 18.9862 9.01562 18.0402 9.01562 16.5527V16.5498C9.01624 16.3281 8.97885 16.1106 8.90723 15.9111C8.83559 15.7117 8.7325 15.538 8.61035 15.3975C8.48846 15.2573 8.35034 15.1545 8.20898 15.0869C8.06883 15.02 7.92423 14.9872 7.78223 14.9863ZM17.792 3.98633C18.2159 3.983 18.6369 4.06407 19.0293 4.22461C19.4217 4.38525 19.7791 4.62214 20.0791 4.92187C20.3791 5.22162 20.6165 5.57834 20.7773 5.9707C20.9382 6.36307 21.019 6.78398 21.0156 7.20801C21.0122 7.63197 20.9238 8.05169 20.7568 8.44141C20.592 8.82576 20.3525 9.17343 20.0537 9.46582L20.0547 9.4668L13.8389 15.6924C13.4488 16.0832 12.8157 16.0843 12.4248 15.6943C12.034 15.3042 12.0337 14.6711 12.4238 14.2803L18.6396 8.05371L18.6514 8.04101C18.7652 7.93068 18.8565 7.79891 18.9189 7.65332C18.9813 7.50769 19.0143 7.35073 19.0156 7.19238C19.0169 7.03396 18.9868 6.87616 18.9268 6.72949C18.8666 6.58275 18.7773 6.44913 18.665 6.33691C18.5528 6.22478 18.4194 6.13539 18.2725 6.07519C18.1256 6.01507 17.9674 5.98515 17.8086 5.98633C17.6497 5.98759 17.4917 6.02056 17.3457 6.08301C17.1997 6.14549 17.0675 6.23674 16.957 6.35059C16.9533 6.35443 16.9491 6.35852 16.9453 6.3623L10.7217 12.5732C10.3308 12.9631 9.69771 12.963 9.30762 12.5723C8.91749 12.1813 8.91865 11.5474 9.30957 11.1572L15.5322 4.94629V4.94726C15.8251 4.64814 16.1746 4.40888 16.5596 4.24414C16.9492 4.07755 17.3683 3.98974 17.792 3.98633Z"},"line-menu-dashboards":{d:"M21 9C21 10.1046 20.1046 11 19 11L5 11C3.89543 11 3 10.1046 3 9L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 9ZM13 19C13 20.1046 12.1046 21 11 21L5 21C3.89543 21 3 20.1046 3 19L3 15C3 13.8954 3.89543 13 5 13L11 13C12.1046 13 13 13.8954 13 15L13 19ZM5 5L5 9L19 9L19 5L5 5ZM5 15L5 19L11 19L11 15L5 15ZM21 19C21 20.1046 20.1046 21 19 21L17 21C15.8954 21 15 20.1046 15 19L15 15C15 13.8954 15.8954 13 17 13L19 13C20.1046 13 21 13.8954 21 15L21 19ZM17 15L17 19L19 19L19 15L17 15Z"},"text-icon":{d:"M20 3C20.5523 3 21 3.44772 21 4V7C21 7.55228 20.5523 8 20 8C19.4477 8 19 7.55228 19 7V5H13V19H15C15.5523 19 16 19.4477 16 20C16 20.5523 15.5523 21 15 21H9C8.44772 21 8 20.5523 8 20C8 19.4477 8.44772 19 9 19H11V5H5V7C5 7.55228 4.55228 8 4 8C3.44772 8 3 7.55228 3 7V4C3 3.44772 3.44772 3 4 3H20Z"},"line-more-vertical":{d:"M12 17C13.1046 17 14 17.8954 14 19C14 20.1046 13.1046 21 12 21C10.8954 21 10 20.1046 10 19C10 17.8954 10.8954 17 12 17ZM12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10ZM12 3C13.1046 3 14 3.89543 14 5C14 6.10457 13.1046 7 12 7C10.8954 7 10 6.10457 10 5C10 3.89543 10.8954 3 12 3Z"}};function _M(n){return n&&n in od?od[n]:void 0}const d6=(n,{slots:e})=>{var t;if(!n.text){const r=(t=e.default)==null?void 0:t.call(e);return(r==null?void 0:r.length)===1?r[0]:r}return i.h($o,{id:n.tooltipId,text:n.text,placement:"bottom",preventXss:!0},{default:()=>{var r;return(r=e.default)==null?void 0:r.call(e)}})};d6.props=["tooltipId","text"];const wM=["id","aria-haspopup","aria-label","aria-pressed","disabled"],CM={key:0,"aria-hidden":"true",class:"icon ab-onsite-toolbar-button__icon",fill:"currentColor",height:"24px",viewBox:"0 0 24 24",width:"24px"},EM=["d"],kM={key:2,class:"ab-onsite-toolbar-button__label"},AM=i.defineComponent({inheritAttrs:!1,__name:"OnsiteToolbarButton",props:{id:{},icon:{default:void 0},label:{default:void 0},tooltip:{default:void 0},size:{default:"small"},mode:{default:"primary"},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hasMenu:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=i.computed(()=>_M(t.icon)),o=i.computed(()=>!t.label),u=i.computed(()=>o.value?t.tooltip:void 0),s=i.computed(()=>["ab-onsite-toolbar-button",`ab-onsite-toolbar-button--${t.size}`,`ab-onsite-toolbar-button--${t.mode}`,{"ab-onsite-toolbar-button--icon-only":o.value,"ab-onsite-toolbar-button--selected":t.selected,"ab-onsite-toolbar-button--disabled":t.disabled}]);function d(p){t.disabled||r("click",p)}return(p,f)=>(i.openBlock(),i.createBlock(i.unref(d6),{text:p.tooltip,"tooltip-id":`${p.id}-tooltip`},{default:i.withCtx(()=>[i.createElementVNode("button",i.mergeProps({id:p.id,type:"button","aria-haspopup":p.hasMenu?"true":void 0,"aria-label":u.value,"aria-pressed":p.selected?"true":void 0,class:s.value,disabled:p.disabled},p.$attrs,{onClick:d}),[a.value?(i.openBlock(),i.createElementBlock("svg",CM,[i.createElementVNode("path",{d:a.value.d},null,8,EM)])):p.icon?(i.openBlock(),i.createBlock(Le,{key:1,class:"ab-onsite-toolbar-button__icon",name:p.icon,size:24},null,8,["name"])):i.createCommentVNode("",!0),p.label?(i.openBlock(),i.createElementBlock("span",kM,i.toDisplayString(p.label),1)):i.createCommentVNode("",!0),p.hasMenu?(i.openBlock(),i.createBlock(Le,{key:3,class:"ab-onsite-toolbar-button__caret",name:"dropdown-down-icon",size:24})):i.createCommentVNode("",!0)],16,wM)]),_:1},8,["text","tooltip-id"]))}}),SM=bt(AM,[["__scopeId","data-v-46f12521"]]),DM=["id","aria-pressed","disabled"],xM={class:"ab-onsite-topbar-button__label"},TM={key:0,class:"ab-onsite-topbar-button__append"},BM=i.defineComponent({inheritAttrs:!1,__name:"OnsiteTopbarButton",props:{id:{default:void 0},label:{},tooltip:{default:void 0},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{default:"primary"}},emits:["click"],setup(n,{emit:e}){var d;const t=n,r=e,a=((d=i.getCurrentInstance())==null?void 0:d.uid)??0,o=i.computed(()=>t.id?`${t.id}-tooltip`:`ab-onsite-topbar-button-tooltip-${a}`),u=i.computed(()=>["ab-onsite-topbar-button",`ab-onsite-topbar-button--${t.mode}`,{"ab-onsite-topbar-button--selected":t.selected,"ab-onsite-topbar-button--disabled":t.disabled}]);function s(p){t.disabled||r("click",p)}return(p,f)=>(i.openBlock(),i.createBlock(i.unref(d6),{text:p.tooltip,"tooltip-id":o.value},{default:i.withCtx(()=>[i.createElementVNode("button",i.mergeProps({id:p.id,"aria-haspopup":"true",type:"button","aria-pressed":p.selected?"true":void 0,class:u.value,disabled:p.disabled},p.$attrs,{onClick:s}),[i.createElementVNode("span",xM,i.toDisplayString(p.label),1),p.$slots.append?(i.openBlock(),i.createElementBlock("span",TM,[i.renderSlot(p.$slots,"append",{},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(Le,{class:"ab-onsite-topbar-button__caret",name:"dropdown-down-icon",size:24})],16,DM)]),_:3},8,["text","tooltip-id"]))}}),$M=bt(BM,[["__scopeId","data-v-4be3b6db"]]),RM={class:"ab-onsite-zoom-toolbar",role:"toolbar"},FM=["aria-label","disabled"],LM=["aria-expanded","onClick"],OM={class:"ab-onsite-zoom-toolbar__label"},IM=["aria-label","disabled"],NM=["aria-label"],PM=i.defineComponent({__name:"OnsiteZoomToolbar",props:{ratio:{},options:{},min:{},max:{},zoomOutAriaLabel:{default:"Zoom out"},zoomInAriaLabel:{default:"Zoom in"},resetAriaLabel:{default:"Reset zoom"}},emits:["zoom-in","zoom-out","reset","select"],setup(n,{emit:e}){const t=n,r=e,a=b=>`${Math.round(b)}%`,o=i.computed(()=>a(t.ratio)),u=i.computed(()=>t.ratio<=t.min),s=i.computed(()=>t.ratio>=t.max),d=i.computed(()=>t.options.map(b=>({text:a(b),value:String(b)})));function p(){u.value||r("zoom-out")}function f(){s.value||r("zoom-in")}function m(b){r("select",Number(b.value))}return(b,_)=>(i.openBlock(),i.createElementBlock("div",RM,[i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__zoom-out",type:"button","aria-label":b.zoomOutAriaLabel,disabled:u.value,onClick:p},[i.createVNode(Le,{name:"line-minus-netural",size:24})],8,FM),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createVNode(i.unref(T4),{class:"ab-onsite-zoom-toolbar__menu",position:"top",items:d.value,"model-value":String(b.ratio),onSelectItem:m},{trigger:i.withCtx(({isOpen:F,toggle:C})=>[i.createElementVNode("button",{"aria-haspopup":"true",class:i.normalizeClass(["ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__select",{"ab-onsite-zoom-toolbar__select--open":F}]),type:"button","aria-expanded":F?"true":"false",onClick:C},[i.createElementVNode("span",OM,i.toDisplayString(o.value),1),i.createVNode(Le,{name:"filled-dropdown-down",size:24})],10,LM)]),_:1},8,["items","model-value"]),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__zoom-in",type:"button","aria-label":b.zoomInAriaLabel,disabled:s.value,onClick:f},[i.createVNode(Le,{name:"line-plus-netural",size:24})],8,IM),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__reset",type:"button","aria-label":b.resetAriaLabel,onClick:_[0]||(_[0]=F=>r("reset"))},[i.createVNode(Le,{name:"line-reset",size:24})],8,NM)]))}}),MM=bt(PM,[["__scopeId","data-v-1f55dbdb"]]),Nr={"agent-launcher":"_agent-launcher_ok3k2_39","agent-launcher--expanded":"_agent-launcher--expanded_ok3k2_55","agent-launcher__badge-wrap":"_agent-launcher__badge-wrap_ok3k2_65","agent-launcher__badge":"_agent-launcher__badge_ok3k2_65","agent-launcher__art":"_agent-launcher__art_ok3k2_97","agent-launcher__glyph":"_agent-launcher__glyph_ok3k2_104","agent-launcher__message":"_agent-launcher__message_ok3k2_115","agent-launcher__expand":"_agent-launcher__expand_ok3k2_129","agent-launcher__halo":"_agent-launcher__halo_ok3k2_173","agent-launcher__halo--outer":"_agent-launcher__halo--outer_ok3k2_181","agent-launcher-pulse-outer":"_agent-launcher-pulse-outer_ok3k2_1","agent-launcher__halo--inner":"_agent-launcher__halo--inner_ok3k2_190","agent-launcher-pulse-inner":"_agent-launcher-pulse-inner_ok3k2_1"},VM=["aria-label"],qM=i.defineComponent({__name:"InAgentLauncher",props:{message:{default:""},pulse:{type:Boolean,default:!1},label:{default:"Open Design Agent"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=i.computed(()=>t.message.trim().length>0),o=i.computed(()=>a.value?`${t.label}: ${t.message}`:t.label);return(u,s)=>(i.openBlock(),i.createElementBlock("button",{type:"button","aria-label":o.value,class:i.normalizeClass([i.unref(Nr)["agent-launcher"],{[i.unref(Nr)["agent-launcher--expanded"]]:a.value}]),onClick:s[0]||(s[0]=d=>r("click"))},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Nr)["agent-launcher__badge-wrap"])},[t.pulse?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",{"aria-hidden":"true",class:i.normalizeClass([i.unref(Nr)["agent-launcher__halo"],i.unref(Nr)["agent-launcher__halo--outer"]])},null,2),i.createElementVNode("span",{"aria-hidden":"true",class:i.normalizeClass([i.unref(Nr)["agent-launcher__halo"],i.unref(Nr)["agent-launcher__halo--inner"]])},null,2)],64)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Nr)["agent-launcher__badge"])},[i.createVNode(i.unref(Le),{name:"agent-launcher-badge",class:i.normalizeClass(i.unref(Nr)["agent-launcher__art"]),size:48},null,8,["class"]),i.createVNode(i.unref(Le),{name:"agent-launcher-glyph",class:i.normalizeClass(i.unref(Nr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),a.value?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(Nr)["agent-launcher__message"])},i.toDisplayString(t.message),3)):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createBlock(i.unref(Le),{key:1,name:"line-full-screen",class:i.normalizeClass(i.unref(Nr)["agent-launcher__expand"]),size:24},null,8,["class"])):i.createCommentVNode("",!0)],10,VM))}});function j1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const gr={"in-agent-background":"_in-agent-background_11lux_39","in-agent-background__aurora":"_in-agent-background__aurora_11lux_49","in-agent-background__stage":"_in-agent-background__stage_11lux_56","in-agent-background--animated":"_in-agent-background--animated_11lux_65","agent-bg-aurora-intro":"_agent-bg-aurora-intro_11lux_1","in-agent-background__blob":"_in-agent-background__blob_11lux_89","in-agent-background__blob--pink":"_in-agent-background__blob--pink_11lux_99","agent-bg-drift1":"_agent-bg-drift1_11lux_1","in-agent-background__blob--purple":"_in-agent-background__blob--purple_11lux_109","agent-bg-drift2":"_agent-bg-drift2_11lux_1","in-agent-background__blob--blue":"_in-agent-background__blob--blue_11lux_119","agent-bg-drift3":"_agent-bg-drift3_11lux_1","in-agent-background__grain":"_in-agent-background__grain_11lux_171","in-agent-background--static":"_in-agent-background--static_11lux_179","in-agent-background--paused":"_in-agent-background--paused_11lux_184"},zM=180*1e3,ab=i.defineComponent({__name:"InAgentBackground",props:{animated:{type:Boolean,default:!1},static:{type:Boolean,default:!1}},setup(n){const e=n,t=["mousemove","keydown","pointerdown","wheel"],r=i.ref(null),a=i.ref(j1()),o=i.computed(()=>e.static||a.value),u=i.ref(typeof document<"u"&&document.hidden),s=i.ref(!1),d=i.computed(()=>u.value||s.value);let p=[],f=null,m=null,b=null,_=0,F=!1;const C=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,v=()=>{b!==null&&clearTimeout(b),b=setTimeout(()=>{s.value=!0},zM)},g=()=>{const M=Date.now();M-_<1e3||(_=M,s.value=!1,v())},y=()=>{p.forEach(M=>{M.cx=M.el.offsetLeft+M.el.offsetWidth/2})},S=M=>{f===null&&(f=requestAnimationFrame(()=>{f=null;const H=r.value;if(!H)return;const K=H.getBoundingClientRect(),oe=M.clientX-K.left,Z=.5-(M.clientY-K.top)/K.height;p.forEach(q=>{const te=((q.cx-oe)/K.width*q.depth).toFixed(1),ee=(Z*q.depth*.35).toFixed(1);q.el.style.transform=`translate3d(${te}px, ${ee}px, 0)`})}))},E=()=>{F||typeof window>"u"||(F=!0,window.addEventListener("mousemove",S,{passive:!0}),t.forEach(M=>{window.addEventListener(M,g,{passive:!0})}),v())},k=()=>{!F||typeof window>"u"||(F=!1,window.removeEventListener("mousemove",S),t.forEach(M=>{window.removeEventListener(M,g)}),b!==null&&(clearTimeout(b),b=null),p.forEach(M=>{M.el.style.transform=""}))},D=()=>{u.value=document.hidden},R=()=>{a.value=j1(),o.value?k():E()};return i.watch(o,M=>{M?k():E()}),i.onMounted(()=>{const M=r.value;M&&(p=Array.from(M.querySelectorAll("[data-agent-blob]")).map(H=>({el:H,depth:parseFloat(getComputedStyle(H).getPropertyValue("--depth"))||0,cx:0})),y()),o.value||E(),C==null||C.addEventListener("change",R),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&M&&(m=new ResizeObserver(y),m.observe(M))}),i.onUnmounted(()=>{k(),document.removeEventListener("visibilitychange",D),C==null||C.removeEventListener("change",R),f!==null&&cancelAnimationFrame(f),m==null||m.disconnect()}),(M,H)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"rootRef",ref:r,"aria-hidden":"true",class:i.normalizeClass([i.unref(gr)["in-agent-background"],{[i.unref(gr)["in-agent-background--animated"]]:e.animated,[i.unref(gr)["in-agent-background--static"]]:o.value,[i.unref(gr)["in-agent-background--paused"]]:d.value}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__aurora"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__stage"])},[i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--pink"]])},null,2),i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--purple"]])},null,2),i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--blue"]])},null,2)],2)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__grain"])},null,2)],2))}}),br={"in-agent-popup":"_in-agent-popup_uprwt_39","in-agent-popup__header":"_in-agent-popup__header_uprwt_51","in-agent-popup__brand":"_in-agent-popup__brand_uprwt_59","in-agent-popup__title":"_in-agent-popup__title_uprwt_65","in-agent-popup__badge":"_in-agent-popup__badge_uprwt_77","in-agent-popup__actions":"_in-agent-popup__actions_uprwt_91","in-agent-popup__separator":"_in-agent-popup__separator_uprwt_98","in-agent-popup__icon-button":"_in-agent-popup__icon-button_uprwt_104","in-agent-popup__surface":"_in-agent-popup__surface_uprwt_121","in-agent-popup__body":"_in-agent-popup__body_uprwt_128","in-agent-popup__footer":"_in-agent-popup__footer_uprwt_136"},jM=["aria-label","title"],UM=["aria-label","title"],HM=["aria-label","title"],WM=i.defineComponent({__name:"InAgentPopup",props:{title:{default:"Design Agent"},badgeText:{default:void 0},minimizeLabel:{default:"Minimize"},newChatLabel:{default:"Start New Chat"},academyLabel:{default:"Visit Academy"},showNewChat:{type:Boolean,default:!0},showAcademy:{type:Boolean,default:!0},showBackground:{type:Boolean,default:!0},backgroundAnimated:{type:Boolean,default:!1},backgroundStatic:{type:Boolean,default:!1}},emits:["minimize","split","newChat","academy"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("minimize")},o=()=>{r("newChat")},u=()=>{r("academy")};return(s,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup"])},[i.createElementVNode("header",{class:i.normalizeClass(i.unref(br)["in-agent-popup__header"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__brand"])},[i.renderSlot(s.$slots,"brand",{},()=>[i.createVNode(i.unref(Le),{name:"agent-brand",size:24})])],2),i.createElementVNode("h2",{class:i.normalizeClass(i.unref(br)["in-agent-popup__title"])},i.toDisplayString(t.title),3),i.renderSlot(s.$slots,"badge",{},()=>[t.badgeText?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(br)["in-agent-popup__badge"])},i.toDisplayString(t.badgeText),3)):i.createCommentVNode("",!0)]),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__actions"])},[i.renderSlot(s.$slots,"header-actions",{},()=>[t.showNewChat?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button","aria-label":s.newChatLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:o},[i.createVNode(i.unref(Le),{name:"line-ai-message-reply-plus",size:24})],10,jM)):i.createCommentVNode("",!0),t.showAcademy?(i.openBlock(),i.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[i.createVNode(i.unref(Le),{name:"agent-academy",size:24})],10,UM)):i.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(i.unref(br)["in-agent-popup__separator"])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:a},[i.createVNode(i.unref(Le),{name:"line-minus-netural",size:24})],10,HM)])],2)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__surface"])},[t.showBackground?(i.openBlock(),i.createBlock(ab,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__body"])},[i.renderSlot(s.$slots,"default")],2),s.$slots.footer?(i.openBlock(),i.createElementBlock("footer",{key:1,class:i.normalizeClass(i.unref(br)["in-agent-popup__footer"])},[i.renderSlot(s.$slots,"footer")],2)):i.createCommentVNode("",!0)],2)],2))}}),Un={"agent-welcome":"_agent-welcome_10z04_39","agent-welcome__intro":"_agent-welcome__intro_10z04_51","agent-welcome__greeting":"_agent-welcome__greeting_10z04_59","agent-welcome__title":"_agent-welcome__title_10z04_68","agent-welcome__categories":"_agent-welcome__categories_10z04_77","agent-welcome__category":"_agent-welcome__category_10z04_86","agent-welcome__category--selected":"_agent-welcome__category--selected_10z04_111","agent-welcome__category-icon":"_agent-welcome__category-icon_10z04_115","agent-welcome__category-label":"_agent-welcome__category-label_10z04_119","agent-welcome__cards":"_agent-welcome__cards_10z04_129","agent-welcome__quick-actions":"_agent-welcome__quick-actions_10z04_133","agent-welcome__quick-action":"_agent-welcome__quick-action_10z04_133","agent-welcome__rise--1":"_agent-welcome__rise--1_10z04_173","agent-welcome__rise-item":"_agent-welcome__rise-item_10z04_174","agent-welcome-rise":"_agent-welcome-rise_10z04_1"},GM=["aria-pressed","onClick"],ZM=["onClick"],YM=16,KM=.18,XM=.06,ld=260,ud="cubic-bezier(0.22, 1, 0.36, 1)",JM=i.defineComponent({__name:"InAgentWelcome",props:{greeting:{default:""},title:{default:""},categories:{default:()=>[]},selected:{default:null},quickActions:{default:()=>[]}},emits:["select","quick-action"],setup(n,{emit:e}){const t=n,r=e,a=m=>({"--rise-delay":`${KM+m*XM}s`}),o=i.inject("inAgentScrollContainer",i.ref(null)),u=i.inject("inAgentBottomInset",i.ref(0)),s=i.ref(null),d=i.ref(null),p=()=>{const m=o.value,b=d.value;if(!m||!b)return;const _=m.scrollTop+(b.getBoundingClientRect().bottom-m.getBoundingClientRect().top),F=m.scrollTop+m.clientHeight-u.value,C=_+YM-F;C<=1||m.scrollTo({top:Math.min(m.scrollTop+C,m.scrollHeight-m.clientHeight),behavior:"smooth"})},f=()=>{const m=s.value,b=o.value;if(!m)return;if(!t.selected||!b){m.style.marginTop="";return}const _=d.value,F=(_==null?void 0:_.firstElementChild)??null,C=(F==null?void 0:F.firstElementChild)??null,v=(C==null?void 0:C.getBoundingClientRect().height)??0,g=(_==null?void 0:_.getBoundingClientRect().height)??0,y=m.getBoundingClientRect().height-g+v,S=b.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(S-y)/2)}px`};return i.watch(u,()=>f()),i.onMounted(()=>f()),i.watch(()=>t.selected,async m=>{const b=s.value,_=(b==null?void 0:b.getBoundingClientRect().top)??0;if(await i.nextTick(),!b)return;if(f(),j1()){p();return}const F=_-b.getBoundingClientRect().top,C=[];Math.abs(F)>1&&C.push(b.animate([{transform:`translateY(${F}px)`},{transform:"translateY(0)"}],{duration:ld,easing:ud}));const v=d.value;m&&v&&C.push(v.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:ld,easing:ud})),Promise.all(C.map(g=>g.finished)).then(p).catch(()=>p())}),(m,b)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"rootRef",ref:s,class:i.normalizeClass(i.unref(Un)["agent-welcome"])},[i.createElementVNode("div",{class:i.normalizeClass([i.unref(Un)["agent-welcome__intro"],i.unref(Un)["agent-welcome__rise--1"]])},[t.greeting?(i.openBlock(),i.createElementBlock("p",{key:0,class:i.normalizeClass(i.unref(Un)["agent-welcome__greeting"])},i.toDisplayString(t.greeting),3)):i.createCommentVNode("",!0),t.title?(i.openBlock(),i.createElementBlock("p",{key:1,class:i.normalizeClass(i.unref(Un)["agent-welcome__title"])},i.toDisplayString(t.title),3)):i.createCommentVNode("",!0)],2),t.categories.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(Un)["agent-welcome__categories"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.categories,(_,F)=>(i.openBlock(),i.createElementBlock("button",{key:_.value,type:"button","aria-pressed":t.selected===_.value,class:i.normalizeClass([i.unref(Un)["agent-welcome__category"],i.unref(Un)["agent-welcome__rise-item"],{[i.unref(Un)["agent-welcome__category--selected"]]:t.selected===_.value}]),style:i.normalizeStyle(a(F)),onClick:C=>r("select",_.value)},[i.createVNode(i.unref(Le),{class:i.normalizeClass(i.unref(Un)["agent-welcome__category-icon"]),name:_.icon,size:24},null,8,["class","name"]),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Un)["agent-welcome__category-label"])},i.toDisplayString(_.label),3)],14,GM))),128))],2)):i.createCommentVNode("",!0),t.quickActions.length>0?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(i.unref(Un)["agent-welcome__quick-actions"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.quickActions,(_,F)=>(i.openBlock(),i.createElementBlock("button",{key:_.id,type:"button",class:i.normalizeClass([i.unref(Un)["agent-welcome__quick-action"],i.unref(Un)["agent-welcome__rise-item"]]),style:i.normalizeStyle(a(F)),onClick:C=>r("quick-action",_.prompt)},i.toDisplayString(_.label),15,ZM))),128))],2)):i.createCommentVNode("",!0),m.$slots.cards?(i.openBlock(),i.createElementBlock("div",{key:2,ref_key:"cardsRef",ref:d,class:i.normalizeClass(i.unref(Un)["agent-welcome__cards"])},[i.renderSlot(m.$slots,"cards")],2)):i.createCommentVNode("",!0)],2))}}),Ti={"in-blueprint-card":"_in-blueprint-card_1mlmh_39","in-blueprint-card__thumb":"_in-blueprint-card__thumb_1mlmh_58","in-blueprint-card__image":"_in-blueprint-card__image_1mlmh_64","in-blueprint-card__placeholder":"_in-blueprint-card__placeholder_1mlmh_70","in-blueprint-card__badge":"_in-blueprint-card__badge_1mlmh_81","in-blueprint-card__footer":"_in-blueprint-card__footer_1mlmh_95","in-blueprint-card__text":"_in-blueprint-card__text_1mlmh_101","in-blueprint-card__title":"_in-blueprint-card__title_1mlmh_108","in-blueprint-card__subtitle":"_in-blueprint-card__subtitle_1mlmh_117","in-blueprint-card__open":"_in-blueprint-card__open_1mlmh_126"},QM=["alt","src"],eV=i.defineComponent({__name:"InBlueprintCard",props:{title:{default:"Design preview"},subtitle:{default:void 0},imageUrl:{default:void 0},badgeText:{default:void 0}},emits:["open"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("open")},o=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),r("open"))};return(u,s)=>(i.openBlock(),i.createElementBlock("div",{role:"button",tabindex:"0",class:i.normalizeClass(i.unref(Ti)["in-blueprint-card"]),onClick:a,onKeydown:o},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__thumb"])},[t.imageUrl?(i.openBlock(),i.createElementBlock("img",{key:0,alt:t.title,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__image"]),src:t.imageUrl},null,10,QM)):i.renderSlot(u.$slots,"thumb",{key:1},()=>[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__placeholder"])},[i.createVNode(i.unref(Le),{name:"line-figma",size:24})],2)]),t.badgeText?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__badge"])},i.toDisplayString(t.badgeText),3)):i.createCommentVNode("",!0)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__footer"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__text"])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__title"])},i.toDisplayString(t.title),3),t.subtitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__subtitle"])},i.toDisplayString(t.subtitle),3)):i.createCommentVNode("",!0)],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__open"])},[i.createVNode(i.unref(Le),{name:"line-external-link",size:16})],2)],2)],34))}}),Wt={"agent-files-wrapper":"_agent-files-wrapper_8360b_39","agent-files__announcer":"_agent-files__announcer_8360b_44","agent-files__error-bubble":"_agent-files__error-bubble_8360b_56","agent-files":"_agent-files_8360b_39","agent-files--wrap":"_agent-files--wrap_8360b_106","agent-files__card":"_agent-files__card_8360b_113","agent-files__card--error":"_agent-files__card--error_8360b_127","agent-files__body":"_agent-files__body_8360b_131","agent-files__thumb":"_agent-files__thumb_8360b_139","agent-files__thumb--swatch":"_agent-files__thumb--swatch_8360b_148","agent-files__swatch-band":"_agent-files__swatch-band_8360b_154","agent-files__thumb--icon":"_agent-files__thumb--icon_8360b_159","agent-files__thumb--error":"_agent-files__thumb--error_8360b_166","agent-files__labels":"_agent-files__labels_8360b_174","agent-files__name":"_agent-files__name_8360b_187","agent-files__type":"_agent-files__type_8360b_188","agent-files__remove":"_agent-files__remove_8360b_202"},tV=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],nV=["alt","src"],rV=["aria-label","onClick"],iV=6,cd=20,dd=12,f6=i.defineComponent({__name:"InAgentFiles",props:{files:{default:()=>[]},removable:{type:Boolean,default:!0},wrap:{type:Boolean,default:!1},removeLabel:{default:"Remove"},errorFallbackLabel:{default:"This attachment could not be added."}},emits:["remove","open"],setup(n,{emit:e}){const t=n,r={color:"var(--ins-icon-default)"},a=e,o=i.ref(-1),u=M=>{var H;return((H=t.files[M])==null?void 0:H.status)==="error"},s=M=>(M==null?void 0:M.status)==="error"?M.errorMessage||t.errorFallbackLabel:"",d=i.computed(()=>u(o.value)?o.value:-1),p=i.computed(()=>s(t.files[d.value])),f=i.computed(()=>t.files.map(M=>s(M)).filter(Boolean).join(" ")),m=i.computed(()=>t.files.findIndex((M,H)=>u(H))),b=i.ref(null),_=i.ref(null),F=i.ref(null),C=i.ref([]),v=i.ref(0),g=i.ref(cd),y=(M,H,K)=>Math.min(Math.max(M,H),Math.max(H,K)),S=(M,H)=>{M instanceof HTMLElement&&(C.value[H]=M)},E=M=>{o.value=M},k=M=>{o.value===M&&(o.value=-1)},D=()=>{const M=b.value,H=_.value,K=F.value,oe=C.value[d.value];if(!M||!H||!K||!oe)return;const U=oe.offsetLeft-H.scrollLeft,Z=y(U,0,M.clientWidth-K.offsetWidth);v.value=Z,g.value=y(U+cd-Z,dd,K.offsetWidth-dd)},R=()=>{const M=_.value,H=C.value[m.value];if(!M||!H)return;const K=H.offsetLeft+H.offsetWidth;H.offsetLeft<M.scrollLeft?M.scrollLeft=H.offsetLeft:K>M.scrollLeft+M.clientWidth&&(M.scrollLeft=K-M.clientWidth)};return i.watch(d,()=>void i.nextTick(D)),i.watch(()=>[m.value,f.value,t.files.length],()=>void i.nextTick(()=>{C.value.length=t.files.length,R()})),i.watch(_,(M,H)=>{H==null||H.removeEventListener("scroll",D),M==null||M.addEventListener("scroll",D,{passive:!0})},{immediate:!0}),i.onBeforeUnmount(()=>{var M;(M=_.value)==null||M.removeEventListener("scroll",D)}),(M,H)=>t.files.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"wrapperRef",ref:b,class:i.normalizeClass(i.unref(Wt)["agent-files-wrapper"])},[p.value?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:F,role:"tooltip",class:i.normalizeClass(i.unref(Wt)["agent-files__error-bubble"]),style:i.normalizeStyle({left:`${v.value}px`,"--agent-files-arrow-left":`${g.value}px`})},i.toDisplayString(p.value),7)):i.createCommentVNode("",!0),i.createElementVNode("span",{"aria-live":"polite",role:"status",class:i.normalizeClass(i.unref(Wt)["agent-files__announcer"])},i.toDisplayString(f.value),3),i.createElementVNode("div",{ref_key:"stripRef",ref:_,class:i.normalizeClass([i.unref(Wt)["agent-files"],{[i.unref(Wt)["agent-files--wrap"]]:t.wrap}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.files,(K,oe)=>{var U;return i.openBlock(),i.createElementBlock("div",{key:K.id,ref_for:!0,ref:Z=>S(Z,oe),"data-testid":"agent-file-card",class:i.normalizeClass([i.unref(Wt)["agent-files__card"],{[i.unref(Wt)["agent-files__card--error"]]:K.status==="error"}]),onClick:Z=>a("open",K.id),onFocusin:Z=>E(oe),onFocusout:Z=>k(oe),onMouseenter:Z=>E(oe),onMouseleave:Z=>k(oe)},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Wt)["agent-files__body"])},[K.status==="loading"?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"]]),style:r},[i.createVNode(i.unref(Le),{name:"loading-circle",size:24})],2)):K.status==="error"?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"],i.unref(Wt)["agent-files__thumb--error"]])},[i.createVNode(i.unref(Le),{name:K.icon??"filled-error-box",size:24},null,8,["name"])],2)):(U=K.swatch)!=null&&U.length?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--swatch"]])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(K.swatch.slice(0,iV),(Z,q)=>(i.openBlock(),i.createElementBlock("span",{key:`${q}-${Z}`,class:i.normalizeClass(i.unref(Wt)["agent-files__swatch-band"]),style:i.normalizeStyle({background:Z})},null,6))),128))],2)):K.thumbnailUrl?(i.openBlock(),i.createElementBlock("img",{key:3,alt:K.name,class:i.normalizeClass(i.unref(Wt)["agent-files__thumb"]),src:K.thumbnailUrl},null,10,nV)):(i.openBlock(),i.createElementBlock("span",{key:4,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"]]),style:r},[K.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,name:K.icon,size:24},null,8,["name"])):i.createCommentVNode("",!0)],2)),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__labels"])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__name"])},i.toDisplayString(K.name),3),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__type"])},i.toDisplayString(K.type),3)],2),t.removable?(i.openBlock(),i.createElementBlock("button",{key:5,type:"button","aria-label":t.removeLabel,class:i.normalizeClass(i.unref(Wt)["agent-files__remove"]),onClick:i.withModifiers(Z=>a("remove",K.id),["stop"])},[i.createVNode(i.unref(Le),{name:"chip-close-6",size:6})],10,rV)):i.createCommentVNode("",!0)],2)],42,tV)}),128))],2)],2)):i.createCommentVNode("",!0)}}),Qt={"chat-input":"_chat-input_f0iah_40","chat-input__container":"_chat-input__container_f0iah_45","chat-input__container--focused":"_chat-input__container--focused_f0iah_75","chat-input__container--generating":"_chat-input__container--generating_f0iah_81","chat-input__gen-ring":"_chat-input__gen-ring_f0iah_88","chat-input__notice":"_chat-input__notice_f0iah_96","chat-input__notice--info":"_chat-input__notice--info_f0iah_109","chat-input__notice--warning":"_chat-input__notice--warning_f0iah_114","chat-input__notice-body":"_chat-input__notice-body_f0iah_118","chat-input__notice-icon":"_chat-input__notice-icon_f0iah_130","chat-input__notice-text":"_chat-input__notice-text_f0iah_138","chat-input__notice-count":"_chat-input__notice-count_f0iah_143","chat-input__text-area":"_chat-input__text-area_f0iah_149","chat-input__textarea":"_chat-input__textarea_f0iah_155","chat-input__toolbar":"_chat-input__toolbar_f0iah_177","chat-input__toolbar-left":"_chat-input__toolbar-left_f0iah_183","chat-input__actions":"_chat-input__actions_f0iah_189","chat-input__send-reason":"_chat-input__send-reason_f0iah_194","chat-input__icon-btn":"_chat-input__icon-btn_f0iah_223","chat-input__send-btn":"_chat-input__send-btn_f0iah_249","chat-input__files":"_chat-input__files_f0iah_276"},ho=[{p:.23,c:[250,58,58,0]},{p:.45,c:[250,58,58,1]},{p:.59,c:[118,48,212,1]},{p:.77,c:[118,48,212,0]}],aV=200,sV=4,oV=2600,Eu=2,lV=6;function uV(n){const[e]=ho,t=ho[ho.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<ho.length-1;r+=1){const a=ho[r],o=ho[r+1];if(n>=a.p&&n<=o.p){const u=(n-a.p)/(o.p-a.p);return[Math.round(a.c[0]+u*(o.c[0]-a.c[0])),Math.round(a.c[1]+u*(o.c[1]-a.c[1])),Math.round(a.c[2]+u*(o.c[2]-a.c[2])),a.c[3]+u*(o.c[3]-a.c[3])]}}return[0,0,0,0]}function cV(n){const{containerRef:e,ringRef:t,active:r}=n;let a=[],o=[],u=null,s=null,d=null;function p(){const F=e.value,C=t.value;if(!F||!C)return;const v=F.getBoundingClientRect(),g=v.width+Eu*2,y=v.height+Eu*2;if(!g||!y)return;C.setAttribute("viewBox",`0 0 ${g} ${y}`),C.setAttribute("width",String(g)),C.setAttribute("height",String(y));const S=1,E=Math.max(lV,1),k=g-S*2,D=y-S*2,R=k-2*E,M=D-2*E,H=Math.PI/2*E,K=2*R+2*M+4*H;function oe(ue){let w=ue;if(w<=R)return{x:E+w,y:0};if(w-=R,w<=H){const T=-Math.PI/2+w/E;return{x:k-E+E*Math.cos(T),y:E+E*Math.sin(T)}}if(w-=H,w<=M)return{x:k,y:E+w};if(w-=M,w<=H){const T=w/E;return{x:k-E+E*Math.cos(T),y:D-E+E*Math.sin(T)}}if(w-=H,w<=R)return{x:k-E-w,y:D};if(w-=R,w<=H){const T=Math.PI/2+w/E;return{x:E+E*Math.cos(T),y:D-E+E*Math.sin(T)}}if(w-=H,w<=M)return{x:0,y:D-E-w};w-=M;const A=Math.PI+w/E;return{x:E+E*Math.cos(A),y:E+E*Math.sin(A)}}const U="http://www.w3.org/2000/svg",Z=[],q=[],P=[{len:R,isArc:!1},{len:H,isArc:!0},{len:M,isArc:!1},{len:H,isArc:!0},{len:R,isArc:!1},{len:H,isArc:!0},{len:M,isArc:!1},{len:H,isArc:!0}],te=K/aV;let ee=0;for(const ue of P){const w=ue.isArc?sV:Math.max(1,Math.round(ue.len/te));for(let A=0;A<w;A+=1){const T=ee+ue.len*A/w,O=ee+ue.len*(A+1)/w,L=oe(T),z=oe(O),ne=`M ${(L.x+S).toFixed(2)} ${(L.y+S).toFixed(2)}`,de=`${(z.x+S).toFixed(2)} ${(z.y+S).toFixed(2)}`,W=document.createElementNS(U,"path");W.setAttribute("d",ue.isArc?`${ne} A ${E} ${E} 0 0 1 ${de}`:`${ne} L ${de}`),W.setAttribute("fill","none"),W.setAttribute("stroke","transparent"),W.setAttribute("stroke-width",String(Eu)),W.setAttribute("stroke-linecap","butt"),q.push(W),Z.push((T+O)/2/K)}ee+=ue.len}const re=document.createElementNS(U,"g");re.append(...q),C.replaceChildren(re),o=q,a=Z}function f(F){for(let C=0;C<a.length;C+=1){const v=((a[C]-F)%1+1)%1,[g,y,S,E]=uV(v);o[C].setAttribute("stroke",`rgba(${g},${y},${S},${E})`)}}function m(F){s===null&&(s=F),f((F-s)/oV%1),u=requestAnimationFrame(m)}function b(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),j1()?f(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!d&&(d=new ResizeObserver(()=>{r.value&&(p(),j1()&&f(0))}),d.observe(e.value)))}function _(){u!==null&&(cancelAnimationFrame(u),u=null),d==null||d.disconnect(),d=null}i.watch(r,F=>{F?b():_()}),i.onMounted(()=>{r.value&&b()}),i.onBeforeUnmount(_)}const dV=["disabled","placeholder","onKeydown"],fV=["disabled"],pV=["aria-label","disabled"],fd=120,hV=200,mV="Add context",gV=i.defineComponent({__name:"InAgentInput",props:{modelValue:{default:""},placeholder:{default:"Describe your idea to Design Agent"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxLength:{default:2e3},files:{default:()=>[]},allowEmptySend:{type:Boolean,default:!1},sendDisabledReason:{default:""},showGeneratingRing:{type:Boolean,default:!0}},emits:["update:modelValue","send","stop","attach","remove-file","open-file"],setup(n,{expose:e,emit:t}){const r=n,a=t,o=i.ref(null);e({focus:()=>{var U;(U=o.value)==null||U.focus()}});const u=i.ref(null),s=i.ref(null),d=i.ref(r.modelValue),p=i.ref(!1),f=i.computed(()=>r.loading&&r.showGeneratingRing);cV({containerRef:u,ringRef:s,active:f});const m=i.computed(()=>d.value.length),b=i.computed(()=>r.maxLength!==void 0&&m.value>r.maxLength),_=i.computed(()=>r.maxLength!==void 0&&m.value>=r.maxLength-hV),F=i.computed(()=>b.value?`Enter a prompt up to ${r.maxLength} characters to continue.`:`You can enter a prompt up to ${r.maxLength} characters.`),C=i.computed(()=>r.files.some(U=>U.status==="loading"||U.status==="error")),v=i.computed(()=>(d.value.trim().length>0||r.allowEmptySend)&&!b.value&&!r.loading&&!r.disabled&&!C.value),g=i.ref(!1),y=i.computed(()=>!!r.sendDisabledReason&&g.value&&!r.loading&&!v.value),S=()=>{const U=o.value;U!=null&&U.scrollHeight&&(U.style.height="auto",U.style.height=`${Math.min(U.scrollHeight,fd)}px`,U.style.overflowY=U.scrollHeight>fd?"auto":"hidden")};i.watch(()=>r.modelValue,U=>{U!==d.value&&(d.value=U,i.nextTick(S))});let E=null,k=0,D=null;const R=()=>{D===null&&(D=requestAnimationFrame(()=>{D=null,S()}))};i.onMounted(()=>{S(),!(typeof ResizeObserver>"u"||!o.value)&&(E=new ResizeObserver(U=>{var q;const Z=((q=U[U.length-1])==null?void 0:q.contentRect.width)??0;Z!==k&&(k=Z,R())}),E.observe(o.value))}),i.onBeforeUnmount(()=>{E==null||E.disconnect(),E=null,D!==null&&(cancelAnimationFrame(D),D=null)}),i.watch(d,U=>{a("update:modelValue",U)});const M=()=>{S()},H=()=>{v.value&&(a("send",d.value.trim()),d.value="",i.nextTick(S))},K=()=>{r.loading?a("stop"):H()},oe=()=>{a("attach")};return(U,Z)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Qt)["chat-input"])},[_.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass([i.unref(Qt)["chat-input__notice"],b.value?i.unref(Qt)["chat-input__notice--warning"]:i.unref(Qt)["chat-input__notice--info"]])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-body"])},[i.createVNode(i.unref(Le),{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-icon"]),name:b.value?"filled-caution-triangle-colored":"filled-info-circle",size:16},null,8,["class","name"]),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-text"])},i.toDisplayString(F.value),3)],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-count"])},i.toDisplayString(m.value)+"/"+i.toDisplayString(U.maxLength),3)],2)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"containerRef",ref:u,class:i.normalizeClass([i.unref(Qt)["chat-input__container"],{[i.unref(Qt)["chat-input__container--focused"]]:p.value,[i.unref(Qt)["chat-input__container--generating"]]:f.value}])},[i.withDirectives((i.openBlock(),i.createElementBlock("svg",{ref_key:"genRingRef",ref:s,"aria-hidden":"true",class:i.normalizeClass(i.unref(Qt)["chat-input__gen-ring"])},null,2)),[[i.vShow,f.value]]),U.$slots.attachments||r.files.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(Qt)["chat-input__files"])},[i.renderSlot(U.$slots,"attachments"),r.files.length>0?(i.openBlock(),i.createBlock(f6,{key:0,files:r.files,onOpen:Z[0]||(Z[0]=q=>a("open-file",q)),onRemove:Z[1]||(Z[1]=q=>a("remove-file",q))},null,8,["files"])):i.createCommentVNode("",!0)],2)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__text-area"])},[i.withDirectives(i.createElementVNode("textarea",{ref_key:"textareaRef",ref:o,rows:"1",class:i.normalizeClass(i.unref(Qt)["chat-input__textarea"]),disabled:U.disabled,placeholder:U.placeholder,"onUpdate:modelValue":Z[2]||(Z[2]=q=>d.value=q),onBlur:Z[3]||(Z[3]=q=>p.value=!1),onFocus:Z[4]||(Z[4]=q=>p.value=!0),onInput:M,onKeydown:[i.withKeys(i.withModifiers(H,["exact","prevent"]),["enter"]),Z[5]||(Z[5]=i.withKeys(i.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,dV),[[i.vModelText,d.value]])],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__toolbar"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__toolbar-left"])},[i.createElementVNode("button",{type:"button","aria-label":mV,class:i.normalizeClass(i.unref(Qt)["chat-input__icon-btn"]),disabled:U.disabled,onClick:oe},[i.createVNode(i.unref(Le),{name:"line-plus-netural",size:24})],10,fV)],2),i.createElementVNode("div",{"data-testid":"agent-send-actions",class:i.normalizeClass(i.unref(Qt)["chat-input__actions"]),onMouseenter:Z[6]||(Z[6]=q=>g.value=!0),onMouseleave:Z[7]||(Z[7]=q=>g.value=!1)},[y.value?(i.openBlock(),i.createElementBlock("div",{key:0,role:"tooltip",class:i.normalizeClass(i.unref(Qt)["chat-input__send-reason"])},i.toDisplayString(U.sendDisabledReason),3)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button","aria-label":U.loading?"Stop":"Send",class:i.normalizeClass(i.unref(Qt)["chat-input__send-btn"]),disabled:!v.value&&!U.loading,onClick:K},[i.createVNode(i.unref(Le),{name:U.loading?"line-ai-stop-solid":"line-architect-segments-sent",size:24},null,8,["name"])],10,pV)],34)],2)],2)],2))}}),Bi={"chat-edit-form":"_chat-edit-form_k9306_39","chat-edit-form--active":"_chat-edit-form--active_k9306_52","chat-edit-form__body":"_chat-edit-form__body_k9306_60","chat-edit-form__border":"_chat-edit-form__border_k9306_65","chat-edit-form__input":"_chat-edit-form__input_k9306_71","chat-edit-form__actions":"_chat-edit-form__actions_k9306_84","chat-edit-form__button":"_chat-edit-form__button_k9306_92","chat-edit-form__button--cancel":"_chat-edit-form__button--cancel_k9306_103","chat-edit-form__button--update":"_chat-edit-form__button--update_k9306_112"},bV=["tabindex","onKeydown"],yV=["tabindex"],vV=["disabled","tabindex"],sb=i.defineComponent({__name:"InChatEditForm",props:{content:{default:""},active:{type:Boolean,default:!1},cancelLabel:{default:"Cancel"},updateLabel:{default:"Update"}},emits:["cancel","update"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(t.content),o=i.ref(null),u=i.computed(()=>a.value.trim()),s=i.computed(()=>u.value!==""&&u.value!==t.content);i.watch(()=>t.active,p=>{p&&(a.value=t.content,i.nextTick(()=>{var f;(f=o.value)==null||f.focus()}))},{immediate:!0});const d=()=>{s.value&&r("update",u.value)};return(p,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(Bi)["chat-edit-form"],{[i.unref(Bi)["chat-edit-form--active"]]:t.active}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__body"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__border"])},[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:o,type:"text",class:i.normalizeClass(i.unref(Bi)["chat-edit-form__input"]),tabindex:t.active?0:-1,"onUpdate:modelValue":f[0]||(f[0]=m=>a.value=m),onKeydown:[i.withKeys(i.withModifiers(d,["prevent"]),["enter"]),f[1]||(f[1]=i.withKeys(m=>r("cancel"),["esc"]))]},null,42,bV),[[i.vModelText,a.value]])],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__actions"])},[i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(Bi)["chat-edit-form__button"],i.unref(Bi)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:f[2]||(f[2]=m=>r("cancel"))},i.toDisplayString(t.cancelLabel),11,yV),i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(Bi)["chat-edit-form__button"],i.unref(Bi)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:d},i.toDisplayString(t.updateLabel),11,vV)],2)],2)],2))}}),_V=56;function ob(n,e){return n-e<_V?"bottom center":"top center"}function p6(){const n=i.inject("inAgentScrollContainer",i.ref(null)),e=i.ref("top center");return{tooltipPosition:e,onActionsEnter:r=>{const a=n==null?void 0:n.value,o=r.currentTarget;!a||!o||(e.value=ob(o.getBoundingClientRect().top,a.getBoundingClientRect().top))}}}const ai={"in-chat-bubble":"_in-chat-bubble_1jarf_39","in-chat-bubble__view":"_in-chat-bubble__view_1jarf_47","in-chat-bubble__view--hidden":"_in-chat-bubble__view--hidden_1jarf_55","in-chat-bubble__row":"_in-chat-bubble__row_1jarf_63","in-chat-bubble__actions":"_in-chat-bubble__actions_1jarf_71","in-chat-bubble__action":"_in-chat-bubble__action_1jarf_71","in-chat-bubble__bubble":"_in-chat-bubble__bubble_1jarf_113","in-chat-bubble__text":"_in-chat-bubble__text_1jarf_120","in-chat-bubble__timestamp":"_in-chat-bubble__timestamp_1jarf_130","in-chat-bubble__files":"_in-chat-bubble__files_1jarf_140"},wV=["aria-label"],CV=["aria-label","disabled"],EV=i.defineComponent({__name:"InChatBubble",props:{content:{default:""},timestamp:{default:()=>Date.now()},authorLabel:{default:"You"},showTimestamp:{type:Boolean,default:!0},showCopy:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:!1},editDisabled:{type:Boolean,default:!1},copied:{type:Boolean,default:!1},copyLabel:{default:"Copy"},editLabel:{default:"Edit"},cancelLabel:{default:"Cancel"},updateLabel:{default:"Update"},files:{default:()=>[]}},emits:["copy","edit","cancel-edit","update","open-file"],setup(n,{emit:e}){var f;const t=n,r=e,a=i.computed(()=>{const m=new Date(t.timestamp);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hourCycle:"h23"})}),o=i.computed(()=>t.copied?"line-check-natural":"line-copy"),{tooltipPosition:u,onActionsEnter:s}=p6(),d=i.computed(()=>u.value.startsWith("bottom")?"bottom":"top"),p=((f=i.getCurrentInstance())==null?void 0:f.uid)??0;return(m,b)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble"])},[t.files.length>0?(i.openBlock(),i.createBlock(f6,{key:0,wrap:"",class:i.normalizeClass(i.unref(ai)["in-chat-bubble__files"]),files:t.files,removable:!1,onOpen:b[0]||(b[0]=_=>r("open-file",_))},null,8,["class","files"])):i.createCommentVNode("",!0),m.editable?(i.openBlock(),i.createBlock(sb,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:b[1]||(b[1]=_=>r("cancel-edit")),onUpdate:b[2]||(b[2]=_=>r("update",_))},null,8,["active","cancel-label","content","update-label"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass([i.unref(ai)["in-chat-bubble__view"],{[i.unref(ai)["in-chat-bubble__view--hidden"]]:m.editing}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__row"]),onMouseenter:b[5]||(b[5]=(..._)=>i.unref(s)&&i.unref(s)(..._))},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__actions"])},[m.showCopy?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:`in-chat-bubble-copy-${i.unref(p)}`,placement:d.value,text:m.copyLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":m.copyLabel,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__action"]),onClick:b[3]||(b[3]=_=>r("copy"))},[i.createVNode(i.unref(Le),{name:o.value,size:24},null,8,["name"])],10,wV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0),m.editable?(i.openBlock(),i.createBlock(i.unref(Ii),{key:1,id:`in-chat-bubble-edit-${i.unref(p)}`,placement:d.value,text:m.editLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":m.editLabel,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:b[4]||(b[4]=_=>r("edit"))},[i.createVNode(i.unref(Le),{name:"line-edit",size:24})],10,CV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__bubble"])},[i.renderSlot(m.$slots,"default",{},()=>[i.createElementVNode("span",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__text"])},i.toDisplayString(m.content),3)])],2)],34),m.showTimestamp?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__timestamp"])},i.toDisplayString(m.authorLabel)+" · "+i.toDisplayString(a.value),3)):i.createCommentVNode("",!0)],2)],2))}});function b0(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function kV(n){const e=new n.Renderer;return e.link=function(r){const a=r.title?` title="${r.title}"`:"";return`<a href="${r.href}"${a} target="_blank" rel="noopener noreferrer">${r.text}</a>`},e.code=function(r){const[a]=(r.lang??"").trim().split(/\s+/);return`<div class="md-code"><div class="md-code__header"><span class="md-code__lang">${b0(a)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${b0(r.text)}</code></pre></div>`},e}let L1=null,ku=null;const lb=i.ref(!1);function AV(){L1!==null||ku!==null||(ku=Promise.all([Promise.resolve().then(()=>Tee),Promise.resolve().then(()=>ute)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:kV(t),breaks:!0,gfm:!0}),L1={marked:t,purify:e.default},lb.value=!0}).catch(n=>{ku=null,console.warn("Markdown renderer failed to load:",n)}))}function y0(n){var r,a,o,u;const e=(a=(r=n.target).closest)==null?void 0:a.call(r,".md-code__copy");if(!(e instanceof HTMLButtonElement))return;const t=((u=(o=e.closest(".md-code"))==null?void 0:o.querySelector("code"))==null?void 0:u.textContent)??"";navigator.clipboard.writeText(t).then(()=>{e.textContent="Copied!",window.setTimeout(()=>{e.textContent="Copy"},1500)}).catch(s=>console.warn("Copy failed:",s))}const v0=/^(\s*)`([^`]+)`\s*$/;function SV(n,e){const t=[];let r=0,a=e;for(;a<n.length;){const o=n[a].match(v0);if(o)t.push(o[1]+o[2]),r+=1,a+=1;else if(n[a].trim()===""){let u=a;for(;u<n.length&&n[u].trim()==="";)u+=1;if(u>=n.length||!v0.test(n[u]))break;for(;a<u;)t.push(""),a+=1}else break}return{run:t,codeCount:r,end:a}}function DV(n){const e=n.split(`
|
|
211
|
+
`,MP=i.defineComponent({__name:"OnsiteMonacoEditor",props:{language:{default:"javascript"},code:{default:""},disableValidation:{type:Boolean,default:!1},monacoVsPath:{},editorOptions:{default:()=>({})},errorGlyph:{type:Boolean,default:!1},placeholder:{default:""},nonce:{}},emits:["update:codeEditorLength","update:shouldShowLengthError","update:valid","ready","destroyed"],setup(n,{expose:e,emit:t}){const r=t,a=n,o=i.ref(null);let u,s=!1;const d=i.computed(()=>({...NP,...a.editorOptions}));function p(){var y,S,E;const F=(y=o.value)==null?void 0:y.$el,C=F==null?void 0:F.contentDocument,v=(S=F==null?void 0:F.contentWindow)==null?void 0:S.monaco;if(!C||!v||C.head.querySelector(`style[${ad}]`))return;const g=C.createElement("style");g.setAttribute(ad,""),a.nonce&&g.setAttribute("nonce",a.nonce),g.textContent=PP,C.head.appendChild(g),(E=C.fonts)==null||E.load(IP).then(()=>{s||v.editor.remeasureFonts()}).catch(()=>{})}function f(F){u=F,p(),r("ready",F)}function m(){u=void 0,r("destroyed")}return i.onUnmounted(()=>{s=!0}),e({getCode:async()=>!u||!o.value?{code:"",valid:!1}:o.value.getCode(),getValue:()=>(u==null?void 0:u.getValue())??""}),(F,C)=>(i.openBlock(),i.createBlock(xg,{ref_key:"inner",ref:o,code:F.code,"disable-validation":F.disableValidation,"editor-options":d.value,"error-glyph":F.errorGlyph,language:F.language,"monaco-vs-path":F.monacoVsPath,placeholder:F.placeholder,onDestroyed:m,onReady:f,"onUpdate:codeEditorLength":C[0]||(C[0]=v=>r("update:codeEditorLength",v)),"onUpdate:shouldShowLengthError":C[1]||(C[1]=v=>r("update:shouldShowLengthError",v)),"onUpdate:valid":C[2]||(C[2]=v=>r("update:valid",v))},null,8,["code","disable-validation","editor-options","error-glyph","language","monaco-vs-path","placeholder"]))}}),VP="_wrapper_efha2_39",qP="_button_efha2_46",zP="_button__label_efha2_75",jP="_button__icon_efha2_78",zt={wrapper:VP,"wrapper--horizontal":"_wrapper--horizontal_efha2_43",button:qP,"button--first":"_button--first_efha2_49","button--last":"_button--last_efha2_52","wrapper--vertical":"_wrapper--vertical_efha2_55","wrapper--disabled":"_wrapper--disabled_efha2_67","wrapper--icon-only":"_wrapper--icon-only_efha2_71",button__label:zP,button__icon:jP,"wrapper--label-only":"_wrapper--label-only_efha2_81","button--selected":"_button--selected_efha2_107","button--disabled":"_button--disabled_efha2_127","wrapper--small":"_wrapper--small_efha2_140"},UP=["data-mode","disabled","onClick"],HP=["data-mode","disabled","onClick"],WP=i.defineComponent({__name:"SegmentButton",props:{size:{default:"default"},orientation:{default:"horizontal"},disabled:{type:Boolean,default:!1},segments:{},iconOnly:{type:Boolean,default:!1},labelOnly:{type:Boolean,default:!1},modelValue:{}},emits:["update:modelValue","click"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(t.modelValue||""),o=u=>{t.disabled||u.disabled||(r("update:modelValue",u.value),r("click",u.value))};return i.watch(()=>t.modelValue,u=>{a.value!==u&&(a.value=u||"")}),i.watch(()=>t.segments,u=>{u.some(s=>s.value===a.value)||(a.value="",r("update:modelValue",""))},{deep:!0}),(u,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(zt).wrapper,i.unref(zt)[`wrapper--${u.orientation}`],i.unref(zt)[`wrapper--${u.size}`],{[i.unref(zt)["wrapper--disabled"]]:u.disabled,[i.unref(zt)["wrapper--icon-only"]]:u.iconOnly,[i.unref(zt)["wrapper--label-only"]]:u.labelOnly}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.segments,(d,p)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:`${d.value}-${p}`},[d.tooltip?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:`segment-tooltip-${d.value}-${p}`,text:d.tooltip},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(zt).button,{[i.unref(zt)["button--selected"]]:d.value===a.value,[i.unref(zt)["button--disabled"]]:d.disabled||u.disabled,[i.unref(zt)["button--first"]]:p===0,[i.unref(zt)["button--last"]]:p===u.segments.length-1}]),"data-mode":d.mode,disabled:d.disabled||u.disabled,onClick:f=>o(d)},[u.iconOnly&&d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon,size:24},null,8,["class","name"])):i.createCommentVNode("",!0),u.labelOnly&&d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon},null,8,["class","name"])):i.createCommentVNode("",!0),d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)],10,UP)]),_:2},1032,["id","text"])):(i.openBlock(),i.createElementBlock("button",{key:1,type:"button",class:i.normalizeClass([i.unref(zt).button,{[i.unref(zt)["button--selected"]]:d.value===a.value,[i.unref(zt)["button--disabled"]]:d.disabled||u.disabled,[i.unref(zt)["button--first"]]:p===0,[i.unref(zt)["button--last"]]:p===u.segments.length-1}]),"data-mode":d.mode,disabled:d.disabled||u.disabled,onClick:f=>o(d)},[u.iconOnly&&d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon,size:24},null,8,["class","name"])):i.createCommentVNode("",!0),u.labelOnly&&d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(i.openBlock(),i.createElementBlock(i.Fragment,{key:2},[d.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,class:i.normalizeClass(i.unref(zt).button__icon),name:d.icon},null,8,["class","name"])):i.createCommentVNode("",!0),d.label?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(zt).button__label)},i.toDisplayString(d.label),3)):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0)],10,HP))],64))),128))],2))}}),GP="_wrapper__counter_1ynlu_1",ZP="_wrapper__errorMessage_1ynlu_1",YP="_wrapper__label_1ynlu_1",KP="_wrapper__field_1ynlu_1",XP="_wrapper_1ynlu_1",JP="_wrapper__bottom_1ynlu_93",xi={wrapper__counter:GP,wrapper__errorMessage:ZP,wrapper__label:YP,wrapper__field:KP,wrapper:XP,wrapper__bottom:JP,"wrapper--error":"_wrapper--error_1ynlu_106","wrapper--primary":"_wrapper--primary_1ynlu_109","wrapper--smart":"_wrapper--smart_1ynlu_117"},QP=["for"],eM=["id","maxlength","name","placeholder","value"],tM=["id","maxlength","name","placeholder","value"],nM=i.defineComponent({__name:"TextInput",props:{id:{},name:{},modelValue:{default:""},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},maxHeight:{default:void 0},error:{default:""},multiline:{type:Boolean,default:!1},autoGrow:{type:Boolean,default:!1},counter:{type:Boolean},mode:{default:"primary"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(null),o=()=>{if(t.autoGrow&&a.value){a.value.style.height="";const s=Math.min(a.value.scrollHeight,t.maxHeight||a.value.scrollHeight);a.value.style.height=`${s}px`}},u=s=>{const d=s.target;r("input",s),r("update:modelValue",d.value),o()};return i.onMounted(()=>{o()}),(s,d)=>{var p;return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(xi).wrapper,i.unref(xi)[`wrapper--${t.mode}`]])},[s.label?(i.openBlock(),i.createElementBlock("label",{key:0,class:i.normalizeClass(i.unref(xi).wrapper__label),for:s.id},i.toDisplayString(s.label),11,QP)):i.createCommentVNode("",!0),s.multiline?(i.openBlock(),i.createElementBlock("textarea",{key:1,id:s.id,ref_key:"textareaRef",ref:a,class:i.normalizeClass([i.unref(xi).wrapper__field,{[i.unref(xi)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,style:i.normalizeStyle(s.maxHeight?{maxHeight:`${s.maxHeight}px`}:void 0),value:s.modelValue,onBlur:d[0]||(d[0]=f=>r("blur",f)),onChange:d[1]||(d[1]=f=>s.$emit("change",f)),onFocus:d[2]||(d[2]=f=>r("focus",f)),onInput:u,onPaste:d[3]||(d[3]=f=>r("paste",f))},null,46,eM)):(i.openBlock(),i.createElementBlock("input",{key:2,id:s.id,type:"text",class:i.normalizeClass([i.unref(xi).wrapper__field,{[i.unref(xi)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:d[4]||(d[4]=f=>r("blur",f)),onChange:d[5]||(d[5]=f=>s.$emit("change",f)),onFocus:d[6]||(d[6]=f=>r("focus",f)),onInput:u,onPaste:d[7]||(d[7]=f=>r("paste",f))},null,42,tM)),i.createElementVNode("div",{class:i.normalizeClass(i.unref(xi).wrapper__bottom)},[s.error?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(xi).wrapper__errorMessage)},i.toDisplayString(s.error),3)):i.createCommentVNode("",!0),s.counter?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(i.unref(xi).wrapper__counter)},i.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):i.createCommentVNode("",!0)],2)],2)}}}),rM="_wrapper_14neq_39",iM="_wrapper__label_14neq_46",aM="_wrapper__input_14neq_70",sM="_wrapper_checked_14neq_80",oM="_wrapper_disabled_14neq_87",b1={wrapper:rM,wrapper__label:iM,wrapper__input:aM,wrapper_checked:sM,wrapper_disabled:oM},lM=["id","checked","disabled","name"],uM=["for"],cM=i.defineComponent({__name:"Toggle",props:{id:{},name:{},checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("click",!t.checked)};return(o,u)=>(i.openBlock(),i.createElementBlock("fieldset",{class:i.normalizeClass([i.unref(b1).wrapper,{[i.unref(b1).wrapper_checked]:o.checked,[i.unref(b1).wrapper_disabled]:o.disabled}])},[i.createElementVNode("input",{id:o.id,type:"checkbox",checked:o.checked,class:i.normalizeClass(i.unref(b1).wrapper__input),disabled:o.disabled,name:o.name,onClick:a},null,10,lM),i.createElementVNode("label",{class:i.normalizeClass(i.unref(b1).wrapper__label),for:o.id},null,10,uM)],2))}}),dM={class:"ab-toast__text"},fM=["aria-label"],pM=i.defineComponent({__name:"Toast",props:{modelValue:{type:Boolean},text:{},variant:{default:"info"},duration:{default:4e3},icon:{default:void 0},closeAriaLabel:{default:"Close notification"}},emits:["update:modelValue","dismiss"],setup(n,{emit:e}){const t=n,r=e,a={info:"filled-info-circle",error:"filled-error-box",warning:"filled-caution-triangle"},o=i.computed(()=>t.icon??a[t.variant]);let u=null;function s(){u&&(clearTimeout(u),u=null)}function d(){s(),r("update:modelValue",!1),r("dismiss")}function p(){s(),!(t.duration<=0)&&(u=setTimeout(()=>{d()},t.duration))}return i.watch(()=>t.modelValue,f=>{f?p():s()},{immediate:!0}),i.onBeforeUnmount(s),(f,m)=>(i.openBlock(),i.createBlock(i.Transition,{name:"ab-toast"},{default:i.withCtx(()=>[f.modelValue?(i.openBlock(),i.createElementBlock("div",{key:0,"aria-live":"polite",class:i.normalizeClass(["ab-toast",`ab-toast--${f.variant}`]),role:"status"},[i.createVNode(Le,{class:"ab-toast__icon",name:o.value,size:24},null,8,["name"]),i.createElementVNode("span",dM,i.toDisplayString(f.text),1),i.createElementVNode("button",{class:"ab-toast__close",type:"button","aria-label":f.closeAriaLabel,onClick:d},[i.createVNode(Le,{name:"line-close-netural",size:24})],8,fM)],2)):i.createCommentVNode("",!0)]),_:1}))}}),hM=bt(pM,[["__scopeId","data-v-04e14d8c"]]),mM=["id"],gM={class:"ab-onsite-toolbar__wrapper"},bM={key:0,class:"ab-onsite-toolbar__close"},yM=i.defineComponent({__name:"OnsiteToolbar",props:{id:{default:void 0}},setup(n){return(e,t)=>(i.openBlock(),i.createElementBlock("div",{id:e.id,class:"ab-onsite-toolbar",role:"toolbar"},[i.createElementVNode("div",gM,[i.renderSlot(e.$slots,"default",{},void 0,!0)]),e.$slots.close?(i.openBlock(),i.createElementBlock("div",bM,[i.renderSlot(e.$slots,"close",{},void 0,!0)])):i.createCommentVNode("",!0)],8,mM))}}),vM=bt(yM,[["__scopeId","data-v-392ba9d4"]]),od={"line-shapes-add":{d:"M9.14258 13C10.1683 13 11 13.8318 11 14.8574V19.1426C11 20.1683 10.1683 21 9.14258 21H4.85742C3.83175 21 3 20.1683 3 19.1426V14.8574C3 13.8318 3.83175 13 4.85742 13H9.14258ZM17 13C17.5523 13 18 13.4477 18 14V16H20C20.5523 16 21 16.4477 21 17C21 17.5523 20.5523 18 20 18H18V20C18 20.5523 17.5523 21 17 21C16.4477 21 16 20.5523 16 20V18H14C13.4477 18 13 17.5523 13 17C13 16.4477 13.4477 16 14 16H16V14C16 13.4477 16.4477 13 17 13ZM5 19H9V15H5V19ZM12 3C14.2091 3 16 4.79086 16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3ZM12 5C10.8954 5 10 5.89543 10 7C10 8.10457 10.8954 9 12 9C13.1046 9 14 8.10457 14 7C14 5.89543 13.1046 5 12 5Z"},"line-paint-brush":{d:"M7.9541 12.9912C8.3415 13.0145 8.71985 13.1143 9.07129 13.2822C9.47224 13.4738 9.82772 13.7487 10.1201 14.085C10.4123 14.4211 10.6375 14.8133 10.7891 15.2354C10.9403 15.6564 11.0166 16.1037 11.0156 16.5527L11.0107 16.7695C10.9113 19.0026 9.28332 20.9862 7.04004 20.9863C5.47103 20.9863 4.17116 19.9236 3.31348 18.9277L3.3125 18.9287C3.10333 18.6897 2.91867 18.2839 3.07031 17.8135C3.18404 17.4611 3.43843 17.2587 3.53613 17.1846C3.65966 17.0909 3.79506 17.0135 3.88867 16.9619C4.01898 16.89 4.0658 16.8676 4.17969 16.8037C4.37028 16.6968 4.47797 16.6189 4.53613 16.5566C4.54415 16.548 4.54909 16.54 4.55273 16.5352C4.56124 14.7064 5.87634 12.9863 7.78418 12.9863H7.78809L7.9541 12.9912ZM7.78223 14.9863C7.22709 14.9876 6.55285 15.5509 6.55273 16.5527C6.55273 17.4557 5.98056 18.007 5.53418 18.3164C6.05812 18.7475 6.57639 18.9863 7.04004 18.9863C7.9972 18.9862 9.01562 18.0402 9.01562 16.5527V16.5498C9.01624 16.3281 8.97885 16.1106 8.90723 15.9111C8.83559 15.7117 8.7325 15.538 8.61035 15.3975C8.48846 15.2573 8.35034 15.1545 8.20898 15.0869C8.06883 15.02 7.92423 14.9872 7.78223 14.9863ZM17.792 3.98633C18.2159 3.983 18.6369 4.06407 19.0293 4.22461C19.4217 4.38525 19.7791 4.62214 20.0791 4.92187C20.3791 5.22162 20.6165 5.57834 20.7773 5.9707C20.9382 6.36307 21.019 6.78398 21.0156 7.20801C21.0122 7.63197 20.9238 8.05169 20.7568 8.44141C20.592 8.82576 20.3525 9.17343 20.0537 9.46582L20.0547 9.4668L13.8389 15.6924C13.4488 16.0832 12.8157 16.0843 12.4248 15.6943C12.034 15.3042 12.0337 14.6711 12.4238 14.2803L18.6396 8.05371L18.6514 8.04101C18.7652 7.93068 18.8565 7.79891 18.9189 7.65332C18.9813 7.50769 19.0143 7.35073 19.0156 7.19238C19.0169 7.03396 18.9868 6.87616 18.9268 6.72949C18.8666 6.58275 18.7773 6.44913 18.665 6.33691C18.5528 6.22478 18.4194 6.13539 18.2725 6.07519C18.1256 6.01507 17.9674 5.98515 17.8086 5.98633C17.6497 5.98759 17.4917 6.02056 17.3457 6.08301C17.1997 6.14549 17.0675 6.23674 16.957 6.35059C16.9533 6.35443 16.9491 6.35852 16.9453 6.3623L10.7217 12.5732C10.3308 12.9631 9.69771 12.963 9.30762 12.5723C8.91749 12.1813 8.91865 11.5474 9.30957 11.1572L15.5322 4.94629V4.94726C15.8251 4.64814 16.1746 4.40888 16.5596 4.24414C16.9492 4.07755 17.3683 3.98974 17.792 3.98633Z"},"line-menu-dashboards":{d:"M21 9C21 10.1046 20.1046 11 19 11L5 11C3.89543 11 3 10.1046 3 9L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 9ZM13 19C13 20.1046 12.1046 21 11 21L5 21C3.89543 21 3 20.1046 3 19L3 15C3 13.8954 3.89543 13 5 13L11 13C12.1046 13 13 13.8954 13 15L13 19ZM5 5L5 9L19 9L19 5L5 5ZM5 15L5 19L11 19L11 15L5 15ZM21 19C21 20.1046 20.1046 21 19 21L17 21C15.8954 21 15 20.1046 15 19L15 15C15 13.8954 15.8954 13 17 13L19 13C20.1046 13 21 13.8954 21 15L21 19ZM17 15L17 19L19 19L19 15L17 15Z"},"text-icon":{d:"M20 3C20.5523 3 21 3.44772 21 4V7C21 7.55228 20.5523 8 20 8C19.4477 8 19 7.55228 19 7V5H13V19H15C15.5523 19 16 19.4477 16 20C16 20.5523 15.5523 21 15 21H9C8.44772 21 8 20.5523 8 20C8 19.4477 8.44772 19 9 19H11V5H5V7C5 7.55228 4.55228 8 4 8C3.44772 8 3 7.55228 3 7V4C3 3.44772 3.44772 3 4 3H20Z"},"line-more-vertical":{d:"M12 17C13.1046 17 14 17.8954 14 19C14 20.1046 13.1046 21 12 21C10.8954 21 10 20.1046 10 19C10 17.8954 10.8954 17 12 17ZM12 10C13.1046 10 14 10.8954 14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10ZM12 3C13.1046 3 14 3.89543 14 5C14 6.10457 13.1046 7 12 7C10.8954 7 10 6.10457 10 5C10 3.89543 10.8954 3 12 3Z"}};function _M(n){return n&&n in od?od[n]:void 0}const d6=(n,{slots:e})=>{var t;if(!n.text){const r=(t=e.default)==null?void 0:t.call(e);return(r==null?void 0:r.length)===1?r[0]:r}return i.h($o,{id:n.tooltipId,text:n.text,placement:"bottom",preventXss:!0},{default:()=>{var r;return(r=e.default)==null?void 0:r.call(e)}})};d6.props=["tooltipId","text"];const wM=["id","aria-haspopup","aria-label","aria-pressed","disabled"],CM={key:0,"aria-hidden":"true",class:"icon ab-onsite-toolbar-button__icon",fill:"currentColor",height:"24px",viewBox:"0 0 24 24",width:"24px"},EM=["d"],kM={key:2,class:"ab-onsite-toolbar-button__label"},AM=i.defineComponent({inheritAttrs:!1,__name:"OnsiteToolbarButton",props:{id:{},icon:{default:void 0},label:{default:void 0},tooltip:{default:void 0},size:{default:"small"},mode:{default:"primary"},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hasMenu:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=i.computed(()=>_M(t.icon)),o=i.computed(()=>!t.label),u=i.computed(()=>o.value?t.tooltip:void 0),s=i.computed(()=>["ab-onsite-toolbar-button",`ab-onsite-toolbar-button--${t.size}`,`ab-onsite-toolbar-button--${t.mode}`,{"ab-onsite-toolbar-button--icon-only":o.value,"ab-onsite-toolbar-button--selected":t.selected,"ab-onsite-toolbar-button--disabled":t.disabled}]);function d(p){t.disabled||r("click",p)}return(p,f)=>(i.openBlock(),i.createBlock(i.unref(d6),{text:p.tooltip,"tooltip-id":`${p.id}-tooltip`},{default:i.withCtx(()=>[i.createElementVNode("button",i.mergeProps({id:p.id,type:"button","aria-haspopup":p.hasMenu?"true":void 0,"aria-label":u.value,"aria-pressed":p.selected?"true":void 0,class:s.value,disabled:p.disabled},p.$attrs,{onClick:d}),[a.value?(i.openBlock(),i.createElementBlock("svg",CM,[i.createElementVNode("path",{d:a.value.d},null,8,EM)])):p.icon?(i.openBlock(),i.createBlock(Le,{key:1,class:"ab-onsite-toolbar-button__icon",name:p.icon,size:24},null,8,["name"])):i.createCommentVNode("",!0),p.label?(i.openBlock(),i.createElementBlock("span",kM,i.toDisplayString(p.label),1)):i.createCommentVNode("",!0),p.hasMenu?(i.openBlock(),i.createBlock(Le,{key:3,class:"ab-onsite-toolbar-button__caret",name:"dropdown-down-icon",size:24})):i.createCommentVNode("",!0)],16,wM)]),_:1},8,["text","tooltip-id"]))}}),SM=bt(AM,[["__scopeId","data-v-46f12521"]]),DM=["id","aria-pressed","disabled"],xM={class:"ab-onsite-topbar-button__label"},TM={key:0,class:"ab-onsite-topbar-button__append"},BM=i.defineComponent({inheritAttrs:!1,__name:"OnsiteTopbarButton",props:{id:{default:void 0},label:{},tooltip:{default:void 0},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},mode:{default:"primary"}},emits:["click"],setup(n,{emit:e}){var d;const t=n,r=e,a=((d=i.getCurrentInstance())==null?void 0:d.uid)??0,o=i.computed(()=>t.id?`${t.id}-tooltip`:`ab-onsite-topbar-button-tooltip-${a}`),u=i.computed(()=>["ab-onsite-topbar-button",`ab-onsite-topbar-button--${t.mode}`,{"ab-onsite-topbar-button--selected":t.selected,"ab-onsite-topbar-button--disabled":t.disabled}]);function s(p){t.disabled||r("click",p)}return(p,f)=>(i.openBlock(),i.createBlock(i.unref(d6),{text:p.tooltip,"tooltip-id":o.value},{default:i.withCtx(()=>[i.createElementVNode("button",i.mergeProps({id:p.id,"aria-haspopup":"true",type:"button","aria-pressed":p.selected?"true":void 0,class:u.value,disabled:p.disabled},p.$attrs,{onClick:s}),[i.createElementVNode("span",xM,i.toDisplayString(p.label),1),p.$slots.append?(i.openBlock(),i.createElementBlock("span",TM,[i.renderSlot(p.$slots,"append",{},void 0,!0)])):i.createCommentVNode("",!0),i.createVNode(Le,{class:"ab-onsite-topbar-button__caret",name:"dropdown-down-icon",size:24})],16,DM)]),_:3},8,["text","tooltip-id"]))}}),$M=bt(BM,[["__scopeId","data-v-4be3b6db"]]),RM={class:"ab-onsite-zoom-toolbar",role:"toolbar"},FM=["aria-label","disabled"],LM=["aria-expanded","onClick"],OM={class:"ab-onsite-zoom-toolbar__label"},IM=["aria-label","disabled"],NM=["aria-label"],PM=i.defineComponent({__name:"OnsiteZoomToolbar",props:{ratio:{},options:{},min:{},max:{},zoomOutAriaLabel:{default:"Zoom out"},zoomInAriaLabel:{default:"Zoom in"},resetAriaLabel:{default:"Reset zoom"}},emits:["zoom-in","zoom-out","reset","select"],setup(n,{emit:e}){const t=n,r=e,a=b=>`${Math.round(b)}%`,o=i.computed(()=>a(t.ratio)),u=i.computed(()=>t.ratio<=t.min),s=i.computed(()=>t.ratio>=t.max),d=i.computed(()=>t.options.map(b=>({text:a(b),value:String(b)})));function p(){u.value||r("zoom-out")}function f(){s.value||r("zoom-in")}function m(b){r("select",Number(b.value))}return(b,_)=>(i.openBlock(),i.createElementBlock("div",RM,[i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__zoom-out",type:"button","aria-label":b.zoomOutAriaLabel,disabled:u.value,onClick:p},[i.createVNode(Le,{name:"line-minus-netural",size:24})],8,FM),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createVNode(i.unref(T4),{class:"ab-onsite-zoom-toolbar__menu",position:"top",items:d.value,"model-value":String(b.ratio),onSelectItem:m},{trigger:i.withCtx(({isOpen:F,toggle:C})=>[i.createElementVNode("button",{"aria-haspopup":"true",class:i.normalizeClass(["ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__select",{"ab-onsite-zoom-toolbar__select--open":F}]),type:"button","aria-expanded":F?"true":"false",onClick:C},[i.createElementVNode("span",OM,i.toDisplayString(o.value),1),i.createVNode(Le,{name:"filled-dropdown-down",size:24})],10,LM)]),_:1},8,["items","model-value"]),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__zoom-in",type:"button","aria-label":b.zoomInAriaLabel,disabled:s.value,onClick:f},[i.createVNode(Le,{name:"line-plus-netural",size:24})],8,IM),i.createVNode(i.unref(Q2),{orientation:"vertical"}),i.createElementVNode("button",{class:"ab-onsite-zoom-toolbar__button ab-onsite-zoom-toolbar__reset",type:"button","aria-label":b.resetAriaLabel,onClick:_[0]||(_[0]=F=>r("reset"))},[i.createVNode(Le,{name:"line-reset",size:24})],8,NM)]))}}),MM=bt(PM,[["__scopeId","data-v-1f55dbdb"]]),Nr={"agent-launcher":"_agent-launcher_ok3k2_39","agent-launcher--expanded":"_agent-launcher--expanded_ok3k2_55","agent-launcher__badge-wrap":"_agent-launcher__badge-wrap_ok3k2_65","agent-launcher__badge":"_agent-launcher__badge_ok3k2_65","agent-launcher__art":"_agent-launcher__art_ok3k2_97","agent-launcher__glyph":"_agent-launcher__glyph_ok3k2_104","agent-launcher__message":"_agent-launcher__message_ok3k2_115","agent-launcher__expand":"_agent-launcher__expand_ok3k2_129","agent-launcher__halo":"_agent-launcher__halo_ok3k2_173","agent-launcher__halo--outer":"_agent-launcher__halo--outer_ok3k2_181","agent-launcher-pulse-outer":"_agent-launcher-pulse-outer_ok3k2_1","agent-launcher__halo--inner":"_agent-launcher__halo--inner_ok3k2_190","agent-launcher-pulse-inner":"_agent-launcher-pulse-inner_ok3k2_1"},VM=["aria-label"],qM=i.defineComponent({__name:"InAgentLauncher",props:{message:{default:""},pulse:{type:Boolean,default:!1},label:{default:"Open Design Agent"}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,a=i.computed(()=>t.message.trim().length>0),o=i.computed(()=>a.value?`${t.label}: ${t.message}`:t.label);return(u,s)=>(i.openBlock(),i.createElementBlock("button",{type:"button","aria-label":o.value,class:i.normalizeClass([i.unref(Nr)["agent-launcher"],{[i.unref(Nr)["agent-launcher--expanded"]]:a.value}]),onClick:s[0]||(s[0]=d=>r("click"))},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Nr)["agent-launcher__badge-wrap"])},[t.pulse?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("span",{"aria-hidden":"true",class:i.normalizeClass([i.unref(Nr)["agent-launcher__halo"],i.unref(Nr)["agent-launcher__halo--outer"]])},null,2),i.createElementVNode("span",{"aria-hidden":"true",class:i.normalizeClass([i.unref(Nr)["agent-launcher__halo"],i.unref(Nr)["agent-launcher__halo--inner"]])},null,2)],64)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Nr)["agent-launcher__badge"])},[i.createVNode(i.unref(Le),{name:"agent-launcher-badge",class:i.normalizeClass(i.unref(Nr)["agent-launcher__art"]),size:48},null,8,["class"]),i.createVNode(i.unref(Le),{name:"agent-launcher-glyph",class:i.normalizeClass(i.unref(Nr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),a.value?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(Nr)["agent-launcher__message"])},i.toDisplayString(t.message),3)):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createBlock(i.unref(Le),{key:1,name:"line-full-screen",class:i.normalizeClass(i.unref(Nr)["agent-launcher__expand"]),size:24},null,8,["class"])):i.createCommentVNode("",!0)],10,VM))}});function j1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const gr={"in-agent-background":"_in-agent-background_11lux_39","in-agent-background__aurora":"_in-agent-background__aurora_11lux_49","in-agent-background__stage":"_in-agent-background__stage_11lux_56","in-agent-background--animated":"_in-agent-background--animated_11lux_65","agent-bg-aurora-intro":"_agent-bg-aurora-intro_11lux_1","in-agent-background__blob":"_in-agent-background__blob_11lux_89","in-agent-background__blob--pink":"_in-agent-background__blob--pink_11lux_99","agent-bg-drift1":"_agent-bg-drift1_11lux_1","in-agent-background__blob--purple":"_in-agent-background__blob--purple_11lux_109","agent-bg-drift2":"_agent-bg-drift2_11lux_1","in-agent-background__blob--blue":"_in-agent-background__blob--blue_11lux_119","agent-bg-drift3":"_agent-bg-drift3_11lux_1","in-agent-background__grain":"_in-agent-background__grain_11lux_171","in-agent-background--static":"_in-agent-background--static_11lux_179","in-agent-background--paused":"_in-agent-background--paused_11lux_184"},zM=180*1e3,ab=i.defineComponent({__name:"InAgentBackground",props:{animated:{type:Boolean,default:!1},static:{type:Boolean,default:!1}},setup(n){const e=n,t=["mousemove","keydown","pointerdown","wheel"],r=i.ref(null),a=i.ref(j1()),o=i.computed(()=>e.static||a.value),u=i.ref(typeof document<"u"&&document.hidden),s=i.ref(!1),d=i.computed(()=>u.value||s.value);let p=[],f=null,m=null,b=null,_=0,F=!1;const C=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,v=()=>{b!==null&&clearTimeout(b),b=setTimeout(()=>{s.value=!0},zM)},g=()=>{const M=Date.now();M-_<1e3||(_=M,s.value=!1,v())},y=()=>{p.forEach(M=>{M.cx=M.el.offsetLeft+M.el.offsetWidth/2})},S=M=>{f===null&&(f=requestAnimationFrame(()=>{f=null;const H=r.value;if(!H)return;const K=H.getBoundingClientRect(),oe=M.clientX-K.left,Z=.5-(M.clientY-K.top)/K.height;p.forEach(q=>{const te=((q.cx-oe)/K.width*q.depth).toFixed(1),ee=(Z*q.depth*.35).toFixed(1);q.el.style.transform=`translate3d(${te}px, ${ee}px, 0)`})}))},E=()=>{F||typeof window>"u"||(F=!0,window.addEventListener("mousemove",S,{passive:!0}),t.forEach(M=>{window.addEventListener(M,g,{passive:!0})}),v())},k=()=>{!F||typeof window>"u"||(F=!1,window.removeEventListener("mousemove",S),t.forEach(M=>{window.removeEventListener(M,g)}),b!==null&&(clearTimeout(b),b=null),p.forEach(M=>{M.el.style.transform=""}))},D=()=>{u.value=document.hidden},R=()=>{a.value=j1(),o.value?k():E()};return i.watch(o,M=>{M?k():E()}),i.onMounted(()=>{const M=r.value;M&&(p=Array.from(M.querySelectorAll("[data-agent-blob]")).map(H=>({el:H,depth:parseFloat(getComputedStyle(H).getPropertyValue("--depth"))||0,cx:0})),y()),o.value||E(),C==null||C.addEventListener("change",R),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&M&&(m=new ResizeObserver(y),m.observe(M))}),i.onUnmounted(()=>{k(),document.removeEventListener("visibilitychange",D),C==null||C.removeEventListener("change",R),f!==null&&cancelAnimationFrame(f),m==null||m.disconnect()}),(M,H)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"rootRef",ref:r,"aria-hidden":"true",class:i.normalizeClass([i.unref(gr)["in-agent-background"],{[i.unref(gr)["in-agent-background--animated"]]:e.animated,[i.unref(gr)["in-agent-background--static"]]:o.value,[i.unref(gr)["in-agent-background--paused"]]:d.value}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__aurora"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__stage"])},[i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--pink"]])},null,2),i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--purple"]])},null,2),i.createElementVNode("span",{"data-agent-blob":"",class:i.normalizeClass([i.unref(gr)["in-agent-background__blob"],i.unref(gr)["in-agent-background__blob--blue"]])},null,2)],2)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(gr)["in-agent-background__grain"])},null,2)],2))}}),br={"in-agent-popup":"_in-agent-popup_uprwt_39","in-agent-popup__header":"_in-agent-popup__header_uprwt_51","in-agent-popup__brand":"_in-agent-popup__brand_uprwt_59","in-agent-popup__title":"_in-agent-popup__title_uprwt_65","in-agent-popup__badge":"_in-agent-popup__badge_uprwt_77","in-agent-popup__actions":"_in-agent-popup__actions_uprwt_91","in-agent-popup__separator":"_in-agent-popup__separator_uprwt_98","in-agent-popup__icon-button":"_in-agent-popup__icon-button_uprwt_104","in-agent-popup__surface":"_in-agent-popup__surface_uprwt_121","in-agent-popup__body":"_in-agent-popup__body_uprwt_128","in-agent-popup__footer":"_in-agent-popup__footer_uprwt_136"},jM=["aria-label","title"],UM=["aria-label","title"],HM=["aria-label","title"],WM=i.defineComponent({__name:"InAgentPopup",props:{title:{default:"Design Agent"},badgeText:{default:void 0},minimizeLabel:{default:"Minimize"},newChatLabel:{default:"Start New Chat"},academyLabel:{default:"Visit Academy"},showNewChat:{type:Boolean,default:!0},showAcademy:{type:Boolean,default:!0},showBackground:{type:Boolean,default:!0},backgroundAnimated:{type:Boolean,default:!1},backgroundStatic:{type:Boolean,default:!1}},emits:["minimize","split","newChat","academy"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("minimize")},o=()=>{r("newChat")},u=()=>{r("academy")};return(s,d)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup"])},[i.createElementVNode("header",{class:i.normalizeClass(i.unref(br)["in-agent-popup__header"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__brand"])},[i.renderSlot(s.$slots,"brand",{},()=>[i.createVNode(i.unref(Le),{name:"agent-brand",size:24})])],2),i.createElementVNode("h2",{class:i.normalizeClass(i.unref(br)["in-agent-popup__title"])},i.toDisplayString(t.title),3),i.renderSlot(s.$slots,"badge",{},()=>[t.badgeText?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(br)["in-agent-popup__badge"])},i.toDisplayString(t.badgeText),3)):i.createCommentVNode("",!0)]),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__actions"])},[i.renderSlot(s.$slots,"header-actions",{},()=>[t.showNewChat?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button","aria-label":s.newChatLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:o},[i.createVNode(i.unref(Le),{name:"line-ai-message-reply-plus",size:24})],10,jM)):i.createCommentVNode("",!0),t.showAcademy?(i.openBlock(),i.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[i.createVNode(i.unref(Le),{name:"agent-academy",size:24})],10,UM)):i.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(i.unref(br)["in-agent-popup__separator"])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:i.normalizeClass(i.unref(br)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:a},[i.createVNode(i.unref(Le),{name:"line-minus-netural",size:24})],10,HM)])],2)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__surface"])},[t.showBackground?(i.openBlock(),i.createBlock(ab,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(br)["in-agent-popup__body"])},[i.renderSlot(s.$slots,"default")],2),s.$slots.footer?(i.openBlock(),i.createElementBlock("footer",{key:1,class:i.normalizeClass(i.unref(br)["in-agent-popup__footer"])},[i.renderSlot(s.$slots,"footer")],2)):i.createCommentVNode("",!0)],2)],2))}}),Un={"agent-welcome":"_agent-welcome_10z04_39","agent-welcome__intro":"_agent-welcome__intro_10z04_51","agent-welcome__greeting":"_agent-welcome__greeting_10z04_59","agent-welcome__title":"_agent-welcome__title_10z04_68","agent-welcome__categories":"_agent-welcome__categories_10z04_77","agent-welcome__category":"_agent-welcome__category_10z04_86","agent-welcome__category--selected":"_agent-welcome__category--selected_10z04_111","agent-welcome__category-icon":"_agent-welcome__category-icon_10z04_115","agent-welcome__category-label":"_agent-welcome__category-label_10z04_119","agent-welcome__cards":"_agent-welcome__cards_10z04_129","agent-welcome__quick-actions":"_agent-welcome__quick-actions_10z04_133","agent-welcome__quick-action":"_agent-welcome__quick-action_10z04_133","agent-welcome__rise--1":"_agent-welcome__rise--1_10z04_173","agent-welcome__rise-item":"_agent-welcome__rise-item_10z04_174","agent-welcome-rise":"_agent-welcome-rise_10z04_1"},GM=["aria-pressed","onClick"],ZM=["onClick"],YM=16,KM=.18,XM=.06,ld=260,ud="cubic-bezier(0.22, 1, 0.36, 1)",JM=i.defineComponent({__name:"InAgentWelcome",props:{greeting:{default:""},title:{default:""},categories:{default:()=>[]},selected:{default:null},quickActions:{default:()=>[]}},emits:["select","quick-action"],setup(n,{emit:e}){const t=n,r=e,a=m=>({"--rise-delay":`${KM+m*XM}s`}),o=i.inject("inAgentScrollContainer",i.ref(null)),u=i.inject("inAgentBottomInset",i.ref(0)),s=i.ref(null),d=i.ref(null),p=()=>{const m=o.value,b=d.value;if(!m||!b)return;const _=m.scrollTop+(b.getBoundingClientRect().bottom-m.getBoundingClientRect().top),F=m.scrollTop+m.clientHeight-u.value,C=_+YM-F;C<=1||m.scrollTo({top:Math.min(m.scrollTop+C,m.scrollHeight-m.clientHeight),behavior:"smooth"})},f=()=>{const m=s.value,b=o.value;if(!m)return;if(!t.selected||!b){m.style.marginTop="";return}const _=d.value,F=(_==null?void 0:_.firstElementChild)??null,C=(F==null?void 0:F.firstElementChild)??null,v=(C==null?void 0:C.getBoundingClientRect().height)??0,g=(_==null?void 0:_.getBoundingClientRect().height)??0,y=m.getBoundingClientRect().height-g+v,S=b.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(S-y)/2)}px`};return i.watch(u,()=>f()),i.onMounted(()=>f()),i.watch(()=>t.selected,async m=>{const b=s.value,_=(b==null?void 0:b.getBoundingClientRect().top)??0;if(await i.nextTick(),!b)return;if(f(),j1()){p();return}const F=_-b.getBoundingClientRect().top,C=[];Math.abs(F)>1&&C.push(b.animate([{transform:`translateY(${F}px)`},{transform:"translateY(0)"}],{duration:ld,easing:ud}));const v=d.value;m&&v&&C.push(v.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:ld,easing:ud})),Promise.all(C.map(g=>g.finished)).then(p).catch(()=>p())}),(m,b)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"rootRef",ref:s,class:i.normalizeClass(i.unref(Un)["agent-welcome"])},[i.createElementVNode("div",{class:i.normalizeClass([i.unref(Un)["agent-welcome__intro"],i.unref(Un)["agent-welcome__rise--1"]])},[t.greeting?(i.openBlock(),i.createElementBlock("p",{key:0,class:i.normalizeClass(i.unref(Un)["agent-welcome__greeting"])},i.toDisplayString(t.greeting),3)):i.createCommentVNode("",!0),t.title?(i.openBlock(),i.createElementBlock("p",{key:1,class:i.normalizeClass(i.unref(Un)["agent-welcome__title"])},i.toDisplayString(t.title),3)):i.createCommentVNode("",!0)],2),t.categories.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(Un)["agent-welcome__categories"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.categories,(_,F)=>(i.openBlock(),i.createElementBlock("button",{key:_.value,type:"button","aria-pressed":t.selected===_.value,class:i.normalizeClass([i.unref(Un)["agent-welcome__category"],i.unref(Un)["agent-welcome__rise-item"],{[i.unref(Un)["agent-welcome__category--selected"]]:t.selected===_.value}]),style:i.normalizeStyle(a(F)),onClick:C=>r("select",_.value)},[i.createVNode(i.unref(Le),{class:i.normalizeClass(i.unref(Un)["agent-welcome__category-icon"]),name:_.icon,size:24},null,8,["class","name"]),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Un)["agent-welcome__category-label"])},i.toDisplayString(_.label),3)],14,GM))),128))],2)):i.createCommentVNode("",!0),t.quickActions.length>0?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(i.unref(Un)["agent-welcome__quick-actions"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.quickActions,(_,F)=>(i.openBlock(),i.createElementBlock("button",{key:_.id,type:"button",class:i.normalizeClass([i.unref(Un)["agent-welcome__quick-action"],i.unref(Un)["agent-welcome__rise-item"]]),style:i.normalizeStyle(a(F)),onClick:C=>r("quick-action",_.prompt)},i.toDisplayString(_.label),15,ZM))),128))],2)):i.createCommentVNode("",!0),m.$slots.cards?(i.openBlock(),i.createElementBlock("div",{key:2,ref_key:"cardsRef",ref:d,class:i.normalizeClass(i.unref(Un)["agent-welcome__cards"])},[i.renderSlot(m.$slots,"cards")],2)):i.createCommentVNode("",!0)],2))}}),Ti={"in-blueprint-card":"_in-blueprint-card_1mlmh_39","in-blueprint-card__thumb":"_in-blueprint-card__thumb_1mlmh_58","in-blueprint-card__image":"_in-blueprint-card__image_1mlmh_64","in-blueprint-card__placeholder":"_in-blueprint-card__placeholder_1mlmh_70","in-blueprint-card__badge":"_in-blueprint-card__badge_1mlmh_81","in-blueprint-card__footer":"_in-blueprint-card__footer_1mlmh_95","in-blueprint-card__text":"_in-blueprint-card__text_1mlmh_101","in-blueprint-card__title":"_in-blueprint-card__title_1mlmh_108","in-blueprint-card__subtitle":"_in-blueprint-card__subtitle_1mlmh_117","in-blueprint-card__open":"_in-blueprint-card__open_1mlmh_126"},QM=["alt","src"],eV=i.defineComponent({__name:"InBlueprintCard",props:{title:{default:"Design preview"},subtitle:{default:void 0},imageUrl:{default:void 0},badgeText:{default:void 0}},emits:["open"],setup(n,{emit:e}){const t=n,r=e,a=()=>{r("open")},o=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),r("open"))};return(u,s)=>(i.openBlock(),i.createElementBlock("div",{role:"button",tabindex:"0",class:i.normalizeClass(i.unref(Ti)["in-blueprint-card"]),onClick:a,onKeydown:o},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__thumb"])},[t.imageUrl?(i.openBlock(),i.createElementBlock("img",{key:0,alt:t.title,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__image"]),src:t.imageUrl},null,10,QM)):i.renderSlot(u.$slots,"thumb",{key:1},()=>[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__placeholder"])},[i.createVNode(i.unref(Le),{name:"line-figma",size:24})],2)]),t.badgeText?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__badge"])},i.toDisplayString(t.badgeText),3)):i.createCommentVNode("",!0)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__footer"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__text"])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__title"])},i.toDisplayString(t.title),3),t.subtitle?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__subtitle"])},i.toDisplayString(t.subtitle),3)):i.createCommentVNode("",!0)],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Ti)["in-blueprint-card__open"])},[i.createVNode(i.unref(Le),{name:"line-external-link",size:16})],2)],2)],34))}}),Wt={"agent-files-wrapper":"_agent-files-wrapper_1exva_39","agent-files__announcer":"_agent-files__announcer_1exva_44","agent-files__error-bubble":"_agent-files__error-bubble_1exva_56","agent-files":"_agent-files_1exva_39","agent-files--wrap":"_agent-files--wrap_1exva_106","agent-files__card":"_agent-files__card_1exva_113","agent-files__card--error":"_agent-files__card--error_1exva_127","agent-files__body":"_agent-files__body_1exva_131","agent-files__thumb":"_agent-files__thumb_1exva_139","agent-files__thumb--swatch":"_agent-files__thumb--swatch_1exva_148","agent-files__swatch-band":"_agent-files__swatch-band_1exva_154","agent-files__thumb--icon":"_agent-files__thumb--icon_1exva_159","agent-files__thumb--error":"_agent-files__thumb--error_1exva_166","agent-files__labels":"_agent-files__labels_1exva_174","agent-files__name":"_agent-files__name_1exva_187","agent-files__type":"_agent-files__type_1exva_188","agent-files__remove":"_agent-files__remove_1exva_202"},tV=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],nV=["alt","src"],rV=["aria-label","onClick"],iV=6,cd=20,dd=12,f6=i.defineComponent({__name:"InAgentFiles",props:{files:{default:()=>[]},removable:{type:Boolean,default:!0},wrap:{type:Boolean,default:!1},removeLabel:{default:"Remove"},errorFallbackLabel:{default:"This attachment could not be added."}},emits:["remove","open"],setup(n,{emit:e}){const t=n,r={color:"var(--ins-icon-bold)"},a=e,o=i.ref(-1),u=M=>{var H;return((H=t.files[M])==null?void 0:H.status)==="error"},s=M=>(M==null?void 0:M.status)==="error"?M.errorMessage||t.errorFallbackLabel:"",d=i.computed(()=>u(o.value)?o.value:-1),p=i.computed(()=>s(t.files[d.value])),f=i.computed(()=>t.files.map(M=>s(M)).filter(Boolean).join(" ")),m=i.computed(()=>t.files.findIndex((M,H)=>u(H))),b=i.ref(null),_=i.ref(null),F=i.ref(null),C=i.ref([]),v=i.ref(0),g=i.ref(cd),y=(M,H,K)=>Math.min(Math.max(M,H),Math.max(H,K)),S=(M,H)=>{M instanceof HTMLElement&&(C.value[H]=M)},E=M=>{o.value=M},k=M=>{o.value===M&&(o.value=-1)},D=()=>{const M=b.value,H=_.value,K=F.value,oe=C.value[d.value];if(!M||!H||!K||!oe)return;const U=oe.offsetLeft-H.scrollLeft,Z=y(U,0,M.clientWidth-K.offsetWidth);v.value=Z,g.value=y(U+cd-Z,dd,K.offsetWidth-dd)},R=()=>{const M=_.value,H=C.value[m.value];if(!M||!H)return;const K=H.offsetLeft+H.offsetWidth;H.offsetLeft<M.scrollLeft?M.scrollLeft=H.offsetLeft:K>M.scrollLeft+M.clientWidth&&(M.scrollLeft=K-M.clientWidth)};return i.watch(d,()=>void i.nextTick(D)),i.watch(()=>[m.value,f.value,t.files.length],()=>void i.nextTick(()=>{C.value.length=t.files.length,R()})),i.watch(_,(M,H)=>{H==null||H.removeEventListener("scroll",D),M==null||M.addEventListener("scroll",D,{passive:!0})},{immediate:!0}),i.onBeforeUnmount(()=>{var M;(M=_.value)==null||M.removeEventListener("scroll",D)}),(M,H)=>t.files.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"wrapperRef",ref:b,class:i.normalizeClass(i.unref(Wt)["agent-files-wrapper"])},[p.value?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:F,role:"tooltip",class:i.normalizeClass(i.unref(Wt)["agent-files__error-bubble"]),style:i.normalizeStyle({left:`${v.value}px`,"--agent-files-arrow-left":`${g.value}px`})},i.toDisplayString(p.value),7)):i.createCommentVNode("",!0),i.createElementVNode("span",{"aria-live":"polite",role:"status",class:i.normalizeClass(i.unref(Wt)["agent-files__announcer"])},i.toDisplayString(f.value),3),i.createElementVNode("div",{ref_key:"stripRef",ref:_,class:i.normalizeClass([i.unref(Wt)["agent-files"],{[i.unref(Wt)["agent-files--wrap"]]:t.wrap}])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.files,(K,oe)=>{var U;return i.openBlock(),i.createElementBlock("div",{key:K.id,ref_for:!0,ref:Z=>S(Z,oe),"data-testid":"agent-file-card",class:i.normalizeClass([i.unref(Wt)["agent-files__card"],{[i.unref(Wt)["agent-files__card--error"]]:K.status==="error"}]),onClick:Z=>a("open",K.id),onFocusin:Z=>E(oe),onFocusout:Z=>k(oe),onMouseenter:Z=>E(oe),onMouseleave:Z=>k(oe)},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Wt)["agent-files__body"])},[K.status==="loading"?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"]]),style:r},[i.createVNode(i.unref(Le),{name:"loading-circle",size:24})],2)):K.status==="error"?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"],i.unref(Wt)["agent-files__thumb--error"]])},[i.createVNode(i.unref(Le),{name:K.icon??"filled-error-box",size:24},null,8,["name"])],2)):(U=K.swatch)!=null&&U.length?(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--swatch"]])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(K.swatch.slice(0,iV),(Z,q)=>(i.openBlock(),i.createElementBlock("span",{key:`${q}-${Z}`,class:i.normalizeClass(i.unref(Wt)["agent-files__swatch-band"]),style:i.normalizeStyle({background:Z})},null,6))),128))],2)):K.thumbnailUrl?(i.openBlock(),i.createElementBlock("img",{key:3,alt:K.name,class:i.normalizeClass(i.unref(Wt)["agent-files__thumb"]),src:K.thumbnailUrl},null,10,nV)):(i.openBlock(),i.createElementBlock("span",{key:4,class:i.normalizeClass([i.unref(Wt)["agent-files__thumb"],i.unref(Wt)["agent-files__thumb--icon"]]),style:r},[K.icon?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,name:K.icon,size:24},null,8,["name"])):i.createCommentVNode("",!0)],2)),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__labels"])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__name"])},i.toDisplayString(K.name),3),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Wt)["agent-files__type"])},i.toDisplayString(K.type),3)],2),t.removable?(i.openBlock(),i.createElementBlock("button",{key:5,type:"button","aria-label":t.removeLabel,class:i.normalizeClass(i.unref(Wt)["agent-files__remove"]),onClick:i.withModifiers(Z=>a("remove",K.id),["stop"])},[i.createVNode(i.unref(Le),{name:"chip-close-6",size:6})],10,rV)):i.createCommentVNode("",!0)],2)],42,tV)}),128))],2)],2)):i.createCommentVNode("",!0)}}),Qt={"chat-input":"_chat-input_oitrt_40","chat-input__container":"_chat-input__container_oitrt_45","chat-input__container--focused":"_chat-input__container--focused_oitrt_75","chat-input__container--generating":"_chat-input__container--generating_oitrt_81","chat-input__gen-ring":"_chat-input__gen-ring_oitrt_88","chat-input__notice":"_chat-input__notice_oitrt_96","chat-input__notice--info":"_chat-input__notice--info_oitrt_109","chat-input__notice--warning":"_chat-input__notice--warning_oitrt_114","chat-input__notice-body":"_chat-input__notice-body_oitrt_118","chat-input__notice-icon":"_chat-input__notice-icon_oitrt_130","chat-input__notice-text":"_chat-input__notice-text_oitrt_138","chat-input__notice-count":"_chat-input__notice-count_oitrt_143","chat-input__text-area":"_chat-input__text-area_oitrt_149","chat-input__textarea":"_chat-input__textarea_oitrt_155","chat-input__toolbar":"_chat-input__toolbar_oitrt_177","chat-input__toolbar-left":"_chat-input__toolbar-left_oitrt_183","chat-input__actions":"_chat-input__actions_oitrt_189","chat-input__send-reason":"_chat-input__send-reason_oitrt_194","chat-input__icon-btn":"_chat-input__icon-btn_oitrt_223","chat-input__send-btn":"_chat-input__send-btn_oitrt_249","chat-input__files":"_chat-input__files_oitrt_276"},ho=[{p:.23,c:[250,58,58,0]},{p:.45,c:[250,58,58,1]},{p:.59,c:[118,48,212,1]},{p:.77,c:[118,48,212,0]}],aV=200,sV=4,oV=2600,Eu=2,lV=6;function uV(n){const[e]=ho,t=ho[ho.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<ho.length-1;r+=1){const a=ho[r],o=ho[r+1];if(n>=a.p&&n<=o.p){const u=(n-a.p)/(o.p-a.p);return[Math.round(a.c[0]+u*(o.c[0]-a.c[0])),Math.round(a.c[1]+u*(o.c[1]-a.c[1])),Math.round(a.c[2]+u*(o.c[2]-a.c[2])),a.c[3]+u*(o.c[3]-a.c[3])]}}return[0,0,0,0]}function cV(n){const{containerRef:e,ringRef:t,active:r}=n;let a=[],o=[],u=null,s=null,d=null;function p(){const F=e.value,C=t.value;if(!F||!C)return;const v=F.getBoundingClientRect(),g=v.width+Eu*2,y=v.height+Eu*2;if(!g||!y)return;C.setAttribute("viewBox",`0 0 ${g} ${y}`),C.setAttribute("width",String(g)),C.setAttribute("height",String(y));const S=1,E=Math.max(lV,1),k=g-S*2,D=y-S*2,R=k-2*E,M=D-2*E,H=Math.PI/2*E,K=2*R+2*M+4*H;function oe(ue){let w=ue;if(w<=R)return{x:E+w,y:0};if(w-=R,w<=H){const T=-Math.PI/2+w/E;return{x:k-E+E*Math.cos(T),y:E+E*Math.sin(T)}}if(w-=H,w<=M)return{x:k,y:E+w};if(w-=M,w<=H){const T=w/E;return{x:k-E+E*Math.cos(T),y:D-E+E*Math.sin(T)}}if(w-=H,w<=R)return{x:k-E-w,y:D};if(w-=R,w<=H){const T=Math.PI/2+w/E;return{x:E+E*Math.cos(T),y:D-E+E*Math.sin(T)}}if(w-=H,w<=M)return{x:0,y:D-E-w};w-=M;const A=Math.PI+w/E;return{x:E+E*Math.cos(A),y:E+E*Math.sin(A)}}const U="http://www.w3.org/2000/svg",Z=[],q=[],P=[{len:R,isArc:!1},{len:H,isArc:!0},{len:M,isArc:!1},{len:H,isArc:!0},{len:R,isArc:!1},{len:H,isArc:!0},{len:M,isArc:!1},{len:H,isArc:!0}],te=K/aV;let ee=0;for(const ue of P){const w=ue.isArc?sV:Math.max(1,Math.round(ue.len/te));for(let A=0;A<w;A+=1){const T=ee+ue.len*A/w,O=ee+ue.len*(A+1)/w,L=oe(T),z=oe(O),ne=`M ${(L.x+S).toFixed(2)} ${(L.y+S).toFixed(2)}`,de=`${(z.x+S).toFixed(2)} ${(z.y+S).toFixed(2)}`,W=document.createElementNS(U,"path");W.setAttribute("d",ue.isArc?`${ne} A ${E} ${E} 0 0 1 ${de}`:`${ne} L ${de}`),W.setAttribute("fill","none"),W.setAttribute("stroke","transparent"),W.setAttribute("stroke-width",String(Eu)),W.setAttribute("stroke-linecap","butt"),q.push(W),Z.push((T+O)/2/K)}ee+=ue.len}const re=document.createElementNS(U,"g");re.append(...q),C.replaceChildren(re),o=q,a=Z}function f(F){for(let C=0;C<a.length;C+=1){const v=((a[C]-F)%1+1)%1,[g,y,S,E]=uV(v);o[C].setAttribute("stroke",`rgba(${g},${y},${S},${E})`)}}function m(F){s===null&&(s=F),f((F-s)/oV%1),u=requestAnimationFrame(m)}function b(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),j1()?f(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!d&&(d=new ResizeObserver(()=>{r.value&&(p(),j1()&&f(0))}),d.observe(e.value)))}function _(){u!==null&&(cancelAnimationFrame(u),u=null),d==null||d.disconnect(),d=null}i.watch(r,F=>{F?b():_()}),i.onMounted(()=>{r.value&&b()}),i.onBeforeUnmount(_)}const dV=["disabled","placeholder","onKeydown"],fV=["disabled"],pV=["aria-label","disabled"],fd=120,hV=200,mV="Add context",gV=i.defineComponent({__name:"InAgentInput",props:{modelValue:{default:""},placeholder:{default:"Describe your idea to Design Agent"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},maxLength:{default:2e3},files:{default:()=>[]},allowEmptySend:{type:Boolean,default:!1},sendDisabledReason:{default:""},showGeneratingRing:{type:Boolean,default:!0}},emits:["update:modelValue","send","stop","attach","remove-file","open-file"],setup(n,{expose:e,emit:t}){const r=n,a=t,o=i.ref(null);e({focus:()=>{var U;(U=o.value)==null||U.focus()}});const u=i.ref(null),s=i.ref(null),d=i.ref(r.modelValue),p=i.ref(!1),f=i.computed(()=>r.loading&&r.showGeneratingRing);cV({containerRef:u,ringRef:s,active:f});const m=i.computed(()=>d.value.length),b=i.computed(()=>r.maxLength!==void 0&&m.value>r.maxLength),_=i.computed(()=>r.maxLength!==void 0&&m.value>=r.maxLength-hV),F=i.computed(()=>b.value?`Enter a prompt up to ${r.maxLength} characters to continue.`:`You can enter a prompt up to ${r.maxLength} characters.`),C=i.computed(()=>r.files.some(U=>U.status==="loading"||U.status==="error")),v=i.computed(()=>(d.value.trim().length>0||r.allowEmptySend)&&!b.value&&!r.loading&&!r.disabled&&!C.value),g=i.ref(!1),y=i.computed(()=>!!r.sendDisabledReason&&g.value&&!r.loading&&!v.value),S=()=>{const U=o.value;U!=null&&U.scrollHeight&&(U.style.height="auto",U.style.height=`${Math.min(U.scrollHeight,fd)}px`,U.style.overflowY=U.scrollHeight>fd?"auto":"hidden")};i.watch(()=>r.modelValue,U=>{U!==d.value&&(d.value=U,i.nextTick(S))});let E=null,k=0,D=null;const R=()=>{D===null&&(D=requestAnimationFrame(()=>{D=null,S()}))};i.onMounted(()=>{S(),!(typeof ResizeObserver>"u"||!o.value)&&(E=new ResizeObserver(U=>{var q;const Z=((q=U[U.length-1])==null?void 0:q.contentRect.width)??0;Z!==k&&(k=Z,R())}),E.observe(o.value))}),i.onBeforeUnmount(()=>{E==null||E.disconnect(),E=null,D!==null&&(cancelAnimationFrame(D),D=null)}),i.watch(d,U=>{a("update:modelValue",U)});const M=()=>{S()},H=()=>{v.value&&(a("send",d.value.trim()),d.value="",i.nextTick(S))},K=()=>{r.loading?a("stop"):H()},oe=()=>{a("attach")};return(U,Z)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Qt)["chat-input"])},[_.value?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass([i.unref(Qt)["chat-input__notice"],b.value?i.unref(Qt)["chat-input__notice--warning"]:i.unref(Qt)["chat-input__notice--info"]])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-body"])},[i.createVNode(i.unref(Le),{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-icon"]),name:b.value?"filled-caution-triangle-colored":"filled-info-circle",size:16},null,8,["class","name"]),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-text"])},i.toDisplayString(F.value),3)],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Qt)["chat-input__notice-count"])},i.toDisplayString(m.value)+"/"+i.toDisplayString(U.maxLength),3)],2)):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"containerRef",ref:u,class:i.normalizeClass([i.unref(Qt)["chat-input__container"],{[i.unref(Qt)["chat-input__container--focused"]]:p.value,[i.unref(Qt)["chat-input__container--generating"]]:f.value}])},[i.withDirectives((i.openBlock(),i.createElementBlock("svg",{ref_key:"genRingRef",ref:s,"aria-hidden":"true",class:i.normalizeClass(i.unref(Qt)["chat-input__gen-ring"])},null,2)),[[i.vShow,f.value]]),U.$slots.attachments||r.files.length>0?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(Qt)["chat-input__files"])},[i.renderSlot(U.$slots,"attachments"),r.files.length>0?(i.openBlock(),i.createBlock(f6,{key:0,files:r.files,onOpen:Z[0]||(Z[0]=q=>a("open-file",q)),onRemove:Z[1]||(Z[1]=q=>a("remove-file",q))},null,8,["files"])):i.createCommentVNode("",!0)],2)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__text-area"])},[i.withDirectives(i.createElementVNode("textarea",{ref_key:"textareaRef",ref:o,rows:"1",class:i.normalizeClass(i.unref(Qt)["chat-input__textarea"]),disabled:U.disabled,placeholder:U.placeholder,"onUpdate:modelValue":Z[2]||(Z[2]=q=>d.value=q),onBlur:Z[3]||(Z[3]=q=>p.value=!1),onFocus:Z[4]||(Z[4]=q=>p.value=!0),onInput:M,onKeydown:[i.withKeys(i.withModifiers(H,["exact","prevent"]),["enter"]),Z[5]||(Z[5]=i.withKeys(i.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,dV),[[i.vModelText,d.value]])],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__toolbar"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Qt)["chat-input__toolbar-left"])},[i.createElementVNode("button",{type:"button","aria-label":mV,class:i.normalizeClass(i.unref(Qt)["chat-input__icon-btn"]),disabled:U.disabled,onClick:oe},[i.createVNode(i.unref(Le),{name:"line-plus-netural",size:24})],10,fV)],2),i.createElementVNode("div",{"data-testid":"agent-send-actions",class:i.normalizeClass(i.unref(Qt)["chat-input__actions"]),onMouseenter:Z[6]||(Z[6]=q=>g.value=!0),onMouseleave:Z[7]||(Z[7]=q=>g.value=!1)},[y.value?(i.openBlock(),i.createElementBlock("div",{key:0,role:"tooltip",class:i.normalizeClass(i.unref(Qt)["chat-input__send-reason"])},i.toDisplayString(U.sendDisabledReason),3)):i.createCommentVNode("",!0),i.createElementVNode("button",{type:"button","aria-label":U.loading?"Stop":"Send",class:i.normalizeClass(i.unref(Qt)["chat-input__send-btn"]),disabled:!v.value&&!U.loading,onClick:K},[i.createVNode(i.unref(Le),{name:U.loading?"line-ai-stop-solid":"line-architect-segments-sent",size:24},null,8,["name"])],10,pV)],34)],2)],2)],2))}}),Bi={"chat-edit-form":"_chat-edit-form_k9306_39","chat-edit-form--active":"_chat-edit-form--active_k9306_52","chat-edit-form__body":"_chat-edit-form__body_k9306_60","chat-edit-form__border":"_chat-edit-form__border_k9306_65","chat-edit-form__input":"_chat-edit-form__input_k9306_71","chat-edit-form__actions":"_chat-edit-form__actions_k9306_84","chat-edit-form__button":"_chat-edit-form__button_k9306_92","chat-edit-form__button--cancel":"_chat-edit-form__button--cancel_k9306_103","chat-edit-form__button--update":"_chat-edit-form__button--update_k9306_112"},bV=["tabindex","onKeydown"],yV=["tabindex"],vV=["disabled","tabindex"],sb=i.defineComponent({__name:"InChatEditForm",props:{content:{default:""},active:{type:Boolean,default:!1},cancelLabel:{default:"Cancel"},updateLabel:{default:"Update"}},emits:["cancel","update"],setup(n,{emit:e}){const t=n,r=e,a=i.ref(t.content),o=i.ref(null),u=i.computed(()=>a.value.trim()),s=i.computed(()=>u.value!==""&&u.value!==t.content);i.watch(()=>t.active,p=>{p&&(a.value=t.content,i.nextTick(()=>{var f;(f=o.value)==null||f.focus()}))},{immediate:!0});const d=()=>{s.value&&r("update",u.value)};return(p,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([i.unref(Bi)["chat-edit-form"],{[i.unref(Bi)["chat-edit-form--active"]]:t.active}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__body"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__border"])},[i.withDirectives(i.createElementVNode("input",{ref_key:"inputRef",ref:o,type:"text",class:i.normalizeClass(i.unref(Bi)["chat-edit-form__input"]),tabindex:t.active?0:-1,"onUpdate:modelValue":f[0]||(f[0]=m=>a.value=m),onKeydown:[i.withKeys(i.withModifiers(d,["prevent"]),["enter"]),f[1]||(f[1]=i.withKeys(m=>r("cancel"),["esc"]))]},null,42,bV),[[i.vModelText,a.value]])],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Bi)["chat-edit-form__actions"])},[i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(Bi)["chat-edit-form__button"],i.unref(Bi)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:f[2]||(f[2]=m=>r("cancel"))},i.toDisplayString(t.cancelLabel),11,yV),i.createElementVNode("button",{type:"button",class:i.normalizeClass([i.unref(Bi)["chat-edit-form__button"],i.unref(Bi)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:d},i.toDisplayString(t.updateLabel),11,vV)],2)],2)],2))}}),_V=56;function ob(n,e){return n-e<_V?"bottom center":"top center"}function p6(){const n=i.inject("inAgentScrollContainer",i.ref(null)),e=i.ref("top center");return{tooltipPosition:e,onActionsEnter:r=>{const a=n==null?void 0:n.value,o=r.currentTarget;!a||!o||(e.value=ob(o.getBoundingClientRect().top,a.getBoundingClientRect().top))}}}const ai={"in-chat-bubble":"_in-chat-bubble_1jarf_39","in-chat-bubble__view":"_in-chat-bubble__view_1jarf_47","in-chat-bubble__view--hidden":"_in-chat-bubble__view--hidden_1jarf_55","in-chat-bubble__row":"_in-chat-bubble__row_1jarf_63","in-chat-bubble__actions":"_in-chat-bubble__actions_1jarf_71","in-chat-bubble__action":"_in-chat-bubble__action_1jarf_71","in-chat-bubble__bubble":"_in-chat-bubble__bubble_1jarf_113","in-chat-bubble__text":"_in-chat-bubble__text_1jarf_120","in-chat-bubble__timestamp":"_in-chat-bubble__timestamp_1jarf_130","in-chat-bubble__files":"_in-chat-bubble__files_1jarf_140"},wV=["aria-label"],CV=["aria-label","disabled"],EV=i.defineComponent({__name:"InChatBubble",props:{content:{default:""},timestamp:{default:()=>Date.now()},authorLabel:{default:"You"},showTimestamp:{type:Boolean,default:!0},showCopy:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:!1},editDisabled:{type:Boolean,default:!1},copied:{type:Boolean,default:!1},copyLabel:{default:"Copy"},editLabel:{default:"Edit"},cancelLabel:{default:"Cancel"},updateLabel:{default:"Update"},files:{default:()=>[]}},emits:["copy","edit","cancel-edit","update","open-file"],setup(n,{emit:e}){var f;const t=n,r=e,a=i.computed(()=>{const m=new Date(t.timestamp);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hourCycle:"h23"})}),o=i.computed(()=>t.copied?"line-check-natural":"line-copy"),{tooltipPosition:u,onActionsEnter:s}=p6(),d=i.computed(()=>u.value.startsWith("bottom")?"bottom":"top"),p=((f=i.getCurrentInstance())==null?void 0:f.uid)??0;return(m,b)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble"])},[t.files.length>0?(i.openBlock(),i.createBlock(f6,{key:0,wrap:"",class:i.normalizeClass(i.unref(ai)["in-chat-bubble__files"]),files:t.files,removable:!1,onOpen:b[0]||(b[0]=_=>r("open-file",_))},null,8,["class","files"])):i.createCommentVNode("",!0),m.editable?(i.openBlock(),i.createBlock(sb,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:b[1]||(b[1]=_=>r("cancel-edit")),onUpdate:b[2]||(b[2]=_=>r("update",_))},null,8,["active","cancel-label","content","update-label"])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass([i.unref(ai)["in-chat-bubble__view"],{[i.unref(ai)["in-chat-bubble__view--hidden"]]:m.editing}])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__row"]),onMouseenter:b[5]||(b[5]=(..._)=>i.unref(s)&&i.unref(s)(..._))},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__actions"])},[m.showCopy?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:`in-chat-bubble-copy-${i.unref(p)}`,placement:d.value,text:m.copyLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":m.copyLabel,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__action"]),onClick:b[3]||(b[3]=_=>r("copy"))},[i.createVNode(i.unref(Le),{name:o.value,size:24},null,8,["name"])],10,wV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0),m.editable?(i.openBlock(),i.createBlock(i.unref(Ii),{key:1,id:`in-chat-bubble-edit-${i.unref(p)}`,placement:d.value,text:m.editLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":m.editLabel,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:b[4]||(b[4]=_=>r("edit"))},[i.createVNode(i.unref(Le),{name:"line-edit",size:24})],10,CV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__bubble"])},[i.renderSlot(m.$slots,"default",{},()=>[i.createElementVNode("span",{class:i.normalizeClass(i.unref(ai)["in-chat-bubble__text"])},i.toDisplayString(m.content),3)])],2)],34),m.showTimestamp?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(ai)["in-chat-bubble__timestamp"])},i.toDisplayString(m.authorLabel)+" · "+i.toDisplayString(a.value),3)):i.createCommentVNode("",!0)],2)],2))}});function b0(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function kV(n){const e=new n.Renderer;return e.link=function(r){const a=r.title?` title="${r.title}"`:"";return`<a href="${r.href}"${a} target="_blank" rel="noopener noreferrer">${r.text}</a>`},e.code=function(r){const[a]=(r.lang??"").trim().split(/\s+/);return`<div class="md-code"><div class="md-code__header"><span class="md-code__lang">${b0(a)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${b0(r.text)}</code></pre></div>`},e}let L1=null,ku=null;const lb=i.ref(!1);function AV(){L1!==null||ku!==null||(ku=Promise.all([Promise.resolve().then(()=>Tee),Promise.resolve().then(()=>ute)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:kV(t),breaks:!0,gfm:!0}),L1={marked:t,purify:e.default},lb.value=!0}).catch(n=>{ku=null,console.warn("Markdown renderer failed to load:",n)}))}function y0(n){var r,a,o,u;const e=(a=(r=n.target).closest)==null?void 0:a.call(r,".md-code__copy");if(!(e instanceof HTMLButtonElement))return;const t=((u=(o=e.closest(".md-code"))==null?void 0:o.querySelector("code"))==null?void 0:u.textContent)??"";navigator.clipboard.writeText(t).then(()=>{e.textContent="Copied!",window.setTimeout(()=>{e.textContent="Copy"},1500)}).catch(s=>console.warn("Copy failed:",s))}const v0=/^(\s*)`([^`]+)`\s*$/;function SV(n,e){const t=[];let r=0,a=e;for(;a<n.length;){const o=n[a].match(v0);if(o)t.push(o[1]+o[2]),r+=1,a+=1;else if(n[a].trim()===""){let u=a;for(;u<n.length&&n[u].trim()==="";)u+=1;if(u>=n.length||!v0.test(n[u]))break;for(;a<u;)t.push(""),a+=1}else break}return{run:t,codeCount:r,end:a}}function DV(n){const e=n.split(`
|
|
212
212
|
`),t=[];let r=0;for(;r<e.length;){const{run:a,codeCount:o,end:u}=v0.test(e[r])?SV(e,r):{run:[],codeCount:0,end:r};if(o>=2){const s=a.filter(p=>p.trim()!=="").map(p=>p.match(/^\s*/)[0].length),d=Math.min(...s);t.push("```",...a.map(p=>p.slice(d)),"```"),r=u}else t.push(e[r]),r+=1}return t.join(`
|
|
213
213
|
`)}function ub(){return{formatMarkdown:e=>{if(!e)return"";if(AV(),lb.value,L1===null)return b0(e);const r=L1.marked.parse(DV(e)).replace(/<table>/g,'<div class="md-table"><table>').replace(/<\/table>/g,"</table></div>");return L1.purify.sanitize(r,{ADD_ATTR:["target","rel"]})}}}const y1={"in-agent-message":"_in-agent-message_16co9_39","in-agent-message__avatar":"_in-agent-message__avatar_16co9_46","in-agent-message__body":"_in-agent-message__body_16co9_53","in-agent-message__text":"_in-agent-message__text_16co9_58","in-agent-message__md":"_in-agent-message__md_16co9_68"},xV=["innerHTML"],TV=i.defineComponent({__name:"InAgentMessage",props:{text:{default:""},showAvatar:{type:Boolean,default:!1}},setup(n){const e=n,t=i.useSlots(),{formatMarkdown:r}=ub(),a=i.computed(()=>!!t.default),o=i.computed(()=>r(e.text??""));return(u,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(y1)["in-agent-message"])},[u.showAvatar?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(i.unref(y1)["in-agent-message__avatar"])},[i.createVNode(i.unref(Le),{name:"line-smart-ai",size:24})],2)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(y1)["in-agent-message__body"])},[a.value?i.renderSlot(u.$slots,"default",{key:0}):u.text?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(i.unref(y1)["in-agent-message__md"]),innerHTML:o.value,onClick:s[0]||(s[0]=(...d)=>i.unref(y0)&&i.unref(y0)(...d))},null,10,xV)):(i.openBlock(),i.createElementBlock("span",{key:2,class:i.normalizeClass(i.unref(y1)["in-agent-message__text"])},i.toDisplayString(u.text),3))],2)],2))}}),BV="_gradientShift_16xhv_1",Au={"in-chat-loading":"_in-chat-loading_16xhv_39","in-chat-loading__icon":"_in-chat-loading__icon_16xhv_46","in-chat-loading__text":"_in-chat-loading__text_16xhv_50",gradientShift:BV},$V=2500,RV=i.defineComponent({__name:"InChatLoading",props:{text:{default:""},cycling:{type:Boolean,default:!0}},setup(n){const e=n,t=["Analyzing…","Processing…","Searching…","Synthesizing…"],r=i.ref(0);let a=null;const o=i.computed(()=>e.text?e.text:t[r.value]),u=()=>{a&&(clearInterval(a),a=null)},s=()=>{a||(a=setInterval(()=>{r.value=(r.value+1)%t.length},$V))};return i.watch(()=>e.cycling&&!e.text,d=>{d?s():u()},{immediate:!0}),i.onUnmounted(u),(d,p)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Au)["in-chat-loading"])},[i.createVNode(i.unref(Le),{name:"agent-analyzing",class:i.normalizeClass(i.unref(Au)["in-chat-loading__icon"]),size:24},null,8,["class"]),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Au)["in-chat-loading__text"])},i.toDisplayString(o.value),3)],2))}}),Cs={"in-chat-message-actions":"_in-chat-message-actions_1b70l_39","in-chat-message-actions__button":"_in-chat-message-actions__button_1b70l_45","in-chat-message-actions__button--active":"_in-chat-message-actions__button--active_1b70l_69"},FV=["aria-label"],LV=["aria-label"],OV=["aria-label"],IV=["aria-label"],NV=1500,PV=i.defineComponent({__name:"InChatMessageActions",props:{feedback:{default:null},copied:{type:Boolean,default:!1},copyLabel:{default:"Copy"},likeLabel:{default:"Like"},dislikeLabel:{default:"Dislike"},retryable:{type:Boolean,default:!1},retryLabel:{default:"Retry"},showCopy:{type:Boolean,default:!0},showFeedback:{type:Boolean,default:!0}},emits:["copy","like","dislike","retry"],setup(n,{emit:e}){var C;const t=n,r=e,a=i.ref(!1);let o=null;const u=()=>{a.value=!0,o&&clearTimeout(o),o=setTimeout(()=>{a.value=!1,o=null},NV)};i.watch(()=>t.copied,v=>{v&&u()},{immediate:!0});const s=i.computed(()=>a.value?"line-check-natural":"line-copy"),d=i.computed(()=>t.feedback==="like"?"feedback-helpful-selected":"line-ai-like"),p=i.computed(()=>t.feedback==="dislike"?"feedback-not-helpful-selected":"line-ai-dislike"),f=()=>{u(),r("copy")},{tooltipPosition:m,onActionsEnter:b}=p6(),_=i.computed(()=>m.value.startsWith("bottom")?"bottom":"top"),F=((C=i.getCurrentInstance())==null?void 0:C.uid)??0;return(v,g)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Cs)["in-chat-message-actions"]),onMouseenter:g[3]||(g[3]=(...y)=>i.unref(b)&&i.unref(b)(...y))},[v.retryable?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:`in-chat-message-actions-retry-${i.unref(F)}`,placement:_.value,text:v.retryLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":v.retryLabel,class:i.normalizeClass(i.unref(Cs)["in-chat-message-actions__button"]),onClick:g[0]||(g[0]=y=>r("retry"))},[i.createVNode(i.unref(Le),{name:"line-reset",size:24})],10,FV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0),v.showCopy?(i.openBlock(),i.createBlock(i.unref(Ii),{key:1,id:`in-chat-message-actions-copy-${i.unref(F)}`,placement:_.value,text:v.copyLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":v.copyLabel,class:i.normalizeClass(i.unref(Cs)["in-chat-message-actions__button"]),onClick:f},[i.createVNode(i.unref(Le),{name:s.value,size:24},null,8,["name"])],10,LV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0),v.showFeedback?(i.openBlock(),i.createBlock(i.unref(Ii),{key:2,id:`in-chat-message-actions-like-${i.unref(F)}`,placement:_.value,text:v.likeLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":v.likeLabel,class:i.normalizeClass([i.unref(Cs)["in-chat-message-actions__button"],{[i.unref(Cs)["in-chat-message-actions__button--active"]]:v.feedback==="like"}]),onClick:g[1]||(g[1]=y=>r("like"))},[i.createVNode(i.unref(Le),{name:d.value,size:24},null,8,["name"])],10,OV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0),v.showFeedback?(i.openBlock(),i.createBlock(i.unref(Ii),{key:3,id:`in-chat-message-actions-dislike-${i.unref(F)}`,placement:_.value,text:v.dislikeLabel},{default:i.withCtx(()=>[i.createElementVNode("button",{type:"button","aria-label":v.dislikeLabel,class:i.normalizeClass([i.unref(Cs)["in-chat-message-actions__button"],{[i.unref(Cs)["in-chat-message-actions__button--active"]]:v.feedback==="dislike"}]),onClick:g[2]||(g[2]=y=>r("dislike"))},[i.createVNode(i.unref(Le),{name:p.value,size:24},null,8,["name"])],10,IV)]),_:1},8,["id","placement","text"])):i.createCommentVNode("",!0)],34))}}),mo={"scroll-to-bottom-btn":"_scroll-to-bottom-btn_bth6g_39","scroll-to-bottom-btn__badge":"_scroll-to-bottom-btn__badge_bth6g_63","fade-enter-active":"_fade-enter-active_bth6g_77","fade-leave-active":"_fade-leave-active_bth6g_78","fade-enter-from":"_fade-enter-from_bth6g_82","fade-leave-to":"_fade-leave-to_bth6g_83"},cb=i.defineComponent({__name:"InScrollToBottomButton",props:{visible:{type:Boolean},unreadCount:{default:0}},emits:["click"],setup(n){return(e,t)=>(i.openBlock(),i.createBlock(i.Transition,{"enter-active-class":i.unref(mo)["fade-enter-active"],"enter-from-class":i.unref(mo)["fade-enter-from"],"leave-active-class":i.unref(mo)["fade-leave-active"],"leave-to-class":i.unref(mo)["fade-leave-to"]},{default:i.withCtx(()=>[e.visible?(i.openBlock(),i.createElementBlock("button",{key:0,type:"button",class:i.normalizeClass(i.unref(mo)["scroll-to-bottom-btn"]),onClick:t[0]||(t[0]=r=>e.$emit("click"))},[e.unreadCount>0?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(mo)["scroll-to-bottom-btn__badge"])},i.toDisplayString(e.unreadCount),3)):i.createCommentVNode("",!0),i.createVNode(i.unref(Le),{color:"#ffffff",name:"line-chevron-small-down",size:16})],2)):i.createCommentVNode("",!0)]),_:1},8,["enter-active-class","enter-from-class","leave-active-class","leave-to-class"]))}}),MV="_scroll_1nk5i_50",VV="_composer_1nk5i_65",qV="_input_1nk5i_73",Ql={"in-agent-conversation":"_in-agent-conversation_1nk5i_39",scroll:MV,composer:VV,input:qV,"in-agent-input-rise":"_in-agent-input-rise_1nk5i_1"},zV=50,jV=i.defineComponent({__name:"InAgentConversation",setup(n){const e=i.ref(null),t=i.ref(null),r=i.ref(null),a=i.ref(0),o=i.ref(!1);let u=null,s=null;i.provide("inAgentConversationRoot",e),i.provide("inAgentScrollContainer",t),i.provide("inAgentBottomInset",a);const d=()=>{var b;a.value=((b=r.value)==null?void 0:b.offsetHeight)??0},p=()=>{const b=t.value;if(!b)return;const _=b.querySelectorAll("[data-msg-id]"),F=_[_.length-1];if(!F){o.value=!1;return}const C=b.getBoundingClientRect().bottom-a.value;o.value=F.getBoundingClientRect().bottom-C>zV};i.watch(a,()=>p());const f=()=>{const b=t.value;if(typeof ResizeObserver>"u"||!b)return;s==null||s.disconnect(),s=new ResizeObserver(()=>p()),s.observe(b);const _=b.firstElementChild;_&&s.observe(_)},m=()=>{const b=t.value;b&&b.scrollTo({top:b.scrollHeight,behavior:"smooth"})};return i.onMounted(()=>{i.nextTick(()=>{var b;d(),typeof ResizeObserver<"u"&&r.value&&(u=new ResizeObserver(d),u.observe(r.value)),(b=t.value)==null||b.addEventListener("scroll",p,{passive:!0}),f()})}),i.onUnmounted(()=>{var b;u==null||u.disconnect(),u=null,s==null||s.disconnect(),s=null,(b=t.value)==null||b.removeEventListener("scroll",p)}),(b,_)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"rootRef",ref:e,class:i.normalizeClass(i.unref(Ql)["in-agent-conversation"])},[i.createElementVNode("div",{ref_key:"scrollRef",ref:t,class:i.normalizeClass(i.unref(Ql).scroll),style:i.normalizeStyle({paddingBottom:`${a.value}px`})},[i.renderSlot(b.$slots,"default")],6),i.createElementVNode("div",{class:i.normalizeClass(i.unref(Ql).composer)},[i.createElementVNode("div",{ref_key:"inputRef",ref:r,class:i.normalizeClass(i.unref(Ql).input)},[i.createVNode(cb,{"unread-count":0,visible:o.value,onClick:m},null,8,["visible"]),i.renderSlot(b.$slots,"composer")],2)],2)],2))}}),UV="_list_ze009_44",pd={"in-agent-message-list":"_in-agent-message-list_ze009_39",list:UV},HV=["data-msg-id","data-msg-role"],WV=50,GV=i.defineComponent({__name:"InAgentMessageList",props:{messages:{},autoScroll:{type:Boolean,default:!1}},emits:["scroll"],setup(n,{expose:e,emit:t}){const r=n,a=t,o=i.inject("inAgentScrollContainer",i.ref(null)),u=i.inject("inAgentBottomInset",i.ref(0)),s=i.ref(null),d=i.ref(!1),p=()=>o.value,f=y=>{var k;const S=(k=s.value)==null?void 0:k.lastElementChild;if(!S)return!0;const E=y.getBoundingClientRect().bottom-u.value;return S.getBoundingClientRect().bottom-E<=WV},m=()=>{const y=p();if(!y)return!0;const S=f(y);return d.value=!S,a("scroll",{isAtBottom:S,scrollTop:y.scrollTop}),S},b=(y=!1,S="smooth")=>{d.value&&!y||i.nextTick(()=>{const E=p();if(!E)return;const k=E.scrollHeight-E.clientHeight;S==="auto"?E.scrollTop=k:E.scrollTo({top:k,behavior:S}),d.value=!1})};let _=null,F=null,C=null;const v=y=>{typeof ResizeObserver>"u"||(F==null||F.disconnect(),F=new ResizeObserver(()=>{C!==null&&cancelAnimationFrame(C),C=requestAnimationFrame(()=>{if(C=null,!d.value){b(!0,"auto");return}m()})}),F.observe(y),s.value&&F.observe(s.value))},g=()=>{const y=p();y!==_&&(_&&_.removeEventListener("scroll",m),y&&(y.addEventListener("scroll",m,{passive:!0}),_=y,v(y)))};return i.watch(()=>r.messages.map(y=>y.id).join("|"),(y,S)=>{const E=new Set(S?S.split("|"):[]),k=r.messages.filter(D=>!E.has(D.id));k.length===0||!r.autoScroll||b(k.some(D=>D.role==="user"))}),i.watch(u,()=>{if(d.value){m();return}i.nextTick(()=>b(!0))}),i.watch(o,()=>{i.nextTick(()=>g())}),i.onMounted(()=>{i.nextTick(()=>{g(),r.autoScroll&&b(!0,"auto")})}),i.onUnmounted(()=>{_&&(_.removeEventListener("scroll",m),_=null),F==null||F.disconnect(),F=null,C!==null&&(cancelAnimationFrame(C),C=null)}),e({scrollToBottom:b}),(y,S)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(pd)["in-agent-message-list"])},[i.createElementVNode("div",{ref_key:"listRef",ref:s,class:i.normalizeClass(i.unref(pd).list)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(y.messages,E=>(i.openBlock(),i.createElementBlock("div",{key:E.id,"data-msg-id":E.id,"data-msg-role":E.role},[i.renderSlot(y.$slots,"default",{message:E})],8,HV))),128))],2)],2))}}),e2={"wizard-footer":"_wizard-footer_ppcmy_39","wizard-footer__left":"_wizard-footer__left_ppcmy_48","wizard-footer__pagination":"_wizard-footer__pagination_ppcmy_52","wizard-footer__right":"_wizard-footer__right_ppcmy_62"},db=i.defineComponent({__name:"InWizardFooter",props:{currentStep:{},totalSteps:{},isRequired:{type:Boolean,default:!0},isLastStep:{type:Boolean,default:!1},canGoBack:{type:Boolean,default:!1},canContinue:{type:Boolean,default:!1},canSubmit:{type:Boolean,default:!1},backLabel:{default:"Back"},nextLabel:{default:"Next"},skipLabel:{default:"Skip"},submitLabel:{default:"Submit"}},emits:["back","next","skip","submit"],setup(n,{emit:e}){const t=n,r=e;return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(e2)["wizard-footer"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(e2)["wizard-footer__left"])},[i.createVNode(i.unref(Rt),{color:"secondary","left-icon-name":"line-arrow-left",variant:"ghost",disabled:!t.canGoBack,"icon-size":24,label:t.backLabel,onClick:o[0]||(o[0]=u=>r("back"))},null,8,["disabled","label"])],2),t.totalSteps>1?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(e2)["wizard-footer__pagination"])},i.toDisplayString(t.currentStep+1)+"/"+i.toDisplayString(t.totalSteps),3)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(i.unref(e2)["wizard-footer__right"])},[t.isLastStep&&t.canSubmit?(i.openBlock(),i.createBlock(i.unref(Rt),{key:0,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-architect-segments-sent",variant:"ghost","icon-size":24,label:t.submitLabel,onClick:o[1]||(o[1]=u=>r("submit"))},null,8,["label"])):t.isLastStep&&t.isRequired?(i.openBlock(),i.createBlock(i.unref(Rt),{key:1,"data-wizard-footer-primary":"",disabled:"",color:"secondary","right-icon-name":"line-architect-segments-sent",variant:"ghost","icon-size":24,label:t.submitLabel},null,8,["label"])):t.isLastStep?(i.openBlock(),i.createBlock(i.unref(Rt),{key:2,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-chevron-double-right",variant:"ghost","icon-size":24,label:t.skipLabel,onClick:o[2]||(o[2]=u=>r("skip"))},null,8,["label"])):t.canContinue?(i.openBlock(),i.createBlock(i.unref(Rt),{key:3,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-arrow-right",variant:"ghost","icon-size":24,label:t.nextLabel,onClick:o[3]||(o[3]=u=>r("next"))},null,8,["label"])):t.isRequired?(i.openBlock(),i.createBlock(i.unref(Rt),{key:4,"data-wizard-footer-primary":"",disabled:"",color:"secondary","right-icon-name":"line-arrow-right",variant:"ghost","icon-size":24,label:t.nextLabel},null,8,["label"])):(i.openBlock(),i.createBlock(i.unref(Rt),{key:5,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-chevron-double-right",variant:"ghost","icon-size":24,label:t.skipLabel,onClick:o[4]||(o[4]=u=>r("skip"))},null,8,["label"]))],2)],2))}}),go={"wizard-header":"_wizard-header_19713_39","wizard-header__content":"_wizard-header__content_19713_43","wizard-header__title":"_wizard-header__title_19713_51","wizard-header__actions":"_wizard-header__actions_19713_59","wizard-header__divider":"_wizard-header__divider_19713_69","wizard-header__divider-line":"_wizard-header__divider-line_19713_75"},ZV="Info",fb=i.defineComponent({__name:"InWizardHeader",props:{title:{},infoTooltip:{default:""},showClose:{type:Boolean,default:!0},closeLabel:{default:"Close"}},emits:["close"],setup(n,{emit:e}){const t=n,r=e;return(a,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(go)["wizard-header"])},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(go)["wizard-header__content"])},[i.createElementVNode("span",{class:i.normalizeClass(i.unref(go)["wizard-header__title"])},i.toDisplayString(a.title),3),i.createElementVNode("div",{class:i.normalizeClass(i.unref(go)["wizard-header__actions"])},[t.infoTooltip?(i.openBlock(),i.createBlock(i.unref(Ii),{key:0,id:"wizard-info-tooltip",placement:"top","show-delay":0,text:t.infoTooltip},{default:i.withCtx(()=>[i.createVNode(i.unref(Rt),{color:"secondary","left-icon-name":"agent-info",size:"small",variant:"ghost","aria-label":ZV,"icon-size":24})]),_:1},8,["text"])):i.createCommentVNode("",!0),t.infoTooltip&&t.showClose?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(i.unref(go)["wizard-header__divider"])},null,2)):i.createCommentVNode("",!0),t.showClose?(i.openBlock(),i.createBlock(i.unref(Rt),{key:2,color:"secondary","left-icon-name":"agent-close",size:"small",variant:"ghost","aria-label":t.closeLabel,"icon-size":24,onClick:o[0]||(o[0]=u=>r("close"))},null,8,["aria-label"])):i.createCommentVNode("",!0)],2)],2),i.createElementVNode("div",{class:i.normalizeClass(i.unref(go)["wizard-header__divider-line"])},null,2)],2))}}),hd={"ask-wizard":"_ask-wizard_1lvkd_39","ask-wizard__body":"_ask-wizard__body_1lvkd_53"},YV="↑↓ to navigate options.<br>Home/End to jump first/last.<br>↵ to select and continue.",si="__ask_user_custom__",KV=160,XV=i.defineComponent({__name:"InAskUserWizard",props:{steps:{},submitLabel:{default:"Submit"},nextLabel:{default:"Next"},backLabel:{default:"Back"},skipLabel:{default:"Skip"},customPlaceholder:{default:"Enter your answer…"},infoTooltip:{default:YV},closeLabel:{default:"Close"}},emits:["submit","close"],setup(n,{emit:e}){var Me;const t=n,r=e,a=["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Home","End"],o={id:"",question:"",options:[]};let u=null;const s=i.ref(null),d=`ask-wizard-${((Me=i.getCurrentInstance())==null?void 0:Me.uid)??0}`,p=i.inject("inAgentConversationRoot",i.ref(null)),f=i.ref(0),m=i.ref(-1),b=i.ref(!1),_=i.ref(!1),F=i.ref({}),C=i.computed(()=>t.steps[f.value]??o),v=i.computed(()=>f.value>=t.steps.length-1),g=i.computed(()=>F.value[C.value.id]??{selected:[],custom:""}),y=i.computed(()=>!!C.value.allowCustom&&C.value.variant!=="card"),S=i.computed(()=>{const Ee=g.value;return Ee.selected.length>0||Ee.custom.trim().length>0}),E=i.computed(()=>g.value.selected[0]??null),k=i.computed(()=>C.value.required===!0),D=i.computed(()=>!k.value||S.value),R=i.computed(()=>{const Ee=C.value.options.map(Te=>Te.value);return y.value&&Ee.push(si),Ee}),M=i.computed(()=>R.value[m.value]??null),H=i.computed(()=>b.value&&!_.value),K=i.computed(()=>H.value&&M.value===si),oe=i.computed(()=>!H.value||M.value===si?null:M.value),U=i.computed(()=>C.value.multiSelect?g.value.selected:g.value.selected[0]??null);function Z(Ee,Te){F.value={...F.value,[Ee]:{...Te}}}function q(){u!==null&&(clearTimeout(u),u=null)}function P(){!v.value&&D.value&&f.value++}function te(Ee){u===null&&(Z(C.value.id,{selected:[Ee],custom:""}),v.value||(u=setTimeout(()=>{u=null,P()},KV)))}function ee(Ee){const Te=g.value,Ve=new Set(Te.selected);Ve.has(Ee)?Ve.delete(Ee):Ve.add(Ee),Z(C.value.id,{selected:[...Ve],custom:Te.custom})}function re(Ee){const Te=g.value,Ve=C.value.multiSelect?Te.selected:[];Z(C.value.id,{selected:Ve,custom:Ee})}function ue(Ee){const Te=R.value.indexOf(Ee);Te!==-1&&(m.value=Te)}function w(){q();const Ee=R.value.indexOf(si);Ee!==-1&&(m.value=Ee)}function A(){return s.value?Array.from(s.value.querySelectorAll('[role="option"]')):[]}function T(){var Te;const Ee=(Te=s.value)==null?void 0:Te.querySelector('input:not([type="checkbox"])');Ee==null||Ee.focus()}function O(){var Te,Ve;(Ve=((Te=s.value)==null?void 0:Te.querySelector('[role="listbox"]'))??s.value)==null||Ve.focus()}function L(){_.value=!0,i.nextTick(()=>{var Ee,Te;(Te=(Ee=s.value)==null?void 0:Ee.querySelector("[data-wizard-footer-primary]"))==null||Te.focus()})}function z(){i.nextTick(()=>{var Ee;(Ee=A()[m.value])==null||Ee.scrollIntoView({block:"nearest"})})}function ne(Ee){const Te=R.value.length;if(Te!==0){if(m.value===-1?m.value=Ee>0?0:Te-1:m.value=(m.value+Ee+Te)%Te,R.value[m.value]===si){T();return}z()}}function de(){b.value=!1,_.value=!1}function W(){const Ee=g.value;if(Ee.selected.length>0){m.value=R.value.indexOf(Ee.selected[0]);return}const Te=C.value.options.length===0;if(y.value&&(Ee.custom.trim().length>0||Te)){m.value=R.value.indexOf(si);return}m.value=-1}function we(){f.value>0&&f.value--}function ke(){const Ee=t.steps.map(Ve=>{const nt=F.value[Ve.id]??{selected:[],custom:""},pn=new Map(Ve.options.map(It=>[It.value,It.label])),Mt=nt.selected.map(It=>pn.get(It)??It),sn=nt.custom.trim();return{questionId:Ve.id,question:Ve.question,selectedLabels:Mt,customText:sn.length>0?sn:void 0}});if(Ee.every(Ve=>Ve.selectedLabels.length===0&&Ve.customText===void 0)){r("close");return}r("submit",Ee)}function j(){if(v.value){ke();return}P()}function ie(){if(v.value){ke();return}f.value++}function se(Ee){return Ee instanceof HTMLElement?Ee.tagName==="INPUT"||Ee.tagName==="TEXTAREA"||Ee.isContentEditable:!1}function he(){const Ee=M.value;if(!(Ee===null||Ee===si)){if(C.value.multiSelect){ee(Ee);return}te(Ee)}}function be(){if(v.value){ke();return}P()}function $e(Ee){const Te=M.value;if(Te===si&&!se(Ee.target)){Ee.preventDefault(),T();return}Ee.preventDefault(),Te!==null&&Te!==si&&(g.value.selected.includes(Te)||(C.value.multiSelect?ee(Te):te(Te))),D.value&&be()}function qe(Ee){var pn;const Te=Ee.target instanceof HTMLElement?Ee.target:null;if(!!!(Te&&((pn=s.value)!=null&&pn.contains(Te)))&&se(Te))return!1;const nt=p.value??s.value;return!Te||!nt||nt.contains(Te)}function Ue(){var Te;const Ee=(Te=s.value)==null?void 0:Te.querySelector('input:not([type="checkbox"])');Ee==null||Ee.blur(),b.value=!0,m.value=Math.max(0,R.value.indexOf(si)-1),O()}function ge(Ee){if(!qe(Ee))return;const Te=se(Ee.target);if(_.value){Ee.key==="ArrowUp"&&(Ee.preventDefault(),_.value=!1,b.value=!0,m.value=R.value.length-1,O());return}if(Ee.key==="Enter"){if(Ee.target instanceof HTMLTextAreaElement)return;$e(Ee);return}if(Ee.key==="Escape"&&Te){Ee.preventDefault(),Ue();return}if(Ee.key==="ArrowUp"&&Te){Ee.preventDefault(),Ue();return}if(Ee.key==="ArrowDown"&&Te&&qe(Ee)){Ee.preventDefault(),Ee.target.blur(),b.value=!0,m.value=0,O(),z();return}if(!Te){if(Ee.key===" "){Ee.preventDefault(),he();return}if(a.includes(Ee.key)){if(!b.value){Ee.preventDefault(),b.value=!0,m.value=0,z();return}switch(Ee.key){case"ArrowDown":Ee.preventDefault(),m.value>=R.value.length-1?L():ne(1);break;case"ArrowUp":Ee.preventDefault(),ne(-1);break;case"ArrowLeft":Ee.preventDefault(),ne(-1);break;case"ArrowRight":Ee.preventDefault(),ne(1);break;case"Home":Ee.preventDefault(),m.value=0,z();break;case"End":{Ee.preventDefault();const Ve=R.value[R.value.length-1]===si?R.value.length-2:R.value.length-1;m.value=Math.max(Ve,0),z();break}}}}}const Qe=i.computed(()=>t.steps.map(Ee=>Ee.id).join("|"));return i.watch(Qe,()=>{q();const Ee={};t.steps.forEach(Te=>{Ee[Te.id]={selected:[],custom:""}}),F.value=Ee,f.value=0,W()},{immediate:!0}),i.watch(f,()=>{if(q(),_.value=!1,W(),C.value.options.length===0&&y.value){i.nextTick(T);return}i.nextTick(O)}),i.watch(m,z),i.onMounted(()=>{document.addEventListener("keydown",ge),i.nextTick(O)}),i.onBeforeUnmount(()=>{q(),document.removeEventListener("keydown",ge)}),(Ee,Te)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"wizardRoot",ref:s,tabindex:"-1",class:i.normalizeClass(i.unref(hd)["ask-wizard"]),onMousemove:de},[i.createVNode(fb,{"close-label":t.closeLabel,"info-tooltip":t.infoTooltip,title:C.value.question,onClose:Te[0]||(Te[0]=Ve=>r("close"))},null,8,["close-label","info-tooltip","title"]),i.createElementVNode("div",{class:i.normalizeClass(i.unref(hd)["ask-wizard__body"])},[C.value.variant==="card"?(i.openBlock(),i.createBlock(i.unref(mb),{key:C.value.id,"model-value":U.value,multiple:!!C.value.multiSelect,options:C.value.options,onSelect:te,onToggle:ee},null,8,["model-value","multiple","options"])):C.value.multiSelect?(i.openBlock(),i.createBlock(i.unref(hb),{key:C.value.id,"allow-custom":!!C.value.allowCustom,"custom-highlighted":K.value,"custom-placeholder":t.customPlaceholder,"custom-value":g.value.custom,"highlighted-value":oe.value,"input-id":d,"model-value":g.value.selected,options:C.value.options,onCustomFocus:w,onCustomInput:re,onOptionFocus:ue,onToggle:ee},null,8,["allow-custom","custom-highlighted","custom-placeholder","custom-value","highlighted-value","model-value","options"])):(i.openBlock(),i.createBlock(i.unref(pb),{key:C.value.id,"allow-custom":!!C.value.allowCustom,"custom-highlighted":K.value,"custom-placeholder":t.customPlaceholder,"custom-value":g.value.custom,"highlighted-value":oe.value,"input-id":d,"model-value":E.value,options:C.value.options,onCustomFocus:w,onCustomInput:re,onOptionFocus:ue,onSelect:te},null,8,["allow-custom","custom-highlighted","custom-placeholder","custom-value","highlighted-value","model-value","options"]))],2),i.createVNode(db,{"back-label":t.backLabel,"can-continue":S.value,"can-go-back":f.value>0,"can-submit":S.value,"current-step":f.value,"is-last-step":v.value,"is-required":k.value,"next-label":t.nextLabel,"skip-label":t.skipLabel,"submit-label":t.submitLabel,"total-steps":Ee.steps.length,onBack:we,onNext:P,onSkip:ie,onSubmit:j},null,8,["back-label","can-continue","can-go-back","can-submit","current-step","is-last-step","is-required","next-label","skip-label","submit-label","total-steps"])],34))}}),$i={"single-select":"_single-select_v6ytd_39","single-select__options":"_single-select__options_v6ytd_45","single-select__item":"_single-select__item_v6ytd_54","single-select__item--focused":"_single-select__item--focused_v6ytd_69","single-select__label":"_single-select__label_v6ytd_78","single-select__item--selected":"_single-select__item--selected_v6ytd_81","single-select__description":"_single-select__description_v6ytd_104","single-select__custom":"_single-select__custom_v6ytd_112","single-select__custom--focused":"_single-select__custom--focused_v6ytd_115","single-select__custom--selected":"_single-select__custom--selected_v6ytd_119"},JV=["aria-activedescendant"],QV=["id","aria-selected","onClick","onFocusin"],pb=i.defineComponent({__name:"InSingleSelect",props:{options:{},modelValue:{default:null},allowCustom:{type:Boolean,default:!1},customValue:{default:""},customPlaceholder:{default:"Enter your answer…"},inputId:{default:"in-single-select-custom"},highlightedValue:{default:null},customHighlighted:{type:Boolean,default:!1}},emits:["update:modelValue","select","update:customValue","custom-input","option-focus","custom-focus"],setup(n,{emit:e}){const t=n,r=i.computed(()=>{if(t.customHighlighted)return t.inputId;if(t.highlightedValue)return`${t.inputId}-option-${t.highlightedValue}`}),a=e,o=i.ref(t.modelValue),u=i.ref(t.customValue);i.watch(()=>t.modelValue,f=>{o.value=f}),i.watch(()=>t.customValue,f=>{u.value=f});const s=i.computed(()=>o.value===null&&u.value.trim().length>0);function d(f){o.value=f,a("update:modelValue",f),a("select",f)}function p(f){const m=String(f);u.value=m,o.value=null,a("update:modelValue",null),a("update:customValue",m),a("custom-input",m)}return(f,m)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref($i)["single-select"])},[i.createElementVNode("div",{role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:i.normalizeClass(i.unref($i)["single-select__options"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.options,b=>(i.openBlock(),i.createElementBlock("div",{id:`${f.inputId}-option-${b.value}`,key:b.value,role:"option","aria-selected":o.value===b.value,class:i.normalizeClass([i.unref($i)["single-select__item"],{[i.unref($i)["single-select__item--selected"]]:o.value===b.value,[i.unref($i)["single-select__item--focused"]]:b.value===f.highlightedValue}]),onClick:_=>d(b.value),onFocusin:_=>a("option-focus",b.value)},[i.createElementVNode("span",{class:i.normalizeClass(i.unref($i)["single-select__label"])},i.toDisplayString(b.label),3),b.description?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref($i)["single-select__description"])},i.toDisplayString(b.description),3)):i.createCommentVNode("",!0)],42,QV))),128)),f.allowCustom?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass([i.unref($i)["single-select__custom"],{[i.unref($i)["single-select__custom--selected"]]:s.value,[i.unref($i)["single-select__custom--focused"]]:f.customHighlighted}]),onFocusin:m[0]||(m[0]=b=>a("custom-focus"))},[i.createVNode(i.unref(Ja),{id:f.inputId,theme:"grey","helper-message-status":!1,"label-status":!1,"model-value":u.value,name:f.inputId,"placeholder-text":f.customPlaceholder,"prevent-xss":!1,onInput:p},null,8,["id","model-value","name","placeholder-text"])],34)):i.createCommentVNode("",!0)],10,JV)],2))}}),nr={"multi-select":"_multi-select_1nqg6_39","multi-select__options":"_multi-select__options_1nqg6_45","multi-select__item":"_multi-select__item_1nqg6_54","multi-select__item--focused":"_multi-select__item--focused_1nqg6_70","multi-select__item--selected":"_multi-select__item--selected_1nqg6_74","multi-select__box":"_multi-select__box_1nqg6_86","multi-select__box--checked":"_multi-select__box--checked_1nqg6_99","multi-select__label":"_multi-select__label_1nqg6_107","multi-select__custom":"_multi-select__custom_1nqg6_115","multi-select__custom--focused":"_multi-select__custom--focused_1nqg6_133","multi-select__custom--selected":"_multi-select__custom--selected_1nqg6_137","multi-select__custom-input":"_multi-select__custom-input_1nqg6_149"},eq=["aria-activedescendant"],tq=["id","aria-selected","onClick","onFocusin"],hb=i.defineComponent({__name:"InMultiSelect",props:{options:{},modelValue:{default:()=>[]},allowCustom:{type:Boolean,default:!1},customValue:{default:""},customPlaceholder:{default:"Enter your answer…"},inputId:{default:"in-multi-select-custom"},highlightedValue:{default:null},customHighlighted:{type:Boolean,default:!1}},emits:["update:modelValue","toggle","update:customValue","custom-input","option-focus","custom-focus"],setup(n,{emit:e}){const t=n,r=i.computed(()=>{if(t.customHighlighted)return t.inputId;if(t.highlightedValue)return`${t.inputId}-option-${t.highlightedValue}`}),a=e,o=i.ref([...t.modelValue]),u=i.ref(t.customValue);i.watch(()=>t.modelValue,_=>{o.value=[..._]}),i.watch(()=>t.customValue,_=>{u.value=_});const s=i.computed(()=>u.value.trim().length>0);function d(_){return o.value.includes(_)}function p(_){const F=new Set(o.value);F.has(_)?F.delete(_):F.add(_),o.value=[...F],a("update:modelValue",o.value),a("toggle",_)}const f=i.ref(null);function m(){var _,F;(F=(_=f.value)==null?void 0:_.querySelector("input"))==null||F.focus()}function b(_){const F=String(_);u.value=F,a("update:customValue",F),a("custom-input",F)}return(_,F)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(nr)["multi-select"])},[i.createElementVNode("div",{"aria-multiselectable":"true",role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:i.normalizeClass(i.unref(nr)["multi-select__options"])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(_.options,C=>(i.openBlock(),i.createElementBlock("div",{id:`${_.inputId}-option-${C.value}`,key:C.value,role:"option","aria-selected":d(C.value),class:i.normalizeClass([i.unref(nr)["multi-select__item"],{[i.unref(nr)["multi-select__item--selected"]]:d(C.value),[i.unref(nr)["multi-select__item--focused"]]:C.value===_.highlightedValue}]),onClick:v=>p(C.value),onFocusin:v=>a("option-focus",C.value)},[i.createElementVNode("span",{class:i.normalizeClass([i.unref(nr)["multi-select__box"],{[i.unref(nr)["multi-select__box--checked"]]:d(C.value)}])},[d(C.value)?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,color:"#ffffff",name:"line-check-natural",size:16})):i.createCommentVNode("",!0)],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(nr)["multi-select__label"])},i.toDisplayString(C.label),3)],42,tq))),128)),_.allowCustom?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"customRow",ref:f,class:i.normalizeClass([i.unref(nr)["multi-select__custom"],{[i.unref(nr)["multi-select__custom--selected"]]:s.value,[i.unref(nr)["multi-select__custom--focused"]]:_.customHighlighted}]),onClick:m,onFocusin:F[0]||(F[0]=C=>a("custom-focus"))},[i.createElementVNode("span",{class:i.normalizeClass([i.unref(nr)["multi-select__box"],{[i.unref(nr)["multi-select__box--checked"]]:s.value}])},[s.value?(i.openBlock(),i.createBlock(i.unref(Le),{key:0,color:"#ffffff",name:"line-check-natural",size:16})):i.createCommentVNode("",!0)],2),i.createVNode(i.unref(Ja),{id:_.inputId,theme:"grey",class:i.normalizeClass(i.unref(nr)["multi-select__custom-input"]),"helper-message-status":!1,"label-status":!1,"model-value":u.value,name:_.inputId,"placeholder-text":_.customPlaceholder,"prevent-xss":!1,onInput:b},null,8,["id","class","model-value","name","placeholder-text"])],34)):i.createCommentVNode("",!0)],10,eq)],2))}}),Va={"card-select":"_card-select_1etbx_39","card-select__card":"_card-select__card_1etbx_45","card-select__card--selected":"_card-select__card--selected_1etbx_61","card-select__thumb":"_card-select__thumb_1etbx_66","card-select__image":"_card-select__image_1etbx_77","card-select__placeholder":"_card-select__placeholder_1etbx_84","card-select__label":"_card-select__label_1etbx_97","card-select__description":"_card-select__description_1etbx_105"},nq=["aria-selected","onClick","onKeydown"],rq=["alt","src"],mb=i.defineComponent({__name:"InCardSelect",props:{options:{},modelValue:{default:null},multiple:{type:Boolean,default:!1},columns:{default:2}},emits:["update:modelValue","select","toggle"],setup(n,{emit:e}){const t=n,r=e;function a(f){return f==null?[]:Array.isArray(f)?[...f]:[f]}const o=i.ref(a(t.modelValue));i.watch(()=>t.modelValue,f=>{o.value=a(f)});const u=i.computed(()=>({gridTemplateColumns:`repeat(${t.columns}, minmax(0, 1fr))`}));function s(f){return o.value.includes(f)}function d(f){if(t.multiple){const m=new Set(o.value);m.has(f)?m.delete(f):m.add(f),o.value=[...m],r("update:modelValue",o.value),r("toggle",f);return}o.value=[f],r("update:modelValue",f),r("select",f)}function p(f){return(f.label||f.value).charAt(0).toUpperCase()}return(f,m)=>(i.openBlock(),i.createElementBlock("div",{role:"listbox",class:i.normalizeClass(i.unref(Va)["card-select"]),style:i.normalizeStyle(u.value)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.options,b=>(i.openBlock(),i.createElementBlock("div",{key:b.value,role:"option",tabindex:"0","aria-selected":s(b.value),class:i.normalizeClass([i.unref(Va)["card-select__card"],{[i.unref(Va)["card-select__card--selected"]]:s(b.value)}]),onClick:_=>d(b.value),onKeydown:[i.withKeys(i.withModifiers(_=>d(b.value),["prevent"]),["enter"]),i.withKeys(i.withModifiers(_=>d(b.value),["prevent"]),["space"])]},[i.createElementVNode("div",{class:i.normalizeClass(i.unref(Va)["card-select__thumb"])},[b.imageUrl?(i.openBlock(),i.createElementBlock("img",{key:0,alt:b.label,class:i.normalizeClass(i.unref(Va)["card-select__image"]),src:b.imageUrl},null,10,rq)):i.renderSlot(f.$slots,"thumb",{key:1,option:b},()=>[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Va)["card-select__placeholder"])},i.toDisplayString(p(b)),3)])],2),i.createElementVNode("span",{class:i.normalizeClass(i.unref(Va)["card-select__label"])},i.toDisplayString(b.label),3),b.description?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(i.unref(Va)["card-select__description"])},i.toDisplayString(b.description),3)):i.createCommentVNode("",!0)],42,nq))),128))],6))}});var ma=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function iq(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function aq(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}),t}var Su={},T1={exports:{}};/**
|
|
214
214
|
* @license
|