@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.
- package/dist/ab-components.cjs.js +1 -1
- package/dist/ab-components.css +1 -1
- package/dist/ab-components.es.js +1 -1
- package/dist/ab-components.iife.js +1 -1
- package/dist/ab-components.umd.js +1 -1
- package/dist/{index-GvgC4ZTw.js → index-oZwBDxOZ.js} +19 -19
- package/dist/{index-GvgC4ZTw.js.map → index-oZwBDxOZ.js.map} +1 -1
- package/dist/{liquid-d6aMIQ9k.js → liquid-35X9kzyO.js} +2 -2
- package/dist/{liquid-d6aMIQ9k.js.map → liquid-35X9kzyO.js.map} +1 -1
- package/package.json +1 -1
|
@@ -153,7 +153,7 @@ From `+this.originalError.stack)}static is(e){return(e==null?void 0:e[D7])==="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()&Ja;)++this.p}};class qA{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)||fa(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 S3{constructor(e){this.token=e}}class Gt extends S3{constructor(e,t,r){super(e),this.name=e.name,this.liquid=r,this.tokenizer=e.tokenizer}}class to{constructor(e,t){this.hash={};const r=e instanceof Zr?e:new Zr(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 VA(n){return class extends Gt{constructor(e,t,r){super(e,t,r),an(n.parse)&&n.parse.call(this,e,t)}*render(e,t){const r=yield new to(this.token.args,e.opts.keyValueSeparator).render(e);return yield n.render.call(this,e,t,r)}}}function t8(n){return En(n)}class n8{constructor(e,t,r){this.token=e,this.name=e.name,this.handler=an(t)?t:an(t==null?void 0:t.handler)?t.handler:S7,this.raw=!an(t)&&!!(t!=null&&t.raw),this.args=e.args,this.liquid=r}*render(e,t){const r=[];for(const i of this.args)t8(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 or{constructor(e,t){this.filters=[];const r=typeof e=="string"?new Zr(e,t.options.operators).readFilteredValue():e;this.initial=r.initial,this.filters=r.filters.map(i=>new n8(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 Bn(r||!e.options.strictFilters,()=>`undefined filter: ${t}`),r}}class zA extends S3{constructor(e,t){var r;super(e);const i=new Zr(e.input,t.options.operators,e.file,e.contentRange);this.value=new or(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 G7(toString.call(u),[],"",0,0);a.push(new n8(s,u,t))}}*render(e,t){const r=yield this.value.value(e,!1);t.write(r)}*arguments(){yield this.value}}class jA extends S3{constructor(e){super(e),this.str=e.getContent()}*render(e,t){t.write(this.str)}}class ua{constructor(e,t){this.segments=e,this.location=t}toString(){return D4(this.segments,!0)}toArray(){function*e(...t){for(const r of t)r instanceof ua?yield Array.from(e(...r.segments)):yield r}return Array.from(e(...this.segments))}}class D3{constructor(){this.map=new Map}get(e){const t=D4([e.segments[0]]);return this.map.has(t)||this.map.set(t,[]),this.map.get(t)}has(e){return this.map.has(D4([e.segments[0]]))}push(e){this.get(e).push(e)}asObject(){return Object.fromEntries(this.map)}}const r8={partials:!0};function*i8(n,e,t){const r=new D3,i=new D3,a=new D3,u=new s8(new Set),s=new Set;function f(d,m){r.push(d);const g=m.alias(d);if(g!==void 0){const w=g.segments[0];ot(w)&&!u.has(w)&&i.push(g)}else{const w=d.segments[0];ot(w)&&!m.has(w)&&i.push(d)}for(const w of d.segments)w instanceof ua&&f(w,m)}function*p(d,m){if(d.arguments)for(const g of d.arguments())for(const w of a8(g))f(w,m);if(d.localScope)for(const g of d.localScope()){m.add(g.content),m.deleteAlias(g.content);const[w,R]=g.getPosition();a.push(new ua([g.content],{row:w,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 w=new Set,R=g.isolated?new s8(w):m.push(w);for(const A of g.scope)if(ot(A))w.add(A);else{const[_,y]=A;w.add(_);const b=Array.from(a8(y));b.length&&R.setAlias(_,b[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 ks(n,e={}){const t=Object.assign(Object.assign({},r8),e);return Ui(i8(n,t.partials,!1))}function Cs(n,e={}){const t=Object.assign(Object.assign({},r8),e);return Wi(i8(n,t.partials,!0))}class s8{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 ua([...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*a8(n){lr(n)?yield*no(n):n instanceof or&&(yield*UA(n))}function*UA(n){for(const e of n.initial.postfix)lr(e)&&(yield*no(e));for(const e of n.filters)for(const t of e.args)t8(t)&&t[1]?yield*no(t[1]):lr(t)&&(yield*no(t))}function*no(n){f8(n)?(yield*no(n.lhs),yield*no(n.rhs)):x4(n)&&(yield x3(n))}function x3(n){const e=[];let t=n.file;const r=n.props[0];t=t||r.file,R3(r)||u8(r)||c8(r)?e.push(r.content):x4(r)&&e.push(...x3(r).segments);for(const u of n.props.slice(1))t=t||u.file,R3(u)||u8(u)||c8(u)?e.push(u.content):x4(u)&&e.push(x3(u));const[i,a]=n.getPosition();return new ua(e,{row:i,col:a,file:t})}const o8=/^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;function D4(n,e=!1){const t=[],r=n[0];ot(r)&&(!e||r.match(o8)?t.push(`${r}`):t.push(`['${r}']`));for(const i of n.slice(1))i instanceof ua?t.push(`[${D4(i.segments)}]`):ot(i)?i.match(o8)?t.push(`.${i}`):t.push(`['${i}']`):t.push(`[${i}]`);return t.join("")}var ro;(function(n){n.Partials="partials",n.Layouts="layouts",n.Root="root"})(ro||(ro={}));class WA{constructor(e){var t,r,i,a;if(this.options=e,e.relativeReference){const s=e.fs.sep;Bn(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=_3(((t=u.contains)===null||t===void 0?void 0:t.bind(u))||(()=>Pt(this,void 0,void 0,function*(){return!0})),((r=u.containsSync)===null||r===void 0?void 0:r.bind(u))||(()=>!0)),this.exists=_3(((i=u.exists)===null||i===void 0?void 0:i.bind(u))||(()=>Pt(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 Bn(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 ca=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 WA(this.liquid.options),this.parseLimit=new E3("parse length",e.options.parseLimit),this.readFile=_3(((t=this.fs.readFile)===null||t===void 0?void 0:t.bind(this.fs))||(()=>Pt(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 Zr(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 x7(i);return r}parseToken(e,t){try{if(fa(e)){const r=this.liquid.tags[e.name];return Bn(r,`tag "${e.name}" not found`),new r(e,t,this.liquid,this)}return GA(e)?new zA(e,this.liquid):new jA(e)}catch(r){throw oa.is(r)?r:new vv(r,e)}}parseStream(e){return new qA(e,(t,r)=>this.parseToken(t,r))}*_parseFileCached(e,t,r=ro.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:Ui(f);a.write(u,p);try{return yield p}catch(d){throw a.remove(u),d}}*_parseFile(e,t,r=ro.Root,i){const a=yield this.loader.lookup(e,r,t,i);return this.parse(yield this.readFile(!!t,a),a)}};var Bt;(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"})(Bt||(Bt={}));function HA(n){return!!(Jr(n)&Bt.Delimited)}function l8(n){return Jr(n)===Bt.Operator}function T3(n){return Jr(n)===Bt.HTML}function GA(n){return Jr(n)===Bt.Output}function fa(n){return Jr(n)===Bt.Tag}function R3(n){return Jr(n)===Bt.Quoted}function u8(n){return Jr(n)===Bt.Number}function x4(n){return Jr(n)===Bt.PropertyAccess}function c8(n){return Jr(n)===Bt.Word}function f8(n){return Jr(n)===Bt.Range}function lr(n){return(Jr(n)&1667)>0}function Jr(n){return n?n.kind:-1}function Ss(n){const e=Object.create(null);return n&&Object.assign(e,n),e}let Qo=class Tb{constructor(e={},t=eo,r={},{memoryLimit:i,renderLimit:a}={}){var u,s,f,p,d;this.scopes=[Ss()],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=y4(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 E3("memory alloc",(p=r.memoryLimit)!==null&&p!==void 0?p:t.memoryLimit),this.renderLimit=a??new E3("template render",k3().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)=>v4(e,t),{})}get(e){return this.getSync(e)}getSync(e){return Wi(this._get(e))}*_get(e){const t=this.findScope(e[0]);return yield this._getFromScope(t,e)}getFromScope(e,t){return Wi(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&&hv(e))throw new Cv(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 Tb(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=w7(e),t=mt(t),Kt(e))return e;if(En(e)&&t<0)return e[e.length+ +t];const r=YA(e,t,this.ownPropertyOnly);return r===void 0&&e instanceof aa?e.liquidMethodMissing(t,this):an(r)?r.call(e):t==="size"?ZA(e):t==="first"?KA(e):t==="last"?XA(e):r}};function YA(n,e,t){if(!(t&&!m3.call(n,e)&&!(n instanceof aa)))return n[e]}function KA(n){return En(n)?n[0]:n.first}function XA(n){return En(n)?n[n.length-1]:n.last}function ZA(n){if(m3.call(n,"size")||n.size!==void 0)return n.size;if(En(n)||ot(n))return n.length;if(typeof n=="object")return Object.keys(n).length}var da;(function(n){n[n.OUTPUT=0]="OUTPUT",n[n.STORE=1]="STORE"})(da||(da={}));const JA=Ci(Math.abs),QA=Ci(Math.max),ek=Ci(Math.min),tk=Ci(Math.ceil),nk=Ci((n,e,t=!1)=>t?Math.floor(n/e):n/e),rk=Ci(Math.floor),ik=Ci((n,e)=>n-e),sk=Ci((n,e)=>n+e),ak=Ci((n,e)=>n%e),ok=Ci((n,e)=>n*e);function lk(n,e=0){n=g3(n),e=g3(e);const t=Math.pow(10,e),r=n*t*(1+Number.EPSILON);return Math.round(r)/t}var uk=Object.freeze({__proto__:null,abs:JA,at_least:QA,at_most:ek,ceil:tk,divided_by:nk,floor:rk,minus:ik,plus:sk,modulo:ak,times:ok,round:lk});const ck=n=>decodeURIComponent(Ne(n)).replace(/\+/g," "),fk=n=>encodeURIComponent(Ne(n)).replace(/%20/g,"+"),dk=n=>encodeURIComponent(Ne(n)).replace(/%20/g,"+").replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()),pk=n=>encodeURI(Ne(n)).replace(/%5B/g,"[").replace(/%5D/g,"]"),d8=/[^\p{M}\p{L}\p{Nd}]+/ug,hk={raw:/\s+/g,default:d8,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/ug,ascii:/[^A-Za-z0-9]+/g,latin:d8,none:null};function mk(n,e="default",t=!1){n=Ne(n);const r=hk[e];return r&&(e==="latin"&&(n=gk(n)),n=n.replace(r,"-").replace(/^-|-$/g,"")),t?n:n.toLowerCase()}function gk(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 yk=Object.freeze({__proto__:null,url_decode:ck,url_encode:fk,cgi_escape:dk,uri_escape:pk,slugify:mk});const bk=b4(function(n,e){const t=$n(n),r=Kt(e)?" ":Ne(e),i=t.length*(1+r.length);return this.context.memoryLimit.use(i),t.join(r)}),_k=b4(n=>E7(n)?A7(n):""),wk=b4(n=>E7(n)?n[0]:""),Ek=b4(function(n){const e=$n(n);return this.context.memoryLimit.use(e.length),[...e].reverse()});function*p8(n,e,t){const r=[],i=$n(n);this.context.memoryLimit.use(i.length);for(const a of i)r.push([a,e?yield this.context._getFromScope(a,Ne(e).split("."),!1):a]);return r.sort((a,u)=>t(a[1],u[1])).map(a=>a[0])}function*vk(n,e){return yield*p8.call(this,n,e,_v)}function*Ak(n,e){return yield*p8.call(this,n,e,wv)}const kk=n=>n&&n.length||0;function*Ck(n,e){const t=[],r=$n(n);this.context.memoryLimit.use(r.length);for(const i of r)t.push(yield this.context._getFromScope(i,Ne(e),!1));return t}function*Sk(n,e){let t=0;const r=$n(n);for(const i of r){const a=Number(e?yield this.context._getFromScope(i,Ne(e),!1):i);t+=Number.isNaN(a)?0:a}return t}function Dk(n){const e=$n(n);return this.context.memoryLimit.use(e.length),e.filter(t=>!Kt(mt(t)))}function h8(n,e=[]){const t=$n(n),r=$n(e);return this.context.memoryLimit.use(t.length+r.length),t.concat(r)}function xk(n,e){return h8.call(this,n,[e])}function Tk(n,e){const t=$n(n);this.context.memoryLimit.use(t.length);const r=[...t];return r.unshift(e),r}function Rk(n){const e=$n(n);this.context.memoryLimit.use(e.length);const t=[...e];return t.pop(),t}function $k(n){const e=$n(n);this.context.memoryLimit.use(e.length);const t=[...e];return t.shift(),t}function Bk(n,e,t=1){return n=mt(n),Kt(n)?[]:(En(n)||(n=Ne(n)),e=e<0?n.length+e:e,this.context.memoryLimit.use(t),n.slice(e,e+t))}function m8(n){return this.context.opts.jekyllWhere?e=>Qa.is(n)?Hi(e,n):En(e)?mA(e,n):Hi(e,n):n===void 0?e=>la(e,this.context):e=>Hi(e,n)}function*g8(n,e,t,r){const i=[];e=$n(e),this.context.memoryLimit.use(e.length);const a=new Zr(Ne(t)).readScopeValue();for(const s of e)i.push(yield tn(a,this.context.spawn(s)));const u=m8.call(this,r);return e.filter((s,f)=>u(i[f])===n)}function*y8(n,e,t,r){const i=[],a=new or(Ne(r),this.liquid),u=$n(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*Fk(n,e,t){return yield*g8.call(this,!0,n,e,t)}function*Lk(n,e,t){return yield*g8.call(this,!1,n,e,t)}function*Ik(n,e,t){return yield*y8.call(this,!0,n,e,t)}function*Ok(n,e,t){return yield*y8.call(this,!1,n,e,t)}function*Nk(n,e){const t=new Map;n=Zo(n);const r=new Zr(Ne(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*Pk(n,e,t){const r=new Map,i=new or(Ne(t),this.liquid);n=Zo(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*$3(n,e,t){const r=new Zr(Ne(e)).readScopeValue(),i=$n(n),a=m8.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*B3(n,e,t){const r=new or(Ne(t),this.liquid),i=$n(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*Mk(n,e,t){return!!(yield*$3.call(this,n,e,t))}function*qk(n,e,t){return!!(yield*B3.call(this,n,e,t))}function*Vk(n,e,t){const r=yield*$3.call(this,n,e,t);return r?r[0]:void 0}function*zk(n,e,t){const r=yield*B3.call(this,n,e,t);return r?r[0]:void 0}function*jk(n,e,t){const r=yield*$3.call(this,n,e,t);return r?r[1]:void 0}function*Uk(n,e,t){const r=yield*B3.call(this,n,e,t);return r?r[1]:void 0}function Wk(n){return n=$n(n),this.context.memoryLimit.use(n.length),[...new Set(n)]}function Hk(n,e=1){if(n=mt(n),Kt(n))return[];En(n)||(n=Ne(n)),this.context.memoryLimit.use(n.length);const t=[...n].sort(()=>Math.random()-.5);return e===1?t[0]:t.slice(0,e)}var Gk=Object.freeze({__proto__:null,join:bk,last:_k,first:wk,reverse:Ek,sort:vk,sort_natural:Ak,size:kk,map:Ck,sum:Sk,compact:Dk,concat:h8,push:xk,unshift:Tk,pop:Rk,shift:$k,slice:Bk,where:Fk,reject:Lk,where_exp:Ik,reject_exp:Ok,group_by:Nk,group_by_exp:Pk,has:Mk,has_exp:qk,find_index:Vk,find_index_exp:zk,find:jk,find_exp:Uk,uniq:Wk,sample:Hk});function F3(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=_8(n,this.context.opts,t);return u?(e=mt(e),e=Kt(e)?this.context.opts.dateFormat:Ne(e),this.context.memoryLimit.use(e.length),A4(u,e,this.context.memoryLimit)):n}function Yk(n){return F3.call(this,n,"%Y-%m-%dT%H:%M:%S%:z")}function Kk(n){return F3.call(this,n,"%a, %d %b %Y %H:%M:%S %z")}function Xk(n,e,t){return b8.call(this,n,"%b",e,t)}function Zk(n,e,t){return b8.call(this,n,"%B",e,t)}function b8(n,e,t,r){const i=_8(n,this.context.opts);if(!i)return n;const a=this.context.memoryLimit;if(t==="ordinal"){const u=i.getDate();return r==="US"?A4(i,`${e} ${u}%q, %Y`,a):A4(i,`${u}%q ${e} %Y`,a)}return A4(i,`%d ${e} %Y`,a)}function _8(n,e,t){let r;const i=t??e.timezoneOffset,a=e.locale;if(n=mt(n),!Kt(n))return n==="now"||n==="today"?r=new Xr(Date.now(),a,i):g4(n)?r=new Xr(n*1e3,a,i):ot(n)?/^\d+$/.test(n)?r=new Xr(+n*1e3,a,i):e.preserveTimezones&&t===void 0?r=Xr.createDateFixedToTimezone(n,a):r=new Xr(n,a,i):r=new Xr(n,a,i),r.valid()?r:void 0}var Jk=Object.freeze({__proto__:null,date:F3,date_to_xmlschema:Yk,date_to_rfc822:Kk,date_to_string:Xk,date_to_long_string:Zk});const L3=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,w8=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;function Qk(n,e){Bn(arguments.length===2,"append expect 2 arguments");const t=Ne(n),r=Ne(e);return this.context.memoryLimit.use(t.length+r.length),t+r}function eC(n,e){Bn(arguments.length===2,"prepend expect 2 arguments");const t=Ne(n),r=Ne(e);return this.context.memoryLimit.use(t.length+r.length),r+t}function tC(n,e){const t=Ne(n);if(this.context.memoryLimit.use(t.length),e){e=Ne(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 nC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),e.toLowerCase()}function rC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),Ne(e).toUpperCase()}function iC(n,e){const t=Ne(n);return e=Ne(e),this.context.memoryLimit.use(t.length+e.length),t.split(e).join("")}function sC(n,e){const t=Ne(n);return e=Ne(e),this.context.memoryLimit.use(t.length+e.length),t.replace(e,"")}function aC(n,e){const t=Ne(n),r=Ne(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 oC(n,e){if(n=Ne(n),this.context.memoryLimit.use(n.length),e){e=Ne(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 lC(n,e){const t=Ne(n);this.context.memoryLimit.use(t.length);const r=t.split(Ne(e));for(;r.length&&r[r.length-1]==="";)r.pop();return r}function uC(n,e){const t=Ne(n);if(this.context.memoryLimit.use(t.length),e){const r=new Set(Ne(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 cC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")}function fC(n){return n=Ne(n),this.context.memoryLimit.use(n.length),n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()}function dC(n,e,t){const r=Ne(n);e=Ne(e),t=Ne(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 pC(n,e,t){const r=Ne(n);return e=Ne(e),t=Ne(t),this.context.memoryLimit.use(r.length+e.length+t.length),r.replace(e,()=>t)}function hC(n,e,t){const r=Ne(n),i=Ne(e),a=Ne(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 mC(n,e=50,t="..."){const r=Ne(n);return t=Ne(t),this.context.memoryLimit.use(r.length+t.length),r.length<=e?n:r.substring(0,e-t.length)+t}function gC(n,e=15,t="..."){const r=Ne(n);t=Ne(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 yC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")}function bC(n,e){const t=Ne(n);if(this.context.memoryLimit.use(t.length),n=t.trim(),!n)return 0;switch(e){case"cjk":return(n.match(L3)||[]).length+(n.match(w8)||[]).length;case"auto":return L3.test(n)?n.match(L3).length+(n.match(w8)||[]).length:n.split(/\s+/).length;default:return n.split(/\s+/).length}}function _C(n,e="and"){switch(e=Ne(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 wC=Object.freeze({__proto__:null,append:Qk,prepend:eC,lstrip:tC,downcase:nC,upcase:rC,remove:iC,remove_first:sC,remove_last:aC,rstrip:oC,split:lC,strip:uC,strip_newlines:cC,capitalize:fC,replace:dC,replace_first:pC,replace_last:hC,truncate:mC,truncatewords:gC,normalize_whitespace:yC,number_of_words:bC,array_to_sentence_string:_C});function EC(n){return btoa(String.fromCharCode(...new TextEncoder().encode(n)))}function vC(n){return new TextDecoder().decode(Uint8Array.from(atob(n),e=>e.charCodeAt(0)))}function AC(n){if(typeof Buffer<"u"&&Buffer.isBuffer(n))return this.context.memoryLimit.use(n.byteLength),n.toString("base64");const e=Ne(n);return this.context.memoryLimit.use(e.length),EC(e)}function kC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),vC(e)}var CC=Object.freeze({__proto__:null,base64_encode:AC,base64_decode:kC});function E8(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 SC(n){return Pt(this,void 0,void 0,function*(){const e=new TextEncoder().encode(n),t=yield crypto.subtle.digest("SHA-256",e);return E8(t)})}function DC(n,e){return Pt(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 E8(i)})}function xC(n){const e=Ne(n);return this.context.memoryLimit.use(e.length),SC(e)}function TC(n,e){const t=Ne(n),r=Ne(e);return this.context.memoryLimit.use(t.length+r.length),DC(t,r)}var RC=Object.freeze({__proto__:null,sha256:xC,hmac_sha256:TC});const $C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},FA),uk),yk),Gk),Jk),wC),CC),RC),e8);class BC extends Gt{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 or(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 v8=["offset","limit","reversed"];class FC extends Gt{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 to(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=>{E4(d.args),f=this.elseTemplates}).on("tag:endfor",d=>{E4(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=Zo(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(Ss({continue:e.getRegister(a,{})}));const u=yield this.hash.render(e);e.pop(),i=(this.liquid.options.orderedFilterParameters?Object.keys(u).filter(p=>v8.includes(p)):v8.filter(p=>u[p]!==void 0)).reduce((p,d)=>d==="offset"?IC(p,u.offset):d==="limit"?OC(p,u.limit):LC(p),i),e.setRegister(a,(u.offset||0)+i.length);const f=Ss({forloop:new b3(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))lr(e)&&(yield e)}blockScope(){return[this.variable,"forloop"]}}function LC(n){return[...n].reverse()}function IC(n,e){return n.slice(e)}function OC(n,e){return n.slice(0,e)}class NC extends Gt{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(fa(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 PC extends Gt{constructor(e,t,r,i){super(e,t,r),this.branches=[],this.elseTemplates=[],this.value=new or(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=mt(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(Hi(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 MC extends Gt{constructor(e,t,r){for(super(e,t,r);t.length;){const i=t.shift();if(fa(i)&&i.name==="endcomment")return}throw new Error(`tag ${e.getText()} not closed`)}render(){}}class qC extends Gt{constructor(e,t,r,i){super(e,t,r);const a=this.tokenizer;for(this.file=I3(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 to(a,r.options.keyValueSeparator)}*render(e,t){const{liquid:r,hash:i}=this,a=yield O3(this.file,e,r);Bn(a,()=>`illegal file path "${a}"`);const u=e.spawn(),s=u.bottom();if(v4(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=Zo(yield tn(f,e));s.forloop=new b3(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))lr(e)&&(yield e);if(this.with){const{value:e}=this.with;lr(e)&&(yield e)}if(this.forBinding){const{value:e}=this.forBinding;lr(e)&&(yield e)}}}function I3(n,e,t){if(e.options.dynamicPartials){const a=n.readValue();if(n.assert(a,"illegal file path"),a.getText()==="none")return;if(R3(a)){const u=t.parse(cA(a));return A8(u)}return a}const r=[...n.readFileNameTemplate(e.options)],i=A8(t.parseTokens(r));return i==="none"?void 0:i}function A8(n){return n.length===1&&T3(n[0].token)?n[0].token.getContent():n}function*O3(n,e,t){return typeof n=="string"?n:Array.isArray(n)?t.renderer.renderTemplates(n,e):yield tn(n,e)}class VC extends Gt{constructor(e,t,r,i){super(e,t,r);const{tokenizer:a}=e;this.file=I3(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 to(a,r.options.jekyllInclude||r.options.keyValueSeparator)}*render(e,t){const{liquid:r,hash:i,withVar:a}=this,{renderer:u}=r,s=yield O3(this.file,e,r);Bn(s,()=>`illegal file path "${s}"`);const f=e.saveRegister("blocks","blockMode");e.setRegister("blocks",{}),e.setRegister("blockMode",da.OUTPUT);const p=Ss(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?Ss({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(lr),lr(this.file)&&(yield this.file),lr(this.withVar)&&(yield this.withVar)}}class zC extends Gt{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;g4(r[this.variable])||(r[this.variable]=0),t.write(Ne(--r[this.variable]))}*localScope(){yield this.identifier}}class jC extends Gt{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 UC extends Gt{constructor(e,t,r,i){super(e,t,r),this.branches=[];let a=[];i.parseStream(t).on("start",()=>this.branches.push({value:new or(e.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})).on("tag:elsif",u=>{Bn(!this.elseTemplates,"unexpected elsif after else"),this.branches.push({value:new or(u.tokenizer.readFilteredValue(),this.liquid),templates:a=[]})}).on("tag:else",u=>{E4(u.args),Bn(!this.elseTemplates,"duplicated else"),a=this.elseTemplates=[]}).on("tag:endif",function(u){E4(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(la(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 WC extends Gt{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;g4(r[this.variable])||(r[this.variable]=0);const i=r[this.variable];r[this.variable]++,t.write(Ne(i))}*localScope(){yield this.identifier}}class HC extends Gt{constructor(e,t,r,i){super(e,t,r),this.file=I3(this.tokenizer,this.liquid,i),this.currentFile=e.file,this.args=new to(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",da.OUTPUT),yield u.renderTemplates(this.templates,e,t);return}const s=yield O3(this.file,e,r);Bn(s,()=>`illegal file path "${s}"`);const f=yield r._parseLayoutFile(s,e.sync,this.currentFile);e.setRegister("blockMode",da.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",da.OUTPUT),e.push(Ss(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))lr(e)&&(yield e);lr(this.file)&&(yield this.file)}partialScope(){if(ot(this.file))return{name:this.file,isolated:!1,scope:Object.keys(this.args.hash)}}}class GC extends Gt{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(fa(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")===da.STORE?e.getRegister("blocks",{})[this.block]=r:yield r(new B7,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(Ss({block:s})),yield r.renderer.renderTemplates(i,e,f),e.pop(),p.pop()};return a?(s,f)=>a(new B7(p=>u(s,p)),f):u}*children(){return this.templates}blockScope(){return["block"]}}class YC extends Gt{constructor(e,t,r){for(super(e,t,r),this.tokens=[];t.length;){const i=t.shift();if(fa(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 KC extends b3{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 XC extends Gt{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 to(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=Zo(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 KC(r.length,s,this.collection.getText(),this.variable),d=Ss({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))lr(e)&&(yield e)}blockScope(){return[this.variable,"tablerowloop"]}}class ZC extends Gt{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 or(e.tokenizer.readFilteredValue(),this.liquid),test:k4,templates:a=[]})).on("tag:elsif",s=>{if(u>0){a=[];return}this.branches.push({value:new or(s.tokenizer.readFilteredValue(),this.liquid),test:la,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 JC extends Gt{render(e,t){e.breakCalled=!0}}class QC extends Gt{render(e,t){e.continueCalled=!0}}class eS extends Gt{constructor(e,t,r){super(e,t,r),this.tokenizer.skipBlank(),this.tokenizer.end()||(this.value=new or(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 tS extends Gt{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 nS extends Gt{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 rS={assign:BC,for:FC,capture:NC,case:PC,comment:MC,include:VC,render:qC,decrement:zC,increment:WC,cycle:jC,if:UC,layout:HC,block:GC,raw:YC,tablerow:XC,unless:ZC,break:JC,continue:QC,echo:eS,liquid:tS,"#":nS};class T4{constructor(e={}){this.renderer=new oA,this.filters=Object.create(null),this.tags=Object.create(null),this.options=IA(e),this.parser=new ca(this),v7(rS,(t,r)=>this.registerTag(r,t)),v7($C,(t,r)=>this.registerFilter(r,t))}parse(e,t){return new ca(this).parse(e,t)}_render(e,t,r){const i=t instanceof Qo?t:new Qo(t,this.options,r);return this.renderer.renderTemplates(e,i)}render(e,t,r){return Pt(this,void 0,void 0,function*(){return Ui(this._render(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}renderSync(e,t,r){return Wi(this._render(e,t,Object.assign(Object.assign({},r),{sync:!0})))}renderToNodeStream(e,t,r={}){const i=new Qo(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 Pt(this,void 0,void 0,function*(){return Ui(this._parseAndRender(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}parseAndRenderSync(e,t,r){return Wi(this._parseAndRender(e,t,Object.assign(Object.assign({},r),{sync:!0})))}_parsePartialFile(e,t,r){return new ca(this).parseFile(e,t,ro.Partials,r)}_parseLayoutFile(e,t,r){return new ca(this).parseFile(e,t,ro.Layouts,r)}_parseFile(e,t,r,i){return new ca(this).parseFile(e,t,r,i)}parseFile(e,t){return Pt(this,void 0,void 0,function*(){return Ui(new ca(this).parseFile(e,!1,t))})}parseFileSync(e,t){return Wi(new ca(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 Pt(this,void 0,void 0,function*(){return Ui(this._renderFile(e,t,Object.assign(Object.assign({},r),{sync:!1})))})}renderFileSync(e,t,r){return Wi(this._renderFile(e,t,Object.assign(Object.assign({},r),{sync:!0})))}renderFileToNodeStream(e,t,r){return Pt(this,void 0,void 0,function*(){const i=yield this.parseFile(e);return this.renderToNodeStream(i,t,r)})}_evalValue(e,t){const r=new or(e,this),i=t instanceof Qo?t:new Qo(t,this.options);return r.value(i)}evalValue(e,t){return Pt(this,void 0,void 0,function*(){return Ui(this._evalValue(e,t))})}evalValueSync(e,t){return Wi(this._evalValue(e,t))}registerFilter(e,t){this.filters[e]=t}registerTag(e,t){this.tags[e]=an(t)?t:VA(t)}plugin(e){return e.call(this,T4)}express(){const e=this;let t=!0;return function(r,i,a){if(t){t=!1;const u=S4(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 Pt(this,void 0,void 0,function*(){return ks(e,t)})}analyzeSync(e,t={}){return Cs(e,t)}parseAndAnalyze(e,t,r={}){return Pt(this,void 0,void 0,function*(){return ks(this.parse(e,t),r)})}parseAndAnalyzeSync(e,t,r={}){return Cs(this.parse(e,t),r)}variables(e,t={}){return Pt(this,void 0,void 0,function*(){const r=yield ks(ot(e)?this.parse(e):e,t);return Object.keys(r.variables)})}variablesSync(e,t={}){const r=Cs(ot(e)?this.parse(e):e,t);return Object.keys(r.variables)}fullVariables(e,t={}){return Pt(this,void 0,void 0,function*(){const r=yield ks(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=Cs(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 Pt(this,void 0,void 0,function*(){const r=yield ks(ot(e)?this.parse(e):e,t);return Array.from(_4(Object.values(r.variables).flatMap(i=>i.map(a=>a.toArray()))))})}variableSegmentsSync(e,t={}){const r=Cs(ot(e)?this.parse(e):e,t);return Array.from(_4(Object.values(r.variables).flatMap(i=>i.map(a=>a.toArray()))))}globalVariables(e,t={}){return Pt(this,void 0,void 0,function*(){const r=yield ks(ot(e)?this.parse(e):e,t);return Object.keys(r.globals)})}globalVariablesSync(e,t={}){const r=Cs(ot(e)?this.parse(e):e,t);return Object.keys(r.globals)}globalFullVariables(e,t={}){return Pt(this,void 0,void 0,function*(){const r=yield ks(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=Cs(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 Pt(this,void 0,void 0,function*(){const r=yield ks(ot(e)?this.parse(e):e,t);return Array.from(_4(Object.values(r.globals).flatMap(i=>i.map(a=>a.toArray()))))})}globalVariableSegmentsSync(e,t={}){const r=Cs(ot(e)?this.parse(e):e,t);return Array.from(_4(Object.values(r.globals).flatMap(i=>i.map(a=>a.toArray()))))}}const N3=new T4;function k8(n,e){const{globals:t}=N3.analyzeSync(N3.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 iS(n){const e=[0];for(let t=0;t<n.length;t++)n[t]===`
|
|
154
154
|
`&&e.push(t+1);return e}function sS(n){return new Zr(n).readTopLevelTokens(N3.options).filter(e=>e.kind===Bt.Output).map(e=>[e.begin,e.end])}function aS(n){if(!n||!n.trim())return[];try{const e=n.split(`
|
|
155
155
|
`);return[...new Set(k8(n,e).map(t=>t.key))]}catch{return[]}}function oS(n){if(!n||!n.trim())return[];try{const e=n.split(`
|
|
156
|
-
`),t=iS(n),r=sS(n),i=[];for(const a of k8(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 Gi={modalWrapper:"_modalWrapper_192bl_36",medium:"_medium_192bl_45",small:"_small_192bl_52",section:"_section_192bl_58",modal:"_modal_192bl_36",close:"_close_192bl_75",header:"_header_192bl_86",footer:"_footer_192bl_100",modalOverlay:"_modalOverlay_192bl_110"},lS="×",uS=Kn(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(Gi).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(Gi).modalWrapper,o.unref(Gi)[t.size]])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(Gi).modal,o.unref(Gi)[t.size]])},[o.createElementVNode("button",{class:o.normalizeClass(o.unref(Gi).close),onClick:a},o.toDisplayString(lS),2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).header)},[o.createElementVNode("p",null,o.toDisplayString(f.title),1)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).section)},[o.renderSlot(f.$slots,"section",{},void 0,!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).footer)},[o.createVNode(o.unref(Rn),{color:"secondary",variant:"text",label:t.cancelText,onClick:a},null,8,["label"]),o.createVNode(o.unref(Rn),{color:"primary",variant:"solid",label:t.submitText,onClick:u},null,8,["label"])],2)],2)],2),[[o.vShow,f.isOpen]])]),_:3})],64))}}),[["__scopeId","data-v-32c7610a"]]),Ds={wrapper__counter:"_wrapper__counter_808qv_1",wrapper__errorMessage:"_wrapper__errorMessage_808qv_1",wrapper__label:"_wrapper__label_808qv_1",wrapper__field:"_wrapper__field_808qv_8",wrapper:"_wrapper_808qv_1",wrapper__size_default:"_wrapper__size_default_808qv_52",wrapper__size_small:"_wrapper__size_small_808qv_55",wrapper__bottom:"_wrapper__bottom_808qv_94","wrapper--error":"_wrapper--error_808qv_107"},cS=["for"],fS=["id","max","maxlength","min","name","placeholder","value"],dS=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(Ds).wrapper,o.unref(Ds)[`wrapper__size_${s.size}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Ds).wrapper__label),for:s.id},o.toDisplayString(s.label),11,cS)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:s.id,type:"number",class:o.normalizeClass([o.unref(Ds).wrapper__field,{[o.unref(Ds)["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,fS),s.counter||s.error?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ds).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ds).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ds).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2)}}}),R4={container:"_container_14yt1_36",isMultiline:"_isMultiline_14yt1_47",container__text:"_container__text_14yt1_53",container__default:"_container__default_14yt1_58",container__warning:"_container__warning_14yt1_65",container__alert:"_container__alert_14yt1_72",container__success:"_container__success_14yt1_79"},pS=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(R4).container,o.unref(R4)[`container__${s.variant}`],i.value&&o.unref(R4).isMultiline])},[o.createVNode(Ue,{name:t.value,size:24},null,8,["name"]),o.createVNode(o.unref(Ka),{ref_key:"textRef",ref:r,variant:"detail",class:o.normalizeClass(o.unref(R4).container__text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.text),1)]),_:1},8,["class"])],2))}}),Mt={wrapper:"_wrapper_xi3pq_36","wrapper--horizontal":"_wrapper--horizontal_xi3pq_40",button:"_button_xi3pq_43","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:"_button__label_xi3pq_72",button__icon:"_button__icon_xi3pq_75","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"},hS=["data-mode","disabled","onClick"],mS=["data-mode","disabled","onClick"],gS=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(Mt).wrapper,o.unref(Mt)[`wrapper--${u.orientation}`],o.unref(Mt)[`wrapper--${u.size}`],{[o.unref(Mt)["wrapper--disabled"]]:u.disabled,[o.unref(Mt)["wrapper--icon-only"]]:u.iconOnly,[o.unref(Mt)["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(Ai),{key:0,id:`segment-tooltip-${f.value}-${p}`,text:f.tooltip},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Mt).button,{[o.unref(Mt)["button--selected"]]:f.value===i.value,[o.unref(Mt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(Mt)["button--first"]]:p===0,[o.unref(Mt)["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(Mt).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(Mt).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(Mt).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(Mt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,hS)]),_:2},1032,["id","text"])):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:o.normalizeClass([o.unref(Mt).button,{[o.unref(Mt)["button--selected"]]:f.value===i.value,[o.unref(Mt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(Mt)["button--first"]]:p===0,[o.unref(Mt)["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(Mt).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(Mt).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(Mt).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(Mt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,mS))],64))),128))],2))}}),Di={wrapper__counter:"_wrapper__counter_16ay0_1",wrapper__errorMessage:"_wrapper__errorMessage_16ay0_1",wrapper__label:"_wrapper__label_16ay0_1",wrapper__field:"_wrapper__field_16ay0_1",wrapper:"_wrapper_16ay0_1",wrapper__bottom:"_wrapper__bottom_16ay0_90","wrapper--error":"_wrapper--error_16ay0_103","wrapper--primary":"_wrapper--primary_16ay0_106","wrapper--smart":"_wrapper--smart_16ay0_114"},yS=["for"],bS=["id","maxlength","name","placeholder","value"],_S=["id","maxlength","name","placeholder","value"],wS=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(Di).wrapper,o.unref(Di)[`wrapper--${t.mode}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Di).wrapper__label),for:s.id},o.toDisplayString(s.label),11,yS)):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(Di).wrapper__field,{[o.unref(Di)["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,bS)):(o.openBlock(),o.createElementBlock("input",{key:2,id:s.id,type:"text",class:o.normalizeClass([o.unref(Di).wrapper__field,{[o.unref(Di)["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,_S)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Di).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Di).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)],2)}}}),e1={wrapper:"_wrapper_1hnht_36",wrapper__label:"_wrapper__label_1hnht_43",wrapper__input:"_wrapper__input_1hnht_67",wrapper_checked:"_wrapper_checked_1hnht_77",wrapper_disabled:"_wrapper_disabled_1hnht_84"},ES=["id","checked","disabled","name"],vS=["for"],AS=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(e1).wrapper,{[o.unref(e1).wrapper_checked]:a.checked,[o.unref(e1).wrapper_disabled]:a.disabled}])},[o.createElementVNode("input",{id:a.id,type:"checkbox",checked:a.checked,class:o.normalizeClass(o.unref(e1).wrapper__input),disabled:a.disabled,name:a.name,onClick:i},null,10,ES),o.createElementVNode("label",{class:o.normalizeClass(o.unref(e1).wrapper__label),for:a.id},null,10,vS)],2))}}),kS={class:"ab-toast__text"},CS=["aria-label"],SS=Kn(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",kS,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,CS)],2)):o.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-e00fa8e4"]]),xr={"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"},DS=["aria-label"],xS=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(xr)["agent-launcher"],{[o.unref(xr)["agent-launcher--expanded"]]:i.value}]),onClick:s[0]||(s[0]=f=>r("click"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(xr)["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(xr)["agent-launcher__halo"],o.unref(xr)["agent-launcher__halo--outer"]])},null,2),o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(xr)["agent-launcher__halo"],o.unref(xr)["agent-launcher__halo--inner"]])},null,2)],64)):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(o.unref(xr)["agent-launcher__badge"])},[o.createVNode(o.unref(Ue),{name:"agent-launcher-badge",class:o.normalizeClass(o.unref(xr)["agent-launcher__art"]),size:48},null,8,["class"]),o.createVNode(o.unref(Ue),{name:"agent-launcher-glyph",class:o.normalizeClass(o.unref(xr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),i.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(xr)["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(xr)["agent-launcher__expand"]),size:24},null,8,["class"])):o.createCommentVNode("",!0)],10,DS))}});function t1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const ur={"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"},TS=3*60*1e3,C8=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(t1()),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,w=0,R=!1;const A=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,_=()=>{g!==null&&clearTimeout(g),g=setTimeout(()=>{s.value=!0},TS)},y=()=>{const P=Date.now();P-w<1e3||(w=P,s.value=!1,_())},b=()=>{p.forEach(P=>{P.cx=P.el.offsetLeft+P.el.offsetWidth/2})},v=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)`})}))},E=()=>{R||typeof window>"u"||(R=!0,window.addEventListener("mousemove",v,{passive:!0}),t.forEach(P=>{window.addEventListener(P,y,{passive:!0})}),_())},k=()=>{!R||typeof window>"u"||(R=!1,window.removeEventListener("mousemove",v),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=t1(),a.value?k():E()};return o.watch(a,P=>{P?k():E()}),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})),b()),a.value||E(),A==null||A.addEventListener("change",C),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&P&&(m=new ResizeObserver(b),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(ur)["in-agent-background"],{[o.unref(ur)["in-agent-background--animated"]]:e.animated,[o.unref(ur)["in-agent-background--static"]]:a.value,[o.unref(ur)["in-agent-background--paused"]]:f.value}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__aurora"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__stage"])},[o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--pink"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--purple"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--blue"]])},null,2)],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__grain"])},null,2)],2))}}),cr={"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"},RS=["aria-label","title"],$S=["aria-label","title"],BS=["aria-label","title"],FS=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(cr)["in-agent-popup"])},[o.createElementVNode("header",{class:o.normalizeClass(o.unref(cr)["in-agent-popup__header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["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(cr)["in-agent-popup__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:a},[o.createVNode(o.unref(Ue),{name:"line-ai-message-reply-plus",size:24})],10,RS)):o.createCommentVNode("",!0),t.showAcademy?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:o.normalizeClass(o.unref(cr)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[o.createVNode(o.unref(Ue),{name:"agent-academy",size:24})],10,$S)):o.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(cr)["in-agent-popup__separator"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:o.normalizeClass(o.unref(cr)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:i},[o.createVNode(o.unref(Ue),{name:"line-minus-netural",size:24})],10,BS)])],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["in-agent-popup__surface"])},[t.showBackground?(o.openBlock(),o.createBlock(C8,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["in-agent-popup__footer"])},[o.renderSlot(s.$slots,"footer")],2)):o.createCommentVNode("",!0)],2)],2))}}),Vn={"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"},LS=["aria-pressed","onClick"],IS=["onClick"],OS=16,NS=.18,PS=.06,S8=260,D8="cubic-bezier(0.22, 1, 0.36, 1)",MS=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":`${NS+m*PS}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 w=m.scrollTop+(g.getBoundingClientRect().bottom-m.getBoundingClientRect().top),R=m.scrollTop+m.clientHeight-u.value,A=w+OS-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 w=f.value,R=(w==null?void 0:w.firstElementChild)??null,A=(R==null?void 0:R.firstElementChild)??null,_=(A==null?void 0:A.getBoundingClientRect().height)??0,y=(w==null?void 0:w.getBoundingClientRect().height)??0,b=m.getBoundingClientRect().height-y+_,v=g.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(v-b)/2)}px`};return o.watch(u,()=>d()),o.onMounted(()=>d()),o.watch(()=>t.selected,async m=>{const g=s.value,w=(g==null?void 0:g.getBoundingClientRect().top)??0;if(await o.nextTick(),!g)return;if(d(),t1()){p();return}const R=w-g.getBoundingClientRect().top,A=[];Math.abs(R)>1&&A.push(g.animate([{transform:`translateY(${R}px)`},{transform:"translateY(0)"}],{duration:S8,easing:D8}));const _=f.value;m&&_&&A.push(_.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:S8,easing:D8})),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(Vn)["agent-welcome"])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(Vn)["agent-welcome__intro"],o.unref(Vn)["agent-welcome__rise--1"]])},[t.greeting?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(Vn)["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(Vn)["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(Vn)["agent-welcome__categories"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.categories,(w,R)=>(o.openBlock(),o.createElementBlock("button",{key:w.value,type:"button","aria-pressed":t.selected===w.value,class:o.normalizeClass([o.unref(Vn)["agent-welcome__category"],o.unref(Vn)["agent-welcome__rise-item"],{[o.unref(Vn)["agent-welcome__category--selected"]]:t.selected===w.value}]),style:o.normalizeStyle(i(R)),onClick:A=>r("select",w.value)},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Vn)["agent-welcome__category-icon"]),name:w.icon,size:24},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Vn)["agent-welcome__category-label"])},o.toDisplayString(w.label),3)],14,LS))),128))],2)):o.createCommentVNode("",!0),t.quickActions.length>0?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Vn)["agent-welcome__quick-actions"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.quickActions,(w,R)=>(o.openBlock(),o.createElementBlock("button",{key:w.id,type:"button",class:o.normalizeClass([o.unref(Vn)["agent-welcome__quick-action"],o.unref(Vn)["agent-welcome__rise-item"]]),style:o.normalizeStyle(i(R)),onClick:A=>r("quick-action",w.prompt)},o.toDisplayString(w.label),15,IS))),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(Vn)["agent-welcome__cards"])},[o.renderSlot(m.$slots,"cards")],2)):o.createCommentVNode("",!0)],2))}}),xi={"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"},qS=["alt","src"],VS=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(xi)["in-blueprint-card"]),onClick:i,onKeydown:a},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__thumb"])},[t.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:t.title,class:o.normalizeClass(o.unref(xi)["in-blueprint-card__image"]),src:t.imageUrl},null,10,qS)):o.renderSlot(u.$slots,"thumb",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["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(xi)["in-blueprint-card__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__text"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__title"])},o.toDisplayString(t.title),3),t.subtitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(xi)["in-blueprint-card__subtitle"])},o.toDisplayString(t.subtitle),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__open"])},[o.createVNode(o.unref(Ue),{name:"line-external-link",size:16})],2)],2)],34))}}),Wt={"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"},zS=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],jS=["alt","src"],US=["aria-label","onClick"],WS=4,x8=20,T8=12,P3=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),w=o.ref(null),R=o.ref([]),A=o.ref(0),_=o.ref(x8),y=(C,P,U)=>Math.min(Math.max(C,P),Math.max(P,U)),b=(C,P)=>{C instanceof HTMLElement&&(R.value[P]=C)},v=C=>{i.value=C},E=C=>{i.value===C&&(i.value=-1)},k=()=>{const C=m.value,P=g.value,U=w.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,_.value=y(ue+x8-H,T8,U.offsetWidth-T8)},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(Wt)["agent-files-wrapper"])},[f.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:w,role:"tooltip",class:o.normalizeClass(o.unref(Wt)["agent-files__error-bubble"]),style:o.normalizeStyle({left:`${A.value}px`,"--agent-files-arrow-left":`${_.value}px`})},o.toDisplayString(f.value),7)):o.createCommentVNode("",!0),o.createElementVNode("span",{"aria-live":"polite",role:"status",class:o.normalizeClass(o.unref(Wt)["agent-files__announcer"])},o.toDisplayString(p.value),3),o.createElementVNode("div",{ref_key:"stripRef",ref:g,class:o.normalizeClass([o.unref(Wt)["agent-files"],{[o.unref(Wt)["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=>b(H,Q),"data-testid":"agent-file-card",class:o.normalizeClass([o.unref(Wt)["agent-files__card"],{[o.unref(Wt)["agent-files__card--error"]]:U.status==="error"}]),onClick:H=>r("open",U.id),onFocusin:H=>v(Q),onFocusout:H=>E(Q),onMouseenter:H=>v(Q),onMouseleave:H=>E(Q)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Wt)["agent-files__body"])},[U.status==="loading"?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([o.unref(Wt)["agent-files__thumb"],o.unref(Wt)["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(Wt)["agent-files__thumb"],o.unref(Wt)["agent-files__thumb--icon"],o.unref(Wt)["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(Wt)["agent-files__thumb"],o.unref(Wt)["agent-files__thumb--swatch"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.swatch.slice(0,WS),H=>(o.openBlock(),o.createElementBlock("span",{key:H,class:o.normalizeClass(o.unref(Wt)["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(Wt)["agent-files__thumb"]),src:U.thumbnailUrl},null,10,jS)):(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass([o.unref(Wt)["agent-files__thumb"],o.unref(Wt)["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(Wt)["agent-files__labels"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Wt)["agent-files__name"])},o.toDisplayString(U.name),3),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Wt)["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(Wt)["agent-files__remove"]),onClick:o.withModifiers(H=>r("remove",U.id),["stop"])},[o.createVNode(o.unref(Ue),{name:"chip-close-6",size:6})],10,US)):o.createCommentVNode("",!0)],2)],42,zS)}),128))],2)],2)):o.createCommentVNode("",!0)}}),Xt={"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"},io=[{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]}],HS=200,GS=4,YS=2600,M3=2,KS=6;function XS(n){const[e]=io,t=io[io.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<io.length-1;r+=1){const i=io[r],a=io[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 ZS(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 _=R.getBoundingClientRect(),y=_.width+M3*2,b=_.height+M3*2;if(!y||!b)return;A.setAttribute("viewBox",`0 0 ${y} ${b}`),A.setAttribute("width",String(y)),A.setAttribute("height",String(b));const v=1,E=Math.max(KS,1),k=y-v*2,D=b-v*2,C=k-2*E,P=D-2*E,U=Math.PI/2*E,Q=2*C+2*P+4*U;function ue(ce){let L=ce;if(L<=C)return{x:E+L,y:0};if(L-=C,L<=U){const I=-Math.PI/2+L/E;return{x:k-E+E*Math.cos(I),y:E+E*Math.sin(I)}}if(L-=U,L<=P)return{x:k,y:E+L};if(L-=P,L<=U){const I=L/E;return{x:k-E+E*Math.cos(I),y:D-E+E*Math.sin(I)}}if(L-=U,L<=C)return{x:k-E-L,y:D};if(L-=C,L<=U){const I=Math.PI/2+L/E;return{x:E+E*Math.cos(I),y:D-E+E*Math.sin(I)}}if(L-=U,L<=P)return{x:0,y:D-E-L};L-=P;const X=Math.PI+L/E;return{x:E+E*Math.cos(X),y:E+E*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/HS;let J=0;for(const ce of N){const L=ce.isArc?GS: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+v).toFixed(2)} ${(F.y+v).toFixed(2)}`,ie=`${(z.x+v).toFixed(2)} ${(z.y+v).toFixed(2)}`,V=document.createElementNS(H,"path");V.setAttribute("d",ce.isArc?`${re} A ${E} ${E} 0 0 1 ${ie}`:`${re} L ${ie}`),V.setAttribute("fill","none"),V.setAttribute("stroke","transparent"),V.setAttribute("stroke-width",String(M3)),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 _=((i[A]-R)%1+1)%1,[y,b,v,E]=XS(_);a[A].setAttribute("stroke",`rgba(${y},${b},${v},${E})`)}}function m(R){s===null&&(s=R),d((R-s)/YS%1),u=requestAnimationFrame(m)}function g(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),t1()?d(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!f&&(f=new ResizeObserver(()=>{r.value&&(p(),t1()&&d(0))}),f.observe(e.value)))}function w(){u!==null&&(cancelAnimationFrame(u),u=null),f==null||f.disconnect(),f=null}o.watch(r,R=>{R?g():w()}),o.onMounted(()=>{r.value&&g()}),o.onBeforeUnmount(w)}const JS=["disabled","placeholder","onKeydown"],QS=["disabled"],eD=["aria-label","disabled"],R8=120,tD=200,nD="Add context",rD=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);ZS({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-tD),w=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),_=o.ref(!1),y=o.computed(()=>!!r.sendDisabledReason&&_.value&&!r.loading&&!A.value),b=()=>{const C=a.value;C&&(C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,R8)}px`,C.style.overflowY=C.scrollHeight>R8?"auto":"hidden")};o.watch(()=>r.modelValue,C=>{C!==f.value&&(f.value=C,o.nextTick(b))}),o.watch(f,C=>{i("update:modelValue",C)});const v=()=>{b()},E=()=>{A.value&&(i("send",f.value.trim()),f.value="",o.nextTick(b))},k=()=>{r.loading?i("stop"):E()},D=()=>{i("attach")};return(C,P)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Xt)["chat-input"])},[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Xt)["chat-input__notice"],m.value?o.unref(Xt)["chat-input__notice--warning"]:o.unref(Xt)["chat-input__notice--info"]])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Xt)["chat-input__notice-body"])},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Xt)["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(Xt)["chat-input__notice-text"])},o.toDisplayString(w.value),3)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Xt)["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(Xt)["chat-input__container"],{[o.unref(Xt)["chat-input__container--focused"]]:p.value,[o.unref(Xt)["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(Xt)["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(Xt)["chat-input__files"])},[o.renderSlot(C.$slots,"attachments"),r.files.length>0?(o.openBlock(),o.createBlock(P3,{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(Xt)["chat-input__text-area"])},[o.withDirectives(o.createElementVNode("textarea",{ref_key:"textareaRef",ref:a,rows:"1",class:o.normalizeClass(o.unref(Xt)["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:v,onKeydown:[o.withKeys(o.withModifiers(E,["exact","prevent"]),["enter"]),P[4]||(P[4]=o.withKeys(o.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,JS),[[o.vModelText,f.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Xt)["chat-input__toolbar"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Xt)["chat-input__toolbar-left"])},[o.createElementVNode("button",{type:"button","aria-label":nD,class:o.normalizeClass(o.unref(Xt)["chat-input__icon-btn"]),disabled:C.disabled,onClick:D},[o.createVNode(o.unref(Ue),{name:"line-plus-netural",size:24})],10,QS)],2),o.createElementVNode("div",{"data-testid":"agent-send-actions",class:o.normalizeClass(o.unref(Xt)["chat-input__actions"]),onMouseenter:P[5]||(P[5]=U=>_.value=!0),onMouseleave:P[6]||(P[6]=U=>_.value=!1)},[y.value?(o.openBlock(),o.createElementBlock("div",{key:0,role:"tooltip",class:o.normalizeClass(o.unref(Xt)["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(Xt)["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,eD)],34)],2)],2)],2))}}),Ti={"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"},iD=["tabindex","onKeydown"],sD=["tabindex"],aD=["disabled","tabindex"],$8=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(Ti)["chat-edit-form"],{[o.unref(Ti)["chat-edit-form--active"]]:t.active}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__body"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__border"])},[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:a,type:"text",class:o.normalizeClass(o.unref(Ti)["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,iD),[[o.vModelText,i.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__actions"])},[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Ti)["chat-edit-form__button"],o.unref(Ti)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:d[2]||(d[2]=m=>r("cancel"))},o.toDisplayString(t.cancelLabel),11,sD),o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Ti)["chat-edit-form__button"],o.unref(Ti)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:f},o.toDisplayString(t.updateLabel),11,aD)],2)],2)],2))}}),oD=56;function B8(n,e){return n-e<oD?"bottom center":"top center"}function q3(){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=B8(a.getBoundingClientRect().top,i.getBoundingClientRect().top))}}}const Qr={"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"},lD=["aria-label"],uD=["aria-label","disabled"],cD=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}=q3(),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(Qr)["in-chat-bubble"])},[t.files.length>0?(o.openBlock(),o.createBlock(P3,{key:0,wrap:"",class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__files"]),files:t.files,removable:!1},null,8,["class","files"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock($8,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:g[0]||(g[0]=w=>r("cancel-edit")),onUpdate:g[1]||(g[1]=w=>r("update",w))},null,8,["active","cancel-label","content","update-label"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([o.unref(Qr)["in-chat-bubble__view"],{[o.unref(Qr)["in-chat-bubble__view--hidden"]]:m.editing}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__row"]),onMouseenter:g[4]||(g[4]=(...w)=>o.unref(s)&&o.unref(s)(...w))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__actions"])},[m.showCopy?(o.openBlock(),o.createBlock(o.unref(Ai),{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(Qr)["in-chat-bubble__action"]),onClick:g[2]||(g[2]=w=>r("copy"))},[o.createVNode(o.unref(Ue),{name:a.value,size:24},null,8,["name"])],10,lD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock(o.unref(Ai),{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(Qr)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:g[3]||(g[3]=w=>r("edit"))},[o.createVNode(o.unref(Ue),{name:"line-edit",size:24})],10,uD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__bubble"])},[o.renderSlot(m.$slots,"default",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Qr)["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(Qr)["in-chat-bubble__timestamp"])},o.toDisplayString(m.authorLabel)+" · "+o.toDisplayString(i.value),3)):o.createCommentVNode("",!0)],2)],2))}});function V3(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function fD(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">${V3(i)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${V3(r.text)}</code></pre></div>`},e}let n1=null,z3=null;const F8=o.ref(!1);function dD(){n1!==null||z3!==null||(z3=Promise.all([Promise.resolve().then(()=>vq),Promise.resolve().then(()=>nV)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:fD(t),breaks:!0,gfm:!0}),n1={marked:t,purify:e.default},F8.value=!0}).catch(n=>{z3=null,console.warn("Markdown renderer failed to load:",n)}))}function j3(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 U3=/^(\s*)`([^`]+)`\s*$/;function pD(n,e){const t=[];let r=0,i=e;for(;i<n.length;){const a=n[i].match(U3);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||!U3.test(n[u]))break;for(;i<u;)t.push(""),i+=1}else break}return{run:t,codeCount:r,end:i}}function hD(n){const e=n.split(`
|
|
156
|
+
`),t=iS(n),r=sS(n),i=[];for(const a of k8(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 Gi={modalWrapper:"_modalWrapper_192bl_36",medium:"_medium_192bl_45",small:"_small_192bl_52",section:"_section_192bl_58",modal:"_modal_192bl_36",close:"_close_192bl_75",header:"_header_192bl_86",footer:"_footer_192bl_100",modalOverlay:"_modalOverlay_192bl_110"},lS="×",uS=Kn(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(Gi).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(Gi).modalWrapper,o.unref(Gi)[t.size]])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(Gi).modal,o.unref(Gi)[t.size]])},[o.createElementVNode("button",{class:o.normalizeClass(o.unref(Gi).close),onClick:a},o.toDisplayString(lS),2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).header)},[o.createElementVNode("p",null,o.toDisplayString(f.title),1)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).section)},[o.renderSlot(f.$slots,"section",{},void 0,!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Gi).footer)},[o.createVNode(o.unref(Rn),{color:"secondary",variant:"text",label:t.cancelText,onClick:a},null,8,["label"]),o.createVNode(o.unref(Rn),{color:"primary",variant:"solid",label:t.submitText,onClick:u},null,8,["label"])],2)],2)],2),[[o.vShow,f.isOpen]])]),_:3})],64))}}),[["__scopeId","data-v-32c7610a"]]),Ds={wrapper__counter:"_wrapper__counter_808qv_1",wrapper__errorMessage:"_wrapper__errorMessage_808qv_1",wrapper__label:"_wrapper__label_808qv_1",wrapper__field:"_wrapper__field_808qv_8",wrapper:"_wrapper_808qv_1",wrapper__size_default:"_wrapper__size_default_808qv_52",wrapper__size_small:"_wrapper__size_small_808qv_55",wrapper__bottom:"_wrapper__bottom_808qv_94","wrapper--error":"_wrapper--error_808qv_107"},cS=["for"],fS=["id","max","maxlength","min","name","placeholder","value"],dS=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(Ds).wrapper,o.unref(Ds)[`wrapper__size_${s.size}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Ds).wrapper__label),for:s.id},o.toDisplayString(s.label),11,cS)):o.createCommentVNode("",!0),o.createElementVNode("input",{id:s.id,type:"number",class:o.normalizeClass([o.unref(Ds).wrapper__field,{[o.unref(Ds)["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,fS),s.counter||s.error?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ds).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ds).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ds).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)],2)}}}),R4={container:"_container_14yt1_36",isMultiline:"_isMultiline_14yt1_47",container__text:"_container__text_14yt1_53",container__default:"_container__default_14yt1_58",container__warning:"_container__warning_14yt1_65",container__alert:"_container__alert_14yt1_72",container__success:"_container__success_14yt1_79"},pS=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(R4).container,o.unref(R4)[`container__${s.variant}`],i.value&&o.unref(R4).isMultiline])},[o.createVNode(Ue,{name:t.value,size:24},null,8,["name"]),o.createVNode(o.unref(Ka),{ref_key:"textRef",ref:r,variant:"detail",class:o.normalizeClass(o.unref(R4).container__text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(s.text),1)]),_:1},8,["class"])],2))}}),Mt={wrapper:"_wrapper_xi3pq_36","wrapper--horizontal":"_wrapper--horizontal_xi3pq_40",button:"_button_xi3pq_43","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:"_button__label_xi3pq_72",button__icon:"_button__icon_xi3pq_75","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"},hS=["data-mode","disabled","onClick"],mS=["data-mode","disabled","onClick"],gS=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(Mt).wrapper,o.unref(Mt)[`wrapper--${u.orientation}`],o.unref(Mt)[`wrapper--${u.size}`],{[o.unref(Mt)["wrapper--disabled"]]:u.disabled,[o.unref(Mt)["wrapper--icon-only"]]:u.iconOnly,[o.unref(Mt)["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(Ai),{key:0,id:`segment-tooltip-${f.value}-${p}`,text:f.tooltip},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Mt).button,{[o.unref(Mt)["button--selected"]]:f.value===i.value,[o.unref(Mt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(Mt)["button--first"]]:p===0,[o.unref(Mt)["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(Mt).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(Mt).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(Mt).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(Mt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,hS)]),_:2},1032,["id","text"])):(o.openBlock(),o.createElementBlock("button",{key:1,type:"button",class:o.normalizeClass([o.unref(Mt).button,{[o.unref(Mt)["button--selected"]]:f.value===i.value,[o.unref(Mt)["button--disabled"]]:f.disabled||u.disabled,[o.unref(Mt)["button--first"]]:p===0,[o.unref(Mt)["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(Mt).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(Mt).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(Mt).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(Mt).button__label)},o.toDisplayString(f.label),3)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)],10,mS))],64))),128))],2))}}),Di={wrapper__counter:"_wrapper__counter_16ay0_1",wrapper__errorMessage:"_wrapper__errorMessage_16ay0_1",wrapper__label:"_wrapper__label_16ay0_1",wrapper__field:"_wrapper__field_16ay0_1",wrapper:"_wrapper_16ay0_1",wrapper__bottom:"_wrapper__bottom_16ay0_90","wrapper--error":"_wrapper--error_16ay0_103","wrapper--primary":"_wrapper--primary_16ay0_106","wrapper--smart":"_wrapper--smart_16ay0_114"},yS=["for"],bS=["id","maxlength","name","placeholder","value"],_S=["id","maxlength","name","placeholder","value"],wS=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(Di).wrapper,o.unref(Di)[`wrapper--${t.mode}`]])},[s.label?(o.openBlock(),o.createElementBlock("label",{key:0,class:o.normalizeClass(o.unref(Di).wrapper__label),for:s.id},o.toDisplayString(s.label),11,yS)):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(Di).wrapper__field,{[o.unref(Di)["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,bS)):(o.openBlock(),o.createElementBlock("input",{key:2,id:s.id,type:"text",class:o.normalizeClass([o.unref(Di).wrapper__field,{[o.unref(Di)["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,_S)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Di).wrapper__bottom)},[s.error?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Di).wrapper__errorMessage)},o.toDisplayString(s.error),3)):o.createCommentVNode("",!0),s.counter?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Di).wrapper__counter)},o.toDisplayString(((p=s.modelValue)==null?void 0:p.toString().length)||0),3)):o.createCommentVNode("",!0)],2)],2)}}}),e1={wrapper:"_wrapper_1hnht_36",wrapper__label:"_wrapper__label_1hnht_43",wrapper__input:"_wrapper__input_1hnht_67",wrapper_checked:"_wrapper_checked_1hnht_77",wrapper_disabled:"_wrapper_disabled_1hnht_84"},ES=["id","checked","disabled","name"],vS=["for"],AS=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(e1).wrapper,{[o.unref(e1).wrapper_checked]:a.checked,[o.unref(e1).wrapper_disabled]:a.disabled}])},[o.createElementVNode("input",{id:a.id,type:"checkbox",checked:a.checked,class:o.normalizeClass(o.unref(e1).wrapper__input),disabled:a.disabled,name:a.name,onClick:i},null,10,ES),o.createElementVNode("label",{class:o.normalizeClass(o.unref(e1).wrapper__label),for:a.id},null,10,vS)],2))}}),kS={class:"ab-toast__text"},CS=["aria-label"],SS=Kn(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",kS,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,CS)],2)):o.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-e00fa8e4"]]),xr={"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"},DS=["aria-label"],xS=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(xr)["agent-launcher"],{[o.unref(xr)["agent-launcher--expanded"]]:i.value}]),onClick:s[0]||(s[0]=f=>r("click"))},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(xr)["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(xr)["agent-launcher__halo"],o.unref(xr)["agent-launcher__halo--outer"]])},null,2),o.createElementVNode("span",{"aria-hidden":"true",class:o.normalizeClass([o.unref(xr)["agent-launcher__halo"],o.unref(xr)["agent-launcher__halo--inner"]])},null,2)],64)):o.createCommentVNode("",!0),o.createElementVNode("span",{class:o.normalizeClass(o.unref(xr)["agent-launcher__badge"])},[o.createVNode(o.unref(Ue),{name:"agent-launcher-badge",class:o.normalizeClass(o.unref(xr)["agent-launcher__art"]),size:48},null,8,["class"]),o.createVNode(o.unref(Ue),{name:"agent-launcher-glyph",class:o.normalizeClass(o.unref(xr)["agent-launcher__glyph"]),size:28},null,8,["class"])],2)],2),i.value?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(xr)["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(xr)["agent-launcher__expand"]),size:24},null,8,["class"])):o.createCommentVNode("",!0)],10,DS))}});function t1(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}const ur={"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"},TS=3*60*1e3,C8=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(t1()),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,w=0,R=!1;const A=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,_=()=>{g!==null&&clearTimeout(g),g=setTimeout(()=>{s.value=!0},TS)},y=()=>{const P=Date.now();P-w<1e3||(w=P,s.value=!1,_())},b=()=>{p.forEach(P=>{P.cx=P.el.offsetLeft+P.el.offsetWidth/2})},v=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)`})}))},E=()=>{R||typeof window>"u"||(R=!0,window.addEventListener("mousemove",v,{passive:!0}),t.forEach(P=>{window.addEventListener(P,y,{passive:!0})}),_())},k=()=>{!R||typeof window>"u"||(R=!1,window.removeEventListener("mousemove",v),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=t1(),a.value?k():E()};return o.watch(a,P=>{P?k():E()}),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})),b()),a.value||E(),A==null||A.addEventListener("change",C),document.addEventListener("visibilitychange",D),typeof ResizeObserver<"u"&&P&&(m=new ResizeObserver(b),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(ur)["in-agent-background"],{[o.unref(ur)["in-agent-background--animated"]]:e.animated,[o.unref(ur)["in-agent-background--static"]]:a.value,[o.unref(ur)["in-agent-background--paused"]]:f.value}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__aurora"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__stage"])},[o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--pink"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--purple"]])},null,2),o.createElementVNode("span",{"data-agent-blob":"",class:o.normalizeClass([o.unref(ur)["in-agent-background__blob"],o.unref(ur)["in-agent-background__blob--blue"]])},null,2)],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ur)["in-agent-background__grain"])},null,2)],2))}}),cr={"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"},RS=["aria-label","title"],$S=["aria-label","title"],BS=["aria-label","title"],FS=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(cr)["in-agent-popup"])},[o.createElementVNode("header",{class:o.normalizeClass(o.unref(cr)["in-agent-popup__header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["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(cr)["in-agent-popup__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["in-agent-popup__icon-button"]),title:s.newChatLabel,onClick:a},[o.createVNode(o.unref(Ue),{name:"line-ai-message-reply-plus",size:24})],10,RS)):o.createCommentVNode("",!0),t.showAcademy?(o.openBlock(),o.createElementBlock("button",{key:1,type:"button","aria-label":s.academyLabel,class:o.normalizeClass(o.unref(cr)["in-agent-popup__icon-button"]),title:s.academyLabel,onClick:u},[o.createVNode(o.unref(Ue),{name:"agent-academy",size:24})],10,$S)):o.createCommentVNode("",!0),t.showNewChat||t.showAcademy?(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(cr)["in-agent-popup__separator"])},null,2)):o.createCommentVNode("",!0),o.createElementVNode("button",{type:"button","aria-label":s.minimizeLabel,class:o.normalizeClass(o.unref(cr)["in-agent-popup__icon-button"]),title:s.minimizeLabel,onClick:i},[o.createVNode(o.unref(Ue),{name:"line-minus-netural",size:24})],10,BS)])],2)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["in-agent-popup__surface"])},[t.showBackground?(o.openBlock(),o.createBlock(C8,{key:0,animated:t.backgroundAnimated,static:t.backgroundStatic},null,8,["animated","static"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(cr)["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(cr)["in-agent-popup__footer"])},[o.renderSlot(s.$slots,"footer")],2)):o.createCommentVNode("",!0)],2)],2))}}),Vn={"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"},LS=["aria-pressed","onClick"],IS=["onClick"],OS=16,NS=.18,PS=.06,S8=260,D8="cubic-bezier(0.22, 1, 0.36, 1)",MS=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":`${NS+m*PS}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 w=m.scrollTop+(g.getBoundingClientRect().bottom-m.getBoundingClientRect().top),R=m.scrollTop+m.clientHeight-u.value,A=w+OS-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 w=f.value,R=(w==null?void 0:w.firstElementChild)??null,A=(R==null?void 0:R.firstElementChild)??null,_=(A==null?void 0:A.getBoundingClientRect().height)??0,y=(w==null?void 0:w.getBoundingClientRect().height)??0,b=m.getBoundingClientRect().height-y+_,v=g.clientHeight-u.value;m.style.marginTop=`${Math.max(0,(v-b)/2)}px`};return o.watch(u,()=>d()),o.onMounted(()=>d()),o.watch(()=>t.selected,async m=>{const g=s.value,w=(g==null?void 0:g.getBoundingClientRect().top)??0;if(await o.nextTick(),!g)return;if(d(),t1()){p();return}const R=w-g.getBoundingClientRect().top,A=[];Math.abs(R)>1&&A.push(g.animate([{transform:`translateY(${R}px)`},{transform:"translateY(0)"}],{duration:S8,easing:D8}));const _=f.value;m&&_&&A.push(_.animate([{opacity:0,transform:"translateY(6px)"},{opacity:1,transform:"translateY(0)"}],{duration:S8,easing:D8})),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(Vn)["agent-welcome"])},[o.createElementVNode("div",{class:o.normalizeClass([o.unref(Vn)["agent-welcome__intro"],o.unref(Vn)["agent-welcome__rise--1"]])},[t.greeting?(o.openBlock(),o.createElementBlock("p",{key:0,class:o.normalizeClass(o.unref(Vn)["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(Vn)["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(Vn)["agent-welcome__categories"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.categories,(w,R)=>(o.openBlock(),o.createElementBlock("button",{key:w.value,type:"button","aria-pressed":t.selected===w.value,class:o.normalizeClass([o.unref(Vn)["agent-welcome__category"],o.unref(Vn)["agent-welcome__rise-item"],{[o.unref(Vn)["agent-welcome__category--selected"]]:t.selected===w.value}]),style:o.normalizeStyle(i(R)),onClick:A=>r("select",w.value)},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Vn)["agent-welcome__category-icon"]),name:w.icon,size:24},null,8,["class","name"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Vn)["agent-welcome__category-label"])},o.toDisplayString(w.label),3)],14,LS))),128))],2)):o.createCommentVNode("",!0),t.quickActions.length>0?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Vn)["agent-welcome__quick-actions"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.quickActions,(w,R)=>(o.openBlock(),o.createElementBlock("button",{key:w.id,type:"button",class:o.normalizeClass([o.unref(Vn)["agent-welcome__quick-action"],o.unref(Vn)["agent-welcome__rise-item"]]),style:o.normalizeStyle(i(R)),onClick:A=>r("quick-action",w.prompt)},o.toDisplayString(w.label),15,IS))),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(Vn)["agent-welcome__cards"])},[o.renderSlot(m.$slots,"cards")],2)):o.createCommentVNode("",!0)],2))}}),xi={"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"},qS=["alt","src"],VS=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(xi)["in-blueprint-card"]),onClick:i,onKeydown:a},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__thumb"])},[t.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:t.title,class:o.normalizeClass(o.unref(xi)["in-blueprint-card__image"]),src:t.imageUrl},null,10,qS)):o.renderSlot(u.$slots,"thumb",{key:1},()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["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(xi)["in-blueprint-card__badge"])},o.toDisplayString(t.badgeText),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__text"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__title"])},o.toDisplayString(t.title),3),t.subtitle?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(xi)["in-blueprint-card__subtitle"])},o.toDisplayString(t.subtitle),3)):o.createCommentVNode("",!0)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(xi)["in-blueprint-card__open"])},[o.createVNode(o.unref(Ue),{name:"line-external-link",size:16})],2)],2)],34))}}),Wt={"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"},zS=["onClick","onFocusin","onFocusout","onMouseenter","onMouseleave"],jS=["alt","src"],US=["aria-label","onClick"],WS=4,x8=20,T8=12,P3=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),w=o.ref(null),R=o.ref([]),A=o.ref(0),_=o.ref(x8),y=(C,P,U)=>Math.min(Math.max(C,P),Math.max(P,U)),b=(C,P)=>{C instanceof HTMLElement&&(R.value[P]=C)},v=C=>{i.value=C},E=C=>{i.value===C&&(i.value=-1)},k=()=>{const C=m.value,P=g.value,U=w.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,_.value=y(ue+x8-H,T8,U.offsetWidth-T8)},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(Wt)["agent-files-wrapper"])},[f.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"bubbleRef",ref:w,role:"tooltip",class:o.normalizeClass(o.unref(Wt)["agent-files__error-bubble"]),style:o.normalizeStyle({left:`${A.value}px`,"--agent-files-arrow-left":`${_.value}px`})},o.toDisplayString(f.value),7)):o.createCommentVNode("",!0),o.createElementVNode("span",{"aria-live":"polite",role:"status",class:o.normalizeClass(o.unref(Wt)["agent-files__announcer"])},o.toDisplayString(p.value),3),o.createElementVNode("div",{ref_key:"stripRef",ref:g,class:o.normalizeClass([o.unref(Wt)["agent-files"],{[o.unref(Wt)["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=>b(H,Q),"data-testid":"agent-file-card",class:o.normalizeClass([o.unref(Wt)["agent-files__card"],{[o.unref(Wt)["agent-files__card--error"]]:U.status==="error"}]),onClick:H=>r("open",U.id),onFocusin:H=>v(Q),onFocusout:H=>E(Q),onMouseenter:H=>v(Q),onMouseleave:H=>E(Q)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Wt)["agent-files__body"])},[U.status==="loading"?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass([o.unref(Wt)["agent-files__thumb"],o.unref(Wt)["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(Wt)["agent-files__thumb"],o.unref(Wt)["agent-files__thumb--icon"],o.unref(Wt)["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(Wt)["agent-files__thumb"],o.unref(Wt)["agent-files__thumb--swatch"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(U.swatch.slice(0,WS),H=>(o.openBlock(),o.createElementBlock("span",{key:H,class:o.normalizeClass(o.unref(Wt)["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(Wt)["agent-files__thumb"]),src:U.thumbnailUrl},null,10,jS)):(o.openBlock(),o.createElementBlock("span",{key:4,class:o.normalizeClass([o.unref(Wt)["agent-files__thumb"],o.unref(Wt)["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(Wt)["agent-files__labels"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Wt)["agent-files__name"])},o.toDisplayString(U.name),3),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Wt)["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(Wt)["agent-files__remove"]),onClick:o.withModifiers(H=>r("remove",U.id),["stop"])},[o.createVNode(o.unref(Ue),{name:"chip-close-6",size:6})],10,US)):o.createCommentVNode("",!0)],2)],42,zS)}),128))],2)],2)):o.createCommentVNode("",!0)}}),Xt={"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"},io=[{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]}],HS=200,GS=4,YS=2600,M3=2,KS=6;function XS(n){const[e]=io,t=io[io.length-1];if(n<=e.p||n>=t.p)return[0,0,0,0];for(let r=0;r<io.length-1;r+=1){const i=io[r],a=io[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 ZS(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 _=R.getBoundingClientRect(),y=_.width+M3*2,b=_.height+M3*2;if(!y||!b)return;A.setAttribute("viewBox",`0 0 ${y} ${b}`),A.setAttribute("width",String(y)),A.setAttribute("height",String(b));const v=1,E=Math.max(KS,1),k=y-v*2,D=b-v*2,C=k-2*E,P=D-2*E,U=Math.PI/2*E,Q=2*C+2*P+4*U;function ue(ce){let L=ce;if(L<=C)return{x:E+L,y:0};if(L-=C,L<=U){const I=-Math.PI/2+L/E;return{x:k-E+E*Math.cos(I),y:E+E*Math.sin(I)}}if(L-=U,L<=P)return{x:k,y:E+L};if(L-=P,L<=U){const I=L/E;return{x:k-E+E*Math.cos(I),y:D-E+E*Math.sin(I)}}if(L-=U,L<=C)return{x:k-E-L,y:D};if(L-=C,L<=U){const I=Math.PI/2+L/E;return{x:E+E*Math.cos(I),y:D-E+E*Math.sin(I)}}if(L-=U,L<=P)return{x:0,y:D-E-L};L-=P;const X=Math.PI+L/E;return{x:E+E*Math.cos(X),y:E+E*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/HS;let J=0;for(const ce of N){const L=ce.isArc?GS: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+v).toFixed(2)} ${(F.y+v).toFixed(2)}`,ie=`${(z.x+v).toFixed(2)} ${(z.y+v).toFixed(2)}`,V=document.createElementNS(H,"path");V.setAttribute("d",ce.isArc?`${re} A ${E} ${E} 0 0 1 ${ie}`:`${re} L ${ie}`),V.setAttribute("fill","none"),V.setAttribute("stroke","transparent"),V.setAttribute("stroke-width",String(M3)),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 _=((i[A]-R)%1+1)%1,[y,b,v,E]=XS(_);a[A].setAttribute("stroke",`rgba(${y},${b},${v},${E})`)}}function m(R){s===null&&(s=R),d((R-s)/YS%1),u=requestAnimationFrame(m)}function g(){typeof requestAnimationFrame>"u"||(p(),s=null,u!==null&&cancelAnimationFrame(u),t1()?d(0):u=requestAnimationFrame(m),typeof ResizeObserver<"u"&&e.value&&!f&&(f=new ResizeObserver(()=>{r.value&&(p(),t1()&&d(0))}),f.observe(e.value)))}function w(){u!==null&&(cancelAnimationFrame(u),u=null),f==null||f.disconnect(),f=null}o.watch(r,R=>{R?g():w()}),o.onMounted(()=>{r.value&&g()}),o.onBeforeUnmount(w)}const JS=["disabled","placeholder","onKeydown"],QS=["disabled"],eD=["aria-label","disabled"],R8=120,tD=200,nD="Add context",rD=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);ZS({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-tD),w=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),_=o.ref(!1),y=o.computed(()=>!!r.sendDisabledReason&&_.value&&!r.loading&&!A.value),b=()=>{const C=a.value;C&&(C.style.height="auto",C.style.height=`${Math.min(C.scrollHeight,R8)}px`,C.style.overflowY=C.scrollHeight>R8?"auto":"hidden")};o.watch(()=>r.modelValue,C=>{C!==f.value&&(f.value=C,o.nextTick(b))}),o.watch(f,C=>{i("update:modelValue",C)});const v=()=>{b()},E=()=>{A.value&&(i("send",f.value.trim()),f.value="",o.nextTick(b))},k=()=>{r.loading?i("stop"):E()},D=()=>{i("attach")};return(C,P)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Xt)["chat-input"])},[g.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Xt)["chat-input__notice"],m.value?o.unref(Xt)["chat-input__notice--warning"]:o.unref(Xt)["chat-input__notice--info"]])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Xt)["chat-input__notice-body"])},[o.createVNode(o.unref(Ue),{class:o.normalizeClass(o.unref(Xt)["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(Xt)["chat-input__notice-text"])},o.toDisplayString(w.value),3)],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(Xt)["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(Xt)["chat-input__container"],{[o.unref(Xt)["chat-input__container--focused"]]:p.value,[o.unref(Xt)["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(Xt)["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(Xt)["chat-input__files"])},[o.renderSlot(C.$slots,"attachments"),r.files.length>0?(o.openBlock(),o.createBlock(P3,{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(Xt)["chat-input__text-area"])},[o.withDirectives(o.createElementVNode("textarea",{ref_key:"textareaRef",ref:a,rows:"1",class:o.normalizeClass(o.unref(Xt)["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:v,onKeydown:[o.withKeys(o.withModifiers(E,["exact","prevent"]),["enter"]),P[4]||(P[4]=o.withKeys(o.withModifiers(()=>{},["shift","stop"]),["enter"]))]},null,42,JS),[[o.vModelText,f.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Xt)["chat-input__toolbar"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Xt)["chat-input__toolbar-left"])},[o.createElementVNode("button",{type:"button","aria-label":nD,class:o.normalizeClass(o.unref(Xt)["chat-input__icon-btn"]),disabled:C.disabled,onClick:D},[o.createVNode(o.unref(Ue),{name:"line-plus-netural",size:24})],10,QS)],2),o.createElementVNode("div",{"data-testid":"agent-send-actions",class:o.normalizeClass(o.unref(Xt)["chat-input__actions"]),onMouseenter:P[5]||(P[5]=U=>_.value=!0),onMouseleave:P[6]||(P[6]=U=>_.value=!1)},[y.value?(o.openBlock(),o.createElementBlock("div",{key:0,role:"tooltip",class:o.normalizeClass(o.unref(Xt)["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(Xt)["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,eD)],34)],2)],2)],2))}}),Ti={"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"},iD=["tabindex","onKeydown"],sD=["tabindex"],aD=["disabled","tabindex"],$8=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(Ti)["chat-edit-form"],{[o.unref(Ti)["chat-edit-form--active"]]:t.active}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__body"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__border"])},[o.withDirectives(o.createElementVNode("input",{ref_key:"inputRef",ref:a,type:"text",class:o.normalizeClass(o.unref(Ti)["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,iD),[[o.vModelText,i.value]])],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ti)["chat-edit-form__actions"])},[o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Ti)["chat-edit-form__button"],o.unref(Ti)["chat-edit-form__button--cancel"]]),tabindex:t.active?0:-1,onClick:d[2]||(d[2]=m=>r("cancel"))},o.toDisplayString(t.cancelLabel),11,sD),o.createElementVNode("button",{type:"button",class:o.normalizeClass([o.unref(Ti)["chat-edit-form__button"],o.unref(Ti)["chat-edit-form__button--update"]]),disabled:!s.value,tabindex:t.active?0:-1,onClick:f},o.toDisplayString(t.updateLabel),11,aD)],2)],2)],2))}}),oD=56;function B8(n,e){return n-e<oD?"bottom center":"top center"}function q3(){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=B8(a.getBoundingClientRect().top,i.getBoundingClientRect().top))}}}const Qr={"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"},lD=["aria-label"],uD=["aria-label","disabled"],cD=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}=q3(),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(Qr)["in-chat-bubble"])},[t.files.length>0?(o.openBlock(),o.createBlock(P3,{key:0,wrap:"",class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__files"]),files:t.files,removable:!1},null,8,["class","files"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock($8,{key:1,active:m.editing,"cancel-label":m.cancelLabel,content:m.content,"update-label":m.updateLabel,onCancel:g[0]||(g[0]=w=>r("cancel-edit")),onUpdate:g[1]||(g[1]=w=>r("update",w))},null,8,["active","cancel-label","content","update-label"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass([o.unref(Qr)["in-chat-bubble__view"],{[o.unref(Qr)["in-chat-bubble__view--hidden"]]:m.editing}])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__row"]),onMouseenter:g[4]||(g[4]=(...w)=>o.unref(s)&&o.unref(s)(...w))},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__actions"])},[m.showCopy?(o.openBlock(),o.createBlock(o.unref(Ai),{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(Qr)["in-chat-bubble__action"]),onClick:g[2]||(g[2]=w=>r("copy"))},[o.createVNode(o.unref(Ue),{name:a.value,size:24},null,8,["name"])],10,lD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),m.editable?(o.openBlock(),o.createBlock(o.unref(Ai),{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(Qr)["in-chat-bubble__action"]),disabled:m.editDisabled,onClick:g[3]||(g[3]=w=>r("edit"))},[o.createVNode(o.unref(Ue),{name:"line-edit",size:24})],10,uD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],2),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Qr)["in-chat-bubble__bubble"])},[o.renderSlot(m.$slots,"default",{},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Qr)["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(Qr)["in-chat-bubble__timestamp"])},o.toDisplayString(m.authorLabel)+" · "+o.toDisplayString(i.value),3)):o.createCommentVNode("",!0)],2)],2))}});function V3(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function fD(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">${V3(i)||"code"}</span><button type="button" class="md-code__copy">Copy</button></div><pre><code>${V3(r.text)}</code></pre></div>`},e}let n1=null,z3=null;const F8=o.ref(!1);function dD(){n1!==null||z3!==null||(z3=Promise.all([Promise.resolve().then(()=>vq),Promise.resolve().then(()=>nV)]).then(([n,e])=>{const{marked:t}=n;t.setOptions({renderer:fD(t),breaks:!0,gfm:!0}),n1={marked:t,purify:e.default},F8.value=!0}).catch(n=>{z3=null,console.warn("Markdown renderer failed to load:",n)}))}function j3(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 U3=/^(\s*)`([^`]+)`\s*$/;function pD(n,e){const t=[];let r=0,i=e;for(;i<n.length;){const a=n[i].match(U3);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||!U3.test(n[u]))break;for(;i<u;)t.push(""),i+=1}else break}return{run:t,codeCount:r,end:i}}function hD(n){const e=n.split(`
|
|
157
157
|
`),t=[];let r=0;for(;r<e.length;){const{run:i,codeCount:a,end:u}=U3.test(e[r])?pD(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 L8(){return{formatMarkdown:e=>{if(!e)return"";if(dD(),F8.value,n1===null)return V3(e);const r=n1.marked.parse(hD(e)).replace(/<table>/g,'<div class="md-table"><table>').replace(/<\/table>/g,"</table></div>");return n1.purify.sanitize(r,{ADD_ATTR:["target","rel"]})}}}const r1={"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"},mD=["innerHTML"],gD=o.defineComponent({__name:"InAgentMessage",props:{text:{default:""},showAvatar:{type:Boolean,default:!1}},setup(n){const e=n,t=o.useSlots(),{formatMarkdown:r}=L8(),i=o.computed(()=>!!t.default),a=o.computed(()=>r(e.text??""));return(u,s)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(r1)["in-agent-message"])},[u.showAvatar?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(r1)["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(r1)["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(r1)["in-agent-message__md"]),innerHTML:a.value,onClick:s[0]||(s[0]=(...f)=>o.unref(j3)&&o.unref(j3)(...f))},null,10,mD)):(o.openBlock(),o.createElementBlock("span",{key:2,class:o.normalizeClass(o.unref(r1)["in-agent-message__text"])},o.toDisplayString(u.text),3))],2)],2))}}),W3={"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:"_gradientShift_hiriu_1"},yD=2500,bD=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},yD))};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(W3)["in-chat-loading"])},[o.createVNode(o.unref(Ue),{name:"agent-analyzing",class:o.normalizeClass(o.unref(W3)["in-chat-loading__icon"]),size:24},null,8,["class"]),o.createElementVNode("span",{class:o.normalizeClass(o.unref(W3)["in-chat-loading__text"])},o.toDisplayString(a.value),3)],2))}}),pa={"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"},_D=["aria-label"],wD=["aria-label"],ED=["aria-label"],vD=["aria-label"],AD=1500,kD=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},AD)};o.watch(()=>t.copied,_=>{_&&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}=q3(),w=o.computed(()=>m.value.startsWith("bottom")?"bottom":"top"),R=((A=o.getCurrentInstance())==null?void 0:A.uid)??0;return(_,y)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(pa)["in-chat-message-actions"]),onMouseenter:y[3]||(y[3]=(...b)=>o.unref(g)&&o.unref(g)(...b))},[_.retryable?(o.openBlock(),o.createBlock(o.unref(Ai),{key:0,id:`in-chat-message-actions-retry-${o.unref(R)}`,placement:w.value,text:_.retryLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":_.retryLabel,class:o.normalizeClass(o.unref(pa)["in-chat-message-actions__button"]),onClick:y[0]||(y[0]=b=>r("retry"))},[o.createVNode(o.unref(Ue),{name:"line-reset",size:24})],10,_D)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),_.showCopy?(o.openBlock(),o.createBlock(o.unref(Ai),{key:1,id:`in-chat-message-actions-copy-${o.unref(R)}`,placement:w.value,text:_.copyLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":_.copyLabel,class:o.normalizeClass(o.unref(pa)["in-chat-message-actions__button"]),onClick:d},[o.createVNode(o.unref(Ue),{name:s.value,size:24},null,8,["name"])],10,wD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),_.showFeedback?(o.openBlock(),o.createBlock(o.unref(Ai),{key:2,id:`in-chat-message-actions-like-${o.unref(R)}`,placement:w.value,text:_.likeLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":_.likeLabel,class:o.normalizeClass([o.unref(pa)["in-chat-message-actions__button"],{[o.unref(pa)["in-chat-message-actions__button--active"]]:_.feedback==="like"}]),onClick:y[1]||(y[1]=b=>r("like"))},[o.createVNode(o.unref(Ue),{name:f.value,size:24},null,8,["name"])],10,ED)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0),_.showFeedback?(o.openBlock(),o.createBlock(o.unref(Ai),{key:3,id:`in-chat-message-actions-dislike-${o.unref(R)}`,placement:w.value,text:_.dislikeLabel},{default:o.withCtx(()=>[o.createElementVNode("button",{type:"button","aria-label":_.dislikeLabel,class:o.normalizeClass([o.unref(pa)["in-chat-message-actions__button"],{[o.unref(pa)["in-chat-message-actions__button--active"]]:_.feedback==="dislike"}]),onClick:y[2]||(y[2]=b=>r("dislike"))},[o.createVNode(o.unref(Ue),{name:p.value,size:24},null,8,["name"])],10,vD)]),_:1},8,["id","placement","text"])):o.createCommentVNode("",!0)],34))}}),so={"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"},I8=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(so)["fade-enter-active"],"enter-from-class":o.unref(so)["fade-enter-from"],"leave-active-class":o.unref(so)["fade-leave-active"],"leave-to-class":o.unref(so)["fade-leave-to"]},{default:o.withCtx(()=>[e.visible?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",class:o.normalizeClass(o.unref(so)["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(so)["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"]))}}),$4={"in-agent-conversation":"_in-agent-conversation_1m1ub_36",scroll:"_scroll_1m1ub_47",composer:"_composer_1m1ub_62",input:"_input_1m1ub_70","in-agent-input-rise":"_in-agent-input-rise_1m1ub_1"},CD=50,SD=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 w=g.querySelectorAll("[data-msg-id]"),R=w[w.length-1];if(!R){a.value=!1;return}const A=g.getBoundingClientRect().bottom-i.value;a.value=R.getBoundingClientRect().bottom-A>CD};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 w=g.firstElementChild;w&&s.observe(w)},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,w)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"rootRef",ref:e,class:o.normalizeClass(o.unref($4)["in-agent-conversation"])},[o.createElementVNode("div",{ref_key:"scrollRef",ref:t,class:o.normalizeClass(o.unref($4).scroll),style:o.normalizeStyle({paddingBottom:`${i.value}px`})},[o.renderSlot(g.$slots,"default")],6),o.createElementVNode("div",{class:o.normalizeClass(o.unref($4).composer)},[o.createElementVNode("div",{ref_key:"inputRef",ref:r,class:o.normalizeClass(o.unref($4).input)},[o.createVNode(I8,{"unread-count":0,visible:a.value,onClick:m},null,8,["visible"]),o.renderSlot(g.$slots,"composer")],2)],2)],2))}}),O8={"in-agent-message-list":"_in-agent-message-list_e0scq_36",list:"_list_e0scq_41"},DD=["data-msg-id","data-msg-role"],xD=50,TD=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=b=>{var k;const v=(k=s.value)==null?void 0:k.lastElementChild;if(!v)return!0;const E=b.getBoundingClientRect().bottom-u.value;return v.getBoundingClientRect().bottom-E<=xD},m=()=>{const b=p();if(!b)return!0;const v=d(b);return f.value=!v,i("scroll",{isAtBottom:v,scrollTop:b.scrollTop}),v},g=(b=!1,v="smooth")=>{f.value&&!b||o.nextTick(()=>{const E=p();if(!E)return;const k=E.scrollHeight-E.clientHeight;v==="auto"?E.scrollTop=k:E.scrollTo({top:k,behavior:v}),f.value=!1})};let w=null,R=null,A=null;const _=b=>{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(b),s.value&&R.observe(s.value))},y=()=>{const b=p();b!==w&&(w&&w.removeEventListener("scroll",m),b&&(b.addEventListener("scroll",m,{passive:!0}),w=b,_(b)))};return o.watch(()=>r.messages.map(b=>b.id).join("|"),(b,v)=>{const E=new Set(v?v.split("|"):[]),k=r.messages.filter(D=>!E.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(()=>{w&&(w.removeEventListener("scroll",m),w=null),R==null||R.disconnect(),R=null,A!==null&&(cancelAnimationFrame(A),A=null)}),e({scrollToBottom:g}),(b,v)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(O8)["in-agent-message-list"])},[o.createElementVNode("div",{ref_key:"listRef",ref:s,class:o.normalizeClass(o.unref(O8).list)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.messages,E=>(o.openBlock(),o.createElementBlock("div",{key:E.id,"data-msg-id":E.id,"data-msg-role":E.role},[o.renderSlot(b.$slots,"default",{message:E})],8,DD))),128))],2)],2))}}),B4={"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"},N8=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(B4)["wizard-footer"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(B4)["wizard-footer__left"])},[o.createVNode(o.unref(Rn),{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(B4)["wizard-footer__pagination"])},o.toDisplayString(t.currentStep+1)+"/"+o.toDisplayString(t.totalSteps),3)):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(o.unref(B4)["wizard-footer__right"])},[t.isLastStep&&t.canSubmit?(o.openBlock(),o.createBlock(o.unref(Rn),{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(Rn),{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(Rn),{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(Rn),{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(Rn),{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(Rn),{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))}}),ao={"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"},RD="Info",P8=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(ao)["wizard-header"])},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(ao)["wizard-header__content"])},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(ao)["wizard-header__title"])},o.toDisplayString(i.title),3),o.createElementVNode("div",{class:o.normalizeClass(o.unref(ao)["wizard-header__actions"])},[t.infoTooltip?(o.openBlock(),o.createBlock(o.unref(Ai),{key:0,id:"wizard-info-tooltip",placement:"top","show-delay":0,text:t.infoTooltip},{default:o.withCtx(()=>[o.createVNode(o.unref(Rn),{color:"secondary","left-icon-name":"agent-info",size:"small",variant:"ghost","aria-label":RD,"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(ao)["wizard-header__divider"])},null,2)):o.createCommentVNode("",!0),t.showClose?(o.openBlock(),o.createBlock(o.unref(Rn),{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(ao)["wizard-header__divider-line"])},null,2)],2))}}),M8={"ask-wizard":"_ask-wizard_f0a9y_36","ask-wizard__body":"_ask-wizard__body_f0a9y_50"},$D="↑↓ to navigate options.<br>Home/End to jump first/last.<br>↵ to select and continue.",ei="__ask_user_custom__",BD=160,FD=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:$D},closeLabel:{default:"Close"}},emits:["submit","close"],setup(n,{emit:e}){var Me;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-${((Me=o.getCurrentInstance())==null?void 0:Me.uid)??0}`,p=o.inject("inAgentConversationRoot",o.ref(null)),d=o.ref(0),m=o.ref(-1),g=o.ref(!1),w=o.ref(!1),R=o.ref({}),A=o.computed(()=>t.steps[d.value]??a),_=o.computed(()=>d.value>=t.steps.length-1),y=o.computed(()=>R.value[A.value.id]??{selected:[],custom:""}),b=o.computed(()=>!!A.value.allowCustom&&A.value.variant!=="card"),v=o.computed(()=>{const ke=y.value;return ke.selected.length>0||ke.custom.trim().length>0}),E=o.computed(()=>y.value.selected[0]??null),k=o.computed(()=>A.value.required===!0),D=o.computed(()=>!k.value||v.value),C=o.computed(()=>{const ke=A.value.options.map(Te=>Te.value);return b.value&&ke.push(ei),ke}),P=o.computed(()=>C.value[m.value]??null),U=o.computed(()=>g.value&&!w.value),Q=o.computed(()=>U.value&&P.value===ei),ue=o.computed(()=>!U.value||P.value===ei?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(){!_.value&&D.value&&d.value++}function ne(ke){u===null&&(se(A.value.id,{selected:[ke],custom:""}),_.value||(u=setTimeout(()=>{u=null,N()},BD)))}function J(ke){const Te=y.value,qe=new Set(Te.selected);qe.has(ke)?qe.delete(ke):qe.add(ke),se(A.value.id,{selected:[...qe],custom:Te.custom})}function ee(ke){const Te=y.value,qe=A.value.multiSelect?Te.selected:[];se(A.value.id,{selected:qe,custom:ke})}function ce(ke){const Te=C.value.indexOf(ke);Te!==-1&&(m.value=Te)}function L(){M();const ke=C.value.indexOf(ei);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,qe;(qe=((Te=s.value)==null?void 0:Te.querySelector('[role="listbox"]'))??s.value)==null||qe.focus()}function F(){w.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]===ei){I();return}z()}}function ie(){g.value=!1,w.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(b.value&&(ke.custom.trim().length>0||Te)){m.value=C.value.indexOf(ei);return}m.value=-1}function he(){d.value>0&&d.value--}function be(){const ke=t.steps.map(qe=>{const rt=R.value[qe.id]??{selected:[],custom:""},bn=new Map(qe.options.map(It=>[It.value,It.label])),Vt=rt.selected.map(It=>bn.get(It)??It),ln=rt.custom.trim();return{questionId:qe.id,question:qe.question,selectedLabels:Vt,customText:ln.length>0?ln:void 0}});if(ke.every(qe=>qe.selectedLabels.length===0&&qe.customText===void 0)){r("close");return}r("submit",ke)}function W(){if(_.value){be();return}N()}function ae(){if(_.value){be();return}d.value++}function de(ke){return ke instanceof HTMLElement?ke.tagName==="INPUT"||ke.tagName==="TEXTAREA"||ke.isContentEditable:!1}function Ee(){const ke=P.value;if(!(ke===null||ke===ei)){if(A.value.multiSelect){J(ke);return}ne(ke)}}function ve(){if(_.value){be();return}N()}function Ie(ke){const Te=P.value;if(Te===ei&&!de(ke.target)){ke.preventDefault(),I();return}ke.preventDefault(),Te!==null&&Te!==ei&&(y.value.selected.includes(Te)||(A.value.multiSelect?J(Te):ne(Te))),D.value&&ve()}function je(ke){var bn;const Te=ke.target instanceof HTMLElement?ke.target:null;if(!!!(Te&&((bn=s.value)!=null&&bn.contains(Te)))&&de(Te))return!1;const rt=p.value??s.value;return!Te||!rt||rt.contains(Te)}function Ye(){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(ei)-1),q()}function ge(ke){if(!je(ke))return;const Te=de(ke.target);if(w.value){ke.key==="ArrowUp"&&(ke.preventDefault(),w.value=!1,g.value=!0,m.value=C.value.length-1,q());return}if(ke.key==="Enter"){if(ke.target instanceof HTMLTextAreaElement)return;Ie(ke);return}if(ke.key==="Escape"&&Te){ke.preventDefault(),Ye();return}if(ke.key==="ArrowUp"&&Te){ke.preventDefault(),Ye();return}if(ke.key==="ArrowDown"&&Te&&je(ke)){ke.preventDefault(),ke.target.blur(),g.value=!0,m.value=0,q(),z();return}if(!Te){if(ke.key===" "){ke.preventDefault(),Ee();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 qe=C.value[C.value.length-1]===ei?C.value.length-2:C.value.length-1;m.value=Math.max(qe,0),z();break}}}}}const tt=o.computed(()=>t.steps.map(ke=>ke.id).join("|"));return o.watch(tt,()=>{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(),w.value=!1,V(),A.value.options.length===0&&b.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(M8)["ask-wizard"]),onMousemove:ie},[o.createVNode(P8,{"close-label":t.closeLabel,"info-tooltip":t.infoTooltip,title:A.value.question,onClose:Te[0]||(Te[0]=qe=>r("close"))},null,8,["close-label","info-tooltip","title"]),o.createElementVNode("div",{class:o.normalizeClass(o.unref(M8)["ask-wizard__body"])},[A.value.variant==="card"?(o.openBlock(),o.createBlock(o.unref(z8),{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(V8),{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(q8),{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":E.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(N8,{"back-label":t.backLabel,"can-continue":v.value,"can-go-back":d.value>0,"can-submit":v.value,"current-step":d.value,"is-last-step":_.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))}}),Ri={"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"},LD=["aria-activedescendant"],ID=["id","aria-selected","onClick","onFocusin"],q8=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(Ri)["single-select"])},[o.createElementVNode("div",{role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:o.normalizeClass(o.unref(Ri)["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(Ri)["single-select__item"],{[o.unref(Ri)["single-select__item--selected"]]:a.value===g.value,[o.unref(Ri)["single-select__item--focused"]]:g.value===d.highlightedValue}]),onClick:w=>f(g.value),onFocusin:w=>i("option-focus",g.value)},[o.createElementVNode("span",{class:o.normalizeClass(o.unref(Ri)["single-select__label"])},o.toDisplayString(g.label),3),g.description?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(Ri)["single-select__description"])},o.toDisplayString(g.description),3)):o.createCommentVNode("",!0)],42,ID))),128)),d.allowCustom?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass([o.unref(Ri)["single-select__custom"],{[o.unref(Ri)["single-select__custom--selected"]]:s.value,[o.unref(Ri)["single-select__custom--focused"]]:d.customHighlighted}]),onFocusin:m[0]||(m[0]=g=>i("custom-focus"))},[o.createVNode(o.unref(As),{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,LD)],2))}}),Xn={"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"},OD=["aria-activedescendant"],ND=["id","aria-selected","onClick","onFocusin"],V8=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,w=>{a.value=[...w]}),o.watch(()=>t.customValue,w=>{u.value=w});const s=o.computed(()=>u.value.trim().length>0);function f(w){return a.value.includes(w)}function p(w){const R=new Set(a.value);R.has(w)?R.delete(w):R.add(w),a.value=[...R],i("update:modelValue",a.value),i("toggle",w)}const d=o.ref(null);function m(){var w,R;(R=(w=d.value)==null?void 0:w.querySelector("input"))==null||R.focus()}function g(w){const R=String(w);u.value=R,i("update:customValue",R),i("custom-input",R)}return(w,R)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Xn)["multi-select"])},[o.createElementVNode("div",{"aria-multiselectable":"true",role:"listbox",tabindex:"0","aria-activedescendant":r.value,class:o.normalizeClass(o.unref(Xn)["multi-select__options"])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w.options,A=>(o.openBlock(),o.createElementBlock("div",{id:`${w.inputId}-option-${A.value}`,key:A.value,role:"option","aria-selected":f(A.value),class:o.normalizeClass([o.unref(Xn)["multi-select__item"],{[o.unref(Xn)["multi-select__item--selected"]]:f(A.value),[o.unref(Xn)["multi-select__item--focused"]]:A.value===w.highlightedValue}]),onClick:_=>p(A.value),onFocusin:_=>i("option-focus",A.value)},[o.createElementVNode("span",{class:o.normalizeClass([o.unref(Xn)["multi-select__box"],{[o.unref(Xn)["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(Xn)["multi-select__label"])},o.toDisplayString(A.label),3)],42,ND))),128)),w.allowCustom?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"customRow",ref:d,class:o.normalizeClass([o.unref(Xn)["multi-select__custom"],{[o.unref(Xn)["multi-select__custom--selected"]]:s.value,[o.unref(Xn)["multi-select__custom--focused"]]:w.customHighlighted}]),onClick:m,onFocusin:R[0]||(R[0]=A=>i("custom-focus"))},[o.createElementVNode("span",{class:o.normalizeClass([o.unref(Xn)["multi-select__box"],{[o.unref(Xn)["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(As),{id:w.inputId,theme:"grey",class:o.normalizeClass(o.unref(Xn)["multi-select__custom-input"]),"helper-message-status":!1,"label-status":!1,"model-value":u.value,name:w.inputId,"placeholder-text":w.customPlaceholder,"prevent-xss":!1,onInput:g},null,8,["id","class","model-value","name","placeholder-text"])],34)):o.createCommentVNode("",!0)],10,OD)],2))}}),xs={"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"},PD=["aria-selected","onClick","onKeydown"],MD=["alt","src"],z8=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(xs)["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(xs)["card-select__card"],{[o.unref(xs)["card-select__card--selected"]]:s(g.value)}]),onClick:w=>f(g.value),onKeydown:[o.withKeys(o.withModifiers(w=>f(g.value),["prevent"]),["enter"]),o.withKeys(o.withModifiers(w=>f(g.value),["prevent"]),["space"])]},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(xs)["card-select__thumb"])},[g.imageUrl?(o.openBlock(),o.createElementBlock("img",{key:0,alt:g.label,class:o.normalizeClass(o.unref(xs)["card-select__image"]),src:g.imageUrl},null,10,MD)):o.renderSlot(d.$slots,"thumb",{key:1,option:g},()=>[o.createElementVNode("span",{class:o.normalizeClass(o.unref(xs)["card-select__placeholder"])},o.toDisplayString(p(g)),3)])],2),o.createElementVNode("span",{class:o.normalizeClass(o.unref(xs)["card-select__label"])},o.toDisplayString(g.label),3),g.description?(o.openBlock(),o.createElementBlock("span",{key:0,class:o.normalizeClass(o.unref(xs)["card-select__description"])},o.toDisplayString(g.description),3)):o.createCommentVNode("",!0)],42,PD))),128))],6))}});var Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qD(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function VD(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 H3={},i1={exports:{}};/**
|
|
159
159
|
* @license
|