@useinsider/ab-components 0.0.139-beta.63 → 0.0.139-beta.67

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.
@@ -153,7 +153,7 @@ From `+this.originalError.stack)}static is(e){return(e==null?void 0:e[d9])==="Li
153
153
  `," ",t],i=new Set(r);for(;this.p<this.N&&!i.has(this.peek());)yield this.match(t)?this.readOutputToken(e):this.readHTMLToken(r)}match(e){for(let t=0;t<e.length;t++)if(e[t]!==this.input[this.p+t])return!1;return!0}rmatch(e){for(let t=0;t<e.length;t++)if(e[e.length-1-t]!==this.input[this.p-1-t])return!1;return!0}peekType(e=0){return this.p+e>=this.N?0:Rt[this.input.charCodeAt(this.p+e)]}peek(e=0){return this.p+e>=this.N?"":this.input[this.p+e]}skipBlank(){for(;this.peekType()&Bo;)++this.p}};class o${constructor(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}on(e,t){return this.handlers[e]=t,this}trigger(e,t){const r=this.handlers[e];return r?(r.call(this,t),!0):!1}start(){this.trigger("start");let e;for(;!this.stopRequested&&(e=this.tokens.shift());){if(this.trigger("token",e)||Va(e)&&this.trigger(`tag:${e.name}`,e))continue;const t=this.parseToken(e,this.tokens);this.trigger("template",t)}return this.stopRequested||this.trigger("end"),this}stop(){return this.stopRequested=!0,this}}class z0{constructor(e){this.token=e}}class Ht extends z0{constructor(e,t,r){super(e),this.name=e.name,this.liquid=r,this.tokenizer=e.tokenizer}}class Mo{constructor(e,t){this.hash={};const r=e instanceof di?e:new di(e,{});for(const i of r.readHashes(t))this.hash[i.name.content]=i.value}*render(e){const t={};for(const r of Object.keys(this.hash))t[r]=this.hash[r]===void 0?!0:yield tn(this.hash[r],e);return t}}function l$(n){return class extends Ht{constructor(e,t,r){super(e,t,r),un(n.parse)&&n.parse.call(this,e,t)}*render(e,t){const r=yield new Mo(this.token.args,e.opts.keyValueSeparator).render(e);return yield n.render.call(this,e,t,r)}}}function mg(n){return Sn(n)}class gg{constructor(e,t,r){this.token=e,this.name=e.name,this.handler=un(t)?t:un(t==null?void 0:t.handler)?t.handler:rg,this.raw=!un(t)&&!!(t!=null&&t.raw),this.args=e.args,this.liquid=r}*render(e,t){const r=[];for(const i of this.args)mg(i)?r.push([i[0],yield tn(i[1],t)]):r.push(yield tn(i,t));return yield this.handler.apply({context:t,token:this.token,liquid:this.liquid},[e,...r])}}class Ar{constructor(e,t){this.filters=[];const r=typeof e=="string"?new di(e,t.options.operators).readFilteredValue():e;this.initial=r.initial,this.filters=r.filters.map(i=>new gg(i,this.getFilter(t,i.name),t))}*value(e,t){t=t||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default";let r=yield this.initial.evaluate(e,t);for(const i of this.filters)r=yield i.render(r,e);return r}getFilter(e,t){const r=e.filters[t];return Nn(r||!e.options.strictFilters,()=>`undefined filter: ${t}`),r}}class u$ extends z0{constructor(e,t){var r;super(e);const i=new di(e.input,t.options.operators,e.file,e.contentRange);this.value=new Ar(i.readFilteredValue(),t);const a=this.value.filters,u=t.options.outputEscape;if(!(!((r=a[a.length-1])===null||r===void 0)&&r.raw)&&u){const s=new dg(toString.call(u),[],"",0,0);a.push(new gg(s,u,t))}}*render(e,t){const r=yield this.value.value(e,!1);t.write(r)}*arguments(){yield this.value}}class c$ extends z0{constructor(e){super(e),this.str=e.getContent()}*render(e,t){t.write(this.str)}}class Ia{constructor(e,t){this.segments=e,this.location=t}toString(){return a3(this.segments,!0)}toArray(){function*e(...t){for(const r of t)r instanceof Ia?yield Array.from(e(...r.segments)):yield r}return Array.from(e(...this.segments))}}class cu{constructor(){this.map=new Map}get(e){const t=a3([e.segments[0]]);return this.map.has(t)||this.map.set(t,[]),this.map.get(t)}has(e){return this.map.has(a3([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}}const yg={partials:!0};function*vg(n,e,t){const r=new cu,i=new cu,a=new cu,u=new T9(new Set),s=new Set;function f(d,m){r.push(d);const g=m.alias(d);if(g!==void 0){const _=g.segments[0];ot(_)&&!u.has(_)&&i.push(g)}else{const _=d.segments[0];ot(_)&&!m.has(_)&&i.push(d)}for(const _ of d.segments)_ instanceof Ia&&f(_,m)}function*p(d,m){if(d.arguments)for(const g of d.arguments())for(const _ of R9(g))f(_,m);if(d.localScope)for(const g of d.localScope()){m.add(g.content),m.deleteAlias(g.content);const[_,R]=g.getPosition();a.push(new Ia([g.content],{row:_,col:R,file:g.file}))}if(d.children)if(d.partialScope){const g=d.partialScope();if(g===void 0){for(const A of yield d.children(e,t))yield p(A,m);return}if(s.has(g.name))return;const _=new Set,R=g.isolated?new T9(_):m.push(_);for(const A of g.scope)if(ot(A))_.add(A);else{const[b,y]=A;_.add(b);const v=Array.from(R9(y));v.length&&R.setAlias(b,v[0].segments)}for(const A of yield d.children(e,t))yield p(A,R),s.add(g.name);R.pop()}else{d.blockScope&&m.push(new Set(d.blockScope()));for(const g of yield d.children(e,t))yield p(g,m);d.blockScope&&m.pop()}}for(const d of n)yield p(d,u);return{variables:r.asObject(),globals:i.asObject(),locals:a.asObject()}}function Ls(n,e={}){const t=Object.assign(Object.assign({},yg),e);return cs(vg(n,t.partials,!1))}function Is(n,e={}){const t=Object.assign(Object.assign({},yg),e);return fs(vg(n,t.partials,!0))}class T9{constructor(e){this.stack=[{names:e,aliases:new Map}]}has(e){for(const t of this.stack)if(t.names.has(e))return!0;return!1}push(e){return this.stack.push({names:e,aliases:new Map}),this}pop(){var e;return(e=this.stack.pop())===null||e===void 0?void 0:e.names}add(e){this.stack[0].names.add(e)}alias(e){const t=e.segments[0];if(!ot(t))return;const r=this.getAlias(t);if(r!==void 0)return new Ia([...r,...e.segments.slice(1)],e.location)}setAlias(e,t){this.stack[this.stack.length-1].aliases.set(e,t)}deleteAlias(e){this.stack[this.stack.length-1].aliases.delete(e)}getAlias(e){for(const t of this.stack){if(t.aliases.has(e))return t.aliases.get(e);if(t.names.has(e))return}}}function*R9(n){Er(n)?yield*Do(n):n instanceof Ar&&(yield*f$(n))}function*f$(n){for(const e of n.initial.postfix)Er(e)&&(yield*Do(e));for(const e of n.filters)for(const t of e.args)mg(t)&&t[1]?yield*Do(t[1]):Er(t)&&(yield*Do(t))}function*Do(n){_g(n)?(yield*Do(n.lhs),yield*Do(n.rhs)):o3(n)&&(yield t0(n))}function t0(n){const e=[];let t=n.file;const r=n.props[0];t=t||r.file,n0(r)||$9(r)||F9(r)?e.push(r.content):o3(r)&&e.push(...t0(r).segments);for(const u of n.props.slice(1))t=t||u.file,n0(u)||$9(u)||F9(u)?e.push(u.content):o3(u)&&e.push(t0(u));const[i,a]=n.getPosition();return new Ia(e,{row:i,col:a,file:t})}const B9=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function a3(n,e=!1){const t=[],r=n[0];ot(r)&&(!e||r.match(B9)?t.push(`${r}`):t.push(`['${r}']`));for(const i of n.slice(1))i instanceof Ia?t.push(`[${a3(i.segments)}]`):ot(i)?i.match(B9)?t.push(`.${i}`):t.push(`['${i}']`):t.push(`[${i}]`);return t.join("")}var Fo;(function(n){n.Partials="partials",n.Layouts="layouts",n.Root="root"})(Fo||(Fo={}));class d${constructor(e){var t,r,i,a;if(this.options=e,e.relativeReference){const s=e.fs.sep;Nn(s,"`fs.sep` is required for relative reference");const f=["."+s,".."+s,"./","../"];this.shouldLoadRelative=p=>f.some(d=>p.startsWith(d))}else this.shouldLoadRelative=s=>!1;const u=e.fs;this.contains=Zc(((t=u.contains)===null||t===void 0?void 0:t.bind(u))||(()=>zt(this,void 0,void 0,function*(){return!0})),((r=u.containsSync)===null||r===void 0?void 0:r.bind(u))||(()=>!0)),this.exists=Zc(((i=u.exists)===null||i===void 0?void 0:i.bind(u))||(()=>zt(this,void 0,void 0,function*(){return!1})),(a=u.existsSync)===null||a===void 0?void 0:a.bind(u))}*lookup(e,t,r,i){const a=this.options[t];for(const u of this.candidates(e,a,i)){let s=!1;for(const f of a)if(yield this.contains(!!r,f,u)){s=!0;break}if(s&&(yield this.exists(!!r,u)))return u}throw this.lookupError(e,a)}*candidates(e,t,r){const{fs:i,extname:a}=this.options;this.shouldLoadRelative(e)&&r&&(yield i.resolve(this.dirname(r),e,a));for(const u of t)yield i.resolve(u,e,a);if(i.fallback!==void 0){const u=i.fallback(e);u!==void 0&&(yield u)}}dirname(e){const t=this.options.fs;return Nn(t.dirname,"`fs.dirname` is required for relative reference"),t.dirname(e)}lookupError(e,t){const r=new Error("ENOENT");return r.message=`ENOENT: Failed to lookup "${e}" in "${t}"`,r.code="ENOENT",r}}let va=class{constructor(e){var t,r;this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new d$(this.liquid.options),this.parseLimit=new Qc("parse length",e.options.parseLimit),this.readFile=Zc(((t=this.fs.readFile)===null||t===void 0?void 0:t.bind(this.fs))||(()=>zt(this,void 0,void 0,function*(){throw new Error("readFile not implemented")})),(r=this.fs.readFileSync)===null||r===void 0?void 0:r.bind(this.fs))}parse(e,t){e=String(e),this.parseLimit.use(e.length);const i=new di(e,this.liquid.options.operators,t).readTopLevelTokens(this.liquid.options);return this.parseTokens(i)}parseTokens(e){let t;const r=[],i=[];for(;t=e.shift();)try{r.push(this.parseToken(t,e))}catch(a){if(this.liquid.options.catchAllErrors)i.push(a);else throw a}if(i.length)throw new ig(i);return r}parseToken(e,t){try{if(Va(e)){const r=this.liquid.tags[e.name];return Nn(r,`tag "${e.name}" not found`),new r(e,t,this.liquid,this)}return h$(e)?new u$(e,this.liquid):new c$(e)}catch(r){throw qa.is(r)?r:new VR(r,e)}}parseStream(e){return new o$(e,(t,r)=>this.parseToken(t,r))}*_parseFileCached(e,t,r=Fo.Root,i){const a=this.cache,u=this.loader.shouldLoadRelative(e)?i+","+e:r+":"+e,s=yield a.read(u);if(s)return s;const f=this._parseFile(e,t,r,i),p=t?yield f:cs(f);a.write(u,p);try{return yield p}catch(d){throw a.remove(u),d}}*_parseFile(e,t,r=Fo.Root,i){const a=yield this.loader.lookup(e,r,t,i);return this.parse(yield this.readFile(!!t,a),a)}};var $t;(function(n){n[n.Number=1]="Number",n[n.Literal=2]="Literal",n[n.Tag=4]="Tag",n[n.Output=8]="Output",n[n.HTML=16]="HTML",n[n.Filter=32]="Filter",n[n.Hash=64]="Hash",n[n.PropertyAccess=128]="PropertyAccess",n[n.Word=256]="Word",n[n.Range=512]="Range",n[n.Quoted=1024]="Quoted",n[n.Operator=2048]="Operator",n[n.FilteredValue=4096]="FilteredValue",n[n.Delimited=12]="Delimited"})($t||($t={}));function p$(n){return!!(hi(n)&$t.Delimited)}function bg(n){return hi(n)===$t.Operator}function j0(n){return hi(n)===$t.HTML}function h$(n){return hi(n)===$t.Output}function Va(n){return hi(n)===$t.Tag}function n0(n){return hi(n)===$t.Quoted}function $9(n){return hi(n)===$t.Number}function o3(n){return hi(n)===$t.PropertyAccess}function F9(n){return hi(n)===$t.Word}function _g(n){return hi(n)===$t.Range}function Er(n){return(hi(n)&1667)>0}function hi(n){return n?n.kind:-1}function Xs(n){const e=Object.create(null);return n&&Object.assign(e,n),e}let c1=class wg{constructor(e={},t=ko,r={},{memoryLimit:i,renderLimit:a}={}){var u,s,f,p,d;this.scopes=[Xs()],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!r.sync,this.opts=t,this.globals=(u=r.globals)!==null&&u!==void 0?u:t.globals,this.environments=w3(e)?e:Object(e),this.strictVariables=(s=r.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables,this.ownPropertyOnly=(f=r.ownPropertyOnly)!==null&&f!==void 0?f:t.ownPropertyOnly,this.memoryLimit=i??new Qc("memory alloc",(p=r.memoryLimit)!==null&&p!==void 0?p:t.memoryLimit),this.renderLimit=a??new Qc("template render",e0().now()+((d=r.renderLimit)!==null&&d!==void 0?d:t.renderLimit))}getRegister(e,t=void 0){return this.registers[e]=this.registers[e]||t}setRegister(e,t){return this.registers[e]=t}saveRegister(...e){return e.map(t=>[t,this.getRegister(t)])}restoreRegister(e){return e.forEach(([t,r])=>this.setRegister(t,r))}getAll(){return[this.globals,this.environments,...this.scopes].reduce((e,t)=>s3(e,t),{})}get(e){return this.getSync(e)}getSync(e){return fs(this._get(e))}*_get(e){const t=this.findScope(e[0]);return yield this._getFromScope(t,e)}getFromScope(e,t){return fs(this._getFromScope(e,t))}*_getFromScope(e,t,r=this.strictVariables){ot(t)&&(t=t.split("."));for(let i=0;i<t.length;i++)if(e=yield this.readProperty(e,t[i]),r&&FR(e))throw new UR(t.slice(0,i+1).join("."));return e}push(e){return this.scopes.push(e)}pop(){return this.scopes.pop()}bottom(){return this.scopes[0]}spawn(e={}){return new wg(e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables,ownPropertyOnly:this.ownPropertyOnly},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})}findScope(e){for(let t=this.scopes.length-1;t>=0;t--){const r=this.scopes[t];if(e in r)return r}return e in this.environments?this.environments:this.globals}readProperty(e,t){if(e=Jm(e),t=gt(t),Jt(e))return e;if(Sn(e)&&t<0)return e[e.length+ +t];const r=m$(e,t,this.ownPropertyOnly);return r===void 0&&e instanceof Ma?e.liquidMethodMissing(t,this):un(r)?r.call(e):t==="size"?v$(e):t==="first"?g$(e):t==="last"?y$(e):r}};function m$(n,e,t){if(!(t&&!P0.call(n,e)&&!(n instanceof Ma)))return n[e]}function g$(n){return Sn(n)?n[0]:n.first}function y$(n){return Sn(n)?n[n.length-1]:n.last}function v$(n){if(P0.call(n,"size")||n.size!==void 0)return n.size;if(Sn(n)||ot(n))return n.length;if(typeof n=="object")return Object.keys(n).length}var $a;(function(n){n[n.OUTPUT=0]="OUTPUT",n[n.STORE=1]="STORE"})($a||($a={}));const b$=qi(Math.abs),_$=qi(Math.max),w$=qi(Math.min),E$=qi(Math.ceil),A$=qi((n,e,t=!1)=>t?Math.floor(n/e):n/e),k$=qi(Math.floor),C$=qi((n,e)=>n-e),S$=qi((n,e)=>n+e),D$=qi((n,e)=>n%e),x$=qi((n,e)=>n*e);function T$(n,e=0){n=Xc(n),e=Xc(e);const t=Math.pow(10,e),r=n*t*(1+Number.EPSILON);return Math.round(r)/t}var R$=Object.freeze({__proto__:null,abs:b$,at_least:_$,at_most:w$,ceil:E$,divided_by:A$,floor:k$,minus:C$,plus:S$,modulo:D$,times:x$,round:T$});const B$=n=>decodeURIComponent(Oe(n)).replace(/\+/g," "),$$=n=>encodeURIComponent(Oe(n)).replace(/%20/g,"+"),F$=n=>encodeURIComponent(Oe(n)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),L$=n=>encodeURI(Oe(n)).replace(/%5B/g,"[").replace(/%5D/g,"]"),L9=/[^\p{M}\p{L}\p{Nd}]+/ug,I$={raw:/\s+/g,default:L9,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:L9,none:null};function O$(n,e="default",t=!1){n=Oe(n);const r=I$[e];return r&&(e==="latin"&&(n=N$(n)),n=n.replace(r,"-").replace(/^-|-$/g,"")),t?n:n.toLowerCase()}function N$(n){return n.replace(/[àáâãäå]/g,"a").replace(/[æ]/g,"ae").replace(/[ç]/g,"c").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[ð]/g,"d").replace(/[ñ]/g,"n").replace(/[òóôõöø]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ß]/g,"ss").replace(/[œ]/g,"oe").replace(/[þ]/g,"th").replace(/[ẞ]/g,"SS").replace(/[Œ]/g,"OE").replace(/[Þ]/g,"TH")}var P$=Object.freeze({__proto__:null,url_decode:B$,url_encode:$$,cgi_escape:F$,uri_escape:L$,slugify:O$});const M$=E3(function(n,e){const t=On(n),r=Jt(e)?" ":Oe(e),i=t.length*(1+r.length);return this.context.memoryLimit.use(i),t.join(r)}),q$=E3(n=>Qm(n)?eg(n):""),V$=E3(n=>Qm(n)?n[0]:""),z$=E3(function(n){const e=On(n);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*Eg(n,e,t){const r=[],i=On(n);this.context.memoryLimit.use(i.length);for(const a of i)r.push([a,e?yield this.context._getFromScope(a,Oe(e).split("."),!1):a]);return r.sort((a,u)=>t(a[1],u[1])).map(a=>a[0])}function*j$(n,e){return yield*Eg.call(this,n,e,PR)}function*U$(n,e){return yield*Eg.call(this,n,e,MR)}const W$=n=>n&&n.length||0;function*H$(n,e){const t=[],r=On(n);this.context.memoryLimit.use(r.length);for(const i of r)t.push(yield this.context._getFromScope(i,Oe(e),!1));return t}function*G$(n,e){let t=0;const r=On(n);for(const i of r){const a=Number(e?yield this.context._getFromScope(i,Oe(e),!1):i);t+=Number.isNaN(a)?0:a}return t}function Y$(n){const e=On(n);return this.context.memoryLimit.use(e.length),e.filter(t=>!Jt(gt(t)))}function Ag(n,e=[]){const t=On(n),r=On(e);return this.context.memoryLimit.use(t.length+r.length),t.concat(r)}function K$(n,e){return Ag.call(this,n,[e])}function X$(n,e){const t=On(n);this.context.memoryLimit.use(t.length);const r=[...t];return r.unshift(e),r}function Z$(n){const e=On(n);this.context.memoryLimit.use(e.length);const t=[...e];return t.pop(),t}function J$(n){const e=On(n);this.context.memoryLimit.use(e.length);const t=[...e];return t.shift(),t}function Q$(n,e,t=1){return n=gt(n),Jt(n)?[]:(Sn(n)||(n=Oe(n)),e=e<0?n.length+e:e,this.context.memoryLimit.use(t),n.slice(e,e+t))}function kg(n){return this.context.opts.jekyllWhere?e=>$o.is(n)?hs(e,n):Sn(e)?LB(e,n):hs(e,n):n===void 0?e=>xa(e,this.context):e=>hs(e,n)}function*Cg(n,e,t,r){const i=[];e=On(e),this.context.memoryLimit.use(e.length);const a=new di(Oe(t)).readScopeValue();for(const s of e)i.push(yield tn(a,this.context.spawn(s)));const u=kg.call(this,r);return e.filter((s,f)=>u(i[f])===n)}function*Sg(n,e,t,r){const i=[],a=new Ar(Oe(r),this.liquid),u=On(e);this.context.memoryLimit.use(u.length);for(const s of u){this.context.push({[t]:s});const f=yield a.value(this.context);this.context.pop(),f===n&&i.push(s)}return i}function*eF(n,e,t){return yield*Cg.call(this,!0,n,e,t)}function*tF(n,e,t){return yield*Cg.call(this,!1,n,e,t)}function*nF(n,e,t){return yield*Sg.call(this,!0,n,e,t)}function*rF(n,e,t){return yield*Sg.call(this,!1,n,e,t)}function*iF(n,e){const t=new Map;n=W1(n);const r=new di(Oe(e)).readScopeValue();this.context.memoryLimit.use(n.length);for(const i of n){const a=yield tn(r,this.context.spawn(i));t.has(a)||t.set(a,[]),t.get(a).push(i)}return[...t.entries()].map(([i,a])=>({name:i,items:a}))}function*sF(n,e,t){const r=new Map,i=new Ar(Oe(t),this.liquid);n=W1(n),this.context.memoryLimit.use(n.length);for(const a of n){this.context.push({[e]:a});const u=yield i.value(this.context);this.context.pop(),r.has(u)||r.set(u,[]),r.get(u).push(a)}return[...r.entries()].map(([a,u])=>({name:a,items:u}))}function*U0(n,e,t){const r=new di(Oe(e)).readScopeValue(),i=On(n),a=kg.call(this,t);for(let u=0;u<i.length;u++){const s=yield tn(r,this.context.spawn(i[u]));if(a(s))return[u,i[u]]}}function*W0(n,e,t){const r=new Ar(Oe(t),this.liquid),i=On(n);for(let a=0;a<i.length;a++){this.context.push({[e]:i[a]});const u=yield r.value(this.context);if(this.context.pop(),u)return[a,i[a]]}}function*aF(n,e,t){return!!(yield*U0.call(this,n,e,t))}function*oF(n,e,t){return!!(yield*W0.call(this,n,e,t))}function*lF(n,e,t){const r=yield*U0.call(this,n,e,t);return r?r[0]:void 0}function*uF(n,e,t){const r=yield*W0.call(this,n,e,t);return r?r[0]:void 0}function*cF(n,e,t){const r=yield*U0.call(this,n,e,t);return r?r[1]:void 0}function*fF(n,e,t){const r=yield*W0.call(this,n,e,t);return r?r[1]:void 0}function dF(n){return n=On(n),this.context.memoryLimit.use(n.length),[...new Set(n)]}function pF(n,e=1){if(n=gt(n),Jt(n))return[];Sn(n)||(n=Oe(n)),this.context.memoryLimit.use(n.length);const t=[...n].sort(()=>Math.random()-.5);return e===1?t[0]:t.slice(0,e)}var hF=Object.freeze({__proto__:null,join:M$,last:q$,first:V$,reverse:z$,sort:j$,sort_natural:U$,size:W$,map:H$,sum:G$,compact:Y$,concat:Ag,push:K$,unshift:X$,pop:Z$,shift:J$,slice:Q$,where:eF,reject:tF,where_exp:nF,reject_exp:rF,group_by:iF,group_by_exp:sF,has:aF,has_exp:oF,find_index:lF,find_index_exp:uF,find:cF,find_exp:fF,uniq:dF,sample:pF});function H0(n,e,t){var r,i;const a=((r=n==null?void 0:n.length)!==null&&r!==void 0?r:0)+((i=t==null?void 0:t.length)!==null&&i!==void 0?i:0);this.context.memoryLimit.use(a);const u=xg(n,this.context.opts,t);return u?(e=gt(e),e=Jt(e)?this.context.opts.dateFormat:Oe(e),this.context.memoryLimit.use(e.length),V2(u,e,this.context.memoryLimit)):n}function mF(n){return H0.call(this,n,"%Y-%m-%dT%H:%M:%S%:z")}function gF(n){return H0.call(this,n,"%a, %d %b %Y %H:%M:%S %z")}function yF(n,e,t){return Dg.call(this,n,"%b",e,t)}function vF(n,e,t){return Dg.call(this,n,"%B",e,t)}function Dg(n,e,t,r){const i=xg(n,this.context.opts);if(!i)return n;const a=this.context.memoryLimit;if(t==="ordinal"){const u=i.getDate();return r==="US"?V2(i,`${e} ${u}%q, %Y`,a):V2(i,`${u}%q ${e} %Y`,a)}return V2(i,`%d ${e} %Y`,a)}function xg(n,e,t){let r;const i=t??e.timezoneOffset,a=e.locale;if(n=gt(n),!Jt(n))return n==="now"||n==="today"?r=new oi(Date.now(),a,i):_3(n)?r=new oi(n*1e3,a,i):ot(n)?/^\d+$/.test(n)?r=new oi(+n*1e3,a,i):e.preserveTimezones&&t===void 0?r=oi.createDateFixedToTimezone(n,a):r=new oi(n,a,i):r=new oi(n,a,i),r.valid()?r:void 0}var bF=Object.freeze({__proto__:null,date:H0,date_to_xmlschema:mF,date_to_rfc822:gF,date_to_string:yF,date_to_long_string:vF});const fu=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,I9=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function _F(n,e){Nn(arguments.length===2,"append expect 2 arguments");const t=Oe(n),r=Oe(e);return this.context.memoryLimit.use(t.length+r.length),t+r}function wF(n,e){Nn(arguments.length===2,"prepend expect 2 arguments");const t=Oe(n),r=Oe(e);return this.context.memoryLimit.use(t.length+r.length),r+t}function EF(n,e){const t=Oe(n);if(this.context.memoryLimit.use(t.length),e){e=Oe(e),this.context.memoryLimit.use(e.length);for(let r=0,i=new Set(e);r<t.length;r++)if(!i.has(t[r]))return t.slice(r);return""}return t.trimStart()}function AF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function kF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),Oe(e).toUpperCase()}function CF(n,e){const t=Oe(n);return e=Oe(e),this.context.memoryLimit.use(t.length+e.length),t.split(e).join("")}function SF(n,e){const t=Oe(n);return e=Oe(e),this.context.memoryLimit.use(t.length+e.length),t.replace(e,"")}function DF(n,e){const t=Oe(n),r=Oe(e);this.context.memoryLimit.use(t.length+r.length);const i=t.lastIndexOf(r);return i===-1?t:t.substring(0,i)+t.substring(i+r.length)}function xF(n,e){if(n=Oe(n),this.context.memoryLimit.use(n.length),e){e=Oe(e),this.context.memoryLimit.use(e.length);for(let t=n.length-1,r=new Set(e);t>=0;t--)if(!r.has(n[t]))return n.slice(0,t+1);return""}return n.trimEnd()}function TF(n,e){const t=Oe(n);this.context.memoryLimit.use(t.length);const r=t.split(Oe(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function RF(n,e){const t=Oe(n);if(this.context.memoryLimit.use(t.length),e){const r=new Set(Oe(e));this.context.memoryLimit.use(r.size);let i=0,a=t.length-1;for(;r.has(t[i]);)i++;for(;a>=i&&r.has(t[a]);)a--;return t.slice(i,a+1)}return t.trim()}function BF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function $F(n){return n=Oe(n),this.context.memoryLimit.use(n.length),n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}function FF(n,e,t){const r=Oe(n);e=Oe(e),t=Oe(t);const i=r.split(e),a=r.length+(i.length-1)*(t.length-e.length);return this.context.memoryLimit.use(a),i.join(t)}function LF(n,e,t){const r=Oe(n);return e=Oe(e),t=Oe(t),this.context.memoryLimit.use(r.length+e.length+t.length),r.replace(e,()=>t)}function IF(n,e,t){const r=Oe(n),i=Oe(e),a=Oe(t);this.context.memoryLimit.use(r.length+i.length+a.length);const u=r.lastIndexOf(i);return u===-1?r:r.substring(0,u)+a+r.substring(u+i.length)}function OF(n,e=50,t="..."){const r=Oe(n);return t=Oe(t),this.context.memoryLimit.use(r.length+t.length),r.length<=e?n:r.substring(0,e-t.length)+t}function NF(n,e=15,t="..."){const r=Oe(n);t=Oe(t),this.context.memoryLimit.use(r.length+t.length);const i=r.split(/\s+/);e<=0&&(e=1);let a=i.slice(0,e).join(" ");return i.length>=e&&(a+=t),a}function PF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function MF(n,e){const t=Oe(n);if(this.context.memoryLimit.use(t.length),n=t.trim(),!n)return 0;switch(e){case"cjk":return(n.match(fu)||[]).length+(n.match(I9)||[]).length;case"auto":return fu.test(n)?n.match(fu).length+(n.match(I9)||[]).length:n.split(/\s+/).length;default:return n.split(/\s+/).length}}function qF(n,e="and"){switch(e=Oe(e),this.context.memoryLimit.use(n.length+e.length),n.length){case 0:return"";case 1:return n[0];case 2:return`${n[0]} ${e} ${n[1]}`;default:return`${n.slice(0,-1).join(", ")}, ${e} ${n[n.length-1]}`}}var VF=Object.freeze({__proto__:null,append:_F,prepend:wF,lstrip:EF,downcase:AF,upcase:kF,remove:CF,remove_first:SF,remove_last:DF,rstrip:xF,split:TF,strip:RF,strip_newlines:BF,capitalize:$F,replace:FF,replace_first:LF,replace_last:IF,truncate:OF,truncatewords:NF,normalize_whitespace:PF,number_of_words:MF,array_to_sentence_string:qF});function zF(n){return btoa(String.fromCharCode(...new TextEncoder().encode(n)))}function jF(n){return new TextDecoder().decode(Uint8Array.from(atob(n),e=>e.charCodeAt(0)))}function UF(n){if(typeof Buffer<"u"&&Buffer.isBuffer(n))return this.context.memoryLimit.use(n.byteLength),n.toString("base64");const e=Oe(n);return this.context.memoryLimit.use(e.length),zF(e)}function WF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),jF(e)}var HF=Object.freeze({__proto__:null,base64_encode:UF,base64_decode:WF});function Tg(n){const e=new Uint8Array(n);let t="";for(let r=0;r<e.length;r++)t+=e[r].toString(16).padStart(2,"0");return t}function GF(n){return zt(this,void 0,void 0,function*(){const e=new TextEncoder().encode(n),t=yield crypto.subtle.digest("SHA-256",e);return Tg(t)})}function YF(n,e){return zt(this,void 0,void 0,function*(){const t=new TextEncoder,r=yield crypto.subtle.importKey("raw",t.encode(e),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),i=yield crypto.subtle.sign("HMAC",r,t.encode(n));return Tg(i)})}function KF(n){const e=Oe(n);return this.context.memoryLimit.use(e.length),GF(e)}function XF(n,e){const t=Oe(n),r=Oe(e);return this.context.memoryLimit.use(t.length+r.length),YF(t,r)}var ZF=Object.freeze({__proto__:null,sha256:KF,hmac_sha256:XF});const JF=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e$),R$),P$),hF),bF),VF),HF),ZF),hg);class QF extends Ht{constructor(e,t,r){super(e,t,r),this.identifier=this.tokenizer.readIdentifier(),this.key=this.identifier.content,this.tokenizer.assert(this.key,"expected variable name"),this.tokenizer.skipBlank(),this.tokenizer.assert(this.tokenizer.peek()==="=",'expected "="'),this.tokenizer.advance(),this.value=new Ar(this.tokenizer.readFilteredValue(),this.liquid)}*render(e){e.bottom()[this.key]=yield this.value.value(e,this.liquid.options.lenientIf)}*arguments(){yield this.value}*localScope(){yield this.identifier}}const O9=["offset","limit","reversed"];class eL extends Ht{constructor(e,t,r,i){super(e,t,r);const a=this.tokenizer.readIdentifier(),u=this.tokenizer.readIdentifier(),s=this.tokenizer.readValue();if(!a.size()||u.content!=="in"||!s)throw new Error(`illegal tag: ${e.getText()}`);this.variable=a.content,this.collection=s,this.hash=new Mo(this.tokenizer,r.options.keyValueSeparator),this.templates=[],this.elseTemplates=[];let f;const p=i.parseStream(t).on("start",()=>f=this.templates).on("tag:else",d=>{i3(d.args),f=this.elseTemplates}).on("tag:endfor",d=>{i3(d.args),p.stop()}).on("template",d=>f.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});p.start()}*render(e,t){const r=this.liquid.renderer;let i=W1(yield tn(this.collection,e));if(!i.length){yield r.renderTemplates(this.elseTemplates,e,t);return}const a="continue-"+this.variable+"-"+this.collection.getText();e.push(Xs({continue:e.getRegister(a,{})}));const u=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(u).filter(p=>O9.includes(p)):O9.filter(p=>u[p]!==void 0)).reduce((p,d)=>d==="offset"?nL(p,u.offset):d==="limit"?rL(p,u.limit):tL(p),i),e.setRegister(a,(u.offset||0)+i.length);const f=Xs({forloop:new q0(i.length,this.collection.getText(),this.variable)});e.push(f);for(const p of i){if(f[this.variable]=p,e.continueCalled=e.breakCalled=!1,yield r.renderTemplates(this.templates,e,t),e.breakCalled)break;f.forloop.next()}e.continueCalled=e.breakCalled=!1,e.pop()}*children(){const e=this.templates.slice();return this.elseTemplates&&e.push(...this.elseTemplates),e}*arguments(){yield this.collection;for(const e of Object.values(this.hash.hash))Er(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}}function tL(n){return[...n].reverse()}function nL(n,e){return n.slice(e)}function rL(n,e){return n.slice(0,e)}class iL extends Ht{constructor(e,t,r,i){for(super(e,t,r),this.templates=[],this.identifier=this.readVariable(),this.variable=this.identifier.content;t.length;){const a=t.shift();if(Va(a)&&a.name==="endcapture")return;this.templates.push(i.parseToken(a,t))}throw new Error(`tag ${e.getText()} not closed`)}readVariable(){let e=this.tokenizer.readIdentifier();if(e.content||(e=this.tokenizer.readQuoted(),e))return e;throw this.tokenizer.error("invalid capture name")}*render(e){const r=yield this.liquid.renderer.renderTemplates(this.templates,e);e.bottom()[this.variable]=r}*children(){return this.templates}*localScope(){yield this.identifier}}class sL extends Ht{constructor(e,t,r,i){super(e,t,r),this.branches=[],this.elseTemplates=[],this.value=new Ar(this.tokenizer.readFilteredValue(),this.liquid),this.elseTemplates=[];let a=[],u=0;const s=i.parseStream(t).on("tag:when",f=>{if(u>0)return;a=[];const p=[];for(;!f.tokenizer.end();)p.push(f.tokenizer.readValueOrThrow()),f.tokenizer.skipBlank(),f.tokenizer.peek()===","?f.tokenizer.readTo(","):f.tokenizer.readTo("or");this.branches.push({values:p,templates:a})}).on("tag:else",()=>{u++,a=this.elseTemplates}).on("tag:endcase",()=>s.stop()).on("template",f=>{(a!==this.elseTemplates||u===1)&&a.push(f)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});s.start()}*render(e,t){const r=this.liquid.renderer,i=gt(yield this.value.value(e,e.opts.lenientIf));let a=!1;for(const u of this.branches)for(const s of u.values){const f=yield tn(s,e,e.opts.lenientIf);if(hs(i,f)){yield r.renderTemplates(u.templates,e,t),a=!0;break}}a||(yield r.renderTemplates(this.elseTemplates,e,t))}*arguments(){yield this.value,yield*this.branches.flatMap(e=>e.values)}*children(){const e=this.branches.flatMap(t=>t.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}}class aL extends Ht{constructor(e,t,r){for(super(e,t,r);t.length;){const i=t.shift();if(Va(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class oL extends Ht{constructor(e,t,r,i){super(e,t,r);const a=this.tokenizer;for(this.file=G0(a,this.liquid,i),this.currentFile=e.file;!a.end();){a.skipBlank();const u=a.p,s=a.readIdentifier();if((s.content==="with"||s.content==="for")&&(a.skipBlank(),a.peek()!==":")){const f=a.readValue();if(f){const p=a.p,d=a.readIdentifier();let m;d.content==="as"?m=a.readIdentifier():a.p=p;const g={value:f,alias:m&&m.content};s.content==="with"?this.with=g:this.forBinding=g,a.skipBlank(),a.peek()===","&&a.advance();continue}}a.p=u;break}this.hash=new Mo(a,r.options.keyValueSeparator)}*render(e,t){const{liquid:r,hash:i}=this,a=yield Y0(this.file,e,r);Nn(a,()=>`illegal file path "${a}"`);const u=e.spawn(),s=u.bottom();if(s3(s,yield i.render(e)),this.with){const{value:f,alias:p}=this.with;s[p||a]=yield tn(f,e)}if(this.forBinding){const{value:f,alias:p}=this.forBinding,d=W1(yield tn(f,e));s.forloop=new q0(d.length,f.getText(),p);for(const m of d){s[p]=m;const g=yield r._parsePartialFile(a,u.sync,this.currentFile);yield r.renderer.renderTemplates(g,u,t),s.forloop.next()}}else{const f=yield r._parsePartialFile(a,u.sync,this.currentFile);yield r.renderer.renderTemplates(f,u,t)}}*children(e,t){return e&&ot(this.file)?yield this.liquid._parsePartialFile(this.file,t,this.currentFile):[]}partialScope(){if(ot(this.file)){const e=Object.keys(this.hash.hash);if(this.with){const{value:t,alias:r}=this.with;ot(r)?e.push([r,t]):ot(this.file)&&e.push([this.file,t])}if(this.forBinding){const{value:t,alias:r}=this.forBinding;ot(r)?e.push([r,t]):ot(this.file)&&e.push([this.file,t])}return{name:this.file,isolated:!0,scope:e}}}*arguments(){for(const e of Object.values(this.hash.hash))Er(e)&&(yield e);if(this.with){const{value:e}=this.with;Er(e)&&(yield e)}if(this.forBinding){const{value:e}=this.forBinding;Er(e)&&(yield e)}}}function G0(n,e,t){if(e.options.dynamicPartials){const a=n.readValue();if(n.assert(a,"illegal file path"),a.getText()==="none")return;if(n0(a)){const u=t.parse(TB(a));return N9(u)}return a}const r=[...n.readFileNameTemplate(e.options)],i=N9(t.parseTokens(r));return i==="none"?void 0:i}function N9(n){return n.length===1&&j0(n[0].token)?n[0].token.getContent():n}function*Y0(n,e,t){return typeof n=="string"?n:Array.isArray(n)?t.renderer.renderTemplates(n,e):yield tn(n,e)}class lL extends Ht{constructor(e,t,r,i){super(e,t,r);const{tokenizer:a}=e;this.file=G0(a,this.liquid,i),this.currentFile=e.file;const u=a.p;a.readIdentifier().content==="with"?(a.skipBlank(),a.peek()!==":"?this.withVar=a.readValue():a.p=u):a.p=u,this.hash=new Mo(a,r.options.jekyllInclude||r.options.keyValueSeparator)}*render(e,t){const{liquid:r,hash:i,withVar:a}=this,{renderer:u}=r,s=yield Y0(this.file,e,r);Nn(s,()=>`illegal file path "${s}"`);const f=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",$a.OUTPUT);const p=Xs(yield i.render(e));a&&(p[s]=yield tn(a,e));const d=yield r._parsePartialFile(s,e.sync,this.currentFile);e.push(e.opts.jekyllInclude?Xs({include:p}):p),yield u.renderTemplates(d,e,t),e.pop(),e.restoreRegister(f)}*children(e,t){return e&&ot(this.file)?yield this.liquid._parsePartialFile(this.file,t,this.currentFile):[]}partialScope(){if(ot(this.file)){let e;return this.liquid.options.jekyllInclude?e=["include"]:(e=Object.keys(this.hash.hash),this.withVar&&e.push([this.file,this.withVar])),{name:this.file,isolated:!1,scope:e}}}*arguments(){yield*Object.values(this.hash.hash).filter(Er),Er(this.file)&&(yield this.file),Er(this.withVar)&&(yield this.withVar)}}class uL extends Ht{constructor(e,t,r){super(e,t,r),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,t){const r=e.environments;_3(r[this.variable])||(r[this.variable]=0),t.write(Oe(--r[this.variable]))}*localScope(){yield this.identifier}}class cL extends Ht{constructor(e,t,r){super(e,t,r),this.candidates=[];const i=this.tokenizer.readValue();for(this.tokenizer.skipBlank(),i&&(this.tokenizer.peek()===":"?(this.group=i,this.tokenizer.advance()):this.candidates.push(i));!this.tokenizer.end();){const a=this.tokenizer.readValue();a&&this.candidates.push(a),this.tokenizer.readTo(",")}this.tokenizer.assert(this.candidates.length,()=>`empty candidates: "${e.getText()}"`)}*render(e,t){const i=`cycle:${yield tn(this.group,e)}:`+this.candidates.join(","),a=e.getRegister("cycle",{});let u=a[i];u===void 0&&(u=a[i]=0);const s=this.candidates[u];return u=(u+1)%this.candidates.length,a[i]=u,yield tn(s,e)}*arguments(){yield*this.candidates,this.group&&(yield this.group)}}class fL extends Ht{constructor(e,t,r,i){super(e,t,r),this.branches=[];let a=[];i.parseStream(t).on("start",()=>this.branches.push({value:new Ar(e.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})).on("tag:elsif",u=>{Nn(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new Ar(u.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})}).on("tag:else",u=>{i3(u.args),Nn(!this.elseTemplates,"duplicated else"),a=this.elseTemplates=[]}).on("tag:endif",function(u){i3(u.args),this.stop()}).on("template",u=>a.push(u)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,t){const r=this.liquid.renderer;for(const{value:i,templates:a}of this.branches){const u=yield i.value(e,e.opts.lenientIf);if(xa(u,e)){yield r.renderTemplates(a,e,t);return}}yield r.renderTemplates(this.elseTemplates||[],e,t)}*children(){const e=this.branches.flatMap(t=>t.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}}class dL extends Ht{constructor(e,t,r){super(e,t,r),this.identifier=this.tokenizer.readIdentifier(),this.variable=this.identifier.content}render(e,t){const r=e.environments;_3(r[this.variable])||(r[this.variable]=0);const i=r[this.variable];r[this.variable]++,t.write(Oe(i))}*localScope(){yield this.identifier}}class pL extends Ht{constructor(e,t,r,i){super(e,t,r),this.file=G0(this.tokenizer,this.liquid,i),this.currentFile=e.file,this.args=new Mo(this.tokenizer,r.options.keyValueSeparator),this.templates=i.parseTokens(t)}*render(e,t){const{liquid:r,args:i,file:a}=this,{renderer:u}=r;if(a===void 0){e.setRegister("blockMode",$a.OUTPUT),yield u.renderTemplates(this.templates,e,t);return}const s=yield Y0(this.file,e,r);Nn(s,()=>`illegal file path "${s}"`);const f=yield r._parseLayoutFile(s,e.sync,this.currentFile);e.setRegister("blockMode",$a.STORE);const p=yield u.renderTemplates(this.templates,e),d=e.getRegister("blocks",{});d[""]===void 0&&(d[""]=(m,g)=>g.write(p)),e.setRegister("blockMode",$a.OUTPUT),e.push(Xs(yield i.render(e))),yield u.renderTemplates(f,e,t),e.pop()}*children(e){const t=this.templates.slice();return e&&ot(this.file)&&t.push(...yield this.liquid._parsePartialFile(this.file,!0,this.currentFile)),t}*arguments(){for(const e of Object.values(this.args.hash))Er(e)&&(yield e);Er(this.file)&&(yield this.file)}partialScope(){if(ot(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}}class hL extends Ht{constructor(e,t,r,i){super(e,t,r),this.templates=[];const a=/\w+/.exec(e.args);for(this.block=a?a[0]:"";t.length;){const u=t.shift();if(Va(u)&&u.name==="endblock")return;const s=i.parseToken(u,t);this.templates.push(s)}throw new Error(`tag ${e.getText()} not closed`)}*render(e,t){const r=this.getBlockRender(e);e.getRegister("blockMode")===$a.STORE?e.getRegister("blocks",{})[this.block]=r:yield r(new h9,t)}getBlockRender(e){const t=this,{liquid:r,templates:i}=this,a=e.getRegister("blocks",{})[this.block],u=function*(s,f){const p=e.getRegister("blockStack",[]);if(p.includes(t))throw new Error("block tag cannot be nested");p.push(t),e.push(Xs({block:s})),yield r.renderer.renderTemplates(i,e,f),e.pop(),p.pop()};return a?(s,f)=>a(new h9(p=>u(s,p)),f):u}*children(){return this.templates}blockScope(){return["block"]}}class mL extends Ht{constructor(e,t,r){for(super(e,t,r),this.tokens=[];t.length;){const i=t.shift();if(Va(i)&&i.name==="endraw")return;this.tokens.push(i)}throw new Error(`tag ${e.getText()} not closed`)}render(){return this.tokens.map(e=>e.getText()).join("")}}class gL extends q0{constructor(e,t,r,i){super(e,r,i),this.length=e,this.cols=t}row(){return Math.floor(this.i/this.cols)+1}col0(){return this.i%this.cols}col(){return this.col0()+1}col_first(){return this.col0()===0}col_last(){return this.col()===this.cols}}class yL extends Ht{constructor(e,t,r,i){super(e,t,r);const a=this.tokenizer.readIdentifier();this.tokenizer.skipBlank();const u=this.tokenizer.readIdentifier(),s=this.tokenizer.readValue();if(u.content!=="in"||!s)throw new Error(`illegal tag: ${e.getText()}`);this.variable=a.content,this.collection=s,this.args=new Mo(this.tokenizer,r.options.keyValueSeparator),this.templates=[];let f;const p=i.parseStream(t).on("start",()=>f=this.templates).on("tag:endtablerow",()=>p.stop()).on("template",d=>f.push(d)).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)});p.start()}*render(e,t){let r=W1(yield tn(this.collection,e));const i=yield this.args.render(e),a=i.offset||0,u=i.limit===void 0?r.length:i.limit;r=r.slice(a,a+u);const s=i.cols||r.length,f=this.liquid.renderer,p=new gL(r.length,s,this.collection.getText(),this.variable),d=Xs({tablerowloop:p});e.push(d);for(let m=0;m<r.length;m++,p.next())d[this.variable]=r[m],p.col0()===0&&(p.row()!==1&&t.write("</tr>"),t.write(`<tr class="row${p.row()}">`)),t.write(`<td class="col${p.col()}">`),yield f.renderTemplates(this.templates,e,t),t.write("</td>");r.length&&t.write("</tr>"),e.pop()}*children(){return this.templates}*arguments(){yield this.collection;for(const e of Object.values(this.args.hash))Er(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}}class vL extends Ht{constructor(e,t,r,i){super(e,t,r),this.branches=[],this.elseTemplates=[];let a=[],u=0;i.parseStream(t).on("start",()=>this.branches.push({value:new Ar(e.tokenizer.readFilteredValue(),this.liquid),test:A3,templates:a=[]})).on("tag:elsif",s=>{if(u>0){a=[];return}this.branches.push({value:new Ar(s.tokenizer.readFilteredValue(),this.liquid),test:xa,templates:a=[]})}).on("tag:else",()=>{u++,a=this.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",s=>{(a!==this.elseTemplates||u===1)&&a.push(s)}).on("end",()=>{throw new Error(`tag ${e.getText()} not closed`)}).start()}*render(e,t){const r=this.liquid.renderer;for(const{value:i,test:a,templates:u}of this.branches){const s=yield i.value(e,e.opts.lenientIf);if(a(s,e)){yield r.renderTemplates(u,e,t);return}}yield r.renderTemplates(this.elseTemplates,e,t)}*children(){const e=this.branches.flatMap(t=>t.templates);return this.elseTemplates&&e.push(...this.elseTemplates),e}arguments(){return this.branches.map(e=>e.value)}}class bL extends Ht{render(e,t){e.breakCalled=!0}}class _L extends Ht{render(e,t){e.continueCalled=!0}}class wL extends Ht{constructor(e,t,r){super(e,t,r),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new Ar(this.tokenizer.readFilteredValue(),this.liquid))}*render(e,t){if(!this.value)return;const r=yield this.value.value(e,!1);t.write(r)}*arguments(){this.value&&(yield this.value)}}class EL extends Ht{constructor(e,t,r,i){super(e,t,r);const a=this.tokenizer.readLiquidTagTokens(this.liquid.options);this.templates=i.parseTokens(a)}*render(e,t){yield this.liquid.renderer.renderTemplates(this.templates,e,t)}*children(){return this.templates}}class AL extends Ht{constructor(e,t,r){if(super(e,t,r),e.args.search(/\n\s*[^#\s]/g)!==-1)throw new Error("every line of an inline comment must start with a '#' character")}render(){}}const kL={assign:QF,for:eL,capture:iL,case:sL,comment:aL,include:lL,render:oL,decrement:uL,increment:dL,cycle:cL,if:fL,layout:pL,block:hL,raw:mL,tablerow:yL,unless:vL,break:bL,continue:_L,echo:wL,liquid:EL,"#":AL};class C3{constructor(e={}){this.renderer=new SB,this.filters=Object.create(null),this.tags=Object.create(null),this.options=n$(e),this.parser=new va(this),f9(kL,(t,r)=>this.registerTag(r,t)),f9(JF,(t,r)=>this.registerFilter(r,t))}parse(e,t){return new va(this).parse(e,t)}_render(e,t,r){const i=t instanceof c1?t:new c1(t,this.options,r);return this.renderer.renderTemplates(e,i)}render(e,t,r){return zt(this,void 0,void 0,function*(){return cs(this._render(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}renderSync(e,t,r){return fs(this._render(e,t,Object.assign(Object.assign({},r),{sync:!0})))}renderToNodeStream(e,t,r={}){const i=new c1(t,this.options,r);return this.renderer.renderTemplatesToNodeStream(e,i)}_parseAndRender(e,t,r){const i=this.parse(e);return this._render(i,t,r)}parseAndRender(e,t,r){return zt(this,void 0,void 0,function*(){return cs(this._parseAndRender(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}parseAndRenderSync(e,t,r){return fs(this._parseAndRender(e,t,Object.assign(Object.assign({},r),{sync:!0})))}_parsePartialFile(e,t,r){return new va(this).parseFile(e,t,Fo.Partials,r)}_parseLayoutFile(e,t,r){return new va(this).parseFile(e,t,Fo.Layouts,r)}_parseFile(e,t,r,i){return new va(this).parseFile(e,t,r,i)}parseFile(e,t){return zt(this,void 0,void 0,function*(){return cs(new va(this).parseFile(e,!1,t))})}parseFileSync(e,t){return fs(new va(this).parseFile(e,!0,t))}*_renderFile(e,t,r){const i=yield this._parseFile(e,r.sync,r.lookupType);return yield this._render(i,t,r)}renderFile(e,t,r){return zt(this,void 0,void 0,function*(){return cs(this._renderFile(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}renderFileSync(e,t,r){return fs(this._renderFile(e,t,Object.assign(Object.assign({},r),{sync:!0})))}renderFileToNodeStream(e,t,r){return zt(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,t,r)})}_evalValue(e,t){const r=new Ar(e,this),i=t instanceof c1?t:new c1(t,this.options);return r.value(i)}evalValue(e,t){return zt(this,void 0,void 0,function*(){return cs(this._evalValue(e,t))})}evalValueSync(e,t){return fs(this._evalValue(e,t))}registerFilter(e,t){this.filters[e]=t}registerTag(e,t){this.tags[e]=un(t)?t:l$(t)}plugin(e){return e.call(this,C3)}express(){const e=this;let t=!0;return function(r,i,a){if(t){t=!1;const u=z2(this.root);e.options.root.unshift(...u),e.options.layouts.unshift(...u),e.options.partials.unshift(...u)}e.renderFile(r,i).then(u=>a(null,u),a)}}analyze(e,t={}){return zt(this,void 0,void 0,function*(){return Ls(e,t)})}analyzeSync(e,t={}){return Is(e,t)}parseAndAnalyze(e,t,r={}){return zt(this,void 0,void 0,function*(){return Ls(this.parse(e,t),r)})}parseAndAnalyzeSync(e,t,r={}){return Is(this.parse(e,t),r)}variables(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Object.keys(r.variables)})}variablesSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Object.keys(r.variables)}fullVariables(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Array.from(new Set(Object.values(r.variables).flatMap(i=>i.map(a=>String(a)))))})}fullVariablesSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Array.from(new Set(Object.values(r.variables).flatMap(i=>i.map(a=>String(a)))))}variableSegments(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Array.from(P4(Object.values(r.variables).flatMap(i=>i.map(a=>a.toArray()))))})}variableSegmentsSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Array.from(P4(Object.values(r.variables).flatMap(i=>i.map(a=>a.toArray()))))}globalVariables(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Object.keys(r.globals)})}globalVariablesSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Object.keys(r.globals)}globalFullVariables(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Array.from(new Set(Object.values(r.globals).flatMap(i=>i.map(a=>String(a)))))})}globalFullVariablesSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Array.from(new Set(Object.values(r.globals).flatMap(i=>i.map(a=>String(a)))))}globalVariableSegments(e,t={}){return zt(this,void 0,void 0,function*(){const r=yield Ls(ot(e)?this.parse(e):e,t);return Array.from(P4(Object.values(r.globals).flatMap(i=>i.map(a=>a.toArray()))))})}globalVariableSegmentsSync(e,t={}){const r=Is(ot(e)?this.parse(e):e,t);return Array.from(P4(Object.values(r.globals).flatMap(i=>i.map(a=>a.toArray()))))}}const r0=new C3;function Rg(n,e){const{globals:t}=r0.analyzeSync(r0.parse(n)),r=[];for(const i of Object.values(t))for(const a of i){const u=String(a.segments[0]??""),f=(e[a.location.row-1]??"").slice(a.location.col-1);u&&f.startsWith(u)&&r.push({key:a.toString(),row:a.location.row,col:a.location.col})}return r}function CL(n){const e=[0];for(let t=0;t<n.length;t++)n[t]===`
154
154
  `&&e.push(t+1);return e}function SL(n){return new di(n).readTopLevelTokens(r0.options).filter(e=>e.kind===$t.Output).map(e=>[e.begin,e.end])}function DL(n){if(!n||!n.trim())return[];try{const e=n.split(`
155
155
  `);return[...new Set(Rg(n,e).map(t=>t.key))]}catch{return[]}}function xL(n){if(!n||!n.trim())return[];try{const e=n.split(`
156
- `),t=CL(n),r=SL(n),i=[];for(const a of Rg(n,e)){const u=t[a.row-1]+(a.col-1);r.some(([s,f])=>u>=s&&u<f)&&i.push(a.key)}return[...new Set(i)]}catch{return[]}}const TL="_modalWrapper_192bl_36",RL="_medium_192bl_45",BL="_small_192bl_52",$L="_section_192bl_58",FL="_modal_192bl_36",LL="_close_192bl_75",IL="_header_192bl_86",OL="_footer_192bl_100",NL="_modalOverlay_192bl_110",ss={modalWrapper:TL,medium:RL,small:BL,section:$L,modal:FL,close:LL,header:IL,footer:OL,modalOverlay:NL},PL="×",ML=o.defineComponent({__name:"Modal",props:{title:{},isOpen:{type:Boolean},size:{},cancelText:{},submitText:{},hasOverlay:{type:Boolean,default:!0}},emits:["close","submit"],setup(n,{emit:e}){const t=n,r=o.ref(!1),i=e,a=()=>{i("close")},u=()=>{i("submit")},s=f=>{f.key==="Escape"&&i("close")};return o.onMounted(async()=>{await o.nextTick(),r.value=!0,window.addEventListener("keydown",s)}),o.onBeforeUnmount(()=>{window.removeEventListener("keydown",s)}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[f.hasOverlay?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(ss).modalOverlay),onClick:a},null,2)):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:"modal-transition"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass([o.unref(ss).modalWrapper,o.unref(ss)[t.size]])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(ss).modal,o.unref(ss)[t.size]])},[o.createElementVNode("button",{class:o.normalizeClass(o.unref(ss).close),onClick:a},o.toDisplayString(PL),2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).header)},[o.createElementVNode("p",null,o.toDisplayString(f.title),1)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).section)},[o.renderSlot(f.$slots,"section",{},void 0,!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).footer)},[o.createVNode(o.unref(Ln),{color:"secondary",variant:"text",label:t.cancelText,onClick:a},null,8,["label"]),o.createVNode(o.unref(Ln),{color:"primary",variant:"solid",label:t.submitText,onClick:u},null,8,["label"])],2)],2)],2),[[o.vShow,f.isOpen]])]),_:3})],64))}}),qL=nr(ML,[["__scopeId","data-v-32c7610a"]]),VL="_wrapper__counter_808qv_1",zL="_wrapper__errorMessage_808qv_1",jL="_wrapper__label_808qv_1",UL="_wrapper__field_808qv_8",WL="_wrapper_808qv_1",HL="_wrapper__size_default_808qv_52",GL="_wrapper__size_small_808qv_55",YL="_wrapper__bottom_808qv_94",Os={wrapper__counter:VL,wrapper__errorMessage:zL,wrapper__label:jL,wrapper__field:UL,wrapper:WL,wrapper__size_default:HL,wrapper__size_small:GL,wrapper__bottom:YL,"wrapper--error":"_wrapper--error_808qv_107"},KL=["for"],XL=["id","max","maxlength","min","name","placeholder","value"],ZL=o.defineComponent({__name:"NumberInput",props:{id:{},name:{},modelValue:{default:void 0},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},error:{default:""},errorStatus:{type:Boolean},counter:{type:Boolean},min:{default:void 0},max:{default:void 0},size:{default:"default"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(n,{emit:e}){const t=n,r=e,i=s=>{if(s==="")return s;const f=Number(s);return typeof t.min=="number"&&f<t.min?t.min.toString():typeof t.max=="number"&&f>t.max?t.max.toString():f.toString()},a=s=>{const f=s.target,p=i(f.value);f.value=p,r("input",s),r("update:modelValue",Number(p))},u=s=>{const f=s.target,p=f.value,d=i(f.value===""?String(t.min||0):f.value);f.value=d,r("blur",s),p!==d&&r("update:modelValue",Number(d))};return(s,f)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(Os).wrapper,o.unref(Os)[`wrapper__size_${s.size}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Os).wrapper__label),for:s.id},o.toDisplayString(s.label),11,KL)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:s.id,type:"number",class:o.normalizeClass([o.unref(Os).wrapper__field,{[o.unref(Os)["wrapper--error"]]:s.error||s.errorStatus}]),max:s.max,maxlength:s.maxLength,min:s.min,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:u,onChange:f[0]||(f[0]=d=>s.$emit("change",d)),onFocus:f[1]||(f[1]=d=>r("focus",d)),onInput:a,onPaste:f[2]||(f[2]=d=>r("paste",d))},null,42,XL),s.counter||s.error?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Os).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Os).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Os).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2)}}}),JL="_container_14yt1_36",QL="_isMultiline_14yt1_47",eI="_container__text_14yt1_53",tI="_container__default_14yt1_58",nI="_container__warning_14yt1_65",rI="_container__alert_14yt1_72",iI="_container__success_14yt1_79",M4={container:JL,isMultiline:QL,container__text:eI,container__default:tI,container__warning:nI,container__alert:rI,container__success:iI},sI=o.defineComponent({__name:"OnPageMessage",props:{variant:{default:"default"},text:{}},setup(n){const e=n,t=o.computed(()=>{switch(e.variant){case"alert":return"filled-error-box";case"warning":return"line-caution-triangle";case"success":return"line-check-natural";default:return"filled-info-circle"}}),r=o.ref(null),i=o.ref(!1);let a=null;function u(){var d;const s=(d=r.value)==null?void 0:d.$el;if(!s)return;const f=parseFloat(getComputedStyle(s).lineHeight)||16,p=s.getBoundingClientRect().height>f*1.5;p!==i.value&&(i.value=p)}return o.watch(r,s=>{a==null||a.disconnect(),a=null;const f=s==null?void 0:s.$el;!f||typeof ResizeObserver>"u"||(a=new ResizeObserver(()=>u()),a.observe(f),u())}),o.onBeforeUnmount(()=>{a==null||a.disconnect(),a=null}),(s,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(M4).container,o.unref(M4)[`container__${s.variant}`],i.value&&o.unref(M4).isMultiline])},[o.createVNode(Ue,{name:t.value,size:24},null,8,["name"]),o.createVNode(o.unref(Ao),{ref_key:"textRef",ref:r,variant:"detail",class:o.normalizeClass(o.unref(M4).container__text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.text),1)]),_:1},8,["class"])],2))}}),aI="_wrapper_xi3pq_36",oI="_button_xi3pq_43",lI="_button__label_xi3pq_72",uI="_button__icon_xi3pq_75",qt={wrapper:aI,"wrapper--horizontal":"_wrapper--horizontal_xi3pq_40",button:oI,"button--first":"_button--first_xi3pq_46","button--last":"_button--last_xi3pq_49","wrapper--vertical":"_wrapper--vertical_xi3pq_52","wrapper--disabled":"_wrapper--disabled_xi3pq_64","wrapper--icon-only":"_wrapper--icon-only_xi3pq_68",button__label:lI,button__icon:uI,"wrapper--label-only":"_wrapper--label-only_xi3pq_78","button--selected":"_button--selected_xi3pq_104","button--disabled":"_button--disabled_xi3pq_124","wrapper--small":"_wrapper--small_xi3pq_137"},cI=["data-mode","disabled","onClick"],fI=["data-mode","disabled","onClick"],dI=o.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,i=o.ref(t.modelValue||""),a=u=>{t.disabled||u.disabled||(r("update:modelValue",u.value),r("click",u.value))};return o.watch(()=>t.modelValue,u=>{i.value!==u&&(i.value=u||"")}),o.watch(()=>t.segments,u=>{u.some(s=>s.value===i.value)||(i.value="",r("update:modelValue",""))},{deep:!0}),(u,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(qt).wrapper,o.unref(qt)[`wrapper--${u.orientation}`],o.unref(qt)[`wrapper--${u.size}`],{[o.unref(qt)["wrapper--disabled"]]:u.disabled,[o.unref(qt)["wrapper--icon-only"]]:u.iconOnly,[o.unref(qt)["wrapper--label-only"]]:u.labelOnly}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.segments,(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:`${f.value}-${p}`},[f.tooltip?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:`segment-tooltip-${f.value}-${p}`,text:f.tooltip},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(qt).button,{[o.unref(qt)["button--selected"]]:f.value===i.value,[o.unref(qt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(qt)["button--first"]]:p===0,[o.unref(qt)["button--last"]]:p===u.segments.length-1}]),"data-mode":f.mode,disabled:f.disabled||u.disabled,onClick:d=>a(f)},[u.iconOnly&&f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon,size:24},null,8,["class","name"])):o.createCommentVNode("",!0),u.labelOnly&&f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon},null,8,["class","name"])):o.createCommentVNode("",!0),f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,cI)]),_:2},1032,["id","text"])):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:o.normalizeClass([o.unref(qt).button,{[o.unref(qt)["button--selected"]]:f.value===i.value,[o.unref(qt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(qt)["button--first"]]:p===0,[o.unref(qt)["button--last"]]:p===u.segments.length-1}]),"data-mode":f.mode,disabled:f.disabled||u.disabled,onClick:d=>a(f)},[u.iconOnly&&f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon,size:24},null,8,["class","name"])):o.createCommentVNode("",!0),u.labelOnly&&f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon},null,8,["class","name"])):o.createCommentVNode("",!0),f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,fI))],64))),128))],2))}}),pI="_wrapper__counter_16ay0_1",hI="_wrapper__errorMessage_16ay0_1",mI="_wrapper__label_16ay0_1",gI="_wrapper__field_16ay0_1",yI="_wrapper_16ay0_1",vI="_wrapper__bottom_16ay0_90",Si={wrapper__counter:pI,wrapper__errorMessage:hI,wrapper__label:mI,wrapper__field:gI,wrapper:yI,wrapper__bottom:vI,"wrapper--error":"_wrapper--error_16ay0_103","wrapper--primary":"_wrapper--primary_16ay0_106","wrapper--smart":"_wrapper--smart_16ay0_114"},bI=["for"],_I=["id","maxlength","name","placeholder","value"],wI=["id","maxlength","name","placeholder","value"],EI=o.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,i=o.ref(null),a=()=>{if(t.autoGrow&&i.value){i.value.style.height="";const s=Math.min(i.value.scrollHeight,t.maxHeight||i.value.scrollHeight);i.value.style.height=`${s}px`}},u=s=>{const f=s.target;r("input",s),r("update:modelValue",f.value),a()};return o.onMounted(()=>{a()}),(s,f)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(Si).wrapper,o.unref(Si)[`wrapper--${t.mode}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Si).wrapper__label),for:s.id},o.toDisplayString(s.label),11,bI)):o.createCommentVNode("",!0),s.multiline?(o.openBlock(),o.createElementBlock("textarea",{key:1,id:s.id,ref_key:"textareaRef",ref:i,class:o.normalizeClass([o.unref(Si).wrapper__field,{[o.unref(Si)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,style:o.normalizeStyle(s.maxHeight?{maxHeight:`${s.maxHeight}px`}:void 0),value:s.modelValue,onBlur:f[0]||(f[0]=d=>r("blur",d)),onChange:f[1]||(f[1]=d=>s.$emit("change",d)),onFocus:f[2]||(f[2]=d=>r("focus",d)),onInput:u,onPaste:f[3]||(f[3]=d=>r("paste",d))},null,46,_I)):(o.openBlock(),o.createElementBlock("input",{key:2,id:s.id,type:"text",class:o.normalizeClass([o.unref(Si).wrapper__field,{[o.unref(Si)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:f[4]||(f[4]=d=>r("blur",d)),onChange:f[5]||(f[5]=d=>s.$emit("change",d)),onFocus:f[6]||(f[6]=d=>r("focus",d)),onInput:u,onPaste:f[7]||(f[7]=d=>r("paste",d))},null,42,wI)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Si).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Si).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Si).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)],2)}}}),AI="_wrapper_1hnht_36",kI="_wrapper__label_1hnht_43",CI="_wrapper__input_1hnht_67",SI="_wrapper_checked_1hnht_77",DI="_wrapper_disabled_1hnht_84",f1={wrapper:AI,wrapper__label:kI,wrapper__input:CI,wrapper_checked:SI,wrapper_disabled:DI},xI=["id","checked","disabled","name"],TI=["for"],RI=o.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,i=()=>{r("click",!t.checked)};return(a,u)=>(o.openBlock(),o.createElementBlock("fieldset",{class:o.normalizeClass([o.unref(f1).wrapper,{[o.unref(f1).wrapper_checked]:a.checked,[o.unref(f1).wrapper_disabled]:a.disabled}])},[o.createElementVNode("input",{id:a.id,type:"checkbox",checked:a.checked,class:o.normalizeClass(o.unref(f1).wrapper__input),disabled:a.disabled,name:a.name,onClick:i},null,10,xI),o.createElementVNode("label",{class:o.normalizeClass(o.unref(f1).wrapper__label),for:a.id},null,10,TI)],2))}}),BI={class:"ab-toast__text"},$I=["aria-label"],FI=o.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,i={info:"filled-info-circle",error:"filled-error-box",warning:"filled-caution-triangle"},a=o.computed(()=>t.icon??i[t.variant]);let u=null;function s(){u&&(clearTimeout(u),u=null)}function f(){s(),r("update:modelValue",!1),r("dismiss")}function p(){s(),!(t.duration<=0)&&(u=setTimeout(()=>{f()},t.duration))}return o.watch(()=>t.modelValue,d=>{d?p():s()},{immediate:!0}),o.onBeforeUnmount(s),(d,m)=>(o.openBlock(),o.createBlock(o.Transition,{name:"ab-toast"},{default:o.withCtx(()=>[d.modelValue?(o.openBlock(),o.createElementBlock("div",{key:0,"aria-live":"polite",class:o.normalizeClass(["ab-toast",`ab-toast--${d.variant}`]),role:"status"},[o.createVNode(Ue,{class:"ab-toast__icon",name:a.value,size:24},null,8,["name"]),o.createElementVNode("span",BI,o.toDisplayString(d.text),1),o.createElementVNode("button",{class:"ab-toast__close",type:"button","aria-label":d.closeAriaLabel,onClick:f},[o.createVNode(Ue,{name:"line-close-netural",size:24})],8,$I)],2)):o.createCommentVNode("",!0)]),_:1}))}}),LI=nr(FI,[["__scopeId","data-v-e00fa8e4"]]),Nr={"agent-launcher":"_agent-launcher_w1nwz_36","agent-launcher--expanded":"_agent-launcher--expanded_w1nwz_52","agent-launcher__badge-wrap":"_agent-launcher__badge-wrap_w1nwz_62","agent-launcher__badge":"_agent-launcher__badge_w1nwz_62","agent-launcher__art":"_agent-launcher__art_w1nwz_94","agent-launcher__glyph":"_agent-launcher__glyph_w1nwz_101","agent-launcher__message":"_agent-launcher__message_w1nwz_112","agent-launcher__expand":"_agent-launcher__expand_w1nwz_126","agent-launcher__halo":"_agent-launcher__halo_w1nwz_170","agent-launcher__halo--outer":"_agent-launcher__halo--outer_w1nwz_178","agent-launcher-pulse-outer":"_agent-launcher-pulse-outer_w1nwz_1","agent-launcher__halo--inner":"_agent-launcher__halo--inner_w1nwz_187","agent-launcher-pulse-inner":"_agent-launcher-pulse-inner_w1nwz_1"},II=["aria-label"],OI=o.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,i=o.computed(()=>t.message.trim().length>0),a=o.computed(()=>i.value?`${t.label}: ${t.message}`:t.label);return(u,s)=>(o.openBlock(),o.createElementBlock("button",{type:"button","aria-label":a.value,class:o.normalizeClass([o.unref(Nr)["agent-launcher"],{[o.unref(Nr)["agent-launcher--expanded"]]:i.value}]),onClick:s[0]||(s[0]=f=>r("click"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Nr)["agent-launcher__badge-wrap"])},[t.pulse?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(Nr)["agent-launcher__halo"],o.unref(Nr)["agent-launcher__halo--outer"]])},null,2),o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(Nr)["agent-launcher__halo"],o.unref(Nr)["agent-launcher__halo--inner"]])},null,2)],64)):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Nr)["agent-launcher__badge"])},[o.createVNode(o.unref(Ue),{name:"agent-launcher-badge",class:o.normalizeClass(o.unref(Nr)["agent-launcher__art"]),size:48},null,8,["class"]),o.createVNode(o.unref(Ue),{name:"agent-launcher-glyph",class:o.normalizeClass(o.unref(Nr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),i.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Nr)["agent-launcher__message"])},o.toDisplayString(t.message),3)):o.createCommentVNode("",!0),i.value?(o.openBlock(),o.createBlock(o.unref(Ue),{key:1,name:"line-full-screen",class:o.normalizeClass(o.unref(Nr)["agent-launcher__expand"]),size:24},null,8,["class"])):o.createCommentVNode("",!0)],10,II))}});function $1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const mr={"in-agent-background":"_in-agent-background_qol7f_36","in-agent-background__aurora":"_in-agent-background__aurora_qol7f_46","in-agent-background__stage":"_in-agent-background__stage_qol7f_53","in-agent-background--animated":"_in-agent-background--animated_qol7f_62","agent-bg-aurora-intro":"_agent-bg-aurora-intro_qol7f_1","in-agent-background__blob":"_in-agent-background__blob_qol7f_86","in-agent-background__blob--pink":"_in-agent-background__blob--pink_qol7f_96","agent-bg-drift1":"_agent-bg-drift1_qol7f_1","in-agent-background__blob--purple":"_in-agent-background__blob--purple_qol7f_106","agent-bg-drift2":"_agent-bg-drift2_qol7f_1","in-agent-background__blob--blue":"_in-agent-background__blob--blue_qol7f_116","agent-bg-drift3":"_agent-bg-drift3_qol7f_1","in-agent-background__grain":"_in-agent-background__grain_qol7f_168","in-agent-background--static":"_in-agent-background--static_qol7f_176","in-agent-background--paused":"_in-agent-background--paused_qol7f_181"},NI=3*60*1e3,Bg=o.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=o.ref(null),i=o.ref($1()),a=o.computed(()=>e.static||i.value),u=o.ref(typeof document<"u"&&document.hidden),s=o.ref(!1),f=o.computed(()=>u.value||s.value);let p=[],d=null,m=null,g=null,_=0,R=!1;const A=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,b=()=>{g!==null&&clearTimeout(g),g=setTimeout(()=>{s.value=!0},NI)},y=()=>{const P=Date.now();P-_<1e3||(_=P,s.value=!1,b())},v=()=>{p.forEach(P=>{P.cx=P.el.offsetLeft+P.el.offsetWidth/2})},E=P=>{d===null&&(d=requestAnimationFrame(()=>{d=null;const U=r.value;if(!U)return;const Q=U.getBoundingClientRect(),ue=P.clientX-Q.left,se=.5-(P.clientY-Q.top)/Q.height;p.forEach(M=>{const ne=((M.cx-ue)/Q.width*M.depth).toFixed(1),J=(se*M.depth*.35).toFixed(1);M.el.style.transform=`translate3d(${ne}px, ${J}px, 0)`})}))},w=()=>{R||typeof window>"u"||(R=!0,window.addEventListener("mousemove",E,{passive:!0}),t.forEach(P=>{window.addEventListener(P,y,{passive:!0})}),b())},k=()=>{!R||typeof window>"u"||(R=!1,window.removeEventListener("mousemove",E),t.forEach(P=>{window.removeEventListener(P,y)}),g!==null&&(clearTimeout(g),g=null),p.forEach(P=>{P.el.style.transform=""}))},D=()=>{u.value=document.hidden},C=()=>{i.value=$1(),a.value?k():w()};return o.watch(a,P=>{P?k():w()}),o.onMounted(()=>{const P=r.value;P&&(p=Array.from(P.querySelectorAll("[data-agent-blob]")).map(U=>({el:U,depth:parseFloat(getComputedStyle(U).getPropertyValue("--depth"))||0,cx:0})),v()),a.value||w(),A==null||A.addEventListener("change",C),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&P&&(m=new ResizeObserver(v),m.observe(P))}),o.onUnmounted(()=>{k(),document.removeEventListener("visibilitychange",D),A==null||A.removeEventListener("change",C),d!==null&&cancelAnimationFrame(d),m==null||m.disconnect()}),(P,U)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:r,"aria-hidden":"true",class:o.normalizeClass([o.unref(mr)["in-agent-background"],{[o.unref(mr)["in-agent-background--animated"]]:e.animated,[o.unref(mr)["in-agent-background--static"]]:a.value,[o.unref(mr)["in-agent-background--paused"]]:f.value}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__aurora"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__stage"])},[o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--pink"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--purple"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--blue"]])},null,2)],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__grain"])},null,2)],2))}}),gr={"in-agent-popup":"_in-agent-popup_11gom_36","in-agent-popup__header":"_in-agent-popup__header_11gom_48","in-agent-popup__brand":"_in-agent-popup__brand_11gom_56","in-agent-popup__title":"_in-agent-popup__title_11gom_62","in-agent-popup__badge":"_in-agent-popup__badge_11gom_74","in-agent-popup__actions":"_in-agent-popup__actions_11gom_88","in-agent-popup__separator":"_in-agent-popup__separator_11gom_95","in-agent-popup__icon-button":"_in-agent-popup__icon-button_11gom_101","in-agent-popup__surface":"_in-agent-popup__surface_11gom_118","in-agent-popup__body":"_in-agent-popup__body_11gom_125","in-agent-popup__footer":"_in-agent-popup__footer_11gom_133"},PI=["aria-label","title"],MI=["aria-label","title"],qI=["aria-label","title"],VI=o.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,i=()=>{r("minimize")},a=()=>{r("newChat")},u=()=>{r("academy")};return(s,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup"])},[o.createElementVNode("header",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__brand"])},[o.renderSlot(s.$slots,"brand",{},()=>[o.createVNode(o.unref(Ue),{name:"agent-brand",size:24})])],2),o.createElementVNode("h2",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__title"])},o.toDisplayString(t.title),3),o.renderSlot(s.$slots,"badge",{},()=>[t.badgeText?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(gr)["in-agent-popup__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__actions"])},[o.renderSlot(s.$slots,"header-actions",{},()=>[t.showNewChat?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button","aria-label":s.newChatLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:a},[o.createVNode(o.unref(Ue),{name:"line-ai-message-reply-plus",size:24})],10,PI)):o.createCommentVNode("",!0),t.showAcademy?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[o.createVNode(o.unref(Ue),{name:"agent-academy",size:24})],10,MI)):o.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(gr)["in-agent-popup__separator"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:i},[o.createVNode(o.unref(Ue),{name:"line-minus-netural",size:24})],10,qI)])],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__surface"])},[t.showBackground?(o.openBlock(),o.createBlock(Bg,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__body"])},[o.renderSlot(s.$slots,"default")],2),s.$slots.footer?(o.openBlock(),o.createElementBlock("footer",{key:1,class:o.normalizeClass(o.unref(gr)["in-agent-popup__footer"])},[o.renderSlot(s.$slots,"footer")],2)):o.createCommentVNode("",!0)],2)],2))}}),jn={"agent-welcome":"_agent-welcome_13mdp_36","agent-welcome__intro":"_agent-welcome__intro_13mdp_48","agent-welcome__greeting":"_agent-welcome__greeting_13mdp_56","agent-welcome__title":"_agent-welcome__title_13mdp_65","agent-welcome__categories":"_agent-welcome__categories_13mdp_74","agent-welcome__category":"_agent-welcome__category_13mdp_83","agent-welcome__category--selected":"_agent-welcome__category--selected_13mdp_108","agent-welcome__category-icon":"_agent-welcome__category-icon_13mdp_112","agent-welcome__category-label":"_agent-welcome__category-label_13mdp_116","agent-welcome__cards":"_agent-welcome__cards_13mdp_126","agent-welcome__quick-actions":"_agent-welcome__quick-actions_13mdp_130","agent-welcome__quick-action":"_agent-welcome__quick-action_13mdp_130","agent-welcome__rise--1":"_agent-welcome__rise--1_13mdp_170","agent-welcome__rise-item":"_agent-welcome__rise-item_13mdp_171","agent-welcome-rise":"_agent-welcome-rise_13mdp_1"},zI=["aria-pressed","onClick"],jI=["onClick"],UI=16,WI=.18,HI=.06,P9=260,M9="cubic-bezier(0.22, 1, 0.36, 1)",GI=o.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,i=m=>({"--rise-delay":`${WI+m*HI}s`}),a=o.inject("inAgentScrollContainer",o.ref(null)),u=o.inject("inAgentBottomInset",o.ref(0)),s=o.ref(null),f=o.ref(null),p=()=>{const m=a.value,g=f.value;if(!m||!g)return;const _=m.scrollTop+(g.getBoundingClientRect().bottom-m.getBoundingClientRect().top),R=m.scrollTop+m.clientHeight-u.value,A=_+UI-R;A<=1||m.scrollTo({top:Math.min(m.scrollTop+A,m.scrollHeight-m.clientHeight),behavior:"smooth"})},d=()=>{const m=s.value,g=a.value;if(!m)return;if(!t.selected||!g){m.style.marginTop="";return}const _=f.value,R=(_==null?void 0:_.firstElementChild)??null,A=(R==null?void 0:R.firstElementChild)??null,b=(A==null?void 0:A.getBoundingClientRect().height)??0,y=(_==null?void 0:_.getBoundingClientRect().height)??0,v=m.getBoundingClientRect().height-y+b,E=g.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(E-v)/2)}px`};return o.watch(u,()=>d()),o.onMounted(()=>d()),o.watch(()=>t.selected,async m=>{const g=s.value,_=(g==null?void 0:g.getBoundingClientRect().top)??0;if(await o.nextTick(),!g)return;if(d(),$1()){p();return}const R=_-g.getBoundingClientRect().top,A=[];Math.abs(R)>1&&A.push(g.animate([{transform:`translateY(${R}px)`},{transform:"translateY(0)"}],{duration:P9,easing:M9}));const b=f.value;m&&b&&A.push(b.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:P9,easing:M9})),Promise.all(A.map(y=>y.finished)).then(p).catch(()=>p())}),(m,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:s,class:o.normalizeClass(o.unref(jn)["agent-welcome"])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(jn)["agent-welcome__intro"],o.unref(jn)["agent-welcome__rise--1"]])},[t.greeting?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(jn)["agent-welcome__greeting"])},o.toDisplayString(t.greeting),3)):o.createCommentVNode("",!0),t.title?(o.openBlock(),o.createElementBlock("p",{key:1,class:o.normalizeClass(o.unref(jn)["agent-welcome__title"])},o.toDisplayString(t.title),3)):o.createCommentVNode("",!0)],2),t.categories.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(jn)["agent-welcome__categories"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.categories,(_,R)=>(o.openBlock(),o.createElementBlock("button",{key:_.value,type:"button","aria-pressed":t.selected===_.value,class:o.normalizeClass([o.unref(jn)["agent-welcome__category"],o.unref(jn)["agent-welcome__rise-item"],{[o.unref(jn)["agent-welcome__category--selected"]]:t.selected===_.value}]),style:o.normalizeStyle(i(R)),onClick:A=>r("select",_.value)},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(jn)["agent-welcome__category-icon"]),name:_.icon,size:24},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(jn)["agent-welcome__category-label"])},o.toDisplayString(_.label),3)],14,zI))),128))],2)):o.createCommentVNode("",!0),t.quickActions.length>0?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(jn)["agent-welcome__quick-actions"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.quickActions,(_,R)=>(o.openBlock(),o.createElementBlock("button",{key:_.id,type:"button",class:o.normalizeClass([o.unref(jn)["agent-welcome__quick-action"],o.unref(jn)["agent-welcome__rise-item"]]),style:o.normalizeStyle(i(R)),onClick:A=>r("quick-action",_.prompt)},o.toDisplayString(_.label),15,jI))),128))],2)):o.createCommentVNode("",!0),m.$slots.cards?(o.openBlock(),o.createElementBlock("div",{key:2,ref_key:"cardsRef",ref:f,class:o.normalizeClass(o.unref(jn)["agent-welcome__cards"])},[o.renderSlot(m.$slots,"cards")],2)):o.createCommentVNode("",!0)],2))}}),Di={"in-blueprint-card":"_in-blueprint-card_1h6g6_36","in-blueprint-card__thumb":"_in-blueprint-card__thumb_1h6g6_55","in-blueprint-card__image":"_in-blueprint-card__image_1h6g6_61","in-blueprint-card__placeholder":"_in-blueprint-card__placeholder_1h6g6_67","in-blueprint-card__badge":"_in-blueprint-card__badge_1h6g6_78","in-blueprint-card__footer":"_in-blueprint-card__footer_1h6g6_92","in-blueprint-card__text":"_in-blueprint-card__text_1h6g6_98","in-blueprint-card__title":"_in-blueprint-card__title_1h6g6_105","in-blueprint-card__subtitle":"_in-blueprint-card__subtitle_1h6g6_114","in-blueprint-card__open":"_in-blueprint-card__open_1h6g6_123"},YI=["alt","src"],KI=o.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,i=()=>{r("open")},a=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),r("open"))};return(u,s)=>(o.openBlock(),o.createElementBlock("div",{role:"button",tabindex:"0",class:o.normalizeClass(o.unref(Di)["in-blueprint-card"]),onClick:i,onKeydown:a},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__thumb"])},[t.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:t.title,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__image"]),src:t.imageUrl},null,10,YI)):o.renderSlot(u.$slots,"thumb",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__placeholder"])},[o.createVNode(o.unref(Ue),{name:"line-figma",size:24})],2)]),t.badgeText?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__text"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__title"])},o.toDisplayString(t.title),3),t.subtitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__subtitle"])},o.toDisplayString(t.subtitle),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__open"])},[o.createVNode(o.unref(Ue),{name:"line-external-link",size:16})],2)],2)],34))}}),Ut={"agent-files-wrapper":"_agent-files-wrapper_b3t7d_36","agent-files__announcer":"_agent-files__announcer_b3t7d_41","agent-files__error-bubble":"_agent-files__error-bubble_b3t7d_53","agent-files":"_agent-files_b3t7d_36","agent-files--wrap":"_agent-files--wrap_b3t7d_103","agent-files__card":"_agent-files__card_b3t7d_110","agent-files__card--error":"_agent-files__card--error_b3t7d_124","agent-files__body":"_agent-files__body_b3t7d_132","agent-files__thumb":"_agent-files__thumb_b3t7d_140","agent-files__thumb--swatch":"_agent-files__thumb--swatch_b3t7d_149","agent-files__swatch-band":"_agent-files__swatch-band_b3t7d_154","agent-files__thumb--icon":"_agent-files__thumb--icon_b3t7d_159","agent-files__thumb--error":"_agent-files__thumb--error_b3t7d_166","agent-files__labels":"_agent-files__labels_b3t7d_174","agent-files__name":"_agent-files__name_b3t7d_187","agent-files__type":"_agent-files__type_b3t7d_188","agent-files__remove":"_agent-files__remove_b3t7d_202"},XI=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],ZI=["alt","src"],JI=["aria-label","onClick"],QI=4,q9=20,V9=12,K0=o.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=e,i=o.ref(-1),a=C=>{var P;return((P=t.files[C])==null?void 0:P.status)==="error"},u=C=>(C==null?void 0:C.status)==="error"?C.errorMessage||t.errorFallbackLabel:"",s=o.computed(()=>a(i.value)?i.value:-1),f=o.computed(()=>u(t.files[s.value])),p=o.computed(()=>t.files.map(C=>u(C)).filter(Boolean).join(" ")),d=o.computed(()=>t.files.findIndex((C,P)=>a(P))),m=o.ref(null),g=o.ref(null),_=o.ref(null),R=o.ref([]),A=o.ref(0),b=o.ref(q9),y=(C,P,U)=>Math.min(Math.max(C,P),Math.max(P,U)),v=(C,P)=>{C instanceof HTMLElement&&(R.value[P]=C)},E=C=>{i.value=C},w=C=>{i.value===C&&(i.value=-1)},k=()=>{const C=m.value,P=g.value,U=_.value,Q=R.value[s.value];if(!C||!P||!U||!Q)return;const ue=Q.offsetLeft-P.scrollLeft,H=y(ue,0,C.clientWidth-U.offsetWidth);A.value=H,b.value=y(ue+q9-H,V9,U.offsetWidth-V9)},D=()=>{const C=g.value,P=R.value[d.value];if(!C||!P)return;const U=P.offsetLeft+P.offsetWidth;P.offsetLeft<C.scrollLeft?C.scrollLeft=P.offsetLeft:U>C.scrollLeft+C.clientWidth&&(C.scrollLeft=U-C.clientWidth)};return o.watch(s,()=>void o.nextTick(k)),o.watch(()=>[d.value,p.value,t.files.length],()=>void o.nextTick(()=>{R.value.length=t.files.length,D()})),o.watch(g,(C,P)=>{P==null||P.removeEventListener("scroll",k),C==null||C.addEventListener("scroll",k,{passive:!0})},{immediate:!0}),o.onBeforeUnmount(()=>{var C;(C=g.value)==null||C.removeEventListener("scroll",k)}),(C,P)=>t.files.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"wrapperRef",ref:m,class:o.normalizeClass(o.unref(Ut)["agent-files-wrapper"])},[f.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:_,role:"tooltip",class:o.normalizeClass(o.unref(Ut)["agent-files__error-bubble"]),style:o.normalizeStyle({left:`${A.value}px`,"--agent-files-arrow-left":`${b.value}px`})},o.toDisplayString(f.value),7)):o.createCommentVNode("",!0),o.createElementVNode("span",{"aria-live":"polite",role:"status",class:o.normalizeClass(o.unref(Ut)["agent-files__announcer"])},o.toDisplayString(p.value),3),o.createElementVNode("div",{ref_key:"stripRef",ref:g,class:o.normalizeClass([o.unref(Ut)["agent-files"],{[o.unref(Ut)["agent-files--wrap"]]:t.wrap}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.files,(U,Q)=>{var ue;return o.openBlock(),o.createElementBlock("div",{key:U.id,ref_for:!0,ref:H=>v(H,Q),"data-testid":"agent-file-card",class:o.normalizeClass([o.unref(Ut)["agent-files__card"],{[o.unref(Ut)["agent-files__card--error"]]:U.status==="error"}]),onClick:H=>r("open",U.id),onFocusin:H=>E(Q),onFocusout:H=>w(Q),onMouseenter:H=>E(Q),onMouseleave:H=>w(Q)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ut)["agent-files__body"])},[U.status==="loading"?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"]])},[o.createVNode(o.unref(Ue),{name:"loading-circle",size:24})],2)):U.status==="error"?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"],o.unref(Ut)["agent-files__thumb--error"]])},[o.createVNode(o.unref(Ue),{name:U.icon??"filled-error-box",size:24},null,8,["name"])],2)):(ue=U.swatch)!=null&&ue.length?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--swatch"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.swatch.slice(0,QI),H=>(o.openBlock(),o.createElementBlock("span",{key:H,class:o.normalizeClass(o.unref(Ut)["agent-files__swatch-band"]),style:o.normalizeStyle({background:H})},null,6))),128))],2)):U.thumbnailUrl?(o.openBlock(),o.createElementBlock("img",{key:3,alt:U.name,class:o.normalizeClass(o.unref(Ut)["agent-files__thumb"]),src:U.thumbnailUrl},null,10,ZI)):(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"]])},[U.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,name:U.icon,size:24},null,8,["name"])):o.createCommentVNode("",!0)],2)),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__labels"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__name"])},o.toDisplayString(U.name),3),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__type"])},o.toDisplayString(U.type),3)],2),t.removable?(o.openBlock(),o.createElementBlock("button",{key:5,type:"button","aria-label":t.removeLabel,class:o.normalizeClass(o.unref(Ut)["agent-files__remove"]),onClick:o.withModifiers(H=>r("remove",U.id),["stop"])},[o.createVNode(o.unref(Ue),{name:"chip-close-6",size:6})],10,JI)):o.createCommentVNode("",!0)],2)],42,XI)}),128))],2)],2)):o.createCommentVNode("",!0)}}),Zt={"chat-input":"_chat-input_1i3a5_37","chat-input__container":"_chat-input__container_1i3a5_42","chat-input__container--focused":"_chat-input__container--focused_1i3a5_72","chat-input__container--generating":"_chat-input__container--generating_1i3a5_78","chat-input__gen-ring":"_chat-input__gen-ring_1i3a5_85","chat-input__notice":"_chat-input__notice_1i3a5_93","chat-input__notice--info":"_chat-input__notice--info_1i3a5_106","chat-input__notice--warning":"_chat-input__notice--warning_1i3a5_111","chat-input__notice-body":"_chat-input__notice-body_1i3a5_115","chat-input__notice-icon":"_chat-input__notice-icon_1i3a5_127","chat-input__notice-text":"_chat-input__notice-text_1i3a5_135","chat-input__notice-count":"_chat-input__notice-count_1i3a5_140","chat-input__text-area":"_chat-input__text-area_1i3a5_146","chat-input__textarea":"_chat-input__textarea_1i3a5_152","chat-input__toolbar":"_chat-input__toolbar_1i3a5_174","chat-input__toolbar-left":"_chat-input__toolbar-left_1i3a5_180","chat-input__actions":"_chat-input__actions_1i3a5_186","chat-input__send-reason":"_chat-input__send-reason_1i3a5_191","chat-input__icon-btn":"_chat-input__icon-btn_1i3a5_220","chat-input__send-btn":"_chat-input__send-btn_1i3a5_243","chat-input__files":"_chat-input__files_1i3a5_267"},lo=[{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]}],eO=200,tO=4,nO=2600,du=2,rO=6;function iO(n){const[e]=lo,t=lo[lo.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<lo.length-1;r+=1){const i=lo[r],a=lo[r+1];if(n>=i.p&&n<=a.p){const u=(n-i.p)/(a.p-i.p);return[Math.round(i.c[0]+u*(a.c[0]-i.c[0])),Math.round(i.c[1]+u*(a.c[1]-i.c[1])),Math.round(i.c[2]+u*(a.c[2]-i.c[2])),i.c[3]+u*(a.c[3]-i.c[3])]}}return[0,0,0,0]}function sO(n){const{containerRef:e,ringRef:t,active:r}=n;let i=[],a=[],u=null,s=null,f=null;function p(){const R=e.value,A=t.value;if(!R||!A)return;const b=R.getBoundingClientRect(),y=b.width+du*2,v=b.height+du*2;if(!y||!v)return;A.setAttribute("viewBox",`0 0 ${y} ${v}`),A.setAttribute("width",String(y)),A.setAttribute("height",String(v));const E=1,w=Math.max(rO,1),k=y-E*2,D=v-E*2,C=k-2*w,P=D-2*w,U=Math.PI/2*w,Q=2*C+2*P+4*U;function ue(ce){let L=ce;if(L<=C)return{x:w+L,y:0};if(L-=C,L<=U){const I=-Math.PI/2+L/w;return{x:k-w+w*Math.cos(I),y:w+w*Math.sin(I)}}if(L-=U,L<=P)return{x:k,y:w+L};if(L-=P,L<=U){const I=L/w;return{x:k-w+w*Math.cos(I),y:D-w+w*Math.sin(I)}}if(L-=U,L<=C)return{x:k-w-L,y:D};if(L-=C,L<=U){const I=Math.PI/2+L/w;return{x:w+w*Math.cos(I),y:D-w+w*Math.sin(I)}}if(L-=U,L<=P)return{x:0,y:D-w-L};L-=P;const X=Math.PI+L/w;return{x:w+w*Math.cos(X),y:w+w*Math.sin(X)}}const H="http://www.w3.org/2000/svg",se=[],M=[],N=[{len:C,isArc:!1},{len:U,isArc:!0},{len:P,isArc:!1},{len:U,isArc:!0},{len:C,isArc:!1},{len:U,isArc:!0},{len:P,isArc:!1},{len:U,isArc:!0}],ne=Q/eO;let J=0;for(const ce of N){const L=ce.isArc?tO:Math.max(1,Math.round(ce.len/ne));for(let X=0;X<L;X+=1){const I=J+ce.len*X/L,q=J+ce.len*(X+1)/L,F=ue(I),z=ue(q),re=`M ${(F.x+E).toFixed(2)} ${(F.y+E).toFixed(2)}`,ie=`${(z.x+E).toFixed(2)} ${(z.y+E).toFixed(2)}`,V=document.createElementNS(H,"path");V.setAttribute("d",ce.isArc?`${re} A ${w} ${w} 0 0 1 ${ie}`:`${re} L ${ie}`),V.setAttribute("fill","none"),V.setAttribute("stroke","transparent"),V.setAttribute("stroke-width",String(du)),V.setAttribute("stroke-linecap","butt"),M.push(V),se.push((I+q)/2/Q)}J+=ce.len}const ee=document.createElementNS(H,"g");ee.append(...M),A.replaceChildren(ee),a=M,i=se}function d(R){for(let A=0;A<i.length;A+=1){const b=((i[A]-R)%1+1)%1,[y,v,E,w]=iO(b);a[A].setAttribute("stroke",`rgba(${y},${v},${E},${w})`)}}function m(R){s===null&&(s=R),d((R-s)/nO%1),u=requestAnimationFrame(m)}function g(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),$1()?d(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!f&&(f=new ResizeObserver(()=>{r.value&&(p(),$1()&&d(0))}),f.observe(e.value)))}function _(){u!==null&&(cancelAnimationFrame(u),u=null),f==null||f.disconnect(),f=null}o.watch(r,R=>{R?g():_()}),o.onMounted(()=>{r.value&&g()}),o.onBeforeUnmount(_)}const aO=["disabled","placeholder","onKeydown"],oO=["disabled"],lO=["aria-label","disabled"],z9=120,uO=200,cO="Add context",fO=o.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:""}},emits:["update:modelValue","send","stop","attach","remove-file"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=o.ref(null);e({focus:()=>{var C;(C=a.value)==null||C.focus()}});const u=o.ref(null),s=o.ref(null),f=o.ref(r.modelValue),p=o.ref(!1);sO({containerRef:u,ringRef:s,active:o.computed(()=>r.loading)});const d=o.computed(()=>f.value.length),m=o.computed(()=>r.maxLength!==void 0&&d.value>r.maxLength),g=o.computed(()=>r.maxLength!==void 0&&d.value>=r.maxLength-uO),_=o.computed(()=>m.value?`Enter a prompt up to ${r.maxLength} characters to continue.`:`You can enter a prompt up to ${r.maxLength} characters.`),R=o.computed(()=>r.files.some(C=>C.status==="loading"||C.status==="error")),A=o.computed(()=>(f.value.trim().length>0||r.allowEmptySend)&&!m.value&&!r.loading&&!r.disabled&&!R.value),b=o.ref(!1),y=o.computed(()=>!!r.sendDisabledReason&&b.value&&!r.loading&&!A.value),v=()=>{const C=a.value;C&&(C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,z9)}px`,C.style.overflowY=C.scrollHeight>z9?"auto":"hidden")};o.watch(()=>r.modelValue,C=>{C!==f.value&&(f.value=C,o.nextTick(v))}),o.watch(f,C=>{i("update:modelValue",C)});const E=()=>{v()},w=()=>{A.value&&(i("send",f.value.trim()),f.value="",o.nextTick(v))},k=()=>{r.loading?i("stop"):w()},D=()=>{i("attach")};return(C,P)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Zt)["chat-input"])},[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Zt)["chat-input__notice"],m.value?o.unref(Zt)["chat-input__notice--warning"]:o.unref(Zt)["chat-input__notice--info"]])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-body"])},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-icon"]),name:m.value?"filled-caution-triangle-colored":"filled-info-circle",size:16},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-text"])},o.toDisplayString(_.value),3)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-count"])},o.toDisplayString(d.value)+"/"+o.toDisplayString(C.maxLength),3)],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"containerRef",ref:u,class:o.normalizeClass([o.unref(Zt)["chat-input__container"],{[o.unref(Zt)["chat-input__container--focused"]]:p.value,[o.unref(Zt)["chat-input__container--generating"]]:C.loading}])},[o.withDirectives((o.openBlock(),o.createElementBlock("svg",{ref_key:"genRingRef",ref:s,"aria-hidden":"true",class:o.normalizeClass(o.unref(Zt)["chat-input__gen-ring"])},null,2)),[[o.vShow,C.loading]]),C.$slots.attachments||r.files.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Zt)["chat-input__files"])},[o.renderSlot(C.$slots,"attachments"),r.files.length>0?(o.openBlock(),o.createBlock(K0,{key:0,files:r.files,onRemove:P[0]||(P[0]=U=>i("remove-file",U))},null,8,["files"])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__text-area"])},[o.withDirectives(o.createElementVNode("textarea",{ref_key:"textareaRef",ref:a,rows:"1",class:o.normalizeClass(o.unref(Zt)["chat-input__textarea"]),disabled:C.disabled,placeholder:C.placeholder,"onUpdate:modelValue":P[1]||(P[1]=U=>f.value=U),onBlur:P[2]||(P[2]=U=>p.value=!1),onFocus:P[3]||(P[3]=U=>p.value=!0),onInput:E,onKeydown:[o.withKeys(o.withModifiers(w,["exact","prevent"]),["enter"]),P[4]||(P[4]=o.withKeys(o.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,aO),[[o.vModelText,f.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__toolbar"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__toolbar-left"])},[o.createElementVNode("button",{type:"button","aria-label":cO,class:o.normalizeClass(o.unref(Zt)["chat-input__icon-btn"]),disabled:C.disabled,onClick:D},[o.createVNode(o.unref(Ue),{name:"line-plus-netural",size:24})],10,oO)],2),o.createElementVNode("div",{"data-testid":"agent-send-actions",class:o.normalizeClass(o.unref(Zt)["chat-input__actions"]),onMouseenter:P[5]||(P[5]=U=>b.value=!0),onMouseleave:P[6]||(P[6]=U=>b.value=!1)},[y.value?(o.openBlock(),o.createElementBlock("div",{key:0,role:"tooltip",class:o.normalizeClass(o.unref(Zt)["chat-input__send-reason"])},o.toDisplayString(C.sendDisabledReason),3)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":C.loading?"Stop":"Send",class:o.normalizeClass(o.unref(Zt)["chat-input__send-btn"]),disabled:!A.value&&!C.loading,onClick:k},[o.createVNode(o.unref(Ue),{name:C.loading?"line-ai-stop-solid":"line-architect-segments-sent",size:24},null,8,["name"])],10,lO)],34)],2)],2)],2))}}),xi={"chat-edit-form":"_chat-edit-form_1j7of_36","chat-edit-form--active":"_chat-edit-form--active_1j7of_49","chat-edit-form__body":"_chat-edit-form__body_1j7of_57","chat-edit-form__border":"_chat-edit-form__border_1j7of_62","chat-edit-form__input":"_chat-edit-form__input_1j7of_68","chat-edit-form__actions":"_chat-edit-form__actions_1j7of_81","chat-edit-form__button":"_chat-edit-form__button_1j7of_89","chat-edit-form__button--cancel":"_chat-edit-form__button--cancel_1j7of_100","chat-edit-form__button--update":"_chat-edit-form__button--update_1j7of_109"},dO=["tabindex","onKeydown"],pO=["tabindex"],hO=["disabled","tabindex"],$g=o.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,i=o.ref(t.content),a=o.ref(null),u=o.computed(()=>i.value.trim()),s=o.computed(()=>u.value!==""&&u.value!==t.content);o.watch(()=>t.active,p=>{p&&(i.value=t.content,o.nextTick(()=>{var d;(d=a.value)==null||d.focus()}))},{immediate:!0});const f=()=>{s.value&&r("update",u.value)};return(p,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(xi)["chat-edit-form"],{[o.unref(xi)["chat-edit-form--active"]]:t.active}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__body"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__border"])},[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:a,type:"text",class:o.normalizeClass(o.unref(xi)["chat-edit-form__input"]),tabindex:t.active?0:-1,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),onKeydown:[o.withKeys(o.withModifiers(f,["prevent"]),["enter"]),d[1]||(d[1]=o.withKeys(m=>r("cancel"),["esc"]))]},null,42,dO),[[o.vModelText,i.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__actions"])},[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(xi)["chat-edit-form__button"],o.unref(xi)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:d[2]||(d[2]=m=>r("cancel"))},o.toDisplayString(t.cancelLabel),11,pO),o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(xi)["chat-edit-form__button"],o.unref(xi)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:f},o.toDisplayString(t.updateLabel),11,hO)],2)],2)],2))}}),mO=56;function Fg(n,e){return n-e<mO?"bottom center":"top center"}function X0(){const n=o.inject("inAgentScrollContainer",o.ref(null)),e=o.ref("top center");return{tooltipPosition:e,onActionsEnter:r=>{const i=n==null?void 0:n.value,a=r.currentTarget;!i||!a||(e.value=Fg(a.getBoundingClientRect().top,i.getBoundingClientRect().top))}}}const ni={"in-chat-bubble":"_in-chat-bubble_9r04a_36","in-chat-bubble__view":"_in-chat-bubble__view_9r04a_44","in-chat-bubble__view--hidden":"_in-chat-bubble__view--hidden_9r04a_52","in-chat-bubble__row":"_in-chat-bubble__row_9r04a_60","in-chat-bubble__actions":"_in-chat-bubble__actions_9r04a_68","in-chat-bubble__action":"_in-chat-bubble__action_9r04a_68","in-chat-bubble__bubble":"_in-chat-bubble__bubble_9r04a_110","in-chat-bubble__text":"_in-chat-bubble__text_9r04a_117","in-chat-bubble__timestamp":"_in-chat-bubble__timestamp_9r04a_127","in-chat-bubble__files":"_in-chat-bubble__files_9r04a_137"},gO=["aria-label"],yO=["aria-label","disabled"],vO=o.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"],setup(n,{emit:e}){var d;const t=n,r=e,i=o.computed(()=>{const m=new Date(t.timestamp);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hourCycle:"h23"})}),a=o.computed(()=>t.copied?"line-check-natural":"line-copy"),{tooltipPosition:u,onActionsEnter:s}=X0(),f=o.computed(()=>u.value.startsWith("bottom")?"bottom":"top"),p=((d=o.getCurrentInstance())==null?void 0:d.uid)??0;return(m,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble"])},[t.files.length>0?(o.openBlock(),o.createBlock(K0,{key:0,wrap:"",class:o.normalizeClass(o.unref(ni)["in-chat-bubble__files"]),files:t.files,removable:!1},null,8,["class","files"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock($g,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:g[0]||(g[0]=_=>r("cancel-edit")),onUpdate:g[1]||(g[1]=_=>r("update",_))},null,8,["active","cancel-label","content","update-label"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([o.unref(ni)["in-chat-bubble__view"],{[o.unref(ni)["in-chat-bubble__view--hidden"]]:m.editing}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__row"]),onMouseenter:g[4]||(g[4]=(..._)=>o.unref(s)&&o.unref(s)(..._))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__actions"])},[m.showCopy?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:`in-chat-bubble-copy-${o.unref(p)}`,placement:f.value,text:m.copyLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":m.copyLabel,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__action"]),onClick:g[2]||(g[2]=_=>r("copy"))},[o.createVNode(o.unref(Ue),{name:a.value,size:24},null,8,["name"])],10,gO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock(o.unref(Li),{key:1,id:`in-chat-bubble-edit-${o.unref(p)}`,placement:f.value,text:m.editLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":m.editLabel,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:g[3]||(g[3]=_=>r("edit"))},[o.createVNode(o.unref(Ue),{name:"line-edit",size:24})],10,yO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__bubble"])},[o.renderSlot(m.$slots,"default",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__text"])},o.toDisplayString(m.content),3)])],2)],34),m.showTimestamp?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__timestamp"])},o.toDisplayString(m.authorLabel)+" · "+o.toDisplayString(i.value),3)):o.createCommentVNode("",!0)],2)],2))}});function i0(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function bO(n){const e=new n.Renderer;return e.link=function(r){const i=r.title?` title="${r.title}"`:"";return`<a href="${r.href}"${i} target="_blank" rel="noopener noreferrer">${r.text}</a>`},e.code=function(r){const[i]=(r.lang??"").trim().split(/\s+/);return`<div class="md-code"><div class="md-code__header"><span class="md-code__lang">${i0(i)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${i0(r.text)}</code></pre></div>`},e}let D1=null,pu=null;const Lg=o.ref(!1);function _O(){D1!==null||pu!==null||(pu=Promise.all([Promise.resolve().then(()=>kX),Promise.resolve().then(()=>iZ)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:bO(t),breaks:!0,gfm:!0}),D1={marked:t,purify:e.default},Lg.value=!0}).catch(n=>{pu=null,console.warn("Markdown renderer failed to load:",n)}))}function s0(n){var r,i,a,u;const e=(i=(r=n.target).closest)==null?void 0:i.call(r,".md-code__copy");if(!(e instanceof HTMLButtonElement))return;const t=((u=(a=e.closest(".md-code"))==null?void 0:a.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 a0=/^(\s*)`([^`]+)`\s*$/;function wO(n,e){const t=[];let r=0,i=e;for(;i<n.length;){const a=n[i].match(a0);if(a)t.push(a[1]+a[2]),r+=1,i+=1;else if(n[i].trim()===""){let u=i;for(;u<n.length&&n[u].trim()==="";)u+=1;if(u>=n.length||!a0.test(n[u]))break;for(;i<u;)t.push(""),i+=1}else break}return{run:t,codeCount:r,end:i}}function EO(n){const e=n.split(`
156
+ `),t=CL(n),r=SL(n),i=[];for(const a of Rg(n,e)){const u=t[a.row-1]+(a.col-1);r.some(([s,f])=>u>=s&&u<f)&&i.push(a.key)}return[...new Set(i)]}catch{return[]}}const TL="_modalWrapper_192bl_36",RL="_medium_192bl_45",BL="_small_192bl_52",$L="_section_192bl_58",FL="_modal_192bl_36",LL="_close_192bl_75",IL="_header_192bl_86",OL="_footer_192bl_100",NL="_modalOverlay_192bl_110",ss={modalWrapper:TL,medium:RL,small:BL,section:$L,modal:FL,close:LL,header:IL,footer:OL,modalOverlay:NL},PL="×",ML=o.defineComponent({__name:"Modal",props:{title:{},isOpen:{type:Boolean},size:{},cancelText:{},submitText:{},hasOverlay:{type:Boolean,default:!0}},emits:["close","submit"],setup(n,{emit:e}){const t=n,r=o.ref(!1),i=e,a=()=>{i("close")},u=()=>{i("submit")},s=f=>{f.key==="Escape"&&i("close")};return o.onMounted(async()=>{await o.nextTick(),r.value=!0,window.addEventListener("keydown",s)}),o.onBeforeUnmount(()=>{window.removeEventListener("keydown",s)}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[f.hasOverlay?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(ss).modalOverlay),onClick:a},null,2)):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:"modal-transition"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass([o.unref(ss).modalWrapper,o.unref(ss)[t.size]])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(ss).modal,o.unref(ss)[t.size]])},[o.createElementVNode("button",{class:o.normalizeClass(o.unref(ss).close),onClick:a},o.toDisplayString(PL),2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).header)},[o.createElementVNode("p",null,o.toDisplayString(f.title),1)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).section)},[o.renderSlot(f.$slots,"section",{},void 0,!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ss).footer)},[o.createVNode(o.unref(Ln),{color:"secondary",variant:"text",label:t.cancelText,onClick:a},null,8,["label"]),o.createVNode(o.unref(Ln),{color:"primary",variant:"solid",label:t.submitText,onClick:u},null,8,["label"])],2)],2)],2),[[o.vShow,f.isOpen]])]),_:3})],64))}}),qL=nr(ML,[["__scopeId","data-v-32c7610a"]]),VL="_wrapper__counter_808qv_1",zL="_wrapper__errorMessage_808qv_1",jL="_wrapper__label_808qv_1",UL="_wrapper__field_808qv_8",WL="_wrapper_808qv_1",HL="_wrapper__size_default_808qv_52",GL="_wrapper__size_small_808qv_55",YL="_wrapper__bottom_808qv_94",Os={wrapper__counter:VL,wrapper__errorMessage:zL,wrapper__label:jL,wrapper__field:UL,wrapper:WL,wrapper__size_default:HL,wrapper__size_small:GL,wrapper__bottom:YL,"wrapper--error":"_wrapper--error_808qv_107"},KL=["for"],XL=["id","max","maxlength","min","name","placeholder","value"],ZL=o.defineComponent({__name:"NumberInput",props:{id:{},name:{},modelValue:{default:void 0},label:{default:""},placeholder:{default:""},maxLength:{default:void 0},error:{default:""},errorStatus:{type:Boolean},counter:{type:Boolean},min:{default:void 0},max:{default:void 0},size:{default:"default"}},emits:["update:modelValue","input","change","paste","focus","blur"],setup(n,{emit:e}){const t=n,r=e,i=s=>{if(s==="")return s;const f=Number(s);return typeof t.min=="number"&&f<t.min?t.min.toString():typeof t.max=="number"&&f>t.max?t.max.toString():f.toString()},a=s=>{const f=s.target,p=i(f.value);f.value=p,r("input",s),r("update:modelValue",Number(p))},u=s=>{const f=s.target,p=f.value,d=i(f.value===""?String(t.min||0):f.value);f.value=d,r("blur",s),p!==d&&r("update:modelValue",Number(d))};return(s,f)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(Os).wrapper,o.unref(Os)[`wrapper__size_${s.size}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Os).wrapper__label),for:s.id},o.toDisplayString(s.label),11,KL)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:s.id,type:"number",class:o.normalizeClass([o.unref(Os).wrapper__field,{[o.unref(Os)["wrapper--error"]]:s.error||s.errorStatus}]),max:s.max,maxlength:s.maxLength,min:s.min,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:u,onChange:f[0]||(f[0]=d=>s.$emit("change",d)),onFocus:f[1]||(f[1]=d=>r("focus",d)),onInput:a,onPaste:f[2]||(f[2]=d=>r("paste",d))},null,42,XL),s.counter||s.error?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Os).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Os).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Os).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2)}}}),JL="_container_14yt1_36",QL="_isMultiline_14yt1_47",eI="_container__text_14yt1_53",tI="_container__default_14yt1_58",nI="_container__warning_14yt1_65",rI="_container__alert_14yt1_72",iI="_container__success_14yt1_79",M4={container:JL,isMultiline:QL,container__text:eI,container__default:tI,container__warning:nI,container__alert:rI,container__success:iI},sI=o.defineComponent({__name:"OnPageMessage",props:{variant:{default:"default"},text:{}},setup(n){const e=n,t=o.computed(()=>{switch(e.variant){case"alert":return"filled-error-box";case"warning":return"line-caution-triangle";case"success":return"line-check-natural";default:return"filled-info-circle"}}),r=o.ref(null),i=o.ref(!1);let a=null;function u(){var d;const s=(d=r.value)==null?void 0:d.$el;if(!s)return;const f=parseFloat(getComputedStyle(s).lineHeight)||16,p=s.getBoundingClientRect().height>f*1.5;p!==i.value&&(i.value=p)}return o.watch(r,s=>{a==null||a.disconnect(),a=null;const f=s==null?void 0:s.$el;!f||typeof ResizeObserver>"u"||(a=new ResizeObserver(()=>u()),a.observe(f),u())}),o.onBeforeUnmount(()=>{a==null||a.disconnect(),a=null}),(s,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(M4).container,o.unref(M4)[`container__${s.variant}`],i.value&&o.unref(M4).isMultiline])},[o.createVNode(Ue,{name:t.value,size:24},null,8,["name"]),o.createVNode(o.unref(Ao),{ref_key:"textRef",ref:r,variant:"detail",class:o.normalizeClass(o.unref(M4).container__text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.text),1)]),_:1},8,["class"])],2))}}),aI="_wrapper_xi3pq_36",oI="_button_xi3pq_43",lI="_button__label_xi3pq_72",uI="_button__icon_xi3pq_75",qt={wrapper:aI,"wrapper--horizontal":"_wrapper--horizontal_xi3pq_40",button:oI,"button--first":"_button--first_xi3pq_46","button--last":"_button--last_xi3pq_49","wrapper--vertical":"_wrapper--vertical_xi3pq_52","wrapper--disabled":"_wrapper--disabled_xi3pq_64","wrapper--icon-only":"_wrapper--icon-only_xi3pq_68",button__label:lI,button__icon:uI,"wrapper--label-only":"_wrapper--label-only_xi3pq_78","button--selected":"_button--selected_xi3pq_104","button--disabled":"_button--disabled_xi3pq_124","wrapper--small":"_wrapper--small_xi3pq_137"},cI=["data-mode","disabled","onClick"],fI=["data-mode","disabled","onClick"],dI=o.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,i=o.ref(t.modelValue||""),a=u=>{t.disabled||u.disabled||(r("update:modelValue",u.value),r("click",u.value))};return o.watch(()=>t.modelValue,u=>{i.value!==u&&(i.value=u||"")}),o.watch(()=>t.segments,u=>{u.some(s=>s.value===i.value)||(i.value="",r("update:modelValue",""))},{deep:!0}),(u,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(qt).wrapper,o.unref(qt)[`wrapper--${u.orientation}`],o.unref(qt)[`wrapper--${u.size}`],{[o.unref(qt)["wrapper--disabled"]]:u.disabled,[o.unref(qt)["wrapper--icon-only"]]:u.iconOnly,[o.unref(qt)["wrapper--label-only"]]:u.labelOnly}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(u.segments,(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:`${f.value}-${p}`},[f.tooltip?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:`segment-tooltip-${f.value}-${p}`,text:f.tooltip},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(qt).button,{[o.unref(qt)["button--selected"]]:f.value===i.value,[o.unref(qt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(qt)["button--first"]]:p===0,[o.unref(qt)["button--last"]]:p===u.segments.length-1}]),"data-mode":f.mode,disabled:f.disabled||u.disabled,onClick:d=>a(f)},[u.iconOnly&&f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon,size:24},null,8,["class","name"])):o.createCommentVNode("",!0),u.labelOnly&&f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon},null,8,["class","name"])):o.createCommentVNode("",!0),f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,cI)]),_:2},1032,["id","text"])):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:o.normalizeClass([o.unref(qt).button,{[o.unref(qt)["button--selected"]]:f.value===i.value,[o.unref(qt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(qt)["button--first"]]:p===0,[o.unref(qt)["button--last"]]:p===u.segments.length-1}]),"data-mode":f.mode,disabled:f.disabled||u.disabled,onClick:d=>a(f)},[u.iconOnly&&f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon,size:24},null,8,["class","name"])):o.createCommentVNode("",!0),u.labelOnly&&f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0),!u.iconOnly&&!u.labelOnly?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[f.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,class:o.normalizeClass(o.unref(qt).button__icon),name:f.icon},null,8,["class","name"])):o.createCommentVNode("",!0),f.label?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(qt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,fI))],64))),128))],2))}}),pI="_wrapper__counter_16ay0_1",hI="_wrapper__errorMessage_16ay0_1",mI="_wrapper__label_16ay0_1",gI="_wrapper__field_16ay0_1",yI="_wrapper_16ay0_1",vI="_wrapper__bottom_16ay0_90",Si={wrapper__counter:pI,wrapper__errorMessage:hI,wrapper__label:mI,wrapper__field:gI,wrapper:yI,wrapper__bottom:vI,"wrapper--error":"_wrapper--error_16ay0_103","wrapper--primary":"_wrapper--primary_16ay0_106","wrapper--smart":"_wrapper--smart_16ay0_114"},bI=["for"],_I=["id","maxlength","name","placeholder","value"],wI=["id","maxlength","name","placeholder","value"],EI=o.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,i=o.ref(null),a=()=>{if(t.autoGrow&&i.value){i.value.style.height="";const s=Math.min(i.value.scrollHeight,t.maxHeight||i.value.scrollHeight);i.value.style.height=`${s}px`}},u=s=>{const f=s.target;r("input",s),r("update:modelValue",f.value),a()};return o.onMounted(()=>{a()}),(s,f)=>{var p;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(Si).wrapper,o.unref(Si)[`wrapper--${t.mode}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Si).wrapper__label),for:s.id},o.toDisplayString(s.label),11,bI)):o.createCommentVNode("",!0),s.multiline?(o.openBlock(),o.createElementBlock("textarea",{key:1,id:s.id,ref_key:"textareaRef",ref:i,class:o.normalizeClass([o.unref(Si).wrapper__field,{[o.unref(Si)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,style:o.normalizeStyle(s.maxHeight?{maxHeight:`${s.maxHeight}px`}:void 0),value:s.modelValue,onBlur:f[0]||(f[0]=d=>r("blur",d)),onChange:f[1]||(f[1]=d=>s.$emit("change",d)),onFocus:f[2]||(f[2]=d=>r("focus",d)),onInput:u,onPaste:f[3]||(f[3]=d=>r("paste",d))},null,46,_I)):(o.openBlock(),o.createElementBlock("input",{key:2,id:s.id,type:"text",class:o.normalizeClass([o.unref(Si).wrapper__field,{[o.unref(Si)["wrapper--error"]]:s.error}]),maxlength:s.maxLength,name:s.name,placeholder:s.placeholder,value:s.modelValue,onBlur:f[4]||(f[4]=d=>r("blur",d)),onChange:f[5]||(f[5]=d=>s.$emit("change",d)),onFocus:f[6]||(f[6]=d=>r("focus",d)),onInput:u,onPaste:f[7]||(f[7]=d=>r("paste",d))},null,42,wI)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Si).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Si).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Si).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)],2)}}}),AI="_wrapper_1hnht_36",kI="_wrapper__label_1hnht_43",CI="_wrapper__input_1hnht_67",SI="_wrapper_checked_1hnht_77",DI="_wrapper_disabled_1hnht_84",f1={wrapper:AI,wrapper__label:kI,wrapper__input:CI,wrapper_checked:SI,wrapper_disabled:DI},xI=["id","checked","disabled","name"],TI=["for"],RI=o.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,i=()=>{r("click",!t.checked)};return(a,u)=>(o.openBlock(),o.createElementBlock("fieldset",{class:o.normalizeClass([o.unref(f1).wrapper,{[o.unref(f1).wrapper_checked]:a.checked,[o.unref(f1).wrapper_disabled]:a.disabled}])},[o.createElementVNode("input",{id:a.id,type:"checkbox",checked:a.checked,class:o.normalizeClass(o.unref(f1).wrapper__input),disabled:a.disabled,name:a.name,onClick:i},null,10,xI),o.createElementVNode("label",{class:o.normalizeClass(o.unref(f1).wrapper__label),for:a.id},null,10,TI)],2))}}),BI={class:"ab-toast__text"},$I=["aria-label"],FI=o.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,i={info:"filled-info-circle",error:"filled-error-box",warning:"filled-caution-triangle"},a=o.computed(()=>t.icon??i[t.variant]);let u=null;function s(){u&&(clearTimeout(u),u=null)}function f(){s(),r("update:modelValue",!1),r("dismiss")}function p(){s(),!(t.duration<=0)&&(u=setTimeout(()=>{f()},t.duration))}return o.watch(()=>t.modelValue,d=>{d?p():s()},{immediate:!0}),o.onBeforeUnmount(s),(d,m)=>(o.openBlock(),o.createBlock(o.Transition,{name:"ab-toast"},{default:o.withCtx(()=>[d.modelValue?(o.openBlock(),o.createElementBlock("div",{key:0,"aria-live":"polite",class:o.normalizeClass(["ab-toast",`ab-toast--${d.variant}`]),role:"status"},[o.createVNode(Ue,{class:"ab-toast__icon",name:a.value,size:24},null,8,["name"]),o.createElementVNode("span",BI,o.toDisplayString(d.text),1),o.createElementVNode("button",{class:"ab-toast__close",type:"button","aria-label":d.closeAriaLabel,onClick:f},[o.createVNode(Ue,{name:"line-close-netural",size:24})],8,$I)],2)):o.createCommentVNode("",!0)]),_:1}))}}),LI=nr(FI,[["__scopeId","data-v-e00fa8e4"]]),Nr={"agent-launcher":"_agent-launcher_w1nwz_36","agent-launcher--expanded":"_agent-launcher--expanded_w1nwz_52","agent-launcher__badge-wrap":"_agent-launcher__badge-wrap_w1nwz_62","agent-launcher__badge":"_agent-launcher__badge_w1nwz_62","agent-launcher__art":"_agent-launcher__art_w1nwz_94","agent-launcher__glyph":"_agent-launcher__glyph_w1nwz_101","agent-launcher__message":"_agent-launcher__message_w1nwz_112","agent-launcher__expand":"_agent-launcher__expand_w1nwz_126","agent-launcher__halo":"_agent-launcher__halo_w1nwz_170","agent-launcher__halo--outer":"_agent-launcher__halo--outer_w1nwz_178","agent-launcher-pulse-outer":"_agent-launcher-pulse-outer_w1nwz_1","agent-launcher__halo--inner":"_agent-launcher__halo--inner_w1nwz_187","agent-launcher-pulse-inner":"_agent-launcher-pulse-inner_w1nwz_1"},II=["aria-label"],OI=o.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,i=o.computed(()=>t.message.trim().length>0),a=o.computed(()=>i.value?`${t.label}: ${t.message}`:t.label);return(u,s)=>(o.openBlock(),o.createElementBlock("button",{type:"button","aria-label":a.value,class:o.normalizeClass([o.unref(Nr)["agent-launcher"],{[o.unref(Nr)["agent-launcher--expanded"]]:i.value}]),onClick:s[0]||(s[0]=f=>r("click"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Nr)["agent-launcher__badge-wrap"])},[t.pulse?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(Nr)["agent-launcher__halo"],o.unref(Nr)["agent-launcher__halo--outer"]])},null,2),o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(Nr)["agent-launcher__halo"],o.unref(Nr)["agent-launcher__halo--inner"]])},null,2)],64)):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Nr)["agent-launcher__badge"])},[o.createVNode(o.unref(Ue),{name:"agent-launcher-badge",class:o.normalizeClass(o.unref(Nr)["agent-launcher__art"]),size:48},null,8,["class"]),o.createVNode(o.unref(Ue),{name:"agent-launcher-glyph",class:o.normalizeClass(o.unref(Nr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),i.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Nr)["agent-launcher__message"])},o.toDisplayString(t.message),3)):o.createCommentVNode("",!0),i.value?(o.openBlock(),o.createBlock(o.unref(Ue),{key:1,name:"line-full-screen",class:o.normalizeClass(o.unref(Nr)["agent-launcher__expand"]),size:24},null,8,["class"])):o.createCommentVNode("",!0)],10,II))}});function $1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const mr={"in-agent-background":"_in-agent-background_qol7f_36","in-agent-background__aurora":"_in-agent-background__aurora_qol7f_46","in-agent-background__stage":"_in-agent-background__stage_qol7f_53","in-agent-background--animated":"_in-agent-background--animated_qol7f_62","agent-bg-aurora-intro":"_agent-bg-aurora-intro_qol7f_1","in-agent-background__blob":"_in-agent-background__blob_qol7f_86","in-agent-background__blob--pink":"_in-agent-background__blob--pink_qol7f_96","agent-bg-drift1":"_agent-bg-drift1_qol7f_1","in-agent-background__blob--purple":"_in-agent-background__blob--purple_qol7f_106","agent-bg-drift2":"_agent-bg-drift2_qol7f_1","in-agent-background__blob--blue":"_in-agent-background__blob--blue_qol7f_116","agent-bg-drift3":"_agent-bg-drift3_qol7f_1","in-agent-background__grain":"_in-agent-background__grain_qol7f_168","in-agent-background--static":"_in-agent-background--static_qol7f_176","in-agent-background--paused":"_in-agent-background--paused_qol7f_181"},NI=3*60*1e3,Bg=o.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=o.ref(null),i=o.ref($1()),a=o.computed(()=>e.static||i.value),u=o.ref(typeof document<"u"&&document.hidden),s=o.ref(!1),f=o.computed(()=>u.value||s.value);let p=[],d=null,m=null,g=null,_=0,R=!1;const A=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,b=()=>{g!==null&&clearTimeout(g),g=setTimeout(()=>{s.value=!0},NI)},y=()=>{const P=Date.now();P-_<1e3||(_=P,s.value=!1,b())},v=()=>{p.forEach(P=>{P.cx=P.el.offsetLeft+P.el.offsetWidth/2})},E=P=>{d===null&&(d=requestAnimationFrame(()=>{d=null;const U=r.value;if(!U)return;const Q=U.getBoundingClientRect(),ue=P.clientX-Q.left,se=.5-(P.clientY-Q.top)/Q.height;p.forEach(M=>{const ne=((M.cx-ue)/Q.width*M.depth).toFixed(1),J=(se*M.depth*.35).toFixed(1);M.el.style.transform=`translate3d(${ne}px, ${J}px, 0)`})}))},w=()=>{R||typeof window>"u"||(R=!0,window.addEventListener("mousemove",E,{passive:!0}),t.forEach(P=>{window.addEventListener(P,y,{passive:!0})}),b())},k=()=>{!R||typeof window>"u"||(R=!1,window.removeEventListener("mousemove",E),t.forEach(P=>{window.removeEventListener(P,y)}),g!==null&&(clearTimeout(g),g=null),p.forEach(P=>{P.el.style.transform=""}))},D=()=>{u.value=document.hidden},C=()=>{i.value=$1(),a.value?k():w()};return o.watch(a,P=>{P?k():w()}),o.onMounted(()=>{const P=r.value;P&&(p=Array.from(P.querySelectorAll("[data-agent-blob]")).map(U=>({el:U,depth:parseFloat(getComputedStyle(U).getPropertyValue("--depth"))||0,cx:0})),v()),a.value||w(),A==null||A.addEventListener("change",C),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&P&&(m=new ResizeObserver(v),m.observe(P))}),o.onUnmounted(()=>{k(),document.removeEventListener("visibilitychange",D),A==null||A.removeEventListener("change",C),d!==null&&cancelAnimationFrame(d),m==null||m.disconnect()}),(P,U)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:r,"aria-hidden":"true",class:o.normalizeClass([o.unref(mr)["in-agent-background"],{[o.unref(mr)["in-agent-background--animated"]]:e.animated,[o.unref(mr)["in-agent-background--static"]]:a.value,[o.unref(mr)["in-agent-background--paused"]]:f.value}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__aurora"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__stage"])},[o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--pink"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--purple"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(mr)["in-agent-background__blob"],o.unref(mr)["in-agent-background__blob--blue"]])},null,2)],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(mr)["in-agent-background__grain"])},null,2)],2))}}),gr={"in-agent-popup":"_in-agent-popup_11gom_36","in-agent-popup__header":"_in-agent-popup__header_11gom_48","in-agent-popup__brand":"_in-agent-popup__brand_11gom_56","in-agent-popup__title":"_in-agent-popup__title_11gom_62","in-agent-popup__badge":"_in-agent-popup__badge_11gom_74","in-agent-popup__actions":"_in-agent-popup__actions_11gom_88","in-agent-popup__separator":"_in-agent-popup__separator_11gom_95","in-agent-popup__icon-button":"_in-agent-popup__icon-button_11gom_101","in-agent-popup__surface":"_in-agent-popup__surface_11gom_118","in-agent-popup__body":"_in-agent-popup__body_11gom_125","in-agent-popup__footer":"_in-agent-popup__footer_11gom_133"},PI=["aria-label","title"],MI=["aria-label","title"],qI=["aria-label","title"],VI=o.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,i=()=>{r("minimize")},a=()=>{r("newChat")},u=()=>{r("academy")};return(s,f)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup"])},[o.createElementVNode("header",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__brand"])},[o.renderSlot(s.$slots,"brand",{},()=>[o.createVNode(o.unref(Ue),{name:"agent-brand",size:24})])],2),o.createElementVNode("h2",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__title"])},o.toDisplayString(t.title),3),o.renderSlot(s.$slots,"badge",{},()=>[t.badgeText?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(gr)["in-agent-popup__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__actions"])},[o.renderSlot(s.$slots,"header-actions",{},()=>[t.showNewChat?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button","aria-label":s.newChatLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:a},[o.createVNode(o.unref(Ue),{name:"line-ai-message-reply-plus",size:24})],10,PI)):o.createCommentVNode("",!0),t.showAcademy?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[o.createVNode(o.unref(Ue),{name:"agent-academy",size:24})],10,MI)):o.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(gr)["in-agent-popup__separator"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:o.normalizeClass(o.unref(gr)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:i},[o.createVNode(o.unref(Ue),{name:"line-minus-netural",size:24})],10,qI)])],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__surface"])},[t.showBackground?(o.openBlock(),o.createBlock(Bg,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(gr)["in-agent-popup__body"])},[o.renderSlot(s.$slots,"default")],2),s.$slots.footer?(o.openBlock(),o.createElementBlock("footer",{key:1,class:o.normalizeClass(o.unref(gr)["in-agent-popup__footer"])},[o.renderSlot(s.$slots,"footer")],2)):o.createCommentVNode("",!0)],2)],2))}}),jn={"agent-welcome":"_agent-welcome_13mdp_36","agent-welcome__intro":"_agent-welcome__intro_13mdp_48","agent-welcome__greeting":"_agent-welcome__greeting_13mdp_56","agent-welcome__title":"_agent-welcome__title_13mdp_65","agent-welcome__categories":"_agent-welcome__categories_13mdp_74","agent-welcome__category":"_agent-welcome__category_13mdp_83","agent-welcome__category--selected":"_agent-welcome__category--selected_13mdp_108","agent-welcome__category-icon":"_agent-welcome__category-icon_13mdp_112","agent-welcome__category-label":"_agent-welcome__category-label_13mdp_116","agent-welcome__cards":"_agent-welcome__cards_13mdp_126","agent-welcome__quick-actions":"_agent-welcome__quick-actions_13mdp_130","agent-welcome__quick-action":"_agent-welcome__quick-action_13mdp_130","agent-welcome__rise--1":"_agent-welcome__rise--1_13mdp_170","agent-welcome__rise-item":"_agent-welcome__rise-item_13mdp_171","agent-welcome-rise":"_agent-welcome-rise_13mdp_1"},zI=["aria-pressed","onClick"],jI=["onClick"],UI=16,WI=.18,HI=.06,P9=260,M9="cubic-bezier(0.22, 1, 0.36, 1)",GI=o.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,i=m=>({"--rise-delay":`${WI+m*HI}s`}),a=o.inject("inAgentScrollContainer",o.ref(null)),u=o.inject("inAgentBottomInset",o.ref(0)),s=o.ref(null),f=o.ref(null),p=()=>{const m=a.value,g=f.value;if(!m||!g)return;const _=m.scrollTop+(g.getBoundingClientRect().bottom-m.getBoundingClientRect().top),R=m.scrollTop+m.clientHeight-u.value,A=_+UI-R;A<=1||m.scrollTo({top:Math.min(m.scrollTop+A,m.scrollHeight-m.clientHeight),behavior:"smooth"})},d=()=>{const m=s.value,g=a.value;if(!m)return;if(!t.selected||!g){m.style.marginTop="";return}const _=f.value,R=(_==null?void 0:_.firstElementChild)??null,A=(R==null?void 0:R.firstElementChild)??null,b=(A==null?void 0:A.getBoundingClientRect().height)??0,y=(_==null?void 0:_.getBoundingClientRect().height)??0,v=m.getBoundingClientRect().height-y+b,E=g.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(E-v)/2)}px`};return o.watch(u,()=>d()),o.onMounted(()=>d()),o.watch(()=>t.selected,async m=>{const g=s.value,_=(g==null?void 0:g.getBoundingClientRect().top)??0;if(await o.nextTick(),!g)return;if(d(),$1()){p();return}const R=_-g.getBoundingClientRect().top,A=[];Math.abs(R)>1&&A.push(g.animate([{transform:`translateY(${R}px)`},{transform:"translateY(0)"}],{duration:P9,easing:M9}));const b=f.value;m&&b&&A.push(b.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:P9,easing:M9})),Promise.all(A.map(y=>y.finished)).then(p).catch(()=>p())}),(m,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:s,class:o.normalizeClass(o.unref(jn)["agent-welcome"])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(jn)["agent-welcome__intro"],o.unref(jn)["agent-welcome__rise--1"]])},[t.greeting?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(jn)["agent-welcome__greeting"])},o.toDisplayString(t.greeting),3)):o.createCommentVNode("",!0),t.title?(o.openBlock(),o.createElementBlock("p",{key:1,class:o.normalizeClass(o.unref(jn)["agent-welcome__title"])},o.toDisplayString(t.title),3)):o.createCommentVNode("",!0)],2),t.categories.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(jn)["agent-welcome__categories"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.categories,(_,R)=>(o.openBlock(),o.createElementBlock("button",{key:_.value,type:"button","aria-pressed":t.selected===_.value,class:o.normalizeClass([o.unref(jn)["agent-welcome__category"],o.unref(jn)["agent-welcome__rise-item"],{[o.unref(jn)["agent-welcome__category--selected"]]:t.selected===_.value}]),style:o.normalizeStyle(i(R)),onClick:A=>r("select",_.value)},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(jn)["agent-welcome__category-icon"]),name:_.icon,size:24},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(jn)["agent-welcome__category-label"])},o.toDisplayString(_.label),3)],14,zI))),128))],2)):o.createCommentVNode("",!0),t.quickActions.length>0?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(jn)["agent-welcome__quick-actions"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.quickActions,(_,R)=>(o.openBlock(),o.createElementBlock("button",{key:_.id,type:"button",class:o.normalizeClass([o.unref(jn)["agent-welcome__quick-action"],o.unref(jn)["agent-welcome__rise-item"]]),style:o.normalizeStyle(i(R)),onClick:A=>r("quick-action",_.prompt)},o.toDisplayString(_.label),15,jI))),128))],2)):o.createCommentVNode("",!0),m.$slots.cards?(o.openBlock(),o.createElementBlock("div",{key:2,ref_key:"cardsRef",ref:f,class:o.normalizeClass(o.unref(jn)["agent-welcome__cards"])},[o.renderSlot(m.$slots,"cards")],2)):o.createCommentVNode("",!0)],2))}}),Di={"in-blueprint-card":"_in-blueprint-card_1h6g6_36","in-blueprint-card__thumb":"_in-blueprint-card__thumb_1h6g6_55","in-blueprint-card__image":"_in-blueprint-card__image_1h6g6_61","in-blueprint-card__placeholder":"_in-blueprint-card__placeholder_1h6g6_67","in-blueprint-card__badge":"_in-blueprint-card__badge_1h6g6_78","in-blueprint-card__footer":"_in-blueprint-card__footer_1h6g6_92","in-blueprint-card__text":"_in-blueprint-card__text_1h6g6_98","in-blueprint-card__title":"_in-blueprint-card__title_1h6g6_105","in-blueprint-card__subtitle":"_in-blueprint-card__subtitle_1h6g6_114","in-blueprint-card__open":"_in-blueprint-card__open_1h6g6_123"},YI=["alt","src"],KI=o.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,i=()=>{r("open")},a=u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),r("open"))};return(u,s)=>(o.openBlock(),o.createElementBlock("div",{role:"button",tabindex:"0",class:o.normalizeClass(o.unref(Di)["in-blueprint-card"]),onClick:i,onKeydown:a},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__thumb"])},[t.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:t.title,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__image"]),src:t.imageUrl},null,10,YI)):o.renderSlot(u.$slots,"thumb",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__placeholder"])},[o.createVNode(o.unref(Ue),{name:"line-figma",size:24})],2)]),t.badgeText?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__text"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__title"])},o.toDisplayString(t.title),3),t.subtitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Di)["in-blueprint-card__subtitle"])},o.toDisplayString(t.subtitle),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Di)["in-blueprint-card__open"])},[o.createVNode(o.unref(Ue),{name:"line-external-link",size:16})],2)],2)],34))}}),Ut={"agent-files-wrapper":"_agent-files-wrapper_13ht2_36","agent-files__announcer":"_agent-files__announcer_13ht2_41","agent-files__error-bubble":"_agent-files__error-bubble_13ht2_53","agent-files":"_agent-files_13ht2_36","agent-files--wrap":"_agent-files--wrap_13ht2_103","agent-files__card":"_agent-files__card_13ht2_110","agent-files__card--error":"_agent-files__card--error_13ht2_124","agent-files__body":"_agent-files__body_13ht2_128","agent-files__thumb":"_agent-files__thumb_13ht2_136","agent-files__thumb--swatch":"_agent-files__thumb--swatch_13ht2_145","agent-files__swatch-band":"_agent-files__swatch-band_13ht2_150","agent-files__thumb--icon":"_agent-files__thumb--icon_13ht2_155","agent-files__thumb--error":"_agent-files__thumb--error_13ht2_162","agent-files__labels":"_agent-files__labels_13ht2_170","agent-files__name":"_agent-files__name_13ht2_183","agent-files__type":"_agent-files__type_13ht2_184","agent-files__remove":"_agent-files__remove_13ht2_198"},XI=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],ZI=["alt","src"],JI=["aria-label","onClick"],QI=4,q9=20,V9=12,K0=o.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=e,i=o.ref(-1),a=C=>{var P;return((P=t.files[C])==null?void 0:P.status)==="error"},u=C=>(C==null?void 0:C.status)==="error"?C.errorMessage||t.errorFallbackLabel:"",s=o.computed(()=>a(i.value)?i.value:-1),f=o.computed(()=>u(t.files[s.value])),p=o.computed(()=>t.files.map(C=>u(C)).filter(Boolean).join(" ")),d=o.computed(()=>t.files.findIndex((C,P)=>a(P))),m=o.ref(null),g=o.ref(null),_=o.ref(null),R=o.ref([]),A=o.ref(0),b=o.ref(q9),y=(C,P,U)=>Math.min(Math.max(C,P),Math.max(P,U)),v=(C,P)=>{C instanceof HTMLElement&&(R.value[P]=C)},E=C=>{i.value=C},w=C=>{i.value===C&&(i.value=-1)},k=()=>{const C=m.value,P=g.value,U=_.value,Q=R.value[s.value];if(!C||!P||!U||!Q)return;const ue=Q.offsetLeft-P.scrollLeft,H=y(ue,0,C.clientWidth-U.offsetWidth);A.value=H,b.value=y(ue+q9-H,V9,U.offsetWidth-V9)},D=()=>{const C=g.value,P=R.value[d.value];if(!C||!P)return;const U=P.offsetLeft+P.offsetWidth;P.offsetLeft<C.scrollLeft?C.scrollLeft=P.offsetLeft:U>C.scrollLeft+C.clientWidth&&(C.scrollLeft=U-C.clientWidth)};return o.watch(s,()=>void o.nextTick(k)),o.watch(()=>[d.value,p.value,t.files.length],()=>void o.nextTick(()=>{R.value.length=t.files.length,D()})),o.watch(g,(C,P)=>{P==null||P.removeEventListener("scroll",k),C==null||C.addEventListener("scroll",k,{passive:!0})},{immediate:!0}),o.onBeforeUnmount(()=>{var C;(C=g.value)==null||C.removeEventListener("scroll",k)}),(C,P)=>t.files.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"wrapperRef",ref:m,class:o.normalizeClass(o.unref(Ut)["agent-files-wrapper"])},[f.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:_,role:"tooltip",class:o.normalizeClass(o.unref(Ut)["agent-files__error-bubble"]),style:o.normalizeStyle({left:`${A.value}px`,"--agent-files-arrow-left":`${b.value}px`})},o.toDisplayString(f.value),7)):o.createCommentVNode("",!0),o.createElementVNode("span",{"aria-live":"polite",role:"status",class:o.normalizeClass(o.unref(Ut)["agent-files__announcer"])},o.toDisplayString(p.value),3),o.createElementVNode("div",{ref_key:"stripRef",ref:g,class:o.normalizeClass([o.unref(Ut)["agent-files"],{[o.unref(Ut)["agent-files--wrap"]]:t.wrap}])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.files,(U,Q)=>{var ue;return o.openBlock(),o.createElementBlock("div",{key:U.id,ref_for:!0,ref:H=>v(H,Q),"data-testid":"agent-file-card",class:o.normalizeClass([o.unref(Ut)["agent-files__card"],{[o.unref(Ut)["agent-files__card--error"]]:U.status==="error"}]),onClick:H=>r("open",U.id),onFocusin:H=>E(Q),onFocusout:H=>w(Q),onMouseenter:H=>E(Q),onMouseleave:H=>w(Q)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ut)["agent-files__body"])},[U.status==="loading"?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"]])},[o.createVNode(o.unref(Ue),{name:"loading-circle",size:24})],2)):U.status==="error"?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"],o.unref(Ut)["agent-files__thumb--error"]])},[o.createVNode(o.unref(Ue),{name:U.icon??"filled-error-box",size:24},null,8,["name"])],2)):(ue=U.swatch)!=null&&ue.length?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--swatch"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.swatch.slice(0,QI),H=>(o.openBlock(),o.createElementBlock("span",{key:H,class:o.normalizeClass(o.unref(Ut)["agent-files__swatch-band"]),style:o.normalizeStyle({background:H})},null,6))),128))],2)):U.thumbnailUrl?(o.openBlock(),o.createElementBlock("img",{key:3,alt:U.name,class:o.normalizeClass(o.unref(Ut)["agent-files__thumb"]),src:U.thumbnailUrl},null,10,ZI)):(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass([o.unref(Ut)["agent-files__thumb"],o.unref(Ut)["agent-files__thumb--icon"]])},[U.icon?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,name:U.icon,size:24},null,8,["name"])):o.createCommentVNode("",!0)],2)),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__labels"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__name"])},o.toDisplayString(U.name),3),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ut)["agent-files__type"])},o.toDisplayString(U.type),3)],2),t.removable?(o.openBlock(),o.createElementBlock("button",{key:5,type:"button","aria-label":t.removeLabel,class:o.normalizeClass(o.unref(Ut)["agent-files__remove"]),onClick:o.withModifiers(H=>r("remove",U.id),["stop"])},[o.createVNode(o.unref(Ue),{name:"chip-close-6",size:6})],10,JI)):o.createCommentVNode("",!0)],2)],42,XI)}),128))],2)],2)):o.createCommentVNode("",!0)}}),Zt={"chat-input":"_chat-input_1i3a5_37","chat-input__container":"_chat-input__container_1i3a5_42","chat-input__container--focused":"_chat-input__container--focused_1i3a5_72","chat-input__container--generating":"_chat-input__container--generating_1i3a5_78","chat-input__gen-ring":"_chat-input__gen-ring_1i3a5_85","chat-input__notice":"_chat-input__notice_1i3a5_93","chat-input__notice--info":"_chat-input__notice--info_1i3a5_106","chat-input__notice--warning":"_chat-input__notice--warning_1i3a5_111","chat-input__notice-body":"_chat-input__notice-body_1i3a5_115","chat-input__notice-icon":"_chat-input__notice-icon_1i3a5_127","chat-input__notice-text":"_chat-input__notice-text_1i3a5_135","chat-input__notice-count":"_chat-input__notice-count_1i3a5_140","chat-input__text-area":"_chat-input__text-area_1i3a5_146","chat-input__textarea":"_chat-input__textarea_1i3a5_152","chat-input__toolbar":"_chat-input__toolbar_1i3a5_174","chat-input__toolbar-left":"_chat-input__toolbar-left_1i3a5_180","chat-input__actions":"_chat-input__actions_1i3a5_186","chat-input__send-reason":"_chat-input__send-reason_1i3a5_191","chat-input__icon-btn":"_chat-input__icon-btn_1i3a5_220","chat-input__send-btn":"_chat-input__send-btn_1i3a5_243","chat-input__files":"_chat-input__files_1i3a5_267"},lo=[{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]}],eO=200,tO=4,nO=2600,du=2,rO=6;function iO(n){const[e]=lo,t=lo[lo.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<lo.length-1;r+=1){const i=lo[r],a=lo[r+1];if(n>=i.p&&n<=a.p){const u=(n-i.p)/(a.p-i.p);return[Math.round(i.c[0]+u*(a.c[0]-i.c[0])),Math.round(i.c[1]+u*(a.c[1]-i.c[1])),Math.round(i.c[2]+u*(a.c[2]-i.c[2])),i.c[3]+u*(a.c[3]-i.c[3])]}}return[0,0,0,0]}function sO(n){const{containerRef:e,ringRef:t,active:r}=n;let i=[],a=[],u=null,s=null,f=null;function p(){const R=e.value,A=t.value;if(!R||!A)return;const b=R.getBoundingClientRect(),y=b.width+du*2,v=b.height+du*2;if(!y||!v)return;A.setAttribute("viewBox",`0 0 ${y} ${v}`),A.setAttribute("width",String(y)),A.setAttribute("height",String(v));const E=1,w=Math.max(rO,1),k=y-E*2,D=v-E*2,C=k-2*w,P=D-2*w,U=Math.PI/2*w,Q=2*C+2*P+4*U;function ue(ce){let L=ce;if(L<=C)return{x:w+L,y:0};if(L-=C,L<=U){const I=-Math.PI/2+L/w;return{x:k-w+w*Math.cos(I),y:w+w*Math.sin(I)}}if(L-=U,L<=P)return{x:k,y:w+L};if(L-=P,L<=U){const I=L/w;return{x:k-w+w*Math.cos(I),y:D-w+w*Math.sin(I)}}if(L-=U,L<=C)return{x:k-w-L,y:D};if(L-=C,L<=U){const I=Math.PI/2+L/w;return{x:w+w*Math.cos(I),y:D-w+w*Math.sin(I)}}if(L-=U,L<=P)return{x:0,y:D-w-L};L-=P;const X=Math.PI+L/w;return{x:w+w*Math.cos(X),y:w+w*Math.sin(X)}}const H="http://www.w3.org/2000/svg",se=[],M=[],N=[{len:C,isArc:!1},{len:U,isArc:!0},{len:P,isArc:!1},{len:U,isArc:!0},{len:C,isArc:!1},{len:U,isArc:!0},{len:P,isArc:!1},{len:U,isArc:!0}],ne=Q/eO;let J=0;for(const ce of N){const L=ce.isArc?tO:Math.max(1,Math.round(ce.len/ne));for(let X=0;X<L;X+=1){const I=J+ce.len*X/L,q=J+ce.len*(X+1)/L,F=ue(I),z=ue(q),re=`M ${(F.x+E).toFixed(2)} ${(F.y+E).toFixed(2)}`,ie=`${(z.x+E).toFixed(2)} ${(z.y+E).toFixed(2)}`,V=document.createElementNS(H,"path");V.setAttribute("d",ce.isArc?`${re} A ${w} ${w} 0 0 1 ${ie}`:`${re} L ${ie}`),V.setAttribute("fill","none"),V.setAttribute("stroke","transparent"),V.setAttribute("stroke-width",String(du)),V.setAttribute("stroke-linecap","butt"),M.push(V),se.push((I+q)/2/Q)}J+=ce.len}const ee=document.createElementNS(H,"g");ee.append(...M),A.replaceChildren(ee),a=M,i=se}function d(R){for(let A=0;A<i.length;A+=1){const b=((i[A]-R)%1+1)%1,[y,v,E,w]=iO(b);a[A].setAttribute("stroke",`rgba(${y},${v},${E},${w})`)}}function m(R){s===null&&(s=R),d((R-s)/nO%1),u=requestAnimationFrame(m)}function g(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),$1()?d(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!f&&(f=new ResizeObserver(()=>{r.value&&(p(),$1()&&d(0))}),f.observe(e.value)))}function _(){u!==null&&(cancelAnimationFrame(u),u=null),f==null||f.disconnect(),f=null}o.watch(r,R=>{R?g():_()}),o.onMounted(()=>{r.value&&g()}),o.onBeforeUnmount(_)}const aO=["disabled","placeholder","onKeydown"],oO=["disabled"],lO=["aria-label","disabled"],z9=120,uO=200,cO="Add context",fO=o.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:""}},emits:["update:modelValue","send","stop","attach","remove-file"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=o.ref(null);e({focus:()=>{var C;(C=a.value)==null||C.focus()}});const u=o.ref(null),s=o.ref(null),f=o.ref(r.modelValue),p=o.ref(!1);sO({containerRef:u,ringRef:s,active:o.computed(()=>r.loading)});const d=o.computed(()=>f.value.length),m=o.computed(()=>r.maxLength!==void 0&&d.value>r.maxLength),g=o.computed(()=>r.maxLength!==void 0&&d.value>=r.maxLength-uO),_=o.computed(()=>m.value?`Enter a prompt up to ${r.maxLength} characters to continue.`:`You can enter a prompt up to ${r.maxLength} characters.`),R=o.computed(()=>r.files.some(C=>C.status==="loading"||C.status==="error")),A=o.computed(()=>(f.value.trim().length>0||r.allowEmptySend)&&!m.value&&!r.loading&&!r.disabled&&!R.value),b=o.ref(!1),y=o.computed(()=>!!r.sendDisabledReason&&b.value&&!r.loading&&!A.value),v=()=>{const C=a.value;C&&(C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,z9)}px`,C.style.overflowY=C.scrollHeight>z9?"auto":"hidden")};o.watch(()=>r.modelValue,C=>{C!==f.value&&(f.value=C,o.nextTick(v))}),o.watch(f,C=>{i("update:modelValue",C)});const E=()=>{v()},w=()=>{A.value&&(i("send",f.value.trim()),f.value="",o.nextTick(v))},k=()=>{r.loading?i("stop"):w()},D=()=>{i("attach")};return(C,P)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Zt)["chat-input"])},[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Zt)["chat-input__notice"],m.value?o.unref(Zt)["chat-input__notice--warning"]:o.unref(Zt)["chat-input__notice--info"]])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-body"])},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-icon"]),name:m.value?"filled-caution-triangle-colored":"filled-info-circle",size:16},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-text"])},o.toDisplayString(_.value),3)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Zt)["chat-input__notice-count"])},o.toDisplayString(d.value)+"/"+o.toDisplayString(C.maxLength),3)],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"containerRef",ref:u,class:o.normalizeClass([o.unref(Zt)["chat-input__container"],{[o.unref(Zt)["chat-input__container--focused"]]:p.value,[o.unref(Zt)["chat-input__container--generating"]]:C.loading}])},[o.withDirectives((o.openBlock(),o.createElementBlock("svg",{ref_key:"genRingRef",ref:s,"aria-hidden":"true",class:o.normalizeClass(o.unref(Zt)["chat-input__gen-ring"])},null,2)),[[o.vShow,C.loading]]),C.$slots.attachments||r.files.length>0?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Zt)["chat-input__files"])},[o.renderSlot(C.$slots,"attachments"),r.files.length>0?(o.openBlock(),o.createBlock(K0,{key:0,files:r.files,onRemove:P[0]||(P[0]=U=>i("remove-file",U))},null,8,["files"])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__text-area"])},[o.withDirectives(o.createElementVNode("textarea",{ref_key:"textareaRef",ref:a,rows:"1",class:o.normalizeClass(o.unref(Zt)["chat-input__textarea"]),disabled:C.disabled,placeholder:C.placeholder,"onUpdate:modelValue":P[1]||(P[1]=U=>f.value=U),onBlur:P[2]||(P[2]=U=>p.value=!1),onFocus:P[3]||(P[3]=U=>p.value=!0),onInput:E,onKeydown:[o.withKeys(o.withModifiers(w,["exact","prevent"]),["enter"]),P[4]||(P[4]=o.withKeys(o.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,aO),[[o.vModelText,f.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__toolbar"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Zt)["chat-input__toolbar-left"])},[o.createElementVNode("button",{type:"button","aria-label":cO,class:o.normalizeClass(o.unref(Zt)["chat-input__icon-btn"]),disabled:C.disabled,onClick:D},[o.createVNode(o.unref(Ue),{name:"line-plus-netural",size:24})],10,oO)],2),o.createElementVNode("div",{"data-testid":"agent-send-actions",class:o.normalizeClass(o.unref(Zt)["chat-input__actions"]),onMouseenter:P[5]||(P[5]=U=>b.value=!0),onMouseleave:P[6]||(P[6]=U=>b.value=!1)},[y.value?(o.openBlock(),o.createElementBlock("div",{key:0,role:"tooltip",class:o.normalizeClass(o.unref(Zt)["chat-input__send-reason"])},o.toDisplayString(C.sendDisabledReason),3)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":C.loading?"Stop":"Send",class:o.normalizeClass(o.unref(Zt)["chat-input__send-btn"]),disabled:!A.value&&!C.loading,onClick:k},[o.createVNode(o.unref(Ue),{name:C.loading?"line-ai-stop-solid":"line-architect-segments-sent",size:24},null,8,["name"])],10,lO)],34)],2)],2)],2))}}),xi={"chat-edit-form":"_chat-edit-form_1j7of_36","chat-edit-form--active":"_chat-edit-form--active_1j7of_49","chat-edit-form__body":"_chat-edit-form__body_1j7of_57","chat-edit-form__border":"_chat-edit-form__border_1j7of_62","chat-edit-form__input":"_chat-edit-form__input_1j7of_68","chat-edit-form__actions":"_chat-edit-form__actions_1j7of_81","chat-edit-form__button":"_chat-edit-form__button_1j7of_89","chat-edit-form__button--cancel":"_chat-edit-form__button--cancel_1j7of_100","chat-edit-form__button--update":"_chat-edit-form__button--update_1j7of_109"},dO=["tabindex","onKeydown"],pO=["tabindex"],hO=["disabled","tabindex"],$g=o.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,i=o.ref(t.content),a=o.ref(null),u=o.computed(()=>i.value.trim()),s=o.computed(()=>u.value!==""&&u.value!==t.content);o.watch(()=>t.active,p=>{p&&(i.value=t.content,o.nextTick(()=>{var d;(d=a.value)==null||d.focus()}))},{immediate:!0});const f=()=>{s.value&&r("update",u.value)};return(p,d)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([o.unref(xi)["chat-edit-form"],{[o.unref(xi)["chat-edit-form--active"]]:t.active}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__body"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__border"])},[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:a,type:"text",class:o.normalizeClass(o.unref(xi)["chat-edit-form__input"]),tabindex:t.active?0:-1,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),onKeydown:[o.withKeys(o.withModifiers(f,["prevent"]),["enter"]),d[1]||(d[1]=o.withKeys(m=>r("cancel"),["esc"]))]},null,42,dO),[[o.vModelText,i.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["chat-edit-form__actions"])},[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(xi)["chat-edit-form__button"],o.unref(xi)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:d[2]||(d[2]=m=>r("cancel"))},o.toDisplayString(t.cancelLabel),11,pO),o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(xi)["chat-edit-form__button"],o.unref(xi)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:f},o.toDisplayString(t.updateLabel),11,hO)],2)],2)],2))}}),mO=56;function Fg(n,e){return n-e<mO?"bottom center":"top center"}function X0(){const n=o.inject("inAgentScrollContainer",o.ref(null)),e=o.ref("top center");return{tooltipPosition:e,onActionsEnter:r=>{const i=n==null?void 0:n.value,a=r.currentTarget;!i||!a||(e.value=Fg(a.getBoundingClientRect().top,i.getBoundingClientRect().top))}}}const ni={"in-chat-bubble":"_in-chat-bubble_9r04a_36","in-chat-bubble__view":"_in-chat-bubble__view_9r04a_44","in-chat-bubble__view--hidden":"_in-chat-bubble__view--hidden_9r04a_52","in-chat-bubble__row":"_in-chat-bubble__row_9r04a_60","in-chat-bubble__actions":"_in-chat-bubble__actions_9r04a_68","in-chat-bubble__action":"_in-chat-bubble__action_9r04a_68","in-chat-bubble__bubble":"_in-chat-bubble__bubble_9r04a_110","in-chat-bubble__text":"_in-chat-bubble__text_9r04a_117","in-chat-bubble__timestamp":"_in-chat-bubble__timestamp_9r04a_127","in-chat-bubble__files":"_in-chat-bubble__files_9r04a_137"},gO=["aria-label"],yO=["aria-label","disabled"],vO=o.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"],setup(n,{emit:e}){var d;const t=n,r=e,i=o.computed(()=>{const m=new Date(t.timestamp);return Number.isNaN(m.getTime())?"":m.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hourCycle:"h23"})}),a=o.computed(()=>t.copied?"line-check-natural":"line-copy"),{tooltipPosition:u,onActionsEnter:s}=X0(),f=o.computed(()=>u.value.startsWith("bottom")?"bottom":"top"),p=((d=o.getCurrentInstance())==null?void 0:d.uid)??0;return(m,g)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble"])},[t.files.length>0?(o.openBlock(),o.createBlock(K0,{key:0,wrap:"",class:o.normalizeClass(o.unref(ni)["in-chat-bubble__files"]),files:t.files,removable:!1},null,8,["class","files"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock($g,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:g[0]||(g[0]=_=>r("cancel-edit")),onUpdate:g[1]||(g[1]=_=>r("update",_))},null,8,["active","cancel-label","content","update-label"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([o.unref(ni)["in-chat-bubble__view"],{[o.unref(ni)["in-chat-bubble__view--hidden"]]:m.editing}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__row"]),onMouseenter:g[4]||(g[4]=(..._)=>o.unref(s)&&o.unref(s)(..._))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__actions"])},[m.showCopy?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:`in-chat-bubble-copy-${o.unref(p)}`,placement:f.value,text:m.copyLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":m.copyLabel,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__action"]),onClick:g[2]||(g[2]=_=>r("copy"))},[o.createVNode(o.unref(Ue),{name:a.value,size:24},null,8,["name"])],10,gO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock(o.unref(Li),{key:1,id:`in-chat-bubble-edit-${o.unref(p)}`,placement:f.value,text:m.editLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":m.editLabel,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:g[3]||(g[3]=_=>r("edit"))},[o.createVNode(o.unref(Ue),{name:"line-edit",size:24})],10,yO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__bubble"])},[o.renderSlot(m.$slots,"default",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(ni)["in-chat-bubble__text"])},o.toDisplayString(m.content),3)])],2)],34),m.showTimestamp?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(ni)["in-chat-bubble__timestamp"])},o.toDisplayString(m.authorLabel)+" · "+o.toDisplayString(i.value),3)):o.createCommentVNode("",!0)],2)],2))}});function i0(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function bO(n){const e=new n.Renderer;return e.link=function(r){const i=r.title?` title="${r.title}"`:"";return`<a href="${r.href}"${i} target="_blank" rel="noopener noreferrer">${r.text}</a>`},e.code=function(r){const[i]=(r.lang??"").trim().split(/\s+/);return`<div class="md-code"><div class="md-code__header"><span class="md-code__lang">${i0(i)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${i0(r.text)}</code></pre></div>`},e}let D1=null,pu=null;const Lg=o.ref(!1);function _O(){D1!==null||pu!==null||(pu=Promise.all([Promise.resolve().then(()=>kX),Promise.resolve().then(()=>iZ)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:bO(t),breaks:!0,gfm:!0}),D1={marked:t,purify:e.default},Lg.value=!0}).catch(n=>{pu=null,console.warn("Markdown renderer failed to load:",n)}))}function s0(n){var r,i,a,u;const e=(i=(r=n.target).closest)==null?void 0:i.call(r,".md-code__copy");if(!(e instanceof HTMLButtonElement))return;const t=((u=(a=e.closest(".md-code"))==null?void 0:a.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 a0=/^(\s*)`([^`]+)`\s*$/;function wO(n,e){const t=[];let r=0,i=e;for(;i<n.length;){const a=n[i].match(a0);if(a)t.push(a[1]+a[2]),r+=1,i+=1;else if(n[i].trim()===""){let u=i;for(;u<n.length&&n[u].trim()==="";)u+=1;if(u>=n.length||!a0.test(n[u]))break;for(;i<u;)t.push(""),i+=1}else break}return{run:t,codeCount:r,end:i}}function EO(n){const e=n.split(`
157
157
  `),t=[];let r=0;for(;r<e.length;){const{run:i,codeCount:a,end:u}=a0.test(e[r])?wO(e,r):{run:[],codeCount:0,end:r};if(a>=2){const s=i.filter(p=>p.trim()!=="").map(p=>p.match(/^\s*/)[0].length),f=Math.min(...s);t.push("```",...i.map(p=>p.slice(f)),"```"),r=u}else t.push(e[r]),r+=1}return t.join(`
