@akropolys/kiku 2.2.30 → 2.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- "use strict";var wh=Object.create;var ca=Object.defineProperty;var Ch=Object.getOwnPropertyDescriptor;var Sh=Object.getOwnPropertyNames;var Mh=Object.getPrototypeOf,Th=Object.prototype.hasOwnProperty;var Rh=(e,r)=>{for(var t in r)ca(e,t,{get:r[t],enumerable:!0})},Ts=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Sh(r))!Th.call(e,a)&&a!==t&&ca(e,a,{get:()=>r[a],enumerable:!(n=Ch(r,a))||n.enumerable});return e};var Yt=(e,r,t)=>(t=e!=null?wh(Mh(e)):{},Ts(r||!e||!e.__esModule?ca(t,"default",{value:e,enumerable:!0}):t,e)),Lh=e=>Ts(ca({},"__esModule",{value:!0}),e);var Dd={};Rh(Dd,{KikuButton:()=>ll,SearchBar:()=>Ns});module.exports=Lh(Dd);var xr=require("react"),rn=require("@akropolys/sdk");var Rs=require("@akropolys/sdk");function rr(e,r){return e.details??(e.fields?(0,Rs.resolveDisplayFields)(e.fields,r).details:[])}function no(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function Ls(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=Ls(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Es(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=Ls(e))&&(n&&(n+=" "),n+=r);return n}function he(...e){return Es(e)}var Oe=require("react/jsx-runtime"),zs=()=>(0,Oe.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,Oe.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,Oe.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function Ns({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,p]=(0,xr.useState)(""),[d,u]=(0,xr.useState)(!1),{results:f,loading:C,search:b,clear:E}=(0,rn.useSearch)({debounceMs:t}),x=(0,rn.useAkropolysContext)(),L=(0,rn.useCardFields)(),M=(0,xr.useRef)(null),w=(0,xr.useRef)(!1);(0,xr.useEffect)(()=>{if(w.current){w.current=!1;return}if(!h.trim()){E(),u(!1);return}u(!0),b(h,r)},[h]),(0,xr.useEffect)(()=>{let v=I=>{M.current&&!M.current.contains(I.target)&&u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);let D=v=>{h.trim()&&x.api.searchVector(h,1,void 0,!0).catch(()=>{}),w.current=!0,u(!1),p(v.entity.title??v.entity.name??""),n?.(v)},H=()=>{h.trim()&&(f.length>0?D(f[0]):x.api.searchVector(h,1,void 0,!0).catch(()=>{}))},S=d&&h.trim().length>0,O={...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,Oe.jsxs)("div",{className:he("hsk-sb-wrap",l.root,a),ref:M,style:O,children:[(0,Oe.jsx)("span",{className:"hsk-sb-icon",children:(0,Oe.jsx)(zs,{})}),(0,Oe.jsx)("input",{className:he("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:v=>p(v.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:v=>{v.key==="Enter"&&H()},autoComplete:"off",spellCheck:!1}),S&&(0,Oe.jsxs)("div",{className:he("hsk-sb-drop",l.dropdown,i),style:{position:"absolute"},children:[C&&(0,Oe.jsx)("div",{className:"hsk-sb-loading-bar"}),C&&f.length===0?(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Oe.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,Oe.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,Oe.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,Oe.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,Oe.jsxs)(Oe.Fragment,{children:[f.length===0&&!C&&(0,Oe.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((v,I)=>{if(c)return(0,Oe.jsx)("div",{onClick:()=>D(v),className:"hsk-sb-fade",style:{animationDelay:`${I*18}ms`},children:c(v)},v.id);let q=v.entity.image??v.entity.thumbnail??v.entity.images?.[0];return(0,Oe.jsxs)("div",{className:he("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${I*18}ms`},onClick:()=>D(v),children:[(0,Oe.jsx)("span",{className:"hsk-sb-row-thumb",children:q?(0,Oe.jsx)("img",{src:q,alt:"",loading:"lazy",onError:P=>{P.currentTarget.style.display="none"}}):(0,Oe.jsx)(zs,{})}),(0,Oe.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,Oe.jsx)("div",{className:"hsk-sb-row-title",children:v.entity.title??v.entity.name}),rr({fields:v.entity.fields??v.entity},L)[0]&&(0,Oe.jsx)("div",{className:"hsk-sb-row-sub",children:rr({fields:v.entity.fields??v.entity},L)[0].value})]})]},v.id)})]})]})]})}var Wt=require("react"),il=require("react-dom");var Is="hsk-sounds",We=null,hr=null;function la(){try{return localStorage.getItem(Is)!=="off"}catch{return!0}}function As(e){try{localStorage.setItem(Is,e?"on":"off")}catch{}e&&Lr()}function Lr(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(We){We.state==="suspended"&&We.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{We=new e({latencyHint:"interactive"}),hr=We.createGain(),hr.gain.value=.28,hr.connect(We.destination);let r=We.createBuffer(1,1,We.sampleRate),t=We.createBufferSource();t.buffer=r,t.connect(We.destination),t.start(0),We.resume().catch(()=>{})}catch{We=null}}function lr(e,r,t,n,a){if(!We||!hr)return;let o=We.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let i=We.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=We.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(hr),o.start(e),o.stop(e+n+.02)}function Ps(e,r){if(!We||!hr)return;let t=Math.floor(We.sampleRate*.03),n=We.createBuffer(1,t,We.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=We.createBufferSource();o.buffer=n;let i=We.createBiquadFilter();i.type="bandpass",i.frequency.value=2600,i.Q.value=5;let c=We.createGain();c.gain.value=r,o.connect(i),i.connect(c),c.connect(hr),o.start(e)}function _s(){return la()?We?We.state:"unsupported":"off"}function Eh(e){!We||!hr||(lr(e,587.33,.985,.16,.38),lr(e+.048,739.99,.985,.18,.42),lr(e+.096,880,.985,.28,.46),lr(e+.105,1174.66,.985,.22,.22),Ps(e+.096,.16))}function zh(e){!We||!hr||lr(e,659.25,.97,.09,.26)}function nr(e,r=!1){if(!r&&!la()||(Lr(),!We||!hr||We.state==="closed"))return;We.state==="suspended"&&We.resume().catch(()=>{});let t=We.currentTime+.01;switch(e){case"connect":Eh(t);break;case"heard":zh(t);break;case"reply":lr(t,440,.94,.13,.5),lr(t+.09,660,.94,.16,.42);break;case"interrupt":lr(t,520,.62,.17,.4);break;case"send":lr(t,300,1.16,.1,.22);break;case"pin":Ps(t,.35),lr(t+.02,880,.97,.07,.22);break}}var ao='@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;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[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),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .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-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .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-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.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) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.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)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;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-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;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-scrim.is-discovery{--hsk-discovery-edge: calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px));--hsk-discovery-mask: linear-gradient(to bottom, #000 calc(var(--hsk-discovery-edge) + 24px), rgba(0, 0, 0, .84) calc(var(--hsk-discovery-edge) + 100px), rgba(0, 0, 0, .4) calc(var(--hsk-discovery-edge) + 190px), transparent calc(var(--hsk-discovery-edge) + 320px));-webkit-mask-image:var(--hsk-discovery-mask);mask-image:var(--hsk-discovery-mask);animation-duration:.4s}.hsk-cb-theme-discovery{position:absolute;z-index:1001;inset-inline-start:calc(100% + 18px);bottom:52px;width:150px;color:var(--hsk-chat-text);text-align:center;pointer-events:none;animation:hsk-theme-discovery-in .36s ease .28s both}.hsk-cb-theme-discovery svg{display:block;width:104px;height:72px;margin:0 auto 4px;transform:rotate(-90deg)}.hsk-cb-theme-discovery path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));animation:hsk-theme-arrow-draw 1s cubic-bezier(.22,.61,.36,1) .3s both}.hsk-cb-theme-discovery span{display:inline-block;padding:6px 13px;border-radius:999px;background:color-mix(in srgb,var(--hsk-primary) 9%,transparent);font-family:var(--hsk-font);font-size:13px;font-style:italic;font-weight:550;line-height:1.5;overflow-wrap:anywhere;transform:rotate(-2deg);animation:hsk-theme-hint-hop .65s cubic-bezier(.22,.61,.36,1) .85s both}.hsk-cb-theme-discovery.is-mobile{top:calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px) + 10px);bottom:auto;left:50%;right:auto;width:min(260px,calc(100vw - 48px));transform:translate(-50%)}.hsk-cb-theme-discovery.is-mobile svg{position:relative;left:50%;width:min(calc(100vw - 24px),366px);height:calc(var(--hsk-tray-h, 160px) + 98px);margin-top:calc(-1 * var(--hsk-tray-h, 160px) - 28px);transform:translate(-50%)}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-discovery:not(.is-mobile) svg{transform:rotate(90deg) scaleX(-1)}.hsk-cb-kiku-id-rail.is-theme-open .hsk-cb-dock-frost{opacity:1;transition-duration:.4s}.hsk-cb-theme-discovery.is-closing{animation:hsk-scrim-out .18s ease both}@keyframes hsk-theme-discovery-in{0%{opacity:0;translate:0 -4px}to{opacity:.8;translate:0 0}}@keyframes hsk-theme-arrow-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes hsk-theme-hint-hop{0%{transform:translateY(4px) rotate(-4deg) scale(.96)}42%{transform:translateY(-3px) rotate(1deg) scale(1.025)}72%{transform:translateY(1px) rotate(-3deg) scale(.995)}to{transform:translateY(0) rotate(-2deg) scale(1)}}.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{content:"";position:absolute;inset-inline-end:-13px;top:15px;width:9px;height:13px;background:var(--hsk-primary);clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%);pointer-events:none;animation:hsk-theme-twinkle 1.6s ease .8s 2 both}.hsk-cb-topbar-mark.is-discovering:after{inset-inline-end:auto;inset-inline-start:-10px;top:35px;width:6px;height:9px;animation-delay:1.2s}@keyframes hsk-theme-twinkle{0%,to{opacity:0;transform:rotate(-12deg) scale(.4)}40%{opacity:.85;transform:rotate(9deg) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-discovery,.hsk-cb-theme-discovery path,.hsk-cb-theme-discovery span,.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{animation:none}}.hsk-cb-layout-discovery-note{display:flex;align-items:center;gap:10px;width:fit-content;max-width:min(100%,380px);margin:0 0 20px;margin-inline-start:auto;padding:8px 14px 8px 10px;border:0;border-radius:18px;background:color-mix(in srgb,var(--hsk-primary) 6%,transparent);color:var(--hsk-chat-muted);font:500 12px/1.5 var(--hsk-font);text-align:start;cursor:pointer;animation:hsk-msg-in .3s ease both}.hsk-cb-layout-discovery-note svg{width:34px;height:40px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));transform:scaleX(-1)}.hsk-cb-layout-discovery-note path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}.hsk-cb-layout-discovery-note:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:none}.hsk-cb-layout-toggle.is-discovery{position:relative}.hsk-cb-layout-toggle.is-discovery:after{content:"";position:absolute;inset:-3px;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary) 14%,transparent),0 0 12px color-mix(in srgb,var(--hsk-primary) 18%,transparent);animation:hsk-layout-discovery-pulse 1.2s ease .2s 2 both}@keyframes hsk-layout-discovery-pulse{0%,to{opacity:0;transform:scale(.98)}45%{opacity:1;transform:scale(1.02)}}@media(min-width:1200px){.hsk-cb-layout-discovery-note svg{transform:rotate(-90deg)}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:rotate(180deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-discovery-note,.hsk-cb-layout-discovery-note path,.hsk-cb-layout-toggle.is-discovery:after{animation:none}}.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{min-width:0;max-width:100%;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{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;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.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.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>.hsk-cb-check{scale:.94;translate:0 1px;box-shadow:none}.hsk-cb-check{display:inline-grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:8px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 20%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #111) 4%,transparent);box-shadow:0 2px color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease,box-shadow .16s ease,scale .16s ease,translate .16s 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}@media(hover:hover){.hsk-cb-entlang-opt:not(.is-selected):hover>.hsk-cb-check{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent)}}.hsk-cb-entlang-opt:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33)!important;outline-offset:-2px}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.9)}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,.hsk-cb-check path{transition:none}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:none;translate: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));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));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(10px + 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(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) 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[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;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}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.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-tools-toggle,.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-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;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: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 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-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.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:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px 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:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#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:0;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-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;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:100%;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{min-width:0;flex:1 1 auto;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 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.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}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@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-text, #111) 12%,transparent);cursor:pointer;transition:color .2s ease,background-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}@media(hover:hover){.hsk-cb-sound-pill:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,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-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-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-layout=wide] .hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:0;margin-top:0}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:4px}.hsk-tapback-group.is-wide .hsk-tapback-tail{display:none}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:transparent!important;border:none!important;box-shadow:none!important;color:var(--hsk-chat-text)!important}.hsk-cb-layout-track{background:color-mix(in srgb,currentColor 12%,transparent)}.hsk-cb-dock-layout{padding-top:4px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:32px}.hsk-cb-dock-layout{align-items:center;justify-content:space-between;gap:12px}.hsk-cb-layout-label{padding-inline-start:12px;font-size:11px;font-weight:500;color:var(--hsk-chat-muted);opacity:.75}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}@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;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,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 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);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%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);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 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.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)!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-layout-toggle,[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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !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-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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}}';var Fs="akropolys-kiku-root",Er=null,nn=null,Ds=!1;function Hs(e){if(Ds)return;if(Ds=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(ao),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=ao,e.appendChild(r)}function oo(){return typeof document>"u"?null:nn?(Hs(nn),nn):(Er=document.getElementById(Fs),Er||(Er=document.createElement("div"),Er.id=Fs,Er.style.cssText="all: initial;",document.body.appendChild(Er)),nn=Er.shadowRoot??Er.attachShadow({mode:"open"}),Hs(nn),nn)}var cl=require("@akropolys/sdk");function ha(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,r["--hsk-selection-bg"]=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 so=require("react"),Kt=new Map;function io(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 Nh(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 co(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var $s=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Ih=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,Bs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Ih.test(t))?"":r.join(", ")},qs=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function Ah(e,r){(0,so.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=io(e);if(Kt.set(e,(Kt.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=(Kt.get(e)??1)-1;if(n>0){Kt.set(e,n);return}Kt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Os(e){let r=$s(e.family);return r?e.faces.map(t=>{let n=co(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${qs(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(Bs(t.unicodeRange)?`unicode-range:${Bs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function lo(e){let r=e?.faces??[],t=e&&r.length?Os(e):"";Ah(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Xt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Os(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Kt.set(n,(Kt.get(n)??0)+1);let a=io(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=co(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(i,`url(${h})`,{weight:qs(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(s),new Promise(l=>setTimeout(l,r))])}}var Us=["400","500","600","700"];function Ws(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 ho(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=Ws(e,r);if(!t?.check||!n||!a)return!0;try{return Us.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function po(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=Ws(e,r);!a||!o||await Promise.race([Promise.all(Us.map(i=>n.load(`${i} 16px ${o}`,a).catch(()=>{}))),new Promise(i=>setTimeout(i,t))])}function pa(e){let r=typeof e=="object"&&e?e:void 0,t=$s(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,so.useEffect)(()=>{if(!t||!a&&!o&&!i)return;let c=i?[["100 900",i]]:[["400",a],["700",o]],s=[];for(let[d,u]of c){if(!u)continue;let f=co(u);if(!f)continue;let C=Nh(f);s.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${C?` format("${C}")`:""};}`)}if(s.length===0)return;let l=s.join(""),h=`${t}|${a}|${o}|${i}`,p=io(h,"hsk-host-font");if(Kt.set(h,(Kt.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=(Kt.get(h)??1)-1;if(d>0){Kt.set(h,d);return}Kt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,i])}var Vs=new WeakMap,Gs=new WeakMap;function js(e){return e?Gs.get(e)??null:null}function uo(e){if(!e)return Promise.resolve(null);let r=Vs.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Gs.set(e,n),Xt(n,0).catch(()=>{})),n)).catch(()=>null);return Vs.set(e,t),t}function Ys(e,r,t){e&&(uo(e),r&&mo(e,r,t))}function mo(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Xt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var bo=Yt(require("react")),Ln=[],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}];function Rn(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(da[n]?.endonym)return da[n].endonym;let o=Object.values(da).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 Ks(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}var da={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"}};function Xs(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function Br(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(da).find(([i,c])=>i===r||c.endonym?.toLowerCase()===r||Rn(i)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Rn(e)||Xs(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||Ks(t[1].preparing),known:!0};let n=Rn(e)||e,a=Xs(n),o=Ks(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var En=[{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"}],fo="hsk-live-voice",zr={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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},Ht={themeHoldHint:"Long press for themes",themeClickHint:"Pick your mood",layoutFirstReplyNote:"Open the dock and try {button} to change the reply layout.",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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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:"Wait",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. It resets in 24 hours.",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"},ko=bo.default.createContext((e,r)=>{let t=Ht[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),Qt=()=>bo.default.useContext(ko);function Js(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 Qs={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var Zs=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Qs[t])return r(Qs[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")},ei=()=>typeof window>"u"||window.isSecureContext!==!1,go=15;var ti="light",Ph=["light","dark","mahogany","blush","coffee","midnight"],ri=!1;function ma(e){return typeof e=="string"&&Ph.includes(e)}function ni(e){if(ma(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ma(r))return r}catch{}return ti}function xo(){if(ri)return!0;try{return localStorage.getItem("akropolys_themes_seen")==="true"||ma(localStorage.getItem("akropolys_theme"))}catch{return!1}}function ai(){ri=!0;try{localStorage.setItem("akropolys_themes_seen","true")}catch{}}var Y=Yt(require("react"));var W=require("react/jsx-runtime"),_h=({className:e,size:r=18,tight:t=!1})=>(0,W.jsx)("svg",{className:he("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,W.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,W.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,W.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),vr=_h,oi=()=>(0,W.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,W.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,W.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var si=()=>(0,W.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,W.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,W.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),ii=()=>(0,W.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,W.jsx)("path",{d:"M8 5v14l11-7z"})}),an=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,W.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),on=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"m15 18-6-6 6-6"})}),sn=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"m9 18 6-6-6-6"})}),ci=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,W.jsx)("path",{d:"M3 3v5h5"}),(0,W.jsx)("path",{d:"M12 7v5l4 2"})]}),ba=()=>(0,W.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),fa=()=>(0,W.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M3 6h18"}),(0,W.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"})]});var li=()=>(0,W.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,W.jsx)("path",{d:"M12 5v14M5 12h14"})}),hi=({size:e=18}={})=>(0,W.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.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,W.jsx)("circle",{className:"hsk-mimi-dot",style:{"--hsk-dot":t},cx:r,cy:"11.6",r:"1.15",fill:"currentColor",stroke:"none"},r))]}),vo=()=>(0,W.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.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"})}),pi=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,W.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,W.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),zn=({className:e,size:r=13}={})=>(0,W.jsxs)("svg",{className:he("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,W.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,W.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,W.jsxs)("svg",{className:he("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,W.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,W.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),$r=({className:e,size:r=13}={})=>(0,W.jsxs)("svg",{className:he("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,W.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,W.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"})]}),qr=({className:e,size:r=13}={})=>(0,W.jsx)("svg",{className:he("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,W.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),Nn=({className:e,size:r=18}={})=>(0,W.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,W.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,W.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,W.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),di=()=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,W.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,W.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,W.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,W.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,W.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),yo=({active:e})=>(0,W.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.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,W.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,W.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,W.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,W.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,W.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"})]}),ui=()=>(0,W.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,W.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,W.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,W.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),mi=()=>(0,W.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,W.jsxs)("g",{className:"hsk-sun-rays",children:[(0,W.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,W.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,W.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,W.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,W.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,W.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,W.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,W.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),bi=()=>(0,W.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.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"})}),fi=()=>(0,W.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,W.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,W.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),ki=()=>(0,W.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,W.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"})}),gi=()=>(0,W.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,W.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,W.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,W.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,W.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),xi=()=>(0,W.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,W.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"})]});var vi=({size:e=11})=>(0,W.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,W.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,W.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),yi=({className:e,size:r=16,filled:t=!1}={})=>(0,W.jsxs)("svg",{className:he("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,W.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,W.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"})]});var cn=[{id:"light",label:"Silver",Icon:mi,dark:!1},{id:"dark",label:"Onyx",Icon:bi,dark:!0},{id:"mahogany",label:"Mahogany",Icon:fi,dark:!0},{id:"blush",label:"Blush",Icon:ki,dark:!1},{id:"coffee",label:"Coffee",Icon:gi,dark:!1},{id:"midnight",label:"Midnight",Icon:xi,dark:!0}];function wo(e){return cn.find(r=>r.id===e)??cn[0]}var Da=require("@akropolys/sdk"),Ha=require("@akropolys/sdk");var ga=require("react");function Fh(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function Dh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,i=0,c=null,s=0,l=p=>{let d=Math.min(.032,(p-s)/1e3)||.016666666666666666;s=p;let u=Math.max(1,Math.ceil(d/.008)),f=d/u;for(let C=0;C<u;C++){let b=-e*(a-i)-r*o;o+=b*f,a+=o*f}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(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,o=0,t(a)},to(p,d=0){i=p,o=d,h()},get value(){return a},stop(){c!==null&&(cancelAnimationFrame(c),c=null)}}}function wi({panel:e,scroller:r,onDismiss:t,quiescent:n,enabled:a=!0}){let o=(0,ga.useRef)(t);o.current=t,(0,ga.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,p=-1,d=0,u=0,f=0,C=!1,b=!1,x=Dh({onFrame:H=>{i.style.transform=H===0?"":`translate3d(0, ${H}px, 0)`;let S=i.parentElement;S&&(S.style.opacity=H===0?"":String(Math.max(.35,1-H/(i.offsetHeight||1)*1.1)))},onRest:()=>{i.style.willChange="",b&&(b=!1,o.current())}}),L=()=>{let H=r();return H&&H.scrollTop>0?!1:n?n():!0},M=H=>{H.pointerType==="mouse"||!H.isPrimary||(c=!1,C=!1,p=H.pointerId,s=d=H.clientY,l=H.clientX,u=H.timeStamp,f=0,h=x.value)},w=H=>{if(H.pointerId!==p)return;let S=H.clientY-s,O=H.clientX-l;if(!C){if(Math.abs(S)<6&&Math.abs(O)<6)return;if(C=!0,c=S>0&&Math.abs(S)>Math.abs(O)&&L(),c){try{i.setPointerCapture(H.pointerId)}catch{}x.stop(),i.style.animation="none",i.style.willChange="transform"}}if(!c)return;let v=H.timeStamp-u;v>0&&(f=(H.clientY-d)/v*1e3),d=H.clientY,u=H.timeStamp;let I=h+S;x.track(I<0?-Fh(-I,i.offsetHeight||1):I),H.cancelable&&H.preventDefault()},D=H=>{if(H.pointerId!==p)return;try{i.hasPointerCapture(H.pointerId)&&i.releasePointerCapture(H.pointerId)}catch{}if(p=-1,!c)return;c=!1;let S=i.offsetHeight||1;x.value+f*.12>S*.3||f>900?(b=!0,i.style.pointerEvents="none",x.to(S,f)):x.to(0,f)};return i.addEventListener("pointerdown",M,{passive:!0}),i.addEventListener("pointermove",w,{passive:!1}),i.addEventListener("pointerup",D,{passive:!0}),i.addEventListener("pointercancel",D,{passive:!0}),()=>{x.stop(),i.removeEventListener("pointerdown",M),i.removeEventListener("pointermove",w),i.removeEventListener("pointerup",D),i.removeEventListener("pointercancel",D),i.style.transform="",i.style.willChange="",i.style.animation="",i.style.pointerEvents="";let H=i.parentElement;H&&(H.style.opacity="")}},[a,e,r,n])}function ln(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,r){if(!r&&(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200))return ln(e);try{let t=await createImageBitmap(e),n=Math.min(1,1536/Math.max(t.width,t.height)),a=Math.max(1,Math.round(t.width*n)),o=Math.max(1,Math.round(t.height*n));t.close?.();let i=await createImageBitmap(e,{resizeWidth:a,resizeHeight:o,resizeQuality:"high"});try{let c=document.createElement("canvas");c.width=a,c.height=o;let s=c.getContext("2d");if(!s){if(r)throw new Error("image conversion failed");return ln(e)}r&&(s.fillStyle="#fff",s.fillRect(0,0,a,o)),s.drawImage(i,0,0);let l=!r&&e.type==="image/png",h=await new Promise(p=>c.toBlob(p,l?"image/png":"image/jpeg",.85));if(!h){if(r)throw new Error("image conversion failed");return ln(e)}return!r&&h.size>=e.size?ln(e):ln(h)}finally{i.close?.()}}catch(t){if(r)throw t;return ln(e)}}var ft=require("react");var Ci=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Hh(e){let r=0;for(let t=1;t<e.length;t++)r+=Ci(e[t-1],e[t]);return r}function Co(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}}var hn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function So(e,r,t){return[hn(e.minY/t*1e3),hn(e.minX/r*1e3),hn(e.maxY/t*1e3),hn(e.maxX/r*1e3)]}function Bh(e,r){let[t,n,a,o]=e,[i,c,s,l]=r,h=Math.min(o,l)-Math.max(n,c),p=Math.min(a,s)-Math.max(t,i);if(h<=0||p<=0)return!1;let d=Math.min((o-n)*(a-t),(l-c)*(s-i));return d>0&&h*p/d>.35}var $h=(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 qh(e,r,t){if(e.length<2)return null;let n=Co(e),a=So(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let i=Hh(e),c=Ci(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:[hn(e[e.length-1].y/t*1e3),hn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Si(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:So(Co([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:So(Co([l,l]),r,t),text:s.value});continue}if(s.kind==="stroke"&&s.tool!=="eraser"&&s.points){let l=qh(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||Bh(l.box,n[h].box)&&(i.add(h),l={gesture:"cross",box:$h(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 rt=require("react/jsx-runtime"),Mi="#ff5a5a",Oh=1280,Uh=4,Wh=80;function Vh(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 Gh(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 Ti({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=(0,ft.useState)(null),[i,c]=(0,ft.useState)(!1),[s,l]=(0,ft.useState)("pin"),h=(0,ft.useRef)(0),[p,d]=(0,ft.useState)(null),u=(0,ft.useRef)(null),[f,C]=(0,ft.useState)([{points:[],closed:!1}]),b=f[f.length-1],E=(0,ft.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),x=(0,ft.useRef)(null),L=y=>C(z=>[...z.slice(-66),y]),M=s==="select",[w,D]=(0,ft.useState)([]),[H,S]=(0,ft.useState)(!1),O=(0,ft.useRef)(null),v=(0,ft.useRef)(null);(0,ft.useEffect)(()=>{let y=new Image;return y.crossOrigin="anonymous",y.onload=()=>o(y),y.onerror=()=>c(!0),y.src=e,()=>{y.onload=null,y.onerror=null}},[e]);let I=(()=>{if(!a)return{w:0,h:0};let y=Math.min(1,Oh/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*y),h:Math.round(a.naturalHeight*y)}})(),q=(0,ft.useRef)(null),P=y=>{let z=O.current;if(!z||!a)return;let k=z.getContext("2d");if(!k)return;q.current||(q.current=document.createElement("canvas"));let pe=q.current;pe.width=z.width,pe.height=z.height;let se=pe.getContext("2d"),U=y?[...w,y]:w;for(let m of U)m.kind==="stroke"&&(se.save(),se.globalCompositeOperation=m.tool==="eraser"?"destination-out":"source-over",se.strokeStyle=Mi,se.lineWidth=m.tool==="eraser"?m.size*3:m.size,se.lineCap="round",se.lineJoin="round",se.beginPath(),m.points.forEach((R,G)=>G===0?se.moveTo(R.x,R.y):se.lineTo(R.x,R.y)),m.points.length===1&&se.lineTo(m.points[0].x+.01,m.points[0].y),se.stroke(),se.restore());k.clearRect(0,0,z.width,z.height),k.drawImage(a,0,0,z.width,z.height),k.drawImage(pe,0,0);let le=b.points.map((m,R)=>x.current?.index===R?x.current.point:m);le.length&&(k.save(),k.beginPath(),le.forEach((m,R)=>R?k.lineTo(m.x,m.y):k.moveTo(m.x,m.y)),b.closed&&(k.closePath(),k.fillStyle="#22c55e33",k.fill()),k.strokeStyle="#22c55e",k.lineWidth=Math.max(2,I.w/400),k.stroke(),k.restore());for(let m of le)k.beginPath(),k.arc(m.x,m.y,Math.max(3,I.w/260),0,Math.PI*2),k.fillStyle="#ffffff",k.fill(),k.strokeStyle="#15803d",k.stroke();for(let m of U){if(m.kind!=="pin")continue;let R=m.size;if(k.save(),k.beginPath(),k.moveTo(m.x,m.y),k.bezierCurveTo(m.x-R*2,m.y-R*2,m.x-R,m.y-R*3.5,m.x,m.y-R*3.5),k.bezierCurveTo(m.x+R,m.y-R*3.5,m.x+R*2,m.y-R*2,m.x,m.y),k.fillStyle=Mi,k.fill(),k.lineWidth=Math.max(1,R/7),k.strokeStyle="#fff",k.stroke(),k.beginPath(),k.arc(m.x,m.y-R*2.2,R*.5,0,Math.PI*2),k.fillStyle="#fff",k.fill(),m.label){k.font=`600 ${R*1.2}px system-ui, sans-serif`,k.textAlign="center",k.textBaseline="middle";let G=Vh(k,m.label,z.width*.32),Z=R*1.5,j=Math.min(z.width,Math.max(...G.map(_=>k.measureText(_).width))+R),ie=G.length*Z+R*.4,ve=Math.max(j/2,Math.min(z.width-j/2,m.x)),ue=Math.max(ie,m.y-R*3.7);k.fillStyle="rgba(0,0,0,.8)",k.fillRect(ve-j/2,ue-ie,j,ie),k.fillStyle="#fff",G.forEach((_,re)=>k.fillText(_,ve,ue-ie+R*.2+Z*(re+.5),j-R))}k.restore()}};(0,ft.useEffect)(()=>{P()},[a,w,b,I.w,I.h]);let ee=y=>{let z=O.current,k=z.getBoundingClientRect();return{x:Math.max(0,Math.min(z.width,(y.clientX-k.left)/k.width*z.width)),y:Math.max(0,Math.min(z.height,(y.clientY-k.top)/k.height*z.height))}},ke=()=>Math.max(4,Math.round(I.w/180)),oe=y=>{D(z=>z.filter(k=>k.kind!=="pin"||k.id!==y)),d(null)},V=()=>{let y=w.find(z=>z.kind==="pin"&&z.id===p);y?.kind==="pin"&&!y.label.trim()?oe(y.id):d(null)},me=y=>{if(!a)return;let z=ee(y);if(s==="pin"){let k=w.find(U=>U.kind==="pin"&&Math.hypot(z.x-U.x,z.y-(U.y-U.size*1.7))<U.size*2);if(k?.kind==="pin"){d(k.id),y.currentTarget.setPointerCapture(y.pointerId),u.current={id:k.id,offset:{x:z.x-k.x,y:z.y-k.y}};return}if(p){V();return}if(w.filter(U=>U.kind==="pin").length>=Uh)return;let pe=`pin-${++h.current}`,se=Math.max(10,I.w/O.current.getBoundingClientRect().width*9);D(U=>[...U,{kind:"pin",...z,id:pe,label:"",size:se}]),d(pe);return}if(s==="select"){let k=b.points[0],pe=O.current.getBoundingClientRect(),se=12*I.w/pe.width;if(!b.closed&&k&&b.points.length>=3&&Math.hypot(z.x-k.x,z.y-k.y)<se)L({...b,closed:!0});else{let U=b.points.findIndex(le=>Math.hypot(z.x-le.x,z.y-le.y)<se);if(U>=0){y.currentTarget.setPointerCapture(y.pointerId),x.current={index:U,point:z};return}if(b.closed||b.points.length>=64)return;L({...b,points:[...b.points,z]})}return}y.target.setPointerCapture(y.pointerId),v.current={kind:"stroke",tool:s,size:ke(),points:[z]},P(v.current)},J=y=>{if(u.current){let{id:z,offset:k}=u.current,pe=ee(y);D(se=>se.map(U=>U.kind==="pin"&&U.id===z?{...U,x:Math.max(0,Math.min(I.w,pe.x-k.x)),y:Math.max(0,Math.min(I.h,pe.y-k.y))}:U));return}if(x.current){x.current.point=ee(y),P();return}v.current&&(v.current.points.push(ee(y)),P(v.current))},F=()=>{if(u.current){u.current=null;return}if(x.current){let{index:z,point:k}=x.current;x.current=null,L({...b,points:b.points.map((pe,se)=>se===z?k:pe)});return}if(!v.current)return;let y=v.current;v.current=null,D(z=>[...z,y])},$=w.filter(y=>y.kind==="pin"),N=$.find(y=>y.id===p),T=!!a&&!(b.points.length>0&&!b.closed)&&$.length>0&&$.every(y=>y.label.trim()),A=()=>{if(!(!T||!a))try{let y=document.createElement("canvas");y.width=I.w,y.height=I.h;let z=y.getContext("2d");if(!z){S(!0);return}z.drawImage(a,0,0,I.w,I.h);let k=y.toDataURL("image/jpeg",.92),pe=O.current?.toDataURL("image/jpeg",.85)||k,se=Si(w,I.w,I.h);if(b.closed){let U=m=>Math.round(m/I.w*1e3),le=m=>Math.round(m/I.h*1e3);se.unshift({gesture:"selection",id:E.current,box:[le(Math.min(...b.points.map(m=>m.y))),U(Math.min(...b.points.map(m=>m.x))),le(Math.max(...b.points.map(m=>m.y))),U(Math.max(...b.points.map(m=>m.x)))],points:b.points.map(m=>[U(m.x),le(m.y)])})}t(k,$.map(U=>U.label.trim()).join("; "),se,pe)}catch{S(!0)}},K=s==="pin"?"markupPinHint":s==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,rt.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,rt.jsxs)("div",{className:"hsk-markup-head",children:[(0,rt.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(K)}),(0,rt.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,rt.jsx)("div",{className:"hsk-markup-stage",children:i?(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,rt.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,rt.jsx)("canvas",{ref:O,width:I.w,height:I.h,className:`hsk-markup-canvas hsk-markup-canvas--${s}`,style:{touchAction:"none",cursor:M||s==="pin"?"crosshair":void 0},onPointerDown:me,onPointerMove:J,onPointerUp:F,onPointerCancel:()=>{u.current=null,x.current=null,v.current=null,P()}}),s==="pin"&&N&&(0,rt.jsxs)("div",{className:"hsk-markup-pinlabel",style:Gh(N.x/I.w*100,Math.max(12,(N.y-N.size*4)/I.h*100)),children:[(0,rt.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:N.label,maxLength:Wh,style:{width:`${Math.min(34,Math.max(16,N.label.length+2))}ch`},onChange:y=>D(z=>z.map(k=>k.kind==="pin"&&k.id===N.id?{...k,label:y.target.value}:k)),onKeyDown:y=>{(y.key==="Enter"||y.key==="Escape")&&V()}}),(0,rt.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>oe(N.id),children:"\xD7"})]})]}):(0,rt.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,rt.jsxs)("div",{className:"hsk-markup-tools",children:[(0,rt.jsxs)("button",{className:`hsk-markup-tool${s==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,rt.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,rt.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,rt.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>L({...b,closed:!0}),children:n("markupCloseOutline")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>M?C(y=>y.length>1?y.slice(0,-1):y):D(y=>y.slice(0,-1)),disabled:M?f.length<2:w.length===0,children:n("markupUndo")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{D([]),d(null),C([{points:[],closed:!1}]),l("pin")},disabled:w.length===0&&!b.points.length,children:n("markupClear")}),(0,rt.jsx)("button",{className:"hsk-markup-go",onClick:A,disabled:!T,children:n("markupSend")})]}),H&&(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var Tt=Yt(require("react")),Pn=require("react/jsx-runtime");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 An(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}}var Ri=e=>e*e*(3-2*e);function jh(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=Ri(a-i),l=Ri(o-c),h=n(i,c),p=n(i+1,c),d=n(i,c+1),u=n(i+1,c+1);return(h+(p-h)*s)*(1-l)+(d+(u-d)*s)*l}}function Yh(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=(d,u)=>{let f=s.length;s.push([d,u]),c[Math.floor(u/a)*o+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),C=Math.floor(u/a);for(let b=Math.max(C-2,0);b<=Math.min(C+2,i-1);b++)for(let E=Math.max(f-2,0);E<=Math.min(f+2,o-1);E++){let x=c[b*o+E];if(x<0)continue;let L=s[x][0]-d,M=s[x][1]-u;if(L*L+M*M<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[u,f]=s[l[d]],C=!1;for(let b=0;b<24;b++){let E=n()*Math.PI*2,x=t*(1+n()),L=u+Math.cos(E)*x,M=f+Math.sin(E)*x;if(p(L,M)){h(L,M),C=!0;break}}C||l.splice(d,1)}return s}var kt=(e,r)=>(e()-.5)*r,Mo=[(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,kt(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()}],Li=[(e,r,t)=>{let n=r*.5,a=-n+kt(t,n*.3),o=kt(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+kt(t,n*.5),l=kt(t,n*1.5);e.quadraticCurveTo(a+kt(t,n*.9),o+kt(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+kt(t,.06)),h=Math.cos(s)*l,p=Math.sin(s)*l;i===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=kt(t,.7);for(let i=0;i<a;i++){let c=-n+i/(a-1)*n*2+kt(t,n*.16),s=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*s*.5,-s*.5),e.quadraticCurveTo(c+kt(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+kt(t,n*.14))}e.stroke()}],Ei=[(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(kt(t,r*.04),kt(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,kt(t,r*.08)),e.quadraticCurveTo(0,kt(t,r*.16),n,kt(t,r*.08)),e.stroke()}],Kh={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()}},zi=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function To(e,r,t){let n=zi(e),a=zi(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)})`}var Ro=new Set,Lo=new Set;function Eo(){for(let e of Lo)e()}function _i(e){Ro.forEach(r=>r(e))}var Xh=83,Ni=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Ii=7,Qh=.28;function Jh(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Fi(e,r,t,n,a,o,i,c=r){let s=i?Kh[i]:void 0,l=An(a),h=jh(An(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)),C=Yh(e,r,f,l),b=4.4/Math.max(e,r),E=b*2.6,x=Math.hypot(e,r),L=l()*Math.PI*2,M=Math.cos(L),w=Math.sin(L),D=e*(.18+l()*.64),H=r*(.12+l()*.5),S=[],O=Math.hypot(e,r)||1,v=An(a^1540483477),I=o?e:0,q=Math.hypot(e,c)||1,[P,ee,ke]=t.split(",").map(V=>parseFloat(V)||0),oe=.2126*P+.7152*ee+.0722*ke>128;for(let[V,me]of C){let J=h(V*b,me*b)*.72+h(V*E,me*E)*.28,F=Math.min(1,Math.max(0,(J-.26)/.44));if(l()>F*F*(3-2*F))continue;let $=l(),N=Math.max(0,1-Math.hypot(V-D,me-H)/(x*.72))**1.6,T=((V-e/2)*M+(me-r/2)*w)/x+.5,A=!oe,y=((A?.055:.028)+l()*(A?.04:.025))*(.75+T*.55)*(1+N*.4),z=To(t,n,N*.85),k=((o?e-V:V)+r-me)/(e+r||1),pe=l()*16777215|0,se=Jh(pe,k,oe),U=0,le=A?1.05+l()*.35:.65+l()*.35,m=20,R=Mo[0],G=1;$<.5?(U=kt(l,.16),le=A?1.15+l()*.45:.7+l()*.35,m=20+l()*16,R=Mo[l()*Mo.length|0]):$<.82?(U=l()*Math.PI*2,le=A?.95+l()*.4:.6+l()*.4,m=16+l()*20,R=Li[l()*Li.length|0]):$<.95||!s?(U=l()*Math.PI*2,le=A?.85+l()*.35:.55+l()*.35,m=7+l()*7,R=Ei[l()*Ei.length|0]):(U=kt(l,.3),le=A?1.1+l()*.3:.75+l()*.3,m=15+l()*9,R=s,G=2.6),S.push({x:V,y:me,roll:$,rotation:U,lineWidth:le,alpha:y*G,baseColor:z,shimmerColor:se,drawFn:R,size:m,seed:pe,normDist:k,bloom:Math.min(1,Math.hypot(V-I,me-c)/q)*.62+v()*.08,glow:oe?.2:.06,ux:(V-I)/(Math.hypot(V-I,me-c)||1),uy:(me-c)/(Math.hypot(V-I,me-c)||1)})}return S}var Zh=.3;function ep(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Or(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 p=h.alpha,d=h.baseColor,u=h.lineWidth,f=1,C=0,b=0;if(i!==void 0){let x=Math.min(1,Math.max(0,(i-h.bloom)/Zh));if(x<=0)continue;let L=1-(1-x)**3,M=Math.sin(x*Math.PI)**2;p=h.alpha*L+M*h.glow,d=To(h.baseColor,h.shimmerColor,M*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+M*.35),f=.86+.14*ep(x),C=-h.ux*(1-L)*9,b=-h.uy*(1-L)*9}else if(c){let x=h.normDist-s;if(x>l)p=h.alpha*.45,d=h.baseColor,u=h.lineWidth;else if(x<-l)p=h.alpha,d=h.baseColor,u=h.lineWidth;else{let L=Math.cos(x/l*(Math.PI/2))**2;p=h.alpha+L*.08,d=L>.08?To(h.baseColor,h.shimmerColor,L*.65):h.baseColor,u=h.lineWidth*(1+L*.2)}}e.save(),e.translate(h.x+(h.dx??0)+C,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*o,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let E=An(h.seed);h.drawFn(e,h.size,E),e.restore()}}var tp=Tt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,Tt.useRef)(null),i=(0,Tt.useRef)(!1),c=(0,Tt.useRef)(0),s=(0,Tt.useRef)(null),l=(0,Tt.useRef)(0),h=(0,Tt.useRef)(0),p=(0,Tt.useRef)(a);return(0,Tt.useEffect)(()=>{let d=o.current;if(!d)return;let u=Pi(r||"kiku"),f=0,C=(v,I,q,P)=>()=>{let ee=performance.now(),ke=d.clientWidth,oe=d.clientHeight;v===null&&ke&&oe&&(v=ee);let V=v===null?0:ee-v,me=Math.min(1,V/I);if(ke&&oe){let J=Math.min(window.devicePixelRatio||1,3),F=Math.round(ke*J),$=Math.round(oe*J);(d.width!==F||d.height!==$)&&(d.width=F,d.height=$);let N=d.getContext("2d");N&&(N.setTransform(J,0,0,J,0,0),Or(N,q,ke,oe,-1,1,me))}if(me<1)c.current=requestAnimationFrame(C(v,I,q,P));else{i.current=!1;let J=d.clientWidth,F=d.clientHeight,$=d.getContext("2d");if($&&J&&F){let N=Math.min(window.devicePixelRatio||1,3);$.setTransform(N,0,0,N,0,0),Or($,q,J,F,-1)}}},b=()=>{let v=d.clientWidth,I=d.clientHeight;if(!v||!I)return;let q=Math.min(window.devicePixelRatio||1,3),P=d.getContext("2d");if(!P)return;let ee=getComputedStyle(d),ke=ee.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",oe=ee.getPropertyValue("--hsk-doodle-tint").trim()||ke,V=n==="rtl"||ee.direction==="rtl"||d.closest('[dir="rtl"]')!==null,me=typeof window<"u"?Math.max(I,window.innerHeight||0):I,J=Fi(v,me,ke,oe,u,V,t,I);s.current=J,l.current=v,h.current=me;let F=Math.round(v*q),$=Math.round(I*q);if((d.width!==F||d.height!==$)&&(d.width=F,d.height=$),P.setTransform(q,0,0,q,0,0),p.current){P.clearRect(0,0,v,I);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Or(P,J,v,I,-1);return}cancelAnimationFrame(c.current),i.current=!0;let T=1500;c.current=requestAnimationFrame(C(null,T,J,V))},E=()=>{let v=s.current,I=d.clientWidth,q=d.clientHeight;if(v&&I===l.current&&q<=h.current){if(i.current||p.current||!q)return;let P=d.getContext("2d");if(!P)return;let ee=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(I*ee),d.height=Math.round(q*ee),P.setTransform(ee,0,0,ee,0,0),Or(P,v,I,q,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let x=()=>{p.current&&(p.current=!1,b())};Lo.add(x);let L=p.current?window.setTimeout(x,2e3):0,M=new ResizeObserver(E);M.observe(d);let w=window.matchMedia?.("(prefers-color-scheme: dark)"),D=()=>{b()};w?.addEventListener?.("change",D);let H=0,S=()=>{let v=s.current,I=d.getContext("2d"),q=d.clientWidth,P=d.clientHeight;if(!v||!I||!q||!P)return;let ee=Math.min(window.devicePixelRatio||1,3);I.setTransform(ee,0,0,ee,0,0),Or(I,v,q,P,-1)},O=({x:v,y:I,strength:q})=>{let P=s.current;if(p.current||i.current||!P||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),i.current=!1,clearTimeout(H);let ee=d.getBoundingClientRect(),ke=v-ee.left,oe=I-ee.top,V=An(performance.now()*997|0),me=(N,T)=>Math.max(-T,Math.min(T,N)),J=P.map(N=>{let T=N.dx??0,A=N.dy??0,K=N.dr??0,y=N.x-ke,z=N.y-oe,k=Math.hypot(y,z)||1,pe=q*(.18+.82*Math.exp(-k/220)),se=pe*(.6+V()*1.8),U=me(T+y/k*se+(V()-.5)*pe*2,Ii),le=me(A+z/k*se+(V()-.5)*pe*2,Ii),m=me(K+(V()-.5)*pe*.12,Qh);return{g:N,fx:T,fy:A,fr:K,tx:U,ty:le,tr:m,lift:pe*.09}}),F=0,$=()=>{let N=Ni[F];for(let T of J)T.g.dx=T.fx+(T.tx-T.fx)*N.k,T.g.dy=T.fy+(T.ty-T.fy)*N.k,T.g.dr=T.fr+(T.tr-T.fr)*N.k,T.g.hop=T.lift*N.hop;S(),++F<Ni.length&&(H=window.setTimeout($,Xh))};$()};return Ro.add(O),()=>{Ro.delete(O),Lo.delete(x),clearTimeout(L),clearTimeout(H),clearTimeout(f),cancelAnimationFrame(c.current),i.current=!1,M.disconnect(),w?.removeEventListener?.("change",D)}},[r,t,n]),(0,Pn.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),In=3,Ai=1800;function rp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{let o=a.current,i=o?.getContext("2d");if(!o||!i)return;let c=0,s=()=>{let h=o.clientWidth,p=o.clientHeight,d=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*d),o.height=Math.round(p*d);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",C=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*In,E=p*In,x=Fi(b,E,f,C,Pi(e||"kiku"),!1,r);for(let w of x)w.lineWidth*=In*n;if(i.setTransform(d/In,0,0,d/In,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Or(i,x,b,E,-1,t);return}let L=performance.now(),M=w=>{let D=(w-L)%(Ai*2)/Ai,H=D<1?D:2-D;Or(i,x,b,E,(1-Math.cos(H*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,Pn.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var np=300;function pn({active:e,seed:r,theme:t}){let[n,a]=(0,Tt.useState)(e);return(0,Tt.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),np);return()=>clearTimeout(o)},[e]),n?(0,Pn.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,Pn.jsx)(rp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var va=tp;var st=Yt(require("react")),Bi=require("@akropolys/sdk");var zo=require("react/jsx-runtime"),ap={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"};function dn(e){let r=e?ap[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function op(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""}var Di=5e3,Hi=[5e3,15e3,45e3,12e4];function $i({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,Bi.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,Ht)??n?.getCachedUIStrings?.(e,zr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[i,c]=(0,st.useState)(()=>o),[s,l]=(0,st.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,st.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||dn(e)?.bcp47==="en"?e||"en":""),d=!e||dn(e)?.bcp47==="en",u=i;t&&Object.keys(t).length>0&&(u={...i,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[C,b]=(0,st.useState)(()=>{if(a?.dir)return a.dir==="rtl";let N=dn(e);if(N)return N.dir==="rtl";if(Br(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[E,x]=(0,st.useState)(()=>a?.bcp47||dn(e)?.bcp47||""),[L,M]=(0,st.useState)(()=>a?.font??null),[w,D]=(0,st.useState)(()=>js(n)),[H,S]=(0,st.useState)(!0),[O,v]=(0,st.useState)(!1),I=st.default.useRef(e),[q,P]=(0,st.useState)(e);if(e!==q){P(e);let N=dn(e);N&&(b(N.dir==="rtl"),x(N.bcp47));let T=e?n?.getCachedUIStrings?.(e,Ht)??n?.getCachedUIStrings?.(e,zr):null,A=t&&Object.keys(t).length>0?t:T?.strings;A&&Object.keys(A).length>0&&(c(A),u=A,T&&(T.font&&M(T.font),T.dir&&b(T.dir==="rtl"),T.bcp47&&x(T.bcp47)),T?.font&&Xt(T.font),v(!ho([T?.font?.family,w?.family].filter(K=>!!K),A)),p(e),l(!0))}let ee=e===I.current||d||!O&&(h.toLowerCase()===e.toLowerCase()&&s||Object.keys(u).length>0);(0,st.useEffect)(()=>{if(!e){x(""),M(null),c({}),p(""),l(!0),b(!1);return}let N=dn(e),T=Br(e),A=N?.bcp47==="en",K=!1,y=(se,U)=>{let le=[se?.family,w?.family].filter(m=>!!m);if(e===I.current||ho(le,U)){v(!1);return}v(!0),po(le,U,Di).then(()=>{K||v(!1)})},z=n?.getCachedUIStrings?.(e,Ht);if(z?.strings&&Object.keys(z.strings).length>0)return c(z.strings),b(z.dir==="rtl"),x(z.bcp47||N?.bcp47||""),z.font&&(Xt(z.font),M(z.font)),y(z.font,z.strings),p(e),l(!0),()=>{K=!0};let k=n?.getCachedUIStrings?.(e,zr);k?.strings&&Object.keys(k.strings).length>0?(c(k.strings),b(k.dir==="rtl"),x(k.bcp47||N?.bcp47||""),k.font&&(Xt(k.font),M(k.font)),y(k.font,k.strings),p(e),l(!0)):(v(!1),c({}),N?(b(N.dir==="rtl"),x(N.bcp47)):T?.rtl&&b(!0),A||l(!1));let pe=async()=>{let se=!1;try{if(!k?.strings){let le=await n.getUIStrings?.(e,zr);if(!K&&le?.complete){v(!0),c(R=>({...R,...le.strings})),b(le.dir==="rtl"),x(le.bcp47||N?.bcp47||"");try{localStorage.setItem(f,le.dir)}catch{}le.font&&Xt(le.font);let m=[le.font?.family,w?.family].filter(R=>!!R);await po(m,le.strings,Di),K||(le.font&&M(le.font),p(e),l(!0),v(!1))}}let U=await n.getUIStrings?.(e,Ht);!K&&U?.complete&&(se=!0,c(le=>({...le,...U.strings})),U.font&&(await Xt(U.font,1200),K||M(U.font)))}catch{return!1}return se};return(async()=>{for(let se=0;!K&&!await pe();se++){let U=Hi[Math.min(se,Hi.length-1)];await new Promise(le=>window.setTimeout(le,U))}})(),()=>{K=!0}},[e,n,f]),(0,st.useEffect)(()=>{let N=!1;return(async()=>{try{let T=await uo(n);!N&&T&&D(T)}catch{}N||S(!0)})(),()=>{N=!0}},[n]),lo(L),lo(w);let ke=st.default.useMemo(()=>{let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),A=/^var\(/i.test(T),K=T.replace(/^['"]|['"]$/g,""),y=A?op(T):"",z=A?y?`${y}, `:"":K?`"${K}", `:"";if(L)return`"${L.family}", ${z}"Geist", system-ui, sans-serif`;let k=e?e.trim().toLowerCase():"";if(k==="japanese"||k==="ja"||k==="\u65E5\u672C\u8A9E")return`${z}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(k==="chinese"||k==="zh"||k==="\u4E2D\u6587")return`${z}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(k==="urdu"||k==="ur"||k==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${z}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(k==="arabic"||k==="ar"||k==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${z}"Geist", system-ui, sans-serif`;if(k==="hindi"||k==="hi"||k==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${z}"Geist", system-ui, sans-serif`},[L,e,typeof r=="object"&&r?r.fontFamily:void 0]),oe=st.default.useMemo(()=>{let N=0,T=0;for(let A of Object.values(i))for(let K of A){let y=K.codePointAt(0)??0;y<192||/\p{L}/u.test(K)&&(y<=591?N++:T++)}return T>N},[i]),[V,me]=(0,st.useState)(0);(0,st.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let N=!0;return document.fonts.ready.then(()=>{N&&me(T=>T+1)}),()=>{N=!1}},[L]);let J=st.default.useMemo(()=>{if(!oe||typeof document>"u")return!0;let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!T)return!1;let A="";for(let y of Object.values(i))if(y){A=y;break}if(!A)return!0;let K=A.replace(/\s+/g,"");if(!K)return!0;try{let z=document.createElement("canvas").getContext("2d");if(!z)return!0;let k=T.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(T.slice(4,-1).trim()).trim()||T;z.font=`16px ${k}, __akropolys_nonexistent_font__`;let pe=z.measureText(K).width;z.font="16px __akropolys_nonexistent_font__";let se=z.measureText(K).width;return Math.abs(pe-se)>1}catch{return!0}},[oe,i,typeof r=="object"&&r?r.fontFamily:void 0,V]),F=(0,st.useCallback)((N,T)=>{let A=u[N]||i[N]||Ht[N]||N;if(T)for(let[K,y]of Object.entries(T))A=A.split(`{${K}}`).join(y);return A},[u,i]),$=(0,st.useCallback)((N,T)=>(u[N]||i[N]||Ht[N]||N).split(/(\{[a-zA-Z]+\})/g).map((K,y)=>{let z=K.match(/^\{([a-zA-Z]+)\}$/);return z&&T?.[z[1]]!==void 0?(0,zo.jsx)("bdi",{children:T[z[1]]},y):(0,zo.jsx)(st.default.Fragment,{children:K},y)}),[u,i]);return{chromeStrings:i,chromeReady:ee,isRTL:C,speechLang:E,scriptFont:L,fontStack:ke,isNonLatin:oe,hostFontCovers:J,baseFontReady:H,t:F,tNode:$}}var ze=require("react");function qi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,ze.useRef)(null),o=(0,ze.useRef)(0),[i,c]=(0,ze.useState)(!1),[s,l]=(0,ze.useState)(1),[h,p]=(0,ze.useState)(0),d=(0,ze.useRef)(()=>{}),u=(0,ze.useRef)(null),f=(0,ze.useRef)(!1),C=(0,ze.useRef)(!0),b=(0,ze.useRef)(!1),E=(0,ze.useRef)(null),x=(0,ze.useRef)(null),L=(0,ze.useRef)(e.length),M=(0,ze.useRef)(!1),w=(0,ze.useRef)(()=>{}),D=(0,ze.useRef)(()=>{}),H=(0,ze.useRef)(null),S=(0,ze.useRef)(()=>{}),[O,v]=(0,ze.useState)(0),I=(0,ze.useRef)(0),q=(0,ze.useRef)(""),P=(0,ze.useRef)(()=>{}),ee=(0,ze.useRef)(()=>{});(0,ze.useEffect)(()=>{let m=a.current;if(!m)return;let R,G=()=>{clearTimeout(R),R=setTimeout(()=>{f.current=!1},150)},Z=()=>{clearTimeout(R),f.current=!0,P.current()},j=()=>{f.current&&G()};return m.addEventListener("touchstart",Z,{passive:!0}),m.addEventListener("touchend",G,{passive:!0}),m.addEventListener("touchcancel",G,{passive:!0}),m.addEventListener("scroll",j,{passive:!0}),()=>{clearTimeout(R),m.removeEventListener("touchstart",Z),m.removeEventListener("touchend",G),m.removeEventListener("touchcancel",G),m.removeEventListener("scroll",j)}},[]),(0,ze.useEffect)(()=>{let m=a.current;if(!m)return;let R=160,G=8,Z=0,j=()=>{Z=0;let ue=E.current?.offsetHeight??0,_=m.scrollHeight-ue-m.scrollTop-m.clientHeight,re=performance.now()-o.current<400;_<=G&&(!b.current||re)&&(C.current||ee.current(),C.current=!0,b.current=!1,$.current()),c(_>R&&!C.current);let Se=m.scrollHeight-m.clientHeight;l(Se>8?Math.min(1,Math.max(0,m.scrollTop/Se)):1);let De=m.scrollTop+m.clientHeight*.33,ye=0;for(let Ee=0;Ee<n.current.length;Ee++){let Fe=n.current[Ee];Fe&&Fe.offsetTop<=De&&(ye=Ee)}p(ye)},ie=()=>{Z||(Z=requestAnimationFrame(j))};j(),m.addEventListener("scroll",ie,{passive:!0});let ve=new ResizeObserver(()=>{x.current?w.current("sync"):C.current&&!f.current&&D.current(),ie()});ve.observe(m);for(let ue of n.current)ue&&ve.observe(ue);return()=>{Z&&cancelAnimationFrame(Z),m.removeEventListener("scroll",ie),ve.disconnect()}},[e.length,n]);let ke=(0,ze.useCallback)(m=>{let R=`${m}:${I.current}`;q.current!==R&&(q.current=R,v(G=>G+1))},[]),[oe,V]=(0,ze.useState)(!1),me=(0,ze.useRef)(!1),J=(0,ze.useCallback)(()=>{me.current||(me.current=!0,V(!0))},[]),F=(0,ze.useCallback)(()=>{me.current&&(me.current=!1,V(!1))},[]),$=(0,ze.useRef)(()=>{});$.current=F;let[N,T]=(0,ze.useState)(!1),A=(0,ze.useRef)(!1),K=(0,ze.useRef)(0),y=(0,ze.useCallback)(()=>{A.current=!1,T(!1)},[]),z=(0,ze.useCallback)(()=>{q.current="",y(),F()},[y,F]),k=(0,ze.useCallback)(()=>{A.current&&(performance.now()-K.current<700||y())},[y]);P.current=k,ee.current=z,(0,ze.useEffect)(()=>{if(O===0)return;A.current=!0,K.current=performance.now(),T(!0);let m=setTimeout(y,4200);return()=>clearTimeout(m)},[O,y]);let pe=(0,ze.useCallback)(()=>{M.current=!1,x.current&&(x.current=null,E.current&&(E.current.style.height=""))},[]);S.current=pe,D.current=()=>{let m=a.current;if(!m)return;let R=m.scrollHeight-m.clientHeight;H.current?H.current(R):m.scrollTop=R},w.current=m=>{let R=a.current,G=E.current,Z=x.current,j=re=>{let Se=m==="sync"?H.current:u.current;Se?Se(re):R&&(R.scrollTop=re)},ie=D.current;if(!R||!G||!Z||!Z.isConnected){pe(),C.current&&ie();return}let ve=parseFloat(getComputedStyle(R).paddingTop)||0;G.offsetHeight<R.clientHeight&&(G.style.height=`${R.clientHeight}px`);let ue=Math.max(0,Z.offsetTop-ve),_=ue+R.clientHeight-(R.scrollHeight-G.offsetHeight);if(_<=0){pe(),C.current=!1,b.current=!0,j(ue);return}_!==G.offsetHeight&&(G.style.height=`${_}px`),j(ue)};let se=(0,ze.useCallback)(m=>{let R=a.current,G=n.current[m];if(!R||!G)return;let Z=G.offsetTop-Math.max(0,(R.clientHeight-G.clientHeight)/2),j=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,Z));u.current?u.current(j):R.scrollTo({top:j,behavior:"smooth"})},[n]),U=(0,ze.useCallback)(m=>{let R=a.current;if(!R||!R.contains(m))return;M.current=!1,x.current=null,C.current=!1,b.current=!0;let G=R.getBoundingClientRect(),Z=m.getBoundingClientRect(),j=Math.min(Z.height>G.height?176:64,G.height/3);if(Z.top>=G.top+j&&Z.bottom<=G.bottom-8)return;let ie=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,R.scrollTop+Z.top-G.top-j));u.current?u.current(ie):R.scrollTo({top:ie,behavior:"auto"})},[]),le=(0,ze.useCallback)(()=>{let m=a.current;if(!m)return;C.current=!0,b.current=!1,S.current(),ee.current();let R=m.scrollHeight-m.clientHeight;u.current?u.current(R):m.scrollTo({top:R,behavior:"smooth"})},[]);return(0,ze.useLayoutEffect)(()=>{let m=a.current;if(!m)return;let R=e.slice(L.current);if(L.current=e.length,R.some(Z=>Z.role==="user")&&(C.current=!0,b.current=!1,ee.current(),x.current=null,M.current=!0),M.current){M.current=!1;for(let Z=n.current.length-1;Z>=0;Z--){let j=n.current[Z];if(j?.dataset.hskRole==="user"){x.current=j;break}}if(x.current){w.current("glide");return}}if(x.current){w.current("glide");return}let G=m.scrollTop;if(!C.current)b.current||(J(),ke(e.length));else if(!f.current){D.current();return}m.scrollTop!==G&&d.current()},[e,r,t,n,ke,J]),(0,ze.useEffect)(()=>{let m=a.current;if(!m||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let R=7,G=16,Z=1/(window.devicePixelRatio||1),j=be=>Math.round(be/Z)*Z,ie=m.scrollTop,ve=m.scrollTop,ue=m.scrollTop,_=0,re=null,Se=be=>{be!==ue&&(m.scrollTop=be,ue=m.scrollTop)},De=()=>{re!==null&&(cancelAnimationFrame(re),re=null),m.classList.remove("hsk-scrolling"),ie=ve=ue=m.scrollTop};d.current=De,u.current=be=>{Math.abs(m.scrollTop-ue)>1&&(ie=ve=ue=m.scrollTop);let Ue=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,be)));Ue!==ie&&(ie=Ue,re===null&&(_=performance.now(),re=requestAnimationFrame(ye)))},H.current=be=>{let Ue=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,be)));re!==null&&(cancelAnimationFrame(re),re=null,m.classList.remove("hsk-scrolling")),m.scrollTop=Ue,ie=ve=ue=m.scrollTop};let ye=be=>{let Ue=Math.min((be-_)/1e3,.05);if(_=be,ve+=(ie-ve)*(1-Math.exp(-R*Ue)),Math.abs(ie-ve)<Z){ve=ie,Se(Math.round(ie)),m.classList.remove("hsk-scrolling"),re=null;return}Se(j(ve)),re=requestAnimationFrame(ye)},Ee=be=>{if(be.ctrlKey)return;Math.abs(m.scrollTop-ue)>1&&(ie=ve=ue=m.scrollTop),be.deltaY<0&&(C.current&&(I.current+=1),C.current=!1,x.current=null),P.current();let Ue=be.deltaMode===1?G:be.deltaMode===2?m.clientHeight:1,Ke=Math.max(0,m.scrollHeight-m.clientHeight),Qe=Math.round(Math.max(0,Math.min(Ke,ie+be.deltaY*Ue)));if(Qe===ie){Ke>0&&be.preventDefault();return}be.preventDefault(),ie=Qe,re===null&&(_=performance.now(),m.classList.add("hsk-scrolling"),re=requestAnimationFrame(ye))},Fe=m.scrollTop,Ie=()=>{let be=Math.abs(m.scrollTop-ue)>1;be&&(o.current=performance.now(),m.scrollTop<Fe-1&&C.current&&(I.current+=1,C.current=!1,x.current=null)),Fe=m.scrollTop,re!==null&&be&&(cancelAnimationFrame(re),re=null,m.classList.remove("hsk-scrolling"),ie=ve=ue=m.scrollTop)};return m.addEventListener("wheel",Ee,{passive:!1}),m.addEventListener("scroll",Ie,{passive:!0}),()=>{m.removeEventListener("scroll",Ie),m.removeEventListener("wheel",Ee),re!==null&&cancelAnimationFrame(re),m.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,H.current=null}},[]),{msgsContainerRef:a,spacerRef:E,lastExternalScrollRef:o,showJumpToBottom:i,scrollProgress:s,activeMsgIdx:h,jumpAlert:N,unreadBelow:oe,jumpToMessage:se,revealMessage:U,jumpToBottom:le,resetAlertArming:z}}var Jt=require("react"),sp=450,ip=45,cp=900,lp=180;function Oi(e){let[r,t]=(0,Jt.useState)(e),n=(0,Jt.useRef)(e),a=(0,Jt.useRef)(e),o=(0,Jt.useRef)(0),i=(0,Jt.useRef)(0),c=(0,Jt.useRef)(0),s=(0,Jt.useRef)(null);return(0,Jt.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,Jt.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=p=>{let d=Math.min(p-c.current,50);c.current=p;let u=a.current,f=u.length-n.current.length,C=Math.min(cp,Math.max(ip,f*1e3/sp));o.current+=(C-o.current)*(1-Math.exp(-d/lp)),i.current+=o.current*d/1e3;let b=Math.floor(i.current);b>0&&(i.current-=b,n.current=u.slice(0,Math.min(u.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=require("react"),Ui=require("@akropolys/sdk");function Wi(e,r){let t=(0,Ui.useAkropolysContext)(),[n,a]=(0,Bt.useState)(""),[o,i]=(0,Bt.useState)("idle"),[c,s]=(0,Bt.useState)(null),[l,h]=(0,Bt.useState)(null),[p,d]=(0,Bt.useState)(null),[u,f]=(0,Bt.useState)(go),[C,b]=(0,Bt.useState)(!1),E=(0,Bt.useCallback)(async(M,w)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(M):hp(M),d(w),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,Bt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(i("prompt_key"),a(""))},[e]),(0,Bt.useEffect)(()=>{if(!c)return;f(go);let M=setInterval(()=>{f(w=>w<=1?(clearInterval(M),s(null),h(null),0):w-1)},1e3);return()=>clearInterval(M)},[c]);let x=(0,Bt.useCallback)(async()=>{let M=n.trim();M&&(t.setKikuPub(M),a(""),i("idle"),await r())},[t,n,r]),L=(0,Bt.useCallback)(async()=>{if(!C){b(!0);try{let{secret:M,publicId:w}=await t.mintKikuKey();s(M),h(w),i("idle"),await r()}catch{}finally{b(!1)}}},[t,C,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:i,mintedKey:c,setMintedKey:s,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:C,copyValue:E,handleUseExistingKey:x,handleCreateKey:L}}function hp(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 _n=require("react");function Vi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,_n.useCallback)(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]);let f={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(d,p,u.length>0?u:void 0,"capture",[f])},[e,n,r,t,a]),i=(0,_n.useCallback)(l=>{let h=l.filter(u=>typeof u.id=="string"&&u.id.trim().length>0).map(u=>({id:u.id,name:u.name||"",url:u.url||u.fields?.url,fields:u.fields,image:u.image||""}));if(h.length===0)return;let p=h.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,_n.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),s=(0,_n.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 xt=require("react"),pc=require("@akropolys/sdk");var wa=null,Gi=null,ya=null,Fn=null,ji=!1,Ur=0;function Dn(e,r=130){let t=ya;if(!t||!wa)return;let n=wa.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 Yi(){if(!ji)return Ur*=.85,Ur;if(!Gi||!Fn)return Ur;Gi.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 Ur+=(t-Ur)*(t>Ur?.6:.12),Ur}function Ki(){if(ji=!1,ya&&wa&&(ya.gain.cancelScheduledValues(wa.currentTime),ya.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Le=require("react");var pp=1100,No=.012,dp=320,up=.09,mp=.25,Xi=130,bp=700,fp=12,kp=48,gp=.45,xp=.35,vp=.2,Qi=.55;function Ji({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=pp,paused:o=!1}){let[i,c]=(0,Le.useState)(!1),[s,l]=(0,Le.useState)(!1),[h,p]=(0,Le.useState)(""),[d,u]=(0,Le.useState)(!1),f=(0,Le.useRef)(null),C=(0,Le.useRef)(null),b=(0,Le.useRef)(null),E=(0,Le.useRef)(null),x=(0,Le.useRef)(null),L=(0,Le.useRef)(null),M=(0,Le.useRef)(0),w=(0,Le.useRef)(.008),D=(0,Le.useRef)(0),H=(0,Le.useRef)(0),S=(0,Le.useRef)(""),O=(0,Le.useRef)(0),v=(0,Le.useRef)(0),I=(0,Le.useRef)(!1),q=(0,Le.useRef)(o),P=(0,Le.useRef)(!1),ee=(0,Le.useRef)(!1),ke=(0,Le.useRef)(r),oe=(0,Le.useRef)(t),V=(0,Le.useRef)(n);(0,Le.useEffect)(()=>{ke.current=r},[r]),(0,Le.useEffect)(()=>{oe.current=t},[t]),(0,Le.useEffect)(()=>{V.current=n},[n]),(0,Le.useEffect)(()=>{q.current=o},[o]),(0,Le.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let me=(0,Le.useCallback)(()=>M.current,[]),J=(0,Le.useCallback)(m=>{let R=E.current;return!R||m.length!==R.frequencyBinCount?!1:(R.getByteFrequencyData(m),!0)},[]),F=(0,Le.useCallback)(()=>E.current?.frequencyBinCount??0,[]),$=(0,Le.useRef)([]),N=(0,Le.useRef)(null),T=(0,Le.useRef)(!1),A=(0,Le.useRef)(0),K=(0,Le.useRef)(0),y=(0,Le.useCallback)(m=>{let R=E.current;if(!R)return 0;let G=$.current;G.push(m),G.length>kp&&G.shift();let Z=0;if(G.length>=12){let Ee=0;for(let Fe of G)Ee+=Fe;if(Ee/=G.length,Ee>1e-4){let Fe=0;for(let Ie of G)Fe+=(Ie-Ee)*(Ie-Ee);Z=Math.min(1,Math.sqrt(Fe/G.length)/Ee/.6)}}let j=0;(!N.current||N.current.length!==R.frequencyBinCount)&&(N.current=new Uint8Array(R.frequencyBinCount));let ie=N.current;R.getByteFrequencyData(ie);let ue=(b.current?.sampleRate??48e3)/2/ie.length,_=Math.floor(300/ue),re=Math.min(ie.length-1,Math.ceil(3400/ue)),Se=0,De=0;for(let Ee=0;Ee<ie.length;Ee++)De+=ie[Ee],Ee>=_&&Ee<=re&&(Se+=ie[Ee]);De>0&&(j=Se/De);let ye=Math.min(1,m/(w.current+No*3));return gp*ye+xp*Z+vp*j},[]),z=(0,Le.useCallback)(()=>{let m=S.current.trim();if(S.current="",O.current=v.current,p(""),l(!1),m){P.current=!1;let R=f.current;f.current=null;try{R?.stop()}catch{}ke.current(m)}},[]),k=(0,Le.useCallback)(()=>{let m=E.current,R=L.current;if(!m||!R)return;m.getByteTimeDomainData(R);let G=0;for(let _=0;_<R.length;_++){let re=(R[_]-128)/128;G+=re*re}let Z=Math.sqrt(G/R.length),j=Math.min(1,Z*4);M.current+=(j-M.current)*(j>M.current?.6:.12);let ie=Date.now(),ve=q.current?Yi()*up:0;Z>w.current+No+ve?(D.current=ie,H.current||(H.current=ie)):(H.current=0,w.current=Math.min(w.current*1.02+2e-5,Math.max(.004,Z))),q.current?T.current?(y(Z)>Qi?K.current+=1:K.current=Math.max(0,K.current-2),K.current>=fp?(T.current=!1,K.current=0,Dn(1,0),V.current?.()):ie-A.current>bp&&(T.current=!1,K.current=0,Dn(1,Xi*2))):H.current&&ie-H.current>dp&&y(Z)>Qi&&(H.current=0,T.current=!0,A.current=ie,K.current=0,Dn(mp,Xi)):S.current.trim()&&ie-D.current>a&&z(),x.current=requestAnimationFrame(k)},[z,a,y]),pe=(0,Le.useCallback)(()=>{if(f.current||!I.current)return;let m=window.SpeechRecognition||window.webkitSpeechRecognition,R=new m;O.current=0,v.current=0,R.lang=e||document.documentElement.lang||navigator.language||"en-US",R.interimResults=!0,R.maxAlternatives=1,R.continuous=!0,R.onresult=G=>{let Z="";for(let j=O.current;j<G.results.length;j++)Z+=G.results[j][0].transcript;v.current=G.results.length,Z=Z.trim(),Z&&(S.current=Z,p(Z),l(!0))},R.onerror=G=>{let Z=G?.error||"";Z==="no-speech"||Z==="aborted"||oe.current?.(Z)},R.onend=()=>{f.current=null,I.current&&P.current&&setTimeout(()=>{pe()},120)},f.current=R;try{R.start()}catch{f.current=null,oe.current?.("failed-to-start")}},[e]),se=(0,Le.useCallback)(()=>{P.current=!1;let m=f.current;f.current=null;try{m?.stop()}catch{}},[]),U=(0,Le.useCallback)(()=>{I.current=!1,T.current=!1,K.current=0,$.current=[],Dn(1,0),P.current=!1,c(!1),l(!1),p(""),S.current="",M.current=0;let m=f.current;f.current=null;try{m?.abort()}catch{}x.current!==null&&(cancelAnimationFrame(x.current),x.current=null),C.current?.getTracks().forEach(R=>R.stop()),C.current=null,E.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),le=(0,Le.useCallback)(async()=>{if(!(I.current||!d)){I.current=!0,c(!0);try{let m=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});C.current=m;let R=window.AudioContext||window.webkitAudioContext,G=new R;b.current=G;let Z=G.createAnalyser();Z.fftSize=1024,Z.smoothingTimeConstant=.25,G.createMediaStreamSource(m).connect(Z),E.current=Z,L.current=new Uint8Array(Z.fftSize),w.current=.008,D.current=Date.now(),x.current=requestAnimationFrame(k)}catch(m){I.current=!1,c(!1),oe.current?.(m?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}P.current=!0,pe()}},[d,k,pe]);return(0,Le.useEffect)(()=>{i&&(o?(S.current="",p(""),T.current=!1,K.current=0,$.current=[],se()):(T.current=!1,D.current=Date.now(),P.current=!0,pe()))},[o,i,pe,se]),(0,Le.useEffect)(()=>{if(!i||o)return;let m=setInterval(()=>{let R=!!f.current,G=M.current>w.current+No;R&&G&&S.current},2e3);return()=>clearInterval(m)},[i,o]),(0,Le.useEffect)(()=>()=>{U()},[U]),{supported:d,active:i,hearing:s,interim:h,micLevel:me,micSpectrum:J,spectrumBins:F,start:le,stop:U}}var ne=require("react");var Zi=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],ec=[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],Io=e=>e<0?0:e>88?88:e,tc=e=>e<-32768?-32768:e>32767?32767:e,Hn=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=ec[i],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=s>>3;l>=s&&(h|=4,l-=s,p+=s),s>>=1,l>=s&&(h|=2,l-=s,p+=s),s>>=1,l>=s&&(h|=1,p+=s),a=tc(h&8?a-p:a+p),i=Io(i+Zi[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=i,n.buffer}};function rc(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=Io(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=ec[n],l=s>>3;c&4&&(l+=s),c&2&&(l+=s>>1),c&1&&(l+=s>>2),t=tc(c&8?t-l:t+l),n=Io(n+Zi[c]),o[i]=t/32768}return o}function Nr(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function nc(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);Nr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Nr(i,8,"WAVE"),Nr(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),Nr(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 ac(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);Nr(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Nr(i,8,"WAVE"),Nr(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),Nr(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 un=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 oc(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let i=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){i=c;break}if(i<0&&a==="user"){let c=n.map(s=>s.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}i>=0?n[i].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Ao=16e3,Ca=24e3,yp=.08,wp=.12,Cp=.03,Sp=.08;var Mp=.12,Tp=500,Rp=6e4,Lp=`
2
+ "use strict";var Th=Object.create;var la=Object.defineProperty;var Rh=Object.getOwnPropertyDescriptor;var Lh=Object.getOwnPropertyNames;var Eh=Object.getPrototypeOf,zh=Object.prototype.hasOwnProperty;var Nh=(e,r)=>{for(var t in r)la(e,t,{get:r[t],enumerable:!0})},Ls=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of Lh(r))!zh.call(e,a)&&a!==t&&la(e,a,{get:()=>r[a],enumerable:!(n=Rh(r,a))||n.enumerable});return e};var Xt=(e,r,t)=>(t=e!=null?Th(Eh(e)):{},Ls(r||!e||!e.__esModule?la(t,"default",{value:e,enumerable:!0}):t,e)),Ih=e=>Ls(la({},"__esModule",{value:!0}),e);var Ud={};Nh(Ud,{KikuButton:()=>ul,SearchBar:()=>As});module.exports=Ih(Ud);var vr=require("react"),nn=require("@akropolys/sdk");var Es=require("@akropolys/sdk");function ar(e,r){return e.details??(e.fields?(0,Es.resolveDisplayFields)(e.fields,r).details:[])}function so(e){return e.length?` (${e.map(r=>`${r.label}: ${r.value}`).join(", ")})`:""}function zs(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=zs(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Ns(){for(var e,r,t=0,n="",a=arguments.length;t<a;t++)(e=arguments[t])&&(r=zs(e))&&(n&&(n+=" "),n+=r);return n}function le(...e){return Ns(e)}var We=require("react/jsx-runtime"),Is=()=>(0,We.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,We.jsx)("circle",{cx:"8.5",cy:"8.5",r:"5.5"}),(0,We.jsx)("line",{x1:"13",y1:"13",x2:"18",y2:"18"})]});function As({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,p]=(0,vr.useState)(""),[d,u]=(0,vr.useState)(!1),{results:f,loading:w,search:b,clear:E}=(0,nn.useSearch)({debounceMs:t}),x=(0,nn.useAkropolysContext)(),L=(0,nn.useCardFields)(),M=(0,vr.useRef)(null),C=(0,vr.useRef)(!1);(0,vr.useEffect)(()=>{if(C.current){C.current=!1;return}if(!h.trim()){E(),u(!1);return}u(!0),b(h,r)},[h]),(0,vr.useEffect)(()=>{let v=I=>{M.current&&!M.current.contains(I.target)&&u(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);let F=v=>{h.trim()&&x.api.searchVector(h,1,void 0,!0).catch(()=>{}),C.current=!0,u(!1),p(v.entity.title??v.entity.name??""),n?.(v)},D=()=>{h.trim()&&(f.length>0?F(f[0]):x.api.searchVector(h,1,void 0,!0).catch(()=>{}))},S=d&&h.trim().length>0,O={...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,We.jsxs)("div",{className:le("hsk-sb-wrap",l.root,a),ref:M,style:O,children:[(0,We.jsx)("span",{className:"hsk-sb-icon",children:(0,We.jsx)(Is,{})}),(0,We.jsx)("input",{className:le("hsk-sb-input",l.input,o),type:"text",value:h,placeholder:e,onChange:v=>p(v.target.value),onFocus:()=>f.length>0&&h.trim()&&u(!0),onKeyDown:v=>{v.key==="Enter"&&D()},autoComplete:"off",spellCheck:!1}),S&&(0,We.jsxs)("div",{className:le("hsk-sb-drop",l.dropdown,i),style:{position:"absolute"},children:[w&&(0,We.jsx)("div",{className:"hsk-sb-loading-bar"}),w&&f.length===0?(0,We.jsxs)(We.Fragment,{children:[(0,We.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,We.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-skeleton-text1"}),(0,We.jsx)("div",{className:"hsk-sb-skeleton-text2"})]})]}),(0,We.jsxs)("div",{className:"hsk-sb-skeleton-row",children:[(0,We.jsx)("span",{className:"hsk-sb-skeleton-icon"}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-skeleton-text1",style:{width:"45%"}}),(0,We.jsx)("div",{className:"hsk-sb-skeleton-text2",style:{width:"25%"}})]})]})]}):(0,We.jsxs)(We.Fragment,{children:[f.length===0&&!w&&(0,We.jsxs)("div",{className:"hsk-sb-empty",children:["No results for \u201C",h,"\u201D"]}),f.map((v,I)=>{if(c)return(0,We.jsx)("div",{onClick:()=>F(v),className:"hsk-sb-fade",style:{animationDelay:`${I*18}ms`},children:c(v)},v.id);let $=v.entity.image??v.entity.thumbnail??v.entity.images?.[0];return(0,We.jsxs)("div",{className:le("hsk-sb-row hsk-sb-fade",l.row),style:{animationDelay:`${I*18}ms`},onClick:()=>F(v),children:[(0,We.jsx)("span",{className:"hsk-sb-row-thumb",children:$?(0,We.jsx)("img",{src:$,alt:"",loading:"lazy",onError:P=>{P.currentTarget.style.display="none"}}):(0,We.jsx)(Is,{})}),(0,We.jsxs)("div",{className:"hsk-sb-row-body",children:[(0,We.jsx)("div",{className:"hsk-sb-row-title",children:v.entity.title??v.entity.name}),ar({fields:v.entity.fields??v.entity},L)[0]&&(0,We.jsx)("div",{className:"hsk-sb-row-sub",children:ar({fields:v.entity.fields??v.entity},L)[0].value})]})]},v.id)})]})]})]})}var jt=require("react"),pl=require("react-dom");var Ps="hsk-sounds",Ve=null,dr=null;function ha(){try{return localStorage.getItem(Ps)!=="off"}catch{return!0}}function _s(e){try{localStorage.setItem(Ps,e?"on":"off")}catch{}e&&Er()}function Er(){if(typeof window>"u")return;try{let r=navigator.audioSession;r&&r.type!=="playback"&&(r.type="playback")}catch{}if(Ve){Ve.state==="suspended"&&Ve.resume().catch(()=>{});return}let e=window.AudioContext||window.webkitAudioContext;if(e)try{Ve=new e({latencyHint:"interactive"}),dr=Ve.createGain(),dr.gain.value=.28,dr.connect(Ve.destination);let r=Ve.createBuffer(1,1,Ve.sampleRate),t=Ve.createBufferSource();t.buffer=r,t.connect(Ve.destination),t.start(0),Ve.resume().catch(()=>{})}catch{Ve=null}}function pr(e,r,t,n,a){if(!Ve||!dr)return;let o=Ve.createOscillator();o.type="sine",o.frequency.setValueAtTime(r,e),o.frequency.exponentialRampToValueAtTime(Math.max(40,r*t),e+n);let i=Ve.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=Ve.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(dr),o.start(e),o.stop(e+n+.02)}function Fs(e,r){if(!Ve||!dr)return;let t=Math.floor(Ve.sampleRate*.03),n=Ve.createBuffer(1,t,Ve.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=Ve.createBufferSource();o.buffer=n;let i=Ve.createBiquadFilter();i.type="bandpass",i.frequency.value=2600,i.Q.value=5;let c=Ve.createGain();c.gain.value=r,o.connect(i),i.connect(c),c.connect(dr),o.start(e)}function Ds(){return ha()?Ve?Ve.state:"unsupported":"off"}function Ah(e){!Ve||!dr||(pr(e,587.33,.985,.16,.38),pr(e+.048,739.99,.985,.18,.42),pr(e+.096,880,.985,.28,.46),pr(e+.105,1174.66,.985,.22,.22),Fs(e+.096,.16))}function Ph(e){!Ve||!dr||pr(e,659.25,.97,.09,.26)}function or(e,r=!1){if(!r&&!ha()||(Er(),!Ve||!dr||Ve.state==="closed"))return;Ve.state==="suspended"&&Ve.resume().catch(()=>{});let t=Ve.currentTime+.01;switch(e){case"connect":Ah(t);break;case"heard":Ph(t);break;case"reply":pr(t,440,.94,.13,.5),pr(t+.09,660,.94,.16,.42);break;case"interrupt":pr(t,520,.62,.17,.4);break;case"send":pr(t,300,1.16,.1,.22);break;case"pin":Fs(t,.35),pr(t+.02,880,.97,.07,.22);break}}var io='@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;}@property --hsk-selection-bg{syntax: "<color>"; inherits: true; initial-value: #ff6a33;}@property --hsk-selection-text{syntax: "<color>"; inherits: true; initial-value: #ffffff;}[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),--hsk-selection-bg .36s cubic-bezier(.4,0,.2,1),--hsk-selection-text .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-selection-bg .45s cubic-bezier(.16,1,.3,1),--hsk-selection-text .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-cb-overlay::selection,.hsk-cb-overlay *::selection,.hsk-cb-btn::selection,.hsk-cb-btn *::selection,.hsk-sb-wrap::selection,.hsk-sb-wrap *::selection{background:var(--hsk-selection-bg, #ff6a33);color:var(--hsk-selection-text, #ffffff)}.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) backwards}@keyframes hsk-input-dock{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}.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)}.hsk-cb-main{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}@keyframes hsk-panel-in{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.hsk-cb-topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:8px;align-items:end;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-identity{height:34px;margin-top:-10px;display:flex;align-items:center;justify-content:center}.hsk-cb-topbar-name{margin-top:0;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-scrim.is-discovery{--hsk-discovery-edge: calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px));--hsk-discovery-mask: linear-gradient(to bottom, #000 calc(var(--hsk-discovery-edge) + 24px), rgba(0, 0, 0, .84) calc(var(--hsk-discovery-edge) + 100px), rgba(0, 0, 0, .4) calc(var(--hsk-discovery-edge) + 190px), transparent calc(var(--hsk-discovery-edge) + 320px));-webkit-mask-image:var(--hsk-discovery-mask);mask-image:var(--hsk-discovery-mask);animation-duration:.4s}.hsk-cb-theme-discovery{position:absolute;z-index:1001;inset-inline-start:calc(100% + 18px);bottom:52px;width:150px;color:var(--hsk-chat-text);text-align:center;pointer-events:none;animation:hsk-theme-discovery-in .36s ease .28s both}.hsk-cb-theme-discovery svg{display:block;width:104px;height:72px;margin:0 auto 4px;transform:rotate(-90deg)}.hsk-cb-theme-discovery path{stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));animation:hsk-theme-arrow-draw 1s cubic-bezier(.22,.61,.36,1) .3s both}.hsk-cb-theme-discovery span{display:inline-block;padding:6px 13px;border-radius:999px;background:color-mix(in srgb,var(--hsk-primary) 9%,transparent);font-family:var(--hsk-font);font-size:13px;font-style:italic;font-weight:550;line-height:1.5;overflow-wrap:anywhere;transform:rotate(-2deg);animation:hsk-theme-hint-hop .65s cubic-bezier(.22,.61,.36,1) .85s both}.hsk-cb-theme-discovery.is-mobile{top:calc(var(--hsk-tray-top, 40px) + var(--hsk-tray-h, 160px) + 10px);bottom:auto;left:50%;right:auto;width:min(260px,calc(100vw - 48px));transform:translate(-50%)}.hsk-cb-theme-discovery.is-mobile svg{position:relative;left:50%;width:min(calc(100vw - 24px),366px);height:calc(var(--hsk-tray-h, 160px) + 98px);margin-top:calc(-1 * var(--hsk-tray-h, 160px) - 28px);transform:translate(-50%)}.hsk-cb-panel[dir=rtl] .hsk-cb-theme-discovery:not(.is-mobile) svg{transform:rotate(90deg) scaleX(-1)}.hsk-cb-kiku-id-rail.is-theme-open .hsk-cb-dock-frost{opacity:1;transition-duration:.4s}.hsk-cb-theme-discovery.is-closing{animation:hsk-scrim-out .18s ease both}@keyframes hsk-theme-discovery-in{0%{opacity:0;translate:0 -4px}to{opacity:.8;translate:0 0}}@keyframes hsk-theme-arrow-draw{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@keyframes hsk-theme-hint-hop{0%{transform:translateY(4px) rotate(-4deg) scale(.96)}42%{transform:translateY(-3px) rotate(1deg) scale(1.025)}72%{transform:translateY(1px) rotate(-3deg) scale(.995)}to{transform:translateY(0) rotate(-2deg) scale(1)}}.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{content:"";position:absolute;inset-inline-end:-13px;top:15px;width:9px;height:13px;background:var(--hsk-primary);clip-path:polygon(50% 0,64% 35%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 35%);pointer-events:none;animation:hsk-theme-twinkle 1.6s ease .8s 2 both}.hsk-cb-topbar-mark.is-discovering:after{inset-inline-end:auto;inset-inline-start:-10px;top:35px;width:6px;height:9px;animation-delay:1.2s}@keyframes hsk-theme-twinkle{0%,to{opacity:0;transform:rotate(-12deg) scale(.4)}40%{opacity:.85;transform:rotate(9deg) scale(1)}}@media(prefers-reduced-motion:reduce){.hsk-cb-theme-discovery,.hsk-cb-theme-discovery path,.hsk-cb-theme-discovery span,.hsk-cb-topbar-mark.is-discovering:before,.hsk-cb-topbar-mark.is-discovering:after{animation:none}}.hsk-cb-layout-discovery-note{display:flex;align-items:center;gap:10px;width:fit-content;max-width:min(100%,380px);margin:0 0 20px;margin-inline-start:auto;padding:8px 14px 8px 10px;border:0;border-radius:18px;background:color-mix(in srgb,var(--hsk-primary) 6%,transparent);color:var(--hsk-chat-muted);font:500 12px/1.5 var(--hsk-font);text-align:start;cursor:pointer;animation:hsk-msg-in .3s ease both}.hsk-cb-layout-discovery-note svg{width:34px;height:40px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 62%,var(--hsk-chat-text));transform:scaleX(-1)}.hsk-cb-layout-discovery-note path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}.hsk-cb-layout-discovery-note:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note svg{transform:none}.hsk-cb-layout-toggle.is-discovery{position:relative}.hsk-cb-layout-toggle.is-discovery:after{content:"";position:absolute;inset:-3px;border-radius:inherit;pointer-events:none;box-shadow:0 0 0 4px color-mix(in srgb,var(--hsk-primary) 14%,transparent),0 0 12px color-mix(in srgb,var(--hsk-primary) 18%,transparent);animation:hsk-layout-discovery-pulse 1.2s ease .2s 2 both}@keyframes hsk-layout-discovery-pulse{0%,to{opacity:0;transform:scale(.98)}45%{opacity:1;transform:scale(1.02)}}.hsk-cb-layout-dock-anchor{position:relative;width:fit-content}.hsk-cb-layout-discovery-note--dock{display:none}@media(min-width:1200px){.hsk-cb-layout-discovery-note--reply{display:none}.hsk-cb-layout-discovery-note--dock{display:flex;position:absolute;inset-inline-start:calc(100% + 12px);top:50%;transform:translateY(-50%);width:230px;max-width:none;margin:0;padding:6px 10px;background:var(--hsk-chat-bg);animation:none}.hsk-cb-layout-discovery-note--dock svg{transform:rotate(-90deg)}.hsk-cb-panel[dir=rtl] .hsk-cb-layout-discovery-note--dock svg{transform:rotate(90deg)}}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-discovery-note,.hsk-cb-layout-discovery-note path,.hsk-cb-layout-toggle.is-discovery:after{animation:none}}.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{min-width:0;max-width:100%;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{position:relative;display:inline-flex;align-items:center;min-width:0;max-width:100%;white-space:nowrap;flex:0 1 auto;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.is-compact{width:34px;padding:0;flex:none;justify-content:center}.hsk-cb-clear-measure{position:absolute;visibility:hidden;pointer-events:none;white-space:nowrap;font-size:12px}.hsk-cb-topbar-btn-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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[data-hsk-tapback-active]{background:var(--hsk-chat-bg, #fff);--hsk-viewport-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) min(6px, 2%), rgba(0, 0, 0, .16) min(16px, 5%), rgba(0, 0, 0, .5) min(32px, 10%), rgba(0, 0, 0, .84) min(48px, 15%), rgba(0, 0, 0, .97) min(58px, 18%), #000 min(64px, 20%), #000 calc(100% - min(64px, 20%)) , rgba(0, 0, 0, .97) calc(100% - min(58px, 18%)) , rgba(0, 0, 0, .84) calc(100% - min(48px, 15%)) , rgba(0, 0, 0, .5) calc(100% - min(32px, 10%)) , rgba(0, 0, 0, .16) calc(100% - min(16px, 5%)) , rgba(0, 0, 0, .03) calc(100% - min(6px, 2%)) , transparent);--hsk-viewport-sides: linear-gradient(to right, transparent, rgba(0, 0, 0, .03) min(4px, 1%), rgba(0, 0, 0, .16) min(12px, 3%), rgba(0, 0, 0, .5) min(24px, 6%), rgba(0, 0, 0, .84) min(36px, 9%), rgba(0, 0, 0, .97) min(44px, 11%), #000 min(48px, 12%), #000 calc(100% - min(48px, 12%)) , rgba(0, 0, 0, .97) calc(100% - min(44px, 11%)) , rgba(0, 0, 0, .84) calc(100% - min(36px, 9%)) , rgba(0, 0, 0, .5) calc(100% - min(24px, 6%)) , rgba(0, 0, 0, .16) calc(100% - min(12px, 3%)) , rgba(0, 0, 0, .03) calc(100% - min(4px, 1%)) , transparent);-webkit-mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);mask-image:var(--hsk-viewport-sides),var(--hsk-viewport-feather);-webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.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>.hsk-cb-check{scale:.94;translate:0 1px;box-shadow:none}.hsk-cb-check{display:inline-grid;place-items:center;width:22px;height:22px;flex-shrink:0;border-radius:8px;border:1.5px solid color-mix(in srgb,var(--hsk-chat-text, #111) 20%,transparent);background:color-mix(in srgb,var(--hsk-chat-text, #111) 4%,transparent);box-shadow:0 2px color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-sizing:border-box;transition:background-color .22s ease,border-color .22s ease,box-shadow .16s ease,scale .16s ease,translate .16s 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}@media(hover:hover){.hsk-cb-entlang-opt:not(.is-selected):hover>.hsk-cb-check{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,transparent)}}.hsk-cb-entlang-opt:focus-visible{outline:2px solid var(--hsk-primary, #ff6a33)!important;outline-offset:-2px}@keyframes hsk-cb-check-press{0%{transform:scale(1)}35%{transform:scale(.9)}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,.hsk-cb-check path{transition:none}.hsk-cb-entlang-opt:active>.hsk-cb-check{scale:none;translate: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));transform:translate(calc(10px + var(--hsk-tl-d) * 7px));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(10px + 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(10px + var(--hsk-tl-d) * 7px - 2px))}.hsk-cb-tl-item:hover .hsk-cb-tl-dot{transform:translate(calc(10px + var(--hsk-tl-d) * 7px - 2px)) 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[data-tools-open=true]{z-index:20!important}.hsk-cb-input-wrap:after{display:none!important}.hsk-cb-input-card{position:relative;z-index:1001;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}@media(max-width:640px){.hsk-cb-tools-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;border:none;background:var(--hsk-surface-1, rgba(0,0,0,.06));color:var(--hsk-chat-muted, #5f6368);cursor:pointer;flex-shrink:0;transition:background .16s,color .16s,transform .22s cubic-bezier(.34,1.56,.64,1)}.hsk-cb-tools-toggle:active{transform:scale(.91)}.hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary, #ff6a33) 14%,transparent);color:var(--hsk-primary, #ff6a33);transform:rotate(45deg)}[data-hsk-theme] .hsk-cb-tools-toggle{background:var(--hsk-surface-1)!important;color:var(--hsk-chat-muted)!important}[data-hsk-theme] .hsk-cb-tools-toggle--open{background:color-mix(in srgb,var(--hsk-primary) 14%,transparent)!important;color:var(--hsk-primary)!important}.hsk-cb-input-box{grid-template-columns:auto 1fr auto}.hsk-cb-input-box>.hsk-cb-tools-toggle{grid-column:1;grid-row:1;display:inline-flex}.hsk-cb-input-box>.hsk-cb-field{grid-column:2;grid-row:1}.hsk-cb-input-box>.hsk-cb-send,.hsk-cb-input-box>.hsk-chat-send{grid-column:3;grid-row:1}.hsk-cb-input-box>.hsk-cb-attach-btn,.hsk-cb-input-box>.hsk-cb-voice-mode-btn{display:none!important}.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-tools-toggle,.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-toolsheet-wrap{position:absolute;bottom:calc(100% - 6px);inset-inline-start:var(--hsk-composer-pad-x, 14px);inset-inline-end:auto;z-index:1000;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: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 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-input-wrap[data-tools-open=true] .hsk-cb-tools-toggle{position:relative;z-index:1002}.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:1002;display:inline-flex;flex-wrap:nowrap;white-space:nowrap;align-items:center;gap:8px;width:fit-content;max-width:calc(100% - 24px);margin-bottom:-11px;margin-inline-start:14px;padding:3px 4px 3px 12px;border-radius:999px;background:var(--hsk-chat-ai-bg, #eeeef0);color:var(--hsk-chat-text, #111827);box-shadow:0 0 0 3px var(--hsk-chat-bg, #ffffff);font:600 12px/24px 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:24px;padding:0 11px;border:none;border-radius:999px;background:#80808029;color:inherit;font:600 12px var(--hsk-font);cursor:pointer;transition:opacity .15s}.hsk-cb-leave-btn:hover{opacity:.88}.hsk-cb-leave-btn--end{background:var(--hsk-primary, #ff6a33);color:#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:0;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-cb-msg-group[data-hsk-tapback-focus]{position:relative;z-index:2;pointer-events:none}.hsk-tapback-frost{z-index:1;position:absolute;left:0;right:0;pointer-events:none;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 24%,transparent);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);-webkit-mask-image:var(--hsk-tapback-feather);mask-image:var(--hsk-tapback-feather);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;animation:hsk-scrim-in .2s cubic-bezier(.16,1,.3,1) both}.hsk-tapback-frost.is-upper{--hsk-tapback-feather: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-lower{--hsk-tapback-feather: linear-gradient(to top, transparent, rgba(0, 0, 0, .03) 6px, rgba(0, 0, 0, .16) 16px, rgba(0, 0, 0, .5) 32px, rgba(0, 0, 0, .84) 48px, rgba(0, 0, 0, .97) 58px, #000 64px)}.hsk-tapback-frost.is-closing{animation:hsk-scrim-out .19s cubic-bezier(.4,0,1,1) both}@media(prefers-reduced-motion:reduce){.hsk-tapback-overlay *,.hsk-tapback-overlay.is-closing *,.hsk-tapback-frost,.hsk-tapback-frost.is-closing{animation:none!important;transition:none!important}}.hsk-tapback-group{position:absolute;z-index:1002;outline:none;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:100%;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{min-width:0;flex:1 1 auto;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 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hsk-tapback-tool-btn svg{flex-shrink:0}.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}.hsk-tapback-group.is-docked .hsk-tapback-tail{display:none}@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-text, #111) 12%,transparent);cursor:pointer;transition:color .2s ease,background-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}@media(hover:hover){.hsk-cb-sound-pill:hover{background:color-mix(in srgb,var(--hsk-chat-text, #111) 7%,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-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-gallery-cover:focus-visible{outline:2px solid var(--hsk-primary,#ff6a33);outline-offset:3px}.hsk-cb-layout-toggle{gap:7px;height:32px;min-height:32px;padding:0 10px 0 5px;box-sizing:border-box}.hsk-cb-layout-toggle:focus-visible{outline:2px solid var(--hsk-primary, #007aff);outline-offset:3px}.hsk-cb-layout-track{display:block;position:relative;width:32px;height:20px;border-radius:20px;background:var(--hsk-chat-ai-bg, #ddd);transition:background-color .32s ease}.hsk-cb-layout-thumb{position:absolute;inset-block-start:3px;inset-inline-start:3px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#fff;color:#454545;box-shadow:0 1px 4px #0003;transition:inset-inline-start .38s cubic-bezier(.22,1,.36,1),scale .18s ease}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-primary, #007aff)}.hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{inset-inline-start:15px}.hsk-cb-layout-toggle:active .hsk-cb-layout-thumb{scale:1.12 .92}.hsk-cb-speaker-label{display:none}[data-hsk-layout=wide] .hsk-cb-speaker-label{display:block;margin-block:12px 6px;font-size:11px;font-weight:650;color:var(--hsk-chat-muted, #71717a)}[data-hsk-layout=wide] .hsk-cb-ai-text{width:100%!important;max-width:100%;box-sizing:border-box;padding:0;border-radius:0;background:transparent;box-shadow:none;border:0;color:var(--hsk-chat-text, #111827);line-height:1.65}[data-hsk-layout=wide] .hsk-cb-ai-text:before,[data-hsk-layout=wide] .hsk-cb-ai-text:after{display:none}[data-hsk-layout=wide] .hsk-cb-ai-content{gap:12px}@media(prefers-reduced-motion:reduce){.hsk-cb-layout-track,.hsk-cb-layout-thumb{transition:none}}.hsk-cb-dock-layout{display:flex;justify-content:flex-end;padding:10px 0 2px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:40px}[data-hsk-theme][data-hsk-layout=wide] .hsk-cb-ai-text{background:transparent!important;color:var(--hsk-chat-text, #111827)!important}.hsk-cb-rail-pair{display:flex;align-items:center;gap:8px}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:6px}[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:var(--hsk-grid-bg)!important;color:var(--hsk-chat-muted)!important;border:none!important;box-shadow:none!important}[data-hsk-layout=wide] .hsk-cb-think+.hsk-cb-ai-content>.hsk-cb-ai-text:first-child{padding-top:0;margin-top:0}[data-hsk-layout=wide] .hsk-cb-think{margin-bottom:4px}.hsk-tapback-group.is-wide .hsk-tapback-tail{display:none}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{background:transparent!important;border:none!important;box-shadow:none!important;color:var(--hsk-chat-text)!important}.hsk-cb-layout-track{background:color-mix(in srgb,currentColor 12%,transparent)}.hsk-cb-dock-layout{padding-top:4px}.hsk-cb-dock-layout .hsk-cb-layout-toggle{min-height:32px}.hsk-cb-dock-layout{align-items:center;justify-content:space-between;gap:12px}.hsk-cb-layout-label{padding-inline-start:12px;font-size:11px;font-weight:500;color:var(--hsk-chat-muted);opacity:.75}.hsk-cb-layout-label{text-transform:uppercase;letter-spacing:.07em}[data-hsk-theme] .hsk-cb-layout-toggle,[data-hsk-theme] .hsk-cb-dock-layout .hsk-cb-layout-toggle{padding:0 12px;background:var(--hsk-pill-bg)!important}.hsk-cb-layout-icon{display:inline-flex;align-items:center}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-primary)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{margin-inline:7px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{color:var(--hsk-chat-muted);opacity:.38;font-size:9px;font-weight:600;letter-spacing:.14em;padding-inline-start:0}.hsk-cb-layout-track{flex-shrink:0}[data-hsk-theme] .hsk-cb-layout-track{background:var(--hsk-grid-bg)}[data-hsk-theme] .hsk-cb-layout-thumb{background:var(--hsk-chat-bg);color:var(--hsk-chat-text)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-track{background:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true] .hsk-cb-layout-thumb{background:var(--hsk-on-active);color:var(--hsk-active-bg)}[data-hsk-theme] .hsk-cb-layout-toggle[aria-checked=true]{color:var(--hsk-chat-text)!important}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-block{display:grid;grid-template-columns:14px minmax(0,1fr);column-gap:8px;row-gap:4px}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-2x2-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))}.hsk-cb-topbar-ooze-menu .hsk-cb-theme-grid-item{width:100%;justify-content:center;min-width:0;padding-inline:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-dock-layout{grid-column:2;margin:0;padding:0 0 2px;gap:6px}.hsk-cb-topbar-ooze-menu .hsk-cb-layout-label{font-size:7px;letter-spacing:.06em}.hsk-cb-external-links{display:grid;justify-items:center;gap:11px;width:100%;margin:30px auto}.hsk-cb-external-card{display:flex;align-items:center;gap:13px;width:fit-content;max-width:100%;min-height:58px;padding:11px 18px;border-radius:999px;color:var(--hsk-chat-text);text-decoration:none;transition:color .2s ease,transform .2s cubic-bezier(.16,1,.3,1)}.hsk-cb-external-card:hover{transform:translateY(-1px)}.hsk-cb-external-card:active{transform:translateY(0) scale(.99)}.hsk-cb-external-card:focus-visible{outline:2px solid var(--hsk-primary);outline-offset:4px}.hsk-cb-external-brand{display:flex;align-items:center;gap:7px;flex-shrink:0;padding-inline-end:13px;border-inline-end:1px solid rgba(25,79,61,.12);color:#507365;font:500 11px/1.4 var(--hsk-font)}.hsk-cb-external-logo{display:grid;place-items:center;flex-shrink:0;width:24px;height:24px;color:var(--hsk-chat-muted);font:600 18px/1 var(--hsk-font)}.hsk-cb-external-logo img{width:24px;height:24px;object-fit:contain}.hsk-cb-external-identity{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 8px;min-width:0}.hsk-cb-external-identity strong{color:#155b40;font:600 13px/1.4 var(--hsk-font);overflow-wrap:anywhere}.hsk-cb-external-identity>span{font:400 10px/1.4 var(--hsk-font);color:var(--hsk-chat-muted);overflow-wrap:anywhere}.hsk-cb-external-amount{padding-inline-start:0;margin-inline-start:2px;font:500 14px/1.5 var(--hsk-font);font-variant-numeric:tabular-nums;white-space:nowrap}.hsk-cb-external-notice{display:flex;align-items:center;justify-content:center;gap:7px;color:var(--hsk-chat-muted);font:400 11px/1.5 var(--hsk-font)}.hsk-cb-external-notice svg{width:22px;height:26px;flex-shrink:0;color:color-mix(in srgb,var(--hsk-primary) 55%,var(--hsk-chat-muted))}.hsk-cb-external-notice path{stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:hsk-theme-arrow-draw .8s ease .2s both}@media(max-width:480px){.hsk-cb-external-card{gap:10px;padding:12px 15px}.hsk-cb-external-amount{font-size:13px}.hsk-cb-external-brand{padding-inline-end:10px}.hsk-cb-external-logo,.hsk-cb-external-logo img{width:23px;height:23px}}@media(prefers-reduced-motion:reduce){.hsk-cb-external-card{transition:none}.hsk-cb-external-card:hover,.hsk-cb-external-card:active{transform:none}.hsk-cb-external-notice path{animation: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;user-select:none}@keyframes hsk-lightbox-in{0%{opacity:0}to{opacity:1}}.hsk-lightbox-top{position:absolute;top:18px;left:20px;right:68px;display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-title{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--hsk-chat-text, #111);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:6px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 80%,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 2px 10px #0000000f}.hsk-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:100%;max-width:100%;max-height:100%;cursor:default}.hsk-lightbox-content{display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:min(92vw,1000px);max-height:calc(100vh - 120px);position:relative}.hsk-lightbox-img{max-width:100%;max-height:min(78vh,760px);width:auto;height:auto;object-fit:contain;border-radius:12px;box-shadow:0 24px 64px -16px #0000005c;cursor:default;transition:transform .18s ease-out}.hsk-lightbox-caption{margin-top:12px;font-size:13px;font-weight:500;line-height:1.4;color:var(--hsk-chat-text, #111);text-align:center;padding:5px 14px;border-radius:999px;background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 75%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 8%,transparent);box-shadow:0 2px 8px #0000000d}.hsk-lightbox-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 10%,transparent);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%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s ease;z-index:3;box-shadow:0 2px 8px #00000014}.hsk-lightbox-close:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:scale(1.05)}.hsk-lightbox-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:1px solid color-mix(in srgb,var(--hsk-chat-text, #111) 12%,transparent);background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 78%,transparent);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%);color:var(--hsk-chat-text, #111);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .16s ease;z-index:3;box-shadow:0 4px 16px #0000001f}.hsk-lightbox-nav:hover{background:color-mix(in srgb,var(--hsk-chat-bg, #fff) 95%,transparent);transform:translateY(-50%) scale(1.08);box-shadow:0 6px 20px #0000002e}.hsk-lightbox-nav:active{transform:translateY(-50%) scale(.96)}.hsk-lightbox-nav--prev{left:20px}.hsk-lightbox-nav--next{right:20px}.hsk-lightbox-bottom{position:absolute;bottom:22px;left:50%;transform:translate(-50%);display:flex;align-items:center;z-index:2;pointer-events:none}.hsk-lightbox-counter{padding:6px 16px;border-radius:999px;font-size:13px;font-weight:600;letter-spacing:.03em;color:var(--hsk-chat-text, #111);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 4px 14px #00000014}@media(max-width:600px){.hsk-lightbox-nav--prev{left:8px}.hsk-lightbox-nav--next{right:8px}.hsk-lightbox-content{max-width:100%}}.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)!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-layout-toggle,[data-hsk-theme] .hsk-cb-external-card,[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-external-card{background:#dbf8ebdb!important;color:#194f3d!important;border:1px solid rgba(41,136,96,.22)!important;border-top:1px solid rgba(255,255,255,.88)!important;box-shadow:0 8px 24px -10px #185c402e,0 1px #ffffff8c inset!important}[data-hsk-theme=light] .hsk-cb-external-card{background:linear-gradient(145deg,#ffffffe0,#ffffff2e 48%,#84dab338),#d2f4e461!important;border:1px solid rgba(58,133,101,.18)!important;border-top:1px solid rgba(255,255,255,.95)!important;box-shadow:0 7px 18px -8px #1c4d3938,0 2px 4px -2px #1c4d391f,inset 0 1px 2px #fffffff2,inset 0 -1px 1px #3c926c1a!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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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-selection-bg: #ec4899 !important;--hsk-selection-text: #ffffff !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-selection-bg: #a9714b !important;--hsk-selection-text: #ffffff !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-selection-bg: #ff6a33 !important;--hsk-selection-text: #ffffff !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}}';var Hs="akropolys-kiku-root",zr=null,an=null,Bs=!1;function $s(e){if(Bs)return;if(Bs=!0,typeof CSSStyleSheet<"u"&&"replaceSync"in CSSStyleSheet.prototype)try{let t=new CSSStyleSheet;t.replaceSync(io),e.adoptedStyleSheets=[t];return}catch{}let r=document.createElement("style");r.textContent=io,e.appendChild(r)}function co(){return typeof document>"u"?null:an?($s(an),an):(zr=document.getElementById(Hs),zr||(zr=document.createElement("div"),zr.id=Hs,zr.style.cssText="all: initial;",document.body.appendChild(zr)),an=zr.shadowRoot??zr.attachShadow({mode:"open"}),$s(an),an)}var dl=require("@akropolys/sdk");function pa(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,r["--hsk-selection-bg"]=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 lo=require("react"),Qt=new Map;function ho(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 po(e){let r=e.trim();return!r||/["'()\\\s]/.test(r)||/^(javascript|vbscript):/i.test(r)?null:r}var Os=e=>/["\\{}<>;\n\r]/.test(e)?"":e.trim(),Fh=/^[Uu]\+[0-9A-Fa-f?]{1,6}(-[0-9A-Fa-f]{1,6})?$/,qs=e=>{let r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length===0||!r.every(t=>Fh.test(t))?"":r.join(", ")},Ws=e=>/^\d{3}( \d{3})?$/.test(e)?e:"400";function Dh(e,r){(0,lo.useEffect)(()=>{if(!e||!r||typeof document>"u")return;let t=ho(e);if(Qt.set(e,(Qt.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=(Qt.get(e)??1)-1;if(n>0){Qt.set(e,n);return}Qt.delete(e),document.getElementById(t)?.remove()}},[e,r])}function Us(e){let r=Os(e.family);return r?e.faces.map(t=>{let n=po(t.url);return n?`@font-face{font-family:"${r}";font-style:normal;font-weight:${Ws(t.weight)};font-display:swap;src:url(${n}) format("woff2");`+(qs(t.unicodeRange)?`unicode-range:${qs(t.unicodeRange)};`:"")+"}":""}).join(""):""}function uo(e){let r=e?.faces??[],t=e&&r.length?Us(e):"";Dh(t?`script|${e.family}|${r.map(n=>n.url).join("|")}`:"",t)}async function Jt(e,r=0){if(typeof document>"u"||!("fonts"in document))return;let t=Us(e);if(!t)return;let n=`script|${e.family}|${e.faces.map(o=>o.url).join("|")}`;Qt.set(n,(Qt.get(n)??0)+1);let a=ho(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=po(l.url);if(!h)return Promise.resolve();try{return new window.FontFace(i,`url(${h})`,{weight:Ws(l.weight),style:"normal"}).load().then(d=>{document.fonts?.add(d)}).catch(()=>{})}catch{return Promise.resolve()}});await Promise.race([Promise.all(s),new Promise(l=>setTimeout(l,r))])}}var Vs=["400","500","600","700"];function js(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 mo(e,r){let t=typeof document<"u"?document.fonts:null,{text:n,stack:a}=js(e,r);if(!t?.check||!n||!a)return!0;try{return Vs.every(o=>t.check(`${o} 16px ${a}`,n))}catch{return!0}}async function bo(e,r,t){let n=typeof document<"u"?document.fonts:null;if(!n?.load)return;let{text:a,stack:o}=js(e,r);!a||!o||await Promise.race([Promise.all(Vs.map(i=>n.load(`${i} 16px ${o}`,a).catch(()=>{}))),new Promise(i=>setTimeout(i,t))])}function da(e){let r=typeof e=="object"&&e?e:void 0,t=Os(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,lo.useEffect)(()=>{if(!t||!a&&!o&&!i)return;let c=i?[["100 900",i]]:[["400",a],["700",o]],s=[];for(let[d,u]of c){if(!u)continue;let f=po(u);if(!f)continue;let w=_h(f);s.push(`@font-face{font-family:"${t}";font-style:normal;font-weight:${d};font-display:swap;src:url(${f})${w?` format("${w}")`:""};}`)}if(s.length===0)return;let l=s.join(""),h=`${t}|${a}|${o}|${i}`,p=ho(h,"hsk-host-font");if(Qt.set(h,(Qt.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=(Qt.get(h)??1)-1;if(d>0){Qt.set(h,d);return}Qt.delete(h),document.getElementById(p)?.remove()}},[t,a,o,i])}var Gs=new WeakMap,Ys=new WeakMap;function Ks(e){return e?Ys.get(e)??null:null}function fo(e){if(!e)return Promise.resolve(null);let r=Gs.get(e);if(r)return r;let t=Promise.resolve().then(()=>e.baseFont?.()??null).then(n=>(n&&(Ys.set(e,n),Jt(n,0).catch(()=>{})),n)).catch(()=>null);return Gs.set(e,t),t}function Xs(e,r,t){e&&(fo(e),r&&ko(e,r,t))}function ko(e,r,t){if(!(!e||!r))try{e.getUIStrings?.(r,t)?.then?.(n=>{n?.font&&Jt(n.font,1200).catch(()=>{})})?.catch?.(()=>{})}catch{}}var go=Xt(require("react")),En=[],ma=[{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}];function Ln(e,r){if(!e)return;let t=e.trim();if(!t)return;let n=t.toLowerCase(),a=ma.find(c=>c.value.toLowerCase()===n||c.native.toLowerCase()===n||c.tag===n);if(a)return a.native;if(ua[n]?.endonym)return ua[n].endonym;let o=Object.values(ua).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 Qs(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}var ua={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"}};function Js(e){let r=e.trim();return r?r.charAt(0).toUpperCase()+r.slice(1):"\u2026"}function $r(e){if(!e)return{nativeName:"\u2026",preparing:"Preparing\u2026",changeLang:"\u2190",rtl:!1,known:!0};let r=e.trim().toLowerCase(),t=Object.entries(ua).find(([i,c])=>i===r||c.endonym?.toLowerCase()===r||Ln(i)?.toLowerCase()===r);if(t)return{nativeName:t[1].endonym||Ln(e)||Js(e),preparing:t[1].preparing,changeLang:t[1].changeLang,rtl:!!t[1].rtl||Qs(t[1].preparing),known:!0};let n=Ln(e)||e,a=Js(n),o=Qs(a);return{nativeName:a,preparing:`Preparing in ${a}\u2026`,changeLang:o?"\u062A\u063A\u064A\u064A\u0631":"Change",rtl:o,known:!1}}var zn=[{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"}],xo="hsk-live-voice",Nr={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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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"},$t={themeHoldHint:"Long press for themes",themeClickHint:"Pick your mood",layoutDockNote:"Try {button} to change the reply layout.",layoutFirstReplyNote:"Open the dock and try {button} to change the reply layout.",externalOpensOutside:"This opens outside Kiku.",externalWatchVideo:"Watch video",externalCheckout:"Continue to checkout",externalOpenEmail:"Open email",externalOpenLink:"Open {destination}",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:"Chat messages aren't saved for analytics. Search-bar queries and usage counts help this website improve. If you ask to speak to its team, that support conversation is saved. 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:"Wait",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. It resets in 24 hours.",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"},vo=go.default.createContext((e,r)=>{let t=$t[e];if(r)for(let[n,a]of Object.entries(r))t=t.split(`{${n}}`).join(a);return t}),Zt=()=>go.default.useContext(vo);function ei(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 Zs={shopper_reply_limit:"errShopperReplyLimit",RATE_LIMIT_EXCEEDED:"errShopperReplyLimit",access_revoked:"errAccessRevoked",account_required:"errAccountRequired",stream_interrupted:"errStreamInterrupted"};var ti=(e,r)=>{let t=e&&typeof e=="object"?e.code:void 0;if(t&&Zs[t])return r(Zs[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")},ri=()=>typeof window>"u"||window.isSecureContext!==!1,yo=15;var ni="light",Hh=["light","dark","mahogany","blush","coffee","midnight"],ai=!1;function ba(e){return typeof e=="string"&&Hh.includes(e)}function oi(e){if(ba(e))return e;try{let r=typeof window<"u"?localStorage.getItem("akropolys_theme"):null;if(ba(r))return r}catch{}return ni}function wo(){if(ai)return!0;try{return localStorage.getItem("akropolys_themes_seen")==="true"||ba(localStorage.getItem("akropolys_theme"))}catch{return!1}}function si(){ai=!0;try{localStorage.setItem("akropolys_themes_seen","true")}catch{}}var X=Xt(require("react"));var U=require("react/jsx-runtime"),Bh=({className:e,size:r=18,tight:t=!1})=>(0,U.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,U.jsxs)("g",{transform:"translate(22.7 19) scale(0.62)",fill:"currentColor",fillRule:"evenodd",children:[(0,U.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,U.jsx)("circle",{cx:"55",cy:"82",r:"3.4"})]})}),yr=Bh,ii=()=>(0,U.jsxs)("svg",{className:"hsk-stop-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",children:[(0,U.jsx)("circle",{className:"hsk-stop-ring",cx:"12",cy:"12",r:"9.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,U.jsx)("rect",{className:"hsk-stop-core",x:"8.5",y:"8.5",width:"7",height:"7",rx:"1.8",fill:"currentColor"})]});var ci=()=>(0,U.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),(0,U.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,U.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),li=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"currentColor",children:(0,U.jsx)("path",{d:"M8 5v14l11-7z"})}),on=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,U.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),sn=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"m15 18-6-6 6-6"})}),cn=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"m9 18 6-6-6-6"})}),hi=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,U.jsx)("path",{d:"M3 3v5h5"}),(0,U.jsx)("path",{d:"M12 7v5l4 2"})]}),fa=()=>(0,U.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.jsx)("path",{d:"M19 21 12 16l-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"})}),ka=()=>(0,U.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M3 6h18"}),(0,U.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"})]});var pi=()=>(0,U.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:(0,U.jsx)("path",{d:"M12 5v14M5 12h14"})}),di=({size:e=18}={})=>(0,U.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.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,U.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,U.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.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"})}),ui=()=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"4"}),(0,U.jsx)("circle",{className:"hsk-img-sun",cx:"9",cy:"9",r:"1.8"}),(0,U.jsx)("path",{className:"hsk-img-ridge",d:"m21 15-4.5-4.5L6 21"})]}),Nn=({className:e,size:r=13}={})=>(0,U.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,U.jsx)("path",{className:"hsk-retry-arrow",d:"M21.5 2v6h-6"}),(0,U.jsx)("path",{className:"hsk-retry-arc",d:"M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.19"})]}),ga=({className:e,size:r=13}={})=>(0,U.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,U.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,U.jsx)("path",{className:"hsk-edit-lead",d:"m15 5 4 4"})]}),qr=({className:e,size:r=13}={})=>(0,U.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,U.jsx)("rect",{className:"hsk-copy-sheet",x:"8.5",y:"7",width:"12",height:"14",rx:"3.5"}),(0,U.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"})]}),Or=({className:e,size:r=13}={})=>(0,U.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,U.jsx)("polyline",{className:"hsk-check-mark",points:"20 6 9 17 4 12"})}),In=({className:e,size:r=18}={})=>(0,U.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,U.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,U.jsx)("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),(0,U.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),mi=()=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{className:"hsk-mic-slash",x1:"2",y1:"2",x2:"22",y2:"22"}),(0,U.jsx)("path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"}),(0,U.jsx)("path",{d:"M5 10v2a7 7 0 0 0 12 5"}),(0,U.jsx)("path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33"}),(0,U.jsx)("path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12"}),(0,U.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22"})]}),So=({active:e})=>(0,U.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.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,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":1,"--hsk-amp":1.78,"--hsk-period":"0.94s"},d:"M6 8v8"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":2,"--hsk-amp":1.26,"--hsk-period":"1.42s"},d:"M10 4v16"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":3,"--hsk-amp":1.62,"--hsk-period":"1.08s"},d:"M14 7v10"}),(0,U.jsx)("path",{className:"hsk-wave-bar",style:{"--hsk-bar":4,"--hsk-amp":2.05,"--hsk-period":"0.86s"},d:"M18 9v6"}),(0,U.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"})]}),bi=()=>(0,U.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,U.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--far",points:"22 2 11 13 2 9"}),(0,U.jsx)("polygon",{className:"hsk-kite-wing hsk-kite-wing--near",points:"22 2 15 22 11 13"}),(0,U.jsx)("line",{className:"hsk-kite-spine",x1:"22",y1:"2",x2:"11",y2:"13"})]}),fi=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("circle",{className:"hsk-sun-core",cx:"12",cy:"12",r:"5"}),(0,U.jsxs)("g",{className:"hsk-sun-rays",children:[(0,U.jsx)("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),(0,U.jsx)("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),(0,U.jsx)("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),(0,U.jsx)("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),(0,U.jsx)("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),(0,U.jsx)("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),(0,U.jsx)("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),(0,U.jsx)("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})]}),ki=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.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"})}),gi=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":0},d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":2},d:"M2 17l10 5 10-5"}),(0,U.jsx)("path",{className:"hsk-wood-layer",style:{"--hsk-layer":1},d:"M2 12l10 5 10-5"})]}),xi=()=>(0,U.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,U.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"})}),vi=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M17 8h1a4 4 0 1 1 0 8h-1"}),(0,U.jsx)("path",{d:"M3 8h14v9a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":0},x1:"6",y1:"1",x2:"6",y2:"4"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":1},x1:"10",y1:"1",x2:"10",y2:"4"}),(0,U.jsx)("line",{className:"hsk-steam",style:{"--hsk-steam":2},x1:"14",y1:"1",x2:"14",y2:"4"})]}),yi=()=>(0,U.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("path",{d:"M12 3a6.5 6.5 0 0 0 9 9 9 9 0 1 1-9-9z"}),(0,U.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"})]});var wi=({size:e=11})=>(0,U.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,U.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,U.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),Ci=({className:e,size:r=16,filled:t=!1}={})=>(0,U.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,U.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"22"}),(0,U.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"})]});var ln=[{id:"light",label:"Silver",Icon:fi,dark:!1},{id:"dark",label:"Onyx",Icon:ki,dark:!0},{id:"mahogany",label:"Mahogany",Icon:gi,dark:!0},{id:"blush",label:"Blush",Icon:xi,dark:!1},{id:"coffee",label:"Coffee",Icon:vi,dark:!1},{id:"midnight",label:"Midnight",Icon:yi,dark:!0}];function Mo(e){return ln.find(r=>r.id===e)??ln[0]}var Ha=require("@akropolys/sdk"),Ba=require("@akropolys/sdk");var xa=require("react");function $h(e,r,t=.55){return r<=0?0:e*r*t/(r+t*Math.abs(e))}function qh({stiffness:e=500,damping:r=45,onFrame:t,onRest:n}){let a=0,o=0,i=0,c=null,s=0,l=p=>{let d=Math.min(.032,(p-s)/1e3)||.016666666666666666;s=p;let u=Math.max(1,Math.ceil(d/.008)),f=d/u;for(let w=0;w<u;w++){let b=-e*(a-i)-r*o;o+=b*f,a+=o*f}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(p){c!==null&&(cancelAnimationFrame(c),c=null),a=p,o=0,t(a)},to(p,d=0){i=p,o=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 o=(0,xa.useRef)(t);o.current=t,(0,xa.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,p=-1,d=0,u=0,f=0,w=!1,b=!1,x=qh({onFrame:D=>{i.style.transform=D===0?"":`translate3d(0, ${D}px, 0)`;let S=i.parentElement;S&&(S.style.opacity=D===0?"":String(Math.max(.35,1-D/(i.offsetHeight||1)*1.1)))},onRest:()=>{i.style.willChange="",b&&(b=!1,o.current())}}),L=()=>{let D=r();return D&&D.scrollTop>0?!1:n?n():!0},M=D=>{D.pointerType==="mouse"||!D.isPrimary||(c=!1,w=!1,p=D.pointerId,s=d=D.clientY,l=D.clientX,u=D.timeStamp,f=0,h=x.value)},C=D=>{if(D.pointerId!==p)return;let S=D.clientY-s,O=D.clientX-l;if(!w){if(Math.abs(S)<6&&Math.abs(O)<6)return;if(w=!0,c=S>0&&Math.abs(S)>Math.abs(O)&&L(),c){try{i.setPointerCapture(D.pointerId)}catch{}x.stop(),i.style.animation="none",i.style.willChange="transform"}}if(!c)return;let v=D.timeStamp-u;v>0&&(f=(D.clientY-d)/v*1e3),d=D.clientY,u=D.timeStamp;let I=h+S;x.track(I<0?-$h(-I,i.offsetHeight||1):I),D.cancelable&&D.preventDefault()},F=D=>{if(D.pointerId!==p)return;try{i.hasPointerCapture(D.pointerId)&&i.releasePointerCapture(D.pointerId)}catch{}if(p=-1,!c)return;c=!1;let S=i.offsetHeight||1;x.value+f*.12>S*.3||f>900?(b=!0,i.style.pointerEvents="none",x.to(S,f)):x.to(0,f)};return i.addEventListener("pointerdown",M,{passive:!0}),i.addEventListener("pointermove",C,{passive:!1}),i.addEventListener("pointerup",F,{passive:!0}),i.addEventListener("pointercancel",F,{passive:!0}),()=>{x.stop(),i.removeEventListener("pointerdown",M),i.removeEventListener("pointermove",C),i.removeEventListener("pointerup",F),i.removeEventListener("pointercancel",F),i.style.transform="",i.style.willChange="",i.style.animation="",i.style.pointerEvents="";let D=i.parentElement;D&&(D.style.opacity="")}},[a,e,r,n])}function hn(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 va(e,r){if(!r&&(e.type==="image/gif"||e.type==="image/svg+xml"||e.size<=307200))return hn(e);try{let t=await createImageBitmap(e),n=Math.min(1,1536/Math.max(t.width,t.height)),a=Math.max(1,Math.round(t.width*n)),o=Math.max(1,Math.round(t.height*n));t.close?.();let i=await createImageBitmap(e,{resizeWidth:a,resizeHeight:o,resizeQuality:"high"});try{let c=document.createElement("canvas");c.width=a,c.height=o;let s=c.getContext("2d");if(!s){if(r)throw new Error("image conversion failed");return hn(e)}r&&(s.fillStyle="#fff",s.fillRect(0,0,a,o)),s.drawImage(i,0,0);let l=!r&&e.type==="image/png",h=await new Promise(p=>c.toBlob(p,l?"image/png":"image/jpeg",.85));if(!h){if(r)throw new Error("image conversion failed");return hn(e)}return!r&&h.size>=e.size?hn(e):hn(h)}finally{i.close?.()}}catch(t){if(r)throw t;return hn(e)}}var ft=require("react");var Mi=(e,r)=>Math.hypot(e.x-r.x,e.y-r.y);function Oh(e){let r=0;for(let t=1;t<e.length;t++)r+=Mi(e[t-1],e[t]);return r}function To(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}}var pn=e=>Math.max(0,Math.min(1e3,Math.round(e)));function Ro(e,r,t){return[pn(e.minY/t*1e3),pn(e.minX/r*1e3),pn(e.maxY/t*1e3),pn(e.maxX/r*1e3)]}function Wh(e,r){let[t,n,a,o]=e,[i,c,s,l]=r,h=Math.min(o,l)-Math.max(n,c),p=Math.min(a,s)-Math.max(t,i);if(h<=0||p<=0)return!1;let d=Math.min((o-n)*(a-t),(l-c)*(s-i));return d>0&&h*p/d>.35}var Uh=(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 Vh(e,r,t){if(e.length<2)return null;let n=To(e),a=Ro(n,r,t),o=Math.hypot(n.maxX-n.minX,n.maxY-n.minY);if(o<4)return null;let i=Oh(e),c=Mi(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:[pn(e[e.length-1].y/t*1e3),pn(e[e.length-1].x/r*1e3)],straight:!0}:{gesture:"scribble",box:a,straight:!1}}function Ti(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:Ro(To([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:Ro(To([l,l]),r,t),text:s.value});continue}if(s.kind==="stroke"&&s.tool!=="eraser"&&s.points){let l=Vh(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||Wh(l.box,n[h].box)&&(i.add(h),l={gesture:"cross",box:Uh(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 rt=require("react/jsx-runtime"),Ri="#ff5a5a",jh=1280,Gh=4,Yh=80;function Kh(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 Xh(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 Li({src:e,onCancel:r,onSend:t,t:n}){let[a,o]=(0,ft.useState)(null),[i,c]=(0,ft.useState)(!1),[s,l]=(0,ft.useState)("pin"),h=(0,ft.useRef)(0),[p,d]=(0,ft.useState)(null),u=(0,ft.useRef)(null),[f,w]=(0,ft.useState)([{points:[],closed:!1}]),b=f[f.length-1],E=(0,ft.useRef)(`selection-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`),x=(0,ft.useRef)(null),L=y=>w(z=>[...z.slice(-66),y]),M=s==="select",[C,F]=(0,ft.useState)([]),[D,S]=(0,ft.useState)(!1),O=(0,ft.useRef)(null),v=(0,ft.useRef)(null);(0,ft.useEffect)(()=>{let y=new Image;return y.crossOrigin="anonymous",y.onload=()=>o(y),y.onerror=()=>c(!0),y.src=e,()=>{y.onload=null,y.onerror=null}},[e]);let I=(()=>{if(!a)return{w:0,h:0};let y=Math.min(1,jh/Math.max(a.naturalWidth,a.naturalHeight));return{w:Math.round(a.naturalWidth*y),h:Math.round(a.naturalHeight*y)}})(),$=(0,ft.useRef)(null),P=y=>{let z=O.current;if(!z||!a)return;let k=z.getContext("2d");if(!k)return;$.current||($.current=document.createElement("canvas"));let he=$.current;he.width=z.width,he.height=z.height;let oe=he.getContext("2d"),W=y?[...C,y]:C;for(let m of W)m.kind==="stroke"&&(oe.save(),oe.globalCompositeOperation=m.tool==="eraser"?"destination-out":"source-over",oe.strokeStyle=Ri,oe.lineWidth=m.tool==="eraser"?m.size*3:m.size,oe.lineCap="round",oe.lineJoin="round",oe.beginPath(),m.points.forEach((R,G)=>G===0?oe.moveTo(R.x,R.y):oe.lineTo(R.x,R.y)),m.points.length===1&&oe.lineTo(m.points[0].x+.01,m.points[0].y),oe.stroke(),oe.restore());k.clearRect(0,0,z.width,z.height),k.drawImage(a,0,0,z.width,z.height),k.drawImage(he,0,0);let ie=b.points.map((m,R)=>x.current?.index===R?x.current.point:m);ie.length&&(k.save(),k.beginPath(),ie.forEach((m,R)=>R?k.lineTo(m.x,m.y):k.moveTo(m.x,m.y)),b.closed&&(k.closePath(),k.fillStyle="#22c55e33",k.fill()),k.strokeStyle="#22c55e",k.lineWidth=Math.max(2,I.w/400),k.stroke(),k.restore());for(let m of ie)k.beginPath(),k.arc(m.x,m.y,Math.max(3,I.w/260),0,Math.PI*2),k.fillStyle="#ffffff",k.fill(),k.strokeStyle="#15803d",k.stroke();for(let m of W){if(m.kind!=="pin")continue;let R=m.size;if(k.save(),k.beginPath(),k.moveTo(m.x,m.y),k.bezierCurveTo(m.x-R*2,m.y-R*2,m.x-R,m.y-R*3.5,m.x,m.y-R*3.5),k.bezierCurveTo(m.x+R,m.y-R*3.5,m.x+R*2,m.y-R*2,m.x,m.y),k.fillStyle=Ri,k.fill(),k.lineWidth=Math.max(1,R/7),k.strokeStyle="#fff",k.stroke(),k.beginPath(),k.arc(m.x,m.y-R*2.2,R*.5,0,Math.PI*2),k.fillStyle="#fff",k.fill(),m.label){k.font=`600 ${R*1.2}px system-ui, sans-serif`,k.textAlign="center",k.textBaseline="middle";let G=Kh(k,m.label,z.width*.32),J=R*1.5,K=Math.min(z.width,Math.max(...G.map(me=>k.measureText(me).width))+R),se=G.length*J+R*.4,Ce=Math.max(K/2,Math.min(z.width-K/2,m.x)),de=Math.max(se,m.y-R*3.7);k.fillStyle="rgba(0,0,0,.8)",k.fillRect(Ce-K/2,de-se,K,se),k.fillStyle="#fff",G.forEach((me,q)=>k.fillText(me,Ce,de-se+R*.2+J*(q+.5),K-R))}k.restore()}};(0,ft.useEffect)(()=>{P()},[a,C,b,I.w,I.h]);let Z=y=>{let z=O.current,k=z.getBoundingClientRect();return{x:Math.max(0,Math.min(z.width,(y.clientX-k.left)/k.width*z.width)),y:Math.max(0,Math.min(z.height,(y.clientY-k.top)/k.height*z.height))}},ve=()=>Math.max(4,Math.round(I.w/180)),ne=y=>{F(z=>z.filter(k=>k.kind!=="pin"||k.id!==y)),d(null)},V=()=>{let y=C.find(z=>z.kind==="pin"&&z.id===p);y?.kind==="pin"&&!y.label.trim()?ne(y.id):d(null)},fe=y=>{if(!a)return;let z=Z(y);if(s==="pin"){let k=C.find(W=>W.kind==="pin"&&Math.hypot(z.x-W.x,z.y-(W.y-W.size*1.7))<W.size*2);if(k?.kind==="pin"){d(k.id),y.currentTarget.setPointerCapture(y.pointerId),u.current={id:k.id,offset:{x:z.x-k.x,y:z.y-k.y}};return}if(p){V();return}if(C.filter(W=>W.kind==="pin").length>=Gh)return;let he=`pin-${++h.current}`,oe=Math.max(10,I.w/O.current.getBoundingClientRect().width*9);F(W=>[...W,{kind:"pin",...z,id:he,label:"",size:oe}]),d(he);return}if(s==="select"){let k=b.points[0],he=O.current.getBoundingClientRect(),oe=12*I.w/he.width;if(!b.closed&&k&&b.points.length>=3&&Math.hypot(z.x-k.x,z.y-k.y)<oe)L({...b,closed:!0});else{let W=b.points.findIndex(ie=>Math.hypot(z.x-ie.x,z.y-ie.y)<oe);if(W>=0){y.currentTarget.setPointerCapture(y.pointerId),x.current={index:W,point:z};return}if(b.closed||b.points.length>=64)return;L({...b,points:[...b.points,z]})}return}y.target.setPointerCapture(y.pointerId),v.current={kind:"stroke",tool:s,size:ve(),points:[z]},P(v.current)},Q=y=>{if(u.current){let{id:z,offset:k}=u.current,he=Z(y);F(oe=>oe.map(W=>W.kind==="pin"&&W.id===z?{...W,x:Math.max(0,Math.min(I.w,he.x-k.x)),y:Math.max(0,Math.min(I.h,he.y-k.y))}:W));return}if(x.current){x.current.point=Z(y),P();return}v.current&&(v.current.points.push(Z(y)),P(v.current))},_=()=>{if(u.current){u.current=null;return}if(x.current){let{index:z,point:k}=x.current;x.current=null,L({...b,points:b.points.map((he,oe)=>oe===z?k:he)});return}if(!v.current)return;let y=v.current;v.current=null,F(z=>[...z,y])},B=C.filter(y=>y.kind==="pin"),N=B.find(y=>y.id===p),T=!!a&&!(b.points.length>0&&!b.closed)&&B.length>0&&B.every(y=>y.label.trim()),A=()=>{if(!(!T||!a))try{let y=document.createElement("canvas");y.width=I.w,y.height=I.h;let z=y.getContext("2d");if(!z){S(!0);return}z.drawImage(a,0,0,I.w,I.h);let k=y.toDataURL("image/jpeg",.92),he=O.current?.toDataURL("image/jpeg",.85)||k,oe=Ti(C,I.w,I.h);if(b.closed){let W=m=>Math.round(m/I.w*1e3),ie=m=>Math.round(m/I.h*1e3);oe.unshift({gesture:"selection",id:E.current,box:[ie(Math.min(...b.points.map(m=>m.y))),W(Math.min(...b.points.map(m=>m.x))),ie(Math.max(...b.points.map(m=>m.y))),W(Math.max(...b.points.map(m=>m.x)))],points:b.points.map(m=>[W(m.x),ie(m.y)])})}t(k,B.map(W=>W.label.trim()).join("; "),oe,he)}catch{S(!0)}},Y=s==="pin"?"markupPinHint":s==="select"?b.closed?"markupSelectedHint":"markupOutlineHint":"markupSketchHint";return(0,rt.jsxs)("div",{className:"hsk-markup",role:"dialog","aria-label":n("markupDialogLabel"),children:[(0,rt.jsxs)("div",{className:"hsk-markup-head",children:[(0,rt.jsx)("span",{className:"hsk-markup-title",role:"status",children:n(Y)}),(0,rt.jsx)("button",{className:"hsk-markup-cancel",onClick:r,children:n("markupCancel")})]}),(0,rt.jsx)("div",{className:"hsk-markup-stage",children:i?(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupLoadError")}):a?(0,rt.jsxs)("div",{className:"hsk-markup-canvas-wrap",children:[(0,rt.jsx)("canvas",{ref:O,width:I.w,height:I.h,className:`hsk-markup-canvas hsk-markup-canvas--${s}`,style:{touchAction:"none",cursor:M||s==="pin"?"crosshair":void 0},onPointerDown:fe,onPointerMove:Q,onPointerUp:_,onPointerCancel:()=>{u.current=null,x.current=null,v.current=null,P()}}),s==="pin"&&N&&(0,rt.jsxs)("div",{className:"hsk-markup-pinlabel",style:Xh(N.x/I.w*100,Math.max(12,(N.y-N.size*4)/I.h*100)),children:[(0,rt.jsx)("input",{autoFocus:!0,"aria-label":n("markupPinLabel"),placeholder:n("markupPinLabelHint"),value:N.label,maxLength:Yh,style:{width:`${Math.min(34,Math.max(16,N.label.length+2))}ch`},onChange:y=>F(z=>z.map(k=>k.kind==="pin"&&k.id===N.id?{...k,label:y.target.value}:k)),onKeyDown:y=>{(y.key==="Enter"||y.key==="Escape")&&V()}}),(0,rt.jsx)("button",{"aria-label":n("markupRemovePin"),title:n("markupRemovePin"),onClick:()=>ne(N.id),children:"\xD7"})]})]}):(0,rt.jsx)("div",{className:"hsk-markup-loading",children:n("markupLoading")})}),(0,rt.jsxs)("div",{className:"hsk-markup-tools",children:[(0,rt.jsxs)("button",{className:`hsk-markup-tool${s==="pin"?" hsk-markup-tool--on":""}`,onClick:()=>l("pin"),children:[(0,rt.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,rt.jsx)("path",{d:"M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z"}),(0,rt.jsx)("circle",{cx:"12",cy:"10",r:"3"})]}),n("markupPin")]}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="select"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("select")},children:n("markupSelect")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",disabled:b.closed||b.points.length<3,onClick:()=>L({...b,closed:!0}),children:n("markupCloseOutline")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="pen"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("pen")},children:n("markupSketch")}),(0,rt.jsx)("button",{className:`hsk-markup-tool${s==="eraser"?" hsk-markup-tool--on":""}`,onClick:()=>{d(null),l("eraser")},children:n("markupEraser")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>M?w(y=>y.length>1?y.slice(0,-1):y):F(y=>y.slice(0,-1)),disabled:M?f.length<2:C.length===0,children:n("markupUndo")}),(0,rt.jsx)("button",{className:"hsk-markup-tool",onClick:()=>{F([]),d(null),w([{points:[],closed:!1}]),l("pin")},disabled:C.length===0&&!b.points.length,children:n("markupClear")}),(0,rt.jsx)("button",{className:"hsk-markup-go",onClick:A,disabled:!T,children:n("markupSend")})]}),D&&(0,rt.jsx)("div",{className:"hsk-markup-error",children:n("markupError")})]})}var Lt=Xt(require("react")),_n=require("react/jsx-runtime");function Fi(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 Pn(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}}var Ei=e=>e*e*(3-2*e);function Qh(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=Ei(a-i),l=Ei(o-c),h=n(i,c),p=n(i+1,c),d=n(i,c+1),u=n(i+1,c+1);return(h+(p-h)*s)*(1-l)+(d+(u-d)*s)*l}}function Jh(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=(d,u)=>{let f=s.length;s.push([d,u]),c[Math.floor(u/a)*o+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),w=Math.floor(u/a);for(let b=Math.max(w-2,0);b<=Math.min(w+2,i-1);b++)for(let E=Math.max(f-2,0);E<=Math.min(f+2,o-1);E++){let x=c[b*o+E];if(x<0)continue;let L=s[x][0]-d,M=s[x][1]-u;if(L*L+M*M<t*t)return!1}return!0};for(h(n()*e,n()*r);l.length;){let d=n()*l.length|0,[u,f]=s[l[d]],w=!1;for(let b=0;b<24;b++){let E=n()*Math.PI*2,x=t*(1+n()),L=u+Math.cos(E)*x,M=f+Math.sin(E)*x;if(p(L,M)){h(L,M),w=!0;break}}w||l.splice(d,1)}return s}var kt=(e,r)=>(e()-.5)*r,Lo=[(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,kt(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()}],zi=[(e,r,t)=>{let n=r*.5,a=-n+kt(t,n*.3),o=kt(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+kt(t,n*.5),l=kt(t,n*1.5);e.quadraticCurveTo(a+kt(t,n*.9),o+kt(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+kt(t,.06)),h=Math.cos(s)*l,p=Math.sin(s)*l;i===0?e.moveTo(h,p):e.lineTo(h,p)}e.stroke()},(e,r,t)=>{let n=r*.5,a=4+(t()*4|0),o=kt(t,.7);for(let i=0;i<a;i++){let c=-n+i/(a-1)*n*2+kt(t,n*.16),s=n*(.7+t()*.6);e.beginPath(),e.moveTo(c-o*s*.5,-s*.5),e.quadraticCurveTo(c+kt(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+kt(t,n*.14))}e.stroke()}],Ni=[(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(kt(t,r*.04),kt(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,kt(t,r*.08)),e.quadraticCurveTo(0,kt(t,r*.16),n,kt(t,r*.08)),e.stroke()}],Zh={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()}},Ii=e=>{let r=e.split(",").map(t=>parseFloat(t.trim()));return[r[0]||0,r[1]||0,r[2]||0]};function Eo(e,r,t){let n=Ii(e),a=Ii(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)})`}var zo=new Set,No=new Set;function Io(){for(let e of No)e()}function Di(e){zo.forEach(r=>r(e))}var ep=83,Ai=[{k:.45,hop:1},{k:1.15,hop:.55},{k:.95,hop:.12},{k:1,hop:0}],Pi=7,tp=.28;function rp(e,r,t){return`hsl(${Math.round(r*300%360)}, ${t?72:68}%, ${t?58:46}%)`}function Hi(e,r,t,n,a,o,i,c=r){let s=i?Zh[i]:void 0,l=Pn(a),h=Qh(Pn(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)),w=Jh(e,r,f,l),b=4.4/Math.max(e,r),E=b*2.6,x=Math.hypot(e,r),L=l()*Math.PI*2,M=Math.cos(L),C=Math.sin(L),F=e*(.18+l()*.64),D=r*(.12+l()*.5),S=[],O=Math.hypot(e,r)||1,v=Pn(a^1540483477),I=o?e:0,$=Math.hypot(e,c)||1,[P,Z,ve]=t.split(",").map(V=>parseFloat(V)||0),ne=.2126*P+.7152*Z+.0722*ve>128;for(let[V,fe]of w){let Q=h(V*b,fe*b)*.72+h(V*E,fe*E)*.28,_=Math.min(1,Math.max(0,(Q-.26)/.44));if(l()>_*_*(3-2*_))continue;let B=l(),N=Math.max(0,1-Math.hypot(V-F,fe-D)/(x*.72))**1.6,T=((V-e/2)*M+(fe-r/2)*C)/x+.5,A=!ne,y=((A?.055:.028)+l()*(A?.04:.025))*(.75+T*.55)*(1+N*.4),z=Eo(t,n,N*.85),k=((o?e-V:V)+r-fe)/(e+r||1),he=l()*16777215|0,oe=rp(he,k,ne),W=0,ie=A?1.05+l()*.35:.65+l()*.35,m=20,R=Lo[0],G=1;B<.5?(W=kt(l,.16),ie=A?1.15+l()*.45:.7+l()*.35,m=20+l()*16,R=Lo[l()*Lo.length|0]):B<.82?(W=l()*Math.PI*2,ie=A?.95+l()*.4:.6+l()*.4,m=16+l()*20,R=zi[l()*zi.length|0]):B<.95||!s?(W=l()*Math.PI*2,ie=A?.85+l()*.35:.55+l()*.35,m=7+l()*7,R=Ni[l()*Ni.length|0]):(W=kt(l,.3),ie=A?1.1+l()*.3:.75+l()*.3,m=15+l()*9,R=s,G=2.6),S.push({x:V,y:fe,roll:B,rotation:W,lineWidth:ie,alpha:y*G,baseColor:z,shimmerColor:oe,drawFn:R,size:m,seed:he,normDist:k,bloom:Math.min(1,Math.hypot(V-I,fe-c)/$)*.62+v()*.08,glow:ne?.2:.06,ux:(V-I)/(Math.hypot(V-I,fe-c)||1),uy:(fe-c)/(Math.hypot(V-I,fe-c)||1)})}return S}var np=.3;function ap(e){return 1+(1.2+1)*(e-1)**3+1.2*(e-1)**2}function Wr(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 p=h.alpha,d=h.baseColor,u=h.lineWidth,f=1,w=0,b=0;if(i!==void 0){let x=Math.min(1,Math.max(0,(i-h.bloom)/np));if(x<=0)continue;let L=1-(1-x)**3,M=Math.sin(x*Math.PI)**2;p=h.alpha*L+M*h.glow,d=Eo(h.baseColor,h.shimmerColor,M*(h.glow>.1?.85:.55)),u=h.lineWidth*(1+M*.35),f=.86+.14*ap(x),w=-h.ux*(1-L)*9,b=-h.uy*(1-L)*9}else if(c){let x=h.normDist-s;if(x>l)p=h.alpha*.45,d=h.baseColor,u=h.lineWidth;else if(x<-l)p=h.alpha,d=h.baseColor,u=h.lineWidth;else{let L=Math.cos(x/l*(Math.PI/2))**2;p=h.alpha+L*.08,d=L>.08?Eo(h.baseColor,h.shimmerColor,L*.65):h.baseColor,u=h.lineWidth*(1+L*.2)}}e.save(),e.translate(h.x+(h.dx??0)+w,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*o,1),e.strokeStyle=d,e.fillStyle=d,e.lineWidth=u;let E=Pn(h.seed);h.drawFn(e,h.size,E),e.restore()}}var op=Lt.default.memo(function({seed:r="",theme:t,dir:n,waitForContent:a=!1}){let o=(0,Lt.useRef)(null),i=(0,Lt.useRef)(!1),c=(0,Lt.useRef)(0),s=(0,Lt.useRef)(null),l=(0,Lt.useRef)(0),h=(0,Lt.useRef)(0),p=(0,Lt.useRef)(a);return(0,Lt.useEffect)(()=>{let d=o.current;if(!d)return;let u=Fi(r||"kiku"),f=0,w=(v,I,$,P)=>()=>{let Z=performance.now(),ve=d.clientWidth,ne=d.clientHeight;v===null&&ve&&ne&&(v=Z);let V=v===null?0:Z-v,fe=Math.min(1,V/I);if(ve&&ne){let Q=Math.min(window.devicePixelRatio||1,3),_=Math.round(ve*Q),B=Math.round(ne*Q);(d.width!==_||d.height!==B)&&(d.width=_,d.height=B);let N=d.getContext("2d");N&&(N.setTransform(Q,0,0,Q,0,0),Wr(N,$,ve,ne,-1,1,fe))}if(fe<1)c.current=requestAnimationFrame(w(v,I,$,P));else{i.current=!1;let Q=d.clientWidth,_=d.clientHeight,B=d.getContext("2d");if(B&&Q&&_){let N=Math.min(window.devicePixelRatio||1,3);B.setTransform(N,0,0,N,0,0),Wr(B,$,Q,_,-1)}}},b=()=>{let v=d.clientWidth,I=d.clientHeight;if(!v||!I)return;let $=Math.min(window.devicePixelRatio||1,3),P=d.getContext("2d");if(!P)return;let Z=getComputedStyle(d),ve=Z.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",ne=Z.getPropertyValue("--hsk-doodle-tint").trim()||ve,V=n==="rtl"||Z.direction==="rtl"||d.closest('[dir="rtl"]')!==null,fe=typeof window<"u"?Math.max(I,window.innerHeight||0):I,Q=Hi(v,fe,ve,ne,u,V,t,I);s.current=Q,l.current=v,h.current=fe;let _=Math.round(v*$),B=Math.round(I*$);if((d.width!==_||d.height!==B)&&(d.width=_,d.height=B),P.setTransform($,0,0,$,0,0),p.current){P.clearRect(0,0,v,I);return}if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Wr(P,Q,v,I,-1);return}cancelAnimationFrame(c.current),i.current=!0;let T=1500;c.current=requestAnimationFrame(w(null,T,Q,V))},E=()=>{let v=s.current,I=d.clientWidth,$=d.clientHeight;if(v&&I===l.current&&$<=h.current){if(i.current||p.current||!$)return;let P=d.getContext("2d");if(!P)return;let Z=Math.min(window.devicePixelRatio||1,3);d.width=Math.round(I*Z),d.height=Math.round($*Z),P.setTransform(Z,0,0,Z,0,0),Wr(P,v,I,$,-1);return}clearTimeout(f),f=window.setTimeout(b,20)};b();let x=()=>{p.current&&(p.current=!1,b())};No.add(x);let L=p.current?window.setTimeout(x,2e3):0,M=new ResizeObserver(E);M.observe(d);let C=window.matchMedia?.("(prefers-color-scheme: dark)"),F=()=>{b()};C?.addEventListener?.("change",F);let D=0,S=()=>{let v=s.current,I=d.getContext("2d"),$=d.clientWidth,P=d.clientHeight;if(!v||!I||!$||!P)return;let Z=Math.min(window.devicePixelRatio||1,3);I.setTransform(Z,0,0,Z,0,0),Wr(I,v,$,P,-1)},O=({x:v,y:I,strength:$})=>{let P=s.current;if(p.current||i.current||!P||window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches)return;cancelAnimationFrame(c.current),i.current=!1,clearTimeout(D);let Z=d.getBoundingClientRect(),ve=v-Z.left,ne=I-Z.top,V=Pn(performance.now()*997|0),fe=(N,T)=>Math.max(-T,Math.min(T,N)),Q=P.map(N=>{let T=N.dx??0,A=N.dy??0,Y=N.dr??0,y=N.x-ve,z=N.y-ne,k=Math.hypot(y,z)||1,he=$*(.18+.82*Math.exp(-k/220)),oe=he*(.6+V()*1.8),W=fe(T+y/k*oe+(V()-.5)*he*2,Pi),ie=fe(A+z/k*oe+(V()-.5)*he*2,Pi),m=fe(Y+(V()-.5)*he*.12,tp);return{g:N,fx:T,fy:A,fr:Y,tx:W,ty:ie,tr:m,lift:he*.09}}),_=0,B=()=>{let N=Ai[_];for(let T of Q)T.g.dx=T.fx+(T.tx-T.fx)*N.k,T.g.dy=T.fy+(T.ty-T.fy)*N.k,T.g.dr=T.fr+(T.tr-T.fr)*N.k,T.g.hop=T.lift*N.hop;S(),++_<Ai.length&&(D=window.setTimeout(B,ep))};B()};return zo.add(O),()=>{zo.delete(O),No.delete(x),clearTimeout(L),clearTimeout(D),clearTimeout(f),cancelAnimationFrame(c.current),i.current=!1,M.disconnect(),C?.removeEventListener?.("change",F)}},[r,t,n]),(0,_n.jsx)("canvas",{className:"hsk-cb-doodles",ref:o,"aria-hidden":"true"})}),An=3,_i=1800;function sp({seed:e="",theme:r,alphaScale:t=1.8,weight:n=.6}){let a=(0,Lt.useRef)(null);return(0,Lt.useEffect)(()=>{let o=a.current,i=o?.getContext("2d");if(!o||!i)return;let c=0,s=()=>{let h=o.clientWidth,p=o.clientHeight,d=Math.min(window.devicePixelRatio||1,3);o.width=Math.round(h*d),o.height=Math.round(p*d);let u=getComputedStyle(o),f=u.getPropertyValue("--hsk-doodle-ink").trim()||"31,31,31",w=u.getPropertyValue("--hsk-doodle-tint").trim()||f,b=h*An,E=p*An,x=Hi(b,E,f,w,Fi(e||"kiku"),!1,r);for(let C of x)C.lineWidth*=An*n;if(i.setTransform(d/An,0,0,d/An,0,0),window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){Wr(i,x,b,E,-1,t);return}let L=performance.now(),M=C=>{let F=(C-L)%(_i*2)/_i,D=F<1?F:2-F;Wr(i,x,b,E,(1-Math.cos(D*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,_n.jsx)("canvas",{className:"hsk-doodle-shimmer",ref:a,"aria-hidden":"true"})}var ip=300;function dn({active:e,seed:r,theme:t}){let[n,a]=(0,Lt.useState)(e);return(0,Lt.useEffect)(()=>{if(e){a(!0);return}let o=setTimeout(()=>a(!1),ip);return()=>clearTimeout(o)},[e]),n?(0,_n.jsx)("span",{className:`hsk-working-veil${e?"":" is-leaving"}`,"aria-hidden":"true",children:(0,_n.jsx)(sp,{seed:r,theme:t,alphaScale:18,weight:1.15})}):null}var ya=op;var st=Xt(require("react")),qi=require("@akropolys/sdk");var Ao=require("react/jsx-runtime"),cp={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"};function un(e){let r=e?cp[e.trim().toLowerCase()]:void 0;return r?{dir:r==="ar"||r==="ur"||r==="fa"?"rtl":"ltr",bcp47:r}:null}function lp(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""}var Bi=5e3,$i=[5e3,15e3,45e3,12e4];function Oi({shopperLanguage:e,theme:r,preloadedStrings:t}){let n=(0,qi.useAkropolysContext)(),a=e?n?.getCachedUIStrings?.(e,$t)??n?.getCachedUIStrings?.(e,Nr):null,o=t&&Object.keys(t).length>0?t:a?.strings??{},[i,c]=(0,st.useState)(()=>o),[s,l]=(0,st.useState)(()=>!e||t&&Object.keys(t).length>0||!!a?.complete),[h,p]=(0,st.useState)(()=>t&&Object.keys(t).length>0||a?.complete?e:!e||un(e)?.bcp47==="en"?e||"en":""),d=!e||un(e)?.bcp47==="en",u=i;t&&Object.keys(t).length>0&&(u={...i,...t});let f=e?`akropolys_ui_dir_${e.toLowerCase()}`:"",[w,b]=(0,st.useState)(()=>{if(a?.dir)return a.dir==="rtl";let N=un(e);if(N)return N.dir==="rtl";if($r(e)?.rtl)return!0;if(typeof window>"u"||!f)return!1;try{return localStorage.getItem(f)==="rtl"}catch{return!1}}),[E,x]=(0,st.useState)(()=>a?.bcp47||un(e)?.bcp47||""),[L,M]=(0,st.useState)(()=>a?.font??null),[C,F]=(0,st.useState)(()=>Ks(n)),[D,S]=(0,st.useState)(!0),[O,v]=(0,st.useState)(!1),I=st.default.useRef(e),[$,P]=(0,st.useState)(e);if(e!==$){P(e);let N=un(e);N&&(b(N.dir==="rtl"),x(N.bcp47));let T=e?n?.getCachedUIStrings?.(e,$t)??n?.getCachedUIStrings?.(e,Nr):null,A=t&&Object.keys(t).length>0?t:T?.strings;A&&Object.keys(A).length>0&&(c(A),u=A,T&&(T.font&&M(T.font),T.dir&&b(T.dir==="rtl"),T.bcp47&&x(T.bcp47)),T?.font&&Jt(T.font),v(!mo([T?.font?.family,C?.family].filter(Y=>!!Y),A)),p(e),l(!0))}let Z=e===I.current||d||!O&&(h.toLowerCase()===e.toLowerCase()&&s||Object.keys(u).length>0);(0,st.useEffect)(()=>{if(!e){x(""),M(null),c({}),p(""),l(!0),b(!1);return}let N=un(e),T=$r(e),A=N?.bcp47==="en",Y=!1,y=(oe,W)=>{let ie=[oe?.family,C?.family].filter(m=>!!m);if(e===I.current||mo(ie,W)){v(!1);return}v(!0),bo(ie,W,Bi).then(()=>{Y||v(!1)})},z=n?.getCachedUIStrings?.(e,$t);if(z?.strings&&Object.keys(z.strings).length>0)return c(z.strings),b(z.dir==="rtl"),x(z.bcp47||N?.bcp47||""),z.font&&(Jt(z.font),M(z.font)),y(z.font,z.strings),p(e),l(!0),()=>{Y=!0};let k=n?.getCachedUIStrings?.(e,Nr);k?.strings&&Object.keys(k.strings).length>0?(c(k.strings),b(k.dir==="rtl"),x(k.bcp47||N?.bcp47||""),k.font&&(Jt(k.font),M(k.font)),y(k.font,k.strings),p(e),l(!0)):(v(!1),c({}),N?(b(N.dir==="rtl"),x(N.bcp47)):T?.rtl&&b(!0),A||l(!1));let he=async()=>{let oe=!1;try{if(!k?.strings){let ie=await n.getUIStrings?.(e,Nr);if(!Y&&ie?.complete){v(!0),c(R=>({...R,...ie.strings})),b(ie.dir==="rtl"),x(ie.bcp47||N?.bcp47||"");try{localStorage.setItem(f,ie.dir)}catch{}ie.font&&Jt(ie.font);let m=[ie.font?.family,C?.family].filter(R=>!!R);await bo(m,ie.strings,Bi),Y||(ie.font&&M(ie.font),p(e),l(!0),v(!1))}}let W=await n.getUIStrings?.(e,$t);!Y&&W?.complete&&(oe=!0,c(ie=>({...ie,...W.strings})),W.font&&(await Jt(W.font,1200),Y||M(W.font)))}catch{return!1}return oe};return(async()=>{for(let oe=0;!Y&&!await he();oe++){let W=$i[Math.min(oe,$i.length-1)];await new Promise(ie=>window.setTimeout(ie,W))}})(),()=>{Y=!0}},[e,n,f]),(0,st.useEffect)(()=>{let N=!1;return(async()=>{try{let T=await fo(n);!N&&T&&F(T)}catch{}N||S(!0)})(),()=>{N=!0}},[n]),uo(L),uo(C);let ve=st.default.useMemo(()=>{let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim(),A=/^var\(/i.test(T),Y=T.replace(/^['"]|['"]$/g,""),y=A?lp(T):"",z=A?y?`${y}, `:"":Y?`"${Y}", `:"";if(L)return`"${L.family}", ${z}"Geist", system-ui, sans-serif`;let k=e?e.trim().toLowerCase():"";if(k==="japanese"||k==="ja"||k==="\u65E5\u672C\u8A9E")return`${z}"Geist", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif`;if(k==="chinese"||k==="zh"||k==="\u4E2D\u6587")return`${z}"Geist", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif`;if(k==="urdu"||k==="ur"||k==="\u0627\u0631\u062F\u0648")return`"Noto Nastaliq Urdu", ${z}"IBM Plex Sans Arabic", "Geist", system-ui, sans-serif`;if(k==="arabic"||k==="ar"||k==="\u0627\u0644\u0639\u0631\u0628\u064A\u0629")return`"IBM Plex Sans Arabic", ${z}"Geist", system-ui, sans-serif`;if(k==="hindi"||k==="hi"||k==="\u0939\u093F\u0928\u094D\u0926\u0940")return`"Hind", ${z}"Geist", system-ui, sans-serif`},[L,e,typeof r=="object"&&r?r.fontFamily:void 0]),ne=st.default.useMemo(()=>{let N=0,T=0;for(let A of Object.values(i))for(let Y of A){let y=Y.codePointAt(0)??0;y<192||/\p{L}/u.test(Y)&&(y<=591?N++:T++)}return T>N},[i]),[V,fe]=(0,st.useState)(0);(0,st.useEffect)(()=>{if(typeof document>"u"||!document.fonts?.ready)return;let N=!0;return document.fonts.ready.then(()=>{N&&fe(T=>T+1)}),()=>{N=!1}},[L]);let Q=st.default.useMemo(()=>{if(!ne||typeof document>"u")return!0;let T=(typeof r=="object"&&r?.fontFamily?r.fontFamily:"").split(",")[0].trim();if(!T)return!1;let A="";for(let y of Object.values(i))if(y){A=y;break}if(!A)return!0;let Y=A.replace(/\s+/g,"");if(!Y)return!0;try{let z=document.createElement("canvas").getContext("2d");if(!z)return!0;let k=T.startsWith("var(")&&getComputedStyle(document.documentElement).getPropertyValue(T.slice(4,-1).trim()).trim()||T;z.font=`16px ${k}, __akropolys_nonexistent_font__`;let he=z.measureText(Y).width;z.font="16px __akropolys_nonexistent_font__";let oe=z.measureText(Y).width;return Math.abs(he-oe)>1}catch{return!0}},[ne,i,typeof r=="object"&&r?r.fontFamily:void 0,V]),_=(0,st.useCallback)((N,T)=>{let A=u[N]||i[N]||$t[N]||N;if(T)for(let[Y,y]of Object.entries(T))A=A.split(`{${Y}}`).join(y);return A},[u,i]),B=(0,st.useCallback)((N,T)=>(u[N]||i[N]||$t[N]||N).split(/(\{[a-zA-Z]+\})/g).map((Y,y)=>{let z=Y.match(/^\{([a-zA-Z]+)\}$/);return z&&T?.[z[1]]!==void 0?(0,Ao.jsx)("bdi",{children:T[z[1]]},y):(0,Ao.jsx)(st.default.Fragment,{children:Y},y)}),[u,i]);return{chromeStrings:i,chromeReady:Z,isRTL:w,speechLang:E,scriptFont:L,fontStack:ve,isNonLatin:ne,hostFontCovers:Q,baseFontReady:D,t:_,tNode:B}}var Le=require("react");function Wi({messages:e,loading:r,streaming:t,messageRefs:n}){let a=(0,Le.useRef)(null),o=(0,Le.useRef)(0),[i,c]=(0,Le.useState)(!1),[s,l]=(0,Le.useState)(1),[h,p]=(0,Le.useState)(0),d=(0,Le.useRef)(()=>{}),u=(0,Le.useRef)(null),f=(0,Le.useRef)(!1),w=(0,Le.useRef)(!0),b=(0,Le.useRef)(!1),E=(0,Le.useRef)(null),x=(0,Le.useRef)(null),L=(0,Le.useRef)(e.length),M=(0,Le.useRef)(!1),C=(0,Le.useRef)(()=>{}),F=(0,Le.useRef)(()=>{}),D=(0,Le.useRef)(null),S=(0,Le.useRef)(()=>{}),[O,v]=(0,Le.useState)(0),I=(0,Le.useRef)(0),$=(0,Le.useRef)(""),P=(0,Le.useRef)(()=>{}),Z=(0,Le.useRef)(()=>{});(0,Le.useEffect)(()=>{let m=a.current;if(!m)return;let R,G=()=>{clearTimeout(R),R=setTimeout(()=>{f.current=!1},150)},J=()=>{clearTimeout(R),f.current=!0,P.current()},K=()=>{f.current&&G()};return m.addEventListener("touchstart",J,{passive:!0}),m.addEventListener("touchend",G,{passive:!0}),m.addEventListener("touchcancel",G,{passive:!0}),m.addEventListener("scroll",K,{passive:!0}),()=>{clearTimeout(R),m.removeEventListener("touchstart",J),m.removeEventListener("touchend",G),m.removeEventListener("touchcancel",G),m.removeEventListener("scroll",K)}},[]),(0,Le.useEffect)(()=>{let m=a.current;if(!m)return;let R=160,G=8,J=0,K=()=>{J=0;let de=E.current?.offsetHeight??0,me=m.scrollHeight-de-m.scrollTop-m.clientHeight,q=performance.now()-o.current<400;me<=G&&(!b.current||q)&&(w.current||Z.current(),w.current=!0,b.current=!1,B.current()),c(me>R&&!w.current);let ge=m.scrollHeight-m.clientHeight;l(ge>8?Math.min(1,Math.max(0,m.scrollTop/ge)):1);let Ie=m.scrollTop+m.clientHeight*.33,xe=0;for(let Re=0;Re<n.current.length;Re++){let De=n.current[Re];De&&De.offsetTop<=Ie&&(xe=Re)}p(xe)},se=()=>{J||(J=requestAnimationFrame(K))};K(),m.addEventListener("scroll",se,{passive:!0});let Ce=new ResizeObserver(()=>{x.current?C.current("sync"):w.current&&!f.current&&F.current(),se()});Ce.observe(m);for(let de of n.current)de&&Ce.observe(de);return()=>{J&&cancelAnimationFrame(J),m.removeEventListener("scroll",se),Ce.disconnect()}},[e.length,n]);let ve=(0,Le.useCallback)(m=>{let R=`${m}:${I.current}`;$.current!==R&&($.current=R,v(G=>G+1))},[]),[ne,V]=(0,Le.useState)(!1),fe=(0,Le.useRef)(!1),Q=(0,Le.useCallback)(()=>{fe.current||(fe.current=!0,V(!0))},[]),_=(0,Le.useCallback)(()=>{fe.current&&(fe.current=!1,V(!1))},[]),B=(0,Le.useRef)(()=>{});B.current=_;let[N,T]=(0,Le.useState)(!1),A=(0,Le.useRef)(!1),Y=(0,Le.useRef)(0),y=(0,Le.useCallback)(()=>{A.current=!1,T(!1)},[]),z=(0,Le.useCallback)(()=>{$.current="",y(),_()},[y,_]),k=(0,Le.useCallback)(()=>{A.current&&(performance.now()-Y.current<700||y())},[y]);P.current=k,Z.current=z,(0,Le.useEffect)(()=>{if(O===0)return;A.current=!0,Y.current=performance.now(),T(!0);let m=setTimeout(y,4200);return()=>clearTimeout(m)},[O,y]);let he=(0,Le.useCallback)(()=>{M.current=!1,x.current&&(x.current=null,E.current&&(E.current.style.height=""))},[]);S.current=he,F.current=()=>{let m=a.current;if(!m)return;let R=m.scrollHeight-m.clientHeight;D.current?D.current(R):m.scrollTop=R},C.current=m=>{let R=a.current,G=E.current,J=x.current,K=q=>{let ge=m==="sync"?D.current:u.current;ge?ge(q):R&&(R.scrollTop=q)},se=F.current;if(!R||!G||!J||!J.isConnected){he(),w.current&&se();return}let Ce=parseFloat(getComputedStyle(R).paddingTop)||0;G.offsetHeight<R.clientHeight&&(G.style.height=`${R.clientHeight}px`);let de=Math.max(0,J.offsetTop-Ce),me=de+R.clientHeight-(R.scrollHeight-G.offsetHeight);if(me<=0){he(),w.current=!1,b.current=!0,K(de);return}me!==G.offsetHeight&&(G.style.height=`${me}px`),K(de)};let oe=(0,Le.useCallback)(m=>{let R=a.current,G=n.current[m];if(!R||!G)return;let J=G.offsetTop-Math.max(0,(R.clientHeight-G.clientHeight)/2),K=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,J));u.current?u.current(K):R.scrollTo({top:K,behavior:"smooth"})},[n]),W=(0,Le.useCallback)(m=>{let R=a.current;if(!R||!R.contains(m))return;M.current=!1,x.current=null,w.current=!1,b.current=!0;let G=R.getBoundingClientRect(),J=m.getBoundingClientRect(),K=Math.min(J.height>G.height?176:64,G.height/3);if(J.top>=G.top+K&&J.bottom<=G.bottom-8)return;let se=Math.max(0,Math.min(R.scrollHeight-R.clientHeight,R.scrollTop+J.top-G.top-K));u.current?u.current(se):R.scrollTo({top:se,behavior:"auto"})},[]),ie=(0,Le.useCallback)(()=>{let m=a.current;if(!m)return;w.current=!0,b.current=!1,S.current(),Z.current();let R=m.scrollHeight-m.clientHeight;u.current?u.current(R):m.scrollTo({top:R,behavior:"smooth"})},[]);return(0,Le.useLayoutEffect)(()=>{let m=a.current;if(!m)return;let R=e.slice(L.current);if(L.current=e.length,R.some(J=>J.role==="user")&&(w.current=!0,b.current=!1,Z.current(),x.current=null,M.current=!0),M.current){M.current=!1;for(let J=n.current.length-1;J>=0;J--){let K=n.current[J];if(K?.dataset.hskRole==="user"){x.current=K;break}}if(x.current){C.current("glide");return}}if(x.current){C.current("glide");return}let G=m.scrollTop;if(!w.current)b.current||(Q(),ve(e.length));else if(!f.current){F.current();return}m.scrollTop!==G&&d.current()},[e,r,t,n,ve,Q]),(0,Le.useEffect)(()=>{let m=a.current;if(!m||typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let R=7,G=16,J=1/(window.devicePixelRatio||1),K=ke=>Math.round(ke/J)*J,se=m.scrollTop,Ce=m.scrollTop,de=m.scrollTop,me=0,q=null,ge=ke=>{ke!==de&&(m.scrollTop=ke,de=m.scrollTop)},Ie=()=>{q!==null&&(cancelAnimationFrame(q),q=null),m.classList.remove("hsk-scrolling"),se=Ce=de=m.scrollTop};d.current=Ie,u.current=ke=>{Math.abs(m.scrollTop-de)>1&&(se=Ce=de=m.scrollTop);let Ue=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,ke)));Ue!==se&&(se=Ue,q===null&&(me=performance.now(),q=requestAnimationFrame(xe)))},D.current=ke=>{let Ue=Math.round(Math.max(0,Math.min(m.scrollHeight-m.clientHeight,ke)));q!==null&&(cancelAnimationFrame(q),q=null,m.classList.remove("hsk-scrolling")),m.scrollTop=Ue,se=Ce=de=m.scrollTop};let xe=ke=>{let Ue=Math.min((ke-me)/1e3,.05);if(me=ke,Ce+=(se-Ce)*(1-Math.exp(-R*Ue)),Math.abs(se-Ce)<J){Ce=se,ge(Math.round(se)),m.classList.remove("hsk-scrolling"),q=null;return}ge(K(Ce)),q=requestAnimationFrame(xe)},Re=ke=>{if(ke.ctrlKey)return;Math.abs(m.scrollTop-de)>1&&(se=Ce=de=m.scrollTop),ke.deltaY<0&&(w.current&&(I.current+=1),w.current=!1,x.current=null),P.current();let Ue=ke.deltaMode===1?G:ke.deltaMode===2?m.clientHeight:1,Qe=Math.max(0,m.scrollHeight-m.clientHeight),Ze=Math.round(Math.max(0,Math.min(Qe,se+ke.deltaY*Ue)));if(Ze===se){Qe>0&&ke.preventDefault();return}ke.preventDefault(),se=Ze,q===null&&(me=performance.now(),m.classList.add("hsk-scrolling"),q=requestAnimationFrame(xe))},De=m.scrollTop,ze=()=>{let ke=Math.abs(m.scrollTop-de)>1;ke&&(o.current=performance.now(),m.scrollTop<De-1&&w.current&&(I.current+=1,w.current=!1,x.current=null)),De=m.scrollTop,q!==null&&ke&&(cancelAnimationFrame(q),q=null,m.classList.remove("hsk-scrolling"),se=Ce=de=m.scrollTop)};return m.addEventListener("wheel",Re,{passive:!1}),m.addEventListener("scroll",ze,{passive:!0}),()=>{m.removeEventListener("scroll",ze),m.removeEventListener("wheel",Re),q!==null&&cancelAnimationFrame(q),m.classList.remove("hsk-scrolling"),d.current=()=>{},u.current=null,D.current=null}},[]),{msgsContainerRef:a,spacerRef:E,lastExternalScrollRef:o,showJumpToBottom:i,scrollProgress:s,activeMsgIdx:h,jumpAlert:N,unreadBelow:ne,jumpToMessage:oe,revealMessage:W,jumpToBottom:ie,resetAlertArming:z}}var er=require("react"),hp=450,pp=45,dp=900,up=180;function Ui(e){let[r,t]=(0,er.useState)(e),n=(0,er.useRef)(e),a=(0,er.useRef)(e),o=(0,er.useRef)(0),i=(0,er.useRef)(0),c=(0,er.useRef)(0),s=(0,er.useRef)(null);return(0,er.useEffect)(()=>()=>{s.current!==null&&cancelAnimationFrame(s.current)},[]),(0,er.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=p=>{let d=Math.min(p-c.current,50);c.current=p;let u=a.current,f=u.length-n.current.length,w=Math.min(dp,Math.max(pp,f*1e3/hp));o.current+=(w-o.current)*(1-Math.exp(-d/up)),i.current+=o.current*d/1e3;let b=Math.floor(i.current);b>0&&(i.current-=b,n.current=u.slice(0,Math.min(u.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 qt=require("react"),Vi=require("@akropolys/sdk");function ji(e,r){let t=(0,Vi.useAkropolysContext)(),[n,a]=(0,qt.useState)(""),[o,i]=(0,qt.useState)("idle"),[c,s]=(0,qt.useState)(null),[l,h]=(0,qt.useState)(null),[p,d]=(0,qt.useState)(null),[u,f]=(0,qt.useState)(yo),[w,b]=(0,qt.useState)(!1),E=(0,qt.useCallback)(async(M,C)=>{try{navigator.clipboard&&window.isSecureContext?await navigator.clipboard.writeText(M):mp(M),d(C),setTimeout(()=>d(null),2e3)}catch{}},[]);(0,qt.useEffect)(()=>{e&&e.type==="request_kiku_key"&&(i("prompt_key"),a(""))},[e]),(0,qt.useEffect)(()=>{if(!c)return;f(yo);let M=setInterval(()=>{f(C=>C<=1?(clearInterval(M),s(null),h(null),0):C-1)},1e3);return()=>clearInterval(M)},[c]);let x=(0,qt.useCallback)(async()=>{let M=n.trim();M&&(t.setKikuPub(M),a(""),i("idle"),await r())},[t,n,r]),L=(0,qt.useCallback)(async()=>{if(!w){b(!0);try{let{secret:M,publicId:C}=await t.mintKikuKey();s(M),h(C),i("idle"),await r()}catch{}finally{b(!1)}}},[t,w,r]);return{keyInput:n,setKeyInput:a,keyPhase:o,setKeyPhase:i,mintedKey:c,setMintedKey:s,mintedPub:l,setMintedPub:h,copied:p,keyCountdown:u,minting:w,copyValue:E,handleUseExistingKey:x,handleCreateKey:L}}function mp(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 Fn=require("react");function Gi({attachments:e,setAttachments:r,setInput:t,send:n,t:a}){let o=(0,Fn.useCallback)(l=>{if(typeof l.id!="string"||!l.id.trim())return;let h=l.name||"",p=`@kiku ${a("displayCapture",{name:h}).trim()}`,d=h||"capture current page";t("");let u=e;r([]);let f={id:l.id,name:h,url:l.url||l.fields?.url,image:l.image,fields:l.fields};n(d,p,u.length>0?u:void 0,"capture",[f])},[e,n,r,t,a]),i=(0,Fn.useCallback)(l=>{let h=l.filter(u=>typeof u.id=="string"&&u.id.trim().length>0).map(u=>({id:u.id,name:u.name||"",url:u.url||u.fields?.url,fields:u.fields,image:u.image||""}));if(h.length===0)return;let p=h.map(u=>u.name).filter(Boolean).join(", "),d=`@kiku ${a("displayCaptureAll",{count:String(h.length)})}`;t(""),r([]),n(p||"capture all",d,void 0,"capture_all",h)},[n,r,t,a]),c=(0,Fn.useCallback)(()=>{let l=`@kiku ${a("displayViewHistory")}`;t(""),r([]),n("show my saved items",l,void 0,"view_history")},[n,r,t,a]),s=(0,Fn.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 vt=require("react"),uc=require("@akropolys/sdk");var Ca=null,Yi=null,wa=null,Dn=null,Ki=!1,Ur=0;function Hn(e,r=130){let t=wa;if(!t||!Ca)return;let n=Ca.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(!Ki)return Ur*=.85,Ur;if(!Yi||!Dn)return Ur;Yi.getByteTimeDomainData(Dn);let e=0;for(let n=0;n<Dn.length;n++){let a=(Dn[n]-128)/128;e+=a*a}let r=Math.sqrt(e/Dn.length),t=Math.min(1,r*3.2);return Ur+=(t-Ur)*(t>Ur?.6:.12),Ur}function Qi(){if(Ki=!1,wa&&Ca&&(wa.gain.cancelScheduledValues(Ca.currentTime),wa.gain.value=1),typeof window<"u"&&"speechSynthesis"in window)try{window.speechSynthesis.cancel()}catch{}}var Te=require("react");var bp=1100,Po=.012,fp=320,kp=.09,gp=.25,Ji=130,xp=700,vp=12,yp=48,wp=.45,Cp=.35,Sp=.2,Zi=.55;function ec({lang:e,onUtterance:r,onError:t,onBargeIn:n,silenceMs:a=bp,paused:o=!1}){let[i,c]=(0,Te.useState)(!1),[s,l]=(0,Te.useState)(!1),[h,p]=(0,Te.useState)(""),[d,u]=(0,Te.useState)(!1),f=(0,Te.useRef)(null),w=(0,Te.useRef)(null),b=(0,Te.useRef)(null),E=(0,Te.useRef)(null),x=(0,Te.useRef)(null),L=(0,Te.useRef)(null),M=(0,Te.useRef)(0),C=(0,Te.useRef)(.008),F=(0,Te.useRef)(0),D=(0,Te.useRef)(0),S=(0,Te.useRef)(""),O=(0,Te.useRef)(0),v=(0,Te.useRef)(0),I=(0,Te.useRef)(!1),$=(0,Te.useRef)(o),P=(0,Te.useRef)(!1),Z=(0,Te.useRef)(!1),ve=(0,Te.useRef)(r),ne=(0,Te.useRef)(t),V=(0,Te.useRef)(n);(0,Te.useEffect)(()=>{ve.current=r},[r]),(0,Te.useEffect)(()=>{ne.current=t},[t]),(0,Te.useEffect)(()=>{V.current=n},[n]),(0,Te.useEffect)(()=>{$.current=o},[o]),(0,Te.useEffect)(()=>{u(typeof window<"u"&&("SpeechRecognition"in window||"webkitSpeechRecognition"in window)&&!!navigator.mediaDevices?.getUserMedia)},[]);let fe=(0,Te.useCallback)(()=>M.current,[]),Q=(0,Te.useCallback)(m=>{let R=E.current;return!R||m.length!==R.frequencyBinCount?!1:(R.getByteFrequencyData(m),!0)},[]),_=(0,Te.useCallback)(()=>E.current?.frequencyBinCount??0,[]),B=(0,Te.useRef)([]),N=(0,Te.useRef)(null),T=(0,Te.useRef)(!1),A=(0,Te.useRef)(0),Y=(0,Te.useRef)(0),y=(0,Te.useCallback)(m=>{let R=E.current;if(!R)return 0;let G=B.current;G.push(m),G.length>yp&&G.shift();let J=0;if(G.length>=12){let Re=0;for(let De of G)Re+=De;if(Re/=G.length,Re>1e-4){let De=0;for(let ze of G)De+=(ze-Re)*(ze-Re);J=Math.min(1,Math.sqrt(De/G.length)/Re/.6)}}let K=0;(!N.current||N.current.length!==R.frequencyBinCount)&&(N.current=new Uint8Array(R.frequencyBinCount));let se=N.current;R.getByteFrequencyData(se);let de=(b.current?.sampleRate??48e3)/2/se.length,me=Math.floor(300/de),q=Math.min(se.length-1,Math.ceil(3400/de)),ge=0,Ie=0;for(let Re=0;Re<se.length;Re++)Ie+=se[Re],Re>=me&&Re<=q&&(ge+=se[Re]);Ie>0&&(K=ge/Ie);let xe=Math.min(1,m/(C.current+Po*3));return wp*xe+Cp*J+Sp*K},[]),z=(0,Te.useCallback)(()=>{let m=S.current.trim();if(S.current="",O.current=v.current,p(""),l(!1),m){P.current=!1;let R=f.current;f.current=null;try{R?.stop()}catch{}ve.current(m)}},[]),k=(0,Te.useCallback)(()=>{let m=E.current,R=L.current;if(!m||!R)return;m.getByteTimeDomainData(R);let G=0;for(let me=0;me<R.length;me++){let q=(R[me]-128)/128;G+=q*q}let J=Math.sqrt(G/R.length),K=Math.min(1,J*4);M.current+=(K-M.current)*(K>M.current?.6:.12);let se=Date.now(),Ce=$.current?Xi()*kp:0;J>C.current+Po+Ce?(F.current=se,D.current||(D.current=se)):(D.current=0,C.current=Math.min(C.current*1.02+2e-5,Math.max(.004,J))),$.current?T.current?(y(J)>Zi?Y.current+=1:Y.current=Math.max(0,Y.current-2),Y.current>=vp?(T.current=!1,Y.current=0,Hn(1,0),V.current?.()):se-A.current>xp&&(T.current=!1,Y.current=0,Hn(1,Ji*2))):D.current&&se-D.current>fp&&y(J)>Zi&&(D.current=0,T.current=!0,A.current=se,Y.current=0,Hn(gp,Ji)):S.current.trim()&&se-F.current>a&&z(),x.current=requestAnimationFrame(k)},[z,a,y]),he=(0,Te.useCallback)(()=>{if(f.current||!I.current)return;let m=window.SpeechRecognition||window.webkitSpeechRecognition,R=new m;O.current=0,v.current=0,R.lang=e||document.documentElement.lang||navigator.language||"en-US",R.interimResults=!0,R.maxAlternatives=1,R.continuous=!0,R.onresult=G=>{let J="";for(let K=O.current;K<G.results.length;K++)J+=G.results[K][0].transcript;v.current=G.results.length,J=J.trim(),J&&(S.current=J,p(J),l(!0))},R.onerror=G=>{let J=G?.error||"";J==="no-speech"||J==="aborted"||ne.current?.(J)},R.onend=()=>{f.current=null,I.current&&P.current&&setTimeout(()=>{he()},120)},f.current=R;try{R.start()}catch{f.current=null,ne.current?.("failed-to-start")}},[e]),oe=(0,Te.useCallback)(()=>{P.current=!1;let m=f.current;f.current=null;try{m?.stop()}catch{}},[]),W=(0,Te.useCallback)(()=>{I.current=!1,T.current=!1,Y.current=0,B.current=[],Hn(1,0),P.current=!1,c(!1),l(!1),p(""),S.current="",M.current=0;let m=f.current;f.current=null;try{m?.abort()}catch{}x.current!==null&&(cancelAnimationFrame(x.current),x.current=null),w.current?.getTracks().forEach(R=>R.stop()),w.current=null,E.current=null,b.current?.close().catch(()=>{}),b.current=null},[]),ie=(0,Te.useCallback)(async()=>{if(!(I.current||!d)){I.current=!0,c(!0);try{let m=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});w.current=m;let R=window.AudioContext||window.webkitAudioContext,G=new R;b.current=G;let J=G.createAnalyser();J.fftSize=1024,J.smoothingTimeConstant=.25,G.createMediaStreamSource(m).connect(J),E.current=J,L.current=new Uint8Array(J.fftSize),C.current=.008,F.current=Date.now(),x.current=requestAnimationFrame(k)}catch(m){I.current=!1,c(!1),ne.current?.(m?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}P.current=!0,he()}},[d,k,he]);return(0,Te.useEffect)(()=>{i&&(o?(S.current="",p(""),T.current=!1,Y.current=0,B.current=[],oe()):(T.current=!1,F.current=Date.now(),P.current=!0,he()))},[o,i,he,oe]),(0,Te.useEffect)(()=>{if(!i||o)return;let m=setInterval(()=>{let R=!!f.current,G=M.current>C.current+Po;R&&G&&S.current},2e3);return()=>clearInterval(m)},[i,o]),(0,Te.useEffect)(()=>()=>{W()},[W]),{supported:d,active:i,hearing:s,interim:h,micLevel:fe,micSpectrum:Q,spectrumBins:_,start:ie,stop:W}}var te=require("react");var tc=[-1,-1,-1,-1,2,4,6,8,-1,-1,-1,-1,2,4,6,8],rc=[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],_o=e=>e<0?0:e>88?88:e,nc=e=>e<-32768?-32768:e>32767?32767:e,Bn=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=rc[i],l=r[c]-a,h=0;l<0&&(h=8,l=-l);let p=s>>3;l>=s&&(h|=4,l-=s,p+=s),s>>=1,l>=s&&(h|=2,l-=s,p+=s),s>>=1,l>=s&&(h|=1,p+=s),a=nc(h&8?a-p:a+p),i=_o(i+tc[h]),n[4+(c>>1)]|=h<<4*(c&1)}return this.index=i,n.buffer}};function ac(e){let r=new Uint8Array(e);if(r.length<4)return new Float32Array(0);let t=new DataView(e).getInt16(0,!0),n=_o(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=rc[n],l=s>>3;c&4&&(l+=s),c&2&&(l+=s>>1),c&1&&(l+=s>>2),t=nc(c&8?t-l:t+l),n=_o(n+tc[c]),o[i]=t/32768}return o}function Ir(e,r,t){for(let n=0;n<t.length;n++)e.setUint8(r+n,t.charCodeAt(n))}function oc(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);Ir(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Ir(i,8,"WAVE"),Ir(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),Ir(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 sc(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);Ir(i,0,"RIFF"),i.setUint32(4,36+t*2,!0),Ir(i,8,"WAVE"),Ir(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),Ir(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 mn=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 ic(e,r,t){let n=e.map(a=>({...a}));for(let[a,o]of[["user",r],["assistant",t]]){if(!o.trim())continue;let i=-1;for(let c=n.length-1;c>=0;c--)if(n[c].role===a&&!n[c].done){i=c;break}if(i<0&&a==="user"){let c=n.map(s=>s.role).lastIndexOf("user");if(c>=0&&n[c].text===o.trim())continue}i>=0?n[i].text=o.trim():n.push({role:a,text:o.trim(),done:!0})}return n.map(a=>({...a,done:!0}))}var Fo=16e3,Sa=24e3,Mp=.08,Tp=.12,Rp=.03,Lp=.08;var Ep=.12,zp=500,Np=6e4,Ip=`
3
3
  class KikuCapture extends AudioWorkletProcessor {
4
4
  constructor() {
5
5
  super();
6
- this._ratio = sampleRate / ${Ao};
7
- this._chunk = ${Math.round(Ao*.04)};
6
+ this._ratio = sampleRate / ${Fo};
7
+ this._chunk = ${Math.round(Fo*.04)};
8
8
  this._acc = new Int16Array(this._chunk);
9
9
  this._n = 0;
10
10
  this._pos = 0;
@@ -32,8 +32,10 @@ class KikuCapture extends AudioWorkletProcessor {
32
32
  }
33
33
  }
34
34
  registerProcessor('kiku-capture', KikuCapture);
35
- `;function sc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function ic(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 cc(e){let[r,t]=(0,ne.useState)("idle"),[n,a]=(0,ne.useState)(!1),[o,i]=(0,ne.useState)([]),[c,s]=(0,ne.useState)(null),[l,h]=(0,ne.useState)(!1),p=(0,ne.useRef)(null),d=(0,ne.useRef)(!1),u=(0,ne.useRef)(new un),f=(0,ne.useRef)(()=>!1),C=(0,ne.useRef)(null),b=(0,ne.useRef)(null),E=(0,ne.useRef)(!1),x=(0,ne.useRef)(0),L=(0,ne.useRef)(0),M=(0,ne.useRef)(!1),w=(0,ne.useRef)(null),D=(0,ne.useRef)(0),H=(0,ne.useRef)(!1),S=(0,ne.useRef)(!1),O=(0,ne.useRef)(null),v=(0,ne.useRef)(null),I=(0,ne.useRef)(null),q=(0,ne.useRef)(null),P=(0,ne.useRef)(0),ee=(0,ne.useRef)(!1),ke=(0,ne.useRef)([]),oe=(0,ne.useRef)(0),V=(0,ne.useRef)(new Set),me=(0,ne.useRef)(null),J=(0,ne.useRef)(null),F=(0,ne.useRef)(Ca),$=(0,ne.useRef)(e);(0,ne.useEffect)(()=>{$.current=e;let X=v.current;if(X)for(let te of X.getAudioTracks())te.enabled=!e.muted},[e]);let N=(0,ne.useRef)(!1),T=(0,ne.useRef)([]),A=(0,ne.useRef)(new Hn),K=(0,ne.useRef)(null),y=(0,ne.useRef)(""),z=(0,ne.useRef)(""),[k,pe]=(0,ne.useState)([]),se=(0,ne.useRef)([]);se.current=k;let U=(0,ne.useRef)([]),[le,m]=(0,ne.useState)([]),R=(0,ne.useRef)(0),G=(0,ne.useRef)(!1),Z=(0,ne.useRef)(null),j=(0,ne.useRef)(new Map),ie=(0,ne.useRef)([]),ve=(0,ne.useRef)(void 0),ue=(0,ne.useRef)(null),_=(0,ne.useRef)([]),re=(0,ne.useRef)([]),Se=(0,ne.useCallback)(()=>{let X=y.current.trim(),te=z.current.trim(),ge=ue.current?Math.max(.1,(Date.now()-ue.current)/1e3):void 0,Q;if(_.current.length>0)try{let fe=nc(_.current,F.current);Q=URL.createObjectURL(fe)}catch(fe){console.error("[kiku] failed to encode bot audio wav:",fe)}let we;if(re.current.length>0)try{let fe=ac(re.current,Ao);we=URL.createObjectURL(fe)}catch(fe){console.error("[kiku] failed to encode user audio wav:",fe)}let Me=ie.current.length?ie.current:void 0,Re=ve.current;y.current="",z.current="",ue.current=null,_.current=[],re.current=[],ie.current=[],ve.current=void 0,!(!X&&!te&&!Me&&!Re)&&$.current.onExchange?.({heard:X,said:te,duration:ge,userAudioUrl:we,audioUrl:Q,images:Me,visualization:Re})},[]),De=(0,ne.useCallback)(()=>{},[]),ye=(0,ne.useCallback)(X=>{if(x.current=Date.now(),$.current.muted)return;let te=new Int16Array(X),ge=0;for(let we=0;we<te.length;we+=8){let Me=Math.abs(te[we]);Me>ge&&(ge=Me)}ge>1200&&(D.current=Date.now());let Q=p.current;if(!(!N.current||!Q||Q.readyState!==WebSocket.OPEN)){if(Q.bufferedAmount>256*1024){f.current()||$.current.onError?.("connection");return}re.current.push(new Int16Array(X.slice(0)));try{Q.send(A.current.encode(new Int16Array(X)))}catch{f.current()||$.current.onError?.("connection")}}},[]),Ee=(0,ne.useCallback)(()=>{T.current=[]},[]),Fe=(0,ne.useCallback)(()=>{let X=O.current;if(K.current&&X&&X.state!=="closed")return K.current;let te=window.AudioContext||window.webkitAudioContext;if(!te)return Promise.resolve(null);let ge=new te({latencyHint:"interactive",sampleRate:Ca});O.current=ge;let Q=URL.createObjectURL(new Blob([Lp],{type:"application/javascript"}));return K.current=ge.audioWorklet.addModule(Q).then(()=>ge).catch(()=>null).finally(()=>URL.revokeObjectURL(Q)),K.current},[]),Ie=(0,ne.useCallback)(()=>{typeof window>"u"||Fe()},[Fe]),be=(0,ne.useCallback)(()=>{let X=q.current;if(!X)return 0;let te=new Uint8Array(X.fftSize);X.getByteTimeDomainData(te);let ge=0;for(let Q=0;Q<te.length;Q++){let we=(te[Q]-128)/128;ge+=we*we}return Math.min(1,Math.sqrt(ge/te.length)*4)},[]),Ue=r==="speaking"||r==="thinking",Ke=(0,ne.useCallback)(X=>{let te=Ue?me.current:q.current;return!te||X.length!==te.frequencyBinCount?!1:(te.getByteFrequencyData(X),!0)},[Ue]),Qe=(0,ne.useCallback)(()=>(Ue?me.current:q.current)?.frequencyBinCount??0,[Ue]),He=(0,ne.useCallback)(()=>{let X=J.current,te=O.current;if(!X||!te||te.state==="closed"){P.current=0;for(let we of V.current)try{we.onended=null,we.stop()}catch{}V.current.clear();return}let ge=te.currentTime,Q=ge+Sp;X.gain.cancelScheduledValues(ge),X.gain.setValueAtTime(X.gain.value,ge),X.gain.linearRampToValueAtTime(0,Q),X.gain.setValueAtTime(1,Q);for(let we of V.current)try{we.onended=null,we.stop(Q)}catch{}V.current.clear(),P.current=Q},[]),wt=(0,ne.useCallback)(X=>{let te=O.current,ge=me.current;if(!te||!ge||X.length===0)return;te.state==="suspended"&&te.resume().catch(()=>{});let Q=te.createBuffer(1,X.length,F.current);Q.getChannelData(0).set(X);let we=te.createBufferSource();we.buffer=Q,we.connect(ge);let Me=te.currentTime,Re=P.current>Me?P.current:Me+Cp;we.start(Re),P.current=Re+Q.duration,V.current.add(we),we.onended=()=>{V.current.delete(we),V.current.size===0&&(P.current=0,ee.current=!1,t(fe=>fe==="speaking"?"listening":fe))},t(fe=>fe==="speaking"||fe==="idle"||fe==="ended"?fe:"speaking")},[]),Ct=(0,ne.useCallback)(()=>{let X=ke.current;ke.current=[],oe.current=0;for(let te of X)wt(te)},[wt]),Nt=(0,ne.useCallback)(()=>{ke.current=[],oe.current=0},[]),Vt=(0,ne.useCallback)(X=>{let te=O.current;if(!te||X.length===0)return;if(P.current>te.currentTime&&ke.current.length===0){wt(X);return}let Q=ee.current?wp:yp;ke.current.push(X),oe.current+=X.length/F.current,oe.current>=Q&&(ee.current=!0,Ct())},[wt,Ct]),Gt=(0,ne.useRef)(null),It=(0,ne.useRef)(null),Ce=(0,ne.useCallback)(()=>{Gt.current&&(clearInterval(Gt.current),Gt.current=null);let X=It.current,te=O.current;if(X&&te&&te.state!=="closed"){let ge=te.currentTime;try{X.gain.cancelScheduledValues(ge),X.gain.setValueAtTime(X.gain.value,ge),X.gain.linearRampToValueAtTime(1e-4,ge+.04)}catch{}setTimeout(()=>{try{X.disconnect()}catch{}It.current===X&&(It.current=null)},50)}},[]),et=(0,ne.useCallback)(()=>{},[]),bt=(0,ne.useCallback)(X=>{for(let ge of j.current.values())ge(!1);Z.current=null,G.current=!1,C.current!==null&&clearTimeout(C.current),b.current!==null&&clearTimeout(b.current),C.current=b.current=null,E.current=!1,L.current=0,Se();let te=p.current;p.current=null;try{te?.close()}catch{}N.current=!1,T.current=[],K.current=null,ee.current=!1,ke.current=[],oe.current=0,Ce(),He(),w.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,v.current?.getTracks().forEach(ge=>ge.stop()),v.current=null,q.current=null,me.current=null,J.current=null,O.current?.close().catch(()=>{}),O.current=null,t(X),a(!1),i([]),d.current=!1,M.current=!1},[Se,He,Ce]),Ve=(0,ne.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}bt("idle")},[bt]),nt=(0,ne.useCallback)(X=>{let te=[...U.current,...se.current.filter(fe=>fe.done)].filter(fe=>fe.text).map(fe=>({role:fe.role,text:fe.text})),ge=$.current.getShopperAuth,Q=fe=>{if(!(p.current!==X||!d.current||X.readyState!==WebSocket.OPEN))try{X.send(JSON.stringify({type:"open",history:te,...fe?{authorization:fe}:{}}))}catch{}};if(!ge){Q();return}let we=new AbortController,Me=setTimeout(()=>we.abort(),5e3);new Promise(fe=>{we.signal.addEventListener("abort",()=>fe(void 0),{once:!0}),Promise.resolve().then(()=>ge(we.signal)).then(fe,()=>fe(void 0))}).then(Q).finally(()=>clearTimeout(Me))},[]),ut=(0,ne.useCallback)(X=>{let te=!1;b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==X||N.current||f.current()||($.current.onError?.("connection"),Ve())},3e4),X.binaryType="arraybuffer",A.current=new Hn,X.onopen=()=>{p.current!==X||!M.current||(M.current=!1,nt(X))},X.onmessage=ge=>{if(p.current!==X)return;if(ge.data instanceof ArrayBuffer){if(!H.current){H.current=!0;let Me=z.current.trim();Me&&pe(Re=>{let fe=Re.slice();for(let Je=fe.length-1;Je>=0;Je--)fe[Je].role==="user"&&!fe[Je].done&&(fe[Je]={...fe[Je],done:!0});return fe.push({role:"assistant",text:Me,done:!1}),fe})}!S.current&&D.current&&(S.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-D.current)+"ms")),Ce();let we=rc(ge.data);_.current.push(we.slice()),Vt(we);return}let Q;try{Q=JSON.parse(ge.data)}catch{return}switch(Q.type){case"image_received":j.current.get(Q.imageId)?.(!0);break;case"image_error":j.current.get(Q.imageId)?.(!1);break;case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,E.current=!0,x.current=Date.now(),Q.sampleRate&&(F.current=Q.sampleRate,Q.sampleRate!==Ca&&console.warn(`[kiku] live audio rate ${Q.sampleRate} != context ${Ca}; per-buffer resampling will click at every chunk seam`)),typeof Q.secondsLeft=="number"&&s(Q.secondsLeft),h(Q.photos===!0),G.current=Q.imageInput===!0;let we=Z.current;if(we&&G.current)try{X.send(JSON.stringify({type:"image",imageId:we.id,image:we.image}))}catch{}N.current=!0,t("listening"),Ee(),w.current?.(),w.current=null,nr("connect",!0);break;case"hearing":ue.current||(ue.current=Date.now()),a(!0);break;case"thinking":ue.current||(ue.current=Date.now()),a(!1),t("thinking"),et(),Q.tool==="visualize"&&m(Me=>Me.some(Re=>Re.pending)?Me:[...Me,{id:++R.current,url:"",pending:!0}]);break;case"viz":typeof Q.url=="string"&&Q.url?(ve.current=Q.url,m(Me=>Me.map(Re=>Re.pending?{...Re,url:Q.url,pending:!1}:Re))):m(Me=>Me.filter(Re=>!Re.pending));break;case"heard":V.current.size===0&&(P.current=0),ue.current||(ue.current=Date.now(),nr("heard")),y.current+=Q.text,pe(Me=>{let Re=Me.slice(),fe=Re[Re.length-1];return fe&&fe.role==="user"&&!fe.done?Re[Re.length-1]={...fe,text:y.current.trim()}:Re.push({role:"user",text:y.current.trim(),done:!1}),Re}),a(!1),t("thinking"),et();break;case"said":if(z.current+=Q.text,!H.current)break;pe(Me=>{let Re=Me.slice();for(let tt=Re.length-1;tt>=0;tt--)Re[tt].role==="user"&&!Re[tt].done&&(Re[tt]={...Re[tt],done:!0});let fe=Re[Re.length-1],Je=z.current.trim();return fe&&fe.role==="assistant"&&!fe.done?Re[Re.length-1]={...fe,text:Je}:Re.push({role:"assistant",text:Je,done:!1}),Re});break;case"interrupted":ee.current=!1,Nt(),Ce(),He(),nr("interrupt"),a(!1),t("listening");break;case"turn_complete":S.current=!1,H.current=!1,D.current=0,pe(Me=>Me.map(Re=>Re.done?Re:{...Re,done:!0})),Ct(),ee.current=!1,Ce(),a(!1),Se();break;case"sources":Array.isArray(Q.sources)&&Q.sources.length&&i(Q.sources);break;case"seconds":typeof Q.secondsLeft=="number"&&s(Q.secondsLeft);break;case"refused":$.current.onRefused?.(Q.code||"guest"),Ve();break;case"error":if(Q.code==="session_expiring"&&f.current())return;$.current.onError?.(Q.code||"unavailable"),Ve();break}},X.onclose=ge=>{p.current===X&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(un.canRetry(ge.code)&&f.current())&&(ge.code===4402&&(te=!0,$.current.onError?.(ge.reason==="site"?"siteLimit":"limit")),bt("ended")))},X.onerror=()=>{!te&&p.current===X&&console.warn("[kiku] voice transport interrupted")}},[Nt,Vt,Se,Ee,He,Ct,nt,et,Ce,Ve,bt]),_t=(0,ne.useCallback)(X=>{for(let we of j.current.values())we(!1);let te=p.current;if(p.current=null,N.current=!1,se.current=oc(se.current,y.current,z.current),pe(se.current),m(we=>we.filter(Me=>!Me.pending)),Se(),H.current=!1,S.current=!1,ee.current=!1,Nt(),t("connecting"),He(),Ce(),te){try{te.send(JSON.stringify({type:"close"}))}catch{}try{te.close()}catch{}}let ge=$.current;M.current=!0;let Q=new WebSocket(ic(ge,X),sc(ge));p.current=Q,ut(Q)},[ut,Nt,Se,He,Ce]),jt=(0,ne.useCallback)(()=>{if(!d.current||!E.current||!I.current)return!1;if(C.current!==null)return!0;let X=u.current.nextDelay();if(X===null)return $.current.onError?.("connection"),Ve(),!0;for(let ge of j.current.values())ge(!1);let te=p.current;p.current=null,N.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{te?.close()}catch{}return He(),Nt(),Ce(),a(!1),t("connecting"),C.current=setTimeout(()=>{C.current=null,d.current&&_t()},X),!0},[Nt,He,_t,Ve,Ce]);f.current=jt,(0,ne.useEffect)(()=>{let X=()=>{if(!d.current||!N.current||!I.current||document.visibilityState==="hidden")return;let ge=O.current;if(!ge)return;let Q=Date.now();if(Q-x.current<1e4){L.current=0;return}L.current?Q-L.current>1e4&&($.current.onError?.("audio-capture"),Ve()):(L.current=Q,ge.resume().catch(()=>{}))},te=window.setInterval(X,2e3);return document.addEventListener("visibilitychange",X),()=>{clearInterval(te),document.removeEventListener("visibilitychange",X)}},[Ve]);let pt=(0,ne.useRef)(e.voice);(0,ne.useEffect)(()=>{pt.current!==e.voice&&(pt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&_t(e.voice))},[e.voice,r,_t]);let St=(0,ne.useCallback)(async(X=[])=>{if(d.current&&(p.current||C.current!==null))return;d.current=!0,u.current=new un,E.current=!1,t("connecting");let te=$.current;T.current=[],U.current=X,se.current=[],pe([]),m([]),y.current="",z.current="";let ge=Fe();O.current?.resume().catch(()=>{}),Lr();let Q=p.current;Q&&Q.readyState===WebSocket.OPEN?nt(Q):Q&&Q.readyState===WebSocket.CONNECTING?M.current=!0:(Q=new WebSocket(ic(te),sc(te)),p.current=Q,M.current=!0,ut(Q));let we;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};we=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(tt){try{Q.close()}catch{}p.current=null,t("idle"),te.onError?.(tt?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==Q){we.getTracks().forEach(tt=>tt.stop());return}v.current=we;for(let tt of we.getAudioTracks())tt.enabled=!$.current.muted;let Me=await ge;if(p.current!==Q){we.getTracks().forEach(tt=>tt.stop());return}if(!Me){$.current.onError?.("audio-worklet"),Ve();return}Me.state==="suspended"&&Me.resume().catch(()=>{});let Re=Me.createAnalyser();Re.fftSize=1024,Re.smoothingTimeConstant=.25,q.current=Re;let fe=Me.createGain();fe.gain.value=1,fe.connect(Me.destination),J.current=fe;let Je=Me.createAnalyser();Je.fftSize=1024,Je.smoothingTimeConstant=.25,Je.connect(fe),me.current=Je;try{let tt=new AudioWorkletNode(Me,"kiku-capture");I.current=tt,tt.port.onmessage=Qr=>ye(Qr.data);let fr=Me.createMediaStreamSource(we),kr=()=>{if(!(p.current!==Q||!I.current)){try{fr.connect(Re)}catch{}try{fr.connect(tt)}catch{}}};N.current?kr():w.current=kr}catch{$.current.onError?.("audio-worklet"),Ve()}},[ut,Fe,ye,nt,Ve]);(0,ne.useEffect)(()=>{if(r!=="listening"){a(!1);return}let X=0,te=!1,ge=Date.now(),Q=window.setInterval(()=>{let we=Date.now();if(!$.current.muted&&be()>Mp&&(X=we),we-Math.max(X,ge)>Rp){window.clearInterval(Q),$.current.onError?.("idle"),Ve();return}let Me=we-X<Tp;Me!==te&&(te=Me,a(Me))},100);return()=>window.clearInterval(Q)},[r,be,Ve]);let dt=(0,ne.useCallback)(()=>{Ie()},[Ie]);(0,ne.useEffect)(()=>()=>{Ve()},[Ve]),(0,ne.useEffect)(()=>{let X=v.current;if(X)for(let te of X.getAudioTracks())te.enabled=!e.muted},[e.muted,r]);let Ot=(0,ne.useCallback)(async X=>{let te=p.current;if(!d.current||!N.current||!te||te.readyState!==WebSocket.OPEN||!X.type.startsWith("image/"))return!1;let ge;try{ge=await xa(X,"image/jpeg")}catch{return!1}if(ge.length>Math.ceil(4*1024*1024/3)*4+32||p.current!==te||!d.current)return!1;let Q=++R.current;m(fe=>[...fe,{id:Q,url:ge,pending:!1,sending:!0}]);let we=$.current.storeScene,Me=we?await we(ge).catch(()=>!1):!1;if(p.current!==te||!d.current||te.readyState!==WebSocket.OPEN)return m(fe=>fe.filter(Je=>Je.id!==Q)),!1;let Re=Me;return G.current?Re=await new Promise(fe=>{let Je=setTimeout(()=>tt(!1),15e3),tt=fr=>{clearTimeout(Je),j.current.delete(Q),fe(fr)};j.current.set(Q,tt);try{te.send(JSON.stringify({type:"image",imageId:Q,image:ge}))}catch{tt(!1)}}):Me&&te.send(JSON.stringify({type:"text",text:"(The visitor attached a photo for editing. Briefly ask what they would like changed.)"})),!Re||p.current!==te||!d.current||!N.current?(m(fe=>fe.filter(Je=>Je.id!==Q)),!1):(G.current&&(Z.current={id:Q,image:ge}),m(fe=>fe.map(Je=>Je.id===Q?{...Je,sending:!1}:Je)),ie.current.push(ge),!0)},[]),ir=(0,ne.useCallback)(X=>{let te=p.current;te&&te.readyState===WebSocket.OPEN&&X.trim()&&te.send(JSON.stringify({type:"text",text:X}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:k,images:le,micLevel:be,micSpectrum:Ke,spectrumBins:Qe,start:St,stop:Ve,prewarm:dt,attachPhoto:Ot,ask:ir}}var Ep=e=>e==="connecting"||e==="ended"?"idle":e,lc={turns:[],images:[]},hc=()=>`v${Date.now().toString(36)}`;function zp(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 dc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:i}){let c=(0,pc.useAkropolysContext)(),[s,l]=(0,xt.useState)("off"),[h,p]=(0,xt.useState)("idle"),[d,u]=(0,xt.useState)(""),[f,C]=(0,xt.useState)(!1),[b,E]=(0,xt.useState)(!1),[x,L]=(0,xt.useState)(()=>{try{let A=localStorage.getItem(fo);if(A&&En.some(K=>K.name===A))return A}catch{}return n||"Algenib"}),M=(0,xt.useRef)(hc()),w=(0,xt.useCallback)(A=>{L(A);try{localStorage.setItem(fo,A)}catch{}},[]),D=Ji({lang:e||r,onUtterance:A=>{p("thinking"),o(A)},onError:A=>{l("off"),p("idle"),u(A==="not-allowed"?"micDenied":A==="language-not-supported"?"micLangUnsupported":A==="audio-capture"?"micMissing":A==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Ki()}}),S=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",O=c?.api?.siteId||c?.siteId||"",v=c?.api?.apiToken||c?.apiToken||"",I=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,q=c?.getShopperName?.()||void 0,P=cc({apiUrl:S,siteId:O,token:v,kikuId:I,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:A=>c?.storeScene?.(A)??Promise.resolve(!1),getShopperAuth:A=>c?.api?.getShopperAuth?.(A)??Promise.resolve(void 0),name:q,language:t,voice:x,muted:f,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"){E(!0),P.stop(),l("off");return}l("off"),u(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")&&E(!0),l("off"),u("voiceUnavailable")}}),ee=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ke}=P;(0,xt.useEffect)(()=>{if(!ee)return;let A=window;if(A.requestIdleCallback){let y=A.requestIdleCallback(ke,{timeout:3e3});return()=>A.cancelIdleCallback(y)}let K=window.setTimeout(ke,1500);return()=>window.clearTimeout(K)},[ee,ke]),(0,xt.useEffect)(()=>{s==="converse"&&P.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[s,P.state]);let[oe,V]=(0,xt.useState)(lc),me=(0,xt.useCallback)(async A=>{if(!ei()){u("micInsecure");return}if(u(""),l(A),A==="dictate")p("listening"),await D.start();else{let K=zp(a,M.current);V(K),P.start(K.turns)}},[P,D,a]),J=(0,xt.useCallback)(()=>{P.stop(),M.current=hc(),V(lc),P.start([])},[P]),F=(0,xt.useCallback)(()=>{l("off"),p("idle"),D.stop(),P.stop()},[P,D]),$=s==="converse"?Ep(P.state):s==="dictate"?h==="listening"?D.hearing?"speaking":"listening":h:"idle",N=s==="converse"&&P.state!=="listening"&&P.state!=="thinking"&&P.state!=="speaking";return{attachPhoto:async A=>{await P.attachPhoto(A)||u("voicePhotoFailed")},voiceMode:s,voicePhase:$,voiceConnecting:N,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:C,voiceSecondsLeft:P.secondsLeft??null,voiceBlocked:b,liveVoiceName:x,chooseVoice:w,canConverse:ee,startVoice:me,stopVoice:F,voice:D,live:P,earlier:oe,newVoiceChat:J}}var Ge=Yt(require("react"));var it=require("react"),Ne=require("react/jsx-runtime"),Po={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}},_o={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}},Sa=[[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]],Np=.42,Ip=170;function Ap(e){let r=1;for(;r<Sa.length-1&&Sa[r][0]<e;)r++;let[t,n,a]=Sa[r-1],[o,i,c]=Sa[r],s=o===t?0:(e-t)/(o-t),l=s*s*(3-2*s);return[n+(i-n)*l,a+(c-a)*l]}var Bn=6,uc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Ir=(e,r,t)=>Math.max(r,Math.min(t,e));function mc(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 Pp(e,r,t,n,a){let o=Ir(e*t,8,r*.96),i=Ir(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,s=.46,l=Ir((e-o)/e,0,1),h=Ir((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)}`+mc(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)}`+mc(-e,r-i,-r+o,-a)+"Z"}var mn=[{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)"}],Ho=[{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)"}],Vu=[...mn,...Ho];function Fo(e){let n=(!Ho.includes(e)&&Math.random()<.26?Ho:mn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function pr(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function Do(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[2])})`}function _p(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]}var Fp=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],bc=[.05,.15,.42,.74],Dp=[.52,.72,.9,1],fc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function kc({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,it.useRef)(s),h=(0,it.useRef)(e);h.current=e;let p=(0,it.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??d,f=o?.eyelashes??d,C=o?.blush??d,b=(0,it.useRef)(null),E=(0,it.useRef)(null),x=(0,it.useRef)(null),L=(0,it.useRef)(null),M=(0,it.useRef)(null),w=(0,it.useRef)(null),D=(0,it.useRef)(null),H=(0,it.useRef)(null),S=(0,it.useRef)(null),O=(0,it.useRef)(null),v=(0,it.useRef)(null),I=(0,it.useRef)(null),q=(0,it.useRef)(null),P=(0,it.useRef)(null),ee=(0,it.useRef)([]),ke=(0,it.useRef)([]),oe=(0,it.useRef)(null),V=(0,it.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,me=(0,it.useRef)(i);return me.current=i,(0,it.useEffect)(()=>{let J=window.matchMedia("(prefers-reduced-motion: reduce)").matches,F={},$={};uc.forEach(Ce=>{F[Ce]=Po.idle[Ce]??_o.idle[Ce]??0,$[Ce]=0});let N=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),T=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),A=1800,K=-1,y=0,z=2600,k=0,pe=!1,se=9e3+Math.random()*8e3,U=-1,le=0;l.current&&!J&&(U=Np,le=performance.now()+Ip);let m=0,R=0,G=0,Z=4200,j=0,ie=0,ve=0,ue=12e3,_=mn[0],re=pr(_.color),Se=pr(_.light),De=[...re],ye=[...Se],Ee=2600,Fe=-1/0,Ie=!1,be=0,Ue=!1,Ke=0,Qe=0,He=0,wt=!1,Ct=0,Nt=Ce=>{Ce-Fe<Ee?(_=Fo(_),De=pr(_.color),ye=pr(_.light),Fe=-1/0):Fe=Ce},Vt=(Ce,et,bt,Ve)=>{let nt=h.current,ut=Array.from({length:Bn},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),_t=(jt,pt,St=0)=>{let dt=Math.max(4,54*Math.max(.06,et));ut[jt]={x:pt+bt,y:-4+Ve+St,w:21,h:dt,rx:10.5,a:1}};if(nt==="thinking"){let pt=Ce%2800/2800,St=Math.pow(Math.sin(pt*Math.PI*2)*.5+.5,3);for(let dt=0;dt<4;dt++){let Ot=Ce/700+dt/4*Math.PI*2,ir=(26-dt%2*5)*(1-.94*St),X=16+St*6+Math.sin(Ce/420+dt)*1.4;ut[dt]={x:Math.cos(Ot)*ir,y:Math.sin(Ot)*ir*.86+2,w:X,h:X,rx:X/2,a:1}}}else if(nt==="visualizing")ut[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(nt==="speaking")for(let pt=0;pt<5;pt++){let St=12+Math.abs(Math.sin(Ce/150+pt*.9))*26;ut[pt]={x:(pt-4/2)*15,y:-2,w:9,h:St,rx:4.5,a:1}}else nt==="failed"?(_t(0,-22,8),_t(1,22,8)):(_t(0,-22),_t(1,22));return ut};c&&(c.current=()=>{if(U>=0){Ue=!0,_=Fo(_),De=pr(_.color),ye=pr(_.light),Fe=-1/0;return}U=0,Nt(Ke),se=Ke+4e3});let Gt=Ce=>{Ke=Ce;let et=h.current,bt=Po[et]??Po.idle,Ve=_o[et]??_o.idle,nt=et==="idle"||et==="failed";nt&&!J&&(Ce>z&&(y=(Math.random()-.5)*2,z=Ce+1800+Math.random()*3600),F.wantGx=y*5);let ut=p.current?1:0;He=(He+(ut-Qe)*.1)*.88,Qe+=He;let _t=p.current&&!J?Math.sin(Ce/480)*.055*Qe:0,jt={bw:bt.bw*(1+Qe*.34+_t),bh:bt.bh*(1+Qe*.2+_t),tr:bt.tr,br:bt.br,bow:bt.bow,warm:Ve.warm,wob:Ve.wob,lid:Ve.lid,gx:nt&&!J?y*5:0,gy:nt&&!J?Math.sin(Ce/2600)*2:0};!J&&nt&&(K<0&&Ce>A&&(K=0),K>=0&&(K+=1/7,jt.lid=Ve.lid*Math.abs(K-.5)*2,K>=1&&(K=-1,jt.lid=Ve.lid,A=Ce+(Math.random()<.22?340:2600+Math.random()*4200)))),uc.forEach(Be=>{let lt=Be;if(J){F[lt]=jt[lt];return}let Xe=lt==="lid"?.42:.11,Ft=lt==="lid"?.55:.78;$[lt]=($[lt]+(jt[lt]-F[lt])*Xe)*Ft,F[lt]+=$[lt]});let pt=0,St=0;!J&&p.current&&U<0&&Ce>Ct&&(U=0,Ct=Ce+2100,se=Ce+4e3),!J&&et==="idle"?U<0&&Ce>se&&(U=0,Ie?(Ie=!1,be=0,_=Fo(_),De=pr(_.color),ye=pr(_.light),Fe=-1/0):(be++,Nt(Ce))):U<0&&(se=Ce+3e3+Math.random()*3e3),U>=0&&(Ce>=le&&(U+=1/96),[pt,St]=Ap(U),U>=1&&(U=-1,pt=0,St=0,Ue?(Ue=!1,be=0,se=Ce+150):!Ie&&be>=2?(Ie=!0,se=Ce+240):se=Ce+5e3+Math.random()*5e3));let dt=Math.max(0,pt);if(p.current!==wt){wt=p.current;let Be=p.current?fc:_;De=pr(Be.color),ye=pr(Be.light),p.current&&!J&&(U<0&&(U=0),Ct=Ce+2600)}let Ot=p.current?fc:_;if(J)re=[...De],Se=[...ye];else for(let Be=0;Be<3;Be++)re[Be]+=(De[Be]-re[Be])*.055,Se[Be]+=(ye[Be]-Se[Be])*.055;let ir=Do(re),X=Do(Se);I.current?.setAttribute("stop-color",ir),q.current?.setAttribute("stop-color",X),P.current?.setAttribute("stop-color",X);for(let Be=0;Be<4;Be++){let lt=bc[Be]+(Dp[Be]-bc[Be])*Qe;ee.current[Be]?.style.setProperty("stop-color",Do(_p(Fp[Be],re,lt)))}let te=.34+Math.sin(Ce/1200)*.06,ge=dt>.02?Math.min(.72,te+dt*.34):te;v.current?.setAttribute("opacity",ge.toFixed(3)),dt>.04?me.current?.(dt,Ot.color,Ot.glow):It>.04&&me.current?.(0,Ot.color,Ot.glow),It=dt;let Q=J?0:Math.sin(Ce/1900)*.9*F.wob,we=F.bw*(1+pt*.55)+Q*.4,Me=F.bh*(1-pt*.62),Re=Pp(we,Me,Ir(F.tr+dt*.5,0,1.2),Ir(F.br+dt*.9,0,1),F.bow+Q+dt*5);b.current?.setAttribute("d",Re),E.current?.setAttribute("d",Re);let fe=et==="thinking";fe!==pe&&(pe=fe,oe.current?.setAttribute("filter",fe?`url(#${V}-goo)`:"none"));let Je=Vt(Ce,F.lid*(1-dt*.85),F.gx,F.gy);for(let Be=0;Be<Bn;Be++){let lt=Je[Be],Xe=N[Be],Ft=T[Be];for(let Dt of["x","y","w","h","rx","a"]){if(J){Xe[Dt]=lt[Dt];continue}Ft[Dt]=(Ft[Dt]+(lt[Dt]-Xe[Dt])*.16)*.74,Xe[Dt]+=Ft[Dt]}let mt=ke.current[Be];mt&&(mt.setAttribute("x",(Xe.x-Xe.w/2).toFixed(2)),mt.setAttribute("y",(Xe.y-Xe.h/2).toFixed(2)),mt.setAttribute("width",Math.max(0,Xe.w).toFixed(2)),mt.setAttribute("height",Math.max(0,Xe.h).toFixed(2)),mt.setAttribute("rx",Math.max(0,Math.min(Xe.rx,Xe.w/2,Xe.h/2)).toFixed(2)),mt.setAttribute("opacity",Ir(Xe.a,0,1).toFixed(2)))}let tt=J?0:Math.sin(Ce/Ve.breath)*1.5;!J&&nt&&U<0?(Ce>Z&&(G=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),Z=Ce+2600+Math.random()*4200),Ce>ue&&(ve=ve>.1?0:1,ue=Ce+(ve>.1?900:9e3+Math.random()*11e3))):(G=0,ve=0),R=(R+(G-m)*.028)*.9,m+=R,ie=(ie+(ve-j)*.06)*.82,j+=ie;let fr=F.bh-Me,kr=m*3.4+j*4.5,Qr=m*2.2+j*3,Jr=j*2.4;if(x.current?.setAttribute("transform",`translate(${Qr.toFixed(2)} ${(tt+fr-St+Jr).toFixed(2)}) rotate(${kr.toFixed(2)} 0 60)`),L.current&&L.current.setAttribute("transform",`translate(${Qr.toFixed(2)} ${(tt+fr-St+Jr).toFixed(2)}) rotate(${kr.toFixed(2)} 0 60)`),u&&M.current){let Be=-we*.62,lt=-Me*.7,Xe=-16+(J?0:Math.sin(Ce/1400)*3)+kr*.4;M.current.setAttribute("transform",`translate(${Be.toFixed(2)}, ${lt.toFixed(2)}) rotate(${Xe.toFixed(2)})`)}if(C&&w.current){let Be=12+F.gy*.5;w.current.setAttribute("transform",`translate(0, ${Be.toFixed(2)})`)}if(f&&D.current){let Be=et!=="thinking"&&et!=="visualizing"&&et!=="speaking";D.current.setAttribute("opacity",Be?Ir(F.lid*1.3,0,1).toFixed(2):"0");let lt=(Xe,Ft)=>{let mt=Math.max(1,Math.min(Xe.w,Xe.h)/2),Dt=Xe.y-Xe.h/2+mt,Mr="";for(let[Ba,Fr]of[[20,7],[48,8],[76,6.5]]){let Tr=Ba*Math.PI/180,$a=Xe.x+Ft*Math.sin(Tr)*mt,qa=Dt-Math.cos(Tr)*mt,Oa=Xe.x+Ft*Math.sin(Tr)*(mt+Fr),Ua=Dt-Math.cos(Tr)*(mt+Fr)-1.5,tr=Xe.x+Ft*Math.sin(Tr-.22)*(mt+Fr*.65),Wa=Dt-Math.cos(Tr-.22)*(mt+Fr*.65);Mr+=` M ${$a.toFixed(2)} ${qa.toFixed(2)} Q ${tr.toFixed(2)} ${Wa.toFixed(2)} ${Oa.toFixed(2)} ${Ua.toFixed(2)}`}return Mr.trim()};H.current?.setAttribute("d",lt(N[0],-1)),S.current?.setAttribute("d",lt(N[1],1))}k=requestAnimationFrame(Gt)},It=0;return k=requestAnimationFrame(Gt),()=>cancelAnimationFrame(k)},[u,f,C,d]),(0,Ne.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,Ne.jsxs)("defs",{children:[(0,Ne.jsx)("linearGradient",{id:`${V}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((J,F)=>(0,Ne.jsx)("stop",{ref:$=>{ee.current[F]=$},offset:`${J}%`,style:{stopColor:`var(--hsk-marble-${F+1}, #FAF7F2)`}},J))}),(0,Ne.jsxs)("linearGradient",{id:`${V}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ne.jsx)("stop",{ref:I,offset:"0%",stopColor:mn[0].color,stopOpacity:"0.9"}),(0,Ne.jsx)("stop",{ref:q,offset:"45%",stopColor:mn[0].light,stopOpacity:"0.5"}),(0,Ne.jsx)("stop",{ref:P,offset:"100%",stopColor:mn[0].light,stopOpacity:"0"})]}),(0,Ne.jsxs)("radialGradient",{id:`${V}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Ne.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Ne.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Ne.jsxs)("linearGradient",{id:`${V}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ne.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Ne.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Ne.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Ne.jsxs)("radialGradient",{id:`${V}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Ne.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Ne.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Ne.jsx)("clipPath",{id:`${V}-skin`,children:(0,Ne.jsx)("use",{href:`#${V}-body`})}),(0,Ne.jsxs)("filter",{id:`${V}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Ne.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Ne.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,Ne.jsxs)("mask",{id:`${V}-cut`,children:[(0,Ne.jsx)("path",{ref:E,d:"",fill:"#FFFFFF"}),(0,Ne.jsx)("g",{ref:oe,children:Array.from({length:Bn},(J,F)=>(0,Ne.jsx)("rect",{ref:$=>{ke.current[F]=$},fill:"#000000"},F))})]})]}),(0,Ne.jsxs)("g",{ref:x,mask:`url(#${V}-cut)`,children:[(0,Ne.jsx)("path",{id:`${V}-body`,ref:b,d:"",fill:`url(#${V}-marble)`}),(0,Ne.jsxs)("g",{clipPath:`url(#${V}-skin)`,children:[(0,Ne.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${V}-sheen)`}),(0,Ne.jsx)("rect",{ref:v,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${V}-contact)`,opacity:"0.45"})]})]}),(0,Ne.jsxs)("g",{ref:L,style:{pointerEvents:"none"},children:[C&&(0,Ne.jsxs)("g",{ref:w,children:[(0,Ne.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`}),(0,Ne.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`})]}),f&&(0,Ne.jsxs)("g",{ref:D,children:[(0,Ne.jsx)("path",{ref:H,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Ne.jsx)("path",{ref:S,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Ne.jsxs)("g",{ref:M,className:"hsk-avatar-flower",children:[(0,Ne.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,Ne.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(${J-18})`},J)),(0,Ne.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Ne.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Ne.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Ne.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Ne.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Bo=require("react");var $t=require("react/jsx-runtime");function Ma({className:e="",compact:r=!1}){let[t,n]=(0,Bo.useState)(()=>la()),[a,o]=(0,Bo.useState)(""),i=()=>{let c=!t;As(c),n(c),nr(c?"reply":"interrupt",!0),o(_s())};return(0,$t.jsxs)("button",{type:"button",className:he("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,$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 Zt=require("react"),Hp=300,Bp=220,$p=120,qp=.45,Op=.4,Up=.25,Ta=e=>Math.min(1,Math.max(0,e));function Wp(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=u=>((i*u+o)*u+a)*u,p=u=>((l*u+s)*u+c)*u,d=u=>(3*i*u+2*o)*u+a;return u=>{let f=u;for(let C=0;C<8;C++){let b=h(f)-u,E=d(f);if(Math.abs(b)<1e-5||Math.abs(E)<1e-6)break;f-=b/E}return p(Ta(f))}}var Vp=Wp(.32,.72,0,1);function Gp(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 gc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let i=(0,Zt.useRef)(null),c=(0,Zt.useRef)(null),s=(0,Zt.useRef)(!1),l=(0,Zt.useRef)(0),h=(0,Zt.useRef)(null),p=(0,Zt.useRef)(o);p.current=o;let d=(0,Zt.useCallback)(x=>{l.current=x;let L=e(),M=i.current,w=c.current;if(!L||!M||!w)return;let D=1-x,H=Math.min(Math.max(M.top,w.top),w.bottom-M.height),S=Math.min(Math.max(M.left,w.left),w.right-M.width),O=(M.top-H)*D,v=(M.left-S)*D,I=Math.max(0,(H-w.top)*D),q=Math.max(0,(S-w.left)*D),P=Math.max(0,(w.right-S-M.width)*D),ee=Math.max(0,(w.bottom-H-M.height)*D),ke=M.radius*D+n*x;L.style.clipPath=`inset(${I}px ${P}px ${ee}px ${q}px round ${ke}px)`,L.style.translate=v||O?`${v}px ${O}px`:"";let oe=t?.();oe&&Object.assign(oe.style,{left:`${q}px`,top:`${I}px`,width:`${Math.max(0,w.width-q-P)}px`,height:`${Math.max(0,w.height-I-ee)}px`,borderRadius:`${ke}px`,translate:L.style.translate}),L.style.setProperty("--hsk-island-content",String(Ta((x-qp)/Op)));let V=String(Ta(x/Up));L.style.opacity=V,oe&&(oe.style.opacity=V)},[e,t,n]),u=()=>{let x=e();if(x)for(let M of["clip-path","translate","--hsk-island-content","opacity"])x.style.removeProperty(M);let L=t?.();if(L)for(let M of["left","top","width","height","border-radius","translate","opacity"])L.style.removeProperty(M)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},C=(x,L,M)=>{f();let w=l.current,D=Math.max($p,L*Math.abs(x-w)),H=performance.now(),S=O=>{let v=Ta((O-H)/D);d(w+(x-w)*Vp(v)),v<1?h.current=requestAnimationFrame(S):(h.current=null,M())};d(w),h.current=requestAnimationFrame(S)},b=(x,L)=>{i.current=Gp(L),x.style.clipPath="",x.style.translate="",c.current=x.getBoundingClientRect()};return(0,Zt.useLayoutEffect)(()=>{if(!a)return;let x=e(),L=r();if(!(!x||!L))return s.current=!1,x.style.removeProperty("pointer-events"),b(x,L),l.current=0,C(1,Hp,u),()=>{f(),u()}},[a]),{close:(0,Zt.useCallback)(()=>{let x=e(),L=a?r():null,M=L?.getBoundingClientRect(),w=M&&M.bottom>0&&M.top<window.innerHeight;if(!x||!L||!w){p.current();return}let D=h.current!==null?l.current:1;b(x,L),s.current=!0,x.style.pointerEvents="none",l.current=D,C(0,Bp,()=>p.current())},[a,e,r])}}var bn=require("react/jsx-runtime");function Ra({mobile:e=!1,closing:r=!1}){let t=Qt();return(0,bn.jsxs)("div",{className:he("hsk-cb-theme-discovery",e&&"is-mobile",r&&"is-closing"),role:"note",children:[(0,bn.jsx)("svg",{viewBox:e?"0 0 360 260":"0 0 120 80",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:(0,bn.jsx)("path",{pathLength:"1",vectorEffect:"non-scaling-stroke",d:e?"M174 250C213 263 247 245 239 225C230 205 205 222 220 239C244 269 294 251 326 220C354 194 343 158 351 132C363 90 349 66 352 43C356 20 311 16 215 14M225 5L213 14L224 24":"M26 67C48 78 63 61 54 52C43 43 37 58 50 62C81 73 106 44 84 22C79 16 73 13 66 12M72 27L65 12L83 10"})}),(0,bn.jsx)("span",{children:t(e?"themeHoldHint":"themeClickHint")})]})}var qe=require("react/jsx-runtime"),xc=!1;function vc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:i=!1,themeMenuClosing:c=!1,themeDiscovery:s=!1,onThemeMenuReady:l,onThemeMenuClosed:h,isNarrow:p=!1,currentTheme:d="dark",onJumpToLatest:u,onReset:f,onClose:C,onToggleThemeMenu:b,onSelectTheme:E,themeAttr:x,below:L,layoutControl:M}){let w=Qt(),D=!!M,H=Ge.default.useRef(null),S=Ge.default.useRef(null),O=Ge.default.useRef(null),v=Ge.default.useRef(null),[I]=Ge.default.useState(()=>{let j=!xc;return xc=!0,j}),q=Ge.default.useRef(null),P=Ge.default.useRef(null),ee=w("clearChat"),[ke,oe]=Ge.default.useState({size:12,compact:!1});Ge.default.useLayoutEffect(()=>{let j=H.current,ie=q.current,ve=P.current;if(!j||!ie||!ve)return;let ue=!0,_=()=>{if(!ue)return;let Se=ie.parentElement,De=getComputedStyle(j).gridTemplateColumns.split(" "),ye=parseFloat(De[2])||Se.clientWidth,Ee=Se.querySelector(".hsk-cb-exit-btn"),Fe=parseFloat(getComputedStyle(Se).gap)||0,Ie=Math.max(0,ye-(Ee?Ee.offsetWidth+Fe:0)-30),be=Math.min(12,Math.floor(1200*Ie/Math.max(1,ve.scrollWidth))/100),Ue=be<10;oe(Ke=>Ke.size===be&&Ke.compact===Ue?Ke:{size:be,compact:Ue})};_();let re=new ResizeObserver(_);return re.observe(j),v.current&&re.observe(v.current),document.fonts?.ready.then(_).catch(()=>{}),document.fonts?.addEventListener("loadingdone",_),()=>{ue=!1,re.disconnect(),document.fonts?.removeEventListener("loadingdone",_)}},[ee,t,p,e,r]),Ge.default.useLayoutEffect(()=>{let j=H.current,ie=v.current,ve=S.current;if(!j||!ie||!ve)return;let ue=ie.offsetParent;if(!ue)return;let _=ue.offsetTop+ie.offsetTop+ie.offsetHeight/2;j.style.setProperty("--hsk-tray-top",`${_}px`),j.style.setProperty("--hsk-tray-head",`${ie.offsetHeight/2+8}px`),j.style.setProperty("--hsk-tray-h",`${ve.offsetHeight}px`),j.style.setProperty("--hsk-tray-w",`${ve.offsetWidth}px`)},[i,p,D]);let[V]=Ge.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[me,J]=Ge.default.useState(!1);Ge.default.useEffect(()=>{if(!p||me)return;let j=window.requestIdleCallback,ie=j?j(()=>J(!0),{timeout:1200}):setTimeout(()=>J(!0),600);return()=>{let ve=window.cancelIdleCallback;j&&ve?ve(ie):clearTimeout(ie)}},[p,me]);let F=p&&(i||me);Ge.default.useEffect(()=>{if(p&&!me)return;let j=requestAnimationFrame(()=>l?.());return()=>cancelAnimationFrame(j)},[p,me,l]);let $=gc({target:Ge.default.useCallback(()=>S.current,[]),trigger:Ge.default.useCallback(()=>v.current,[]),shadow:Ge.default.useCallback(()=>O.current,[]),radius:18,enabled:p&&i&&V,onClosed:()=>h?.()});Ge.default.useEffect(()=>{p&&c&&$.close()},[c,p]);let[N,T]=Ge.default.useState(!1),[A,K]=Ge.default.useState("#134e3d"),[y,z]=Ge.default.useState("rgba(19, 78, 61, 0.45)"),k=Ge.default.useRef(void 0),pe=Ge.default.useRef(null),se=Ge.default.useRef(!1),U=Ge.default.useRef(0),le=Ge.default.useCallback(()=>{se.current=!1,U.current=Date.now(),pe.current=setTimeout(()=>{if(se.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}b?.()},350)},[b]),m=Ge.default.useCallback(()=>{pe.current&&(clearTimeout(pe.current),pe.current=null)},[]),R=Ge.default.useCallback(()=>{pe.current&&(clearTimeout(pe.current),pe.current=null)},[]),G=Ge.default.useCallback(j=>{if(se.current){se.current=!1,j.preventDefault(),j.stopPropagation();return}o?u?.():p?b?.():k.current?.()},[o,p,u,b]),Z=Ge.default.useCallback((j,ie,ve)=>{j>.04?(T(!0),K(ie),z(ve)):T(!1)},[]);return(0,qe.jsxs)("div",{ref:H,className:he("hsk-cb-topbar",p&&i&&"is-docked"),children:[(0,qe.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:p&&(0,qe.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:C,"aria-label":w("back"),children:(0,qe.jsx)("span",{className:"hsk-cb-back-icon",children:(0,qe.jsx)(on,{})})})}),(0,qe.jsxs)("div",{className:he("hsk-cb-topbar-mark",p&&i&&"is-oozing",s&&i&&!c&&"is-discovering"),"data-impacting":N?"true":"false",style:{"--hsk-contact-color":A,"--hsk-contact-glow":y},"data-unread":a?"true":"false",onTouchStart:le,onTouchEnd:m,onTouchMove:R,onTouchCancel:R,onClick:G,role:"button",tabIndex:0,"aria-label":o?w("jumpToLatest"):`${e} (tap for themes)`,children:[(0,qe.jsx)(kc,{state:n,size:34,theme:d,alert:a,onImpact:Z,triggerRef:k,dropIn:I}),(0,qe.jsx)("div",{className:"hsk-cb-topbar-identity",children:r?(0,qe.jsx)("img",{ref:v,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,qe.jsx)("span",{ref:v,className:"hsk-cb-topbar-name",children:e})})]}),(0,qe.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,qe.jsxs)("button",{ref:q,type:"button",className:he("hsk-cb-topbar-btn",ke.compact&&"is-compact"),onClick:f,title:ee,"aria-label":ee,children:[(0,qe.jsx)("span",{ref:P,className:"hsk-cb-clear-measure","aria-hidden":"true",children:ee}),ke.compact?(0,qe.jsx)(fa,{}):(0,qe.jsx)("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:ke.size},children:ee})]}),!p&&(0,qe.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:C,"aria-label":"Close Chat",children:(0,qe.jsx)(an,{})})]}),p&&i&&(0,qe.jsx)("div",{className:he("hsk-cb-topbar-scrim",s&&"is-discovery",c&&"is-closing"),onClick:b,"aria-hidden":"true"}),F&&(0,qe.jsx)("div",{className:he("hsk-cb-tray-shadow",!i&&"is-parked"),"aria-hidden":"true",children:(0,qe.jsx)("div",{ref:O})}),F&&(0,qe.jsx)("div",{ref:S,className:he("hsk-cb-topbar-ooze-menu",c&&"is-closing",V&&"is-island",!i&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),onMouseDown:j=>j.stopPropagation(),children:(0,qe.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,qe.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,qe.jsx)(Ma,{compact:!0}),(0,qe.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,qe.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,qe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:cn.map(({id:j,label:ie,Icon:ve})=>(0,qe.jsxs)("button",{type:"button",className:he("hsk-cb-theme-grid-item",d===j&&"is-active"),onClick:ue=>{ue.stopPropagation(),E?.(j)},children:[(0,qe.jsx)(ve,{}),(0,qe.jsx)("span",{children:ie})]},j))}),M&&(0,qe.jsxs)("div",{className:"hsk-cb-dock-layout",children:[(0,qe.jsx)("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),M]})]})}),p&&i&&L&&(0,qe.jsx)("div",{className:he("hsk-cb-tray-below",c&&"is-closing"),children:L}),p&&i&&s&&(0,qe.jsx)(Ra,{mobile:!0,closing:c})]})}var Ar=Yt(require("react"));var qn=Yt(require("react"));var Un=require("react/jsx-runtime"),yc=83,jp=2,Ea=240,qo=160,qt=Ea/2,vt=qo/2,yr=24,fn=50,kn=56,Oo=124,vn=22,ar=6,Uo=13,Yp=30,dr=(e,r,t)=>e+(r-e)*t,On=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function Sc(e,r,t,n,a,o=0){let i=[];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+On(e.n,l)*.02;i.push([r+Math.cos(h+o)*n*p,t+Math.sin(h+o)*a*p])}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 Na(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 jo(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 Kp(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 Wr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Na(e,t),n.fillStyle=jo(e,qt,vt,a),Sc(e,qt,vt,a,a,e.n*.03),n.fill(),n.restore()}function $o(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,Ea,n),a.clip()),Na(e,0),a.fillStyle=jo(e,qt,vt,Math.max(r,t)),Sc(e,qt,vt,r,t),a.fill(),a.restore()}function La(e,r,t,n,a,o=a/2,i=a/2){let{ctx:c}=e;c.save(),Na(e,0),c.fillStyle=Kp(e,n,a),c.beginPath(),c.roundRect(r+On(e.n,r)*.6,n-a/2+On(e.n,n)*.6,t-r,a,[o,i,i,o]),c.fill(),c.restore()}function Wo(e,r,t,n,a=0){let{ctx:o}=e,i=n*(1+a*.2);o.save(),Na(e,a),o.fillStyle=jo(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,p=t+Math.sin(s)*l;c===0?o.moveTo(h,p):o.lineTo(h,p)}o.stroke(),o.restore()}function za(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(qt+Math.cos(a)*o,vt+Math.sin(a)*o),t.lineTo(qt+Math.cos(a)*(o+i),vt+Math.sin(a)*(o+i)),t.stroke()}t.restore()}var Vo=e=>qt-Oo/2+Oo*e/ar;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,vt-vn/2+2),t.lineTo(r+On(e.n,r)*1.5,vt+vn/2-2),t.stroke(),t.restore()}var Go=e=>qt+(e-(ar-1)/2)*Yp;function $n(e,r,t=-1,n=-1){for(let a=0;a<ar;a++){let o=0;for(let s=0;s<r;s++)o+=a<=s?-2:2;let i=Vo(a)+o,c=Vo(a+1)+o;a===n?Wo(e,dr((i+c)/2,Go(a),.5),vt-4,Uo,.5):a<=t?Wo(e,Go(a),vt,Uo):La(e,i,c,vt,vn,a===0?vn/2:2,a===ar-1?vn/2:2)}}function Qp(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Wr(a,yr)});let r=[[yr,yr,34,38],[34,38,44,48],[44,48,fn,kn]];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=>$o(h,dr(n,o,s),dr(a,i,s)*l)})}e.push({hold:1,draw:c=>$o(c,o,i)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=dr(vt+kn,vt-kn,a),i=dr(8,24,a),c=(o-vt)/kn;t=Math.max(t,2*fn*Math.sqrt(Math.max(0,1-c*c)),30);let s=t;e.push({draw:l=>{a<1&&$o(l,fn,kn,o-i*.3),La(l,qt-s/2,qt+s/2,o,i)}})}for(let n of[.5,1])e.push({draw:a=>La(a,qt-fn,qt+fn,dr(vt-kn,vt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=dr(2*fn,Oo,a),i=dr(24,vn,a),c=n%2?2:-2;e.push({draw:s=>La(s,qt-o/2+c,qt+o/2+c,vt,i)})}for(let n=1;n<ar;n++)e.push({draw:a=>{$n(a,n-1),Xp(a,Vo(n))}}),e.push({thump:.35,draw:a=>$n(a,n)});e.push({draw:n=>$n(n,ar-1)});for(let n=0;n<ar;n++)e.push({thump:.12,draw:a=>$n(a,ar-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>$n(a,ar-1,ar-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<ar;o++)Wo(a,dr(Go(o),qt,n),vt,dr(Uo,10,n),.4)}});return e.push({thump:1,draw:n=>{Wr(n,yr*1.3),za(n,1)}}),e.push({draw:n=>{Wr(n,yr*1.12),za(n,.4)}}),e.push({draw:n=>Wr(n,yr*1.04)}),e}var gn=Qp(),wc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Wr(r,yr,e)})),{thump:.7,draw:e=>{Wr(e,yr*1.24),za(e,1)}},{draw:e=>{Wr(e,yr*1.08),za(e,.4)}}],Cc=[1,.7,.35,0];function xn(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 Mc({phase:e,label:r,theme:t}){let n=qn.default.useRef(null),a=qn.default.useRef(null),o=qn.default.useRef({n:0,at:0,held:0,entered:!1,last:gn[0]});return qn.default.useEffect(()=>{let i=n.current,c=a.current,s=i?.getContext("2d");if(!i||!s||!c)return;let l=Math.min(window.devicePixelRatio||1,3);i.width=Ea*l,i.height=qo*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:s,dpr:l,n:0,clay:xn(i,h),light:xn(i,`color-mix(in srgb, ${h} 55%, white)`),dark:xn(i,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,u="",f=()=>{let w=getComputedStyle(i).getPropertyValue("--hsk-primary").trim()||"#ff6a33";w!==u&&(u=w,p.clay=xn(i,w),p.light=xn(i,`color-mix(in srgb, ${w} 55%, white)`),p.dark=xn(i,`color-mix(in srgb, ${w} 70%, black)`),p.ink=getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},C=(w,D=1)=>{f(),s.setTransform(l,0,0,l,0,0),s.clearRect(0,0,Ea,qo),s.globalAlpha=D,p.n=d.n++,w.draw(p),s.globalAlpha=1},b=w=>{let D=i.getBoundingClientRect();_i({x:D.left+D.width/2,y:D.top+D.height/2,strength:w}),c.style.translate="0 1px",c.style.rotate=`${On(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){C(gn[0]);let w=window.setInterval(()=>C(gn[0]),yc);return()=>clearInterval(w)}let E=e==="exit"?null:e==="enter"&&!d.entered?wc:gn;E&&(d.at=0);let x=0,L=0,M=()=>{if(c.style.translate="",c.style.rotate="",!E){x===0&&b(.6),C(d.last,Cc[x]),++x>=Cc.length&&clearInterval(L);return}let w=E[d.at];C(w),d.last=w,w.thump&&d.held===0&&b(w.thump),!(E===gn&&++d.held<(w.hold??jp))&&(d.held=0,!(++d.at<E.length)&&(E===wc&&(d.entered=!0),E=gn,d.at=0))};return M(),L=window.setInterval(M,yc),()=>clearInterval(L)},[e==="exit",t]),(0,Un.jsxs)("div",{className:"hsk-clay",children:[(0,Un.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Un.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var de=require("react/jsx-runtime");function Jp(){return(0,de.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,de.jsx)("svg",{viewBox:"0 0 16 16",children:(0,de.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Tc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:i,awaitingConsent:c,termsAgreed:s,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:C,t:b,tNode:E,chooseLanguage:x,langSwitching:L=!1,isLangPreparing:M,chooseEntityLang:w,agreeTerms:D,handleSend:H}){let S=h||l,O=!S||S.toLowerCase()==="english"||S.toLowerCase()==="en",v=M??(L||!!h||!!l&&!u&&!O),I=Br(S),[q,P]=Ar.default.useState(v),[ee,ke]=Ar.default.useState(()=>v?"spinner-steady":"idle"),oe=Ar.default.useRef([]),V=()=>{oe.current.forEach(clearTimeout),oe.current=[]};v!==q&&(P(v),V(),v?(ke("step1-exit"),oe.current.push(setTimeout(()=>ke("spinner-enter"),280)),oe.current.push(setTimeout(()=>ke("spinner-steady"),960))):(ke("spinner-exit"),oe.current.push(setTimeout(()=>ke("idle"),460)))),Ar.default.useEffect(()=>()=>V(),[]);let me=ee==="spinner-enter"||ee==="spinner-steady"||ee==="spinner-exit",J=ee==="step1-exit",F=me||J||!l||a?"1":!p||o?"2":!d||i?"3":!s||c?"4":null,[$,N]=Ar.default.useState(null),[T,A]=Ar.default.useState(3);Ar.default.useEffect(()=>{if(!c)return;A(3);let y=setInterval(()=>{A(z=>z<=1?(clearInterval(y),0):z-1)},1e3);return()=>clearInterval(y)},[c]);let K=l?Rn(l,C)||l.charAt(0).toUpperCase()+l.slice(1):"";return(0,de.jsx)("div",{className:"hsk-cb-empty",children:(0,de.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[F&&(0,de.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,de.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[F," / 4"]})}),me?(0,de.jsx)("div",{className:he("hsk-lang-loader",ee==="spinner-enter"&&"hsk-lang-loader--enter",ee==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,de.jsx)(Mc,{theme:e,phase:ee==="spinner-exit"?"exit":ee==="spinner-enter"?"enter":"steady",label:I.preparing})},"spinner-loading"):J||a||!l?(0,de.jsxs)("div",{className:he("hsk-cb-hello-wrap",J&&"hsk-step1-exit"),children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,de.jsxs)("div",{className:"hsk-cb-lang-chips",children:[ua.map((y,z)=>(0,de.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":z},lang:y.tag,dir:y.rtl?"rtl":"ltr",disabled:L,onClick:()=>!L&&x(y.value),children:y.native},y.value)),(0,de.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":ua.length},children:"or type another one"})]})]},"step-lang"):o||!p?(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),(0,de.jsx)("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),(0,de.jsx)("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):i?(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),(0,de.jsx)("p",{className:"hsk-cb-hello-lead",children:E("entityLangIntro",{lang:K})}),(0,de.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((y,z)=>(0,de.jsxs)("button",{type:"button",role:"radio","aria-checked":($??d)===y,className:he("hsk-cb-entlang-opt",($??d)===y&&"is-selected"),style:{"--hsk-opt-idx":z},onClick:()=>N(y),children:[(0,de.jsx)(Jp,{}),(0,de.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,de.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:y==="translated"?E("inLanguage",{lang:K}):b("asWritten")}),(0,de.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:b(y==="translated"?"detailsTranslated":"namesAsWritten")})]})]},y))}),(0,de.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,de.jsx)("button",{type:"button",className:he("hsk-cb-terms-agree-btn",$&&"is-active"),disabled:!$,onClick:()=>$&&w($),children:b("continueButton")})})]},"step-entity-lang"):c?(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),(0,de.jsx)("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),(0,de.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,de.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,de.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),(0,de.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),(0,de.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,de.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,de.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,de.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),(0,de.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),(0,de.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,de.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,de.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,de.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),(0,de.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),(0,de.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,de.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,de.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,de.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),(0,de.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),(0,de.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,de.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,de.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,de.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,de.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),(0,de.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),(0,de.jsxs)("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",(0,de.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,de.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,de.jsx)("button",{type:"button",className:he("hsk-cb-terms-agree-btn",T===0&&"is-active"),disabled:T>0,onClick:D,children:T>0?b("termsAgreeCounting",{seconds:String(T)}):b("termsAgreeButton")})})]},"step-terms"):t?(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:E("allSet",{name:p})}),(0,de.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?E("replyingTranslated",{lang:K}):E("replyingOriginal",{lang:K})})]},"step-completed"):p?(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,de.jsx)("h2",{className:"hsk-cb-hello",children:E("greetReturning",{name:p})}),(0,de.jsx)("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):(0,de.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,de.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,de.jsx)("b",{children:"kiku"}),"."]}),(0,de.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,de.jsx)("div",{className:"hsk-cb-chips",children:f.map((y,z)=>(0,de.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":z},onClick:()=>H(y),children:y},y))})]})})}var Pr=require("react/jsx-runtime");function Yo({wide:e,onToggle:r,emphasized:t=!1}){return(0,Pr.jsxs)("button",{type:"button",className:`hsk-cb-sound-pill hsk-cb-layout-toggle${t?" is-discovery":""}`,role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[(0,Pr.jsx)("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:(0,Pr.jsx)("span",{className:"hsk-cb-layout-thumb",children:(0,Pr.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:(0,Pr.jsx)("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),(0,Pr.jsx)("span",{children:"Wide"})]})}var or=require("react"),Rc="akropolys_chat_layout";function Lc(e){let[r,t]=(0,or.useState)(()=>{try{return typeof window<"u"&&localStorage.getItem(Rc)==="wide"}catch{return!1}}),n=(0,or.useRef)(null),a=(0,or.useRef)([]),o=(0,or.useRef)(new Map),i=()=>{a.current.forEach(s=>s.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(s=>o.current.set(s,s.getBoundingClientRect()));let c=e.current;if(c){let s=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>s);n.current={node:l,top:l?l.getBoundingClientRect().top-s:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(s=>!s)};return(0,or.useLayoutEffect)(()=>{let c=n.current,s=e.current;if(!c||!s)return;n.current=null;let l=s.style.scrollBehavior;if(s.style.scrollBehavior="auto",c.bottom?s.scrollTop=s.scrollHeight:c.node?.isConnected&&(s.scrollTop+=c.node.getBoundingClientRect().top-s.getBoundingClientRect().top-c.top),s.style.scrollBehavior=l,a.current.forEach(h=>h.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let h=s.getBoundingClientRect();for(let p of s.querySelectorAll(".hsk-cb-msg-group")){let d=p.getBoundingClientRect();if(d.bottom<h.top||d.top>h.bottom||!p.animate)continue;let u=o.current.get(p);!u||!d.width||!d.height||a.current.push(p.animate([{transformOrigin:"top left",transform:`translate(${u.left-d.left}px, ${u.top-d.top}px) scale(${u.width/d.width}, ${u.height/d.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),(0,or.useEffect)(()=>{try{localStorage.setItem(Rc,r?"wide":"bubbles")}catch{}},[r]),(0,or.useEffect)(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:i}}var Gr=require("react");var Vr=require("react/jsx-runtime");function jr(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}}var Yr=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function Zp(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=Qt(),i=(0,Gr.useRef)(Date.now()),[c,s]=(0,Gr.useState)(()=>r?null:0),[l,h]=(0,Gr.useState)(!r);(0,Gr.useEffect)(()=>{if(r){c!==null&&(s(Math.max(1,Math.round((Date.now()-i.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{s(Math.round((Date.now()-i.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let p=t??c,d=a!=null?o("repliedIn",{duration:Zp(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?p!=null?o("thoughtForSeconds",{duration:`${p}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return(0,Vr.jsxs)("div",{className:he("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Yr(n)&&"hsk-cb-think--note"),children:[(0,Vr.jsxs)("button",{type:"button",className:he("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,Vr.jsx)("span",{children:d}),u&&(0,Vr.jsx)("span",{className:he("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,Vr.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var ur=require("react");function Wn(e,r){let[t,n]=(0,ur.useState)(!1),a=(0,ur.useRef)(null),o=(0,ur.useRef)(r);o.current=r,(0,ur.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=(0,ur.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,ur.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:i,closeNow:c}}var Vc=Yt(require("react"));var Lt=Yt(require("react")),$c=require("@akropolys/sdk");function Ko(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let s=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(s){let l=s[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,s.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),i=t.slice(a.index+a[0].length),c=o.exec(i);if(!c)return n;t=i.slice(c.index+c[0].length)}return n}var Kr=Yt(require("react"));var ed=/\p{L}/u,td=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function rd(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Ia(e,r=1){let t=0,n=0;for(let a of e.replace(td," "))ed.test(a)&&(rd(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Ye=require("react/jsx-runtime"),nd=/[ \t]{2,}/g,ad=/ ([.,!?:;])/g,od=/\(([ \t]+)/g,sd=/([ \t]+)\)/g,id=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,cd=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,ld=/^!\[([^\]]*)\]\(([^)]+)\)$/,hd=/^\[([^\]]+)\]\(([^)]+)\)$/,pd=/^(data:image|blob):/i,Ic=/^(https?|mailto|tel):/i;function Vn(e){let r=String(e??"").trim();return Ic.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var Xo=null;function Ac(e){if(pd.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||!!Xo?.has(r.host))}catch{return!1}}var dd=/memory|mimi/i,ud=/mimi\.akropolys/i,md=e=>e&&e.replace(nd," ").replace(ad,"$1").replace(od,"(").replace(sd,")").replace(id,"$1 $2"),wr=(e,r)=>md(e).split(cd).map((a,o)=>{if(!a)return null;let i=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,Ye.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},i);if(a.startsWith("**")&&a.endsWith("**"))return(0,Ye.jsx)("strong",{children:wr(a.slice(2,-2),i)},i);let c=a.match(ld);if(c){let l=c[1],h=c[2];return Ac(h)?(0,Ye.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},i):null}let s=a.match(hd);if(s){let l=s[1],h=s[2];return dd.test(l)||ud.test(h)?null:Ic.test(h)||h.startsWith("/")?(0,Ye.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:wr(l,i)},i):(0,Ye.jsx)("span",{children:wr(l,i)},i)}return a}),bd=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function zc(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Nc(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 fd({children:e}){let r=Kr.default.useRef(null),[t,n]=Kr.default.useState("none"),[a,o]=Kr.default.useState(!1),i=Kr.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Kr.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),C=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(C?u?"right":"left":b?u?"left":"right":"middle")},[]);Kr.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 s=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(i.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=p=>{if(!i.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-i.current.startX)*1.5;Math.abs(f)>3&&(i.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=i.current.scrollLeft-f)},h=()=>{i.current.isDown=!1,o(!1)};return(0,Ye.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 Pc(e,r=!1,t){Xo=t??null;try{return kd(e,r)}finally{Xo=null}}function kd(e,r){let t=e.split(`
35
+ `;function cc(e){return e.proof?["akropolys.token."+e.token,"akropolys.proof."+e.proof]:["akropolys.token."+e.token]}function lc(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"),a.searchParams.set("browserActions","1"),a.searchParams.set("browserActions","1");let o=r||e.voice;return o&&a.searchParams.set("voice",o),a.toString()}function hc(e){let[r,t]=(0,te.useState)("idle"),[n,a]=(0,te.useState)(!1),[o,i]=(0,te.useState)([]),[c,s]=(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 mn),f=(0,te.useRef)(()=>!1),w=(0,te.useRef)(null),b=(0,te.useRef)(null),E=(0,te.useRef)(!1),x=(0,te.useRef)(0),L=(0,te.useRef)(0),M=(0,te.useRef)(!1),C=(0,te.useRef)(null),F=(0,te.useRef)(0),D=(0,te.useRef)(!1),S=(0,te.useRef)(!1),O=(0,te.useRef)(null),v=(0,te.useRef)(null),I=(0,te.useRef)(null),$=(0,te.useRef)(null),P=(0,te.useRef)(0),Z=(0,te.useRef)(!1),ve=(0,te.useRef)([]),ne=(0,te.useRef)(0),V=(0,te.useRef)(new Set),fe=(0,te.useRef)(null),Q=(0,te.useRef)(null),_=(0,te.useRef)(Sa),B=(0,te.useRef)(e);(0,te.useEffect)(()=>{B.current=e;let j=v.current;if(j)for(let ee of j.getAudioTracks())ee.enabled=!e.muted},[e]);let N=(0,te.useRef)(!1),T=(0,te.useRef)([]),A=(0,te.useRef)(new Bn),Y=(0,te.useRef)(null),y=(0,te.useRef)(""),z=(0,te.useRef)(""),[k,he]=(0,te.useState)([]),oe=(0,te.useRef)([]);oe.current=k;let W=(0,te.useRef)([]),[ie,m]=(0,te.useState)([]),R=(0,te.useRef)(0),G=(0,te.useRef)(!1),J=(0,te.useRef)(null),K=(0,te.useRef)(new Map),se=(0,te.useRef)([]),Ce=(0,te.useRef)(void 0),de=(0,te.useRef)(null),me=(0,te.useRef)([]),q=(0,te.useRef)([]),ge=(0,te.useCallback)(()=>{let j=y.current.trim(),ee=z.current.trim(),ye=de.current?Math.max(.1,(Date.now()-de.current)/1e3):void 0,ue;if(me.current.length>0)try{let be=oc(me.current,_.current);ue=URL.createObjectURL(be)}catch(be){console.error("[kiku] failed to encode bot audio wav:",be)}let ce;if(q.current.length>0)try{let be=sc(q.current,Fo);ce=URL.createObjectURL(be)}catch(be){console.error("[kiku] failed to encode user audio wav:",be)}let Ne=se.current.length?se.current:void 0,_e=Ce.current;y.current="",z.current="",de.current=null,me.current=[],q.current=[],se.current=[],Ce.current=void 0,!(!j&&!ee&&!Ne&&!_e)&&B.current.onExchange?.({heard:j,said:ee,duration:ye,userAudioUrl:ce,audioUrl:ue,images:Ne,visualization:_e})},[]),Ie=(0,te.useCallback)(()=>{},[]),xe=(0,te.useCallback)(j=>{if(x.current=Date.now(),B.current.muted)return;let ee=new Int16Array(j),ye=0;for(let ce=0;ce<ee.length;ce+=8){let Ne=Math.abs(ee[ce]);Ne>ye&&(ye=Ne)}ye>1200&&(F.current=Date.now());let ue=p.current;if(!(!N.current||!ue||ue.readyState!==WebSocket.OPEN)){if(ue.bufferedAmount>256*1024){f.current()||B.current.onError?.("connection");return}q.current.push(new Int16Array(j.slice(0)));try{ue.send(A.current.encode(new Int16Array(j)))}catch{f.current()||B.current.onError?.("connection")}}},[]),Re=(0,te.useCallback)(()=>{T.current=[]},[]),De=(0,te.useCallback)(()=>{let j=O.current;if(Y.current&&j&&j.state!=="closed")return Y.current;let ee=window.AudioContext||window.webkitAudioContext;if(!ee)return Promise.resolve(null);let ye=new ee({latencyHint:"interactive",sampleRate:Sa});O.current=ye;let ue=URL.createObjectURL(new Blob([Ip],{type:"application/javascript"}));return Y.current=ye.audioWorklet.addModule(ue).then(()=>ye).catch(()=>null).finally(()=>URL.revokeObjectURL(ue)),Y.current},[]),ze=(0,te.useCallback)(()=>{typeof window>"u"||De()},[De]),ke=(0,te.useCallback)(()=>{let j=$.current;if(!j)return 0;let ee=new Uint8Array(j.fftSize);j.getByteTimeDomainData(ee);let ye=0;for(let ue=0;ue<ee.length;ue++){let ce=(ee[ue]-128)/128;ye+=ce*ce}return Math.min(1,Math.sqrt(ye/ee.length)*4)},[]),Ue=r==="speaking"||r==="thinking",Qe=(0,te.useCallback)(j=>{let ee=Ue?fe.current:$.current;return!ee||j.length!==ee.frequencyBinCount?!1:(ee.getByteFrequencyData(j),!0)},[Ue]),Ze=(0,te.useCallback)(()=>(Ue?fe.current:$.current)?.frequencyBinCount??0,[Ue]),Be=(0,te.useCallback)(()=>{let j=Q.current,ee=O.current;if(!j||!ee||ee.state==="closed"){P.current=0;for(let ce of V.current)try{ce.onended=null,ce.stop()}catch{}V.current.clear();return}let ye=ee.currentTime,ue=ye+Lp;j.gain.cancelScheduledValues(ye),j.gain.setValueAtTime(j.gain.value,ye),j.gain.linearRampToValueAtTime(0,ue),j.gain.setValueAtTime(1,ue);for(let ce of V.current)try{ce.onended=null,ce.stop(ue)}catch{}V.current.clear(),P.current=ue},[]),St=(0,te.useCallback)(j=>{let ee=O.current,ye=fe.current;if(!ee||!ye||j.length===0)return;ee.state==="suspended"&&ee.resume().catch(()=>{});let ue=ee.createBuffer(1,j.length,_.current);ue.getChannelData(0).set(j);let ce=ee.createBufferSource();ce.buffer=ue,ce.connect(ye);let Ne=ee.currentTime,_e=P.current>Ne?P.current:Ne+Rp;ce.start(_e),P.current=_e+ue.duration,V.current.add(ce),ce.onended=()=>{V.current.delete(ce),V.current.size===0&&(P.current=0,Z.current=!1,t(be=>be==="speaking"?"listening":be))},t(be=>be==="speaking"||be==="idle"||be==="ended"?be:"speaking")},[]),Mt=(0,te.useCallback)(()=>{let j=ve.current;ve.current=[],ne.current=0;for(let ee of j)St(ee)},[St]),At=(0,te.useCallback)(()=>{ve.current=[],ne.current=0},[]),Gt=(0,te.useCallback)(j=>{let ee=O.current;if(!ee||j.length===0)return;if(P.current>ee.currentTime&&ve.current.length===0){St(j);return}let ue=Z.current?Tp:Mp;ve.current.push(j),ne.current+=j.length/_.current,ne.current>=ue&&(Z.current=!0,Mt())},[St,Mt]),Yt=(0,te.useRef)(null),Pt=(0,te.useRef)(null),Se=(0,te.useCallback)(()=>{Yt.current&&(clearInterval(Yt.current),Yt.current=null);let j=Pt.current,ee=O.current;if(j&&ee&&ee.state!=="closed"){let ye=ee.currentTime;try{j.gain.cancelScheduledValues(ye),j.gain.setValueAtTime(j.gain.value,ye),j.gain.linearRampToValueAtTime(1e-4,ye+.04)}catch{}setTimeout(()=>{try{j.disconnect()}catch{}Pt.current===j&&(Pt.current=null)},50)}},[]),tt=(0,te.useCallback)(()=>{},[]),bt=(0,te.useCallback)(j=>{for(let ye of K.current.values())ye(!1);J.current=null,G.current=!1,w.current!==null&&clearTimeout(w.current),b.current!==null&&clearTimeout(b.current),w.current=b.current=null,E.current=!1,L.current=0,ge();let ee=p.current;p.current=null;try{ee?.close()}catch{}N.current=!1,T.current=[],Y.current=null,Z.current=!1,ve.current=[],ne.current=0,Se(),Be(),C.current=null,I.current&&(I.current.port.onmessage=null),I.current?.disconnect(),I.current=null,v.current?.getTracks().forEach(ye=>ye.stop()),v.current=null,$.current=null,fe.current=null,Q.current=null,O.current?.close().catch(()=>{}),O.current=null,t(j),a(!1),i([]),d.current=!1,M.current=!1},[ge,Be,Se]),je=(0,te.useCallback)(()=>{try{p.current?.send(JSON.stringify({type:"close"}))}catch{}try{p.current?.close()}catch{}bt("idle")},[bt]),nt=(0,te.useCallback)(j=>{let ee=[...W.current,...oe.current.filter(ye=>ye.done)].filter(ye=>ye.text).map(ye=>({role:ye.role,text:ye.text}));if(!(p.current!==j||!d.current||j.readyState!==WebSocket.OPEN))try{j.send(JSON.stringify({type:"open",history:ee,browserActions:!0}))}catch{}},[]),ut=(0,te.useCallback)(j=>{let ee=!1,ye=new Map;j.addEventListener("close",()=>{for(let ue of ye.values())ue.abort();ye.clear()}),b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{p.current!==j||N.current||f.current()||(B.current.onError?.("connection"),je())},3e4),j.binaryType="arraybuffer",A.current=new Bn,j.onopen=()=>{p.current!==j||!M.current||(M.current=!1,nt(j))},j.onmessage=ue=>{if(p.current!==j)return;if(ue.data instanceof ArrayBuffer){if(!D.current){D.current=!0;let _e=z.current.trim();_e&&he(be=>{let He=be.slice();for(let Ge=He.length-1;Ge>=0;Ge--)He[Ge].role==="user"&&!He[Ge].done&&(He[Ge]={...He[Ge],done:!0});return He.push({role:"assistant",text:_e,done:!1}),He})}!S.current&&F.current&&(S.current=!0,console.log("[kiku] wait from last speech to first audio: "+(Date.now()-F.current)+"ms")),Se();let Ne=ac(ue.data);me.current.push(Ne.slice()),Gt(Ne);return}let ce;try{ce=JSON.parse(ue.data)}catch{return}switch(ce.type){case"browser_action":{if(!ce.request?.id||ye.has(ce.request.id))break;let _e=new AbortController;ye.set(ce.request.id,_e);let be=B.current.executeBrowserAction,He=setTimeout(()=>_e.abort(),2e4);(be?be(ce.request,_e.signal):Promise.resolve({status:"failed",error:"Browser actions are unavailable in this client."})).then(xt=>{p.current===j&&j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"action_result",id:ce.request.id,result:xt}))}).catch(()=>{p.current===j&&j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:"action_result",id:ce.request.id,result:{status:"failed",error:"The action result is unknown; check the site before retrying."}}))}).finally(()=>clearTimeout(He));break}case"image_received":K.current.get(ce.imageId)?.(!0);break;case"image_error":K.current.get(ce.imageId)?.(!1);break;case"ready":b.current!==null&&clearTimeout(b.current),b.current=null,E.current=!0,x.current=Date.now(),ce.sampleRate&&(_.current=ce.sampleRate,ce.sampleRate!==Sa&&console.warn(`[kiku] live audio rate ${ce.sampleRate} != context ${Sa}; per-buffer resampling will click at every chunk seam`)),typeof ce.secondsLeft=="number"&&s(ce.secondsLeft),h(ce.photos===!0),G.current=ce.imageInput===!0;let Ne=J.current;if(Ne&&G.current)try{j.send(JSON.stringify({type:"image",imageId:Ne.id,image:Ne.image}))}catch{}N.current=!0,t("listening"),Re(),C.current?.(),C.current=null,or("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"),tt(),ce.tool==="visualize"&&m(_e=>_e.some(be=>be.pending)?_e:[..._e,{id:++R.current,url:"",pending:!0}]);break;case"viz":typeof ce.url=="string"&&ce.url?(Ce.current=ce.url,m(_e=>_e.map(be=>be.pending?{...be,url:ce.url,pending:!1}:be))):m(_e=>_e.filter(be=>!be.pending));break;case"heard":V.current.size===0&&(P.current=0),de.current||(de.current=Date.now(),or("heard")),y.current+=ce.text,he(_e=>{let be=_e.slice(),He=be[be.length-1];return He&&He.role==="user"&&!He.done?be[be.length-1]={...He,text:y.current.trim()}:be.push({role:"user",text:y.current.trim(),done:!1}),be}),a(!1),t("thinking"),tt();break;case"said":if(z.current+=ce.text,!D.current)break;he(_e=>{let be=_e.slice();for(let xt=be.length-1;xt>=0;xt--)be[xt].role==="user"&&!be[xt].done&&(be[xt]={...be[xt],done:!0});let He=be[be.length-1],Ge=z.current.trim();return He&&He.role==="assistant"&&!He.done?be[be.length-1]={...He,text:Ge}:be.push({role:"assistant",text:Ge,done:!1}),be});break;case"interrupted":Z.current=!1,At(),Se(),Be(),or("interrupt"),a(!1),t("listening");break;case"turn_complete":S.current=!1,D.current=!1,F.current=0,he(_e=>_e.map(be=>be.done?be:{...be,done:!0})),Mt(),Z.current=!1,Se(),a(!1),ge();break;case"sources":Array.isArray(ce.sources)&&ce.sources.length&&i(ce.sources);break;case"seconds":typeof ce.secondsLeft=="number"&&s(ce.secondsLeft);break;case"refused":B.current.onRefused?.(ce.code||"guest"),je();break;case"error":if(ce.code==="session_expiring"&&f.current())return;B.current.onError?.(ce.code||"unavailable"),je();break}},j.onclose=ue=>{p.current===j&&(b.current!==null&&clearTimeout(b.current),b.current=null,!(mn.canRetry(ue.code)&&f.current())&&(ue.code===4402&&(ee=!0,B.current.onError?.(ue.reason==="site"?"siteLimit":"limit")),bt("ended")))},j.onerror=()=>{!ee&&p.current===j&&console.warn("[kiku] voice transport interrupted")}},[At,Gt,ge,Re,Be,Mt,nt,tt,Se,je,bt]),Dt=(0,te.useCallback)(j=>{for(let ce of K.current.values())ce(!1);let ee=p.current;if(p.current=null,N.current=!1,oe.current=ic(oe.current,y.current,z.current),he(oe.current),m(ce=>ce.filter(Ne=>!Ne.pending)),ge(),D.current=!1,S.current=!1,Z.current=!1,At(),t("connecting"),Be(),Se(),ee){try{ee.send(JSON.stringify({type:"close"}))}catch{}try{ee.close()}catch{}}let ye=B.current;M.current=!0;let ue=new WebSocket(lc(ye,j),cc(ye));p.current=ue,ut(ue)},[ut,At,ge,Be,Se]),Kt=(0,te.useCallback)(()=>{if(!d.current||!E.current||!I.current)return!1;if(w.current!==null)return!0;let j=u.current.nextDelay();if(j===null)return B.current.onError?.("connection"),je(),!0;for(let ye of K.current.values())ye(!1);let ee=p.current;p.current=null,N.current=!1,b.current!==null&&clearTimeout(b.current),b.current=null;try{ee?.close()}catch{}return Be(),At(),Se(),a(!1),t("connecting"),w.current=setTimeout(()=>{w.current=null,d.current&&Dt()},j),!0},[At,Be,Dt,je,Se]);f.current=Kt,(0,te.useEffect)(()=>{let j=()=>{if(!d.current||!N.current||!I.current||document.visibilityState==="hidden")return;let ye=O.current;if(!ye)return;let ue=Date.now();if(ue-x.current<1e4){L.current=0;return}L.current?ue-L.current>1e4&&(B.current.onError?.("audio-capture"),je()):(L.current=ue,ye.resume().catch(()=>{}))},ee=window.setInterval(j,2e3);return document.addEventListener("visibilitychange",j),()=>{clearInterval(ee),document.removeEventListener("visibilitychange",j)}},[je]);let pt=(0,te.useRef)(e.voice);(0,te.useEffect)(()=>{pt.current!==e.voice&&(pt.current=e.voice,p.current&&(r==="listening"||r==="thinking"||r==="speaking")&&Dt(e.voice))},[e.voice,r,Dt]);let Tt=(0,te.useCallback)(async(j=[])=>{if(d.current&&(p.current||w.current!==null))return;d.current=!0,u.current=new mn,E.current=!1,t("connecting");let ee=B.current;T.current=[],W.current=j,oe.current=[],he([]),m([]),y.current="",z.current="";let ye=De();O.current?.resume().catch(()=>{}),Er();let ue=p.current;ue&&ue.readyState===WebSocket.OPEN?nt(ue):ue&&ue.readyState===WebSocket.CONNECTING?M.current=!0:(ue=new WebSocket(lc(ee),cc(ee)),p.current=ue,M.current=!0,ut(ue));let ce;try{if(!navigator.mediaDevices?.getUserMedia)throw{name:"NotAllowedError"};ce=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})}catch(Ge){try{ue.close()}catch{}p.current=null,t("idle"),ee.onError?.(Ge?.name==="NotAllowedError"?"not-allowed":"audio-capture");return}if(p.current!==ue){ce.getTracks().forEach(Ge=>Ge.stop());return}v.current=ce;for(let Ge of ce.getAudioTracks())Ge.enabled=!B.current.muted;let Ne=await ye;if(p.current!==ue){ce.getTracks().forEach(Ge=>Ge.stop());return}if(!Ne){B.current.onError?.("audio-worklet"),je();return}Ne.state==="suspended"&&Ne.resume().catch(()=>{});let _e=Ne.createAnalyser();_e.fftSize=1024,_e.smoothingTimeConstant=.25,$.current=_e;let be=Ne.createGain();be.gain.value=1,be.connect(Ne.destination),Q.current=be;let He=Ne.createAnalyser();He.fftSize=1024,He.smoothingTimeConstant=.25,He.connect(be),fe.current=He;try{let Ge=new AudioWorkletNode(Ne,"kiku-capture");I.current=Ge,Ge.port.onmessage=Jr=>xe(Jr.data);let xt=Ne.createMediaStreamSource(ce),gr=()=>{if(!(p.current!==ue||!I.current)){try{xt.connect(_e)}catch{}try{xt.connect(Ge)}catch{}}};N.current?gr():C.current=gr}catch{B.current.onError?.("audio-worklet"),je()}},[ut,De,xe,nt,je]);(0,te.useEffect)(()=>{if(r!=="listening"){a(!1);return}let j=0,ee=!1,ye=Date.now(),ue=window.setInterval(()=>{let ce=Date.now();if(!B.current.muted&&ke()>Ep&&(j=ce),ce-Math.max(j,ye)>Np){window.clearInterval(ue),B.current.onError?.("idle"),je();return}let Ne=ce-j<zp;Ne!==ee&&(ee=Ne,a(Ne))},100);return()=>window.clearInterval(ue)},[r,ke,je]);let dt=(0,te.useCallback)(()=>{ze()},[ze]);(0,te.useEffect)(()=>()=>{je()},[je]),(0,te.useEffect)(()=>{let j=v.current;if(j)for(let ee of j.getAudioTracks())ee.enabled=!e.muted},[e.muted,r]);let Ut=(0,te.useCallback)(async j=>{let ee=p.current;if(!d.current||!N.current||!ee||ee.readyState!==WebSocket.OPEN||!j.type.startsWith("image/"))return!1;let ye;try{ye=await va(j,"image/jpeg")}catch{return!1}if(ye.length>Math.ceil(4*1024*1024/3)*4+32||p.current!==ee||!d.current)return!1;let ue=++R.current;m(be=>[...be,{id:ue,url:ye,pending:!1,sending:!0}]);let ce=B.current.storeScene,Ne=ce?await ce(ye).catch(()=>!1):!1;if(p.current!==ee||!d.current||ee.readyState!==WebSocket.OPEN)return m(be=>be.filter(He=>He.id!==ue)),!1;let _e=Ne;return G.current?_e=await new Promise(be=>{let He=setTimeout(()=>Ge(!1),15e3),Ge=xt=>{clearTimeout(He),K.current.delete(ue),be(xt)};K.current.set(ue,Ge);try{ee.send(JSON.stringify({type:"image",imageId:ue,image:ye}))}catch{Ge(!1)}}):Ne&&ee.send(JSON.stringify({type:"text",text:"(The visitor attached a photo for editing. Briefly ask what they would like changed.)"})),!_e||p.current!==ee||!d.current||!N.current?(m(be=>be.filter(He=>He.id!==ue)),!1):(G.current&&(J.current={id:ue,image:ye}),m(be=>be.map(He=>He.id===ue?{...He,sending:!1}:He)),se.current.push(ye),!0)},[]),lr=(0,te.useCallback)(j=>{let ee=p.current;ee&&ee.readyState===WebSocket.OPEN&&j.trim()&&ee.send(JSON.stringify({type:"text",text:j}))},[]);return{state:r,phase:r,hearing:n,sources:o,secondsLeft:c,photos:l,turns:k,images:ie,micLevel:ke,micSpectrum:Qe,spectrumBins:Ze,start:Tt,stop:je,prewarm:dt,attachPhoto:Ut,ask:lr}}var Ap=e=>e==="connecting"||e==="ended"?"idle":e,pc={turns:[],images:[]},dc=()=>`v${Date.now().toString(36)}`;function Pp(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 mc({voiceLang:e,speechLang:r,shopperLanguage:t,ttsVoice:n="Algenib",messages:a,handleSendUtterance:o,appendSpokenExchange:i}){let c=(0,uc.useAkropolysContext)(),[s,l]=(0,vt.useState)("off"),[h,p]=(0,vt.useState)("idle"),[d,u]=(0,vt.useState)(""),[f,w]=(0,vt.useState)(!1),[b,E]=(0,vt.useState)(!1),[x,L]=(0,vt.useState)(()=>{try{let A=localStorage.getItem(xo);if(A&&zn.some(Y=>Y.name===A))return A}catch{}return n||"Algenib"}),M=(0,vt.useRef)(dc()),C=(0,vt.useCallback)(A=>{L(A);try{localStorage.setItem(xo,A)}catch{}},[]),F=ec({lang:e||r,onUtterance:A=>{p("thinking"),o(A)},onError:A=>{l("off"),p("idle"),u(A==="not-allowed"?"micDenied":A==="language-not-supported"?"micLangUnsupported":A==="audio-capture"?"micMissing":A==="network"?"micNetwork":"micFailed")},onBargeIn:()=>{Qi()}}),S=c?.voiceUrl||c?.api?.voiceUrl||c?.api?.apiUrl||c?.apiUrl||"",O=c?.api?.siteId||c?.siteId||"",v=c?.api?.apiToken||c?.apiToken||"",I=c?.getShopperId?.()||c?.getKikuPub?.()||void 0,$=c?.getShopperName?.()||void 0,P=hc({apiUrl:S,siteId:O,token:v,kikuId:I,proof:c?.getUserProof?.()||void 0,sessionId:c?.getSessionId?.()||void 0,storeScene:A=>c?.storeScene?.(A)??Promise.resolve(!1),executeBrowserAction:(A,Y)=>c.api.executeBrowserAction(A,Y),name:$,language:t,voice:x,muted:f,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"){E(!0),P.stop(),l("off");return}l("off"),u(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")&&E(!0),l("off"),u("voiceUnavailable")}}),Z=typeof window<"u"&&!!window.WebSocket&&!!(window.AudioContext||window.webkitAudioContext)&&!!navigator.mediaDevices?.getUserMedia,{prewarm:ve}=P;(0,vt.useEffect)(()=>{if(!Z)return;let A=window;if(A.requestIdleCallback){let y=A.requestIdleCallback(ve,{timeout:3e3});return()=>A.cancelIdleCallback(y)}let Y=window.setTimeout(ve,1500);return()=>window.clearTimeout(Y)},[Z,ve]),(0,vt.useEffect)(()=>{s==="converse"&&P.state==="ended"&&(l("off"),u("voiceSessionEnded"))},[s,P.state]);let[ne,V]=(0,vt.useState)(pc),fe=(0,vt.useCallback)(async A=>{if(!ri()){u("micInsecure");return}if(u(""),l(A),A==="dictate")p("listening"),await F.start();else{let Y=Pp(a,M.current);V(Y),P.start(Y.turns)}},[P,F,a]),Q=(0,vt.useCallback)(()=>{P.stop(),M.current=dc(),V(pc),P.start([])},[P]),_=(0,vt.useCallback)(()=>{l("off"),p("idle"),F.stop(),P.stop()},[P,F]),B=s==="converse"?Ap(P.state):s==="dictate"?h==="listening"?F.hearing?"speaking":"listening":h:"idle",N=s==="converse"&&P.state!=="listening"&&P.state!=="thinking"&&P.state!=="speaking";return{attachPhoto:async A=>{await P.attachPhoto(A)||u("voicePhotoFailed")},voiceMode:s,voicePhase:B,voiceConnecting:N,voiceError:d,setVoiceError:u,voiceMuted:f,setVoiceMuted:w,voiceSecondsLeft:P.secondsLeft??null,voiceBlocked:b,liveVoiceName:x,chooseVoice:C,canConverse:Z,startVoice:fe,stopVoice:_,voice:F,live:P,earlier:ne,newVoiceChat:Q}}var Ye=Xt(require("react"));var it=require("react"),Ee=require("react/jsx-runtime"),Do={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}},Ho={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}},Ma=[[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]],_p=.42,Fp=170;function Dp(e){let r=1;for(;r<Ma.length-1&&Ma[r][0]<e;)r++;let[t,n,a]=Ma[r-1],[o,i,c]=Ma[r],s=o===t?0:(e-t)/(o-t),l=s*s*(3-2*s);return[n+(i-n)*l,a+(c-a)*l]}var $n=6,bc=["bw","bh","tr","br","bow","lid","warm","wob","gx","gy"],Ar=(e,r,t)=>Math.max(r,Math.min(t,e));function fc(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 Hp(e,r,t,n,a){let o=Ar(e*t,8,r*.96),i=Ar(e*n,8,r*.96),c=(p,d)=>`${p.toFixed(2)} ${d.toFixed(2)}`,s=.46,l=Ar((e-o)/e,0,1),h=Ar((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)}`+fc(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)}`+fc(-e,r-i,-r+o,-a)+"Z"}var bn=[{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)"}],qo=[{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)"}],Ju=[...bn,...qo];function Bo(e){let n=(!qo.includes(e)&&Math.random()<.26?qo:bn).filter(a=>a!==e);return n[Math.floor(Math.random()*n.length)]}function ur(e){let r=parseInt(e.slice(1),16);return[r>>16&255,r>>8&255,r&255]}function $o(e){return`rgb(${Math.round(e[0])}, ${Math.round(e[1])}, ${Math.round(e[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]}var $p=[[255,253,248],[247,240,231],[231,218,202],[198,178,156]],kc=[.05,.15,.42,.74],qp=[.52,.72,.9,1],gc={color:"#E2581D",light:"#FFBE96",glow:"rgba(226, 88, 29, 0.34)"};function xc({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,it.useRef)(s),h=(0,it.useRef)(e);h.current=e;let p=(0,it.useRef)(t);p.current=t;let d=n==="blush"||a===!0||!!(o?.flower||o?.eyelashes||o?.blush),u=o?.flower??d,f=o?.eyelashes??d,w=o?.blush??d,b=(0,it.useRef)(null),E=(0,it.useRef)(null),x=(0,it.useRef)(null),L=(0,it.useRef)(null),M=(0,it.useRef)(null),C=(0,it.useRef)(null),F=(0,it.useRef)(null),D=(0,it.useRef)(null),S=(0,it.useRef)(null),O=(0,it.useRef)(null),v=(0,it.useRef)(null),I=(0,it.useRef)(null),$=(0,it.useRef)(null),P=(0,it.useRef)(null),Z=(0,it.useRef)([]),ve=(0,it.useRef)([]),ne=(0,it.useRef)(null),V=(0,it.useRef)(`kiku-${Math.random().toString(36).slice(2,8)}`).current,fe=(0,it.useRef)(i);return fe.current=i,(0,it.useEffect)(()=>{let Q=window.matchMedia("(prefers-reduced-motion: reduce)").matches,_={},B={};bc.forEach(Se=>{_[Se]=Do.idle[Se]??Ho.idle[Se]??0,B[Se]=0});let N=Array.from({length:$n},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),T=Array.from({length:$n},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),A=1800,Y=-1,y=0,z=2600,k=0,he=!1,oe=9e3+Math.random()*8e3,W=-1,ie=0;l.current&&!Q&&(W=_p,ie=performance.now()+Fp);let m=0,R=0,G=0,J=4200,K=0,se=0,Ce=0,de=12e3,me=bn[0],q=ur(me.color),ge=ur(me.light),Ie=[...q],xe=[...ge],Re=2600,De=-1/0,ze=!1,ke=0,Ue=!1,Qe=0,Ze=0,Be=0,St=!1,Mt=0,At=Se=>{Se-De<Re?(me=Bo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0):De=Se},Gt=(Se,tt,bt,je)=>{let nt=h.current,ut=Array.from({length:$n},()=>({x:0,y:0,w:0,h:0,rx:0,a:0})),Dt=(Kt,pt,Tt=0)=>{let dt=Math.max(4,54*Math.max(.06,tt));ut[Kt]={x:pt+bt,y:-4+je+Tt,w:21,h:dt,rx:10.5,a:1}};if(nt==="thinking"){let pt=Se%2800/2800,Tt=Math.pow(Math.sin(pt*Math.PI*2)*.5+.5,3);for(let dt=0;dt<4;dt++){let Ut=Se/700+dt/4*Math.PI*2,lr=(26-dt%2*5)*(1-.94*Tt),j=16+Tt*6+Math.sin(Se/420+dt)*1.4;ut[dt]={x:Math.cos(Ut)*lr,y:Math.sin(Ut)*lr*.86+2,w:j,h:j,rx:j/2,a:1}}}else if(nt==="visualizing")ut[0]={x:0,y:-2,w:78,h:26,rx:13,a:1};else if(nt==="speaking")for(let pt=0;pt<5;pt++){let Tt=12+Math.abs(Math.sin(Se/150+pt*.9))*26;ut[pt]={x:(pt-4/2)*15,y:-2,w:9,h:Tt,rx:4.5,a:1}}else nt==="failed"?(Dt(0,-22,8),Dt(1,22,8)):(Dt(0,-22),Dt(1,22));return ut};c&&(c.current=()=>{if(W>=0){Ue=!0,me=Bo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0;return}W=0,At(Qe),oe=Qe+4e3});let Yt=Se=>{Qe=Se;let tt=h.current,bt=Do[tt]??Do.idle,je=Ho[tt]??Ho.idle,nt=tt==="idle"||tt==="failed";nt&&!Q&&(Se>z&&(y=(Math.random()-.5)*2,z=Se+1800+Math.random()*3600),_.wantGx=y*5);let ut=p.current?1:0;Be=(Be+(ut-Ze)*.1)*.88,Ze+=Be;let Dt=p.current&&!Q?Math.sin(Se/480)*.055*Ze:0,Kt={bw:bt.bw*(1+Ze*.34+Dt),bh:bt.bh*(1+Ze*.2+Dt),tr:bt.tr,br:bt.br,bow:bt.bow,warm:je.warm,wob:je.wob,lid:je.lid,gx:nt&&!Q?y*5:0,gy:nt&&!Q?Math.sin(Se/2600)*2:0};!Q&&nt&&(Y<0&&Se>A&&(Y=0),Y>=0&&(Y+=1/7,Kt.lid=je.lid*Math.abs(Y-.5)*2,Y>=1&&(Y=-1,Kt.lid=je.lid,A=Se+(Math.random()<.22?340:2600+Math.random()*4200)))),bc.forEach($e=>{let lt=$e;if(Q){_[lt]=Kt[lt];return}let Je=lt==="lid"?.42:.11,Ht=lt==="lid"?.55:.78;B[lt]=(B[lt]+(Kt[lt]-_[lt])*Je)*Ht,_[lt]+=B[lt]});let pt=0,Tt=0;!Q&&p.current&&W<0&&Se>Mt&&(W=0,Mt=Se+2100,oe=Se+4e3),!Q&&tt==="idle"?W<0&&Se>oe&&(W=0,ze?(ze=!1,ke=0,me=Bo(me),Ie=ur(me.color),xe=ur(me.light),De=-1/0):(ke++,At(Se))):W<0&&(oe=Se+3e3+Math.random()*3e3),W>=0&&(Se>=ie&&(W+=1/96),[pt,Tt]=Dp(W),W>=1&&(W=-1,pt=0,Tt=0,Ue?(Ue=!1,ke=0,oe=Se+150):!ze&&ke>=2?(ze=!0,oe=Se+240):oe=Se+5e3+Math.random()*5e3));let dt=Math.max(0,pt);if(p.current!==St){St=p.current;let $e=p.current?gc:me;Ie=ur($e.color),xe=ur($e.light),p.current&&!Q&&(W<0&&(W=0),Mt=Se+2600)}let Ut=p.current?gc:me;if(Q)q=[...Ie],ge=[...xe];else for(let $e=0;$e<3;$e++)q[$e]+=(Ie[$e]-q[$e])*.055,ge[$e]+=(xe[$e]-ge[$e])*.055;let lr=$o(q),j=$o(ge);I.current?.setAttribute("stop-color",lr),$.current?.setAttribute("stop-color",j),P.current?.setAttribute("stop-color",j);for(let $e=0;$e<4;$e++){let lt=kc[$e]+(qp[$e]-kc[$e])*Ze;Z.current[$e]?.style.setProperty("stop-color",$o(Bp($p[$e],q,lt)))}let ee=.34+Math.sin(Se/1200)*.06,ye=dt>.02?Math.min(.72,ee+dt*.34):ee;v.current?.setAttribute("opacity",ye.toFixed(3)),dt>.04?fe.current?.(dt,Ut.color,Ut.glow):Pt>.04&&fe.current?.(0,Ut.color,Ut.glow),Pt=dt;let ue=Q?0:Math.sin(Se/1900)*.9*_.wob,ce=_.bw*(1+pt*.55)+ue*.4,Ne=_.bh*(1-pt*.62),_e=Hp(ce,Ne,Ar(_.tr+dt*.5,0,1.2),Ar(_.br+dt*.9,0,1),_.bow+ue+dt*5);b.current?.setAttribute("d",_e),E.current?.setAttribute("d",_e);let be=tt==="thinking";be!==he&&(he=be,ne.current?.setAttribute("filter",be?`url(#${V}-goo)`:"none"));let He=Gt(Se,_.lid*(1-dt*.85),_.gx,_.gy);for(let $e=0;$e<$n;$e++){let lt=He[$e],Je=N[$e],Ht=T[$e];for(let Bt of["x","y","w","h","rx","a"]){if(Q){Je[Bt]=lt[Bt];continue}Ht[Bt]=(Ht[Bt]+(lt[Bt]-Je[Bt])*.16)*.74,Je[Bt]+=Ht[Bt]}let mt=ve.current[$e];mt&&(mt.setAttribute("x",(Je.x-Je.w/2).toFixed(2)),mt.setAttribute("y",(Je.y-Je.h/2).toFixed(2)),mt.setAttribute("width",Math.max(0,Je.w).toFixed(2)),mt.setAttribute("height",Math.max(0,Je.h).toFixed(2)),mt.setAttribute("rx",Math.max(0,Math.min(Je.rx,Je.w/2,Je.h/2)).toFixed(2)),mt.setAttribute("opacity",Ar(Je.a,0,1).toFixed(2)))}let Ge=Q?0:Math.sin(Se/je.breath)*1.5;!Q&&nt&&W<0?(Se>J&&(G=(Math.random()<.5?-1:1)*(.35+Math.random()*.65),J=Se+2600+Math.random()*4200),Se>de&&(Ce=Ce>.1?0:1,de=Se+(Ce>.1?900:9e3+Math.random()*11e3))):(G=0,Ce=0),R=(R+(G-m)*.028)*.9,m+=R,se=(se+(Ce-K)*.06)*.82,K+=se;let xt=_.bh-Ne,gr=m*3.4+K*4.5,Jr=m*2.2+K*3,Zr=K*2.4;if(x.current?.setAttribute("transform",`translate(${Jr.toFixed(2)} ${(Ge+xt-Tt+Zr).toFixed(2)}) rotate(${gr.toFixed(2)} 0 60)`),L.current&&L.current.setAttribute("transform",`translate(${Jr.toFixed(2)} ${(Ge+xt-Tt+Zr).toFixed(2)}) rotate(${gr.toFixed(2)} 0 60)`),u&&M.current){let $e=-ce*.62,lt=-Ne*.7,Je=-16+(Q?0:Math.sin(Se/1400)*3)+gr*.4;M.current.setAttribute("transform",`translate(${$e.toFixed(2)}, ${lt.toFixed(2)}) rotate(${Je.toFixed(2)})`)}if(w&&C.current){let $e=12+_.gy*.5;C.current.setAttribute("transform",`translate(0, ${$e.toFixed(2)})`)}if(f&&F.current){let $e=tt!=="thinking"&&tt!=="visualizing"&&tt!=="speaking";F.current.setAttribute("opacity",$e?Ar(_.lid*1.3,0,1).toFixed(2):"0");let lt=(Je,Ht)=>{let mt=Math.max(1,Math.min(Je.w,Je.h)/2),Bt=Je.y-Je.h/2+mt,Tr="";for(let[$a,Dr]of[[20,7],[48,8],[76,6.5]]){let Rr=$a*Math.PI/180,qa=Je.x+Ht*Math.sin(Rr)*mt,Oa=Bt-Math.cos(Rr)*mt,Wa=Je.x+Ht*Math.sin(Rr)*(mt+Dr),Ua=Bt-Math.cos(Rr)*(mt+Dr)-1.5,nr=Je.x+Ht*Math.sin(Rr-.22)*(mt+Dr*.65),Va=Bt-Math.cos(Rr-.22)*(mt+Dr*.65);Tr+=` M ${qa.toFixed(2)} ${Oa.toFixed(2)} Q ${nr.toFixed(2)} ${Va.toFixed(2)} ${Wa.toFixed(2)} ${Ua.toFixed(2)}`}return Tr.trim()};D.current?.setAttribute("d",lt(N[0],-1)),S.current?.setAttribute("d",lt(N[1],1))}k=requestAnimationFrame(Yt)},Pt=0;return k=requestAnimationFrame(Yt),()=>cancelAnimationFrame(k)},[u,f,w,d]),(0,Ee.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,Ee.jsxs)("defs",{children:[(0,Ee.jsx)("linearGradient",{id:`${V}-marble`,x1:".2",y1:"0",x2:".42",y2:"1",children:[0,40,82,100].map((Q,_)=>(0,Ee.jsx)("stop",{ref:B=>{Z.current[_]=B},offset:`${Q}%`,style:{stopColor:`var(--hsk-marble-${_+1}, #FAF7F2)`}},Q))}),(0,Ee.jsxs)("linearGradient",{id:`${V}-contact`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ee.jsx)("stop",{ref:I,offset:"0%",stopColor:bn[0].color,stopOpacity:"0.9"}),(0,Ee.jsx)("stop",{ref:$,offset:"45%",stopColor:bn[0].light,stopOpacity:"0.5"}),(0,Ee.jsx)("stop",{ref:P,offset:"100%",stopColor:bn[0].light,stopOpacity:"0"})]}),(0,Ee.jsxs)("radialGradient",{id:`${V}-sheen`,cx:".34",cy:".2",r:".55",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF",style:{stopOpacity:"var(--hsk-marble-sheen, .9)"}}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FFFFFF",stopOpacity:"0"})]}),(0,Ee.jsxs)("linearGradient",{id:`${V}-hibiscus-petal`,x1:"0",y1:"1",x2:"0",y2:"0",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FF3366"}),(0,Ee.jsx)("stop",{offset:"65%",stopColor:"#FF758F"}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FFAAA6"})]}),(0,Ee.jsxs)("radialGradient",{id:`${V}-blush-cheek`,cx:"50%",cy:"50%",r:"50%",children:[(0,Ee.jsx)("stop",{offset:"0%",stopColor:"#FB7185",stopOpacity:"0.48"}),(0,Ee.jsx)("stop",{offset:"100%",stopColor:"#FB7185",stopOpacity:"0"})]}),(0,Ee.jsx)("clipPath",{id:`${V}-skin`,children:(0,Ee.jsx)("use",{href:`#${V}-body`})}),(0,Ee.jsxs)("filter",{id:`${V}-goo`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,Ee.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"4",result:"b"}),(0,Ee.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,Ee.jsxs)("mask",{id:`${V}-cut`,children:[(0,Ee.jsx)("path",{ref:E,d:"",fill:"#FFFFFF"}),(0,Ee.jsx)("g",{ref:ne,children:Array.from({length:$n},(Q,_)=>(0,Ee.jsx)("rect",{ref:B=>{ve.current[_]=B},fill:"#000000"},_))})]})]}),(0,Ee.jsxs)("g",{ref:x,mask:`url(#${V}-cut)`,children:[(0,Ee.jsx)("path",{id:`${V}-body`,ref:b,d:"",fill:`url(#${V}-marble)`}),(0,Ee.jsxs)("g",{clipPath:`url(#${V}-skin)`,children:[(0,Ee.jsx)("ellipse",{cx:"-14",cy:"-40",rx:"46",ry:"34",fill:`url(#${V}-sheen)`}),(0,Ee.jsx)("rect",{ref:v,x:"-100",y:"-20",width:"200",height:"100",fill:`url(#${V}-contact)`,opacity:"0.45"})]})]}),(0,Ee.jsxs)("g",{ref:L,style:{pointerEvents:"none"},children:[w&&(0,Ee.jsxs)("g",{ref:C,children:[(0,Ee.jsx)("ellipse",{cx:"-28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`}),(0,Ee.jsx)("ellipse",{cx:"28",cy:"0",rx:"10",ry:"5.5",fill:`url(#${V}-blush-cheek)`})]}),f&&(0,Ee.jsxs)("g",{ref:F,children:[(0,Ee.jsx)("path",{ref:D,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"}),(0,Ee.jsx)("path",{ref:S,stroke:"#3D1424",strokeWidth:"1.7",strokeLinecap:"round",fill:"none"})]}),u&&(0,Ee.jsxs)("g",{ref:M,className:"hsk-avatar-flower",children:[(0,Ee.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(Q=>(0,Ee.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(${Q-18})`},Q)),(0,Ee.jsx)("path",{d:"M 0 0 Q 3 -10 9 -14",stroke:"#F59E0B",strokeWidth:"1.6",strokeLinecap:"round",fill:"none"}),(0,Ee.jsx)("circle",{cx:"9",cy:"-14",r:"1.3",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"7",cy:"-12",r:"1.1",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"6.5",cy:"-15",r:"1.1",fill:"#FDE047"}),(0,Ee.jsx)("circle",{cx:"0",cy:"0",r:"2.2",fill:"#881337"})]})]})]})}var Oo=require("react");var Ot=require("react/jsx-runtime");function Ta({className:e="",compact:r=!1}){let[t,n]=(0,Oo.useState)(()=>ha()),[a,o]=(0,Oo.useState)(""),i=()=>{let c=!t;_s(c),n(c),or(c?"reply":"interrupt",!0),o(Ds())};return(0,Ot.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:i,role:"switch","aria-checked":t,"aria-label":t?"Mute notification sounds":"Unmute notification sounds",children:[(0,Ot.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Ot.jsx)("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),t?(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":0},d:"M15.5 8.5a5 5 0 0 1 0 7"}),(0,Ot.jsx)("path",{className:"hsk-snd-wave",style:{"--hsk-wave":1},d:"M18.5 5.5a9 9 0 0 1 0 13"})]}):(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)("line",{className:"hsk-snd-x",x1:"16",y1:"9",x2:"21",y2:"15"}),(0,Ot.jsx)("line",{className:"hsk-snd-x",x1:"21",y1:"9",x2:"16",y2:"15"})]})]}),!r&&(0,Ot.jsx)("span",{children:t?"Sounds":"Muted"})]})}var tr=require("react"),Op=300,Wp=220,Up=120,Vp=.45,jp=.4,Gp=.25,Ra=e=>Math.min(1,Math.max(0,e));function Yp(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=u=>((i*u+o)*u+a)*u,p=u=>((l*u+s)*u+c)*u,d=u=>(3*i*u+2*o)*u+a;return u=>{let f=u;for(let w=0;w<8;w++){let b=h(f)-u,E=d(f);if(Math.abs(b)<1e-5||Math.abs(E)<1e-6)break;f-=b/E}return p(Ra(f))}}var Kp=Yp(.32,.72,0,1);function Xp(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 vc({target:e,trigger:r,shadow:t,radius:n=0,enabled:a,onClosed:o}){let i=(0,tr.useRef)(null),c=(0,tr.useRef)(null),s=(0,tr.useRef)(!1),l=(0,tr.useRef)(0),h=(0,tr.useRef)(null),p=(0,tr.useRef)(o);p.current=o;let d=(0,tr.useCallback)(x=>{l.current=x;let L=e(),M=i.current,C=c.current;if(!L||!M||!C)return;let F=1-x,D=Math.min(Math.max(M.top,C.top),C.bottom-M.height),S=Math.min(Math.max(M.left,C.left),C.right-M.width),O=(M.top-D)*F,v=(M.left-S)*F,I=Math.max(0,(D-C.top)*F),$=Math.max(0,(S-C.left)*F),P=Math.max(0,(C.right-S-M.width)*F),Z=Math.max(0,(C.bottom-D-M.height)*F),ve=M.radius*F+n*x;L.style.clipPath=`inset(${I}px ${P}px ${Z}px ${$}px round ${ve}px)`,L.style.translate=v||O?`${v}px ${O}px`:"";let ne=t?.();ne&&Object.assign(ne.style,{left:`${$}px`,top:`${I}px`,width:`${Math.max(0,C.width-$-P)}px`,height:`${Math.max(0,C.height-I-Z)}px`,borderRadius:`${ve}px`,translate:L.style.translate}),L.style.setProperty("--hsk-island-content",String(Ra((x-Vp)/jp)));let V=String(Ra(x/Gp));L.style.opacity=V,ne&&(ne.style.opacity=V)},[e,t,n]),u=()=>{let x=e();if(x)for(let M of["clip-path","translate","--hsk-island-content","opacity"])x.style.removeProperty(M);let L=t?.();if(L)for(let M of["left","top","width","height","border-radius","translate","opacity"])L.style.removeProperty(M)},f=()=>{h.current!==null&&cancelAnimationFrame(h.current),h.current=null},w=(x,L,M)=>{f();let C=l.current,F=Math.max(Up,L*Math.abs(x-C)),D=performance.now(),S=O=>{let v=Ra((O-D)/F);d(C+(x-C)*Kp(v)),v<1?h.current=requestAnimationFrame(S):(h.current=null,M())};d(C),h.current=requestAnimationFrame(S)},b=(x,L)=>{i.current=Xp(L),x.style.clipPath="",x.style.translate="",c.current=x.getBoundingClientRect()};return(0,tr.useLayoutEffect)(()=>{if(!a)return;let x=e(),L=r();if(!(!x||!L))return s.current=!1,x.style.removeProperty("pointer-events"),b(x,L),l.current=0,w(1,Op,u),()=>{f(),u()}},[a]),{close:(0,tr.useCallback)(()=>{let x=e(),L=a?r():null,M=L?.getBoundingClientRect(),C=M&&M.bottom>0&&M.top<window.innerHeight;if(!x||!L||!C){p.current();return}let F=h.current!==null?l.current:1;b(x,L),s.current=!0,x.style.pointerEvents="none",l.current=F,w(0,Wp,()=>p.current())},[a,e,r])}}var fn=require("react/jsx-runtime");function La({mobile:e=!1,closing:r=!1}){let t=Zt();return(0,fn.jsxs)("div",{className:le("hsk-cb-theme-discovery",e&&"is-mobile",r&&"is-closing"),role:"note",children:[(0,fn.jsx)("svg",{viewBox:e?"0 0 360 260":"0 0 120 80",preserveAspectRatio:"none",fill:"none","aria-hidden":"true",children:(0,fn.jsx)("path",{pathLength:"1",vectorEffect:"non-scaling-stroke",d:e?"M174 250C213 263 247 245 239 225C230 205 205 222 220 239C244 269 294 251 326 220C354 194 343 158 351 132C363 90 349 66 352 43C356 20 311 16 215 14M225 5L213 14L224 24":"M26 67C48 78 63 61 54 52C43 43 37 58 50 62C81 73 106 44 84 22C79 16 73 13 66 12M72 27L65 12L83 10"})}),(0,fn.jsx)("span",{children:t(e?"themeHoldHint":"themeClickHint")})]})}var Oe=require("react/jsx-runtime"),yc=!1;function wc({title:e,logo:r,hasMessages:t,avatarState:n="idle",unread:a=!1,awayFromBottom:o=!1,themeMenuOpen:i=!1,themeMenuClosing:c=!1,themeDiscovery:s=!1,onThemeMenuReady:l,onThemeMenuClosed:h,isNarrow:p=!1,currentTheme:d="dark",onJumpToLatest:u,onReset:f,onClose:w,onToggleThemeMenu:b,onSelectTheme:E,themeAttr:x,below:L,layoutControl:M}){let C=Zt(),F=!!M,D=Ye.default.useRef(null),S=Ye.default.useRef(null),O=Ye.default.useRef(null),v=Ye.default.useRef(null),[I]=Ye.default.useState(()=>{let K=!yc;return yc=!0,K}),$=Ye.default.useRef(null),P=Ye.default.useRef(null),Z=C("clearChat"),[ve,ne]=Ye.default.useState({size:12,compact:!1});Ye.default.useLayoutEffect(()=>{let K=D.current,se=$.current,Ce=P.current;if(!K||!se||!Ce)return;let de=!0,me=()=>{if(!de)return;let ge=se.parentElement,Ie=getComputedStyle(K).gridTemplateColumns.split(" "),xe=parseFloat(Ie[2])||ge.clientWidth,Re=ge.querySelector(".hsk-cb-exit-btn"),De=parseFloat(getComputedStyle(ge).gap)||0,ze=Math.max(0,xe-(Re?Re.offsetWidth+De:0)-30),ke=Math.min(12,Math.floor(1200*ze/Math.max(1,Ce.scrollWidth))/100),Ue=ke<10;ne(Qe=>Qe.size===ke&&Qe.compact===Ue?Qe:{size:ke,compact:Ue})};me();let q=new ResizeObserver(me);return q.observe(K),v.current&&q.observe(v.current),document.fonts?.ready.then(me).catch(()=>{}),document.fonts?.addEventListener("loadingdone",me),()=>{de=!1,q.disconnect(),document.fonts?.removeEventListener("loadingdone",me)}},[Z,t,p,e,r]),Ye.default.useLayoutEffect(()=>{let K=D.current,se=v.current,Ce=S.current;if(!K||!se||!Ce)return;let de=se.offsetParent;if(!de)return;let me=de.offsetTop+se.offsetTop+se.offsetHeight/2;K.style.setProperty("--hsk-tray-top",`${me}px`),K.style.setProperty("--hsk-tray-head",`${se.offsetHeight/2+8}px`),K.style.setProperty("--hsk-tray-h",`${Ce.offsetHeight}px`),K.style.setProperty("--hsk-tray-w",`${Ce.offsetWidth}px`)},[i,p,F]);let[V]=Ye.default.useState(()=>typeof window<"u"&&!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches),[fe,Q]=Ye.default.useState(!1);Ye.default.useEffect(()=>{if(!p||fe)return;let K=window.requestIdleCallback,se=K?K(()=>Q(!0),{timeout:1200}):setTimeout(()=>Q(!0),600);return()=>{let Ce=window.cancelIdleCallback;K&&Ce?Ce(se):clearTimeout(se)}},[p,fe]);let _=p&&(i||fe);Ye.default.useEffect(()=>{if(p&&!fe)return;let K=requestAnimationFrame(()=>l?.());return()=>cancelAnimationFrame(K)},[p,fe,l]);let B=vc({target:Ye.default.useCallback(()=>S.current,[]),trigger:Ye.default.useCallback(()=>v.current,[]),shadow:Ye.default.useCallback(()=>O.current,[]),radius:18,enabled:p&&i&&V,onClosed:()=>h?.()});Ye.default.useEffect(()=>{p&&c&&B.close()},[c,p]);let[N,T]=Ye.default.useState(!1),[A,Y]=Ye.default.useState("#134e3d"),[y,z]=Ye.default.useState("rgba(19, 78, 61, 0.45)"),k=Ye.default.useRef(void 0),he=Ye.default.useRef(null),oe=Ye.default.useRef(!1),W=Ye.default.useRef(0),ie=Ye.default.useCallback(()=>{oe.current=!1,W.current=Date.now(),he.current=setTimeout(()=>{if(oe.current=!0,typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}b?.()},350)},[b]),m=Ye.default.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),R=Ye.default.useCallback(()=>{he.current&&(clearTimeout(he.current),he.current=null)},[]),G=Ye.default.useCallback(K=>{if(oe.current){oe.current=!1,K.preventDefault(),K.stopPropagation();return}o?u?.():p?b?.():k.current?.()},[o,p,u,b]),J=Ye.default.useCallback((K,se,Ce)=>{K>.04?(T(!0),Y(se),z(Ce)):T(!1)},[]);return(0,Oe.jsxs)("div",{ref:D,className:le("hsk-cb-topbar",p&&i&&"is-docked"),children:[(0,Oe.jsx)("div",{className:"hsk-cb-topbar-left",style:{minWidth:"34px"},children:p&&(0,Oe.jsx)("button",{type:"button",className:"hsk-cb-back",onClick:w,"aria-label":C("back"),children:(0,Oe.jsx)("span",{className:"hsk-cb-back-icon",children:(0,Oe.jsx)(sn,{})})})}),(0,Oe.jsxs)("div",{className:le("hsk-cb-topbar-mark",p&&i&&"is-oozing",s&&i&&!c&&"is-discovering"),"data-impacting":N?"true":"false",style:{"--hsk-contact-color":A,"--hsk-contact-glow":y},"data-unread":a?"true":"false",onTouchStart:ie,onTouchEnd:m,onTouchMove:R,onTouchCancel:R,onClick:G,role:"button",tabIndex:0,"aria-label":o?C("jumpToLatest"):`${e} (tap for themes)`,children:[(0,Oe.jsx)(xc,{state:n,size:34,theme:d,alert:a,onImpact:J,triggerRef:k,dropIn:I}),(0,Oe.jsx)("div",{className:"hsk-cb-topbar-identity",children:r?(0,Oe.jsx)("img",{ref:v,className:"hsk-cb-topbar-logo",src:r,alt:e}):(0,Oe.jsx)("span",{ref:v,className:"hsk-cb-topbar-name",children:e})})]}),(0,Oe.jsxs)("div",{className:"hsk-cb-topbar-actions",style:{display:"flex",alignItems:"center",gap:"6px"},children:[t&&(0,Oe.jsxs)("button",{ref:$,type:"button",className:le("hsk-cb-topbar-btn",ve.compact&&"is-compact"),onClick:f,title:Z,"aria-label":Z,children:[(0,Oe.jsx)("span",{ref:P,className:"hsk-cb-clear-measure","aria-hidden":"true",children:Z}),ve.compact?(0,Oe.jsx)(ka,{}):(0,Oe.jsx)("span",{className:"hsk-cb-topbar-btn-label",style:{fontSize:ve.size},children:Z})]}),!p&&(0,Oe.jsx)("button",{type:"button",className:"hsk-cb-squircle-btn hsk-cb-exit-btn",onClick:w,"aria-label":"Close Chat",children:(0,Oe.jsx)(on,{})})]}),p&&i&&(0,Oe.jsx)("div",{className:le("hsk-cb-topbar-scrim",s&&"is-discovery",c&&"is-closing"),onClick:b,"aria-hidden":"true"}),_&&(0,Oe.jsx)("div",{className:le("hsk-cb-tray-shadow",!i&&"is-parked"),"aria-hidden":"true",children:(0,Oe.jsx)("div",{ref:O})}),_&&(0,Oe.jsx)("div",{ref:S,className:le("hsk-cb-topbar-ooze-menu",c&&"is-closing",V&&"is-island",!i&&"is-parked"),role:"dialog","aria-label":"Theme selector",style:{position:"absolute",left:"50%",transform:"translateX(-50%)",zIndex:1e3},onPointerDown:K=>K.stopPropagation(),onClick:K=>K.stopPropagation(),onMouseDown:K=>K.stopPropagation(),children:(0,Oe.jsxs)("div",{className:"hsk-cb-theme-block",children:[(0,Oe.jsxs)("div",{className:"hsk-cb-tray-aside",children:[(0,Oe.jsx)(Ta,{compact:!0}),(0,Oe.jsx)("span",{className:"hsk-cb-tray-rule","aria-hidden":"true"}),(0,Oe.jsx)("span",{className:"hsk-cb-theme-vlabel","aria-hidden":"true",children:"Themes"})]}),(0,Oe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",children:ln.map(({id:K,label:se,Icon:Ce})=>(0,Oe.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",d===K&&"is-active"),onClick:de=>{de.stopPropagation(),E?.(K)},children:[(0,Oe.jsx)(Ce,{}),(0,Oe.jsx)("span",{children:se})]},K))}),M&&(0,Oe.jsxs)("div",{className:"hsk-cb-dock-layout",children:[(0,Oe.jsx)("span",{className:"hsk-cb-layout-label",children:"RESPONSIVE LAYOUT"}),M]})]})}),p&&i&&L&&(0,Oe.jsx)("div",{className:le("hsk-cb-tray-below",c&&"is-closing"),children:L}),p&&i&&s&&(0,Oe.jsx)(La,{mobile:!0,closing:c})]})}var Pr=Xt(require("react"));var On=Xt(require("react"));var Un=require("react/jsx-runtime"),Cc=83,Qp=2,za=240,Uo=160,Wt=za/2,yt=Uo/2,wr=24,kn=50,gn=56,Vo=124,yn=22,sr=6,jo=13,Jp=30,mr=(e,r,t)=>e+(r-e)*t,Wn=(e,r)=>Math.sin(e*12.9898+r*78.233)*.5;function Tc(e,r,t,n,a,o=0){let i=[];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+Wn(e.n,l)*.02;i.push([r+Math.cos(h+o)*n*p,t+Math.sin(h+o)*a*p])}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 Ia(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 Xo(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 Zp(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 Vr(e,r,t=0){let{ctx:n}=e,a=r*(1+t*.3);n.save(),Ia(e,t),n.fillStyle=Xo(e,Wt,yt,a),Tc(e,Wt,yt,a,a,e.n*.03),n.fill(),n.restore()}function Wo(e,r,t,n){let{ctx:a}=e;a.save(),n!==void 0&&(a.beginPath(),a.rect(0,0,za,n),a.clip()),Ia(e,0),a.fillStyle=Xo(e,Wt,yt,Math.max(r,t)),Tc(e,Wt,yt,r,t),a.fill(),a.restore()}function Ea(e,r,t,n,a,o=a/2,i=a/2){let{ctx:c}=e;c.save(),Ia(e,0),c.fillStyle=Zp(e,n,a),c.beginPath(),c.roundRect(r+Wn(e.n,r)*.6,n-a/2+Wn(e.n,n)*.6,t-r,a,[o,i,i,o]),c.fill(),c.restore()}function Go(e,r,t,n,a=0){let{ctx:o}=e,i=n*(1+a*.2);o.save(),Ia(e,a),o.fillStyle=Xo(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,p=t+Math.sin(s)*l;c===0?o.moveTo(h,p):o.lineTo(h,p)}o.stroke(),o.restore()}function Na(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(Wt+Math.cos(a)*o,yt+Math.sin(a)*o),t.lineTo(Wt+Math.cos(a)*(o+i),yt+Math.sin(a)*(o+i)),t.stroke()}t.restore()}var Yo=e=>Wt-Vo/2+Vo*e/sr;function ed(e,r){let{ctx:t}=e;t.save(),t.strokeStyle=e.dark,t.lineWidth=1.5,t.lineCap="round",t.beginPath(),t.moveTo(r,yt-yn/2+2),t.lineTo(r+Wn(e.n,r)*1.5,yt+yn/2-2),t.stroke(),t.restore()}var Ko=e=>Wt+(e-(sr-1)/2)*Jp;function qn(e,r,t=-1,n=-1){for(let a=0;a<sr;a++){let o=0;for(let s=0;s<r;s++)o+=a<=s?-2:2;let i=Yo(a)+o,c=Yo(a+1)+o;a===n?Go(e,mr((i+c)/2,Ko(a),.5),yt-4,jo,.5):a<=t?Go(e,Ko(a),yt,jo):Ea(e,i,c,yt,yn,a===0?yn/2:2,a===sr-1?yn/2:2)}}function td(){let e=[];for(let n=0;n<5;n++)e.push({draw:a=>Vr(a,wr)});let r=[[wr,wr,34,38],[34,38,44,48],[44,48,kn,gn]];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=>Wo(h,mr(n,o,s),mr(a,i,s)*l)})}e.push({hold:1,draw:c=>Wo(c,o,i)})}let t=0;for(let n=0;n<12;n++){let a=(n+1)/12,o=mr(yt+gn,yt-gn,a),i=mr(8,24,a),c=(o-yt)/gn;t=Math.max(t,2*kn*Math.sqrt(Math.max(0,1-c*c)),30);let s=t;e.push({draw:l=>{a<1&&Wo(l,kn,gn,o-i*.3),Ea(l,Wt-s/2,Wt+s/2,o,i)}})}for(let n of[.5,1])e.push({draw:a=>Ea(a,Wt-kn,Wt+kn,mr(yt-gn,yt,n),24)});for(let n=0;n<6;n++){let a=(n+1)/6,o=mr(2*kn,Vo,a),i=mr(24,yn,a),c=n%2?2:-2;e.push({draw:s=>Ea(s,Wt-o/2+c,Wt+o/2+c,yt,i)})}for(let n=1;n<sr;n++)e.push({draw:a=>{qn(a,n-1),ed(a,Yo(n))}}),e.push({thump:.35,draw:a=>qn(a,n)});e.push({draw:n=>qn(n,sr-1)});for(let n=0;n<sr;n++)e.push({thump:.12,draw:a=>qn(a,sr-1,n-1,n)});for(let n=0;n<4;n++)e.push({draw:a=>qn(a,sr-1,sr-1)});for(let n of[.35,.7,1])e.push({draw:a=>{for(let o=0;o<sr;o++)Go(a,mr(Ko(o),Wt,n),yt,mr(jo,10,n),.4)}});return e.push({thump:1,draw:n=>{Vr(n,wr*1.3),Na(n,1)}}),e.push({draw:n=>{Vr(n,wr*1.12),Na(n,.4)}}),e.push({draw:n=>Vr(n,wr*1.04)}),e}var xn=td(),Sc=[...[1.6,1.25,.9,.5,.18].map(e=>({draw:r=>Vr(r,wr,e)})),{thump:.7,draw:e=>{Vr(e,wr*1.24),Na(e,1)}},{draw:e=>{Vr(e,wr*1.08),Na(e,.4)}}],Mc=[1,.7,.35,0];function vn(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 Rc({phase:e,label:r,theme:t}){let n=On.default.useRef(null),a=On.default.useRef(null),o=On.default.useRef({n:0,at:0,held:0,entered:!1,last:xn[0]});return On.default.useEffect(()=>{let i=n.current,c=a.current,s=i?.getContext("2d");if(!i||!s||!c)return;let l=Math.min(window.devicePixelRatio||1,3);i.width=za*l,i.height=Uo*l;let h="var(--hsk-primary, #ff6a33)",p={ctx:s,dpr:l,n:0,clay:vn(i,h),light:vn(i,`color-mix(in srgb, ${h} 55%, white)`),dark:vn(i,`color-mix(in srgb, ${h} 70%, black)`),ink:getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31"},d=o.current,u="",f=()=>{let C=getComputedStyle(i).getPropertyValue("--hsk-primary").trim()||"#ff6a33";C!==u&&(u=C,p.clay=vn(i,C),p.light=vn(i,`color-mix(in srgb, ${C} 55%, white)`),p.dark=vn(i,`color-mix(in srgb, ${C} 70%, black)`),p.ink=getComputedStyle(i).getPropertyValue("--hsk-doodle-ink").trim()||"31, 31, 31")},w=(C,F=1)=>{f(),s.setTransform(l,0,0,l,0,0),s.clearRect(0,0,za,Uo),s.globalAlpha=F,p.n=d.n++,C.draw(p),s.globalAlpha=1},b=C=>{let F=i.getBoundingClientRect();Di({x:F.left+F.width/2,y:F.top+F.height/2,strength:C}),c.style.translate="0 1px",c.style.rotate=`${Wn(d.n,4)*.8}deg`};if(window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches){w(xn[0]);let C=window.setInterval(()=>w(xn[0]),Cc);return()=>clearInterval(C)}let E=e==="exit"?null:e==="enter"&&!d.entered?Sc:xn;E&&(d.at=0);let x=0,L=0,M=()=>{if(c.style.translate="",c.style.rotate="",!E){x===0&&b(.6),w(d.last,Mc[x]),++x>=Mc.length&&clearInterval(L);return}let C=E[d.at];w(C),d.last=C,C.thump&&d.held===0&&b(C.thump),!(E===xn&&++d.held<(C.hold??Qp))&&(d.held=0,!(++d.at<E.length)&&(E===Sc&&(d.entered=!0),E=xn,d.at=0))};return M(),L=window.setInterval(M,Cc),()=>clearInterval(L)},[e==="exit",t]),(0,Un.jsxs)("div",{className:"hsk-clay",children:[(0,Un.jsx)("canvas",{className:"hsk-clay-table",ref:n,"aria-hidden":"true"}),(0,Un.jsx)("p",{className:"hsk-lang-preparing",ref:a,children:r})]})}var pe=require("react/jsx-runtime");function rd(){return(0,pe.jsx)("span",{className:"hsk-cb-check","aria-hidden":"true",children:(0,pe.jsx)("svg",{viewBox:"0 0 16 16",children:(0,pe.jsx)("path",{d:"M3.5 8.4 6.6 11.4 12.6 4.8"})})})}function Lc({theme:e,inOnboarding:r,justCompleted:t,onboardingMood:n,awaitingLang:a,awaitingName:o,awaitingEntityLang:i,awaitingConsent:c,termsAgreed:s,shopperLanguage:l,pendingLanguage:h,shopperName:p,entityLangPref:d,chromeReady:u,activeChips:f,speechLang:w,t:b,tNode:E,chooseLanguage:x,langSwitching:L=!1,isLangPreparing:M,chooseEntityLang:C,agreeTerms:F,handleSend:D}){let S=h||l,O=!S||S.toLowerCase()==="english"||S.toLowerCase()==="en",v=M??(L||!!h||!!l&&!u&&!O),I=$r(S),[$,P]=Pr.default.useState(v),[Z,ve]=Pr.default.useState(()=>v?"spinner-steady":"idle"),ne=Pr.default.useRef([]),V=()=>{ne.current.forEach(clearTimeout),ne.current=[]};v!==$&&(P(v),V(),v?(ve("step1-exit"),ne.current.push(setTimeout(()=>ve("spinner-enter"),280)),ne.current.push(setTimeout(()=>ve("spinner-steady"),960))):(ve("spinner-exit"),ne.current.push(setTimeout(()=>ve("idle"),460)))),Pr.default.useEffect(()=>()=>V(),[]);let fe=Z==="spinner-enter"||Z==="spinner-steady"||Z==="spinner-exit",Q=Z==="step1-exit",_=fe||Q||!l||a?"1":!p||o?"2":!d||i?"3":!s||c?"4":null,[B,N]=Pr.default.useState(null),[T,A]=Pr.default.useState(3);Pr.default.useEffect(()=>{if(!c)return;A(3);let y=setInterval(()=>{A(z=>z<=1?(clearInterval(y),0):z-1)},1e3);return()=>clearInterval(y)},[c]);let Y=l?Ln(l,w)||l.charAt(0).toUpperCase()+l.slice(1):"";return(0,pe.jsx)("div",{className:"hsk-cb-empty",children:(0,pe.jsxs)("div",{className:"hsk-cb-onboarding-card",children:[_&&(0,pe.jsx)("div",{className:"hsk-cb-onboarding-head",children:(0,pe.jsxs)("span",{className:"hsk-cb-step-badge",dir:"ltr",children:[_," / 4"]})}),fe?(0,pe.jsx)("div",{className:le("hsk-lang-loader",Z==="spinner-enter"&&"hsk-lang-loader--enter",Z==="spinner-exit"&&"hsk-lang-loader--exit"),children:(0,pe.jsx)(Rc,{theme:e,phase:Z==="spinner-exit"?"exit":Z==="spinner-enter"?"enter":"steady",label:I.preparing})},"spinner-loading"):Q||a||!l?(0,pe.jsxs)("div",{className:le("hsk-cb-hello-wrap",Q&&"hsk-step1-exit"),children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:"Which language do you want to use?"}),(0,pe.jsxs)("div",{className:"hsk-cb-lang-chips",children:[ma.map((y,z)=>(0,pe.jsx)("button",{type:"button",className:"hsk-cb-lang-chip",style:{"--hsk-pill-idx":z},lang:y.tag,dir:y.rtl?"rtl":"ltr",disabled:L,onClick:()=>!L&&x(y.value),children:y.native},y.value)),(0,pe.jsx)("span",{className:"hsk-cb-lang-chips-hint",style:{"--hsk-pill-idx":ma.length},children:"or type another one"})]})]},"step-lang"):o||!p?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap hsk-cb-name-step hsk-step-enter",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:b("nameStepTitle")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-ask",children:b("nameStepAsk")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-hint",children:b("nameStepHint")})]},"step-name"):i?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:b("howShouldResultsLook")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:E("entityLangIntro",{lang:Y})}),(0,pe.jsx)("div",{className:"hsk-cb-entlang-opts",role:"radiogroup","aria-label":b("howShouldResultsLook"),children:["translated","original"].map((y,z)=>(0,pe.jsxs)("button",{type:"button",role:"radio","aria-checked":(B??d)===y,className:le("hsk-cb-entlang-opt",(B??d)===y&&"is-selected"),style:{"--hsk-opt-idx":z},onClick:()=>N(y),children:[(0,pe.jsx)(rd,{}),(0,pe.jsxs)("span",{className:"hsk-cb-entlang-opt-text",children:[(0,pe.jsx)("span",{className:"hsk-cb-entlang-opt-title",children:y==="translated"?E("inLanguage",{lang:Y}):b("asWritten")}),(0,pe.jsx)("span",{className:"hsk-cb-entlang-opt-note",children:b(y==="translated"?"detailsTranslated":"namesAsWritten")})]})]},y))}),(0,pe.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,pe.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",B&&"is-active"),disabled:!B,onClick:()=>B&&C(B),children:b("continueButton")})})]},"step-entity-lang"):c?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:b("termsStepTitle")}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:b("termsStepSubtitle")}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-sanctuary",children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":0},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"I"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsPiiTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsPiiDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":1},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"II"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsSessionTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsSessionDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":2},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"III"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsMemoryTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsMemoryDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":3},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"IV"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsCookieTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsCookieDesc")})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-divider"}),(0,pe.jsxs)("div",{className:"hsk-cb-terms-item",style:{"--hsk-row-idx":4},children:[(0,pe.jsxs)("div",{className:"hsk-cb-terms-head",children:[(0,pe.jsx)("span",{className:"hsk-cb-terms-numeral",children:"V"}),(0,pe.jsx)("h3",{className:"hsk-cb-terms-title",children:b("termsAiTitle")})]}),(0,pe.jsx)("p",{className:"hsk-cb-terms-desc",children:b("termsAiDesc")})]})]}),(0,pe.jsxs)("p",{className:"hsk-cb-terms-more",children:[b("privacyMore")," ",(0,pe.jsx)("a",{href:"https://akropolys.cloud/privacy",target:"_blank",rel:"noopener noreferrer",dir:"ltr",children:"akropolys.cloud/privacy"})]}),(0,pe.jsx)("div",{className:"hsk-cb-terms-action-wrap",children:(0,pe.jsx)("button",{type:"button",className:le("hsk-cb-terms-agree-btn",T===0&&"is-active"),disabled:T>0,onClick:F,children:T>0?b("termsAgreeCounting",{seconds:String(T)}):b("termsAgreeButton")})})]},"step-terms"):t?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:E("allSet",{name:p})}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:d==="translated"?E("replyingTranslated",{lang:Y}):E("replyingOriginal",{lang:Y})})]},"step-completed"):p?(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsx)("h2",{className:"hsk-cb-hello",children:E("greetReturning",{name:p})}),(0,pe.jsx)("p",{className:"hsk-cb-hello-lead",children:b("greetReturningLead")})]},"step-returning"):(0,pe.jsxs)("div",{className:"hsk-cb-hello-wrap",children:[(0,pe.jsxs)("h2",{className:"hsk-cb-hello",children:["Hello, I am ",(0,pe.jsx)("b",{children:"kiku"}),"."]}),(0,pe.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,pe.jsx)("div",{className:"hsk-cb-chips",children:f.map((y,z)=>(0,pe.jsx)("button",{className:"hsk-cb-chip",style:{"--hsk-pill-idx":z},onClick:()=>D(y),children:y},y))})]})})}var _r=require("react/jsx-runtime");function Qo({wide:e,onToggle:r,emphasized:t=!1}){return(0,_r.jsxs)("button",{type:"button",className:`hsk-cb-sound-pill hsk-cb-layout-toggle${t?" is-discovery":""}`,role:"switch","aria-checked":e,"aria-label":"Wide AI responses",onClick:r,children:[(0,_r.jsx)("span",{className:"hsk-cb-layout-track","aria-hidden":"true",children:(0,_r.jsx)("span",{className:"hsk-cb-layout-thumb",children:(0,_r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:(0,_r.jsx)("path",{d:"M3 4h10M3 8h10M3 12h7"})})})}),(0,_r.jsx)("span",{children:"Wide"})]})}var ir=require("react"),Ec="akropolys_chat_layout";function zc(e){let[r,t]=(0,ir.useState)(()=>{try{return typeof window<"u"&&localStorage.getItem(Ec)==="wide"}catch{return!1}}),n=(0,ir.useRef)(null),a=(0,ir.useRef)([]),o=(0,ir.useRef)(new Map),i=()=>{a.current.forEach(s=>s.cancel()),o.current.clear(),e.current?.querySelectorAll(".hsk-cb-msg-group").forEach(s=>o.current.set(s,s.getBoundingClientRect()));let c=e.current;if(c){let s=c.getBoundingClientRect().top,l=Array.from(c.querySelectorAll(".hsk-cb-msg-group")).find(h=>h.getBoundingClientRect().bottom>s);n.current={node:l,top:l?l.getBoundingClientRect().top-s:0,bottom:c.scrollHeight-c.scrollTop-c.clientHeight<40}}t(s=>!s)};return(0,ir.useLayoutEffect)(()=>{let c=n.current,s=e.current;if(!c||!s)return;n.current=null;let l=s.style.scrollBehavior;if(s.style.scrollBehavior="auto",c.bottom?s.scrollTop=s.scrollHeight:c.node?.isConnected&&(s.scrollTop+=c.node.getBoundingClientRect().top-s.getBoundingClientRect().top-c.top),s.style.scrollBehavior=l,a.current.forEach(h=>h.cancel()),a.current=[],!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){let h=s.getBoundingClientRect();for(let p of s.querySelectorAll(".hsk-cb-msg-group")){let d=p.getBoundingClientRect();if(d.bottom<h.top||d.top>h.bottom||!p.animate)continue;let u=o.current.get(p);!u||!d.width||!d.height||a.current.push(p.animate([{transformOrigin:"top left",transform:`translate(${u.left-d.left}px, ${u.top-d.top}px) scale(${u.width/d.width}, ${u.height/d.height})`},{transformOrigin:"top left",transform:"none"}],{duration:360,easing:"cubic-bezier(.4,0,.2,1)"}))}}},[r,e]),(0,ir.useEffect)(()=>{try{localStorage.setItem(Ec,r?"wide":"bubbles")}catch{}},[r]),(0,ir.useEffect)(()=>()=>a.current.forEach(c=>c.cancel()),[]),{wide:r,toggle:i}}var Gr=require("react");var jr=require("react/jsx-runtime");function Yr(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}}var Kr=e=>e==="with_team"||e==="back_with_kiku"||e==="team_closed"||e==="team_joined";function nd(e){return e<60?`${Math.max(1,Math.round(e))}s`:e<3600?`${Math.round(e/60)} min`:`${Math.round(e/3600)} h`}function Nc({text:e,isComplete:r,seconds:t,stage:n,repliedSeconds:a}){let o=Zt(),i=(0,Gr.useRef)(Date.now()),[c,s]=(0,Gr.useState)(()=>r?null:0),[l,h]=(0,Gr.useState)(!r);(0,Gr.useEffect)(()=>{if(r){c!==null&&(s(Math.max(1,Math.round((Date.now()-i.current)/1e3))),h(!1));return}h(!0);let f=setInterval(()=>{s(Math.round((Date.now()-i.current)/1e3))},1e3);return()=>clearInterval(f)},[r]);let p=t??c,d=a!=null?o("repliedIn",{duration:nd(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?p!=null?o("thoughtForSeconds",{duration:`${p}s`}):o("thoughtProcess"):`${o("thinking")}${c?` \xB7 ${c}s`:"\u2026"}`,u=!!e;return(0,jr.jsxs)("div",{className:le("hsk-cb-think",!r&&"hsk-cb-think--live",a==null&&Kr(n)&&"hsk-cb-think--note"),children:[(0,jr.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,jr.jsx)("span",{children:d}),u&&(0,jr.jsx)("span",{className:le("hsk-cb-think-chevron",l&&"hsk-cb-think-chevron--open"),children:"\u25B6"})]}),u&&l&&(0,jr.jsx)("div",{className:"hsk-cb-think-body",children:e})]})}var br=require("react");function Vn(e,r){let[t,n]=(0,br.useState)(!1),a=(0,br.useRef)(null),o=(0,br.useRef)(r);o.current=r,(0,br.useEffect)(()=>()=>{a.current&&clearTimeout(a.current)},[]);let i=(0,br.useCallback)(()=>{a.current||(n(!0),a.current=setTimeout(()=>{a.current=null,n(!1),o.current()},e))},[e]),c=(0,br.useCallback)(()=>{a.current&&(clearTimeout(a.current),a.current=null),n(!1),o.current()},[]);return{closing:t,requestClose:i,closeNow:c}}var Xc=Xt(require("react"));var wt=Xt(require("react")),Vc=require("@akropolys/sdk");function Jo(e){let r=/<\s*[||]+\s*DSML\s*[||]+\s*([a-z_]+)\b[^>]*>/i,t=e,n="";for(;t;){let a=r.exec(t);if(!a){let s=/<\s*\/?\s*[||]+[\s\S]*$/i.exec(t);if(s){let l=s[0].replace(/\s/g,"").replace(/|/g,"|").replace(/\|+/g,"|").toLowerCase();if("<|dsml|".startsWith(l)||"</|dsml|".startsWith(l)||l.startsWith("<|dsml|")||l.startsWith("</|dsml|"))return n+t.slice(0,s.index)}return n+(t.endsWith("<")?t.slice(0,-1):t)}n+=t.slice(0,a.index);let o=new RegExp("<\\s*/\\s*[|\uFF5C]+\\s*DSML\\s*[|\uFF5C]+\\s*"+a[1]+"\\s*>","i"),i=t.slice(a.index+a[0].length),c=o.exec(i);if(!c)return n;t=i.slice(c.index+c[0].length)}return n}var Xr=Xt(require("react"));var ad=/\p{L}/u,od=/\]\([^)]*\)|https?:\/\/\S+|www\.\S+/g;function sd(e){return e>=1424&&e<=2303||e>=64285&&e<=65023||e>=65136&&e<=65279}function Aa(e,r=1){let t=0,n=0;for(let a of e.replace(od," "))ad.test(a)&&(sd(a.codePointAt(0)??0)?t++:n++);if(!(t+n<r||t===n))return t>n?"rtl":"ltr"}var Xe=require("react/jsx-runtime"),id=/[ \t]{2,}/g,cd=/ ([.,!?:;])/g,ld=/\(([ \t]+)/g,hd=/([ \t]+)\)/g,pd=/(\d+)\s+(MP|mAh|W|GB|MB|KHz|Hz|KSh|KES|USD|EUR)\b/gi,dd=/(!\[[^\]]*\]\([^)]+\)|\[[^\]]+\]\([^)]+\)|\*\*[^*]+\*\*|`[^`]+`)/g,ud=/^!\[([^\]]*)\]\(([^)]+)\)$/,md=/^\[([^\]]+)\]\(([^)]+)\)$/,bd=/^(data:image|blob):/i,Pc=/^(https?|mailto|tel):/i;function jn(e){let r=String(e??"").trim();return Pc.test(r)||r.startsWith("/")&&!r.startsWith("//")?r:void 0}var Zo=null;function _c(e){if(bd.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||!!Zo?.has(r.host))}catch{return!1}}var fd=/memory|mimi/i,kd=/mimi\.akropolys/i,gd=e=>e&&e.replace(id," ").replace(cd,"$1").replace(ld,"(").replace(hd,")").replace(pd,"$1 $2"),Cr=(e,r)=>gd(e).split(dd).map((a,o)=>{if(!a)return null;let i=`${r}-inline-${o}`;if(a.startsWith("`")&&a.endsWith("`"))return(0,Xe.jsx)("code",{className:"hsk-markdown-code",children:a.slice(1,-1)},i);if(a.startsWith("**")&&a.endsWith("**"))return(0,Xe.jsx)("strong",{children:Cr(a.slice(2,-2),i)},i);let c=a.match(ud);if(c){let l=c[1],h=c[2];return _c(h)?(0,Xe.jsx)("img",{src:h,alt:l||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:p=>{p.target.style.display="none"}},i):null}let s=a.match(md);if(s){let l=s[1],h=s[2];return fd.test(l)||kd.test(h)?null:Pc.test(h)||h.startsWith("/")?(0,Xe.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"hsk-markdown-link",children:Cr(l,i)},i):(0,Xe.jsx)("span",{children:Cr(l,i)},i)}return a}),xd=/^\s*\|?[\s:|-]*-[\s:|-]*\|?\s*$/;function Ic(e,r){let t=e.trim();return r?t.includes("|"):t.startsWith("|")}function Ac(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 vd({children:e}){let r=Xr.default.useRef(null),[t,n]=Xr.default.useState("none"),[a,o]=Xr.default.useState(!1),i=Xr.default.useRef({startX:0,scrollLeft:0,isDown:!1,hasMoved:!1}),c=Xr.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),w=f<=4,b=f+p.clientWidth>=p.scrollWidth-4;n(w?u?"right":"left":b?u?"left":"right":"middle")},[]);Xr.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 s=p=>{let d=r.current;!d||d.scrollWidth<=d.clientWidth||p.target.closest("a, button, input")||(i.current={startX:p.pageX-d.offsetLeft,scrollLeft:d.scrollLeft,isDown:!0,hasMoved:!1},o(!0))},l=p=>{if(!i.current.isDown)return;let d=r.current;if(!d)return;let f=(p.pageX-d.offsetLeft-i.current.startX)*1.5;Math.abs(f)>3&&(i.current.hasMoved=!0,p.preventDefault(),d.scrollLeft=i.current.scrollLeft-f)},h=()=>{i.current.isDown=!1,o(!1)};return(0,Xe.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 Fc(e,r=!1,t){Zo=t??null;try{return yd(e,r)}finally{Zo=null}}function yd(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=>bd.test(h))&&(t.length=l)}let n=(l,h)=>Ia(l,r&&h===t.length-1?15:1),a=[],o=[],i=0,c=()=>{o.length>0&&(a.push((0,Ye.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 p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let u=p[1],f=p[2];Ac(f)&&a.push((0,Ye.jsx)("div",{className:"hsk-markdown-img-block",children:(0,Ye.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:C=>{C.target.style.display="none"}})},h)),s++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let u=d[1].length,f=`h${u+3}`;o.push((0,Ye.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],s),children:wr(d[2],h)},h)),s++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*[-*+•]\s+/);){let C=t[s].replace(/^[\s]*[-*+•]\s+/,"");f+=C+" ",u.push((0,Ye.jsx)("li",{children:wr(C,`li-${s}`)},`li-${s}`)),s++}o.push((0,Ye.jsx)("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,s-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*\d+[\.\)]\s+/);){let C=t[s].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=C+" ",u.push((0,Ye.jsx)("li",{children:wr(C,`li-${s}`)},`li-${s}`)),s++}o.push((0,Ye.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,s-1),children:u},`ol-${h}`));continue}if(zc(l,!1)){c();let u=[],f=[],C=[],b=!0;for(;s<t.length&&zc(t[s],!0);){let w=t[s].trim();if(w.match(/^\|?[-:| ]+\|?$/)&&w.includes("-")){C=Nc(w).map(S=>{let O=S.trim(),v=O.startsWith(":"),I=O.endsWith(":");return v&&I?"center":I?"end":"start"}),s++,b=!1;continue}let D=Nc(w);b&&u.length===0?u=D:f.push(D),s++}let E=Math.max(u.length,...f.map(w=>w.length)),x=[];for(let w=0;w<E;w++)if(C[w])x[w]=C[w];else if(w===0)x[w]="start";else{let D=f.filter(H=>{let S=(H[w]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(S)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(S)}).length;x[w]=D>=Math.ceil(f.length/2)?"end":"start"}let L=u.length>0?(0,Ye.jsx)("tr",{children:u.map((w,D)=>(0,Ye.jsx)("th",{style:{textAlign:x[D]||"start"},children:(0,Ye.jsx)("bdi",{children:wr(w,`th-${h}-${D}`)})},`th-${h}-${D}`))},`tr-head-${h}`):null,M=f.map((w,D)=>(0,Ye.jsx)("tr",{children:w.map((H,S)=>(0,Ye.jsx)("td",{className:H.trim().startsWith("\u2713")?"hsk-md-ok":H.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:x[S]||"start"},children:(0,Ye.jsx)("bdi",{children:wr(H,`td-${h}-${D}-${S}`)})},`td-${h}-${D}-${S}`))},`tr-body-${h}-${D}`));a.push((0,Ye.jsx)(fd,{children:(0,Ye.jsxs)("table",{className:"hsk-markdown-table",children:[L&&(0,Ye.jsx)("thead",{children:L}),(0,Ye.jsx)("tbody",{children:M})]})},`table-wrapper-${h}`));continue}o.push((0,Ye.jsx)("p",{className:"hsk-markdown-p",dir:n(l,s),children:wr(l,h)},h)),s++}return c(),(0,Ye.jsx)(Ye.Fragment,{children:a})}var Gn=require("react"),Rt=require("@akropolys/sdk"),Pt=require("react/jsx-runtime");function gd(e){let[,r]=(0,Gn.useState)(0),t=JSON.stringify(e);return(0,Gn.useEffect)(()=>(0,Rt.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Gn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(Rt.getLiveValue)}var xd=["title","name","label","headline","subject"],vd=8,yd=40;function wd({record:e,now:r}){let t=(0,Rt.isStale)(e,r),n=e.fields,a=xd.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<=yd&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,vd).map(([s,l])=>({label:(0,Rt.labelFor)(s),value:(0,Rt.formatLiveValue)(l),rawKey:s}));return(0,Pt.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Pt.jsx)("div",{className:"hsk-live-card__top",children:(0,Pt.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Pt.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Pt.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,Rt.describeAge)(r-e.at)}`:`Live \xB7 ${(0,Rt.describeAge)(r-e.at)}`})]})}),(0,Pt.jsx)("div",{className:"hsk-live-card__body",children:(0,Pt.jsx)("span",{className:"hsk-live-card__title",title:o,children:i})}),(0,Pt.jsx)("div",{className:"hsk-live-card__pills",children:c.map(s=>{let l=(0,Rt.isFresh)(e,s.rawKey,r);return(0,Pt.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${Rt.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Pt.jsx)("span",{className:"hsk-live-pill__label",children:s.label}),(0,Pt.jsx)("span",{className:"hsk-live-pill__value",children:s.value})]},s.rawKey)})})]})}function _c({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=gd(t);if(t.filter((c,s)=>n[s]).length===0)return null;let o=n.filter(c=>!!c),i=Date.now();return(0,Pt.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Pt.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,Pt.jsx)(wd,{record:c,now:i},c.key))})})}var Fc=require("react"),Dc=require("@akropolys/sdk");var _r=require("react/jsx-runtime");function Hc({source:e,onImageClick:r}){let t=(0,Dc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,Fc.useState)(!1),o=e.image||t[0]?.url;if(!o)return(0,_r.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,_r.jsx)(vr,{})});let i=c=>{if(c.stopPropagation(),!r)return;let s=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:s,title:e.name}):r(o)};return(0,_r.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:i,children:[n?(0,_r.jsx)(vr,{}):(0,_r.jsx)("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&(0,_r.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}var mr=require("react"),jn=require("@akropolys/sdk");var je=require("react/jsx-runtime");function Aa({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let i=(0,jn.useCardFields)(),c=(0,mr.useRef)(null),[s,l]=(0,mr.useState)(!1),[h,p]=(0,mr.useState)(!1),[d,u]=(0,mr.useState)(0),f=e.filter(S=>S.id&&n.includes(S.id)),C=f.filter(S=>S.swatch),b=f.filter(S=>!S.swatch),E=b.length===1,x=E?b.flatMap(S=>{let O=(0,jn.normalizeEntityImages)(S.images??S.fields?.images,S.image,S.url);return O.length?O.map((v,I)=>({source:S,image:v,photoIndex:I,totalPhotos:O.length})):[{source:S,image:void 0,photoIndex:0,totalPhotos:0}]}):b.map(S=>{let O=(0,jn.normalizeEntityImages)(S.images??S.fields?.images,S.image,S.url);return{source:S,image:O[0],photoIndex:0,totalPhotos:O.length}}),L=(0,mr.useCallback)(()=>{let S=c.current;if(!S||x.length===0)return;let O=Math.abs(S.scrollLeft),v=S.scrollWidth-S.clientWidth;l(O>10),p(v>4&&O<v-12);let q=Math.round(O/190);u(Math.min(Math.max(0,q),x.length-1))},[x.length]);(0,mr.useEffect)(()=>{L();let S=c.current;if(!S)return;let O=new ResizeObserver(L);return O.observe(S),S.addEventListener("scroll",L,{passive:!0}),()=>{O.disconnect(),S.removeEventListener("scroll",L)}},[L,e]);let M=S=>{let O=c.current;if(!O)return;let v=getComputedStyle(O).direction==="rtl";O.scrollBy({left:190*S*(v?-1:1),behavior:"smooth"})},w=()=>M(1),D=()=>M(-1);if(x.length===0&&C.length===0)return null;let H=C.length>0&&(0,je.jsx)("div",{className:"hsk-cb-swatch-grid",children:C.map((S,O)=>(0,je.jsxs)("button",{type:"button",className:he("hsk-cb-swatch",S.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${O*40}ms`},onClick:S.target?void 0:()=>r?.(S),children:[(0,je.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:S.swatch}}),(0,je.jsx)("span",{className:"hsk-cb-swatch-name",children:S.target?o:S.name}),(0,je.jsx)("span",{className:"hsk-cb-swatch-code",children:S.swatch})]},S.id??S.url??O))});return x.length===0?H||null:(0,je.jsxs)(je.Fragment,{children:[H,(0,je.jsxs)("div",{className:he("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[s&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,je.jsx)("button",{className:"hsk-cb-sources-prev",onClick:D,"aria-label":"Previous",children:(0,je.jsx)(on,{})})]}),(0,je.jsx)("div",{className:"hsk-cb-sources",ref:c,children:x.map(({source:S,image:O,photoIndex:v,totalPhotos:I},q)=>{let P=!!(S.id&&n.includes(S.id));return(0,je.jsxs)("div",{className:he("hsk-cb-source",P&&"hsk-cb-source--referenced"),style:{animationDelay:`${q*50}ms`},onClick:()=>r?.(S),children:[(0,je.jsx)(Hc,{source:E&&O?{...S,image:O.url,images:[O]}:S,onImageClick:t}),(0,je.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,je.jsx)("div",{className:"hsk-cb-src-name",children:S.name}),E&&O?.caption?(0,je.jsx)("div",{className:"hsk-cb-src-detail",children:O.caption}):E&&I>1?(0,je.jsx)("div",{className:"hsk-cb-src-detail",children:`Photo ${v+1} of ${I}`}):null,rr(S,i).slice(0,2).map(ee=>(0,je.jsx)("div",{className:"hsk-cb-src-detail",children:ee.value},ee.label))]})]},`${S.id??S.url??q}:${O?.url??v}`)})}),h&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,je.jsx)("button",{className:"hsk-cb-sources-next",onClick:w,"aria-label":"See more",children:(0,je.jsx)(sn,{})})]}),x.length>1&&(0,je.jsx)("div",{className:"hsk-cb-carousel-dots",children:x.map((S,O)=>(0,je.jsx)("div",{className:he("hsk-cb-dot-item",O===d&&"hsk-cb-dot-item--active"),onClick:()=>{let v=c.current;if(v){let I=getComputedStyle(v).direction==="rtl";v.scrollTo({left:O*190*(I?-1:1),behavior:"smooth"})}}},O))})]})]})}var Yn=require("react/jsx-runtime");function Bc({intent:e,sources:r,onSend:t,loading:n}){let a=Qt();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,Yn.jsx)("div",{className:"hsk-action-pills",children:o.map(s=>(0,Yn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(s.query),disabled:n,children:[(0,Yn.jsx)("span",{className:"hsk-pill-emoji",children:s.emoji}),s.label]},s.query))})}var ce=require("react/jsx-runtime"),qc=Lt.default.memo(({content:e,streaming:r,hosts:t})=>(0,ce.jsx)(ce.Fragment,{children:Pc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);qc.displayName="MarkdownBlock";function Cd(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 Sd(e,r){Lt.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),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 o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function Oc({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:i,isNarrow:c,loading:s,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:C,lastAction:b,vizState:E,setVizState:x,setLightboxSrc:L,setMarkupSrc:M,handleSend:w,handleSourceClick:D,onRetry:H,onEdit:S,onLongPress:O,hasError:v,retrying:I,t:q,messageRef:P,photosSending:ee,workingOn:ke,doodleTheme:oe}){let V=(0,$c.useAkropolysContext)()?.api,me=V?.siteId??"",J=Cd([V?.apiUrl,...(t?d:e.sources??[]).flatMap(_=>[_.image,_.url])]),F=e.role==="user",$=F?e.content:Ko(e.content),N=!F&&$!==e.content,[T,A]=Lt.default.useState(!1),K=Lt.default.useRef(null);Sd(K,e.content);let y=Lt.default.useRef(null),z=Lt.default.useRef(null),k=Lt.default.useRef(!1),pe=Lt.default.useCallback(_=>{let re=F?".hsk-cb-user-bubble":".hsk-cb-ai-body";return _.matches?.(re)?_:_.querySelector(re)||_},[F]),se=Lt.default.useCallback(_=>{z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(O){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let re=pe(_),Se=re.getBoundingClientRect();O(F?e:{...e,content:$},{top:Se.top,left:Se.left,width:Se.width,height:Se.height},F,re),k.current=!0}z.current=null},420)},[e,$,F,O,pe]),U=Lt.default.useCallback(_=>{if(_.touches.length!==1)return;let re=_.touches[0];y.current={x:re.clientX,y:re.clientY},k.current=!1,se(_.currentTarget)},[se]),le=Lt.default.useCallback(_=>{if(!y.current||!z.current)return;let re=_.touches[0];Math.hypot(re.clientX-y.current.x,re.clientY-y.current.y)>8&&(clearTimeout(z.current),z.current=null)},[]),m=Lt.default.useCallback(_=>{z.current&&(clearTimeout(z.current),z.current=null),y.current=null,k.current&&_.cancelable&&_.preventDefault()},[]),R=Lt.default.useCallback(_=>{if(!O||(_.preventDefault(),k.current))return;let re=pe(_.currentTarget),Se=re.getBoundingClientRect();O(F?e:{...e,content:$},{top:Se.top,left:Se.left,width:Se.width,height:Se.height},F,re)},[e,$,F,O,pe]);Lt.default.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let G=Lt.default.useCallback(_=>{if(_)try{navigator.clipboard.writeText(_),A(!0),setTimeout(()=>A(!1),2e3)}catch{}},[]),Z=Lt.default.useMemo(()=>jr($),[$]),j=Ko(e.thinking||Z.thinking),ie=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,ve=ie.test(Z.content),ue=ve?Z.content.replace(ie,"").trimEnd():Z.content;return(0,ce.jsx)("div",{className:he("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",i&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":F?"user":"assistant",ref:P,children:F?(0,ce.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,ce.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((_,re)=>(0,ce.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>L(_),children:[(0,ce.jsx)("img",{src:_,alt:`attachment ${re+1}`,className:"hsk-cb-user-img-thumb"}),(0,ce.jsx)(pn,{active:ee,seed:me,theme:oe}),re===3&&e.images.length>4&&(0,ce.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},re))}),e.content&&(0,ce.jsxs)("div",{ref:K,className:he("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",v&&"hsk-cb-user-bubble--error"),onTouchStart:U,onTouchMove:le,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,dir:Ia(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,ce.jsx)(Nn,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,ce.jsxs)(ce.Fragment,{children:[(0,ce.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,ce.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,ce.jsxs)("div",{className:"hsk-cb-msg-actions",children:[H&&(v||n)&&(0,ce.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>H(e),"aria-label":q("retry"),children:[(0,ce.jsx)(zn,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ce.jsx)("span",{className:"hsk-cb-msg-action-label",children:q("retry")})]}),S&&(0,ce.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>S(e),"aria-label":q("edit"),children:[(0,ce.jsx)(ka,{size:11}),(0,ce.jsx)("span",{className:"hsk-cb-msg-action-label",children:q("edit")})]}),(0,ce.jsxs)("button",{type:"button",className:he("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>G(e.content),"aria-label":q(T?"copied":"copy"),children:[T?(0,ce.jsx)(qr,{size:11}):(0,ce.jsx)($r,{size:11}),(0,ce.jsx)("span",{className:"hsk-cb-msg-action-label",children:q(T?"copied":"copy")})]})]}),n&&!v&&(0,ce.jsx)("span",{className:"hsk-cb-sent-status",children:q(h||p?"statusStopped":"statusSent")}),v&&(0,ce.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,ce.jsx)("span",{className:"hsk-cb-failed-dot"}),q("msgFailed")]})]})]}):(0,ce.jsx)("div",{className:he("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,ce.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:U,onTouchMove:le,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,children:[(()=>{let _=e.thoughtForSeconds!=null||ue.length>0||!(t&&(l||s));return(0,ce.jsxs)(ce.Fragment,{children:[!e.spoken&&(j||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Yr(e.statusStage)||t&&(l||s))&&(0,ce.jsx)(Ec,{text:j,isComplete:_,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,ce.jsx)("div",{className:"hsk-cb-think",children:(0,ce.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,ce.jsx)(Nn,{size:11}),(0,ce.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!ue&&N&&!(t&&(l||s))&&(0,ce.jsx)("p",{className:"hsk-cb-ai-content",children:q("errStreamInterrupted")}),ue&&(0,ce.jsx)("div",{className:"hsk-cb-ai-content",children:(0,ce.jsx)(qc,{content:ue,streaming:t&&l,hosts:J})}),ve&&(0,ce.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:q("calcDisclaimer")})]})})(),e.visualizing&&(0,ce.jsx)("div",{className:"hsk-cb-viz",children:(0,ce.jsxs)("div",{className:he("hsk-cb-viz--working",!ke&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||q("vizWorking"),children:[ke&&(0,ce.jsx)("img",{src:ke,alt:""}),(0,ce.jsx)(pn,{active:!0,seed:me,theme:oe})]})}),e.visualization&&(0,ce.jsxs)("div",{className:"hsk-cb-viz",children:[(0,ce.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,ce.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,ce.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:E[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>x(_=>({..._,[e.visualization]:"ok"})),onError:()=>x(_=>({..._,[e.visualization]:"err"}))}),E[e.visualization]==="err"&&(0,ce.jsx)("div",{className:"hsk-cb-viz-broken",children:q("vizUnavailable")}),t&&!l&&E[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,ce.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>M(e.visualization),children:[(0,ce.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,ce.jsx)("path",{d:"M12 20h9"}),(0,ce.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),q("vizMarkEdit")]})]}),(0,ce.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?q("vizDisclaimerVideo"):q("vizDisclaimerImage")})]}),!F&&(e.knowledgeImages?.length??0)>0&&(0,ce.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(_=>(0,ce.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,ce.jsx)("div",{className:"hsk-cb-kimg-grid",children:_.images.map((re,Se)=>(0,ce.jsx)("img",{src:re.url,alt:re.note||_.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>L(re.url),onError:De=>{De.target.style.display="none"}},Se))}),(_.title||_.images[0]?.note)&&(0,ce.jsx)("div",{className:"hsk-cb-kimg-caption",children:_.title||_.images[0]?.note})]},_.entryId))}),!F&&(0,ce.jsx)(_c,{keys:e.liveKeys}),!F&&(e.staleNotices?.length??0)>0&&(0,ce.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,ce.jsx)("div",{className:"hsk-cb-stale-title",children:q("staleTitle")}),e.staleNotices.map((_,re)=>(0,ce.jsxs)("div",{className:"hsk-cb-stale-item",children:[_.state==="removed"?q("staleRemoved",{title:_.title}):q("staleUnavailable",{title:_.title}),_.reason&&(0,ce.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",_.reason]})]},re))]}),(()=>{let _=t&&(s||l),re=_?u:e.referencedIds??[],Se=_?d:e.sources??[],De=t?C:e.intent,ye=De==="compare"||De==="capture"||De==="capture_all"||De==="delete"||De==="view_history";return re.length>0&&!ye&&(!t||b?.type!=="request_kiku_key")&&(0,ce.jsx)(Aa,{sources:Se,onSelectSource:D,onImageClick:L,referencedIds:re,compact:!!e.visualization,targetLabel:q("swatchTarget")})})(),t&&!s&&!l&&b?.type==="open_memory"&&Vn(b.url)&&(0,ce.jsxs)("a",{className:"hsk-cb-memory-pill",href:Vn(b.url),target:"_blank",rel:"noopener noreferrer",children:[q("openMemory"),(0,ce.jsx)(si,{})]}),t&&!s&&Vn(b?.url)&&b?.type!=="open_memory"&&(0,ce.jsx)("div",{className:"hsk-action-pills",children:(0,ce.jsxs)("a",{className:"hsk-action-pill",href:Vn(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!s&&(0,ce.jsx)(Bc,{intent:C,sources:f,onSend:w,loading:s}),!F&&a&&!l&&ue&&(0,ce.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,ce.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,ce.jsxs)("button",{type:"button",className:he("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>G(ue),"aria-label":q(T?"copied":"copy"),children:[T?(0,ce.jsx)(qr,{size:11}):(0,ce.jsx)($r,{size:11}),(0,ce.jsx)("span",{className:"hsk-cb-msg-action-label",children:q(T?"copied":"copy")})]}),t&&(v||ue.includes("We're experiencing high demand right now"))&&H&&(0,ce.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>H(e),"aria-label":q("retry"),children:[(0,ce.jsx)(zn,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ce.jsx)("span",{className:"hsk-cb-msg-action-label",children:q("retry")})]})]})})]})})})}var Ze=require("react/jsx-runtime");function Uc({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,Ze.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ze.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ze.jsx)(vr,{})}),(0,Ze.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ze.jsx)("div",{className:"hsk-cb-ai-text",children:(0,Ze.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,Ze.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,Ze.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,Ze.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,Ze.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,Ze.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function Wc({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,Ze.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,Ze.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,Ze.jsx)(vr,{})}),(0,Ze.jsx)("div",{className:"hsk-cb-ai-body",children:(0,Ze.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,Ze.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,Ze.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,Ze.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,Ze.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,Ze.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,Ze.jsx)("code",{children:e}),(0,Ze.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,Ze.jsx)(qr,{}):(0,Ze.jsx)($r,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,Ze.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var ct=require("react/jsx-runtime");function Md(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 Gc({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:C,keyPhase:b,keyInput:E,setKeyInput:x,mintedKey:L,setMintedKey:M,setMintedPub:w,minting:D,copied:H,keyCountdown:S,handleUseExistingKey:O,handleCreateKey:v,copyValue:I,queuedMessage:q,sendQueuedNow:P,setLightboxSrc:ee,setMarkupSrc:ke,handleSend:oe,handleSourceClick:V,onRetry:me,onEdit:J,onLongPress:F,retrying:$,continueGenerating:N,t:T,spacerRef:A,vizState:K,setVizState:y,messages:z,doodleTheme:k,afterReply:pe}){return(0,ct.jsxs)(ct.Fragment,{children:[(()=>{let se=-1;for(let U=e.length-1;U>=0;U--)if(e[U]?.role==="user"){se=U;break}return e.map((U,le)=>{let m=le===e.length-1,R=U.role==="user",G=R&&le===se,Z=e[le+1]?.role!==U.role,j=!Z,ie=e[le-1]?.role===U.role,ve=U.id||`${U.role}-${le}`,ue=e[le+1]?.content??"",_=G&&(n||a)&&!jr(ue).content.trim(),re=U.visualizing?Md(e,le):void 0,Se=G&&!!f||!R&&m&&!!f||!R&&!!U.content?.includes("We're experiencing high demand right now");return(0,ct.jsxs)(Vc.default.Fragment,{children:[(0,ct.jsx)(Oc,{msg:U,idx:le,isLast:m,isLastUser:G,isRunEnd:Z,runMid:j,runCont:ie,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,vizState:K,setVizState:y,setLightboxSrc:ee,setMarkupSrc:ke,handleSend:oe,handleSourceClick:V,onRetry:me,onEdit:J,onLongPress:F,hasError:Se,retrying:$,t:T,messageRef:De=>{r.current[le]=De},photosSending:_,workingOn:re,doodleTheme:k}),le===pe?.index&&pe.node]},ve)})})(),d&&z.length>0&&(0,ct.jsxs)("div",{className:he("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,ct.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{})]}),(0,ct.jsx)("span",{className:"hsk-cb-stopped-label",children:T(h?"stoppedByYou":"stoppedInterrupted")}),(0,ct.jsxs)("button",{className:"hsk-cb-continue",onClick:N,children:[(0,ct.jsx)(ii,{}),T(z[z.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,ct.jsx)("div",{className:"hsk-cb-error",children:Zs({code:C??void 0,message:f},T)}),b==="prompt_key"&&(0,ct.jsx)(Uc,{keyInput:E,setKeyInput:x,minting:D,handleUseExistingKey:O,handleCreateKey:v,t:T}),L&&(0,ct.jsx)(Wc,{mintedKey:L,copied:H,keyCountdown:S,onDismiss:()=>{M(null),w(null)},copyValue:I,t:T}),q&&(0,ct.jsx)("div",{className:he("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,ct.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,ct.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:q.content}),(0,ct.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:P,children:[(0,ct.jsx)("span",{className:"hsk-cb-queued-dot"}),T("queuedWaiting"),(0,ct.jsx)("span",{className:"hsk-cb-queued-now",children:T("queuedSendNow")})]})]})}),(0,ct.jsx)("div",{ref:A,className:"hsk-cb-msgs-spacer"})]})}var Et=Yt(require("react")),_a=require("@akropolys/sdk");var Qo=require("react/jsx-runtime"),Pa=16,Td=110,Rd=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function Jo(e){if(!e)return[];if(Rd.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 jc({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=Pa}){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]:Jo(i),h=Math.max(l.length-1,1),p=i.length>44?"3":s?"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:`${Td+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${i}|${c}|${u}`))})}var ae=require("react/jsx-runtime");function Yc({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:i,captureAllowed:c,discussedSources:s,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:C,chromeLoading:b,inputLocked:E,langSwitching:x=!1,imageInputRef:L,handleImageFiles:M,enableVision:w,enableVoice:D,canConverse:H,startVoice:S,voiceBlocked:O,textareaRef:v,classNames:I={},handleInput:q,handleKeyDown:P,voice:ee,voicePhase:ke,activePlaceholder:oe,loading:V,streaming:me,stop:J,handleSend:F,voiceError:$,setVoiceError:N,t:T,rail:A,notice:K,onOpenMimi:y}){let z=(0,_a.useAkropolysContext)(),k=(0,_a.useCardFields)(),[pe,se]=Et.default.useState(0),[U,le]=Et.default.useState(!1);Et.default.useEffect(()=>{if(!$)return;let ye=setTimeout(()=>{N?.("")},6e3);return()=>clearTimeout(ye)},[$,N]);let m=Et.default.useRef(null);Et.default.useEffect(()=>{if(!U)return;let ye=Fe=>{Fe.key==="Escape"&&le(!1)},Ee=Fe=>{let Ie=Fe.composedPath?Fe.composedPath():[],Ue=Fe.target?.closest?.(".hsk-cb-tools-toggle")||Ie.some(Qe=>Qe?.classList?.contains?.("hsk-cb-tools-toggle")),Ke=m.current&&(Ie.includes(m.current)||m.current.contains(Fe.target));Ue||Ke||le(!1)};return window.addEventListener("keydown",ye),document.addEventListener("mousedown",Ee),document.addEventListener("touchstart",Ee,{passive:!0}),()=>{window.removeEventListener("keydown",ye),document.removeEventListener("mousedown",Ee),document.removeEventListener("touchstart",Ee)}},[U]);let R=oe||"Ask me anything\u2026",G=(0,Et.useRef)(null),[Z,j]=(0,Et.useState)(()=>R.length>26);(0,Et.useEffect)(()=>{let ye=G.current;if(!ye||r)return;let Ee=()=>{let Ie=ye.querySelectorAll(".hsk-animated-placeholder__char");if(Ie.length<2)return j(!1);let be=Ie[0].offsetTop,Ue=Ie[Ie.length-1].offsetTop;j(Ue-be>Ie[0].offsetHeight/2)};Ee();let Fe=new ResizeObserver(Ee);return Fe.observe(ye),()=>Fe.disconnect()},[R,r]);let ie=Math.max(Jo(R).length-1,0)*Pa,[ve,ue]=(0,Et.useState)(!1),_=(0,Et.useRef)(null),re=()=>{_.current&&clearTimeout(_.current),ue(!0),_.current=setTimeout(()=>{ue(!1),_.current=null},550)};(0,Et.useEffect)(()=>()=>{_.current&&clearTimeout(_.current)},[]);let Se=(0,Et.useRef)(null),De=!!K;return(0,Et.useEffect)(()=>{Se.current?.toggleAttribute("inert",De)},[De]),(0,ae.jsxs)("div",{className:"hsk-cb-input-wrap","data-tools-open":U?"true":void 0,children:[U&&(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>le(!1),"aria-hidden":"true"}),(0,ae.jsx)("div",{className:"hsk-cb-toolsheet-wrap",ref:m,children:(0,ae.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[w&&(0,ae.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{le(!1),L.current?.click()},disabled:V,children:[(0,ae.jsx)(vo,{}),(0,ae.jsx)("span",{children:T("attachImage")})]}),D&&H&&(0,ae.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{le(!1),O?N?.(T("errAccountRequired")):S("converse")},disabled:V||b,children:[(0,ae.jsx)(yo,{}),(0,ae.jsx)("span",{children:T("voiceModeStart")})]}),y&&(0,ae.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{le(!1),y()},children:[(0,ae.jsx)(hi,{}),(0,ae.jsx)("span",{children:"MiMi"})]})]})})]}),K,(0,ae.jsxs)("div",{className:"hsk-cb-input-card",ref:Se,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,ae.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-sub",children:T("captureAndRemember")}),(0,ae.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(ye=>ye.replace(/^@kiku\s*/i,"")),a(!1),i(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,ae.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:ye=>ye.preventDefault(),children:[o&&c&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,ae.jsx)(vr,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,ae.jsxs)(ae.Fragment,{children:[s.map((ye,Ee)=>(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(ye),a(!1)},children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:ye.image?(0,ae.jsx)("img",{src:ye.image,alt:""}):(0,ae.jsx)(ba,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:ye.name}),rr(ye,k)[0]&&(0,ae.jsx)("span",{className:"hsk-cb-docked-option-detail",children:rr(ye,k)[0].value})]},ye.id??Ee)),s.length>1&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(s),a(!1)},children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,ae.jsx)(ba,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("captureAll",{count:String(s.length)})})]}),s.length===0&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,ae.jsx)(ba,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("captureCurrentPage")})]}),(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,ae.jsx)(ci,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("whatHaveYouSaved")})]}),(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,ae.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,ae.jsx)(fa,{})}),(0,ae.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("deleteThis")})]})]})]}),f.length>0&&(0,ae.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((ye,Ee)=>(0,ae.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,ae.jsx)("img",{src:ye.thumb||ye.data,alt:`attachment ${Ee+1}`,className:"hsk-cb-img-thumb"}),(0,ae.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>C(Ee),"aria-label":"Remove image",children:(0,ae.jsx)(vi,{size:10})})]},Ee))}),(0,ae.jsxs)("div",{className:he("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":pe%2?"b":"a","data-tools":U?"open":"closed",style:{"--hsk-text-sweep":`${ie}ms`},children:[(0,ae.jsx)("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:ye=>{M(ye.target.files),ye.target.value=""}}),(y||w||D&&H)&&(0,ae.jsx)("button",{className:he("hsk-cb-tools-toggle",U&&"hsk-cb-tools-toggle--open"),onClick:()=>le(ye=>!ye),disabled:V||b,"aria-label":U?"Close options":"More options","aria-expanded":U,children:(0,ae.jsx)(li,{})}),(0,ae.jsx)(ae.Fragment,{children:w&&(0,ae.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>L.current?.click(),disabled:V,"aria-label":"Attach image",children:(0,ae.jsx)(vo,{})})}),(0,ae.jsxs)("div",{className:"hsk-cb-field",ref:G,"data-ph-lines":!r&&Z?"2":void 0,children:[(0,ae.jsx)("textarea",{ref:v,value:r,onChange:q,onKeyDown:P,rows:1,placeholder:"",className:he("hsk-cb-textarea",I.input),"aria-label":oe,disabled:E||V&&!me||x}),(0,ae.jsx)(jc,{placeholder:oe,visible:!r,staggerMs:Pa,replaySeed:pe})]}),D&&H&&(0,ae.jsx)("button",{className:he("hsk-cb-voice-mode-btn",O&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>O?N?.(T("errAccountRequired")):S("converse"),disabled:V||b,"aria-label":"Voice conversation",children:(0,ae.jsx)(yo,{})}),(V||me)&&!ve?(0,ae.jsx)("button",{className:he("hsk-cb-send","hsk-cb-send--stop",I.sendButton),onClick:J,"aria-label":"Stop generating",children:(0,ae.jsx)(oi,{})}):(0,ae.jsxs)("button",{className:he("hsk-cb-send",ve&&"is-launching",I.sendButton),onClick:()=>{re(),F()},disabled:x||E||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,ae.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,ae.jsx)("defs",{children:(0,ae.jsxs)("filter",{id:e,children:[(0,ae.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,ae.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,ae.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,ae.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,ae.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,ae.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,ae.jsx)("span",{className:"hsk-cb-send-kite",children:(0,ae.jsx)(ui,{})})]})]})]})]}),O?(0,ae.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,ae.jsx)("span",{children:T("errAccountRequired")}),(0,ae.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ye=>{ye.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):$&&(0,ae.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,ae.jsx)("span",{children:T($)}),(0,ae.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:ye=>{ye.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var yt=Yt(require("react"));var er=require("react"),Qc=require("react/jsx-runtime");function Kc(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(o=>o+o).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 Ld(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 yn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var Cr=24,Ed=.42;function Xc({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let i=(0,er.useRef)(null),c=(0,er.useRef)(e),s=(0,er.useRef)(t),l=(0,er.useRef)(n),h=(0,er.useRef)(a);return(0,er.useEffect)(()=>{c.current=e},[e]),(0,er.useEffect)(()=>{s.current=t},[t]),(0,er.useEffect)(()=>{l.current=n},[n]),(0,er.useEffect)(()=>{h.current=a},[a]),(0,er.useEffect)(()=>{let p=i.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=Kc(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),C=Kc(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,E=0,x=0,L=()=>{let J=Math.min(window.devicePixelRatio||1,3),F=p.getBoundingClientRect();E=Math.max(1,F.width),x=Math.max(1,F.height),p.width=Math.round(E*J),p.height=Math.round(x*J),d.setTransform(J,0,0,J,0,0)};L();let M=typeof ResizeObserver<"u"?new ResizeObserver(L):null;M?.observe(p),window.addEventListener("resize",L);let w=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,D=new Float32Array(Cr),H=[],S=null,O=-1,v=null,I=0,q=0,P=performance.now(),ee=(J,F,$,N)=>J+(F-J)*(F>J?$:N),ke=()=>{let J=l.current,F=h.current?.()??0;if(!J||!F||((!v||v.length!==F)&&(v=new Uint8Array(F)),!J(v)))return!1;let N=Math.max(Cr,Math.floor(F*Ed))/Cr;for(let T=0;T<Cr;T++){let A=Math.floor(T*N),K=Math.max(A+1,Math.floor((T+1)*N)),y=0;for(let k=A;k<K;k++)y+=v[k];let z=y/(K-A)/255;D[T]=ee(D[T],z,w?.2:.55,w?.06:.14)}return!0},oe=(J,F)=>{for(let $=0;$<Cr;$++){let N=$/(Cr-1),T=Math.pow(1-N,1.6)*(.75+.25*Math.sin(J*3.1+$*.7));D[$]=ee(D[$],T*F,.3,.12)}},V=J=>{let F=Math.min(Cr-1,Math.max(0,J*(Cr-1))),$=Math.floor(F),N=F-$,T=D[$],A=D[Math.min(Cr-1,$+1)];return T+(A-T)*N*N*(3-2*N)},me=J=>{b=requestAnimationFrame(me);let F=(J-P)/1e3,$=c.current,N=Math.min(1,s.current());I=ee(I,Math.max($==="speaking"?.42:$==="listening"?.3:$==="thinking"?.28:.12,N),w?.1:.5,w?.05:.11),ke()||oe(F,Math.max(.25,I)),d.clearRect(0,0,E,x);let A=x/2;q=$==="thinking"?(q+.012)%1.6:0;let K=3;if(O!==E){H=[];for(let k=0;k<K;k++){let pe=k/(K-1||1),se=Ld(f,C,pe*.5),U=d.createLinearGradient(0,0,E,0);U.addColorStop(0,yn(se,0)),U.addColorStop(.5,yn(se,.9-pe*.35)),U.addColorStop(1,yn(se,0)),H.push(U)}S=d.createLinearGradient(0,0,E,0),S.addColorStop(0,yn(f,0)),S.addColorStop(.5,yn(f,.14)),S.addColorStop(1,yn(f,0)),O=E}let y=x*.32,z=Math.max(4,E/130);for(let k=0;k<K;k++){let pe=k/(K-1||1),se=k*.055,U=1-pe*.22;d.beginPath();let le=0,m=A;for(let G=0;G<=E;G+=z){let Z=G/E,j=Math.pow(Math.sin(Math.PI*Z),.85),ie=$==="thinking"?Math.exp(-Math.pow((Z-(q-.3))*4.5,2)):1,ve=V(Math.abs(Z-.5)*2),ue=F-se,_=Math.sin(Z*Math.PI*2*2.1+ue*7.4)*.66+Math.sin(Z*Math.PI*2*3.7-ue*5.6)*.26+Math.sin(Z*Math.PI*2*5.9+ue*9.1)*.08,re=A+j*ie*U*y*I*(.6+ve*1.1)*_+Math.sin(Z*Math.PI*2*.6+(F-se)*2.2)*j*x*.01;G===0?d.moveTo(G,re):d.quadraticCurveTo(le,m,(le+G)/2,(m+re)/2),le=G,m=re}d.quadraticCurveTo(le,m,E,m),d.lineCap="round",d.lineJoin="round";let R=(k===0?3:1.6)*(1+I*.6);k===0&&(d.strokeStyle=S,d.lineWidth=R*5,d.stroke()),d.strokeStyle=H[k],d.lineWidth=R,d.stroke()}};return b=requestAnimationFrame(me),()=>{cancelAnimationFrame(b),M?.disconnect(),window.removeEventListener("resize",L)}},[r]),(0,Qc.jsx)("canvas",{ref:i,className:o,"aria-hidden":"true"})}var Xr=require("react");var zt=require("react/jsx-runtime");function Kn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[i,c]=(0,Xr.useState)(t),s=(0,Xr.useRef)(null);if((0,Xr.useEffect)(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),(0,Xr.useEffect)(()=>{if(o.length===0)return;let p=d=>{d.key==="Escape"&&a(),o.length>1&&(d.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),d.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[o.length,a]),o.length===0)return null;let l=o[i]||o[0],h=p=>c(d=>(d+p+o.length)%o.length);return(0,zt.jsxs)("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[(0,zt.jsx)("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:(0,zt.jsx)(an,{})}),n&&(0,zt.jsx)("div",{className:"hsk-lightbox-top",onClick:p=>p.stopPropagation(),children:(0,zt.jsx)("span",{className:"hsk-lightbox-title",children:n})}),(0,zt.jsxs)("div",{className:"hsk-lightbox-stage",onClick:p=>p.stopPropagation(),onTouchStart:p=>{s.current=p.touches[0]?.clientX??null},onTouchEnd:p=>{let d=p.changedTouches[0]?.clientX;s.current!==null&&d!==void 0&&Math.abs(d-s.current)>40&&h(d<s.current?1:-1),s.current=null},children:[o.length>1&&(0,zt.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:(0,zt.jsx)(on,{})}),(0,zt.jsxs)("div",{className:"hsk-lightbox-content",children:[(0,zt.jsx)("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&(0,zt.jsx)("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&(0,zt.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:(0,zt.jsx)(sn,{})})]}),o.length>1&&(0,zt.jsx)("div",{className:"hsk-lightbox-bottom",onClick:p=>p.stopPropagation(),children:(0,zt.jsxs)("div",{className:"hsk-lightbox-counter",children:[i+1," / ",o.length]})})]})}var Jc=require("@akropolys/sdk"),Te=require("react/jsx-runtime");function zd({images:e,siteId:r,themeAttr:t}){let n=(0,yt.useRef)(null),[a,o]=(0,yt.useState)(null);if((0,yt.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,Te.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(s=>(0,Te.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,Te.jsx)(pn,{active:!0,seed:r,theme:t}),s.url&&(0,Te.jsx)("img",{src:s.url,alt:"",draggable:!1},s.url),s.url&&(0,Te.jsx)(pn,{active:!!s.sending||s.id===c,seed:r,theme:t})]},s.id)),a&&(0,Te.jsx)(Kn,{src:a,onClose:()=>o(null)})]})}function Nd({current:e,choose:r,label:t,groups:n}){let a=En.find(l=>l.name===e),[o,i]=(0,yt.useState)(!1),c=(0,yt.useRef)(null),s=(0,yt.useRef)(null);return(0,yt.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 p=u=>{c.current&&!u.composedPath().includes(c.current)&&i(!1)},d=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[o]),(0,Te.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[(0,Te.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,Te.jsx)("span",{children:a?.trait??e}),(0,Te.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Te.jsx)(sn,{})})]}),(0,Te.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:s,children:["male","female"].map(l=>(0,Te.jsxs)(yt.default.Fragment,{children:[(0,Te.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),En.filter(h=>h.gender===l).map(h=>(0,Te.jsxs)("button",{type:"button",role:"radio","aria-checked":e===h.name,"aria-label":`${h.trait}, ${n[l]} (${h.name})`,className:he("hsk-voice-option",e===h.name&&"hsk-voice-option--on"),onClick:()=>{r(h.name),i(!1)},children:[(0,Te.jsx)("span",{className:"hsk-voice-option-name",children:h.trait}),(0,Te.jsx)("span",{className:"hsk-voice-option-trait",children:h.name})]},h.name))]},l))})]})}function Zc({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:i,voicePhase:c,live:s,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:C,t:b}){let E=(0,yt.useRef)(null),x=(0,yt.useRef)(null),L=(0,yt.useRef)(null),M=[...l.turns,...s.turns??[]],w=[...l.images,...s.images??[]],D=s.sources??[],[H,S]=(0,yt.useState)(null),O=w.some(P=>P.pending),v=M.length,I=M[v-1]?.text??"",q=(0,yt.useRef)(!1);return(0,yt.useEffect)(()=>{x.current?.scrollIntoView({block:"end",behavior:q.current?"smooth":"auto"}),q.current=!0},[v,I]),(0,Te.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Te.jsx)(va,{seed:e,theme:r}),M.some(P=>P.text)&&(0,Te.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:i,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Te.jsx)(ka,{size:15})}),(0,Te.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Te.jsx)(an,{})}),(0,Te.jsx)(Nd,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Te.jsxs)("div",{className:"hsk-voice-thread",ref:E,children:[M.filter(P=>P.text).map((P,ee)=>P.role==="user"?(0,Te.jsx)("div",{className:"hsk-cb-user-msg",children:(0,Te.jsx)("div",{className:he("hsk-cb-user-bubble","hsk-cb-user-bubble--spoken",!P.done&&"hsk-voice-turn--live"),children:P.text})},ee):(0,Te.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Te.jsx)("div",{className:he("hsk-cb-ai-body",!P.done&&"hsk-voice-turn--live"),children:P.text})},ee)),(0,Te.jsx)("div",{ref:x})]}),(w.length>0||D.length>0)&&(0,Te.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Te.jsx)(zd,{images:w,siteId:e,themeAttr:r}),D.length>0&&(0,Te.jsx)("div",{className:"hsk-voice-sources",children:(0,Te.jsx)(Aa,{sources:D.map(P=>({...P,images:(0,Jc.normalizeEntityImages)(P.images??P.fields?.images,P.image,P.url)})),onSelectSource:C,onImageClick:S,referencedIds:D.map(P=>P.id).filter(P=>!!P),compact:!0})})]}),H&&(0,Te.jsx)(Kn,{src:H,onClose:()=>S(null)}),i&&(0,Te.jsxs)("div",{className:"hsk-voice-connecting",role:"status",children:[(0,Te.jsx)("span",{className:"hsk-voice-connecting-dot"}),(0,Te.jsx)("span",{children:b("voiceConnecting")})]}),u&&(0,Te.jsx)("div",{className:"hsk-voice-error",children:b(u)}),(0,Te.jsxs)("div",{className:"hsk-voice-controls",dir:"ltr",children:[s.photos&&(0,Te.jsxs)(Te.Fragment,{children:[(0,Te.jsx)("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:P=>{let ee=P.target.files?.[0];P.target.value="",ee&&f(ee)}}),(0,Te.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:i||O,onClick:()=>L.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Te.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Te.jsx)(pi,{})})})]}),(0,Te.jsx)("div",{className:he("hsk-voice-stage",i&&"hsk-voice-stage--connecting"),children:(0,Te.jsx)(Xc,{className:"hsk-voice-canvas",theme:r,phase:c,level:s.micLevel,spectrum:s.micSpectrum,bins:s.spectrumBins})}),(0,Te.jsx)("button",{className:he("hsk-voice-control",p&&"hsk-voice-control--muted",i&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:i,onClick:()=>d(P=>!P),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:(0,Te.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Te.jsx)(di,{}):(0,Te.jsx)(Nn,{})},p?"off":"on")})]})]})}var Sr=require("react");var br=require("react/jsx-runtime"),Xn=14,el=6;function Id(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?el*1.3:el*.6)*(s%2?1:-1),i=`M ${Xn} 0`,c=0;return t.forEach((s,l)=>{let h=n(s),p=c+(h-c)/2;i+=` C ${Xn+o(l)} ${p}, ${Xn+o(l)} ${p}, ${Xn} ${h}`,c=h}),{d:i+` L ${Xn} ${a}`,height:a}}function tl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=Qt(),i=(0,Sr.useRef)(null),c=(0,Sr.useRef)(null),s=(0,Sr.useRef)([]),l=(0,Sr.useRef)(null),[h,p]=(0,Sr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,Sr.useEffect)(()=>{let u=s.current[d],f=l.current,C=c.current,b=i.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(Id(s.current,d)),C&&b)){let E=b.clientHeight;if(C.scrollHeight>E&&E>0){let L=u.offsetTop+u.offsetHeight/2,M=E/2-L;C.style.transform=`translateY(${M}px)`}else C.style.transform="none"}},[d,e.length]),e.length<2?null:(0,br.jsx)("nav",{ref:i,className:he("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:(0,br.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,br.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,br.jsx)("path",{d:h.d})}),(0,br.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,br.jsxs)("button",{ref:C=>{s.current[f]=C},type:"button",className:he("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,br.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,br.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var gt=require("react"),rl=require("react-dom");var ht=require("react/jsx-runtime"),Ad=190;function nl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:i,isRTL:c=!1,canRetry:s,onPin:l,onRetry:h,onCopy:p,onClose:d,t:u}){let[f,C]=(0,gt.useState)(!1),b=(0,gt.useRef)(null),E=(0,gt.useRef)(),[x]=(0,gt.useState)(()=>{let be=o?.getBoundingClientRect();return!!be&&(r.top<be.top+64||r.top+r.height>be.bottom-8)});(0,gt.useLayoutEffect)(()=>{let be=n?.closest(".hsk-cb-msg-group");if(!be)return;let Ue=be.inert;return be.setAttribute("data-hsk-tapback-focus",""),be.inert=!0,()=>{be.removeAttribute("data-hsk-tapback-focus"),be.inert=Ue}},[n]),(0,gt.useLayoutEffect)(()=>{if(!o)return;let be=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{be===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",be)}},[o]);let{closing:L,requestClose:M}=Wn(Ad,d);(0,gt.useEffect)(()=>{let be=document.activeElement,Ue=()=>Array.from(b.current?.querySelectorAll("button")??[]);b.current?.focus({preventScroll:!0});let Ke=Qe=>{if(Qe.key==="Escape"&&(Qe.preventDefault(),Qe.stopImmediatePropagation(),M()),Qe.key!=="Tab")return;let He=Ue();if(!He.length)return;let wt=He.indexOf(document.activeElement);(Qe.shiftKey?wt<=0:wt===He.length-1||wt<0)&&(Qe.preventDefault(),He[Qe.shiftKey?He.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",Ke,!0),()=>{window.removeEventListener("keydown",Ke,!0),clearTimeout(E.current),be?.isConnected&&be.focus({preventScroll:!0})}},[M]);let w=(0,gt.useCallback)(async()=>{await p(e.content||"")&&(C(!0),E.current=setTimeout(M,450))},[e.content,p,M]),D=(0,gt.useCallback)(()=>{nr("pin"),l(e),M()},[e,l,M]),H=(0,gt.useCallback)(()=>{h&&h(e),M()},[e,h,M]),[S,O]=(0,gt.useState)(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));(0,gt.useLayoutEffect)(()=>{let be=0,Ue=()=>{be=0;let He=n?.getBoundingClientRect()??r,wt=(i?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??He,Ct=i?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),Nt=a?.getBoundingClientRect()??t,Vt=o?.getBoundingClientRect()??Nt,Gt=b.current?.offsetWidth??0,It=b.current?.offsetHeight??36,Ce=o?.scrollTop??0;O(et=>{let bt=(Ve,nt)=>Ve===nt||!!Ve&&!!nt&&["top","left","width","height"].every(ut=>Math.abs(Ve[ut]-nt[ut])<.5);return bt(et.box,He)&&bt(et.attachment,wt)&&bt(et.thought,Ct)&&bt(et.container,Nt)&&bt(et.viewport,Vt)&&et.width===Gt&&et.height===It&&et.scrollTop===Ce?et:{box:He,attachment:wt,thought:Ct,container:Nt,viewport:Vt,width:Gt,height:It,scrollTop:Ce}})},Ke=()=>{be||(be=requestAnimationFrame(Ue))};Ue();let Qe=typeof ResizeObserver>"u"?null:new ResizeObserver(Ke);for(let He of[n,a,o,b.current])He&&Qe?.observe(He);return o?.addEventListener("scroll",Ke,{passive:!0}),window.addEventListener("resize",Ke),window.visualViewport?.addEventListener("resize",Ke),window.visualViewport?.addEventListener("scroll",Ke),()=>{cancelAnimationFrame(be),Qe?.disconnect(),o?.removeEventListener("scroll",Ke),window.removeEventListener("resize",Ke),window.visualViewport?.removeEventListener("resize",Ke),window.visualViewport?.removeEventListener("scroll",Ke)}},[n,a,o,r,t,i]);let[v,I]=(0,gt.useState)("");(0,gt.useEffect)(()=>{if(!n)return;let be=getComputedStyle(n).backgroundColor;be&&be!=="rgba(0, 0, 0, 0)"&&be!=="transparent"&&I(be)},[n]);let{box:q,attachment:P,thought:ee,container:ke,viewport:oe}=S,V=ke?.top??0,me=ke?.left??0,J=ke?.width??(typeof window<"u"?window.innerWidth:390),F=q.top-V,$=P.left-me,N=P.width,T=q.height,A=2;s&&h&&A++;let K=A===2?122:170,y=S.width||K,z=S.height,k=window.visualViewport?.offsetTop??0,pe=k+(window.visualViewport?.height??window.innerHeight),se=Math.max(0,Math.max(oe?.top??V,k)-V),U=Math.min(ke?.height??window.innerHeight,Math.min(oe?oe.top+oe.height:pe,pe)-V),le=se+8,m=Math.max(le,U-z-8),R=!!ee,G=R||x||F-z-9>=le,Z=G?F-z-9:F+T+9,j=ee?Math.max(le,Math.min(ee.top-V+(ee.height-z)/2,m)):x?le:Math.max(le,Math.min(Z,m)),ie=Math.round(q.top-(oe?.top??V)+S.scrollTop),ve=Math.min(24,T/2),ue=Math.ceil(Math.max(240,oe?.height??ke?.height??window.innerHeight)+64),_=(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)("div",{className:he("hsk-tapback-frost","is-upper",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?ie:F)-ue,height:ue+ve}}),(0,ht.jsx)("div",{className:he("hsk-tapback-frost","is-lower",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?ie:F)+T-ve,height:ue+ve}})]}),re=!i&&!!n?.closest('[data-hsk-layout="wide"]'),Se=c,De=Se?Math.min(J-18,$+N-7):Math.max(18,$+7),ye=Se?De-y+18:De-18;ye=Math.max(10,Math.min(ye,J-y-10));let Ee=Math.max(18,Math.min(De-ye,y-18)),Fe=v||(i?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),Ie=0;return(0,ht.jsxs)("div",{className:he("hsk-tapback-overlay",L&&"is-closing"),onClick:M,children:[o?(0,rl.createPortal)(_,o):_,(0,ht.jsxs)("div",{ref:b,className:he("hsk-tapback-group",re&&"is-wide",(x||R)&&"is-docked",L&&"is-closing",G?"is-above":"is-below",i?"is-user":"is-ai"),style:{top:`${j}px`,left:`${ye}px`,maxWidth:`${Math.max(0,J-20)}px`,"--tail-x":`${Ee}px`,"--tail-dir":Se?1:-1,"--tail-step":i?"9px":"8px","--hsk-anchor-color":Fe,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:be=>be.stopPropagation(),children:[(0,ht.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:D,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":Ie++},children:[(0,ht.jsx)(yi,{size:14}),(0,ht.jsx)("span",{children:"Pin"})]}),s&&h&&(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:H,"aria-label":u("retry"),style:{"--tool-idx":Ie++},children:[(0,ht.jsx)(zn,{size:14}),(0,ht.jsx)("span",{children:u("retry")})]}),(0,ht.jsxs)("button",{type:"button",className:he("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",f&&"is-copied"),onClick:w,"aria-label":u(f?"copied":"copy"),style:{"--tool-idx":Ie++},children:[f?(0,ht.jsx)(qr,{size:14}):(0,ht.jsx)($r,{size:14}),(0,ht.jsx)("span",{children:u(f?"copied":"copy")})]})]}),(0,ht.jsxs)("div",{className:he("hsk-tapback-tail",G?"is-above":"is-below"),style:{left:`${Ee}px`},children:[(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}var Fa=require("react");var al=!1;function ol(){if(al)return!0;try{return localStorage.getItem("akropolys_layout_hint_seen")==="true"||localStorage.getItem("akropolys_chat_layout")==="wide"}catch{return!1}}function Qn(){al=!0;try{localStorage.setItem("akropolys_layout_hint_seen","true")}catch{}}var wn=require("react/jsx-runtime");function sl({onOpenDock:e}){let r=Qt(),t=(0,Fa.useRef)(null);return(0,Fa.useEffect)(()=>{let n=t.current;if(!n)return;if(typeof IntersectionObserver>"u"){Qn();return}let a=new IntersectionObserver(o=>{o.some(i=>i.isIntersecting&&i.intersectionRatio>=.5)&&(Qn(),a.disconnect())},{threshold:.5});return a.observe(n),()=>a.disconnect()},[]),(0,wn.jsxs)("button",{ref:t,type:"button",className:"hsk-cb-layout-discovery-note",onClick:e,children:[(0,wn.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,wn.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,wn.jsx)("span",{children:r("layoutFirstReplyNote",{button:"Wide"})})]})}var _e=require("react/jsx-runtime"),Pd=240,_d=700,Fd=200;function Zo({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:i,chips:c=Ln,theme:s,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let C=(0,Ha.useAkropolysContext)(),b=(0,Ha.useCardFields)(),{messages:E,sources:x,loading:L,streaming:M,error:w,errorCode:D,lastAction:H,lastIntent:S,allowedActions:O,send:v,queuedMessage:I,sendQueuedNow:q,appendSpokenExchange:P,stop:ee,stopped:ke,interrupted:oe,continueGenerating:V,reset:me,referencedIds:J,humanPending:F,leaveHuman:$}=(0,Da.useKiku)(),[N,T]=(0,Y.useState)(null),A=(0,Y.useRef)(null),K=(0,Y.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||A.current?.animate([0,-7,6,-4,2,0].map(g=>({transform:`translateX(${g}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,Y.useEffect)(()=>{if(!N)return;let g=Ae=>{(Ae.key.length===1||Ae.key==="Enter"||Ae.key==="Backspace")&&K()},B=Ae=>{let Pe=at=>Ae.composedPath().some($e=>$e.classList?.contains(at));!Pe("hsk-cb-leave")&&!Pe("hsk-cb-topbar")&&K()},xe=Hr.current;return xe?.setAttribute("inert",""),document.addEventListener("keydown",g),document.addEventListener("pointerdown",B,!0),()=>{xe?.removeAttribute("inert"),document.removeEventListener("keydown",g),document.removeEventListener("pointerdown",B,!0)}},[N,K]);let[y,z]=(0,Y.useState)(()=>{try{return C.getShopperName?.()??""}catch{return""}}),[k,pe]=(0,Y.useState)(()=>{try{return C.getShopperLanguage?.()??""}catch{return""}}),[se,U]=(0,Y.useState)(()=>{try{return C.getEntityLanguageMode?.()??""}catch{return""}}),[le,m]=(0,Y.useState)(!1),[R,G]=(0,Y.useState)(null),[Z,j]=(0,Y.useState)(""),[ie,ve]=(0,Y.useState)(!1),{chromeReady:ue,baseFontReady:_,isRTL:re,speechLang:Se,scriptFont:De,fontStack:ye,isNonLatin:Ee,hostFontCovers:Fe,t:Ie,tNode:be}=$i({shopperLanguage:k||Z,theme:s,preloadedStrings:R}),Ue=Y.default.useMemo(()=>{let g=x.filter($e=>$e.id&&J.includes($e.id)),B=[...E].reverse().find($e=>$e.role==="assistant")?.content??"";if(!B)return g;let xe=new Set(g.map($e=>$e.id)),Ae=B.toLowerCase().replace(/\s+/g," "),Pe=$e=>{let Mt=String($e??"").toLowerCase().replace(/\s+/g," ").trim(),ot=Mt.split(" "),At=[Mt];return ot.length>3&&At.push(ot.slice(0,3).join(" ")),ot.length>4&&At.push(ot.slice(0,4).join(" ")),At.filter(tn=>tn.length>=5)},at=x.filter($e=>$e.id&&!xe.has($e.id)&&Pe($e.name).some(Mt=>Ae.includes(Mt)));return[...g,...at]},[x,J,E]),Ke=O===null||O.includes("capture"),[Qe,He]=(0,Y.useState)(""),[wt,Ct]=(0,Y.useState)(!1),[Nt,Vt]=(0,Y.useState)(!1),[Gt,It]=(0,Y.useState)([]),Ce=(0,Y.useRef)(new Map),et=(0,Y.useRef)(null),[bt,Ve]=(0,Y.useState)({}),[nt,ut]=(0,Y.useState)(null),_t=(0,Y.useCallback)((g,B)=>{if(!g&&!B){ut(null);return}ut(B?{images:B.images,initialIndex:B.index??0,title:B.title}:{src:g})},[]),[jt,pt]=(0,Y.useState)(null),[St,dt]=(0,Y.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),Ot=E.length===0,ir=Z||k,X=!ir||ir.toLowerCase()==="english"||ir.toLowerCase()==="en",te=ie||!!Z||!!k&&!ue&&!X,ge=Ot&&!k&&!te,Q=Ot&&!!k&&!y&&!te,we=Ot&&!!k&&!!y&&!se,Me=Ot&&!!k&&!!y&&!!se&&!St,Re=ge||Q||we||Me||te,fe=we||Me||te,[Je,tt]=(0,Y.useState)(te),[fr,kr]=(0,Y.useState)(!1),[Qr,Jr]=(0,Y.useState)(!1),[Be,lt]=(0,Y.useState)(!1),Xe=(0,Y.useRef)(!1),Ft=(0,Y.useRef)(null),mt=(0,Y.useRef)(null);te!==Je&&(tt(te),te?(mt.current&&clearTimeout(mt.current),lt(!1),Jr(!0),Ft.current=setTimeout(()=>{kr(!0),Jr(!1),Xe.current=!0},280)):(Ft.current&&clearTimeout(Ft.current),Jr(!1),kr(!1),Xe.current&&(Xe.current=!1,lt(!0),mt.current=setTimeout(()=>lt(!1),560)))),(0,Y.useEffect)(()=>()=>{Ft.current&&clearTimeout(Ft.current),mt.current&&clearTimeout(mt.current)},[]);let Dt=Y.default.useMemo(()=>E.some(g=>g.liveKeys?.length>0),[E]);(0,Y.useEffect)(()=>{if(Dt)return(0,Da.subscribeLiveStream)({client:C})},[Dt,C]);let[Mr,Ba]=(0,Y.useState)(()=>typeof window<"u"&&!!window.matchMedia?.("(max-width: 1199px)").matches);(0,Y.useEffect)(()=>{let g=window.matchMedia?.("(max-width: 1199px)");if(!g)return;let B=()=>Ba(g.matches);return B(),g.addEventListener?.("change",B),()=>g.removeEventListener?.("change",B)},[]);let Fr=async g=>{let B=g.trim();if(!B){try{C.setShopperLanguage?.("")}catch{}pe(""),j(""),G(null);return}if(j(B),ve(!0),B.toLowerCase()==="english"||B.toLowerCase()==="en"){G(Ht);try{C.setShopperLanguage?.(B)}catch{}pe(B),j(""),ve(!1),m(!1);return}let Ae=Date.now(),Pe=1200;try{let $e=C.getCachedUIStrings?.(B,zr)??C.getCachedUIStrings?.(B,Ht);if($e?.strings&&Object.keys($e.strings).length>0)G($e.strings),$e.font&&await Xt($e.font,800);else{let Mt=C.getUIStrings?.(B,zr),ot=await Promise.race([Mt,new Promise(At=>setTimeout(()=>At(null),8e3))]);ot?.font&&await Xt(ot.font,1200),ot?.strings&&Object.keys(ot.strings).length>0&&G(ot.strings)}}catch{}let at=Date.now()-Ae;at<Pe&&await new Promise($e=>setTimeout($e,Pe-at));try{C.setShopperLanguage?.(B)}catch{}pe(B),j(""),ve(!1),m(!1);try{C.getUIStrings?.(B,Ht)?.catch?.(()=>{})}catch{}},Tr=g=>{try{C.setEntityLanguageMode?.(g)}catch{}U(g),St&&m(!0)},$a=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}dt(!0),m(!0)},qa=te?Br(Z||k).preparing:ge?Ie("langPlaceholder"):Q?Ie("namePlaceholder"):we?Ie("entityLangPlaceholder"):Me?Ie("termsPlaceholder"):t==="Ask me anything\u2026"?Ie("defaultPlaceholder"):t,Oa=!c||c===Ln?[]:Array.isArray(c)?c:[],Ua=ge?"curious":Q?"welcoming":we?"guiding":Me?"focused":"happy",[tr,Wa]=(0,Y.useState)(()=>ni(s)),[hl,es]=(0,Y.useState)(!1),Cn=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{Cn.current&&clearTimeout(Cn.current)},[]);let ts=(0,Y.useRef)(null),pl=()=>{let g=Hr.current;if(!g?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let B=re?-3:3;ts.current?.cancel(),ts.current=g.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${B}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-B*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${B*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},rs=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{if(rs.current)return;let g=Hr.current;if(!g){Eo();return}let B=!1,xe=()=>g.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Ae=()=>{B||(B=!0,rs.current=!0,Pe.disconnect(),clearTimeout(at),Eo())},Pe=new MutationObserver(()=>{xe()&&Ae()});Pe.observe(g,{childList:!0,subtree:!0});let at=window.setTimeout(Ae,2e3);return xe()&&Ae(),()=>{B=!0,Pe.disconnect(),clearTimeout(at)}},[]);let ns=(g,B=!1)=>{es(!0),Cn.current&&clearTimeout(Cn.current),Cn.current=setTimeout(()=>es(!1),420),Wa(g),pl(),B&&ra();try{localStorage.setItem("akropolys_theme",g)}catch{}},{vars:dl}=ha(s),Zr=tr;pa(s);let as=(0,Y.useRef)(()=>{}),gr=(0,Y.useRef)(null),Rr=async(g,B,xe,Ae)=>{let Pe=(g??Qe).trim(),at=B??Gt;if(!Pe&&at.length===0||!ue||I)return;if(nr("send"),Q){if(!Pe)return;let ot=Js(Pe)||Pe.slice(0,40);try{C.setShopperName?.(ot)}catch{}z(ot),He("");return}if(ge){if(!Pe||ie)return;He(""),Fr(Pe);return}if(fe){He("");return}Ct(!1),Vt(!1),He(""),It([]);let $e=(await Promise.all(at.map(async({thumb:ot,...At})=>{let tn=At.data||(ot?await Ce.current.get(ot)?.catch(()=>""):"")||"";return ot&&URL.revokeObjectURL(ot),{...At,data:tn}}))).filter(ot=>ot.data),Mt=Pe||($e.some(ot=>ot.type==="image")?"Analyze this image":"What is this?");await v(Mt,Pe,$e.length>0?$e:void 0,xe,Ae)},[ul,os]=(0,Y.useState)(!1),Jn=(0,Y.useCallback)(async g=>{let B=g&&g.role==="user"?g:[...E].reverse().find(xe=>xe.role==="user");if(B?.content){os(!0);try{await Rr(B.content)}finally{os(!1)}}},[E,Rr]),ml=(0,Y.useCallback)(g=>{g?.content&&(He(g.content),setTimeout(()=>{if(gr.current){gr.current.focus();let B=g.content.length;try{gr.current.setSelectionRange(B,B)}catch{}}},50))},[He,gr]),bl=(0,Y.useCallback)(async()=>{await Jn()},[Jn]),{keyInput:fl,setKeyInput:kl,keyPhase:gl,setKeyPhase:ss,mintedKey:xl,setMintedKey:vl,mintedPub:Hd,setMintedPub:yl,copied:wl,keyCountdown:Cl,minting:Sl,copyValue:Ml,handleUseExistingKey:Tl,handleCreateKey:Rl}=Wi(H,bl),Ll=(0,Y.useCallback)(()=>{let g=C?.getKikuKey?.();g&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(g)}`,"_blank","noopener")},[C]),[Sn,is]=(0,Y.useState)(null),El=(0,Y.useCallback)(async g=>{let B=(g.content||"").replace(/^(@kiku pin\s*)+/i,""),Ae=`@kiku pin ${B.slice(0,50).replace(/\n+/g," ")}`;await v(B||"pin message",Ae,void 0,"capture")},[v]),{handleKikuCapture:zl,handleKikuCaptureAll:Nl,handleKikuViewHistory:Il,handleKikuDelete:Al}=Vi({attachments:Gt,setAttachments:It,setInput:He,send:v,t:Ie}),{voiceMode:Zn,voicePhase:cs,voiceConnecting:Pl,voiceError:Va,setVoiceError:ls,voiceMuted:_l,setVoiceMuted:Fl,voiceSecondsLeft:Dl,voiceBlocked:Hl,liveVoiceName:Bl,chooseVoice:$l,canConverse:ql,startVoice:Ol,stopVoice:Ul,voice:Wl,live:hs,earlier:Vl,newVoiceChat:Gl,attachPhoto:jl}=dc({voiceLang:p,speechLang:Se,shopperLanguage:k,ttsVoice:u,messages:E,handleSendUtterance:g=>as.current(g),appendSpokenExchange:P}),ea=(0,Y.useRef)(null),[Ut,en]=(0,Y.useState)(!1),[ps,ds]=(0,Y.useState)(!1),[us,ms]=(0,Y.useState)(()=>!ol()),[bs,Ga]=(0,Y.useState)(null),[fs,ja]=(0,Y.useState)(!1),[ks,Yl]=(0,Y.useState)(!1),Kl=(0,Y.useCallback)(()=>Yl(!0),[]);(0,Y.useEffect)(()=>{Ut?ai():(ds(!1),ja(!1))},[Ut]);let Dr=(0,Y.useRef)(null);(0,Y.useEffect)(()=>(!Ut&&Dr.current&&clearTimeout(Dr.current),()=>{Dr.current&&clearTimeout(Dr.current)}),[Ut]);let[Xl,Ya]=(0,Y.useState)(null),ta=(0,Y.useRef)(null),Ka=(0,Y.useRef)(null),gs=(0,Y.useRef)([]),Mn=(0,Y.useRef)(null),Ql=`hsk-goo-${(0,Y.useId)()}`,{closing:Tn,requestClose:Xa,closeNow:ra}=Wn(Mr?_d:Pd,()=>en(!1));(0,Y.useEffect)(()=>{if(!Ut)return;let g=B=>{let xe=B.composedPath?B.composedPath():[],Ae=ta.current&&(xe.includes(ta.current)||ta.current.contains(B.target)),Pe=Ka.current&&(xe.includes(Ka.current)||Ka.current.contains(B.target)),at=xe.some(At=>At.classList?.contains("hsk-cb-layout-discovery-note")),$e=B.target,Mt=$e?.closest?.(".hsk-cb-topbar-mark"),ot=$e?.closest?.(".hsk-cb-topbar-ooze-menu")||xe.some(At=>At?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Ae||Pe||Mt||ot||at||Xa()};return document.addEventListener("mousedown",g),document.addEventListener("touchstart",g,{passive:!0}),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("touchstart",g)}},[Ut]);let{msgsContainerRef:Hr,spacerRef:Jl,lastExternalScrollRef:Zl,showJumpToBottom:eh,scrollProgress:th,activeMsgIdx:rh,unreadBelow:nh,jumpToMessage:ah,revealMessage:xs,jumpToBottom:oh}=qi({messages:E,loading:L,streaming:M,messageRefs:gs}),sh=(0,Y.useCallback)((g,B,xe,Ae)=>{Ae&&xs(Ae),is({msg:g,rect:B,isUser:xe,el:Ae})},[xs]),na=Lc(Hr),vs=()=>{na.toggle(),Qn(),ms(!1),Ga(null),ja(!1),Mr&&(Dr.current&&clearTimeout(Dr.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?ra():Dr.current=setTimeout(Xa,400))},ih=()=>{Ya(tr),ja(!0),en(!0)},{closing:Qa,requestClose:ys}=Wn(Fd,o);(0,Y.useEffect)(()=>{if(!ue||!_||!ks||Qa||xo())return;let g=window.setTimeout(()=>{xo()||(Ya(tr),ds(!0),en(!0))},650);return()=>window.clearTimeout(g)},[ue,_,ks,Qa,tr]);let Ja=(0,Y.useCallback)(g=>{g&&$(),en(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():ys()},[ys,o,$]),aa=(0,Y.useCallback)(()=>{N?K():F?T("close"):Ja(!1)},[F,Ja,N,K]);wi({panel:(0,Y.useCallback)(()=>ea.current,[]),scroller:(0,Y.useCallback)(()=>Hr.current,[]),onDismiss:o,quiescent:(0,Y.useCallback)(()=>performance.now()-Zl.current>90,[])}),(0,Y.useEffect)(()=>{if(typeof window>"u")return;let g=window.innerWidth-document.documentElement.clientWidth,B=document.body.style.overflow,xe=document.body.style.paddingRight;if(g>0){let Ae=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Ae+g}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${g}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=B,document.body.style.paddingRight=xe,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,Y.useEffect)(()=>{let g=window.visualViewport;if(!g)return;let B=document.documentElement,xe=()=>{B.style.setProperty("--hsk-vvh",`${g.height}px`)};return xe(),g.addEventListener("resize",xe),g.addEventListener("scroll",xe),()=>{g.removeEventListener("resize",xe),g.removeEventListener("scroll",xe),B.style.removeProperty("--hsk-vvh")}},[]),(0,Y.useEffect)(()=>{let g=B=>{if(B.key==="Escape"){if(nt){ut(null);return}aa()}};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[nt,aa]);let Za=(0,Y.useCallback)(g=>{g&&$(),me(),Ga(null),ss("idle")},[me,ss,$]),ch=(0,Y.useCallback)(()=>{N?K():F?T("reset"):Za(!1)},[F,Za,N,K]),lh=g=>{i?.(g);let B=[...E].reverse().find(xe=>xe.role==="assistant");if(B&&B.content.trim().endsWith("?")){v(Ie("cardClickAnswer",{name:g.name}));return}v(Ie("cardClickQuery",{name:g.name,details:no(rr(g,b))}))},hh=g=>{He(g+" "),Vt(!1),Ct(!0),gr.current&&gr.current.focus()},ph=g=>{if(g.key==="Escape"&&wt){g.preventDefault(),Ct(!1);return}if(g.key==="Escape"&&Nt){g.preventDefault(),Vt(!1);return}g.key==="Enter"&&!g.shiftKey&&!g.nativeEvent.isComposing&&(g.preventDefault(),Rr())},eo=(0,Y.useRef)(28),ws=(0,Y.useRef)(280),to=(0,Y.useRef)(null),dh=(g,B)=>{try{!to.current&&typeof document<"u"&&(to.current=document.createElement("canvas"));let xe=to.current?.getContext("2d");return xe?(xe.font=B,xe.measureText(g).width):g.length*8.5}catch{return g.length*8.5}},uh=g=>{let B=g.closest(".hsk-cb-input-box");if(!B)return;let xe=g.value;!(B.dataset.expanded==="true")&&g.clientWidth>50&&(ws.current=g.clientWidth);let Pe=window.getComputedStyle(g),at=Pe.font||`${Pe.fontSize||"16px"} ${Pe.fontFamily||"Geist, sans-serif"}`,$e=dh(xe,at),Mt=Math.max(120,ws.current-14),ot=xe.includes(`
38
- `),At=!!(xe&&(ot||$e>Mt));if(B.dataset.expanded!==(At?"true":"false")&&(B.dataset.expanded=At?"true":"false"),!xe){eo.current=28,g.style.height="";return}if(!At){eo.current=28,g.style.height="";return}g.style.height="auto";let tn=Math.max(28,Math.min(g.scrollHeight,140));eo.current=tn,g.style.height=`${tn}px`};(0,Y.useEffect)(()=>{gr.current&&uh(gr.current)},[Qe]);let mh=g=>{let B=g.target.value;He(B),Va&&ls("");let xe=B.trim();Vt(xe==="@"),Ct(/^@kiku\s*$/i.test(xe))};(0,Y.useEffect)(()=>{as.current=g=>{Rr(g)}});let bh=async g=>{if(!g||g.length===0)return;let B=Array.from(g);for(let xe of B){if(!xe.type.startsWith("image/"))continue;let Ae=URL.createObjectURL(xe),Pe=xa(xe);Ce.current.set(Ae,Pe),It(at=>[...at,{type:"image",data:"",thumb:Ae}]),Pe.then(at=>It($e=>$e.map(Mt=>Mt.thumb===Ae?{...Mt,data:at}:Mt))).catch(()=>It(at=>at.filter($e=>$e.thumb!==Ae))).finally(()=>Ce.current.delete(Ae))}},fh=g=>{It(B=>{let xe=B[g]?.thumb;return xe&&URL.revokeObjectURL(xe),B.filter((Ae,Pe)=>Pe!==g)})},kh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),gh=a||kh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Cs=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{if(Cs.current&&!M){let g=E[E.length-1];g&&g.role!=="user"&&nr("reply")}Cs.current=M},[M,E]);let oa=(ke||oe)&&!L&&!M,sa=E[E.length-1],ia=Oi(sa?.role==="assistant"?sa.content??"":""),xh=sa?.role==="assistant"&&ia.length<(sa.content?.length??0),ro=M||xh,cr=Y.default.useMemo(()=>{let g=L||M,B=E.filter((Pe,at)=>Pe.role!=="assistant"||at===E.length-1&&g?!0:!!Pe.content||!!Pe.visualization||Pe.visualizing||(Pe.knowledgeImages?.length??0)>0||(Pe.referencedIds?.length??0)>0||Yr(Pe.statusStage)),xe=B.length-1;if(xe<0||B[xe].role!=="assistant"||B[xe]!==E[E.length-1])return B;let Ae=ia.length<(B[xe].content?.length??0);return!g&&!Ae?B:B.map((Pe,at)=>at===xe?{...Pe,content:ia}:Pe)},[E,L,M,ia]),Ss=cr.some(g=>g.role==="assistant"&&!Yr(g.statusStage)&&jr(g.content).content.trim().length>0);(0,Y.useEffect)(()=>{if(!(!us||L||ro||w||oa||Zn!=="off"))for(let g=cr.length-1;g>=0;g--){let B=cr[g];if(!(B.role!=="assistant"||Yr(B.statusStage)||!jr(B.content).content.trim())){ms(!1),Ga(g);break}}},[us,cr,L,ro,w,oa,Zn]);let vh=Y.default.useMemo(()=>{let g=[];return cr.forEach((B,xe)=>{if(B.role==="user"&&B.content.trim()){let Ae=B.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();g.push({idx:xe,text:Ae.length>28?Ae.slice(0,27).trimEnd()+"\u2026":Ae})}}),g},[cr]),yh=oa&&cr[cr.length-1]?.role!=="assistant",Ms=(0,Y.useRef)(Date.now());return(0,Y.useEffect)(()=>{Ms.current=Date.now()},[]),(0,_e.jsx)(ko.Provider,{value:Ie,children:(0,_e.jsx)("div",{ref:Mn,className:he("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",Qa&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:g=>{Lr(),g.target===g.currentTarget&&(Mn.current._ptrDown=!0)},onClick:g=>{g.target===g.currentTarget&&Mn.current?._ptrDown&&Date.now()-Ms.current>200&&aa(),Mn.current&&(Mn.current._ptrDown=!1)},"data-hsk-theme":Zr,"data-hsk-layout":na.wide?"wide":"bubbles","data-hsk-theming":hl?"":void 0,style:{...gh,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...dl},children:(0,_e.jsxs)("div",{ref:ea,className:he("hsk-cb-panel",l.panel),dir:re?"rtl":"ltr",lang:Se||void 0,"data-script":Ee?"nonlatin":"latin","data-host-font":Fe?"covers":"gap","data-nastaliq":De?.family==="Noto Nastaliq Urdu"||k?.toLowerCase()==="urdu"||k?.toLowerCase()==="ur"||k==="\u0627\u0631\u062F\u0648"?"true":void 0,style:ye?{"--hsk-font":ye}:void 0,onClick:g=>{g.stopPropagation();let B=g.target;if(B.tagName==="IMG"&&(B.classList.contains("hsk-markdown-img")||B.classList.contains("hsk-cb-user-img-thumb"))){let xe=B.src;xe&&_t(xe)}},children:[(0,_e.jsx)(Kn,{src:nt?.src,images:nt?.images,initialIndex:nt?.initialIndex,title:nt?.title,onClose:()=>ut(null)}),jt&&(0,_e.jsx)("div",{className:"hsk-markup-overlay",children:(0,_e.jsx)(Ti,{src:jt,t:Ie,onCancel:()=>pt(null),onSend:(g,B,xe,Ae)=>{pt(null),Rr(B,[{type:"image",data:g,annotated:!0,marks:xe,instructed:!0,preview:Ae}])}})}),(0,_e.jsxs)("div",{className:"hsk-cb-main",children:[(0,_e.jsx)(va,{seed:C?.api?.siteId??"",theme:Zr,dir:re?"rtl":"ltr",waitForContent:!0}),(0,_e.jsx)(vc,{layoutControl:Ss?(0,_e.jsx)(Yo,{wide:na.wide,onToggle:vs,emphasized:fs}):void 0,title:e,logo:r,hasMessages:E.length>0,avatarState:M?"speaking":L?"thinking":"idle",unread:nh,awayFromBottom:eh,themeMenuOpen:Ut,themeMenuClosing:Tn,themeDiscovery:ps,onThemeMenuReady:Kl,onThemeMenuClosed:ra,isNarrow:Mr,currentTheme:tr,onJumpToLatest:oh,onReset:ch,onClose:aa,onToggleThemeMenu:()=>Ut?Xa():en(!0),onSelectTheme:g=>{ns(g,!0)},themeAttr:Zr}),(0,_e.jsx)("div",{className:"hsk-cb-msgs",ref:Hr,children:cr.length===0?(0,_e.jsx)(Tc,{theme:Zr,inOnboarding:Re,justCompleted:le,onboardingMood:Ua,awaitingLang:ge,awaitingName:Q,awaitingEntityLang:we,awaitingConsent:Me,termsAgreed:St,shopperLanguage:k,pendingLanguage:Z,shopperName:y,entityLangPref:se,chromeReady:ue&&_,activeChips:Oa,speechLang:Se,t:Ie,tNode:be,chooseLanguage:Fr,langSwitching:ie,isLangPreparing:te,chooseEntityLang:Tr,agreeTerms:$a,handleSend:Rr}):(0,_e.jsx)(Gc,{afterReply:bs===null?void 0:{index:bs,node:(0,_e.jsx)(sl,{onOpenDock:ih})},doodleTheme:Zr,displayMessages:cr,messageRefs:gs,isNarrow:Mr,loading:L,streaming:ro,sources:x,referencedIds:J,discussedSources:Ue,lastIntent:S,lastAction:H,stopped:ke,interrupted:oe,halted:oa,haltedEmpty:yh,error:w,errorCode:D,keyPhase:gl,keyInput:fl,setKeyInput:kl,mintedKey:xl,setMintedKey:vl,setMintedPub:yl,minting:Sl,copied:wl,keyCountdown:Cl,handleUseExistingKey:Tl,handleCreateKey:Rl,copyValue:Ml,queuedMessage:I,sendQueuedNow:q,setLightboxSrc:_t,setMarkupSrc:pt,handleSend:Rr,handleSourceClick:lh,onRetry:Jn,onEdit:ml,onLongPress:sh,retrying:ul,continueGenerating:V,t:Ie,spacerRef:Jl,vizState:bt,setVizState:Ve,messages:E})}),!fr&&(0,_e.jsx)("div",{className:he("hsk-cb-composer-wrapper",Qr&&"hsk-composer-exit-up",Be&&"hsk-composer-reveal"),children:(0,_e.jsx)(Yc,{notice:N&&(0,_e.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:A,children:[(0,_e.jsx)("span",{children:Ie("leaveHumanWarning")}),(0,_e.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>T(null),children:Ie("leaveHumanStay")}),(0,_e.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let g=N;T(null),g==="reset"?Za(!0):Ja(!0)},children:Ie("leaveHumanConfirm")})]}),gooId:Ql,input:Qe,setInput:He,showKikuPicker:wt,setShowKikuPicker:Ct,showAtPicker:Nt,setShowAtPicker:Vt,captureAllowed:Ke,discussedSources:Ue,handleSelectExtension:hh,handleKikuCapture:zl,handleKikuCaptureAll:Nl,handleKikuViewHistory:Il,handleKikuDelete:Al,attachments:Gt,removeAttachment:fh,chromeLoading:!ue,imageInputRef:et,handleImageFiles:bh,enableVision:d&&!Re,enableVoice:h&&!Re,canConverse:ql,startVoice:Ol,inputLocked:fe,voiceBlocked:Hl,textareaRef:gr,classNames:l,handleInput:mh,handleKeyDown:ph,voice:Wl,voicePhase:cs,activePlaceholder:qa,loading:L,streaming:M,stop:ee,handleSend:Rr,voiceError:Va,setVoiceError:ls,langSwitching:ie||te,t:Ie,onOpenMimi:C?.getKikuKey?.()?Ll:void 0})})]}),Zn!=="converse"&&(0,_e.jsx)(tl,{items:vh,activeIdx:rh,progress:th,onJump:ah,side:re?"left":"right"}),(0,_e.jsxs)("div",{className:he("hsk-cb-kiku-id-rail",re?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left",Ut&&!Tn&&"is-theme-open"),children:[(0,_e.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,_e.jsx)(Ma,{}),(0,_e.jsxs)("div",{className:he("hsk-cb-theme-squircle-wrap",Ut&&!Tn&&"is-open"),ref:ta,children:[(0,_e.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:g=>{g&&(g.inert=!Ut||Tn)},children:cn.map(({id:g,label:B,Icon:xe})=>(0,_e.jsxs)("button",{type:"button",className:he("hsk-cb-theme-grid-item",(Xl??tr)===g&&"is-active"),onClick:Ae=>{Ae.stopPropagation(),ns(g,!0)},children:[(0,_e.jsx)(xe,{}),(0,_e.jsx)("span",{children:B})]},g))}),(0,_e.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Ut){ra();return}Ya(tr),en(!0)},"aria-label":"Themes","aria-expanded":Ut,children:[(0,_e.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:Y.default.createElement(wo(tr).Icon)}),(0,_e.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:wo(tr).label})]})]}),!Mr&&Ut&&ps&&(0,_e.jsx)(Ra,{closing:Tn}),Ss&&(0,_e.jsx)(Yo,{wide:na.wide,onToggle:vs,emphasized:fs})]}),Zn==="converse"&&(0,_e.jsx)(Zc,{siteId:C?.api?.siteId??"",themeAttr:Zr,stopVoice:Ul,chooseVoice:$l,liveVoiceName:Bl,voiceSecondsLeft:Dl,voiceConnecting:Pl,voicePhase:cs,live:hs,earlier:Vl,newVoiceChat:Gl,voiceMuted:_l,setVoiceMuted:Fl,voiceError:Va,attachPhoto:jl,onSelectSource:g=>{i?.(g),hs.ask(Ie("cardClickQuery",{name:g.name,details:no(rr(g,b))}))},t:Ie}),Sn&&(0,_e.jsx)(nl,{msg:Sn.msg,rect:Sn.rect,anchorEl:Sn.el,containerEl:ea.current,scrollEl:Hr.current,containerRect:ea.current?.getBoundingClientRect(),isUser:Sn.isUser,isRTL:re,canRetry:!L&&!M,onPin:El,onRetry:Jn,onCopy:async g=>{if(!g)return!1;try{return await navigator.clipboard.writeText(g),!0}catch{}try{let B=document.createElement("textarea");B.value=g,B.setAttribute("readonly",""),B.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(B),B.select(),B.setSelectionRange(0,g.length);let xe=document.execCommand("copy");return document.body.removeChild(B),xe}catch{return!1}},onClose:()=>is(null),t:Ie})]})})})}var sr=require("react/jsx-runtime");function ll({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:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:C,enableVision:b=!1}){let E=(0,cl.useAkropolysContext)(),[x,L]=(0,Wt.useState)(!1),[M,w]=(0,Wt.useState)(!1),[D,H]=(0,Wt.useState)(null),[S,O]=(0,Wt.useState)(0);(0,Wt.useEffect)(()=>{if(x){O(0);return}let oe=!0;return E?.api?.unreadFromTeam?.().then(V=>{oe&&O(V)}).catch(()=>{}),()=>{oe=!1}},[x,E]);let v=(0,Wt.useCallback)(()=>{oo();try{Ys(E,E?.getShopperLanguage?.()??"",Ht),E?.api?.widgetSettings?.().then(oe=>{oe?.detectedLanguage&&oe.detectedLanguage.toLowerCase()!=="english"&&mo(E,oe.detectedLanguage,Ht)}).catch(()=>{})}catch{}},[E]),I=(0,Wt.useRef)(null),q=(0,Wt.useCallback)(()=>{let oe=I.current?.getBoundingClientRect();H(oe?{x:oe.left+oe.width/2,y:oe.top+oe.height/2}:null),L(!0),v();try{Lr()}catch{}},[v]);(0,Wt.useEffect)(()=>{if(w(!0),v(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let V=window.location.pathname,me=window.history.pushState,J=window.history.replaceState;window.history.pushState=function(...F){me.apply(this,F),window.location.pathname!==V&&(V=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(...F){J.apply(this,F),window.location.pathname!==V&&(V=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let oe=()=>{L(!1)};return window.addEventListener("popstate",oe),window.addEventListener("akropolys:navigation",oe),()=>{window.removeEventListener("popstate",oe),window.removeEventListener("akropolys:navigation",oe)}},[v]);let P=(0,Wt.useCallback)(()=>{L(!1),requestAnimationFrame(()=>I.current?.focus())},[]),{themeAttr:ee,vars:ke}=ha(p);return pa(p),(0,sr.jsxs)(sr.Fragment,{children:[(0,sr.jsxs)("button",{ref:I,className:he("hsk-cb-btn",d.button,s),onClick:q,onPointerEnter:v,onPointerDown:v,style:ke,"data-hsk-theme":ee,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":x,children:[r!==void 0?r:(0,sr.jsxs)(sr.Fragment,{children:[t?(0,sr.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),S>0&&(0,sr.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${S} new replies`,children:S})]}),x&&M&&(0,il.createPortal)((0,sr.jsx)(Zo,{title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,origin:D,onClose:P,onSelectSource:l,chips:h??Ln,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:C}),oo()??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=>xd.test(h))&&(t.length=l)}let n=(l,h)=>Aa(l,r&&h===t.length-1?15:1),a=[],o=[],i=0,c=()=>{o.length>0&&(a.push((0,Xe.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 p=l.trim().match(/^!\[([^\]]*)\]\(([^)]+)\)$/);if(p){c();let u=p[1],f=p[2];_c(f)&&a.push((0,Xe.jsx)("div",{className:"hsk-markdown-img-block",children:(0,Xe.jsx)("img",{src:f,alt:u||"Product image",className:"hsk-markdown-img",loading:"lazy",onError:w=>{w.target.style.display="none"}})},h)),s++;continue}let d=l.match(/^(#{1,3})\s+(.*)/);if(d){let u=d[1].length,f=`h${u+3}`;o.push((0,Xe.jsx)(f,{className:`hsk-markdown-h${u}`,dir:n(d[2],s),children:Cr(d[2],h)},h)),s++;continue}if(l.match(/^[\s]*[-*+•]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*[-*+•]\s+/);){let w=t[s].replace(/^[\s]*[-*+•]\s+/,"");f+=w+" ",u.push((0,Xe.jsx)("li",{children:Cr(w,`li-${s}`)},`li-${s}`)),s++}o.push((0,Xe.jsx)("ul",{className:"hsk-markdown-list hsk-markdown-ul",dir:n(f,s-1),children:u},`ul-${h}`));continue}if(l.match(/^[\s]*\d+[\.\)]\s+/)){let u=[],f="";for(;s<t.length&&t[s].match(/^[\s]*\d+[\.\)]\s+/);){let w=t[s].replace(/^[\s]*\d+[\.\)]\s+/,"");f+=w+" ",u.push((0,Xe.jsx)("li",{children:Cr(w,`li-${s}`)},`li-${s}`)),s++}o.push((0,Xe.jsx)("ol",{className:"hsk-markdown-list hsk-markdown-ol",dir:n(f,s-1),children:u},`ol-${h}`));continue}if(Ic(l,!1)){c();let u=[],f=[],w=[],b=!0;for(;s<t.length&&Ic(t[s],!0);){let C=t[s].trim();if(C.match(/^\|?[-:| ]+\|?$/)&&C.includes("-")){w=Ac(C).map(S=>{let O=S.trim(),v=O.startsWith(":"),I=O.endsWith(":");return v&&I?"center":I?"end":"start"}),s++,b=!1;continue}let F=Ac(C);b&&u.length===0?u=F:f.push(F),s++}let E=Math.max(u.length,...f.map(C=>C.length)),x=[];for(let C=0;C<E;C++)if(w[C])x[C]=w[C];else if(C===0)x[C]="start";else{let F=f.filter(D=>{let S=(D[C]||"").trim();return/^[\$€£¥+-]?\d+([.,]\d+)?%?$/.test(S)||/^[\$€£¥+-]?\d+([.,]\d+)?\s*(bps|M|K|B)?$/i.test(S)}).length;x[C]=F>=Math.ceil(f.length/2)?"end":"start"}let L=u.length>0?(0,Xe.jsx)("tr",{children:u.map((C,F)=>(0,Xe.jsx)("th",{style:{textAlign:x[F]||"start"},children:(0,Xe.jsx)("bdi",{children:Cr(C,`th-${h}-${F}`)})},`th-${h}-${F}`))},`tr-head-${h}`):null,M=f.map((C,F)=>(0,Xe.jsx)("tr",{children:C.map((D,S)=>(0,Xe.jsx)("td",{className:D.trim().startsWith("\u2713")?"hsk-md-ok":D.trim().startsWith("\u2717")?"hsk-md-bad":void 0,style:{textAlign:x[S]||"start"},children:(0,Xe.jsx)("bdi",{children:Cr(D,`td-${h}-${F}-${S}`)})},`td-${h}-${F}-${S}`))},`tr-body-${h}-${F}`));a.push((0,Xe.jsx)(vd,{children:(0,Xe.jsxs)("table",{className:"hsk-markdown-table",children:[L&&(0,Xe.jsx)("thead",{children:L}),(0,Xe.jsx)("tbody",{children:M})]})},`table-wrapper-${h}`));continue}o.push((0,Xe.jsx)("p",{className:"hsk-markdown-p",dir:n(l,s),children:Cr(l,h)},h)),s++}return c(),(0,Xe.jsx)(Xe.Fragment,{children:a})}var Gn=require("react"),Et=require("@akropolys/sdk"),Ft=require("react/jsx-runtime");function wd(e){let[,r]=(0,Gn.useState)(0),t=JSON.stringify(e);return(0,Gn.useEffect)(()=>(0,Et.subscribeLiveValues)(n=>{e.includes(n)&&r(a=>a+1)}),[t]),(0,Gn.useEffect)(()=>{let n=setInterval(()=>r(a=>a+1),1e3);return()=>clearInterval(n)},[]),e.map(Et.getLiveValue)}var Cd=["title","name","label","headline","subject"],Sd=8,Md=40;function Td({record:e,now:r}){let t=(0,Et.isStale)(e,r),n=e.fields,a=Cd.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<=Md&&!/^[0-9a-fA-F-]{26,}$/.test(l)).slice(0,Sd).map(([s,l])=>({label:(0,Et.labelFor)(s),value:(0,Et.formatLiveValue)(l),rawKey:s}));return(0,Ft.jsxs)("div",{className:`hsk-live-card${t?" is-stale":""}`,role:"region","aria-label":"Live values",children:[(0,Ft.jsx)("div",{className:"hsk-live-card__top",children:(0,Ft.jsxs)("div",{className:"hsk-live-card__badge",children:[(0,Ft.jsx)("span",{className:`hsk-live-dot${t?" is-stale":""}`,"aria-hidden":"true"}),(0,Ft.jsx)("span",{className:"hsk-live-card__age",children:t?`Paused \xB7 ${(0,Et.describeAge)(r-e.at)}`:`Live \xB7 ${(0,Et.describeAge)(r-e.at)}`})]})}),(0,Ft.jsx)("div",{className:"hsk-live-card__body",children:(0,Ft.jsx)("span",{className:"hsk-live-card__title",title:o,children:i})}),(0,Ft.jsx)("div",{className:"hsk-live-card__pills",children:c.map(s=>{let l=(0,Et.isFresh)(e,s.rawKey,r);return(0,Ft.jsxs)("div",{className:`hsk-live-pill${l?" is-changed":""}`,style:l?{animationDuration:`${Et.LIVE_FLASH_MS}ms`}:void 0,children:[(0,Ft.jsx)("span",{className:"hsk-live-pill__label",children:s.label}),(0,Ft.jsx)("span",{className:"hsk-live-pill__value",children:s.value})]},s.rawKey)})})]})}function Dc({keys:e}){let r=new Set,t=(e??[]).filter(c=>r.has(c)?!1:(r.add(c),!0)),n=wd(t);if(t.filter((c,s)=>n[s]).length===0)return null;let o=n.filter(c=>!!c),i=Date.now();return(0,Ft.jsx)("div",{className:"hsk-live-wrap",role:"group","aria-label":"Live data",children:(0,Ft.jsx)("div",{className:"hsk-live-carousel",children:o.map(c=>(0,Ft.jsx)(Td,{record:c,now:i},c.key))})})}var Hc=require("react"),Bc=require("@akropolys/sdk");var Fr=require("react/jsx-runtime");function $c({source:e,onImageClick:r}){let t=(0,Bc.normalizeEntityImages)(e.images??e.fields?.images,e.image,e.url),[n,a]=(0,Hc.useState)(!1),o=e.image||t[0]?.url;if(!o)return(0,Fr.jsx)("div",{className:"hsk-cb-src-imgwrap-empty",children:(0,Fr.jsx)(yr,{})});let i=c=>{if(c.stopPropagation(),!r)return;let s=Math.max(0,t.findIndex(l=>l.url===o));t.length>1?r(o,{images:t.map(l=>({url:l.url,caption:l.caption,alt:l.alt})),index:s,title:e.name}):r(o)};return(0,Fr.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:i,children:[n?(0,Fr.jsx)(yr,{}):(0,Fr.jsx)("img",{src:o,alt:t.find(c=>c.url===o)?.alt||e.name,loading:"lazy",onError:()=>a(!0)}),t.length>1&&(0,Fr.jsxs)("span",{className:"hsk-gallery-count",children:[Math.max(0,t.findIndex(c=>c.url===o))+1," / ",t.length]})]})}var fr=require("react"),Yn=require("@akropolys/sdk");var Ke=require("react/jsx-runtime");function Pa({sources:e,onSelectSource:r,onImageClick:t,referencedIds:n=[],compact:a=!1,targetLabel:o="Your colour"}){let i=(0,Yn.useCardFields)(),c=(0,fr.useRef)(null),[s,l]=(0,fr.useState)(!1),[h,p]=(0,fr.useState)(!1),[d,u]=(0,fr.useState)(0),f=e.filter(S=>S.id&&n.includes(S.id)),w=f.filter(S=>S.swatch),b=f.filter(S=>!S.swatch),E=b.length===1,x=E?b.flatMap(S=>{let O=(0,Yn.normalizeEntityImages)(S.images??S.fields?.images,S.image,S.url);return O.length?O.map((v,I)=>({source:S,image:v,photoIndex:I,totalPhotos:O.length})):[{source:S,image:void 0,photoIndex:0,totalPhotos:0}]}):b.map(S=>{let O=(0,Yn.normalizeEntityImages)(S.images??S.fields?.images,S.image,S.url);return{source:S,image:O[0],photoIndex:0,totalPhotos:O.length}}),L=(0,fr.useCallback)(()=>{let S=c.current;if(!S||x.length===0)return;let O=Math.abs(S.scrollLeft),v=S.scrollWidth-S.clientWidth;l(O>10),p(v>4&&O<v-12);let $=Math.round(O/190);u(Math.min(Math.max(0,$),x.length-1))},[x.length]);(0,fr.useEffect)(()=>{L();let S=c.current;if(!S)return;let O=new ResizeObserver(L);return O.observe(S),S.addEventListener("scroll",L,{passive:!0}),()=>{O.disconnect(),S.removeEventListener("scroll",L)}},[L,e]);let M=S=>{let O=c.current;if(!O)return;let v=getComputedStyle(O).direction==="rtl";O.scrollBy({left:190*S*(v?-1:1),behavior:"smooth"})},C=()=>M(1),F=()=>M(-1);if(x.length===0&&w.length===0)return null;let D=w.length>0&&(0,Ke.jsx)("div",{className:"hsk-cb-swatch-grid",children:w.map((S,O)=>(0,Ke.jsxs)("button",{type:"button",className:le("hsk-cb-swatch",S.target&&"hsk-cb-swatch--target"),style:{animationDelay:`${O*40}ms`},onClick:S.target?void 0:()=>r?.(S),children:[(0,Ke.jsx)("span",{className:"hsk-cb-swatch-chip",style:{background:S.swatch}}),(0,Ke.jsx)("span",{className:"hsk-cb-swatch-name",children:S.target?o:S.name}),(0,Ke.jsx)("span",{className:"hsk-cb-swatch-code",children:S.swatch})]},S.id??S.url??O))});return x.length===0?D||null:(0,Ke.jsxs)(Ke.Fragment,{children:[D,(0,Ke.jsxs)("div",{className:le("hsk-cb-sources-wrap",a&&"hsk-cb-sources-wrap--compact"),children:[s&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"hsk-cb-sources-fade-left"}),(0,Ke.jsx)("button",{className:"hsk-cb-sources-prev",onClick:F,"aria-label":"Previous",children:(0,Ke.jsx)(sn,{})})]}),(0,Ke.jsx)("div",{className:"hsk-cb-sources",ref:c,children:x.map(({source:S,image:O,photoIndex:v,totalPhotos:I},$)=>{let P=!!(S.id&&n.includes(S.id));return(0,Ke.jsxs)("div",{className:le("hsk-cb-source",P&&"hsk-cb-source--referenced"),style:{animationDelay:`${$*50}ms`},onClick:()=>r?.(S),children:[(0,Ke.jsx)($c,{source:E&&O?{...S,image:O.url,images:[O]}:S,onImageClick:t}),(0,Ke.jsxs)("div",{className:"hsk-cb-src-info",children:[(0,Ke.jsx)("div",{className:"hsk-cb-src-name",children:S.name}),E&&O?.caption?(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:O.caption}):E&&I>1?(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:`Photo ${v+1} of ${I}`}):null,ar(S,i).slice(0,2).map(Z=>(0,Ke.jsx)("div",{className:"hsk-cb-src-detail",children:Z.value},Z.label))]})]},`${S.id??S.url??$}:${O?.url??v}`)})}),h&&(0,Ke.jsxs)(Ke.Fragment,{children:[(0,Ke.jsx)("div",{className:"hsk-cb-sources-fade-right"}),(0,Ke.jsx)("button",{className:"hsk-cb-sources-next",onClick:C,"aria-label":"See more",children:(0,Ke.jsx)(cn,{})})]}),x.length>1&&(0,Ke.jsx)("div",{className:"hsk-cb-carousel-dots",children:x.map((S,O)=>(0,Ke.jsx)("div",{className:le("hsk-cb-dot-item",O===d&&"hsk-cb-dot-item--active"),onClick:()=>{let v=c.current;if(v){let I=getComputedStyle(v).direction==="rtl";v.scrollTo({left:O*190*(I?-1:1),behavior:"smooth"})}}},O))})]})]})}var Kn=require("react/jsx-runtime");function qc({intent:e,sources:r,onSend:t,loading:n}){let a=Zt();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,Kn.jsx)("div",{className:"hsk-action-pills",children:o.map(s=>(0,Kn.jsxs)("button",{className:"hsk-action-pill",onClick:()=>t(s.query),disabled:n,children:[(0,Kn.jsx)("span",{className:"hsk-pill-emoji",children:s.emoji}),s.label]},s.query))})}var Oc=Xt(require("react")),zt=require("react/jsx-runtime");function Rd({link:e}){let[r,t]=Oc.default.useState(!1),n=e.favicon;if(e.logo)try{let a=new URL(e.logo);a.protocol==="https:"&&!a.username&&!a.password&&(n=a.href)}catch{}return(0,zt.jsx)("span",{className:"hsk-cb-external-logo","aria-hidden":"true",children:n&&!r?(0,zt.jsx)("img",{src:n,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>t(!0)}):(0,zt.jsx)("span",{children:e.destination.charAt(0)})})}function Wc({links:e,t:r}){if(!e.length)return null;let t=a=>a.label??r(a.service==="youtube"?"externalWatchVideo":a.service==="checkout"?"externalCheckout":a.service==="email"||a.service==="gmail"?"externalOpenEmail":"externalOpenLink",{destination:a.destination}),n=a=>{if(!(a.amount===void 0||!a.currency))try{return new Intl.NumberFormat(void 0,{style:"currency",currency:a.currency}).format(a.amount)}catch{return}};return(0,zt.jsxs)("div",{className:"hsk-cb-external-links",children:[e.map(a=>(0,zt.jsxs)("a",{className:"hsk-cb-external-card",href:a.url,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer",children:[(0,zt.jsxs)("span",{className:"hsk-cb-external-brand",children:[(0,zt.jsx)(Rd,{link:a}),(0,zt.jsx)("span",{dir:"auto",children:a.destination})]}),(0,zt.jsx)("span",{className:"hsk-cb-external-identity",children:(0,zt.jsx)("strong",{dir:"auto",children:t(a)})}),n(a)&&(0,zt.jsx)("span",{className:"hsk-cb-external-amount",children:n(a)})]},a.url)),(0,zt.jsxs)("div",{className:"hsk-cb-external-notice",role:"note",children:[(0,zt.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,zt.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,zt.jsx)("span",{children:r("externalOpensOutside")})]})]})}function Ld(e,r){if(!/[\u0000-\u0020\\]/.test(e))try{let t=new URL(e,r);if(!["https:","http:","mailto:","tel:","slack:"].includes(t.protocol)||t.username||t.password)return;let n=t.protocol==="https:"||t.protocol==="http:";if(n&&t.origin===new URL(r).origin)return;let a=t.hostname.toLowerCase(),o=s=>a===s||a.endsWith("."+s),i=t.protocol==="mailto:"?"email":t.protocol==="tel:"?"phone":t.protocol==="slack:"||o("slack.com")?"slack":o("youtube.com")||o("youtu.be")?"youtube":a==="mail.google.com"||o("gmail.com")?"gmail":o("mpesa.com")||o("m-pesa.com")||o("safaricom.co.ke")?"mpesa":a==="checkout.stripe.com"?"checkout":void 0;return{url:e,destination:i?{youtube:"YouTube",gmail:"Gmail",slack:"Slack",mpesa:"M-Pesa",checkout:"Stripe",email:"Email",phone:"Phone"}[i]:a.replace(/^www\./,""),service:i,favicon:n?t.origin+"/favicon.ico":void 0}}catch{return}}function Ed(e){let r=e.replace(/[.,;!?*_~]+$/,"");for(;r.endsWith(")")&&(r.match(/\)/g)?.length??0)>(r.match(/\(/g)?.length??0);)r=r.slice(0,-1);for(;r.endsWith("]")&&(r.match(/\]/g)?.length??0)>(r.match(/\[/g)?.length??0);)r=r.slice(0,-1);return r}function Uc(e,r,t=[],n=!1){let a=new Map,o=new Map(t.map(l=>[l.url,l])),i=/```[\s\S]*?(?:```|$)|`[^`\n]*(?:`|$)|!\[[^\]\n]*\]\([^\s]*?\)|\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))*)\)|(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]+/gi,s=(n?e.replace(/(?:\[[^\]\n]*\]\()?(?:https?:\/\/|mailto:|tel:|slack:\/\/)[^\s<>`]*$/i,""):e).replace(i,(l,h,p)=>{if(l.startsWith("`")||l.startsWith("!["))return l;let d=p??Ed(l),u=Ld(d,r);if(!u)return l;let f=a.get(d),w=h?.replace(/[*_`]/g,"").trim();return a.set(d,{...u,...o.get(d),...f??{},...w&&!/^(?:https?:\/\/|mailto:|tel:|slack:\/\/)/i.test(w)?{label:w}:{}}),""});return n&&(s=s.replace(/\[[^\]\n]*\]\((?:https?|mailto|tel|slack)[^\n]*$/i,"")),s=s.replace(/^\s*(?:[-*+]\s*|\d+[.)]\s*)?(?:\*\*|__)?\s*(?:\*\*|__)?\s*$/gm,"").replace(/\n{3,}/g,`
38
+
39
+ `).trim(),{content:s,links:n?[]:[...a.values()]}}var ae=require("react/jsx-runtime"),jc=wt.default.memo(({content:e,streaming:r,hosts:t})=>(0,ae.jsx)(ae.Fragment,{children:Fc(e,r,new Set(t.split(",")))}),(e,r)=>e.content===r.content&&e.streaming===r.streaming&&e.hosts===r.hosts);jc.displayName="MarkdownBlock";function zd(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 Nd(e,r){wt.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),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 o=new ResizeObserver(n);return o.observe(a),()=>o.disconnect()},[e,r])}function Gc({msg:e,idx:r,isLast:t,isLastUser:n,isRunEnd:a,runMid:o,runCont:i,isNarrow:c,loading:s,streaming:l,stopped:h,interrupted:p,sources:d,referencedIds:u,discussedSources:f,lastIntent:w,lastAction:b,vizState:E,setVizState:x,setLightboxSrc:L,setMarkupSrc:M,handleSend:C,handleSourceClick:F,onRetry:D,onEdit:S,onLongPress:O,hasError:v,retrying:I,t:$,messageRef:P,photosSending:Z,workingOn:ve,doodleTheme:ne}){let V=(0,Vc.useAkropolysContext)()?.api,fe=V?.siteId??"",Q=zd([V?.apiUrl,...(t?d:e.sources??[]).flatMap(q=>[q.image,q.url])]),_=e.role==="user",B=_?e.content:Jo(e.content),N=!_&&B!==e.content,[T,A]=wt.default.useState(!1),Y=wt.default.useRef(null);Nd(Y,e.content);let y=wt.default.useRef(null),z=wt.default.useRef(null),k=wt.default.useRef(!1),he=wt.default.useCallback(q=>{let ge=_?".hsk-cb-user-bubble":".hsk-cb-ai-body";return q.matches?.(ge)?q:q.querySelector(ge)||q},[_]),oe=wt.default.useCallback(q=>{z.current&&clearTimeout(z.current),z.current=setTimeout(()=>{if(O){if(typeof navigator<"u"&&navigator.vibrate)try{navigator.vibrate(25)}catch{}let ge=he(q),Ie=ge.getBoundingClientRect();O(_?e:{...e,content:B},{top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height},_,ge),k.current=!0}z.current=null},420)},[e,B,_,O,he]),W=wt.default.useCallback(q=>{if(q.touches.length!==1)return;let ge=q.touches[0];y.current={x:ge.clientX,y:ge.clientY},k.current=!1,oe(q.currentTarget)},[oe]),ie=wt.default.useCallback(q=>{if(!y.current||!z.current)return;let ge=q.touches[0];Math.hypot(ge.clientX-y.current.x,ge.clientY-y.current.y)>8&&(clearTimeout(z.current),z.current=null)},[]),m=wt.default.useCallback(q=>{z.current&&(clearTimeout(z.current),z.current=null),y.current=null,k.current&&q.cancelable&&q.preventDefault()},[]),R=wt.default.useCallback(q=>{if(!O||(q.preventDefault(),k.current))return;let ge=he(q.currentTarget),Ie=ge.getBoundingClientRect();O(_?e:{...e,content:B},{top:Ie.top,left:Ie.left,width:Ie.width,height:Ie.height},_,ge)},[e,B,_,O,he]);wt.default.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);let G=wt.default.useCallback(q=>{if(q)try{navigator.clipboard.writeText(q),A(!0),setTimeout(()=>A(!1),2e3)}catch{}},[]),J=wt.default.useMemo(()=>Yr(B),[B]),K=Jo(e.thinking||J.thinking),se=/(?:^|\n+)(?:[>*_~`\s]*)(?:This is a calculation from live figures,?\s*not a guarantee\s*[—–-]\s*the market can move against it\.?)(?:[>*_~`\s]*)/gi,Ce=se.test(J.content),de=Ce?J.content.replace(se,"").trimEnd():J.content,me=wt.default.useMemo(()=>_?{content:de,links:[]}:Uc(de,typeof location>"u"?"https://akropolys.cloud":location.href,e.actionLinks,t&&l),[de,_,e.actionLinks,t,l]);return(0,ae.jsx)("div",{className:le("hsk-cb-msg-group",o&&"hsk-cb-msg-group--run-mid",i&&"hsk-cb-msg-group--run-cont"),"data-hsk-role":_?"user":"assistant",ref:P,children:_?(0,ae.jsxs)("div",{className:`hsk-cb-user-msg${n?" hsk-sent":""}`,children:[e.images&&e.images.length>0&&(0,ae.jsx)("div",{className:"hsk-cb-user-imgs","data-count":Math.min(e.images.length,4),children:e.images.slice(0,4).map((q,ge)=>(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-user-img-cell",onClick:()=>L(q),children:[(0,ae.jsx)("img",{src:q,alt:`attachment ${ge+1}`,className:"hsk-cb-user-img-thumb"}),(0,ae.jsx)(dn,{active:Z,seed:fe,theme:ne}),ge===3&&e.images.length>4&&(0,ae.jsxs)("span",{className:"hsk-cb-user-img-more",children:["+",e.images.length-3]})]},ge))}),e.content&&(0,ae.jsxs)("div",{ref:Y,className:le("hsk-cb-user-bubble",a&&"hsk-cb-user-bubble--tail",e.spoken&&"hsk-cb-user-bubble--spoken",v&&"hsk-cb-user-bubble--error"),onTouchStart:W,onTouchMove:ie,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,dir:Aa(e.content.replace(/^@kiku\s*/i,"")),children:[e.spoken&&(0,ae.jsx)(In,{className:"hsk-cb-spoken-mark",size:10}),/^@kiku\b/i.test(e.content)?(0,ae.jsxs)(ae.Fragment,{children:[(0,ae.jsx)("span",{className:"hsk-kiku-badge",children:"@kiku"}),e.content.replace(/^@kiku\s*/i,"")]}):e.content]}),a&&(0,ae.jsxs)("div",{className:"hsk-cb-user-footer",children:[(0,ae.jsxs)("div",{className:"hsk-cb-msg-actions",children:[D&&(v||n)&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":$("retry"),children:[(0,ae.jsx)(Nn,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]}),S&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--edit",onClick:()=>S(e),"aria-label":$("edit"),children:[(0,ae.jsx)(ga,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("edit")})]}),(0,ae.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>G(e.content),"aria-label":$(T?"copied":"copy"),children:[T?(0,ae.jsx)(Or,{size:11}):(0,ae.jsx)(qr,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$(T?"copied":"copy")})]})]}),n&&!v&&(0,ae.jsx)("span",{className:"hsk-cb-sent-status",children:$(h||p?"statusStopped":"statusSent")}),v&&(0,ae.jsxs)("span",{className:"hsk-cb-failed-notice",children:[(0,ae.jsx)("span",{className:"hsk-cb-failed-dot"}),$("msgFailed")]})]})]}):(0,ae.jsx)("div",{className:le("hsk-cb-ai-msg",c&&"hsk-cb-ai-msg--inline"),children:(0,ae.jsxs)("div",{className:"hsk-cb-ai-body",onTouchStart:W,onTouchMove:ie,onTouchEnd:m,onTouchCancel:m,onContextMenu:R,children:[(()=>{let q=e.thoughtForSeconds!=null||de.length>0||!(t&&(l||s));return(0,ae.jsxs)(ae.Fragment,{children:[!e.spoken&&(K||e.thoughtForSeconds!=null||e.repliedSeconds!=null||Kr(e.statusStage)||t&&(l||s))&&(0,ae.jsx)(Nc,{text:K,isComplete:q,seconds:e.thoughtForSeconds,stage:e.statusStage,repliedSeconds:e.repliedSeconds}),e.spoken&&typeof e.thoughtForSeconds=="number"&&e.thoughtForSeconds>0&&(0,ae.jsx)("div",{className:"hsk-cb-think",children:(0,ae.jsxs)("span",{className:"hsk-cb-think-head hsk-cb-think-head--static",children:[(0,ae.jsx)(In,{size:11}),(0,ae.jsxs)("span",{children:["spoken \xB7 ",e.thoughtForSeconds.toFixed(1),"s"]})]})}),!de&&N&&!(t&&(l||s))&&(0,ae.jsx)("p",{className:"hsk-cb-ai-content",children:$("errStreamInterrupted")}),me.content&&(0,ae.jsx)("div",{className:"hsk-cb-ai-content",children:(0,ae.jsx)(jc,{content:me.content,streaming:t&&l,hosts:Q})}),(0,ae.jsx)(Wc,{links:me.links,t:$}),Ce&&(0,ae.jsx)("div",{className:"hsk-cb-calc-disclaimer",children:$("calcDisclaimer")})]})})(),e.visualizing&&(0,ae.jsx)("div",{className:"hsk-cb-viz",children:(0,ae.jsxs)("div",{className:le("hsk-cb-viz--working",!ve&&"is-blank",e.visualizationType==="video"&&"is-video"),role:"status","aria-label":e.visualizingText||$("vizWorking"),children:[ve&&(0,ae.jsx)("img",{src:ve,alt:""}),(0,ae.jsx)(dn,{active:!0,seed:fe,theme:ne})]})}),e.visualization&&(0,ae.jsxs)("div",{className:"hsk-cb-viz",children:[(0,ae.jsxs)("div",{className:"hsk-cb-viz-imgwrap",children:[e.visualizationType==="video"||e.visualization.includes("/videos/")?(0,ae.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,ae.jsx)("img",{src:e.visualization,alt:"Product visualized in your photo",className:"hsk-markdown-img",style:E[e.visualization]==="err"?{display:"none"}:void 0,onLoad:()=>x(q=>({...q,[e.visualization]:"ok"})),onError:()=>x(q=>({...q,[e.visualization]:"err"}))}),E[e.visualization]==="err"&&(0,ae.jsx)("div",{className:"hsk-cb-viz-broken",children:$("vizUnavailable")}),t&&!l&&E[e.visualization]==="ok"&&e.visualizationType!=="video"&&!e.visualization.includes("/videos/")&&(0,ae.jsxs)("button",{className:"hsk-cb-viz-mark",onClick:()=>M(e.visualization),children:[(0,ae.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,ae.jsx)("path",{d:"M12 20h9"}),(0,ae.jsx)("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),$("vizMarkEdit")]})]}),(0,ae.jsx)("div",{className:"hsk-cb-viz-disclaimer",children:e.visualizationType==="video"||e.visualization.includes("/videos/")?$("vizDisclaimerVideo"):$("vizDisclaimerImage")})]}),!_&&(e.knowledgeImages?.length??0)>0&&(0,ae.jsx)("div",{className:"hsk-cb-kimgs",children:e.knowledgeImages.map(q=>(0,ae.jsxs)("div",{className:"hsk-cb-kimg-group",children:[(0,ae.jsx)("div",{className:"hsk-cb-kimg-grid",children:q.images.map((ge,Ie)=>(0,ae.jsx)("img",{src:ge.url,alt:ge.note||q.title||"Reference image",className:"hsk-cb-kimg",loading:"lazy",onClick:()=>L(ge.url),onError:xe=>{xe.target.style.display="none"}},Ie))}),(q.title||q.images[0]?.note)&&(0,ae.jsx)("div",{className:"hsk-cb-kimg-caption",children:q.title||q.images[0]?.note})]},q.entryId))}),!_&&(0,ae.jsx)(Dc,{keys:e.liveKeys}),!_&&(e.staleNotices?.length??0)>0&&(0,ae.jsxs)("div",{className:"hsk-cb-stale",role:"status",children:[(0,ae.jsx)("div",{className:"hsk-cb-stale-title",children:$("staleTitle")}),e.staleNotices.map((q,ge)=>(0,ae.jsxs)("div",{className:"hsk-cb-stale-item",children:[q.state==="removed"?$("staleRemoved",{title:q.title}):$("staleUnavailable",{title:q.title}),q.reason&&(0,ae.jsxs)("span",{className:"hsk-cb-stale-reason",children:[" ",q.reason]})]},ge))]}),(()=>{let q=t&&(s||l),ge=q?u:e.referencedIds??[],Ie=q?d:e.sources??[],xe=t?w:e.intent,Re=xe==="compare"||xe==="capture"||xe==="capture_all"||xe==="delete"||xe==="view_history";return ge.length>0&&!Re&&(!t||b?.type!=="request_kiku_key")&&(0,ae.jsx)(Pa,{sources:Ie,onSelectSource:F,onImageClick:L,referencedIds:ge,compact:!!e.visualization,targetLabel:$("swatchTarget")})})(),t&&!s&&!l&&b?.type==="open_memory"&&jn(b.url)&&(0,ae.jsxs)("a",{className:"hsk-cb-memory-pill",href:jn(b.url),target:"_blank",rel:"noopener noreferrer",children:[$("openMemory"),(0,ae.jsx)(ci,{})]}),t&&!s&&jn(b?.url)&&b?.type!=="open_memory"&&(0,ae.jsx)("div",{className:"hsk-action-pills",children:(0,ae.jsxs)("a",{className:"hsk-action-pill",href:jn(b?.url),children:[String(b?.type||"continue").replace(/_/g," ")," \u2192"]})}),t&&!s&&(0,ae.jsx)(qc,{intent:w,sources:f,onSend:C,loading:s}),!_&&a&&!l&&de&&(0,ae.jsx)("div",{className:"hsk-cb-ai-footer",children:(0,ae.jsxs)("div",{className:"hsk-cb-msg-actions",children:[(0,ae.jsxs)("button",{type:"button",className:le("hsk-cb-msg-action hsk-cb-msg-action--copy",T&&"hsk-cb-msg-action--copied"),onClick:()=>G(de),"aria-label":$(T?"copied":"copy"),children:[T?(0,ae.jsx)(Or,{size:11}):(0,ae.jsx)(qr,{size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$(T?"copied":"copy")})]}),t&&(v||de.includes("We're experiencing high demand right now"))&&D&&(0,ae.jsxs)("button",{type:"button",className:"hsk-cb-msg-action hsk-cb-msg-action--retry",onClick:()=>D(e),"aria-label":$("retry"),children:[(0,ae.jsx)(Nn,{className:I?"hsk-retry-icon--spinning":"",size:11}),(0,ae.jsx)("span",{className:"hsk-cb-msg-action-label",children:$("retry")})]})]})})]})})})}var et=require("react/jsx-runtime");function Yc({keyInput:e,setKeyInput:r,minting:t,handleUseExistingKey:n,handleCreateKey:a,t:o}){return(0,et.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,et.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,et.jsx)(yr,{})}),(0,et.jsx)("div",{className:"hsk-cb-ai-body",children:(0,et.jsx)("div",{className:"hsk-cb-ai-text",children:(0,et.jsxs)("div",{className:"hsk-cb-phone-form",children:[(0,et.jsx)("label",{className:"hsk-cb-phone-label",children:o("keyPastePrompt")}),(0,et.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,et.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,et.jsx)("button",{className:"hsk-cb-phone-submit",onClick:n,disabled:!e.trim(),children:o("keyUseMine")}),(0,et.jsx)("button",{className:"hsk-cb-phone-submit",onClick:a,disabled:t,children:o(t?"keyCreating":"keyCreateNew")})]})]})})})]})}function Kc({mintedKey:e,copied:r,keyCountdown:t,onDismiss:n,copyValue:a,t:o}){return(0,et.jsxs)("div",{className:"hsk-cb-ai-msg",children:[(0,et.jsx)("div",{className:"hsk-cb-ai-icon",style:{display:"flex",alignItems:"center"},children:(0,et.jsx)(yr,{})}),(0,et.jsx)("div",{className:"hsk-cb-ai-body",children:(0,et.jsxs)("div",{className:"hsk-cb-secret-card",children:[(0,et.jsxs)("div",{className:"hsk-cb-secret-head",children:[(0,et.jsx)("span",{className:"hsk-cb-secret-title",children:o("keySecretTitle")}),(0,et.jsxs)("span",{className:"hsk-cb-secret-timer",children:[t,"s"]}),(0,et.jsx)("button",{type:"button",className:"hsk-cb-secret-dismiss",onClick:n,"aria-label":o("keyDismiss"),children:"\xD7"})]}),(0,et.jsxs)("button",{type:"button",className:"hsk-cb-secret-key",onClick:()=>a(e,"secret"),children:[(0,et.jsx)("code",{children:e}),(0,et.jsxs)("span",{className:"hsk-cb-secret-copy",children:[r==="secret"?(0,et.jsx)(Or,{}):(0,et.jsx)(qr,{}),o(r==="secret"?"keyCopied":"keyCopySecret")]})]}),(0,et.jsx)("span",{className:"hsk-cb-secret-hint",children:o("keySecretHint")})]})})]})}var ct=require("react/jsx-runtime");function Id(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 Qc({displayMessages:e,messageRefs:r,isNarrow:t,loading:n,streaming:a,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,stopped:h,interrupted:p,halted:d,haltedEmpty:u,error:f,errorCode:w,keyPhase:b,keyInput:E,setKeyInput:x,mintedKey:L,setMintedKey:M,setMintedPub:C,minting:F,copied:D,keyCountdown:S,handleUseExistingKey:O,handleCreateKey:v,copyValue:I,queuedMessage:$,sendQueuedNow:P,setLightboxSrc:Z,setMarkupSrc:ve,handleSend:ne,handleSourceClick:V,onRetry:fe,onEdit:Q,onLongPress:_,retrying:B,continueGenerating:N,t:T,spacerRef:A,vizState:Y,setVizState:y,messages:z,doodleTheme:k,afterReply:he}){return(0,ct.jsxs)(ct.Fragment,{children:[(()=>{let oe=-1;for(let W=e.length-1;W>=0;W--)if(e[W]?.role==="user"){oe=W;break}return e.map((W,ie)=>{let m=ie===e.length-1,R=W.role==="user",G=R&&ie===oe,J=e[ie+1]?.role!==W.role,K=!J,se=e[ie-1]?.role===W.role,Ce=W.id||`${W.role}-${ie}`,de=e[ie+1]?.content??"",me=G&&(n||a)&&!Yr(de).content.trim(),q=W.visualizing?Id(e,ie):void 0,ge=G&&!!f||!R&&m&&!!f||!R&&!!W.content?.includes("We're experiencing high demand right now");return(0,ct.jsxs)(Xc.default.Fragment,{children:[(0,ct.jsx)(Gc,{msg:W,idx:ie,isLast:m,isLastUser:G,isRunEnd:J,runMid:K,runCont:se,isNarrow:t,loading:n,streaming:a,stopped:h,interrupted:p,sources:o,referencedIds:i,discussedSources:c,lastIntent:s,lastAction:l,vizState:Y,setVizState:y,setLightboxSrc:Z,setMarkupSrc:ve,handleSend:ne,handleSourceClick:V,onRetry:fe,onEdit:Q,onLongPress:_,hasError:ge,retrying:B,t:T,messageRef:Ie=>{r.current[ie]=Ie},photosSending:me,workingOn:q,doodleTheme:k}),ie===he?.index&&he.node]},Ce)})})(),d&&z.length>0&&(0,ct.jsxs)("div",{className:le("hsk-cb-stopped",u&&"hsk-cb-stopped--empty"),children:[u&&(0,ct.jsxs)("span",{className:"hsk-cb-stopped-dots","aria-hidden":"true",children:[(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{}),(0,ct.jsx)("i",{})]}),(0,ct.jsx)("span",{className:"hsk-cb-stopped-label",children:T(h?"stoppedByYou":"stoppedInterrupted")}),(0,ct.jsxs)("button",{className:"hsk-cb-continue",onClick:N,children:[(0,ct.jsx)(li,{}),T(z[z.length-1]?.role==="assistant"?"continueGenerating":"generateResponse")]})]}),f&&(0,ct.jsx)("div",{className:"hsk-cb-error",children:ti({code:w??void 0,message:f},T)}),b==="prompt_key"&&(0,ct.jsx)(Yc,{keyInput:E,setKeyInput:x,minting:F,handleUseExistingKey:O,handleCreateKey:v,t:T}),L&&(0,ct.jsx)(Kc,{mintedKey:L,copied:D,keyCountdown:S,onDismiss:()=>{M(null),C(null)},copyValue:I,t:T}),$&&(0,ct.jsx)("div",{className:le("hsk-cb-msg-group",e[e.length-1]?.role==="user"&&"hsk-cb-msg-group--run-cont"),children:(0,ct.jsxs)("div",{className:"hsk-cb-user-msg",children:[(0,ct.jsx)("div",{className:"hsk-cb-user-bubble hsk-cb-user-bubble--tail hsk-cb-user-bubble--queued",children:$.content}),(0,ct.jsxs)("button",{type:"button",className:"hsk-cb-queued-status",onClick:P,children:[(0,ct.jsx)("span",{className:"hsk-cb-queued-dot"}),T("queuedWaiting"),(0,ct.jsx)("span",{className:"hsk-cb-queued-now",children:T("queuedSendNow")})]})]})}),(0,ct.jsx)("div",{ref:A,className:"hsk-cb-msgs-spacer"})]})}var Nt=Xt(require("react")),Fa=require("@akropolys/sdk");var es=require("react/jsx-runtime"),_a=16,Ad=110,Pd=/[؀-ۿ܀-ݏ߀-߿ࡠ-ࣿﭐ-﷿ﹰ-]/;function ts(e){if(!e)return[];if(Pd.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 Jc({text:e,placeholder:r,visible:t=!0,replay:n=0,replaySeed:a,staggerMs:o=_a}){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]:ts(i),h=Math.max(l.length-1,1),p=i.length>44?"3":s?"2":"1";return(0,es.jsx)("div",{className:"hsk-animated-placeholder","data-fit":p,dir:"auto","aria-hidden":"true",children:l.map((d,u)=>(0,es.jsx)("span",{className:"hsk-animated-placeholder__char",style:{animationDelay:`${Ad+u*o}ms`,"--hsk-ph-hue":`${Math.round(u/h*300)}`},children:d},`${i}|${c}|${u}`))})}var re=require("react/jsx-runtime");function Zc({gooId:e,input:r,setInput:t,showKikuPicker:n,setShowKikuPicker:a,showAtPicker:o,setShowAtPicker:i,captureAllowed:c,discussedSources:s,handleSelectExtension:l,handleKikuCapture:h,handleKikuCaptureAll:p,handleKikuViewHistory:d,handleKikuDelete:u,attachments:f,removeAttachment:w,chromeLoading:b,inputLocked:E,langSwitching:x=!1,imageInputRef:L,handleImageFiles:M,enableVision:C,enableVoice:F,canConverse:D,startVoice:S,voiceBlocked:O,textareaRef:v,classNames:I={},handleInput:$,handleKeyDown:P,voice:Z,voicePhase:ve,activePlaceholder:ne,loading:V,streaming:fe,stop:Q,handleSend:_,voiceError:B,setVoiceError:N,t:T,rail:A,notice:Y,onOpenMimi:y}){let z=(0,Fa.useAkropolysContext)(),k=(0,Fa.useCardFields)(),[he,oe]=Nt.default.useState(0),[W,ie]=Nt.default.useState(!1);Nt.default.useEffect(()=>{if(!B)return;let xe=setTimeout(()=>{N?.("")},6e3);return()=>clearTimeout(xe)},[B,N]);let m=Nt.default.useRef(null);Nt.default.useEffect(()=>{if(!W)return;let xe=De=>{De.key==="Escape"&&ie(!1)},Re=De=>{let ze=De.composedPath?De.composedPath():[],Ue=De.target?.closest?.(".hsk-cb-tools-toggle")||ze.some(Ze=>Ze?.classList?.contains?.("hsk-cb-tools-toggle")),Qe=m.current&&(ze.includes(m.current)||m.current.contains(De.target));Ue||Qe||ie(!1)};return window.addEventListener("keydown",xe),document.addEventListener("mousedown",Re),document.addEventListener("touchstart",Re,{passive:!0}),()=>{window.removeEventListener("keydown",xe),document.removeEventListener("mousedown",Re),document.removeEventListener("touchstart",Re)}},[W]);let R=ne||"Ask me anything\u2026",G=(0,Nt.useRef)(null),[J,K]=(0,Nt.useState)(()=>R.length>26);(0,Nt.useEffect)(()=>{let xe=G.current;if(!xe||r)return;let Re=()=>{let ze=xe.querySelectorAll(".hsk-animated-placeholder__char");if(ze.length<2)return K(!1);let ke=ze[0].offsetTop,Ue=ze[ze.length-1].offsetTop;K(Ue-ke>ze[0].offsetHeight/2)};Re();let De=new ResizeObserver(Re);return De.observe(xe),()=>De.disconnect()},[R,r]);let se=Math.max(ts(R).length-1,0)*_a,[Ce,de]=(0,Nt.useState)(!1),me=(0,Nt.useRef)(null),q=()=>{me.current&&clearTimeout(me.current),de(!0),me.current=setTimeout(()=>{de(!1),me.current=null},550)};(0,Nt.useEffect)(()=>()=>{me.current&&clearTimeout(me.current)},[]);let ge=(0,Nt.useRef)(null),Ie=!!Y;return(0,Nt.useEffect)(()=>{ge.current?.toggleAttribute("inert",Ie)},[Ie]),(0,re.jsxs)("div",{className:"hsk-cb-input-wrap","data-tools-open":W?"true":void 0,children:[W&&(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)("div",{className:"hsk-cb-toolsheet-scrim",onClick:()=>ie(!1),"aria-hidden":"true"}),(0,re.jsx)("div",{className:"hsk-cb-toolsheet-wrap",ref:m,children:(0,re.jsxs)("div",{className:"hsk-cb-toolsheet",role:"menu",children:[C&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),L.current?.click()},disabled:V,children:[(0,re.jsx)(Co,{}),(0,re.jsx)("span",{children:T("attachImage")})]}),F&&D&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),O?N?.(T("errAccountRequired")):S("converse")},disabled:V||b,children:[(0,re.jsx)(So,{}),(0,re.jsx)("span",{children:T("voiceModeStart")})]}),y&&(0,re.jsxs)("button",{className:"hsk-cb-toolsheet-item",role:"menuitem",onClick:()=>{ie(!1),y()},children:[(0,re.jsx)(di,{}),(0,re.jsx)("span",{children:"MiMi"})]})]})})]}),Y,(0,re.jsxs)("div",{className:"hsk-cb-input-card",ref:ge,children:[(/^@kiku\b/i.test(r)||n||o)&&(0,re.jsxs)("div",{className:"hsk-cb-docked-header",children:[(0,re.jsx)("span",{className:"hsk-cb-docked-sub",children:T("captureAndRemember")}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-docked-close",onClick:()=>{t(xe=>xe.replace(/^@kiku\s*/i,"")),a(!1),i(!1)},"aria-label":"Close mode",children:"\xD7"})]}),(n||o)&&(0,re.jsxs)("div",{className:"hsk-cb-docked-options",onMouseDown:xe=>xe.preventDefault(),children:[o&&c&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>l("@kiku"),children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(yr,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:"kiku"}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-desc",children:"capture & remember"})]}),n&&c&&(0,re.jsxs)(re.Fragment,{children:[s.map((xe,Re)=>(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h(xe),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:xe.image?(0,re.jsx)("img",{src:xe.image,alt:""}):(0,re.jsx)(fa,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:xe.name}),ar(xe,k)[0]&&(0,re.jsx)("span",{className:"hsk-cb-docked-option-detail",children:ar(xe,k)[0].value})]},xe.id??Re)),s.length>1&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{p(s),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(fa,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("captureAll",{count:String(s.length)})})]}),s.length===0&&(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{h({name:"current page",id:void 0}),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(fa,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("captureCurrentPage")})]}),(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{d(),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(hi,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("whatHaveYouSaved")})]}),(0,re.jsxs)("button",{type:"button",className:"hsk-cb-docked-option",onClick:()=>{u(),a(!1)},children:[(0,re.jsx)("span",{className:"hsk-cb-docked-option-icon",children:(0,re.jsx)(ka,{})}),(0,re.jsx)("span",{className:"hsk-cb-docked-option-title",children:T("deleteThis")})]})]})]}),f.length>0&&(0,re.jsx)("div",{className:"hsk-cb-img-strip",children:f.map((xe,Re)=>(0,re.jsxs)("div",{className:"hsk-cb-img-thumb-wrap",children:[(0,re.jsx)("img",{src:xe.thumb||xe.data,alt:`attachment ${Re+1}`,className:"hsk-cb-img-thumb"}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-img-thumb-remove",onClick:()=>w(Re),"aria-label":"Remove image",children:(0,re.jsx)(wi,{size:10})})]},Re))}),(0,re.jsxs)("div",{className:le("hsk-cb-input-box",b&&"hsk-cb-input-box--waiting"),"data-cascade":he%2?"b":"a","data-tools":W?"open":"closed",style:{"--hsk-text-sweep":`${se}ms`},children:[(0,re.jsx)("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:xe=>{M(xe.target.files),xe.target.value=""}}),(y||C||F&&D)&&(0,re.jsx)("button",{className:le("hsk-cb-tools-toggle",W&&"hsk-cb-tools-toggle--open"),onClick:()=>ie(xe=>!xe),disabled:V||b,"aria-label":W?"Close options":"More options","aria-expanded":W,children:(0,re.jsx)(pi,{})}),(0,re.jsx)(re.Fragment,{children:C&&(0,re.jsx)("button",{className:"hsk-cb-attach-btn",onClick:()=>L.current?.click(),disabled:V,"aria-label":"Attach image",children:(0,re.jsx)(Co,{})})}),(0,re.jsxs)("div",{className:"hsk-cb-field",ref:G,"data-ph-lines":!r&&J?"2":void 0,children:[(0,re.jsx)("textarea",{ref:v,value:r,onChange:$,onKeyDown:P,rows:1,placeholder:"",className:le("hsk-cb-textarea",I.input),"aria-label":ne,disabled:E||V&&!fe||x}),(0,re.jsx)(Jc,{placeholder:ne,visible:!r,staggerMs:_a,replaySeed:he})]}),F&&D&&(0,re.jsx)("button",{className:le("hsk-cb-voice-mode-btn",O&&"hsk-cb-voice-mode-btn--blocked"),onClick:()=>O?N?.(T("errAccountRequired")):S("converse"),disabled:V||b,"aria-label":"Voice conversation",children:(0,re.jsx)(So,{})}),(V||fe)&&!Ce?(0,re.jsx)("button",{className:le("hsk-cb-send","hsk-cb-send--stop",I.sendButton),onClick:Q,"aria-label":"Stop generating",children:(0,re.jsx)(ii,{})}):(0,re.jsxs)("button",{className:le("hsk-cb-send",Ce&&"is-launching",I.sendButton),onClick:()=>{q(),_()},disabled:x||E||b||!r.trim()&&f.length===0,"aria-label":"Send message",children:[(0,re.jsx)("svg",{width:"0",height:"0","aria-hidden":"true",focusable:"false",style:{position:"absolute"},children:(0,re.jsx)("defs",{children:(0,re.jsxs)("filter",{id:e,children:[(0,re.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"1.6",result:"blur"}),(0,re.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,re.jsx)("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),(0,re.jsx)("span",{className:"hsk-cb-send-sheath","aria-hidden":"true"}),(0,re.jsxs)("span",{className:"hsk-cb-send-stage",style:{filter:`url(#${e})`},children:[(0,re.jsx)("span",{className:"hsk-cb-send-seam","aria-hidden":"true"}),(0,re.jsx)("span",{className:"hsk-cb-send-kite",children:(0,re.jsx)(bi,{})})]})]})]})]}),O?(0,re.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,re.jsx)("span",{children:T("errAccountRequired")}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]}):B&&(0,re.jsxs)("div",{className:"hsk-cb-voice-error",role:"status",onClick:()=>N?.(""),children:[(0,re.jsx)("span",{children:T(B)}),(0,re.jsx)("button",{type:"button",className:"hsk-cb-voice-error-dismiss",onClick:xe=>{xe.stopPropagation(),N?.("")},"aria-label":"Dismiss error",children:"\xD7"})]})]})}var Ct=Xt(require("react"));var rr=require("react"),rl=require("react/jsx-runtime");function el(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(o=>o+o).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 _d(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 wn(e,r){return`rgba(${e[0]|0}, ${e[1]|0}, ${e[2]|0}, ${r})`}var Sr=24,Fd=.42;function tl({phase:e,theme:r,level:t,spectrum:n,bins:a,className:o}){let i=(0,rr.useRef)(null),c=(0,rr.useRef)(e),s=(0,rr.useRef)(t),l=(0,rr.useRef)(n),h=(0,rr.useRef)(a);return(0,rr.useEffect)(()=>{c.current=e},[e]),(0,rr.useEffect)(()=>{s.current=t},[t]),(0,rr.useEffect)(()=>{l.current=n},[n]),(0,rr.useEffect)(()=>{h.current=a},[a]),(0,rr.useEffect)(()=>{let p=i.current;if(!p)return;let d=p.getContext("2d");if(!d)return;let u=getComputedStyle(p),f=el(u.getPropertyValue("--hsk-primary")||"",[255,106,51]),w=el(u.getPropertyValue("--hsk-chat-text")||"",[31,31,31]),b=0,E=0,x=0,L=()=>{let Q=Math.min(window.devicePixelRatio||1,3),_=p.getBoundingClientRect();E=Math.max(1,_.width),x=Math.max(1,_.height),p.width=Math.round(E*Q),p.height=Math.round(x*Q),d.setTransform(Q,0,0,Q,0,0)};L();let M=typeof ResizeObserver<"u"?new ResizeObserver(L):null;M?.observe(p),window.addEventListener("resize",L);let C=window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches??!1,F=new Float32Array(Sr),D=[],S=null,O=-1,v=null,I=0,$=0,P=performance.now(),Z=(Q,_,B,N)=>Q+(_-Q)*(_>Q?B:N),ve=()=>{let Q=l.current,_=h.current?.()??0;if(!Q||!_||((!v||v.length!==_)&&(v=new Uint8Array(_)),!Q(v)))return!1;let N=Math.max(Sr,Math.floor(_*Fd))/Sr;for(let T=0;T<Sr;T++){let A=Math.floor(T*N),Y=Math.max(A+1,Math.floor((T+1)*N)),y=0;for(let k=A;k<Y;k++)y+=v[k];let z=y/(Y-A)/255;F[T]=Z(F[T],z,C?.2:.55,C?.06:.14)}return!0},ne=(Q,_)=>{for(let B=0;B<Sr;B++){let N=B/(Sr-1),T=Math.pow(1-N,1.6)*(.75+.25*Math.sin(Q*3.1+B*.7));F[B]=Z(F[B],T*_,.3,.12)}},V=Q=>{let _=Math.min(Sr-1,Math.max(0,Q*(Sr-1))),B=Math.floor(_),N=_-B,T=F[B],A=F[Math.min(Sr-1,B+1)];return T+(A-T)*N*N*(3-2*N)},fe=Q=>{b=requestAnimationFrame(fe);let _=(Q-P)/1e3,B=c.current,N=Math.min(1,s.current());I=Z(I,Math.max(B==="speaking"?.42:B==="listening"?.3:B==="thinking"?.28:.12,N),C?.1:.5,C?.05:.11),ve()||ne(_,Math.max(.25,I)),d.clearRect(0,0,E,x);let A=x/2;$=B==="thinking"?($+.012)%1.6:0;let Y=3;if(O!==E){D=[];for(let k=0;k<Y;k++){let he=k/(Y-1||1),oe=_d(f,w,he*.5),W=d.createLinearGradient(0,0,E,0);W.addColorStop(0,wn(oe,0)),W.addColorStop(.5,wn(oe,.9-he*.35)),W.addColorStop(1,wn(oe,0)),D.push(W)}S=d.createLinearGradient(0,0,E,0),S.addColorStop(0,wn(f,0)),S.addColorStop(.5,wn(f,.14)),S.addColorStop(1,wn(f,0)),O=E}let y=x*.32,z=Math.max(4,E/130);for(let k=0;k<Y;k++){let he=k/(Y-1||1),oe=k*.055,W=1-he*.22;d.beginPath();let ie=0,m=A;for(let G=0;G<=E;G+=z){let J=G/E,K=Math.pow(Math.sin(Math.PI*J),.85),se=B==="thinking"?Math.exp(-Math.pow((J-($-.3))*4.5,2)):1,Ce=V(Math.abs(J-.5)*2),de=_-oe,me=Math.sin(J*Math.PI*2*2.1+de*7.4)*.66+Math.sin(J*Math.PI*2*3.7-de*5.6)*.26+Math.sin(J*Math.PI*2*5.9+de*9.1)*.08,q=A+K*se*W*y*I*(.6+Ce*1.1)*me+Math.sin(J*Math.PI*2*.6+(_-oe)*2.2)*K*x*.01;G===0?d.moveTo(G,q):d.quadraticCurveTo(ie,m,(ie+G)/2,(m+q)/2),ie=G,m=q}d.quadraticCurveTo(ie,m,E,m),d.lineCap="round",d.lineJoin="round";let R=(k===0?3:1.6)*(1+I*.6);k===0&&(d.strokeStyle=S,d.lineWidth=R*5,d.stroke()),d.strokeStyle=D[k],d.lineWidth=R,d.stroke()}};return b=requestAnimationFrame(fe),()=>{cancelAnimationFrame(b),M?.disconnect(),window.removeEventListener("resize",L)}},[r]),(0,rl.jsx)("canvas",{ref:i,className:o,"aria-hidden":"true"})}var Qr=require("react");var It=require("react/jsx-runtime");function Xn({src:e,images:r,initialIndex:t=0,title:n,onClose:a}){let o=r&&r.length>0?r:e?[{url:e}]:[],[i,c]=(0,Qr.useState)(t),s=(0,Qr.useRef)(null);if((0,Qr.useEffect)(()=>{c(Math.min(Math.max(0,t),Math.max(0,o.length-1)))},[t,o.length]),(0,Qr.useEffect)(()=>{if(o.length===0)return;let p=d=>{d.key==="Escape"&&a(),o.length>1&&(d.key==="ArrowLeft"&&c(u=>(u-1+o.length)%o.length),d.key==="ArrowRight"&&c(u=>(u+1)%o.length))};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[o.length,a]),o.length===0)return null;let l=o[i]||o[0],h=p=>c(d=>(d+p+o.length)%o.length);return(0,It.jsxs)("div",{className:"hsk-lightbox",onClick:a,role:"dialog","aria-modal":"true","aria-label":n||"Image preview",children:[(0,It.jsx)("button",{className:"hsk-lightbox-close",onClick:a,"aria-label":"Close image",children:(0,It.jsx)(on,{})}),n&&(0,It.jsx)("div",{className:"hsk-lightbox-top",onClick:p=>p.stopPropagation(),children:(0,It.jsx)("span",{className:"hsk-lightbox-title",children:n})}),(0,It.jsxs)("div",{className:"hsk-lightbox-stage",onClick:p=>p.stopPropagation(),onTouchStart:p=>{s.current=p.touches[0]?.clientX??null},onTouchEnd:p=>{let d=p.changedTouches[0]?.clientX;s.current!==null&&d!==void 0&&Math.abs(d-s.current)>40&&h(d<s.current?1:-1),s.current=null},children:[o.length>1&&(0,It.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--prev",onClick:()=>h(-1),"aria-label":"Previous image",children:(0,It.jsx)(sn,{})}),(0,It.jsxs)("div",{className:"hsk-lightbox-content",children:[(0,It.jsx)("img",{src:l.url,alt:l.alt||n||"",className:"hsk-lightbox-img"},l.url),l.caption&&(0,It.jsx)("div",{className:"hsk-lightbox-caption",children:l.caption})]}),o.length>1&&(0,It.jsx)("button",{type:"button",className:"hsk-lightbox-nav hsk-lightbox-nav--next",onClick:()=>h(1),"aria-label":"Next image",children:(0,It.jsx)(cn,{})})]}),o.length>1&&(0,It.jsx)("div",{className:"hsk-lightbox-bottom",onClick:p=>p.stopPropagation(),children:(0,It.jsxs)("div",{className:"hsk-lightbox-counter",children:[i+1," / ",o.length]})})]})}var nl=require("@akropolys/sdk"),Me=require("react/jsx-runtime");function Dd({images:e,siteId:r,themeAttr:t}){let n=(0,Ct.useRef)(null),[a,o]=(0,Ct.useState)(null);if((0,Ct.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,Me.jsxs)("div",{className:"hsk-voice-images",ref:n,children:[e.map(s=>(0,Me.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,Me.jsx)(dn,{active:!0,seed:r,theme:t}),s.url&&(0,Me.jsx)("img",{src:s.url,alt:"",draggable:!1},s.url),s.url&&(0,Me.jsx)(dn,{active:!!s.sending||s.id===c,seed:r,theme:t})]},s.id)),a&&(0,Me.jsx)(Xn,{src:a,onClose:()=>o(null)})]})}function Hd({current:e,choose:r,label:t,groups:n}){let a=zn.find(l=>l.name===e),[o,i]=(0,Ct.useState)(!1),c=(0,Ct.useRef)(null),s=(0,Ct.useRef)(null);return(0,Ct.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 p=u=>{c.current&&!u.composedPath().includes(c.current)&&i(!1)},d=u=>{u.key==="Escape"&&i(!1)};return document.addEventListener("pointerdown",p),document.addEventListener("keydown",d),()=>{document.removeEventListener("pointerdown",p),document.removeEventListener("keydown",d)}},[o]),(0,Me.jsxs)("div",{className:"hsk-voice-picker",ref:c,"data-open":o?"":void 0,dir:"ltr",children:[(0,Me.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,Me.jsx)("span",{children:a?.trait??e}),(0,Me.jsx)("span",{className:"hsk-voice-pill-caret",children:(0,Me.jsx)(cn,{})})]}),(0,Me.jsx)("div",{className:"hsk-voice-menu-list",role:"radiogroup","aria-label":t,ref:s,children:["male","female"].map(l=>(0,Me.jsxs)(Ct.default.Fragment,{children:[(0,Me.jsx)("div",{className:"hsk-voice-group","aria-hidden":"true",children:n[l]}),zn.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),i(!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 al({siteId:e,themeAttr:r,stopVoice:t,chooseVoice:n,liveVoiceName:a,voiceSecondsLeft:o,voiceConnecting:i,voicePhase:c,live:s,earlier:l,newVoiceChat:h,voiceMuted:p,setVoiceMuted:d,voiceError:u,attachPhoto:f,onSelectSource:w,t:b}){let E=(0,Ct.useRef)(null),x=(0,Ct.useRef)(null),L=(0,Ct.useRef)(null),M=[...l.turns,...s.turns??[]],C=[...l.images,...s.images??[]],F=s.sources??[],[D,S]=(0,Ct.useState)(null),O=C.some(P=>P.pending),v=M.length,I=M[v-1]?.text??"",$=(0,Ct.useRef)(!1);return(0,Ct.useEffect)(()=>{x.current?.scrollIntoView({block:"end",behavior:$.current?"smooth":"auto"}),$.current=!0},[v,I]),(0,Me.jsxs)("div",{className:"hsk-voice-overlay",role:"dialog","aria-label":b("voiceModeStart"),children:[(0,Me.jsx)(ya,{seed:e,theme:r}),M.some(P=>P.text)&&(0,Me.jsx)("button",{type:"button",className:"hsk-voice-new",onClick:h,disabled:i,"aria-label":b("voiceNewChat"),title:b("voiceNewChat"),children:(0,Me.jsx)(ga,{size:15})}),(0,Me.jsx)("button",{className:"hsk-voice-exit",onClick:t,"aria-label":b("voiceModeExit"),children:(0,Me.jsx)(on,{})}),(0,Me.jsx)(Hd,{current:a,choose:n,label:b("voicePickerLabel"),groups:{female:b("voiceFemale"),male:b("voiceMale")}}),(0,Me.jsxs)("div",{className:"hsk-voice-thread",ref:E,children:[M.filter(P=>P.text).map((P,Z)=>P.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",!P.done&&"hsk-voice-turn--live"),children:P.text})},Z):(0,Me.jsx)("div",{className:"hsk-cb-ai-msg",children:(0,Me.jsx)("div",{className:le("hsk-cb-ai-body",!P.done&&"hsk-voice-turn--live"),children:P.text})},Z)),(0,Me.jsx)("div",{ref:x})]}),(C.length>0||F.length>0)&&(0,Me.jsxs)("div",{className:"hsk-voice-shelf",children:[(0,Me.jsx)(Dd,{images:C,siteId:e,themeAttr:r}),F.length>0&&(0,Me.jsx)("div",{className:"hsk-voice-sources",children:(0,Me.jsx)(Pa,{sources:F.map(P=>({...P,images:(0,nl.normalizeEntityImages)(P.images??P.fields?.images,P.image,P.url)})),onSelectSource:w,onImageClick:S,referencedIds:F.map(P=>P.id).filter(P=>!!P),compact:!0})})]}),D&&(0,Me.jsx)(Xn,{src:D,onClose:()=>S(null)}),i&&(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:[s.photos&&(0,Me.jsxs)(Me.Fragment,{children:[(0,Me.jsx)("input",{ref:L,type:"file",accept:"image/*",className:"hsk-sr-only",onChange:P=>{let Z=P.target.files?.[0];P.target.value="",Z&&f(Z)}}),(0,Me.jsx)("button",{type:"button",className:"hsk-voice-control hsk-voice-control--attach","data-control":"attach",disabled:i||O,onClick:()=>L.current?.click(),"aria-label":b("voiceAttachPhoto"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:(0,Me.jsx)(ui,{})})})]}),(0,Me.jsx)("div",{className:le("hsk-voice-stage",i&&"hsk-voice-stage--connecting"),children:(0,Me.jsx)(tl,{className:"hsk-voice-canvas",theme:r,phase:c,level:s.micLevel,spectrum:s.micSpectrum,bins:s.spectrumBins})}),(0,Me.jsx)("button",{className:le("hsk-voice-control",p&&"hsk-voice-control--muted",i&&"hsk-voice-control--waiting"),"data-control":"mic",disabled:i,onClick:()=>d(P=>!P),"aria-label":b(p?"voicePhaseListening":"voiceModeExit"),children:(0,Me.jsx)("span",{className:"hsk-voice-control-icon",children:p?(0,Me.jsx)(mi,{}):(0,Me.jsx)(In,{})},p?"off":"on")})]})]})}var Mr=require("react");var kr=require("react/jsx-runtime"),Qn=14,ol=6;function Bd(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?ol*1.3:ol*.6)*(s%2?1:-1),i=`M ${Qn} 0`,c=0;return t.forEach((s,l)=>{let h=n(s),p=c+(h-c)/2;i+=` C ${Qn+o(l)} ${p}, ${Qn+o(l)} ${p}, ${Qn} ${h}`,c=h}),{d:i+` L ${Qn} ${a}`,height:a}}function sl({items:e,activeIdx:r,progress:t,onJump:n,side:a="right"}){let o=Zt(),i=(0,Mr.useRef)(null),c=(0,Mr.useRef)(null),s=(0,Mr.useRef)([]),l=(0,Mr.useRef)(null),[h,p]=(0,Mr.useState)(null),d=0;for(let u=0;u<e.length;u++)e[u].idx<=r&&(d=u);return(0,Mr.useEffect)(()=>{let u=s.current[d],f=l.current,w=c.current,b=i.current;if(u&&(f&&(f.style.transform=`translateY(${u.offsetTop+u.offsetHeight/2}px)`),p(Bd(s.current,d)),w&&b)){let E=b.clientHeight;if(w.scrollHeight>E&&E>0){let L=u.offsetTop+u.offsetHeight/2,M=E/2-L;w.style.transform=`translateY(${M}px)`}else w.style.transform="none"}},[d,e.length]),e.length<2?null:(0,kr.jsx)("nav",{ref:i,className:le("hsk-cb-timeline",a==="left"?"hsk-cb-timeline--left":"hsk-cb-timeline--right"),"aria-label":o("timelineLabel"),children:(0,kr.jsxs)("div",{ref:c,className:"hsk-cb-timeline-track",style:{"--hsk-tl-progress":t},children:[h&&(0,kr.jsx)("svg",{className:"hsk-cb-tl-wave",width:"28",height:h.height,viewBox:`0 0 28 ${h.height}`,"aria-hidden":"true",children:(0,kr.jsx)("path",{d:h.d})}),(0,kr.jsx)("span",{className:"hsk-cb-tl-cursor",ref:l,"aria-hidden":"true"}),e.map((u,f)=>(0,kr.jsxs)("button",{ref:w=>{s.current[f]=w},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,kr.jsx)("span",{className:"hsk-cb-tl-dot"}),(0,kr.jsx)("span",{className:"hsk-cb-tl-label",children:u.text})]},u.idx))]})})}var gt=require("react"),il=require("react-dom");var ht=require("react/jsx-runtime"),$d=190;function cl({msg:e,rect:r,containerRect:t,anchorEl:n,containerEl:a,scrollEl:o,isUser:i,isRTL:c=!1,canRetry:s,onPin:l,onRetry:h,onCopy:p,onClose:d,t:u}){let[f,w]=(0,gt.useState)(!1),b=(0,gt.useRef)(null),E=(0,gt.useRef)(),[x]=(0,gt.useState)(()=>{let ke=o?.getBoundingClientRect();return!!ke&&(r.top<ke.top+64||r.top+r.height>ke.bottom-8)});(0,gt.useLayoutEffect)(()=>{let ke=n?.closest(".hsk-cb-msg-group");if(!ke)return;let Ue=ke.inert;return ke.setAttribute("data-hsk-tapback-focus",""),ke.inert=!0,()=>{ke.removeAttribute("data-hsk-tapback-focus"),ke.inert=Ue}},[n]),(0,gt.useLayoutEffect)(()=>{if(!o)return;let ke=o.getAttribute("data-hsk-tapback-active");return o.setAttribute("data-hsk-tapback-active",""),()=>{ke===null?o.removeAttribute("data-hsk-tapback-active"):o.setAttribute("data-hsk-tapback-active",ke)}},[o]);let{closing:L,requestClose:M}=Vn($d,d);(0,gt.useEffect)(()=>{let ke=document.activeElement,Ue=()=>Array.from(b.current?.querySelectorAll("button")??[]);b.current?.focus({preventScroll:!0});let Qe=Ze=>{if(Ze.key==="Escape"&&(Ze.preventDefault(),Ze.stopImmediatePropagation(),M()),Ze.key!=="Tab")return;let Be=Ue();if(!Be.length)return;let St=Be.indexOf(document.activeElement);(Ze.shiftKey?St<=0:St===Be.length-1||St<0)&&(Ze.preventDefault(),Be[Ze.shiftKey?Be.length-1:0].focus({preventScroll:!0}))};return window.addEventListener("keydown",Qe,!0),()=>{window.removeEventListener("keydown",Qe,!0),clearTimeout(E.current),ke?.isConnected&&ke.focus({preventScroll:!0})}},[M]);let C=(0,gt.useCallback)(async()=>{await p(e.content||"")&&(w(!0),E.current=setTimeout(M,450))},[e.content,p,M]),F=(0,gt.useCallback)(()=>{or("pin"),l(e),M()},[e,l,M]),D=(0,gt.useCallback)(()=>{h&&h(e),M()},[e,h,M]),[S,O]=(0,gt.useState)(()=>({box:r,attachment:r,thought:void 0,container:t,viewport:o?.getBoundingClientRect(),width:0,height:36,scrollTop:o?.scrollTop??0}));(0,gt.useLayoutEffect)(()=>{let ke=0,Ue=()=>{ke=0;let Be=n?.getBoundingClientRect()??r,St=(i?null:n?.querySelector(".hsk-cb-ai-text"))?.getBoundingClientRect()??Be,Mt=i?void 0:n?.querySelector(".hsk-cb-think-head")?.getBoundingClientRect(),At=a?.getBoundingClientRect()??t,Gt=o?.getBoundingClientRect()??At,Yt=b.current?.offsetWidth??0,Pt=b.current?.offsetHeight??36,Se=o?.scrollTop??0;O(tt=>{let bt=(je,nt)=>je===nt||!!je&&!!nt&&["top","left","width","height"].every(ut=>Math.abs(je[ut]-nt[ut])<.5);return bt(tt.box,Be)&&bt(tt.attachment,St)&&bt(tt.thought,Mt)&&bt(tt.container,At)&&bt(tt.viewport,Gt)&&tt.width===Yt&&tt.height===Pt&&tt.scrollTop===Se?tt:{box:Be,attachment:St,thought:Mt,container:At,viewport:Gt,width:Yt,height:Pt,scrollTop:Se}})},Qe=()=>{ke||(ke=requestAnimationFrame(Ue))};Ue();let Ze=typeof ResizeObserver>"u"?null:new ResizeObserver(Qe);for(let Be of[n,a,o,b.current])Be&&Ze?.observe(Be);return o?.addEventListener("scroll",Qe,{passive:!0}),window.addEventListener("resize",Qe),window.visualViewport?.addEventListener("resize",Qe),window.visualViewport?.addEventListener("scroll",Qe),()=>{cancelAnimationFrame(ke),Ze?.disconnect(),o?.removeEventListener("scroll",Qe),window.removeEventListener("resize",Qe),window.visualViewport?.removeEventListener("resize",Qe),window.visualViewport?.removeEventListener("scroll",Qe)}},[n,a,o,r,t,i]);let[v,I]=(0,gt.useState)("");(0,gt.useEffect)(()=>{if(!n)return;let ke=getComputedStyle(n).backgroundColor;ke&&ke!=="rgba(0, 0, 0, 0)"&&ke!=="transparent"&&I(ke)},[n]);let{box:$,attachment:P,thought:Z,container:ve,viewport:ne}=S,V=ve?.top??0,fe=ve?.left??0,Q=ve?.width??(typeof window<"u"?window.innerWidth:390),_=$.top-V,B=P.left-fe,N=P.width,T=$.height,A=2;s&&h&&A++;let Y=A===2?122:170,y=S.width||Y,z=S.height,k=window.visualViewport?.offsetTop??0,he=k+(window.visualViewport?.height??window.innerHeight),oe=Math.max(0,Math.max(ne?.top??V,k)-V),W=Math.min(ve?.height??window.innerHeight,Math.min(ne?ne.top+ne.height:he,he)-V),ie=oe+8,m=Math.max(ie,W-z-8),R=!!Z,G=R||x||_-z-9>=ie,J=G?_-z-9:_+T+9,K=Z?Math.max(ie,Math.min(Z.top-V+(Z.height-z)/2,m)):x?ie:Math.max(ie,Math.min(J,m)),se=Math.round($.top-(ne?.top??V)+S.scrollTop),Ce=Math.min(24,T/2),de=Math.ceil(Math.max(240,ne?.height??ve?.height??window.innerHeight)+64),me=(0,ht.jsxs)(ht.Fragment,{children:[(0,ht.jsx)("div",{className:le("hsk-tapback-frost","is-upper",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?se:_)-de,height:de+Ce}}),(0,ht.jsx)("div",{className:le("hsk-tapback-frost","is-lower",L&&"is-closing"),"aria-hidden":"true",style:{top:(o?se:_)+T-Ce,height:de+Ce}})]}),q=!i&&!!n?.closest('[data-hsk-layout="wide"]'),ge=c,Ie=ge?Math.min(Q-18,B+N-7):Math.max(18,B+7),xe=ge?Ie-y+18:Ie-18;xe=Math.max(10,Math.min(xe,Q-y-10));let Re=Math.max(18,Math.min(Ie-xe,y-18)),De=v||(i?"var(--hsk-user-bubble-bg, var(--hsk-primary, #007aff))":"var(--hsk-bubble-bg, #eeeef0)"),ze=0;return(0,ht.jsxs)("div",{className:le("hsk-tapback-overlay",L&&"is-closing"),onClick:M,children:[o?(0,il.createPortal)(me,o):me,(0,ht.jsxs)("div",{ref:b,className:le("hsk-tapback-group",q&&"is-wide",(x||R)&&"is-docked",L&&"is-closing",G?"is-above":"is-below",i?"is-user":"is-ai"),style:{top:`${K}px`,left:`${xe}px`,maxWidth:`${Math.max(0,Q-20)}px`,"--tail-x":`${Re}px`,"--tail-dir":ge?1:-1,"--tail-step":i?"9px":"8px","--hsk-anchor-color":De,"--hsk-skin":"var(--hsk-bubble-bg, var(--hsk-chat-ai-bg, #eeeef0))"},tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"Message actions",onClick:ke=>ke.stopPropagation(),children:[(0,ht.jsxs)("div",{className:"hsk-tapback-capsule",children:[(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--pin",onClick:F,"aria-label":"Pin to Kiku Memory",style:{"--tool-idx":ze++},children:[(0,ht.jsx)(Ci,{size:14}),(0,ht.jsx)("span",{children:"Pin"})]}),s&&h&&(0,ht.jsxs)("button",{type:"button",className:"hsk-tapback-tool-btn hsk-tapback-tool-btn--retry",onClick:D,"aria-label":u("retry"),style:{"--tool-idx":ze++},children:[(0,ht.jsx)(Nn,{size:14}),(0,ht.jsx)("span",{children:u("retry")})]}),(0,ht.jsxs)("button",{type:"button",className:le("hsk-tapback-tool-btn hsk-tapback-tool-btn--copy",f&&"is-copied"),onClick:C,"aria-label":u(f?"copied":"copy"),style:{"--tool-idx":ze++},children:[f?(0,ht.jsx)(Or,{size:14}):(0,ht.jsx)(qr,{size:14}),(0,ht.jsx)("span",{children:u(f?"copied":"copy")})]})]}),(0,ht.jsxs)("div",{className:le("hsk-tapback-tail",G?"is-above":"is-below"),style:{left:`${Re}px`},children:[(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--mid"}),(0,ht.jsx)("span",{className:"hsk-tapback-dot hsk-tapback-dot--anchor"})]})]})]})}var Da=require("react");var ll=!1;function hl(){if(ll)return!0;try{return localStorage.getItem("akropolys_layout_hint_seen")==="true"||localStorage.getItem("akropolys_chat_layout")==="wide"}catch{return!1}}function Jn(){ll=!0;try{localStorage.setItem("akropolys_layout_hint_seen","true")}catch{}}var Cn=require("react/jsx-runtime");function rs({onOpenDock:e,placement:r="reply"}){let t=Zt(),n=(0,Da.useRef)(null);return(0,Da.useEffect)(()=>{let a=n.current;if(!a)return;if(typeof IntersectionObserver>"u"){Jn();return}let o=new IntersectionObserver(i=>{i.some(c=>c.isIntersecting&&c.intersectionRatio>=.5)&&(Jn(),o.disconnect())},{threshold:.5});return o.observe(a),()=>o.disconnect()},[]),(0,Cn.jsxs)("button",{ref:n,type:"button",className:`hsk-cb-layout-discovery-note hsk-cb-layout-discovery-note--${r}`,onClick:e,children:[(0,Cn.jsx)("svg",{viewBox:"0 0 44 48",fill:"none","aria-hidden":"true",children:(0,Cn.jsx)("path",{pathLength:"1",d:"M36 43C14 46 8 27 20 23C32 18 36 31 24 31C11 31 9 15 18 6M10 10L18 5L23 14"})}),(0,Cn.jsx)("span",{children:t(r==="dock"?"layoutDockNote":"layoutFirstReplyNote",{button:"Wide"})})]})}var Fe=require("react/jsx-runtime"),qd=240,Od=700,Wd=200;function ns({title:e="kiku",logo:r,placeholder:t="Ask me anything\u2026",backdropColor:n,backdropBlur:a,onClose:o,onSelectSource:i,chips:c=En,theme:s,classNames:l={},enableVoice:h=!1,voiceLang:p,enableVision:d=!1,ttsVoice:u="Algenib",origin:f}){let w=(0,Ba.useAkropolysContext)(),b=(0,Ba.useCardFields)(),{messages:E,sources:x,loading:L,streaming:M,error:C,errorCode:F,lastAction:D,lastIntent:S,allowedActions:O,send:v,queuedMessage:I,sendQueuedNow:$,appendSpokenExchange:P,stop:Z,stopped:ve,interrupted:ne,continueGenerating:V,reset:fe,referencedIds:Q,humanPending:_,leaveHuman:B}=(0,Ha.useKiku)(),[N,T]=(0,X.useState)(null),A=(0,X.useRef)(null),Y=(0,X.useCallback)(()=>{window.matchMedia?.("(prefers-reduced-motion: reduce)").matches||A.current?.animate([0,-7,6,-4,2,0].map(g=>({transform:`translateX(${g}px)`})),{duration:380,easing:"cubic-bezier(.36, .07, .19, .97)"})},[]);(0,X.useEffect)(()=>{if(!N)return;let g=Ae=>{(Ae.key.length===1||Ae.key==="Enter"||Ae.key==="Backspace")&&Y()},H=Ae=>{let Pe=at=>Ae.composedPath().some(qe=>qe.classList?.contains(at));!Pe("hsk-cb-leave")&&!Pe("hsk-cb-topbar")&&Y()},we=Br.current;return we?.setAttribute("inert",""),document.addEventListener("keydown",g),document.addEventListener("pointerdown",H,!0),()=>{we?.removeAttribute("inert"),document.removeEventListener("keydown",g),document.removeEventListener("pointerdown",H,!0)}},[N,Y]);let[y,z]=(0,X.useState)(()=>{try{return w.getShopperName?.()??""}catch{return""}}),[k,he]=(0,X.useState)(()=>{try{return w.getShopperLanguage?.()??""}catch{return""}}),[oe,W]=(0,X.useState)(()=>{try{return w.getEntityLanguageMode?.()??""}catch{return""}}),[ie,m]=(0,X.useState)(!1),[R,G]=(0,X.useState)(null),[J,K]=(0,X.useState)(""),[se,Ce]=(0,X.useState)(!1),{chromeReady:de,baseFontReady:me,isRTL:q,speechLang:ge,scriptFont:Ie,fontStack:xe,isNonLatin:Re,hostFontCovers:De,t:ze,tNode:ke}=Oi({shopperLanguage:k||J,theme:s,preloadedStrings:R}),Ue=X.default.useMemo(()=>{let g=x.filter(qe=>qe.id&&Q.includes(qe.id)),H=[...E].reverse().find(qe=>qe.role==="assistant")?.content??"";if(!H)return g;let we=new Set(g.map(qe=>qe.id)),Ae=H.toLowerCase().replace(/\s+/g," "),Pe=qe=>{let Rt=String(qe??"").toLowerCase().replace(/\s+/g," ").trim(),ot=Rt.split(" "),_t=[Rt];return ot.length>3&&_t.push(ot.slice(0,3).join(" ")),ot.length>4&&_t.push(ot.slice(0,4).join(" ")),_t.filter(rn=>rn.length>=5)},at=x.filter(qe=>qe.id&&!we.has(qe.id)&&Pe(qe.name).some(Rt=>Ae.includes(Rt)));return[...g,...at]},[x,Q,E]),Qe=O===null||O.includes("capture"),[Ze,Be]=(0,X.useState)(""),[St,Mt]=(0,X.useState)(!1),[At,Gt]=(0,X.useState)(!1),[Yt,Pt]=(0,X.useState)([]),Se=(0,X.useRef)(new Map),tt=(0,X.useRef)(null),[bt,je]=(0,X.useState)({}),[nt,ut]=(0,X.useState)(null),Dt=(0,X.useCallback)((g,H)=>{if(!g&&!H){ut(null);return}ut(H?{images:H.images,initialIndex:H.index??0,title:H.title}:{src:g})},[]),[Kt,pt]=(0,X.useState)(null),[Tt,dt]=(0,X.useState)(()=>{if(typeof window>"u")return!1;try{return localStorage.getItem("akropolys_terms_agreed")==="true"}catch{return!1}}),Ut=E.length===0,lr=J||k,j=!lr||lr.toLowerCase()==="english"||lr.toLowerCase()==="en",ee=se||!!J||!!k&&!de&&!j,ye=Ut&&!k&&!ee,ue=Ut&&!!k&&!y&&!ee,ce=Ut&&!!k&&!!y&&!oe,Ne=Ut&&!!k&&!!y&&!!oe&&!Tt,_e=ye||ue||ce||Ne||ee,be=ce||Ne||ee,[He,Ge]=(0,X.useState)(ee),[xt,gr]=(0,X.useState)(!1),[Jr,Zr]=(0,X.useState)(!1),[$e,lt]=(0,X.useState)(!1),Je=(0,X.useRef)(!1),Ht=(0,X.useRef)(null),mt=(0,X.useRef)(null);ee!==He&&(Ge(ee),ee?(mt.current&&clearTimeout(mt.current),lt(!1),Zr(!0),Ht.current=setTimeout(()=>{gr(!0),Zr(!1),Je.current=!0},280)):(Ht.current&&clearTimeout(Ht.current),Zr(!1),gr(!1),Je.current&&(Je.current=!1,lt(!0),mt.current=setTimeout(()=>lt(!1),560)))),(0,X.useEffect)(()=>()=>{Ht.current&&clearTimeout(Ht.current),mt.current&&clearTimeout(mt.current)},[]);let Bt=X.default.useMemo(()=>E.some(g=>g.liveKeys?.length>0),[E]);(0,X.useEffect)(()=>{if(Bt)return(0,Ha.subscribeLiveStream)({client:w})},[Bt,w]);let[Tr,$a]=(0,X.useState)(()=>typeof window<"u"&&!!window.matchMedia?.("(max-width: 1199px)").matches);(0,X.useEffect)(()=>{let g=window.matchMedia?.("(max-width: 1199px)");if(!g)return;let H=()=>$a(g.matches);return H(),g.addEventListener?.("change",H),()=>g.removeEventListener?.("change",H)},[]);let Dr=async g=>{let H=g.trim();if(!H){try{w.setShopperLanguage?.("")}catch{}he(""),K(""),G(null);return}if(K(H),Ce(!0),H.toLowerCase()==="english"||H.toLowerCase()==="en"){G($t);try{w.setShopperLanguage?.(H)}catch{}he(H),K(""),Ce(!1),m(!1);return}let Ae=Date.now(),Pe=1200;try{let qe=w.getCachedUIStrings?.(H,Nr)??w.getCachedUIStrings?.(H,$t);if(qe?.strings&&Object.keys(qe.strings).length>0)G(qe.strings),qe.font&&await Jt(qe.font,800);else{let Rt=w.getUIStrings?.(H,Nr),ot=await Promise.race([Rt,new Promise(_t=>setTimeout(()=>_t(null),8e3))]);ot?.font&&await Jt(ot.font,1200),ot?.strings&&Object.keys(ot.strings).length>0&&G(ot.strings)}}catch{}let at=Date.now()-Ae;at<Pe&&await new Promise(qe=>setTimeout(qe,Pe-at));try{w.setShopperLanguage?.(H)}catch{}he(H),K(""),Ce(!1),m(!1);try{w.getUIStrings?.(H,$t)?.catch?.(()=>{})}catch{}},Rr=g=>{try{w.setEntityLanguageMode?.(g)}catch{}W(g),Tt&&m(!0)},qa=()=>{try{localStorage.setItem("akropolys_terms_agreed","true")}catch{}dt(!0),m(!0)},Oa=ee?$r(J||k).preparing:ye?ze("langPlaceholder"):ue?ze("namePlaceholder"):ce?ze("entityLangPlaceholder"):Ne?ze("termsPlaceholder"):t==="Ask me anything\u2026"?ze("defaultPlaceholder"):t,Wa=!c||c===En?[]:Array.isArray(c)?c:[],Ua=ye?"curious":ue?"welcoming":ce?"guiding":Ne?"focused":"happy",[nr,Va]=(0,X.useState)(()=>oi(s)),[ml,as]=(0,X.useState)(!1),Sn=(0,X.useRef)(null);(0,X.useEffect)(()=>()=>{Sn.current&&clearTimeout(Sn.current)},[]);let os=(0,X.useRef)(null),bl=()=>{let g=Br.current;if(!g?.animate||window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let H=q?-3:3;os.current?.cancel(),os.current=g.animate([{transform:"translate(0, 0)",easing:"cubic-bezier(.3, 0, .2, 1)"},{offset:.26,transform:`translate(${H}px, -6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.52,transform:`translate(${-H*.3}px, 1.6px)`,easing:"cubic-bezier(.45, 0, .35, 1)"},{offset:.74,transform:`translate(${H*.1}px, -0.6px)`,easing:"cubic-bezier(.45, 0, .55, 1)"},{transform:"translate(0, 0)"}],{duration:1100,delay:380})},ss=(0,X.useRef)(!1);(0,X.useEffect)(()=>{if(ss.current)return;let g=Br.current;if(!g){Io();return}let H=!1,we=()=>g.querySelector(".hsk-cb-hello-wrap, .hsk-cb-msg-group"),Ae=()=>{H||(H=!0,ss.current=!0,Pe.disconnect(),clearTimeout(at),Io())},Pe=new MutationObserver(()=>{we()&&Ae()});Pe.observe(g,{childList:!0,subtree:!0});let at=window.setTimeout(Ae,2e3);return we()&&Ae(),()=>{H=!0,Pe.disconnect(),clearTimeout(at)}},[]);let is=(g,H=!1)=>{as(!0),Sn.current&&clearTimeout(Sn.current),Sn.current=setTimeout(()=>as(!1),420),Va(g),bl(),H&&na();try{localStorage.setItem("akropolys_theme",g)}catch{}},{vars:fl}=pa(s),en=nr;da(s);let cs=(0,X.useRef)(()=>{}),xr=(0,X.useRef)(null),Lr=async(g,H,we,Ae)=>{let Pe=(g??Ze).trim(),at=H??Yt;if(!Pe&&at.length===0||!de||I)return;if(or("send"),ue){if(!Pe)return;let ot=ei(Pe)||Pe.slice(0,40);try{w.setShopperName?.(ot)}catch{}z(ot),Be("");return}if(ye){if(!Pe||se)return;Be(""),Dr(Pe);return}if(be){Be("");return}Mt(!1),Gt(!1),Be(""),Pt([]);let qe=(await Promise.all(at.map(async({thumb:ot,..._t})=>{let rn=_t.data||(ot?await Se.current.get(ot)?.catch(()=>""):"")||"";return ot&&URL.revokeObjectURL(ot),{..._t,data:rn}}))).filter(ot=>ot.data),Rt=Pe||(qe.some(ot=>ot.type==="image")?"Analyze this image":"What is this?");await v(Rt,Pe,qe.length>0?qe:void 0,we,Ae)},[kl,ls]=(0,X.useState)(!1),Zn=(0,X.useCallback)(async g=>{let H=g&&g.role==="user"?g:[...E].reverse().find(we=>we.role==="user");if(H?.content){ls(!0);try{await Lr(H.content)}finally{ls(!1)}}},[E,Lr]),gl=(0,X.useCallback)(g=>{g?.content&&(Be(g.content),setTimeout(()=>{if(xr.current){xr.current.focus();let H=g.content.length;try{xr.current.setSelectionRange(H,H)}catch{}}},50))},[Be,xr]),xl=(0,X.useCallback)(async()=>{await Zn()},[Zn]),{keyInput:vl,setKeyInput:yl,keyPhase:wl,setKeyPhase:hs,mintedKey:Cl,setMintedKey:Sl,mintedPub:Vd,setMintedPub:Ml,copied:Tl,keyCountdown:Rl,minting:Ll,copyValue:El,handleUseExistingKey:zl,handleCreateKey:Nl}=ji(D,xl),Il=(0,X.useCallback)(()=>{let g=w?.getKikuKey?.();g&&window.open(`https://mimi.akropolys.cloud/#k=${encodeURIComponent(g)}`,"_blank","noopener")},[w]),[Mn,ps]=(0,X.useState)(null),Al=(0,X.useCallback)(async g=>{let H=(g.content||"").replace(/^(@kiku pin\s*)+/i,""),Ae=`@kiku pin ${H.slice(0,50).replace(/\n+/g," ")}`;await v(H||"pin message",Ae,void 0,"capture")},[v]),{handleKikuCapture:Pl,handleKikuCaptureAll:_l,handleKikuViewHistory:Fl,handleKikuDelete:Dl}=Gi({attachments:Yt,setAttachments:Pt,setInput:Be,send:v,t:ze}),{voiceMode:ea,voicePhase:ds,voiceConnecting:Hl,voiceError:ja,setVoiceError:us,voiceMuted:Bl,setVoiceMuted:$l,voiceSecondsLeft:ql,voiceBlocked:Ol,liveVoiceName:Wl,chooseVoice:Ul,canConverse:Vl,startVoice:jl,stopVoice:Gl,voice:Yl,live:ms,earlier:Kl,newVoiceChat:Xl,attachPhoto:Ql}=mc({voiceLang:p,speechLang:ge,shopperLanguage:k,ttsVoice:u,messages:E,handleSendUtterance:g=>cs.current(g),appendSpokenExchange:P}),ta=(0,X.useRef)(null),[Vt,tn]=(0,X.useState)(!1),[bs,fs]=(0,X.useState)(!1),[ks,gs]=(0,X.useState)(()=>!hl()),[Ga,Ya]=(0,X.useState)(null),[xs,Ka]=(0,X.useState)(!1),[vs,Jl]=(0,X.useState)(!1),Zl=(0,X.useCallback)(()=>Jl(!0),[]);(0,X.useEffect)(()=>{Vt?si():(fs(!1),Ka(!1))},[Vt]);let Hr=(0,X.useRef)(null);(0,X.useEffect)(()=>(!Vt&&Hr.current&&clearTimeout(Hr.current),()=>{Hr.current&&clearTimeout(Hr.current)}),[Vt]);let[eh,Xa]=(0,X.useState)(null),ra=(0,X.useRef)(null),Qa=(0,X.useRef)(null),ys=(0,X.useRef)([]),Tn=(0,X.useRef)(null),th=`hsk-goo-${(0,X.useId)()}`,{closing:Rn,requestClose:Ja,closeNow:na}=Vn(Tr?Od:qd,()=>tn(!1));(0,X.useEffect)(()=>{if(!Vt)return;let g=H=>{let we=H.composedPath?H.composedPath():[],Ae=ra.current&&(we.includes(ra.current)||ra.current.contains(H.target)),Pe=Qa.current&&(we.includes(Qa.current)||Qa.current.contains(H.target)),at=we.some(_t=>_t.classList?.contains("hsk-cb-layout-discovery-note")),qe=H.target,Rt=qe?.closest?.(".hsk-cb-topbar-mark"),ot=qe?.closest?.(".hsk-cb-topbar-ooze-menu")||we.some(_t=>_t?.classList?.contains?.("hsk-cb-topbar-ooze-menu"));Ae||Pe||Rt||ot||at||Ja()};return document.addEventListener("mousedown",g),document.addEventListener("touchstart",g,{passive:!0}),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("touchstart",g)}},[Vt]);let{msgsContainerRef:Br,spacerRef:rh,lastExternalScrollRef:nh,showJumpToBottom:ah,scrollProgress:oh,activeMsgIdx:sh,unreadBelow:ih,jumpToMessage:ch,revealMessage:ws,jumpToBottom:lh}=Wi({messages:E,loading:L,streaming:M,messageRefs:ys}),hh=(0,X.useCallback)((g,H,we,Ae)=>{Ae&&ws(Ae),ps({msg:g,rect:H,isUser:we,el:Ae})},[ws]),aa=zc(Br),Za=()=>{aa.toggle(),Jn(),gs(!1),Ya(null),Ka(!1),Tr&&(Hr.current&&clearTimeout(Hr.current),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?na():Hr.current=setTimeout(Ja,400))},ph=()=>{Xa(nr),Ka(!0),tn(!0)},{closing:eo,requestClose:Cs}=Vn(Wd,o);(0,X.useEffect)(()=>{if(!de||!me||!vs||eo||wo())return;let g=window.setTimeout(()=>{wo()||(Xa(nr),fs(!0),tn(!0))},650);return()=>window.clearTimeout(g)},[de,me,vs,eo,nr]);let to=(0,X.useCallback)(g=>{g&&B(),tn(!1),window.matchMedia?.("(prefers-reduced-motion: reduce)").matches?o():Cs()},[Cs,o,B]),oa=(0,X.useCallback)(()=>{N?Y():_?T("close"):to(!1)},[_,to,N,Y]);Si({panel:(0,X.useCallback)(()=>ta.current,[]),scroller:(0,X.useCallback)(()=>Br.current,[]),onDismiss:o,quiescent:(0,X.useCallback)(()=>performance.now()-nh.current>90,[])}),(0,X.useEffect)(()=>{if(typeof window>"u")return;let g=window.innerWidth-document.documentElement.clientWidth,H=document.body.style.overflow,we=document.body.style.paddingRight;if(g>0){let Ae=parseFloat(window.getComputedStyle(document.body).paddingRight)||0;document.body.style.paddingRight=`${Ae+g}px`,document.documentElement.style.setProperty("--hsk-scrollbar-width",`${g}px`)}return document.body.style.overflow="hidden",()=>{document.body.style.overflow=H,document.body.style.paddingRight=we,document.documentElement.style.removeProperty("--hsk-scrollbar-width")}},[]),(0,X.useEffect)(()=>{let g=window.visualViewport;if(!g)return;let H=document.documentElement,we=()=>{H.style.setProperty("--hsk-vvh",`${g.height}px`)};return we(),g.addEventListener("resize",we),g.addEventListener("scroll",we),()=>{g.removeEventListener("resize",we),g.removeEventListener("scroll",we),H.style.removeProperty("--hsk-vvh")}},[]),(0,X.useEffect)(()=>{let g=H=>{if(H.key==="Escape"){if(nt){ut(null);return}oa()}};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[nt,oa]);let ro=(0,X.useCallback)(g=>{g&&B(),fe(),Ya(null),hs("idle")},[fe,hs,B]),dh=(0,X.useCallback)(()=>{N?Y():_?T("reset"):ro(!1)},[_,ro,N,Y]),uh=g=>{i?.(g);let H=[...E].reverse().find(we=>we.role==="assistant");if(H&&H.content.trim().endsWith("?")){v(ze("cardClickAnswer",{name:g.name}));return}v(ze("cardClickQuery",{name:g.name,details:so(ar(g,b))}))},mh=g=>{Be(g+" "),Gt(!1),Mt(!0),xr.current&&xr.current.focus()},bh=g=>{if(g.key==="Escape"&&St){g.preventDefault(),Mt(!1);return}if(g.key==="Escape"&&At){g.preventDefault(),Gt(!1);return}g.key==="Enter"&&!g.shiftKey&&!g.nativeEvent.isComposing&&(g.preventDefault(),Lr())},no=(0,X.useRef)(28),Ss=(0,X.useRef)(280),ao=(0,X.useRef)(null),fh=(g,H)=>{try{!ao.current&&typeof document<"u"&&(ao.current=document.createElement("canvas"));let we=ao.current?.getContext("2d");return we?(we.font=H,we.measureText(g).width):g.length*8.5}catch{return g.length*8.5}},kh=g=>{let H=g.closest(".hsk-cb-input-box");if(!H)return;let we=g.value;!(H.dataset.expanded==="true")&&g.clientWidth>50&&(Ss.current=g.clientWidth);let Pe=window.getComputedStyle(g),at=Pe.font||`${Pe.fontSize||"16px"} ${Pe.fontFamily||"Geist, sans-serif"}`,qe=fh(we,at),Rt=Math.max(120,Ss.current-14),ot=we.includes(`
40
+ `),_t=!!(we&&(ot||qe>Rt));if(H.dataset.expanded!==(_t?"true":"false")&&(H.dataset.expanded=_t?"true":"false"),!we){no.current=28,g.style.height="";return}if(!_t){no.current=28,g.style.height="";return}g.style.height="auto";let rn=Math.max(28,Math.min(g.scrollHeight,140));no.current=rn,g.style.height=`${rn}px`};(0,X.useEffect)(()=>{xr.current&&kh(xr.current)},[Ze]);let gh=g=>{let H=g.target.value;Be(H),ja&&us("");let we=H.trim();Gt(we==="@"),Mt(/^@kiku\s*$/i.test(we))};(0,X.useEffect)(()=>{cs.current=g=>{Lr(g)}});let xh=async g=>{if(!g||g.length===0)return;let H=Array.from(g);for(let we of H){if(!we.type.startsWith("image/"))continue;let Ae=URL.createObjectURL(we),Pe=va(we);Se.current.set(Ae,Pe),Pt(at=>[...at,{type:"image",data:"",thumb:Ae}]),Pe.then(at=>Pt(qe=>qe.map(Rt=>Rt.thumb===Ae?{...Rt,data:at}:Rt))).catch(()=>Pt(at=>at.filter(qe=>qe.thumb!==Ae))).finally(()=>Se.current.delete(Ae))}},vh=g=>{Pt(H=>{let we=H[g]?.thumb;return we&&URL.revokeObjectURL(we),H.filter((Ae,Pe)=>Pe!==g)})},yh=n&&(n.includes("rgba")||n.includes("hsla")||n==="transparent"),wh=a||yh?{backdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`,WebkitBackdropFilter:`blur(${typeof a=="number"?`${a}px`:a||"20px"})`}:{},Ms=(0,X.useRef)(!1);(0,X.useEffect)(()=>{if(Ms.current&&!M){let g=E[E.length-1];g&&g.role!=="user"&&or("reply")}Ms.current=M},[M,E]);let sa=(ve||ne)&&!L&&!M,ia=E[E.length-1],ca=Ui(ia?.role==="assistant"?ia.content??"":""),Ch=ia?.role==="assistant"&&ca.length<(ia.content?.length??0),oo=M||Ch,hr=X.default.useMemo(()=>{let g=L||M,H=E.filter((Pe,at)=>Pe.role!=="assistant"||at===E.length-1&&g?!0:!!Pe.content||!!Pe.visualization||Pe.visualizing||(Pe.knowledgeImages?.length??0)>0||(Pe.referencedIds?.length??0)>0||Kr(Pe.statusStage)),we=H.length-1;if(we<0||H[we].role!=="assistant"||H[we]!==E[E.length-1])return H;let Ae=ca.length<(H[we].content?.length??0);return!g&&!Ae?H:H.map((Pe,at)=>at===we?{...Pe,content:ca}:Pe)},[E,L,M,ca]),Ts=hr.some(g=>g.role==="assistant"&&!Kr(g.statusStage)&&Yr(g.content).content.trim().length>0);(0,X.useEffect)(()=>{if(!(!ks||L||oo||C||sa||ea!=="off"))for(let g=hr.length-1;g>=0;g--){let H=hr[g];if(!(H.role!=="assistant"||Kr(H.statusStage)||!Yr(H.content).content.trim())){gs(!1),Ya(g);break}}},[ks,hr,L,oo,C,sa,ea]);let Sh=X.default.useMemo(()=>{let g=[];return hr.forEach((H,we)=>{if(H.role==="user"&&H.content.trim()){let Ae=H.content.replace(/^@kiku\s*/i,"").replace(/\s+/g," ").trim();g.push({idx:we,text:Ae.length>28?Ae.slice(0,27).trimEnd()+"\u2026":Ae})}}),g},[hr]),Mh=sa&&hr[hr.length-1]?.role!=="assistant",Rs=(0,X.useRef)(Date.now());return(0,X.useEffect)(()=>{Rs.current=Date.now()},[]),(0,Fe.jsx)(vo.Provider,{value:ze,children:(0,Fe.jsx)("div",{ref:Tn,className:le("hsk-cb-overlay",f&&"hsk-cb-overlay--grows",eo&&"hsk-cb-overlay--closing",l.overlay),onPointerDown:g=>{Er(),g.target===g.currentTarget&&(Tn.current._ptrDown=!0)},onClick:g=>{g.target===g.currentTarget&&Tn.current?._ptrDown&&Date.now()-Rs.current>200&&oa(),Tn.current&&(Tn.current._ptrDown=!1)},"data-hsk-theme":en,"data-hsk-layout":aa.wide?"wide":"bubbles","data-hsk-theming":ml?"":void 0,style:{...wh,...n?{background:n}:{},...f?{"--hsk-ox":`${f.x}px`,"--hsk-oy":`${f.y}px`}:{},...fl},children:(0,Fe.jsxs)("div",{ref:ta,className:le("hsk-cb-panel",l.panel),dir:q?"rtl":"ltr",lang:ge||void 0,"data-script":Re?"nonlatin":"latin","data-host-font":De?"covers":"gap","data-nastaliq":Ie?.family==="Noto Nastaliq Urdu"||k?.toLowerCase()==="urdu"||k?.toLowerCase()==="ur"||k==="\u0627\u0631\u062F\u0648"?"true":void 0,style:xe?{"--hsk-font":xe}:void 0,onClick:g=>{g.stopPropagation();let H=g.target;if(H.tagName==="IMG"&&(H.classList.contains("hsk-markdown-img")||H.classList.contains("hsk-cb-user-img-thumb"))){let we=H.src;we&&Dt(we)}},children:[(0,Fe.jsx)(Xn,{src:nt?.src,images:nt?.images,initialIndex:nt?.initialIndex,title:nt?.title,onClose:()=>ut(null)}),Kt&&(0,Fe.jsx)("div",{className:"hsk-markup-overlay",children:(0,Fe.jsx)(Li,{src:Kt,t:ze,onCancel:()=>pt(null),onSend:(g,H,we,Ae)=>{pt(null),Lr(H,[{type:"image",data:g,annotated:!0,marks:we,instructed:!0,preview:Ae}])}})}),(0,Fe.jsxs)("div",{className:"hsk-cb-main",children:[(0,Fe.jsx)(ya,{seed:w?.api?.siteId??"",theme:en,dir:q?"rtl":"ltr",waitForContent:!0}),(0,Fe.jsx)(wc,{layoutControl:Ts?(0,Fe.jsx)(Qo,{wide:aa.wide,onToggle:Za,emphasized:xs}):void 0,title:e,logo:r,hasMessages:E.length>0,avatarState:M?"speaking":L?"thinking":"idle",unread:ih,awayFromBottom:ah,themeMenuOpen:Vt,themeMenuClosing:Rn,themeDiscovery:bs,onThemeMenuReady:Zl,onThemeMenuClosed:na,isNarrow:Tr,currentTheme:nr,onJumpToLatest:lh,onReset:dh,onClose:oa,onToggleThemeMenu:()=>Vt?Ja():tn(!0),onSelectTheme:g=>{is(g,!0)},themeAttr:en}),(0,Fe.jsx)("div",{className:"hsk-cb-msgs",ref:Br,children:hr.length===0?(0,Fe.jsx)(Lc,{theme:en,inOnboarding:_e,justCompleted:ie,onboardingMood:Ua,awaitingLang:ye,awaitingName:ue,awaitingEntityLang:ce,awaitingConsent:Ne,termsAgreed:Tt,shopperLanguage:k,pendingLanguage:J,shopperName:y,entityLangPref:oe,chromeReady:de&&me,activeChips:Wa,speechLang:ge,t:ze,tNode:ke,chooseLanguage:Dr,langSwitching:se,isLangPreparing:ee,chooseEntityLang:Rr,agreeTerms:qa,handleSend:Lr}):(0,Fe.jsx)(Qc,{afterReply:Ga===null?void 0:{index:Ga,node:(0,Fe.jsx)(rs,{onOpenDock:ph})},doodleTheme:en,displayMessages:hr,messageRefs:ys,isNarrow:Tr,loading:L,streaming:oo,sources:x,referencedIds:Q,discussedSources:Ue,lastIntent:S,lastAction:D,stopped:ve,interrupted:ne,halted:sa,haltedEmpty:Mh,error:C,errorCode:F,keyPhase:wl,keyInput:vl,setKeyInput:yl,mintedKey:Cl,setMintedKey:Sl,setMintedPub:Ml,minting:Ll,copied:Tl,keyCountdown:Rl,handleUseExistingKey:zl,handleCreateKey:Nl,copyValue:El,queuedMessage:I,sendQueuedNow:$,setLightboxSrc:Dt,setMarkupSrc:pt,handleSend:Lr,handleSourceClick:uh,onRetry:Zn,onEdit:gl,onLongPress:hh,retrying:kl,continueGenerating:V,t:ze,spacerRef:rh,vizState:bt,setVizState:je,messages:E})}),!xt&&(0,Fe.jsx)("div",{className:le("hsk-cb-composer-wrapper",Jr&&"hsk-composer-exit-up",$e&&"hsk-composer-reveal"),children:(0,Fe.jsx)(Zc,{notice:N&&(0,Fe.jsxs)("div",{className:"hsk-cb-leave",role:"alertdialog",ref:A,children:[(0,Fe.jsx)("span",{children:ze("leaveHumanWarning")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn",onClick:()=>T(null),children:ze("leaveHumanStay")}),(0,Fe.jsx)("button",{type:"button",className:"hsk-cb-leave-btn hsk-cb-leave-btn--end",onClick:()=>{let g=N;T(null),g==="reset"?ro(!0):to(!0)},children:ze("leaveHumanConfirm")})]}),gooId:th,input:Ze,setInput:Be,showKikuPicker:St,setShowKikuPicker:Mt,showAtPicker:At,setShowAtPicker:Gt,captureAllowed:Qe,discussedSources:Ue,handleSelectExtension:mh,handleKikuCapture:Pl,handleKikuCaptureAll:_l,handleKikuViewHistory:Fl,handleKikuDelete:Dl,attachments:Yt,removeAttachment:vh,chromeLoading:!de,imageInputRef:tt,handleImageFiles:xh,enableVision:d&&!_e,enableVoice:h&&!_e,canConverse:Vl,startVoice:jl,inputLocked:be,voiceBlocked:Ol,textareaRef:xr,classNames:l,handleInput:gh,handleKeyDown:bh,voice:Yl,voicePhase:ds,activePlaceholder:Oa,loading:L,streaming:M,stop:Z,handleSend:Lr,voiceError:ja,setVoiceError:us,langSwitching:se||ee,t:ze,onOpenMimi:w?.getKikuKey?.()?Il:void 0})})]}),ea!=="converse"&&(0,Fe.jsx)(sl,{items:Sh,activeIdx:sh,progress:oh,onJump:ch,side:q?"left":"right"}),(0,Fe.jsxs)("div",{className:le("hsk-cb-kiku-id-rail",q?"hsk-cb-kiku-id-rail--right":"hsk-cb-kiku-id-rail--left",Vt&&!Rn&&"is-theme-open"),children:[(0,Fe.jsx)("div",{className:"hsk-cb-dock-frost","aria-hidden":"true"}),(0,Fe.jsx)(Ta,{}),(0,Fe.jsxs)("div",{className:le("hsk-cb-theme-squircle-wrap",Vt&&!Rn&&"is-open"),ref:ra,children:[(0,Fe.jsx)("div",{className:"hsk-cb-theme-2x2-grid",role:"dialog","aria-label":"Theme selector",ref:g=>{g&&(g.inert=!Vt||Rn)},children:ln.map(({id:g,label:H,Icon:we})=>(0,Fe.jsxs)("button",{type:"button",className:le("hsk-cb-theme-grid-item",(eh??nr)===g&&"is-active"),onClick:Ae=>{Ae.stopPropagation(),is(g,!0)},children:[(0,Fe.jsx)(we,{}),(0,Fe.jsx)("span",{children:H})]},g))}),(0,Fe.jsxs)("button",{type:"button",className:"hsk-cb-theme-squircle-trigger",onClick:()=>{if(Vt){na();return}Xa(nr),tn(!0)},"aria-label":"Themes","aria-expanded":Vt,children:[(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-icon",children:X.default.createElement(Mo(nr).Icon)}),(0,Fe.jsx)("span",{className:"hsk-cb-theme-trigger-label",children:Mo(nr).label})]})]}),!Tr&&Vt&&bs&&(0,Fe.jsx)(La,{closing:Rn}),Ts&&(0,Fe.jsxs)("div",{className:"hsk-cb-layout-dock-anchor",children:[(0,Fe.jsx)(Qo,{wide:aa.wide,onToggle:Za,emphasized:xs}),Ga!==null&&(0,Fe.jsx)(rs,{placement:"dock",onOpenDock:Za})]})]}),ea==="converse"&&(0,Fe.jsx)(al,{siteId:w?.api?.siteId??"",themeAttr:en,stopVoice:Gl,chooseVoice:Ul,liveVoiceName:Wl,voiceSecondsLeft:ql,voiceConnecting:Hl,voicePhase:ds,live:ms,earlier:Kl,newVoiceChat:Xl,voiceMuted:Bl,setVoiceMuted:$l,voiceError:ja,attachPhoto:Ql,onSelectSource:g=>{i?.(g),ms.ask(ze("cardClickQuery",{name:g.name,details:so(ar(g,b))}))},t:ze}),Mn&&(0,Fe.jsx)(cl,{msg:Mn.msg,rect:Mn.rect,anchorEl:Mn.el,containerEl:ta.current,scrollEl:Br.current,containerRect:ta.current?.getBoundingClientRect(),isUser:Mn.isUser,isRTL:q,canRetry:!L&&!M,onPin:Al,onRetry:Zn,onCopy:async g=>{if(!g)return!1;try{return await navigator.clipboard.writeText(g),!0}catch{}try{let H=document.createElement("textarea");H.value=g,H.setAttribute("readonly",""),H.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none",document.body.appendChild(H),H.select(),H.setSelectionRange(0,g.length);let we=document.execCommand("copy");return document.body.removeChild(H),we}catch{return!1}},onClose:()=>ps(null),t:ze})]})})})}var cr=require("react/jsx-runtime");function ul({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:p,classNames:d={},enableVoice:u=!1,voiceLang:f,ttsVoice:w,enableVision:b=!1}){let E=(0,dl.useAkropolysContext)(),[x,L]=(0,jt.useState)(!1),[M,C]=(0,jt.useState)(!1),[F,D]=(0,jt.useState)(null),[S,O]=(0,jt.useState)(0);(0,jt.useEffect)(()=>{if(x){O(0);return}let ne=!0;return E?.api?.unreadFromTeam?.().then(V=>{ne&&O(V)}).catch(()=>{}),()=>{ne=!1}},[x,E]);let v=(0,jt.useCallback)(()=>{co();try{Xs(E,E?.getShopperLanguage?.()??"",$t),E?.api?.widgetSettings?.().then(ne=>{ne?.detectedLanguage&&ne.detectedLanguage.toLowerCase()!=="english"&&ko(E,ne.detectedLanguage,$t)}).catch(()=>{})}catch{}},[E]),I=(0,jt.useRef)(null),$=(0,jt.useCallback)(()=>{let ne=I.current?.getBoundingClientRect();D(ne?{x:ne.left+ne.width/2,y:ne.top+ne.height/2}:null),L(!0),v();try{Er()}catch{}},[v]);(0,jt.useEffect)(()=>{if(C(!0),v(),typeof window<"u"&&!window.__akropolys_nav_patched){window.__akropolys_nav_patched=!0;let V=window.location.pathname,fe=window.history.pushState,Q=window.history.replaceState;window.history.pushState=function(..._){fe.apply(this,_),window.location.pathname!==V&&(V=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))},window.history.replaceState=function(..._){Q.apply(this,_),window.location.pathname!==V&&(V=window.location.pathname,window.dispatchEvent(new CustomEvent("akropolys:navigation")))}}let ne=()=>{L(!1)};return window.addEventListener("popstate",ne),window.addEventListener("akropolys:navigation",ne),()=>{window.removeEventListener("popstate",ne),window.removeEventListener("akropolys:navigation",ne)}},[v]);let P=(0,jt.useCallback)(()=>{L(!1),requestAnimationFrame(()=>I.current?.focus())},[]),{themeAttr:Z,vars:ve}=pa(p);return da(p),(0,cr.jsxs)(cr.Fragment,{children:[(0,cr.jsxs)("button",{ref:I,className:le("hsk-cb-btn",d.button,s),onClick:$,onPointerEnter:v,onPointerDown:v,style:ve,"data-hsk-theme":Z,"aria-label":"Open AI chat","aria-haspopup":"dialog","aria-expanded":x,children:[r!==void 0?r:(0,cr.jsxs)(cr.Fragment,{children:[t?(0,cr.jsx)("span",{className:"hsk-cb-btn-icon",style:{display:"flex",alignItems:"center"},children:t}):null,e]}),S>0&&(0,cr.jsx)("span",{className:"hsk-cb-btn-badge","aria-label":`${S} new replies`,children:S})]}),x&&M&&(0,pl.createPortal)((0,cr.jsx)(ns,{title:n,logo:a,placeholder:o,backdropColor:i,backdropBlur:c,origin:F,onClose:P,onSelectSource:l,chips:h??En,theme:p,classNames:d,enableVoice:u,voiceLang:f,enableVision:b,ttsVoice:w}),co()??document.body)]})}0&&(module.exports={KikuButton,SearchBar});
39
41
  //# sourceMappingURL=index.js.map