@akropolys/kiku 2.2.2 → 2.2.4
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/EMBED.md +44 -0
- package/README.md +4 -0
- package/dist/chunk-NRT5W2SK.mjs +3 -0
- package/dist/chunk-NRT5W2SK.mjs.map +1 -0
- package/dist/embed/chunk-NMSSMVCV.js +37 -0
- package/dist/embed/embed.js +44 -0
- package/dist/embed/lazy-U2YUNGCD.js +37 -0
- package/dist/embed/meta.json +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/kiku.js +47 -0
- package/dist/lazy-7F2WZMLO.mjs +39 -0
- package/dist/lazy-7F2WZMLO.mjs.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +68 -65
- package/dist/chunk-RWGHGIF7.mjs +0 -3
- package/dist/chunk-RWGHGIF7.mjs.map +0 -1
- package/dist/lazy-HMHFTX2M.mjs +0 -39
- package/dist/lazy-HMHFTX2M.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
"use strict";var Ih=Object.create;var ea=Object.defineProperty;var Ah=Object.getOwnPropertyDescriptor;var Ph=Object.getOwnPropertyNames;var Fh=Object.getPrototypeOf,_h=Object.prototype.hasOwnProperty;var Se=(e,r)=>()=>(e&&(r=e(e=0)),r);var bs=(e,r)=>{for(var t in r)ea(e,t,{get:r[t],enumerable:!0})},fs=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Ph(r))!_h.call(e,a)&&a!==t&&ea(e,a,{get:()=>r[a],enumerable:!(n=Ah(r,a))||n.enumerable});return e};var Ut=(e,r,t)=>(t=e!=null?Ih(Fh(e)):{},fs(r||!e||!e.__esModule?ea(t,"default",{value:e,enumerable:!0}):t,e)),Dh=e=>fs(ea({},"__esModule",{value:!0}),e);function Wt(e,r){return e.details??(e.fields?(0,ks.resolveDisplayFields)(e.fields,r).details:[])}function Va(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}var ks,dn=Se(()=>{"use strict";ks=require("@akropolys/sdk")});function gs(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=gs(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function xs(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=gs(e))&&(n&&(n+=" "),n+=r);return n}var vs=Se(()=>{"use strict"});function de(...e){return xs(e)}var vt=Se(()=>{"use strict";vs()});function ta(){try{return localStorage.getItem(Cs)!=="off"}catch{return!0}}function Ss(e){try{localStorage.setItem(Cs,e?"on":"off")}catch{}e&&xr()}function xr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(qe){qe.state==="suspended"&&qe.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{qe=new e({latencyHint:"interactive"}),Jt=qe.createGain(),Jt.gain.value=.28,Jt.connect(qe.destination);let r=qe.createBuffer(1,1,qe.sampleRate),t=qe.createBufferSource();t.buffer=r,t.connect(qe.destination),t.start(0),qe.resume().catch(()=>{})}catch{qe=null}}function Qt(e,r,t,n,a){if(!qe||!Jt)return;let o=qe.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let i=qe.createBiquadFilter();i.type="lowpass",i.Q.value=.9,i.frequency.setValueAtTime(Math.min(18e3,r*7),e),i.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=qe.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),o.connect(i),i.connect(c),c.connect(Jt),o.start(e),o.stop(e+n+.02)}function Ms(e,r){if(!qe||!Jt)return;let t=Math.floor(qe.sampleRate*.03),n=qe.createBuffer(1,t,qe.sampleRate),a=n.getChannelData(0);for(let s=0;s<t;s++)a[s]=(Math.random()*2-1)*Math.pow(1-s/t,3);let o=qe.createBufferSource();o.buffer=n;let i=qe.createBiquadFilter();i.type="bandpass",i.frequency.value=2600,i.Q.value=5;let c=qe.createGain();c.gain.value=r,o.connect(i),i.connect(c),c.connect(Jt),o.start(e)}function Ts(){return ta()?qe?qe.state:"unsupported":"off"}function Bh(e){!qe||!Jt||(Qt(e,587.33,.985,.16,.38),Qt(e+.048,739.99,.985,.18,.42),Qt(e+.096,880,.985,.28,.46),Qt(e+.105,1174.66,.985,.22,.22),Ms(e+.096,.16))}function Hh(e){!qe||!Jt||Qt(e,659.25,.97,.09,.26)}function Ot(e,r=!1){if(!r&&!ta()||(xr(),!qe||!Jt||qe.state==="closed"))return;qe.state==="suspended"&&qe.resume().catch(()=>{});let t=qe.currentTime+.01;switch(e){case"connect":Bh(t);break;case"heard":Hh(t);break;case"reply":Qt(t,440,.94,.13,.5),Qt(t+.09,660,.94,.16,.42);break;case"interrupt":Qt(t,520,.62,.17,.4);break;case"send":Qt(t,300,1.16,.1,.22);break;case"pin":Ms(t,.35),Qt(t+.02,880,.97,.07,.22);break}}var Cs,qe,Jt,Wr=Se(()=>{"use strict";Cs="hsk-sounds",qe=null,Jt=null});function ra(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}var ja=Se(()=>{"use strict"});function Ya(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function $h(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function Xa(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}function Uh(e,r){(0,Ka.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=Ya(e);if(Ft.set(e,(Ft.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(Ft.get(e)??1)-1;if(n>0){Ft.set(e,n);return}Ft.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Ls(e){let r=Es(e.family);return r?e.faces.map(t=>{let n=Xa(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${zs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Rs(t.unicodeRange)?`unicode-range:${Rs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function Qa(e){let r=e?.faces??[],t=e&&r.length?Ls(e):"";Uh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function _t(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Ls(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Ft.set(n,(Ft.get(n)??0)+1);let a=Ya(n);if(!document.getElementById(a)){let o=document.createElement("style");o.id=a,o.textContent=t,document.head.appendChild(o)}if(r>0){let o=document.fonts,i=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(o||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===i),s=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=Xa(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(i,`url(${h})`,{weight:zs(l.weight),style:"normal"}).load().then(u=>{document.fonts?.add(u)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(s),new Promise(l=>setTimeout(l,r))])}}function Is(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function Ja(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Is(e,r);if(!t?.check||!n||!a)return!0;try{return Ns.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function Za(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Is(e,r);!a||!o||await Promise.race([Promise.all(Ns.map(i=>n.load(`${i} 16px ${o}`,a).catch(()=>{}))),new Promise(i=>setTimeout(i,t))])}function na(e){let r=typeof e=="object"&&e?e:void 0,t=Es(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",o=n.bold??"",i=n.variable??"";(0,Ka.useEffect)(()=>{if(!t||!a&&!o&&!i)return;let c=i?[["100 900",i]]:[["400",a],["700",o]],s=[];for(let[u,p]of c){if(!p)continue;let k=Xa(p);if(!k)continue;let g=$h(k);s.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${u};font-display:swap;src:url(${k})${g?` format("${g}")`:""};}`)}if(s.length===0)return;let l=s.join(""),h=`${t}|${a}|${o}|${i}`,d=Ya(h,"hsk-host-font");if(Ft.set(h,(Ft.get(h)??0)+1),!document.getElementById(d)){let u=document.createElement("style");u.id=d,u.textContent=l,document.head.appendChild(u)}return()=>{let u=(Ft.get(h)??1)-1;if(u>0){Ft.set(h,u);return}Ft.delete(h),document.getElementById(d)?.remove()}},[t,a,o,i])}var Ka,Ft,Es,qh,Rs,zs,Ns,pn=Se(()=>{"use strict";Ka=require("react"),Ft=new Map;Es=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),qh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Rs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>qh.test(t))?"":r.join(", ")},zs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";Ns=["400","500","600","700"]});var $,Wh,vr,As,Ps,Fs,Or,aa,oa,_s,sa,Ds,Bs,ia,eo,Hs,un,ca,Er,zr,mn,$s,to,qs,Us,Ws,Os,Gs,Vs,js,Ks,Ys,Dt=Se(()=>{"use strict";vt();$=require("react/jsx-runtime"),Wh=({className:e,size:r=18,tight:t=!1})=>(0,$.jsx)("svg",{className:de("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:(0,$.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,$.jsx)("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),(0,$.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),vr=Wh,As=()=>(0,$.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,$.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,$.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]}),Ps=()=>(0,$.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),Fs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$.jsx)("path",{d:"M8 5v14l11-7z"})}),Or=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),aa=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m15 18-6-6 6-6"})}),oa=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m9 18 6-6-6-6"})}),_s=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,$.jsx)("path",{d:"M3 3v5h5"}),(0,$.jsx)("path",{d:"M12 7v5l4 2"})]}),sa=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),Ds=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 6h18"}),(0,$.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]}),Bs=()=>(0,$.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,$.jsx)("path",{d:"M12 5v14M5 12h14"})}),ia=({size:e=18}={})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>(0,$.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),eo=()=>(0,$.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),Hs=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,$.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,$.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),un=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:de("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,$.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ca=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:de("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),(0,$.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Er=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:de("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,$.jsx)("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),zr=({className:e,size:r=13}={})=>(0,$.jsx)("svg",{className:de("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),mn=({className:e,size:r=18}={})=>(0,$.jsxs)("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),(0,$.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),$s=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,$.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,$.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,$.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,$.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),to=({active:e})=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,$.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),qs=()=>(0,$.jsxs)("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,$.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Us=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,$.jsxs)("g",{className:"hsk-sun-rays",children:[(0,$.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,$.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,$.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,$.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,$.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,$.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,$.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,$.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Ws=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),Os=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),Gs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),Vs=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,$.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),js=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,$.jsx)("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]}),Ks=({size:e=11})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ys=({className:e,size:r=16,filled:t=!1}={})=>(0,$.jsxs)("svg",{className:de("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,$.jsx)("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]})});function ro(e){return typeof e=="string"&&Lr.some(r=>r.id===e)}function no(e){return Lr.find(r=>r.id===e)??Lr[0]}var Lr,Xs,ao=Se(()=>{"use strict";Dt();Lr=[{id:"light",label:"Silver",Icon:Us,dark:!1},{id:"dark",label:"Onyx",Icon:Ws,dark:!0},{id:"mahogany",label:"Mahogany",Icon:Os,dark:!0},{id:"blush",label:"Blush",Icon:Gs,dark:!1},{id:"coffee",label:"Coffee",Icon:Vs,dark:!1},{id:"midnight",label:"Midnight",Icon:js,dark:!0}],Xs="coffee"});function Oh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Gh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,i=0,c=null,s=0,l=d=>{let u=Math.min(.032,(d-s)/1e3)||.016666666666666666;s=d;let p=Math.max(1,Math.ceil(u/.008)),k=u/p;for(let g=0;g<p;g++){let b=-e*(a-i)-r*o;o+=b*k,a+=o*k}if(Math.abs(a-i)<.5&&Math.abs(o)<.5){a=i,o=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(s=performance.now(),c=requestAnimationFrame(l))};return{track(d){c!==null&&(cancelAnimationFrame(c),c=null),a=d,o=0,t(a)},to(d,u=0){i=d,o=u,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function Qs({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=(0,la.useRef)(t);o.current=t,(0,la.useEffect)(()=>{if(!a)return;let i=e();if(!i||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,s=0,l=0,h=0,d=-1,u=0,p=0,k=0,g=!1,b=!1,f=Gh({onFrame:C=>{i.style.transform=C===0?"":`translate3d(0, ${C}px, 0)`;let B=i.parentElement;B&&(B.style.opacity=C===0?"":String(Math.max(.35,1-C/(i.offsetHeight||1)*1.1)))},onRest:()=>{i.style.willChange="",b&&(b=!1,o.current())}}),N=()=>{let C=r();return C&&C.scrollTop>0?!1:n?n():!0},M=C=>{C.pointerType==="mouse"||!C.isPrimary||(c=!1,g=!1,d=C.pointerId,s=u=C.clientY,l=C.clientX,p=C.timeStamp,k=0,h=f.value)},E=C=>{if(C.pointerId!==d)return;let B=C.clientY-s,X=C.clientX-l;if(!g){if(Math.abs(B)<6&&Math.abs(X)<6)return;if(g=!0,c=B>0&&Math.abs(B)>Math.abs(X)&&N(),c){try{i.setPointerCapture(C.pointerId)}catch{}f.stop(),i.style.animation="none",i.style.willChange="transform"}}if(!c)return;let T=C.timeStamp-p;T>0&&(k=(C.clientY-u)/T*1e3),u=C.clientY,p=C.timeStamp;let P=h+B;f.track(P<0?-Oh(-P,i.offsetHeight||1):P),C.cancelable&&C.preventDefault()},F=C=>{if(C.pointerId!==d)return;try{i.hasPointerCapture(C.pointerId)&&i.releasePointerCapture(C.pointerId)}catch{}if(d=-1,!c)return;c=!1;let B=i.offsetHeight||1;f.value+k*.12>B*.3||k>900?(b=!0,i.style.pointerEvents="none",f.to(B,k)):f.to(0,k)};return i.addEventListener("pointerdown",M,{passive:!0}),i.addEventListener("pointermove",E,{passive:!1}),i.addEventListener("pointerup",F,{passive:!0}),i.addEventListener("pointercancel",F,{passive:!0}),()=>{f.stop(),i.removeEventListener("pointerdown",M),i.removeEventListener("pointermove",E),i.removeEventListener("pointerup",F),i.removeEventListener("pointercancel",F),i.style.transform="",i.style.willChange="",i.style.animation="",i.style.pointerEvents="";let C=i.parentElement;C&&(C.style.opacity="")}},[a,e,r,n])}var la,Js=Se(()=>{"use strict";la=require("react")});function bn(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function ha(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return bn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let o=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let i=document.createElement("canvas");i.width=n,i.height=a;let c=i.getContext("2d");if(!c)return bn(e);c.drawImage(o,0,0);let s=e.type==="image/png",l=await new Promise(h=>i.toBlob(h,s?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?bn(e):bn(l)}finally{o.close?.()}}catch{return bn(e)}}var oo=Se(()=>{"use strict"});function Vh(e){let r=0;for(let t=1;t<e.length;t++)r+=Zs(e[t-1],e[t]);return r}function so(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let o of e)o.x<r&&(r=o.x),o.y<t&&(t=o.y),o.x>n&&(n=o.x),o.y>a&&(a=o.y);return{minX:r,minY:t,maxX:n,maxY:a}}function io(e,r,t){return[Gr(e.minY/t*1e3),Gr(e.minX/r*1e3),Gr(e.maxY/t*1e3),Gr(e.maxX/r*1e3)]}function jh(e,r){let[t,n,a,o]=e,[i,c,s,l]=r,h=Math.min(o,l)-Math.max(n,c),d=Math.min(a,s)-Math.max(t,i);if(h<=0||d<=0)return!1;let u=Math.min((o-n)*(a-t),(l-c)*(s-i));return u>0&&h*d/u>.35}function Yh(e,r,t){if(e.length<2)return null;let n=so(e),a=io(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let i=Vh(e),c=Zs(e[0],e[e.length-1]),s=i/Math.max(c,1e-6);return c/o<.3&&i>o*1.8?{gesture:"ring",box:a,straight:!1}:s<1.25?{gesture:"arrow",box:a,to:[Gr(e[e.length-1].y/t*1e3),Gr(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function ei(e,r,t){if(!r||!t)return[];let n=[],a=[],o=[];for(let s of e){if(s.kind==="pin"&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};o.push({gesture:"pin",id:s.id,text:s.label,box:io(so([l,l]),r,t)});continue}if(s.kind==="text"&&s.value&&typeof s.x=="number"&&typeof s.y=="number"){let l={x:s.x,y:s.y};a.push({gesture:"text",box:io(so([l,l]),r,t),text:s.value});continue}if(s.kind==="stroke"&&s.tool!=="eraser"&&s.points){let l=Yh(s.points,r,t);l&&n.push(l)}}let i=new Set,c=[];for(let s=0;s<n.length;s++){if(i.has(s))continue;let l=n[s];for(let h=s+1;h<n.length;h++)i.has(h)||!l.straight||!n[h].straight||jh(l.box,n[h].box)&&(i.add(h),l={gesture:"cross",box:Kh(l.box,n[h].box),straight:!1});i.add(s),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...o,...c,...a]}var Zs,Gr,Kh,ti=Se(()=>{"use strict";Zs=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);Gr=e=>Math.max(0,Math.min(1e3,Math.round(e)));Kh=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])]});function Zh(e,r,t){let n=[],a="";for(let o of r.split(/\s+/)){let i=a?`${a} ${o}`:o;a&&e.measureText(i).width>t?(n.push(a),a=o):a=i}return a&&n.push(a),n.slice(0,3)}function ed(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function ni({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=(0,st.useState)(null),[i,c]=(0,st.useState)(!1),[s,l]=(0,st.useState)("pin"),h=(0,st.useRef)(0),[d,u]=(0,st.useState)(null),p=(0,st.useRef)(null),[k,g]=(0,st.useState)([{points:[],closed:!1}]),b=k[k.length-1],z=(0,st.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),f=(0,st.useRef)(null),N=x=>g(R=>[...R.slice(-66),x]),M=s==="select",[E,F]=(0,st.useState)([]),[C,B]=(0,st.useState)(!1),X=(0,st.useRef)(null),T=(0,st.useRef)(null);(0,st.useEffect)(()=>{let x=new Image;return x.crossOrigin="anonymous",x.onload=()=>o(x),x.onerror=()=>c(!0),x.src=e,()=>{x.onload=null,x.onerror=null}},[e]);let P=(()=>{if(!a)return{w:0,h:0};let x=Math.min(1,Xh/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*x),h:Math.round(a.naturalHeight*x)}})(),G=(0,st.useRef)(null),D=x=>{let R=X.current;if(!R||!a)return;let m=R.getContext("2d");if(!m)return;G.current||(G.current=document.createElement("canvas"));let ae=G.current;ae.width=R.width,ae.height=R.height;let q=ae.getContext("2d"),H=x?[...E,x]:E;for(let y of H)y.kind==="stroke"&&(q.save(),q.globalCompositeOperation=y.tool==="eraser"?"destination-out":"source-over",q.strokeStyle=ri,q.lineWidth=y.tool==="eraser"?y.size*3:y.size,q.lineCap="round",q.lineJoin="round",q.beginPath(),y.points.forEach((I,U)=>U===0?q.moveTo(I.x,I.y):q.lineTo(I.x,I.y)),y.points.length===1&&q.lineTo(y.points[0].x+.01,y.points[0].y),q.stroke(),q.restore());m.clearRect(0,0,R.width,R.height),m.drawImage(a,0,0,R.width,R.height),m.drawImage(ae,0,0);let w=b.points.map((y,I)=>f.current?.index===I?f.current.point:y);w.length&&(m.save(),m.beginPath(),w.forEach((y,I)=>I?m.lineTo(y.x,y.y):m.moveTo(y.x,y.y)),b.closed&&(m.closePath(),m.fillStyle="#22c55e33",m.fill()),m.strokeStyle="#22c55e",m.lineWidth=Math.max(2,P.w/400),m.stroke(),m.restore());for(let y of w)m.beginPath(),m.arc(y.x,y.y,Math.max(3,P.w/260),0,Math.PI*2),m.fillStyle="#ffffff",m.fill(),m.strokeStyle="#15803d",m.stroke();for(let y of H){if(y.kind!=="pin")continue;let I=y.size;if(m.save(),m.beginPath(),m.moveTo(y.x,y.y),m.bezierCurveTo(y.x-I*2,y.y-I*2,y.x-I,y.y-I*3.5,y.x,y.y-I*3.5),m.bezierCurveTo(y.x+I,y.y-I*3.5,y.x+I*2,y.y-I*2,y.x,y.y),m.fillStyle=ri,m.fill(),m.lineWidth=Math.max(1,I/7),m.strokeStyle="#fff",m.stroke(),m.beginPath(),m.arc(y.x,y.y-I*2.2,I*.5,0,Math.PI*2),m.fillStyle="#fff",m.fill(),y.label){m.font=`600 ${I*1.2}px system-ui, sans-serif`,m.textAlign="center",m.textBaseline="middle";let U=Zh(m,y.label,R.width*.32),ce=I*1.5,ge=Math.min(R.width,Math.max(...U.map(Z=>m.measureText(Z).width))+I),me=U.length*ce+I*.4,ue=Math.max(ge/2,Math.min(R.width-ge/2,y.x)),j=Math.max(me,y.y-I*3.7);m.fillStyle="rgba(0,0,0,.8)",m.fillRect(ue-ge/2,j-me,ge,me),m.fillStyle="#fff",U.forEach((Z,we)=>m.fillText(Z,ue,j-me+I*.2+ce*(we+.5),ge-I))}m.restore()}};(0,st.useEffect)(()=>{D()},[a,E,b,P.w,P.h]);let Y=x=>{let R=X.current,m=R.getBoundingClientRect();return{x:Math.max(0,Math.min(R.width,(x.clientX-m.left)/m.width*R.width)),y:Math.max(0,Math.min(R.height,(x.clientY-m.top)/m.height*R.height))}},xe=()=>Math.max(4,Math.round(P.w/180)),se=x=>{F(R=>R.filter(m=>m.kind!=="pin"||m.id!==x)),u(null)},V=()=>{let x=E.find(R=>R.kind==="pin"&&R.id===d);x?.kind==="pin"&&!x.label.trim()?se(x.id):u(null)},te=x=>{if(!a)return;let R=Y(x);if(s==="pin"){let m=E.find(H=>H.kind==="pin"&&Math.hypot(R.x-H.x,R.y-(H.y-H.size*1.7))<H.size*2);if(m?.kind==="pin"){u(m.id),x.currentTarget.setPointerCapture(x.pointerId),p.current={id:m.id,offset:{x:R.x-m.x,y:R.y-m.y}};return}if(d){V();return}if(E.filter(H=>H.kind==="pin").length>=Qh)return;let ae=`pin-${++h.current}`,q=Math.max(10,P.w/X.current.getBoundingClientRect().width*9);F(H=>[...H,{kind:"pin",...R,id:ae,label:"",size:q}]),u(ae);return}if(s==="select"){let m=b.points[0],ae=X.current.getBoundingClientRect(),q=12*P.w/ae.width;if(!b.closed&&m&&b.points.length>=3&&Math.hypot(R.x-m.x,R.y-m.y)<q)N({...b,closed:!0});else{let H=b.points.findIndex(w=>Math.hypot(R.x-w.x,R.y-w.y)<q);if(H>=0){x.currentTarget.setPointerCapture(x.pointerId),f.current={index:H,point:R};return}if(b.closed||b.points.length>=64)return;N({...b,points:[...b.points,R]})}return}x.target.setPointerCapture(x.pointerId),T.current={kind:"stroke",tool:s,size:xe(),points:[R]},D(T.current)},O=x=>{if(p.current){let{id:R,offset:m}=p.current,ae=Y(x);F(q=>q.map(H=>H.kind==="pin"&&H.id===R?{...H,x:Math.max(0,Math.min(P.w,ae.x-m.x)),y:Math.max(0,Math.min(P.h,ae.y-m.y))}:H));return}if(f.current){f.current.point=Y(x),D();return}T.current&&(T.current.points.push(Y(x)),D(T.current))},_=()=>{if(p.current){p.current=null;return}if(f.current){let{index:R,point:m}=f.current;f.current=null,N({...b,points:b.points.map((ae,q)=>q===R?m:ae)});return}if(!T.current)return;let x=T.current;T.current=null,F(R=>[...R,x])},J=E.filter(x=>x.kind==="pin"),S=J.find(x=>x.id===d),L=!!a&&!(b.points.length>0&&!b.closed)&&J.length>0&&J.every(x=>x.label.trim()),A=()=>{if(!(!L||!a))try{let x=document.createElement("canvas");x.width=P.w,x.height=P.h;let R=x.getContext("2d");if(!R){B(!0);return}R.drawImage(a,0,0,P.w,P.h);let m=x.toDataURL("image/jpeg",.92),ae=X.current?.toDataURL("image/jpeg",.85)||m,q=ei(E,P.w,P.h);if(b.closed){let H=y=>Math.round(y/P.w*1e3),w=y=>Math.round(y/P.h*1e3);q.unshift({gesture:"selection",id:z.current,box:[w(Math.min(...b.points.map(y=>y.y))),H(Math.min(...b.points.map(y=>y.x))),w(Math.max(...b.points.map(y=>y.y))),H(Math.max(...b.points.map(y=>y.x)))],points:b.points.map(y=>[H(y.x),w(y.y)])})}t(m,J.map(H=>H.label.trim()).join("; "),q,ae)}catch{B(!0)}},K=s==="pin"?"markupPinHint":s==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,Ke.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,Ke.jsxs)("div",{className:"hsk-markup-head",children:[(0,Ke.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(K)}),(0,Ke.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,Ke.jsx)("div",{className:"hsk-markup-stage",children:i?(0,Ke.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,Ke.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,Ke.jsx)("canvas",{ref:X,width:P.w,height:P.h,className:`hsk-markup-canvas hsk-markup-canvas--${s}`,style:{touchAction:"none",cursor:M||s==="pin"?"crosshair":void 0},onPointerDown:te,onPointerMove:O,onPointerUp:_,onPointerCancel:()=>{p.current=null,f.current=null,T.current=null,D()}}),s==="pin"&&S&&(0,Ke.jsxs)("div",{className:"hsk-markup-pinlabel",style:ed(S.x/P.w*100,Math.max(12,(S.y-S.size*4)/P.h*100)),children:[(0,Ke.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:S.label,maxLength:Jh,style:{width:`${Math.min(34,Math.max(16,S.label.length+2))}ch`},onChange:x=>F(R=>R.map(m=>m.kind==="pin"&&m.id===S.id?{...m,label:x.target.value}:m)),onKeyDown:x=>{(x.key==="Enter"||x.key==="Escape")&&V()}}),(0,Ke.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>se(S.id),children:"\xD7"})]})]}):(0,Ke.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,Ke.jsxs)("div",{className:"hsk-markup-tools",children:[(0,Ke.jsxs)("button",{className:`hsk-markup-tool${s==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,Ke.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[(0,Ke.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,Ke.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,Ke.jsx)("button",{className:`hsk-markup-tool${s==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{u(null),l("select")},children:n("markupSelect")}),(0,Ke.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>N({...b,closed:!0}),children:n("markupCloseOutline")}),(0,Ke.jsx)("button",{className:`hsk-markup-tool${s==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{u(null),l("pen")},children:n("markupSketch")}),(0,Ke.jsx)("button",{className:`hsk-markup-tool${s==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{u(null),l("eraser")},children:n("markupEraser")}),(0,Ke.jsx)("button",{className:"hsk-markup-tool",onClick:()=>M?g(x=>x.length>1?x.slice(0,-1):x):F(x=>x.slice(0,-1)),disabled:M?k.length<2:E.length===0,children:n("markupUndo")}),(0,Ke.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{F([]),u(null),g([{points:[],closed:!1}]),l("pin")},disabled:E.length===0&&!b.points.length,children:n("markupClear")}),(0,Ke.jsx)("button",{className:"hsk-markup-go",onClick:A,disabled:!L,children:n("markupSend")})]}),C&&(0,Ke.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var st,Ke,ri,Xh,Qh,Jh,ai=Se(()=>{"use strict";st=require("react");ti();Ke=require("react/jsx-runtime"),ri="#ff5a5a",Xh=1280,Qh=4,Jh=80});function pi(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function kn(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function td(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,o)=>t[(o&255)*256+(a&255)];return(a,o)=>{let i=Math.floor(a),c=Math.floor(o),s=oi(a-i),l=oi(o-c),h=n(i,c),d=n(i+1,c),u=n(i,c+1),p=n(i+1,c+1);return(h+(d-h)*s)*(1-l)+(u+(p-u)*s)*l}}function rd(e,r,t,n){let a=t/Math.SQRT2,o=Math.ceil(e/a),i=Math.ceil(r/a),c=new Int32Array(o*i).fill(-1),s=[],l=[],h=(u,p)=>{let k=s.length;s.push([u,p]),c[Math.floor(p/a)*o+Math.floor(u/a)]=k,l.push(k)},d=(u,p)=>{if(u<0||p<0||u>=e||p>=r)return!1;let k=Math.floor(u/a),g=Math.floor(p/a);for(let b=Math.max(g-2,0);b<=Math.min(g+2,i-1);b++)for(let z=Math.max(k-2,0);z<=Math.min(k+2,o-1);z++){let f=c[b*o+z];if(f<0)continue;let N=s[f][0]-u,M=s[f][1]-p;if(N*N+M*M<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let u=n()*l.length|0,[p,k]=s[l[u]],g=!1;for(let b=0;b<24;b++){let z=n()*Math.PI*2,f=t*(1+n()),N=p+Math.cos(z)*f,M=k+Math.sin(z)*f;if(d(N,M)){h(N,M),g=!0;break}}g||l.splice(u,1)}return s}function lo(e,r,t){let n=ci(e),a=ci(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}function uo(){for(let e of po)e()}function ui(e){ho.forEach(r=>r(e))}function sd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function mi(e,r,t,n,a,o,i,c=r){let s=i?nd[i]:void 0,l=kn(a),h=td(kn(a^2654435769)),d=e*r,p=Math.max(40,Math.min(520,Math.round(d/3100)))/.48,k=Math.max(26,Math.sqrt(.7*d/p)),g=rd(e,r,k,l),b=4.4/Math.max(e,r),z=b*2.6,f=Math.hypot(e,r),N=l()*Math.PI*2,M=Math.cos(N),E=Math.sin(N),F=e*(.18+l()*.64),C=r*(.12+l()*.5),B=[],X=Math.hypot(e,r)||1,T=kn(a^1540483477),P=o?e:0,G=Math.hypot(e,c)||1,[D,Y,xe]=t.split(",").map(V=>parseFloat(V)||0),se=.2126*D+.7152*Y+.0722*xe>128;for(let[V,te]of g){let O=h(V*b,te*b)*.72+h(V*z,te*z)*.28,_=Math.min(1,Math.max(0,(O-.26)/.44));if(l()>_*_*(3-2*_))continue;let J=l(),S=Math.max(0,1-Math.hypot(V-F,te-C)/(f*.72))**1.6,L=((V-e/2)*M+(te-r/2)*E)/f+.5,A=!se,x=((A?.055:.028)+l()*(A?.04:.025))*(.75+L*.55)*(1+S*.4),R=lo(t,n,S*.85),m=((o?e-V:V)+r-te)/(e+r||1),ae=l()*16777215|0,q=sd(ae,m,se),H=0,w=A?1.05+l()*.35:.65+l()*.35,y=20,I=co[0],U=1;J<.5?(H=it(l,.16),w=A?1.15+l()*.45:.7+l()*.35,y=20+l()*16,I=co[l()*co.length|0]):J<.82?(H=l()*Math.PI*2,w=A?.95+l()*.4:.6+l()*.4,y=16+l()*20,I=si[l()*si.length|0]):J<.95||!s?(H=l()*Math.PI*2,w=A?.85+l()*.35:.55+l()*.35,y=7+l()*7,I=ii[l()*ii.length|0]):(H=it(l,.3),w=A?1.1+l()*.3:.75+l()*.3,y=15+l()*9,I=s,U=2.6),B.push({x:V,y:te,roll:J,rotation:H,lineWidth:w,alpha:x*U,baseColor:R,shimmerColor:q,drawFn:I,size:y,seed:ae,normDist:m,bloom:Math.min(1,Math.hypot(V-P,te-c)/G)*.62+T()*.08,glow:se?.2:.06,ux:(V-P)/(Math.hypot(V-P,te-c)||1),uy:(te-c)/(Math.hypot(V-P,te-c)||1)})}return B}function cd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Nr(e,r,t,n,a,o=1,i){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,s=c?a*1.4-.2:-999,l=.3;for(let h of r){let d=h.alpha,u=h.baseColor,p=h.lineWidth,k=1,g=0,b=0;if(i!==void 0){let f=Math.min(1,Math.max(0,(i-h.bloom)/id));if(f<=0)continue;let N=1-(1-f)**3,M=Math.sin(f*Math.PI)**2;d=h.alpha*N+M*h.glow,u=lo(h.baseColor,h.shimmerColor,M*(h.glow>.1?.85:.55)),p=h.lineWidth*(1+M*.35),k=.86+.14*cd(f),g=-h.ux*(1-N)*9,b=-h.uy*(1-N)*9}else if(c){let f=h.normDist-s;if(f>l)d=h.alpha*.45,u=h.baseColor,p=h.lineWidth;else if(f<-l)d=h.alpha,u=h.baseColor,p=h.lineWidth;else{let N=Math.cos(f/l*(Math.PI/2))**2;d=h.alpha+N*.08,u=N>.08?lo(h.baseColor,h.shimmerColor,N*.65):h.baseColor,p=h.lineWidth*(1+N*.2)}}e.save(),e.translate(h.x+(h.dx??0)+g,h.y+(h.dy??0)+b),e.rotate(h.rotation+(h.dr??0)),k!==1&&e.scale(k,k),h.hop&&(e.scale(1+h.hop,1+h.hop),d*=1+h.hop*2),e.globalAlpha=Math.min(d*o,1),e.strokeStyle=u,e.fillStyle=u,e.lineWidth=p;let z=kn(h.seed);h.drawFn(e,h.size,z),e.restore()}}function hd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,bt.useRef)(null);return(0,bt.useEffect)(()=>{let o=a.current,i=o?.getContext("2d");if(!o||!i)return;let c=0,s=()=>{let h=o.clientWidth,d=o.clientHeight,u=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*u),o.height=Math.round(d*u);let p=getComputedStyle(o),k=p.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",g=p.getPropertyValue("--hsk-doodle-tint").trim()||k,b=h*fn,z=d*fn,f=mi(b,z,k,g,pi(e||"kiku"),!1,r);for(let E of f)E.lineWidth*=fn*n;if(i.setTransform(u/fn,0,0,u/fn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(i,f,b,z,-1,t);return}let N=performance.now(),M=E=>{let F=(E-N)%(di*2)/di,C=F<1?F:2-F;Nr(i,f,b,z,(1-Math.cos(C*Math.PI))/2*1.4,t),c=requestAnimationFrame(M)};c=requestAnimationFrame(M)},l=new ResizeObserver(()=>{c||!o.clientWidth||!o.clientHeight||(l.disconnect(),s())});return l.observe(o),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,gn.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}function Vr({active:e,seed:r,theme:t}){let[n,a]=(0,bt.useState)(e);return(0,bt.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),dd);return()=>clearTimeout(o)},[e]),n?(0,gn.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,gn.jsx)(hd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var bt,gn,oi,it,co,si,ii,nd,ci,ho,po,ad,li,hi,od,id,ld,fn,di,dd,da,xn=Se(()=>{"use strict";bt=Ut(require("react")),gn=require("react/jsx-runtime");oi=e=>e*e*(3-2*e);it=(e,r)=>(e()-.5)*r,co=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),o=r*.07;e.beginPath(),e.moveTo(-a-o*.6,-n),e.lineTo(a+o*.6,-n),e.moveTo(-a,-n+o),e.lineTo(a,-n+o),e.moveTo(-a,-n+o),e.lineTo(-a*.85,n-o),e.moveTo(a,-n+o),e.lineTo(a*.85,n-o),e.moveTo(0,-n+o*1.7),e.lineTo(0,n-o*1.7),e.moveTo(-a,n-o),e.lineTo(a,n-o),e.moveTo(-a-o*.6,n),e.lineTo(a+o*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let o of[-.62,-.21,.21,.62])e.moveTo(n*o,a+n*.16),e.lineTo(n*o,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let o=0;o<a;o++){let i=.16+o/a*.8,c=-n*.9+i*n*1.8,s=n*.52-i*n*1.16+(1-i)*i*n*.3,l=o%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+h*.5,s+l*h*.66,c+h*.9,s+l*h*.08),e.quadraticCurveTo(c+h*.42,s+l*h*.04,c,s),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[o,i]of a)e.beginPath(),e.moveTo(o,i-n*.28),e.lineTo(o-n*.02,i-n*.16),e.stroke(),e.beginPath(),e.ellipse(o,i,n*(.15+t()*.04),n*.19,it(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let o=0;o<5;o++){let i=-1.05+o/4*2.1,c=Math.sin(i)*a*n*.72,s=Math.cos(i)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,s),e.quadraticCurveTo(c+a*l*.9,s-l*.5,c+a*l*.6,s-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let o=0;o<8;o++){let i=a+o/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(i)*n*.6,Math.sin(i)*n*.6),e.lineTo(Math.cos(i)*n*.94,Math.sin(i)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],si=[(e,r,t)=>{let n=r*.5,a=-n+it(t,n*.3),o=it(t,n);e.beginPath(),e.moveTo(a,o);let i=4+(t()*4|0);for(let c=0;c<i;c++){let s=a+n*2/i+it(t,n*.5),l=it(t,n*1.5);e.quadraticCurveTo(a+it(t,n*.9),o+it(t,n*1.6),s,l),a=s,o=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,o=t()<.5?-1:1;e.beginPath();for(let i=0;i<=60;i++){let c=i/60,s=o*c*a*Math.PI*2,l=n*c*(.9+it(t,.06)),h=Math.cos(s)*l,d=Math.sin(s)*l;i===0?e.moveTo(h,d):e.lineTo(h,d)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=it(t,.7);for(let i=0;i<a;i++){let c=-n+i/(a-1)*n*2+it(t,n*.16),s=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*s*.5,-s*.5),e.quadraticCurveTo(c+it(t,n*.2),0,c+o*s*.5,s*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),o=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let i=0;i<a;i++){let c=-n+i*o,s=o*(.42+t()*.18);e.bezierCurveTo(c+s*.2,n*.4-s*2.1,c+o-s*.2,n*.4-s*2.1,c+o,n*.4+it(t,n*.14))}e.stroke()}],ii=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(it(t,r*.04),it(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,it(t,r*.08)),e.quadraticCurveTo(0,it(t,r*.16),n,it(t,r*.08)),e.stroke()}],nd={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,o=n/10*Math.PI*2-Math.PI/2,i=Math.cos(o)*a,c=Math.sin(o)*a;n===0?e.moveTo(i,c):e.lineTo(i,c)}e.closePath(),e.stroke()}},ci=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};ho=new Set,po=new Set;ad=83,li=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],hi=7,od=.28;id=.3;ld=bt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,bt.useRef)(null),i=(0,bt.useRef)(!1),c=(0,bt.useRef)(0),s=(0,bt.useRef)(null),l=(0,bt.useRef)(0),h=(0,bt.useRef)(0),d=(0,bt.useRef)(a);return(0,bt.useEffect)(()=>{let u=o.current;if(!u)return;let p=pi(r||"kiku"),k=0,g=(T,P,G,D)=>Y=>{let xe=Y-T,se=Math.min(1,xe/P),V=u.clientWidth,te=u.clientHeight;if(V&&te){let O=Math.min(window.devicePixelRatio||1,3),_=Math.round(V*O),J=Math.round(te*O);(u.width!==_||u.height!==J)&&(u.width=_,u.height=J);let S=u.getContext("2d");S&&(S.setTransform(O,0,0,O,0,0),Nr(S,G,V,te,-1,1,se))}if(se<1)c.current=requestAnimationFrame(g(T,P,G,D));else{i.current=!1;let O=u.clientWidth,_=u.clientHeight,J=u.getContext("2d");if(J&&O&&_){let S=Math.min(window.devicePixelRatio||1,3);J.setTransform(S,0,0,S,0,0),Nr(J,G,O,_,-1)}}},b=()=>{let T=u.clientWidth,P=u.clientHeight;if(!T||!P)return;let G=Math.min(window.devicePixelRatio||1,3),D=u.getContext("2d");if(!D)return;let Y=getComputedStyle(u),xe=Y.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",se=Y.getPropertyValue("--hsk-doodle-tint").trim()||xe,V=n==="rtl"||Y.direction==="rtl"||u.closest('[dir="rtl"]')!==null,te=typeof window<"u"?Math.max(P,window.innerHeight||0):P,O=mi(T,te,xe,se,p,V,t,P);s.current=O,l.current=T,h.current=te;let _=Math.round(T*G),J=Math.round(P*G);if((u.width!==_||u.height!==J)&&(u.width=_,u.height=J),D.setTransform(G,0,0,G,0,0),d.current){D.clearRect(0,0,T,P);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Nr(D,O,T,P,-1);return}cancelAnimationFrame(c.current),i.current=!0;let L=1500,A=performance.now();c.current=requestAnimationFrame(g(A,L,O,V))},z=()=>{let T=s.current,P=u.clientWidth,G=u.clientHeight;if(T&&P===l.current&&G<=h.current){if(i.current||d.current||!G)return;let D=u.getContext("2d");if(!D)return;let Y=Math.min(window.devicePixelRatio||1,3);u.width=Math.round(P*Y),u.height=Math.round(G*Y),D.setTransform(Y,0,0,Y,0,0),Nr(D,T,P,G,-1);return}clearTimeout(k),k=window.setTimeout(b,20)};b();let f=()=>{d.current&&(d.current=!1,b())};po.add(f);let N=d.current?window.setTimeout(f,2e3):0,M=new ResizeObserver(z);M.observe(u);let E=window.matchMedia?.("(prefers-color-scheme: dark)"),F=()=>{b()};E?.addEventListener?.("change",F);let C=0,B=()=>{let T=s.current,P=u.getContext("2d"),G=u.clientWidth,D=u.clientHeight;if(!T||!P||!G||!D)return;let Y=Math.min(window.devicePixelRatio||1,3);P.setTransform(Y,0,0,Y,0,0),Nr(P,T,G,D,-1)},X=({x:T,y:P,strength:G})=>{let D=s.current;if(!D||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),i.current=!1,clearTimeout(C);let Y=u.getBoundingClientRect(),xe=T-Y.left,se=P-Y.top,V=kn(performance.now()*997|0),te=(S,L)=>Math.max(-L,Math.min(L,S)),O=D.map(S=>{let L=S.dx??0,A=S.dy??0,K=S.dr??0,x=S.x-xe,R=S.y-se,m=Math.hypot(x,R)||1,ae=G*(.18+.82*Math.exp(-m/220)),q=ae*(.6+V()*1.8),H=te(L+x/m*q+(V()-.5)*ae*2,hi),w=te(A+R/m*q+(V()-.5)*ae*2,hi),y=te(K+(V()-.5)*ae*.12,od);return{g:S,fx:L,fy:A,fr:K,tx:H,ty:w,tr:y,lift:ae*.09}}),_=0,J=()=>{let S=li[_];for(let L of O)L.g.dx=L.fx+(L.tx-L.fx)*S.k,L.g.dy=L.fy+(L.ty-L.fy)*S.k,L.g.dr=L.fr+(L.tr-L.fr)*S.k,L.g.hop=L.lift*S.hop;B(),++_<li.length&&(C=window.setTimeout(J,ad))};J()};return ho.add(X),()=>{ho.delete(X),po.delete(f),clearTimeout(N),clearTimeout(C),clearTimeout(k),cancelAnimationFrame(c.current),i.current=!1,M.disconnect(),E?.removeEventListener?.("change",F)}},[r,t,n]),(0,gn.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),fn=3,di=1800;dd=300;da=ld});function vn(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=ua.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(pa[n]?.endonym)return pa[n].endonym;let o=Object.values(pa).find(c=>c.endonym?.toLowerCase()===n);if(o?.endonym)return o.endonym;let i=r||(n.length<=3?n:void 0);if(i&&typeof Intl<"u"&&Intl.DisplayNames)try{let s=new Intl.DisplayNames([i],{type:"language"}).of(i);if(s&&s.toLowerCase()!==i.toLowerCase())return s}catch{}return t}function bi(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}function fi(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Ir(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(pa).find(([i,c])=>i===r||c.endonym?.toLowerCase()===r||vn(i)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||vn(e)||fi(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||bi(t[1].preparing),known:!0};let n=vn(e)||e,a=fi(n),o=bi(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}function gi(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(i=>n.includes(i)))return null;let o=t[0];return o.charAt(0).toUpperCase()+o.slice(1)}var mo,yn,ua,pa,wn,bo,yr,Tt,fo,wr,ki,xi,vi,ko,It=Se(()=>{"use strict";mo=Ut(require("react")),yn=[],ua=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];pa={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};wn=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],bo="hsk-live-voice",yr={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},Tt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Stay",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},fo=mo.default.createContext((e,r)=>{let t=Tt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),wr=()=>mo.default.useContext(fo);ki={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"},xi=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&ki[t])return r(ki[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},vi=()=>typeof window>"u"||window.isSecureContext!==!1,ko=15});function Ci(e){return e?wi.get(e)??null:null}function go(e){if(!e)return Promise.resolve(null);let r=yi.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(wi.set(e,n),_t(n,0).catch(()=>{})),n)).catch(()=>null);return yi.set(e,t),t}function Si(e,r,t){e&&(go(e),r&&Cn(e,r,t))}function Cn(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&_t(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var yi,wi,ma=Se(()=>{"use strict";pn();yi=new WeakMap,wi=new WeakMap});function jr(e){let r=e?pd[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function ud(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}function Ei({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,Ri.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,Tt)??n?.getCachedUIStrings?.(e,yr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[i,c]=(0,Je.useState)(()=>o),[s,l]=(0,Je.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,d]=(0,Je.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||jr(e)?.bcp47==="en"?e||"en":""),u=!e||jr(e)?.bcp47==="en",p=i;t&&Object.keys(t).length>0&&(p={...i,...t});let k=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[g,b]=(0,Je.useState)(()=>{if(a?.dir)return a.dir==="rtl";let S=jr(e);if(S)return S.dir==="rtl";if(Ir(e)?.rtl)return!0;if(typeof window>"u"||!k)return!1;try{return localStorage.getItem(k)==="rtl"}catch{return!1}}),[z,f]=(0,Je.useState)(()=>a?.bcp47||jr(e)?.bcp47||""),[N,M]=(0,Je.useState)(()=>a?.font??null),[E,F]=(0,Je.useState)(()=>Ci(n)),[C,B]=(0,Je.useState)(!0),[X,T]=(0,Je.useState)(!1),P=Je.default.useRef(e),[G,D]=(0,Je.useState)(e);if(e!==G){D(e);let S=jr(e);S&&(b(S.dir==="rtl"),f(S.bcp47));let L=e?n?.getCachedUIStrings?.(e,Tt)??n?.getCachedUIStrings?.(e,yr):null,A=t&&Object.keys(t).length>0?t:L?.strings;A&&Object.keys(A).length>0&&(c(A),p=A,L&&(L.font&&M(L.font),L.dir&&b(L.dir==="rtl"),L.bcp47&&f(L.bcp47)),L?.font&&_t(L.font),T(!Ja([L?.font?.family,E?.family].filter(K=>!!K),A)),d(e),l(!0))}let Y=u||!X&&(h.toLowerCase()===e.toLowerCase()&&s||Object.keys(p).length>0);(0,Je.useEffect)(()=>{if(!e){f(""),M(null),c({}),d(""),l(!0),b(!1);return}let S=jr(e),L=Ir(e),A=S?.bcp47==="en",K=!1,x=(q,H)=>{let w=[q?.family,E?.family].filter(y=>!!y);if(e===P.current||Ja(w,H)){T(!1);return}T(!0),Za(w,H,Mi).then(()=>{K||T(!1)})},R=n?.getCachedUIStrings?.(e,Tt);if(R?.strings&&Object.keys(R.strings).length>0)return c(R.strings),b(R.dir==="rtl"),f(R.bcp47||S?.bcp47||""),R.font&&(_t(R.font),M(R.font)),x(R.font,R.strings),d(e),l(!0),()=>{K=!0};let m=n?.getCachedUIStrings?.(e,yr);m?.strings&&Object.keys(m.strings).length>0?(c(m.strings),b(m.dir==="rtl"),f(m.bcp47||S?.bcp47||""),m.font&&(_t(m.font),M(m.font)),x(m.font,m.strings),d(e),l(!0)):(T(!1),c({}),S?(b(S.dir==="rtl"),f(S.bcp47)):L?.rtl&&b(!0),A||l(!1));let ae=async()=>{let q=!!m?.strings;try{if(!m?.strings){let w=await n.getUIStrings?.(e,yr);if(!K&&w?.complete){q=!0,T(!0),c(I=>({...I,...w.strings})),b(w.dir==="rtl"),f(w.bcp47||S?.bcp47||"");try{localStorage.setItem(k,w.dir)}catch{}w.font&&_t(w.font);let y=[w.font?.family,E?.family].filter(I=>!!I);await Za(y,w.strings,Mi),K||(w.font&&M(w.font),d(e),l(!0),T(!1))}}let H=await n.getUIStrings?.(e,Tt);!K&&H?.complete&&(q=!0,c(w=>({...w,...H.strings})),H.font&&(await _t(H.font,1200),K||M(H.font)))}catch{return!1}return q};return(async()=>{for(let q=0;!K&&!await ae();q++){let H=Ti[Math.min(q,Ti.length-1)];await new Promise(w=>window.setTimeout(w,H))}})(),()=>{K=!0}},[e,n,k]),(0,Je.useEffect)(()=>{let S=!1;return(async()=>{try{let L=await go(n);!S&&L&&F(L)}catch{}S||B(!0)})(),()=>{S=!0}},[n]),Qa(N),Qa(E);let xe=Je.default.useMemo(()=>{let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),A=/^var\(/i.test(L),K=L.replace(/^['"]|['"]$/g,""),x=A?ud(L):"",R=A?x?`${x}, `:"":K?`"${K}", `:"";if(N)return`"${N.family}", ${R}"Geist", system-ui, sans-serif`;let m=e?e.trim().toLowerCase():"";if(m==="japanese"||m==="ja"||m==="\u65E5\u672C\u8A9E")return`${R}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(m==="chinese"||m==="zh"||m==="\u4E2D\u6587")return`${R}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(m==="urdu"||m==="ur"||m==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${R}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(m==="arabic"||m==="ar"||m==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${R}"Geist", system-ui, sans-serif`;if(m==="hindi"||m==="hi"||m==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${R}"Geist", system-ui, sans-serif`},[N,e,typeof r=="object"&&r?r.fontFamily:void 0]),se=Je.default.useMemo(()=>{let S=0,L=0;for(let A of Object.values(i))for(let K of A){let x=K.codePointAt(0)??0;x<192||/\p{L}/u.test(K)&&(x<=591?S++:L++)}return L>S},[i]),[V,te]=(0,Je.useState)(0);(0,Je.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let S=!0;return document.fonts.ready.then(()=>{S&&te(L=>L+1)}),()=>{S=!1}},[N]);let O=Je.default.useMemo(()=>{if(!se||typeof document>"u")return!0;let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!L)return!1;let A="";for(let x of Object.values(i))if(x){A=x;break}if(!A)return!0;let K=A.replace(/\s+/g,"");if(!K)return!0;try{let R=document.createElement("canvas").getContext("2d");if(!R)return!0;let m=L.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(L.slice(4,-1).trim()).trim()||L;R.font=`16px ${m}, __akropolys_nonexistent_font__`;let ae=R.measureText(K).width;R.font="16px __akropolys_nonexistent_font__";let q=R.measureText(K).width;return Math.abs(ae-q)>1}catch{return!0}},[se,i,typeof r=="object"&&r?r.fontFamily:void 0,V]),_=(0,Je.useCallback)((S,L)=>{let A=p[S]||i[S]||Tt[S]||S;if(L)for(let[K,x]of Object.entries(L))A=A.split(`{${K}}`).join(x);return A},[p,i]),J=(0,Je.useCallback)((S,L)=>(p[S]||i[S]||Tt[S]||S).split(/(\{[a-zA-Z]+\})/g).map((K,x)=>{let R=K.match(/^\{([a-zA-Z]+)\}$/);return R&&L?.[R[1]]!==void 0?(0,xo.jsx)("bdi",{children:L[R[1]]},x):(0,xo.jsx)(Je.default.Fragment,{children:K},x)}),[p,i]);return{chromeStrings:i,chromeReady:Y,isRTL:g,speechLang:z,scriptFont:N,fontStack:xe,isNonLatin:se,hostFontCovers:O,baseFontReady:C,t:_,tNode:J}}var Je,Ri,xo,pd,Mi,Ti,zi=Se(()=>{"use strict";Je=Ut(require("react")),Ri=require("@akropolys/sdk");pn();ma();It();xo=require("react/jsx-runtime"),pd={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};Mi=5e3,Ti=[5e3,15e3,45e3,12e4]});function Li({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Ee.useRef)(null),o=(0,Ee.useRef)(0),[i,c]=(0,Ee.useState)(!1),[s,l]=(0,Ee.useState)(1),[h,d]=(0,Ee.useState)(0),u=(0,Ee.useRef)(()=>{}),p=(0,Ee.useRef)(null),k=(0,Ee.useRef)(!1),g=(0,Ee.useRef)(!0),b=(0,Ee.useRef)(!1),z=(0,Ee.useRef)(null),f=(0,Ee.useRef)(null),N=(0,Ee.useRef)(e.length),M=(0,Ee.useRef)(!1),E=(0,Ee.useRef)(()=>{}),F=(0,Ee.useRef)(()=>{}),C=(0,Ee.useRef)(null),B=(0,Ee.useRef)(()=>{}),[X,T]=(0,Ee.useState)(0),P=(0,Ee.useRef)(0),G=(0,Ee.useRef)(""),D=(0,Ee.useRef)(()=>{}),Y=(0,Ee.useRef)(()=>{});(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let y,I=()=>{clearTimeout(y),y=setTimeout(()=>{k.current=!1},150)},U=()=>{clearTimeout(y),k.current=!0,D.current()},ce=()=>{k.current&&I()};return w.addEventListener("touchstart",U,{passive:!0}),w.addEventListener("touchend",I,{passive:!0}),w.addEventListener("touchcancel",I,{passive:!0}),w.addEventListener("scroll",ce,{passive:!0}),()=>{clearTimeout(y),w.removeEventListener("touchstart",U),w.removeEventListener("touchend",I),w.removeEventListener("touchcancel",I),w.removeEventListener("scroll",ce)}},[]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let y=160,I=8,U=0,ce=()=>{U=0;let ue=z.current?.offsetHeight??0,j=w.scrollHeight-ue-w.scrollTop-w.clientHeight,Z=performance.now()-o.current<400;j<=I&&(!b.current||Z)&&(g.current||Y.current(),g.current=!0,b.current=!1,J.current()),c(j>y&&!g.current);let we=w.scrollHeight-w.clientHeight;l(we>8?Math.min(1,Math.max(0,w.scrollTop/we)):1);let $e=w.scrollTop+w.clientHeight*.33,ve=0;for(let _e=0;_e<n.current.length;_e++){let Oe=n.current[_e];Oe&&Oe.offsetTop<=$e&&(ve=_e)}d(ve)},ge=()=>{U||(U=requestAnimationFrame(ce))};ce(),w.addEventListener("scroll",ge,{passive:!0});let me=new ResizeObserver(()=>{f.current?E.current("sync"):g.current&&!k.current&&F.current(),ge()});me.observe(w);for(let ue of n.current)ue&&me.observe(ue);return()=>{U&&cancelAnimationFrame(U),w.removeEventListener("scroll",ge),me.disconnect()}},[e.length,n]);let xe=(0,Ee.useCallback)(w=>{let y=`${w}:${P.current}`;G.current!==y&&(G.current=y,T(I=>I+1))},[]),[se,V]=(0,Ee.useState)(!1),te=(0,Ee.useRef)(!1),O=(0,Ee.useCallback)(()=>{te.current||(te.current=!0,V(!0))},[]),_=(0,Ee.useCallback)(()=>{te.current&&(te.current=!1,V(!1))},[]),J=(0,Ee.useRef)(()=>{});J.current=_;let[S,L]=(0,Ee.useState)(!1),A=(0,Ee.useRef)(!1),K=(0,Ee.useRef)(0),x=(0,Ee.useCallback)(()=>{A.current=!1,L(!1)},[]),R=(0,Ee.useCallback)(()=>{G.current="",x(),_()},[x,_]),m=(0,Ee.useCallback)(()=>{A.current&&(performance.now()-K.current<700||x())},[x]);D.current=m,Y.current=R,(0,Ee.useEffect)(()=>{if(X===0)return;A.current=!0,K.current=performance.now(),L(!0);let w=setTimeout(x,4200);return()=>clearTimeout(w)},[X,x]);let ae=(0,Ee.useCallback)(()=>{M.current=!1,f.current&&(f.current=null,z.current&&(z.current.style.height=""))},[]);B.current=ae,F.current=()=>{let w=a.current;if(!w)return;let y=w.scrollHeight-w.clientHeight;C.current?C.current(y):w.scrollTop=y},E.current=w=>{let y=a.current,I=z.current,U=f.current,ce=Z=>{let we=w==="sync"?C.current:p.current;we?we(Z):y&&(y.scrollTop=Z)},ge=F.current;if(!y||!I||!U||!U.isConnected){ae(),g.current&&ge();return}let me=parseFloat(getComputedStyle(y).paddingTop)||0;I.offsetHeight<y.clientHeight&&(I.style.height=`${y.clientHeight}px`);let ue=Math.max(0,U.offsetTop-me),j=ue+y.clientHeight-(y.scrollHeight-I.offsetHeight);if(j<=0){ae(),g.current=!1,b.current=!0,ce(ue);return}j!==I.offsetHeight&&(I.style.height=`${j}px`),ce(ue)};let q=(0,Ee.useCallback)(w=>{let y=a.current,I=n.current[w];if(!y||!I)return;let U=I.offsetTop-Math.max(0,(y.clientHeight-I.clientHeight)/2),ce=Math.max(0,Math.min(y.scrollHeight-y.clientHeight,U));p.current?p.current(ce):y.scrollTo({top:ce,behavior:"smooth"})},[n]),H=(0,Ee.useCallback)(()=>{let w=a.current;if(!w)return;g.current=!0,b.current=!1,B.current(),Y.current();let y=w.scrollHeight-w.clientHeight;p.current?p.current(y):w.scrollTo({top:y,behavior:"smooth"})},[]);return(0,Ee.useLayoutEffect)(()=>{let w=a.current;if(!w)return;let y=e.slice(N.current);if(N.current=e.length,y.some(U=>U.role==="user")&&(g.current=!0,b.current=!1,Y.current(),f.current=null,M.current=!0),M.current){M.current=!1;for(let U=n.current.length-1;U>=0;U--){let ce=n.current[U];if(ce?.dataset.hskRole==="user"){f.current=ce;break}}if(f.current){E.current("glide");return}}if(f.current){E.current("glide");return}let I=w.scrollTop;if(!g.current)b.current||(O(),xe(e.length));else if(!k.current){F.current();return}w.scrollTop!==I&&u.current()},[e,r,t,n,xe,O]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let y=7,I=16,U=1/(window.devicePixelRatio||1),ce=ye=>Math.round(ye/U)*U,ge=w.scrollTop,me=w.scrollTop,ue=w.scrollTop,j=0,Z=null,we=ye=>{ye!==ue&&(w.scrollTop=ye,ue=w.scrollTop)},$e=()=>{Z!==null&&(cancelAnimationFrame(Z),Z=null),w.classList.remove("hsk-scrolling"),ge=me=ue=w.scrollTop};u.current=$e,p.current=ye=>{Math.abs(w.scrollTop-ue)>1&&(ge=me=ue=w.scrollTop);let at=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,ye)));at!==ge&&(ge=at,Z===null&&(j=performance.now(),Z=requestAnimationFrame(ve)))},C.current=ye=>{let at=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,ye)));Z!==null&&(cancelAnimationFrame(Z),Z=null,w.classList.remove("hsk-scrolling")),w.scrollTop=at,ge=me=ue=w.scrollTop};let ve=ye=>{let at=Math.min((ye-j)/1e3,.05);if(j=ye,me+=(ge-me)*(1-Math.exp(-y*at)),Math.abs(ge-me)<U){me=ge,we(Math.round(ge)),w.classList.remove("hsk-scrolling"),Z=null;return}we(ce(me)),Z=requestAnimationFrame(ve)},_e=ye=>{if(ye.ctrlKey)return;Math.abs(w.scrollTop-ue)>1&&(ge=me=ue=w.scrollTop),ye.deltaY<0&&(g.current&&(P.current+=1),g.current=!1,f.current=null),D.current();let at=ye.deltaMode===1?I:ye.deltaMode===2?w.clientHeight:1,ct=Math.max(0,w.scrollHeight-w.clientHeight),At=Math.round(Math.max(0,Math.min(ct,ge+ye.deltaY*at)));if(At===ge){ct>0&&ye.preventDefault();return}ye.preventDefault(),ge=At,Z===null&&(j=performance.now(),w.classList.add("hsk-scrolling"),Z=requestAnimationFrame(ve))},Oe=w.scrollTop,et=()=>{let ye=Math.abs(w.scrollTop-ue)>1;ye&&(o.current=performance.now(),w.scrollTop<Oe-1&&g.current&&(P.current+=1,g.current=!1,f.current=null)),Oe=w.scrollTop,Z!==null&&ye&&(cancelAnimationFrame(Z),Z=null,w.classList.remove("hsk-scrolling"),ge=me=ue=w.scrollTop)};return w.addEventListener("wheel",_e,{passive:!1}),w.addEventListener("scroll",et,{passive:!0}),()=>{w.removeEventListener("scroll",et),w.removeEventListener("wheel",_e),Z!==null&&cancelAnimationFrame(Z),w.classList.remove("hsk-scrolling"),u.current=()=>{},p.current=null,C.current=null}},[]),{msgsContainerRef:a,spacerRef:z,lastExternalScrollRef:o,showJumpToBottom:i,scrollProgress:s,activeMsgIdx:h,jumpAlert:S,unreadBelow:se,jumpToMessage:q,jumpToBottom:H,resetAlertArming:R}}var Ee,Ni=Se(()=>{"use strict";Ee=require("react")});function Ii(e){let[r,t]=(0,Bt.useState)(e),n=(0,Bt.useRef)(e),a=(0,Bt.useRef)(e),o=(0,Bt.useRef)(0),i=(0,Bt.useRef)(0),c=(0,Bt.useRef)(0),s=(0,Bt.useRef)(null);return(0,Bt.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,Bt.useEffect)(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){s.current!==null&&(cancelAnimationFrame(s.current),s.current=null),n.current=e,o.current=0,i.current=0,t(e);return}if(s.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=d=>{let u=Math.min(d-c.current,50);c.current=d;let p=a.current,k=p.length-n.current.length,g=Math.min(fd,Math.max(bd,k*1e3/md));o.current+=(g-o.current)*(1-Math.exp(-u/kd)),i.current+=o.current*u/1e3;let b=Math.floor(i.current);b>0&&(i.current-=b,n.current=p.slice(0,Math.min(p.length,n.current.length+b)),t(n.current)),n.current.length<a.current.length?s.current=requestAnimationFrame(h):(s.current=null,i.current=0)};s.current=requestAnimationFrame(h)},[e]),r}var Bt,md,bd,fd,kd,Ai=Se(()=>{"use strict";Bt=require("react"),md=450,bd=45,fd=900,kd=180});function Fi(e,r){let t=(0,Pi.useAkropolysContext)(),[n,a]=(0,Rt.useState)(""),[o,i]=(0,Rt.useState)("idle"),[c,s]=(0,Rt.useState)(null),[l,h]=(0,Rt.useState)(null),[d,u]=(0,Rt.useState)(null),[p,k]=(0,Rt.useState)(ko),[g,b]=(0,Rt.useState)(!1),z=(0,Rt.useCallback)(async(M,E)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(M):gd(M),u(E),setTimeout(()=>u(null),2e3)}catch{}},[]);(0,Rt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(i("prompt_key"),a(""))},[e]),(0,Rt.useEffect)(()=>{if(!c)return;k(ko);let M=setInterval(()=>{k(E=>E<=1?(clearInterval(M),s(null),h(null),0):E-1)},1e3);return()=>clearInterval(M)},[c]);let f=(0,Rt.useCallback)(async()=>{let M=n.trim();M&&(t.setKikuPub(M),a(""),i("idle"),await r())},[t,n,r]),N=(0,Rt.useCallback)(async()=>{if(!g){b(!0);try{let{secret:M,publicId:E}=await t.mintKikuKey();s(M),h(E),i("idle"),await r()}catch{}finally{b(!1)}}},[t,g,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:i,mintedKey:c,setMintedKey:s,mintedPub:l,setMintedPub:h,copied:d,keyCountdown:p,minting:g,copyValue:z,handleUseExistingKey:f,handleCreateKey:N}}function gd(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}var Rt,Pi,_i=Se(()=>{"use strict";Rt=require("react"),Pi=require("@akropolys/sdk");It()});function Di({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,Sn.useCallback)(l=>{let h=l.name||"",d=`@kiku ${a("displayCapture",{name:h}).trim()}`,u=h||"capture current page";t("");let p=e;r([]),n(u,d,p.length>0?p:void 0,"capture")},[e,n,r,t,a]),i=(0,Sn.useCallback)(l=>{let h=l.filter(p=>p.id).map(p=>({name:p.name||"",url:p.url||"",image:p.image||""})),d=l.map(p=>p.name).filter(Boolean).join(", "),u=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(d||"capture all",u,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Sn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),s=(0,Sn.useCallback)(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:o,handleKikuCaptureAll:i,handleKikuViewHistory:c,handleKikuDelete:s}}var Sn,Bi=Se(()=>{"use strict";Sn=require("react")});function Tn(e,r=130){let t=ba;if(!t||!fa)return;let n=fa.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function qi(){if(!$i)return Ar*=.85,Ar;if(!Hi||!Mn)return Ar;Hi.getByteTimeDomainData(Mn);let e=0;for(let n=0;n<Mn.length;n++){let a=(Mn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Mn.length),t=Math.min(1,r*3.2);return Ar+=(t-Ar)*(t>Ar?.6:.12),Ar}function Ui(){if($i=!1,ba&&fa&&(ba.gain.cancelScheduledValues(fa.currentTime),ba.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var fa,Hi,ba,Mn,$i,Ar,vo=Se(()=>{"use strict";fa=null,Hi=null,ba=null,Mn=null,$i=!1,Ar=0});function Gi({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=xd,paused:o=!1}){let[i,c]=(0,Me.useState)(!1),[s,l]=(0,Me.useState)(!1),[h,d]=(0,Me.useState)(""),[u,p]=(0,Me.useState)(!1),k=(0,Me.useRef)(null),g=(0,Me.useRef)(null),b=(0,Me.useRef)(null),z=(0,Me.useRef)(null),f=(0,Me.useRef)(null),N=(0,Me.useRef)(null),M=(0,Me.useRef)(0),E=(0,Me.useRef)(.008),F=(0,Me.useRef)(0),C=(0,Me.useRef)(0),B=(0,Me.useRef)(""),X=(0,Me.useRef)(0),T=(0,Me.useRef)(0),P=(0,Me.useRef)(!1),G=(0,Me.useRef)(o),D=(0,Me.useRef)(!1),Y=(0,Me.useRef)(!1),xe=(0,Me.useRef)(r),se=(0,Me.useRef)(t),V=(0,Me.useRef)(n);(0,Me.useEffect)(()=>{xe.current=r},[r]),(0,Me.useEffect)(()=>{se.current=t},[t]),(0,Me.useEffect)(()=>{V.current=n},[n]),(0,Me.useEffect)(()=>{G.current=o},[o]),(0,Me.useEffect)(()=>{p(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let te=(0,Me.useCallback)(()=>M.current,[]),O=(0,Me.useCallback)(y=>{let I=z.current;return!I||y.length!==I.frequencyBinCount?!1:(I.getByteFrequencyData(y),!0)},[]),_=(0,Me.useCallback)(()=>z.current?.frequencyBinCount??0,[]),J=(0,Me.useRef)([]),S=(0,Me.useRef)(null),L=(0,Me.useRef)(!1),A=(0,Me.useRef)(0),K=(0,Me.useRef)(0),x=(0,Me.useCallback)(y=>{let I=z.current;if(!I)return 0;let U=J.current;U.push(y),U.length>Md&&U.shift();let ce=0;if(U.length>=12){let Oe=0;for(let et of U)Oe+=et;if(Oe/=U.length,Oe>1e-4){let et=0;for(let ye of U)et+=(ye-Oe)*(ye-Oe);ce=Math.min(1,Math.sqrt(et/U.length)/Oe/.6)}}let ge=0;(!S.current||S.current.length!==I.frequencyBinCount)&&(S.current=new Uint8Array(I.frequencyBinCount));let me=S.current;I.getByteFrequencyData(me);let j=(b.current?.sampleRate??48e3)/2/me.length,Z=Math.floor(300/j),we=Math.min(me.length-1,Math.ceil(3400/j)),$e=0,ve=0;for(let Oe=0;Oe<me.length;Oe++)ve+=me[Oe],Oe>=Z&&Oe<=we&&($e+=me[Oe]);ve>0&&(ge=$e/ve);let _e=Math.min(1,y/(E.current+yo*3));return Td*_e+Rd*ce+Ed*ge},[]),R=(0,Me.useCallback)(()=>{let y=B.current.trim();if(B.current="",X.current=T.current,d(""),l(!1),y){D.current=!1;let I=k.current;k.current=null;try{I?.stop()}catch{}xe.current(y)}},[]),m=(0,Me.useCallback)(()=>{let y=z.current,I=N.current;if(!y||!I)return;y.getByteTimeDomainData(I);let U=0;for(let Z=0;Z<I.length;Z++){let we=(I[Z]-128)/128;U+=we*we}let ce=Math.sqrt(U/I.length),ge=Math.min(1,ce*4);M.current+=(ge-M.current)*(ge>M.current?.6:.12);let me=Date.now(),ue=G.current?qi()*yd:0;ce>E.current+yo+ue?(F.current=me,C.current||(C.current=me)):(C.current=0,E.current=Math.min(E.current*1.02+2e-5,Math.max(.004,ce))),G.current?L.current?(x(ce)>Oi?K.current+=1:K.current=Math.max(0,K.current-2),K.current>=Sd?(L.current=!1,K.current=0,Tn(1,0),V.current?.()):me-A.current>Cd&&(L.current=!1,K.current=0,Tn(1,Wi*2))):C.current&&me-C.current>vd&&x(ce)>Oi&&(C.current=0,L.current=!0,A.current=me,K.current=0,Tn(wd,Wi)):B.current.trim()&&me-F.current>a&&R(),f.current=requestAnimationFrame(m)},[R,a,x]),ae=(0,Me.useCallback)(()=>{if(k.current||!P.current)return;let y=window.SpeechRecognition||window.webkitSpeechRecognition,I=new y;X.current=0,T.current=0,I.lang=e||document.documentElement.lang||navigator.language||"en-US",I.interimResults=!0,I.maxAlternatives=1,I.continuous=!0,I.onresult=U=>{let ce="";for(let ge=X.current;ge<U.results.length;ge++)ce+=U.results[ge][0].transcript;T.current=U.results.length,ce=ce.trim(),ce&&(B.current=ce,d(ce),l(!0))},I.onerror=U=>{let ce=U?.error||"";ce==="no-speech"||ce==="aborted"||se.current?.(ce)},I.onend=()=>{k.current=null,P.current&&D.current&&setTimeout(()=>{ae()},120)},k.current=I;try{I.start()}catch{k.current=null,se.current?.("failed-to-start")}},[e]),q=(0,Me.useCallback)(()=>{D.current=!1;let y=k.current;k.current=null;try{y?.stop()}catch{}},[]),H=(0,Me.useCallback)(()=>{P.current=!1,L.current=!1,K.current=0,J.current=[],Tn(1,0),D.current=!1,c(!1),l(!1),d(""),B.current="",M.current=0;let y=k.current;k.current=null;try{y?.abort()}catch{}f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),g.current?.getTracks().forEach(I=>I.stop()),g.current=null,z.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),w=(0,Me.useCallback)(async()=>{if(!(P.current||!u)){P.current=!0,c(!0);try{let y=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});g.current=y;let I=window.AudioContext||window.webkitAudioContext,U=new I;b.current=U;let ce=U.createAnalyser();ce.fftSize=1024,ce.smoothingTimeConstant=.25,U.createMediaStreamSource(y).connect(ce),z.current=ce,N.current=new Uint8Array(ce.fftSize),E.current=.008,F.current=Date.now(),f.current=requestAnimationFrame(m)}catch(y){P.current=!1,c(!1),se.current?.(y?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}D.current=!0,ae()}},[u,m,ae]);return(0,Me.useEffect)(()=>{i&&(o?(B.current="",d(""),L.current=!1,K.current=0,J.current=[],q()):(L.current=!1,F.current=Date.now(),D.current=!0,ae()))},[o,i,ae,q]),(0,Me.useEffect)(()=>{if(!i||o)return;let y=setInterval(()=>{let I=!!k.current,U=M.current>E.current+yo;I&&U&&B.current},2e3);return()=>clearInterval(y)},[i,o]),(0,Me.useEffect)(()=>()=>{H()},[H]),{supported:u,active:i,hearing:s,interim:h,micLevel:te,micSpectrum:O,spectrumBins:_,start:w,stop:H}}var Me,xd,yo,vd,yd,wd,Wi,Cd,Sd,Md,Td,Rd,Ed,Oi,Vi=Se(()=>{"use strict";Me=require("react");vo();xd=1100,yo=.012,vd=320,yd=.09,wd=.25,Wi=130,Cd=700,Sd=12,Md=48,Td=.45,Rd=.35,Ed=.2,Oi=.55});function Xi(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=wo(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let o=new Float32Array(a);for(let i=0;i<a;i++){let c=r[4+(i>>1)]>>4*(i&1)&15,s=Ki[n],l=s>>3;c&4&&(l+=s),c&2&&(l+=s>>1),c&1&&(l+=s>>2),t=Yi(c&8?t-l:t+l),n=wo(n+ji[c]),o[i]=t/32768}return o}var ji,Ki,wo,Yi,Rn,Qi=Se(()=>{"use strict";ji=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],Ki=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],wo=e=>e<0?0:e>88?88:e,Yi=e=>e<-32768?-32768:e>32767?32767:e,Rn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let i=this.index;for(let c=0;c<t;c++){let s=Ki[i],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let d=s>>3;l>=s&&(h|=4,l-=s,d+=s),s>>=1,l>=s&&(h|=2,l-=s,d+=s),s>>=1,l>=s&&(h|=1,d+=s),a=Yi(h&8?a-d:a+d),i=wo(i+ji[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=i,n.buffer}}});function Cr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function Ji(e,r=24e3){let t=0;for(let s of e)t+=s.length;let n=new Float32Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);Cr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Cr(i,8,"WAVE"),Cr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Cr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++){let l=Math.max(-1,Math.min(1,n[s]));i.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([o],{type:"audio/wav"})}function Zi(e,r=16e3){let t=0;for(let s of e)t+=s.length;let n=new Int16Array(t),a=0;for(let s of e)n.set(s,a),a+=s.length;let o=new ArrayBuffer(44+t*2),i=new DataView(o);Cr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Cr(i,8,"WAVE"),Cr(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,r,!0),i.setUint32(28,r*2,!0),i.setUint16(32,2,!0),i.setUint16(34,16,!0),Cr(i,36,"data"),i.setUint32(40,t*2,!0);let c=44;for(let s=0;s<t;s++)i.setInt16(c,n[s],!0),c+=2;return new Blob([o],{type:"audio/wav"})}var ec=Se(()=>{"use strict"});function tc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function rc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function nc(e){let[r,t]=(0,le.useState)("idle"),[n,a]=(0,le.useState)(!1),[o,i]=(0,le.useState)([]),[c,s]=(0,le.useState)(null),[l,h]=(0,le.useState)(!1),d=(0,le.useRef)(null),u=(0,le.useRef)(!1),p=(0,le.useRef)(!1),k=(0,le.useRef)(null),g=(0,le.useRef)(0),b=(0,le.useRef)(!1),z=(0,le.useRef)(!1),f=(0,le.useRef)(null),N=(0,le.useRef)(null),M=(0,le.useRef)(null),E=(0,le.useRef)(null),F=(0,le.useRef)(0),C=(0,le.useRef)(!1),B=(0,le.useRef)([]),X=(0,le.useRef)(0),T=(0,le.useRef)(new Set),P=(0,le.useRef)(null),G=(0,le.useRef)(null),D=(0,le.useRef)(ka),Y=(0,le.useRef)(e);(0,le.useEffect)(()=>{Y.current=e;let re=N.current;if(re)for(let he of re.getAudioTracks())he.enabled=!e.muted},[e]);let xe=(0,le.useRef)(!1),se=(0,le.useRef)([]),V=(0,le.useRef)(new Rn),te=(0,le.useRef)(null),O=(0,le.useRef)(""),_=(0,le.useRef)(""),[J,S]=(0,le.useState)([]),L=(0,le.useRef)([]);L.current=J;let A=(0,le.useRef)([]),[K,x]=(0,le.useState)([]),R=(0,le.useRef)(0),m=(0,le.useRef)([]),ae=(0,le.useRef)(void 0),q=(0,le.useRef)(null),H=(0,le.useRef)([]),w=(0,le.useRef)([]),y=(0,le.useCallback)(()=>{let re=O.current.trim(),he=_.current.trim(),be=q.current?Math.max(.1,(Date.now()-q.current)/1e3):void 0,ne;if(H.current.length>0)try{let Le=Ji(H.current,D.current);ne=URL.createObjectURL(Le)}catch(Le){console.error("[kiku] failed to encode bot audio wav:",Le)}let fe;if(w.current.length>0)try{let Le=Zi(w.current,Co);fe=URL.createObjectURL(Le)}catch(Le){console.error("[kiku] failed to encode user audio wav:",Le)}let pe=m.current.length?m.current:void 0,Re=ae.current;O.current="",_.current="",q.current=null,H.current=[],w.current=[],m.current=[],ae.current=void 0,!(!re&&!he&&!pe&&!Re)&&Y.current.onExchange?.({heard:re,said:he,duration:be,userAudioUrl:fe,audioUrl:ne,images:pe,visualization:Re})},[]),I=(0,le.useCallback)(()=>{},[]),U=(0,le.useCallback)(re=>{if(Y.current.muted)return;let he=new Int16Array(re),be=0;for(let fe=0;fe<he.length;fe+=8){let pe=Math.abs(he[fe]);pe>be&&(be=pe)}be>1200&&(g.current=Date.now());let ne=d.current;!xe.current||!ne||ne.readyState!==WebSocket.OPEN||(w.current.push(new Int16Array(re.slice(0))),ne.send(V.current.encode(new Int16Array(re))))},[]),ce=(0,le.useCallback)(()=>{se.current=[]},[]),ge=(0,le.useCallback)(()=>{let re=f.current;if(te.current&&re&&re.state!=="closed")return te.current;let he=window.AudioContext||window.webkitAudioContext;if(!he)return Promise.resolve(null);let be=new he({latencyHint:"interactive",sampleRate:ka});f.current=be;let ne=URL.createObjectURL(new Blob([_d],{type:"application/javascript"}));return te.current=be.audioWorklet.addModule(ne).then(()=>be).catch(()=>null).finally(()=>URL.revokeObjectURL(ne)),te.current},[]),me=(0,le.useCallback)(()=>{typeof window>"u"||ge()},[ge]),ue=(0,le.useCallback)(()=>{let re=E.current;if(!re)return 0;let he=new Uint8Array(re.fftSize);re.getByteTimeDomainData(he);let be=0;for(let ne=0;ne<he.length;ne++){let fe=(he[ne]-128)/128;be+=fe*fe}return Math.min(1,Math.sqrt(be/he.length)*4)},[]),j=r==="speaking"||r==="thinking",Z=(0,le.useCallback)(re=>{let he=j?P.current:E.current;return!he||re.length!==he.frequencyBinCount?!1:(he.getByteFrequencyData(re),!0)},[j]),we=(0,le.useCallback)(()=>(j?P.current:E.current)?.frequencyBinCount??0,[j]),$e=(0,le.useCallback)(()=>{let re=G.current,he=f.current;if(!re||!he||he.state==="closed"){F.current=0;for(let fe of T.current)try{fe.onended=null,fe.stop()}catch{}T.current.clear();return}let be=he.currentTime,ne=be+Id;re.gain.cancelScheduledValues(be),re.gain.setValueAtTime(re.gain.value,be),re.gain.linearRampToValueAtTime(0,ne),re.gain.setValueAtTime(1,ne);for(let fe of T.current)try{fe.onended=null,fe.stop(ne)}catch{}T.current.clear(),F.current=ne},[]),ve=(0,le.useCallback)(re=>{let he=f.current,be=P.current;if(!he||!be||re.length===0)return;he.state==="suspended"&&he.resume().catch(()=>{});let ne=he.createBuffer(1,re.length,D.current);ne.getChannelData(0).set(re);let fe=he.createBufferSource();fe.buffer=ne,fe.connect(be);let pe=he.currentTime,Re=F.current>pe?F.current:pe+Nd;fe.start(Re),F.current=Re+ne.duration,T.current.add(fe),fe.onended=()=>{T.current.delete(fe),T.current.size===0&&(F.current=0,C.current=!1,t(Le=>Le==="speaking"?"listening":Le))},t(Le=>Le==="speaking"||Le==="idle"||Le==="ended"?Le:"speaking")},[]),_e=(0,le.useCallback)(()=>{let re=B.current;B.current=[],X.current=0;for(let he of re)ve(he)},[ve]),Oe=(0,le.useCallback)(()=>{B.current=[],X.current=0},[]),et=(0,le.useCallback)(re=>{let he=f.current;if(!he||re.length===0)return;if(F.current>he.currentTime&&B.current.length===0){ve(re);return}let ne=C.current?Ld:zd;B.current.push(re),X.current+=re.length/D.current,X.current>=ne&&(C.current=!0,_e())},[ve,_e]),ye=(0,le.useRef)(null),at=(0,le.useRef)(null),ct=(0,le.useCallback)(()=>{ye.current&&(clearInterval(ye.current),ye.current=null);let re=at.current,he=f.current;if(re&&he&&he.state!=="closed"){let be=he.currentTime;try{re.gain.cancelScheduledValues(be),re.gain.setValueAtTime(re.gain.value,be),re.gain.linearRampToValueAtTime(1e-4,be+.04)}catch{}setTimeout(()=>{try{re.disconnect()}catch{}at.current===re&&(at.current=null)},50)}},[]),At=(0,le.useCallback)(()=>{},[]),Ct=(0,le.useCallback)(re=>{y(),d.current=null,xe.current=!1,se.current=[],te.current=null,C.current=!1,B.current=[],X.current=0,ct(),$e(),M.current?.disconnect(),M.current=null,N.current?.getTracks().forEach(he=>he.stop()),N.current=null,E.current=null,P.current=null,G.current=null,f.current?.close().catch(()=>{}),f.current=null,t(re),a(!1),i([]),u.current=!1,p.current=!1},[y,$e,ct]),Ye=(0,le.useCallback)(()=>{try{d.current?.send(JSON.stringify({type:"close"}))}catch{}try{d.current?.close()}catch{}Ct("idle")},[Ct]),Kt=(0,le.useCallback)(re=>{let he=[...A.current,...L.current.filter(be=>be.done)].filter(be=>be.text).map(be=>({role:be.role,text:be.text}));try{re.send(JSON.stringify({type:"open",history:he}))}catch{}},[]),Lt=(0,le.useCallback)(re=>{let he=!1;re.binaryType="arraybuffer",V.current=new Rn,re.onopen=()=>{d.current!==re||!p.current||(p.current=!1,Kt(re))},re.onmessage=be=>{if(be.data instanceof ArrayBuffer){if(!b.current){b.current=!0;let pe=_.current.trim();pe&&S(Re=>{let Le=Re.slice();for(let Ne=Le.length-1;Ne>=0;Ne--)Le[Ne].role==="user"&&!Le[Ne].done&&(Le[Ne]={...Le[Ne],done:!0});return Le.push({role:"assistant",text:pe,done:!1}),Le})}!z.current&&g.current&&(z.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-g.current)+"ms")),ct();let fe=Xi(be.data);H.current.push(fe.slice()),et(fe);return}let ne;try{ne=JSON.parse(be.data)}catch{return}switch(ne.type){case"ready":ne.sampleRate&&(D.current=ne.sampleRate,ne.sampleRate!==ka&&console.warn(`[kiku] live audio rate ${ne.sampleRate} != context ${ka}; per-buffer resampling will click at every chunk seam`)),typeof ne.secondsLeft=="number"&&s(ne.secondsLeft),h(ne.photos===!0),xe.current=!0,t("listening"),ce(),k.current?.(),k.current=null,Ot("connect",!0);break;case"hearing":q.current||(q.current=Date.now()),a(!0);break;case"thinking":q.current||(q.current=Date.now()),a(!1),t("thinking"),At(),ne.tool==="visualize"&&x(fe=>fe.some(pe=>pe.pending)?fe:[...fe,{id:++R.current,url:"",pending:!0}]);break;case"viz":typeof ne.url=="string"&&ne.url?(ae.current=ne.url,x(fe=>fe.map(pe=>pe.pending?{...pe,url:ne.url,pending:!1}:pe))):x(fe=>fe.filter(pe=>!pe.pending));break;case"heard":T.current.size===0&&(F.current=0),q.current||(q.current=Date.now(),Ot("heard")),O.current+=ne.text,S(fe=>{let pe=fe.slice(),Re=pe[pe.length-1];return Re&&Re.role==="user"&&!Re.done?pe[pe.length-1]={...Re,text:O.current.trim()}:pe.push({role:"user",text:O.current.trim(),done:!1}),pe}),a(!1),t("thinking"),At();break;case"said":if(_.current+=ne.text,!b.current)break;S(fe=>{let pe=fe.slice();for(let Ne=pe.length-1;Ne>=0;Ne--)pe[Ne].role==="user"&&!pe[Ne].done&&(pe[Ne]={...pe[Ne],done:!0});let Re=pe[pe.length-1],Le=_.current.trim();return Re&&Re.role==="assistant"&&!Re.done?pe[pe.length-1]={...Re,text:Le}:pe.push({role:"assistant",text:Le,done:!1}),pe});break;case"interrupted":C.current=!1,Oe(),ct(),$e(),Ot("interrupt"),a(!1),t("listening");break;case"turn_complete":z.current=!1,b.current=!1,g.current=0,S(fe=>fe.map(pe=>pe.done?pe:{...pe,done:!0})),_e(),C.current=!1,ct(),a(!1),y();break;case"sources":Array.isArray(ne.sources)&&ne.sources.length&&i(ne.sources);break;case"seconds":typeof ne.secondsLeft=="number"&&s(ne.secondsLeft);break;case"refused":Y.current.onRefused?.(ne.code||"guest"),Ye();break;case"error":Y.current.onError?.(ne.code||"unavailable"),Ye();break}},re.onclose=be=>{d.current===re&&(be.code===4402&&(he=!0,Y.current.onError?.(be.reason==="site"?"siteLimit":"limit")),Ct("ended"))},re.onerror=()=>{!he&&d.current===re&&Y.current.onError?.("connection")}},[Oe,et,y,ce,$e,_e,Kt,At,ct,Ye,Ct]),dr=(0,le.useCallback)(re=>{let he=d.current;if(xe.current=!1,t("connecting"),$e(),ct(),he){try{he.send(JSON.stringify({type:"close"}))}catch{}try{he.close()}catch{}}let be=Y.current;p.current=!0;let ne=new WebSocket(rc(be,re),tc(be));d.current=ne,Lt(ne)},[Lt,$e,ct]),Yt=(0,le.useRef)(e.voice);(0,le.useEffect)(()=>{Yt.current!==e.voice&&(Yt.current=e.voice,d.current&&(r==="listening"||r==="thinking"||r==="speaking")&&dr(e.voice))},[e.voice,r,dr]);let pr=(0,le.useCallback)(async(re=[])=>{if(u.current&&d.current)return;u.current=!0,t("connecting");let he=Y.current;se.current=[],A.current=re,L.current=[],S([]),x([]),O.current="",_.current="";let be=ge();f.current?.resume().catch(()=>{}),xr();let ne=d.current;ne&&ne.readyState===WebSocket.OPEN?Kt(ne):ne&&ne.readyState===WebSocket.CONNECTING?p.current=!0:(ne=new WebSocket(rc(he),tc(he)),d.current=ne,p.current=!0,Lt(ne));let fe;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};fe=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(nt){try{ne.close()}catch{}d.current=null,t("idle"),he.onError?.(nt?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(d.current!==ne){fe.getTracks().forEach(nt=>nt.stop());return}N.current=fe;for(let nt of fe.getAudioTracks())nt.enabled=!Y.current.muted;let pe=await be;if(d.current!==ne){fe.getTracks().forEach(nt=>nt.stop());return}if(!pe){Y.current.onError?.("audio-worklet"),Ye();return}pe.state==="suspended"&&pe.resume().catch(()=>{});let Re=pe.createAnalyser();Re.fftSize=1024,Re.smoothingTimeConstant=.25,E.current=Re;let Le=pe.createGain();Le.gain.value=1,Le.connect(pe.destination),G.current=Le;let Ne=pe.createAnalyser();Ne.fftSize=1024,Ne.smoothingTimeConstant=.25,Ne.connect(Le),P.current=Ne;try{let nt=new AudioWorkletNode(pe,"kiku-capture");M.current=nt,nt.port.onmessage=Xt=>U(Xt.data);let nr=pe.createMediaStreamSource(fe),ot=()=>{if(!(d.current!==ne||!M.current)){try{nr.connect(Re)}catch{}try{nr.connect(nt)}catch{}}};xe.current?ot():k.current=ot}catch{Y.current.onError?.("audio-worklet"),Ye()}},[Lt,ge,U,Kt,Ye]);(0,le.useEffect)(()=>{if(r!=="listening"){a(!1);return}let re=0,he=!1,be=Date.now(),ne=window.setInterval(()=>{let fe=Date.now();if(!Y.current.muted&&ue()>Ad&&(re=fe),fe-Math.max(re,be)>Fd){window.clearInterval(ne),Y.current.onError?.("idle"),Ye();return}let pe=fe-re<Pd;pe!==he&&(he=pe,a(pe))},100);return()=>window.clearInterval(ne)},[r,ue,Ye]);let qt=(0,le.useCallback)(()=>{me()},[me]);(0,le.useEffect)(()=>()=>{Ye()},[Ye]),(0,le.useEffect)(()=>{let re=N.current;if(re)for(let he of re.getAudioTracks())he.enabled=!e.muted},[e.muted,r]);let ze=(0,le.useCallback)(async re=>{let he=Y.current.storeScene;if(!he||!re.type.startsWith("image/"))return!1;let be;try{be=await ha(re)}catch{return!1}let ne=++R.current;if(x(pe=>[...pe,{id:ne,url:be,pending:!1,sending:!0}]),!await he(be))return x(pe=>pe.filter(Re=>Re.id!==ne)),!1;x(pe=>pe.map(Re=>Re.id===ne?{...Re,sending:!1}:Re)),m.current.push(be);let fe=d.current;return fe&&fe.readyState===WebSocket.OPEN&&fe.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),St=(0,le.useCallback)(re=>{let he=d.current;he&&he.readyState===WebSocket.OPEN&&re.trim()&&he.send(JSON.stringify({type:"text",text:re}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:J,images:K,micLevel:ue,micSpectrum:Z,spectrumBins:we,start:pr,stop:Ye,prewarm:qt,attachPhoto:ze,ask:St}}var le,Co,ka,zd,Ld,Nd,Id,Ad,Pd,Fd,_d,ac=Se(()=>{"use strict";le=require("react");Wr();Qi();ec();oo();Co=16e3,ka=24e3,zd=.08,Ld=.12,Nd=.03,Id=.08,Ad=.12,Pd=500,Fd=6e4,_d=`
|
|
2
|
+
"use strict";var jh=Object.create;var la=Object.defineProperty;var Gh=Object.getOwnPropertyDescriptor;var Vh=Object.getOwnPropertyNames;var Kh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var Ce=(e,r)=>()=>(e&&(r=e(e=0)),r);var Cs=(e,r)=>{for(var t in r)la(e,t,{get:r[t],enumerable:!0})},Ss=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Vh(r))!Yh.call(e,a)&&a!==t&&la(e,a,{get:()=>r[a],enumerable:!(n=Gh(r,a))||n.enumerable});return e};var Zt=(e,r,t)=>(t=e!=null?jh(Kh(e)):{},Ss(r||!e||!e.__esModule?la(t,"default",{value:e,enumerable:!0}):t,e)),Xh=e=>Ss(la({},"__esModule",{value:!0}),e);function er(e,r){return e.details??(e.fields?(0,Ms.resolveDisplayFields)(e.fields,r).details:[])}function eo(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}var Ms,yn=Ce(()=>{"use strict";Ms=require("@akropolys/sdk")});function Ts(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(r=0;r<a;r++)e[r]&&(t=Ts(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Rs(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Ts(e))&&(n&&(n+=" "),n+=r);return n}var Es=Ce(()=>{"use strict"});function le(...e){return Rs(e)}var Tt=Ce(()=>{"use strict";Es()});function Qr(e){if(typeof e=="string")return{themeAttr:e,vars:void 0};if(!e)return{themeAttr:void 0,vars:void 0};let r={};return e.primaryColor&&(r["--hsk-primary"]=e.primaryColor),e.backgroundColor&&(r["--hsk-bg"]=e.backgroundColor,r["--hsk-chat-bg"]=e.backgroundColor),e.textColor&&(r["--hsk-text"]=e.textColor,r["--hsk-chat-text"]=e.textColor),e.fontFamily&&(r["--hsk-font"]=e.fontFamily),e.fontSize&&(r["--hsk-font-size"]=e.fontSize),e.mobileFontSize&&(r["--hsk-mobile-font-size"]=e.mobileFontSize),e.borderRadius&&(r["--hsk-border-radius"]=e.borderRadius),{themeAttr:void 0,vars:r}}var ha=Ce(()=>{"use strict"});function to(e){return typeof e=="string"&&Qh.includes(e)}function da(e){if(to(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(to(r))return r}catch{}return Ns}var Ns,Qh,pa=Ce(()=>{"use strict";Ns="coffee",Qh=["light","dark","mahogany","blush","coffee","midnight"]});function ua(){try{return localStorage.getItem(As)!=="off"}catch{return!0}}function Ps(e){try{localStorage.setItem(As,e?"on":"off")}catch{}e&&Rr()}function Rr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(He){He.state==="suspended"&&He.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{He=new e({latencyHint:"interactive"}),or=He.createGain(),or.gain.value=.28,or.connect(He.destination);let r=He.createBuffer(1,1,He.sampleRate),t=He.createBufferSource();t.buffer=r,t.connect(He.destination),t.start(0),He.resume().catch(()=>{})}catch{He=null}}function ar(e,r,t,n,a){if(!He||!or)return;let s=He.createOscillator();s.type="sine",s.frequency.setValueAtTime(r,e),s.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let o=He.createBiquadFilter();o.type="lowpass",o.Q.value=.9,o.frequency.setValueAtTime(Math.min(18e3,r*7),e),o.frequency.exponentialRampToValueAtTime(Math.max(80,r*1.5),e+n);let c=He.createGain();c.gain.setValueAtTime(1e-4,e),c.gain.exponentialRampToValueAtTime(a,e+.006),c.gain.exponentialRampToValueAtTime(1e-4,e+n),s.connect(o),o.connect(c),c.connect(or),s.start(e),s.stop(e+n+.02)}function Fs(e,r){if(!He||!or)return;let t=Math.floor(He.sampleRate*.03),n=He.createBuffer(1,t,He.sampleRate),a=n.getChannelData(0);for(let i=0;i<t;i++)a[i]=(Math.random()*2-1)*Math.pow(1-i/t,3);let s=He.createBufferSource();s.buffer=n;let o=He.createBiquadFilter();o.type="bandpass",o.frequency.value=2600,o.Q.value=5;let c=He.createGain();c.gain.value=r,s.connect(o),o.connect(c),c.connect(or),s.start(e)}function _s(){return ua()?He?He.state:"unsupported":"off"}function Jh(e){!He||!or||(ar(e,587.33,.985,.16,.38),ar(e+.048,739.99,.985,.18,.42),ar(e+.096,880,.985,.28,.46),ar(e+.105,1174.66,.985,.22,.22),Fs(e+.096,.16))}function Zh(e){!He||!or||ar(e,659.25,.97,.09,.26)}function tr(e,r=!1){if(!r&&!ua()||(Rr(),!He||!or||He.state==="closed"))return;He.state==="suspended"&&He.resume().catch(()=>{});let t=He.currentTime+.01;switch(e){case"connect":Jh(t);break;case"heard":Zh(t);break;case"reply":ar(t,440,.94,.13,.5),ar(t+.09,660,.94,.16,.42);break;case"interrupt":ar(t,520,.62,.17,.4);break;case"send":ar(t,300,1.16,.1,.22);break;case"pin":Fs(t,.35),ar(t+.02,880,.97,.07,.22);break}}var As,He,or,Jr=Ce(()=>{"use strict";As="hsk-sounds",He=null,or=null});function no(e,r="hsk-font"){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)>>>0;return`${r}-${t.toString(36)}`}function ed(e){let r=e.split("?")[0].split("#")[0].split(".").pop()?.toLowerCase();return r==="woff2"?"woff2":r==="woff"?"woff":r==="otf"?"opentype":r==="ttf"?"truetype":""}function ao(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}function rd(e,r){(0,ro.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=no(e);if(Vt.set(e,(Vt.get(e)??0)+1),!document.getElementById(t)){let n=document.createElement("style");n.id=t,n.textContent=r,document.head.appendChild(n)}return()=>{let n=(Vt.get(e)??1)-1;if(n>0){Vt.set(e,n);return}Vt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function $s(e){let r=Hs(e.family);return r?e.faces.map(t=>{let n=ao(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Bs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Ds(t.unicodeRange)?`unicode-range:${Ds(t.unicodeRange)};`:"")+"}":""}).join(""):""}function oo(e){let r=e?.faces??[],t=e&&r.length?$s(e):"";rd(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Kt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=$s(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(s=>s.url).join("|")}`;Vt.set(n,(Vt.get(n)??0)+1);let a=no(n);if(!document.getElementById(a)){let s=document.createElement("style");s.id=a,s.textContent=t,document.head.appendChild(s)}if(r>0){let s=document.fonts,o=e.family.replace(/^['"]|['"]$/g,""),c=Array.from(s||[]).filter(l=>l.family.replace(/^['"]|['"]$/g,"")===o),i=c.length>0?c.map(l=>l.load().catch(()=>{})):e.faces.map(l=>{let h=ao(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(o,`url(${h})`,{weight:Bs(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(i),new Promise(l=>setTimeout(l,r))])}}function Us(e,r){let t=Array.from(new Set(Array.from(Object.values(r).join("")))).join(""),n=e.map(a=>`"${a.replace(/^['"]|['"]$/g,"")}"`).join(", ");return{text:t,stack:n}}function so(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Us(e,r);if(!t?.check||!n||!a)return!0;try{return qs.every(s=>t.check(`${s} 16px ${a}`,n))}catch{return!0}}async function io(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:s}=Us(e,r);!a||!s||await Promise.race([Promise.all(qs.map(o=>n.load(`${o} 16px ${s}`,a).catch(()=>{}))),new Promise(o=>setTimeout(o,t))])}function ma(e){let r=typeof e=="object"&&e?e:void 0,t=Hs(r?.fontFamily?.split(",")[0].trim().replace(/^['"]|['"]$/g,"")??""),n=typeof r?.fontUrl=="string"?{normal:r.fontUrl}:r?.fontUrl??{},a=n.normal??"",s=n.bold??"",o=n.variable??"";(0,ro.useEffect)(()=>{if(!t||!a&&!s&&!o)return;let c=o?[["100 900",o]]:[["400",a],["700",s]],i=[];for(let[d,u]of c){if(!u)continue;let f=ao(u);if(!f)continue;let y=ed(f);i.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${y?` format("${y}")`:""};}`)}if(i.length===0)return;let l=i.join(""),h=`${t}|${a}|${s}|${o}`,p=no(h,"hsk-host-font");if(Vt.set(h,(Vt.get(h)??0)+1),!document.getElementById(p)){let d=document.createElement("style");d.id=p,d.textContent=l,document.head.appendChild(d)}return()=>{let d=(Vt.get(h)??1)-1;if(d>0){Vt.set(h,d);return}Vt.delete(h),document.getElementById(p)?.remove()}},[t,a,s,o])}var ro,Vt,Hs,td,Ds,Bs,qs,wn=Ce(()=>{"use strict";ro=require("react"),Vt=new Map;Hs=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),td=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Ds=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>td.test(t))?"":r.join(", ")},Bs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";qs=["400","500","600","700"]});var $,nd,mr,Ws,Os,js,Zr,en,tn,Gs,ba,Vs,Ks,fa,co,Ys,Cn,ka,Pr,Fr,Sn,Xs,lo,Qs,Js,Zs,ei,ti,ri,ni,ai,oi,Wt=Ce(()=>{"use strict";Tt();$=require("react/jsx-runtime"),nd=({className:e,size:r=18,tight:t=!1})=>(0,$.jsx)("svg",{className:le("hsk-brand-mark",e),width:r,height:r,viewBox:t?"10.2 17.4 79.5 79.5":"0 0 100 100",xmlns:"http://www.w3.org/2000/svg","aria-label":"kiku",children:(0,$.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,$.jsx)("path",{d:"M39.4 10.4 Q44 0 48.6 10.4 L86.1 95.8 Q88 100 83.4 100 L4.6 100 Q0 100 1.9 95.8 Z M24 100 L24 65 Q24 60 27.4 56.3 Q44 38 60.6 56.3 Q64 60 64 65 L64 100 Z"}),(0,$.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),mr=nd,Ws=()=>(0,$.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,$.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,$.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]}),Os=()=>(0,$.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),js=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,$.jsx)("path",{d:"M8 5v14l11-7z"})}),Zr=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),en=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m15 18-6-6 6-6"})}),tn=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m9 18 6-6-6-6"})}),Gs=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,$.jsx)("path",{d:"M3 3v5h5"}),(0,$.jsx)("path",{d:"M12 7v5l4 2"})]}),ba=()=>(0,$.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),Vs=()=>(0,$.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M3 6h18"}),(0,$.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]}),Ks=()=>(0,$.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,$.jsx)("path",{d:"M12 5v14M5 12h14"})}),fa=({size:e=18}={})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M21 11.5a8.4 8.4 0 0 1-12.3 7.4L3 21l2.1-5.7A8.4 8.4 0 1 1 21 11.5Z"}),[8.9,12.6,16.3].map((r,t)=>(0,$.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),co=()=>(0,$.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),Ys=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,$.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,$.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Cn=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:le("hsk-retry-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,$.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ka=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:le("hsk-edit-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-edit-pencil",d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),(0,$.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),Pr=({className:e,size:r=13}={})=>(0,$.jsxs)("svg",{className:le("hsk-copy-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,$.jsx)("path",{className:"hsk-copy-back",d:"M5 15H4.5A2.5 2.5 0 0 1 2 12.5V4.5A2.5 2.5 0 0 1 4.5 2h8A2.5 2.5 0 0 1 15 4.5V5"})]}),Fr=({className:e,size:r=13}={})=>(0,$.jsx)("svg",{className:le("hsk-check-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),Sn=({className:e,size:r=18}={})=>(0,$.jsxs)("svg",{className:e,width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-mic-cap",d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3z"}),(0,$.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),Xs=()=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,$.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,$.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,$.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,$.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,$.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),lo=({active:e})=>(0,$.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":0,"--hsk-amp":1.9,"--hsk-period":"1.24s"},d:"M2 12h2"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,$.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,$.jsx)("path",{className:"hsk-wave-bar hsk-wave-bar--tip",style:{"--hsk-bar":5,"--hsk-amp":1.9,"--hsk-period":"1.32s"},d:"M22 12h-2"})]}),Qs=()=>(0,$.jsxs)("svg",{className:"hsk-telegram-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,$.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,$.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),Js=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,$.jsxs)("g",{className:"hsk-sun-rays",children:[(0,$.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,$.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,$.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,$.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,$.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,$.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,$.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,$.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),Zs=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{className:"hsk-moon-body",d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),ei=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,$.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),ti=()=>(0,$.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{className:"hsk-heart-body",d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),ri=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,$.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,$.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),ni=()=>(0,$.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,$.jsx)("path",{className:"hsk-star-spark",d:"M18.5 2.5l.6 1.6 1.6.6-1.6.6-.6 1.6-.6-1.6-1.6-.6 1.6-.6z"})]}),ai=({size:e=11})=>(0,$.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,$.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),oi=({className:e,size:r=16,filled:t=!1}={})=>(0,$.jsxs)("svg",{className:le("hsk-pin-icon",e),width:r,height:r,viewBox:"0 0 24 24",fill:t?"currentColor":"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,$.jsx)("path",{d:"M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17z"})]})});function ho(e){return rn.find(r=>r.id===e)??rn[0]}var rn,po=Ce(()=>{"use strict";Wt();pa();rn=[{id:"light",label:"Silver",Icon:Js,dark:!1},{id:"dark",label:"Onyx",Icon:Zs,dark:!0},{id:"mahogany",label:"Mahogany",Icon:ei,dark:!0},{id:"blush",label:"Blush",Icon:ti,dark:!1},{id:"coffee",label:"Coffee",Icon:ri,dark:!1},{id:"midnight",label:"Midnight",Icon:ni,dark:!0}]});function ad(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function od({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,s=0,o=0,c=null,i=0,l=p=>{let d=Math.min(.032,(p-i)/1e3)||.016666666666666666;i=p;let u=Math.max(1,Math.ceil(d/.008)),f=d/u;for(let y=0;y<u;y++){let b=-e*(a-o)-r*s;s+=b*f,a+=s*f}if(Math.abs(a-o)<.5&&Math.abs(s)<.5){a=o,s=0,c=null,t(a),n?.();return}t(a),c=requestAnimationFrame(l)},h=()=>{c===null&&(i=performance.now(),c=requestAnimationFrame(l))};return{track(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,s=0,t(a)},to(p,d=0){o=p,s=d,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function si({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let s=(0,ga.useRef)(t);s.current=t,(0,ga.useEffect)(()=>{if(!a)return;let o=e();if(!o||typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches)return;let c=!1,i=0,l=0,h=0,p=-1,d=0,u=0,f=0,y=!1,b=!1,g=od({onFrame:S=>{o.style.transform=S===0?"":`translate3d(0, ${S}px, 0)`;let W=o.parentElement;W&&(W.style.opacity=S===0?"":String(Math.max(.35,1-S/(o.offsetHeight||1)*1.1)))},onRest:()=>{o.style.willChange="",b&&(b=!1,s.current())}}),E=()=>{let S=r();return S&&S.scrollTop>0?!1:n?n():!0},R=S=>{S.pointerType==="mouse"||!S.isPrimary||(c=!1,y=!1,p=S.pointerId,i=d=S.clientY,l=S.clientX,u=S.timeStamp,f=0,h=g.value)},z=S=>{if(S.pointerId!==p)return;let W=S.clientY-i,X=S.clientX-l;if(!y){if(Math.abs(W)<6&&Math.abs(X)<6)return;if(y=!0,c=W>0&&Math.abs(W)>Math.abs(X)&&E(),c){try{o.setPointerCapture(S.pointerId)}catch{}g.stop(),o.style.animation="none",o.style.willChange="transform"}}if(!c)return;let N=S.timeStamp-u;N>0&&(f=(S.clientY-d)/N*1e3),d=S.clientY,u=S.timeStamp;let P=h+W;g.track(P<0?-ad(-P,o.offsetHeight||1):P),S.cancelable&&S.preventDefault()},_=S=>{if(S.pointerId!==p)return;try{o.hasPointerCapture(S.pointerId)&&o.releasePointerCapture(S.pointerId)}catch{}if(p=-1,!c)return;c=!1;let W=o.offsetHeight||1;g.value+f*.12>W*.3||f>900?(b=!0,o.style.pointerEvents="none",g.to(W,f)):g.to(0,f)};return o.addEventListener("pointerdown",R,{passive:!0}),o.addEventListener("pointermove",z,{passive:!1}),o.addEventListener("pointerup",_,{passive:!0}),o.addEventListener("pointercancel",_,{passive:!0}),()=>{g.stop(),o.removeEventListener("pointerdown",R),o.removeEventListener("pointermove",z),o.removeEventListener("pointerup",_),o.removeEventListener("pointercancel",_),o.style.transform="",o.style.willChange="",o.style.animation="",o.style.pointerEvents="";let S=o.parentElement;S&&(S.style.opacity="")}},[a,e,r,n])}var ga,ii=Ce(()=>{"use strict";ga=require("react")});function Mn(e){return new Promise((r,t)=>{let n=new FileReader;n.onload=()=>r(n.result),n.onerror=()=>t(n.error??new Error("read failed")),n.readAsDataURL(e)})}async function xa(e){if(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200)return Mn(e);try{let r=await createImageBitmap(e),t=Math.min(1,1536/Math.max(r.width,r.height)),n=Math.max(1,Math.round(r.width*t)),a=Math.max(1,Math.round(r.height*t));r.close?.();let s=await createImageBitmap(e,{resizeWidth:n,resizeHeight:a,resizeQuality:"high"});try{let o=document.createElement("canvas");o.width=n,o.height=a;let c=o.getContext("2d");if(!c)return Mn(e);c.drawImage(s,0,0);let i=e.type==="image/png",l=await new Promise(h=>o.toBlob(h,i?"image/png":"image/jpeg",.85));return!l||l.size>=e.size?Mn(e):Mn(l)}finally{s.close?.()}}catch{return Mn(e)}}var uo=Ce(()=>{"use strict"});function sd(e){let r=0;for(let t=1;t<e.length;t++)r+=ci(e[t-1],e[t]);return r}function mo(e){let r=1/0,t=1/0,n=-1/0,a=-1/0;for(let s of e)s.x<r&&(r=s.x),s.y<t&&(t=s.y),s.x>n&&(n=s.x),s.y>a&&(a=s.y);return{minX:r,minY:t,maxX:n,maxY:a}}function bo(e,r,t){return[nn(e.minY/t*1e3),nn(e.minX/r*1e3),nn(e.maxY/t*1e3),nn(e.maxX/r*1e3)]}function id(e,r){let[t,n,a,s]=e,[o,c,i,l]=r,h=Math.min(s,l)-Math.max(n,c),p=Math.min(a,i)-Math.max(t,o);if(h<=0||p<=0)return!1;let d=Math.min((s-n)*(a-t),(l-c)*(i-o));return d>0&&h*p/d>.35}function ld(e,r,t){if(e.length<2)return null;let n=mo(e),a=bo(n,r,t),s=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(s<4)return null;let o=sd(e),c=ci(e[0],e[e.length-1]),i=o/Math.max(c,1e-6);return c/s<.3&&o>s*1.8?{gesture:"ring",box:a,straight:!1}:i<1.25?{gesture:"arrow",box:a,to:[nn(e[e.length-1].y/t*1e3),nn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function li(e,r,t){if(!r||!t)return[];let n=[],a=[],s=[];for(let i of e){if(i.kind==="pin"&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};s.push({gesture:"pin",id:i.id,text:i.label,box:bo(mo([l,l]),r,t)});continue}if(i.kind==="text"&&i.value&&typeof i.x=="number"&&typeof i.y=="number"){let l={x:i.x,y:i.y};a.push({gesture:"text",box:bo(mo([l,l]),r,t),text:i.value});continue}if(i.kind==="stroke"&&i.tool!=="eraser"&&i.points){let l=ld(i.points,r,t);l&&n.push(l)}}let o=new Set,c=[];for(let i=0;i<n.length;i++){if(o.has(i))continue;let l=n[i];for(let h=i+1;h<n.length;h++)o.has(h)||!l.straight||!n[h].straight||id(l.box,n[h].box)&&(o.add(h),l={gesture:"cross",box:cd(l.box,n[h].box),straight:!1});o.add(i),c.push(l.gesture==="arrow"?{gesture:"arrow",box:l.box,to:l.to}:{gesture:l.gesture,box:l.box})}return[...s,...c,...a]}var ci,nn,cd,hi=Ce(()=>{"use strict";ci=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);nn=e=>Math.max(0,Math.min(1e3,Math.round(e)));cd=(e,r)=>[Math.min(e[0],r[0]),Math.min(e[1],r[1]),Math.max(e[2],r[2]),Math.max(e[3],r[3])]});function ud(e,r,t){let n=[],a="";for(let s of r.split(/\s+/)){let o=a?`${a} ${s}`:s;a&&e.measureText(o).width>t?(n.push(a),a=s):a=o}return a&&n.push(a),n.slice(0,3)}function md(e,r){let t=`${r}%`;return e<33?{top:t,left:8,transform:"translateY(-100%)"}:e>67?{top:t,right:8,transform:"translateY(-100%)"}:{top:t,left:`${e}%`,transform:"translate(-50%, -100%)"}}function pi({src:e,onCancel:r,onSend:t,t:n}){let[a,s]=(0,st.useState)(null),[o,c]=(0,st.useState)(!1),[i,l]=(0,st.useState)("pin"),h=(0,st.useRef)(0),[p,d]=(0,st.useState)(null),u=(0,st.useRef)(null),[f,y]=(0,st.useState)([{points:[],closed:!1}]),b=f[f.length-1],M=(0,st.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),g=(0,st.useRef)(null),E=T=>y(C=>[...C.slice(-66),T]),R=i==="select",[z,_]=(0,st.useState)([]),[S,W]=(0,st.useState)(!1),X=(0,st.useRef)(null),N=(0,st.useRef)(null);(0,st.useEffect)(()=>{let T=new Image;return T.crossOrigin="anonymous",T.onload=()=>s(T),T.onerror=()=>c(!0),T.src=e,()=>{T.onload=null,T.onerror=null}},[e]);let P=(()=>{if(!a)return{w:0,h:0};let T=Math.min(1,hd/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*T),h:Math.round(a.naturalHeight*T)}})(),j=(0,st.useRef)(null),D=T=>{let C=X.current;if(!C||!a)return;let m=C.getContext("2d");if(!m)return;j.current||(j.current=document.createElement("canvas"));let ae=j.current;ae.width=C.width,ae.height=C.height;let G=ae.getContext("2d"),B=T?[...z,T]:z;for(let k of B)k.kind==="stroke"&&(G.save(),G.globalCompositeOperation=k.tool==="eraser"?"destination-out":"source-over",G.strokeStyle=di,G.lineWidth=k.tool==="eraser"?k.size*3:k.size,G.lineCap="round",G.lineJoin="round",G.beginPath(),k.points.forEach((F,q)=>q===0?G.moveTo(F.x,F.y):G.lineTo(F.x,F.y)),k.points.length===1&&G.lineTo(k.points[0].x+.01,k.points[0].y),G.stroke(),G.restore());m.clearRect(0,0,C.width,C.height),m.drawImage(a,0,0,C.width,C.height),m.drawImage(ae,0,0);let w=b.points.map((k,F)=>g.current?.index===F?g.current.point:k);w.length&&(m.save(),m.beginPath(),w.forEach((k,F)=>F?m.lineTo(k.x,k.y):m.moveTo(k.x,k.y)),b.closed&&(m.closePath(),m.fillStyle="#22c55e33",m.fill()),m.strokeStyle="#22c55e",m.lineWidth=Math.max(2,P.w/400),m.stroke(),m.restore());for(let k of w)m.beginPath(),m.arc(k.x,k.y,Math.max(3,P.w/260),0,Math.PI*2),m.fillStyle="#ffffff",m.fill(),m.strokeStyle="#15803d",m.stroke();for(let k of B){if(k.kind!=="pin")continue;let F=k.size;if(m.save(),m.beginPath(),m.moveTo(k.x,k.y),m.bezierCurveTo(k.x-F*2,k.y-F*2,k.x-F,k.y-F*3.5,k.x,k.y-F*3.5),m.bezierCurveTo(k.x+F,k.y-F*3.5,k.x+F*2,k.y-F*2,k.x,k.y),m.fillStyle=di,m.fill(),m.lineWidth=Math.max(1,F/7),m.strokeStyle="#fff",m.stroke(),m.beginPath(),m.arc(k.x,k.y-F*2.2,F*.5,0,Math.PI*2),m.fillStyle="#fff",m.fill(),k.label){m.font=`600 ${F*1.2}px system-ui, sans-serif`,m.textAlign="center",m.textBaseline="middle";let q=ud(m,k.label,C.width*.32),oe=F*1.5,de=Math.min(C.width,Math.max(...q.map(ne=>m.measureText(ne).width))+F),pe=q.length*oe+F*.4,ue=Math.max(de/2,Math.min(C.width-de/2,k.x)),K=Math.max(pe,k.y-F*3.7);m.fillStyle="rgba(0,0,0,.8)",m.fillRect(ue-de/2,K-pe,de,pe),m.fillStyle="#fff",q.forEach((ne,ye)=>m.fillText(ne,ue,K-pe+F*.2+oe*(ye+.5),de-F))}m.restore()}};(0,st.useEffect)(()=>{D()},[a,z,b,P.w,P.h]);let re=T=>{let C=X.current,m=C.getBoundingClientRect();return{x:Math.max(0,Math.min(C.width,(T.clientX-m.left)/m.width*C.width)),y:Math.max(0,Math.min(C.height,(T.clientY-m.top)/m.height*C.height))}},ge=()=>Math.max(4,Math.round(P.w/180)),be=T=>{_(C=>C.filter(m=>m.kind!=="pin"||m.id!==T)),d(null)},Y=()=>{let T=z.find(C=>C.kind==="pin"&&C.id===p);T?.kind==="pin"&&!T.label.trim()?be(T.id):d(null)},me=T=>{if(!a)return;let C=re(T);if(i==="pin"){let m=z.find(B=>B.kind==="pin"&&Math.hypot(C.x-B.x,C.y-(B.y-B.size*1.7))<B.size*2);if(m?.kind==="pin"){d(m.id),T.currentTarget.setPointerCapture(T.pointerId),u.current={id:m.id,offset:{x:C.x-m.x,y:C.y-m.y}};return}if(p){Y();return}if(z.filter(B=>B.kind==="pin").length>=dd)return;let ae=`pin-${++h.current}`,G=Math.max(10,P.w/X.current.getBoundingClientRect().width*9);_(B=>[...B,{kind:"pin",...C,id:ae,label:"",size:G}]),d(ae);return}if(i==="select"){let m=b.points[0],ae=X.current.getBoundingClientRect(),G=12*P.w/ae.width;if(!b.closed&&m&&b.points.length>=3&&Math.hypot(C.x-m.x,C.y-m.y)<G)E({...b,closed:!0});else{let B=b.points.findIndex(w=>Math.hypot(C.x-w.x,C.y-w.y)<G);if(B>=0){T.currentTarget.setPointerCapture(T.pointerId),g.current={index:B,point:C};return}if(b.closed||b.points.length>=64)return;E({...b,points:[...b.points,C]})}return}T.target.setPointerCapture(T.pointerId),N.current={kind:"stroke",tool:i,size:ge(),points:[C]},D(N.current)},J=T=>{if(u.current){let{id:C,offset:m}=u.current,ae=re(T);_(G=>G.map(B=>B.kind==="pin"&&B.id===C?{...B,x:Math.max(0,Math.min(P.w,ae.x-m.x)),y:Math.max(0,Math.min(P.h,ae.y-m.y))}:B));return}if(g.current){g.current.point=re(T),D();return}N.current&&(N.current.points.push(re(T)),D(N.current))},H=()=>{if(u.current){u.current=null;return}if(g.current){let{index:C,point:m}=g.current;g.current=null,E({...b,points:b.points.map((ae,G)=>G===C?m:ae)});return}if(!N.current)return;let T=N.current;N.current=null,_(C=>[...C,T])},A=z.filter(T=>T.kind==="pin"),v=A.find(T=>T.id===p),L=!!a&&!(b.points.length>0&&!b.closed)&&A.length>0&&A.every(T=>T.label.trim()),I=()=>{if(!(!L||!a))try{let T=document.createElement("canvas");T.width=P.w,T.height=P.h;let C=T.getContext("2d");if(!C){W(!0);return}C.drawImage(a,0,0,P.w,P.h);let m=T.toDataURL("image/jpeg",.92),ae=X.current?.toDataURL("image/jpeg",.85)||m,G=li(z,P.w,P.h);if(b.closed){let B=k=>Math.round(k/P.w*1e3),w=k=>Math.round(k/P.h*1e3);G.unshift({gesture:"selection",id:M.current,box:[w(Math.min(...b.points.map(k=>k.y))),B(Math.min(...b.points.map(k=>k.x))),w(Math.max(...b.points.map(k=>k.y))),B(Math.max(...b.points.map(k=>k.x)))],points:b.points.map(k=>[B(k.x),w(k.y)])})}t(m,A.map(B=>B.label.trim()).join("; "),G,ae)}catch{W(!0)}},V=i==="pin"?"markupPinHint":i==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,Ve.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,Ve.jsxs)("div",{className:"hsk-markup-head",children:[(0,Ve.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(V)}),(0,Ve.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,Ve.jsx)("div",{className:"hsk-markup-stage",children:o?(0,Ve.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,Ve.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,Ve.jsx)("canvas",{ref:X,width:P.w,height:P.h,className:`hsk-markup-canvas hsk-markup-canvas--${i}`,style:{touchAction:"none",cursor:R||i==="pin"?"crosshair":void 0},onPointerDown:me,onPointerMove:J,onPointerUp:H,onPointerCancel:()=>{u.current=null,g.current=null,N.current=null,D()}}),i==="pin"&&v&&(0,Ve.jsxs)("div",{className:"hsk-markup-pinlabel",style:md(v.x/P.w*100,Math.max(12,(v.y-v.size*4)/P.h*100)),children:[(0,Ve.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:v.label,maxLength:pd,style:{width:`${Math.min(34,Math.max(16,v.label.length+2))}ch`},onChange:T=>_(C=>C.map(m=>m.kind==="pin"&&m.id===v.id?{...m,label:T.target.value}:m)),onKeyDown:T=>{(T.key==="Enter"||T.key==="Escape")&&Y()}}),(0,Ve.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>be(v.id),children:"\xD7"})]})]}):(0,Ve.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,Ve.jsxs)("div",{className:"hsk-markup-tools",children:[(0,Ve.jsxs)("button",{className:`hsk-markup-tool${i==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,Ve.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{verticalAlign:"middle",marginInlineEnd:5},"aria-hidden":"true",children:[(0,Ve.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,Ve.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>E({...b,closed:!0}),children:n("markupCloseOutline")}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,Ve.jsx)("button",{className:`hsk-markup-tool${i==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",onClick:()=>R?y(T=>T.length>1?T.slice(0,-1):T):_(T=>T.slice(0,-1)),disabled:R?f.length<2:z.length===0,children:n("markupUndo")}),(0,Ve.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{_([]),d(null),y([{points:[],closed:!1}]),l("pin")},disabled:z.length===0&&!b.points.length,children:n("markupClear")}),(0,Ve.jsx)("button",{className:"hsk-markup-go",onClick:I,disabled:!L,children:n("markupSend")})]}),S&&(0,Ve.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var st,Ve,di,hd,dd,pd,ui=Ce(()=>{"use strict";st=require("react");hi();Ve=require("react/jsx-runtime"),di="#ff5a5a",hd=1280,dd=4,pd=80});function yi(e){let r=2166136261;for(let t=0;t<e.length;t++)r^=e.charCodeAt(t),r=Math.imul(r,16777619);return r>>>0}function Rn(e){let r=e>>>0;return()=>{r=r+1831565813>>>0;let t=Math.imul(r^r>>>15,1|r);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function bd(e){let t=new Float32Array(65536);for(let a=0;a<t.length;a++)t[a]=e();let n=(a,s)=>t[(s&255)*256+(a&255)];return(a,s)=>{let o=Math.floor(a),c=Math.floor(s),i=mi(a-o),l=mi(s-c),h=n(o,c),p=n(o+1,c),d=n(o,c+1),u=n(o+1,c+1);return(h+(p-h)*i)*(1-l)+(d+(u-d)*i)*l}}function fd(e,r,t,n){let a=t/Math.SQRT2,s=Math.ceil(e/a),o=Math.ceil(r/a),c=new Int32Array(s*o).fill(-1),i=[],l=[],h=(d,u)=>{let f=i.length;i.push([d,u]),c[Math.floor(u/a)*s+Math.floor(d/a)]=f,l.push(f)},p=(d,u)=>{if(d<0||u<0||d>=e||u>=r)return!1;let f=Math.floor(d/a),y=Math.floor(u/a);for(let b=Math.max(y-2,0);b<=Math.min(y+2,o-1);b++)for(let M=Math.max(f-2,0);M<=Math.min(f+2,s-1);M++){let g=c[b*s+M];if(g<0)continue;let E=i[g][0]-d,R=i[g][1]-u;if(E*E+R*R<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[u,f]=i[l[d]],y=!1;for(let b=0;b<24;b++){let M=n()*Math.PI*2,g=t*(1+n()),E=u+Math.cos(M)*g,R=f+Math.sin(M)*g;if(p(E,R)){h(E,R),y=!0;break}}y||l.splice(d,1)}return i}function ko(e,r,t){let n=ki(e),a=ki(r);return`rgb(${Math.round(n[0]+(a[0]-n[0])*t)},${Math.round(n[1]+(a[1]-n[1])*t)},${Math.round(n[2]+(a[2]-n[2])*t)})`}function vo(){for(let e of xo)e()}function wi(e){go.forEach(r=>r(e))}function vd(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Ci(e,r,t,n,a,s,o,c=r){let i=o?kd[o]:void 0,l=Rn(a),h=bd(Rn(a^2654435769)),p=e*r,u=Math.max(40,Math.min(520,Math.round(p/3100)))/.48,f=Math.max(26,Math.sqrt(.7*p/u)),y=fd(e,r,f,l),b=4.4/Math.max(e,r),M=b*2.6,g=Math.hypot(e,r),E=l()*Math.PI*2,R=Math.cos(E),z=Math.sin(E),_=e*(.18+l()*.64),S=r*(.12+l()*.5),W=[],X=Math.hypot(e,r)||1,N=Rn(a^1540483477),P=s?e:0,j=Math.hypot(e,c)||1,[D,re,ge]=t.split(",").map(Y=>parseFloat(Y)||0),be=.2126*D+.7152*re+.0722*ge>128;for(let[Y,me]of y){let J=h(Y*b,me*b)*.72+h(Y*M,me*M)*.28,H=Math.min(1,Math.max(0,(J-.26)/.44));if(l()>H*H*(3-2*H))continue;let A=l(),v=Math.max(0,1-Math.hypot(Y-_,me-S)/(g*.72))**1.6,L=((Y-e/2)*R+(me-r/2)*z)/g+.5,I=!be,T=((I?.055:.028)+l()*(I?.04:.025))*(.75+L*.55)*(1+v*.4),C=ko(t,n,v*.85),m=((s?e-Y:Y)+r-me)/(e+r||1),ae=l()*16777215|0,G=vd(ae,m,be),B=0,w=I?1.05+l()*.35:.65+l()*.35,k=20,F=fo[0],q=1;A<.5?(B=it(l,.16),w=I?1.15+l()*.45:.7+l()*.35,k=20+l()*16,F=fo[l()*fo.length|0]):A<.82?(B=l()*Math.PI*2,w=I?.95+l()*.4:.6+l()*.4,k=16+l()*20,F=bi[l()*bi.length|0]):A<.95||!i?(B=l()*Math.PI*2,w=I?.85+l()*.35:.55+l()*.35,k=7+l()*7,F=fi[l()*fi.length|0]):(B=it(l,.3),w=I?1.1+l()*.3:.75+l()*.3,k=15+l()*9,F=i,q=2.6),W.push({x:Y,y:me,roll:A,rotation:B,lineWidth:w,alpha:T*q,baseColor:C,shimmerColor:G,drawFn:F,size:k,seed:ae,normDist:m,bloom:Math.min(1,Math.hypot(Y-P,me-c)/j)*.62+N()*.08,glow:be?.2:.06,ux:(Y-P)/(Math.hypot(Y-P,me-c)||1),uy:(me-c)/(Math.hypot(Y-P,me-c)||1)})}return W}function wd(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function _r(e,r,t,n,a,s=1,o){e.clearRect(0,0,t,n),e.lineCap="round",e.lineJoin="round";let c=a>=0&&a<=1.4,i=c?a*1.4-.2:-999,l=.3;for(let h of r){let p=h.alpha,d=h.baseColor,u=h.lineWidth,f=1,y=0,b=0;if(o!==void 0){let g=Math.min(1,Math.max(0,(o-h.bloom)/yd));if(g<=0)continue;let E=1-(1-g)**3,R=Math.sin(g*Math.PI)**2;p=h.alpha*E+R*h.glow,d=ko(h.baseColor,h.shimmerColor,R*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+R*.35),f=.86+.14*wd(g),y=-h.ux*(1-E)*9,b=-h.uy*(1-E)*9}else if(c){let g=h.normDist-i;if(g>l)p=h.alpha*.45,d=h.baseColor,u=h.lineWidth;else if(g<-l)p=h.alpha,d=h.baseColor,u=h.lineWidth;else{let E=Math.cos(g/l*(Math.PI/2))**2;p=h.alpha+E*.08,d=E>.08?ko(h.baseColor,h.shimmerColor,E*.65):h.baseColor,u=h.lineWidth*(1+E*.2)}}e.save(),e.translate(h.x+(h.dx??0)+y,h.y+(h.dy??0)+b),e.rotate(h.rotation+(h.dr??0)),f!==1&&e.scale(f,f),h.hop&&(e.scale(1+h.hop,1+h.hop),p*=1+h.hop*2),e.globalAlpha=Math.min(p*s,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let M=Rn(h.seed);h.drawFn(e,h.size,M),e.restore()}}function Sd({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,vt.useRef)(null);return(0,vt.useEffect)(()=>{let s=a.current,o=s?.getContext("2d");if(!s||!o)return;let c=0,i=()=>{let h=s.clientWidth,p=s.clientHeight,d=Math.min(window.devicePixelRatio||1,3);s.width=Math.round(h*d),s.height=Math.round(p*d);let u=getComputedStyle(s),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",y=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*Tn,M=p*Tn,g=Ci(b,M,f,y,yi(e||"kiku"),!1,r);for(let z of g)z.lineWidth*=Tn*n;if(o.setTransform(d/Tn,0,0,d/Tn,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){_r(o,g,b,M,-1,t);return}let E=performance.now(),R=z=>{let _=(z-E)%(vi*2)/vi,S=_<1?_:2-_;_r(o,g,b,M,(1-Math.cos(S*Math.PI))/2*1.4,t),c=requestAnimationFrame(R)};c=requestAnimationFrame(R)},l=new ResizeObserver(()=>{c||!s.clientWidth||!s.clientHeight||(l.disconnect(),i())});return l.observe(s),()=>{l.disconnect(),cancelAnimationFrame(c)}},[e,r,t,n]),(0,En.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}function an({active:e,seed:r,theme:t}){let[n,a]=(0,vt.useState)(e);return(0,vt.useEffect)(()=>{if(e){a(!0);return}let s=setTimeout(()=>a(!1),Md);return()=>clearTimeout(s)},[e]),n?(0,En.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,En.jsx)(Sd,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var vt,En,mi,it,fo,bi,fi,kd,ki,go,xo,gd,gi,xi,xd,yd,Cd,Tn,vi,Md,va,zn=Ce(()=>{"use strict";vt=Zt(require("react")),En=require("react/jsx-runtime");mi=e=>e*e*(3-2*e);it=(e,r)=>(e()-.5)*r,fo=[(e,r,t)=>{let n=r*.5,a=r*(.14+t()*.04),s=r*.07;e.beginPath(),e.moveTo(-a-s*.6,-n),e.lineTo(a+s*.6,-n),e.moveTo(-a,-n+s),e.lineTo(a,-n+s),e.moveTo(-a,-n+s),e.lineTo(-a*.85,n-s),e.moveTo(a,-n+s),e.lineTo(a*.85,n-s),e.moveTo(0,-n+s*1.7),e.lineTo(0,n-s*1.7),e.moveTo(-a,n-s),e.lineTo(a,n-s),e.moveTo(-a-s*.6,n),e.lineTo(a+s*.6,n),e.stroke()},(e,r,t)=>{let n=r*.5,a=-n*(.18+t()*.1);e.beginPath(),e.moveTo(-n,a),e.lineTo(0,-n),e.lineTo(n,a),e.closePath(),e.moveTo(-n*.92,a+n*.16),e.lineTo(n*.92,a+n*.16);for(let s of[-.62,-.21,.21,.62])e.moveTo(n*s,a+n*.16),e.lineTo(n*s,n*.8);e.moveTo(-n,n*.8),e.lineTo(n,n*.8),e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.48+t()*.12);e.beginPath(),e.moveTo(-n*.2,-n*.86),e.lineTo(n*.2,-n*.86),e.moveTo(-n*.15,-n*.78),e.bezierCurveTo(-a,-n*.3,-a*.85,n*.6,0,n*.86),e.bezierCurveTo(a*.85,n*.6,a,-n*.3,n*.15,-n*.78),e.moveTo(-n*.17,-n*.64),e.quadraticCurveTo(-a*1.16,-n*.48,-a*.7,-n*.04),e.moveTo(n*.17,-n*.64),e.quadraticCurveTo(a*1.16,-n*.48,a*.7,-n*.04),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.9,n*.52),e.quadraticCurveTo(0,-n*.18,n*.9,-n*.58),e.stroke();let a=4+(t()*3|0);for(let s=0;s<a;s++){let o=.16+s/a*.8,c=-n*.9+o*n*1.8,i=n*.52-o*n*1.16+(1-o)*o*n*.3,l=s%2?1:-1,h=n*(.26+t()*.1);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+h*.5,i+l*h*.66,c+h*.9,i+l*h*.08),e.quadraticCurveTo(c+h*.42,i+l*h*.04,c,i),e.stroke()}},(e,r,t)=>{let n=r*.5;e.beginPath(),e.moveTo(-n*.85,-n*.7),e.quadraticCurveTo(-n*.1,-n*.35,n*.2,n*.1),e.stroke();let a=[[-n*.45,-n*.12],[n*.05,n*.3],[n*.42,-n*.4]];for(let[s,o]of a)e.beginPath(),e.moveTo(s,o-n*.28),e.lineTo(s-n*.02,o-n*.16),e.stroke(),e.beginPath(),e.ellipse(s,o,n*(.15+t()*.04),n*.19,it(t,.5),0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.5;for(let a of[-1,1]){e.beginPath(),e.arc(0,0,n*.72,a>0?-1.25:1.25,a>0?1.25:Math.PI*2-1.25,a<0),e.stroke();for(let s=0;s<5;s++){let o=-1.05+s/4*2.1,c=Math.sin(o)*a*n*.72,i=Math.cos(o)*n*.72,l=n*(.2+t()*.08);e.beginPath(),e.moveTo(c,i),e.quadraticCurveTo(c+a*l*.9,i-l*.5,c+a*l*.6,i-l*1.05),e.stroke()}}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t,t*.6),e.lineTo(t*.55,t*.6),e.lineTo(t*.55,-t*.6),e.lineTo(-t*.45,-t*.6),e.lineTo(-t*.45,t*.15),e.lineTo(t*.1,t*.15),e.lineTo(t*.1,-t*.18),e.stroke()},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.62,t*.8),e.lineTo(-t*.62,-t*.05),e.arc(0,-t*.05,t*.62,Math.PI,0),e.lineTo(t*.62,t*.8),e.stroke(),e.beginPath(),e.moveTo(-t*.86,t*.8),e.lineTo(t*.86,t*.8),e.stroke()},(e,r,t)=>{let n=r*.5;e.beginPath(),e.arc(0,0,n*.4,0,Math.PI*2),e.stroke();let a=t()*.5;for(let s=0;s<8;s++){let o=a+s/8*Math.PI*2;e.beginPath(),e.moveTo(Math.cos(o)*n*.6,Math.sin(o)*n*.6),e.lineTo(Math.cos(o)*n*.94,Math.sin(o)*n*.94),e.stroke()}},(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(-t*.44,t*.7),e.bezierCurveTo(-t,t*.2,-t*.8,-t*.7,-t*.3,-t*.6),e.moveTo(t*.44,t*.7),e.bezierCurveTo(t,t*.2,t*.8,-t*.7,t*.3,-t*.6),e.moveTo(-t*.32,-t*.64),e.lineTo(t*.32,-t*.64),e.moveTo(-t*.44,t*.7),e.lineTo(t*.44,t*.7);for(let n of[-.16,.02,.2])e.moveTo(t*n,-t*.56),e.lineTo(t*n,t*.62);e.stroke()},(e,r,t)=>{let n=r*.5,a=n*(.4+t()*.18);e.beginPath(),e.moveTo(-n,n*.16),e.quadraticCurveTo(-n*.5,-a,0,-n*.02),e.quadraticCurveTo(n*.5,-a,n,n*.16),e.stroke()}],bi=[(e,r,t)=>{let n=r*.5,a=-n+it(t,n*.3),s=it(t,n);e.beginPath(),e.moveTo(a,s);let o=4+(t()*4|0);for(let c=0;c<o;c++){let i=a+n*2/o+it(t,n*.5),l=it(t,n*1.5);e.quadraticCurveTo(a+it(t,n*.9),s+it(t,n*1.6),i,l),a=i,s=l}e.stroke()},(e,r,t)=>{let n=r*.5,a=2.2+t()*1.6,s=t()<.5?-1:1;e.beginPath();for(let o=0;o<=60;o++){let c=o/60,i=s*c*a*Math.PI*2,l=n*c*(.9+it(t,.06)),h=Math.cos(i)*l,p=Math.sin(i)*l;o===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),s=it(t,.7);for(let o=0;o<a;o++){let c=-n+o/(a-1)*n*2+it(t,n*.16),i=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-s*i*.5,-i*.5),e.quadraticCurveTo(c+it(t,n*.2),0,c+s*i*.5,i*.5),e.stroke()}},(e,r,t)=>{let n=r*.5,a=2+(t()*3|0),s=n*2/a;e.beginPath(),e.moveTo(-n,n*.4);for(let o=0;o<a;o++){let c=-n+o*s,i=s*(.42+t()*.18);e.bezierCurveTo(c+i*.2,n*.4-i*2.1,c+s-i*.2,n*.4-i*2.1,c+s,n*.4+it(t,n*.14))}e.stroke()}],fi=[(e,r,t)=>{e.beginPath(),e.arc(0,0,r*.1+t()*r*.04,0,Math.PI*2),e.fill()},(e,r,t)=>{e.beginPath(),e.arc(it(t,r*.04),it(t,r*.04),r*.32,0,Math.PI*2),e.stroke()},(e,r,t)=>{let n=r*.4,a=n*(.2+t()*.12);e.beginPath(),e.moveTo(0,-n),e.quadraticCurveTo(a,-a,n,0),e.quadraticCurveTo(a,a,0,n),e.quadraticCurveTo(-a,a,-n,0),e.quadraticCurveTo(-a,-a,0,-n),e.stroke()},(e,r,t)=>{let n=r*.4;e.beginPath(),e.moveTo(-n,it(t,r*.08)),e.quadraticCurveTo(0,it(t,r*.16),n,it(t,r*.08)),e.stroke()}],kd={light:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,-t),e.quadraticCurveTo(t*.16,-t*.16,t,0),e.quadraticCurveTo(t*.16,t*.16,0,t),e.quadraticCurveTo(-t*.16,t*.16,-t,0),e.quadraticCurveTo(-t*.16,-t*.16,0,-t),e.stroke()},dark:(e,r)=>{let t=r*.44;e.beginPath(),e.moveTo(-t*.6,-t*.5),e.lineTo(t*.6,-t*.5),e.lineTo(t,t*.05),e.lineTo(0,t),e.lineTo(-t,t*.05),e.closePath(),e.moveTo(-t,t*.05),e.lineTo(t,t*.05),e.moveTo(-t*.6,-t*.5),e.lineTo(-t*.3,t*.05),e.lineTo(0,t),e.moveTo(t*.6,-t*.5),e.lineTo(t*.3,t*.05),e.lineTo(0,t),e.stroke()},mahogany:(e,r)=>{let t=r*.5;e.beginPath(),e.moveTo(0,t),e.bezierCurveTo(-t*.9,t*.2,-t*.7,-t*.7,0,-t),e.bezierCurveTo(t*.7,-t*.7,t*.9,t*.2,0,t),e.moveTo(0,t*.86),e.lineTo(0,-t*.86);for(let n=0;n<3;n++){let a=-.34+n*.36;e.moveTo(0,t*a),e.lineTo(t*.44,t*(a-.26)),e.moveTo(0,t*a),e.lineTo(-t*.44,t*(a-.26))}e.stroke()},blush:(e,r)=>{let t=r*.5;for(let n=0;n<5;n++){let a=n/5*Math.PI*2-Math.PI/2;e.beginPath(),e.ellipse(Math.cos(a)*t*.52,Math.sin(a)*t*.52,t*.42,t*.26,a,0,Math.PI*2),e.stroke()}e.beginPath(),e.arc(0,0,t*.19,0,Math.PI*2),e.stroke()},coffee:(e,r)=>{let t=r*.5;e.beginPath(),e.ellipse(0,0,t*.6,t*.9,0,0,Math.PI*2),e.stroke(),e.beginPath(),e.moveTo(0,-t*.84),e.bezierCurveTo(t*.34,-t*.3,-t*.34,t*.3,0,t*.84),e.stroke()},midnight:(e,r)=>{let t=r*.5;e.beginPath();for(let n=0;n<10;n++){let a=n%2===0?t:t*.4,s=n/10*Math.PI*2-Math.PI/2,o=Math.cos(s)*a,c=Math.sin(s)*a;n===0?e.moveTo(o,c):e.lineTo(o,c)}e.closePath(),e.stroke()}},ki=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};go=new Set,xo=new Set;gd=83,gi=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],xi=7,xd=.28;yd=.3;Cd=vt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let s=(0,vt.useRef)(null),o=(0,vt.useRef)(!1),c=(0,vt.useRef)(0),i=(0,vt.useRef)(null),l=(0,vt.useRef)(0),h=(0,vt.useRef)(0),p=(0,vt.useRef)(a);return(0,vt.useEffect)(()=>{let d=s.current;if(!d)return;let u=yi(r||"kiku"),f=0,y=(N,P,j,D)=>re=>{let ge=re-N,be=Math.min(1,ge/P),Y=d.clientWidth,me=d.clientHeight;if(Y&&me){let J=Math.min(window.devicePixelRatio||1,3),H=Math.round(Y*J),A=Math.round(me*J);(d.width!==H||d.height!==A)&&(d.width=H,d.height=A);let v=d.getContext("2d");v&&(v.setTransform(J,0,0,J,0,0),_r(v,j,Y,me,-1,1,be))}if(be<1)c.current=requestAnimationFrame(y(N,P,j,D));else{o.current=!1;let J=d.clientWidth,H=d.clientHeight,A=d.getContext("2d");if(A&&J&&H){let v=Math.min(window.devicePixelRatio||1,3);A.setTransform(v,0,0,v,0,0),_r(A,j,J,H,-1)}}},b=()=>{let N=d.clientWidth,P=d.clientHeight;if(!N||!P)return;let j=Math.min(window.devicePixelRatio||1,3),D=d.getContext("2d");if(!D)return;let re=getComputedStyle(d),ge=re.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",be=re.getPropertyValue("--hsk-doodle-tint").trim()||ge,Y=n==="rtl"||re.direction==="rtl"||d.closest('[dir="rtl"]')!==null,me=typeof window<"u"?Math.max(P,window.innerHeight||0):P,J=Ci(N,me,ge,be,u,Y,t,P);i.current=J,l.current=N,h.current=me;let H=Math.round(N*j),A=Math.round(P*j);if((d.width!==H||d.height!==A)&&(d.width=H,d.height=A),D.setTransform(j,0,0,j,0,0),p.current){D.clearRect(0,0,N,P);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){_r(D,J,N,P,-1);return}cancelAnimationFrame(c.current),o.current=!0;let L=1500,I=performance.now();c.current=requestAnimationFrame(y(I,L,J,Y))},M=()=>{let N=i.current,P=d.clientWidth,j=d.clientHeight;if(N&&P===l.current&&j<=h.current){if(o.current||p.current||!j)return;let D=d.getContext("2d");if(!D)return;let re=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(P*re),d.height=Math.round(j*re),D.setTransform(re,0,0,re,0,0),_r(D,N,P,j,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let g=()=>{p.current&&(p.current=!1,b())};xo.add(g);let E=p.current?window.setTimeout(g,2e3):0,R=new ResizeObserver(M);R.observe(d);let z=window.matchMedia?.("(prefers-color-scheme: dark)"),_=()=>{b()};z?.addEventListener?.("change",_);let S=0,W=()=>{let N=i.current,P=d.getContext("2d"),j=d.clientWidth,D=d.clientHeight;if(!N||!P||!j||!D)return;let re=Math.min(window.devicePixelRatio||1,3);P.setTransform(re,0,0,re,0,0),_r(P,N,j,D,-1)},X=({x:N,y:P,strength:j})=>{let D=i.current;if(!D||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),o.current=!1,clearTimeout(S);let re=d.getBoundingClientRect(),ge=N-re.left,be=P-re.top,Y=Rn(performance.now()*997|0),me=(v,L)=>Math.max(-L,Math.min(L,v)),J=D.map(v=>{let L=v.dx??0,I=v.dy??0,V=v.dr??0,T=v.x-ge,C=v.y-be,m=Math.hypot(T,C)||1,ae=j*(.18+.82*Math.exp(-m/220)),G=ae*(.6+Y()*1.8),B=me(L+T/m*G+(Y()-.5)*ae*2,xi),w=me(I+C/m*G+(Y()-.5)*ae*2,xi),k=me(V+(Y()-.5)*ae*.12,xd);return{g:v,fx:L,fy:I,fr:V,tx:B,ty:w,tr:k,lift:ae*.09}}),H=0,A=()=>{let v=gi[H];for(let L of J)L.g.dx=L.fx+(L.tx-L.fx)*v.k,L.g.dy=L.fy+(L.ty-L.fy)*v.k,L.g.dr=L.fr+(L.tr-L.fr)*v.k,L.g.hop=L.lift*v.hop;W(),++H<gi.length&&(S=window.setTimeout(A,gd))};A()};return go.add(X),()=>{go.delete(X),xo.delete(g),clearTimeout(E),clearTimeout(S),clearTimeout(f),cancelAnimationFrame(c.current),o.current=!1,R.disconnect(),z?.removeEventListener?.("change",_)}},[r,t,n]),(0,En.jsx)("canvas",{className:"hsk-cb-doodles",ref:s,"aria-hidden":"true"})}),Tn=3,vi=1800;Md=300;va=Cd});function Ln(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=wa.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ya[n]?.endonym)return ya[n].endonym;let s=Object.values(ya).find(c=>c.endonym?.toLowerCase()===n);if(s?.endonym)return s.endonym;let o=r||(n.length<=3?n:void 0);if(o&&typeof Intl<"u"&&Intl.DisplayNames)try{let i=new Intl.DisplayNames([o],{type:"language"}).of(o);if(i&&i.toLowerCase()!==o.toLowerCase())return i}catch{}return t}function Si(e){for(let r of e){let t=r.codePointAt(0)??0;if(t>=1424&&t<=2303||t>=64285&&t<=65023||t>=65136&&t<=65279)return!0}return!1}function Mi(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Dr(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ya).find(([o,c])=>o===r||c.endonym?.toLowerCase()===r||Ln(o)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Ln(e)||Mi(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||Si(t[1].preparing),known:!0};let n=Ln(e)||e,a=Mi(n),s=Si(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:s?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:s,known:!1}}function Ri(e){let r=e.trim();if(!r||r.length>40||r.includes("?"))return null;r=r.replace(/^(hi|hey|hello|yo)[,!.\s]+/i,""),r=r.replace(/^(i['’]?m|im|my name is|call me|it['’]?s|this is|name['’]?s)\s+/i,""),r=r.trim().replace(/[.!,]+$/,"");let t=r.split(/\s+/);if(t.length===0||t.length>3||!/^[\p{L}][\p{L}\-'’ ]{0,30}$/u.test(r))return null;let n=r.toLowerCase();if(["phone","laptop","tv","cheap","best","under","buy","search","find","show","need","want","price","sofa","shoe","headphone","camera","gift","help"].some(o=>n.includes(o)))return null;let s=t[0];return s.charAt(0).toUpperCase()+s.slice(1)}var yo,Nn,wa,ya,In,wo,Er,Pt,Co,zr,Ti,Ei,zi,So,Ot=Ce(()=>{"use strict";yo=Zt(require("react")),Nn=[],wa=[{value:"English",native:"English",tag:"en",rtl:!1},{value:"Chinese",native:"\u4E2D\u6587",tag:"zh",rtl:!1},{value:"Spanish",native:"Espa\xF1ol",tag:"es",rtl:!1},{value:"Arabic",native:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",tag:"ar",rtl:!0},{value:"Hindi",native:"\u0939\u093F\u0928\u094D\u0926\u0940",tag:"hi",rtl:!1},{value:"French",native:"Fran\xE7ais",tag:"fr",rtl:!1},{value:"Swahili",native:"Kiswahili",tag:"sw",rtl:!1},{value:"Portuguese",native:"Portugu\xEAs",tag:"pt",rtl:!1},{value:"Japanese",native:"\u65E5\u672C\u8A9E",tag:"ja",rtl:!1},{value:"Urdu",native:"\u0627\u0631\u062F\u0648",tag:"ur",rtl:!0}];ya={english:{preparing:"Preparing in English\u2026",changeLang:"Change language",endonym:"English"},swahili:{preparing:"Inatayarisha kwa Kiswahili\u2026",changeLang:"Badilisha lugha",endonym:"Kiswahili"},french:{preparing:"Configuration en fran\xE7ais\u2026",changeLang:"Changer de langue",endonym:"Fran\xE7ais"},spanish:{preparing:"Configurando en espa\xF1ol\u2026",changeLang:"Cambiar idioma",endonym:"Espa\xF1ol"},arabic:{preparing:"\u062C\u0627\u0631\u064D \u0627\u0644\u0625\u0639\u062F\u0627\u062F \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629\u2026",changeLang:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0644\u063A\u0629",rtl:!0,endonym:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"},portuguese:{preparing:"Configurando em portugu\xEAs\u2026",changeLang:"Alterar idioma",endonym:"Portugu\xEAs"},hindi:{preparing:"\u0939\u093F\u0928\u094D\u0926\u0940 \u092E\u0947\u0902 \u0924\u0948\u092F\u093E\u0930 \u0915\u093F\u092F\u093E \u091C\u093E \u0930\u0939\u093E \u0939\u0948\u2026",changeLang:"\u092D\u093E\u0937\u093E \u092C\u0926\u0932\u0947\u0902",endonym:"\u0939\u093F\u0928\u094D\u0926\u0940"},chinese:{preparing:"\u6B63\u5728\u51C6\u5907\u4E2D\u6587\u73AF\u5883\u2026",changeLang:"\u66F4\u6539\u8BED\u8A00",endonym:"\u4E2D\u6587"},urdu:{preparing:"\u0627\u0631\u062F\u0648 \u0645\u06CC\u06BA \u062A\u06CC\u0627\u0631\u06CC \u062C\u0627\u0631\u06CC \u06C1\u06D2\u2026",changeLang:"\u0632\u0628\u0627\u0646 \u062A\u0628\u062F\u06CC\u0644 \u06A9\u0631\u06CC\u06BA",rtl:!0,endonym:"\u0627\u0631\u062F\u0648"},japanese:{preparing:"\u65E5\u672C\u8A9E\u3092\u8A2D\u5B9A\u4E2D\u2026",changeLang:"\u8A00\u8A9E\u3092\u5909\u66F4",endonym:"\u65E5\u672C\u8A9E"},german:{preparing:"Wird auf Deutsch eingerichtet\u2026",changeLang:"Sprache \xE4ndern",endonym:"Deutsch"},italian:{preparing:"Configurazione in italiano\u2026",changeLang:"Cambia lingua",endonym:"Italiano"},russian:{preparing:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043D\u0430 \u0440\u0443\u0441\u0441\u043A\u043E\u043C\u2026",changeLang:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A",endonym:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},korean:{preparing:"\uD55C\uAD6D\uC5B4\uB85C \uC124\uC815 \uC911\u2026",changeLang:"\uC5B8\uC5B4 \uBCC0\uACBD",endonym:"\uD55C\uAD6D\uC5B4"},turkish:{preparing:"T\xFCrk\xE7e olarak haz\u0131rlan\u0131yor\u2026",changeLang:"Dili de\u011Fi\u015Ftir",endonym:"T\xFCrk\xE7e"},vietnamese:{preparing:"\u0110ang thi\u1EBFt l\u1EADp b\u1EB1ng Ti\u1EBFng Vi\u1EC7t\u2026",changeLang:"\u0110\u1ED5i ng\xF4n ng\u1EEF",endonym:"Ti\u1EBFng Vi\u1EC7t"},indonesian:{preparing:"Menyiapkan dalam Bahasa Indonesia\u2026",changeLang:"Ubah bahasa",endonym:"Bahasa Indonesia"},malay:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},bahasa:{preparing:"Menyediakan dalam Bahasa Melayu\u2026",changeLang:"Tukar bahasa",endonym:"Bahasa Melayu"},polish:{preparing:"Przygotowywanie w j\u0119zyku polskim\u2026",changeLang:"Zmie\u0144 j\u0119zyk",endonym:"Polski"},dutch:{preparing:"Instellen in het Nederlands\u2026",changeLang:"Taal wijzigen",endonym:"Nederlands"},thai:{preparing:"\u0E01\u0E33\u0E25\u0E31\u0E07\u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22\u2026",changeLang:"\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E20\u0E32\u0E29\u0E32",endonym:"\u0E44\u0E17\u0E22"},bengali:{preparing:"\u09AC\u09BE\u0982\u09B2\u09BE\u09AF\u09BC \u09AA\u09CD\u09B0\u09B8\u09CD\u09A4\u09C1\u09A4 \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7\u2026",changeLang:"\u09AD\u09BE\u09B7\u09BE \u09AA\u09B0\u09BF\u09AC\u09B0\u09CD\u09A4\u09A8 \u0995\u09B0\u09C1\u09A8",endonym:"\u09AC\u09BE\u0982\u09B2\u09BE"},tamil:{preparing:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BBF\u0BB2\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BCD \u0B9A\u0BC6\u0BAF\u0BCD\u0BAF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1\u2026",changeLang:"\u0BAE\u0BCA\u0BB4\u0BBF\u0BAF\u0BC8 \u0BAE\u0BBE\u0BB1\u0BCD\u0BB1\u0BB5\u0BC1\u0BAE\u0BCD",endonym:"\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"},telugu:{preparing:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41\u0C32\u0C4B \u0C38\u0C3F\u0C26\u0C4D\u0C27\u0C02 \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C4B\u0C02\u0C26\u0C3F\u2026",changeLang:"\u0C2D\u0C3E\u0C37\u0C28\u0C41 \u0C2E\u0C3E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",endonym:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"},persian:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},farsi:{preparing:"\u062F\u0631 \u062D\u0627\u0644 \u0622\u0645\u0627\u062F\u0647\u200C\u0633\u0627\u0632\u06CC \u0628\u0647 \u0632\u0628\u0627\u0646 \u0641\u0627\u0631\u0633\u06CC\u2026",changeLang:"\u062A\u063A\u06CC\u06CC\u0631 \u0632\u0628\u0627\u0646",rtl:!0,endonym:"\u0641\u0627\u0631\u0633\u06CC"},greek:{preparing:"\u03A1\u03CD\u03B8\u03BC\u03B9\u03C3\u03B7 \u03C3\u03C4\u03B1 \u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\u2026",changeLang:"\u0391\u03BB\u03BB\u03B1\u03B3\u03AE \u03B3\u03BB\u03CE\u03C3\u03C3\u03B1\u03C2",endonym:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},hebrew:{preparing:"\u05DE\u05D2\u05D3\u05D9\u05E8 \u05D1\u05E2\u05D1\u05E8\u05D9\u05EA\u2026",changeLang:"\u05E9\u05E0\u05D4 \u05E9\u05E4\u05D4",rtl:!0,endonym:"\u05E2\u05D1\u05E8\u05D9\u05EA"},burmese:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},burma:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},myanmar:{preparing:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C\u1016\u103C\u1004\u1037\u103A \u1015\u103C\u1004\u103A\u1006\u1004\u103A\u1014\u1031\u101E\u100A\u103A\u2026",changeLang:"\u1018\u102C\u101E\u102C\u1005\u1000\u102C\u1038\u1015\u103C\u1031\u102C\u1004\u103A\u1038\u101B\u1014\u103A",endonym:"\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C"},khmer:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},cambodian:{preparing:"\u1780\u17C6\u1796\u17BB\u1784\u179A\u17C0\u1794\u1785\u17C6\u1787\u17B6\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A\u2026",changeLang:"\u1794\u17D2\u178F\u17BC\u179A\u1797\u17B6\u179F\u17B6",endonym:"\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"},swedish:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},svenska:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},sv:{preparing:"St\xE4ller in p\xE5 svenska\u2026",changeLang:"Byt spr\xE5k",endonym:"Svenska"},kikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},gikuyu:{preparing:"G\u0129k\u0169y\u0169 g\u0129g\u0129thondekwo\u2026",changeLang:"Cenjia r\u0169thiomi",endonym:"G\u0129k\u0169y\u0169"},akan:{preparing:"Y\u025Bresiesie w\u0254 Akan mu\u2026",changeLang:"Sesa kasa",endonym:"Akan"},twi:{preparing:"Y\u025Bresiesie w\u0254 Twi mu\u2026",changeLang:"Sesa kasa",endonym:"Twi"},yoruba:{preparing:"Ngbaradi ni \xC8d\xE8 Yor\xF9b\xE1\u2026",changeLang:"Yi ede pada",endonym:"\xC8d\xE8 Yor\xF9b\xE1"},amharic:{preparing:"\u1260\u12A0\u121B\u122D\u129B \u1260\u1218\u12D8\u130B\u1300\u1275 \u120B\u12ED\u2026",changeLang:"\u124B\u1295\u124B \u1240\u12ED\u122D",endonym:"\u12A0\u121B\u122D\u129B"},somali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},soomaali:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},"af-soomaali":{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},so:{preparing:"Diyaarinta af Soomaali\u2026",changeLang:"Beddel luqadda",endonym:"Af-Soomaali"},hausa:{preparing:"Shirya cikin Hausa\u2026",changeLang:"Canja harshe",endonym:"Hausa"},zulu:{preparing:"Ilungiselela ngesiZulu\u2026",changeLang:"Shintsha ulimi",endonym:"isiZulu"},oromo:{preparing:"Afaan Oromootiin qophaa'aa jira\u2026",changeLang:"Afaan jijjiiri",endonym:"Afaan Oromoo"},luganda:{preparing:"Tuteekateeka mu Oluganda\u2026",changeLang:"Kyusa olulimi",endonym:"Oluganda"},igbo:{preparing:"Na-akwadebe na As\u1EE5s\u1EE5 Igbo\u2026",changeLang:"Gbanwee as\u1EE5s\u1EE5",endonym:"As\u1EE5s\u1EE5 Igbo"},xhosa:{preparing:"Ilungiselela ngesiXhosa\u2026",changeLang:"Tshintsha ulwimi",endonym:"isiXhosa"},kinyarwanda:{preparing:"Guteza imbere mu Kinyarwanda\u2026",changeLang:"Hindura ururimi",endonym:"Ikinyarwanda"},lingala:{preparing:"Kozala na Ling\xE1la\u2026",changeLang:"Bongola lok\xF3t\xE1",endonym:"Ling\xE1la"},shona:{preparing:"Kugadzirira mu chiShona\u2026",changeLang:"Chinja mutauro",endonym:"chiShona"},tigrinya:{preparing:"\u1265\u1275\u130D\u122D\u129B \u12A3\u1265 \u121D\u12F5\u120B\u12CD \u12ED\u122D\u12A8\u1265\u2026",changeLang:"\u124B\u1295\u124B \u121D\u1255\u12EB\u122D",endonym:"\u1275\u130D\u122D\u129B"},wolof:{preparing:"Waajal ci Wolof\u2026",changeLang:"Soppi l\xE0kk",endonym:"Wolof"},afrikaans:{preparing:"Berei voor in Afrikaans\u2026",changeLang:"Verander taal",endonym:"Afrikaans"}};In=[{name:"Puck",trait:"Upbeat",gender:"male"},{name:"Charon",trait:"Informative",gender:"male"},{name:"Kore",trait:"Firm",gender:"female"},{name:"Aoede",trait:"Breezy",gender:"female"},{name:"Zephyr",trait:"Bright",gender:"female"},{name:"Fenrir",trait:"Excitable",gender:"male"},{name:"Leda",trait:"Youthful",gender:"female"},{name:"Orus",trait:"Firm",gender:"male"},{name:"Callirrhoe",trait:"Easy-going",gender:"female"},{name:"Autonoe",trait:"Bright",gender:"female"},{name:"Enceladus",trait:"Breathy",gender:"male"},{name:"Iapetus",trait:"Clear",gender:"male"},{name:"Umbriel",trait:"Easy-going",gender:"male"},{name:"Algieba",trait:"Smooth",gender:"male"},{name:"Despina",trait:"Smooth",gender:"female"},{name:"Erinome",trait:"Clear",gender:"female"},{name:"Algenib",trait:"Gravelly",gender:"male"},{name:"Rasalgethi",trait:"Informative",gender:"male"},{name:"Laomedeia",trait:"Upbeat",gender:"female"},{name:"Achernar",trait:"Soft",gender:"female"},{name:"Alnilam",trait:"Firm",gender:"male"},{name:"Schedar",trait:"Even",gender:"male"},{name:"Gacrux",trait:"Mature",gender:"female"},{name:"Pulcherrima",trait:"Forward",gender:"female"},{name:"Achird",trait:"Friendly",gender:"male"},{name:"Zubenelgenubi",trait:"Casual",gender:"male"},{name:"Vindemiatrix",trait:"Gentle",gender:"female"},{name:"Sadachbia",trait:"Lively",gender:"male"},{name:"Sadaltager",trait:"Knowledgeable",gender:"male"},{name:"Sulafat",trait:"Warm",gender:"female"}],wo="hsk-live-voice",Er={langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",defaultPlaceholder:"Ask me anything\u2026"},Pt={back:"Back",langPlaceholder:"Type your language\u2026",nameStepTitle:"Good to meet you.",nameStepAsk:"What should I call you?",namePlaceholder:"Type your name\u2026",attachImage:"Attach a photo",vizUnavailable:"The preview could not be loaded.",vizDisclaimerImage:"Generated using Artificial Intelligence \u2014 colours, size and placement may differ from the real product.",vizDisclaimerVideo:"Generated using Artificial Intelligence \u2014 colours, size and movement may differ from the real product.",calcDisclaimer:"This is a calculation from live figures, not a guarantee \u2014 the market can move against it.",staleTitle:"No longer available",staleRemoved:"{title} has been removed and is no longer on offer.",staleUnavailable:"{title} is currently unavailable.",keyPastePrompt:"Paste your public id \u2014 or create one",keyPastePlaceholder:"your public id\u2026",keyUseMine:"Use my id",keyCreating:"Creating\u2026",keyCreateNew:"I'm new \u2014 create one",keySecretTitle:"Your secret key \u2014 shown once",keyDismiss:"Dismiss",keyCopySecret:"Copy",keyCopied:"Copied",keySecretHint:"Keep it private. It unlocks your memory.",keyPublicTitle:"Your public id",keyCopyId:"Copy id",greetReturning:"Hello, {name}.",greetReturningLead:"What can I find for you today?",howShouldResultsLook:"How do you want to see results?",entityLangIntro:"I will write to you in {lang}. Names stay as this website wrote them. For the other details, choose below.",asWritten:"Same as the website",inLanguage:"In {lang}",namesAsWritten:"Details stay exactly as the website wrote them.",detailsTranslated:"Details are translated. Numbers and links do not change.",entityLangPlaceholder:"Choose one, then press Continue\u2026",termsStepTitle:"Privacy and terms",termsStepSubtitle:"Please read how kiku works on this website.",termsPiiTitle:"Your contact details",termsPiiDesc:"kiku never asks for your email, phone number or real name. Any name or nickname is fine.",termsSessionTitle:"A random code",termsSessionDesc:"Your browser keeps a random code so kiku can remember your conversation. The code is not linked to your name.",termsMemoryTitle:"What is kept",termsMemoryDesc:"Your questions (not kiku's answers) are kept so this website can improve. Things you save with @kiku are kept at mimi.akropolys.cloud, and only your secret key opens them.",termsCookieTitle:"This website's own rules",termsCookieDesc:"This website may use cookies or collect more information. kiku does not control this.",termsAiTitle:"From this website, explained by AI",termsAiDesc:"kiku answers from what this website really lists. The facts are the website's own; how kiku summarises, compares or translates them is AI and may read them differently. Check anything that matters on the website itself.",termsAgreeButton:"I agree",termsAgreeCounting:"I agree ({seconds}s)",nameStepHint:"Any name or nickname is fine.",privacyMore:"Read our full terms at",continueButton:"Continue",termsPlaceholder:"Please read the notes above\u2026",allSet:"You are ready, {name}.",replyingTranslated:"I will write to you in {lang}. Results will be translated too. Ask me anything.",replyingOriginal:"I will write to you in {lang}. Results stay as this website wrote them. Ask me anything.",defaultPlaceholder:"Ask me anything\u2026",voiceListening:"Listening\u2026 tap the mic to stop",voiceSending:"Got it \u2014 sending\u2026",voiceModeStart:"Hands-free conversation",voiceModeExit:"Leave hands-free",voicePhaseListening:"Listening",voicePhaseThinking:"Thinking",micDenied:"Microphone blocked. Allow mic access for this site, then try again.",micInsecure:"Voice needs a secure (https) connection.",micMissing:"No microphone found.",micLangUnsupported:"This browser cannot transcribe that language yet. Type instead.",micNetwork:"Couldn't reach voice. Try again in a moment.",voiceUnavailable:"Voice is unavailable right now. Try again in a moment.",voiceLimitReached:"You've used up today's voice time. It resets in a day \u2014 chat still works.",voiceSiteLimit:"Voice is out of allowance on this site for now. Chat still works.",voiceIdleEnded:"Voice closed after a quiet minute. Tap the mic to talk again.",voiceSessionEnded:"Voice session ended. Tap the mic to talk again.",voicePhotoFailed:"That photo couldn't be added. Try another one.",voiceAttachPhoto:"Attach a photo",voicePickerLabel:"Choose a voice",voiceFemale:"Female",voiceMale:"Male",voiceNewChat:"New voice chat",pillVoice:"{n} min voice",pillImages:"{n} images",pillVideos:"{n} videos",pillReplies:"{n} replies",micNoSpeech:"Didn't catch anything. Try again, a little closer to the mic.",micFailed:"Couldn't hear that. Try again.",clearChat:"Clear chat",thinking:"Thinking",thoughtForSeconds:"Thought for {duration}",thoughtProcess:"Thought process",reachingTeam:"Getting a person",passedToTeam:"Passed to a person",withTeam:"Sent to the team \xB7 a person will reply here",repliedIn:"Replied in {duration}",backWithKiku:"Kiku is back with you",teamClosed:"The team closed this conversation",teamJoined:"Another team member joined the conversation",leaveHumanWarning:"A person is replying here.",leaveHumanStay:"Stay",leaveHumanKeep:"Keep for later",leaveHumanConfirm:"End request",requestsTitle:"Your requests",requestWaiting:"Waiting for a person",requestHuman:"With a person",requestKiku:"Answered",requestClosed:"Closed",requestNewReply:"New reply",captureAndRemember:"kiku \u2014 capture & remember",captureCurrentPage:"Capture current page",captureAll:"Capture all ({count})",whatHaveYouSaved:"What have you saved?",deleteThis:"Delete this",errShopperReplyLimit:"You've reached this site's reply limit.",errAccessRevoked:"Your access to the assistant has been revoked on this website.",errAccountRequired:"Please create an account to continue using the chat assistant.",errStreamInterrupted:"The reply was interrupted. Please try again.",errNetwork:"The assistant couldn't respond just now \u2014 please try again in a moment.",errGeneric:"Something went wrong. Please try again.",vizWorking:"Visualizing\u2026",vizMarkEdit:"Mark & edit",swatchTarget:"Your colour",markupCancel:"Cancel",markupSketch:"Sketch",markupPin:"Edit Pin",markupPinLabel:"What should happen here?",markupPinLabelHint:"e.g. move the sofa here",markupSketchHint:"Sketch around an area, then drop a pin saying what to do with it.",markupRemovePin:"Remove pin",markupPinHint:"Drop a pin and say what should happen there. Drag to move it. Up to 4 pins.",markupSelect:"Select outline",markupCloseOutline:"Close outline",markupOutlineHint:"Tap around the item, then close the outline. Undo removes the last point.",markupSelectedHint:"Drag the outline points to refine, then drop a pin saying what to do with it.",markupEraser:"Eraser",markupUndo:"Undo",markupClear:"Clear",markupSend:"Send",markupDialogLabel:"Mark up image",markupError:"Couldn't process this image \u2014 try a newer visualization.",markupLoadError:"This image can't be edited here.",markupLoading:"Loading image\u2026",openMemory:"Open my memory on MiMi",errTooManyRequests:"The assistant is currently receiving too many requests. Please try again in a few moments.",errTokenLimit:"You've reached your usage limit. Please update your billing limits in your dashboard to continue.",statusSent:"Sent",statusStopped:"Sent \xB7 reply stopped",queuedWaiting:"Queued",queuedSendNow:"Send now",jumpToLatest:"Scroll to latest",timelineLabel:"Questions in this conversation",voiceConnecting:"Connecting \u2014 wait for the tone before speaking",stoppedByYou:"You stopped this response.",stoppedInterrupted:"This response was interrupted.",continueGenerating:"Continue generating",generateResponse:"Generate response",pillCompareTop2:"Compare top 2",pillCompareTop2Query:"Compare the {a} and {b}",pillMoreOn:"More on {name}",pillMoreOnQuery:"Tell me more about the {name}",pillSimilarOptions:"Similar options",pillSimilarOptionsQuery:"Show me more like the {name}",pillWhichBest:"Which is best?",pillWhichBestQuery:"Which one would you recommend and why?",pillFindAlternatives:"Find alternatives",pillFindAlternativesQuery:"What are good alternatives to the {name}?",pillShowPopular:"Show popular items",pillShowPopularQuery:"What are your most popular items?",pillRecommend:"Recommend something",pillRecommendQuery:"What do you recommend for me?",cardClickAnswer:"The {name}",cardClickQuery:"Tell me more about the {name}{details} \u2014 what are its key details, who is it best suited for, and what should I know?",displayCapture:"capture {name}",displayCaptureAll:"capture all ({count} items)",displayViewHistory:"what have you saved?",displayDelete:"delete this",retry:"Retry",edit:"Edit",copy:"Copy",copied:"Copied",msgFailed:"Failed to send"},Co=yo.default.createContext((e,r)=>{let t=Pt[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),zr=()=>yo.default.useContext(Co);Ti={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"},Ei=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Ti[t])return r(Ti[t]);let n="";if(typeof e=="string")n=e;else if(e&&typeof e=="object"&&e.message)n=e.message;else try{n=JSON.stringify(e)}catch{n=String(e)}let a=n.toLowerCase();if(a.includes("429")||a.includes("too many requests")||a.includes("requests per minute limit exceeded")||a.includes("too_many_requests_error")||a.includes("request_quota_exceeded")||a.includes("quota"))return r("errTooManyRequests");if(a.includes("token limit"))return r("errTokenLimit");if(a.includes("failed to fetch")||a.includes("networkerror")||a.includes("request failed"))return r("errNetwork");if(n)try{console.warn("[kiku] untranslated error:",n)}catch{}return r("errGeneric")},zi=()=>typeof window>"u"||window.isSecureContext!==!1,So=15});function Ii(e){return e?Ni.get(e)??null:null}function Mo(e){if(!e)return Promise.resolve(null);let r=Li.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Ni.set(e,n),Kt(n,0).catch(()=>{})),n)).catch(()=>null);return Li.set(e,t),t}function Ai(e,r,t){e&&(Mo(e),r&&An(e,r,t))}function An(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Kt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var Li,Ni,Ca=Ce(()=>{"use strict";wn();Li=new WeakMap,Ni=new WeakMap});function on(e){let r=e?Td[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function Rd(e){let r=/var\(\s*(--[\w-]+)/.exec(e)?.[1];if(!r||typeof document>"u")return"";for(let t of[document.documentElement,document.body]){let n=t?getComputedStyle(t).getPropertyValue(r).trim():"";if(n)return n.split(",")[0].trim()}return""}function Di({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,_i.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Er):null,s=t&&Object.keys(t).length>0?t:a?.strings??{},[o,c]=(0,Ze.useState)(()=>s),[i,l]=(0,Ze.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,Ze.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||on(e)?.bcp47==="en"?e||"en":""),d=!e||on(e)?.bcp47==="en",u=o;t&&Object.keys(t).length>0&&(u={...o,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[y,b]=(0,Ze.useState)(()=>{if(a?.dir)return a.dir==="rtl";let v=on(e);if(v)return v.dir==="rtl";if(Dr(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[M,g]=(0,Ze.useState)(()=>a?.bcp47||on(e)?.bcp47||""),[E,R]=(0,Ze.useState)(()=>a?.font??null),[z,_]=(0,Ze.useState)(()=>Ii(n)),[S,W]=(0,Ze.useState)(!0),[X,N]=(0,Ze.useState)(!1),P=Ze.default.useRef(e),[j,D]=(0,Ze.useState)(e);if(e!==j){D(e);let v=on(e);v&&(b(v.dir==="rtl"),g(v.bcp47));let L=e?n?.getCachedUIStrings?.(e,Pt)??n?.getCachedUIStrings?.(e,Er):null,I=t&&Object.keys(t).length>0?t:L?.strings;I&&Object.keys(I).length>0&&(c(I),u=I,L&&(L.font&&R(L.font),L.dir&&b(L.dir==="rtl"),L.bcp47&&g(L.bcp47)),L?.font&&Kt(L.font),N(!so([L?.font?.family,z?.family].filter(V=>!!V),I)),p(e),l(!0))}let re=d||!X&&(h.toLowerCase()===e.toLowerCase()&&i||Object.keys(u).length>0);(0,Ze.useEffect)(()=>{if(!e){g(""),R(null),c({}),p(""),l(!0),b(!1);return}let v=on(e),L=Dr(e),I=v?.bcp47==="en",V=!1,T=(G,B)=>{let w=[G?.family,z?.family].filter(k=>!!k);if(e===P.current||so(w,B)){N(!1);return}N(!0),io(w,B,Pi).then(()=>{V||N(!1)})},C=n?.getCachedUIStrings?.(e,Pt);if(C?.strings&&Object.keys(C.strings).length>0)return c(C.strings),b(C.dir==="rtl"),g(C.bcp47||v?.bcp47||""),C.font&&(Kt(C.font),R(C.font)),T(C.font,C.strings),p(e),l(!0),()=>{V=!0};let m=n?.getCachedUIStrings?.(e,Er);m?.strings&&Object.keys(m.strings).length>0?(c(m.strings),b(m.dir==="rtl"),g(m.bcp47||v?.bcp47||""),m.font&&(Kt(m.font),R(m.font)),T(m.font,m.strings),p(e),l(!0)):(N(!1),c({}),v?(b(v.dir==="rtl"),g(v.bcp47)):L?.rtl&&b(!0),I||l(!1));let ae=async()=>{let G=!!m?.strings;try{if(!m?.strings){let w=await n.getUIStrings?.(e,Er);if(!V&&w?.complete){G=!0,N(!0),c(F=>({...F,...w.strings})),b(w.dir==="rtl"),g(w.bcp47||v?.bcp47||"");try{localStorage.setItem(f,w.dir)}catch{}w.font&&Kt(w.font);let k=[w.font?.family,z?.family].filter(F=>!!F);await io(k,w.strings,Pi),V||(w.font&&R(w.font),p(e),l(!0),N(!1))}}let B=await n.getUIStrings?.(e,Pt);!V&&B?.complete&&(G=!0,c(w=>({...w,...B.strings})),B.font&&(await Kt(B.font,1200),V||R(B.font)))}catch{return!1}return G};return(async()=>{for(let G=0;!V&&!await ae();G++){let B=Fi[Math.min(G,Fi.length-1)];await new Promise(w=>window.setTimeout(w,B))}})(),()=>{V=!0}},[e,n,f]),(0,Ze.useEffect)(()=>{let v=!1;return(async()=>{try{let L=await Mo(n);!v&&L&&_(L)}catch{}v||W(!0)})(),()=>{v=!0}},[n]),oo(E),oo(z);let ge=Ze.default.useMemo(()=>{let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),I=/^var\(/i.test(L),V=L.replace(/^['"]|['"]$/g,""),T=I?Rd(L):"",C=I?T?`${T}, `:"":V?`"${V}", `:"";if(E)return`"${E.family}", ${C}"Geist", system-ui, sans-serif`;let m=e?e.trim().toLowerCase():"";if(m==="japanese"||m==="ja"||m==="\u65E5\u672C\u8A9E")return`${C}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(m==="chinese"||m==="zh"||m==="\u4E2D\u6587")return`${C}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(m==="urdu"||m==="ur"||m==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${C}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(m==="arabic"||m==="ar"||m==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${C}"Geist", system-ui, sans-serif`;if(m==="hindi"||m==="hi"||m==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${C}"Geist", system-ui, sans-serif`},[E,e,typeof r=="object"&&r?r.fontFamily:void 0]),be=Ze.default.useMemo(()=>{let v=0,L=0;for(let I of Object.values(o))for(let V of I){let T=V.codePointAt(0)??0;T<192||/\p{L}/u.test(V)&&(T<=591?v++:L++)}return L>v},[o]),[Y,me]=(0,Ze.useState)(0);(0,Ze.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let v=!0;return document.fonts.ready.then(()=>{v&&me(L=>L+1)}),()=>{v=!1}},[E]);let J=Ze.default.useMemo(()=>{if(!be||typeof document>"u")return!0;let L=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!L)return!1;let I="";for(let T of Object.values(o))if(T){I=T;break}if(!I)return!0;let V=I.replace(/\s+/g,"");if(!V)return!0;try{let C=document.createElement("canvas").getContext("2d");if(!C)return!0;let m=L.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(L.slice(4,-1).trim()).trim()||L;C.font=`16px ${m}, __akropolys_nonexistent_font__`;let ae=C.measureText(V).width;C.font="16px __akropolys_nonexistent_font__";let G=C.measureText(V).width;return Math.abs(ae-G)>1}catch{return!0}},[be,o,typeof r=="object"&&r?r.fontFamily:void 0,Y]),H=(0,Ze.useCallback)((v,L)=>{let I=u[v]||o[v]||Pt[v]||v;if(L)for(let[V,T]of Object.entries(L))I=I.split(`{${V}}`).join(T);return I},[u,o]),A=(0,Ze.useCallback)((v,L)=>(u[v]||o[v]||Pt[v]||v).split(/(\{[a-zA-Z]+\})/g).map((V,T)=>{let C=V.match(/^\{([a-zA-Z]+)\}$/);return C&&L?.[C[1]]!==void 0?(0,To.jsx)("bdi",{children:L[C[1]]},T):(0,To.jsx)(Ze.default.Fragment,{children:V},T)}),[u,o]);return{chromeStrings:o,chromeReady:re,isRTL:y,speechLang:M,scriptFont:E,fontStack:ge,isNonLatin:be,hostFontCovers:J,baseFontReady:S,t:H,tNode:A}}var Ze,_i,To,Td,Pi,Fi,Hi=Ce(()=>{"use strict";Ze=Zt(require("react")),_i=require("@akropolys/sdk");wn();Ca();Ot();To=require("react/jsx-runtime"),Td={english:"en",en:"en",swahili:"sw",kiswahili:"sw",sw:"sw",french:"fr",fran\u00E7ais:"fr",francais:"fr",fr:"fr",spanish:"es",espa\u00F1ol:"es",espanol:"es",es:"es",arabic:"ar",\u0627\u0644\u0639\u0631\u0628\u064A\u0629:"ar",ar:"ar",portuguese:"pt",portugu\u00EAs:"pt",pt:"pt",hindi:"hi",\u0939\u093F\u0928\u094D\u0926\u0940:"hi",hi:"hi",chinese:"zh",\u4E2D\u6587:"zh",zh:"zh",japanese:"ja",\u65E5\u672C\u8A9E:"ja",ja:"ja",urdu:"ur",\u0627\u0631\u062F\u0648:"ur",ur:"ur",burmese:"my",burma:"my",myanmar:"my","\u1019\u103C\u1014\u103A\u1019\u102C":"my","\u1019\u103C\u1014\u103A\u1019\u102C\u1018\u102C\u101E\u102C":"my",my:"my",khmer:"km",cambodian:"km",\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A:"km",\u1781\u17D2\u1798\u17C2\u179A:"km",km:"km",persian:"fa",farsi:"fa",\u0641\u0627\u0631\u0633\u06CC:"fa",fa:"fa",fas:"fa",malay:"ms",bahasa:"ms",indonesian:"id","bahasa melayu":"ms","bahasa indonesia":"id",ms:"ms",id:"id",amharic:"am",\u12A0\u121B\u122D\u129B:"am",am:"am"};Pi=5e3,Fi=[5e3,15e3,45e3,12e4]});function Bi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Ee.useRef)(null),s=(0,Ee.useRef)(0),[o,c]=(0,Ee.useState)(!1),[i,l]=(0,Ee.useState)(1),[h,p]=(0,Ee.useState)(0),d=(0,Ee.useRef)(()=>{}),u=(0,Ee.useRef)(null),f=(0,Ee.useRef)(!1),y=(0,Ee.useRef)(!0),b=(0,Ee.useRef)(!1),M=(0,Ee.useRef)(null),g=(0,Ee.useRef)(null),E=(0,Ee.useRef)(e.length),R=(0,Ee.useRef)(!1),z=(0,Ee.useRef)(()=>{}),_=(0,Ee.useRef)(()=>{}),S=(0,Ee.useRef)(null),W=(0,Ee.useRef)(()=>{}),[X,N]=(0,Ee.useState)(0),P=(0,Ee.useRef)(0),j=(0,Ee.useRef)(""),D=(0,Ee.useRef)(()=>{}),re=(0,Ee.useRef)(()=>{});(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k,F=()=>{clearTimeout(k),k=setTimeout(()=>{f.current=!1},150)},q=()=>{clearTimeout(k),f.current=!0,D.current()},oe=()=>{f.current&&F()};return w.addEventListener("touchstart",q,{passive:!0}),w.addEventListener("touchend",F,{passive:!0}),w.addEventListener("touchcancel",F,{passive:!0}),w.addEventListener("scroll",oe,{passive:!0}),()=>{clearTimeout(k),w.removeEventListener("touchstart",q),w.removeEventListener("touchend",F),w.removeEventListener("touchcancel",F),w.removeEventListener("scroll",oe)}},[]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w)return;let k=160,F=8,q=0,oe=()=>{q=0;let ue=M.current?.offsetHeight??0,K=w.scrollHeight-ue-w.scrollTop-w.clientHeight,ne=performance.now()-s.current<400;K<=F&&(!b.current||ne)&&(y.current||re.current(),y.current=!0,b.current=!1,A.current()),c(K>k&&!y.current);let ye=w.scrollHeight-w.clientHeight;l(ye>8?Math.min(1,Math.max(0,w.scrollTop/ye)):1);let Oe=w.scrollTop+w.clientHeight*.33,we=0;for(let De=0;De<n.current.length;De++){let $e=n.current[De];$e&&$e.offsetTop<=Oe&&(we=De)}p(we)},de=()=>{q||(q=requestAnimationFrame(oe))};oe(),w.addEventListener("scroll",de,{passive:!0});let pe=new ResizeObserver(()=>{g.current?z.current("sync"):y.current&&!f.current&&_.current(),de()});pe.observe(w);for(let ue of n.current)ue&&pe.observe(ue);return()=>{q&&cancelAnimationFrame(q),w.removeEventListener("scroll",de),pe.disconnect()}},[e.length,n]);let ge=(0,Ee.useCallback)(w=>{let k=`${w}:${P.current}`;j.current!==k&&(j.current=k,N(F=>F+1))},[]),[be,Y]=(0,Ee.useState)(!1),me=(0,Ee.useRef)(!1),J=(0,Ee.useCallback)(()=>{me.current||(me.current=!0,Y(!0))},[]),H=(0,Ee.useCallback)(()=>{me.current&&(me.current=!1,Y(!1))},[]),A=(0,Ee.useRef)(()=>{});A.current=H;let[v,L]=(0,Ee.useState)(!1),I=(0,Ee.useRef)(!1),V=(0,Ee.useRef)(0),T=(0,Ee.useCallback)(()=>{I.current=!1,L(!1)},[]),C=(0,Ee.useCallback)(()=>{j.current="",T(),H()},[T,H]),m=(0,Ee.useCallback)(()=>{I.current&&(performance.now()-V.current<700||T())},[T]);D.current=m,re.current=C,(0,Ee.useEffect)(()=>{if(X===0)return;I.current=!0,V.current=performance.now(),L(!0);let w=setTimeout(T,4200);return()=>clearTimeout(w)},[X,T]);let ae=(0,Ee.useCallback)(()=>{R.current=!1,g.current&&(g.current=null,M.current&&(M.current.style.height=""))},[]);W.current=ae,_.current=()=>{let w=a.current;if(!w)return;let k=w.scrollHeight-w.clientHeight;S.current?S.current(k):w.scrollTop=k},z.current=w=>{let k=a.current,F=M.current,q=g.current,oe=ne=>{let ye=w==="sync"?S.current:u.current;ye?ye(ne):k&&(k.scrollTop=ne)},de=_.current;if(!k||!F||!q||!q.isConnected){ae(),y.current&&de();return}let pe=parseFloat(getComputedStyle(k).paddingTop)||0;F.offsetHeight<k.clientHeight&&(F.style.height=`${k.clientHeight}px`);let ue=Math.max(0,q.offsetTop-pe),K=ue+k.clientHeight-(k.scrollHeight-F.offsetHeight);if(K<=0){ae(),y.current=!1,b.current=!0,oe(ue);return}K!==F.offsetHeight&&(F.style.height=`${K}px`),oe(ue)};let G=(0,Ee.useCallback)(w=>{let k=a.current,F=n.current[w];if(!k||!F)return;let q=F.offsetTop-Math.max(0,(k.clientHeight-F.clientHeight)/2),oe=Math.max(0,Math.min(k.scrollHeight-k.clientHeight,q));u.current?u.current(oe):k.scrollTo({top:oe,behavior:"smooth"})},[n]),B=(0,Ee.useCallback)(()=>{let w=a.current;if(!w)return;y.current=!0,b.current=!1,W.current(),re.current();let k=w.scrollHeight-w.clientHeight;u.current?u.current(k):w.scrollTo({top:k,behavior:"smooth"})},[]);return(0,Ee.useLayoutEffect)(()=>{let w=a.current;if(!w)return;let k=e.slice(E.current);if(E.current=e.length,k.some(q=>q.role==="user")&&(y.current=!0,b.current=!1,re.current(),g.current=null,R.current=!0),R.current){R.current=!1;for(let q=n.current.length-1;q>=0;q--){let oe=n.current[q];if(oe?.dataset.hskRole==="user"){g.current=oe;break}}if(g.current){z.current("glide");return}}if(g.current){z.current("glide");return}let F=w.scrollTop;if(!y.current)b.current||(J(),ge(e.length));else if(!f.current){_.current();return}w.scrollTop!==F&&d.current()},[e,r,t,n,ge,J]),(0,Ee.useEffect)(()=>{let w=a.current;if(!w||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let k=7,F=16,q=1/(window.devicePixelRatio||1),oe=Se=>Math.round(Se/q)*q,de=w.scrollTop,pe=w.scrollTop,ue=w.scrollTop,K=0,ne=null,ye=Se=>{Se!==ue&&(w.scrollTop=Se,ue=w.scrollTop)},Oe=()=>{ne!==null&&(cancelAnimationFrame(ne),ne=null),w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop};d.current=Oe,u.current=Se=>{Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop);let ot=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Se)));ot!==de&&(de=ot,ne===null&&(K=performance.now(),ne=requestAnimationFrame(we)))},S.current=Se=>{let ot=Math.round(Math.max(0,Math.min(w.scrollHeight-w.clientHeight,Se)));ne!==null&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling")),w.scrollTop=ot,de=pe=ue=w.scrollTop};let we=Se=>{let ot=Math.min((Se-K)/1e3,.05);if(K=Se,pe+=(de-pe)*(1-Math.exp(-k*ot)),Math.abs(de-pe)<q){pe=de,ye(Math.round(de)),w.classList.remove("hsk-scrolling"),ne=null;return}ye(oe(pe)),ne=requestAnimationFrame(we)},De=Se=>{if(Se.ctrlKey)return;Math.abs(w.scrollTop-ue)>1&&(de=pe=ue=w.scrollTop),Se.deltaY<0&&(y.current&&(P.current+=1),y.current=!1,g.current=null),D.current();let ot=Se.deltaMode===1?F:Se.deltaMode===2?w.clientHeight:1,ct=Math.max(0,w.scrollHeight-w.clientHeight),qt=Math.round(Math.max(0,Math.min(ct,de+Se.deltaY*ot)));if(qt===de){ct>0&&Se.preventDefault();return}Se.preventDefault(),de=qt,ne===null&&(K=performance.now(),w.classList.add("hsk-scrolling"),ne=requestAnimationFrame(we))},$e=w.scrollTop,Ke=()=>{let Se=Math.abs(w.scrollTop-ue)>1;Se&&(s.current=performance.now(),w.scrollTop<$e-1&&y.current&&(P.current+=1,y.current=!1,g.current=null)),$e=w.scrollTop,ne!==null&&Se&&(cancelAnimationFrame(ne),ne=null,w.classList.remove("hsk-scrolling"),de=pe=ue=w.scrollTop)};return w.addEventListener("wheel",De,{passive:!1}),w.addEventListener("scroll",Ke,{passive:!0}),()=>{w.removeEventListener("scroll",Ke),w.removeEventListener("wheel",De),ne!==null&&cancelAnimationFrame(ne),w.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,S.current=null}},[]),{msgsContainerRef:a,spacerRef:M,lastExternalScrollRef:s,showJumpToBottom:o,scrollProgress:i,activeMsgIdx:h,jumpAlert:v,unreadBelow:be,jumpToMessage:G,jumpToBottom:B,resetAlertArming:C}}var Ee,$i=Ce(()=>{"use strict";Ee=require("react")});function qi(e){let[r,t]=(0,Yt.useState)(e),n=(0,Yt.useRef)(e),a=(0,Yt.useRef)(e),s=(0,Yt.useRef)(0),o=(0,Yt.useRef)(0),c=(0,Yt.useRef)(0),i=(0,Yt.useRef)(null);return(0,Yt.useEffect)(()=>()=>{i.current!==null&&cancelAnimationFrame(i.current)},[]),(0,Yt.useEffect)(()=>{if(a.current=e,window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!e.startsWith(n.current)){i.current!==null&&(cancelAnimationFrame(i.current),i.current=null),n.current=e,s.current=0,o.current=0,t(e);return}if(i.current!==null||n.current.length>=e.length)return;c.current=performance.now();let h=p=>{let d=Math.min(p-c.current,50);c.current=p;let u=a.current,f=u.length-n.current.length,y=Math.min(Ld,Math.max(zd,f*1e3/Ed));s.current+=(y-s.current)*(1-Math.exp(-d/Nd)),o.current+=s.current*d/1e3;let b=Math.floor(o.current);b>0&&(o.current-=b,n.current=u.slice(0,Math.min(u.length,n.current.length+b)),t(n.current)),n.current.length<a.current.length?i.current=requestAnimationFrame(h):(i.current=null,o.current=0)};i.current=requestAnimationFrame(h)},[e]),r}var Yt,Ed,zd,Ld,Nd,Ui=Ce(()=>{"use strict";Yt=require("react"),Ed=450,zd=45,Ld=900,Nd=180});function Oi(e,r){let t=(0,Wi.useAkropolysContext)(),[n,a]=(0,Ft.useState)(""),[s,o]=(0,Ft.useState)("idle"),[c,i]=(0,Ft.useState)(null),[l,h]=(0,Ft.useState)(null),[p,d]=(0,Ft.useState)(null),[u,f]=(0,Ft.useState)(So),[y,b]=(0,Ft.useState)(!1),M=(0,Ft.useCallback)(async(R,z)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(R):Id(R),d(z),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,Ft.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(o("prompt_key"),a(""))},[e]),(0,Ft.useEffect)(()=>{if(!c)return;f(So);let R=setInterval(()=>{f(z=>z<=1?(clearInterval(R),i(null),h(null),0):z-1)},1e3);return()=>clearInterval(R)},[c]);let g=(0,Ft.useCallback)(async()=>{let R=n.trim();R&&(t.setKikuPub(R),a(""),o("idle"),await r())},[t,n,r]),E=(0,Ft.useCallback)(async()=>{if(!y){b(!0);try{let{secret:R,publicId:z}=await t.mintKikuKey();i(R),h(z),o("idle"),await r()}catch{}finally{b(!1)}}},[t,y,r]);return{keyInput:n,setKeyInput:a,keyPhase:s,setKeyPhase:o,mintedKey:c,setMintedKey:i,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:y,copyValue:M,handleUseExistingKey:g,handleCreateKey:E}}function Id(e){let r=document.createElement("textarea");r.value=e,r.setAttribute("readonly",""),r.style.cssText="position:fixed;top:0;left:0;opacity:0;",document.body.appendChild(r),r.select(),r.setSelectionRange(0,e.length);let t=document.execCommand("copy");if(r.remove(),!t)throw new Error("copy failed")}var Ft,Wi,ji=Ce(()=>{"use strict";Ft=require("react"),Wi=require("@akropolys/sdk");Ot()});function Gi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let s=(0,Pn.useCallback)(l=>{let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]),n(d,p,u.length>0?u:void 0,"capture")},[e,n,r,t,a]),o=(0,Pn.useCallback)(l=>{let h=l.filter(u=>u.id).map(u=>({name:u.name||"",url:u.url||"",image:u.image||""})),p=l.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(l.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Pn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),i=(0,Pn.useCallback)(()=>{let l=`@kiku ${a("displayDelete")}`;t(""),r([]),n("delete this",l,void 0,"delete")},[n,r,t,a]);return{handleKikuCapture:s,handleKikuCaptureAll:o,handleKikuViewHistory:c,handleKikuDelete:i}}var Pn,Vi=Ce(()=>{"use strict";Pn=require("react")});function _n(e,r=130){let t=Sa;if(!t||!Ma)return;let n=Ma.currentTime;t.gain.cancelScheduledValues(n),t.gain.setValueAtTime(t.gain.value,n),t.gain.linearRampToValueAtTime(Math.max(0,Math.min(1,e)),n+r/1e3)}function Xi(){if(!Yi)return Hr*=.85,Hr;if(!Ki||!Fn)return Hr;Ki.getByteTimeDomainData(Fn);let e=0;for(let n=0;n<Fn.length;n++){let a=(Fn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Fn.length),t=Math.min(1,r*3.2);return Hr+=(t-Hr)*(t>Hr?.6:.12),Hr}function Qi(){if(Yi=!1,Sa&&Ma&&(Sa.gain.cancelScheduledValues(Ma.currentTime),Sa.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Ma,Ki,Sa,Fn,Yi,Hr,Ro=Ce(()=>{"use strict";Ma=null,Ki=null,Sa=null,Fn=null,Yi=!1,Hr=0});function ec({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=Ad,paused:s=!1}){let[o,c]=(0,Te.useState)(!1),[i,l]=(0,Te.useState)(!1),[h,p]=(0,Te.useState)(""),[d,u]=(0,Te.useState)(!1),f=(0,Te.useRef)(null),y=(0,Te.useRef)(null),b=(0,Te.useRef)(null),M=(0,Te.useRef)(null),g=(0,Te.useRef)(null),E=(0,Te.useRef)(null),R=(0,Te.useRef)(0),z=(0,Te.useRef)(.008),_=(0,Te.useRef)(0),S=(0,Te.useRef)(0),W=(0,Te.useRef)(""),X=(0,Te.useRef)(0),N=(0,Te.useRef)(0),P=(0,Te.useRef)(!1),j=(0,Te.useRef)(s),D=(0,Te.useRef)(!1),re=(0,Te.useRef)(!1),ge=(0,Te.useRef)(r),be=(0,Te.useRef)(t),Y=(0,Te.useRef)(n);(0,Te.useEffect)(()=>{ge.current=r},[r]),(0,Te.useEffect)(()=>{be.current=t},[t]),(0,Te.useEffect)(()=>{Y.current=n},[n]),(0,Te.useEffect)(()=>{j.current=s},[s]),(0,Te.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let me=(0,Te.useCallback)(()=>R.current,[]),J=(0,Te.useCallback)(k=>{let F=M.current;return!F||k.length!==F.frequencyBinCount?!1:(F.getByteFrequencyData(k),!0)},[]),H=(0,Te.useCallback)(()=>M.current?.frequencyBinCount??0,[]),A=(0,Te.useRef)([]),v=(0,Te.useRef)(null),L=(0,Te.useRef)(!1),I=(0,Te.useRef)(0),V=(0,Te.useRef)(0),T=(0,Te.useCallback)(k=>{let F=M.current;if(!F)return 0;let q=A.current;q.push(k),q.length>Bd&&q.shift();let oe=0;if(q.length>=12){let $e=0;for(let Ke of q)$e+=Ke;if($e/=q.length,$e>1e-4){let Ke=0;for(let Se of q)Ke+=(Se-$e)*(Se-$e);oe=Math.min(1,Math.sqrt(Ke/q.length)/$e/.6)}}let de=0;(!v.current||v.current.length!==F.frequencyBinCount)&&(v.current=new Uint8Array(F.frequencyBinCount));let pe=v.current;F.getByteFrequencyData(pe);let K=(b.current?.sampleRate??48e3)/2/pe.length,ne=Math.floor(300/K),ye=Math.min(pe.length-1,Math.ceil(3400/K)),Oe=0,we=0;for(let $e=0;$e<pe.length;$e++)we+=pe[$e],$e>=ne&&$e<=ye&&(Oe+=pe[$e]);we>0&&(de=Oe/we);let De=Math.min(1,k/(z.current+Eo*3));return $d*De+qd*oe+Ud*de},[]),C=(0,Te.useCallback)(()=>{let k=W.current.trim();if(W.current="",X.current=N.current,p(""),l(!1),k){D.current=!1;let F=f.current;f.current=null;try{F?.stop()}catch{}ge.current(k)}},[]),m=(0,Te.useCallback)(()=>{let k=M.current,F=E.current;if(!k||!F)return;k.getByteTimeDomainData(F);let q=0;for(let ne=0;ne<F.length;ne++){let ye=(F[ne]-128)/128;q+=ye*ye}let oe=Math.sqrt(q/F.length),de=Math.min(1,oe*4);R.current+=(de-R.current)*(de>R.current?.6:.12);let pe=Date.now(),ue=j.current?Xi()*Fd:0;oe>z.current+Eo+ue?(_.current=pe,S.current||(S.current=pe)):(S.current=0,z.current=Math.min(z.current*1.02+2e-5,Math.max(.004,oe))),j.current?L.current?(T(oe)>Zi?V.current+=1:V.current=Math.max(0,V.current-2),V.current>=Hd?(L.current=!1,V.current=0,_n(1,0),Y.current?.()):pe-I.current>Dd&&(L.current=!1,V.current=0,_n(1,Ji*2))):S.current&&pe-S.current>Pd&&T(oe)>Zi&&(S.current=0,L.current=!0,I.current=pe,V.current=0,_n(_d,Ji)):W.current.trim()&&pe-_.current>a&&C(),g.current=requestAnimationFrame(m)},[C,a,T]),ae=(0,Te.useCallback)(()=>{if(f.current||!P.current)return;let k=window.SpeechRecognition||window.webkitSpeechRecognition,F=new k;X.current=0,N.current=0,F.lang=e||document.documentElement.lang||navigator.language||"en-US",F.interimResults=!0,F.maxAlternatives=1,F.continuous=!0,F.onresult=q=>{let oe="";for(let de=X.current;de<q.results.length;de++)oe+=q.results[de][0].transcript;N.current=q.results.length,oe=oe.trim(),oe&&(W.current=oe,p(oe),l(!0))},F.onerror=q=>{let oe=q?.error||"";oe==="no-speech"||oe==="aborted"||be.current?.(oe)},F.onend=()=>{f.current=null,P.current&&D.current&&setTimeout(()=>{ae()},120)},f.current=F;try{F.start()}catch{f.current=null,be.current?.("failed-to-start")}},[e]),G=(0,Te.useCallback)(()=>{D.current=!1;let k=f.current;f.current=null;try{k?.stop()}catch{}},[]),B=(0,Te.useCallback)(()=>{P.current=!1,L.current=!1,V.current=0,A.current=[],_n(1,0),D.current=!1,c(!1),l(!1),p(""),W.current="",R.current=0;let k=f.current;f.current=null;try{k?.abort()}catch{}g.current!==null&&(cancelAnimationFrame(g.current),g.current=null),y.current?.getTracks().forEach(F=>F.stop()),y.current=null,M.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),w=(0,Te.useCallback)(async()=>{if(!(P.current||!d)){P.current=!0,c(!0);try{let k=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});y.current=k;let F=window.AudioContext||window.webkitAudioContext,q=new F;b.current=q;let oe=q.createAnalyser();oe.fftSize=1024,oe.smoothingTimeConstant=.25,q.createMediaStreamSource(k).connect(oe),M.current=oe,E.current=new Uint8Array(oe.fftSize),z.current=.008,_.current=Date.now(),g.current=requestAnimationFrame(m)}catch(k){P.current=!1,c(!1),be.current?.(k?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}D.current=!0,ae()}},[d,m,ae]);return(0,Te.useEffect)(()=>{o&&(s?(W.current="",p(""),L.current=!1,V.current=0,A.current=[],G()):(L.current=!1,_.current=Date.now(),D.current=!0,ae()))},[s,o,ae,G]),(0,Te.useEffect)(()=>{if(!o||s)return;let k=setInterval(()=>{let F=!!f.current,q=R.current>z.current+Eo;F&&q&&W.current},2e3);return()=>clearInterval(k)},[o,s]),(0,Te.useEffect)(()=>()=>{B()},[B]),{supported:d,active:o,hearing:i,interim:h,micLevel:me,micSpectrum:J,spectrumBins:H,start:w,stop:B}}var Te,Ad,Eo,Pd,Fd,_d,Ji,Dd,Hd,Bd,$d,qd,Ud,Zi,tc=Ce(()=>{"use strict";Te=require("react");Ro();Ad=1100,Eo=.012,Pd=320,Fd=.09,_d=.25,Ji=130,Dd=700,Hd=12,Bd=48,$d=.45,qd=.35,Ud=.2,Zi=.55});function oc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=zo(r[2]),a=(r.length-4)*2;r[3]&1&&a>0&&a--;let s=new Float32Array(a);for(let o=0;o<a;o++){let c=r[4+(o>>1)]>>4*(o&1)&15,i=nc[n],l=i>>3;c&4&&(l+=i),c&2&&(l+=i>>1),c&1&&(l+=i>>2),t=ac(c&8?t-l:t+l),n=zo(n+rc[c]),s[o]=t/32768}return s}var rc,nc,zo,ac,Dn,sc=Ce(()=>{"use strict";rc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],nc=[7,8,9,10,11,12,13,14,16,17,19,21,23,25,28,31,34,37,41,45,50,55,60,66,73,80,88,97,107,118,130,143,157,173,190,209,230,253,279,307,337,371,408,449,494,544,598,658,724,796,876,963,1060,1166,1282,1411,1552,1707,1878,2066,2272,2499,2749,3024,3327,3660,4026,4428,4871,5358,5894,6484,7132,7845,8630,9493,10442,11487,12635,13899,15289,16818,18500,20350,22385,24623,27086,29794,32767],zo=e=>e<0?0:e>88?88:e,ac=e=>e<-32768?-32768:e>32767?32767:e,Dn=class{constructor(){this.index=0}encode(r){let t=r.length,n=new Uint8Array(4+(t+1>>1));if(t===0)return n.buffer;let a=r[0];new DataView(n.buffer).setInt16(0,a,!0),n[2]=this.index,n[3]=t&1;let o=this.index;for(let c=0;c<t;c++){let i=nc[o],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=i>>3;l>=i&&(h|=4,l-=i,p+=i),i>>=1,l>=i&&(h|=2,l-=i,p+=i),i>>=1,l>=i&&(h|=1,p+=i),a=ac(h&8?a-p:a+p),o=zo(o+rc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=o,n.buffer}}});function Lr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function ic(e,r=24e3){let t=0;for(let i of e)t+=i.length;let n=new Float32Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let s=new ArrayBuffer(44+t*2),o=new DataView(s);Lr(o,0,"RIFF"),o.setUint32(4,36+t*2,!0),Lr(o,8,"WAVE"),Lr(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,r,!0),o.setUint32(28,r*2,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Lr(o,36,"data"),o.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++){let l=Math.max(-1,Math.min(1,n[i]));o.setInt16(c,l<0?l*32768:l*32767,!0),c+=2}return new Blob([s],{type:"audio/wav"})}function cc(e,r=16e3){let t=0;for(let i of e)t+=i.length;let n=new Int16Array(t),a=0;for(let i of e)n.set(i,a),a+=i.length;let s=new ArrayBuffer(44+t*2),o=new DataView(s);Lr(o,0,"RIFF"),o.setUint32(4,36+t*2,!0),Lr(o,8,"WAVE"),Lr(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,r,!0),o.setUint32(28,r*2,!0),o.setUint16(32,2,!0),o.setUint16(34,16,!0),Lr(o,36,"data"),o.setUint32(40,t*2,!0);let c=44;for(let i=0;i<t;i++)o.setInt16(c,n[i],!0),c+=2;return new Blob([s],{type:"audio/wav"})}var lc=Ce(()=>{"use strict"});function hc(e,r,t){let n=e.map(a=>({...a}));for(let[a,s]of[["user",r],["assistant",t]]){if(!s.trim())continue;let o=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){o=c;break}if(o<0&&a==="user"){let c=n.map(i=>i.role).lastIndexOf("user");if(c>=0&&n[c].text===s.trim())continue}o>=0?n[o].text=s.trim():n.push({role:a,text:s.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var sn,dc=Ce(()=>{"use strict";sn=class{constructor(){this.attempts=0}static canRetry(r){return r===1006||r===1011||r===1012||r===1013}nextDelay(){return[500,1500][this.attempts++]??null}}});function pc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function uc(e,r){let t=e.apiUrl.replace(/\/+$/,""),n=t.endsWith("/voice/live")?t:t+"/voice/live",a=new URL(n,window.location.href);a.protocol=a.protocol==="https:"?"wss:":"ws:",a.searchParams.set("siteId",e.siteId),e.kikuId&&a.searchParams.set("kikuId",e.kikuId),e.sessionId&&a.searchParams.set("sessionId",e.sessionId),e.name&&a.searchParams.set("name",e.name),e.language&&a.searchParams.set("language",e.language),a.searchParams.set("codec","adpcm");let s=r||e.voice;return s&&a.searchParams.set("voice",s),a.toString()}function mc(e){let[r,t]=(0,te.useState)("idle"),[n,a]=(0,te.useState)(!1),[s,o]=(0,te.useState)([]),[c,i]=(0,te.useState)(null),[l,h]=(0,te.useState)(!1),p=(0,te.useRef)(null),d=(0,te.useRef)(!1),u=(0,te.useRef)(new sn),f=(0,te.useRef)(()=>!1),y=(0,te.useRef)(null),b=(0,te.useRef)(null),M=(0,te.useRef)(!1),g=(0,te.useRef)(0),E=(0,te.useRef)(0),R=(0,te.useRef)(!1),z=(0,te.useRef)(null),_=(0,te.useRef)(0),S=(0,te.useRef)(!1),W=(0,te.useRef)(!1),X=(0,te.useRef)(null),N=(0,te.useRef)(null),P=(0,te.useRef)(null),j=(0,te.useRef)(null),D=(0,te.useRef)(0),re=(0,te.useRef)(!1),ge=(0,te.useRef)([]),be=(0,te.useRef)(0),Y=(0,te.useRef)(new Set),me=(0,te.useRef)(null),J=(0,te.useRef)(null),H=(0,te.useRef)(Ta),A=(0,te.useRef)(e);(0,te.useEffect)(()=>{A.current=e;let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e]);let v=(0,te.useRef)(!1),L=(0,te.useRef)([]),I=(0,te.useRef)(new Dn),V=(0,te.useRef)(null),T=(0,te.useRef)(""),C=(0,te.useRef)(""),[m,ae]=(0,te.useState)([]),G=(0,te.useRef)([]);G.current=m;let B=(0,te.useRef)([]),[w,k]=(0,te.useState)([]),F=(0,te.useRef)(0),q=(0,te.useRef)([]),oe=(0,te.useRef)(void 0),de=(0,te.useRef)(null),pe=(0,te.useRef)([]),ue=(0,te.useRef)([]),K=(0,te.useCallback)(()=>{let U=T.current.trim(),ie=C.current.trim(),xe=de.current?Math.max(.1,(Date.now()-de.current)/1e3):void 0,Q;if(pe.current.length>0)try{let Ne=ic(pe.current,H.current);Q=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode bot audio wav:",Ne)}let fe;if(ue.current.length>0)try{let Ne=cc(ue.current,Lo);fe=URL.createObjectURL(Ne)}catch(Ne){console.error("[kiku] failed to encode user audio wav:",Ne)}let he=q.current.length?q.current:void 0,Pe=oe.current;T.current="",C.current="",de.current=null,pe.current=[],ue.current=[],q.current=[],oe.current=void 0,!(!U&&!ie&&!he&&!Pe)&&A.current.onExchange?.({heard:U,said:ie,duration:xe,userAudioUrl:fe,audioUrl:Q,images:he,visualization:Pe})},[]),ne=(0,te.useCallback)(()=>{},[]),ye=(0,te.useCallback)(U=>{if(g.current=Date.now(),A.current.muted)return;let ie=new Int16Array(U),xe=0;for(let fe=0;fe<ie.length;fe+=8){let he=Math.abs(ie[fe]);he>xe&&(xe=he)}xe>1200&&(_.current=Date.now());let Q=p.current;if(!(!v.current||!Q||Q.readyState!==WebSocket.OPEN)){if(Q.bufferedAmount>256*1024){f.current()||A.current.onError?.("connection");return}ue.current.push(new Int16Array(U.slice(0)));try{Q.send(I.current.encode(new Int16Array(U)))}catch{f.current()||A.current.onError?.("connection")}}},[]),Oe=(0,te.useCallback)(()=>{L.current=[]},[]),we=(0,te.useCallback)(()=>{let U=X.current;if(V.current&&U&&U.state!=="closed")return V.current;let ie=window.AudioContext||window.webkitAudioContext;if(!ie)return Promise.resolve(null);let xe=new ie({latencyHint:"interactive",sampleRate:Ta});X.current=xe;let Q=URL.createObjectURL(new Blob([Xd],{type:"application/javascript"}));return V.current=xe.audioWorklet.addModule(Q).then(()=>xe).catch(()=>null).finally(()=>URL.revokeObjectURL(Q)),V.current},[]),De=(0,te.useCallback)(()=>{typeof window>"u"||we()},[we]),$e=(0,te.useCallback)(()=>{let U=j.current;if(!U)return 0;let ie=new Uint8Array(U.fftSize);U.getByteTimeDomainData(ie);let xe=0;for(let Q=0;Q<ie.length;Q++){let fe=(ie[Q]-128)/128;xe+=fe*fe}return Math.min(1,Math.sqrt(xe/ie.length)*4)},[]),Ke=r==="speaking"||r==="thinking",Se=(0,te.useCallback)(U=>{let ie=Ke?me.current:j.current;return!ie||U.length!==ie.frequencyBinCount?!1:(ie.getByteFrequencyData(U),!0)},[Ke]),ot=(0,te.useCallback)(()=>(Ke?me.current:j.current)?.frequencyBinCount??0,[Ke]),ct=(0,te.useCallback)(()=>{let U=J.current,ie=X.current;if(!U||!ie||ie.state==="closed"){D.current=0;for(let fe of Y.current)try{fe.onended=null,fe.stop()}catch{}Y.current.clear();return}let xe=ie.currentTime,Q=xe+Gd;U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(0,Q),U.gain.setValueAtTime(1,Q);for(let fe of Y.current)try{fe.onended=null,fe.stop(Q)}catch{}Y.current.clear(),D.current=Q},[]),qt=(0,te.useCallback)(U=>{let ie=X.current,xe=me.current;if(!ie||!xe||U.length===0)return;ie.state==="suspended"&&ie.resume().catch(()=>{});let Q=ie.createBuffer(1,U.length,H.current);Q.getChannelData(0).set(U);let fe=ie.createBufferSource();fe.buffer=Q,fe.connect(xe);let he=ie.currentTime,Pe=D.current>he?D.current:he+jd;fe.start(Pe),D.current=Pe+Q.duration,Y.current.add(fe),fe.onended=()=>{Y.current.delete(fe),Y.current.size===0&&(D.current=0,re.current=!1,t(Ne=>Ne==="speaking"?"listening":Ne))},t(Ne=>Ne==="speaking"||Ne==="idle"||Ne==="ended"?Ne:"speaking")},[]),zt=(0,te.useCallback)(()=>{let U=ge.current;ge.current=[],be.current=0;for(let ie of U)qt(ie)},[qt]),nt=(0,te.useCallback)(()=>{ge.current=[],be.current=0},[]),yr=(0,te.useCallback)(U=>{let ie=X.current;if(!ie||U.length===0)return;if(D.current>ie.currentTime&&ge.current.length===0){qt(U);return}let Q=re.current?Od:Wd;ge.current.push(U),be.current+=U.length/H.current,be.current>=Q&&(re.current=!0,zt())},[qt,zt]),Ut=(0,te.useRef)(null),dr=(0,te.useRef)(null),lt=(0,te.useCallback)(()=>{Ut.current&&(clearInterval(Ut.current),Ut.current=null);let U=dr.current,ie=X.current;if(U&&ie&&ie.state!=="closed"){let xe=ie.currentTime;try{U.gain.cancelScheduledValues(xe),U.gain.setValueAtTime(U.gain.value,xe),U.gain.linearRampToValueAtTime(1e-4,xe+.04)}catch{}setTimeout(()=>{try{U.disconnect()}catch{}dr.current===U&&(dr.current=null)},50)}},[]),nr=(0,te.useCallback)(()=>{},[]),Ht=(0,te.useCallback)(U=>{y.current!==null&&clearTimeout(y.current),b.current!==null&&clearTimeout(b.current),y.current=b.current=null,M.current=!1,E.current=0,K();let ie=p.current;p.current=null;try{ie?.close()}catch{}v.current=!1,L.current=[],V.current=null,re.current=!1,ge.current=[],be.current=0,lt(),ct(),z.current=null,P.current&&(P.current.port.onmessage=null),P.current?.disconnect(),P.current=null,N.current?.getTracks().forEach(xe=>xe.stop()),N.current=null,j.current=null,me.current=null,J.current=null,X.current?.close().catch(()=>{}),X.current=null,t(U),a(!1),o([]),d.current=!1,R.current=!1},[K,ct,lt]),ve=(0,te.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}Ht("idle")},[Ht]),ht=(0,te.useCallback)(U=>{let ie=[...B.current,...G.current.filter(xe=>xe.done)].filter(xe=>xe.text).map(xe=>({role:xe.role,text:xe.text}));try{U.send(JSON.stringify({type:"open",history:ie}))}catch{}},[]),Bt=(0,te.useCallback)(U=>{let ie=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==U||v.current||f.current()||(A.current.onError?.("connection"),ve())},3e4),U.binaryType="arraybuffer",I.current=new Dn,U.onopen=()=>{p.current!==U||!R.current||(R.current=!1,ht(U))},U.onmessage=xe=>{if(p.current!==U)return;if(xe.data instanceof ArrayBuffer){if(!S.current){S.current=!0;let he=C.current.trim();he&&ae(Pe=>{let Ne=Pe.slice();for(let Ye=Ne.length-1;Ye>=0;Ye--)Ne[Ye].role==="user"&&!Ne[Ye].done&&(Ne[Ye]={...Ne[Ye],done:!0});return Ne.push({role:"assistant",text:he,done:!1}),Ne})}!W.current&&_.current&&(W.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-_.current)+"ms")),lt();let fe=oc(xe.data);pe.current.push(fe.slice()),yr(fe);return}let Q;try{Q=JSON.parse(xe.data)}catch{return}switch(Q.type){case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,M.current=!0,g.current=Date.now(),Q.sampleRate&&(H.current=Q.sampleRate,Q.sampleRate!==Ta&&console.warn(`[kiku] live audio rate ${Q.sampleRate} != context ${Ta}; per-buffer resampling will click at every chunk seam`)),typeof Q.secondsLeft=="number"&&i(Q.secondsLeft),h(Q.photos===!0),v.current=!0,t("listening"),Oe(),z.current?.(),z.current=null,tr("connect",!0);break;case"hearing":de.current||(de.current=Date.now()),a(!0);break;case"thinking":de.current||(de.current=Date.now()),a(!1),t("thinking"),nr(),Q.tool==="visualize"&&k(fe=>fe.some(he=>he.pending)?fe:[...fe,{id:++F.current,url:"",pending:!0}]);break;case"viz":typeof Q.url=="string"&&Q.url?(oe.current=Q.url,k(fe=>fe.map(he=>he.pending?{...he,url:Q.url,pending:!1}:he))):k(fe=>fe.filter(he=>!he.pending));break;case"heard":Y.current.size===0&&(D.current=0),de.current||(de.current=Date.now(),tr("heard")),T.current+=Q.text,ae(fe=>{let he=fe.slice(),Pe=he[he.length-1];return Pe&&Pe.role==="user"&&!Pe.done?he[he.length-1]={...Pe,text:T.current.trim()}:he.push({role:"user",text:T.current.trim(),done:!1}),he}),a(!1),t("thinking"),nr();break;case"said":if(C.current+=Q.text,!S.current)break;ae(fe=>{let he=fe.slice();for(let Ye=he.length-1;Ye>=0;Ye--)he[Ye].role==="user"&&!he[Ye].done&&(he[Ye]={...he[Ye],done:!0});let Pe=he[he.length-1],Ne=C.current.trim();return Pe&&Pe.role==="assistant"&&!Pe.done?he[he.length-1]={...Pe,text:Ne}:he.push({role:"assistant",text:Ne,done:!1}),he});break;case"interrupted":re.current=!1,nt(),lt(),ct(),tr("interrupt"),a(!1),t("listening");break;case"turn_complete":W.current=!1,S.current=!1,_.current=0,ae(fe=>fe.map(he=>he.done?he:{...he,done:!0})),zt(),re.current=!1,lt(),a(!1),K();break;case"sources":Array.isArray(Q.sources)&&Q.sources.length&&o(Q.sources);break;case"seconds":typeof Q.secondsLeft=="number"&&i(Q.secondsLeft);break;case"refused":A.current.onRefused?.(Q.code||"guest"),ve();break;case"error":if(Q.code==="session_expiring"&&f.current())return;A.current.onError?.(Q.code||"unavailable"),ve();break}},U.onclose=xe=>{p.current===U&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(sn.canRetry(xe.code)&&f.current())&&(xe.code===4402&&(ie=!0,A.current.onError?.(xe.reason==="site"?"siteLimit":"limit")),Ht("ended")))},U.onerror=()=>{!ie&&p.current===U&&console.warn("[kiku] voice transport interrupted")}},[nt,yr,K,Oe,ct,zt,ht,nr,lt,ve,Ht]),Lt=(0,te.useCallback)(U=>{let ie=p.current;if(p.current=null,v.current=!1,G.current=hc(G.current,T.current,C.current),ae(G.current),k(fe=>fe.filter(he=>!he.pending)),K(),S.current=!1,W.current=!1,re.current=!1,nt(),t("connecting"),ct(),lt(),ie){try{ie.send(JSON.stringify({type:"close"}))}catch{}try{ie.close()}catch{}}let xe=A.current;R.current=!0;let Q=new WebSocket(uc(xe,U),pc(xe));p.current=Q,Bt(Q)},[Bt,nt,K,ct,lt]),St=(0,te.useCallback)(()=>{if(!d.current||!M.current||!P.current)return!1;if(y.current!==null)return!0;let U=u.current.nextDelay();if(U===null)return A.current.onError?.("connection"),ve(),!0;let ie=p.current;p.current=null,v.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{ie?.close()}catch{}return ct(),nt(),lt(),a(!1),t("connecting"),y.current=setTimeout(()=>{y.current=null,d.current&&Lt()},U),!0},[nt,ct,Lt,ve,lt]);f.current=St,(0,te.useEffect)(()=>{let U=()=>{if(!d.current||!v.current||!P.current||document.visibilityState==="hidden")return;let xe=X.current;if(!xe)return;let Q=Date.now();if(Q-g.current<1e4){E.current=0;return}E.current?Q-E.current>1e4&&(A.current.onError?.("audio-capture"),ve()):(E.current=Q,xe.resume().catch(()=>{}))},ie=window.setInterval(U,2e3);return document.addEventListener("visibilitychange",U),()=>{clearInterval(ie),document.removeEventListener("visibilitychange",U)}},[ve]);let Nt=(0,te.useRef)(e.voice);(0,te.useEffect)(()=>{Nt.current!==e.voice&&(Nt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Lt(e.voice))},[e.voice,r,Lt]);let jt=(0,te.useCallback)(async(U=[])=>{if(d.current&&(p.current||y.current!==null))return;d.current=!0,u.current=new sn,M.current=!1,t("connecting");let ie=A.current;L.current=[],B.current=U,G.current=[],ae([]),k([]),T.current="",C.current="";let xe=we();X.current?.resume().catch(()=>{}),Rr();let Q=p.current;Q&&Q.readyState===WebSocket.OPEN?ht(Q):Q&&Q.readyState===WebSocket.CONNECTING?R.current=!0:(Q=new WebSocket(uc(ie),pc(ie)),p.current=Q,R.current=!0,Bt(Q));let fe;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};fe=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(kt){try{Q.close()}catch{}p.current=null,t("idle"),ie.onError?.(kt?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==Q){fe.getTracks().forEach(kt=>kt.stop());return}N.current=fe;for(let kt of fe.getAudioTracks())kt.enabled=!A.current.muted;let he=await xe;if(p.current!==Q){fe.getTracks().forEach(kt=>kt.stop());return}if(!he){A.current.onError?.("audio-worklet"),ve();return}he.state==="suspended"&&he.resume().catch(()=>{});let Pe=he.createAnalyser();Pe.fftSize=1024,Pe.smoothingTimeConstant=.25,j.current=Pe;let Ne=he.createGain();Ne.gain.value=1,Ne.connect(he.destination),J.current=Ne;let Ye=he.createAnalyser();Ye.fftSize=1024,Ye.smoothingTimeConstant=.25,Ye.connect(Ne),me.current=Ye;try{let kt=new AudioWorkletNode(he,"kiku-capture");P.current=kt,kt.port.onmessage=Or=>ye(Or.data);let wr=he.createMediaStreamSource(fe),Wr=()=>{if(!(p.current!==Q||!P.current)){try{wr.connect(Pe)}catch{}try{wr.connect(kt)}catch{}}};v.current?Wr():z.current=Wr}catch{A.current.onError?.("audio-worklet"),ve()}},[Bt,we,ye,ht,ve]);(0,te.useEffect)(()=>{if(r!=="listening"){a(!1);return}let U=0,ie=!1,xe=Date.now(),Q=window.setInterval(()=>{let fe=Date.now();if(!A.current.muted&&$e()>Vd&&(U=fe),fe-Math.max(U,xe)>Yd){window.clearInterval(Q),A.current.onError?.("idle"),ve();return}let he=fe-U<Kd;he!==ie&&(ie=he,a(he))},100);return()=>window.clearInterval(Q)},[r,$e,ve]);let $t=(0,te.useCallback)(()=>{De()},[De]);(0,te.useEffect)(()=>()=>{ve()},[ve]),(0,te.useEffect)(()=>{let U=N.current;if(U)for(let ie of U.getAudioTracks())ie.enabled=!e.muted},[e.muted,r]);let at=(0,te.useCallback)(async U=>{let ie=A.current.storeScene;if(!ie||!U.type.startsWith("image/"))return!1;let xe;try{xe=await xa(U)}catch{return!1}let Q=++F.current;if(k(he=>[...he,{id:Q,url:xe,pending:!1,sending:!0}]),!await ie(xe))return k(he=>he.filter(Pe=>Pe.id!==Q)),!1;k(he=>he.map(Pe=>Pe.id===Q?{...Pe,sending:!1}:Pe)),q.current.push(xe);let fe=p.current;return fe&&fe.readyState===WebSocket.OPEN&&fe.send(JSON.stringify({type:"text",text:"(The visitor just attached a photo. You cannot see it. In one short sentence, ask what they would like changed in it.)"})),!0},[]),It=(0,te.useCallback)(U=>{let ie=p.current;ie&&ie.readyState===WebSocket.OPEN&&U.trim()&&ie.send(JSON.stringify({type:"text",text:U}))},[]);return{state:r,phase:r,hearing:n,sources:s,secondsLeft:c,photos:l,turns:m,images:w,micLevel:$e,micSpectrum:Se,spectrumBins:ot,start:jt,stop:ve,prewarm:$t,attachPhoto:at,ask:It}}var te,Lo,Ta,Wd,Od,jd,Gd,Vd,Kd,Yd,Xd,bc=Ce(()=>{"use strict";te=require("react");Jr();sc();lc();uo();dc();Lo=16e3,Ta=24e3,Wd=.08,Od=.12,jd=.03,Gd=.08,Vd=.12,Kd=500,Yd=6e4,Xd=`
|
|
3
3
|
class KikuCapture extends AudioWorkletProcessor {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
6
|
-
this._ratio = sampleRate / ${
|
|
7
|
-
this._chunk = ${Math.round(
|
|
6
|
+
this._ratio = sampleRate / ${Lo};
|
|
7
|
+
this._chunk = ${Math.round(Lo*.04)};
|
|
8
8
|
this._acc = new Int16Array(this._chunk);
|
|
9
9
|
this._n = 0;
|
|
10
10
|
this._pos = 0;
|
|
@@ -32,8 +32,8 @@ class KikuCapture extends AudioWorkletProcessor {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
registerProcessor('kiku-capture', KikuCapture);
|
|
35
|
-
`});function Bd(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let o of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:o,pending:!1})}return{turns:t,images:n}}function cc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:i}){let c=(0,ic.useAkropolysContext)(),[s,l]=(0,ht.useState)("off"),[h,d]=(0,ht.useState)("idle"),[u,p]=(0,ht.useState)(""),[k,g]=(0,ht.useState)(!1),[b,z]=(0,ht.useState)(!1),[f,N]=(0,ht.useState)(()=>{try{let A=localStorage.getItem(bo);if(A&&wn.some(K=>K.name===A))return A}catch{}return n||"Algenib"}),M=(0,ht.useRef)(sc()),E=(0,ht.useCallback)(A=>{N(A);try{localStorage.setItem(bo,A)}catch{}},[]),F=Gi({lang:e||r,onUtterance:A=>{d("thinking"),o(A)},onError:A=>{l("off"),d("idle"),p(A==="not-allowed"?"micDenied":A==="language-not-supported"?"micLangUnsupported":A==="audio-capture"?"micMissing":A==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Ui()}}),B=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",X=c?.api?.siteId||c?.siteId||"",T=c?.api?.apiToken||c?.apiToken||"",P=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,G=c?.getShopperName?.()||void 0,D=nc({apiUrl:B,siteId:X,token:T,kikuId:P,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:A=>c?.storeScene?.(A)??Promise.resolve(!1),name:G,language:t,voice:f,muted:k,onExchange:A=>{i(A.heard,A.said,A.duration,A.userAudioUrl,A.audioUrl,{images:A.images,visualization:A.visualization,live:M.current})},onError:A=>{if(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required"){z(!0),D.stop(),l("off");return}l("off"),p(A==="idle"?"voiceIdleEnded":A==="not-allowed"?"micDenied":A==="audio-capture"?"micMissing":A==="limit"?"voiceLimitReached":A==="siteLimit"?"voiceSiteLimit":A==="connection"||A==="network"?"micNetwork":"voiceUnavailable")},onRefused:A=>{(A==="shopper_reply_limit"||A==="access_revoked"||A==="account_required")&&z(!0),l("off"),p("voiceUnavailable")}}),Y=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:xe}=D;(0,ht.useEffect)(()=>{if(!Y)return;let A=window;if(A.requestIdleCallback){let x=A.requestIdleCallback(xe,{timeout:3e3});return()=>A.cancelIdleCallback(x)}let K=window.setTimeout(xe,1500);return()=>window.clearTimeout(K)},[Y,xe]),(0,ht.useEffect)(()=>{s==="converse"&&D.state==="ended"&&(l("off"),p("voiceSessionEnded"))},[s,D.state]);let[se,V]=(0,ht.useState)(oc),te=(0,ht.useCallback)(async A=>{if(!vi()){p("micInsecure");return}if(p(""),l(A),A==="dictate")d("listening"),await F.start();else{let K=Bd(a,M.current);V(K),D.start(K.turns)}},[D,F,a]),O=(0,ht.useCallback)(()=>{D.stop(),M.current=sc(),V(oc),D.start([])},[D]),_=(0,ht.useCallback)(()=>{l("off"),d("idle"),F.stop(),D.stop()},[D,F]),J=s==="converse"?Dd(D.state):s==="dictate"?h==="listening"?F.hearing?"speaking":"listening":h:"idle",S=s==="converse"&&D.state!=="listening"&&D.state!=="thinking"&&D.state!=="speaking";return{attachPhoto:async A=>{await D.attachPhoto(A)||p("voicePhotoFailed")},voiceMode:s,voicePhase:J,voiceConnecting:S,voiceError:u,setVoiceError:p,voiceMuted:k,setVoiceMuted:g,voiceSecondsLeft:D.secondsLeft??null,voiceBlocked:b,liveVoiceName:f,chooseVoice:E,canConverse:Y,startVoice:te,stopVoice:_,voice:F,live:D,earlier:se,newVoiceChat:O}}var ht,ic,Dd,oc,sc,lc=Se(()=>{"use strict";ht=require("react"),ic=require("@akropolys/sdk");vo();Vi();ac();It();Dd=e=>e==="connecting"||e==="ended"?"idle":e,oc={turns:[],images:[]},sc=()=>`v${Date.now().toString(36)}`});function qd(e){let r=1;for(;r<ga.length-1&&ga[r][0]<e;)r++;let[t,n,a]=ga[r-1],[o,i,c]=ga[r],s=o===t?0:(e-t)/(o-t),l=s*s*(3-2*s);return[n+(i-n)*l,a+(c-a)*l]}function dc(e,r,t,n){let a=l=>l.toFixed(2),o=(r+t)/2,i=e+n,c=(o-r)*.55,s=(t-o)*.55;return`C${a(e)} ${a(r+c)} ${a(i)} ${a(o-c)} ${a(i)} ${a(o)}C${a(i)} ${a(o+s)} ${a(e)} ${a(t-s)} ${a(e)} ${a(t)}`}function Ud(e,r,t,n,a){let o=Sr(e*t,8,r*.96),i=Sr(e*n,8,r*.96),c=(d,u)=>`${d.toFixed(2)} ${u.toFixed(2)}`,s=.46,l=Sr((e-o)/e,0,1),h=Sr((e-i)/e,0,1);return`M${c(-e,-r+o)}C${c(-e,-r+o*s)} ${c(-e+o*s,-r)} ${c(-e+o,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-o,-r)}C${c(e-o*s,-r)} ${c(e,-r+o*s)} ${c(e,-r+o)}`+dc(e,-r+o,r-i,a)+`C${c(e,r-i*s)} ${c(e-i*s,r)} ${c(e-i,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+i,r)}C${c(-e+i*s,r)} ${c(-e,r-i*s)} ${c(-e,r-i)}`+dc(-e,r-i,-r+o,-a)+"Z"}function To(e){let n=(!Eo.includes(e)&&Math.random()<.26?Eo:Kr).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function Zt(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Ro(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function Wd(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function mc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:o,onImpact:i,triggerRef:c,dropIn:s=!1}){let l=(0,Ze.useRef)(s),h=(0,Ze.useRef)(e);h.current=e;let d=(0,Ze.useRef)(t);d.current=t;let u=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),p=o?.flower??u,k=o?.eyelashes??u,g=o?.blush??u,b=(0,Ze.useRef)(null),z=(0,Ze.useRef)(null),f=(0,Ze.useRef)(null),N=(0,Ze.useRef)(null),M=(0,Ze.useRef)(null),E=(0,Ze.useRef)(null),F=(0,Ze.useRef)(null),C=(0,Ze.useRef)(null),B=(0,Ze.useRef)(null),X=(0,Ze.useRef)(null),T=(0,Ze.useRef)(null),P=(0,Ze.useRef)(null),G=(0,Ze.useRef)(null),D=(0,Ze.useRef)(null),Y=(0,Ze.useRef)([]),xe=(0,Ze.useRef)([]),se=(0,Ze.useRef)(null),V=(0,Ze.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,te=(0,Ze.useRef)(i);return te.current=i,(0,Ze.useEffect)(()=>{let O=window.matchMedia("(prefers-reduced-motion: reduce)").matches,_={},J={};hc.forEach(ze=>{_[ze]=So.idle[ze]??Mo.idle[ze]??0,J[ze]=0});let S=Array.from({length:En},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),L=Array.from({length:En},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),A=1800,K=-1,x=0,R=2600,m=0,ae=!1,q=9e3+Math.random()*8e3,H=-1,w=0;l.current&&!O&&(H=Hd,w=performance.now()+$d);let y=0,I=0,U=0,ce=4200,ge=0,me=0,ue=0,j=12e3,Z=Kr[0],we=Zt(Z.color),$e=Zt(Z.light),ve=[...we],_e=[...$e],Oe=2600,et=-1/0,ye=!1,at=0,ct=!1,At=0,Ct=0,Ye=0,Kt=!1,Lt=0,dr=ze=>{ze-et<Oe?(Z=To(Z),ve=Zt(Z.color),_e=Zt(Z.light),et=-1/0):et=ze},Yt=(ze,St,re,he)=>{let be=h.current,ne=Array.from({length:En},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),fe=(pe,Re,Le=0)=>{let Ne=Math.max(4,54*Math.max(.06,St));ne[pe]={x:Re+re,y:-4+he+Le,w:21,h:Ne,rx:10.5,a:1}};if(be==="thinking"){let Re=ze%2800/2800,Le=Math.pow(Math.sin(Re*Math.PI*2)*.5+.5,3);for(let Ne=0;Ne<4;Ne++){let nt=ze/700+Ne/4*Math.PI*2,nr=(26-Ne%2*5)*(1-.94*Le),ot=16+Le*6+Math.sin(ze/420+Ne)*1.4;ne[Ne]={x:Math.cos(nt)*nr,y:Math.sin(nt)*nr*.86+2,w:ot,h:ot,rx:ot/2,a:1}}}else if(be==="visualizing")ne[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(be==="speaking")for(let Re=0;Re<5;Re++){let Le=12+Math.abs(Math.sin(ze/150+Re*.9))*26;ne[Re]={x:(Re-4/2)*15,y:-2,w:9,h:Le,rx:4.5,a:1}}else be==="failed"?(fe(0,-22,8),fe(1,22,8)):(fe(0,-22),fe(1,22));return ne};c&&(c.current=()=>{if(H>=0){ct=!0,Z=To(Z),ve=Zt(Z.color),_e=Zt(Z.light),et=-1/0;return}H=0,dr(At),q=At+4e3});let pr=ze=>{At=ze;let St=h.current,re=So[St]??So.idle,he=Mo[St]??Mo.idle,be=St==="idle"||St==="failed";be&&!O&&(ze>R&&(x=(Math.random()-.5)*2,R=ze+1800+Math.random()*3600),_.wantGx=x*5);let ne=d.current?1:0;Ye=(Ye+(ne-Ct)*.1)*.88,Ct+=Ye;let fe=d.current&&!O?Math.sin(ze/480)*.055*Ct:0,pe={bw:re.bw*(1+Ct*.34+fe),bh:re.bh*(1+Ct*.2+fe),tr:re.tr,br:re.br,bow:re.bow,warm:he.warm,wob:he.wob,lid:he.lid,gx:be&&!O?x*5:0,gy:be&&!O?Math.sin(ze/2600)*2:0};!O&&be&&(K<0&&ze>A&&(K=0),K>=0&&(K+=1/7,pe.lid=he.lid*Math.abs(K-.5)*2,K>=1&&(K=-1,pe.lid=he.lid,A=ze+(Math.random()<.22?340:2600+Math.random()*4200)))),hc.forEach(Pe=>{let tt=Pe;if(O){_[tt]=pe[tt];return}let Ue=tt==="lid"?.42:.11,Mt=tt==="lid"?.55:.78;J[tt]=(J[tt]+(pe[tt]-_[tt])*Ue)*Mt,_[tt]+=J[tt]});let Re=0,Le=0;!O&&d.current&&H<0&&ze>Lt&&(H=0,Lt=ze+2100,q=ze+4e3),!O&&St==="idle"?H<0&&ze>q&&(H=0,ye?(ye=!1,at=0,Z=To(Z),ve=Zt(Z.color),_e=Zt(Z.light),et=-1/0):(at++,dr(ze))):H<0&&(q=ze+3e3+Math.random()*3e3),H>=0&&(ze>=w&&(H+=1/96),[Re,Le]=qd(H),H>=1&&(H=-1,Re=0,Le=0,ct?(ct=!1,at=0,q=ze+150):!ye&&at>=2?(ye=!0,q=ze+240):q=ze+5e3+Math.random()*5e3));let Ne=Math.max(0,Re);if(d.current!==Kt){Kt=d.current;let Pe=d.current?uc:Z;ve=Zt(Pe.color),_e=Zt(Pe.light),d.current&&!O&&(H<0&&(H=0),Lt=ze+2600)}let nt=d.current?uc:Z;if(O)we=[...ve],$e=[..._e];else for(let Pe=0;Pe<3;Pe++)we[Pe]+=(ve[Pe]-we[Pe])*.055,$e[Pe]+=(_e[Pe]-$e[Pe])*.055;let nr=Ro(we),ot=Ro($e);P.current?.setAttribute("stop-color",nr),G.current?.setAttribute("stop-color",ot),D.current?.setAttribute("stop-color",ot);for(let Pe=0;Pe<4;Pe++){let tt=pc[Pe]+(Gd[Pe]-pc[Pe])*Ct;Y.current[Pe]?.style.setProperty("stop-color",Ro(Wd(Od[Pe],we,tt)))}let Xt=.34+Math.sin(ze/1200)*.06,Tr=Ne>.02?Math.min(.72,Xt+Ne*.34):Xt;T.current?.setAttribute("opacity",Tr.toFixed(3)),Ne>.04?te.current?.(Ne,nt.color,nt.glow):qt>.04&&te.current?.(0,nt.color,nt.glow),qt=Ne;let ur=O?0:Math.sin(ze/1900)*.9*_.wob,mr=_.bw*(1+Re*.55)+ur*.4,Rr=_.bh*(1-Re*.62),tn=Ud(mr,Rr,Sr(_.tr+Ne*.5,0,1.2),Sr(_.br+Ne*.9,0,1),_.bow+ur+Ne*5);b.current?.setAttribute("d",tn),z.current?.setAttribute("d",tn);let rn=St==="thinking";rn!==ae&&(ae=rn,se.current?.setAttribute("filter",rn?`url(#${V}-goo)`:"none"));let Pa=Yt(ze,_.lid*(1-Ne*.85),_.gx,_.gy);for(let Pe=0;Pe<En;Pe++){let tt=Pa[Pe],Ue=S[Pe],Mt=L[Pe];for(let xt of["x","y","w","h","rx","a"]){if(O){Ue[xt]=tt[xt];continue}Mt[xt]=(Mt[xt]+(tt[xt]-Ue[xt])*.16)*.74,Ue[xt]+=Mt[xt]}let lt=xe.current[Pe];lt&&(lt.setAttribute("x",(Ue.x-Ue.w/2).toFixed(2)),lt.setAttribute("y",(Ue.y-Ue.h/2).toFixed(2)),lt.setAttribute("width",Math.max(0,Ue.w).toFixed(2)),lt.setAttribute("height",Math.max(0,Ue.h).toFixed(2)),lt.setAttribute("rx",Math.max(0,Math.min(Ue.rx,Ue.w/2,Ue.h/2)).toFixed(2)),lt.setAttribute("opacity",Sr(Ue.a,0,1).toFixed(2)))}let qn=O?0:Math.sin(ze/he.breath)*1.5;!O&&be&&H<0?(ze>ce&&(U=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),ce=ze+2600+Math.random()*4200),ze>j&&(ue=ue>.1?0:1,j=ze+(ue>.1?900:9e3+Math.random()*11e3))):(U=0,ue=0),I=(I+(U-y)*.028)*.9,y+=I,me=(me+(ue-ge)*.06)*.82,ge+=me;let nn=_.bh-Rr,an=y*3.4+ge*4.5,Br=y*2.2+ge*3,Un=ge*2.4;if(f.current?.setAttribute("transform",`translate(${Br.toFixed(2)} ${(qn+nn-Le+Un).toFixed(2)}) rotate(${an.toFixed(2)} 0 60)`),N.current&&N.current.setAttribute("transform",`translate(${Br.toFixed(2)} ${(qn+nn-Le+Un).toFixed(2)}) rotate(${an.toFixed(2)} 0 60)`),p&&M.current){let Pe=-mr*.62,tt=-Rr*.7,Ue=-16+(O?0:Math.sin(ze/1400)*3)+an*.4;M.current.setAttribute("transform",`translate(${Pe.toFixed(2)}, ${tt.toFixed(2)}) rotate(${Ue.toFixed(2)})`)}if(g&&E.current){let Pe=12+_.gy*.5;E.current.setAttribute("transform",`translate(0, ${Pe.toFixed(2)})`)}if(k&&F.current){let Pe=St!=="thinking"&&St!=="visualizing"&&St!=="speaking";F.current.setAttribute("opacity",Pe?Sr(_.lid*1.3,0,1).toFixed(2):"0");let tt=(Ue,Mt)=>{let lt=Math.max(1,Math.min(Ue.w,Ue.h)/2),xt=Ue.y-Ue.h/2+lt,Wn="";for(let[On,Hr]of[[20,7],[48,8],[76,6.5]]){let br=On*Math.PI/180,Fa=Ue.x+Mt*Math.sin(br)*lt,_a=xt-Math.cos(br)*lt,Da=Ue.x+Mt*Math.sin(br)*(lt+Hr),fr=xt-Math.cos(br)*(lt+Hr)-1.5,Ba=Ue.x+Mt*Math.sin(br-.22)*(lt+Hr*.65),Ha=xt-Math.cos(br-.22)*(lt+Hr*.65);Wn+=` M ${Fa.toFixed(2)} ${_a.toFixed(2)} Q ${Ba.toFixed(2)} ${Ha.toFixed(2)} ${Da.toFixed(2)} ${fr.toFixed(2)}`}return Wn.trim()};C.current?.setAttribute("d",tt(S[0],-1)),B.current?.setAttribute("d",tt(S[1],1))}m=requestAnimationFrame(pr)},qt=0;return m=requestAnimationFrame(pr),()=>cancelAnimationFrame(m)},[p,k,g,u]),(0,Te.jsxs)("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,Te.jsxs)("defs",{children:[(0,Te.jsx)("linearGradient",{id:`${V}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((O,_)=>(0,Te.jsx)("stop",{ref:J=>{Y.current[_]=J},offset:`${O}%`,style:{stopColor:`var(--hsk-marble-${_+1}, #FAF7F2)`}},O))}),(0,Te.jsxs)("linearGradient",{id:`${V}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Te.jsx)("stop",{ref:P,offset:"0%",stopColor:Kr[0].color,stopOpacity:"0.9"}),(0,Te.jsx)("stop",{ref:G,offset:"45%",stopColor:Kr[0].light,stopOpacity:"0.5"}),(0,Te.jsx)("stop",{ref:D,offset:"100%",stopColor:Kr[0].light,stopOpacity:"0"})]}),(0,Te.jsxs)("radialGradient",{id:`${V}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Te.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Te.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Te.jsxs)("linearGradient",{id:`${V}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Te.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Te.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Te.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Te.jsxs)("radialGradient",{id:`${V}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Te.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Te.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Te.jsx)("clipPath",{id:`${V}-skin`,children:(0,Te.jsx)("use",{href:`#${V}-body`})}),(0,Te.jsxs)("filter",{id:`${V}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Te.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Te.jsx)("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),(0,Te.jsxs)("mask",{id:`${V}-cut`,children:[(0,Te.jsx)("path",{ref:z,d:"",fill:"#FFFFFF"}),(0,Te.jsx)("g",{ref:se,children:Array.from({length:En},(O,_)=>(0,Te.jsx)("rect",{ref:J=>{xe.current[_]=J},fill:"#000000"},_))})]})]}),(0,Te.jsxs)("g",{ref:f,mask:`url(#${V}-cut)`,children:[(0,Te.jsx)("path",{id:`${V}-body`,ref:b,d:"",fill:`url(#${V}-marble)`}),(0,Te.jsxs)("g",{clipPath:`url(#${V}-skin)`,children:[(0,Te.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${V}-sheen)`}),(0,Te.jsx)("rect",{ref:T,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${V}-contact)`,opacity:"0.45"})]})]}),(0,Te.jsxs)("g",{ref:N,style:{pointerEvents:"none"},children:[g&&(0,Te.jsxs)("g",{ref:E,children:[(0,Te.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`}),(0,Te.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`})]}),k&&(0,Te.jsxs)("g",{ref:F,children:[(0,Te.jsx)("path",{ref:C,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Te.jsx)("path",{ref:B,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),p&&(0,Te.jsxs)("g",{ref:M,className:"hsk-avatar-flower",children:[(0,Te.jsx)("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(O=>(0,Te.jsx)("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${V}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${O-18})`},O)),(0,Te.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Te.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Te.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Te.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Te.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Ze,Te,So,Mo,ga,Hd,$d,En,hc,Sr,Kr,Eo,Yu,Od,pc,Gd,uc,bc=Se(()=>{"use strict";Ze=require("react"),Te=require("react/jsx-runtime"),So={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Mo={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},ga=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],Hd=.42,$d=170;En=6,hc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Sr=(e,r,t)=>Math.max(r,Math.min(t,e));Kr=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Eo=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],Yu=[...Kr,...Eo];Od=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],pc=[.05,.15,.42,.74],Gd=[.52,.72,.9,1],uc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"}});function xa({className:e="",compact:r=!1}){let[t,n]=(0,zo.useState)(()=>ta()),[a,o]=(0,zo.useState)(""),i=()=>{let c=!t;Ss(c),n(c),Ot(c?"reply":"interrupt",!0),o(Ts())};return(0,Et.jsxs)("button",{type:"button",className:de("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:i,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[(0,Et.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Et.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,Et.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,Et.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,Et.jsx)("span",{children:t?"Sounds":"Muted"})]})}var zo,Et,Lo=Se(()=>{"use strict";zo=require("react");vt();Wr();Et=require("react/jsx-runtime")});function Jd(e,r,t,n){let a=3*e,o=3*(t-e)-a,i=1-a-o,c=3*r,s=3*(n-r)-c,l=1-c-s,h=p=>((i*p+o)*p+a)*p,d=p=>((l*p+s)*p+c)*p,u=p=>(3*i*p+2*o)*p+a;return p=>{let k=p;for(let g=0;g<8;g++){let b=h(k)-p,z=u(k);if(Math.abs(b)<1e-5||Math.abs(z)<1e-6)break;k-=b/z}return d(va(k))}}function ep(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function fc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let i=(0,Ht.useRef)(null),c=(0,Ht.useRef)(null),s=(0,Ht.useRef)(!1),l=(0,Ht.useRef)(0),h=(0,Ht.useRef)(null),d=(0,Ht.useRef)(o);d.current=o;let u=(0,Ht.useCallback)(f=>{l.current=f;let N=e(),M=i.current,E=c.current;if(!N||!M||!E)return;let F=1-f,C=Math.min(Math.max(M.top,E.top),E.bottom-M.height),B=Math.min(Math.max(M.left,E.left),E.right-M.width),X=(M.top-C)*F,T=(M.left-B)*F,P=Math.max(0,(C-E.top)*F),G=Math.max(0,(B-E.left)*F),D=Math.max(0,(E.right-B-M.width)*F),Y=Math.max(0,(E.bottom-C-M.height)*F),xe=M.radius*F+n*f;N.style.clipPath=`inset(${P}px ${D}px ${Y}px ${G}px round ${xe}px)`,N.style.translate=T||X?`${T}px ${X}px`:"";let se=t?.();se&&Object.assign(se.style,{left:`${G}px`,top:`${P}px`,width:`${Math.max(0,E.width-G-D)}px`,height:`${Math.max(0,E.height-P-Y)}px`,borderRadius:`${xe}px`,translate:N.style.translate}),N.style.setProperty("--hsk-island-content",String(va((f-Yd)/Xd)));let V=String(va(f/Qd));N.style.opacity=V,se&&(se.style.opacity=V)},[e,t,n]),p=()=>{let f=e();if(f)for(let M of["clip-path","translate","--hsk-island-content","opacity"])f.style.removeProperty(M);let N=t?.();if(N)for(let M of["left","top","width","height","border-radius","translate","opacity"])N.style.removeProperty(M)},k=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},g=(f,N,M)=>{k();let E=l.current,F=Math.max(Kd,N*Math.abs(f-E)),C=performance.now(),B=X=>{let T=va((X-C)/F);u(E+(f-E)*Zd(T)),T<1?h.current=requestAnimationFrame(B):(h.current=null,M())};u(E),h.current=requestAnimationFrame(B)},b=(f,N)=>{i.current=ep(N),f.style.clipPath="",f.style.translate="",c.current=f.getBoundingClientRect()};return(0,Ht.useLayoutEffect)(()=>{if(!a)return;let f=e(),N=r();if(!(!f||!N))return s.current=!1,f.style.removeProperty("pointer-events"),b(f,N),l.current=0,g(1,Vd,p),()=>{k(),p()}},[a]),{close:(0,Ht.useCallback)(()=>{let f=e(),N=a?r():null,M=N?.getBoundingClientRect(),E=M&&M.bottom>0&&M.top<window.innerHeight;if(!f||!N||!E){d.current();return}let F=h.current!==null?l.current:1;b(f,N),s.current=!0,f.style.pointerEvents="none",l.current=F,g(0,jd,()=>d.current())},[a,e,r])}}var Ht,Vd,jd,Kd,Yd,Xd,Qd,va,Zd,kc=Se(()=>{"use strict";Ht=require("react"),Vd=300,jd=220,Kd=120,Yd=.45,Xd=.4,Qd=.25,va=e=>Math.min(1,Math.max(0,e));Zd=Jd(.32,.72,0,1)});function xc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:i=!1,themeMenuClosing:c=!1,onThemeMenuClosed:s,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:d,onReset:u,onClose:p,onToggleThemeMenu:k,onSelectTheme:g,themeAttr:b,below:z}){let f=wr(),N=Qe.default.useRef(null),M=Qe.default.useRef(null),E=Qe.default.useRef(null),F=Qe.default.useRef(null),[C]=Qe.default.useState(()=>{let m=!gc;return gc=!0,m});Qe.default.useLayoutEffect(()=>{let m=N.current,ae=F.current,q=M.current;if(!m||!ae||!q)return;let H=ae.offsetParent;if(!H)return;let w=H.offsetTop+ae.offsetTop+ae.offsetHeight/2;m.style.setProperty("--hsk-tray-top",`${w}px`),m.style.setProperty("--hsk-tray-head",`${ae.offsetHeight/2+8}px`),m.style.setProperty("--hsk-tray-h",`${q.offsetHeight}px`),m.style.setProperty("--hsk-tray-w",`${q.offsetWidth}px`)},[i,l]);let[B]=Qe.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[X,T]=Qe.default.useState(!1);Qe.default.useEffect(()=>{if(!l||X)return;let m=window.requestIdleCallback,ae=m?m(()=>T(!0),{timeout:1200}):setTimeout(()=>T(!0),600);return()=>{let q=window.cancelIdleCallback;m&&q?q(ae):clearTimeout(ae)}},[l,X]);let P=l&&(i||X),G=fc({target:Qe.default.useCallback(()=>M.current,[]),trigger:Qe.default.useCallback(()=>F.current,[]),shadow:Qe.default.useCallback(()=>E.current,[]),radius:18,enabled:l&&i&&B,onClosed:()=>s?.()});Qe.default.useEffect(()=>{l&&c&&G.close()},[c,l]);let[D,Y]=Qe.default.useState(!1),[xe,se]=Qe.default.useState("#134e3d"),[V,te]=Qe.default.useState("rgba(19, 78, 61, 0.45)"),O=Qe.default.useRef(void 0),_=Qe.default.useRef(null),J=Qe.default.useRef(!1),S=Qe.default.useRef(0),L=Qe.default.useCallback(()=>{J.current=!1,S.current=Date.now(),_.current=setTimeout(()=>{if(J.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}k?.()},350)},[k]),A=Qe.default.useCallback(()=>{_.current&&(clearTimeout(_.current),_.current=null)},[]),K=Qe.default.useCallback(()=>{_.current&&(clearTimeout(_.current),_.current=null)},[]),x=Qe.default.useCallback(m=>{if(J.current){J.current=!1,m.preventDefault(),m.stopPropagation();return}o?d?.():l?k?.():O.current?.()},[o,l,d,k]),R=Qe.default.useCallback((m,ae,q)=>{m>.04?(Y(!0),se(ae),te(q)):Y(!1)},[]);return(0,Ge.jsxs)("div",{ref:N,className:de("hsk-cb-topbar",l&&i&&"is-docked"),children:[(0,Ge.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&(0,Ge.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:p,"aria-label":f("back"),children:(0,Ge.jsx)("span",{className:"hsk-cb-back-icon",children:(0,Ge.jsx)(aa,{})})})}),(0,Ge.jsxs)("div",{className:de("hsk-cb-topbar-mark",l&&i&&"is-oozing"),"data-impacting":D?"true":"false",style:{"--hsk-contact-color":xe,"--hsk-contact-glow":V},"data-unread":a?"true":"false",onTouchStart:L,onTouchEnd:A,onTouchMove:K,onTouchCancel:K,onClick:x,role:"button",tabIndex:0,"aria-label":o?f("jumpToLatest"):`${e} (tap for themes)`,children:[(0,Ge.jsx)(mc,{state:n,size:34,theme:h,alert:a,onImpact:R,triggerRef:O,dropIn:C}),r?(0,Ge.jsx)("img",{ref:F,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,Ge.jsx)("span",{ref:F,className:"hsk-cb-topbar-name",children:e})]}),(0,Ge.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,Ge.jsx)("button",{className:"hsk-cb-topbar-btn",onClick:u,children:f("clearChat")}),!l&&(0,Ge.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:p,"aria-label":"Close Chat",children:(0,Ge.jsx)(Or,{})})]}),l&&i&&(0,Ge.jsx)("div",{className:de("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:k,"aria-hidden":"true"}),P&&(0,Ge.jsx)("div",{className:de("hsk-cb-tray-shadow",!i&&"is-parked"),"aria-hidden":"true",children:(0,Ge.jsx)("div",{ref:E})}),P&&(0,Ge.jsx)("div",{ref:M,className:de("hsk-cb-topbar-ooze-menu",c&&"is-closing",B&&"is-island",!i&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:(0,Ge.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,Ge.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,Ge.jsx)(xa,{compact:!0}),(0,Ge.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,Ge.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,Ge.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:Lr.map(({id:m,label:ae,Icon:q})=>(0,Ge.jsxs)("button",{type:"button",className:de("hsk-cb-theme-grid-item",h===m&&"is-active"),onClick:H=>{H.stopPropagation(),g?.(m)},children:[(0,Ge.jsx)(q,{}),(0,Ge.jsx)("span",{children:ae})]},m))})]})}),l&&i&&z&&(0,Ge.jsx)("div",{className:de("hsk-cb-tray-below",c&&"is-closing"),children:z})]})}var Qe,Ge,gc,vc=Se(()=>{"use strict";Qe=Ut(require("react"));It();Dt();ao();bc();Lo();vt();kc();Ge=require("react/jsx-runtime"),gc=!1});function Cc(e,r,t,n,a,o=0){let i=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,d=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+In(e.n,l)*.02;i.push([r+Math.cos(h+o)*n*d,t+Math.sin(h+o)*a*d])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:s}=e;s.beginPath(),s.moveTo(...c(i[15],i[0]));for(let l=0;l<16;l++)s.quadraticCurveTo(i[l][0],i[l][1],...c(i[l],i[(l+1)%16]));s.closePath()}function Sa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function Ho(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function ap(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Pr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Sa(e,t),n.fillStyle=Ho(e,zt,dt,a),Cc(e,zt,dt,a,a,e.n*.03),n.fill(),n.restore()}function No(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,wa,n),a.clip()),Sa(e,0),a.fillStyle=Ho(e,zt,dt,Math.max(r,t)),Cc(e,zt,dt,r,t),a.fill(),a.restore()}function ya(e,r,t,n,a,o=a/2,i=a/2){let{ctx:c}=e;c.save(),Sa(e,0),c.fillStyle=ap(e,n,a),c.beginPath(),c.roundRect(r+In(e.n,r)*.6,n-a/2+In(e.n,n)*.6,t-r,a,[o,i,i,o]),c.fill(),c.restore()}function _o(e,r,t,n,a=0){let{ctx:o}=e,i=n*(1+a*.2);o.save(),Sa(e,a),o.fillStyle=Ho(e,r,t,i),o.beginPath(),o.arc(r,t,i,0,Math.PI*2),o.fill(),o.restore(),o.save(),o.strokeStyle=e.dark,o.lineWidth=1.4,o.lineCap="round",o.beginPath();for(let c=0;c<=1.001;c+=.04){let s=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(s)*l,d=t+Math.sin(s)*l;c===0?o.moveTo(h,d):o.lineTo(h,d)}o.stroke(),o.restore()}function Ca(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,o=38+(1-r)*8,i=n%2?5:8;t.beginPath(),t.moveTo(zt+Math.cos(a)*o,dt+Math.sin(a)*o),t.lineTo(zt+Math.cos(a)*(o+i),dt+Math.sin(a)*(o+i)),t.stroke()}t.restore()}function op(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,dt-Qr/2+2),t.lineTo(r+In(e.n,r)*1.5,dt+Qr/2-2),t.stroke(),t.restore()}function zn(e,r,t=-1,n=-1){for(let a=0;a<Gt;a++){let o=0;for(let s=0;s<r;s++)o+=a<=s?-2:2;let i=Do(a)+o,c=Do(a+1)+o;a===n?_o(e,er((i+c)/2,Bo(a),.5),dt-4,Fo,.5):a<=t?_o(e,Bo(a),dt,Fo):ya(e,i,c,dt,Qr,a===0?Qr/2:2,a===Gt-1?Qr/2:2)}}function sp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Pr(a,sr)});let r=[[sr,sr,34,38],[34,38,44,48],[44,48,Yr,Xr]];for(let[n,a,o,i]of r){for(let c=0;c<3;c++){let s=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>No(h,er(n,o,s),er(a,i,s)*l)})}e.push({hold:1,draw:c=>No(c,o,i)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=er(dt+Xr,dt-Xr,a),i=er(8,24,a),c=(o-dt)/Xr;t=Math.max(t,2*Yr*Math.sqrt(Math.max(0,1-c*c)),30);let s=t;e.push({draw:l=>{a<1&&No(l,Yr,Xr,o-i*.3),ya(l,zt-s/2,zt+s/2,o,i)}})}for(let n of[.5,1])e.push({draw:a=>ya(a,zt-Yr,zt+Yr,er(dt-Xr,dt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=er(2*Yr,Po,a),i=er(24,Qr,a),c=n%2?2:-2;e.push({draw:s=>ya(s,zt-o/2+c,zt+o/2+c,dt,i)})}for(let n=1;n<Gt;n++)e.push({draw:a=>{zn(a,n-1),op(a,Do(n))}}),e.push({thump:.35,draw:a=>zn(a,n)});e.push({draw:n=>zn(n,Gt-1)});for(let n=0;n<Gt;n++)e.push({thump:.12,draw:a=>zn(a,Gt-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>zn(a,Gt-1,Gt-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<Gt;o++)_o(a,er(Bo(o),zt,n),dt,er(Fo,10,n),.4)}});return e.push({thump:1,draw:n=>{Pr(n,sr*1.3),Ca(n,1)}}),e.push({draw:n=>{Pr(n,sr*1.12),Ca(n,.4)}}),e.push({draw:n=>Pr(n,sr*1.04)}),e}function Io(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function Sc({phase:e,label:r}){let t=Nn.default.useRef(null),n=Nn.default.useRef(null),a=Nn.default.useRef({n:0,at:0,held:0,entered:!1,last:Ln[0]});return Nn.default.useEffect(()=>{let o=t.current,i=n.current,c=o?.getContext("2d");if(!o||!c||!i)return;let s=Math.min(window.devicePixelRatio||1,3);o.width=wa*s,o.height=Ao*s;let l="var(--hsk-primary, #ff6a33)",h={ctx:c,dpr:s,n:0,clay:Io(o,l),light:Io(o,`color-mix(in srgb, ${l} 55%, white)`),dark:Io(o,`color-mix(in srgb, ${l} 70%, black)`),ink:getComputedStyle(o).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=a.current,u=(f,N=1)=>{c.setTransform(s,0,0,s,0,0),c.clearRect(0,0,wa,Ao),c.globalAlpha=N,h.n=d.n++,f.draw(h),c.globalAlpha=1},p=f=>{let N=o.getBoundingClientRect();ui({x:N.left+N.width/2,y:N.top+N.height/2,strength:f}),i.style.translate="0 1px",i.style.rotate=`${In(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){u(Ln[0]);return}let k=e==="exit"?null:e==="enter"&&!d.entered?yc:Ln;k&&(d.at=0);let g=0,b=0,z=()=>{if(i.style.translate="",i.style.rotate="",!k){g===0&&p(.6),u(d.last,wc[g]),++g>=wc.length&&clearInterval(b);return}let f=k[d.at];u(f),d.last=f,f.thump&&d.held===0&&p(f.thump),!(k===Ln&&++d.held<(f.hold??rp))&&(d.held=0,!(++d.at<k.length)&&(k===yc&&(d.entered=!0),k=Ln,d.at=0))};return z(),b=window.setInterval(z,tp),()=>clearInterval(b)},[e==="exit"]),(0,An.jsxs)("div",{className:"hsk-clay",children:[(0,An.jsx)("canvas",{className:"hsk-clay-table",ref:t,"aria-hidden":"true"}),(0,An.jsx)("p",{className:"hsk-lang-preparing",ref:n,children:r})]})}var Nn,An,tp,rp,wa,Ao,zt,dt,sr,Yr,Xr,Po,Qr,Gt,Fo,np,er,In,Do,Bo,Ln,yc,wc,Mc=Se(()=>{"use strict";Nn=Ut(require("react"));xn();An=require("react/jsx-runtime"),tp=83,rp=2,wa=240,Ao=160,zt=wa/2,dt=Ao/2,sr=24,Yr=50,Xr=56,Po=124,Qr=22,Gt=6,Fo=13,np=30,er=(e,r,t)=>e+(r-e)*t,In=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;Do=e=>zt-Po/2+Po*e/Gt;Bo=e=>zt+(e-(Gt-1)/2)*np;Ln=sp(),yc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Pr(r,sr,e)})),{thump:.7,draw:e=>{Pr(e,sr*1.24),Ca(e,1)}},{draw:e=>{Pr(e,sr*1.08),Ca(e,.4)}}],wc=[1,.7,.35,0]});function ip(){return(0,ie.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,ie.jsx)("svg",{viewBox:"0 0 16 16",children:(0,ie.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Tc({inOnboarding:e,justCompleted:r,onboardingMood:t,awaitingLang:n,awaitingName:a,awaitingEntityLang:o,awaitingConsent:i,termsAgreed:c,shopperLanguage:s,pendingLanguage:l,shopperName:h,entityLangPref:d,chromeReady:u,activeChips:p,speechLang:k,t:g,tNode:b,chooseLanguage:z,langSwitching:f=!1,isLangPreparing:N,onPrewarmLanguage:M,chooseEntityLang:E,agreeTerms:F,handleSend:C}){let B=l||s,X=!B||B.toLowerCase()==="english"||B.toLowerCase()==="en",T=N??(f||!!l||!!s&&!u&&!X),P=Ir(B),[G,D]=ir.default.useState(T),[Y,xe]=ir.default.useState(()=>T?"spinner-steady":"idle"),se=ir.default.useRef([]),V=()=>{se.current.forEach(clearTimeout),se.current=[]};T!==G&&(D(T),V(),T?(xe("step1-exit"),se.current.push(setTimeout(()=>xe("spinner-enter"),280)),se.current.push(setTimeout(()=>xe("spinner-steady"),960))):(xe("spinner-exit"),se.current.push(setTimeout(()=>xe("idle"),460)))),ir.default.useEffect(()=>()=>V(),[]);let te=Y==="spinner-enter"||Y==="spinner-steady"||Y==="spinner-exit",O=Y==="step1-exit",_=te||O||!s||n?"1":!h||a?"2":!d||o?"3":!c||i?"4":null,[J,S]=ir.default.useState(null),[L,A]=ir.default.useState(3);ir.default.useEffect(()=>{if(!i)return;A(3);let x=setInterval(()=>{A(R=>R<=1?(clearInterval(x),0):R-1)},1e3);return()=>clearInterval(x)},[i]);let K=s?vn(s,k)||s.charAt(0).toUpperCase()+s.slice(1):"";return ir.default.useEffect(()=>{if(n&&M){let x=typeof window<"u"?window.requestIdleCallback:void 0,R=x?x(()=>M("Urdu"),{timeout:2e3}):setTimeout(()=>M("Urdu"),500);return()=>{x&&typeof window<"u"?window.cancelIdleCallback?.(R):clearTimeout(R)}}},[n,M]),(0,ie.jsx)("div",{className:"hsk-cb-empty",children:(0,ie.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[_&&(0,ie.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,ie.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[_," / 4"]})}),te?(0,ie.jsx)("div",{className:de("hsk-lang-loader",Y==="spinner-enter"&&"hsk-lang-loader--enter",Y==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,ie.jsx)(Sc,{phase:Y==="spinner-exit"?"exit":Y==="spinner-enter"?"enter":"steady",label:P.preparing})},"spinner-loading"):O||n||!s?(0,ie.jsxs)("div",{className:de("hsk-cb-hello-wrap",O&&"hsk-step1-exit"),children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,ie.jsxs)("div",{className:"hsk-cb-lang-chips",children:[ua.map((x,R)=>(0,ie.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":R},lang:x.tag,dir:x.rtl?"rtl":"ltr",disabled:f,onPointerEnter:()=>!f&&M?.(x.value),onPointerDown:()=>!f&&M?.(x.value),onClick:()=>!f&&z(x.value),children:x.native},x.value)),(0,ie.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":ua.length},children:"or type another one"})]})]},"step-lang"):a||!h?(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:g("nameStepTitle")}),(0,ie.jsx)("p",{className:"hsk-cb-hello-ask",children:g("nameStepAsk")}),(0,ie.jsx)("p",{className:"hsk-cb-hello-hint",children:g("nameStepHint")})]},"step-name"):o?(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:g("howShouldResultsLook")}),(0,ie.jsx)("p",{className:"hsk-cb-hello-lead",children:b("entityLangIntro",{lang:K})}),(0,ie.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":g("howShouldResultsLook"),children:["translated","original"].map((x,R)=>(0,ie.jsxs)("button",{type:"button",role:"radio","aria-checked":(J??d)===x,className:de("hsk-cb-entlang-opt",(J??d)===x&&"is-selected"),style:{"--hsk-opt-idx":R},onClick:()=>S(x),children:[(0,ie.jsx)(ip,{}),(0,ie.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,ie.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:x==="translated"?b("inLanguage",{lang:K}):g("asWritten")}),(0,ie.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:g(x==="translated"?"detailsTranslated":"namesAsWritten")})]})]},x))}),(0,ie.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ie.jsx)("button",{type:"button",className:de("hsk-cb-terms-agree-btn",J&&"is-active"),disabled:!J,onClick:()=>J&&E(J),children:g("continueButton")})})]},"step-entity-lang"):i?(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:g("termsStepTitle")}),(0,ie.jsx)("p",{className:"hsk-cb-hello-lead",children:g("termsStepSubtitle")}),(0,ie.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ie.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,ie.jsx)("h3",{className:"hsk-cb-terms-title",children:g("termsPiiTitle")})]}),(0,ie.jsx)("p",{className:"hsk-cb-terms-desc",children:g("termsPiiDesc")})]}),(0,ie.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ie.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ie.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,ie.jsx)("h3",{className:"hsk-cb-terms-title",children:g("termsSessionTitle")})]}),(0,ie.jsx)("p",{className:"hsk-cb-terms-desc",children:g("termsSessionDesc")})]}),(0,ie.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ie.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ie.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,ie.jsx)("h3",{className:"hsk-cb-terms-title",children:g("termsMemoryTitle")})]}),(0,ie.jsx)("p",{className:"hsk-cb-terms-desc",children:g("termsMemoryDesc")})]}),(0,ie.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ie.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ie.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,ie.jsx)("h3",{className:"hsk-cb-terms-title",children:g("termsCookieTitle")})]}),(0,ie.jsx)("p",{className:"hsk-cb-terms-desc",children:g("termsCookieDesc")})]}),(0,ie.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ie.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,ie.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ie.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,ie.jsx)("h3",{className:"hsk-cb-terms-title",children:g("termsAiTitle")})]}),(0,ie.jsx)("p",{className:"hsk-cb-terms-desc",children:g("termsAiDesc")})]})]}),(0,ie.jsxs)("p",{className:"hsk-cb-terms-more",children:[g("privacyMore")," ",(0,ie.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,ie.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ie.jsx)("button",{type:"button",className:de("hsk-cb-terms-agree-btn",L===0&&"is-active"),disabled:L>0,onClick:F,children:L>0?g("termsAgreeCounting",{seconds:String(L)}):g("termsAgreeButton")})})]},"step-terms"):r?(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:b("allSet",{name:h})}),(0,ie.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?b("replyingTranslated",{lang:K}):b("replyingOriginal",{lang:K})})]},"step-completed"):h?(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ie.jsx)("h2",{className:"hsk-cb-hello",children:b("greetReturning",{name:h})}),(0,ie.jsx)("p",{className:"hsk-cb-hello-lead",children:g("greetReturningLead")})]},"step-returning"):(0,ie.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ie.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,ie.jsx)("b",{children:"kiku"}),"."]}),(0,ie.jsx)("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!e&&(p?.length??0)>0&&(0,ie.jsx)("div",{className:"hsk-cb-chips",children:p.map((x,R)=>(0,ie.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":R},onClick:()=>C(x),children:x},x))})]})})}var ir,ie,Rc=Se(()=>{"use strict";ir=Ut(require("react"));vt();It();Mc();ie=require("react/jsx-runtime")});function Ma(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,o=e.slice(0,t),i=e.slice(a),c=i.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:i,content:o,isComplete:!1};let s=c.index??0,l=c[0].length;return{thinking:i.slice(0,s),content:o+i.slice(s+l),isComplete:!0}}function cp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Ec({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=wr(),i=(0,_r.useRef)(Date.now()),[c,s]=(0,_r.useState)(()=>r?null:0),[l,h]=(0,_r.useState)(!r);(0,_r.useEffect)(()=>{if(r){c!==null&&(s(Math.max(1,Math.round((Date.now()-i.current)/1e3))),h(!1));return}h(!0);let k=setInterval(()=>{s(Math.round((Date.now()-i.current)/1e3))},1e3);return()=>clearInterval(k)},[r]);let d=t??c,u=a!=null?o("repliedIn",{duration:cp(a)}):n==="with_team"?o("withTeam"):n==="back_with_kiku"?o("backWithKiku"):n==="team_closed"?o("teamClosed"):n==="team_joined"?o("teamJoined"):n==="reaching_team"?r?o("passedToTeam"):`${o("reachingTeam")}\u2026`:r?d!=null?o("thoughtForSeconds",{duration:`${d}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,p=!!e;return(0,Fr.jsxs)("div",{className:de("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Pn(n)&&"hsk-cb-think--note"),children:[(0,Fr.jsxs)("button",{type:"button",className:de("hsk-cb-think-head",!p&&"hsk-cb-think-head--static"),onClick:p?()=>h(k=>!k):void 0,"aria-expanded":p?l:void 0,children:[(0,Fr.jsx)("span",{children:u}),p&&(0,Fr.jsx)("span",{className:de("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),p&&l&&(0,Fr.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var _r,Fr,Pn,Ta=Se(()=>{"use strict";_r=require("react");vt();It();Fr=require("react/jsx-runtime");Pn=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined"});function Fn(e,r){let[t,n]=(0,tr.useState)(!1),a=(0,tr.useRef)(null),o=(0,tr.useRef)(r);o.current=r,(0,tr.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=(0,tr.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,tr.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:i,closeNow:c}}var tr,$o=Se(()=>{"use strict";tr=require("react")});function dp(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Ra(e,r=1){let t=0,n=0;for(let a of e.replace(hp," "))lp.test(a)&&(dp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var lp,hp,qo=Se(()=>{"use strict";lp=/\p{L}/u,hp=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g});function _n(e){let r=String(e??"").trim();return Nc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}function Ic(e){if(vp.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Uo?.has(r.host))}catch{return!1}}function zc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Lc(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function Mp({children:e}){let r=Dr.default.useRef(null),[t,n]=Dr.default.useState("none"),[a,o]=Dr.default.useState(!1),i=Dr.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Dr.default.useCallback(()=>{let d=r.current;if(!d)return;if(!(d.scrollWidth>d.clientWidth+2)){n("none");return}let p=getComputedStyle(d).direction==="rtl",k=Math.abs(d.scrollLeft),g=k<=4,b=k+d.clientWidth>=d.scrollWidth-4;n(g?p?"right":"left":b?p?"left":"right":"middle")},[]);Dr.default.useEffect(()=>{c();let d=r.current;if(!d)return;let u=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return u?.observe(d),()=>u?.disconnect()},[c]);let s=d=>{let u=r.current;!u||u.scrollWidth<=u.clientWidth||d.target.closest("a, button, input")||(i.current={startX:d.pageX-u.offsetLeft,scrollLeft:u.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=d=>{if(!i.current.isDown)return;let u=r.current;if(!u)return;let k=(d.pageX-u.offsetLeft-i.current.startX)*1.5;Math.abs(k)>3&&(i.current.hasMoved=!0,d.preventDefault(),u.scrollLeft=i.current.scrollLeft-k)},h=()=>{i.current.isDown=!1,o(!1)};return(0,We.jsx)("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:s,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function Ac(e,r=!1,t){Uo=t??null;try{return Tp(e,r)}finally{Uo=null}}function Tp(e,r){let t=e.split(`
|
|
35
|
+
`});function Jd(e,r){let t=[],n=[];for(let a of e)if(a.live===r){a.content&&t.push({role:a.role==="user"?"user":"assistant",text:a.content,done:!0});for(let s of[...a.images??[],...a.visualization?[a.visualization]:[]])n.push({id:-(n.length+1),url:s,pending:!1})}return{turns:t,images:n}}function xc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:s,appendSpokenExchange:o}){let c=(0,gc.useAkropolysContext)(),[i,l]=(0,pt.useState)("off"),[h,p]=(0,pt.useState)("idle"),[d,u]=(0,pt.useState)(""),[f,y]=(0,pt.useState)(!1),[b,M]=(0,pt.useState)(!1),[g,E]=(0,pt.useState)(()=>{try{let I=localStorage.getItem(wo);if(I&&In.some(V=>V.name===I))return I}catch{}return n||"Algenib"}),R=(0,pt.useRef)(kc()),z=(0,pt.useCallback)(I=>{E(I);try{localStorage.setItem(wo,I)}catch{}},[]),_=ec({lang:e||r,onUtterance:I=>{p("thinking"),s(I)},onError:I=>{l("off"),p("idle"),u(I==="not-allowed"?"micDenied":I==="language-not-supported"?"micLangUnsupported":I==="audio-capture"?"micMissing":I==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Qi()}}),W=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",X=c?.api?.siteId||c?.siteId||"",N=c?.api?.apiToken||c?.apiToken||"",P=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,j=c?.getShopperName?.()||void 0,D=mc({apiUrl:W,siteId:X,token:N,kikuId:P,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:I=>c?.storeScene?.(I)??Promise.resolve(!1),name:j,language:t,voice:g,muted:f,onExchange:I=>{o(I.heard,I.said,I.duration,I.userAudioUrl,I.audioUrl,{images:I.images,visualization:I.visualization,live:R.current})},onError:I=>{if(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required"){M(!0),D.stop(),l("off");return}l("off"),u(I==="idle"?"voiceIdleEnded":I==="not-allowed"?"micDenied":I==="audio-capture"?"micMissing":I==="limit"?"voiceLimitReached":I==="siteLimit"?"voiceSiteLimit":I==="connection"||I==="network"?"micNetwork":"voiceUnavailable")},onRefused:I=>{(I==="shopper_reply_limit"||I==="access_revoked"||I==="account_required")&&M(!0),l("off"),u("voiceUnavailable")}}),re=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ge}=D;(0,pt.useEffect)(()=>{if(!re)return;let I=window;if(I.requestIdleCallback){let T=I.requestIdleCallback(ge,{timeout:3e3});return()=>I.cancelIdleCallback(T)}let V=window.setTimeout(ge,1500);return()=>window.clearTimeout(V)},[re,ge]),(0,pt.useEffect)(()=>{i==="converse"&&D.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[i,D.state]);let[be,Y]=(0,pt.useState)(fc),me=(0,pt.useCallback)(async I=>{if(!zi()){u("micInsecure");return}if(u(""),l(I),I==="dictate")p("listening"),await _.start();else{let V=Jd(a,R.current);Y(V),D.start(V.turns)}},[D,_,a]),J=(0,pt.useCallback)(()=>{D.stop(),R.current=kc(),Y(fc),D.start([])},[D]),H=(0,pt.useCallback)(()=>{l("off"),p("idle"),_.stop(),D.stop()},[D,_]),A=i==="converse"?Qd(D.state):i==="dictate"?h==="listening"?_.hearing?"speaking":"listening":h:"idle",v=i==="converse"&&D.state!=="listening"&&D.state!=="thinking"&&D.state!=="speaking";return{attachPhoto:async I=>{await D.attachPhoto(I)||u("voicePhotoFailed")},voiceMode:i,voicePhase:A,voiceConnecting:v,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:y,voiceSecondsLeft:D.secondsLeft??null,voiceBlocked:b,liveVoiceName:g,chooseVoice:z,canConverse:re,startVoice:me,stopVoice:H,voice:_,live:D,earlier:be,newVoiceChat:J}}var pt,gc,Qd,fc,kc,vc=Ce(()=>{"use strict";pt=require("react"),gc=require("@akropolys/sdk");Ro();tc();bc();Ot();Qd=e=>e==="connecting"||e==="ended"?"idle":e,fc={turns:[],images:[]},kc=()=>`v${Date.now().toString(36)}`});function tp(e){let r=1;for(;r<Ra.length-1&&Ra[r][0]<e;)r++;let[t,n,a]=Ra[r-1],[s,o,c]=Ra[r],i=s===t?0:(e-t)/(s-t),l=i*i*(3-2*i);return[n+(o-n)*l,a+(c-a)*l]}function wc(e,r,t,n){let a=l=>l.toFixed(2),s=(r+t)/2,o=e+n,c=(s-r)*.55,i=(t-s)*.55;return`C${a(e)} ${a(r+c)} ${a(o)} ${a(s-c)} ${a(o)} ${a(s)}C${a(o)} ${a(s+i)} ${a(e)} ${a(t-i)} ${a(e)} ${a(t)}`}function rp(e,r,t,n,a){let s=Nr(e*t,8,r*.96),o=Nr(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,i=.46,l=Nr((e-s)/e,0,1),h=Nr((e-o)/e,0,1);return`M${c(-e,-r+s)}C${c(-e,-r+s*i)} ${c(-e+s*i,-r)} ${c(-e+s,-r)}C${c(-e*.3*l,-r-2*l)} ${c(e*.3*l,-r-2*l)} ${c(e-s,-r)}C${c(e-s*i,-r)} ${c(e,-r+s*i)} ${c(e,-r+s)}`+wc(e,-r+s,r-o,a)+`C${c(e,r-o*i)} ${c(e-o*i,r)} ${c(e-o,r)}C${c(e*.3*h,r+2*h)} ${c(-e*.3*h,r+2*h)} ${c(-e+o,r)}C${c(-e+o*i,r)} ${c(-e,r-o*i)} ${c(-e,r-o)}`+wc(-e,r-o,-r+s,-a)+"Z"}function Ao(e){let n=(!Fo.includes(e)&&Math.random()<.26?Fo:cn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function sr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Po(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function np(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function Mc({state:e="idle",size:r=40,alert:t=!1,theme:n,feminine:a,accessories:s,onImpact:o,triggerRef:c,dropIn:i=!1}){let l=(0,et.useRef)(i),h=(0,et.useRef)(e);h.current=e;let p=(0,et.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(s?.flower||s?.eyelashes||s?.blush),u=s?.flower??d,f=s?.eyelashes??d,y=s?.blush??d,b=(0,et.useRef)(null),M=(0,et.useRef)(null),g=(0,et.useRef)(null),E=(0,et.useRef)(null),R=(0,et.useRef)(null),z=(0,et.useRef)(null),_=(0,et.useRef)(null),S=(0,et.useRef)(null),W=(0,et.useRef)(null),X=(0,et.useRef)(null),N=(0,et.useRef)(null),P=(0,et.useRef)(null),j=(0,et.useRef)(null),D=(0,et.useRef)(null),re=(0,et.useRef)([]),ge=(0,et.useRef)([]),be=(0,et.useRef)(null),Y=(0,et.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,me=(0,et.useRef)(o);return me.current=o,(0,et.useEffect)(()=>{let J=window.matchMedia("(prefers-reduced-motion: reduce)").matches,H={},A={};yc.forEach(ve=>{H[ve]=No.idle[ve]??Io.idle[ve]??0,A[ve]=0});let v=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),L=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),I=1800,V=-1,T=0,C=2600,m=0,ae=!1,G=9e3+Math.random()*8e3,B=-1,w=0;l.current&&!J&&(B=Zd,w=performance.now()+ep);let k=0,F=0,q=0,oe=4200,de=0,pe=0,ue=0,K=12e3,ne=cn[0],ye=sr(ne.color),Oe=sr(ne.light),we=[...ye],De=[...Oe],$e=2600,Ke=-1/0,Se=!1,ot=0,ct=!1,qt=0,zt=0,nt=0,yr=!1,Ut=0,dr=ve=>{ve-Ke<$e?(ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0):Ke=ve},lt=(ve,ht,Bt,Lt)=>{let St=h.current,Nt=Array.from({length:Hn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),jt=($t,at,It=0)=>{let U=Math.max(4,54*Math.max(.06,ht));Nt[$t]={x:at+Bt,y:-4+Lt+It,w:21,h:U,rx:10.5,a:1}};if(St==="thinking"){let at=ve%2800/2800,It=Math.pow(Math.sin(at*Math.PI*2)*.5+.5,3);for(let U=0;U<4;U++){let ie=ve/700+U/4*Math.PI*2,xe=(26-U%2*5)*(1-.94*It),Q=16+It*6+Math.sin(ve/420+U)*1.4;Nt[U]={x:Math.cos(ie)*xe,y:Math.sin(ie)*xe*.86+2,w:Q,h:Q,rx:Q/2,a:1}}}else if(St==="visualizing")Nt[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(St==="speaking")for(let at=0;at<5;at++){let It=12+Math.abs(Math.sin(ve/150+at*.9))*26;Nt[at]={x:(at-4/2)*15,y:-2,w:9,h:It,rx:4.5,a:1}}else St==="failed"?(jt(0,-22,8),jt(1,22,8)):(jt(0,-22),jt(1,22));return Nt};c&&(c.current=()=>{if(B>=0){ct=!0,ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0;return}B=0,dr(qt),G=qt+4e3});let nr=ve=>{qt=ve;let ht=h.current,Bt=No[ht]??No.idle,Lt=Io[ht]??Io.idle,St=ht==="idle"||ht==="failed";St&&!J&&(ve>C&&(T=(Math.random()-.5)*2,C=ve+1800+Math.random()*3600),H.wantGx=T*5);let Nt=p.current?1:0;nt=(nt+(Nt-zt)*.1)*.88,zt+=nt;let jt=p.current&&!J?Math.sin(ve/480)*.055*zt:0,$t={bw:Bt.bw*(1+zt*.34+jt),bh:Bt.bh*(1+zt*.2+jt),tr:Bt.tr,br:Bt.br,bow:Bt.bow,warm:Lt.warm,wob:Lt.wob,lid:Lt.lid,gx:St&&!J?T*5:0,gy:St&&!J?Math.sin(ve/2600)*2:0};!J&&St&&(V<0&&ve>I&&(V=0),V>=0&&(V+=1/7,$t.lid=Lt.lid*Math.abs(V-.5)*2,V>=1&&(V=-1,$t.lid=Lt.lid,I=ve+(Math.random()<.22?340:2600+Math.random()*4200)))),yc.forEach(Ie=>{let tt=Ie;if(J){H[tt]=$t[tt];return}let Be=tt==="lid"?.42:.11,At=tt==="lid"?.55:.78;A[tt]=(A[tt]+($t[tt]-H[tt])*Be)*At,H[tt]+=A[tt]});let at=0,It=0;!J&&p.current&&B<0&&ve>Ut&&(B=0,Ut=ve+2100,G=ve+4e3),!J&&ht==="idle"?B<0&&ve>G&&(B=0,Se?(Se=!1,ot=0,ne=Ao(ne),we=sr(ne.color),De=sr(ne.light),Ke=-1/0):(ot++,dr(ve))):B<0&&(G=ve+3e3+Math.random()*3e3),B>=0&&(ve>=w&&(B+=1/96),[at,It]=tp(B),B>=1&&(B=-1,at=0,It=0,ct?(ct=!1,ot=0,G=ve+150):!Se&&ot>=2?(Se=!0,G=ve+240):G=ve+5e3+Math.random()*5e3));let U=Math.max(0,at);if(p.current!==yr){yr=p.current;let Ie=p.current?Sc:ne;we=sr(Ie.color),De=sr(Ie.light),p.current&&!J&&(B<0&&(B=0),Ut=ve+2600)}let ie=p.current?Sc:ne;if(J)ye=[...we],Oe=[...De];else for(let Ie=0;Ie<3;Ie++)ye[Ie]+=(we[Ie]-ye[Ie])*.055,Oe[Ie]+=(De[Ie]-Oe[Ie])*.055;let xe=Po(ye),Q=Po(Oe);P.current?.setAttribute("stop-color",xe),j.current?.setAttribute("stop-color",Q),D.current?.setAttribute("stop-color",Q);for(let Ie=0;Ie<4;Ie++){let tt=Cc[Ie]+(op[Ie]-Cc[Ie])*zt;re.current[Ie]?.style.setProperty("stop-color",Po(np(ap[Ie],ye,tt)))}let fe=.34+Math.sin(ve/1200)*.06,he=U>.02?Math.min(.72,fe+U*.34):fe;N.current?.setAttribute("opacity",he.toFixed(3)),U>.04?me.current?.(U,ie.color,ie.glow):Ht>.04&&me.current?.(0,ie.color,ie.glow),Ht=U;let Pe=J?0:Math.sin(ve/1900)*.9*H.wob,Ne=H.bw*(1+at*.55)+Pe*.4,Ye=H.bh*(1-at*.62),kt=rp(Ne,Ye,Nr(H.tr+U*.5,0,1.2),Nr(H.br+U*.9,0,1),H.bow+Pe+U*5);b.current?.setAttribute("d",kt),M.current?.setAttribute("d",kt);let wr=ht==="thinking";wr!==ae&&(ae=wr,be.current?.setAttribute("filter",wr?`url(#${Y}-goo)`:"none"));let Wr=lt(ve,H.lid*(1-U*.85),H.gx,H.gy);for(let Ie=0;Ie<Hn;Ie++){let tt=Wr[Ie],Be=v[Ie],At=L[Ie];for(let Mt of["x","y","w","h","rx","a"]){if(J){Be[Mt]=tt[Mt];continue}At[Mt]=(At[Mt]+(tt[Mt]-Be[Mt])*.16)*.74,Be[Mt]+=At[Mt]}let dt=ge.current[Ie];dt&&(dt.setAttribute("x",(Be.x-Be.w/2).toFixed(2)),dt.setAttribute("y",(Be.y-Be.h/2).toFixed(2)),dt.setAttribute("width",Math.max(0,Be.w).toFixed(2)),dt.setAttribute("height",Math.max(0,Be.h).toFixed(2)),dt.setAttribute("rx",Math.max(0,Math.min(Be.rx,Be.w/2,Be.h/2)).toFixed(2)),dt.setAttribute("opacity",Nr(Be.a,0,1).toFixed(2)))}let Or=J?0:Math.sin(ve/Lt.breath)*1.5;!J&&St&&B<0?(ve>oe&&(q=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),oe=ve+2600+Math.random()*4200),ve>K&&(ue=ue>.1?0:1,K=ve+(ue>.1?900:9e3+Math.random()*11e3))):(q=0,ue=0),F=(F+(q-k)*.028)*.9,k+=F,pe=(pe+(ue-de)*.06)*.82,de+=pe;let bn=H.bh-Ye,fn=k*3.4+de*4.5,jr=k*2.2+de*3,Qn=de*2.4;if(g.current?.setAttribute("transform",`translate(${jr.toFixed(2)} ${(Or+bn-It+Qn).toFixed(2)}) rotate(${fn.toFixed(2)} 0 60)`),E.current&&E.current.setAttribute("transform",`translate(${jr.toFixed(2)} ${(Or+bn-It+Qn).toFixed(2)}) rotate(${fn.toFixed(2)} 0 60)`),u&&R.current){let Ie=-Ne*.62,tt=-Ye*.7,Be=-16+(J?0:Math.sin(ve/1400)*3)+fn*.4;R.current.setAttribute("transform",`translate(${Ie.toFixed(2)}, ${tt.toFixed(2)}) rotate(${Be.toFixed(2)})`)}if(y&&z.current){let Ie=12+H.gy*.5;z.current.setAttribute("transform",`translate(0, ${Ie.toFixed(2)})`)}if(f&&_.current){let Ie=ht!=="thinking"&&ht!=="visualizing"&&ht!=="speaking";_.current.setAttribute("opacity",Ie?Nr(H.lid*1.3,0,1).toFixed(2):"0");let tt=(Be,At)=>{let dt=Math.max(1,Math.min(Be.w,Be.h)/2),Mt=Be.y-Be.h/2+dt,Jn="";for(let[Zn,Gr]of[[20,7],[48,8],[76,6.5]]){let Cr=Zn*Math.PI/180,Wa=Be.x+At*Math.sin(Cr)*dt,Oa=Mt-Math.cos(Cr)*dt,ja=Be.x+At*Math.sin(Cr)*(dt+Gr),Sr=Mt-Math.cos(Cr)*(dt+Gr)-1.5,Ga=Be.x+At*Math.sin(Cr-.22)*(dt+Gr*.65),Va=Mt-Math.cos(Cr-.22)*(dt+Gr*.65);Jn+=` M ${Wa.toFixed(2)} ${Oa.toFixed(2)} Q ${Ga.toFixed(2)} ${Va.toFixed(2)} ${ja.toFixed(2)} ${Sr.toFixed(2)}`}return Jn.trim()};S.current?.setAttribute("d",tt(v[0],-1)),W.current?.setAttribute("d",tt(v[1],1))}m=requestAnimationFrame(nr)},Ht=0;return m=requestAnimationFrame(nr),()=>cancelAnimationFrame(m)},[u,f,y,d]),(0,Re.jsxs)("svg",{className:"hsk-kiku-avatar",width:r,height:r,viewBox:"-100 -100 200 200","aria-hidden":"true",style:{display:"block",overflow:"visible"},children:[(0,Re.jsxs)("defs",{children:[(0,Re.jsx)("linearGradient",{id:`${Y}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((J,H)=>(0,Re.jsx)("stop",{ref:A=>{re.current[H]=A},offset:`${J}%`,style:{stopColor:`var(--hsk-marble-${H+1}, #FAF7F2)`}},J))}),(0,Re.jsxs)("linearGradient",{id:`${Y}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{ref:P,offset:"0%",stopColor:cn[0].color,stopOpacity:"0.9"}),(0,Re.jsx)("stop",{ref:j,offset:"45%",stopColor:cn[0].light,stopOpacity:"0.5"}),(0,Re.jsx)("stop",{ref:D,offset:"100%",stopColor:cn[0].light,stopOpacity:"0"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Re.jsxs)("linearGradient",{id:`${Y}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Re.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Re.jsxs)("radialGradient",{id:`${Y}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Re.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Re.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Re.jsx)("clipPath",{id:`${Y}-skin`,children:(0,Re.jsx)("use",{href:`#${Y}-body`})}),(0,Re.jsxs)("filter",{id:`${Y}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Re.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Re.jsx)("feColorMatrix",{in:"b",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"})]}),(0,Re.jsxs)("mask",{id:`${Y}-cut`,children:[(0,Re.jsx)("path",{ref:M,d:"",fill:"#FFFFFF"}),(0,Re.jsx)("g",{ref:be,children:Array.from({length:Hn},(J,H)=>(0,Re.jsx)("rect",{ref:A=>{ge.current[H]=A},fill:"#000000"},H))})]})]}),(0,Re.jsxs)("g",{ref:g,mask:`url(#${Y}-cut)`,children:[(0,Re.jsx)("path",{id:`${Y}-body`,ref:b,d:"",fill:`url(#${Y}-marble)`}),(0,Re.jsxs)("g",{clipPath:`url(#${Y}-skin)`,children:[(0,Re.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${Y}-sheen)`}),(0,Re.jsx)("rect",{ref:N,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${Y}-contact)`,opacity:"0.45"})]})]}),(0,Re.jsxs)("g",{ref:E,style:{pointerEvents:"none"},children:[y&&(0,Re.jsxs)("g",{ref:z,children:[(0,Re.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`}),(0,Re.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${Y}-blush-cheek)`})]}),f&&(0,Re.jsxs)("g",{ref:_,children:[(0,Re.jsx)("path",{ref:S,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("path",{ref:W,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Re.jsxs)("g",{ref:R,className:"hsk-avatar-flower",children:[(0,Re.jsx)("path",{d:"M 0 0 C -12 -7 -15 5 0 0 Z",fill:"#10B981",transform:"translate(6, 4) rotate(-35)"}),[0,72,144,216,288].map(J=>(0,Re.jsx)("path",{d:"M 0 0 C -6 -13 6 -13 0 0 Z",fill:`url(#${Y}-hibiscus-petal)`,stroke:"#FF2A5F",strokeWidth:"0.6",transform:`rotate(${J-18})`},J)),(0,Re.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Re.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Re.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var et,Re,No,Io,Ra,Zd,ep,Hn,yc,Nr,cn,Fo,km,ap,Cc,op,Sc,Tc=Ce(()=>{"use strict";et=require("react"),Re=require("react/jsx-runtime"),No={idle:{bw:50,bh:60,tr:1,br:.42,bow:3},thinking:{bw:46,bh:46,tr:1,br:1,bow:2},visualizing:{bw:64,bh:42,tr:.42,br:.42,bow:2},speaking:{bw:44,bh:54,tr:.9,br:.9,bow:3},failed:{bw:53,bh:45,tr:.95,br:.55,bow:4},curious:{bw:48,bh:52,tr:.9,br:.7,bow:3},welcoming:{bw:50,bh:58,tr:1,br:.5,bow:2},guiding:{bw:46,bh:50,tr:.8,br:.8,bow:2},happy:{bw:52,bh:56,tr:1,br:.4,bow:4},focused:{bw:48,bh:52,tr:.9,br:.7,bow:2}},Io={idle:{lid:1,warm:0,breath:2100,wob:1},thinking:{lid:1,warm:.2,breath:1700,wob:1.6},visualizing:{lid:1,warm:.9,breath:1200,wob:2.2},speaking:{lid:1,warm:.35,breath:900,wob:1.8},failed:{lid:.28,warm:0,breath:3e3,wob:.6},curious:{lid:1,warm:.15,breath:1800,wob:1.4},welcoming:{lid:1,warm:.25,breath:1600,wob:1.2},guiding:{lid:1,warm:.2,breath:1500,wob:1.3},happy:{lid:1,warm:.4,breath:1200,wob:1.5},focused:{lid:1,warm:.2,breath:1500,wob:1.2}},Ra=[[0,0,0],[.09,.54,0],[.19,-.36,32],[.31,-.22,58],[.42,-.12,68],[.54,.04,28],[.63,.96,0],[.71,.18,0],[.79,-.16,20],[.88,.34,0],[.95,-.05,4],[1,0,0]],Zd=.42,ep=170;Hn=6,yc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Nr=(e,r,t)=>Math.max(r,Math.min(t,e));cn=[{name:"Graphite",color:"#4B5058",light:"#A8AEB6",glow:"rgba(75, 80, 88, 0.26)"},{name:"Mist",color:"#78868F",light:"#BFC9CF",glow:"rgba(120, 134, 143, 0.26)"},{name:"Sandstone",color:"#8A7E71",light:"#CBC1B5",glow:"rgba(138, 126, 113, 0.26)"},{name:"Pewter",color:"#5F6670",light:"#B3BAC3",glow:"rgba(95, 102, 112, 0.26)"}],Fo=[{name:"Aegean",color:"#2E6FB7",light:"#9CC1E6",glow:"rgba(46, 111, 183, 0.30)"},{name:"Fern",color:"#3C8C60",light:"#A2CFB4",glow:"rgba(60, 140, 96, 0.30)"},{name:"Marigold",color:"#C48A22",light:"#EBD095",glow:"rgba(196, 138, 34, 0.30)"},{name:"Coral",color:"#C15A4E",light:"#E9AEA3",glow:"rgba(193, 90, 78, 0.30)"},{name:"Iris",color:"#5F5CC4",light:"#B6B4E8",glow:"rgba(95, 92, 196, 0.30)"}],km=[...cn,...Fo];ap=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],Cc=[.05,.15,.42,.74],op=[.52,.72,.9,1],Sc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"}});function Ea({className:e="",compact:r=!1}){let[t,n]=(0,_o.useState)(()=>ua()),[a,s]=(0,_o.useState)(""),o=()=>{let c=!t;Ps(c),n(c),tr(c?"reply":"interrupt",!0),s(_s())};return(0,_t.jsxs)("button",{type:"button",className:le("hsk-cb-sound-pill",r&&"is-compact",t&&"is-on",a&&a!=="running"&&a!=="off"&&"is-blocked",e),onClick:o,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[(0,_t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,_t.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,_t.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,_t.jsxs)(_t.Fragment,{children:[(0,_t.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,_t.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,_t.jsx)("span",{children:t?"Sounds":"Muted"})]})}var _o,_t,Do=Ce(()=>{"use strict";_o=require("react");Tt();Jr();_t=require("react/jsx-runtime")});function pp(e,r,t,n){let a=3*e,s=3*(t-e)-a,o=1-a-s,c=3*r,i=3*(n-r)-c,l=1-c-i,h=u=>((o*u+s)*u+a)*u,p=u=>((l*u+i)*u+c)*u,d=u=>(3*o*u+2*s)*u+a;return u=>{let f=u;for(let y=0;y<8;y++){let b=h(f)-u,M=d(f);if(Math.abs(b)<1e-5||Math.abs(M)<1e-6)break;f-=b/M}return p(za(f))}}function mp(e){let r=e.getBoundingClientRect();return{top:r.top,left:r.left,width:r.width,height:r.height,radius:Math.min(parseFloat(getComputedStyle(e).borderTopLeftRadius)||0,r.height/2)}}function Rc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:s}){let o=(0,Xt.useRef)(null),c=(0,Xt.useRef)(null),i=(0,Xt.useRef)(!1),l=(0,Xt.useRef)(0),h=(0,Xt.useRef)(null),p=(0,Xt.useRef)(s);p.current=s;let d=(0,Xt.useCallback)(g=>{l.current=g;let E=e(),R=o.current,z=c.current;if(!E||!R||!z)return;let _=1-g,S=Math.min(Math.max(R.top,z.top),z.bottom-R.height),W=Math.min(Math.max(R.left,z.left),z.right-R.width),X=(R.top-S)*_,N=(R.left-W)*_,P=Math.max(0,(S-z.top)*_),j=Math.max(0,(W-z.left)*_),D=Math.max(0,(z.right-W-R.width)*_),re=Math.max(0,(z.bottom-S-R.height)*_),ge=R.radius*_+n*g;E.style.clipPath=`inset(${P}px ${D}px ${re}px ${j}px round ${ge}px)`,E.style.translate=N||X?`${N}px ${X}px`:"";let be=t?.();be&&Object.assign(be.style,{left:`${j}px`,top:`${P}px`,width:`${Math.max(0,z.width-j-D)}px`,height:`${Math.max(0,z.height-P-re)}px`,borderRadius:`${ge}px`,translate:E.style.translate}),E.style.setProperty("--hsk-island-content",String(za((g-lp)/hp)));let Y=String(za(g/dp));E.style.opacity=Y,be&&(be.style.opacity=Y)},[e,t,n]),u=()=>{let g=e();if(g)for(let R of["clip-path","translate","--hsk-island-content","opacity"])g.style.removeProperty(R);let E=t?.();if(E)for(let R of["left","top","width","height","border-radius","translate","opacity"])E.style.removeProperty(R)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},y=(g,E,R)=>{f();let z=l.current,_=Math.max(cp,E*Math.abs(g-z)),S=performance.now(),W=X=>{let N=za((X-S)/_);d(z+(g-z)*up(N)),N<1?h.current=requestAnimationFrame(W):(h.current=null,R())};d(z),h.current=requestAnimationFrame(W)},b=(g,E)=>{o.current=mp(E),g.style.clipPath="",g.style.translate="",c.current=g.getBoundingClientRect()};return(0,Xt.useLayoutEffect)(()=>{if(!a)return;let g=e(),E=r();if(!(!g||!E))return i.current=!1,g.style.removeProperty("pointer-events"),b(g,E),l.current=0,y(1,sp,u),()=>{f(),u()}},[a]),{close:(0,Xt.useCallback)(()=>{let g=e(),E=a?r():null,R=E?.getBoundingClientRect(),z=R&&R.bottom>0&&R.top<window.innerHeight;if(!g||!E||!z){p.current();return}let _=h.current!==null?l.current:1;b(g,E),i.current=!0,g.style.pointerEvents="none",l.current=_,y(0,ip,()=>p.current())},[a,e,r])}}var Xt,sp,ip,cp,lp,hp,dp,za,up,Ec=Ce(()=>{"use strict";Xt=require("react"),sp=300,ip=220,cp=120,lp=.45,hp=.4,dp=.25,za=e=>Math.min(1,Math.max(0,e));up=pp(.32,.72,0,1)});function Lc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:s=!1,themeMenuOpen:o=!1,themeMenuClosing:c=!1,onThemeMenuClosed:i,isNarrow:l=!1,currentTheme:h="dark",onJumpToLatest:p,onReset:d,onClose:u,onToggleThemeMenu:f,onSelectTheme:y,themeAttr:b,below:M}){let g=zr(),E=Qe.default.useRef(null),R=Qe.default.useRef(null),z=Qe.default.useRef(null),_=Qe.default.useRef(null),[S]=Qe.default.useState(()=>{let m=!zc;return zc=!0,m});Qe.default.useLayoutEffect(()=>{let m=E.current,ae=_.current,G=R.current;if(!m||!ae||!G)return;let B=ae.offsetParent;if(!B)return;let w=B.offsetTop+ae.offsetTop+ae.offsetHeight/2;m.style.setProperty("--hsk-tray-top",`${w}px`),m.style.setProperty("--hsk-tray-head",`${ae.offsetHeight/2+8}px`),m.style.setProperty("--hsk-tray-h",`${G.offsetHeight}px`),m.style.setProperty("--hsk-tray-w",`${G.offsetWidth}px`)},[o,l]);let[W]=Qe.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[X,N]=Qe.default.useState(!1);Qe.default.useEffect(()=>{if(!l||X)return;let m=window.requestIdleCallback,ae=m?m(()=>N(!0),{timeout:1200}):setTimeout(()=>N(!0),600);return()=>{let G=window.cancelIdleCallback;m&&G?G(ae):clearTimeout(ae)}},[l,X]);let P=l&&(o||X),j=Rc({target:Qe.default.useCallback(()=>R.current,[]),trigger:Qe.default.useCallback(()=>_.current,[]),shadow:Qe.default.useCallback(()=>z.current,[]),radius:18,enabled:l&&o&&W,onClosed:()=>i?.()});Qe.default.useEffect(()=>{l&&c&&j.close()},[c,l]);let[D,re]=Qe.default.useState(!1),[ge,be]=Qe.default.useState("#134e3d"),[Y,me]=Qe.default.useState("rgba(19, 78, 61, 0.45)"),J=Qe.default.useRef(void 0),H=Qe.default.useRef(null),A=Qe.default.useRef(!1),v=Qe.default.useRef(0),L=Qe.default.useCallback(()=>{A.current=!1,v.current=Date.now(),H.current=setTimeout(()=>{if(A.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}f?.()},350)},[f]),I=Qe.default.useCallback(()=>{H.current&&(clearTimeout(H.current),H.current=null)},[]),V=Qe.default.useCallback(()=>{H.current&&(clearTimeout(H.current),H.current=null)},[]),T=Qe.default.useCallback(m=>{if(A.current){A.current=!1,m.preventDefault(),m.stopPropagation();return}s?p?.():l?f?.():J.current?.()},[s,l,p,f]),C=Qe.default.useCallback((m,ae,G)=>{m>.04?(re(!0),be(ae),me(G)):re(!1)},[]);return(0,Ue.jsxs)("div",{ref:E,className:le("hsk-cb-topbar",l&&o&&"is-docked"),children:[(0,Ue.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:l&&(0,Ue.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:u,"aria-label":g("back"),children:(0,Ue.jsx)("span",{className:"hsk-cb-back-icon",children:(0,Ue.jsx)(en,{})})})}),(0,Ue.jsxs)("div",{className:le("hsk-cb-topbar-mark",l&&o&&"is-oozing"),"data-impacting":D?"true":"false",style:{"--hsk-contact-color":ge,"--hsk-contact-glow":Y},"data-unread":a?"true":"false",onTouchStart:L,onTouchEnd:I,onTouchMove:V,onTouchCancel:V,onClick:T,role:"button",tabIndex:0,"aria-label":s?g("jumpToLatest"):`${e} (tap for themes)`,children:[(0,Ue.jsx)(Mc,{state:n,size:34,theme:h,alert:a,onImpact:C,triggerRef:J,dropIn:S}),r?(0,Ue.jsx)("img",{ref:_,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,Ue.jsx)("span",{ref:_,className:"hsk-cb-topbar-name",children:e})]}),(0,Ue.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,Ue.jsx)("button",{className:"hsk-cb-topbar-btn",onClick:d,children:g("clearChat")}),!l&&(0,Ue.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:u,"aria-label":"Close Chat",children:(0,Ue.jsx)(Zr,{})})]}),l&&o&&(0,Ue.jsx)("div",{className:le("hsk-cb-topbar-scrim",c&&"is-closing"),onClick:f,"aria-hidden":"true"}),P&&(0,Ue.jsx)("div",{className:le("hsk-cb-tray-shadow",!o&&"is-parked"),"aria-hidden":"true",children:(0,Ue.jsx)("div",{ref:z})}),P&&(0,Ue.jsx)("div",{ref:R,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",W&&"is-island",!o&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:m=>m.stopPropagation(),onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:(0,Ue.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,Ue.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,Ue.jsx)(Ea,{compact:!0}),(0,Ue.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,Ue.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,Ue.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:rn.map(({id:m,label:ae,Icon:G})=>(0,Ue.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",h===m&&"is-active"),onClick:B=>{B.stopPropagation(),y?.(m)},children:[(0,Ue.jsx)(G,{}),(0,Ue.jsx)("span",{children:ae})]},m))})]})}),l&&o&&M&&(0,Ue.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:M})]})}var Qe,Ue,zc,Nc=Ce(()=>{"use strict";Qe=Zt(require("react"));Ot();Wt();po();Tc();Do();Tt();Ec();Ue=require("react/jsx-runtime"),zc=!1});function Pc(e,r,t,n,a,s=0){let o=[];for(let l=0;l<16;l++){let h=l/16*Math.PI*2,p=1+Math.sin(l*2.3+1.7)*.06+Math.sin(l*5.1)*.03+Un(e.n,l)*.02;o.push([r+Math.cos(h+s)*n*p,t+Math.sin(h+s)*a*p])}let c=(l,h)=>[(l[0]+h[0])/2,(l[1]+h[1])/2],{ctx:i}=e;i.beginPath(),i.moveTo(...c(o[15],o[0]));for(let l=0;l<16;l++)i.quadraticCurveTo(o[l][0],o[l][1],...c(o[l],o[(l+1)%16]));i.closePath()}function Aa(e,r){let{ctx:t,dpr:n}=e;t.shadowColor=`rgba(0,0,0,${.5-r*.22})`,t.shadowBlur=(4+r*14)*n,t.shadowOffsetX=(1.5+r*13)*n,t.shadowOffsetY=(2.5+r*17)*n}function Go(e,r,t,n){let a=e.ctx.createRadialGradient(r-n*.35,t-n*.4,0,r,t,n*1.15);return a.addColorStop(0,e.light),a.addColorStop(.35,e.clay),a.addColorStop(1,e.dark),a}function gp(e,r,t){let n=e.ctx.createLinearGradient(0,r-t/2,0,r+t/2);return n.addColorStop(0,e.clay),n.addColorStop(.25,e.light),n.addColorStop(.5,e.clay),n.addColorStop(1,e.dark),n}function Br(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Aa(e,t),n.fillStyle=Go(e,Dt,ut,a),Pc(e,Dt,ut,a,a,e.n*.03),n.fill(),n.restore()}function Ho(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Na,n),a.clip()),Aa(e,0),a.fillStyle=Go(e,Dt,ut,Math.max(r,t)),Pc(e,Dt,ut,r,t),a.fill(),a.restore()}function La(e,r,t,n,a,s=a/2,o=a/2){let{ctx:c}=e;c.save(),Aa(e,0),c.fillStyle=gp(e,n,a),c.beginPath(),c.roundRect(r+Un(e.n,r)*.6,n-a/2+Un(e.n,n)*.6,t-r,a,[s,o,o,s]),c.fill(),c.restore()}function Wo(e,r,t,n,a=0){let{ctx:s}=e,o=n*(1+a*.2);s.save(),Aa(e,a),s.fillStyle=Go(e,r,t,o),s.beginPath(),s.arc(r,t,o,0,Math.PI*2),s.fill(),s.restore(),s.save(),s.strokeStyle=e.dark,s.lineWidth=1.4,s.lineCap="round",s.beginPath();for(let c=0;c<=1.001;c+=.04){let i=c*Math.PI*5+r*.3,l=(1.5+c*(n-4))*(1+a*.2),h=r+Math.cos(i)*l,p=t+Math.sin(i)*l;c===0?s.moveTo(h,p):s.lineTo(h,p)}s.stroke(),s.restore()}function Ia(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=`rgba(${e.ink},${.55*r})`,t.lineWidth=2,t.lineCap="round";for(let n=0;n<7;n++){let a=n/7*Math.PI*2+.14,s=38+(1-r)*8,o=n%2?5:8;t.beginPath(),t.moveTo(Dt+Math.cos(a)*s,ut+Math.sin(a)*s),t.lineTo(Dt+Math.cos(a)*(s+o),ut+Math.sin(a)*(s+o)),t.stroke()}t.restore()}function xp(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,ut-dn/2+2),t.lineTo(r+Un(e.n,r)*1.5,ut+dn/2-2),t.stroke(),t.restore()}function Bn(e,r,t=-1,n=-1){for(let a=0;a<rr;a++){let s=0;for(let i=0;i<r;i++)s+=a<=i?-2:2;let o=Oo(a)+s,c=Oo(a+1)+s;a===n?Wo(e,ir((o+c)/2,jo(a),.5),ut-4,Uo,.5):a<=t?Wo(e,jo(a),ut,Uo):La(e,o,c,ut,dn,a===0?dn/2:2,a===rr-1?dn/2:2)}}function vp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Br(a,br)});let r=[[br,br,34,38],[34,38,44,48],[44,48,ln,hn]];for(let[n,a,s,o]of r){for(let c=0;c<3;c++){let i=(c+1)/3,l=c===0?1.05:1;e.push({hold:1,thump:c===0?.25:void 0,draw:h=>Ho(h,ir(n,s,i),ir(a,o,i)*l)})}e.push({hold:1,draw:c=>Ho(c,s,o)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,s=ir(ut+hn,ut-hn,a),o=ir(8,24,a),c=(s-ut)/hn;t=Math.max(t,2*ln*Math.sqrt(Math.max(0,1-c*c)),30);let i=t;e.push({draw:l=>{a<1&&Ho(l,ln,hn,s-o*.3),La(l,Dt-i/2,Dt+i/2,s,o)}})}for(let n of[.5,1])e.push({draw:a=>La(a,Dt-ln,Dt+ln,ir(ut-hn,ut,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,s=ir(2*ln,qo,a),o=ir(24,dn,a),c=n%2?2:-2;e.push({draw:i=>La(i,Dt-s/2+c,Dt+s/2+c,ut,o)})}for(let n=1;n<rr;n++)e.push({draw:a=>{Bn(a,n-1),xp(a,Oo(n))}}),e.push({thump:.35,draw:a=>Bn(a,n)});e.push({draw:n=>Bn(n,rr-1)});for(let n=0;n<rr;n++)e.push({thump:.12,draw:a=>Bn(a,rr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>Bn(a,rr-1,rr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let s=0;s<rr;s++)Wo(a,ir(jo(s),Dt,n),ut,ir(Uo,10,n),.4)}});return e.push({thump:1,draw:n=>{Br(n,br*1.3),Ia(n,1)}}),e.push({draw:n=>{Br(n,br*1.12),Ia(n,.4)}}),e.push({draw:n=>Br(n,br*1.04)}),e}function Bo(e,r){let t=document.createElement("span");t.style.display="none",t.style.color=r,e.parentElement?.appendChild(t);let n=getComputedStyle(t).color;return t.remove(),n}function Fc({phase:e,label:r,theme:t}){let n=qn.default.useRef(null),a=qn.default.useRef(null),s=qn.default.useRef({n:0,at:0,held:0,entered:!1,last:$n[0]});return qn.default.useEffect(()=>{let o=n.current,c=a.current,i=o?.getContext("2d");if(!o||!i||!c)return;let l=Math.min(window.devicePixelRatio||1,3);o.width=Na*l,o.height=$o*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:i,dpr:l,n:0,clay:Bo(o,h),light:Bo(o,`color-mix(in srgb, ${h} 55%, white)`),dark:Bo(o,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(o).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=s.current,u=(E,R=1)=>{i.setTransform(l,0,0,l,0,0),i.clearRect(0,0,Na,$o),i.globalAlpha=R,p.n=d.n++,E.draw(p),i.globalAlpha=1},f=E=>{let R=o.getBoundingClientRect();wi({x:R.left+R.width/2,y:R.top+R.height/2,strength:E}),c.style.translate="0 1px",c.style.rotate=`${Un(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){u($n[0]);return}let y=e==="exit"?null:e==="enter"&&!d.entered?Ic:$n;y&&(d.at=0);let b=0,M=0,g=()=>{if(c.style.translate="",c.style.rotate="",!y){b===0&&f(.6),u(d.last,Ac[b]),++b>=Ac.length&&clearInterval(M);return}let E=y[d.at];u(E),d.last=E,E.thump&&d.held===0&&f(E.thump),!(y===$n&&++d.held<(E.hold??fp))&&(d.held=0,!(++d.at<y.length)&&(y===Ic&&(d.entered=!0),y=$n,d.at=0))};return g(),M=window.setInterval(g,bp),()=>clearInterval(M)},[e==="exit",t]),(0,Wn.jsxs)("div",{className:"hsk-clay",children:[(0,Wn.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Wn.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var qn,Wn,bp,fp,Na,$o,Dt,ut,br,ln,hn,qo,dn,rr,Uo,kp,ir,Un,Oo,jo,$n,Ic,Ac,_c=Ce(()=>{"use strict";qn=Zt(require("react"));zn();Wn=require("react/jsx-runtime"),bp=83,fp=2,Na=240,$o=160,Dt=Na/2,ut=$o/2,br=24,ln=50,hn=56,qo=124,dn=22,rr=6,Uo=13,kp=30,ir=(e,r,t)=>e+(r-e)*t,Un=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;Oo=e=>Dt-qo/2+qo*e/rr;jo=e=>Dt+(e-(rr-1)/2)*kp;$n=vp(),Ic=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Br(r,br,e)})),{thump:.7,draw:e=>{Br(e,br*1.24),Ia(e,1)}},{draw:e=>{Br(e,br*1.08),Ia(e,.4)}}],Ac=[1,.7,.35,0]});function yp(){return(0,ce.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,ce.jsx)("svg",{viewBox:"0 0 16 16",children:(0,ce.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Dc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:s,awaitingEntityLang:o,awaitingConsent:c,termsAgreed:i,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:y,t:b,tNode:M,chooseLanguage:g,langSwitching:E=!1,isLangPreparing:R,onPrewarmLanguage:z,chooseEntityLang:_,agreeTerms:S,handleSend:W}){let X=h||l,N=!X||X.toLowerCase()==="english"||X.toLowerCase()==="en",P=R??(E||!!h||!!l&&!u&&!N),j=Dr(X),[D,re]=fr.default.useState(P),[ge,be]=fr.default.useState(()=>P?"spinner-steady":"idle"),Y=fr.default.useRef([]),me=()=>{Y.current.forEach(clearTimeout),Y.current=[]};P!==D&&(re(P),me(),P?(be("step1-exit"),Y.current.push(setTimeout(()=>be("spinner-enter"),280)),Y.current.push(setTimeout(()=>be("spinner-steady"),960))):(be("spinner-exit"),Y.current.push(setTimeout(()=>be("idle"),460)))),fr.default.useEffect(()=>()=>me(),[]);let J=ge==="spinner-enter"||ge==="spinner-steady"||ge==="spinner-exit",H=ge==="step1-exit",A=J||H||!l||a?"1":!p||s?"2":!d||o?"3":!i||c?"4":null,[v,L]=fr.default.useState(null),[I,V]=fr.default.useState(3);fr.default.useEffect(()=>{if(!c)return;V(3);let C=setInterval(()=>{V(m=>m<=1?(clearInterval(C),0):m-1)},1e3);return()=>clearInterval(C)},[c]);let T=l?Ln(l,y)||l.charAt(0).toUpperCase()+l.slice(1):"";return fr.default.useEffect(()=>{if(a&&z){let C=typeof window<"u"?window.requestIdleCallback:void 0,m=C?C(()=>z("Urdu"),{timeout:2e3}):setTimeout(()=>z("Urdu"),500);return()=>{C&&typeof window<"u"?window.cancelIdleCallback?.(m):clearTimeout(m)}}},[a,z]),(0,ce.jsx)("div",{className:"hsk-cb-empty",children:(0,ce.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[A&&(0,ce.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,ce.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[A," / 4"]})}),J?(0,ce.jsx)("div",{className:le("hsk-lang-loader",ge==="spinner-enter"&&"hsk-lang-loader--enter",ge==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,ce.jsx)(Fc,{theme:e,phase:ge==="spinner-exit"?"exit":ge==="spinner-enter"?"enter":"steady",label:j.preparing})},"spinner-loading"):H||a||!l?(0,ce.jsxs)("div",{className:le("hsk-cb-hello-wrap",H&&"hsk-step1-exit"),children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,ce.jsxs)("div",{className:"hsk-cb-lang-chips",children:[wa.map((C,m)=>(0,ce.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":m},lang:C.tag,dir:C.rtl?"rtl":"ltr",disabled:E,onPointerEnter:()=>!E&&z?.(C.value),onPointerDown:()=>!E&&z?.(C.value),onClick:()=>!E&&g(C.value),children:C.native},C.value)),(0,ce.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":wa.length},children:"or type another one"})]})]},"step-lang"):s||!p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):o?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:M("entityLangIntro",{lang:T})}),(0,ce.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((C,m)=>(0,ce.jsxs)("button",{type:"button",role:"radio","aria-checked":(v??d)===C,className:le("hsk-cb-entlang-opt",(v??d)===C&&"is-selected"),style:{"--hsk-opt-idx":m},onClick:()=>L(C),children:[(0,ce.jsx)(yp,{}),(0,ce.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:C==="translated"?M("inLanguage",{lang:T}):b("asWritten")}),(0,ce.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:b(C==="translated"?"detailsTranslated":"namesAsWritten")})]})]},C))}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",v&&"is-active"),disabled:!v,onClick:()=>v&&_(v),children:b("continueButton")})})]},"step-entity-lang"):c?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,ce.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,ce.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,ce.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,ce.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),(0,ce.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),(0,ce.jsxs)("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",(0,ce.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,ce.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,ce.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",I===0&&"is-active"),disabled:I>0,onClick:S,children:I>0?b("termsAgreeCounting",{seconds:String(I)}):b("termsAgreeButton")})})]},"step-terms"):t?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("allSet",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?M("replyingTranslated",{lang:T}):M("replyingOriginal",{lang:T})})]},"step-completed"):p?(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsx)("h2",{className:"hsk-cb-hello",children:M("greetReturning",{name:p})}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):(0,ce.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,ce.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,ce.jsx)("b",{children:"kiku"}),"."]}),(0,ce.jsx)("p",{className:"hsk-cb-hello-lead",children:"Ask me to find, show or save anything. I look through this whole website for you."})]},"step-initial"),!r&&(f?.length??0)>0&&(0,ce.jsx)("div",{className:"hsk-cb-chips",children:f.map((C,m)=>(0,ce.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":m},onClick:()=>W(C),children:C},C))})]})})}var fr,ce,Hc=Ce(()=>{"use strict";fr=Zt(require("react"));Tt();Ot();_c();ce=require("react/jsx-runtime")});function Pa(e){let r=e.match(/<\s*thinking\s*>/i);if(!r)return{thinking:"",content:e,isComplete:!0};let t=r.index??0,n=r[0].length,a=t+n,s=e.slice(0,t),o=e.slice(a),c=o.match(/<\/\s*thinking\s*>/i);if(!c)return{thinking:o,content:s,isComplete:!1};let i=c.index??0,l=c[0].length;return{thinking:o.slice(0,i),content:s+o.slice(i+l),isComplete:!0}}function wp(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Bc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let s=zr(),o=(0,qr.useRef)(Date.now()),[c,i]=(0,qr.useState)(()=>r?null:0),[l,h]=(0,qr.useState)(!r);(0,qr.useEffect)(()=>{if(r){c!==null&&(i(Math.max(1,Math.round((Date.now()-o.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{i(Math.round((Date.now()-o.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let p=t??c,d=a!=null?s("repliedIn",{duration:wp(a)}):n==="with_team"?s("withTeam"):n==="back_with_kiku"?s("backWithKiku"):n==="team_closed"?s("teamClosed"):n==="team_joined"?s("teamJoined"):n==="reaching_team"?r?s("passedToTeam"):`${s("reachingTeam")}\u2026`:r?p!=null?s("thoughtForSeconds",{duration:`${p}s`}):s("thoughtProcess"):`${s("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return(0,$r.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&On(n)&&"hsk-cb-think--note"),children:[(0,$r.jsxs)("button",{type:"button",className:le("hsk-cb-think-head",!u&&"hsk-cb-think-head--static"),onClick:u?()=>h(f=>!f):void 0,"aria-expanded":u?l:void 0,children:[(0,$r.jsx)("span",{children:d}),u&&(0,$r.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,$r.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var qr,$r,On,Fa=Ce(()=>{"use strict";qr=require("react");Tt();Ot();$r=require("react/jsx-runtime");On=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined"});function jn(e,r){let[t,n]=(0,cr.useState)(!1),a=(0,cr.useRef)(null),s=(0,cr.useRef)(r);s.current=r,(0,cr.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let o=(0,cr.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),s.current()},e))},[e]),c=(0,cr.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),s.current()},[]);return{closing:t,requestClose:o,closeNow:c}}var cr,Vo=Ce(()=>{"use strict";cr=require("react")});function Mp(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function _a(e,r=1){let t=0,n=0;for(let a of e.replace(Sp," "))Cp.test(a)&&(Mp(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Cp,Sp,Ko=Ce(()=>{"use strict";Cp=/\p{L}/u,Sp=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g});function Gn(e){let r=String(e??"").trim();return Uc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}function Wc(e){if(Pp.test(e))return!0;if(typeof location>"u")return!1;try{let r=new URL(e,location.href);return/^https?:$/.test(r.protocol)&&(r.host===location.host||!!Yo?.has(r.host))}catch{return!1}}function $c(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function qc(e){let r=e.trim();return r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1)),r.split("|").map(t=>t.trim())}function Bp({children:e}){let r=Ur.default.useRef(null),[t,n]=Ur.default.useState("none"),[a,s]=Ur.default.useState(!1),o=Ur.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Ur.default.useCallback(()=>{let p=r.current;if(!p)return;if(!(p.scrollWidth>p.clientWidth+2)){n("none");return}let u=getComputedStyle(p).direction==="rtl",f=Math.abs(p.scrollLeft),y=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(y?u?"right":"left":b?u?"left":"right":"middle")},[]);Ur.default.useEffect(()=>{c();let p=r.current;if(!p)return;let d=typeof ResizeObserver<"u"?new ResizeObserver(c):null;return d?.observe(p),()=>d?.disconnect()},[c]);let i=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(o.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},s(!0))},l=p=>{if(!o.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-o.current.startX)*1.5;Math.abs(f)>3&&(o.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=o.current.scrollLeft-f)},h=()=>{o.current.isDown=!1,s(!1)};return(0,qe.jsx)("div",{ref:r,className:`hsk-table-wrapper hsk-table-wrapper--${t}${a?" is-dragging":""}`,onScroll:c,onMouseDown:i,onMouseMove:l,onMouseUp:h,onMouseLeave:h,children:e})}function Oc(e,r=!1,t){Yo=t??null;try{return $p(e,r)}finally{Yo=null}}function $p(e,r){let t=e.split(`
|
|
36
36
|
`);if(r&&t.length>0){!e.endsWith(`
|
|
37
|
-
`)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Sp.test(h))&&(t.length=l)}let n=(l,h)=>Ra(l,r&&h===t.length-1?15:1),a=[],o=[],i=0,c=()=>{o.length>0&&(a.push((0,We.jsx)("div",{className:"hsk-cb-ai-text",children:o},`text-bubble-${i++}`)),o=[])},s=0;for(;s<t.length;){let l=t[s],h=`md-line-${s}`;if(!l.trim()){s++;continue}let d=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(d){c();let p=d[1],k=d[2];Ic(k)&&a.push((0,We.jsx)("div",{className:"hsk-markdown-img-block",children:(0,We.jsx)("img",{src:k,alt:p||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:g=>{g.target.style.display="none"}})},h)),s++;continue}let u=l.match(/^(#{1,3})\s+(.*)/);if(u){let p=u[1].length,k=`h${p+3}`;o.push((0,We.jsx)(k,{className:`hsk-markdown-h${p}`,dir:n(u[2],s),children:cr(u[2],h)},h)),s++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let p=[],k="";for(;s<t.length&&t[s].match(/^[\s]*[-*+•]\s+/);){let g=t[s].replace(/^[\s]*[-*+•]\s+/,"");k+=g+" ",p.push((0,We.jsx)("li",{children:cr(g,`li-${s}`)},`li-${s}`)),s++}o.push((0,We.jsx)("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(k,s-1),children:p},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let p=[],k="";for(;s<t.length&&t[s].match(/^[\s]*\d+[\.\)]\s+/);){let g=t[s].replace(/^[\s]*\d+[\.\)]\s+/,"");k+=g+" ",p.push((0,We.jsx)("li",{children:cr(g,`li-${s}`)},`li-${s}`)),s++}o.push((0,We.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(k,s-1),children:p},`ol-${h}`));continue}if(zc(l,!1)){c();let p=[],k=[],g=[],b=!0;for(;s<t.length&&zc(t[s],!0);){let E=t[s].trim();if(E.match(/^\|?[-:| ]+\|?$/)&&E.includes("-")){g=Lc(E).map(B=>{let X=B.trim(),T=X.startsWith(":"),P=X.endsWith(":");return T&&P?"center":P?"end":"start"}),s++,b=!1;continue}let F=Lc(E);b&&p.length===0?p=F:k.push(F),s++}let z=Math.max(p.length,...k.map(E=>E.length)),f=[];for(let E=0;E<z;E++)if(g[E])f[E]=g[E];else if(E===0)f[E]="start";else{let F=k.filter(C=>{let B=(C[E]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(B)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(B)}).length;f[E]=F>=Math.ceil(k.length/2)?"end":"start"}let N=p.length>0?(0,We.jsx)("tr",{children:p.map((E,F)=>(0,We.jsx)("th",{style:{textAlign:f[F]||"start"},children:(0,We.jsx)("bdi",{children:cr(E,`th-${h}-${F}`)})},`th-${h}-${F}`))},`tr-head-${h}`):null,M=k.map((E,F)=>(0,We.jsx)("tr",{children:E.map((C,B)=>(0,We.jsx)("td",{className:C.trim().startsWith("\u2713")?"hsk-md-ok":C.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:f[B]||"start"},children:(0,We.jsx)("bdi",{children:cr(C,`td-${h}-${F}-${B}`)})},`td-${h}-${F}-${B}`))},`tr-body-${h}-${F}`));a.push((0,We.jsx)(Mp,{children:(0,We.jsxs)("table",{className:"hsk-markdown-table",children:[N&&(0,We.jsx)("thead",{children:N}),(0,We.jsx)("tbody",{children:M})]})},`table-wrapper-${h}`));continue}o.push((0,We.jsx)("p",{className:"hsk-markdown-p",dir:n(l,s),children:cr(l,h)},h)),s++}return c(),(0,We.jsx)(We.Fragment,{children:a})}var Dr,We,pp,up,mp,bp,fp,kp,gp,xp,vp,Nc,Uo,yp,wp,Cp,cr,Sp,Pc=Se(()=>{"use strict";Dr=Ut(require("react"));qo();We=require("react/jsx-runtime"),pp=/[ \t]{2,}/g,up=/ ([.,!?:;])/g,mp=/\(([ \t]+)/g,bp=/([ \t]+)\)/g,fp=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,kp=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,gp=/^!\[([^\]]*)\]\(([^)]+)\)$/,xp=/^\[([^\]]+)\]\(([^)]+)\)$/,vp=/^(data:image|blob):/i,Nc=/^(https?|mailto|tel):/i;Uo=null;yp=/memory|mimi/i,wp=/mimi\.akropolys/i,Cp=e=>e&&e.replace(pp," ").replace(up,"$1").replace(mp,"(").replace(bp,")").replace(fp,"$1 $2"),cr=(e,r)=>Cp(e).split(kp).map((a,o)=>{if(!a)return null;let i=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,We.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},i);if(a.startsWith("**")&&a.endsWith("**"))return(0,We.jsx)("strong",{children:cr(a.slice(2,-2),i)},i);let c=a.match(gp);if(c){let l=c[1],h=c[2];return Ic(h)?(0,We.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:d=>{d.target.style.display="none"}},i):null}let s=a.match(xp);if(s){let l=s[1],h=s[2];return yp.test(l)||wp.test(h)?null:Nc.test(h)||h.startsWith("/")?(0,We.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:cr(l,i)},i):(0,We.jsx)("span",{children:cr(l,i)},i)}return a}),Sp=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/});function Rp(e){let[,r]=(0,Dn.useState)(0),t=JSON.stringify(e);return(0,Dn.useEffect)(()=>(0,ft.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Dn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(ft.getLiveValue)}function Np({record:e,now:r}){let t=(0,ft.isStale)(e,r),n=e.fields,a=Ep.find(s=>n[s]),o=a?n[a]:e.key,i=o.length>38?o.slice(0,36)+"\u2026":o,c=Object.entries(n).filter(([s,l])=>s!==a&&l!==""&&l.length<=Lp&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,zp).map(([s,l])=>({label:(0,ft.labelFor)(s),value:(0,ft.formatLiveValue)(l),rawKey:s}));return(0,yt.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,yt.jsx)("div",{className:"hsk-live-card__top",children:(0,yt.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,yt.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,yt.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,ft.describeAge)(r-e.at)}`:`Live \xB7 ${(0,ft.describeAge)(r-e.at)}`})]})}),(0,yt.jsx)("div",{className:"hsk-live-card__body",children:(0,yt.jsx)("span",{className:"hsk-live-card__title",title:o,children:i})}),(0,yt.jsx)("div",{className:"hsk-live-card__pills",children:c.map(s=>{let l=(0,ft.isFresh)(e,s.rawKey,r);return(0,yt.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${ft.LIVE_FLASH_MS}ms`}:void 0,children:[(0,yt.jsx)("span",{className:"hsk-live-pill__label",children:s.label}),(0,yt.jsx)("span",{className:"hsk-live-pill__value",children:s.value})]},s.rawKey)})})]})}function Fc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=Rp(t);if(t.filter((c,s)=>n[s]).length===0)return null;let o=n.filter(c=>!!c),i=Date.now();return(0,yt.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,yt.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,yt.jsx)(Np,{record:c,now:i},c.key))})})}var Dn,ft,yt,Ep,zp,Lp,_c=Se(()=>{"use strict";Dn=require("react"),ft=require("@akropolys/sdk"),yt=require("react/jsx-runtime");Ep=["title","name","label","headline","subject"],zp=8,Lp=40});function Ip({src:e,alt:r,onImageClick:t}){let[n,a]=(0,Vt.useState)(!1);return n?(0,He.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--hsk-chat-source-bg, rgba(0,0,0,.04))",color:"var(--hsk-chat-muted, #888)"},children:(0,He.jsx)(vr,{})}):(0,He.jsx)("img",{src:e,alt:r??"",onError:()=>a(!0),onClick:t?o=>{o.stopPropagation(),t(e)}:void 0})}function za({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let i=(0,Ea.useAkropolysContext)(),c=(0,Ea.useCardFields)(),s=(0,Vt.useRef)(null),[l,h]=(0,Vt.useState)(!1),[d,u]=(0,Vt.useState)(!1),[p,k]=(0,Vt.useState)(0),g=e.filter(C=>C.id&&n.includes(C.id)),b=g.filter(C=>C.swatch),z=g.filter(C=>!C.swatch),f=(0,Vt.useCallback)(()=>{let C=s.current;if(!C||z.length===0)return;let B=Math.abs(C.scrollLeft),X=C.scrollWidth-C.clientWidth;h(B>10),u(X>4&&B<X-12);let P=Math.round(B/190);k(Math.min(Math.max(0,P),z.length-1))},[z.length]);(0,Vt.useEffect)(()=>{f();let C=s.current;if(!C)return;let B=new ResizeObserver(f);return B.observe(C),C.addEventListener("scroll",f,{passive:!0}),()=>{B.disconnect(),C.removeEventListener("scroll",f)}},[f,e]);let N=C=>{let B=s.current;if(!B)return;let X=getComputedStyle(B).direction==="rtl";B.scrollBy({left:190*C*(X?-1:1),behavior:"smooth"})},M=()=>N(1),E=()=>N(-1);if(z.length===0&&b.length===0)return null;let F=b.length>0&&(0,He.jsx)("div",{className:"hsk-cb-swatch-grid",children:b.map((C,B)=>(0,He.jsxs)("button",{type:"button",className:de("hsk-cb-swatch",C.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${B*40}ms`},onClick:C.target?void 0:()=>r?.(C),children:[(0,He.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:C.swatch}}),(0,He.jsx)("span",{className:"hsk-cb-swatch-name",children:C.target?o:C.name}),(0,He.jsx)("span",{className:"hsk-cb-swatch-code",children:C.swatch})]},C.id??B))});return z.length===0?F||null:(0,He.jsxs)(He.Fragment,{children:[F,(0,He.jsxs)("div",{className:de("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[l&&(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,He.jsx)("button",{className:"hsk-cb-sources-prev",onClick:E,"aria-label":"Previous",children:(0,He.jsx)(aa,{})})]}),(0,He.jsx)("div",{className:"hsk-cb-sources",ref:s,children:z.map((C,B)=>{let X=!!(C.id&&n.includes(C.id));return(0,He.jsxs)("div",{className:de("hsk-cb-source",X&&"hsk-cb-source--referenced"),style:{animationDelay:`${B*50}ms`},onClick:()=>r?.(C),children:[C.image?(0,He.jsx)("div",{className:"hsk-cb-src-imgwrap",style:{position:"relative"},children:(0,He.jsx)(Ip,{src:C.image,alt:C.name,onImageClick:t})}):(0,He.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",style:{position:"relative"},children:(0,He.jsx)(vr,{})}),(0,He.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,He.jsx)("div",{className:"hsk-cb-src-name",children:C.name}),Wt(C,c).slice(0,2).map(T=>(0,He.jsx)("div",{className:"hsk-cb-src-detail",children:T.value},T.label))]})]},C.id??B)})}),d&&(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,He.jsx)("button",{className:"hsk-cb-sources-next",onClick:M,"aria-label":"See more",children:(0,He.jsx)(oa,{})})]}),z.length>1&&(0,He.jsx)("div",{className:"hsk-cb-carousel-dots",children:z.map((C,B)=>(0,He.jsx)("div",{className:de("hsk-cb-dot-item",B===p&&"hsk-cb-dot-item--active"),onClick:()=>{let X=s.current;if(X){let T=getComputedStyle(X).direction==="rtl";X.scrollTo({left:B*190*(T?-1:1),behavior:"smooth"})}}},B))})]})]})}var Vt,Ea,He,Wo=Se(()=>{"use strict";Vt=require("react"),Ea=require("@akropolys/sdk");dn();vt();Dt();He=require("react/jsx-runtime")});function Dc({intent:e,sources:r,onSend:t,loading:n}){let a=wr();if(!e)return null;let o=[],i=r[0]?.name??"",c=r.slice(0,2).map(s=>s.name);if(e==="search"&&r.length>0){if(c.length>=2&&o.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),i){let s=i.split(" ").slice(0,3).join(" ");o.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:s}),query:a("pillMoreOnQuery",{name:i})})}}else e==="compare"&&r.length>0?(i&&o.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:i})}),o.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?i&&o.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:i})}):e==="general"&&(o.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),o.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return o.length===0?null:(0,Bn.jsx)("div",{className:"hsk-action-pills",children:o.map(s=>(0,Bn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(s.query),disabled:n,children:[(0,Bn.jsx)("span",{className:"hsk-pill-emoji",children:s.emoji}),s.label]},s.query))})}var Bn,Bc=Se(()=>{"use strict";It();Bn=require("react/jsx-runtime")});function Ap(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function Pp(e,r){kt.default.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let i=document.createRange();i.selectNodeContents(t);let c=Array.from(i.getClientRects()),s=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!s.width)return;let l=s.width/t.offsetWidth,h=getComputedStyle(t),d=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),u=Math.max(...c.map(k=>k.right))-Math.min(...c.map(k=>k.left)),p=Math.ceil(u/l)+1;p+d<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?p+d:p}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function qc({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:i,isNarrow:c,loading:s,streaming:l,stopped:h,interrupted:d,sources:u,referencedIds:p,discussedSources:k,lastIntent:g,lastAction:b,vizState:z,setVizState:f,setLightboxSrc:N,setMarkupSrc:M,handleSend:E,handleSourceClick:F,onRetry:C,onEdit:B,onLongPress:X,hasError:T,retrying:P,t:G,messageRef:D,photosSending:Y,workingOn:xe,doodleTheme:se}){let V=(0,Hc.useAkropolysContext)()?.api,te=V?.siteId??"",O=Ap([V?.apiUrl,...(t?u:e.sources??[]).flatMap(j=>[j.image,j.url])]),_=e.role==="user",J=e.content,[S,L]=kt.default.useState(!1),A=kt.default.useRef(null);Pp(A,e.content);let K=kt.default.useRef(null),x=kt.default.useRef(null),R=kt.default.useRef(!1),m=kt.default.useCallback(j=>{let Z=_?".hsk-cb-user-bubble":".hsk-cb-ai-text";return j.matches?.(Z)?j:j.querySelector(Z)||j},[_]),ae=kt.default.useCallback(j=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{if(X){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let Z=m(j),we=Z.getBoundingClientRect();X(e,{top:we.top,left:we.left,width:we.width,height:we.height},_,Z),R.current=!0}x.current=null},420)},[e,_,X,m]),q=kt.default.useCallback(j=>{if(j.touches.length!==1)return;let Z=j.touches[0];K.current={x:Z.clientX,y:Z.clientY},R.current=!1,ae(j.currentTarget)},[ae]),H=kt.default.useCallback(j=>{if(!K.current||!x.current)return;let Z=j.touches[0];Math.hypot(Z.clientX-K.current.x,Z.clientY-K.current.y)>8&&(clearTimeout(x.current),x.current=null)},[]),w=kt.default.useCallback(j=>{x.current&&(clearTimeout(x.current),x.current=null),K.current=null,R.current&&j.cancelable&&j.preventDefault()},[]),y=kt.default.useCallback(j=>{if(!X||(j.preventDefault(),R.current))return;let Z=m(j.currentTarget),we=Z.getBoundingClientRect();X(e,{top:we.top,left:we.left,width:we.width,height:we.height},_,Z)},[e,_,X,m]);kt.default.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);let I=kt.default.useCallback(j=>{if(j)try{navigator.clipboard.writeText(j),L(!0),setTimeout(()=>L(!1),2e3)}catch{}},[]),U=kt.default.useMemo(()=>Ma(J),[J]),ce=e.thinking||U.thinking,ge=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,me=ge.test(U.content),ue=me?U.content.replace(ge,"").trimEnd():U.content;return(0,oe.jsx)("div",{className:de("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",i&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":_?"user":"assistant",ref:D,children:_?(0,oe.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,oe.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((j,Z)=>(0,oe.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>N(j),children:[(0,oe.jsx)("img",{src:j,alt:`attachment ${Z+1}`,className:"hsk-cb-user-img-thumb"}),(0,oe.jsx)(Vr,{active:Y,seed:te,theme:se}),Z===3&&e.images.length>4&&(0,oe.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},Z))}),e.content&&(0,oe.jsxs)("div",{ref:A,className:de("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",T&&"hsk-cb-user-bubble--error"),onTouchStart:q,onTouchMove:H,onTouchEnd:w,onTouchCancel:w,onContextMenu:y,dir:Ra(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,oe.jsx)(mn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,oe.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,oe.jsxs)("div",{className:"hsk-cb-msg-actions",children:[C&&(T||n)&&(0,oe.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>C(e),"aria-label":G("retry"),children:[(0,oe.jsx)(un,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,oe.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("retry")})]}),B&&(0,oe.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>B(e),"aria-label":G("edit"),children:[(0,oe.jsx)(ca,{size:11}),(0,oe.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("edit")})]}),(0,oe.jsxs)("button",{type:"button",className:de("hsk-cb-msg-action hsk-cb-msg-action--copy",S&&"hsk-cb-msg-action--copied"),onClick:()=>I(e.content),"aria-label":G(S?"copied":"copy"),children:[S?(0,oe.jsx)(zr,{size:11}):(0,oe.jsx)(Er,{size:11}),(0,oe.jsx)("span",{className:"hsk-cb-msg-action-label",children:G(S?"copied":"copy")})]})]}),n&&!T&&(0,oe.jsx)("span",{className:"hsk-cb-sent-status",children:G(h||d?"statusStopped":"statusSent")}),T&&(0,oe.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,oe.jsx)("span",{className:"hsk-cb-failed-dot"}),G("msgFailed")]})]})]}):(0,oe.jsx)("div",{className:de("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,oe.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:q,onTouchMove:H,onTouchEnd:w,onTouchCancel:w,onContextMenu:y,children:[(()=>{let j=e.thoughtForSeconds!=null||ue.length>0||!(t&&(l||s));return(0,oe.jsxs)(oe.Fragment,{children:[!e.spoken&&(ce||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Pn(e.statusStage)||t&&(l||s))&&(0,oe.jsx)(Ec,{text:ce,isComplete:j,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,oe.jsx)("div",{className:"hsk-cb-think",children:(0,oe.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,oe.jsx)(mn,{size:11}),(0,oe.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),ue&&(0,oe.jsx)("div",{className:"hsk-cb-ai-content",children:(0,oe.jsx)($c,{content:ue,streaming:t&&l,hosts:O})}),me&&(0,oe.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:G("calcDisclaimer")})]})})(),e.visualizing&&(0,oe.jsx)("div",{className:"hsk-cb-viz",children:(0,oe.jsxs)("div",{className:de("hsk-cb-viz--working",!xe&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||G("vizWorking"),children:[xe&&(0,oe.jsx)("img",{src:xe,alt:""}),(0,oe.jsx)(Vr,{active:!0,seed:te,theme:se})]})}),e.visualization&&(0,oe.jsxs)("div",{className:"hsk-cb-viz",children:[(0,oe.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,oe.jsx)("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):(0,oe.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:z[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>f(j=>({...j,[e.visualization]:"ok"})),onError:()=>f(j=>({...j,[e.visualization]:"err"}))}),z[e.visualization]==="err"&&(0,oe.jsx)("div",{className:"hsk-cb-viz-broken",children:G("vizUnavailable")}),t&&!l&&z[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,oe.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>M(e.visualization),children:[(0,oe.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,oe.jsx)("path",{d:"M12 20h9"}),(0,oe.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),G("vizMarkEdit")]})]}),(0,oe.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?G("vizDisclaimerVideo"):G("vizDisclaimerImage")})]}),!_&&(e.knowledgeImages?.length??0)>0&&(0,oe.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(j=>(0,oe.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,oe.jsx)("div",{className:"hsk-cb-kimg-grid",children:j.images.map((Z,we)=>(0,oe.jsx)("img",{src:Z.url,alt:Z.note||j.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>N(Z.url),onError:$e=>{$e.target.style.display="none"}},we))}),(j.title||j.images[0]?.note)&&(0,oe.jsx)("div",{className:"hsk-cb-kimg-caption",children:j.title||j.images[0]?.note})]},j.entryId))}),!_&&(0,oe.jsx)(Fc,{keys:e.liveKeys}),!_&&(e.staleNotices?.length??0)>0&&(0,oe.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,oe.jsx)("div",{className:"hsk-cb-stale-title",children:G("staleTitle")}),e.staleNotices.map((j,Z)=>(0,oe.jsxs)("div",{className:"hsk-cb-stale-item",children:[j.state==="removed"?G("staleRemoved",{title:j.title}):G("staleUnavailable",{title:j.title}),j.reason&&(0,oe.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",j.reason]})]},Z))]}),(()=>{let j=t?p:e.referencedIds??[],Z=t?u:e.sources??[],we=t?g:e.intent,$e=we==="compare"||we==="capture"||we==="capture_all"||we==="delete"||we==="view_history";return j.length>0&&!$e&&(!t||b?.type!=="request_kiku_key")&&(0,oe.jsx)(za,{sources:Z,onSelectSource:F,onImageClick:N,referencedIds:j,compact:!!e.visualization,targetLabel:G("swatchTarget")})})(),t&&!s&&!l&&b?.type==="open_memory"&&_n(b.url)&&(0,oe.jsxs)("a",{className:"hsk-cb-memory-pill",href:_n(b.url),target:"_blank",rel:"noopener noreferrer",children:[G("openMemory"),(0,oe.jsx)(Ps,{})]}),t&&!s&&_n(b?.url)&&b?.type!=="open_memory"&&(0,oe.jsx)("div",{className:"hsk-action-pills",children:(0,oe.jsxs)("a",{className:"hsk-action-pill",href:_n(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!s&&(0,oe.jsx)(Dc,{intent:g,sources:k,onSend:E,loading:s}),!_&&a&&!l&&ue&&(0,oe.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,oe.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,oe.jsxs)("button",{type:"button",className:de("hsk-cb-msg-action hsk-cb-msg-action--copy",S&&"hsk-cb-msg-action--copied"),onClick:()=>I(ue),"aria-label":G(S?"copied":"copy"),children:[S?(0,oe.jsx)(zr,{size:11}):(0,oe.jsx)(Er,{size:11}),(0,oe.jsx)("span",{className:"hsk-cb-msg-action-label",children:G(S?"copied":"copy")})]}),t&&(T||ue.includes("We're experiencing high demand right now"))&&C&&(0,oe.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>C(e),"aria-label":G("retry"),children:[(0,oe.jsx)(un,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,oe.jsx)("span",{className:"hsk-cb-msg-action-label",children:G("retry")})]})]})})]})})})}var kt,Hc,oe,$c,Uc=Se(()=>{"use strict";kt=Ut(require("react")),Hc=require("@akropolys/sdk");vt();Pc();qo();_c();xn();Ta();Wo();Bc();Dt();oe=require("react/jsx-runtime"),$c=kt.default.memo(({content:e,streaming:r,hosts:t})=>(0,oe.jsx)(oe.Fragment,{children:Ac(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);$c.displayName="MarkdownBlock"});function Wc({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,Ve.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ve.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ve.jsx)(vr,{})}),(0,Ve.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ve.jsx)("div",{className:"hsk-cb-ai-text",children:(0,Ve.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,Ve.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,Ve.jsx)("input",{type:"text",className:"hsk-cb-phone-input",placeholder:o("keyPastePlaceholder"),value:e,onChange:i=>r(i.target.value),onKeyDown:i=>i.key==="Enter"&&n(),autoFocus:!0}),(0,Ve.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,Ve.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,Ve.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function Oc({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,Ve.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ve.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ve.jsx)(vr,{})}),(0,Ve.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ve.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,Ve.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,Ve.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,Ve.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,Ve.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,Ve.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,Ve.jsx)("code",{children:e}),(0,Ve.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,Ve.jsx)(zr,{}):(0,Ve.jsx)(Er,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,Ve.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var Ve,Gc=Se(()=>{"use strict";Dt();Ve=require("react/jsx-runtime")});function Fp(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function Vc({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,stopped:h,interrupted:d,halted:u,haltedEmpty:p,error:k,errorCode:g,keyPhase:b,keyInput:z,setKeyInput:f,mintedKey:N,setMintedKey:M,setMintedPub:E,minting:F,copied:C,keyCountdown:B,handleUseExistingKey:X,handleCreateKey:T,copyValue:P,queuedMessage:G,sendQueuedNow:D,setLightboxSrc:Y,setMarkupSrc:xe,handleSend:se,handleSourceClick:V,onRetry:te,onEdit:O,onLongPress:_,retrying:J,continueGenerating:S,t:L,spacerRef:A,vizState:K,setVizState:x,messages:R,doodleTheme:m}){return(0,rt.jsxs)(rt.Fragment,{children:[(()=>{let ae=-1;for(let q=e.length-1;q>=0;q--)if(e[q]?.role==="user"){ae=q;break}return e.map((q,H)=>{let w=H===e.length-1,y=q.role==="user",I=y&&H===ae,U=e[H+1]?.role!==q.role,ce=!U,ge=e[H-1]?.role===q.role,me=q.id||`${q.role}-${H}`,ue=e[H+1]?.content??"",j=I&&(n||a)&&!Ma(ue).content.trim(),Z=q.visualizing?Fp(e,H):void 0,we=I&&!!k||!y&&w&&!!k||!y&&!!q.content?.includes("We're experiencing high demand right now");return(0,rt.jsx)(qc,{msg:q,idx:H,isLast:w,isLastUser:I,isRunEnd:U,runMid:ce,runCont:ge,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:d,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,vizState:K,setVizState:x,setLightboxSrc:Y,setMarkupSrc:xe,handleSend:se,handleSourceClick:V,onRetry:te,onEdit:O,onLongPress:_,hasError:we,retrying:J,t:L,messageRef:$e=>{r.current[H]=$e},photosSending:j,workingOn:Z,doodleTheme:m},me)})})(),u&&R.length>0&&(0,rt.jsxs)("div",{className:de("hsk-cb-stopped",p&&"hsk-cb-stopped--empty"),children:[p&&(0,rt.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{})]}),(0,rt.jsx)("span",{className:"hsk-cb-stopped-label",children:L(h?"stoppedByYou":"stoppedInterrupted")}),(0,rt.jsxs)("button",{className:"hsk-cb-continue",onClick:S,children:[(0,rt.jsx)(Fs,{}),L(R[R.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),k&&(0,rt.jsx)("div",{className:"hsk-cb-error",children:xi({code:g??void 0,message:k},L)}),b==="prompt_key"&&(0,rt.jsx)(Wc,{keyInput:z,setKeyInput:f,minting:F,handleUseExistingKey:X,handleCreateKey:T,t:L}),N&&(0,rt.jsx)(Oc,{mintedKey:N,copied:C,keyCountdown:B,onDismiss:()=>{M(null),E(null)},copyValue:P,t:L}),G&&(0,rt.jsx)("div",{className:de("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,rt.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,rt.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:G.content}),(0,rt.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:D,children:[(0,rt.jsx)("span",{className:"hsk-cb-queued-dot"}),L("queuedWaiting"),(0,rt.jsx)("span",{className:"hsk-cb-queued-now",children:L("queuedSendNow")})]})]})}),(0,rt.jsx)("div",{ref:A,className:"hsk-cb-msgs-spacer"})]})}var rt,jc=Se(()=>{"use strict";vt();Dt();It();Uc();Ta();Gc();rt=require("react/jsx-runtime")});function Go(e){if(!e)return[];if(Dp.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function Kc({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=La}){if(!t)return null;let i=e||r||"";if(!i)return null;let c=a!==void 0?a:n,s=i.length>26,l=s?i.match(/\S+\s*/g)??[i]:Go(i),h=Math.max(l.length-1,1),d=i.length>44?"3":s?"2":"1";return(0,Oo.jsx)("div",{className:"hsk-animated-placeholder","data-fit":d,dir:"auto","aria-hidden":"true",children:l.map((u,p)=>(0,Oo.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${_p+p*o}ms`,"--hsk-ph-hue":`${Math.round(p/h*300)}`},children:u},`${i}|${c}|${p}`))})}var Oo,La,_p,Dp,Yc=Se(()=>{"use strict";Oo=require("react/jsx-runtime"),La=16,_p=110,Dp=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/});function Xc({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:i,captureAllowed:c,discussedSources:s,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:d,handleKikuViewHistory:u,handleKikuDelete:p,attachments:k,removeAttachment:g,chromeLoading:b,inputLocked:z,langSwitching:f=!1,imageInputRef:N,handleImageFiles:M,enableVision:E,enableVoice:F,canConverse:C,startVoice:B,voiceBlocked:X,textareaRef:T,classNames:P={},handleInput:G,handleKeyDown:D,voice:Y,voicePhase:xe,activePlaceholder:se,loading:V,streaming:te,stop:O,handleSend:_,voiceError:J,setVoiceError:S,t:L,rail:A,notice:K,onOpenMimi:x}){let R=(0,Na.useAkropolysContext)(),m=(0,Na.useCardFields)(),[ae,q]=wt.default.useState(0),[H,w]=wt.default.useState(!1);wt.default.useEffect(()=>{if(!J)return;let ve=setTimeout(()=>{S?.("")},6e3);return()=>clearTimeout(ve)},[J,S]),wt.default.useEffect(()=>{if(!H)return;let ve=_e=>{_e.key==="Escape"&&w(!1)};return window.addEventListener("keydown",ve),()=>window.removeEventListener("keydown",ve)},[H]);let y=se||"Ask me anything\u2026",I=(0,wt.useRef)(null),[U,ce]=(0,wt.useState)(()=>y.length>26);(0,wt.useEffect)(()=>{let ve=I.current;if(!ve||r)return;let _e=()=>{let et=ve.querySelectorAll(".hsk-animated-placeholder__char");if(et.length<2)return ce(!1);let ye=et[0].offsetTop,at=et[et.length-1].offsetTop;ce(at-ye>et[0].offsetHeight/2)};_e();let Oe=new ResizeObserver(_e);return Oe.observe(ve),()=>Oe.disconnect()},[y,r]);let ge=Math.max(Go(y).length-1,0)*La,[me,ue]=(0,wt.useState)(!1),j=(0,wt.useRef)(null),Z=()=>{j.current&&clearTimeout(j.current),ue(!0),j.current=setTimeout(()=>{ue(!1),j.current=null},550)};(0,wt.useEffect)(()=>()=>{j.current&&clearTimeout(j.current)},[]);let we=(0,wt.useRef)(null),$e=!!K;return(0,wt.useEffect)(()=>{we.current?.toggleAttribute("inert",$e)},[$e]),(0,Q.jsxs)("div",{className:"hsk-cb-input-wrap",children:[H&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>w(!1)}),(0,Q.jsx)("div",{className:"hsk-cb-toolsheet-wrap",children:(0,Q.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[E&&(0,Q.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),N.current?.click()},disabled:V,children:[(0,Q.jsx)(eo,{}),(0,Q.jsx)("span",{children:L("attachImage")})]}),F&&C&&(0,Q.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),X?S?.(L("errAccountRequired")):B("converse")},disabled:V||b,children:[(0,Q.jsx)(to,{}),(0,Q.jsx)("span",{children:L("voiceModeStart")})]}),x&&(0,Q.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:x,children:[(0,Q.jsx)(ia,{}),(0,Q.jsx)("span",{children:"MiMi"})]})]})})]}),K,(0,Q.jsxs)("div",{className:"hsk-cb-input-card",ref:we,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,Q.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-sub",children:L("captureAndRemember")}),(0,Q.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(ve=>ve.replace(/^@kiku\s*/i,"")),a(!1),i(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,Q.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:ve=>ve.preventDefault(),children:[o&&c&&(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Q.jsx)(vr,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,Q.jsxs)(Q.Fragment,{children:[s.map((ve,_e)=>(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(ve),a(!1)},children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:ve.image?(0,Q.jsx)("img",{src:ve.image,alt:""}):(0,Q.jsx)(sa,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:ve.name}),Wt(ve,m)[0]&&(0,Q.jsx)("span",{className:"hsk-cb-docked-option-detail",children:Wt(ve,m)[0].value})]},ve.id??_e)),s.length>1&&(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(s),a(!1)},children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Q.jsx)(sa,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureAll",{count:String(s.length)})})]}),s.length===0&&(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Q.jsx)(sa,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureCurrentPage")})]}),(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Q.jsx)(_s,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("whatHaveYouSaved")})]}),(0,Q.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(),a(!1)},children:[(0,Q.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Q.jsx)(Ds,{})}),(0,Q.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("deleteThis")})]})]})]}),k.length>0&&(0,Q.jsx)("div",{className:"hsk-cb-img-strip",children:k.map((ve,_e)=>(0,Q.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,Q.jsx)("img",{src:ve.thumb||ve.data,alt:`attachment ${_e+1}`,className:"hsk-cb-img-thumb"}),(0,Q.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>g(_e),"aria-label":"Remove image",children:(0,Q.jsx)(Ks,{size:10})})]},_e))}),(0,Q.jsxs)("div",{className:de("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ae%2?"b":"a","data-tools":H?"open":"closed",style:{"--hsk-text-sweep":`${ge}ms`},children:[(0,Q.jsx)("input",{ref:N,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:ve=>{M(ve.target.files),ve.target.value=""}}),(E||F&&C)&&(0,Q.jsx)("button",{className:de("hsk-cb-tools-toggle",H&&"hsk-cb-tools-toggle--open"),onClick:()=>w(ve=>!ve),disabled:V||b,"aria-label":H?"Close options":"More options","aria-expanded":H,children:(0,Q.jsx)(Bs,{})}),(0,Q.jsx)(Q.Fragment,{children:E&&(0,Q.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>N.current?.click(),disabled:V,"aria-label":"Attach image",children:(0,Q.jsx)(eo,{})})}),(0,Q.jsxs)("div",{className:"hsk-cb-field",ref:I,"data-ph-lines":!r&&U?"2":void 0,children:[(0,Q.jsx)("textarea",{ref:T,value:r,onChange:G,onKeyDown:D,rows:1,placeholder:"",className:de("hsk-cb-textarea",P.input),"aria-label":se,disabled:z||V&&!te||f}),(0,Q.jsx)(Kc,{placeholder:se,visible:!r,staggerMs:La,replaySeed:ae})]}),F&&C&&(0,Q.jsx)("button",{className:de("hsk-cb-voice-mode-btn",X&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>X?S?.(L("errAccountRequired")):B("converse"),disabled:V||b,"aria-label":"Voice conversation",children:(0,Q.jsx)(to,{})}),(V||te)&&!me?(0,Q.jsx)("button",{className:de("hsk-cb-send","hsk-cb-send--stop",P.sendButton),onClick:O,"aria-label":"Stop generating",children:(0,Q.jsx)(As,{})}):(0,Q.jsxs)("button",{className:de("hsk-cb-send",me&&"is-launching",P.sendButton),onClick:()=>{Z(),_()},disabled:f||z||b||!r.trim()&&k.length===0,"aria-label":"Send message",children:[(0,Q.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,Q.jsx)("defs",{children:(0,Q.jsxs)("filter",{id:e,children:[(0,Q.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,Q.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),(0,Q.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,Q.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,Q.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,Q.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,Q.jsx)("span",{className:"hsk-cb-send-kite",children:(0,Q.jsx)(qs,{})})]})]})]})]}),X?(0,Q.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>S?.(""),children:[(0,Q.jsx)("span",{children:L("errAccountRequired")}),(0,Q.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ve=>{ve.stopPropagation(),S?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):J&&(0,Q.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>S?.(""),children:[(0,Q.jsx)("span",{children:L(J)}),(0,Q.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ve=>{ve.stopPropagation(),S?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var wt,Na,Q,Qc=Se(()=>{"use strict";wt=Ut(require("react")),Na=require("@akropolys/sdk");vt();dn();Dt();Yc();Q=require("react/jsx-runtime")});function Jc(e,r){let t=e.match(/-?[\d.]+/g);return!t||t.length<3?r:[Number(t[0]),Number(t[1]),Number(t[2])]}function Bp(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function Jr(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}function Zc({phase:e,level:r,spectrum:t,bins:n,className:a}){let o=(0,$t.useRef)(null),i=(0,$t.useRef)(e),c=(0,$t.useRef)(r),s=(0,$t.useRef)(t),l=(0,$t.useRef)(n);return(0,$t.useEffect)(()=>{i.current=e},[e]),(0,$t.useEffect)(()=>{c.current=r},[r]),(0,$t.useEffect)(()=>{s.current=t},[t]),(0,$t.useEffect)(()=>{l.current=n},[n]),(0,$t.useEffect)(()=>{let h=o.current;if(!h)return;let d=h.getContext("2d");if(!d)return;let u=getComputedStyle(h),p=Jc(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),k=Jc(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),g=0,b=0,z=0,f=()=>{let te=Math.min(window.devicePixelRatio||1,3),O=h.getBoundingClientRect();b=Math.max(1,O.width),z=Math.max(1,O.height),h.width=Math.round(b*te),h.height=Math.round(z*te),d.setTransform(te,0,0,te,0,0)};f();let N=typeof ResizeObserver<"u"?new ResizeObserver(f):null;N?.observe(h),window.addEventListener("resize",f);let M=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,E=new Float32Array(lr),F=[],C=null,B=-1,X=null,T=0,P=0,G=performance.now(),D=(te,O,_,J)=>te+(O-te)*(O>te?_:J),Y=()=>{let te=s.current,O=l.current?.()??0;if(!te||!O||((!X||X.length!==O)&&(X=new Uint8Array(O)),!te(X)))return!1;let J=Math.max(lr,Math.floor(O*Hp))/lr;for(let S=0;S<lr;S++){let L=Math.floor(S*J),A=Math.max(L+1,Math.floor((S+1)*J)),K=0;for(let R=L;R<A;R++)K+=X[R];let x=K/(A-L)/255;E[S]=D(E[S],x,M?.2:.55,M?.06:.14)}return!0},xe=(te,O)=>{for(let _=0;_<lr;_++){let J=_/(lr-1),S=Math.pow(1-J,1.6)*(.75+.25*Math.sin(te*3.1+_*.7));E[_]=D(E[_],S*O,.3,.12)}},se=te=>{let O=Math.min(lr-1,Math.max(0,te*(lr-1))),_=Math.floor(O),J=O-_,S=E[_],L=E[Math.min(lr-1,_+1)];return S+(L-S)*J*J*(3-2*J)},V=te=>{g=requestAnimationFrame(V);let O=(te-G)/1e3,_=i.current,J=Math.min(1,c.current());T=D(T,Math.max(_==="speaking"?.42:_==="listening"?.3:_==="thinking"?.28:.12,J),M?.1:.5,M?.05:.11),Y()||xe(O,Math.max(.25,T)),d.clearRect(0,0,b,z);let L=z/2;P=_==="thinking"?(P+.012)%1.6:0;let A=3;if(B!==b){F=[];for(let R=0;R<A;R++){let m=R/(A-1||1),ae=Bp(p,k,m*.5),q=d.createLinearGradient(0,0,b,0);q.addColorStop(0,Jr(ae,0)),q.addColorStop(.5,Jr(ae,.9-m*.35)),q.addColorStop(1,Jr(ae,0)),F.push(q)}C=d.createLinearGradient(0,0,b,0),C.addColorStop(0,Jr(p,0)),C.addColorStop(.5,Jr(p,.14)),C.addColorStop(1,Jr(p,0)),B=b}let K=z*.32,x=Math.max(4,b/130);for(let R=0;R<A;R++){let m=R/(A-1||1),ae=R*.055,q=1-m*.22;d.beginPath();let H=0,w=L;for(let I=0;I<=b;I+=x){let U=I/b,ce=Math.pow(Math.sin(Math.PI*U),.85),ge=_==="thinking"?Math.exp(-Math.pow((U-(P-.3))*4.5,2)):1,me=se(Math.abs(U-.5)*2),ue=O-ae,j=Math.sin(U*Math.PI*2*2.1+ue*7.4)*.66+Math.sin(U*Math.PI*2*3.7-ue*5.6)*.26+Math.sin(U*Math.PI*2*5.9+ue*9.1)*.08,Z=L+ce*ge*q*K*T*(.6+me*1.1)*j+Math.sin(U*Math.PI*2*.6+(O-ae)*2.2)*ce*z*.01;I===0?d.moveTo(I,Z):d.quadraticCurveTo(H,w,(H+I)/2,(w+Z)/2),H=I,w=Z}d.quadraticCurveTo(H,w,b,w),d.lineCap="round",d.lineJoin="round";let y=(R===0?3:1.6)*(1+T*.6);R===0&&(d.strokeStyle=C,d.lineWidth=y*5,d.stroke()),d.strokeStyle=F[R],d.lineWidth=y,d.stroke()}};return g=requestAnimationFrame(V),()=>{cancelAnimationFrame(g),N?.disconnect(),window.removeEventListener("resize",f)}},[]),(0,el.jsx)("canvas",{ref:o,className:a,"aria-hidden":"true"})}var $t,el,lr,Hp,tl=Se(()=>{"use strict";$t=require("react"),el=require("react/jsx-runtime");lr=24,Hp=.42});function Hn({src:e,onClose:r}){return e?(0,Zr.jsxs)("div",{className:"hsk-lightbox",onClick:r,children:[(0,Zr.jsx)("button",{className:"hsk-lightbox-close",onClick:r,"aria-label":"Close image",children:(0,Zr.jsx)(Or,{})}),(0,Zr.jsx)("img",{src:e,alt:"",className:"hsk-lightbox-img",onClick:t=>t.stopPropagation()})]}):null}var Zr,Vo=Se(()=>{"use strict";Dt();Zr=require("react/jsx-runtime")});function $p({images:e,siteId:r,themeAttr:t}){let n=(0,pt.useRef)(null),[a,o]=(0,pt.useState)(null);if((0,pt.useEffect)(()=>{let s=n.current;s&&s.scrollTo({left:s.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let i=e.findIndex(s=>s.pending),c=i>0?e.slice(0,i).reverse().find(s=>s.url)?.id:void 0;return(0,Ce.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(s=>(0,Ce.jsxs)("button",{type:"button",className:"hsk-voice-image","data-pending":s.pending?"":void 0,disabled:s.pending,onClick:()=>o(s.url),children:[s.pending&&(0,Ce.jsx)(Vr,{active:!0,seed:r,theme:t}),s.url&&(0,Ce.jsx)("img",{src:s.url,alt:"",draggable:!1},s.url),s.url&&(0,Ce.jsx)(Vr,{active:!!s.sending||s.id===c,seed:r,theme:t})]},s.id)),a&&(0,Ce.jsx)(Hn,{src:a,onClose:()=>o(null)})]})}function qp({current:e,choose:r,label:t,groups:n}){let a=wn.find(l=>l.name===e),[o,i]=(0,pt.useState)(!1),c=(0,pt.useRef)(null),s=(0,pt.useRef)(null);return(0,pt.useEffect)(()=>{if(s.current&&(s.current.inert=!o),!o)return;let l=s.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let d=p=>{c.current&&!p.composedPath().includes(c.current)&&i(!1)},u=p=>{p.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",u),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",u)}},[o]),(0,Ce.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[(0,Ce.jsxs)("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":o,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>i(l=>!l),children:[(0,Ce.jsx)("span",{children:a?.trait??e}),(0,Ce.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Ce.jsx)(oa,{})})]}),(0,Ce.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:s,children:["male","female"].map(l=>(0,Ce.jsxs)(pt.default.Fragment,{children:[(0,Ce.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),wn.filter(h=>h.gender===l).map(h=>(0,Ce.jsxs)("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:de("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),i(!1)},children:[(0,Ce.jsx)("span",{className:"hsk-voice-option-name",children:h.trait}),(0,Ce.jsx)("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function rl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:i,voicePhase:c,live:s,earlier:l,newVoiceChat:h,voiceMuted:d,setVoiceMuted:u,voiceError:p,attachPhoto:k,onSelectSource:g,t:b}){let z=(0,pt.useRef)(null),f=(0,pt.useRef)(null),N=(0,pt.useRef)(null),M=[...l.turns,...s.turns??[]],E=[...l.images,...s.images??[]],F=s.sources??[],[C,B]=(0,pt.useState)(null),X=E.some(D=>D.pending),T=M.length,P=M[T-1]?.text??"",G=(0,pt.useRef)(!1);return(0,pt.useEffect)(()=>{f.current?.scrollIntoView({block:"end",behavior:G.current?"smooth":"auto"}),G.current=!0},[T,P]),(0,Ce.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Ce.jsx)(da,{seed:e,theme:r}),M.some(D=>D.text)&&(0,Ce.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:i,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Ce.jsx)(ca,{size:15})}),(0,Ce.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Ce.jsx)(Or,{})}),(0,Ce.jsx)(qp,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Ce.jsxs)("div",{className:"hsk-voice-thread",ref:z,children:[M.filter(D=>D.text).map((D,Y)=>D.role==="user"?(0,Ce.jsx)("div",{className:"hsk-cb-user-msg",children:(0,Ce.jsx)("div",{className:de("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!D.done&&"hsk-voice-turn--live"),children:D.text})},Y):(0,Ce.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Ce.jsx)("div",{className:de("hsk-cb-ai-body",!D.done&&"hsk-voice-turn--live"),children:D.text})},Y)),(0,Ce.jsx)("div",{ref:f})]}),(E.length>0||F.length>0)&&(0,Ce.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Ce.jsx)($p,{images:E,siteId:e,themeAttr:r}),F.length>0&&(0,Ce.jsx)("div",{className:"hsk-voice-sources",children:(0,Ce.jsx)(za,{sources:F,onSelectSource:g,onImageClick:B,referencedIds:F.map(D=>D.id).filter(D=>!!D),compact:!0})})]}),C&&(0,Ce.jsx)(Hn,{src:C,onClose:()=>B(null)}),i&&(0,Ce.jsxs)("div",{className:"hsk-voice-connecting",role:"status",children:[(0,Ce.jsx)("span",{className:"hsk-voice-connecting-dot"}),(0,Ce.jsx)("span",{children:b("voiceConnecting")})]}),p&&(0,Ce.jsx)("div",{className:"hsk-voice-error",children:b(p)}),(0,Ce.jsxs)("div",{className:"hsk-voice-controls",dir:"ltr",children:[s.photos&&(0,Ce.jsxs)(Ce.Fragment,{children:[(0,Ce.jsx)("input",{ref:N,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:D=>{let Y=D.target.files?.[0];D.target.value="",Y&&k(Y)}}),(0,Ce.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:i||X,onClick:()=>N.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Ce.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Ce.jsx)(Hs,{})})})]}),(0,Ce.jsx)("div",{className:de("hsk-voice-stage",i&&"hsk-voice-stage--connecting"),children:(0,Ce.jsx)(Zc,{className:"hsk-voice-canvas",phase:c,level:s.micLevel,spectrum:s.micSpectrum,bins:s.spectrumBins})}),(0,Ce.jsx)("button",{className:de("hsk-voice-control",d&&"hsk-voice-control--muted",i&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:i,onClick:()=>u(D=>!D),"aria-label":b(d?"voicePhaseListening":"voiceModeExit"),children:(0,Ce.jsx)("span",{className:"hsk-voice-control-icon",children:d?(0,Ce.jsx)($s,{}):(0,Ce.jsx)(mn,{})},d?"off":"on")})]})]})}var pt,Ce,nl=Se(()=>{"use strict";pt=Ut(require("react"));vt();Dt();It();tl();xn();Vo();Wo();Ce=require("react/jsx-runtime")});function Up(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=s=>s.offsetTop+s.offsetHeight/2,a=n(t[t.length-1])+10,o=s=>(s===r?al*1.3:al*.6)*(s%2?1:-1),i=`M ${$n} 0`,c=0;return t.forEach((s,l)=>{let h=n(s),d=c+(h-c)/2;i+=` C ${$n+o(l)} ${d}, ${$n+o(l)} ${d}, ${$n} ${h}`,c=h}),{d:i+` L ${$n} ${a}`,height:a}}function ol({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=wr(),i=(0,hr.useRef)(null),c=(0,hr.useRef)(null),s=(0,hr.useRef)([]),l=(0,hr.useRef)(null),[h,d]=(0,hr.useState)(null),u=0;for(let p=0;p<e.length;p++)e[p].idx<=r&&(u=p);return(0,hr.useEffect)(()=>{let p=s.current[u],k=l.current,g=c.current,b=i.current;if(p&&(k&&(k.style.transform=`translateY(${p.offsetTop+p.offsetHeight/2}px)`),d(Up(s.current,u)),g&&b)){let z=b.clientHeight;if(g.scrollHeight>z&&z>0){let N=p.offsetTop+p.offsetHeight/2,M=z/2-N;g.style.transform=`translateY(${M}px)`}else g.style.transform="none"}},[u,e.length]),e.length<2?null:(0,rr.jsx)("nav",{ref:i,className:de("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:(0,rr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,rr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,rr.jsx)("path",{d:h.d})}),(0,rr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((p,k)=>(0,rr.jsxs)("button",{ref:g=>{s.current[k]=g},type:"button",className:de("hsk-cb-tl-item",k===u&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(k-u),4)},onClick:()=>n(p.idx),title:p.text,children:[(0,rr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,rr.jsx)("span",{className:"hsk-cb-tl-label",children:p.text})]},p.idx))]})})}var hr,rr,$n,al,sl=Se(()=>{"use strict";hr=require("react");vt();It();rr=require("react/jsx-runtime"),$n=14,al=6});function il({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:o,isRTL:i=!1,canRetry:c,onPin:s,onRetry:l,onCopy:h,onClose:d,t:u}){let[p,k]=(0,gt.useState)(!1),g=(0,gt.useRef)(null),{closing:b,requestClose:z}=Fn(Wp,d);(0,gt.useEffect)(()=>{let U=ce=>{ce.key==="Escape"&&z()};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[z]);let f=(0,gt.useCallback)(async()=>{await h(e.content||"")&&(k(!0),setTimeout(z,450))},[e.content,h,z]),N=(0,gt.useCallback)(()=>{Ot("pin"),s(e),z()},[e,s,z]),M=(0,gt.useCallback)(()=>{l&&l(e),z()},[e,l,z]),[E,F]=(0,gt.useState)(0);(0,gt.useEffect)(()=>{if(g.current){let U=g.current.offsetWidth;U&&Math.abs(U-E)>2&&F(U)}},[E]);let[C,B]=(0,gt.useState)(r),[X,T]=(0,gt.useState)(t);(0,gt.useEffect)(()=>{if(!n)return;let U=0,ce=(me,ue)=>Math.abs(me-ue)<.5,ge=()=>{let me=n.getBoundingClientRect();if(B(ue=>ce(ue.top,me.top)&&ce(ue.left,me.left)&&ce(ue.width,me.width)&&ce(ue.height,me.height)?ue:{top:me.top,left:me.left,width:me.width,height:me.height}),a){let ue=a.getBoundingClientRect();T(j=>j&&ce(j.top,ue.top)&&ce(j.left,ue.left)&&ce(j.width,ue.width)?j:{top:ue.top,left:ue.left,width:ue.width,height:ue.height})}U=requestAnimationFrame(ge)};return U=requestAnimationFrame(ge),()=>cancelAnimationFrame(U)},[n,a]);let[P,G]=(0,gt.useState)("");(0,gt.useEffect)(()=>{if(!n)return;let U=getComputedStyle(n).backgroundColor;U&&U!=="rgba(0, 0, 0, 0)"&&U!=="transparent"&&G(U)},[n]);let D=C,Y=X??t,xe=Y?.top??0,se=Y?.left??0,V=Y?.width??(typeof window<"u"?window.innerWidth:390),te=D.top-xe,O=D.left-se,_=D.width,J=D.height,S=2;c&&l&&S++;let A=E||(S===2?122:170),K=36,x=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),R=te>=58&&!x,m=R?Math.max(8,te-K-9):Math.min(te+J+9,(Y?.height??800)-K-8),ae=o?i:!i,q=ae?Math.min(V-18,O+_-7):Math.max(18,O+7),H=ae?q-A+18:q-18;H=Math.max(10,Math.min(H,V-A-10));let w=Math.max(18,Math.min(q-H,A-18)),y=P||(o?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),I=0;return(0,ut.jsx)("div",{className:"hsk-tapback-overlay",onClick:z,children:(0,ut.jsxs)("div",{ref:g,className:de("hsk-tapback-group",b&&"is-closing",R?"is-above":"is-below",o?"is-user":"is-ai"),style:{top:`${m}px`,left:`${H}px`,"--tail-x":`${w}px`,"--tail-dir":ae?1:-1,"--tail-step":o?"9px":"8px","--hsk-anchor-color":y,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:U=>U.stopPropagation(),children:[(0,ut.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,ut.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:N,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":I++},children:[(0,ut.jsx)(Ys,{size:14}),(0,ut.jsx)("span",{children:"Pin"})]}),c&&l&&(0,ut.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:M,"aria-label":u("retry"),style:{"--tool-idx":I++},children:[(0,ut.jsx)(un,{size:14}),(0,ut.jsx)("span",{children:u("retry")})]}),(0,ut.jsxs)("button",{type:"button",className:de("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",p&&"is-copied"),onClick:f,"aria-label":u(p?"copied":"copy"),style:{"--tool-idx":I++},children:[p?(0,ut.jsx)(zr,{size:14}):(0,ut.jsx)(Er,{size:14}),(0,ut.jsx)("span",{children:u(p?"copied":"copy")})]})]}),(0,ut.jsxs)("div",{className:de("hsk-tapback-tail",R?"is-above":"is-below"),style:{left:`${w}px`},children:[(0,ut.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,ut.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}var gt,ut,Wp,cl=Se(()=>{"use strict";gt=require("react");vt();Wr();$o();Dt();ut=require("react/jsx-runtime"),Wp=190});function ll({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:i,chips:c=yn,theme:s,classNames:l={},enableVoice:h=!1,voiceLang:d,enableVision:u=!1,ttsVoice:p="Algenib",origin:k}){let g=(0,Aa.useAkropolysContext)(),b=(0,Aa.useCardFields)(),{messages:z,sources:f,loading:N,streaming:M,error:E,errorCode:F,lastAction:C,lastIntent:B,allowedActions:X,send:T,queuedMessage:P,sendQueuedNow:G,appendSpokenExchange:D,stop:Y,stopped:xe,interrupted:se,continueGenerating:V,reset:te,referencedIds:O,humanPending:_,leaveHuman:J}=(0,Ia.useKiku)(),[S,L]=(0,ee.useState)(null),A=(0,ee.useRef)(null),K=(0,ee.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||A.current?.animate([0,-7,6,-4,2,0].map(v=>({transform:`translateX(${v}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,ee.useEffect)(()=>{if(!S)return;let v=Ae=>{(Ae.key.length===1||Ae.key==="Enter"||Ae.key==="Backspace")&&K()},W=Ae=>{let Ie=je=>Ae.composedPath().some(De=>De.classList?.contains(je));!Ie("hsk-cb-leave")&&!Ie("hsk-cb-topbar")&&K()},ke=hn.current;return ke?.setAttribute("inert",""),document.addEventListener("keydown",v),document.addEventListener("pointerdown",W,!0),()=>{ke?.removeAttribute("inert"),document.removeEventListener("keydown",v),document.removeEventListener("pointerdown",W,!0)}},[S,K]);let[x,R]=(0,ee.useState)(()=>{try{return g.getShopperName?.()??""}catch{return""}}),[m,ae]=(0,ee.useState)(()=>{try{return g.getShopperLanguage?.()??""}catch{return""}}),[q,H]=(0,ee.useState)(()=>{try{return g.getEntityLanguageMode?.()??""}catch{return""}}),[w,y]=(0,ee.useState)(!1),[I,U]=(0,ee.useState)(null),[ce,ge]=(0,ee.useState)(""),[me,ue]=(0,ee.useState)(!1),{chromeReady:j,baseFontReady:Z,isRTL:we,speechLang:$e,scriptFont:ve,fontStack:_e,isNonLatin:Oe,hostFontCovers:et,t:ye,tNode:at}=Ei({shopperLanguage:m||ce,theme:s,preloadedStrings:I}),ct=ee.default.useMemo(()=>{let v=f.filter(De=>De.id&&O.includes(De.id)),W=[...z].reverse().find(De=>De.role==="assistant")?.content??"";if(!W)return v;let ke=new Set(v.map(De=>De.id)),Ae=W.toLowerCase().replace(/\s+/g," "),Ie=De=>{let mt=String(De??"").toLowerCase().replace(/\s+/g," ").trim(),Xe=mt.split(" "),Pt=[mt];return Xe.length>3&&Pt.push(Xe.slice(0,3).join(" ")),Xe.length>4&&Pt.push(Xe.slice(0,4).join(" ")),Pt.filter(qr=>qr.length>=5)},je=f.filter(De=>De.id&&!ke.has(De.id)&&Ie(De.name).some(mt=>Ae.includes(mt)));return[...v,...je]},[f,O,z]),At=X===null||X.includes("capture"),[Ct,Ye]=(0,ee.useState)(""),[Kt,Lt]=(0,ee.useState)(!1),[dr,Yt]=(0,ee.useState)(!1),[pr,qt]=(0,ee.useState)([]),ze=(0,ee.useRef)(new Map),St=(0,ee.useRef)(null),[re,he]=(0,ee.useState)({}),[be,ne]=(0,ee.useState)(null),[fe,pe]=(0,ee.useState)(null),[Re,Le]=(0,ee.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),Ne=z.length===0,nt=ce||m,nr=!nt||nt.toLowerCase()==="english"||nt.toLowerCase()==="en",ot=me||!!ce||!!m&&!j&&!nr,Xt=Ne&&!m&&!ot,Tr=Ne&&!!m&&!x&&!ot,ur=Ne&&!!m&&!!x&&!q,mr=Ne&&!!m&&!!x&&!!q&&!Re,Rr=Xt||Tr||ur||mr||ot,tn=ur||mr||ot,[rn,Pa]=(0,ee.useState)(ot),[qn,nn]=(0,ee.useState)(!1),[an,Br]=(0,ee.useState)(!1),[Un,Pe]=(0,ee.useState)(!1),tt=(0,ee.useRef)(!1),Ue=(0,ee.useRef)(null),Mt=(0,ee.useRef)(null);ot!==rn&&(Pa(ot),ot?(Mt.current&&clearTimeout(Mt.current),Pe(!1),Br(!0),Ue.current=setTimeout(()=>{nn(!0),Br(!1),tt.current=!0},280)):(Ue.current&&clearTimeout(Ue.current),Br(!1),nn(!1),tt.current&&(tt.current=!1,Pe(!0),Mt.current=setTimeout(()=>Pe(!1),560)))),(0,ee.useEffect)(()=>()=>{Ue.current&&clearTimeout(Ue.current),Mt.current&&clearTimeout(Mt.current)},[]);let lt=ee.default.useMemo(()=>z.some(v=>v.liveKeys?.length>0),[z]);(0,ee.useEffect)(()=>{if(lt)return(0,Ia.subscribeLiveStream)({client:g})},[lt,g]);let[xt,Wn]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{let v=window.matchMedia?.("(max-width: 1199px)");if(!v)return;let W=()=>Wn(v.matches);return W(),v.addEventListener?.("change",W),()=>v.removeEventListener?.("change",W)},[]);let On=async v=>{let W=v.trim();if(!W){try{g.setShopperLanguage?.("")}catch{}ae(""),ge(""),U(null);return}if(ge(W),ue(!0),W.toLowerCase()==="english"||W.toLowerCase()==="en"){U(Tt);try{g.setShopperLanguage?.(W)}catch{}ae(W),ge(""),ue(!1),y(!1);return}let Ae=Date.now(),Ie=1200;try{let De=g.getCachedUIStrings?.(W,yr)??g.getCachedUIStrings?.(W,Tt);if(De?.strings&&Object.keys(De.strings).length>0)U(De.strings),De.font&&await _t(De.font,800);else{let mt=g.getUIStrings?.(W,yr),Xe=await Promise.race([mt,new Promise(Pt=>setTimeout(()=>Pt(null),8e3))]);Xe?.font&&await _t(Xe.font,1200),Xe?.strings&&Object.keys(Xe.strings).length>0&&U(Xe.strings)}}catch{}let je=Date.now()-Ae;je<Ie&&await new Promise(De=>setTimeout(De,Ie-je));try{g.setShopperLanguage?.(W)}catch{}ae(W),ge(""),ue(!1),y(!1);try{g.getUIStrings?.(W,Tt)?.catch?.(()=>{})}catch{}},Hr=v=>{try{g.setEntityLanguageMode?.(v)}catch{}H(v),Re&&y(!0)},br=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}Le(!0),y(!0)},Fa=ot?Ir(ce||m).preparing:Xt?ye("langPlaceholder"):Tr?ye("namePlaceholder"):ur?ye("entityLangPlaceholder"):mr?ye("termsPlaceholder"):t==="Ask me anything\u2026"?ye("defaultPlaceholder"):t,_a=!c||c===yn?[]:Array.isArray(c)?c:[],Da=Xt?"curious":Tr?"welcoming":ur?"guiding":mr?"focused":"happy",[fr,Ba]=(0,ee.useState)(()=>{if(ro(s))return s;if(typeof window<"u"){let v=localStorage.getItem("akropolys_theme");if(ro(v))return v}return Xs}),[Ha,Yo]=(0,ee.useState)(!1),on=(0,ee.useRef)(null);(0,ee.useEffect)(()=>()=>{on.current&&clearTimeout(on.current)},[]);let Xo=(0,ee.useRef)(null),wl=()=>{let v=hn.current;if(!v?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let W=we?-3:3;Xo.current?.cancel(),Xo.current=v.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${W}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-W*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${W*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},Qo=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(Qo.current)return;let v=hn.current;if(!v){uo();return}let W=!1,ke=()=>v.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Ae=()=>{W||(W=!0,Qo.current=!0,Ie.disconnect(),clearTimeout(je),uo())},Ie=new MutationObserver(()=>{ke()&&Ae()});Ie.observe(v,{childList:!0,subtree:!0});let je=window.setTimeout(Ae,2e3);return ke()&&Ae(),()=>{W=!0,Ie.disconnect(),clearTimeout(je)}},[]);let Jo=(v,W=!1)=>{Yo(!0),on.current&&clearTimeout(on.current),on.current=setTimeout(()=>Yo(!1),420),Ba(v),wl(),W&&Wa();try{localStorage.setItem("akropolys_theme",v)}catch{}},{vars:Cl}=ra(s),sn=fr;na(s);let Zo=(0,ee.useRef)(()=>{}),ar=(0,ee.useRef)(null),kr=async(v,W,ke,Ae)=>{let Ie=(v??Ct).trim(),je=W??pr;if(!Ie&&je.length===0||!j||P)return;if(Ot("send"),Tr){if(!Ie)return;let Xe=gi(Ie)||Ie.slice(0,40);try{g.setShopperName?.(Xe)}catch{}R(Xe),Ye("");return}if(Xt){if(!Ie||me)return;Ye(""),On(Ie);return}if(tn){Ye("");return}Lt(!1),Yt(!1),Ye(""),qt([]);let De=(await Promise.all(je.map(async({thumb:Xe,...Pt})=>{let qr=Pt.data||(Xe?await ze.current.get(Xe)?.catch(()=>""):"")||"";return Xe&&URL.revokeObjectURL(Xe),{...Pt,data:qr}}))).filter(Xe=>Xe.data),mt=Ie||(De.some(Xe=>Xe.type==="image")?"Analyze this image":"What is this?");await T(mt,Ie,De.length>0?De:void 0,ke,Ae)},[Sl,es]=(0,ee.useState)(!1),Gn=(0,ee.useCallback)(async v=>{let W=v&&v.role==="user"?v:[...z].reverse().find(ke=>ke.role==="user");if(W?.content){es(!0);try{await kr(W.content)}finally{es(!1)}}},[z,kr]),Ml=(0,ee.useCallback)(v=>{v?.content&&(Ye(v.content),setTimeout(()=>{if(ar.current){ar.current.focus();let W=v.content.length;try{ar.current.setSelectionRange(W,W)}catch{}}},50))},[Ye,ar]),Tl=(0,ee.useCallback)(async()=>{await Gn()},[Gn]),{keyInput:Rl,setKeyInput:El,keyPhase:zl,setKeyPhase:ts,mintedKey:Ll,setMintedKey:Nl,mintedPub:Yp,setMintedPub:Il,copied:Al,keyCountdown:Pl,minting:Fl,copyValue:_l,handleUseExistingKey:Dl,handleCreateKey:Bl}=Fi(C,Tl),rs=(0,ee.useCallback)(()=>{let v=g?.getKikuKey?.();v&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(v)}`,"_blank","noopener")},[g]),[cn,ns]=(0,ee.useState)(null),Hl=(0,ee.useCallback)((v,W,ke,Ae)=>{ns({msg:v,rect:W,isUser:ke,el:Ae})},[]),$l=(0,ee.useCallback)(async v=>{let W=(v.content||"").replace(/^(@kiku pin\s*)+/i,""),Ae=`@kiku pin ${W.slice(0,50).replace(/\n+/g," ")}`;await T(W||"pin message",Ae,void 0,"capture")},[T]),{handleKikuCapture:ql,handleKikuCaptureAll:Ul,handleKikuViewHistory:Wl,handleKikuDelete:Ol}=Di({attachments:pr,setAttachments:qt,setInput:Ye,send:T,t:ye}),{voiceMode:as,voicePhase:os,voiceConnecting:Gl,voiceError:$a,setVoiceError:ss,voiceMuted:Vl,setVoiceMuted:jl,voiceSecondsLeft:Kl,voiceBlocked:Yl,liveVoiceName:Xl,chooseVoice:Ql,canConverse:Jl,startVoice:Zl,stopVoice:eh,voice:th,live:is,earlier:rh,newVoiceChat:nh,attachPhoto:ah}=cc({voiceLang:d,speechLang:$e,shopperLanguage:m,ttsVoice:p,messages:z,handleSendUtterance:v=>Zo.current(v),appendSpokenExchange:D}),Vn=(0,ee.useRef)(null),[gr,jn]=(0,ee.useState)(!1),[oh,sh]=(0,ee.useState)(null),Kn=(0,ee.useRef)(null),qa=(0,ee.useRef)(null),cs=(0,ee.useRef)([]),ln=(0,ee.useRef)(null),ih=`hsk-goo-${(0,ee.useId)()}`,{closing:Ua,requestClose:ls,closeNow:Wa}=Fn(xt?Gp:Op,()=>jn(!1));(0,ee.useEffect)(()=>{if(!gr)return;let v=W=>{let ke=W.composedPath?W.composedPath():[],Ae=Kn.current&&(ke.includes(Kn.current)||Kn.current.contains(W.target)),Ie=qa.current&&(ke.includes(qa.current)||qa.current.contains(W.target)),je=W.target,De=je?.closest?.(".hsk-cb-topbar-mark"),mt=je?.closest?.(".hsk-cb-topbar-ooze-menu")||ke.some(Xe=>Xe?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Ae||Ie||De||mt||ls()};return document.addEventListener("mousedown",v),document.addEventListener("touchstart",v,{passive:!0}),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("touchstart",v)}},[gr]);let{msgsContainerRef:hn,spacerRef:ch,lastExternalScrollRef:lh,showJumpToBottom:hh,scrollProgress:dh,activeMsgIdx:ph,unreadBelow:uh,jumpToMessage:mh,jumpToBottom:bh}=Li({messages:z,loading:N,streaming:M,messageRefs:cs}),{closing:fh,requestClose:hs}=Fn(Vp,o),Yn=(0,ee.useCallback)(v=>{v&&J(),jn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():hs()},[hs,o,J]),Xn=(0,ee.useCallback)(()=>{S?K():_?L("close"):Yn(!1)},[_,Yn,S,K]);Qs({panel:(0,ee.useCallback)(()=>Vn.current,[]),scroller:(0,ee.useCallback)(()=>hn.current,[]),onDismiss:o,quiescent:(0,ee.useCallback)(()=>performance.now()-lh.current>90,[])}),(0,ee.useEffect)(()=>{if(typeof window>"u")return;let v=window.innerWidth-document.documentElement.clientWidth,W=document.body.style.overflow,ke=document.body.style.paddingRight;if(v>0){let Ae=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Ae+v}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${v}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=W,document.body.style.paddingRight=ke,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,ee.useEffect)(()=>{let v=window.visualViewport;if(!v)return;let W=document.documentElement,ke=()=>{W.style.setProperty("--hsk-vvh",`${v.height}px`)};return ke(),v.addEventListener("resize",ke),v.addEventListener("scroll",ke),()=>{v.removeEventListener("resize",ke),v.removeEventListener("scroll",ke),W.style.removeProperty("--hsk-vvh")}},[]),(0,ee.useEffect)(()=>{let v=W=>{if(W.key==="Escape"){if(be){ne(null);return}Xn()}};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[be,Xn]);let Qn=(0,ee.useCallback)(v=>{v&&J(),te(),ts("idle")},[te,ts,J]),kh=(0,ee.useCallback)(()=>{S?K():_?L("reset"):Qn(!1)},[_,Qn,S,K]),gh=v=>{i?.(v);let W=[...z].reverse().find(ke=>ke.role==="assistant");if(W&&W.content.trim().endsWith("?")){T(ye("cardClickAnswer",{name:v.name}));return}T(ye("cardClickQuery",{name:v.name,details:Va(Wt(v,b))}))},xh=v=>{Ye(v+" "),Yt(!1),Lt(!0),ar.current&&ar.current.focus()},vh=v=>{if(v.key==="Escape"&&Kt){v.preventDefault(),Lt(!1);return}if(v.key==="Escape"&&dr){v.preventDefault(),Yt(!1);return}v.key==="Enter"&&!v.shiftKey&&!v.nativeEvent.isComposing&&(v.preventDefault(),kr())},Oa=(0,ee.useRef)(28),ds=(0,ee.useRef)(280),Ga=(0,ee.useRef)(null),yh=(v,W)=>{try{!Ga.current&&typeof document<"u"&&(Ga.current=document.createElement("canvas"));let ke=Ga.current?.getContext("2d");return ke?(ke.font=W,ke.measureText(v).width):v.length*8.5}catch{return v.length*8.5}},wh=v=>{let W=v.closest(".hsk-cb-input-box");if(!W)return;let ke=v.value;!(W.dataset.expanded==="true")&&v.clientWidth>50&&(ds.current=v.clientWidth);let Ie=window.getComputedStyle(v),je=Ie.font||`${Ie.fontSize||"16px"} ${Ie.fontFamily||"Geist, sans-serif"}`,De=yh(ke,je),mt=Math.max(120,ds.current-14),Xe=ke.includes(`
|
|
38
|
-
`),Pt=!!(ke&&(Xe||De>mt));if(W.dataset.expanded!==(Pt?"true":"false")&&(W.dataset.expanded=Pt?"true":"false"),!ke){Oa.current=28,v.style.height="";return}if(!Pt){Oa.current=28,v.style.height="";return}v.style.height="auto";let qr=Math.max(28,Math.min(v.scrollHeight,140));Oa.current=qr,v.style.height=`${qr}px`};(0,ee.useEffect)(()=>{ar.current&&wh(ar.current)},[Ct]);let Ch=v=>{let W=v.target.value;Ye(W),$a&&ss("");let ke=W.trim();Yt(ke==="@"),Lt(/^@kiku\s*$/i.test(ke))};(0,ee.useEffect)(()=>{Zo.current=v=>{kr(v)}});let Sh=async v=>{if(!v||v.length===0)return;let W=Array.from(v);for(let ke of W){if(!ke.type.startsWith("image/"))continue;let Ae=URL.createObjectURL(ke),Ie=ha(ke);ze.current.set(Ae,Ie),qt(je=>[...je,{type:"image",data:"",thumb:Ae}]),Ie.then(je=>qt(De=>De.map(mt=>mt.thumb===Ae?{...mt,data:je}:mt))).catch(()=>qt(je=>je.filter(De=>De.thumb!==Ae))).finally(()=>ze.current.delete(Ae))}},Mh=v=>{qt(W=>{let ke=W[v]?.thumb;return ke&&URL.revokeObjectURL(ke),W.filter((Ae,Ie)=>Ie!==v)})},Th=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),Rh=a||Th?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},ps=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(ps.current&&!M){let v=z[z.length-1];v&&v.role!=="user"&&Ot("reply")}ps.current=M},[M,z]);let us=(xe||se)&&!N&&!M,Jn=z[z.length-1],Zn=Ii(Jn?.role==="assistant"?Jn.content??"":""),Eh=Jn?.role==="assistant"&&Zn.length<(Jn.content?.length??0),zh=M||Eh,$r=ee.default.useMemo(()=>{let v=N||M,W=z.filter((Ie,je)=>Ie.role!=="assistant"||je===z.length-1&&v?!0:!!Ie.content||!!Ie.visualization||Ie.visualizing||(Ie.knowledgeImages?.length??0)>0||(Ie.referencedIds?.length??0)>0||Pn(Ie.statusStage)),ke=W.length-1;if(ke<0||W[ke].role!=="assistant"||W[ke]!==z[z.length-1])return W;let Ae=Zn.length<(W[ke].content?.length??0);return!v&&!Ae?W:W.map((Ie,je)=>je===ke?{...Ie,content:Zn}:Ie)},[z,N,M,Zn]),Lh=ee.default.useMemo(()=>{let v=[];return $r.forEach((W,ke)=>{if(W.role==="user"&&W.content.trim()){let Ae=W.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();v.push({idx:ke,text:Ae.length>28?Ae.slice(0,27).trimEnd()+"\u2026":Ae})}}),v},[$r]),Nh=us&&$r[$r.length-1]?.role!=="assistant",ms=(0,ee.useRef)(Date.now());return(0,ee.useEffect)(()=>{ms.current=Date.now()},[]),(0,Fe.jsx)(fo.Provider,{value:ye,children:(0,Fe.jsx)("div",{ref:ln,className:de("hsk-cb-overlay",k&&"hsk-cb-overlay--grows",fh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:v=>{xr(),v.target===v.currentTarget&&(ln.current._ptrDown=!0)},onClick:v=>{v.target===v.currentTarget&&ln.current?._ptrDown&&Date.now()-ms.current>200&&Xn(),ln.current&&(ln.current._ptrDown=!1)},"data-hsk-theme":sn,"data-hsk-theming":Ha?"":void 0,style:{...Rh,...n?{background:n}:{},...k?{"--hsk-ox":`${k.x}px`,"--hsk-oy":`${k.y}px`}:{},...Cl},children:(0,Fe.jsxs)("div",{ref:Vn,className:de("hsk-cb-panel",l.panel),dir:we?"rtl":"ltr",lang:$e||void 0,"data-script":Oe?"nonlatin":"latin","data-host-font":et?"covers":"gap","data-nastaliq":ve?.family==="Noto Nastaliq Urdu"||m?.toLowerCase()==="urdu"||m?.toLowerCase()==="ur"||m==="\u0627\u0631\u062F\u0648"?"true":void 0,style:_e?{"--hsk-font":_e}:void 0,onClick:v=>{v.stopPropagation();let W=v.target;if(W.tagName==="IMG"&&(W.classList.contains("hsk-markdown-img")||W.classList.contains("hsk-cb-user-img-thumb"))){let ke=W.src;ke&&ne(ke)}},children:[(0,Fe.jsx)(Hn,{src:be,onClose:()=>ne(null)}),fe&&(0,Fe.jsx)("div",{className:"hsk-markup-overlay",children:(0,Fe.jsx)(ni,{src:fe,t:ye,onCancel:()=>pe(null),onSend:(v,W,ke,Ae)=>{pe(null),kr(W,[{type:"image",data:v,annotated:!0,marks:ke,instructed:!0,preview:Ae}])}})}),(0,Fe.jsxs)("div",{className:"hsk-cb-main",children:[(0,Fe.jsx)(da,{seed:g?.api?.siteId??"",theme:sn,dir:we?"rtl":"ltr",waitForContent:!0}),(0,Fe.jsx)(xc,{title:e,logo:r,hasMessages:z.length>0,avatarState:M?"speaking":N?"thinking":"idle",unread:uh,awayFromBottom:hh,themeMenuOpen:gr,themeMenuClosing:Ua,onThemeMenuClosed:Wa,isNarrow:xt,currentTheme:fr,onJumpToLatest:bh,onReset:kh,onClose:Xn,onToggleThemeMenu:()=>gr?ls():jn(!0),onSelectTheme:v=>{Jo(v,!0)},themeAttr:sn}),(0,Fe.jsx)("div",{className:"hsk-cb-msgs",ref:hn,children:$r.length===0?(0,Fe.jsx)(Tc,{inOnboarding:Rr,justCompleted:w,onboardingMood:Da,awaitingLang:Xt,awaitingName:Tr,awaitingEntityLang:ur,awaitingConsent:mr,termsAgreed:Re,shopperLanguage:m,pendingLanguage:ce,shopperName:x,entityLangPref:q,chromeReady:j&&Z,activeChips:_a,speechLang:$e,t:ye,tNode:at,chooseLanguage:On,langSwitching:me,isLangPreparing:ot,onPrewarmLanguage:v=>Cn(g,v,Tt),chooseEntityLang:Hr,agreeTerms:br,handleSend:kr}):(0,Fe.jsx)(Vc,{doodleTheme:sn,displayMessages:$r,messageRefs:cs,isNarrow:xt,loading:N,streaming:zh,sources:f,referencedIds:O,discussedSources:ct,lastIntent:B,lastAction:C,stopped:xe,interrupted:se,halted:us,haltedEmpty:Nh,error:E,errorCode:F,keyPhase:zl,keyInput:Rl,setKeyInput:El,mintedKey:Ll,setMintedKey:Nl,setMintedPub:Il,minting:Fl,copied:Al,keyCountdown:Pl,handleUseExistingKey:Dl,handleCreateKey:Bl,copyValue:_l,queuedMessage:P,sendQueuedNow:G,setLightboxSrc:ne,setMarkupSrc:pe,handleSend:kr,handleSourceClick:gh,onRetry:Gn,onEdit:Ml,onLongPress:Hl,retrying:Sl,continueGenerating:V,t:ye,spacerRef:ch,vizState:re,setVizState:he,messages:z})}),!qn&&(0,Fe.jsx)("div",{className:de(an&&"hsk-composer-exit-up",Un&&"hsk-composer-reveal"),children:(0,Fe.jsx)(Xc,{notice:S&&(0,Fe.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:A,children:[(0,Fe.jsx)("span",{children:ye("leaveHumanWarning")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>L(null),children:ye("leaveHumanStay")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>{let v=S;L(null),v==="reset"?Qn(!0):Yn(!0)},children:ye("leaveHumanConfirm")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let v=S;L(null),v==="reset"?Qn(!1):Yn(!1)},children:ye("leaveHumanKeep")})]}),gooId:ih,input:Ct,setInput:Ye,showKikuPicker:Kt,setShowKikuPicker:Lt,showAtPicker:dr,setShowAtPicker:Yt,captureAllowed:At,discussedSources:ct,handleSelectExtension:xh,handleKikuCapture:ql,handleKikuCaptureAll:Ul,handleKikuViewHistory:Wl,handleKikuDelete:Ol,attachments:pr,removeAttachment:Mh,chromeLoading:!j,imageInputRef:St,handleImageFiles:Sh,enableVision:u&&!Rr,enableVoice:h&&!Rr,canConverse:Jl,startVoice:Zl,inputLocked:tn,voiceBlocked:Yl,textareaRef:ar,classNames:l,handleInput:Ch,handleKeyDown:vh,voice:th,voicePhase:os,activePlaceholder:Fa,loading:N,streaming:M,stop:Y,handleSend:kr,voiceError:$a,setVoiceError:ss,langSwitching:me||ot,t:ye,onOpenMimi:g?.getKikuKey?.()?rs:void 0})})]}),as!=="converse"&&(0,Fe.jsx)(ol,{items:Lh,activeIdx:ph,progress:dh,onJump:mh,side:we?"left":"right"}),(0,Fe.jsxs)("div",{className:de("hsk-cb-kiku-id-rail",we?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[(0,Fe.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Fe.jsx)(xa,{}),(0,Fe.jsxs)("div",{className:de("hsk-cb-theme-squircle-wrap",gr&&!Ua&&"is-open"),ref:Kn,children:[(0,Fe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:v=>{v&&(v.inert=!gr||Ua)},children:Lr.map(({id:v,label:W,Icon:ke})=>(0,Fe.jsxs)("button",{type:"button",className:de("hsk-cb-theme-grid-item",(oh??fr)===v&&"is-active"),onClick:Ae=>{Ae.stopPropagation(),Jo(v,!0)},children:[(0,Fe.jsx)(ke,{}),(0,Fe.jsx)("span",{children:W})]},v))}),(0,Fe.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(gr){Wa();return}sh(fr),jn(!0)},"aria-label":"Themes","aria-expanded":gr,children:[(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:ee.default.createElement(no(fr).Icon)}),(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:no(fr).label})]})]}),g?.getKikuKey?.()&&(0,Fe.jsxs)("button",{type:"button",className:"hsk-cb-sound-pill",onClick:rs,children:[(0,Fe.jsx)(ia,{size:13}),(0,Fe.jsx)("span",{children:"MiMi"})]})]}),as==="converse"&&(0,Fe.jsx)(rl,{siteId:g?.api?.siteId??"",themeAttr:sn,stopVoice:eh,chooseVoice:Ql,liveVoiceName:Xl,voiceSecondsLeft:Kl,voiceConnecting:Gl,voicePhase:os,live:is,earlier:rh,newVoiceChat:nh,voiceMuted:Vl,setVoiceMuted:jl,voiceError:$a,attachPhoto:ah,onSelectSource:v=>{i?.(v),is.ask(ye("cardClickQuery",{name:v.name,details:Va(Wt(v,b))}))},t:ye}),cn&&(0,Fe.jsx)(il,{msg:cn.msg,rect:cn.rect,anchorEl:cn.el,containerEl:Vn.current,containerRect:Vn.current?.getBoundingClientRect(),isUser:cn.isUser,isRTL:we,canRetry:!N&&!M,onPin:$l,onRetry:Gn,onCopy:async v=>{if(!v)return!1;try{return await navigator.clipboard.writeText(v),!0}catch{}try{let W=document.createElement("textarea");W.value=v,W.setAttribute("readonly",""),W.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(W),W.select(),W.setSelectionRange(0,v.length);let ke=document.execCommand("copy");return document.body.removeChild(W),ke}catch{return!1}},onClose:()=>ns(null),t:ye})]})})})}var ee,Ia,Aa,Fe,Op,Gp,Vp,hl=Se(()=>{"use strict";ee=Ut(require("react"));ao();Ia=require("@akropolys/sdk"),Aa=require("@akropolys/sdk");dn();vt();ja();pn();Js();oo();ai();xn();It();ma();zi();Ni();Ai();_i();Bi();lc();vc();Dt();Rc();Wr();Lo();Ta();$o();jc();Qc();nl();Vo();sl();cl();Fe=require("react/jsx-runtime"),Op=240,Gp=700,Vp=200});var jo,dl=Se(()=>{"use strict";jo='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;margin-inline-start:-4px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;position:relative;padding-left:28px!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:95;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:100;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:90;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:96;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;width:fit-content;max-width:calc(100% - 24px);margin:0 12px -12px;padding:6px 6px 6px 14px;border-radius:18px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #fff),0 6px 20px #0000001f;font:500 13px/1.4 var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:28px;padding:0 13px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12.5px var(--hsk-font);cursor:pointer}.hsk-cb-leave-btn--end{background:var(--hsk-chat-text, #111827);color:var(--hsk-chat-bg, #fff)}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:12px;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);cursor:default}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;border:none;background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}'});function ml(e){if(ul)return;if(ul=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(jo),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=jo,e.appendChild(r)}function bl(){return typeof document>"u"?null:en?(ml(en),en):(Mr=document.getElementById(pl),Mr||(Mr=document.createElement("div"),Mr.id=pl,Mr.style.cssText="all: initial;",document.body.appendChild(Mr)),en=Mr.shadowRoot??Mr.attachShadow({mode:"open"}),ml(en),en)}var pl,Mr,en,ul,fl=Se(()=>{"use strict";dl();pl="akropolys-kiku-root",Mr=null,en=null,ul=!1});var kl={};bs(kl,{ChatModal:()=>ll,DEFAULT_CHIPS:()=>yn,DEFAULT_UI_STRINGS:()=>Tt,getShadowContainer:()=>bl,warmChrome:()=>Si,warmLanguage:()=>Cn});var gl=Se(()=>{"use strict";hl();It();fl();ma()});var Kp={};bs(Kp,{KikuButton:()=>yl,SearchBar:()=>ws});module.exports=Dh(Kp);var or=require("react"),Ur=require("@akropolys/sdk");dn();vt();var Be=require("react/jsx-runtime"),ys=()=>(0,Be.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,Be.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,Be.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function ws({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:o,dropdownClassName:i,renderResult:c,theme:s,classNames:l={}}){let[h,d]=(0,or.useState)(""),[u,p]=(0,or.useState)(!1),{results:k,loading:g,search:b,clear:z}=(0,Ur.useSearch)({debounceMs:t}),f=(0,Ur.useAkropolysContext)(),N=(0,Ur.useCardFields)(),M=(0,or.useRef)(null),E=(0,or.useRef)(!1);(0,or.useEffect)(()=>{if(E.current){E.current=!1;return}if(!h.trim()){z(),p(!1);return}p(!0),b(h,r)},[h]),(0,or.useEffect)(()=>{let T=P=>{M.current&&!M.current.contains(P.target)&&p(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);let F=T=>{h.trim()&&f.api.searchVector(h,1,void 0,!0).catch(()=>{}),E.current=!0,p(!1),d(T.entity.title??T.entity.name??""),n?.(T)},C=()=>{h.trim()&&(f.api.searchVector(h,1,void 0,!0).catch(()=>{}),k.length>0&&F(k[0]))},B=u&&h.trim().length>0,X={...s?.primaryColor&&{"--hsk-primary":s.primaryColor},...s?.backgroundColor&&{"--hsk-bg":s.backgroundColor},...s?.textColor&&{"--hsk-text":s.textColor},...s?.fontFamily&&{"--hsk-font":s.fontFamily},...s?.borderRadius&&{"--hsk-border-radius":s.borderRadius}};return(0,Be.jsxs)("div",{className:de("hsk-sb-wrap",l.root,a),ref:M,style:X,children:[(0,Be.jsx)("span",{className:"hsk-sb-icon",children:(0,Be.jsx)(ys,{})}),(0,Be.jsx)("input",{className:de("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:T=>d(T.target.value),onFocus:()=>k.length>0&&h.trim()&&p(!0),onKeyDown:T=>{T.key==="Enter"&&C()},autoComplete:"off",spellCheck:!1}),B&&(0,Be.jsxs)("div",{className:de("hsk-sb-drop",l.dropdown,i),style:{position:"absolute"},children:[g&&(0,Be.jsx)("div",{className:"hsk-sb-loading-bar"}),g&&k.length===0?(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Be.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Be.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Be.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,Be.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,Be.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Be.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Be.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Be.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,Be.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,Be.jsxs)(Be.Fragment,{children:[k.length===0&&!g&&(0,Be.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),k.map((T,P)=>{if(c)return(0,Be.jsx)("div",{onClick:()=>F(T),className:"hsk-sb-fade",style:{animationDelay:`${P*18}ms`},children:c(T)},T.id);let G=T.entity.image??T.entity.thumbnail??T.entity.images?.[0];return(0,Be.jsxs)("div",{className:de("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${P*18}ms`},onClick:()=>F(T),children:[(0,Be.jsx)("span",{className:"hsk-sb-row-thumb",children:G?(0,Be.jsx)("img",{src:G,alt:"",loading:"lazy",onError:D=>{D.currentTarget.style.display="none"}}):(0,Be.jsx)(ys,{})}),(0,Be.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Be.jsx)("div",{className:"hsk-sb-row-title",children:T.entity.title??T.entity.name}),Wt({fields:T.entity.fields??T.entity},N)[0]&&(0,Be.jsx)("div",{className:"hsk-sb-row-sub",children:Wt({fields:T.entity.fields??T.entity},N)[0].value})]})]},T.id)})]})]})]})}var Nt=require("react"),xl=require("react-dom");Wr();var vl=require("@akropolys/sdk");vt();ja();pn();var jt=require("react/jsx-runtime"),Ko=null;function jp(){return Ko??(Ko=Promise.resolve().then(()=>(gl(),kl)).catch(e=>{throw Ko=null,e})),Ko}function yl({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,className:s,onSelectSource:l,chips:h,theme:d,classNames:u={},enableVoice:p=!1,voiceLang:k,ttsVoice:g,enableVision:b=!1}){let z=(0,vl.useAkropolysContext)(),[f,N]=(0,Nt.useState)(!1),[M,E]=(0,Nt.useState)(null),[F,C]=(0,Nt.useState)(null),B=(0,Nt.useRef)(!0),[X,T]=(0,Nt.useState)(0);(0,Nt.useEffect)(()=>{if(f){T(0);return}let se=!0;return z?.api?.unreadFromTeam?.().then(V=>{se&&T(V)}).catch(()=>{}),()=>{se=!1}},[f,z]);let P=(0,Nt.useCallback)(()=>{jp().then(se=>{se.getShadowContainer(),B.current&&C(se),se.warmChrome(z,z?.getShopperLanguage?.()??"",se.DEFAULT_UI_STRINGS),z?.api?.widgetSettings?.().then(V=>{V?.detectedLanguage&&V.detectedLanguage.toLowerCase()!=="english"&&se.warmLanguage(z,V.detectedLanguage,se.DEFAULT_UI_STRINGS)}).catch(()=>{})}).catch(()=>{})},[z]),G=(0,Nt.useRef)(null),D=(0,Nt.useCallback)(()=>{let se=G.current?.getBoundingClientRect();E(se?{x:se.left+se.width/2,y:se.top+se.height/2}:null),N(!0),P();try{xr()}catch{}},[P]);(0,Nt.useEffect)(()=>{B.current=!0;let se=window.requestIdleCallback,V=se?se(P,{timeout:2e3}):setTimeout(P,300);if(typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let O=window.location.pathname,_=window.history.pushState,J=window.history.replaceState;window.history.pushState=function(...S){_.apply(this,S),window.location.pathname!==O&&(O=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...S){J.apply(this,S),window.location.pathname!==O&&(O=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let te=()=>{N(!1)};return window.addEventListener("popstate",te),window.addEventListener("akropolys:navigation",te),()=>{B.current=!1;let O=window.cancelIdleCallback;se&&O?O(V):clearTimeout(V),window.removeEventListener("popstate",te),window.removeEventListener("akropolys:navigation",te)}},[P]);let{themeAttr:Y,vars:xe}=ra(d);return na(d),(0,jt.jsxs)(jt.Fragment,{children:[(0,jt.jsxs)("button",{ref:G,className:de("hsk-cb-btn",u.button,s),onClick:D,onPointerEnter:P,onPointerDown:P,style:xe,"data-hsk-theme":Y,"aria-label":"Open AI chat",children:[r!==void 0?r:(0,jt.jsxs)(jt.Fragment,{children:[t?(0,jt.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),X>0&&(0,jt.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${X} new replies`,children:X})]}),f&&F&&(0,xl.createPortal)((0,jt.jsx)(F.ChatModal,{title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,origin:M,onClose:()=>N(!1),onSelectSource:l,chips:h??F.DEFAULT_CHIPS,theme:d,classNames:u,enableVoice:p,voiceLang:k,enableVision:b,ttsVoice:g}),F.getShadowContainer()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
|
|
37
|
+
`)&&t[t.length-1].trim().startsWith("|")&&t.pop();let l=t.length-1;for(;l>=0&&t[l].trim().startsWith("|");)l--;l++,l<t.length&&!t.slice(l).some(h=>Hp.test(h))&&(t.length=l)}let n=(l,h)=>_a(l,r&&h===t.length-1?15:1),a=[],s=[],o=0,c=()=>{s.length>0&&(a.push((0,qe.jsx)("div",{className:"hsk-cb-ai-text",children:s},`text-bubble-${o++}`)),s=[])},i=0;for(;i<t.length;){let l=t[i],h=`md-line-${i}`;if(!l.trim()){i++;continue}let p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let u=p[1],f=p[2];Wc(f)&&a.push((0,qe.jsx)("div",{className:"hsk-markdown-img-block",children:(0,qe.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:y=>{y.target.style.display="none"}})},h)),i++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let u=d[1].length,f=`h${u+3}`;s.push((0,qe.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],i),children:kr(d[2],h)},h)),i++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*[-*+•]\s+/);){let y=t[i].replace(/^[\s]*[-*+•]\s+/,"");f+=y+" ",u.push((0,qe.jsx)("li",{children:kr(y,`li-${i}`)},`li-${i}`)),i++}s.push((0,qe.jsx)("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,i-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;i<t.length&&t[i].match(/^[\s]*\d+[\.\)]\s+/);){let y=t[i].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=y+" ",u.push((0,qe.jsx)("li",{children:kr(y,`li-${i}`)},`li-${i}`)),i++}s.push((0,qe.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,i-1),children:u},`ol-${h}`));continue}if($c(l,!1)){c();let u=[],f=[],y=[],b=!0;for(;i<t.length&&$c(t[i],!0);){let z=t[i].trim();if(z.match(/^\|?[-:| ]+\|?$/)&&z.includes("-")){y=qc(z).map(W=>{let X=W.trim(),N=X.startsWith(":"),P=X.endsWith(":");return N&&P?"center":P?"end":"start"}),i++,b=!1;continue}let _=qc(z);b&&u.length===0?u=_:f.push(_),i++}let M=Math.max(u.length,...f.map(z=>z.length)),g=[];for(let z=0;z<M;z++)if(y[z])g[z]=y[z];else if(z===0)g[z]="start";else{let _=f.filter(S=>{let W=(S[z]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(W)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(W)}).length;g[z]=_>=Math.ceil(f.length/2)?"end":"start"}let E=u.length>0?(0,qe.jsx)("tr",{children:u.map((z,_)=>(0,qe.jsx)("th",{style:{textAlign:g[_]||"start"},children:(0,qe.jsx)("bdi",{children:kr(z,`th-${h}-${_}`)})},`th-${h}-${_}`))},`tr-head-${h}`):null,R=f.map((z,_)=>(0,qe.jsx)("tr",{children:z.map((S,W)=>(0,qe.jsx)("td",{className:S.trim().startsWith("\u2713")?"hsk-md-ok":S.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:g[W]||"start"},children:(0,qe.jsx)("bdi",{children:kr(S,`td-${h}-${_}-${W}`)})},`td-${h}-${_}-${W}`))},`tr-body-${h}-${_}`));a.push((0,qe.jsx)(Bp,{children:(0,qe.jsxs)("table",{className:"hsk-markdown-table",children:[E&&(0,qe.jsx)("thead",{children:E}),(0,qe.jsx)("tbody",{children:R})]})},`table-wrapper-${h}`));continue}s.push((0,qe.jsx)("p",{className:"hsk-markdown-p",dir:n(l,i),children:kr(l,h)},h)),i++}return c(),(0,qe.jsx)(qe.Fragment,{children:a})}var Ur,qe,Tp,Rp,Ep,zp,Lp,Np,Ip,Ap,Pp,Uc,Yo,Fp,_p,Dp,kr,Hp,jc=Ce(()=>{"use strict";Ur=Zt(require("react"));Ko();qe=require("react/jsx-runtime"),Tp=/[ \t]{2,}/g,Rp=/ ([.,!?:;])/g,Ep=/\(([ \t]+)/g,zp=/([ \t]+)\)/g,Lp=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,Np=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,Ip=/^!\[([^\]]*)\]\(([^)]+)\)$/,Ap=/^\[([^\]]+)\]\(([^)]+)\)$/,Pp=/^(data:image|blob):/i,Uc=/^(https?|mailto|tel):/i;Yo=null;Fp=/memory|mimi/i,_p=/mimi\.akropolys/i,Dp=e=>e&&e.replace(Tp," ").replace(Rp,"$1").replace(Ep,"(").replace(zp,")").replace(Lp,"$1 $2"),kr=(e,r)=>Dp(e).split(Np).map((a,s)=>{if(!a)return null;let o=`${r}-inline-${s}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,qe.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},o);if(a.startsWith("**")&&a.endsWith("**"))return(0,qe.jsx)("strong",{children:kr(a.slice(2,-2),o)},o);let c=a.match(Ip);if(c){let l=c[1],h=c[2];return Wc(h)?(0,qe.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},o):null}let i=a.match(Ap);if(i){let l=i[1],h=i[2];return Fp.test(l)||_p.test(h)?null:Uc.test(h)||h.startsWith("/")?(0,qe.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:kr(l,o)},o):(0,qe.jsx)("span",{children:kr(l,o)},o)}return a}),Hp=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/});function qp(e){let[,r]=(0,Vn.useState)(0),t=JSON.stringify(e);return(0,Vn.useEffect)(()=>(0,yt.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Vn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(yt.getLiveValue)}function jp({record:e,now:r}){let t=(0,yt.isStale)(e,r),n=e.fields,a=Up.find(i=>n[i]),s=a?n[a]:e.key,o=s.length>38?s.slice(0,36)+"\u2026":s,c=Object.entries(n).filter(([i,l])=>i!==a&&l!==""&&l.length<=Op&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Wp).map(([i,l])=>({label:(0,yt.labelFor)(i),value:(0,yt.formatLiveValue)(l),rawKey:i}));return(0,Rt.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Rt.jsx)("div",{className:"hsk-live-card__top",children:(0,Rt.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Rt.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Rt.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,yt.describeAge)(r-e.at)}`:`Live \xB7 ${(0,yt.describeAge)(r-e.at)}`})]})}),(0,Rt.jsx)("div",{className:"hsk-live-card__body",children:(0,Rt.jsx)("span",{className:"hsk-live-card__title",title:s,children:o})}),(0,Rt.jsx)("div",{className:"hsk-live-card__pills",children:c.map(i=>{let l=(0,yt.isFresh)(e,i.rawKey,r);return(0,Rt.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${yt.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Rt.jsx)("span",{className:"hsk-live-pill__label",children:i.label}),(0,Rt.jsx)("span",{className:"hsk-live-pill__value",children:i.value})]},i.rawKey)})})]})}function Gc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=qp(t);if(t.filter((c,i)=>n[i]).length===0)return null;let s=n.filter(c=>!!c),o=Date.now();return(0,Rt.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Rt.jsx)("div",{className:"hsk-live-carousel",children:s.map(c=>(0,Rt.jsx)(jp,{record:c,now:o},c.key))})})}var Vn,yt,Rt,Up,Wp,Op,Vc=Ce(()=>{"use strict";Vn=require("react"),yt=require("@akropolys/sdk"),Rt=require("react/jsx-runtime");Up=["title","name","label","headline","subject"],Wp=8,Op=40});function Yc({source:e,onImageClick:r}){let t=(0,Kc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,gr.useState)(0),[s,o]=(0,gr.useState)(!1),c=(0,gr.useRef)(null),i=(0,gr.useRef)(null),l=e.image||t[0]?.url,h=t[Math.min(n,Math.max(t.length-1,0))];if((0,gr.useEffect)(()=>{o(!1),a(0),c.current?.close()},[l,e.id]),!l)return(0,Je.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,Je.jsx)(mr,{})});let p=d=>a(u=>(u+d+t.length)%t.length);return(0,Je.jsxs)(Je.Fragment,{children:[(0,Je.jsxs)("button",{type:"button",className:"hsk-cb-src-imgwrap hsk-gallery-cover","aria-label":t.length>1?`View ${t.length} images of ${e.name}`:`View image of ${e.name}`,onClick:d=>{d.stopPropagation(),t.length===1&&r?r(l):(a(Math.max(0,t.findIndex(u=>u.url===l))),c.current?.showModal())},children:[s?(0,Je.jsx)(mr,{}):(0,Je.jsx)("img",{src:l,alt:t.find(d=>d.url===l)?.alt||e.name,loading:"lazy",onError:()=>o(!0)}),t.length>1&&(0,Je.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(d=>d.url===l))+1," / ",t.length]})]}),(0,Je.jsxs)("dialog",{ref:c,className:"hsk-entity-gallery","aria-label":`Images of ${e.name}`,onClick:d=>{d.stopPropagation(),d.target===d.currentTarget&&c.current?.close()},onKeyDown:d=>{d.stopPropagation(),d.key==="ArrowRight"&&(d.preventDefault(),p(1)),d.key==="ArrowLeft"&&(d.preventDefault(),p(-1))},children:[(0,Je.jsxs)("div",{className:"hsk-gallery-top",children:[(0,Je.jsx)("span",{children:e.name}),(0,Je.jsx)("button",{type:"button",onClick:()=>c.current?.close(),"aria-label":"Close image gallery",children:"\xD7"})]}),h&&(0,Je.jsxs)("figure",{onTouchStart:d=>{i.current=d.touches[0]?.clientX??null},onTouchEnd:d=>{let u=d.changedTouches[0]?.clientX;i.current!==null&&u!==void 0&&Math.abs(u-i.current)>45&&p(u<i.current?1:-1),i.current=null},children:[(0,Je.jsx)(Gp,{url:h.url,alt:h.alt||e.name},h.url),h.caption&&(0,Je.jsx)("figcaption",{children:h.caption})]}),(0,Je.jsxs)("div",{className:"hsk-gallery-controls",children:[(0,Je.jsx)("button",{type:"button","aria-label":"Previous image",disabled:t.length<2,onClick:()=>p(-1),children:(0,Je.jsx)(en,{})}),(0,Je.jsxs)("span",{"aria-live":"polite",children:[n+1," / ",t.length]}),(0,Je.jsx)("button",{type:"button","aria-label":"Next image",disabled:t.length<2,onClick:()=>p(1),children:(0,Je.jsx)(tn,{})})]})]})]})}function Gp({url:e,alt:r}){let[t,n]=(0,gr.useState)(!1);return t?(0,Je.jsx)("p",{role:"status",children:"Image unavailable"}):(0,Je.jsx)("img",{src:e,alt:r,onError:()=>n(!0)})}var gr,Kc,Je,Xc=Ce(()=>{"use strict";gr=require("react"),Kc=require("@akropolys/sdk");Wt();Je=require("react/jsx-runtime")});function Ha({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:s="Your colour"}){let o=(0,Da.useAkropolysContext)(),c=(0,Da.useCardFields)(),i=(0,lr.useRef)(null),[l,h]=(0,lr.useState)(!1),[p,d]=(0,lr.useState)(!1),[u,f]=(0,lr.useState)(0),y=e.filter(S=>S.id&&n.includes(S.id)),b=y.filter(S=>S.swatch),M=y.filter(S=>!S.swatch),g=(0,lr.useCallback)(()=>{let S=i.current;if(!S||M.length===0)return;let W=Math.abs(S.scrollLeft),X=S.scrollWidth-S.clientWidth;h(W>10),d(X>4&&W<X-12);let P=Math.round(W/190);f(Math.min(Math.max(0,P),M.length-1))},[M.length]);(0,lr.useEffect)(()=>{g();let S=i.current;if(!S)return;let W=new ResizeObserver(g);return W.observe(S),S.addEventListener("scroll",g,{passive:!0}),()=>{W.disconnect(),S.removeEventListener("scroll",g)}},[g,e]);let E=S=>{let W=i.current;if(!W)return;let X=getComputedStyle(W).direction==="rtl";W.scrollBy({left:190*S*(X?-1:1),behavior:"smooth"})},R=()=>E(1),z=()=>E(-1);if(M.length===0&&b.length===0)return null;let _=b.length>0&&(0,We.jsx)("div",{className:"hsk-cb-swatch-grid",children:b.map((S,W)=>(0,We.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",S.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${W*40}ms`},onClick:S.target?void 0:()=>r?.(S),children:[(0,We.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:S.swatch}}),(0,We.jsx)("span",{className:"hsk-cb-swatch-name",children:S.target?s:S.name}),(0,We.jsx)("span",{className:"hsk-cb-swatch-code",children:S.swatch})]},S.id??W))});return M.length===0?_||null:(0,We.jsxs)(We.Fragment,{children:[_,(0,We.jsxs)("div",{className:le("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[l&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,We.jsx)("button",{className:"hsk-cb-sources-prev",onClick:z,"aria-label":"Previous",children:(0,We.jsx)(en,{})})]}),(0,We.jsx)("div",{className:"hsk-cb-sources",ref:i,children:M.map((S,W)=>{let X=!!(S.id&&n.includes(S.id));return(0,We.jsxs)("div",{className:le("hsk-cb-source",X&&"hsk-cb-source--referenced"),style:{animationDelay:`${W*50}ms`},onClick:()=>r?.(S),children:[(0,We.jsx)(Yc,{source:S,onImageClick:t}),(0,We.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,We.jsx)("div",{className:"hsk-cb-src-name",children:S.name}),er(S,c).slice(0,2).map(N=>(0,We.jsx)("div",{className:"hsk-cb-src-detail",children:N.value},N.label))]})]},S.id??W)})}),p&&(0,We.jsxs)(We.Fragment,{children:[(0,We.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,We.jsx)("button",{className:"hsk-cb-sources-next",onClick:R,"aria-label":"See more",children:(0,We.jsx)(tn,{})})]}),M.length>1&&(0,We.jsx)("div",{className:"hsk-cb-carousel-dots",children:M.map((S,W)=>(0,We.jsx)("div",{className:le("hsk-cb-dot-item",W===u&&"hsk-cb-dot-item--active"),onClick:()=>{let X=i.current;if(X){let N=getComputedStyle(X).direction==="rtl";X.scrollTo({left:W*190*(N?-1:1),behavior:"smooth"})}}},W))})]})]})}var lr,Da,We,Xo=Ce(()=>{"use strict";Xc();lr=require("react"),Da=require("@akropolys/sdk");yn();Tt();Wt();We=require("react/jsx-runtime")});function Qc({intent:e,sources:r,onSend:t,loading:n}){let a=zr();if(!e)return null;let s=[],o=r[0]?.name??"",c=r.slice(0,2).map(i=>i.name);if(e==="search"&&r.length>0){if(c.length>=2&&s.push({emoji:"\u2696\uFE0F",label:a("pillCompareTop2"),query:a("pillCompareTop2Query",{a:c[0],b:c[1]})}),o){let i=o.split(" ").slice(0,3).join(" ");s.push({emoji:"\u{1F4A1}",label:a("pillMoreOn",{name:i}),query:a("pillMoreOnQuery",{name:o})})}}else e==="compare"&&r.length>0?(o&&s.push({emoji:"\u{1F50D}",label:a("pillSimilarOptions"),query:a("pillSimilarOptionsQuery",{name:o})}),s.push({emoji:"\u{1F4A1}",label:a("pillWhichBest"),query:a("pillWhichBestQuery")})):e==="specs"&&r.length>0?o&&s.push({emoji:"\u{1F504}",label:a("pillFindAlternatives"),query:a("pillFindAlternativesQuery",{name:o})}):e==="general"&&(s.push({emoji:"\u{1F50D}",label:a("pillShowPopular"),query:a("pillShowPopularQuery")}),s.push({emoji:"\u{1F4A1}",label:a("pillRecommend"),query:a("pillRecommendQuery")}));return s.length===0?null:(0,Kn.jsx)("div",{className:"hsk-action-pills",children:s.map(i=>(0,Kn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(i.query),disabled:n,children:[(0,Kn.jsx)("span",{className:"hsk-pill-emoji",children:i.emoji}),i.label]},i.query))})}var Kn,Jc=Ce(()=>{"use strict";Ot();Kn=require("react/jsx-runtime")});function Vp(e){let r=new Set;for(let t of e)if(t)try{r.add(new URL(t,location.href).host)}catch{}return[...r].sort().join(",")}function Kp(e,r){wt.default.useLayoutEffect(()=>{let t=e.current;if(!t)return;let n=()=>{t.style.width="";let o=document.createRange();o.selectNodeContents(t);let c=Array.from(o.getClientRects()),i=t.getBoundingClientRect();if(!c.length||!t.offsetWidth||!i.width)return;let l=i.width/t.offsetWidth,h=getComputedStyle(t),p=parseFloat(h.paddingLeft)+parseFloat(h.paddingRight)+parseFloat(h.borderLeftWidth)+parseFloat(h.borderRightWidth),d=Math.max(...c.map(f=>f.right))-Math.min(...c.map(f=>f.left)),u=Math.ceil(d/l)+1;u+p<t.offsetWidth&&(t.style.width=`${h.boxSizing==="border-box"?u+p:u}px`)};n(),document.fonts?.ready.then(n).catch(()=>{});let a=t.closest(".hsk-cb-msg-group");if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(n);return s.observe(a),()=>s.disconnect()},[e,r])}function tl({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:s,runCont:o,isNarrow:c,loading:i,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:y,lastAction:b,vizState:M,setVizState:g,setLightboxSrc:E,setMarkupSrc:R,handleSend:z,handleSourceClick:_,onRetry:S,onEdit:W,onLongPress:X,hasError:N,retrying:P,t:j,messageRef:D,photosSending:re,workingOn:ge,doodleTheme:be}){let Y=(0,Zc.useAkropolysContext)()?.api,me=Y?.siteId??"",J=Vp([Y?.apiUrl,...(t?d:e.sources??[]).flatMap(K=>[K.image,K.url])]),H=e.role==="user",A=e.content,[v,L]=wt.default.useState(!1),I=wt.default.useRef(null);Kp(I,e.content);let V=wt.default.useRef(null),T=wt.default.useRef(null),C=wt.default.useRef(!1),m=wt.default.useCallback(K=>{let ne=H?".hsk-cb-user-bubble":".hsk-cb-ai-text";return K.matches?.(ne)?K:K.querySelector(ne)||K},[H]),ae=wt.default.useCallback(K=>{T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{if(X){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ne=m(K),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},H,ne),C.current=!0}T.current=null},420)},[e,H,X,m]),G=wt.default.useCallback(K=>{if(K.touches.length!==1)return;let ne=K.touches[0];V.current={x:ne.clientX,y:ne.clientY},C.current=!1,ae(K.currentTarget)},[ae]),B=wt.default.useCallback(K=>{if(!V.current||!T.current)return;let ne=K.touches[0];Math.hypot(ne.clientX-V.current.x,ne.clientY-V.current.y)>8&&(clearTimeout(T.current),T.current=null)},[]),w=wt.default.useCallback(K=>{T.current&&(clearTimeout(T.current),T.current=null),V.current=null,C.current&&K.cancelable&&K.preventDefault()},[]),k=wt.default.useCallback(K=>{if(!X||(K.preventDefault(),C.current))return;let ne=m(K.currentTarget),ye=ne.getBoundingClientRect();X(e,{top:ye.top,left:ye.left,width:ye.width,height:ye.height},H,ne)},[e,H,X,m]);wt.default.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);let F=wt.default.useCallback(K=>{if(K)try{navigator.clipboard.writeText(K),L(!0),setTimeout(()=>L(!1),2e3)}catch{}},[]),q=wt.default.useMemo(()=>Pa(A),[A]),oe=e.thinking||q.thinking,de=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,pe=de.test(q.content),ue=pe?q.content.replace(de,"").trimEnd():q.content;return(0,se.jsx)("div",{className:le("hsk-cb-msg-group",s&&"hsk-cb-msg-group--run-mid",o&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":H?"user":"assistant",ref:D,children:H?(0,se.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,se.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((K,ne)=>(0,se.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>E(K),children:[(0,se.jsx)("img",{src:K,alt:`attachment ${ne+1}`,className:"hsk-cb-user-img-thumb"}),(0,se.jsx)(an,{active:re,seed:me,theme:be}),ne===3&&e.images.length>4&&(0,se.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ne))}),e.content&&(0,se.jsxs)("div",{ref:I,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",N&&"hsk-cb-user-bubble--error"),onTouchStart:G,onTouchMove:B,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,dir:_a(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,se.jsx)(Sn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,se.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[S&&(N||n)&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>S(e),"aria-label":j("retry"),children:[(0,se.jsx)(Cn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("retry")})]}),W&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>W(e),"aria-label":j("edit"),children:[(0,se.jsx)(ka,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("edit")})]}),(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(e.content),"aria-label":j(v?"copied":"copy"),children:[v?(0,se.jsx)(Fr,{size:11}):(0,se.jsx)(Pr,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j(v?"copied":"copy")})]})]}),n&&!N&&(0,se.jsx)("span",{className:"hsk-cb-sent-status",children:j(h||p?"statusStopped":"statusSent")}),N&&(0,se.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,se.jsx)("span",{className:"hsk-cb-failed-dot"}),j("msgFailed")]})]})]}):(0,se.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,se.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:G,onTouchMove:B,onTouchEnd:w,onTouchCancel:w,onContextMenu:k,children:[(()=>{let K=e.thoughtForSeconds!=null||ue.length>0||!(t&&(l||i));return(0,se.jsxs)(se.Fragment,{children:[!e.spoken&&(oe||e.thoughtForSeconds!=null||e.repliedSeconds!=null||On(e.statusStage)||t&&(l||i))&&(0,se.jsx)(Bc,{text:oe,isComplete:K,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,se.jsx)("div",{className:"hsk-cb-think",children:(0,se.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,se.jsx)(Sn,{size:11}),(0,se.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-content",children:(0,se.jsx)(el,{content:ue,streaming:t&&l,hosts:J})}),pe&&(0,se.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:j("calcDisclaimer")})]})})(),e.visualizing&&(0,se.jsx)("div",{className:"hsk-cb-viz",children:(0,se.jsxs)("div",{className:le("hsk-cb-viz--working",!ge&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||j("vizWorking"),children:[ge&&(0,se.jsx)("img",{src:ge,alt:""}),(0,se.jsx)(an,{active:!0,seed:me,theme:be})]})}),e.visualization&&(0,se.jsxs)("div",{className:"hsk-cb-viz",children:[(0,se.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,se.jsx)("video",{src:e.visualization,controls:!0,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"hsk-markdown-video",style:{display:"block",maxHeight:"400px",objectFit:"contain",width:"100%"}}):(0,se.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:M[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>g(K=>({...K,[e.visualization]:"ok"})),onError:()=>g(K=>({...K,[e.visualization]:"err"}))}),M[e.visualization]==="err"&&(0,se.jsx)("div",{className:"hsk-cb-viz-broken",children:j("vizUnavailable")}),t&&!l&&M[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,se.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>R(e.visualization),children:[(0,se.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,se.jsx)("path",{d:"M12 20h9"}),(0,se.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),j("vizMarkEdit")]})]}),(0,se.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?j("vizDisclaimerVideo"):j("vizDisclaimerImage")})]}),!H&&(e.knowledgeImages?.length??0)>0&&(0,se.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(K=>(0,se.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,se.jsx)("div",{className:"hsk-cb-kimg-grid",children:K.images.map((ne,ye)=>(0,se.jsx)("img",{src:ne.url,alt:ne.note||K.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>E(ne.url),onError:Oe=>{Oe.target.style.display="none"}},ye))}),(K.title||K.images[0]?.note)&&(0,se.jsx)("div",{className:"hsk-cb-kimg-caption",children:K.title||K.images[0]?.note})]},K.entryId))}),!H&&(0,se.jsx)(Gc,{keys:e.liveKeys}),!H&&(e.staleNotices?.length??0)>0&&(0,se.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,se.jsx)("div",{className:"hsk-cb-stale-title",children:j("staleTitle")}),e.staleNotices.map((K,ne)=>(0,se.jsxs)("div",{className:"hsk-cb-stale-item",children:[K.state==="removed"?j("staleRemoved",{title:K.title}):j("staleUnavailable",{title:K.title}),K.reason&&(0,se.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",K.reason]})]},ne))]}),(()=>{let K=t?u:e.referencedIds??[],ne=t?d:e.sources??[],ye=t?y:e.intent,Oe=ye==="compare"||ye==="capture"||ye==="capture_all"||ye==="delete"||ye==="view_history";return K.length>0&&!Oe&&(!t||b?.type!=="request_kiku_key")&&(0,se.jsx)(Ha,{sources:ne,onSelectSource:_,onImageClick:E,referencedIds:K,compact:!!e.visualization,targetLabel:j("swatchTarget")})})(),t&&!i&&!l&&b?.type==="open_memory"&&Gn(b.url)&&(0,se.jsxs)("a",{className:"hsk-cb-memory-pill",href:Gn(b.url),target:"_blank",rel:"noopener noreferrer",children:[j("openMemory"),(0,se.jsx)(Os,{})]}),t&&!i&&Gn(b?.url)&&b?.type!=="open_memory"&&(0,se.jsx)("div",{className:"hsk-action-pills",children:(0,se.jsxs)("a",{className:"hsk-action-pill",href:Gn(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!i&&(0,se.jsx)(Qc,{intent:y,sources:f,onSend:z,loading:i}),!H&&a&&!l&&ue&&(0,se.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,se.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,se.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",v&&"hsk-cb-msg-action--copied"),onClick:()=>F(ue),"aria-label":j(v?"copied":"copy"),children:[v?(0,se.jsx)(Fr,{size:11}):(0,se.jsx)(Pr,{size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j(v?"copied":"copy")})]}),t&&(N||ue.includes("We're experiencing high demand right now"))&&S&&(0,se.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>S(e),"aria-label":j("retry"),children:[(0,se.jsx)(Cn,{className:P?"hsk-retry-icon--spinning":"",size:11}),(0,se.jsx)("span",{className:"hsk-cb-msg-action-label",children:j("retry")})]})]})})]})})})}var wt,Zc,se,el,rl=Ce(()=>{"use strict";wt=Zt(require("react")),Zc=require("@akropolys/sdk");Tt();jc();Ko();Vc();zn();Fa();Xo();Jc();Wt();se=require("react/jsx-runtime"),el=wt.default.memo(({content:e,streaming:r,hosts:t})=>(0,se.jsx)(se.Fragment,{children:Oc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);el.displayName="MarkdownBlock"});function nl({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:s}){return(0,je.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,je.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,je.jsx)(mr,{})}),(0,je.jsx)("div",{className:"hsk-cb-ai-body",children:(0,je.jsx)("div",{className:"hsk-cb-ai-text",children:(0,je.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,je.jsx)("label",{className:"hsk-cb-phone-label",children:s("keyPastePrompt")}),(0,je.jsx)("input",{type:"text",className:"hsk-cb-phone-input",placeholder:s("keyPastePlaceholder"),value:e,onChange:o=>r(o.target.value),onKeyDown:o=>o.key==="Enter"&&n(),autoFocus:!0}),(0,je.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,je.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:s("keyUseMine")}),(0,je.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:s(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function al({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:s}){return(0,je.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,je.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,je.jsx)(mr,{})}),(0,je.jsx)("div",{className:"hsk-cb-ai-body",children:(0,je.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,je.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,je.jsx)("span",{className:"hsk-cb-secret-title",children:s("keySecretTitle")}),(0,je.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,je.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":s("keyDismiss"),children:"\xD7"})]}),(0,je.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,je.jsx)("code",{children:e}),(0,je.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,je.jsx)(Fr,{}):(0,je.jsx)(Pr,{}),s(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,je.jsx)("span",{className:"hsk-cb-secret-hint",children:s("keySecretHint")})]})})]})}var je,ol=Ce(()=>{"use strict";Wt();je=require("react/jsx-runtime")});function Yp(e,r){for(let t=r-1;t>=0;t--){let n=e[t];if(n.visualization&&n.visualizationType!=="video")return n.visualization;if(n.images?.length)return n.images[n.images.length-1]}}function sl({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:s,referencedIds:o,discussedSources:c,lastIntent:i,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:y,keyPhase:b,keyInput:M,setKeyInput:g,mintedKey:E,setMintedKey:R,setMintedPub:z,minting:_,copied:S,keyCountdown:W,handleUseExistingKey:X,handleCreateKey:N,copyValue:P,queuedMessage:j,sendQueuedNow:D,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:H,retrying:A,continueGenerating:v,t:L,spacerRef:I,vizState:V,setVizState:T,messages:C,doodleTheme:m}){return(0,rt.jsxs)(rt.Fragment,{children:[(()=>{let ae=-1;for(let G=e.length-1;G>=0;G--)if(e[G]?.role==="user"){ae=G;break}return e.map((G,B)=>{let w=B===e.length-1,k=G.role==="user",F=k&&B===ae,q=e[B+1]?.role!==G.role,oe=!q,de=e[B-1]?.role===G.role,pe=G.id||`${G.role}-${B}`,ue=e[B+1]?.content??"",K=F&&(n||a)&&!Pa(ue).content.trim(),ne=G.visualizing?Yp(e,B):void 0,ye=F&&!!f||!k&&w&&!!f||!k&&!!G.content?.includes("We're experiencing high demand right now");return(0,rt.jsx)(tl,{msg:G,idx:B,isLast:w,isLastUser:F,isRunEnd:q,runMid:oe,runCont:de,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:s,referencedIds:o,discussedSources:c,lastIntent:i,lastAction:l,vizState:V,setVizState:T,setLightboxSrc:re,setMarkupSrc:ge,handleSend:be,handleSourceClick:Y,onRetry:me,onEdit:J,onLongPress:H,hasError:ye,retrying:A,t:L,messageRef:Oe=>{r.current[B]=Oe},photosSending:K,workingOn:ne,doodleTheme:m},pe)})})(),d&&C.length>0&&(0,rt.jsxs)("div",{className:le("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,rt.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{}),(0,rt.jsx)("i",{})]}),(0,rt.jsx)("span",{className:"hsk-cb-stopped-label",children:L(h?"stoppedByYou":"stoppedInterrupted")}),(0,rt.jsxs)("button",{className:"hsk-cb-continue",onClick:v,children:[(0,rt.jsx)(js,{}),L(C[C.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,rt.jsx)("div",{className:"hsk-cb-error",children:Ei({code:y??void 0,message:f},L)}),b==="prompt_key"&&(0,rt.jsx)(nl,{keyInput:M,setKeyInput:g,minting:_,handleUseExistingKey:X,handleCreateKey:N,t:L}),E&&(0,rt.jsx)(al,{mintedKey:E,copied:S,keyCountdown:W,onDismiss:()=>{R(null),z(null)},copyValue:P,t:L}),j&&(0,rt.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,rt.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,rt.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:j.content}),(0,rt.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:D,children:[(0,rt.jsx)("span",{className:"hsk-cb-queued-dot"}),L("queuedWaiting"),(0,rt.jsx)("span",{className:"hsk-cb-queued-now",children:L("queuedSendNow")})]})]})}),(0,rt.jsx)("div",{ref:I,className:"hsk-cb-msgs-spacer"})]})}var rt,il=Ce(()=>{"use strict";Tt();Wt();Ot();rl();Fa();ol();rt=require("react/jsx-runtime")});function Jo(e){if(!e)return[];if(Qp.test(e))return e.split(/(\s+)/).filter(Boolean);let r=typeof Intl<"u"?Intl:void 0;if(r?.Segmenter){let t=new r.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e),n=>n.segment)}return e.split(/(\s+)/).filter(Boolean)}function cl({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:s=Ba}){if(!t)return null;let o=e||r||"";if(!o)return null;let c=a!==void 0?a:n,i=o.length>26,l=i?o.match(/\S+\s*/g)??[o]:Jo(o),h=Math.max(l.length-1,1),p=o.length>44?"3":i?"2":"1";return(0,Qo.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>(0,Qo.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Xp+u*s}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${o}|${c}|${u}`))})}var Qo,Ba,Xp,Qp,ll=Ce(()=>{"use strict";Qo=require("react/jsx-runtime"),Ba=16,Xp=110,Qp=/[-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/});function hl({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:s,setShowAtPicker:o,captureAllowed:c,discussedSources:i,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:y,chromeLoading:b,inputLocked:M,langSwitching:g=!1,imageInputRef:E,handleImageFiles:R,enableVision:z,enableVoice:_,canConverse:S,startVoice:W,voiceBlocked:X,textareaRef:N,classNames:P={},handleInput:j,handleKeyDown:D,voice:re,voicePhase:ge,activePlaceholder:be,loading:Y,streaming:me,stop:J,handleSend:H,voiceError:A,setVoiceError:v,t:L,rail:I,notice:V,onOpenMimi:T}){let C=(0,$a.useAkropolysContext)(),m=(0,$a.useCardFields)(),[ae,G]=Et.default.useState(0),[B,w]=Et.default.useState(!1);Et.default.useEffect(()=>{if(!A)return;let we=setTimeout(()=>{v?.("")},6e3);return()=>clearTimeout(we)},[A,v]),Et.default.useEffect(()=>{if(!B)return;let we=De=>{De.key==="Escape"&&w(!1)};return window.addEventListener("keydown",we),()=>window.removeEventListener("keydown",we)},[B]);let k=be||"Ask me anything\u2026",F=(0,Et.useRef)(null),[q,oe]=(0,Et.useState)(()=>k.length>26);(0,Et.useEffect)(()=>{let we=F.current;if(!we||r)return;let De=()=>{let Ke=we.querySelectorAll(".hsk-animated-placeholder__char");if(Ke.length<2)return oe(!1);let Se=Ke[0].offsetTop,ot=Ke[Ke.length-1].offsetTop;oe(ot-Se>Ke[0].offsetHeight/2)};De();let $e=new ResizeObserver(De);return $e.observe(we),()=>$e.disconnect()},[k,r]);let de=Math.max(Jo(k).length-1,0)*Ba,[pe,ue]=(0,Et.useState)(!1),K=(0,Et.useRef)(null),ne=()=>{K.current&&clearTimeout(K.current),ue(!0),K.current=setTimeout(()=>{ue(!1),K.current=null},550)};(0,Et.useEffect)(()=>()=>{K.current&&clearTimeout(K.current)},[]);let ye=(0,Et.useRef)(null),Oe=!!V;return(0,Et.useEffect)(()=>{ye.current?.toggleAttribute("inert",Oe)},[Oe]),(0,Z.jsxs)("div",{className:"hsk-cb-input-wrap",children:[B&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>w(!1)}),(0,Z.jsx)("div",{className:"hsk-cb-toolsheet-wrap",children:(0,Z.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[z&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),E.current?.click()},disabled:Y,children:[(0,Z.jsx)(co,{}),(0,Z.jsx)("span",{children:L("attachImage")})]}),_&&S&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{w(!1),X?v?.(L("errAccountRequired")):W("converse")},disabled:Y||b,children:[(0,Z.jsx)(lo,{}),(0,Z.jsx)("span",{children:L("voiceModeStart")})]}),T&&(0,Z.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:T,children:[(0,Z.jsx)(fa,{}),(0,Z.jsx)("span",{children:"MiMi"})]})]})})]}),V,(0,Z.jsxs)("div",{className:"hsk-cb-input-card",ref:ye,children:[(/^@kiku\b/i.test(r)||n||s)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-sub",children:L("captureAndRemember")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(we=>we.replace(/^@kiku\s*/i,"")),a(!1),o(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||s)&&(0,Z.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:we=>we.preventDefault(),children:[s&&c&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(mr,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,Z.jsxs)(Z.Fragment,{children:[i.map((we,De)=>(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(we),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:we.image?(0,Z.jsx)("img",{src:we.image,alt:""}):(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:we.name}),er(we,m)[0]&&(0,Z.jsx)("span",{className:"hsk-cb-docked-option-detail",children:er(we,m)[0].value})]},we.id??De)),i.length>1&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(i),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureAll",{count:String(i.length)})})]}),i.length===0&&(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(ba,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("captureCurrentPage")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Gs,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("whatHaveYouSaved")})]}),(0,Z.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,Z.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,Z.jsx)(Vs,{})}),(0,Z.jsx)("span",{className:"hsk-cb-docked-option-title",children:L("deleteThis")})]})]})]}),f.length>0&&(0,Z.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((we,De)=>(0,Z.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,Z.jsx)("img",{src:we.thumb||we.data,alt:`attachment ${De+1}`,className:"hsk-cb-img-thumb"}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>y(De),"aria-label":"Remove image",children:(0,Z.jsx)(ai,{size:10})})]},De))}),(0,Z.jsxs)("div",{className:le("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":ae%2?"b":"a","data-tools":B?"open":"closed",style:{"--hsk-text-sweep":`${de}ms`},children:[(0,Z.jsx)("input",{ref:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:we=>{R(we.target.files),we.target.value=""}}),(z||_&&S)&&(0,Z.jsx)("button",{className:le("hsk-cb-tools-toggle",B&&"hsk-cb-tools-toggle--open"),onClick:()=>w(we=>!we),disabled:Y||b,"aria-label":B?"Close options":"More options","aria-expanded":B,children:(0,Z.jsx)(Ks,{})}),(0,Z.jsx)(Z.Fragment,{children:z&&(0,Z.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>E.current?.click(),disabled:Y,"aria-label":"Attach image",children:(0,Z.jsx)(co,{})})}),(0,Z.jsxs)("div",{className:"hsk-cb-field",ref:F,"data-ph-lines":!r&&q?"2":void 0,children:[(0,Z.jsx)("textarea",{ref:N,value:r,onChange:j,onKeyDown:D,rows:1,placeholder:"",className:le("hsk-cb-textarea",P.input),"aria-label":be,disabled:M||Y&&!me||g}),(0,Z.jsx)(cl,{placeholder:be,visible:!r,staggerMs:Ba,replaySeed:ae})]}),_&&S&&(0,Z.jsx)("button",{className:le("hsk-cb-voice-mode-btn",X&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>X?v?.(L("errAccountRequired")):W("converse"),disabled:Y||b,"aria-label":"Voice conversation",children:(0,Z.jsx)(lo,{})}),(Y||me)&&!pe?(0,Z.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",P.sendButton),onClick:J,"aria-label":"Stop generating",children:(0,Z.jsx)(Ws,{})}):(0,Z.jsxs)("button",{className:le("hsk-cb-send",pe&&"is-launching",P.sendButton),onClick:()=>{ne(),H()},disabled:g||M||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,Z.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,Z.jsx)("defs",{children:(0,Z.jsxs)("filter",{id:e,children:[(0,Z.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,Z.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 16 -7",result:"goo"}),(0,Z.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,Z.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,Z.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,Z.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,Z.jsx)("span",{className:"hsk-cb-send-kite",children:(0,Z.jsx)(Qs,{})})]})]})]})]}),X?(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L("errAccountRequired")}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):A&&(0,Z.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>v?.(""),children:[(0,Z.jsx)("span",{children:L(A)}),(0,Z.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:we=>{we.stopPropagation(),v?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var Et,$a,Z,dl=Ce(()=>{"use strict";Et=Zt(require("react")),$a=require("@akropolys/sdk");Tt();yn();Wt();ll();Z=require("react/jsx-runtime")});function pl(e,r){let t=e.trim().match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(t){let a=t[1].length===3?t[1].split("").map(s=>s+s).join(""):t[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}let n=e.match(/-?[\d.]+/g);return!n||n.length<3?r:[Number(n[0]),Number(n[1]),Number(n[2])]}function Jp(e,r,t){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t,e[2]+(r[2]-e[2])*t]}function pn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}function ul({phase:e,theme:r,level:t,spectrum:n,bins:a,className:s}){let o=(0,Qt.useRef)(null),c=(0,Qt.useRef)(e),i=(0,Qt.useRef)(t),l=(0,Qt.useRef)(n),h=(0,Qt.useRef)(a);return(0,Qt.useEffect)(()=>{c.current=e},[e]),(0,Qt.useEffect)(()=>{i.current=t},[t]),(0,Qt.useEffect)(()=>{l.current=n},[n]),(0,Qt.useEffect)(()=>{h.current=a},[a]),(0,Qt.useEffect)(()=>{let p=o.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=pl(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),y=pl(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,M=0,g=0,E=()=>{let J=Math.min(window.devicePixelRatio||1,3),H=p.getBoundingClientRect();M=Math.max(1,H.width),g=Math.max(1,H.height),p.width=Math.round(M*J),p.height=Math.round(g*J),d.setTransform(J,0,0,J,0,0)};E();let R=typeof ResizeObserver<"u"?new ResizeObserver(E):null;R?.observe(p),window.addEventListener("resize",E);let z=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,_=new Float32Array(xr),S=[],W=null,X=-1,N=null,P=0,j=0,D=performance.now(),re=(J,H,A,v)=>J+(H-J)*(H>J?A:v),ge=()=>{let J=l.current,H=h.current?.()??0;if(!J||!H||((!N||N.length!==H)&&(N=new Uint8Array(H)),!J(N)))return!1;let v=Math.max(xr,Math.floor(H*Zp))/xr;for(let L=0;L<xr;L++){let I=Math.floor(L*v),V=Math.max(I+1,Math.floor((L+1)*v)),T=0;for(let m=I;m<V;m++)T+=N[m];let C=T/(V-I)/255;_[L]=re(_[L],C,z?.2:.55,z?.06:.14)}return!0},be=(J,H)=>{for(let A=0;A<xr;A++){let v=A/(xr-1),L=Math.pow(1-v,1.6)*(.75+.25*Math.sin(J*3.1+A*.7));_[A]=re(_[A],L*H,.3,.12)}},Y=J=>{let H=Math.min(xr-1,Math.max(0,J*(xr-1))),A=Math.floor(H),v=H-A,L=_[A],I=_[Math.min(xr-1,A+1)];return L+(I-L)*v*v*(3-2*v)},me=J=>{b=requestAnimationFrame(me);let H=(J-D)/1e3,A=c.current,v=Math.min(1,i.current());P=re(P,Math.max(A==="speaking"?.42:A==="listening"?.3:A==="thinking"?.28:.12,v),z?.1:.5,z?.05:.11),ge()||be(H,Math.max(.25,P)),d.clearRect(0,0,M,g);let I=g/2;j=A==="thinking"?(j+.012)%1.6:0;let V=3;if(X!==M){S=[];for(let m=0;m<V;m++){let ae=m/(V-1||1),G=Jp(f,y,ae*.5),B=d.createLinearGradient(0,0,M,0);B.addColorStop(0,pn(G,0)),B.addColorStop(.5,pn(G,.9-ae*.35)),B.addColorStop(1,pn(G,0)),S.push(B)}W=d.createLinearGradient(0,0,M,0),W.addColorStop(0,pn(f,0)),W.addColorStop(.5,pn(f,.14)),W.addColorStop(1,pn(f,0)),X=M}let T=g*.32,C=Math.max(4,M/130);for(let m=0;m<V;m++){let ae=m/(V-1||1),G=m*.055,B=1-ae*.22;d.beginPath();let w=0,k=I;for(let q=0;q<=M;q+=C){let oe=q/M,de=Math.pow(Math.sin(Math.PI*oe),.85),pe=A==="thinking"?Math.exp(-Math.pow((oe-(j-.3))*4.5,2)):1,ue=Y(Math.abs(oe-.5)*2),K=H-G,ne=Math.sin(oe*Math.PI*2*2.1+K*7.4)*.66+Math.sin(oe*Math.PI*2*3.7-K*5.6)*.26+Math.sin(oe*Math.PI*2*5.9+K*9.1)*.08,ye=I+de*pe*B*T*P*(.6+ue*1.1)*ne+Math.sin(oe*Math.PI*2*.6+(H-G)*2.2)*de*g*.01;q===0?d.moveTo(q,ye):d.quadraticCurveTo(w,k,(w+q)/2,(k+ye)/2),w=q,k=ye}d.quadraticCurveTo(w,k,M,k),d.lineCap="round",d.lineJoin="round";let F=(m===0?3:1.6)*(1+P*.6);m===0&&(d.strokeStyle=W,d.lineWidth=F*5,d.stroke()),d.strokeStyle=S[m],d.lineWidth=F,d.stroke()}};return b=requestAnimationFrame(me),()=>{cancelAnimationFrame(b),R?.disconnect(),window.removeEventListener("resize",E)}},[r]),(0,ml.jsx)("canvas",{ref:o,className:s,"aria-hidden":"true"})}var Qt,ml,xr,Zp,bl=Ce(()=>{"use strict";Qt=require("react"),ml=require("react/jsx-runtime");xr=24,Zp=.42});function Yn({src:e,onClose:r}){return e?(0,un.jsxs)("div",{className:"hsk-lightbox",onClick:r,children:[(0,un.jsx)("button",{className:"hsk-lightbox-close",onClick:r,"aria-label":"Close image",children:(0,un.jsx)(Zr,{})}),(0,un.jsx)("img",{src:e,alt:"",className:"hsk-lightbox-img",onClick:t=>t.stopPropagation()})]}):null}var un,Zo=Ce(()=>{"use strict";Wt();un=require("react/jsx-runtime")});function eu({images:e,siteId:r,themeAttr:t}){let n=(0,mt.useRef)(null),[a,s]=(0,mt.useState)(null);if((0,mt.useEffect)(()=>{let i=n.current;i&&i.scrollTo({left:i.scrollWidth,behavior:"smooth"})},[e.length]),!e.length)return null;let o=e.findIndex(i=>i.pending),c=o>0?e.slice(0,o).reverse().find(i=>i.url)?.id:void 0;return(0,Me.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(i=>(0,Me.jsxs)("button",{type:"button",className:"hsk-voice-image","data-pending":i.pending?"":void 0,disabled:i.pending,onClick:()=>s(i.url),children:[i.pending&&(0,Me.jsx)(an,{active:!0,seed:r,theme:t}),i.url&&(0,Me.jsx)("img",{src:i.url,alt:"",draggable:!1},i.url),i.url&&(0,Me.jsx)(an,{active:!!i.sending||i.id===c,seed:r,theme:t})]},i.id)),a&&(0,Me.jsx)(Yn,{src:a,onClose:()=>s(null)})]})}function tu({current:e,choose:r,label:t,groups:n}){let a=In.find(l=>l.name===e),[s,o]=(0,mt.useState)(!1),c=(0,mt.useRef)(null),i=(0,mt.useRef)(null);return(0,mt.useEffect)(()=>{if(i.current&&(i.current.inert=!s),!s)return;let l=i.current,h=l?.querySelector('[aria-checked="true"]');l&&h&&(l.scrollTop=h.offsetTop-(l.clientHeight-h.offsetHeight)/2);let p=u=>{c.current&&!u.composedPath().includes(c.current)&&o(!1)},d=u=>{u.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[s]),(0,Me.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":s?"":void 0,dir:"ltr",children:[(0,Me.jsxs)("button",{type:"button",className:"hsk-voice-pill hsk-voice-pill--current","aria-haspopup":"true","aria-expanded":s,"aria-label":`${t}: ${a?.trait??e} (${e})`,onClick:()=>o(l=>!l),children:[(0,Me.jsx)("span",{children:a?.trait??e}),(0,Me.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Me.jsx)(tn,{})})]}),(0,Me.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:i,children:["male","female"].map(l=>(0,Me.jsxs)(mt.default.Fragment,{children:[(0,Me.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),In.filter(h=>h.gender===l).map(h=>(0,Me.jsxs)("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:le("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),o(!1)},children:[(0,Me.jsx)("span",{className:"hsk-voice-option-name",children:h.trait}),(0,Me.jsx)("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function fl({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:s,voiceConnecting:o,voicePhase:c,live:i,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:y,t:b}){let M=(0,mt.useRef)(null),g=(0,mt.useRef)(null),E=(0,mt.useRef)(null),R=[...l.turns,...i.turns??[]],z=[...l.images,...i.images??[]],_=i.sources??[],[S,W]=(0,mt.useState)(null),X=z.some(D=>D.pending),N=R.length,P=R[N-1]?.text??"",j=(0,mt.useRef)(!1);return(0,mt.useEffect)(()=>{g.current?.scrollIntoView({block:"end",behavior:j.current?"smooth":"auto"}),j.current=!0},[N,P]),(0,Me.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Me.jsx)(va,{seed:e,theme:r}),R.some(D=>D.text)&&(0,Me.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:o,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Me.jsx)(ka,{size:15})}),(0,Me.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Me.jsx)(Zr,{})}),(0,Me.jsx)(tu,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Me.jsxs)("div",{className:"hsk-voice-thread",ref:M,children:[R.filter(D=>D.text).map((D,re)=>D.role==="user"?(0,Me.jsx)("div",{className:"hsk-cb-user-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!D.done&&"hsk-voice-turn--live"),children:D.text})},re):(0,Me.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-ai-body",!D.done&&"hsk-voice-turn--live"),children:D.text})},re)),(0,Me.jsx)("div",{ref:g})]}),(z.length>0||_.length>0)&&(0,Me.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Me.jsx)(eu,{images:z,siteId:e,themeAttr:r}),_.length>0&&(0,Me.jsx)("div",{className:"hsk-voice-sources",children:(0,Me.jsx)(Ha,{sources:_,onSelectSource:y,onImageClick:W,referencedIds:_.map(D=>D.id).filter(D=>!!D),compact:!0})})]}),S&&(0,Me.jsx)(Yn,{src:S,onClose:()=>W(null)}),o&&(0,Me.jsxs)("div",{className:"hsk-voice-connecting",role:"status",children:[(0,Me.jsx)("span",{className:"hsk-voice-connecting-dot"}),(0,Me.jsx)("span",{children:b("voiceConnecting")})]}),u&&(0,Me.jsx)("div",{className:"hsk-voice-error",children:b(u)}),(0,Me.jsxs)("div",{className:"hsk-voice-controls",dir:"ltr",children:[i.photos&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("input",{ref:E,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:D=>{let re=D.target.files?.[0];D.target.value="",re&&f(re)}}),(0,Me.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:o||X,onClick:()=>E.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Me.jsx)(Ys,{})})})]}),(0,Me.jsx)("div",{className:le("hsk-voice-stage",o&&"hsk-voice-stage--connecting"),children:(0,Me.jsx)(ul,{className:"hsk-voice-canvas",theme:r,phase:c,level:i.micLevel,spectrum:i.micSpectrum,bins:i.spectrumBins})}),(0,Me.jsx)("button",{className:le("hsk-voice-control",p&&"hsk-voice-control--muted",o&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:o,onClick:()=>d(D=>!D),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Me.jsx)(Xs,{}):(0,Me.jsx)(Sn,{})},p?"off":"on")})]})]})}var mt,Me,kl=Ce(()=>{"use strict";mt=Zt(require("react"));Tt();Wt();Ot();bl();zn();Zo();Xo();Me=require("react/jsx-runtime")});function ru(e,r){let t=e.filter(Boolean);if(t.length<2)return null;let n=i=>i.offsetTop+i.offsetHeight/2,a=n(t[t.length-1])+10,s=i=>(i===r?gl*1.3:gl*.6)*(i%2?1:-1),o=`M ${Xn} 0`,c=0;return t.forEach((i,l)=>{let h=n(i),p=c+(h-c)/2;o+=` C ${Xn+s(l)} ${p}, ${Xn+s(l)} ${p}, ${Xn} ${h}`,c=h}),{d:o+` L ${Xn} ${a}`,height:a}}function xl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let s=zr(),o=(0,vr.useRef)(null),c=(0,vr.useRef)(null),i=(0,vr.useRef)([]),l=(0,vr.useRef)(null),[h,p]=(0,vr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,vr.useEffect)(()=>{let u=i.current[d],f=l.current,y=c.current,b=o.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(ru(i.current,d)),y&&b)){let M=b.clientHeight;if(y.scrollHeight>M&&M>0){let E=u.offsetTop+u.offsetHeight/2,R=M/2-E;y.style.transform=`translateY(${R}px)`}else y.style.transform="none"}},[d,e.length]),e.length<2?null:(0,hr.jsx)("nav",{ref:o,className:le("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":s("timelineLabel"),children:(0,hr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,hr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,hr.jsx)("path",{d:h.d})}),(0,hr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,hr.jsxs)("button",{ref:y=>{i.current[f]=y},type:"button",className:le("hsk-cb-tl-item",f===d&&"hsk-cb-tl-item--on"),style:{"--hsk-tl-d":Math.min(Math.abs(f-d),4)},onClick:()=>n(u.idx),title:u.text,children:[(0,hr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,hr.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var vr,hr,Xn,gl,vl=Ce(()=>{"use strict";vr=require("react");Tt();Ot();hr=require("react/jsx-runtime"),Xn=14,gl=6});function yl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,isUser:s,isRTL:o=!1,canRetry:c,onPin:i,onRetry:l,onCopy:h,onClose:p,t:d}){let[u,f]=(0,Ct.useState)(!1),y=(0,Ct.useRef)(null),{closing:b,requestClose:M}=jn(nu,p);(0,Ct.useEffect)(()=>{let q=oe=>{oe.key==="Escape"&&M()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[M]);let g=(0,Ct.useCallback)(async()=>{await h(e.content||"")&&(f(!0),setTimeout(M,450))},[e.content,h,M]),E=(0,Ct.useCallback)(()=>{tr("pin"),i(e),M()},[e,i,M]),R=(0,Ct.useCallback)(()=>{l&&l(e),M()},[e,l,M]),[z,_]=(0,Ct.useState)(0);(0,Ct.useEffect)(()=>{if(y.current){let q=y.current.offsetWidth;q&&Math.abs(q-z)>2&&_(q)}},[z]);let[S,W]=(0,Ct.useState)(r),[X,N]=(0,Ct.useState)(t);(0,Ct.useEffect)(()=>{if(!n)return;let q=0,oe=(pe,ue)=>Math.abs(pe-ue)<.5,de=()=>{let pe=n.getBoundingClientRect();if(W(ue=>oe(ue.top,pe.top)&&oe(ue.left,pe.left)&&oe(ue.width,pe.width)&&oe(ue.height,pe.height)?ue:{top:pe.top,left:pe.left,width:pe.width,height:pe.height}),a){let ue=a.getBoundingClientRect();N(K=>K&&oe(K.top,ue.top)&&oe(K.left,ue.left)&&oe(K.width,ue.width)?K:{top:ue.top,left:ue.left,width:ue.width,height:ue.height})}q=requestAnimationFrame(de)};return q=requestAnimationFrame(de),()=>cancelAnimationFrame(q)},[n,a]);let[P,j]=(0,Ct.useState)("");(0,Ct.useEffect)(()=>{if(!n)return;let q=getComputedStyle(n).backgroundColor;q&&q!=="rgba(0, 0, 0, 0)"&&q!=="transparent"&&j(q)},[n]);let D=S,re=X??t,ge=re?.top??0,be=re?.left??0,Y=re?.width??(typeof window<"u"?window.innerWidth:390),me=D.top-ge,J=D.left-be,H=D.width,A=D.height,v=2;c&&l&&v++;let I=z||(v===2?122:170),V=36,T=!!n?.closest(".hsk-cb-think")||!!n?.parentElement?.querySelector(".hsk-cb-think-head"),C=me>=58&&!T,m=C?Math.max(8,me-V-9):Math.min(me+A+9,(re?.height??800)-V-8),ae=s?o:!o,G=ae?Math.min(Y-18,J+H-7):Math.max(18,J+7),B=ae?G-I+18:G-18;B=Math.max(10,Math.min(B,Y-I-10));let w=Math.max(18,Math.min(G-B,I-18)),k=P||(s?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),F=0;return(0,bt.jsx)("div",{className:"hsk-tapback-overlay",onClick:M,children:(0,bt.jsxs)("div",{ref:y,className:le("hsk-tapback-group",b&&"is-closing",C?"is-above":"is-below",s?"is-user":"is-ai"),style:{top:`${m}px`,left:`${B}px`,"--tail-x":`${w}px`,"--tail-dir":ae?1:-1,"--tail-step":s?"9px":"8px","--hsk-anchor-color":k,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},onClick:q=>q.stopPropagation(),children:[(0,bt.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,bt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:E,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":F++},children:[(0,bt.jsx)(oi,{size:14}),(0,bt.jsx)("span",{children:"Pin"})]}),c&&l&&(0,bt.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:R,"aria-label":d("retry"),style:{"--tool-idx":F++},children:[(0,bt.jsx)(Cn,{size:14}),(0,bt.jsx)("span",{children:d("retry")})]}),(0,bt.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",u&&"is-copied"),onClick:g,"aria-label":d(u?"copied":"copy"),style:{"--tool-idx":F++},children:[u?(0,bt.jsx)(Fr,{size:14}):(0,bt.jsx)(Pr,{size:14}),(0,bt.jsx)("span",{children:d(u?"copied":"copy")})]})]}),(0,bt.jsxs)("div",{className:le("hsk-tapback-tail",C?"is-above":"is-below"),style:{left:`${w}px`},children:[(0,bt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,bt.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})})}var Ct,bt,nu,wl=Ce(()=>{"use strict";Ct=require("react");Tt();Jr();Vo();Wt();bt=require("react/jsx-runtime"),nu=190});function Cl({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:s,onSelectSource:o,chips:c=Nn,theme:i,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let y=(0,Ua.useAkropolysContext)(),b=(0,Ua.useCardFields)(),{messages:M,sources:g,loading:E,streaming:R,error:z,errorCode:_,lastAction:S,lastIntent:W,allowedActions:X,send:N,queuedMessage:P,sendQueuedNow:j,appendSpokenExchange:D,stop:re,stopped:ge,interrupted:be,continueGenerating:Y,reset:me,referencedIds:J,humanPending:H,leaveHuman:A}=(0,qa.useKiku)(),[v,L]=(0,ee.useState)(null),I=(0,ee.useRef)(null),V=(0,ee.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||I.current?.animate([0,-7,6,-4,2,0].map(x=>({transform:`translateX(${x}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,ee.useEffect)(()=>{if(!v)return;let x=Le=>{(Le.key.length===1||Le.key==="Enter"||Le.key==="Backspace")&&V()},O=Le=>{let ze=Ge=>Le.composedPath().some(Fe=>Fe.classList?.contains(Ge));!ze("hsk-cb-leave")&&!ze("hsk-cb-topbar")&&V()},ke=vn.current;return ke?.setAttribute("inert",""),document.addEventListener("keydown",x),document.addEventListener("pointerdown",O,!0),()=>{ke?.removeAttribute("inert"),document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",O,!0)}},[v,V]);let[T,C]=(0,ee.useState)(()=>{try{return y.getShopperName?.()??""}catch{return""}}),[m,ae]=(0,ee.useState)(()=>{try{return y.getShopperLanguage?.()??""}catch{return""}}),[G,B]=(0,ee.useState)(()=>{try{return y.getEntityLanguageMode?.()??""}catch{return""}}),[w,k]=(0,ee.useState)(!1),[F,q]=(0,ee.useState)(null),[oe,de]=(0,ee.useState)(""),[pe,ue]=(0,ee.useState)(!1),{chromeReady:K,baseFontReady:ne,isRTL:ye,speechLang:Oe,scriptFont:we,fontStack:De,isNonLatin:$e,hostFontCovers:Ke,t:Se,tNode:ot}=Di({shopperLanguage:m||oe,theme:i,preloadedStrings:F}),ct=ee.default.useMemo(()=>{let x=g.filter(Fe=>Fe.id&&J.includes(Fe.id)),O=[...M].reverse().find(Fe=>Fe.role==="assistant")?.content??"";if(!O)return x;let ke=new Set(x.map(Fe=>Fe.id)),Le=O.toLowerCase().replace(/\s+/g," "),ze=Fe=>{let gt=String(Fe??"").toLowerCase().replace(/\s+/g," ").trim(),Xe=gt.split(" "),Gt=[gt];return Xe.length>3&&Gt.push(Xe.slice(0,3).join(" ")),Xe.length>4&&Gt.push(Xe.slice(0,4).join(" ")),Gt.filter(Yr=>Yr.length>=5)},Ge=g.filter(Fe=>Fe.id&&!ke.has(Fe.id)&&ze(Fe.name).some(gt=>Le.includes(gt)));return[...x,...Ge]},[g,J,M]),qt=X===null||X.includes("capture"),[zt,nt]=(0,ee.useState)(""),[yr,Ut]=(0,ee.useState)(!1),[dr,lt]=(0,ee.useState)(!1),[nr,Ht]=(0,ee.useState)([]),ve=(0,ee.useRef)(new Map),ht=(0,ee.useRef)(null),[Bt,Lt]=(0,ee.useState)({}),[St,Nt]=(0,ee.useState)(null),[jt,$t]=(0,ee.useState)(null),[at,It]=(0,ee.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),U=M.length===0,ie=oe||m,xe=!ie||ie.toLowerCase()==="english"||ie.toLowerCase()==="en",Q=pe||!!oe||!!m&&!K&&!xe,fe=U&&!m&&!Q,he=U&&!!m&&!T&&!Q,Pe=U&&!!m&&!!T&&!G,Ne=U&&!!m&&!!T&&!!G&&!at,Ye=fe||he||Pe||Ne||Q,kt=Pe||Ne||Q,[wr,Wr]=(0,ee.useState)(Q),[Or,bn]=(0,ee.useState)(!1),[fn,jr]=(0,ee.useState)(!1),[Qn,Ie]=(0,ee.useState)(!1),tt=(0,ee.useRef)(!1),Be=(0,ee.useRef)(null),At=(0,ee.useRef)(null);Q!==wr&&(Wr(Q),Q?(At.current&&clearTimeout(At.current),Ie(!1),jr(!0),Be.current=setTimeout(()=>{bn(!0),jr(!1),tt.current=!0},280)):(Be.current&&clearTimeout(Be.current),jr(!1),bn(!1),tt.current&&(tt.current=!1,Ie(!0),At.current=setTimeout(()=>Ie(!1),560)))),(0,ee.useEffect)(()=>()=>{Be.current&&clearTimeout(Be.current),At.current&&clearTimeout(At.current)},[]);let dt=ee.default.useMemo(()=>M.some(x=>x.liveKeys?.length>0),[M]);(0,ee.useEffect)(()=>{if(dt)return(0,qa.subscribeLiveStream)({client:y})},[dt,y]);let[Mt,Jn]=(0,ee.useState)(!1);(0,ee.useEffect)(()=>{let x=window.matchMedia?.("(max-width: 1199px)");if(!x)return;let O=()=>Jn(x.matches);return O(),x.addEventListener?.("change",O),()=>x.removeEventListener?.("change",O)},[]);let Zn=async x=>{let O=x.trim();if(!O){try{y.setShopperLanguage?.("")}catch{}ae(""),de(""),q(null);return}if(de(O),ue(!0),O.toLowerCase()==="english"||O.toLowerCase()==="en"){q(Pt);try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);return}let Le=Date.now(),ze=1200;try{let Fe=y.getCachedUIStrings?.(O,Er)??y.getCachedUIStrings?.(O,Pt);if(Fe?.strings&&Object.keys(Fe.strings).length>0)q(Fe.strings),Fe.font&&await Kt(Fe.font,800);else{let gt=y.getUIStrings?.(O,Er),Xe=await Promise.race([gt,new Promise(Gt=>setTimeout(()=>Gt(null),8e3))]);Xe?.font&&await Kt(Xe.font,1200),Xe?.strings&&Object.keys(Xe.strings).length>0&&q(Xe.strings)}}catch{}let Ge=Date.now()-Le;Ge<ze&&await new Promise(Fe=>setTimeout(Fe,ze-Ge));try{y.setShopperLanguage?.(O)}catch{}ae(O),de(""),ue(!1),k(!1);try{y.getUIStrings?.(O,Pt)?.catch?.(()=>{})}catch{}},Gr=x=>{try{y.setEntityLanguageMode?.(x)}catch{}B(x),at&&k(!0)},Cr=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}It(!0),k(!0)},Wa=Q?Dr(oe||m).preparing:fe?Se("langPlaceholder"):he?Se("namePlaceholder"):Pe?Se("entityLangPlaceholder"):Ne?Se("termsPlaceholder"):t==="Ask me anything\u2026"?Se("defaultPlaceholder"):t,Oa=!c||c===Nn?[]:Array.isArray(c)?c:[],ja=fe?"curious":he?"welcoming":Pe?"guiding":Ne?"focused":"happy",[Sr,Ga]=(0,ee.useState)(()=>da(i)),[Va,ns]=(0,ee.useState)(!1),kn=(0,ee.useRef)(null);(0,ee.useEffect)(()=>()=>{kn.current&&clearTimeout(kn.current)},[]);let as=(0,ee.useRef)(null),Fl=()=>{let x=vn.current;if(!x?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let O=ye?-3:3;as.current?.cancel(),as.current=x.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${O}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-O*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${O*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},os=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(os.current)return;let x=vn.current;if(!x){vo();return}let O=!1,ke=()=>x.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Le=()=>{O||(O=!0,os.current=!0,ze.disconnect(),clearTimeout(Ge),vo())},ze=new MutationObserver(()=>{ke()&&Le()});ze.observe(x,{childList:!0,subtree:!0});let Ge=window.setTimeout(Le,2e3);return ke()&&Le(),()=>{O=!0,ze.disconnect(),clearTimeout(Ge)}},[]);let ss=(x,O=!1)=>{ns(!0),kn.current&&clearTimeout(kn.current),kn.current=setTimeout(()=>ns(!1),420),Ga(x),Fl(),O&&Qa();try{localStorage.setItem("akropolys_theme",x)}catch{}},{vars:_l}=Qr(i),Vr=Sr;ma(i);let is=(0,ee.useRef)(()=>{}),pr=(0,ee.useRef)(null),Mr=async(x,O,ke,Le)=>{let ze=(x??zt).trim(),Ge=O??nr;if(!ze&&Ge.length===0||!K||P)return;if(tr("send"),he){if(!ze)return;let Xe=Ri(ze)||ze.slice(0,40);try{y.setShopperName?.(Xe)}catch{}C(Xe),nt("");return}if(fe){if(!ze||pe)return;nt(""),Zn(ze);return}if(kt){nt("");return}Ut(!1),lt(!1),nt(""),Ht([]);let Fe=(await Promise.all(Ge.map(async({thumb:Xe,...Gt})=>{let Yr=Gt.data||(Xe?await ve.current.get(Xe)?.catch(()=>""):"")||"";return Xe&&URL.revokeObjectURL(Xe),{...Gt,data:Yr}}))).filter(Xe=>Xe.data),gt=ze||(Fe.some(Xe=>Xe.type==="image")?"Analyze this image":"What is this?");await N(gt,ze,Fe.length>0?Fe:void 0,ke,Le)},[Dl,cs]=(0,ee.useState)(!1),ea=(0,ee.useCallback)(async x=>{let O=x&&x.role==="user"?x:[...M].reverse().find(ke=>ke.role==="user");if(O?.content){cs(!0);try{await Mr(O.content)}finally{cs(!1)}}},[M,Mr]),Hl=(0,ee.useCallback)(x=>{x?.content&&(nt(x.content),setTimeout(()=>{if(pr.current){pr.current.focus();let O=x.content.length;try{pr.current.setSelectionRange(O,O)}catch{}}},50))},[nt,pr]),Bl=(0,ee.useCallback)(async()=>{await ea()},[ea]),{keyInput:$l,setKeyInput:ql,keyPhase:Ul,setKeyPhase:ls,mintedKey:Wl,setMintedKey:Ol,mintedPub:lu,setMintedPub:jl,copied:Gl,keyCountdown:Vl,minting:Kl,copyValue:Yl,handleUseExistingKey:Xl,handleCreateKey:Ql}=Oi(S,Bl),hs=(0,ee.useCallback)(()=>{let x=y?.getKikuKey?.();x&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(x)}`,"_blank","noopener")},[y]),[gn,ds]=(0,ee.useState)(null),Jl=(0,ee.useCallback)((x,O,ke,Le)=>{ds({msg:x,rect:O,isUser:ke,el:Le})},[]),Zl=(0,ee.useCallback)(async x=>{let O=(x.content||"").replace(/^(@kiku pin\s*)+/i,""),Le=`@kiku pin ${O.slice(0,50).replace(/\n+/g," ")}`;await N(O||"pin message",Le,void 0,"capture")},[N]),{handleKikuCapture:eh,handleKikuCaptureAll:th,handleKikuViewHistory:rh,handleKikuDelete:nh}=Gi({attachments:nr,setAttachments:Ht,setInput:nt,send:N,t:Se}),{voiceMode:ps,voicePhase:us,voiceConnecting:ah,voiceError:Ka,setVoiceError:ms,voiceMuted:oh,setVoiceMuted:sh,voiceSecondsLeft:ih,voiceBlocked:ch,liveVoiceName:lh,chooseVoice:hh,canConverse:dh,startVoice:ph,stopVoice:uh,voice:mh,live:bs,earlier:bh,newVoiceChat:fh,attachPhoto:kh}=xc({voiceLang:p,speechLang:Oe,shopperLanguage:m,ttsVoice:u,messages:M,handleSendUtterance:x=>is.current(x),appendSpokenExchange:D}),ta=(0,ee.useRef)(null),[Tr,ra]=(0,ee.useState)(!1),[gh,xh]=(0,ee.useState)(null),na=(0,ee.useRef)(null),Ya=(0,ee.useRef)(null),fs=(0,ee.useRef)([]),xn=(0,ee.useRef)(null),vh=`hsk-goo-${(0,ee.useId)()}`,{closing:Xa,requestClose:ks,closeNow:Qa}=jn(Mt?ou:au,()=>ra(!1));(0,ee.useEffect)(()=>{if(!Tr)return;let x=O=>{let ke=O.composedPath?O.composedPath():[],Le=na.current&&(ke.includes(na.current)||na.current.contains(O.target)),ze=Ya.current&&(ke.includes(Ya.current)||Ya.current.contains(O.target)),Ge=O.target,Fe=Ge?.closest?.(".hsk-cb-topbar-mark"),gt=Ge?.closest?.(".hsk-cb-topbar-ooze-menu")||ke.some(Xe=>Xe?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Le||ze||Fe||gt||ks()};return document.addEventListener("mousedown",x),document.addEventListener("touchstart",x,{passive:!0}),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("touchstart",x)}},[Tr]);let{msgsContainerRef:vn,spacerRef:yh,lastExternalScrollRef:wh,showJumpToBottom:Ch,scrollProgress:Sh,activeMsgIdx:Mh,unreadBelow:Th,jumpToMessage:Rh,jumpToBottom:Eh}=Bi({messages:M,loading:E,streaming:R,messageRefs:fs}),{closing:zh,requestClose:gs}=jn(su,s),aa=(0,ee.useCallback)(x=>{x&&A(),ra(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?s():gs()},[gs,s,A]),oa=(0,ee.useCallback)(()=>{v?V():H?L("close"):aa(!1)},[H,aa,v,V]);si({panel:(0,ee.useCallback)(()=>ta.current,[]),scroller:(0,ee.useCallback)(()=>vn.current,[]),onDismiss:s,quiescent:(0,ee.useCallback)(()=>performance.now()-wh.current>90,[])}),(0,ee.useEffect)(()=>{if(typeof window>"u")return;let x=window.innerWidth-document.documentElement.clientWidth,O=document.body.style.overflow,ke=document.body.style.paddingRight;if(x>0){let Le=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Le+x}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${x}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=O,document.body.style.paddingRight=ke,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,ee.useEffect)(()=>{let x=window.visualViewport;if(!x)return;let O=document.documentElement,ke=()=>{O.style.setProperty("--hsk-vvh",`${x.height}px`)};return ke(),x.addEventListener("resize",ke),x.addEventListener("scroll",ke),()=>{x.removeEventListener("resize",ke),x.removeEventListener("scroll",ke),O.style.removeProperty("--hsk-vvh")}},[]),(0,ee.useEffect)(()=>{let x=O=>{if(O.key==="Escape"){if(St){Nt(null);return}oa()}};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[St,oa]);let sa=(0,ee.useCallback)(x=>{x&&A(),me(),ls("idle")},[me,ls,A]),Lh=(0,ee.useCallback)(()=>{v?V():H?L("reset"):sa(!1)},[H,sa,v,V]),Nh=x=>{o?.(x);let O=[...M].reverse().find(ke=>ke.role==="assistant");if(O&&O.content.trim().endsWith("?")){N(Se("cardClickAnswer",{name:x.name}));return}N(Se("cardClickQuery",{name:x.name,details:eo(er(x,b))}))},Ih=x=>{nt(x+" "),lt(!1),Ut(!0),pr.current&&pr.current.focus()},Ah=x=>{if(x.key==="Escape"&&yr){x.preventDefault(),Ut(!1);return}if(x.key==="Escape"&&dr){x.preventDefault(),lt(!1);return}x.key==="Enter"&&!x.shiftKey&&!x.nativeEvent.isComposing&&(x.preventDefault(),Mr())},Ja=(0,ee.useRef)(28),xs=(0,ee.useRef)(280),Za=(0,ee.useRef)(null),Ph=(x,O)=>{try{!Za.current&&typeof document<"u"&&(Za.current=document.createElement("canvas"));let ke=Za.current?.getContext("2d");return ke?(ke.font=O,ke.measureText(x).width):x.length*8.5}catch{return x.length*8.5}},Fh=x=>{let O=x.closest(".hsk-cb-input-box");if(!O)return;let ke=x.value;!(O.dataset.expanded==="true")&&x.clientWidth>50&&(xs.current=x.clientWidth);let ze=window.getComputedStyle(x),Ge=ze.font||`${ze.fontSize||"16px"} ${ze.fontFamily||"Geist, sans-serif"}`,Fe=Ph(ke,Ge),gt=Math.max(120,xs.current-14),Xe=ke.includes(`
|
|
38
|
+
`),Gt=!!(ke&&(Xe||Fe>gt));if(O.dataset.expanded!==(Gt?"true":"false")&&(O.dataset.expanded=Gt?"true":"false"),!ke){Ja.current=28,x.style.height="";return}if(!Gt){Ja.current=28,x.style.height="";return}x.style.height="auto";let Yr=Math.max(28,Math.min(x.scrollHeight,140));Ja.current=Yr,x.style.height=`${Yr}px`};(0,ee.useEffect)(()=>{pr.current&&Fh(pr.current)},[zt]);let _h=x=>{let O=x.target.value;nt(O),Ka&&ms("");let ke=O.trim();lt(ke==="@"),Ut(/^@kiku\s*$/i.test(ke))};(0,ee.useEffect)(()=>{is.current=x=>{Mr(x)}});let Dh=async x=>{if(!x||x.length===0)return;let O=Array.from(x);for(let ke of O){if(!ke.type.startsWith("image/"))continue;let Le=URL.createObjectURL(ke),ze=xa(ke);ve.current.set(Le,ze),Ht(Ge=>[...Ge,{type:"image",data:"",thumb:Le}]),ze.then(Ge=>Ht(Fe=>Fe.map(gt=>gt.thumb===Le?{...gt,data:Ge}:gt))).catch(()=>Ht(Ge=>Ge.filter(Fe=>Fe.thumb!==Le))).finally(()=>ve.current.delete(Le))}},Hh=x=>{Ht(O=>{let ke=O[x]?.thumb;return ke&&URL.revokeObjectURL(ke),O.filter((Le,ze)=>ze!==x)})},Bh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),$h=a||Bh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},vs=(0,ee.useRef)(!1);(0,ee.useEffect)(()=>{if(vs.current&&!R){let x=M[M.length-1];x&&x.role!=="user"&&tr("reply")}vs.current=R},[R,M]);let ys=(ge||be)&&!E&&!R,ia=M[M.length-1],ca=qi(ia?.role==="assistant"?ia.content??"":""),qh=ia?.role==="assistant"&&ca.length<(ia.content?.length??0),Uh=R||qh,Kr=ee.default.useMemo(()=>{let x=E||R,O=M.filter((ze,Ge)=>ze.role!=="assistant"||Ge===M.length-1&&x?!0:!!ze.content||!!ze.visualization||ze.visualizing||(ze.knowledgeImages?.length??0)>0||(ze.referencedIds?.length??0)>0||On(ze.statusStage)),ke=O.length-1;if(ke<0||O[ke].role!=="assistant"||O[ke]!==M[M.length-1])return O;let Le=ca.length<(O[ke].content?.length??0);return!x&&!Le?O:O.map((ze,Ge)=>Ge===ke?{...ze,content:ca}:ze)},[M,E,R,ca]),Wh=ee.default.useMemo(()=>{let x=[];return Kr.forEach((O,ke)=>{if(O.role==="user"&&O.content.trim()){let Le=O.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();x.push({idx:ke,text:Le.length>28?Le.slice(0,27).trimEnd()+"\u2026":Le})}}),x},[Kr]),Oh=ys&&Kr[Kr.length-1]?.role!=="assistant",ws=(0,ee.useRef)(Date.now());return(0,ee.useEffect)(()=>{ws.current=Date.now()},[]),(0,Ae.jsx)(Co.Provider,{value:Se,children:(0,Ae.jsx)("div",{ref:xn,className:le("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",zh&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:x=>{Rr(),x.target===x.currentTarget&&(xn.current._ptrDown=!0)},onClick:x=>{x.target===x.currentTarget&&xn.current?._ptrDown&&Date.now()-ws.current>200&&oa(),xn.current&&(xn.current._ptrDown=!1)},"data-hsk-theme":Vr,"data-hsk-theming":Va?"":void 0,style:{...$h,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},..._l},children:(0,Ae.jsxs)("div",{ref:ta,className:le("hsk-cb-panel",l.panel),dir:ye?"rtl":"ltr",lang:Oe||void 0,"data-script":$e?"nonlatin":"latin","data-host-font":Ke?"covers":"gap","data-nastaliq":we?.family==="Noto Nastaliq Urdu"||m?.toLowerCase()==="urdu"||m?.toLowerCase()==="ur"||m==="\u0627\u0631\u062F\u0648"?"true":void 0,style:De?{"--hsk-font":De}:void 0,onClick:x=>{x.stopPropagation();let O=x.target;if(O.tagName==="IMG"&&(O.classList.contains("hsk-markdown-img")||O.classList.contains("hsk-cb-user-img-thumb"))){let ke=O.src;ke&&Nt(ke)}},children:[(0,Ae.jsx)(Yn,{src:St,onClose:()=>Nt(null)}),jt&&(0,Ae.jsx)("div",{className:"hsk-markup-overlay",children:(0,Ae.jsx)(pi,{src:jt,t:Se,onCancel:()=>$t(null),onSend:(x,O,ke,Le)=>{$t(null),Mr(O,[{type:"image",data:x,annotated:!0,marks:ke,instructed:!0,preview:Le}])}})}),(0,Ae.jsxs)("div",{className:"hsk-cb-main",children:[(0,Ae.jsx)(va,{seed:y?.api?.siteId??"",theme:Vr,dir:ye?"rtl":"ltr",waitForContent:!0}),(0,Ae.jsx)(Lc,{title:e,logo:r,hasMessages:M.length>0,avatarState:R?"speaking":E?"thinking":"idle",unread:Th,awayFromBottom:Ch,themeMenuOpen:Tr,themeMenuClosing:Xa,onThemeMenuClosed:Qa,isNarrow:Mt,currentTheme:Sr,onJumpToLatest:Eh,onReset:Lh,onClose:oa,onToggleThemeMenu:()=>Tr?ks():ra(!0),onSelectTheme:x=>{ss(x,!0)},themeAttr:Vr}),(0,Ae.jsx)("div",{className:"hsk-cb-msgs",ref:vn,children:Kr.length===0?(0,Ae.jsx)(Dc,{theme:Vr,inOnboarding:Ye,justCompleted:w,onboardingMood:ja,awaitingLang:fe,awaitingName:he,awaitingEntityLang:Pe,awaitingConsent:Ne,termsAgreed:at,shopperLanguage:m,pendingLanguage:oe,shopperName:T,entityLangPref:G,chromeReady:K&&ne,activeChips:Oa,speechLang:Oe,t:Se,tNode:ot,chooseLanguage:Zn,langSwitching:pe,isLangPreparing:Q,onPrewarmLanguage:x=>An(y,x,Pt),chooseEntityLang:Gr,agreeTerms:Cr,handleSend:Mr}):(0,Ae.jsx)(sl,{doodleTheme:Vr,displayMessages:Kr,messageRefs:fs,isNarrow:Mt,loading:E,streaming:Uh,sources:g,referencedIds:J,discussedSources:ct,lastIntent:W,lastAction:S,stopped:ge,interrupted:be,halted:ys,haltedEmpty:Oh,error:z,errorCode:_,keyPhase:Ul,keyInput:$l,setKeyInput:ql,mintedKey:Wl,setMintedKey:Ol,setMintedPub:jl,minting:Kl,copied:Gl,keyCountdown:Vl,handleUseExistingKey:Xl,handleCreateKey:Ql,copyValue:Yl,queuedMessage:P,sendQueuedNow:j,setLightboxSrc:Nt,setMarkupSrc:$t,handleSend:Mr,handleSourceClick:Nh,onRetry:ea,onEdit:Hl,onLongPress:Jl,retrying:Dl,continueGenerating:Y,t:Se,spacerRef:yh,vizState:Bt,setVizState:Lt,messages:M})}),!Or&&(0,Ae.jsx)("div",{className:le(fn&&"hsk-composer-exit-up",Qn&&"hsk-composer-reveal"),children:(0,Ae.jsx)(hl,{notice:v&&(0,Ae.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:I,children:[(0,Ae.jsx)("span",{children:Se("leaveHumanWarning")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>L(null),children:Se("leaveHumanStay")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>{let x=v;L(null),x==="reset"?sa(!0):aa(!0)},children:Se("leaveHumanConfirm")}),(0,Ae.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let x=v;L(null),x==="reset"?sa(!1):aa(!1)},children:Se("leaveHumanKeep")})]}),gooId:vh,input:zt,setInput:nt,showKikuPicker:yr,setShowKikuPicker:Ut,showAtPicker:dr,setShowAtPicker:lt,captureAllowed:qt,discussedSources:ct,handleSelectExtension:Ih,handleKikuCapture:eh,handleKikuCaptureAll:th,handleKikuViewHistory:rh,handleKikuDelete:nh,attachments:nr,removeAttachment:Hh,chromeLoading:!K,imageInputRef:ht,handleImageFiles:Dh,enableVision:d&&!Ye,enableVoice:h&&!Ye,canConverse:dh,startVoice:ph,inputLocked:kt,voiceBlocked:ch,textareaRef:pr,classNames:l,handleInput:_h,handleKeyDown:Ah,voice:mh,voicePhase:us,activePlaceholder:Wa,loading:E,streaming:R,stop:re,handleSend:Mr,voiceError:Ka,setVoiceError:ms,langSwitching:pe||Q,t:Se,onOpenMimi:y?.getKikuKey?.()?hs:void 0})})]}),ps!=="converse"&&(0,Ae.jsx)(xl,{items:Wh,activeIdx:Mh,progress:Sh,onJump:Rh,side:ye?"left":"right"}),(0,Ae.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",ye?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left"),children:[(0,Ae.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Ae.jsx)(Ea,{}),(0,Ae.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Tr&&!Xa&&"is-open"),ref:na,children:[(0,Ae.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:x=>{x&&(x.inert=!Tr||Xa)},children:rn.map(({id:x,label:O,Icon:ke})=>(0,Ae.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(gh??Sr)===x&&"is-active"),onClick:Le=>{Le.stopPropagation(),ss(x,!0)},children:[(0,Ae.jsx)(ke,{}),(0,Ae.jsx)("span",{children:O})]},x))}),(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Tr){Qa();return}xh(Sr),ra(!0)},"aria-label":"Themes","aria-expanded":Tr,children:[(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:ee.default.createElement(ho(Sr).Icon)}),(0,Ae.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:ho(Sr).label})]})]}),y?.getKikuKey?.()&&(0,Ae.jsxs)("button",{type:"button",className:"hsk-cb-sound-pill",onClick:hs,children:[(0,Ae.jsx)(fa,{size:13}),(0,Ae.jsx)("span",{children:"MiMi"})]})]}),ps==="converse"&&(0,Ae.jsx)(fl,{siteId:y?.api?.siteId??"",themeAttr:Vr,stopVoice:uh,chooseVoice:hh,liveVoiceName:lh,voiceSecondsLeft:ih,voiceConnecting:ah,voicePhase:us,live:bs,earlier:bh,newVoiceChat:fh,voiceMuted:oh,setVoiceMuted:sh,voiceError:Ka,attachPhoto:kh,onSelectSource:x=>{o?.(x),bs.ask(Se("cardClickQuery",{name:x.name,details:eo(er(x,b))}))},t:Se}),gn&&(0,Ae.jsx)(yl,{msg:gn.msg,rect:gn.rect,anchorEl:gn.el,containerEl:ta.current,containerRect:ta.current?.getBoundingClientRect(),isUser:gn.isUser,isRTL:ye,canRetry:!E&&!R,onPin:Zl,onRetry:ea,onCopy:async x=>{if(!x)return!1;try{return await navigator.clipboard.writeText(x),!0}catch{}try{let O=document.createElement("textarea");O.value=x,O.setAttribute("readonly",""),O.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(O),O.select(),O.setSelectionRange(0,x.length);let ke=document.execCommand("copy");return document.body.removeChild(O),ke}catch{return!1}},onClose:()=>ds(null),t:Se})]})})})}var ee,qa,Ua,Ae,au,ou,su,Sl=Ce(()=>{"use strict";pa();ee=Zt(require("react"));po();qa=require("@akropolys/sdk"),Ua=require("@akropolys/sdk");yn();Tt();ha();wn();ii();uo();ui();zn();Ot();Ca();Hi();$i();Ui();ji();Vi();vc();Nc();Wt();Hc();Jr();Do();Fa();Vo();il();dl();kl();Zo();vl();wl();Ae=require("react/jsx-runtime"),au=240,ou=700,su=200});var es,Ml=Ce(()=>{"use strict";es='@property --hsk-chat-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-chat-text{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-chat-muted{syntax: "<color>"; inherits: true; initial-value: #888888;}@property --hsk-chat-divide{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-chat-input-bg{syntax: "<color>"; inherits: true; initial-value: #191919;}@property --hsk-chat-source-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.04);}@property --hsk-fade-bg{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-surface-1{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-surface-2{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-bubble-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-think-text{syntax: "<color>"; inherits: true; initial-value: #a6a6a6;}@property --hsk-placeholder{syntax: "<color>"; inherits: true; initial-value: #555555;}@property --hsk-grid-bg{syntax: "<color>"; inherits: true; initial-value: #1a1a1c;}@property --hsk-active-bg{syntax: "<color>"; inherits: true; initial-value: #f0efed;}@property --hsk-on-active{syntax: "<color>"; inherits: true; initial-value: #0a0a0a;}@property --hsk-src-title{syntax: "<color>"; inherits: true; initial-value: #f9fafb;}@property --hsk-src-desc{syntax: "<color>"; inherits: true; initial-value: #9ca3af;}@property --hsk-price-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.08);}@property --hsk-price-text{syntax: "<color>"; inherits: true; initial-value: #ff7a45;}@property --hsk-sheet-bg{syntax: "<color>"; inherits: true; initial-value: #1f1f22;}@property --hsk-primary{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-pill-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.06);}@property --hsk-glass-bg{syntax: "<color>"; inherits: true; initial-value: rgba(255,255,255,.07);}@property --hsk-glass-edge{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-edge-top{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-drop{syntax: "<color>"; inherits: true; initial-value: transparent;}@property --hsk-glass-sheen{syntax: "<color>"; inherits: true; initial-value: transparent;}[data-hsk-theme]{transition:--hsk-chat-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-text .36s cubic-bezier(.4,0,.2,1),--hsk-chat-muted .36s cubic-bezier(.4,0,.2,1),--hsk-chat-divide .36s cubic-bezier(.4,0,.2,1),--hsk-chat-input-bg .36s cubic-bezier(.4,0,.2,1),--hsk-chat-source-bg .36s cubic-bezier(.4,0,.2,1),--hsk-fade-bg .36s cubic-bezier(.4,0,.2,1),--hsk-surface-1 .36s cubic-bezier(.4,0,.2,1),--hsk-surface-2 .36s cubic-bezier(.4,0,.2,1),--hsk-bubble-bg .36s cubic-bezier(.4,0,.2,1),--hsk-think-text .36s cubic-bezier(.4,0,.2,1),--hsk-placeholder .36s cubic-bezier(.4,0,.2,1),--hsk-grid-bg .36s cubic-bezier(.4,0,.2,1),--hsk-active-bg .36s cubic-bezier(.4,0,.2,1),--hsk-on-active .36s cubic-bezier(.4,0,.2,1),--hsk-src-title .36s cubic-bezier(.4,0,.2,1),--hsk-src-desc .36s cubic-bezier(.4,0,.2,1),--hsk-price-bg .36s cubic-bezier(.4,0,.2,1),--hsk-price-text .36s cubic-bezier(.4,0,.2,1),--hsk-sheet-bg .36s cubic-bezier(.4,0,.2,1),--hsk-primary .36s cubic-bezier(.4,0,.2,1),--hsk-pill-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-bg .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge .36s cubic-bezier(.4,0,.2,1),--hsk-glass-edge-top .36s cubic-bezier(.4,0,.2,1),--hsk-glass-drop .36s cubic-bezier(.4,0,.2,1),--hsk-glass-sheen .36s cubic-bezier(.4,0,.2,1)}[data-hsk-theming] *,[data-hsk-theming] *:before,[data-hsk-theming] *:after{transition-property:transform,opacity!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap{transition-property:width,height,border-radius!important}[data-hsk-theming] .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger{transition-property:height,opacity!important}@media(prefers-reduced-motion:reduce){[data-hsk-theme]{transition:none}}:host,:root{--hsk-border-radius: 0px;--hsk-brand-green: #2D7A4B;--hsk-font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--hsk-default-font-size: 15px}.hsk-cb-btn,.hsk-cb-close,.hsk-cb-topbar-btn,.hsk-cb-chip,.hsk-cb-source,.hsk-cb-sources-next,.hsk-action-pill,.hsk-chat-send,.hsk-chat-reset,.hsk-close-btn,.hsk-cb-overlay{--hsk-font-size: 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}.hsk-cb-overlay{transition:--hsk-chat-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-text .45s cubic-bezier(.16,1,.3,1),--hsk-chat-muted .45s cubic-bezier(.16,1,.3,1),--hsk-chat-divide .45s cubic-bezier(.16,1,.3,1),--hsk-chat-input-bg .45s cubic-bezier(.16,1,.3,1),--hsk-surface-1 .45s cubic-bezier(.16,1,.3,1),--hsk-surface-2 .45s cubic-bezier(.16,1,.3,1),--hsk-bubble-bg .45s cubic-bezier(.16,1,.3,1),--hsk-primary .45s cubic-bezier(.16,1,.3,1),--hsk-grid-bg .45s cubic-bezier(.16,1,.3,1),--hsk-active-bg .45s cubic-bezier(.16,1,.3,1),--hsk-on-active .45s cubic-bezier(.16,1,.3,1),--hsk-src-title .45s cubic-bezier(.16,1,.3,1),--hsk-src-desc .45s cubic-bezier(.16,1,.3,1),--hsk-price-bg .45s cubic-bezier(.16,1,.3,1),--hsk-price-text .45s cubic-bezier(.16,1,.3,1),--hsk-sheet-bg .45s cubic-bezier(.16,1,.3,1),--hsk-pill-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-bg .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge .45s cubic-bezier(.16,1,.3,1),--hsk-glass-edge-top .45s cubic-bezier(.16,1,.3,1),--hsk-glass-drop .45s cubic-bezier(.16,1,.3,1),--hsk-glass-sheen .45s cubic-bezier(.16,1,.3,1),--hsk-fade-bg .45s cubic-bezier(.16,1,.3,1),--hsk-chat-source-bg .45s cubic-bezier(.16,1,.3,1),--hsk-think-text .45s cubic-bezier(.16,1,.3,1),--hsk-placeholder .45s cubic-bezier(.16,1,.3,1),background-color .45s cubic-bezier(.16,1,.3,1),border-color .45s cubic-bezier(.16,1,.3,1),color .45s cubic-bezier(.16,1,.3,1),fill .45s cubic-bezier(.16,1,.3,1),stroke .45s cubic-bezier(.16,1,.3,1),box-shadow .45s cubic-bezier(.16,1,.3,1)}.hsk-cb-overlay{--hsk-glass-border: 1px solid var(--hsk-glass-edge);--hsk-glass-border-top: 1px solid var(--hsk-glass-edge-top);--hsk-glass-shadow: 0 12px 32px -4px var(--hsk-glass-drop), 0 1px 0 0 var(--hsk-glass-sheen) inset}.hsk-kiku-avatar,.hsk-kiku-avatar *{transition:none}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay,.hsk-cb-overlay *,.hsk-cb-overlay *:before,.hsk-cb-overlay *:after{transition:none}}.hsk-cb-overlay button,.hsk-cb-overlay [role=button],.hsk-cb-overlay input,.hsk-cb-overlay textarea,.hsk-cb-overlay select,.hsk-chat button,.hsk-chat [role=button],.hsk-chat input,.hsk-chat textarea,.hsk-chat select,.hsk-cb-btn,.hsk-search button,.hsk-search [role=button],.hsk-search input,.hsk-search textarea,.hsk-search select{touch-action:manipulation;-webkit-tap-highlight-color:transparent;font-family:var(--hsk-font)}:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: color-mix(in srgb, var(--hsk-primary, #ff6a33) 12%, #fffaf4);--hsk-marble-2: color-mix(in srgb, var(--hsk-primary, #ff6a33) 30%, #fdf0e4);--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 62%, #e8cbb0);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 85%, #6d3a1c);--hsk-marble-sheen: .5}@media(prefers-color-scheme:dark){:host,:root,.hsk-cb-btn,.hsk-cb-overlay,.hsk-chat-widget{--hsk-marble-1: #FFFDF6;--hsk-marble-2: #FBF3E2;--hsk-marble-3: color-mix(in srgb, var(--hsk-primary, #ff6a33) 20%, #EDDFC4);--hsk-marble-4: color-mix(in srgb, var(--hsk-primary, #ff6a33) 42%, #D8C39C);--hsk-marble-sheen: .9}}@keyframes hsk-pulse{0%,to{transform:scale(.8);opacity:.5}50%{transform:scale(1.2);opacity:1}}.hsk-cb-btn{--hsk-primary: var(--chat-primary-color, #ff6a33);display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid rgba(255,106,51,.4);background:#ff6a331a;color:var(--hsk-primary);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .16s cubic-bezier(.34,1.56,.64,1),box-shadow .15s;will-change:transform}.hsk-cb-btn:hover{background:#ff6a332e;border-color:#ff6a33b3;box-shadow:0 4px 16px #ff6a3333}.hsk-cb-btn:active{transform:scale(.97)}.hsk-cb-topbar-mark:active .hsk-cb-topbar-name{transform:scale(.95)}.hsk-cb-btn-icon{font-size:15px;line-height:1;display:flex;align-items:center}.hsk-cb-overlay{--hsk-primary: var(--chat-primary-color, #ff6a33);--hsk-font: var(--chat-font-family, "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:normal;word-spacing:normal;font-kerning:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--hsk-font-size: var(--hsk-desktop-font-size, 15px);--hsk-mobile-font-size: 14px;position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;animation:hsk-overlay-in .2s ease-out;background:var(--hsk-chat-bg, #ffffff)!important;box-sizing:border-box!important;margin:0!important;padding:0!important}@keyframes hsk-overlay-in{0%{opacity:0}to{opacity:1}}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:hsk-overlay-in .18s cubic-bezier(.16,1,.3,1) both!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel{transform-origin:var(--hsk-ox, 50%) var(--hsk-oy, 50%);animation:hsk-panel-float-in .22s cubic-bezier(.16,1,.3,1) both!important}@keyframes hsk-panel-float-in{0%{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs{animation:hsk-content-fade .2s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-content-fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-lang-chip,.hsk-cb-chip{animation:hsk-pill-wave .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}.hsk-cb-lang-chips-hint{animation:hsk-content-fade .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-pill-idx, 0) * 12ms)}@keyframes hsk-pill-wave{0%{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap{animation:hsk-input-dock .22s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-overlay.hsk-cb-overlay--closing{animation:hsk-overlay-out .2s cubic-bezier(.4,0,1,1) both!important;pointer-events:none}.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:hsk-panel-sink .2s cubic-bezier(.4,0,1,1) both!important}@keyframes hsk-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-panel-sink{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(8px) scale(.985)}}@media(prefers-reduced-motion:reduce){.hsk-cb-overlay.hsk-cb-overlay--closing,.hsk-cb-overlay.hsk-cb-overlay--closing .hsk-cb-panel{animation:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows{animation:none!important;-webkit-clip-path:none!important;clip-path:none!important}.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-panel,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-msgs,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-lang-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-chip,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-input-wrap,.hsk-cb-overlay.hsk-cb-overlay--grows .hsk-cb-hello-avatar{animation:none!important}}.hsk-cb-panel:lang(ja){font-feature-settings:"palt";word-break:auto-phrase;line-break:strict}.hsk-cb-panel:lang(ja) p,.hsk-cb-panel:lang(ja) li{font-weight:500}.hsk-cb-panel{position:relative;display:flex;flex-direction:column;height:100%;max-width:720px;width:100%;margin:0 auto;animation:hsk-panel-in .28s cubic-bezier(.34,1.2,.64,1)}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:14px var(--hsk-gutter, 24px) 10px;flex-shrink:0;position:relative;z-index:10;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar:after{display:none!important}.hsk-cb-topbar-left{display:flex;align-items:center;gap:10px;justify-self:start;min-width:0}.hsk-cb-topbar-mark{justify-self:center;display:flex;flex-direction:column;align-items:center;line-height:0;cursor:pointer;user-select:none;touch-action:manipulation;transition:transform .22s cubic-bezier(.34,1.56,.64,1)}@media(hover:hover)and (pointer:fine){.hsk-cb-topbar-mark:hover>*{translate:0 -1px}}.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{background:var(--hsk-primary, #ff6a33);color:#fff;box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);animation:hsk-unread-pill .9s cubic-bezier(.34,1.56,.64,1) infinite}@keyframes hsk-unread-pill{0%,to{transform:scale(1)}38%{transform:scale(1.08,.92)}62%{transform:scale(.97,1.03)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-mark[data-unread=true] .hsk-cb-topbar-name{animation:none}}.hsk-cb-topbar-name{margin-top:-5px;padding:3px 13px;white-space:nowrap;border-radius:999px;background:var(--hsk-surface-2);box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px #0000001f;font-size:12px;font-weight:700;line-height:18px;letter-spacing:-.01em;color:var(--hsk-name-text, var(--hsk-chat-text));transform-origin:50% 0%;transition:transform .18s cubic-bezier(.34,1.8,.64,1)}.hsk-cb-topbar-mark{position:relative;z-index:100}.hsk-cb-topbar-ooze-menu{position:absolute;top:var(--hsk-tray-top, calc(100% + 12px) )!important;left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px))!important;padding:var(--hsk-tray-head, 6px) 6px 6px!important;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%)!important;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;z-index:1000;transform-origin:50% 0;animation:hsk-topbar-ooze .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar.is-docked{z-index:20!important}.hsk-cb-topbar-scrim{position:fixed;inset:0;z-index:999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);-webkit-mask-image:linear-gradient(to bottom,#000 40vh,rgba(0,0,0,.97) 43.5vh,rgba(0,0,0,.84) 48.75vh,rgba(0,0,0,.5) 57.5vh,rgba(0,0,0,.16) 66.25vh,rgba(0,0,0,.03) 71.5vh,transparent 75vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both}.hsk-cb-topbar-scrim.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both}.hsk-cb-topbar-mark.is-oozing{position:relative;z-index:1001}@keyframes hsk-scrim-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-scrim-out{0%{opacity:1}to{opacity:0}}.hsk-cb-topbar-ooze-menu.is-closing{animation:hsk-topbar-ooze-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}@keyframes hsk-topbar-ooze-out{0%{opacity:1;transform:translate(-50%) scale(1)}to{opacity:0;transform:translate(-50%) scale(.96)}}@media(prefers-reduced-motion:reduce){.hsk-cb-topbar-scrim,.hsk-cb-topbar-scrim.is-closing,.hsk-cb-topbar-ooze-menu.is-closing{animation:none}}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:flex;align-items:stretch;gap:8px;padding:6px 7px 0}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{flex:0 0 auto;align-self:center;writing-mode:vertical-rl;transform:rotate(180deg);font-size:8px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--hsk-chat-muted);opacity:.38;user-select:none}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:6px!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:0!important;box-sizing:border-box!important;margin-top:0!important;background:none!important;border:none!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:max-content;max-width:100%;height:34px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 22%,transparent)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 34%,transparent)!important;color:var(--hsk-chat-muted, #71717a);font-size:11.5px;font-weight:600;box-sizing:border-box;white-space:nowrap;cursor:pointer;transition:background-color .16s cubic-bezier(.16,1,.3,1),color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item:hover{color:var(--hsk-chat-text, currentColor)!important;transform:translateY(-1px)}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;box-shadow:0 3px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)!important}@keyframes hsk-topbar-ooze{0%{opacity:0;transform:translate(-50%) translateY(-6px) scale(.94)}to{opacity:1;transform:translate(-50%) translateY(0) scale(1)}}.hsk-cb-topbar-mark[data-impacting=true] .hsk-cb-topbar-name{transform:translateY(1.5px) scale(1.09,.91);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 10px var(--hsk-contact-glow, rgba(19, 78, 61, .45))}.hsk-cb-back{width:34px;height:34px;border-radius:999px;border:none;padding:0;display:flex;align-items:center;justify-content:center;background:var(--hsk-surface-1);color:var(--hsk-chat-muted);cursor:pointer;transition:transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-back:hover{background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-back:active{transform:scale(.94)}.hsk-cb-panel[dir=rtl] .hsk-cb-back-icon{display:inline-flex;transform:scaleX(-1)}.hsk-cb-topbar-actions{justify-self:end}.hsk-cb-kiku-id-rail{display:none}@media(min-width:1200px){.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--left{display:flex;position:absolute;inset:auto 100% 48px auto!important;margin-right:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-kiku-id-rail.hsk-cb-kiku-id-rail--right{display:flex;position:absolute;inset:auto auto 48px 100%!important;margin-left:28px!important;transform:none!important;flex-direction:column;justify-content:flex-end;align-items:flex-start;gap:8px;width:200px;max-width:200px;min-width:200px;padding:0;border:0;background:none;font-family:inherit;z-index:10}.hsk-cb-dock-frost{position:absolute;inset:-100vmax;z-index:-1;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);-webkit-mask-image:radial-gradient(circle at 50% 50%,#000 330px,rgba(0,0,0,.97) 369px,rgba(0,0,0,.84) 427px,rgba(0,0,0,.5) 525px,rgba(0,0,0,.16) 622px,rgba(0,0,0,.03) 681px,transparent 720px);opacity:0;transition:opacity .2s cubic-bezier(.4,0,.9,.4)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-kiku-id-rail{bottom:50px!important}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-kiku-id-rail{bottom:58px!important}.hsk-cb-kiku-id-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;height:28px;padding:0 11px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 62%,transparent);backdrop-filter:blur(22px) saturate(180%);-webkit-backdrop-filter:blur(22px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 14px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset;color:var(--hsk-chat-muted, #71717a);cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 18px -2px color-mix(in srgb,#000 15%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset}.hsk-cb-kiku-id-rail-val{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px;letter-spacing:-.01em;max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-kiku-id-pill svg{flex:none;opacity:.8}.hsk-cb-theme-squircle-wrap{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding:0;margin:0;border:none!important;box-shadow:none!important;background:transparent!important}.hsk-cb-theme-squircle-trigger{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;color:var(--hsk-chat-text)!important;font-size:11.5px;font-weight:600;cursor:pointer;font-family:inherit;transition:all .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-trigger:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 80%,transparent)!important;color:var(--hsk-primary, #ff6a33)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 16%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent) inset!important}.hsk-cb-theme-trigger-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.hsk-cb-theme-trigger-icon svg{width:13px;height:13px}.hsk-cb-theme-trigger-label{letter-spacing:-.01em}.hsk-cb-theme-2x2-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:6px;width:200px;max-width:200px;min-width:200px;box-sizing:border-box;border-radius:18px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 70%,transparent);backdrop-filter:blur(28px) saturate(190%) contrast(102%);-webkit-backdrop-filter:blur(28px) saturate(190%) contrast(102%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .4)) 35%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 65%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent),0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent) inset,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 50%,transparent) inset;transform-origin:bottom left;animation:hsk-theme-morph-in .26s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap.is-closing .hsk-cb-theme-2x2-grid{animation:hsk-theme-morph-out .22s cubic-bezier(.4,0,.2,1) both}.hsk-cb-theme-squircle-trigger{animation:hsk-theme-pill-in .24s cubic-bezier(.16,1,.3,1) both}.hsk-cb-theme-squircle-wrap{justify-content:flex-end;box-sizing:border-box;width:auto;height:32px;overflow:hidden;border-radius:16px;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent)!important;backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 6%,transparent)!important;box-shadow:0 4px 16px -2px color-mix(in srgb,#000 12%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important;interpolate-size:allow-keywords;transition:width .38s cubic-bezier(.16,1,.3,1),height .38s cubic-bezier(.16,1,.3,1),border-radius .38s cubic-bezier(.16,1,.3,1)}.hsk-cb-theme-squircle-wrap.is-open{width:222px;height:auto;border-radius:18px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger,.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-squircle-trigger:hover{flex:none;height:30px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none;animation:none;transition:height .38s cubic-bezier(.16,1,.3,1),opacity .2s ease,color .2s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-squircle-trigger{height:0;opacity:0;pointer-events:none}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid{flex:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;min-width:220px;max-width:220px;margin-inline-end:-220px;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;border-radius:0;animation:none;opacity:0;transition:opacity .1s ease}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap>.hsk-cb-theme-2x2-grid>.hsk-cb-theme-grid-item{width:100%;justify-content:flex-start;padding:0 10px}.hsk-cb-kiku-id-rail .hsk-cb-theme-squircle-wrap.is-open>.hsk-cb-theme-2x2-grid{opacity:1;transition:opacity .24s ease .1s}.hsk-cb-theme-grid-item{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .3)) 25%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)!important;outline:none!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);color:var(--hsk-chat-text, currentColor);font-size:11px;font-weight:550;cursor:pointer;font-family:inherit;transition:all .18s cubic-bezier(.16,1,.3,1);box-shadow:0 1px 3px #0000000a,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset!important;box-sizing:border-box;white-space:nowrap}.hsk-cb-theme-grid-item svg{flex-shrink:0;width:12px;height:12px}.hsk-cb-theme-grid-item:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;transform:translateY(-1px);box-shadow:0 3px 8px #00000014,0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important}.hsk-cb-theme-grid-item.is-active{background:var(--hsk-primary, #ff6a33)!important;border-color:var(--hsk-primary, #ff6a33)!important;color:#fff!important;box-shadow:0 2px 10px color-mix(in srgb,var(--hsk-primary, #ff6a33) 38%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 40%,transparent) inset!important}}.hsk-cb-topbar-actions{display:flex;align-items:center;gap:8px}.hsk-cb-topbar-btn{height:34px;padding:0 14px;border-radius:var(--hsk-control-radius, 999px);border:1px solid transparent;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #5f6368);font-size:12px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-topbar-btn:hover{background:color-mix(in srgb,var(--hsk-primary) 12%,transparent);color:var(--hsk-primary)}.hsk-cb-squircle-btn{width:34px;height:34px;border-radius:11px;background:color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid color-mix(in srgb,var(--hsk-chat-border, currentColor) 16%,transparent);border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);border-bottom:1px solid color-mix(in srgb,#000 6%,transparent);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-chat-text, #000) 6%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 25%,transparent) inset;color:var(--hsk-chat-muted, currentColor);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:all .2s cubic-bezier(.16,1,.3,1);position:relative;flex-shrink:0}.hsk-cb-squircle-btn:hover{background:color-mix(in srgb,var(--hsk-surface-2, currentColor) 50%,transparent);color:var(--hsk-chat-text, currentColor);border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 55%,transparent);box-shadow:0 3px 10px color-mix(in srgb,var(--hsk-chat-text, #000) 8%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent) inset;transform:translateY(-1px)}.hsk-cb-squircle-btn:active{transform:scale(.95)}.hsk-cb-squircle-btn.is-active{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 16%,transparent);border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33);box-shadow:0 0 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent) inset}.hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),color-mix(in srgb,var(--hsk-surface-1, currentColor) 35%,transparent);color:#ef4444}.hsk-cb-msgs{position:relative;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;touch-action:pan-y;overscroll-behavior-y:none;overflow-anchor:none;padding:16px var(--hsk-gutter, 24px) 16px;display:flex;flex-direction:column;gap:0;scrollbar-width:none;-ms-overflow-style:none;mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%);-webkit-mask-image:linear-gradient(to bottom,transparent 0px,#000000 8px,#000000 100%)}.hsk-cb-msgs-spacer{flex:none;height:1px;pointer-events:none}.hsk-cb-msgs>:first-child{margin-top:auto}.hsk-cb-msgs.hsk-scrolling>*{pointer-events:none}.hsk-cb-msgs::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.hsk-cb-empty{flex:1 0 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:14px;padding:24px 0 32px;width:100%;text-align:start}.hsk-cb-onboarding-card{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:10px;flex-shrink:0;overflow:hidden;padding-bottom:26px;margin-bottom:-26px}.hsk-cb-onboarding-head{display:flex;align-items:center;justify-content:flex-start;width:100%;margin-bottom:8px}.hsk-cb-step-badge{font-size:11px;font-weight:600;letter-spacing:.05em;color:var(--hsk-chat-muted, #71717a);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .06));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .08));padding:4px 10px;border-radius:999px;line-height:1}.hsk-cb-hello-wrap{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;padding:0;width:100%}.hsk-cb-hello{margin:0;font-size:clamp(24px,4.5vw,34px);font-weight:500;line-height:1.2;letter-spacing:-.02em;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,var(--hsk-chat-muted, #8b8b8f));text-align:start}.hsk-cb-hello b{font-weight:700;color:var(--hsk-primary, #ff6a33)}.hsk-cb-hello-lead{margin:0;font-size:15px;line-height:22px;color:var(--hsk-chat-muted, #5f6368);max-width:42ch;text-align:start}.hsk-cb-hello-ask{margin:2px 0;font-size:16px;font-weight:500;color:var(--hsk-chat-text, #111);text-align:start}.hsk-cb-hello-hint{margin:0;font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #5f6368);text-align:start}.hsk-cb-name-step .hsk-cb-hello{color:var(--hsk-chat-text, #111)}.hsk-cb-name-step .hsk-cb-hello-ask{margin-top:6px;font-size:19px;font-weight:600;color:color-mix(in srgb,var(--hsk-chat-text, #111) 62%,var(--hsk-chat-muted, #8b8b8f))}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs{direction:ltr}.hsk-cb-panel[dir=rtl] .hsk-cb-msgs>*{direction:rtl}.hsk-cb-panel[dir=rtl] .hsk-cb-user-imgs{margin-left:0;margin-right:auto}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text{word-break:normal;overflow-wrap:break-word;letter-spacing:normal}.hsk-cb-panel[dir=rtl] .hsk-cb-hello{line-height:1.6;letter-spacing:normal}.hsk-cb-lang-chips{display:flex;flex-wrap:wrap;gap:8px 10px;margin:16px 0 8px;align-items:center}.hsk-cb-lang-chip{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 15px;font-family:var(--hsk-font);font-size:13.5px;font-weight:400;line-height:1.2;letter-spacing:-.01em;color:var(--hsk-chat-text, #27272a);background:color-mix(in srgb,var(--hsk-chat-card-bg, var(--hsk-chat-bg, #ffffff)) 72%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:none;border-radius:999px;box-shadow:0 2px 8px -1px #0000000f,0 1px 2px #00000005;cursor:pointer;transition:all .18s cubic-bezier(.16,1,.3,1);user-select:none;-webkit-font-smoothing:antialiased}.hsk-cb-lang-chip:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,var(--hsk-chat-card-bg, #ffffff));color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 4px 12px -2px #00000014}.hsk-cb-lang-chip:active{transform:translateY(0) scale(.97)}.hsk-cb-lang-chip:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33);outline-offset:2px}[data-hsk-theme=dark] .hsk-cb-lang-chip,[data-hsk-theme=midnight] .hsk-cb-lang-chip{color:#e4e4e7;background:#ffffff12;border:none;box-shadow:0 2px 8px -1px #0000004d}[data-hsk-theme=dark] .hsk-cb-lang-chip:hover,[data-hsk-theme=midnight] .hsk-cb-lang-chip:hover{background:rgba(var(--hsk-primary-rgb, 255, 106, 51),.2);color:#fff}.hsk-cb-lang-chips-hint{display:inline-flex;align-items:center;font-size:13px;font-weight:400;color:var(--hsk-chat-muted, #71717a);padding:0 6px;margin-inline-start:4px;user-select:none;align-self:center}.hsk-cb-chrome-loading{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:12px;width:100%;max-width:480px;margin:4px 0 2px;animation:hsk-content-fade .3s ease-out both}.hsk-cb-chrome-loading-header{display:flex;flex-direction:column;align-items:flex-start;text-align:start;gap:6px;width:100%}.hsk-cb-chrome-progress{height:3px;width:100%;border-radius:3px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));overflow:hidden;margin-top:4px}.hsk-cb-chrome-progress-track{height:100%;width:100%;border-radius:3px;background:linear-gradient(90deg,#ff6a33,#f7b733,#43c59e,#3d8bfd,#9b5de5,#ff5d8f,#ff6a33);background-size:300% 100%;animation:hsk-chrome-rainbow 2.6s linear infinite}.hsk-cb-chrome-progress{position:relative;overflow:hidden}.hsk-cb-chrome-progress:after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.55) 50%,transparent 80%);transform:translate(-100%);animation:hsk-chrome-sheen 1.9s cubic-bezier(.55,0,.45,1) infinite;pointer-events:none}@keyframes hsk-chrome-rainbow{0%{background-position:0% 0}to{background-position:-300% 0}}@keyframes hsk-chrome-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion:reduce){.hsk-cb-chrome-progress-track{animation:none;opacity:.5}.hsk-cb-chrome-progress:after{animation:none;opacity:0}}.hsk-cb-chrome-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;margin-top:6px;font-size:13px;font-weight:500;color:var(--hsk-chat-muted, #a1a1aa);background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));border-radius:999px;cursor:pointer;transition:all .15s ease;user-select:none}.hsk-cb-chrome-back-btn:hover{background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .12));color:var(--hsk-chat-text, #ffffff);border-color:var(--hsk-chat-border, rgba(255, 255, 255, .18))}.hsk-cb-chrome-notice{display:flex;flex-direction:column;gap:6px;max-width:48ch;margin:24px 0 0;padding:14px 16px;border-radius:14px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-chat-border, rgba(255, 255, 255, .09));text-align:start;font-family:var(--hsk-font, system-ui, sans-serif);animation:hsk-content-fade .4s ease-out both}.hsk-cb-chrome-notice-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.hsk-cb-chrome-notice-pill{display:inline-flex;align-items:center;padding:2px 7px;border-radius:6px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;background:#ff6a3326;color:var(--hsk-primary, #ff6a33);border:1px solid rgba(255,106,51,.28)}.hsk-cb-chrome-notice-title{font-size:12px;font-weight:600;letter-spacing:.01em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-chrome-notice-body{font-size:12px;line-height:1.55;color:var(--hsk-chat-muted, #a1a1aa)}.hsk-cb-chrome-notice-body b{color:var(--hsk-chat-text, #ffffff)}@media(prefers-color-scheme:light){.hsk-cb-chrome-progress{background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .06))}.hsk-cb-chrome-back-btn{color:#52525b;background:#0000000a;border-color:#00000014}.hsk-cb-chrome-back-btn:hover{background:#00000014;color:#09090b;border-color:#00000024}}.hsk-cb-input-box--waiting{opacity:.45;pointer-events:none}.hsk-cb-entlang-opts{display:flex;flex-direction:column;gap:10px;width:100%;max-width:440px;margin-top:6px}.hsk-cb-entlang-opt{position:relative;display:flex;flex-direction:row;align-items:center;width:100%;padding:16px 20px;text-align:start;background:transparent!important;border:none!important;outline:none!important;border-radius:16px;cursor:pointer;user-select:none;box-shadow:none!important;animation:hsk-entlang-opt-in .22s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.04s + var(--hsk-opt-idx, 0) * .02s)}@media(prefers-color-scheme:light){.hsk-cb-entlang-opt{background:transparent!important}}[data-hsk-theme=light] .hsk-cb-entlang-opt{background:transparent!important}@keyframes hsk-entlang-opt-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-entlang-opt:hover{background:transparent!important;border:none!important;box-shadow:none!important}.hsk-cb-entlang-opt:active{opacity:.8}.hsk-cb-check{display:inline-grid;place-items:center;width:20px;height:20px;flex-shrink:0;border-radius:6px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent);background:transparent;box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease}.hsk-cb-check svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}.hsk-cb-check path{stroke-dasharray:16;stroke-dashoffset:16;transition:stroke-dashoffset .3s cubic-bezier(.65,0,.35,1) .06s}.is-selected>.hsk-cb-check{background:var(--hsk-primary, #ff6a33);border-color:var(--hsk-primary, #ff6a33);animation:hsk-cb-check-press .42s cubic-bezier(.34,1.56,.64,1)}.is-selected>.hsk-cb-check path{stroke-dashoffset:0}.hsk-cb-entlang-opt:hover>.hsk-cb-check{border-color:var(--hsk-primary, #ff6a33)}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.78)}to{transform:scale(1)}}.hsk-cb-entlang-opt>.hsk-cb-check{margin-inline-end:14px}.hsk-cb-entlang-opt-text{display:flex;flex-direction:column;gap:3px;width:100%}.hsk-cb-entlang-opt-title{font-size:15px;font-weight:600;color:var(--hsk-chat-text, #1f1f1f);letter-spacing:-.01em}.hsk-cb-entlang-opt-note{font-size:12.5px;color:var(--hsk-chat-muted, #71717a);line-height:1.45}.hsk-cb-ink-skeleton{display:flex;flex-direction:column;align-items:flex-start;width:100%;gap:12px;animation:hsk-ink-bloom-in .22s cubic-bezier(.16,1,.3,1) both}.hsk-cb-ink-line{position:relative;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 6%,transparent)}.hsk-cb-ink-line:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 35%,color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent) 50%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent) 65%,transparent 100%);transform:translate(-100%);animation:hsk-ink-sheen 2.2s cubic-bezier(.4,0,.2,1) infinite}.hsk-cb-ink-line--title{height:30px;width:50%;max-width:220px;border-radius:14px;margin-bottom:2px}.hsk-cb-ink-line--lead1{height:14px;width:78%;max-width:340px}.hsk-cb-ink-line--lead2{height:14px;width:60%;max-width:260px}.hsk-cb-ink-line--ask{height:15px;width:40%;max-width:170px;margin-top:3px}@keyframes hsk-ink-sheen{0%{transform:translate(-100%)}to{transform:translate(200%)}}@keyframes hsk-ink-bloom-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes hsk-hello-rise{0%{opacity:0}to{opacity:1}}.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip{opacity:0;animation:hsk-hello-rise .45s cubic-bezier(.22,1,.36,1) both}.hsk-cb-hello{animation-delay:.04s}.hsk-cb-hello-lead{animation-delay:.12s}.hsk-cb-hello-ask{animation-delay:.2s}.hsk-cb-hello-hint{animation-delay:.28s}.hsk-cb-hello.hsk-cascade,.hsk-cb-hello-lead.hsk-cascade,.hsk-cb-hello-ask.hsk-cascade{opacity:1;animation:none;filter:none}.hsk-cascade__w{display:inline-block;white-space:nowrap;opacity:0;animation:hsk-cascade-rise .44s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-cascade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-hello,.hsk-cb-hello-lead,.hsk-cb-hello-ask,.hsk-cb-hello-hint,.hsk-cb-hello-skip,.hsk-cascade__w,.hsk-cb-check{animation:none;opacity:1;transform:none;filter:none}.hsk-cb-check path{transition:none}}.hsk-cb-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;margin-top:4px}.hsk-cb-chip{padding:8px 16px;border-radius:var(--hsk-border-radius, 0px);border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.1));background:var(--hsk-chat-source-bg, rgba(0,0,0,.03));color:var(--hsk-chat-text, #333);font-size:13px;cursor:pointer;transition:all .15s;font-family:inherit}.hsk-cb-chip:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:#ff6a330f}.hsk-cb-msg-group{padding:16px 0;border-bottom:none;animation:hsk-msg-in .22s ease-out both}.hsk-cb-spoken-mark{position:absolute;top:50%;margin-top:-5px;inset-inline-start:-17px;opacity:.4;pointer-events:none}.hsk-cb-msg-group--run-mid{padding-bottom:0}.hsk-cb-msg-group--run-mid .hsk-cb-user-msg{margin-bottom:3px;gap:0}.hsk-cb-msg-group--run-cont{padding-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg{margin-bottom:3px}.hsk-cb-msg-group--run-cont .hsk-cb-ai-text{margin-top:0}.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:before,.hsk-cb-msg-group--run-mid .hsk-cb-ai-msg .hsk-cb-ai-text:after{display:none}.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble{border-bottom-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-mid .hsk-cb-user-bubble,.hsk-cb-msg-group--run-mid .hsk-cb-user-bubble[dir=rtl]{border-bottom-right-radius:20px!important;border-bottom-left-radius:20px!important}.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble{border-top-right-radius:20px!important}[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-panel[dir=rtl] .hsk-cb-msg-group--run-cont .hsk-cb-user-bubble,.hsk-cb-msg-group--run-cont .hsk-cb-user-bubble[dir=rtl]{border-top-right-radius:20px!important;border-top-left-radius:20px!important}.hsk-cb-msg-group:last-child{border-bottom:none}@keyframes hsk-msg-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-user-msg{display:flex;flex-direction:column;align-items:flex-end;align-self:flex-end;max-width:min(75%,420px);margin-inline-start:auto;margin-inline-end:0;gap:6px;margin-bottom:20px}@media(max-width:640px){.hsk-cb-user-msg{max-width:84%}}.hsk-cb-user-msg.hsk-sent{transform-origin:bottom right;animation:hsk-send-in .3s cubic-bezier(.22,1,.36,1) both}.hsk-cb-panel[dir=rtl] .hsk-cb-user-msg.hsk-sent{transform-origin:bottom left}@keyframes hsk-send-in{0%{opacity:0;transform:translateY(12px) scale(.94)}60%{opacity:1}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-user-msg.hsk-sent{animation:none}}.hsk-cb-user-bubble{background:var(--hsk-user-bubble-bg, #007aff);color:#fff;padding:10px 18px;border-radius:20px;position:relative;font-size:var(--hsk-font-size, 15.5px);font-family:var(--hsk-font);line-height:1.45;max-width:100%;font-weight:500;width:fit-content;word-break:break-word;overflow-wrap:anywhere;letter-spacing:-.01em}.hsk-cb-user-bubble--tail:before,.hsk-cb-user-bubble--tail:after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-user-bubble--tail:before{right:-7px;width:20px;background:var(--hsk-user-bubble-bg, #007aff);border-bottom-left-radius:16px 14px}.hsk-cb-user-bubble--tail:after{right:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-left-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:before{right:auto;left:-7px;border-bottom-left-radius:0;border-bottom-right-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail:after{right:auto;left:-26px;border-bottom-left-radius:0;border-bottom-right-radius:10px}.hsk-cb-ai-msg{display:block}.hsk-cb-ai-icon{width:32px;height:32px;border-radius:0;background:transparent!important;border:none!important;color:var(--hsk-primary, #ff6a33);display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:-2px}.hsk-cb-ai-icon>svg{width:30px!important;height:30px!important}.hsk-cb-ai-body{flex:1;min-width:0}.hsk-cb-ai-content{display:flex;flex-direction:column;gap:10px;align-items:flex-start;width:100%}.hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:20px}.hsk-cb-ai-text{font-size:var(--hsk-font-size, 14.5px);font-family:var(--hsk-font);line-height:1.48;color:var(--hsk-chat-text, #111827);background:var(--hsk-chat-ai-bg, #eeeef0);padding:11px 15px;border-radius:18px;position:relative;display:inline-block;width:fit-content;box-sizing:border-box;max-width:min(88%,460px);word-break:break-word;overflow-wrap:anywhere;margin-top:4px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before,.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{content:"";position:absolute;bottom:0;height:25px;pointer-events:none}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:-7px;width:20px;background:var(--hsk-chat-ai-bg, #eeeef0);border-bottom-right-radius:16px 14px}.hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:-26px;width:26px;background:var(--hsk-chat-bg, #ffffff);border-bottom-right-radius:10px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{left:auto;right:-7px;border-bottom-right-radius:0;border-bottom-left-radius:16px 14px}.hsk-cb-panel[dir=rtl] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{left:auto;right:-26px;border-bottom-right-radius:0;border-bottom-left-radius:10px}.hsk-cb-user-bubble--tail{border-bottom-right-radius:25px}.hsk-cb-panel[dir=rtl] .hsk-cb-user-bubble--tail{border-bottom-right-radius:20px;border-bottom-left-radius:25px}.hsk-cb-user-footer{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:6px;width:100%;margin-top:2px;min-height:16px;line-height:1}.hsk-cb-ai-footer{display:flex;align-items:center;gap:4px;margin-top:4px;min-height:16px;line-height:1}.hsk-cb-ai-body:hover .hsk-cb-msg-actions,.hsk-cb-ai-body:focus-within .hsk-cb-msg-actions{opacity:1;pointer-events:auto;transform:translateY(0)}.hsk-cb-sent-status{font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:0;display:inline-flex;align-items:center;user-select:none;animation:hsk-sent-in .2s ease-out both}.hsk-cb-msg-actions{display:inline-flex;align-items:center;gap:2px;padding:0;opacity:0;pointer-events:none;transform:translate(3px);transition:opacity .18s cubic-bezier(.16,1,.3,1),transform .18s cubic-bezier(.16,1,.3,1)}.hsk-cb-user-msg:hover .hsk-cb-msg-actions,.hsk-cb-user-msg:focus-within .hsk-cb-msg-actions,.hsk-cb-msg-actions--visible{opacity:1;pointer-events:auto;transform:translate(0)}.hsk-cb-msg-action{display:inline-flex;align-items:center;justify-content:center;gap:3.5px;padding:1px 6.5px;height:16px;border-radius:999px;font-size:11px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-muted, #8a8f98);background:transparent;border:none;box-shadow:none;cursor:pointer;user-select:none;box-sizing:border-box;transition:color .15s ease,background-color .15s ease,transform .18s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:11px;line-height:1}.hsk-cb-msg-action:hover:not(:disabled){color:var(--hsk-chat-text, #ffffff)!important;background:var(--hsk-chat-divide, rgba(140, 140, 140, .18));border:none;transform:translateY(-.5px)}.hsk-cb-msg-action:active:not(:disabled){transform:translateY(0) scale(.95);transition-duration:.1s}.hsk-cb-msg-action--retry{color:var(--hsk-primary, #ff6a33);background:transparent;border:none;box-shadow:none}.hsk-cb-msg-action--retry:hover:not(:disabled){color:var(--hsk-on-active, #ffffff)!important;background:var(--hsk-primary, #ff6a33)!important;border:none!important;box-shadow:0 1px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-failed-notice{display:inline-flex;align-items:center;gap:4px;font-size:11px;line-height:1;color:#ef4444;font-weight:500;user-select:none}.hsk-cb-failed-dot{width:5px;height:5px;border-radius:999px;background:#ef4444;box-shadow:0 0 5px #ef444499;animation:hsk-failed-pulse 1.8s ease-in-out infinite}@keyframes hsk-failed-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.hsk-cb-msg-action--copied{color:#10b981!important;background:#10b98126!important;font-weight:600}@media(max-width:640px){.hsk-cb-msg-actions{display:none!important}}@keyframes hsk-sent-in{0%{opacity:0}to{opacity:1}}.hsk-cb-user-bubble--queued{opacity:.55}.hsk-cb-queued-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1;color:var(--hsk-chat-muted, #8a8f98);padding:4px 0 0;background:none;border:none;cursor:pointer;font-family:var(--hsk-font);animation:hsk-sent-in .2s ease-out both}.hsk-cb-queued-dot{width:5px;height:5px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1.1s ease-in-out infinite}@keyframes hsk-queued-pulse{0%,to{opacity:.35;transform:scale(.85)}50%{opacity:1;transform:scale(1)}}.hsk-cb-queued-now{color:var(--hsk-primary, #ff6a33);font-weight:600;transition:opacity .15s ease}.hsk-cb-queued-status:hover .hsk-cb-queued-now{opacity:.7}@media(prefers-reduced-motion:reduce){.hsk-cb-queued-dot{animation:none;opacity:.8}}.hsk-cb-timeline{display:none}@media(min-width:1200px){.hsk-cb-timeline.hsk-cb-timeline--left{display:block;position:absolute;left:auto!important;right:100%!important;margin-right:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline.hsk-cb-timeline--right{display:block;position:absolute;left:100%!important;right:auto!important;margin-left:28px!important;top:50%;transform:translateY(-50%)!important;width:180px;max-height:60%;overflow:hidden;z-index:10;pointer-events:auto;direction:ltr!important;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 86%,transparent)}.hsk-cb-timeline-track{animation:hsk-tl-in .32s cubic-bezier(.22,1,.36,1) both}}@keyframes hsk-tl-in{0%{opacity:0;transform:translate(-10px)}to{opacity:1;transform:translate(0)}}.hsk-cb-timeline-track{--hsk-tl-x: 14px;--hsk-tl-gutter: 28px;position:relative;padding-left:var(--hsk-tl-gutter)!important;padding-right:6px!important;transition:transform .28s cubic-bezier(.22,1,.36,1)}.hsk-cb-timeline-track:before,.hsk-cb-timeline-track:after{display:none!important}.hsk-cb-tl-wave{position:absolute;left:0;top:0;overflow:visible;pointer-events:none;fill:none;stroke:var(--hsk-chat-divide, rgba(0, 0, 0, .12));stroke-width:2;stroke-linecap:round;transition:d .35s cubic-bezier(.22,1,.36,1)}@media(prefers-color-scheme:dark){.hsk-cb-tl-wave{stroke:var(--hsk-chat-divide, rgba(255, 255, 255, .14))}}.hsk-cb-tl-item{--hsk-tl-d: 0;position:relative;display:block;width:100%;padding:7px 6px 7px 0!important;border:none;background:none;text-align:left!important;cursor:pointer;font-family:var(--hsk-font)}.hsk-cb-tl-dot{position:absolute;left:calc(var(--hsk-tl-x, 14px) - var(--hsk-tl-gutter, 28px) - 3px)!important;right:auto!important;top:50%;width:6px;height:6px;margin-top:-3px;border-radius:999px;background:var(--hsk-chat-muted, #8a8f98);opacity:max(.1,calc(.28 - var(--hsk-tl-d) * .07));transition:transform .28s cubic-bezier(.34,1.4,.64,1),opacity .46s cubic-bezier(.22,1,.36,1),background .2s ease}.hsk-cb-tl-label{display:block;font-size:12px;line-height:1.4;color:var(--hsk-chat-muted, #8a8f98);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translate(calc(var(--hsk-tl-d) * 7px));opacity:max(.32,calc(.9 - var(--hsk-tl-d) * .15));transition:transform .46s cubic-bezier(.22,1,.36,1),opacity .46s cubic-bezier(.22,1,.36,1),color .2s ease}.hsk-cb-tl-item:hover .hsk-cb-tl-label{opacity:1;transform:translate(calc(var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:scale(1.25)}.hsk-cb-tl-cursor{position:absolute;box-shadow:0 0 0 5px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);left:calc(var(--hsk-tl-x, 14px) - 4.5px)!important;right:auto!important;top:0;width:9px;height:9px;margin-top:-4.5px;border-radius:999px;background:var(--hsk-primary, #ff6a33);transform:translateY(0);transition:transform .44s cubic-bezier(.22,1,.36,1);will-change:transform}.hsk-cb-tl-item--on .hsk-cb-tl-dot{opacity:0}.hsk-cb-tl-item--on .hsk-cb-tl-label{color:var(--hsk-chat-text, #1f1f1f);opacity:1;font-weight:500}@media(prefers-reduced-motion:reduce){.hsk-cb-timeline-track{animation:none}.hsk-cb-timeline-track:after,.hsk-cb-tl-label,.hsk-cb-tl-cursor,.hsk-cb-tl-dot{transition:none}}@media(prefers-color-scheme:dark){.hsk-cb-ai-text{--hsk-chat-ai-bg: #26262a;background:var(--hsk-chat-ai-bg);color:#f9fafb}}.hsk-cb-sources-wrap{position:relative;margin-top:20px}.hsk-cb-sources{display:flex;flex-direction:row;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;padding-bottom:4px}.hsk-cb-sources::-webkit-scrollbar{display:none}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{position:absolute;top:0;bottom:4px;width:30px;pointer-events:none;z-index:2}.hsk-cb-sources-fade-left,.hsk-cb-sources-fade-right{background-color:var(--hsk-fade-bg, var(--hsk-chat-bg, #0e0e0f))}.hsk-cb-sources-fade-left,[dir=rtl] .hsk-cb-sources-fade-right{-webkit-mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to right,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-right,[dir=rtl] .hsk-cb-sources-fade-left{-webkit-mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%);mask-image:linear-gradient(to left,#000 0%,rgba(0,0,0,.55) 45%,transparent 100%)}.hsk-cb-sources-fade-left{inset-inline-start:0}.hsk-cb-sources-fade-right{inset-inline-end:0}.hsk-cb-sources-next,.hsk-cb-sources-prev{position:absolute;top:42%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%!important;background:var(--hsk-chat-bg, #ffffff)!important;border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .12))!important;color:var(--hsk-primary, #ff6a33)!important;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px #00000024;z-index:10;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease,color .18s ease,box-shadow .18s ease}.hsk-cb-sources-next:hover,.hsk-cb-sources-prev:hover{background:var(--hsk-primary, #ff6a33)!important;color:#fff!important;border-color:var(--hsk-primary, #ff6a33)!important;transform:translateY(-50%) scale(1.1);box-shadow:0 6px 18px #ff6a3359}.hsk-cb-sources-next{inset-inline-end:2px}.hsk-cb-sources-prev{inset-inline-start:2px}[dir=rtl] .hsk-cb-sources-next svg,[dir=rtl] .hsk-cb-sources-prev svg{transform:scaleX(-1)}.hsk-cb-carousel-dots{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:10px}.hsk-cb-dot-item{width:6px;height:6px;border-radius:50%;background:#96969659;transition:all .25s cubic-bezier(.34,1.56,.64,1);cursor:pointer}.hsk-cb-dot-item--active{width:18px;border-radius:999px;background:var(--hsk-primary, #ff6a33)}.hsk-cb-source{flex:0 0 188px;scroll-snap-align:start;border-radius:var(--hsk-border-radius, 0px);border:none;background:transparent;cursor:pointer;transition:transform .14s,opacity .14s;animation:hsk-card-in .26s ease-out both;overflow:visible}@keyframes hsk-card-in{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:none}}.hsk-cb-source:hover{transform:translateY(-3px);opacity:.92}.hsk-cb-src-imgwrap{width:188px;height:188px;overflow:hidden;border-radius:var(--hsk-border-radius, 0px);display:block;background:var(--hsk-chat-source-bg, #f8f9fa)}.hsk-cb-src-imgwrap img{width:100%;height:100%;object-fit:cover;transition:transform .22s;display:block}.hsk-cb-source:hover .hsk-cb-src-imgwrap img{transform:scale(1.05)}.hsk-cb-src-imgwrap-empty{width:188px;height:188px;background:var(--hsk-chat-divide, rgba(0,0,0,.06));display:flex;align-items:center;justify-content:center;color:var(--hsk-chat-muted, #555);font-size:32px}.hsk-cb-src-info{padding:8px 2px 0}.hsk-cb-sources-wrap--compact{margin-top:10px}.hsk-cb-sources-wrap--compact .hsk-cb-sources{gap:10px}.hsk-cb-sources-wrap--compact .hsk-cb-source{flex:0 0 96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap,.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{width:96px;height:96px}.hsk-cb-sources-wrap--compact .hsk-cb-src-imgwrap-empty{font-size:20px}.hsk-cb-sources-wrap--compact .hsk-cb-src-name{font-size:12px;-webkit-line-clamp:1}.hsk-cb-sources-wrap--compact .hsk-cb-src-detail{font-size:11px;padding:1px 6px}.hsk-cb-src-name{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #333);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.hsk-cb-src-detail{display:inline-flex;align-items:center;width:fit-content;max-width:100%;padding:2px 9px;border-radius:9999px;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .05));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));font-size:12px;font-weight:600;color:var(--hsk-primary, #ff6a33);margin-top:5px;line-height:1.2}.hsk-cb-input-wrap{position:relative;--hsk-composer-pad-top: 16px;--hsk-composer-pad-x: var(--hsk-gutter, 24px);padding:var(--hsk-composer-pad-top) var(--hsk-composer-pad-x) 24px;flex-shrink:0;background:transparent!important;z-index:10}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:95;border-radius:20px;background:var(--hsk-chat-input-bg, #ffffff);border:none!important;outline:none!important;box-shadow:0 3px 14px -1px #0000000d,0 1px 4px #00000008!important;overflow:hidden;transition:height .22s cubic-bezier(.32,.72,0,1)}.hsk-cb-input-card:focus-within{border:none!important;outline:none!important;box-shadow:0 4px 18px -1px #00000012,0 2px 6px #0000000a!important}.hsk-cb-docked-header{display:flex;align-items:center;gap:8px;padding:10px 16px 6px;background:transparent;border-bottom:none!important;user-select:none}.hsk-cb-docked-sub{font-size:12px;font-weight:500;letter-spacing:-.01em;color:var(--hsk-chat-text, #1f1f1f);flex:1}.hsk-cb-docked-close{background:none;border:none;color:var(--hsk-chat-muted, rgba(0, 0, 0, .4));font-size:16px;line-height:1;cursor:pointer;padding:2px 6px;border-radius:50%;transition:background .12s,color .12s}.hsk-cb-docked-close:hover{background:#00000014;color:var(--hsk-chat-text, #111111)}.hsk-cb-field{margin-inline:5px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{margin-inline:0}.hsk-cb-docked-options{display:flex;flex-direction:column;padding:4px 6px;background:transparent;border-bottom:none!important;max-height:220px;overflow-y:auto;scrollbar-width:thin}.hsk-cb-docked-option{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:none;background:transparent!important;border-radius:10px;color:var(--hsk-chat-text, #1f1f1f);font-family:inherit;font-size:14px;text-align:start;cursor:pointer;transition:color .15s ease}.hsk-cb-docked-option:hover,.hsk-cb-docked-option:focus{background:transparent!important;color:var(--hsk-primary, #ff6a33)}.hsk-cb-docked-option-icon{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent);color:var(--hsk-primary, #ff6a33);flex-shrink:0;overflow:hidden;transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .18s ease}.hsk-cb-docked-option:hover .hsk-cb-docked-option-icon,.hsk-cb-docked-option:focus .hsk-cb-docked-option-icon{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 22%,transparent);transform:scale(1.15) rotate(4deg)}.hsk-cb-docked-option-icon img{width:100%;height:100%;object-fit:cover}.hsk-cb-docked-option-title{font-weight:500;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .15s ease}.hsk-cb-docked-option-desc{font-size:12px;color:var(--hsk-chat-muted, #6b7280);font-weight:400}.hsk-cb-docked-option-detail{font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-input-box{position:relative;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:auto 0px;align-items:center;justify-items:start;column-gap:10px;row-gap:0px;transition:grid-template-rows .2s cubic-bezier(.32,.72,0,1),row-gap .2s cubic-bezier(.32,.72,0,1);background:transparent!important;border:none!important;outline:none!important;border-radius:0!important;padding-block:12px;padding-inline:18px 14px;box-shadow:none!important}.hsk-cb-tools-toggle{display:none}.hsk-cb-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:100;transform-origin:bottom left;animation:hsk-toolsheet-in .22s cubic-bezier(.16,1,.3,1) both;pointer-events:auto}[dir=rtl] .hsk-cb-toolsheet-wrap,.hsk-cb-panel[dir=rtl] .hsk-cb-toolsheet-wrap{transform-origin:bottom right}.hsk-cb-toolsheet{position:relative;z-index:1;min-width:200px;padding:6px;border-radius:16px;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .08));border:none!important;box-shadow:none!important}@keyframes hsk-toolsheet-in{0%{opacity:0;transform:translateY(8px) scale(.92)}to{opacity:1;transform:translateY(0) scale(1)}}.hsk-cb-toolsheet-scrim{position:fixed;inset:0;z-index:90;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 30%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);-webkit-mask-image:linear-gradient(to top,#000 30vh,rgba(0,0,0,.84) 38vh,rgba(0,0,0,.4) 48vh,rgba(0,0,0,.1) 56vh,transparent 62vh);animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) both;cursor:default}.hsk-cb-toolsheet-pub-text{display:flex;flex-direction:column;min-width:0;gap:2px}.hsk-cb-toolsheet-pub-text code{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-toolsheet-item{display:flex;align-items:center;gap:11px;width:100%;padding:10px 12px;border:none;border-radius:11px;background:transparent;color:var(--hsk-chat-text, #111827);font-family:var(--hsk-font);font-size:15px;text-align:start;cursor:pointer;transition:background-color .15s ease}.hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-chat-subtle, rgba(0,0,0,.05))}.hsk-cb-toolsheet-item:disabled{opacity:.45;cursor:default}.hsk-cb-toolsheet-item>svg{flex-shrink:0;color:var(--hsk-chat-muted, #6b7280)}[data-hsk-theme] .hsk-cb-toolsheet{background:var(--hsk-sheet-bg, var(--hsk-chat-input-bg, #f3f4f6))!important;border:none!important}[data-hsk-theme] .hsk-cb-toolsheet-item{color:var(--hsk-chat-text, #111827)!important}[data-hsk-theme] .hsk-cb-toolsheet-item:hover:not(:disabled){background:var(--hsk-sheet-hover, var(--hsk-surface-2, rgba(0, 0, 0, .05)))!important}[data-hsk-theme] .hsk-cb-toolsheet-item>svg{color:var(--hsk-chat-muted, #6b7280)!important}@media(prefers-reduced-motion:reduce){.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-stem{animation:none}}.hsk-cb-input-box>.hsk-cb-attach-btn{grid-column:1;grid-row:1}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4;grid-row:1}.hsk-cb-input-box[data-expanded=true]{grid-template-rows:auto 36px;row-gap:6px}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-field{grid-column:1 / -1;grid-row:1}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-attach-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-voice-mode-btn,.hsk-cb-input-box[data-expanded=true]>.hsk-cb-send,.hsk-cb-input-box[data-expanded=true]>.hsk-chat-send{grid-row:2}.hsk-cb-textarea{width:100%;background:transparent;border:none;outline:none;resize:none;font-size:var(--hsk-input-font-size, 16px);font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);min-height:28px;max-height:140px;field-sizing:content;line-height:var(--hsk-input-line-height, 1.55);word-break:break-word;overflow-wrap:break-word;padding:0;transition:height .18s cubic-bezier(.32,.72,0,1),color .42s cubic-bezier(.16,1,.3,1);scrollbar-width:none}.hsk-cb-textarea::-webkit-scrollbar{width:0;height:0}.hsk-cb-textarea::placeholder{color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px))}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border:none;cursor:pointer;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),opacity .2s ease;font-family:inherit;margin:0;padding:0}.hsk-cb-send,.hsk-chat-send{background:linear-gradient(135deg,#007aff,#0056b3);color:#fff;border-radius:12px!important;box-shadow:0 4px 14px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 35%,transparent);position:relative;overflow:hidden}.hsk-cb-send .hsk-telegram-icon,.hsk-chat-send .hsk-telegram-icon{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send:hover:not(:disabled),.hsk-chat-send:hover:not(:disabled){opacity:1;transform:translateY(-1px) scale(1.05);box-shadow:0 6px 18px #007aff7a,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent)}.hsk-cb-send:hover:not(:disabled) .hsk-telegram-icon,.hsk-chat-send:hover:not(:disabled) .hsk-telegram-icon{transform:translate(2px,-2px) rotate(-10deg) scale(1.1)}.hsk-cb-send:active:not(:disabled),.hsk-chat-send:active:not(:disabled){transform:translateY(0) scale(.94);box-shadow:0 1px 4px #007aff4d}.hsk-cb-send:disabled,.hsk-chat-send:disabled{opacity:.4;cursor:not-allowed;background:var(--hsk-chat-muted, #ccc);box-shadow:none}.hsk-cb-send--stop{background:#e5342a!important}.hsk-cb-send--stop:hover{background:#c92a21!important;opacity:1}.hsk-cb-field{position:relative;grid-area:field;display:flex;align-items:center;width:100%;min-width:0;--hsk-input-font-size: 16px;--hsk-input-line-height: 1.55;--hsk-input-control: 36px;--hsk-input-line-box: calc(var(--hsk-input-font-size) * var(--hsk-input-line-height))}.hsk-cb-listening{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none}.hsk-cb-listening span{width:2px;height:2px;border-radius:999px;background:var(--hsk-primary, #ff6a33);opacity:.3;transform-origin:center;will-change:transform,opacity;transition:transform 90ms linear,opacity 90ms linear}.hsk-animated-placeholder{position:absolute;inset:0;display:flex;flex-wrap:wrap;align-items:center;align-content:center;row-gap:1px;height:100%;pointer-events:none;overflow:hidden;user-select:none;padding:0;z-index:1}.hsk-cb-input-box>*{--hsk-cascade-ease: cubic-bezier(.45, 0, .55, 1);--hsk-cascade-dur: .44s;--hsk-cascade-step: 55ms}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field){animation-duration:var(--hsk-cascade-dur);animation-timing-function:var(--hsk-cascade-ease);animation-fill-mode:none}.hsk-cb-input-box[data-cascade=a]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-a}.hsk-cb-input-box[data-cascade=b]>*:not([type=file]):not(.hsk-cb-field){animation-name:hsk-leaf-settle-b}.hsk-cb-input-box[data-cascade]>*:not([type=file]):not(.hsk-cb-field),.hsk-animated-placeholder__char{will-change:transform}.hsk-cb-input-box:hover>*,.hsk-cb-input-box:focus-within>*{will-change:auto}.hsk-cb-input-box>*{--hsk-cascade-field: .11s}.hsk-cb-input-box[data-cascade]>.hsk-cb-attach-btn{animation-delay:0ms}.hsk-cb-input-box[data-cascade]>.hsk-cb-voice-mode-btn{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms))}.hsk-cb-input-box[data-cascade]>.hsk-cb-send,.hsk-cb-input-box[data-cascade]>.hsk-chat-send{animation-delay:calc(var(--hsk-cascade-field) + var(--hsk-text-sweep, 0ms) + var(--hsk-cascade-step))}@keyframes hsk-leaf-settle-a{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}@keyframes hsk-leaf-settle-b{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.05)}to{transform:translateY(0) scale(1)}}.hsk-cb-input-box>.hsk-cb-field .hsk-animated-placeholder__char{animation-name:hsk-placeholder-animate-up}@media(prefers-reduced-motion:reduce){.hsk-cb-input-box[data-cascade=a]>*,.hsk-cb-input-box[data-cascade=b]>*{animation:none;transform:none;opacity:1}.hsk-cb-textarea,.hsk-cb-input-card{transition-property:background-color,box-shadow}}.hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 15px}.hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 14px}.hsk-cb-field{transition:min-block-size .26s cubic-bezier(.16,1,.3,1)}.hsk-cb-field[data-ph-lines="2"]{min-block-size:48px}.hsk-animated-placeholder__char{display:inline-block;font-size:var(--hsk-ph-font-size, var(--hsk-input-font-size, 16px));line-height:var(--hsk-input-line-height, 1.55);color:var(--hsk-chat-muted, #9ca3af);font-family:var(--hsk-font);white-space:pre;animation:hsk-placeholder-animate-up .46s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-placeholder-animate-up{0%{opacity:0;transform:translateY(9px);color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}55%{opacity:1;color:hsl(var(--hsk-ph-hue, 0) var(--hsk-ph-sat, 68%) var(--hsk-ph-light, 55%))}to{opacity:1;transform:translateY(0);color:var(--hsk-chat-muted, #9ca3af)}}@media(prefers-reduced-motion:reduce){.hsk-animated-placeholder__char{animation:none;transform:none;opacity:1;color:var(--hsk-chat-muted, #9ca3af);animation-delay:0ms!important}}.hsk-cb-voice-error{display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;line-height:1.45;width:fit-content;max-width:min(92%,520px);margin-inline:auto;margin:8px auto 0;text-align:center;text-wrap:balance;color:#ff6b6b;padding:3px 8px;border-radius:0;background:transparent;border:none;border-bottom:1px solid rgba(229,72,77,.35);cursor:pointer;animation:hsk-msg-in .2s ease-out both}.hsk-cb-voice-error span{text-align:center}.hsk-cb-voice-error-dismiss{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:none;background:#ffffff1f;color:inherit;font-size:14px;line-height:1;cursor:pointer;padding:0;flex-shrink:0;transition:background .15s ease,transform .15s ease}.hsk-cb-voice-error-dismiss:hover{background:#ffffff40;transform:scale(1.1)}.hsk-cb-img-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 18px 2px;background:transparent;border:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hsk-msg-in .2s ease-out both}.hsk-cb-img-thumb-wrap{position:relative;width:60px;height:60px;flex-shrink:0;border-radius:12px;box-shadow:0 2px 8px #00000014,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 12%,transparent);transition:transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s cubic-bezier(.16,1,.3,1);overflow:visible}.hsk-cb-img-thumb-wrap:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f,0 0 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 20%,transparent)}.hsk-cb-img-thumb{width:100%;height:100%;object-fit:cover;border-radius:12px;border:none;display:block}.hsk-cb-img-thumb-remove{position:absolute;top:-5px;inset-inline-end:-5px;width:18px;height:18px;border-radius:50%;background:#141418bf;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#fff;border:1px solid rgba(255,255,255,.25);box-shadow:0 2px 6px #00000040;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;transition:transform .15s cubic-bezier(.16,1,.3,1),background-color .15s ease;z-index:2}.hsk-cb-img-thumb-remove:hover{background:#ef4444eb;border-color:#fff6;transform:scale(1.15)}.hsk-cb-attach-btn,.hsk-cb-voice-mode-btn{position:relative;width:36px;height:36px;border-radius:12px;border:none!important;outline:none!important;background:transparent;color:var(--hsk-chat-muted, #71717a);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:none!important;opacity:.75;transition:transform .35s cubic-bezier(.34,1.8,.64,1),background-color .2s ease,color .2s ease,opacity .2s ease;font-family:inherit;overflow:visible}.hsk-cb-attach-btn:hover:not(:disabled),.hsk-cb-voice-mode-btn:hover:not(:disabled){opacity:1;color:var(--hsk-chat-text, #1f1f1f);background:transparent;transform:translateY(-1px)}.hsk-cb-attach-btn:active:not(:disabled),.hsk-cb-voice-mode-btn:active:not(:disabled){transform:translateY(0) scale(.94);transition-duration:.1s}.hsk-cb-attach-btn svg,.hsk-cb-voice-mode-btn svg{overflow:visible}.hsk-cb-attach-btn svg{transition:transform .34s cubic-bezier(.22,1,.36,1)}.hsk-cb-attach-btn:hover:not(:disabled) svg{transform:rotate(-14deg) translateY(-1px)}.hsk-mic-cap{transform-box:fill-box;transform-origin:center;transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-wave-bar{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:hsk-wave-wake .52s cubic-bezier(.34,1.8,.64,1) both,hsk-wave-live var(--hsk-period, 1.1s) ease-in-out .52s infinite;animation-delay:calc(var(--hsk-bar, 0) * 55ms),calc(.52s + var(--hsk-bar, 0) * 55ms)}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar--tip{animation-name:hsk-wave-wake-tip,hsk-wave-live-tip}@keyframes hsk-wave-wake{0%{transform:scaleY(.12)}55%{transform:scaleY(calc(var(--hsk-amp, 1.6) * 1.12))}to{transform:scaleY(1)}}@keyframes hsk-wave-live{0%,to{transform:scaleY(1)}30%{transform:scaleY(var(--hsk-amp, 1.6))}55%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .22))}78%{transform:scaleY(calc(1 + (var(--hsk-amp, 1.6) - 1) * .62))}}@keyframes hsk-wave-wake-tip{0%{transform:scaleX(.2);opacity:.4}55%{transform:scaleX(calc(var(--hsk-amp, 1.9) * 1.1));opacity:1}to{transform:scaleX(1);opacity:.8}}@keyframes hsk-wave-live-tip{0%,to{transform:scaleX(1);opacity:.7}30%{transform:scaleX(var(--hsk-amp, 1.9));opacity:1}70%{transform:scaleX(1.15);opacity:.8}}.hsk-copy-sheet,.hsk-copy-back{transform-box:fill-box;transform-origin:center;transition:transform .3s cubic-bezier(.22,1,.36,1)}.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-sheet,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-sheet{transform:translate(.9px,.9px)}.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) .hsk-copy-back,.hsk-cb-secret-key:is(:hover,:active) .hsk-copy-back{transform:translate(-.9px,-.9px)}@media(prefers-reduced-motion:reduce){.hsk-cb-attach-btn:hover:not(:disabled) svg,.hsk-cb-kiku-id-pill:hover .hsk-copy-sheet,.hsk-cb-kiku-id-pill:hover .hsk-copy-back,.hsk-cb-toolsheet-pub:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back),.hsk-cb-secret-key:is(:hover,:active) :is(.hsk-copy-sheet,.hsk-copy-back){transform:none}.hsk-cb-voice-mode-btn:hover:not(:disabled) .hsk-wave-bar{animation:none}}.hsk-cb-attach-btn:disabled,.hsk-cb-voice-mode-btn:disabled{opacity:.3;cursor:not-allowed;transform:none}.hsk-cb-user-imgs{display:grid;gap:2px;width:fit-content;max-width:min(78%,320px);margin-bottom:4px;margin-left:auto;border-radius:18px 18px 4px;overflow:hidden;box-shadow:0 4px 16px #00000029}.hsk-cb-user-imgs[data-count="1"]{grid-template-columns:1fr}.hsk-cb-user-imgs[data-count="2"]{grid-template-columns:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]{grid-template-columns:2fr 1fr;grid-template-rows:1fr 1fr}.hsk-cb-user-imgs[data-count="3"]>:first-child{grid-row:span 2}.hsk-cb-user-imgs[data-count="4"]{grid-template-columns:1fr 1fr}.hsk-cb-user-img-cell{position:relative;display:block;padding:0;border:none;background:none;cursor:pointer;overflow:hidden;min-width:0;line-height:0}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-cell{aspect-ratio:auto}.hsk-cb-user-imgs:not([data-count="1"]) .hsk-cb-user-img-cell{aspect-ratio:1}.hsk-cb-user-img-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#00000073;color:#fff;font-size:20px;font-weight:600;line-height:1}.hsk-cb-user-img-thumb{width:100%;height:100%;object-fit:cover;display:block;cursor:pointer}.hsk-cb-user-imgs[data-count="1"] .hsk-cb-user-img-thumb{height:auto;max-height:300px;object-fit:contain}.hsk-cb-user-img-cell:hover .hsk-cb-user-img-thumb{filter:brightness(.93)}.hsk-cb-leave{position:relative;z-index:96;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;width:fit-content;max-width:calc(100% - 24px);margin:0 12px -12px;padding:6px 6px 6px 14px;border-radius:18px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #fff),0 6px 20px #0000001f;font:500 13px/1.4 var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-leave-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.hsk-cb-leave+.hsk-cb-input-card>*{opacity:.45;transition:opacity .15s}.hsk-cb-leave-btn{height:28px;padding:0 13px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12.5px var(--hsk-font);cursor:pointer}.hsk-cb-leave-btn--end{background:var(--hsk-chat-text, #111827);color:var(--hsk-chat-bg, #fff)}.hsk-cb-error{display:block;width:fit-content;max-width:min(560px,100%);margin:10px auto 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#ef4444;font-size:13px;line-height:1.5;font-family:var(--hsk-font);text-align:center}.hsk-kiku-badge{display:inline-block;font-size:var(--hsk-font-size, 16px);font-family:var(--hsk-font);font-weight:600;background:#ffffff38;border:1px solid rgba(255,255,255,.35);color:#fff;padding:1px 7px;border-radius:6px;margin-inline-end:6px}.hsk-cb-memory-pill{display:inline-flex;align-items:center;gap:10px;align-self:flex-start;margin:12px 0 6px;padding:12px 22px;font-size:15px;font-weight:600;text-decoration:none;color:#fff;background:linear-gradient(135deg,#007aff,#0056b3);border:none;border-radius:18px 18px 18px 4px!important;box-shadow:0 4px 16px -2px #007aff61,inset 0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 28%,transparent);transition:transform .18s cubic-bezier(.34,1.56,.64,1),opacity .15s,box-shadow .18s ease;cursor:pointer}.hsk-cb-memory-pill:hover{opacity:.96;transform:translateY(-1px) scale(1.02);box-shadow:0 6px 20px #007aff7a}.hsk-cb-think{position:relative;z-index:2;margin-bottom:-11px;margin-inline-start:12px;font-size:14px;font-family:var(--hsk-font)}.hsk-cb-think--note{margin-bottom:0}.hsk-cb-think-head{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 11px;border:none;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 1px 3px #00000021;font-family:var(--hsk-font);font-size:12px;font-weight:600;color:var(--hsk-chat-muted, #6b7280);cursor:pointer;user-select:none;line-height:28px}.hsk-cb-think-head:hover{color:var(--hsk-chat-text, #111827)}.hsk-cb-think-head--static{cursor:default}.hsk-cb-think-head--static:hover{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-think-chevron{font-size:9px;transition:transform .12s}.hsk-cb-think-chevron--open{transform:rotate(90deg)}.hsk-cb-think-body{margin-top:6px;padding:8px 12px;border-left:2px solid var(--hsk-chat-border, rgba(128,128,128,.25));color:var(--hsk-chat-muted, #4b5563);white-space:pre-wrap;line-height:1.5;font-family:var(--hsk-font);font-size:14px}.hsk-cb-stopped{display:flex;flex-direction:column;align-items:start;gap:8px;margin:10px 0 14px}.hsk-cb-stopped--empty{align-items:center;text-align:center;margin:22px auto 18px}.hsk-cb-stopped--empty .hsk-cb-stopped-label{text-align:center}.hsk-cb-stopped-dots{display:flex;gap:5px;margin-bottom:2px}.hsk-cb-stopped-dots i{width:5px;height:5px;border-radius:50%;background:var(--hsk-chat-muted, #888);opacity:.4}.hsk-cb-stopped-label{font-size:13px;line-height:1.5;color:var(--hsk-chat-muted, #888);font-family:var(--hsk-font);text-align:start}.hsk-cb-continue{display:inline-flex;align-items:center;gap:7px;padding:7px 14px;font-size:13px;font-weight:500;font-family:var(--hsk-font);color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);border-radius:999px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.hsk-cb-continue:hover{border-color:var(--hsk-primary);color:var(--hsk-primary);background:transparent}.hsk-cb-continue svg{flex:none}[dir=rtl] .hsk-cb-continue svg{transform:scaleX(-1)}.hsk-sb-wrap{--hsk-bg: #ffffff;--hsk-border: #f1f3f4;--hsk-text: #1f1f1f;--hsk-muted: #5f6368;--hsk-hover: #f8f9fa;--hsk-drop-shadow: 0 8px 30px rgba(0,0,0,.06);--hsk-primary: var(--chat-primary-color, #ff6a33);position:relative;width:100%;font-family:inherit}@media(prefers-color-scheme:dark){.hsk-sb-wrap{--hsk-bg: #0a0a0a;--hsk-border: #202124;--hsk-text: #e8eaed;--hsk-muted: #888;--hsk-hover: #1a1a1b;--hsk-drop-shadow: 0 12px 40px rgba(0,0,0,.4)}}.hsk-sb-input{width:100%;padding:10px 16px 10px 40px;font-size:14px;border-radius:var(--hsk-border-radius, 0px);border:1.5px solid var(--hsk-border);outline:none;box-sizing:border-box;background:var(--hsk-bg);color:var(--hsk-text);transition:border-color .15s,box-shadow .15s;font-family:inherit}.hsk-sb-input::placeholder{color:var(--hsk-muted)}.hsk-sb-input:focus{border-color:var(--hsk-primary);box-shadow:0 0 0 3px #ff6a331f}.hsk-sb-icon{position:absolute;inset-inline-start:14px;top:50%;transform:translateY(-50%);color:var(--hsk-muted);pointer-events:none;display:flex;align-items:center}.hsk-sb-drop{position:absolute;top:calc(100% + 6px);left:0;right:0;background:var(--hsk-bg);border:1px solid var(--hsk-border);border-radius:var(--hsk-border-radius, 0px);box-shadow:var(--hsk-drop-shadow);z-index:9999;overflow:hidden;padding:6px 0}.hsk-sb-row{display:flex;align-items:center;gap:12px;padding:9px 16px;cursor:pointer;transition:background .1s}.hsk-sb-row:hover{background:var(--hsk-hover)}.hsk-sb-row-thumb{width:38px;height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:var(--hsk-muted);background:var(--hsk-hover);border-radius:var(--hsk-border-radius, 0px);overflow:hidden}.hsk-sb-row-thumb img{width:100%;height:100%;object-fit:cover;display:block}.hsk-sb-row-body{flex:1;min-width:0}.hsk-sb-row-title{font-size:13px;font-weight:500;color:var(--hsk-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.hsk-sb-row-sub{font-size:11px;color:var(--hsk-muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-sb-empty{padding:14px 16px;font-size:13px;color:var(--hsk-muted)}.hsk-sb-loading-bar{height:2px;background:linear-gradient(90deg,transparent,var(--hsk-primary),transparent);background-size:200% 100%;animation:hsk-sweep .9s linear infinite;position:absolute;top:0;left:0;right:0}@keyframes hsk-sweep{0%{background-position:200% 0}to{background-position:-200% 0}}.hsk-sb-fade{animation:hsk-fin .1s ease-out both}@keyframes hsk-fin{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}.hsk-sb-skeleton-row{display:flex;align-items:center;gap:12px;padding:9px 16px}.hsk-sb-skeleton-icon{width:38px;height:38px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:var(--hsk-border-radius, 0px);flex-shrink:0;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text1{height:12px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:3px;width:60%;animation:hsk-pulse 1.5s ease-in-out infinite}.hsk-sb-skeleton-text2{height:8px;background:var(--hsk-hover, rgba(0, 0, 0, .05));border-radius:2px;width:35%;margin-top:5px;animation:hsk-pulse 1.5s ease-in-out infinite}@keyframes hsk-pulse{0%,to{opacity:.6}50%{opacity:1}}@media(pointer:coarse){.hsk-cb-user-bubble,.hsk-cb-ai-body{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}.hsk-tapback-overlay{position:absolute;inset:0;z-index:1000;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;touch-action:none}.hsk-tapback-group{position:absolute;z-index:1002;display:flex;flex-direction:column;animation:hsk-tapback-flow-up .26s cubic-bezier(.34,1.56,.64,1) both}.hsk-tapback-group.is-closing{animation:hsk-tapback-flow-down .19s cubic-bezier(.55,0,.85,.35) forwards}.hsk-tapback-group.is-above{transform-origin:var(--tail-x, 80%) calc(100% + 16px)}.hsk-tapback-group.is-below{transform-origin:var(--tail-x, 80%) -16px}.hsk-tapback-capsule{display:inline-flex;align-items:center;gap:1px;padding:3px 5px;height:36px;min-height:36px;border-radius:999px;border:none;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 6px 18px #00000029;max-width:calc(100vw - 20px);position:relative;z-index:2;box-sizing:border-box}.hsk-tapback-tail{position:absolute;top:calc(100% - 2px);transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:3px;pointer-events:none;z-index:1}.hsk-tapback-tail.is-below{top:auto;bottom:calc(100% - 2px);flex-direction:column-reverse}.hsk-tapback-dot--mid{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px))}.hsk-tapback-dot--anchor{margin-left:calc(var(--tail-dir, 0) * var(--tail-step, 5px) * 2.2)}.hsk-tapback-dot{display:block;border-radius:50%;flex-shrink:0;border:none}.hsk-tapback-dot--mid{width:12px;height:12px;background:var(--hsk-skin, var(--hsk-bubble-bg, #eeeef0));box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff),0 2px 5px #0000001f;animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .06s backwards}.hsk-tapback-dot--anchor{width:9px;height:9px;background:var(--hsk-anchor-color, var(--hsk-primary, #007aff));animation:hsk-tapback-bead .2s cubic-bezier(.16,1,.3,1) .02s backwards}.hsk-tapback-tool-btn{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;height:30px;border-radius:999px;font-size:12px;font-weight:500;font-family:var(--hsk-font);line-height:1;color:var(--hsk-chat-text, #f3f4f6);background:transparent;border:none;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;transition:background-color .15s ease,transform .12s ease;white-space:nowrap;animation:hsk-tapback-tool-pop .2s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(.02s + var(--tool-idx, 0) * .02s)}.hsk-tapback-tool-btn:hover{background:color-mix(in srgb,var(--hsk-chat-text, #ffffff) 14%,transparent)}.hsk-tapback-tool-btn:active{transform:scale(.92)}.hsk-tapback-tool-btn--pin{color:var(--hsk-primary, #ff6a33)}.hsk-tapback-tool-btn--pin:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 18%,transparent)}.hsk-tapback-tool-btn--copy.is-copied{color:#10b981!important}@keyframes hsk-tapback-flow-up{0%{opacity:0;transform:scale(.12,.04)}18%{opacity:1}46%{transform:scale(1.06,1.13)}74%{transform:scale(.985,.95)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-flow-down{0%{opacity:1;transform:scale(1)}65%{opacity:1;transform:scale(.5,.34)}to{opacity:0;transform:scale(.12,.04)}}@keyframes hsk-tapback-bead{0%{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes hsk-tapback-tool-pop{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}.hsk-cb-topbar-logo{display:block;max-height:18px;max-width:104px;object-fit:contain}.hsk-cb-sound-pill{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border-radius:16px;font-family:var(--hsk-font);font-size:11px;font-weight:550;color:var(--hsk-chat-muted, #71717a);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 65%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 30%,transparent);cursor:pointer;transition:color .2s ease,border-color .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-sound-pill.is-on{color:var(--hsk-chat-text, #111)}.hsk-cb-req{position:relative;width:100%}.hsk-cb-req-dot{width:7px;height:7px;border-radius:50%;background:var(--hsk-primary, #ff6a33)}.hsk-cb-req-list{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;z-index:60;display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto;scrollbar-width:none;font-family:var(--hsk-font);animation:hsk-leave-in .18s cubic-bezier(.16,1,.3,1) both}.hsk-cb-req-open{display:flex;align-items:flex-start;gap:9px;width:100%;padding:6px 0 6px 12px;padding-inline:12px 0;border:none;background:none;color:var(--hsk-chat-muted, #8a8f98);font:inherit;text-align:start;cursor:pointer;opacity:.6;transition:opacity .2s ease,color .2s ease}.hsk-cb-req-open:hover,.hsk-cb-req-card.is-open .hsk-cb-req-open,.hsk-cb-req-card.is-active .hsk-cb-req-open{opacity:1}.hsk-cb-req-card.is-active .hsk-cb-req-summary{color:var(--hsk-chat-text, #1f1f1f);font-weight:500}.hsk-cb-req-mark{flex:none;width:6px;height:6px;margin-top:5px;border-radius:50%;background:currentColor;opacity:.45}.hsk-cb-req-card.is-open .hsk-cb-req-mark{background:var(--hsk-primary, #ff6a33);box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);opacity:1}.hsk-cb-req-text{display:flex;flex-direction:column;gap:1px;min-width:0}.hsk-cb-req-summary,.hsk-cb-req-status{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hsk-cb-req-summary{font-size:12px;line-height:1.4}.hsk-cb-req-status{font-size:10.5px;opacity:.75}.hsk-cb-tray-below{position:absolute;top:calc(var(--hsk-tray-top, 100%) + var(--hsk-tray-h, 0px) + 14px);left:50%;transform:translate(-50%);width:min(300px,calc(100vw - 28px));z-index:1000;animation:hsk-scrim-in .25s cubic-bezier(.16,1,.3,1) .08s both}.hsk-cb-tray-below.is-closing{animation:hsk-scrim-out .18s cubic-bezier(.4,0,1,1) both;pointer-events:none}.hsk-cb-tray-below .hsk-cb-req-list{position:static;max-height:32vh;animation:none}.hsk-cb-tray-below-title{display:block;padding:0 12px 4px;font:600 10.5px var(--hsk-font);letter-spacing:.04em;text-transform:uppercase;color:var(--hsk-chat-muted, #8a8f98);opacity:.7}.hsk-cb-btn-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:1}.hsk-cb-sound-pill:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33)}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-rule{width:13px;height:1px;background:var(--hsk-chat-muted, #71717a);opacity:.25}.hsk-cb-sound-pill.is-compact{width:26px;height:26px;padding:0;gap:0;justify-content:center;border-radius:9px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside{width:14px;flex:0 0 14px}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill{width:14px;height:14px;border:none;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;opacity:.45}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill.is-on{opacity:.75}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill:hover{transform:none}.hsk-cb-topbar-ooze-menu .hsk-cb-tray-aside .hsk-cb-sound-pill svg{width:12px;height:12px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{flex:1 1 auto!important}.hsk-cb-sound-pill.is-blocked{color:#ef4444!important;opacity:1!important}.hsk-cb-panel[dir=rtl] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-vlabel{transform:none}.hsk-markdown-table td.hsk-md-ok,[data-hsk-theme] .hsk-markdown-table td.hsk-md-ok{color:color-mix(in srgb,#10b981 72%,var(--hsk-chat-text, #111))!important;font-weight:600}.hsk-markdown-table td.hsk-md-bad,[data-hsk-theme] .hsk-markdown-table td.hsk-md-bad{color:color-mix(in srgb,#ef4444 72%,var(--hsk-chat-text, #111))!important;font-weight:600}@media(max-width:1199px){.hsk-cb-topbar-ooze-menu.is-island,.hsk-cb-topbar-ooze-menu.is-island.is-closing{animation:none;will-change:clip-path}.hsk-cb-topbar-ooze-menu.is-island>*{opacity:var(--hsk-island-content, 1)}}.hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-tray-shadow.is-parked{visibility:hidden;pointer-events:none;opacity:0!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu.is-parked,.hsk-cb-topbar-ooze-menu.is-parked{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}.hsk-cb-tray-shadow.is-parked>div{box-shadow:none!important}.hsk-cb-tray-shadow{position:absolute;top:var(--hsk-tray-top, 0px);left:50%;transform:translate(-50%);width:var(--hsk-tray-w, 0px);height:var(--hsk-tray-h, 0px);z-index:1000;pointer-events:none}.hsk-cb-tray-shadow>div{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:18px;box-shadow:0 16px 38px -6px color-mix(in srgb,#000 16%,transparent)}.hsk-cb-allowance{display:flex;flex-wrap:wrap;gap:6px;margin-block-start:8px;pointer-events:none}@media(min-width:1200px){.hsk-cb-allowance{flex-direction:column;flex-wrap:nowrap;align-items:flex-start;gap:12px;position:absolute;bottom:48px;width:auto;max-width:200px;margin-block-start:0;z-index:10;direction:ltr}.hsk-cb-allowance--right{left:100%!important;right:auto!important;margin-left:28px!important;margin-right:0!important;align-items:flex-start}.hsk-cb-allowance--left{left:auto!important;right:100%!important;margin-right:28px!important;margin-left:0!important;align-items:flex-end}}.hsk-cb-allowance-pill{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 13px;border-radius:999px;font-family:inherit;font-size:11.5px;font-weight:550;letter-spacing:-.01em;line-height:1;white-space:nowrap;color:var(--hsk-chat-text)!important;background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 68%,transparent)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%));border:1px solid color-mix(in srgb,var(--hsk-chat-border, rgba(255, 255, 255, .35)) 35%,transparent)!important;border-top:1px solid color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent)!important;border-bottom:1px solid color-mix(in srgb,#000 8%,transparent)!important;box-shadow:0 4px 18px -2px color-mix(in srgb,#000 14%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 45%,transparent) inset!important;animation:hsk-allowance-in .34s cubic-bezier(.22,1,.36,1) both;transition:all .2s cubic-bezier(.16,1,.3,1);cursor:default}.hsk-cb-allowance-pill:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 82%,transparent)!important;border-top-color:color-mix(in srgb,var(--hsk-chat-bg, #fff) 85%,transparent)!important;transform:translateY(-1px);box-shadow:0 6px 20px -2px color-mix(in srgb,#000 18%,transparent),0 1px color-mix(in srgb,var(--hsk-chat-bg, #fff) 60%,transparent) inset!important}.hsk-cb-allowance-pill-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--hsk-primary, #6366f1);opacity:.95}.hsk-cb-allowance-pill-icon svg{width:12.5px;height:12.5px}.hsk-cb-allowance-pill-label{font-family:inherit;letter-spacing:-.01em}.hsk-cb-allowance-pill.is-spent{opacity:.5;filter:grayscale(.6)}@keyframes hsk-allowance-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.hsk-cb-allowance-pill{animation:none}}.hsk-cb-onboarding-card .hsk-cb-entlang-opt{padding-inline:2px 0}.hsk-cb-secret-card{display:flex;flex-direction:column;gap:8px;max-width:340px}.hsk-cb-secret-head{display:flex;align-items:center;gap:8px}.hsk-cb-secret-title{flex:1;font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-timer{font-size:11px;font-variant-numeric:tabular-nums;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-secret-dismiss{display:grid;place-items:center;width:24px;height:24px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-cb-secret-key{display:flex;align-items:center;gap:10px;width:100%;padding:8px 8px 8px 14px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);cursor:pointer}.hsk-cb-secret-key code{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;text-align:start;color:var(--hsk-chat-text, #111)}.hsk-cb-secret-copy{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;padding:5px 12px;font-size:12px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border-radius:999px}.hsk-cb-secret-hint{font-size:11px;color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px;max-width:460px;margin-top:10px}.hsk-cb-swatch{display:flex;flex-direction:column;gap:2px;padding:0 0 8px;text-align:start;background:var(--hsk-chat-source-bg, rgba(0, 0, 0, .03));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border-radius:14px;overflow:hidden;cursor:pointer;animation:hsk-msg-in .25s ease-out both;transition:transform .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease}.hsk-cb-swatch--target{cursor:default;background:transparent;border-style:dashed;border-color:color-mix(in srgb,var(--hsk-chat-text, #111) 28%,transparent)}.hsk-cb-swatch--target .hsk-cb-swatch-name{color:var(--hsk-chat-muted, #6b7280)}.hsk-cb-swatch:not(.hsk-cb-swatch--target):hover{transform:translateY(-2px);box-shadow:0 10px 24px -12px color-mix(in srgb,#000 35%,transparent)}.hsk-cb-swatch-chip{display:block;aspect-ratio:1 / .8;margin-bottom:6px;box-shadow:inset 0 -1px color-mix(in srgb,#000 8%,transparent)}.hsk-cb-swatch-name{padding:0 10px;font-size:12px;font-weight:600;line-height:1.3;color:var(--hsk-chat-text, #111);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-cb-swatch-code{padding:0 10px;font-size:11px;font-variant-numeric:tabular-nums;letter-spacing:.02em;color:var(--hsk-chat-muted, #6b7280)}@media(prefers-reduced-motion:reduce){.hsk-cb-swatch,.hsk-cb-swatch:hover{animation:none;transform:none}}.hsk-cb-opening-spinner{animation:hsk-cb-opening-spin 1s linear infinite}@keyframes hsk-cb-opening-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-opening-spinner{animation:none}}.hsk-opening-shell{position:fixed;inset:0;z-index:2147483647;height:100vh;height:100dvh;margin:0;box-sizing:border-box;background:var(--hsk-chat-bg, #f5f0e8);color:var(--hsk-chat-text, #342820);font:14px var(--hsk-font, system-ui, sans-serif)}.hsk-opening-panel{max-width:720px;height:100%;margin:0 auto;display:flex;flex-direction:column}.hsk-opening-header{display:flex;align-items:center;justify-content:space-between;padding:14px 24px 10px;min-height:48px;box-sizing:border-box;font-weight:600}.hsk-opening-logo{max-width:150px;height:24px;object-fit:contain}.hsk-opening-close{appearance:none;border:0;border-radius:50%;background:transparent;color:inherit;font:28px/1 system-ui,sans-serif;width:40px;height:40px;cursor:pointer}.hsk-opening-close:focus-visible,.hsk-opening-retry:focus-visible{outline:2px solid currentColor;outline-offset:3px}.hsk-opening-content{flex:1;display:grid;place-items:center;padding:24px}.hsk-opening-feedback{display:flex;flex-direction:column;align-items:center;gap:14px;color:inherit}.hsk-opening-feedback p{margin:0}.hsk-opening-retry{appearance:none;background:transparent;color:inherit;border:1px solid currentColor;border-radius:6px;padding:8px 16px;font:inherit;cursor:pointer}.hsk-gallery-cover{position:relative;display:block;width:100%;border:0;padding:0;cursor:pointer;background:transparent}.hsk-gallery-cover img{width:100%;height:100%;object-fit:cover}.hsk-gallery-count{position:absolute;bottom:6px;right:6px;padding:3px 7px;border-radius:10px;background:#000000b8;color:#fff;font-size:11px}.hsk-entity-gallery{position:fixed;inset:0;margin:auto;padding:18px;width:min(850px,calc(100vw - 32px));max-height:90dvh;overflow:auto;border:1px solid var(--hsk-chat-divide,#555);border-radius:16px;background:var(--hsk-chat-bg,#161616);color:var(--hsk-chat-text,#fff);box-sizing:border-box}.hsk-entity-gallery::backdrop{background:#000c}.hsk-gallery-top,.hsk-gallery-controls{display:flex;align-items:center;justify-content:space-between;gap:16px}.hsk-gallery-top span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-entity-gallery button{display:flex;align-items:center;justify-content:center;width:40px;height:40px;flex-shrink:0;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;cursor:pointer}.hsk-entity-gallery button:disabled{opacity:.3;cursor:default}.hsk-entity-gallery button:focus-visible,.hsk-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-entity-gallery figure{margin:16px 0;text-align:center;touch-action:pan-y}.hsk-entity-gallery figure img{max-width:100%;max-height:65dvh;object-fit:contain}.hsk-entity-gallery figcaption{margin-top:12px;font-size:14px}.hsk-gallery-controls{justify-content:center}@keyframes hsk-card-in{0%{opacity:0;transform:scale(.96) translateY(-12px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-bar{0%{background-position:200% 0}to{background-position:-200% 0}}@media(max-width:768px){.hsk-cb-overlay{--hsk-font-size: var(--hsk-mobile-font-size, 14px) !important;position:fixed!important;inset:0!important;width:100vw!important;height:100%!important;height:var(--hsk-vvh, 100dvh)!important;min-height:0!important;z-index:2147483647!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;overscroll-behavior:contain!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-panel{position:relative!important;height:100%!important;width:100%!important;max-width:100%!important;margin:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:0!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-main{flex:1 1 auto!important;height:100%!important;min-height:0!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important;overflow:hidden!important;background:var(--hsk-chat-bg, #0a0a0a)!important;box-sizing:border-box!important}.hsk-cb-topbar{padding:14px 14px 8px!important}.hsk-cb-msgs{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch!important;padding:10px 14px 0!important}.hsk-cb-empty{flex:1 0 auto!important;justify-content:center!important;padding:16px 4px!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto auto}.hsk-cb-input-box>.hsk-cb-attach-btn{display:none}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none}.hsk-cb-input-box>.hsk-cb-field{grid-column:2}.hsk-cb-input-box>.hsk-cb-voice-mode-btn{grid-column:3}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:4}.hsk-cb-tools-toggle{display:flex;grid-column:1;grid-row:1;width:36px;height:36px;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:none;border-radius:12px;background:var(--hsk-chat-subtle, rgba(0,0,0,.045));color:var(--hsk-chat-muted, #6b7280);cursor:pointer;transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .2s ease}.hsk-cb-tools-toggle--open{transform:rotate(45deg);background:var(--hsk-chat-divide, rgba(0,0,0,.09))}.hsk-cb-toolsheet-wrap,.hsk-cb-toolsheet-scrim{display:block}.hsk-cb-toolsheet-item{display:flex}.hsk-cb-input-box[data-expanded=true]>.hsk-cb-tools-toggle{grid-row:2}.hsk-cb-ai-msg--inline{display:block!important;padding-inline-end:34px}.hsk-cb-hello-wrap{align-items:center!important;text-align:center!important;gap:4px!important;width:100%!important;max-width:min(520px,100%)!important;padding-inline:16px!important;box-sizing:border-box!important;margin-inline:auto!important}.hsk-cb-ink-skeleton{align-items:center!important}.hsk-cb-hello{font-size:clamp(21px,5.8vw,30px)!important;font-weight:600!important;line-height:1.25!important;letter-spacing:-.02em!important;color:var(--hsk-chat-muted, #8b8b8f)!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word}.hsk-cb-hello-lead,.hsk-cb-hello-ask{font-size:14px!important;font-weight:400!important;line-height:1.45!important;text-align:center!important;text-wrap:balance;max-width:100%!important;overflow-wrap:break-word;color:color-mix(in srgb,var(--hsk-chat-muted, #8b8b8f) 78%,transparent)!important}.hsk-cb-hello-lead{font-size:14px!important;margin-top:4px!important}.hsk-cb-lang-chips{justify-content:center!important;width:100%!important;gap:8px!important;margin:12px 0 6px!important}.hsk-cb-lang-chips-hint{width:100%!important;justify-content:center!important;margin-top:6px!important;margin-inline-start:0!important}.hsk-cb-onboarding-head{justify-content:flex-start!important;margin-bottom:12px!important}.hsk-cb-onboarding-card .hsk-cb-hello-wrap{align-items:flex-start!important;text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-hello,.hsk-cb-onboarding-card .hsk-cb-hello-lead,.hsk-cb-onboarding-card .hsk-cb-hello-ask,.hsk-cb-onboarding-card .hsk-cb-hello-hint{text-align:start!important}.hsk-cb-onboarding-card .hsk-cb-lang-chips,.hsk-cb-onboarding-card .hsk-cb-lang-chips-hint{justify-content:flex-start!important}.hsk-cb-doodles{opacity:.92!important}.hsk-cb-input-wrap{margin-top:auto!important;flex-shrink:0!important;--hsk-composer-pad-top: 8px;--hsk-composer-pad-x: 14px;padding:8px 14px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important;background:var(--hsk-chat-bg, #0a0a0a)!important;position:relative!important;z-index:10!important}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-chat-send{width:32px!important;height:32px!important;border-radius:8px!important}.hsk-cb-attach-btn svg,.hsk-cb-send svg,.hsk-chat-send svg{width:15px!important;height:15px!important}.hsk-cb-input-box{padding:10px 10px 10px 14px}.hsk-cb-user-bubble{max-width:85%}}.hsk-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:12px 0 8px;width:100%;max-width:100%;min-width:0;border-radius:0;padding:0 0 6px;background:transparent;box-shadow:none;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--hsk-chat-divide, rgba(0, 0, 0, .2)) transparent;cursor:grab;user-select:auto;transition:mask-image .15s ease,-webkit-mask-image .15s ease}.hsk-table-wrapper.is-dragging{cursor:grabbing;user-select:none}.hsk-table-wrapper::-webkit-scrollbar{height:5px}.hsk-table-wrapper::-webkit-scrollbar-track{background:transparent}.hsk-table-wrapper::-webkit-scrollbar-thumb{background:var(--hsk-chat-divide, rgba(0, 0, 0, .25));border-radius:4px}.hsk-table-wrapper::-webkit-scrollbar-thumb:hover{background:var(--hsk-chat-muted, rgba(0, 0, 0, .5))}.hsk-cb-ai-text .hsk-markdown-p{margin:0 0 10px}.hsk-cb-ai-text .hsk-markdown-p:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list{margin:0 0 10px;padding-inline-start:1.2em}.hsk-cb-ai-text .hsk-markdown-list:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-ul{list-style:disc outside}.hsk-cb-ai-text .hsk-markdown-ol{list-style:decimal outside}.hsk-cb-ai-text .hsk-markdown-list li{margin:0 0 7px;padding-left:3px;line-height:1.5}.hsk-cb-ai-text .hsk-markdown-list li:last-child{margin-bottom:0}.hsk-cb-ai-text .hsk-markdown-list li::marker{color:var(--hsk-primary, #ff6a33)}.hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-ai-text .hsk-markdown-h3{margin:14px 0 7px;font-weight:650;line-height:1.3;letter-spacing:-.01em}.hsk-cb-ai-text .hsk-markdown-h1{font-size:1.09em}.hsk-cb-ai-text .hsk-markdown-h2{font-size:1.03em}.hsk-cb-ai-text .hsk-markdown-h3{font-size:1em}.hsk-cb-ai-text>:first-child{margin-top:0}.hsk-markdown-table{width:max-content;min-width:100%;border-collapse:collapse;border-spacing:0;text-align:start;font-size:13px;background:transparent;margin:0;border:none;font-variant-numeric:tabular-nums}.hsk-markdown-table th{padding:8px 16px 6px;vertical-align:bottom;line-height:1.35;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap;color:var(--hsk-chat-muted, rgba(0, 0, 0, .55));border-bottom:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .1));background:transparent!important}.hsk-markdown-table td{padding:8px 16px;vertical-align:middle;line-height:1.45;font-size:13px;white-space:nowrap;color:var(--hsk-chat-text, inherit);border-bottom:.5px solid var(--hsk-chat-divide, rgba(0, 0, 0, .06));background:transparent!important}.hsk-markdown-table th:first-child,.hsk-markdown-table td:first-child{padding-inline-start:0;font-weight:590;white-space:normal;max-width:280px;min-width:150px;line-height:1.35}.hsk-markdown-table th:last-child,.hsk-markdown-table td:last-child{padding-inline-end:0}.hsk-markdown-table tbody tr:last-child td{border-bottom:none}.hsk-markdown-table td *{color:inherit}.hsk-markdown-table .hsk-markdown-link{display:inline-flex;align-items:center;padding:2px 8px;background-color:var(--hsk-chat-source-bg, rgba(0, 0, 0, .04));border:1px solid var(--hsk-chat-divide, rgba(0, 0, 0, .08));color:var(--hsk-primary, #ff6a33);font-size:12px;font-weight:500;border-radius:6px;text-decoration:none!important;margin:2px 0;transition:opacity .15s ease}.hsk-markdown-table .hsk-markdown-link:hover{opacity:.8}@media(prefers-color-scheme:dark){.hsk-markdown-table th{color:var(--hsk-chat-muted, rgba(255, 255, 255, .5));border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .1))}.hsk-markdown-table td{color:var(--hsk-chat-text, #f0efed);border-bottom-color:var(--hsk-chat-divide, rgba(255, 255, 255, .06))}}.hsk-markdown-link{color:var(--hsk-primary, #ff6a33);text-decoration:underline;text-underline-offset:2px}.hsk-markdown-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--hsk-font);font-size:.85em;background-color:#80808026;padding:.2em .4em;border-radius:var(--hsk-border-radius, 0px);color:inherit;word-break:break-word}.hsk-markdown-img-block{margin:8px 0;line-height:0}.hsk-markdown-img{display:block;max-width:100%;width:auto;max-height:220px;border-radius:10px;box-shadow:0 2px 12px #0000002e;object-fit:cover;background:#80808014}.hsk-chat-widget ::-webkit-scrollbar,.hsk-sp-card ::-webkit-scrollbar,.hsk-cb-msgs ::-webkit-scrollbar,.hsk-sp-details-pane ::-webkit-scrollbar,.hsk-sp-results ::-webkit-scrollbar,.hsk-chat-messages ::-webkit-scrollbar{width:3px;height:3px}.hsk-chat-widget ::-webkit-scrollbar-track,.hsk-sp-card ::-webkit-scrollbar-track,.hsk-cb-msgs ::-webkit-scrollbar-track,.hsk-sp-details-pane ::-webkit-scrollbar-track,.hsk-sp-results ::-webkit-scrollbar-track,.hsk-chat-messages ::-webkit-scrollbar-track{background:transparent}.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#0000000f;border-radius:99px;transition:background .2s ease}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#00000026}@media(prefers-color-scheme:dark){.hsk-chat-widget ::-webkit-scrollbar-thumb,.hsk-sp-card ::-webkit-scrollbar-thumb,.hsk-cb-msgs ::-webkit-scrollbar-thumb,.hsk-sp-details-pane ::-webkit-scrollbar-thumb,.hsk-sp-results ::-webkit-scrollbar-thumb,.hsk-chat-messages ::-webkit-scrollbar-thumb{background:#ffffff14}.hsk-chat-widget ::-webkit-scrollbar-thumb:hover,.hsk-cb-msgs ::-webkit-scrollbar-thumb:hover{background:#fff3}}.hsk-cb-phone-form{display:flex;flex-direction:column;gap:8px;margin-top:8px}.hsk-cb-phone-label{font-size:.875rem;color:var(--hsk-chat-text, #111);margin:0}.hsk-cb-phone-input{width:100%;box-sizing:border-box;padding:8px 12px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:var(--hsk-chat-input-bg, rgba(0,0,0,.04));color:var(--hsk-chat-text, #111);font-size:.9rem;outline:none;transition:border-color .15s}.hsk-cb-phone-input::placeholder{color:var(--hsk-chat-muted, #888)}.hsk-cb-phone-input:focus{border-color:var(--hsk-primary, #ff6a33)}.hsk-cb-phone-submit{align-self:flex-start;padding:8px 16px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));border-radius:var(--hsk-border-radius, 0px);background:transparent;color:var(--hsk-chat-text, #111);font-size:.875rem;font-weight:500;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.hsk-cb-phone-submit:hover{border-color:var(--hsk-primary, #ff6a33);color:var(--hsk-primary, #ff6a33)}.hsk-cb-main{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-fade-in-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-action-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;animation:hsk-fade-in-up .35s ease .1s both}.hsk-action-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:20px;border:1px solid var(--hsk-chat-divide, rgba(0,0,0,.12));background:var(--hsk-pill-bg, rgba(255,255,255,.8));color:var(--hsk-chat-text, #1f1f1f);font-size:12px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .15s;white-space:nowrap;backdrop-filter:blur(4px)}.hsk-action-pill:hover:not(:disabled){border-color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);color:var(--hsk-primary, #ff6a33);transform:translateY(-1px);box-shadow:0 2px 8px #00000014}.hsk-action-pill:disabled{opacity:.4;cursor:not-allowed}.hsk-pill-emoji{font-size:13px;line-height:1}@media(prefers-color-scheme:dark){.hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}}[data-hsk-theme=dark] .hsk-action-pill{--hsk-pill-bg: rgba(40,40,42,.85);border-color:#ffffff1a;color:var(--hsk-chat-text, #e8eaed)}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #6c47ff)}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.6);opacity:0}}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:var(--hsk-primary-alpha, rgba(108,71,255,.1));color:var(--hsk-primary, #6c47ff);font-size:11px;font-weight:500;white-space:nowrap}.kiku-voice-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;border:none;background:transparent;color:var(--hsk-text-muted, #888);cursor:pointer;transition:color .2s,background .2s;flex-shrink:0}.kiku-voice-btn:hover{background:var(--hsk-hover-bg, rgba(0,0,0,.06));color:var(--hsk-primary, #ff6a33)}.kiku-voice-btn--active{color:#ef4444;background:#ef44441a}.kiku-voice-btn:disabled{opacity:.4;cursor:not-allowed}.kiku-voice-ripple{position:absolute;inset:-4px;border-radius:50%;border:2px solid #ef4444;animation:kiku-voice-pulse 1.2s ease-out infinite;pointer-events:none}@keyframes kiku-voice-pulse{0%{transform:scale(1);opacity:1}to{transform:scale(1.7);opacity:0}}.kiku-style-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.kiku-style-tag{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:99px;background:#ff6a331a;color:var(--hsk-primary, #ff6a33);font-size:11px;font-weight:500;white-space:nowrap}.hsk-kiku-badge{display:inline-flex;align-items:center;gap:3px;font-size:13px;font-weight:700;letter-spacing:-.01em;color:#fff;background:#ffffff47;border:1px solid rgba(255,255,255,.45);padding:2px 8px;border-radius:8px;margin-inline-end:8px;vertical-align:middle;position:relative;top:-1px;box-shadow:0 1px 3px #0000001f}.hsk-markdown-img,.hsk-cb-user-img-thumb,.hsk-cb-source .hsk-cb-src-imgwrap img{cursor:zoom-in}.hsk-lightbox{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:24px;animation:hsk-lightbox-in .15s ease-out both;cursor:zoom-out}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);cursor:default}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:50%;border:none;background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-cb-viz{margin-top:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-viz img,.hsk-cb-viz video{width:100%;max-width:420px;border-radius:8px;display:block}.hsk-cb-viz-disclaimer{max-width:420px;margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-calc-disclaimer{max-width:440px;margin-top:8px;padding:8px 12px;font-size:11.5px;line-height:1.45;color:var(--hsk-chat-muted, rgba(255, 255, 255, .65));background:var(--hsk-chat-callout-bg, rgba(255, 255, 255, .04));border:1px solid var(--hsk-border-subtle, rgba(255, 255, 255, .08));border-radius:8px}[data-hsk-theme=light] .hsk-cb-calc-disclaimer{color:#0009;background:#00000008;border-color:#00000014}.hsk-cb-stale{max-width:420px;margin-top:8px;padding:8px 10px;border:1px solid rgba(220,38,38,.35);border-left-width:3px;border-radius:6px;background:#dc26260f}.hsk-cb-stale-title{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#dc2626}.hsk-cb-stale-item{margin-top:3px;font-size:12px;line-height:1.45;color:var(--hsk-chat-text, #202124)}.hsk-cb-stale-reason{color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-viz-imgwrap{position:relative;display:inline-block;max-width:100%}.hsk-cb-viz-mark{position:absolute;right:10px;bottom:10px;display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:13px;font-weight:600;color:#fff;background:#0000009e;backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.35);border-radius:999px;cursor:pointer;transition:background .15s}.hsk-cb-viz-mark:hover{background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-overlay{position:fixed;inset:0;z-index:999999;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 84%,transparent);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%);display:flex;align-items:center;justify-content:center;padding:12px;animation:hsk-lightbox-in .15s ease-out both}.hsk-markup{height:100%;box-sizing:border-box;padding-top:max(32px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px;width:100%;max-height:100%;overflow-y:auto}.hsk-markup-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.hsk-markup-title{font-size:12px;font-weight:500;line-height:1.4;color:color-mix(in srgb,var(--hsk-chat-text, #111) 55%,transparent)}.hsk-markup-cancel{flex-shrink:0;padding:6px 12px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-cancel:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-stage{display:flex;flex:1;min-height:0;align-items:center;justify-content:center}.hsk-markup-canvas-wrap{position:relative;max-width:100%}.hsk-markup-canvas{display:block;max-width:100%;max-height:calc(100vh - 130px);box-shadow:0 18px 50px -12px color-mix(in srgb,#000 30%,transparent);border-radius:var(--hsk-border-radius, 0px);touch-action:none}.hsk-markup-canvas--pen,.hsk-markup-canvas--eraser{cursor:crosshair}.hsk-markup-pinlabel{position:absolute;display:flex;align-items:center;gap:4px;max-width:calc(100% - 16px);padding:4px 4px 4px 12px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 10px 28px -10px color-mix(in srgb,#000 40%,transparent)}.hsk-markup-pinlabel input{min-width:0;max-width:100%;padding:6px 0;font-size:13px;color:var(--hsk-chat-text, #111);background:transparent;border:0;outline:none}.hsk-markup-pinlabel input::placeholder{color:color-mix(in srgb,var(--hsk-chat-text, #111) 45%,transparent)}.hsk-markup-pinlabel button{flex-shrink:0;display:grid;place-items:center;width:26px;height:26px;padding:0;font-size:15px;line-height:1;color:var(--hsk-chat-text, #111);background:color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);border:0;border-radius:50%;cursor:pointer}.hsk-markup-loading,.hsk-markup-error{padding:40px 16px;font-size:13px;color:color-mix(in srgb,var(--hsk-chat-text, #111) 70%,transparent);text-align:center}.hsk-markup-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;margin-top:auto}.hsk-markup-tool{flex-shrink:0;white-space:nowrap;padding:8px 14px;font-size:12px;font-weight:600;color:var(--hsk-chat-text, #111);border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 70%,transparent);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);box-shadow:0 6px 18px -8px color-mix(in srgb,#000 22%,transparent);cursor:pointer}.hsk-markup-tool:hover:not(:disabled){background:color-mix(in srgb,var(--hsk-chat-text, #111) 16%,transparent)}.hsk-markup-tool--on{color:#fff;background:var(--hsk-primary, #ff6a33);border-color:transparent}.hsk-markup-tool--on:hover:not(:disabled){background:var(--hsk-primary, #ff6a33)}.hsk-markup-tool:disabled{opacity:.4;cursor:default}.hsk-markup-go{flex-shrink:0;padding:8px 22px;font-size:13px;font-weight:600;color:#fff;background:var(--hsk-primary, #ff6a33);border:none;border-radius:999px;box-shadow:0 6px 18px -8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 60%,transparent);cursor:pointer}.hsk-markup-go:hover:not(:disabled){opacity:.9}.hsk-markup-go:disabled{opacity:.45;cursor:default}@media(max-width:640px){.hsk-markup-head{flex-direction:column-reverse;align-items:flex-start}.hsk-markup-cancel{align-self:flex-end}}.hsk-cb-kimgs{margin-top:10px;display:flex;flex-direction:column;gap:10px;animation:hsk-msg-in .2s ease-out both}.hsk-cb-kimg-grid{display:flex;flex-wrap:wrap;gap:6px}.hsk-cb-kimg{width:132px;height:132px;object-fit:cover;border-radius:8px;cursor:zoom-in;border:1px solid var(--hsk-chat-border, rgba(0, 0, 0, .08))}.hsk-cb-kimg:only-child{width:100%;max-width:320px;height:auto}.hsk-cb-kimg-caption{margin-top:4px;font-size:11px;line-height:1.4;color:var(--hsk-chat-muted, #9aa0a6)}.hsk-cb-panel[data-script=nonlatin][data-host-font=gap]{--hsk-font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif}.hsk-cb-panel[data-script=nonlatin],.hsk-cb-panel[data-script=nonlatin] *{letter-spacing:normal;font-family:var(--hsk-font)}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-lead,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table th,.hsk-cb-panel[data-script=nonlatin] .hsk-markdown-table td{line-height:1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-voice-error{font-size:12px;line-height:1.7;max-width:min(92%,520px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-footer,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-sent-status,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-failed-notice{font-size:10px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello{font-size:clamp(20px,3.4vw,26px);line-height:1.5;text-wrap:balance;overflow-wrap:break-word}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-ask{font-size:15px;line-height:1.75}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-hello-wrap{max-width:100%;min-width:0}.hsk-cb-panel[data-script=nonlatin] .hsk-cascade__w{white-space:normal}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-lead,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-hello-ask,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-bubble,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-chip,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-topbar-btn,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-textarea,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-title,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-entlang-opt-note,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-list li,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h1,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h2,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-text .hsk-markdown-h3,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table th,.hsk-cb-panel[data-nastaliq=true] .hsk-markdown-table td{line-height:2.2}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-voice-error{font-size:13px;line-height:2;max-width:min(92%,540px);margin-left:auto;margin-right:auto}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action{height:16px;padding:1px 6.5px;font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-msg-action .hsk-cb-msg-action-label{font-size:9px;line-height:1}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-user-footer,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-ai-footer{min-height:16px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-sent-status,.hsk-cb-panel[data-nastaliq=true] .hsk-cb-failed-notice{font-size:9.5px;line-height:1}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-chip{font-size:14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-topbar-btn{height:auto;min-height:34px;padding:5px 14px}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-field{--hsk-input-line-height: 1.9}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-textarea{min-height:34px}.hsk-cb-panel[data-nastaliq=true] .hsk-cb-field{--hsk-input-line-height: 2.2}.hsk-cb-panel[data-script=nonlatin] .hsk-cb-user-bubble,.hsk-cb-panel[data-script=nonlatin] .hsk-cb-ai-text{overflow-wrap:break-word;word-break:normal}.hsk-cb-viz-broken{font-size:13px;color:var(--hsk-chat-muted, #71717a);padding:14px 16px;border:1px dashed var(--hsk-chat-divide, rgba(0, 0, 0, .12));border-radius:12px}.hsk-cb-voice-mode-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;background:transparent;border:1px solid transparent;border-radius:12px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:all .2s cubic-bezier(.34,1.56,.64,1);font-family:inherit}.hsk-cb-voice-mode-btn:hover:not(:disabled){border-color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent);color:var(--hsk-primary, #ff6a33);background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent);transform:translateY(-1px)}.hsk-cb-voice-mode-btn:disabled{opacity:.35;cursor:not-allowed}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 12px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="1"]{--hsk-ph-font-size: 15px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="2"]{--hsk-ph-font-size: 13px}.hsk-cb-panel[data-nastaliq=true] .hsk-animated-placeholder[data-fit="3"]{--hsk-ph-font-size: 11.5px}.hsk-cb-panel[data-script=nonlatin] .hsk-animated-placeholder__char{line-height:1.35}.hsk-cb-panel[data-script] .hsk-cb-chrome-loading,.hsk-cb-panel[data-script] .hsk-cb-chrome-loading *{font-family:system-ui,-apple-system,Segoe UI,Roboto,Noto Sans,sans-serif}.hsk-voice-overlay{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:clamp(8px,1.4vh,16px);padding:clamp(14px,2.5vh,24px);overflow:hidden;overscroll-behavior:contain;background:var(--hsk-chat-bg, #ffffff);animation:hsk-voice-in .32s cubic-bezier(.2,.8,.2,1);will-change:opacity;contain:paint}.hsk-voice-overlay:before{content:"";position:absolute;inset:0;background:radial-gradient(46% 20% at 50% 92%,color-mix(in srgb,var(--hsk-primary, #ff6a33) 8%,transparent) 0%,transparent 68%);pointer-events:none}.hsk-voice-overlay>*{position:relative}@keyframes hsk-voice-in{0%{opacity:0}to{opacity:1}}.hsk-voice-exit{position:absolute;z-index:2;top:14px;right:14px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease}.hsk-voice-exit:hover{color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new{position:absolute;z-index:2;top:14px;right:58px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;background:transparent;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 14%,transparent);border-radius:999px;color:var(--hsk-chat-muted, #71717a);cursor:pointer;transition:color .18s ease,border-color .18s ease,transform .12s ease}.hsk-voice-new:hover:not(:disabled){color:var(--hsk-chat-text, #1f1f1f);border-color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 32%,transparent)}.hsk-voice-new:active:not(:disabled){transform:scale(.92)}.hsk-voice-new:disabled{opacity:.4;cursor:default}.hsk-voice-stage{grid-column:2;width:100%;height:clamp(64px,13vh,140px);min-width:0;animation:hsk-composer-to-wave .42s cubic-bezier(.2,.8,.2,1) both}@keyframes hsk-composer-to-wave{0%{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.hsk-voice-stage{animation:none}}.hsk-voice-thread{position:relative;z-index:1;flex:1 1 auto;width:min(720px,100%);min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:12px;padding:clamp(46px,8vh,72px) 4px 6px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 34px,#000 calc(100% - 30px),transparent 100%)}.hsk-voice-turn--live{opacity:.72}.hsk-voice-canvas{display:block;width:100%;height:100%}.hsk-voice-controls{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;align-items:center;gap:12px;flex:none;width:min(640px,100%)}.hsk-voice-controls [data-control=attach]{grid-column:1}.hsk-voice-controls [data-control=mic]{grid-column:3}.hsk-voice-control{display:flex;align-items:center;justify-content:center;width:52px;height:52px;padding:0;background:var(--hsk-surface-2, rgba(255, 255, 255, .95));border:1px solid color-mix(in srgb,var(--hsk-chat-text, #000000) 10%,transparent);border-radius:999px;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;box-shadow:0 2px 12px #00000014,0 1px 3px #0000000a;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);transition:color .2s ease,border-color .2s ease,background .2s ease,transform .2s cubic-bezier(.16,1,.3,1),box-shadow .2s ease}.hsk-voice-control:hover{transform:scale(1.06);box-shadow:0 4px 18px #0000001f}.hsk-voice-control:active{transform:scale(.92);transition-duration:.08s}.hsk-voice-control--muted{color:var(--hsk-chat-muted, #888888);border-color:color-mix(in srgb,var(--hsk-chat-text, #000000) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 85%,transparent);box-shadow:0 1px 4px #0000000a}.hsk-voice-control-icon{display:inline-flex;align-items:center;justify-content:center;z-index:2;transition:transform .2s ease}@media(prefers-reduced-motion:reduce){.hsk-voice-control-icon,.hsk-voice-control--muted{animation:none}}.hsk-voice-stage--connecting{opacity:.4;transition:opacity .25s ease}.hsk-voice-connecting{display:flex;align-items:center;gap:7px;font-family:var(--hsk-font);font-size:13px;color:var(--hsk-chat-muted, #8a8f98);animation:hsk-sent-in .2s ease-out both}.hsk-voice-connecting-dot{width:6px;height:6px;border-radius:999px;background:currentColor;animation:hsk-queued-pulse 1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.hsk-voice-connecting-dot{animation:none;opacity:.7}}.hsk-voice-error{font-family:var(--hsk-font);font-size:.85rem;color:#e5484d;text-align:center}@media(prefers-reduced-motion:reduce){.hsk-voice-overlay{animation:none}}.hsk-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.hsk-voice-picker{position:absolute;z-index:3;top:14px;left:14px;display:flex;flex-direction:column;width:auto;height:36px;overflow:hidden;border-radius:18px;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 10%,transparent);background:linear-gradient(180deg,#ffffff1f,#fff0 60%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 58%,transparent);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:inset 0 1px #ffffff40,0 1px 2px #0000000d;interpolate-size:allow-keywords;transition:width .42s cubic-bezier(.16,1,.3,1),height .42s cubic-bezier(.16,1,.3,1),border-radius .42s cubic-bezier(.16,1,.3,1),box-shadow .3s ease;animation:hsk-voice-pill-in .42s cubic-bezier(.16,1,.3,1) both}.hsk-voice-picker[data-open]{width:224px;height:auto;border-radius:20px;background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg, #ffffff) 78%,transparent);box-shadow:inset 0 1px #ffffff40,0 8px 22px -8px #0003,0 1px 2px #0000000d}@keyframes hsk-voice-pill-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}.hsk-voice-pill{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;height:34px;padding:0 10px 0 14px;border:0;background:transparent;font:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer}.hsk-voice-pill-caret{display:inline-flex;color:var(--hsk-chat-muted, #71717a);transform:rotate(90deg) scale(.8);transition:transform .32s cubic-bezier(.16,1,.3,1)}.hsk-voice-picker[data-open] .hsk-voice-pill-caret{transform:rotate(-90deg) scale(.8)}.hsk-voice-menu-list{position:relative;contain:inline-size;display:flex;flex-direction:column;gap:1px;max-height:min(320px,50vh);padding:4px 5px 6px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;opacity:0;transition:opacity .18s ease;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 10px,#000 calc(100% - 16px),transparent 100%)}.hsk-voice-menu-list::-webkit-scrollbar{display:none}.hsk-voice-picker[data-open] .hsk-voice-menu-list{opacity:1;transition:opacity .26s ease .12s}.hsk-voice-group{display:flex;align-items:center;gap:8px;flex:none;padding:10px 9px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-group:after{content:"";flex:1;height:1px;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent)}.hsk-voice-group:first-child{padding-top:4px}.hsk-voice-option{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex:none;padding:7px 9px;border:0;border-radius:13px;background:transparent;font:inherit;text-align:start;color:var(--hsk-chat-text, #1f1f1f);cursor:pointer;transition:background .14s ease}.hsk-voice-option:hover{background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 6%,transparent)}.hsk-voice-option-name{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600}.hsk-voice-option-trait{font-size:11px;color:var(--hsk-chat-muted, #71717a)}.hsk-voice-option--on,.hsk-voice-option--on:hover{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 12%,transparent)}.hsk-voice-option--on .hsk-voice-option-name{color:var(--hsk-primary, #ff6a33)}.hsk-voice-option--on .hsk-voice-option-name:before{content:"";width:5px;height:5px;border-radius:999px;background:currentColor}@media(prefers-reduced-motion:reduce){.hsk-voice-picker{animation:none;transition:none}}@media(max-width:520px){.hsk-cb-input-box{gap:6px;padding:10px 10px 10px 12px}.hsk-cb-attach-btn,.hsk-cb-send,.hsk-cb-voice-mode-btn,.hsk-chat-send{width:32px;height:32px;border-radius:10px}.hsk-cb-textarea{flex:1 1 auto;min-width:0;font-size:16px}.hsk-cb-input-box .hsk-cb-listening{display:none}}.hsk-cb-main{position:relative}.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}@keyframes hsk-doodles-shimmer-in{0%{opacity:0}to{opacity:.9}}.hsk-cb-doodles{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.9;animation:hsk-doodles-shimmer-in .28s cubic-bezier(.16,1,.3,1) both}.hsk-cb-main>*:not(.hsk-cb-doodles){position:relative}@media(prefers-color-scheme:dark){.hsk-cb-main,.hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}}[data-hsk-theme=light] .hsk-cb-main,[data-hsk-theme=light] .hsk-voice-overlay{--hsk-doodle-ink: 31, 31, 31;--hsk-doodle-tint: 255, 106, 51}[data-hsk-theme=dark] .hsk-cb-main,[data-hsk-theme=dark] .hsk-voice-overlay{--hsk-doodle-ink: 240, 239, 237;--hsk-doodle-tint: 255, 150, 110}.hsk-cb-docked-option-detail,.hsk-cb-entlang-price,.hsk-cb-src-detail,.hsk-kiku-picker-item-price,.hsk-source-price,.hsk-sp-item-discount,.hsk-sp-item-original-price,.hsk-sp-item-price,.hsk-sp-mobile-main-card-price,.hsk-sp-mobile-similar-carousel-price,.hsk-voice-item-price,.hsk-live-cell{font-variant-numeric:tabular-nums}.hsk-live-wrap{margin:6px 0 2px;width:100%;max-width:100%;box-sizing:border-box}.hsk-live-carousel{display:flex;flex-wrap:wrap;gap:6px;align-items:flex-start;width:100%;box-sizing:border-box}.hsk-live-card{flex:0 1 auto;width:fit-content;min-width:120px;max-width:100%;background:var(--hsk-chat-source-bg, rgba(255, 255, 255, .05));border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));border-radius:12px;padding:6px 10px;box-sizing:border-box;display:flex;flex-direction:column;gap:3px;transition:opacity .2s ease;overflow:hidden}.hsk-live-card.is-stale{opacity:.75}.hsk-live-card__top{display:flex;align-items:center;justify-content:space-between;gap:8px}.hsk-live-card__badge{display:inline-flex;align-items:center;gap:5px}.hsk-live-card__body{display:flex;align-items:center}.hsk-live-dot{width:6px;height:6px;border-radius:50%;background:#10b981;flex-shrink:0}@media(prefers-reduced-motion:no-preference){.hsk-live-dot:not(.is-stale){animation:hsk-live-pulse 2s ease-in-out infinite}}.hsk-live-dot.is-stale{background:var(--hsk-chat-muted, #9ca3af)}.hsk-live-card__title{font-size:13px;font-weight:600;color:var(--hsk-chat-text, #111827);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.hsk-live-card__age{font-size:10.5px;font-weight:500;color:var(--hsk-chat-muted, #6b7280);white-space:nowrap;flex-shrink:0}.hsk-live-card__pills{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:1px}.hsk-live-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;background:color-mix(in srgb,var(--hsk-surface-1, var(--hsk-chat-bg, #ffffff)) 85%,transparent);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #ffffff) 10%,transparent);border-radius:6px;font-size:11.5px;font-variant-numeric:tabular-nums;line-height:1.25;color:var(--hsk-chat-text, #111827);box-shadow:0 1px 2px #00000008}.hsk-live-pill__label{font-weight:500;color:var(--hsk-chat-muted, #6b7280);font-size:11px;text-transform:capitalize}.hsk-live-pill__value{font-weight:650;color:var(--hsk-chat-text, #111827)}@media(prefers-reduced-motion:no-preference){.hsk-live-pill.is-changed{animation:hsk-live-pill-flash 1.2s ease-out}@keyframes hsk-live-pill-flash{0%{background:#10b98140;border-color:#10b981}to{background:var(--hsk-chat-bg, #ffffff);border-color:var(--hsk-chat-divide, rgba(0, 0, 0, .08))}}}@media(max-width:640px){.hsk-cb-source{flex:0 0 128px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:128px;height:128px;font-size:24px}.hsk-cb-sources{gap:10px}.hsk-cb-src-name{font-size:12px;line-height:1.35}.hsk-cb-src-detail{font-size:11px;padding:1px 7px;margin-top:4px}}@media(max-width:480px){.hsk-cb-source{flex:0 0 114px}.hsk-cb-src-imgwrap,.hsk-cb-src-imgwrap-empty{width:114px;height:114px;font-size:20px}.hsk-cb-sources{gap:8px}.hsk-live-card{flex:0 0 auto;width:fit-content;max-width:100%}}.hsk-voice-thread::-webkit-scrollbar{width:0;height:0}.hsk-voice-thread{font-family:var(--hsk-font);gap:0;padding-inline:20px}.hsk-voice-thread .hsk-cb-user-msg,.hsk-voice-thread .hsk-cb-ai-msg{align-self:stretch;max-width:100%;margin:0}.hsk-voice-thread .hsk-cb-user-bubble{max-width:100%;padding:0;background:none!important;border:none;border-radius:0;text-align:inherit;font-family:inherit;font-style:italic;font-size:16.5px;line-height:1.62;letter-spacing:.005em;color:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 62%,transparent)}.hsk-voice-thread .hsk-cb-user-bubble:after{display:none!important}.hsk-voice-thread .hsk-cb-user-msg{align-items:flex-start}.hsk-voice-thread .hsk-cb-user-bubble{position:relative;text-align:start}.hsk-voice-thread .hsk-cb-user-bubble:before{content:"\\201c";display:block!important;position:absolute;inset-inline-start:-.62em;top:-.12em;width:auto;height:auto;background:none;font-size:1.55em;font-style:normal;line-height:1;color:color-mix(in srgb,var(--hsk-primary, #ff6a33) 72%,transparent);pointer-events:none}.hsk-voice-thread .hsk-cb-ai-msg{font-size:17px;line-height:1.68;color:var(--hsk-chat-text, #1f1f1f)}.hsk-voice-thread .hsk-cb-user-msg{margin-top:22px}.hsk-voice-thread>.hsk-cb-user-msg:first-child{margin-top:0}.hsk-voice-thread .hsk-cb-ai-msg{margin-top:6px}.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after{content:"";display:inline-block;width:.36em;height:.36em;margin-inline-start:.34em;vertical-align:.08em;background:currentColor;border-radius:0 50% 50%;transform:rotate(45deg);animation:hsk-voice-nib 1.6s ease-in-out infinite}@keyframes hsk-voice-nib{0%,to{opacity:.25}50%{opacity:.85}}.hsk-voice-images{display:flex;gap:10px;flex:none;width:min(720px,100%);padding:4px 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-images::-webkit-scrollbar{display:none}.hsk-voice-image{position:relative;flex:none;width:76px;height:76px;padding:0;border-radius:14px;overflow:hidden;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 4%,transparent);cursor:zoom-in;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(min-width:720px){.hsk-voice-image{width:92px;height:92px}}.hsk-voice-image img{display:block;width:100%;height:100%;object-fit:cover;animation:hsk-voice-develop 1.1s cubic-bezier(.16,1,.3,1) both}@keyframes hsk-voice-image-in{0%{opacity:0;transform:translate(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes hsk-voice-develop{0%{opacity:0;filter:blur(8px) saturate(.2) brightness(1.2);transform:scale(1.06)}to{opacity:1;filter:none;transform:scale(1)}}.hsk-voice-image[data-pending]{cursor:progress;border-color:transparent;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-doodle-shimmer{position:absolute;inset:0;width:100%;height:100%}.hsk-working-veil{--hsk-feather-12: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px) , transparent), linear-gradient(to bottom, transparent, #000 12px, #000 calc(100% - 12px) , transparent);--hsk-doodle-ink: 255, 122, 64;--hsk-doodle-tint: 255, 200, 165;position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none;background:radial-gradient(ellipse at center,transparent 45%,rgba(0,0,0,.22) 100%);-webkit-mask-image:var(--hsk-feather-12);-webkit-mask-composite:source-in;mask-image:var(--hsk-feather-12);mask-composite:intersect;animation:hsk-veil-in .3s cubic-bezier(.16,1,.3,1) both}.hsk-working-veil.is-leaving{animation:hsk-veil-out .3s ease-out both}.hsk-working-veil .hsk-doodle-shimmer{filter:drop-shadow(0 0 .6px rgba(0,0,0,.75));-webkit-mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%);mask-image:radial-gradient(ellipse at center,transparent 14%,rgba(0,0,0,.5) 36%,rgba(0,0,0,.9) 58%,#000 75%)}.hsk-working-veil:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 20px 8px color-mix(in srgb,var(--hsk-primary, #ff6a33) 90%,transparent),inset 0 0 48px 12px color-mix(in srgb,var(--hsk-primary, #ff6a33) 30%,transparent);animation:hsk-halo-breathe 2.4s ease-in-out infinite}.hsk-cb-user-img-cell:has(>.hsk-working-veil)>img,.hsk-cb-viz--working>img,.hsk-voice-image:has(>.hsk-working-veil)>img,.hsk-voice-image[data-pending],.hsk-cb-viz--working.is-blank{-webkit-mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);-webkit-mask-composite:source-in;mask-image:linear-gradient(to right,transparent,#000 26px,#000 calc(100% - 26px),transparent),linear-gradient(to bottom,transparent,#000 26px,#000 calc(100% - 26px),transparent);mask-composite:intersect}.hsk-voice-image:has(>.hsk-working-veil){border-color:transparent}@keyframes hsk-veil-in{0%{opacity:0}to{opacity:1}}@keyframes hsk-veil-out{0%{opacity:1}to{opacity:0}}@keyframes hsk-halo-breathe{0%,to{opacity:.7}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.hsk-working-veil:after{animation:none;opacity:.8}}.hsk-cb-viz--working{position:relative;display:inline-block;max-width:420px;border-radius:8px;overflow:hidden;line-height:0}.hsk-cb-viz--working.is-blank{display:block;width:min(100%,320px);aspect-ratio:1;background:color-mix(in srgb,var(--hsk-chat-text, #1f1f1f) 5%,var(--hsk-chat-bg, #ffffff))}.hsk-cb-viz--working.is-video{display:block;width:min(100%,420px);aspect-ratio:16 / 9}.hsk-cb-viz--working img{opacity:.85}.hsk-cb-viz--working.is-video img{width:100%;height:100%;object-fit:cover}.hsk-voice-control--attach{justify-self:center;width:44px;height:44px;color:var(--hsk-chat-muted, #888888);box-shadow:none}.hsk-voice-control--attach:hover:not(:disabled){transform:none;color:var(--hsk-chat-text, #1f1f1f);box-shadow:none}.hsk-voice-control--attach:active:not(:disabled){transform:scale(.9);transition-duration:.08s}@media(prefers-reduced-motion:reduce){.hsk-voice-thread .hsk-cb-ai-body.hsk-voice-turn--live:after,.hsk-voice-image,.hsk-voice-image img{animation:none}}.hsk-voice-shelf{display:flex;align-items:flex-start;gap:10px;flex:none;width:min(720px,100%);padding:0 20px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.hsk-voice-shelf::-webkit-scrollbar{display:none}.hsk-voice-shelf>.hsk-voice-images{width:auto;padding:4px 0;overflow:visible}.hsk-voice-shelf>.hsk-voice-sources{flex:0 1 auto;width:auto;min-width:0;padding:0}.hsk-voice-sources{flex:none;width:min(720px,100%);padding:0 20px;animation:hsk-voice-image-in .45s cubic-bezier(.16,1,.3,1) both}@media(prefers-reduced-motion:reduce){.hsk-voice-sources{animation:none}}.hsk-cb-overlay[data-hsk-theme],[data-hsk-theme] .hsk-cb-overlay{background:var(--hsk-chat-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-panel{background:transparent!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-topbar-name{background:var(--hsk-surface-2)!important;color:var(--hsk-name-text, var(--hsk-chat-text))!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-think-head{background:var(--hsk-surface-2)!important;color:var(--hsk-think-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave{background:var(--hsk-surface-2)!important;color:var(--hsk-chat-text)!important;box-shadow:0 0 0 3px var(--hsk-chat-bg),0 1px 3px rgba(var(--hsk-primary-rgb),.2)!important}[data-hsk-theme] .hsk-cb-leave-btn{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-leave-btn--end{background:var(--hsk-primary)!important;color:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-chip,[data-hsk-theme] .hsk-action-pill{border:var(--hsk-chip-border, none)!important;background:var(--hsk-surface-1)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-chip:hover,[data-hsk-theme] .hsk-action-pill:hover{background:rgba(var(--hsk-primary-rgb),.12)!important;color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-ai-text{background:var(--hsk-bubble-bg)!important;color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):before{background:var(--hsk-bubble-bg)!important}[data-hsk-theme] .hsk-cb-ai-text:not(:has(~.hsk-cb-ai-text)):after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:before{background:#007aff!important}[data-hsk-theme] .hsk-cb-user-bubble--tail:after{background:var(--hsk-chat-bg)!important}[data-hsk-theme] .hsk-cb-topbar-btn,[data-hsk-theme] .hsk-cb-back{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-input-box{background:transparent!important;border:none!important;border-radius:inherit!important}[data-hsk-theme] .hsk-cb-textarea{color:var(--hsk-chat-text)!important}[data-hsk-theme] .hsk-cb-textarea::placeholder{color:var(--hsk-placeholder)!important}[data-hsk-theme] .hsk-markdown-table th{color:var(--hsk-chat-muted)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-markdown-table td{color:var(--hsk-chat-text)!important;border-bottom:1px solid var(--hsk-chat-divide)!important}[data-hsk-theme] .hsk-cb-kiku-id-pill:hover{color:var(--hsk-primary)!important}[data-hsk-theme] .hsk-cb-theme-2x2-grid,[data-hsk-theme] .hsk-cb-topbar-ooze-menu{background:var(--hsk-glass-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important;-webkit-backdrop-filter:blur(28px) saturate(var(--hsk-glass-saturate, 180%))!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu{border-top:var(--hsk-glass-border)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{background:none!important;border:none!important;border-top:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}[data-hsk-theme] .hsk-cb-theme-squircle-trigger,[data-hsk-theme] .hsk-cb-theme-squircle-wrap,[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-kiku-id-rail .hsk-cb-sound-pill,[data-hsk-theme] .hsk-cb-squircle-btn{background:var(--hsk-pill-bg)!important;color:var(--hsk-chat-text)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important;box-shadow:var(--hsk-glass-shadow)!important;backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important;-webkit-backdrop-filter:blur(20px) saturate(var(--hsk-glass-saturate, 160%))!important}[data-hsk-theme] .hsk-cb-kiku-id-pill,[data-hsk-theme] .hsk-cb-squircle-btn{color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-exit-btn:hover{background:radial-gradient(120% 90% at 30% 0%,rgba(255,255,255,.4),transparent 65%),var(--hsk-pill-bg)!important;color:#ef4444!important}[data-hsk-theme] .hsk-cb-theme-grid-item{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-theme-grid-item.is-active{background:var(--hsk-active-bg)!important;color:var(--hsk-on-active)!important;box-shadow:none!important}[data-hsk-theme] .hsk-cb-src-name,[data-hsk-theme] .hsk-source-card__title{color:var(--hsk-src-title)!important;font-weight:650!important}[data-hsk-theme] .hsk-cb-src-desc,[data-hsk-theme] .hsk-cb-src-detail,[data-hsk-theme] .hsk-source-card__desc{color:var(--hsk-src-desc)!important}[data-hsk-theme] .hsk-cb-src-detail{background:var(--hsk-price-bg)!important;color:var(--hsk-price-text)!important;font-weight:700!important}[data-hsk-theme] .hsk-cb-main,[data-hsk-theme] .hsk-voice-overlay{--hsk-doodle-ink: var(--hsk-ink) !important;--hsk-doodle-tint: var(--hsk-tint) !important}[data-hsk-theme] .hsk-voice-picker{background:var(--hsk-pill-bg)!important;border:var(--hsk-glass-border)!important;border-top:var(--hsk-glass-border-top)!important}[data-hsk-theme] .hsk-voice-picker[data-open]{background:linear-gradient(180deg,#ffffff1a,#fff0 50%),color-mix(in srgb,var(--hsk-chat-bg) 78%,transparent)!important}.hsk-opening-shell[data-hsk-theme=light],.hsk-cb-overlay[data-hsk-theme=light],[data-hsk-theme=light] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-chat-bg: #ffffff !important;--hsk-chat-text: #1f1f1f !important;--hsk-chat-muted: #5f6368 !important;--hsk-chat-divide: #e5e7eb !important;--hsk-chat-input-bg: #f3f4f6 !important;--hsk-chat-source-bg: #f9fafb !important;--hsk-fade-bg: #ffffff !important;--hsk-goo-fill: #ffffff !important;--hsk-surface-1: rgba(0, 0, 0, .05) !important;--hsk-surface-2: #f1f3f4 !important;--hsk-bubble-bg: #f3f4f6 !important;--hsk-think-text: #4b5563 !important;--hsk-placeholder: #757575 !important;--hsk-grid-bg: #ffffff !important;--hsk-active-bg: #1f1f1f !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #111827 !important;--hsk-src-desc: #4b5563 !important;--hsk-price-bg: #f3f4f6 !important;--hsk-price-text: #ea580c !important;--hsk-sheet-bg: #f3f4f6 !important;--hsk-chip-border: 1px solid rgba(0, 0, 0, .08) !important;--hsk-ink: 55, 65, 81 !important;--hsk-tint: 145, 77, 47 !important;--hsk-glass-bg: rgba(255, 255, 255, .72) !important;--hsk-glass-edge: rgba(0, 0, 0, .07) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(0,0,0,.1) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 190% !important;--hsk-pill-bg: rgba(255, 255, 255, .65) !important}.hsk-opening-shell[data-hsk-theme=dark],.hsk-cb-overlay[data-hsk-theme=dark],[data-hsk-theme=dark] .hsk-cb-overlay{--hsk-primary: #ff6a33 !important;--hsk-primary-rgb: 255, 106, 51 !important;--hsk-chat-bg: #0a0a0a !important;--hsk-chat-text: #f0efed !important;--hsk-chat-muted: #888888 !important;--hsk-chat-divide: rgba(255, 255, 255, .08) !important;--hsk-chat-input-bg: #191919 !important;--hsk-chat-source-bg: rgba(255, 255, 255, .04) !important;--hsk-fade-bg: #0a0a0a !important;--hsk-goo-fill: #1a1a1c !important;--hsk-surface-1: rgba(255, 255, 255, .06) !important;--hsk-surface-2: #1f1f22 !important;--hsk-bubble-bg: #1f1f22 !important;--hsk-think-text: #a6a6a6 !important;--hsk-placeholder: #555555 !important;--hsk-grid-bg: #1a1a1c !important;--hsk-active-bg: #f0efed !important;--hsk-on-active: #0a0a0a !important;--hsk-src-title: #f9fafb !important;--hsk-src-desc: #9ca3af !important;--hsk-price-bg: rgba(255, 255, 255, .08) !important;--hsk-price-text: #ff7a45 !important;--hsk-sheet-bg: #1f1f22 !important;--hsk-ink: 240, 239, 237 !important;--hsk-tint: 248, 195, 174 !important;--hsk-glass-bg: rgba(255, 255, 255, .07) !important;--hsk-glass-edge: rgba(255, 255, 255, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .22) !important;--hsk-glass-drop: rgba(0,0,0,.45) !important;--hsk-glass-sheen: rgba(255,255,255,.1) !important;--hsk-glass-saturate: 160% !important;--hsk-pill-bg: rgba(255, 255, 255, .06) !important}.hsk-opening-shell[data-hsk-theme=mahogany],.hsk-cb-overlay[data-hsk-theme=mahogany],[data-hsk-theme=mahogany] .hsk-cb-overlay{--hsk-primary: #e07a38 !important;--hsk-primary-rgb: 224, 122, 56 !important;--hsk-chat-bg: #140d09 !important;--hsk-chat-text: #f6eee3 !important;--hsk-chat-muted: #a89485 !important;--hsk-chat-divide: rgba(217, 140, 85, .18) !important;--hsk-chat-input-bg: #211610 !important;--hsk-chat-source-bg: #1c130d !important;--hsk-fade-bg: #140d09 !important;--hsk-goo-fill: #211610 !important;--hsk-surface-1: #211610 !important;--hsk-surface-2: #2b1c14 !important;--hsk-bubble-bg: #261912 !important;--hsk-think-text: #c4b1a1 !important;--hsk-placeholder: #7a6557 !important;--hsk-grid-bg: #2b1c14 !important;--hsk-active-bg: #e07a38 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #fdf8f4 !important;--hsk-src-desc: #c4b1a1 !important;--hsk-price-bg: #2b1c14 !important;--hsk-price-text: #f59e0b !important;--hsk-sheet-bg: #211610 !important;--hsk-ink: 246, 238, 227 !important;--hsk-tint: 235, 180, 142 !important;--hsk-glass-bg: rgba(255, 220, 180, .07) !important;--hsk-glass-edge: rgba(217, 140, 85, .15) !important;--hsk-glass-edge-top: rgba(255, 200, 150, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(255,200,150,.12) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(255, 220, 180, .06) !important}.hsk-opening-shell[data-hsk-theme=blush],.hsk-cb-overlay[data-hsk-theme=blush],[data-hsk-theme=blush] .hsk-cb-overlay{--hsk-primary: #ec4899 !important;--hsk-primary-rgb: 236, 72, 153 !important;--hsk-chat-bg: #fff5f7 !important;--hsk-chat-text: #3d1424 !important;--hsk-chat-muted: #94536d !important;--hsk-chat-divide: rgba(236, 72, 153, .18) !important;--hsk-chat-input-bg: #ffe4ec !important;--hsk-chat-source-bg: #fff0f4 !important;--hsk-fade-bg: #fff5f7 !important;--hsk-goo-fill: #ffe4ec !important;--hsk-surface-1: #ffe4ec !important;--hsk-surface-2: #fbcfe8 !important;--hsk-bubble-bg: #ffebf1 !important;--hsk-think-text: #831843 !important;--hsk-name-text: #831843 !important;--hsk-placeholder: #b57a91 !important;--hsk-grid-bg: #fff0f4 !important;--hsk-active-bg: #ec4899 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2b0c19 !important;--hsk-src-desc: #702648 !important;--hsk-price-bg: #fce7f3 !important;--hsk-price-text: #db2777 !important;--hsk-sheet-bg: #ffe4ec !important;--hsk-sheet-hover: #ffd2e0 !important;--hsk-ink: 130, 36, 75 !important;--hsk-tint: 175, 38, 97 !important;--hsk-glass-bg: rgba(255, 240, 248, .75) !important;--hsk-glass-edge: rgba(236, 72, 153, .1) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .9) !important;--hsk-glass-drop: rgba(180, 30, 100, .08) !important;--hsk-glass-sheen: rgba(255,255,255,.85) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(255, 228, 236, .8) !important}.hsk-opening-shell[data-hsk-theme=coffee],.hsk-cb-overlay[data-hsk-theme=coffee],[data-hsk-theme=coffee] .hsk-cb-overlay{--hsk-primary: #a9714b !important;--hsk-primary-rgb: 169, 113, 75 !important;--hsk-chat-bg: #f7f1e8 !important;--hsk-chat-text: #3b2a1d !important;--hsk-chat-muted: #8a7561 !important;--hsk-chat-divide: rgba(169, 113, 75, .18) !important;--hsk-chat-input-bg: #efe4d6 !important;--hsk-chat-source-bg: #f2eade !important;--hsk-fade-bg: #f7f1e8 !important;--hsk-goo-fill: #efe4d6 !important;--hsk-surface-1: #efe4d6 !important;--hsk-surface-2: #e6d7c4 !important;--hsk-bubble-bg: #f0e7da !important;--hsk-think-text: #6b543f !important;--hsk-placeholder: #a89680 !important;--hsk-grid-bg: #f2eade !important;--hsk-active-bg: #a9714b !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #2a1c11 !important;--hsk-src-desc: #6b543f !important;--hsk-price-bg: #ece0cf !important;--hsk-price-text: #9a5f32 !important;--hsk-sheet-bg: #efe4d6 !important;--hsk-sheet-hover: #e6d7c4 !important;--hsk-ink: 59, 42, 29 !important;--hsk-tint: 120, 88, 62 !important;--hsk-glass-bg: rgba(247, 241, 232, .78) !important;--hsk-glass-edge: rgba(169, 113, 75, .12) !important;--hsk-glass-edge-top: rgba(255, 255, 255, .88) !important;--hsk-glass-drop: rgba(90, 55, 20, .1) !important;--hsk-glass-sheen: rgba(255,255,255,.8) !important;--hsk-glass-saturate: 185% !important;--hsk-pill-bg: rgba(239, 228, 214, .82) !important}.hsk-opening-shell[data-hsk-theme=midnight],.hsk-cb-overlay[data-hsk-theme=midnight],[data-hsk-theme=midnight] .hsk-cb-overlay{--hsk-primary: #6366f1 !important;--hsk-primary-rgb: 99, 102, 241 !important;--hsk-chat-bg: #0f1420 !important;--hsk-chat-text: #dfe6f5 !important;--hsk-chat-muted: #8792ad !important;--hsk-chat-divide: rgba(99, 102, 241, .18) !important;--hsk-chat-input-bg: #1a2133 !important;--hsk-chat-source-bg: #161d2c !important;--hsk-fade-bg: #0f1420 !important;--hsk-goo-fill: #1a2133 !important;--hsk-surface-1: #1a2133 !important;--hsk-surface-2: #222b40 !important;--hsk-bubble-bg: #1e2637 !important;--hsk-think-text: #a8b3cc !important;--hsk-placeholder: #5c6780 !important;--hsk-grid-bg: #222b40 !important;--hsk-active-bg: #6366f1 !important;--hsk-on-active: #ffffff !important;--hsk-src-title: #f2f5fc !important;--hsk-src-desc: #a8b3cc !important;--hsk-price-bg: #222b40 !important;--hsk-price-text: #818cf8 !important;--hsk-sheet-bg: #1a2133 !important;--hsk-sheet-hover: #222b40 !important;--hsk-ink: 223, 230, 245 !important;--hsk-tint: 150, 160, 200 !important;--hsk-glass-bg: rgba(180, 190, 255, .06) !important;--hsk-glass-edge: rgba(99, 102, 241, .18) !important;--hsk-glass-edge-top: rgba(180, 185, 255, .25) !important;--hsk-glass-drop: rgba(0,0,0,.55) !important;--hsk-glass-sheen: rgba(180,190,255,.1) !important;--hsk-glass-saturate: 155% !important;--hsk-pill-bg: rgba(180, 190, 255, .06) !important}.hsk-cb-back-icon{display:inline-flex;transition:transform .22s cubic-bezier(.22,1,.36,1)}.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:translate(-2px)}.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon{transform:scaleX(-1) translate(-2px)}.hsk-cb-tools-toggle{transition:transform .26s cubic-bezier(.34,1.56,.64,1),background-color .42s cubic-bezier(.16,1,.3,1),color .42s cubic-bezier(.16,1,.3,1)}.hsk-cb-tools-toggle:hover:not(:disabled){color:var(--hsk-primary, #ff6a33);transform:rotate(90deg)}.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:rotate(135deg)}.hsk-cb-tools-toggle:active:not(:disabled){transform:scale(.9);transition-duration:.1s}.hsk-cb-theme-trigger-icon{display:inline-flex;transition:transform .3s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon{transform:translateY(-1.5px) rotate(-8deg)}.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active){background:var(--hsk-chat-muted, rgba(120, 120, 120, .6));transform:scale(1.35)}@media(prefers-reduced-motion:reduce){.hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-panel[dir=rtl] .hsk-cb-back:hover:not(:disabled) .hsk-cb-back-icon,.hsk-cb-theme-squircle-trigger:hover .hsk-cb-theme-trigger-icon,.hsk-cb-dot-item:hover:not(.hsk-cb-dot-item--active),.hsk-msg-audio-btn:hover:not(:disabled){transform:none}.hsk-cb-tools-toggle:hover:not(:disabled),.hsk-cb-tools-toggle--open:hover:not(:disabled){transform:none}}.hsk-voice-control{position:relative;isolation:isolate;border-radius:999px}.hsk-voice-control--waiting{opacity:.45;cursor:default}.hsk-voice-control--waiting:before,.hsk-voice-control--waiting .hsk-voice-control-icon{animation:none!important;background:none!important}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting):before{content:"";position:absolute;inset:-1.5px;border-radius:inherit;background:conic-gradient(from 0deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#30b0c7,#007aff,#5856d6,#af52de,#ff2d55,#ff3b30);-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));mask:radial-gradient(farthest-side,transparent calc(100% - 2.5px),#000 calc(100% - 2px));animation:hsk-apple-siri-spin 3s linear infinite;pointer-events:none;z-index:1}.hsk-voice-control:after{display:none!important}.hsk-voice-control-icon{will-change:transform}.hsk-voice-control[data-control=mic]:not(.hsk-voice-control--muted):not(.hsk-voice-control--waiting) .hsk-voice-control-icon{animation:hsk-apple-siri-mic-pulse 2.2s ease-in-out infinite}.hsk-img-sun,.hsk-img-ridge{transform-box:fill-box;transform-origin:center;transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-sun{transform:translate(1px,-1.5px) scale(1.25)}.hsk-voice-control--attach:is(:hover,:active) .hsk-img-ridge{transform:translateY(-1px);transition-delay:40ms}.hsk-mic-slash{stroke-dasharray:29;animation:hsk-slash-draw .3s cubic-bezier(.65,0,.35,1) both}@keyframes hsk-slash-draw{0%{stroke-dashoffset:29}to{stroke-dashoffset:0}}.hsk-voice-control[data-control=mic].hsk-voice-control--muted .hsk-voice-control-icon{animation:hsk-icon-pop .38s cubic-bezier(.34,1.56,.64,1)}@keyframes hsk-icon-pop{0%{transform:scale(.82)}to{transform:scale(1)}}.hsk-voice-exit svg{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-voice-exit:hover svg{transform:rotate(90deg)}.hsk-snd-wave{transform-box:fill-box;transform-origin:left center}.hsk-cb-sound-pill:hover .hsk-snd-wave{animation:hsk-wave-ripple .9s ease-out infinite;animation-delay:calc(var(--hsk-wave, 0) * .14s)}.hsk-mimi-dot{transform-box:fill-box;transform-origin:center;opacity:.7}.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot{animation:hsk-mimi-typing .9s ease-in-out infinite;animation-delay:calc(var(--hsk-dot, 0) * .13s)}@keyframes hsk-mimi-typing{0%,60%,to{transform:translateY(0);opacity:.55}30%{transform:translateY(-1.8px);opacity:1}}@keyframes hsk-wave-ripple{0%{opacity:.25;transform:scale(.7)}45%{opacity:1;transform:scale(1.05)}to{opacity:.25;transform:scale(1)}}.hsk-snd-x{stroke-dasharray:8;animation:hsk-snd-x-draw .26s ease-out both}.hsk-snd-x+.hsk-snd-x{animation-delay:70ms}@keyframes hsk-snd-x-draw{0%{stroke-dashoffset:8}to{stroke-dashoffset:0}}@keyframes hsk-apple-siri-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes hsk-apple-siri-mic-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{display:none}@media(prefers-reduced-motion:reduce){.hsk-voice-control:not(:hover):not(.hsk-voice-control--muted) .hsk-voice-control-icon,.hsk-voice-control:hover:before,.hsk-voice-control--muted:before,.hsk-voice-control--muted:after{animation:none}.hsk-voice-control:hover,.hsk-voice-control:hover .hsk-mic-cap{transform:none}.hsk-voice-control--attach:hover .hsk-img-sun,.hsk-voice-control--attach:hover .hsk-img-ridge,.hsk-voice-exit:hover svg{transform:none}.hsk-mic-slash,.hsk-snd-x,.hsk-cb-sound-pill:hover .hsk-snd-wave,.hsk-cb-sound-pill:hover .hsk-mimi-dot,.hsk-cb-toolsheet-item:hover .hsk-mimi-dot,.hsk-voice-controls .hsk-voice-control-icon{animation:none}}.hsk-cb-voice-error{animation:hsk-error-shake .26s cubic-bezier(.36,.07,.19,.97) both}@keyframes hsk-error-shake{0%,to{transform:translate(0)}22%{transform:translate(-3px)}55%{transform:translate(2px)}80%{transform:translate(-1px)}}@media(prefers-reduced-motion:reduce){.hsk-cb-voice-error{animation:none}}.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-heart-body,.hsk-steam,.hsk-star-spark,.hsk-check-mark,.hsk-send-tail,.hsk-send-body{transform-box:fill-box;transform-origin:center}.hsk-sun-rays{transform-origin:12px 12px;transition:transform .5s cubic-bezier(.22,1,.36,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-rays,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-rays{transform:rotate(45deg)}.hsk-sun-core{transition:transform .32s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-sun-core,.hsk-cb-theme-squircle-trigger:hover .hsk-sun-core{transform:scale(1.14)}.hsk-moon-body{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-theme-grid-item:hover .hsk-moon-body,.hsk-cb-theme-squircle-trigger:hover .hsk-moon-body{transform:rotate(-16deg)}.hsk-wood-layer{transition:transform .34s cubic-bezier(.34,1.56,.64,1)}.hsk-wood-layer{transition-delay:calc(var(--hsk-layer, 0) * 45ms)}.hsk-cb-theme-grid-item:hover .hsk-wood-layer,.hsk-cb-theme-squircle-trigger:hover .hsk-wood-layer{transform:translateY(-1.2px)}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body{animation:hsk-heartbeat 1.1s ease-in-out infinite}@keyframes hsk-heartbeat{0%,to{transform:scale(1)}14%{transform:scale(1.18)}28%{transform:scale(1)}42%{transform:scale(1.12)}56%{transform:scale(1)}}.hsk-steam{opacity:.9}.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam{animation:hsk-steam-rise 1.6s ease-out infinite;animation-delay:calc(var(--hsk-steam, 0) * .22s)}@keyframes hsk-steam-rise{0%{transform:translateY(2px) scaleY(.5);opacity:0}35%{opacity:.95}to{transform:translateY(-3px) scaleY(1.15);opacity:0}}.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:hsk-twinkle 1.4s ease-in-out infinite}@keyframes hsk-twinkle{0%,to{transform:scale(1) rotate(0);opacity:.85}50%{transform:scale(1.45) rotate(20deg);opacity:1}}.hsk-check-mark{stroke-dasharray:30;stroke-dashoffset:30;animation:hsk-check-draw .42s cubic-bezier(.65,0,.35,1) forwards}@keyframes hsk-check-draw{to{stroke-dashoffset:0}}@media(prefers-reduced-motion:reduce){.hsk-sun-rays,.hsk-sun-core,.hsk-moon-body,.hsk-wood-layer,.hsk-send-body,.hsk-send-tail{transition:none;transform:none!important}.hsk-cb-theme-grid-item:hover .hsk-heart-body,.hsk-cb-theme-squircle-trigger:hover .hsk-heart-body,.hsk-cb-theme-grid-item:hover .hsk-steam,.hsk-cb-theme-squircle-trigger:hover .hsk-steam,.hsk-cb-theme-grid-item:hover .hsk-star-spark,.hsk-cb-theme-squircle-trigger:hover .hsk-star-spark{animation:none}.hsk-check-mark{animation:none;stroke-dashoffset:0}}.hsk-cb-send-stage{position:relative;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:visible}.hsk-cb-send-seam{position:absolute;top:50%;left:50%;width:2px;height:15px;border-radius:2px;background:currentColor;transform:translate(-50%,-50%) rotate(38deg) scaleY(0);transform-origin:center;opacity:0;pointer-events:none}.hsk-cb-send-kite{display:inline-flex;transform-origin:center;will-change:transform}.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{transform:translate(1.5px,-1.5px);transition:transform .26s cubic-bezier(.22,1,.36,1)}.hsk-cb-send.is-launching .hsk-cb-send-kite{animation:hsk-kite-tear .55s cubic-bezier(.22,1,.36,1) both}.hsk-cb-send.is-launching .hsk-cb-send-seam{animation:hsk-seam-heal .55s cubic-bezier(.4,0,.3,1) both}@keyframes hsk-kite-tear{0%{transform:translate(0) scale(1) rotate(0);opacity:1}18%{transform:translate(-1px,2.5px) scale(.92,1.08) rotate(-4deg);opacity:1}45%{transform:translate(3px,-16px) scale(1.2,.8) rotate(6deg);opacity:.95}75%{transform:translate(6px,-38px) scale(1.05,.7) rotate(10deg);opacity:.6}to{transform:translate(8px,-56px) scale(.6,.4) rotate(12deg);opacity:0}}@keyframes hsk-seam-heal{0%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1);opacity:.9}45%{transform:translate(-50%,-50%) rotate(38deg) scaleY(1.3);opacity:.8}72%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.3);opacity:.35}to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}.hsk-kite-wing{transform-box:fill-box;transform-origin:100% 0}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--far{animation:hsk-wing-beat-far .62s ease-in-out infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-kite-wing--near{animation:hsk-wing-beat-near .62s ease-in-out .07s infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-kite{animation:hsk-kite-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-seam{animation:hsk-seam-strain 2.4s cubic-bezier(.45,0,.35,1) infinite}@keyframes hsk-kite-strain{0%,10%{transform:translate(0) scale(1) rotate(0)}20%{transform:translate(-1.2px,2px) scale(.94,1.05) rotate(-4deg)}34%{transform:translate(3.5px,-5px) scale(1.16,.86) rotate(8deg)}42%{transform:translate(4.2px,-6px) scale(1.2,.82) rotate(9deg)}50%{transform:translate(2.4px,-3.4px) scale(1.06,.94) rotate(5deg)}64%{transform:translate(-.6px,1.2px) scale(.97,1.03) rotate(-2deg)}78%,to{transform:translate(0) scale(1) rotate(0)}}@keyframes hsk-seam-strain{0%,22%{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}34%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.6);opacity:.34}42%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.95);opacity:.5}52%{transform:translate(-50%,-50%) rotate(38deg) scaleY(.55);opacity:.3}66%,to{transform:translate(-50%,-50%) rotate(38deg) scaleY(0);opacity:0}}@keyframes hsk-wing-beat-far{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(.86) skewY(-4deg)}}@keyframes hsk-wing-beat-near{0%,to{transform:scaleX(1) skewY(0)}50%{transform:scaleX(1.1) skewY(3deg)}}.hsk-stop-ring{transform-box:fill-box;transform-origin:center;stroke-dasharray:22 38;opacity:.85;animation:hsk-stop-orbit 1.4s linear infinite}.hsk-stop-core{transform-box:fill-box;transform-origin:center;animation:hsk-stop-pulse 1.4s ease-in-out infinite;transition:rx .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-send--stop:hover .hsk-stop-core{transform:scale(1.16);animation-play-state:paused}.hsk-cb-send--stop:hover .hsk-stop-ring{animation-duration:.7s}@keyframes hsk-stop-orbit{to{transform:rotate(1turn)}}@keyframes hsk-stop-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(.86);opacity:.75}}@media(prefers-reduced-motion:reduce){.hsk-cb-send.is-launching .hsk-cb-send-kite,.hsk-cb-send.is-launching .hsk-cb-send-seam,.hsk-cb-send:hover:not(:disabled) .hsk-cb-send-kite{animation:none;transform:none}}.hsk-cb-send.is-launching{overflow:visible!important}.hsk-cb-send-sheath{position:absolute;inset:-1px;background:radial-gradient(120% 90% at 32% 22%,#ffffff70,#fff0 58%),linear-gradient(150deg,color-mix(in srgb,var(--hsk-primary, #1273e6) 72%,#ffffff) 0%,var(--hsk-primary, #1273e6) 46%,color-mix(in srgb,var(--hsk-primary, #1273e6) 74%,#000000) 100%);border-radius:46% 54% 52% 48%/50% 47% 53% 50%;box-shadow:inset 0 2px 3px #ffffff80,inset 0 -3px 5px color-mix(in srgb,var(--hsk-primary, #1273e6) 30%,rgba(0,0,0,.55)),0 2px 5px #0003,0 7px 16px color-mix(in srgb,var(--hsk-primary, #1273e6) 16%,transparent);transform-origin:58% 62%;pointer-events:none;z-index:1;will-change:transform,border-radius;transition:border-radius .5s cubic-bezier(.34,1.6,.5,1),box-shadow .3s ease}.hsk-cb-send-stage{z-index:2;position:relative}.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath{animation:hsk-sheath-press 2.4s cubic-bezier(.35,.8,.3,1) infinite}@keyframes hsk-sheath-press{0%,12%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}22%{transform:scale(.94,1.08) translate(-1.4px,2.2px);border-radius:52% 48% 44% 56%/58% 40% 60% 42%}36%{transform:scale(1.14,.87) translate(2.6px,-3.4px) rotate(2deg);border-radius:38% 66% 54% 46%/40% 62% 38% 60%}46%{transform:scale(1.19,.83) translate(3.6px,-4.6px) rotate(2.8deg);border-radius:34% 72% 56% 44%/36% 68% 32% 64%}58%{transform:scale(.93,1.09) translate(-1.2px,1.8px) rotate(-1.4deg);border-radius:56% 44% 42% 58%/60% 38% 62% 40%}70%{transform:scale(1.05,.96) translate(.8px,-1px) rotate(.6deg);border-radius:44% 56% 50% 50%/46% 54%}80%{transform:scale(.98,1.03);border-radius:50% 50% 48% 52%/52% 48%}88%,to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:hsk-sheath-yield .55s cubic-bezier(.3,.7,.25,1) both}@keyframes hsk-sheath-yield{0%{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}20%{transform:scale(.88,1.14) translate(-2px,3.4px);border-radius:56% 44% 40% 60%/64% 34% 66% 36%}45%{transform:scale(1.34,.68) translate(6px,-10px) rotate(4.6deg);border-radius:24% 86% 62% 38%/26% 80% 20% 74%}65%{transform:scale(.86,1.16) translate(-2.2px,3.6px) rotate(-2.2deg);border-radius:60% 40% 38% 62%/68% 30% 70% 32%}82%{transform:scale(1.06,.95) translate(1px,-1px) rotate(.8deg);border-radius:44% 56% 52% 48%/46% 54%}to{transform:scale(1);border-radius:46% 54% 52% 48%/50% 47% 53% 50%}}.hsk-cb-send:disabled .hsk-cb-send-sheath{opacity:0}.hsk-cb-send--stop .hsk-cb-send-sheath{display:none}.hsk-cb-send:active:not(:disabled) .hsk-cb-send-sheath{box-shadow:inset 0 1px 2px #ffffff4d,inset 0 -1px 3px color-mix(in srgb,var(--hsk-primary, #1273e6) 24%,rgba(0,0,0,.6)),0 1px 3px #0000003d}@media(prefers-reduced-motion:reduce){.hsk-cb-send:not(:disabled):not(.is-launching) .hsk-cb-send-sheath,.hsk-cb-send.is-launching .hsk-cb-send-sheath{animation:none}}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled){background:transparent!important;box-shadow:none!important;overflow:visible!important}.hsk-cb-send:not(.hsk-cb-send--stop):not(:disabled):hover{box-shadow:none!important}.hsk-cb-send:not(:disabled):hover .hsk-cb-send-sheath{box-shadow:inset 0 2px 4px #ffffff94,inset 0 -3px 6px color-mix(in srgb,var(--hsk-primary, #1273e6) 28%,rgba(0,0,0,.5)),0 3px 7px #00000038,0 10px 22px color-mix(in srgb,var(--hsk-primary, #1273e6) 20%,transparent)}.hsk-cb-terms-sanctuary{display:flex;flex-direction:column;margin:18px 0 22px;width:100%;max-width:520px;text-align:start;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border:none;border-radius:0;padding:0;box-shadow:none;opacity:0;animation:hsk-terms-delicate-in .5s cubic-bezier(.16,1,.3,1) .05s forwards}@keyframes hsk-terms-delicate-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-item{display:flex;flex-direction:column;gap:4px;opacity:0;animation:hsk-terms-item-in .45s cubic-bezier(.16,1,.3,1) forwards;animation-delay:calc(var(--hsk-row-idx, 0) * 60ms + 80ms)}@keyframes hsk-terms-item-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-terms-head{display:flex;align-items:baseline;gap:10px}.hsk-cb-terms-numeral{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif;font-style:italic;font-size:11px;font-weight:600;letter-spacing:.12em;color:var(--hsk-primary, #ff6a33);opacity:.85;flex-shrink:0;user-select:none}.hsk-cb-terms-title{margin:0;font-size:14.5px;font-weight:700;letter-spacing:-.015em;color:var(--hsk-chat-text, #ffffff)}.hsk-cb-terms-desc{margin:0;padding-inline-start:22px;font-size:13px;line-height:1.55;color:var(--hsk-chat-muted, #9ca3af);font-weight:400}.hsk-cb-terms-more{margin:0 0 4px;font-size:12.5px;color:var(--hsk-chat-muted, #9ca3af);text-align:start}.hsk-cb-terms-more a{color:var(--hsk-primary, #ff6a33);font-weight:600;text-decoration:none;unicode-bidi:isolate}.hsk-cb-terms-more a:hover{text-decoration:underline}.hsk-cb-terms-divider{height:1px;margin:14px 0;background:linear-gradient(90deg,transparent 0%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 20%,color-mix(in srgb,var(--hsk-chat-text, #000000) 8%,transparent) 80%,transparent 100%)}.hsk-cb-terms-action-wrap{display:flex;justify-content:center;width:100%;margin-top:14px}.hsk-cb-terms-agree-btn{display:inline-flex;align-items:center;justify-content:center;padding:12px 34px;font-size:14px;font-weight:600;border-radius:9999px;border:1px solid var(--hsk-chat-divide, rgba(255, 255, 255, .08));background:var(--hsk-chat-divide, rgba(255, 255, 255, .06));color:var(--hsk-chat-muted, rgba(255, 255, 255, .4));cursor:not-allowed;transition:all .3s cubic-bezier(.16,1,.3,1);letter-spacing:-.01em}.hsk-cb-terms-agree-btn.is-active{background:var(--hsk-primary, #ff6a33);color:#fff;border-color:var(--hsk-primary, #ff6a33);cursor:pointer;box-shadow:0 4px 14px color-mix(in srgb,var(--hsk-primary, #ff6a33) 35%,transparent)}.hsk-cb-terms-agree-btn.is-active:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 6px 18px color-mix(in srgb,var(--hsk-primary, #ff6a33) 45%,transparent)}.hsk-cb-terms-agree-btn.is-active:active{transform:translateY(0);box-shadow:0 2px 6px color-mix(in srgb,var(--hsk-primary, #ff6a33) 25%,transparent)}@keyframes hsk-theme-morph-in{0%{opacity:0;transform:scale(.92) translateY(4px)}to{opacity:1;transform:scale(1) translateY(0)}}@keyframes hsk-theme-pill-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-2x2-grid{transform-origin:bottom right}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-squircle-trigger{animation:none}}@keyframes hsk-theme-morph-out{0%{opacity:1;transform:scale(1) translateY(0)}to{opacity:0;transform:scale(.92) translateY(4px)}}.hsk-retry-icon{display:inline-flex;transform-origin:center;transition:transform .36s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-retry-icon{transform:rotate(-180deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-retry-icon{transform:rotate(-360deg) scale(.85);transition-duration:.18s}.hsk-retry-icon--spinning{animation:hsk-spin .65s linear infinite!important}.hsk-edit-icon{display:inline-flex;transform-origin:20% 80%;transition:transform .26s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-edit-icon{transform:translateY(-1.5px) rotate(-14deg)}.hsk-cb-msg-action:active:not(:disabled) .hsk-edit-icon{transform:translateY(1px) scale(.88);transition-duration:.1s}.hsk-copy-icon{display:inline-flex}.hsk-copy-sheet{transition:transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-msg-action:hover:not(:disabled) .hsk-copy-sheet{transform:translate(-1.5px,-1.5px)}.hsk-check-icon{display:inline-flex;animation:hsk-check-pop .28s cubic-bezier(.34,1.56,.64,1) both}@keyframes hsk-check-pop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.24);opacity:1}to{transform:scale(1);opacity:1}}:root{--hsk-apple-bezier: cubic-bezier(.16, 1, .3, 1);--hsk-apple-exit-bezier: cubic-bezier(.4, 0, .2, 1)}@keyframes hsk-step1-exit-up{0%{opacity:1;transform:translateY(0) scale(1);filter:blur(0px)}to{opacity:0;transform:translateY(-46px) scale(.96);filter:blur(14px)}}.hsk-step1-exit{animation:hsk-step1-exit-up .32s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}@keyframes hsk-composer-exit-up{0%{opacity:1;transform:translateY(0);filter:blur(0px)}to{opacity:0;transform:translateY(-42px);filter:blur(12px)}}.hsk-composer-exit-up{animation:hsk-composer-exit-up .3s cubic-bezier(.16,1,.3,1) forwards;pointer-events:none;will-change:transform,opacity,filter}.hsk-lang-loader{display:flex;flex-direction:column;align-items:center;gap:28px;padding:16px 0;width:100%}.hsk-lang-loader--enter{animation:hsk-clay-in .16s steps(2,end) both}@keyframes hsk-clay-in{0%{opacity:0}to{opacity:1}}.hsk-clay{display:flex;flex-direction:column;align-items:center;gap:8px}.hsk-clay-table{display:block;width:240px;height:160px}.hsk-lang-preparing{font-size:13px;font-weight:500;letter-spacing:-.015em;color:var(--hsk-chat-muted, rgba(255, 255, 255, .44));text-align:center;margin:0;line-height:1.4}.hsk-lang-loader--enter .hsk-lang-preparing{animation:hsk-preparing-in .42s .4s cubic-bezier(.16,1,.3,1) both}.hsk-lang-loader--exit .hsk-lang-preparing{animation:hsk-preparing-out .12s cubic-bezier(.4,0,.2,1) forwards}@keyframes hsk-preparing-in{0%{opacity:0;transform:translateY(10px);filter:blur(8px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@keyframes hsk-preparing-out{to{opacity:0;transform:translateY(4px);filter:blur(6px)}}.hsk-composer-reveal{animation:hsk-composer-in .48s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-composer-in{0%{opacity:0;transform:translateY(36px);filter:blur(10px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}.hsk-step-enter{animation:hsk-step-enter-in .46s cubic-bezier(.16,1,.3,1) both;will-change:transform,opacity,filter}@keyframes hsk-step-enter-in{0%{opacity:0;transform:translateY(22px);filter:blur(12px)}to{opacity:1;transform:translateY(0);filter:blur(0px)}}@media(prefers-reduced-motion:reduce){.hsk-step1-exit,.hsk-composer-exit-up,.hsk-lang-loader--enter,.hsk-lang-loader--exit,.hsk-composer-reveal,.hsk-step-enter{animation:none!important}}'});function El(e){if(Rl)return;if(Rl=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(es),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=es,e.appendChild(r)}function zl(){return typeof document>"u"?null:mn?(El(mn),mn):(Ir=document.getElementById(Tl),Ir||(Ir=document.createElement("div"),Ir.id=Tl,Ir.style.cssText="all: initial;",document.body.appendChild(Ir)),mn=Ir.shadowRoot??Ir.attachShadow({mode:"open"}),El(mn),mn)}var Tl,Ir,mn,Rl,Ll=Ce(()=>{"use strict";Ml();Tl="akropolys-kiku-root",Ir=null,mn=null,Rl=!1});var Nl={};Cs(Nl,{ChatModal:()=>Cl,DEFAULT_CHIPS:()=>Nn,DEFAULT_UI_STRINGS:()=>Pt,getShadowContainer:()=>zl,warmChrome:()=>Ai,warmLanguage:()=>An});var Il=Ce(()=>{"use strict";Sl();Ot();Ll();Ca()});var cu={};Cs(cu,{KikuButton:()=>Pl,SearchBar:()=>Ls});module.exports=Xh(cu);var ur=require("react"),Xr=require("@akropolys/sdk");yn();Tt();var _e=require("react/jsx-runtime"),zs=()=>(0,_e.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,_e.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,_e.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function Ls({placeholder:e="Search products\u2026",limit:r=10,debounceMs:t=150,onSelect:n,className:a,inputClassName:s,dropdownClassName:o,renderResult:c,theme:i,classNames:l={}}){let[h,p]=(0,ur.useState)(""),[d,u]=(0,ur.useState)(!1),{results:f,loading:y,search:b,clear:M}=(0,Xr.useSearch)({debounceMs:t}),g=(0,Xr.useAkropolysContext)(),E=(0,Xr.useCardFields)(),R=(0,ur.useRef)(null),z=(0,ur.useRef)(!1);(0,ur.useEffect)(()=>{if(z.current){z.current=!1;return}if(!h.trim()){M(),u(!1);return}u(!0),b(h,r)},[h]),(0,ur.useEffect)(()=>{let N=P=>{R.current&&!R.current.contains(P.target)&&u(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);let _=N=>{h.trim()&&g.api.searchVector(h,1,void 0,!0).catch(()=>{}),z.current=!0,u(!1),p(N.entity.title??N.entity.name??""),n?.(N)},S=()=>{h.trim()&&(g.api.searchVector(h,1,void 0,!0).catch(()=>{}),f.length>0&&_(f[0]))},W=d&&h.trim().length>0,X={...i?.primaryColor&&{"--hsk-primary":i.primaryColor},...i?.backgroundColor&&{"--hsk-bg":i.backgroundColor},...i?.textColor&&{"--hsk-text":i.textColor},...i?.fontFamily&&{"--hsk-font":i.fontFamily},...i?.borderRadius&&{"--hsk-border-radius":i.borderRadius}};return(0,_e.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:R,style:X,children:[(0,_e.jsx)("span",{className:"hsk-sb-icon",children:(0,_e.jsx)(zs,{})}),(0,_e.jsx)("input",{className:le("hsk-sb-input",l.input,s),type:"text",value:h,placeholder:e,onChange:N=>p(N.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:N=>{N.key==="Enter"&&S()},autoComplete:"off",spellCheck:!1}),W&&(0,_e.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,o),style:{position:"absolute"},children:[y&&(0,_e.jsx)("div",{className:"hsk-sb-loading-bar"}),y&&f.length===0?(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,_e.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,_e.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,_e.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,_e.jsxs)(_e.Fragment,{children:[f.length===0&&!y&&(0,_e.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((N,P)=>{if(c)return(0,_e.jsx)("div",{onClick:()=>_(N),className:"hsk-sb-fade",style:{animationDelay:`${P*18}ms`},children:c(N)},N.id);let j=N.entity.image??N.entity.thumbnail??N.entity.images?.[0];return(0,_e.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${P*18}ms`},onClick:()=>_(N),children:[(0,_e.jsx)("span",{className:"hsk-sb-row-thumb",children:j?(0,_e.jsx)("img",{src:j,alt:"",loading:"lazy",onError:D=>{D.currentTarget.style.display="none"}}):(0,_e.jsx)(zs,{})}),(0,_e.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,_e.jsx)("div",{className:"hsk-sb-row-title",children:N.entity.title??N.entity.name}),er({fields:N.entity.fields??N.entity},E)[0]&&(0,_e.jsx)("div",{className:"hsk-sb-row-sub",children:er({fields:N.entity.fields??N.entity},E)[0].value})]})]},N.id)})]})]})]})}var ft=require("react"),rs=require("react-dom");var Ar=require("react");ha();pa();var xt=require("react/jsx-runtime");function Is({title:e,logo:r,theme:t,backdropColor:n,backdropBlur:a,failed:s,onClose:o,onRetry:c}){let[i,l]=(0,Ar.useState)(!1),h=(0,Ar.useRef)(null),{vars:p}=Qr(t);return(0,Ar.useEffect)(()=>{if(l(!1),s)return;let d=setTimeout(()=>l(!0),250);return()=>clearTimeout(d)},[s]),(0,Ar.useEffect)(()=>{let d=document.body.style.overflow;return document.body.style.overflow="hidden",h.current?.focus(),()=>{document.body.style.overflow=d}},[]),(0,xt.jsx)("div",{className:"hsk-opening-shell","data-hsk-theme":da(t),role:"dialog","aria-modal":"true","aria-label":e||"Kiku chat",style:{...p,...n?{background:n}:{},...a?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a})`}:{}},onKeyDown:d=>{if(d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),o()),d.key==="Tab"){let u=Array.from(d.currentTarget.querySelectorAll("button:not(:disabled)")),f=u.indexOf(document.activeElement);d.preventDefault(),u[(f+(d.shiftKey?-1:1)+u.length)%u.length]?.focus()}},children:(0,xt.jsxs)("div",{className:"hsk-opening-panel",children:[(0,xt.jsxs)("header",{className:"hsk-opening-header",children:[r?(0,xt.jsx)("img",{src:r,alt:e||"Kiku",className:"hsk-opening-logo"}):(0,xt.jsx)("span",{children:e||"Kiku"}),(0,xt.jsx)("button",{ref:h,type:"button",className:"hsk-opening-close",onClick:o,"aria-label":"Close chat",children:"\xD7"})]}),(0,xt.jsx)("div",{className:"hsk-opening-content",children:s?(0,xt.jsxs)("div",{className:"hsk-opening-feedback",role:"alert",children:[(0,xt.jsx)("p",{children:"Chat couldn\u2019t load."}),(0,xt.jsx)("button",{type:"button",className:"hsk-opening-retry",onClick:c,children:"Try again"})]}):i?(0,xt.jsxs)("div",{className:"hsk-opening-feedback",role:"status",children:[(0,xt.jsxs)("svg",{className:"hsk-cb-opening-spinner",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[(0,xt.jsx)("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2",opacity:"0.2"}),(0,xt.jsx)("path",{d:"M12 3a9 9 0 0 1 9 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),(0,xt.jsx)("span",{children:"Loading chat\u2026"})]}):null})]})})}Jr();var Al=require("@akropolys/sdk");Tt();ha();wn();var Jt=require("react/jsx-runtime"),ts=null;function iu(){return ts??(ts=Promise.resolve().then(()=>(Il(),Nl)).catch(e=>{throw ts=null,e})),ts}function Pl({label:e="Ask AI",children:r,icon:t,title:n,logo:a,placeholder:s,backdropColor:o,backdropBlur:c,className:i,onSelectSource:l,chips:h,theme:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:y,enableVision:b=!1}){let M=(0,Al.useAkropolysContext)(),[g,E]=(0,ft.useState)(!1),[R,z]=(0,ft.useState)(null),[_,S]=(0,ft.useState)(null),[W,X]=(0,ft.useState)(!1),N=(0,ft.useRef)(!0),P=(0,ft.useRef)(!1),[j,D]=(0,ft.useState)(0);(0,ft.useEffect)(()=>{if(g){D(0);return}let A=!0;return M?.api?.unreadFromTeam?.().then(v=>{A&&D(v)}).catch(()=>{}),()=>{A=!1}},[g,M]);let re=(0,ft.useCallback)(()=>{iu().then(A=>{A.getShadowContainer(),N.current&&(S(A),X(!1)),A.warmChrome(M,M?.getShopperLanguage?.()??"",A.DEFAULT_UI_STRINGS),M?.api?.widgetSettings?.().then(v=>{v?.detectedLanguage&&v.detectedLanguage.toLowerCase()!=="english"&&A.warmLanguage(M,v.detectedLanguage,A.DEFAULT_UI_STRINGS)}).catch(()=>{})}).catch(()=>{N.current&&X(!0)})},[M]),ge=(0,ft.useRef)(null),be=(0,ft.useCallback)(()=>{let A=ge.current?.getBoundingClientRect();z(A?{x:A.left+A.width/2,y:A.top+A.height/2}:null),P.current=!_,X(!1),E(!0),re();try{Rr()}catch{}},[re,_]);(0,ft.useEffect)(()=>{N.current=!0;let A=window.requestIdleCallback,v=A?A(re,{timeout:2e3}):setTimeout(re,300);if(typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let I=window.location.pathname,V=window.history.pushState,T=window.history.replaceState;window.history.pushState=function(...C){V.apply(this,C),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...C){T.apply(this,C),window.location.pathname!==I&&(I=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let L=()=>{E(!1)};return window.addEventListener("popstate",L),window.addEventListener("akropolys:navigation",L),()=>{N.current=!1;let I=window.cancelIdleCallback;A&&I?I(v):clearTimeout(v),window.removeEventListener("popstate",L),window.removeEventListener("akropolys:navigation",L)}},[re]);let Y=(0,ft.useCallback)(()=>{E(!1),requestAnimationFrame(()=>ge.current?.focus())},[]),me=(0,ft.useCallback)(()=>{X(!1),re()},[re]),{themeAttr:J,vars:H}=Qr(p);return ma(p),(0,Jt.jsxs)(Jt.Fragment,{children:[(0,Jt.jsxs)("button",{ref:ge,className:le("hsk-cb-btn",d.button,i),onClick:be,onPointerEnter:re,onPointerDown:re,style:H,"data-hsk-theme":J,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":g,children:[r!==void 0?r:(0,Jt.jsxs)(Jt.Fragment,{children:[t?(0,Jt.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),j>0&&(0,Jt.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${j} new replies`,children:j})]}),g&&!_&&(0,rs.createPortal)((0,Jt.jsx)(Is,{title:n,logo:a,theme:p,failed:W,backdropColor:o,backdropBlur:c,onClose:Y,onRetry:me}),document.body),g&&_&&(0,rs.createPortal)((0,Jt.jsx)(_.ChatModal,{title:n,logo:a,placeholder:s,backdropColor:o,backdropBlur:c,origin:P.current?void 0:R,onClose:Y,onSelectSource:l,chips:h??_.DEFAULT_CHIPS,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:y}),_.getShadowContainer()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
|
|
39
39
|
//# sourceMappingURL=index.js.map
|