158
158
  `)}function Ig(){return{formatMarkdown:e=>{if(!e)return"";if(_O(),Lg.value,D1===null)return i0(e);const r=D1.marked.parse(EO(e)).replace(/<table>/g,'<div class="md-table"><table>').replace(/<\/table>/g,"</table></div>");return D1.purify.sanitize(r,{ADD_ATTR:["target","rel"]})}}}const d1={"in-agent-message":"_in-agent-message_1hmez_36","in-agent-message__avatar":"_in-agent-message__avatar_1hmez_43","in-agent-message__body":"_in-agent-message__body_1hmez_50","in-agent-message__text":"_in-agent-message__text_1hmez_55","in-agent-message__md":"_in-agent-message__md_1hmez_65"},AO=["innerHTML"],kO=o.defineComponent({__name:"InAgentMessage",props:{text:{default:""},showAvatar:{type:Boolean,default:!1}},setup(n){const e=n,t=o.useSlots(),{formatMarkdown:r}=Ig(),i=o.computed(()=>!!t.default),a=o.computed(()=>r(e.text??""));return(u,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(d1)["in-agent-message"])},[u.showAvatar?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(d1)["in-agent-message__avatar"])},[o.createVNode(o.unref(Ue),{name:"line-smart-ai",size:24})],2)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(d1)["in-agent-message__body"])},[i.value?o.renderSlot(u.$slots,"default",{key:0}):u.text?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(d1)["in-agent-message__md"]),innerHTML:a.value,onClick:s[0]||(s[0]=(...f)=>o.unref(s0)&&o.unref(s0)(...f))},null,10,AO)):(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(d1)["in-agent-message__text"])},o.toDisplayString(u.text),3))],2)],2))}}),CO="_gradientShift_hiriu_1",hu={"in-chat-loading":"_in-chat-loading_hiriu_36","in-chat-loading__icon":"_in-chat-loading__icon_hiriu_43","in-chat-loading__text":"_in-chat-loading__text_hiriu_47",gradientShift:CO},SO=2500,DO=o.defineComponent({__name:"InChatLoading",props:{text:{default:""},cycling:{type:Boolean,default:!0}},setup(n){const e=n,t=["Analyzing…","Processing…","Searching…","Synthesizing…"],r=o.ref(0);let i=null;const a=o.computed(()=>e.text?e.text:t[r.value]),u=()=>{i&&(clearInterval(i),i=null)},s=()=>{i||(i=setInterval(()=>{r.value=(r.value+1)%t.length},SO))};return o.watch(()=>e.cycling&&!e.text,f=>{f?s():u()},{immediate:!0}),o.onUnmounted(u),(f,p)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(hu)["in-chat-loading"])},[o.createVNode(o.unref(Ue),{name:"agent-analyzing",class:o.normalizeClass(o.unref(hu)["in-chat-loading__icon"]),size:24},null,8,["class"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(hu)["in-chat-loading__text"])},o.toDisplayString(a.value),3)],2))}}),ba={"in-chat-message-actions":"_in-chat-message-actions_akoku_36","in-chat-message-actions__button":"_in-chat-message-actions__button_akoku_42","in-chat-message-actions__button--active":"_in-chat-message-actions__button--active_akoku_66"},xO=["aria-label"],TO=["aria-label"],RO=["aria-label"],BO=["aria-label"],$O=1500,FO=o.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 A;const t=n,r=e,i=o.ref(!1);let a=null;const u=()=>{i.value=!0,a&&clearTimeout(a),a=setTimeout(()=>{i.value=!1,a=null},$O)};o.watch(()=>t.copied,b=>{b&&u()},{immediate:!0});const s=o.computed(()=>i.value?"line-check-natural":"line-copy"),f=o.computed(()=>t.feedback==="like"?"feedback-helpful-selected":"line-ai-like"),p=o.computed(()=>t.feedback==="dislike"?"feedback-not-helpful-selected":"line-ai-dislike"),d=()=>{u(),r("copy")},{tooltipPosition:m,onActionsEnter:g}=X0(),_=o.computed(()=>m.value.startsWith("bottom")?"bottom":"top"),R=((A=o.getCurrentInstance())==null?void 0:A.uid)??0;return(b,y)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(ba)["in-chat-message-actions"]),onMouseenter:y[3]||(y[3]=(...v)=>o.unref(g)&&o.unref(g)(...v))},[b.retryable?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:`in-chat-message-actions-retry-${o.unref(R)}`,placement:_.value,text:b.retryLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":b.retryLabel,class:o.normalizeClass(o.unref(ba)["in-chat-message-actions__button"]),onClick:y[0]||(y[0]=v=>r("retry"))},[o.createVNode(o.unref(Ue),{name:"line-reset",size:24})],10,xO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),b.showCopy?(o.openBlock(),o.createBlock(o.unref(Li),{key:1,id:`in-chat-message-actions-copy-${o.unref(R)}`,placement:_.value,text:b.copyLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":b.copyLabel,class:o.normalizeClass(o.unref(ba)["in-chat-message-actions__button"]),onClick:d},[o.createVNode(o.unref(Ue),{name:s.value,size:24},null,8,["name"])],10,TO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),b.showFeedback?(o.openBlock(),o.createBlock(o.unref(Li),{key:2,id:`in-chat-message-actions-like-${o.unref(R)}`,placement:_.value,text:b.likeLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":b.likeLabel,class:o.normalizeClass([o.unref(ba)["in-chat-message-actions__button"],{[o.unref(ba)["in-chat-message-actions__button--active"]]:b.feedback==="like"}]),onClick:y[1]||(y[1]=v=>r("like"))},[o.createVNode(o.unref(Ue),{name:f.value,size:24},null,8,["name"])],10,RO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),b.showFeedback?(o.openBlock(),o.createBlock(o.unref(Li),{key:3,id:`in-chat-message-actions-dislike-${o.unref(R)}`,placement:_.value,text:b.dislikeLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":b.dislikeLabel,class:o.normalizeClass([o.unref(ba)["in-chat-message-actions__button"],{[o.unref(ba)["in-chat-message-actions__button--active"]]:b.feedback==="dislike"}]),onClick:y[2]||(y[2]=v=>r("dislike"))},[o.createVNode(o.unref(Ue),{name:p.value,size:24},null,8,["name"])],10,BO)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],34))}}),uo={"scroll-to-bottom-btn":"_scroll-to-bottom-btn_7p7i3_36","scroll-to-bottom-btn__badge":"_scroll-to-bottom-btn__badge_7p7i3_60","fade-enter-active":"_fade-enter-active_7p7i3_74","fade-leave-active":"_fade-leave-active_7p7i3_75","fade-enter-from":"_fade-enter-from_7p7i3_79","fade-leave-to":"_fade-leave-to_7p7i3_80"},Og=o.defineComponent({__name:"InScrollToBottomButton",props:{visible:{type:Boolean},unreadCount:{default:0}},emits:["click"],setup(n){return(e,t)=>(o.openBlock(),o.createBlock(o.Transition,{"enter-active-class":o.unref(uo)["fade-enter-active"],"enter-from-class":o.unref(uo)["fade-enter-from"],"leave-active-class":o.unref(uo)["fade-leave-active"],"leave-to-class":o.unref(uo)["fade-leave-to"]},{default:o.withCtx(()=>[e.visible?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",class:o.normalizeClass(o.unref(uo)["scroll-to-bottom-btn"]),onClick:t[0]||(t[0]=r=>e.$emit("click"))},[e.unreadCount>0?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(uo)["scroll-to-bottom-btn__badge"])},o.toDisplayString(e.unreadCount),3)):o.createCommentVNode("",!0),o.createVNode(o.unref(Ue),{color:"#ffffff",name:"line-chevron-small-down",size:16})],2)):o.createCommentVNode("",!0)]),_:1},8,["enter-active-class","enter-from-class","leave-active-class","leave-to-class"]))}}),LO="_scroll_1m1ub_47",IO="_composer_1m1ub_62",OO="_input_1m1ub_70",q4={"in-agent-conversation":"_in-agent-conversation_1m1ub_36",scroll:LO,composer:IO,input:OO,"in-agent-input-rise":"_in-agent-input-rise_1m1ub_1"},NO=50,PO=o.defineComponent({__name:"InAgentConversation",setup(n){const e=o.ref(null),t=o.ref(null),r=o.ref(null),i=o.ref(0),a=o.ref(!1);let u=null,s=null;o.provide("inAgentConversationRoot",e),o.provide("inAgentScrollContainer",t),o.provide("inAgentBottomInset",i);const f=()=>{var g;i.value=((g=r.value)==null?void 0:g.offsetHeight)??0},p=()=>{const g=t.value;if(!g)return;const _=g.querySelectorAll("[data-msg-id]"),R=_[_.length-1];if(!R){a.value=!1;return}const A=g.getBoundingClientRect().bottom-i.value;a.value=R.getBoundingClientRect().bottom-A>NO};o.watch(i,()=>p());const d=()=>{const g=t.value;if(typeof ResizeObserver>"u"||!g)return;s==null||s.disconnect(),s=new ResizeObserver(()=>p()),s.observe(g);const _=g.firstElementChild;_&&s.observe(_)},m=()=>{const g=t.value;g&&g.scrollTo({top:g.scrollHeight,behavior:"smooth"})};return o.onMounted(()=>{o.nextTick(()=>{var g;f(),typeof ResizeObserver<"u"&&r.value&&(u=new ResizeObserver(f),u.observe(r.value)),(g=t.value)==null||g.addEventListener("scroll",p,{passive:!0}),d()})}),o.onUnmounted(()=>{var g;u==null||u.disconnect(),u=null,s==null||s.disconnect(),s=null,(g=t.value)==null||g.removeEventListener("scroll",p)}),(g,_)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:e,class:o.normalizeClass(o.unref(q4)["in-agent-conversation"])},[o.createElementVNode("div",{ref_key:"scrollRef",ref:t,class:o.normalizeClass(o.unref(q4).scroll),style:o.normalizeStyle({paddingBottom:`${i.value}px`})},[o.renderSlot(g.$slots,"default")],6),o.createElementVNode("div",{class:o.normalizeClass(o.unref(q4).composer)},[o.createElementVNode("div",{ref_key:"inputRef",ref:r,class:o.normalizeClass(o.unref(q4).input)},[o.createVNode(Og,{"unread-count":0,visible:a.value,onClick:m},null,8,["visible"]),o.renderSlot(g.$slots,"composer")],2)],2)],2))}}),MO="_list_e0scq_41",j9={"in-agent-message-list":"_in-agent-message-list_e0scq_36",list:MO},qO=["data-msg-id","data-msg-role"],VO=50,zO=o.defineComponent({__name:"InAgentMessageList",props:{messages:{},autoScroll:{type:Boolean,default:!1}},emits:["scroll"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=o.inject("inAgentScrollContainer",o.ref(null)),u=o.inject("inAgentBottomInset",o.ref(0)),s=o.ref(null),f=o.ref(!1),p=()=>a.value,d=v=>{var k;const E=(k=s.value)==null?void 0:k.lastElementChild;if(!E)return!0;const w=v.getBoundingClientRect().bottom-u.value;return E.getBoundingClientRect().bottom-w<=VO},m=()=>{const v=p();if(!v)return!0;const E=d(v);return f.value=!E,i("scroll",{isAtBottom:E,scrollTop:v.scrollTop}),E},g=(v=!1,E="smooth")=>{f.value&&!v||o.nextTick(()=>{const w=p();if(!w)return;const k=w.scrollHeight-w.clientHeight;E==="auto"?w.scrollTop=k:w.scrollTo({top:k,behavior:E}),f.value=!1})};let _=null,R=null,A=null;const b=v=>{typeof ResizeObserver>"u"||(R==null||R.disconnect(),R=new ResizeObserver(()=>{A!==null&&cancelAnimationFrame(A),A=requestAnimationFrame(()=>{if(A=null,!f.value){g(!0,"auto");return}m()})}),R.observe(v),s.value&&R.observe(s.value))},y=()=>{const v=p();v!==_&&(_&&_.removeEventListener("scroll",m),v&&(v.addEventListener("scroll",m,{passive:!0}),_=v,b(v)))};return o.watch(()=>r.messages.map(v=>v.id).join("|"),(v,E)=>{const w=new Set(E?E.split("|"):[]),k=r.messages.filter(D=>!w.has(D.id));k.length===0||!r.autoScroll||g(k.some(D=>D.role==="user"))}),o.watch(u,()=>{if(f.value){m();return}o.nextTick(()=>g(!0))}),o.watch(a,()=>{o.nextTick(()=>y())}),o.onMounted(()=>{o.nextTick(()=>{y(),r.autoScroll&&g(!0,"auto")})}),o.onUnmounted(()=>{_&&(_.removeEventListener("scroll",m),_=null),R==null||R.disconnect(),R=null,A!==null&&(cancelAnimationFrame(A),A=null)}),e({scrollToBottom:g}),(v,E)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(j9)["in-agent-message-list"])},[o.createElementVNode("div",{ref_key:"listRef",ref:s,class:o.normalizeClass(o.unref(j9).list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.messages,w=>(o.openBlock(),o.createElementBlock("div",{key:w.id,"data-msg-id":w.id,"data-msg-role":w.role},[o.renderSlot(v.$slots,"default",{message:w})],8,qO))),128))],2)],2))}}),V4={"wizard-footer":"_wizard-footer_lhb6f_36","wizard-footer__left":"_wizard-footer__left_lhb6f_45","wizard-footer__pagination":"_wizard-footer__pagination_lhb6f_49","wizard-footer__right":"_wizard-footer__right_lhb6f_59"},Ng=o.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(i,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(V4)["wizard-footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(V4)["wizard-footer__left"])},[o.createVNode(o.unref(Ln),{color:"secondary","left-icon-name":"line-arrow-left",variant:"ghost",disabled:!t.canGoBack,"icon-size":24,label:t.backLabel,onClick:a[0]||(a[0]=u=>r("back"))},null,8,["disabled","label"])],2),t.totalSteps>1?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(V4)["wizard-footer__pagination"])},o.toDisplayString(t.currentStep+1)+"/"+o.toDisplayString(t.totalSteps),3)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(V4)["wizard-footer__right"])},[t.isLastStep&&t.canSubmit?(o.openBlock(),o.createBlock(o.unref(Ln),{key:0,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-check-natural",variant:"ghost","icon-size":24,label:t.submitLabel,onClick:a[1]||(a[1]=u=>r("submit"))},null,8,["label"])):t.isLastStep&&t.isRequired?(o.openBlock(),o.createBlock(o.unref(Ln),{key:1,"data-wizard-footer-primary":"",disabled:"",color:"secondary","right-icon-name":"line-check-natural",variant:"ghost","icon-size":24,label:t.submitLabel},null,8,["label"])):t.isLastStep?(o.openBlock(),o.createBlock(o.unref(Ln),{key:2,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-chevron-double-right",variant:"ghost","icon-size":24,label:t.skipLabel,onClick:a[2]||(a[2]=u=>r("skip"))},null,8,["label"])):t.canContinue?(o.openBlock(),o.createBlock(o.unref(Ln),{key:3,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-arrow-right",variant:"ghost","icon-size":24,label:t.nextLabel,onClick:a[3]||(a[3]=u=>r("next"))},null,8,["label"])):t.isRequired?(o.openBlock(),o.createBlock(o.unref(Ln),{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"])):(o.openBlock(),o.createBlock(o.unref(Ln),{key:5,"data-wizard-footer-primary":"",color:"secondary","right-icon-name":"line-chevron-double-right",variant:"ghost","icon-size":24,label:t.skipLabel,onClick:a[4]||(a[4]=u=>r("skip"))},null,8,["label"]))],2)],2))}}),co={"wizard-header":"_wizard-header_10qzd_36","wizard-header__content":"_wizard-header__content_10qzd_40","wizard-header__title":"_wizard-header__title_10qzd_48","wizard-header__actions":"_wizard-header__actions_10qzd_56","wizard-header__divider":"_wizard-header__divider_10qzd_66","wizard-header__divider-line":"_wizard-header__divider-line_10qzd_72"},jO="Info",Pg=o.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(i,a)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(co)["wizard-header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(co)["wizard-header__content"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(co)["wizard-header__title"])},o.toDisplayString(i.title),3),o.createElementVNode("div",{class:o.normalizeClass(o.unref(co)["wizard-header__actions"])},[t.infoTooltip?(o.openBlock(),o.createBlock(o.unref(Li),{key:0,id:"wizard-info-tooltip",placement:"top","show-delay":0,text:t.infoTooltip},{default:o.withCtx(()=>[o.createVNode(o.unref(Ln),{color:"secondary","left-icon-name":"agent-info",size:"small",variant:"ghost","aria-label":jO,"icon-size":24})]),_:1},8,["text"])):o.createCommentVNode("",!0),t.infoTooltip&&t.showClose?(o.openBlock(),o.createElementBlock("span",{key:1,class:o.normalizeClass(o.unref(co)["wizard-header__divider"])},null,2)):o.createCommentVNode("",!0),t.showClose?(o.openBlock(),o.createBlock(o.unref(Ln),{key:2,color:"secondary","left-icon-name":"agent-close",size:"small",variant:"ghost","aria-label":t.closeLabel,"icon-size":24,onClick:a[0]||(a[0]=u=>r("close"))},null,8,["aria-label"])):o.createCommentVNode("",!0)],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(co)["wizard-header__divider-line"])},null,2)],2))}}),U9={"ask-wizard":"_ask-wizard_f0a9y_36","ask-wizard__body":"_ask-wizard__body_f0a9y_50"},UO="↑↓ to navigate options.<br>Home/End to jump first/last.<br>↵ to select and continue.",ri="__ask_user_custom__",WO=160,HO=o.defineComponent({__name:"InAskUserWizard",props:{steps:{},submitLabel:{default:"Submit"},nextLabel:{default:"Next"},backLabel:{default:"Back"},skipLabel:{default:"Skip"},customPlaceholder:{default:"Enter your answer…"},infoTooltip:{default:UO},closeLabel:{default:"Close"}},emits:["submit","close"],setup(n,{emit:e}){var Pe;const t=n,r=e,i=["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Home","End"],a={id:"",question:"",options:[]};let u=null;const s=o.ref(null),f=`ask-wizard-${((Pe=o.getCurrentInstance())==null?void 0:Pe.uid)??0}`,p=o.inject("inAgentConversationRoot",o.ref(null)),d=o.ref(0),m=o.ref(-1),g=o.ref(!1),_=o.ref(!1),R=o.ref({}),A=o.computed(()=>t.steps[d.value]??a),b=o.computed(()=>d.value>=t.steps.length-1),y=o.computed(()=>R.value[A.value.id]??{selected:[],custom:""}),v=o.computed(()=>!!A.value.allowCustom&&A.value.variant!=="card"),E=o.computed(()=>{const ke=y.value;return ke.selected.length>0||ke.custom.trim().length>0}),w=o.computed(()=>y.value.selected[0]??null),k=o.computed(()=>A.value.required===!0),D=o.computed(()=>!k.value||E.value),C=o.computed(()=>{const ke=A.value.options.map(Te=>Te.value);return v.value&&ke.push(ri),ke}),P=o.computed(()=>C.value[m.value]??null),U=o.computed(()=>g.value&&!_.value),Q=o.computed(()=>U.value&&P.value===ri),ue=o.computed(()=>!U.value||P.value===ri?null:P.value),H=o.computed(()=>A.value.multiSelect?y.value.selected:y.value.selected[0]??null);function se(ke,Te){R.value={...R.value,[ke]:{...Te}}}function M(){u!==null&&(clearTimeout(u),u=null)}function N(){!b.value&&D.value&&d.value++}function ne(ke){u===null&&(se(A.value.id,{selected:[ke],custom:""}),b.value||(u=setTimeout(()=>{u=null,N()},WO)))}function J(ke){const Te=y.value,Me=new Set(Te.selected);Me.has(ke)?Me.delete(ke):Me.add(ke),se(A.value.id,{selected:[...Me],custom:Te.custom})}function ee(ke){const Te=y.value,Me=A.value.multiSelect?Te.selected:[];se(A.value.id,{selected:Me,custom:ke})}function ce(ke){const Te=C.value.indexOf(ke);Te!==-1&&(m.value=Te)}function L(){M();const ke=C.value.indexOf(ri);ke!==-1&&(m.value=ke)}function X(){return s.value?Array.from(s.value.querySelectorAll('[role="option"]')):[]}function I(){var Te;const ke=(Te=s.value)==null?void 0:Te.querySelector('input:not([type="checkbox"])');ke==null||ke.focus()}function q(){var Te,Me;(Me=((Te=s.value)==null?void 0:Te.querySelector('[role="listbox"]'))??s.value)==null||Me.focus()}function F(){_.value=!0,o.nextTick(()=>{var ke,Te;(Te=(ke=s.value)==null?void 0:ke.querySelector("[data-wizard-footer-primary]"))==null||Te.focus()})}function z(){o.nextTick(()=>{var ke;(ke=X()[m.value])==null||ke.scrollIntoView({block:"nearest"})})}function re(ke){const Te=C.value.length;if(Te!==0){if(m.value===-1?m.value=ke>0?0:Te-1:m.value=(m.value+ke+Te)%Te,C.value[m.value]===ri){I();return}z()}}function ie(){g.value=!1,_.value=!1}function V(){const ke=y.value;if(ke.selected.length>0){m.value=C.value.indexOf(ke.selected[0]);return}const Te=A.value.options.length===0;if(v.value&&(ke.custom.trim().length>0||Te)){m.value=C.value.indexOf(ri);return}m.value=-1}function he(){d.value>0&&d.value--}function ve(){const ke=t.steps.map(Me=>{const nt=R.value[Me.id]??{selected:[],custom:""},cn=new Map(Me.options.map(Lt=>[Lt.value,Lt.label])),Nt=nt.selected.map(Lt=>cn.get(Lt)??Lt),rn=nt.custom.trim();return{questionId:Me.id,question:Me.question,selectedLabels:Nt,customText:rn.length>0?rn:void 0}});if(ke.every(Me=>Me.selectedLabels.length===0&&Me.customText===void 0)){r("close");return}r("submit",ke)}function W(){if(b.value){ve();return}N()}function ae(){if(b.value){ve();return}d.value++}function de(ke){return ke instanceof HTMLElement?ke.tagName==="INPUT"||ke.tagName==="TEXTAREA"||ke.isContentEditable:!1}function we(){const ke=P.value;if(!(ke===null||ke===ri)){if(A.value.multiSelect){J(ke);return}ne(ke)}}function Ee(){if(b.value){ve();return}N()}function Le(ke){const Te=P.value;if(Te===ri&&!de(ke.target)){ke.preventDefault(),I();return}ke.preventDefault(),Te!==null&&Te!==ri&&(y.value.selected.includes(Te)||(A.value.multiSelect?J(Te):ne(Te))),D.value&&Ee()}function ze(ke){var cn;const Te=ke.target instanceof HTMLElement?ke.target:null;if(!!!(Te&&((cn=s.value)!=null&&cn.contains(Te)))&&de(Te))return!1;const nt=p.value??s.value;return!Te||!nt||nt.contains(Te)}function Ge(){var Te;const ke=(Te=s.value)==null?void 0:Te.querySelector('input:not([type="checkbox"])');ke==null||ke.blur(),g.value=!0,m.value=Math.max(0,C.value.indexOf(ri)-1),q()}function ge(ke){if(!ze(ke))return;const Te=de(ke.target);if(_.value){ke.key==="ArrowUp"&&(ke.preventDefault(),_.value=!1,g.value=!0,m.value=C.value.length-1,q());return}if(ke.key==="Enter"){if(ke.target instanceof HTMLTextAreaElement)return;Le(ke);return}if(ke.key==="Escape"&&Te){ke.preventDefault(),Ge();return}if(ke.key==="ArrowUp"&&Te){ke.preventDefault(),Ge();return}if(ke.key==="ArrowDown"&&Te&&ze(ke)){ke.preventDefault(),ke.target.blur(),g.value=!0,m.value=0,q(),z();return}if(!Te){if(ke.key===" "){ke.preventDefault(),we();return}if(i.includes(ke.key)){if(!g.value){ke.preventDefault(),g.value=!0,m.value=0,z();return}switch(ke.key){case"ArrowDown":ke.preventDefault(),m.value>=C.value.length-1?F():re(1);break;case"ArrowUp":ke.preventDefault(),re(-1);break;case"ArrowLeft":ke.preventDefault(),re(-1);break;case"ArrowRight":ke.preventDefault(),re(1);break;case"Home":ke.preventDefault(),m.value=0,z();break;case"End":{ke.preventDefault();const Me=C.value[C.value.length-1]===ri?C.value.length-2:C.value.length-1;m.value=Math.max(Me,0),z();break}}}}}const et=o.computed(()=>t.steps.map(ke=>ke.id).join("|"));return o.watch(et,()=>{M();const ke={};t.steps.forEach(Te=>{ke[Te.id]={selected:[],custom:""}}),R.value=ke,d.value=0,V()},{immediate:!0}),o.watch(d,()=>{if(M(),_.value=!1,V(),A.value.options.length===0&&v.value){o.nextTick(I);return}o.nextTick(q)}),o.watch(m,z),o.onMounted(()=>{document.addEventListener("keydown",ge),o.nextTick(q)}),o.onBeforeUnmount(()=>{M(),document.removeEventListener("keydown",ge)}),(ke,Te)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"wizardRoot",ref:s,tabindex:"-1",class:o.normalizeClass(o.unref(U9)["ask-wizard"]),onMousemove:ie},[o.createVNode(Pg,{"close-label":t.closeLabel,"info-tooltip":t.infoTooltip,title:A.value.question,onClose:Te[0]||(Te[0]=Me=>r("close"))},null,8,["close-label","info-tooltip","title"]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(U9)["ask-wizard__body"])},[A.value.variant==="card"?(o.openBlock(),o.createBlock(o.unref(Vg),{key:A.value.id,"model-value":H.value,multiple:!!A.value.multiSelect,options:A.value.options,onSelect:ne,onToggle:J},null,8,["model-value","multiple","options"])):A.value.multiSelect?(o.openBlock(),o.createBlock(o.unref(qg),{key:A.value.id,"allow-custom":!!A.value.allowCustom,"custom-highlighted":Q.value,"custom-placeholder":t.customPlaceholder,"custom-value":y.value.custom,"highlighted-value":ue.value,"input-id":f,"model-value":y.value.selected,options:A.value.options,onCustomFocus:L,onCustomInput:ee,onOptionFocus:ce,onToggle:J},null,8,["allow-custom","custom-highlighted","custom-placeholder","custom-value","highlighted-value","model-value","options"])):(o.openBlock(),o.createBlock(o.unref(Mg),{key:A.value.id,"allow-custom":!!A.value.allowCustom,"custom-highlighted":Q.value,"custom-placeholder":t.customPlaceholder,"custom-value":y.value.custom,"highlighted-value":ue.value,"input-id":f,"model-value":w.value,options:A.value.options,onCustomFocus:L,onCustomInput:ee,onOptionFocus:ce,onSelect:ne},null,8,["allow-custom","custom-highlighted","custom-placeholder","custom-value","highlighted-value","model-value","options"]))],2),o.createVNode(Ng,{"back-label":t.backLabel,"can-continue":E.value,"can-go-back":d.value>0,"can-submit":E.value,"current-step":d.value,"is-last-step":b.value,"is-required":k.value,"next-label":t.nextLabel,"skip-label":t.skipLabel,"submit-label":t.submitLabel,"total-steps":ke.steps.length,onBack:he,onNext:N,onSkip:ae,onSubmit:W},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))}}),Ti={"single-select":"_single-select_15an0_36","single-select__options":"_single-select__options_15an0_42","single-select__item":"_single-select__item_15an0_51","single-select__item--focused":"_single-select__item--focused_15an0_66","single-select__label":"_single-select__label_15an0_75","single-select__item--selected":"_single-select__item--selected_15an0_78","single-select__description":"_single-select__description_15an0_101","single-select__custom":"_single-select__custom_15an0_109","single-select__custom--focused":"_single-select__custom--focused_15an0_112","single-select__custom--selected":"_single-select__custom--selected_15an0_116"},GO=["aria-activedescendant"],YO=["id","aria-selected","onClick","onFocusin"],Mg=o.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=o.computed(()=>{if(t.customHighlighted)return t.inputId;if(t.highlightedValue)return`${t.inputId}-option-${t.highlightedValue}`}),i=e,a=o.ref(t.modelValue),u=o.ref(t.customValue);o.watch(()=>t.modelValue,d=>{a.value=d}),o.watch(()=>t.customValue,d=>{u.value=d});const s=o.computed(()=>a.value===null&&u.value.trim().length>0);function f(d){a.value=d,i("update:modelValue",d),i("select",d)}function p(d){const m=String(d);u.value=m,a.value=null,i("update:modelValue",null),i("update:customValue",m),i("custom-input",m)}return(d,m)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ti)["single-select"])},[o.createElementVNode("div",{role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:o.normalizeClass(o.unref(Ti)["single-select__options"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.options,g=>(o.openBlock(),o.createElementBlock("div",{id:`${d.inputId}-option-${g.value}`,key:g.value,role:"option","aria-selected":a.value===g.value,class:o.normalizeClass([o.unref(Ti)["single-select__item"],{[o.unref(Ti)["single-select__item--selected"]]:a.value===g.value,[o.unref(Ti)["single-select__item--focused"]]:g.value===d.highlightedValue}]),onClick:_=>f(g.value),onFocusin:_=>i("option-focus",g.value)},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ti)["single-select__label"])},o.toDisplayString(g.label),3),g.description?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Ti)["single-select__description"])},o.toDisplayString(g.description),3)):o.createCommentVNode("",!0)],42,YO))),128)),d.allowCustom?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Ti)["single-select__custom"],{[o.unref(Ti)["single-select__custom--selected"]]:s.value,[o.unref(Ti)["single-select__custom--focused"]]:d.customHighlighted}]),onFocusin:m[0]||(m[0]=g=>i("custom-focus"))},[o.createVNode(o.unref(Ks),{id:d.inputId,theme:"grey","helper-message-status":!1,"label-status":!1,"model-value":u.value,name:d.inputId,"placeholder-text":d.customPlaceholder,"prevent-xss":!1,onInput:p},null,8,["id","model-value","name","placeholder-text"])],34)):o.createCommentVNode("",!0)],10,GO)],2))}}),er={"multi-select":"_multi-select_fgdcq_36","multi-select__options":"_multi-select__options_fgdcq_42","multi-select__item":"_multi-select__item_fgdcq_51","multi-select__item--focused":"_multi-select__item--focused_fgdcq_67","multi-select__item--selected":"_multi-select__item--selected_fgdcq_71","multi-select__box":"_multi-select__box_fgdcq_83","multi-select__box--checked":"_multi-select__box--checked_fgdcq_96","multi-select__label":"_multi-select__label_fgdcq_104","multi-select__custom":"_multi-select__custom_fgdcq_112","multi-select__custom--focused":"_multi-select__custom--focused_fgdcq_130","multi-select__custom--selected":"_multi-select__custom--selected_fgdcq_134","multi-select__custom-input":"_multi-select__custom-input_fgdcq_146"},KO=["aria-activedescendant"],XO=["id","aria-selected","onClick","onFocusin"],qg=o.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=o.computed(()=>{if(t.customHighlighted)return t.inputId;if(t.highlightedValue)return`${t.inputId}-option-${t.highlightedValue}`}),i=e,a=o.ref([...t.modelValue]),u=o.ref(t.customValue);o.watch(()=>t.modelValue,_=>{a.value=[..._]}),o.watch(()=>t.customValue,_=>{u.value=_});const s=o.computed(()=>u.value.trim().length>0);function f(_){return a.value.includes(_)}function p(_){const R=new Set(a.value);R.has(_)?R.delete(_):R.add(_),a.value=[...R],i("update:modelValue",a.value),i("toggle",_)}const d=o.ref(null);function m(){var _,R;(R=(_=d.value)==null?void 0:_.querySelector("input"))==null||R.focus()}function g(_){const R=String(_);u.value=R,i("update:customValue",R),i("custom-input",R)}return(_,R)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(er)["multi-select"])},[o.createElementVNode("div",{"aria-multiselectable":"true",role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:o.normalizeClass(o.unref(er)["multi-select__options"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(_.options,A=>(o.openBlock(),o.createElementBlock("div",{id:`${_.inputId}-option-${A.value}`,key:A.value,role:"option","aria-selected":f(A.value),class:o.normalizeClass([o.unref(er)["multi-select__item"],{[o.unref(er)["multi-select__item--selected"]]:f(A.value),[o.unref(er)["multi-select__item--focused"]]:A.value===_.highlightedValue}]),onClick:b=>p(A.value),onFocusin:b=>i("option-focus",A.value)},[o.createElementVNode("span",{class:o.normalizeClass([o.unref(er)["multi-select__box"],{[o.unref(er)["multi-select__box--checked"]]:f(A.value)}])},[f(A.value)?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,color:"#ffffff",name:"line-check-natural",size:16})):o.createCommentVNode("",!0)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(er)["multi-select__label"])},o.toDisplayString(A.label),3)],42,XO))),128)),_.allowCustom?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"customRow",ref:d,class:o.normalizeClass([o.unref(er)["multi-select__custom"],{[o.unref(er)["multi-select__custom--selected"]]:s.value,[o.unref(er)["multi-select__custom--focused"]]:_.customHighlighted}]),onClick:m,onFocusin:R[0]||(R[0]=A=>i("custom-focus"))},[o.createElementVNode("span",{class:o.normalizeClass([o.unref(er)["multi-select__box"],{[o.unref(er)["multi-select__box--checked"]]:s.value}])},[s.value?(o.openBlock(),o.createBlock(o.unref(Ue),{key:0,color:"#ffffff",name:"line-check-natural",size:16})):o.createCommentVNode("",!0)],2),o.createVNode(o.unref(Ks),{id:_.inputId,theme:"grey",class:o.normalizeClass(o.unref(er)["multi-select__custom-input"]),"helper-message-status":!1,"label-status":!1,"model-value":u.value,name:_.inputId,"placeholder-text":_.customPlaceholder,"prevent-xss":!1,onInput:g},null,8,["id","class","model-value","name","placeholder-text"])],34)):o.createCommentVNode("",!0)],10,KO)],2))}}),Ns={"card-select":"_card-select_hjw0j_36","card-select__card":"_card-select__card_hjw0j_42","card-select__card--selected":"_card-select__card--selected_hjw0j_58","card-select__thumb":"_card-select__thumb_hjw0j_63","card-select__image":"_card-select__image_hjw0j_74","card-select__placeholder":"_card-select__placeholder_hjw0j_81","card-select__label":"_card-select__label_hjw0j_94","card-select__description":"_card-select__description_hjw0j_102"},ZO=["aria-selected","onClick","onKeydown"],JO=["alt","src"],Vg=o.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 i(d){return d==null?[]:Array.isArray(d)?[...d]:[d]}const a=o.ref(i(t.modelValue));o.watch(()=>t.modelValue,d=>{a.value=i(d)});const u=o.computed(()=>({gridTemplateColumns:`repeat(${t.columns}, minmax(0, 1fr))`}));function s(d){return a.value.includes(d)}function f(d){if(t.multiple){const m=new Set(a.value);m.has(d)?m.delete(d):m.add(d),a.value=[...m],r("update:modelValue",a.value),r("toggle",d);return}a.value=[d],r("update:modelValue",d),r("select",d)}function p(d){return(d.label||d.value).charAt(0).toUpperCase()}return(d,m)=>(o.openBlock(),o.createElementBlock("div",{role:"listbox",class:o.normalizeClass(o.unref(Ns)["card-select"]),style:o.normalizeStyle(u.value)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.options,g=>(o.openBlock(),o.createElementBlock("div",{key:g.value,role:"option",tabindex:"0","aria-selected":s(g.value),class:o.normalizeClass([o.unref(Ns)["card-select__card"],{[o.unref(Ns)["card-select__card--selected"]]:s(g.value)}]),onClick:_=>f(g.value),onKeydown:[o.withKeys(o.withModifiers(_=>f(g.value),["prevent"]),["enter"]),o.withKeys(o.withModifiers(_=>f(g.value),["prevent"]),["space"])]},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ns)["card-select__thumb"])},[g.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:g.label,class:o.normalizeClass(o.unref(Ns)["card-select__image"]),src:g.imageUrl},null,10,JO)):o.renderSlot(d.$slots,"thumb",{key:1,option:g},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ns)["card-select__placeholder"])},o.toDisplayString(p(g)),3)])],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ns)["card-select__label"])},o.toDisplayString(g.label),3),g.description?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Ns)["card-select__description"])},o.toDisplayString(g.description),3)):o.createCommentVNode("",!0)],42,ZO))),128))],6))}});var ps=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function QO(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function eN(n){if(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 i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var mu={},E1={exports:{}};/**
159
159
  * @license