@gengage/assistant-fe 0.1.7 → 0.1.8
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/README.md +25 -20
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +1 -1
- package/dist/chat.iife.js.map +1 -1
- package/dist/chat.js +1 -1
- package/dist/common.cjs +1 -1
- package/dist/common.js +3 -3
- package/dist/{index-BelS6Vnv.cjs → index-BqIzV4ni.cjs} +2 -2
- package/dist/{index-BelS6Vnv.cjs.map → index-BqIzV4ni.cjs.map} +1 -1
- package/dist/{index-BH-V2lWn.js → index-CcOJTzYu.js} +2 -2
- package/dist/{index-BH-V2lWn.js.map → index-CcOJTzYu.js.map} +1 -1
- package/dist/{index-1yPxOqAw.cjs → index-DZ3Mi5xF.cjs} +2 -2
- package/dist/{index-1yPxOqAw.cjs.map → index-DZ3Mi5xF.cjs.map} +1 -1
- package/dist/{index-CERWfDdF.js → index-FnP8WtfG.js} +2 -2
- package/dist/{index-CERWfDdF.js.map → index-FnP8WtfG.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/native.cjs +1 -1
- package/dist/native.iife.js +1 -1
- package/dist/native.iife.js.map +1 -1
- package/dist/native.js +1 -1
- package/package.json +1 -1
package/dist/chat.iife.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<path d="M1 12V14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
56
56
|
<path d="M23 12V14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
|
57
57
|
</svg>`;function Ji(e){const t=document.createElement("div");t.className="gengage-chat-launcher-container";const n=document.createElement("div");n.className="gengage-chat-launcher-content-area",t.appendChild(n);const a=document.createElement("button");if(a.className="gengage-chat-launcher",a.type="button",a.setAttribute("aria-label",e.ariaLabel??"Open chat"),a.innerHTML=e.svgMarkup??Ki,e.tooltip!==void 0){const o=document.createElement("span");o.className="gengage-chat-launcher-tooltip",o.textContent=e.tooltip,a.appendChild(o)}e.hideMobile&&(t.dataset.hideMobile="1"),e.mobileBreakpoint!==void 0&&(t.dataset.mobileBreakpoint=String(e.mobileBreakpoint)),a.addEventListener("click",e.onClick),t.appendChild(a);const i=document.createElement("div");return i.className="gengage-chat-launcher-content-area-bottom",t.appendChild(i),{container:t,button:a,contentArea:n,contentAreaBottom:i}}function Yi(e){const t=document.createElement("div");t.className="gengage-chat-proactive";const n=document.createElement("p");n.className="gengage-chat-proactive-message",n.textContent=e.message,t.appendChild(n);const a=document.createElement("div");a.className="gengage-chat-proactive-actions";let i=null;function o(){i!==null&&clearTimeout(i),t.remove()}if(e.actionButtons&&e.actionButtons.length>0)for(const c of e.actionButtons){const l=document.createElement("button");l.className="gengage-chat-proactive-accept",l.type="button",l.textContent=c.title,l.addEventListener("click",()=>{o(),c.onSelect()}),a.appendChild(l)}else{const c=document.createElement("button");c.className="gengage-chat-proactive-accept",c.type="button",c.textContent=e.acceptLabel??"Sohbete Başla",c.addEventListener("click",()=>{o(),e.onAccept()}),a.appendChild(c)}const r=document.createElement("button");r.className="gengage-chat-proactive-dismiss",r.type="button",r.textContent="×",r.setAttribute("aria-label",e.closeAriaLabel??"Kapat"),r.addEventListener("click",()=>{o(),e.onDismiss()}),t.appendChild(r),t.appendChild(a);const s=e.autoDismissMs??15e3;return s>0&&(i=setTimeout(()=>{t.parentElement&&(t.remove(),e.onDismiss())},s)),requestAnimationFrame(()=>t.classList.add("gengage-chat-proactive--visible")),t}class Xi{constructor(t={}){this._idleTimer=null,this._maxScrollDepth=0,this._lastReportedDepth=0,this._listeners=[],this._destroyed=!1,this._idleThreshold=t.idleThresholdMs??3e4,this._scrollGranularity=t.scrollGranularity??25,this._onActivity=t.onActivity??null,this._setup()}_setup(){this._emit({type:"pageview",timestamp:Date.now()}),this._resetIdleTimer(),this._listen(window,"scroll",()=>this._onScroll(),{passive:!0}),this._listen(window,"mousemove",()=>this._resetIdleTimer(),{passive:!0}),this._listen(window,"keydown",()=>this._resetIdleTimer(),{passive:!0}),this._listen(window,"touchstart",()=>this._resetIdleTimer(),{passive:!0}),this._listen(document,"visibilitychange",()=>this._onVisibility())}_listen(t,n,a,i){t.addEventListener(n,a,i),this._listeners.push([t,n,a])}_resetIdleTimer(){this._idleTimer&&clearTimeout(this._idleTimer),this._idleTimer=setTimeout(()=>{this._emit({type:"idle",timestamp:Date.now()})},this._idleThreshold)}_onScroll(){const t=window.scrollY||document.documentElement.scrollTop,n=Math.max(document.documentElement.scrollHeight-window.innerHeight,1),a=Math.min(100,Math.round(t/n*100));a>this._maxScrollDepth&&(this._maxScrollDepth=a);const i=Math.floor(a/this._scrollGranularity)*this._scrollGranularity;i>this._lastReportedDepth&&(this._lastReportedDepth=i,this._emit({type:"scroll",timestamp:Date.now(),data:{depth:i}})),this._resetIdleTimer()}_onVisibility(){document.hidden?(this._emit({type:"blur",timestamp:Date.now()}),this._idleTimer&&clearTimeout(this._idleTimer)):(this._emit({type:"focus",timestamp:Date.now()}),this._resetIdleTimer())}_emit(t){this._destroyed||this._onActivity?.(t)}get maxScrollDepth(){return this._maxScrollDepth}destroy(){this._destroyed=!0,this._idleTimer&&clearTimeout(this._idleTimer);for(const[t,n,a]of this._listeners)t.removeEventListener(n,a);this._listeners=[]}}const Qi=new Set(["audio/ogg","audio/mpeg","audio/mp3","audio/wav","audio/webm","audio/aac","audio/mp4"]);function eo(e,t="audio/ogg"){const n=t.split(";")[0].trim();if(!Qi.has(n))return null;try{const a=new Audio(`data:${t};base64,${e}`);return a.play().catch(()=>{}),{stop:()=>{a.pause(),a.currentTime=0}}}catch{return null}}class to{constructor(t){this._timer=null,this._destroyed=!1,this._abortController=null,this._sessionStart=Date.now(),this._lastActivity=Date.now(),this._searchesCount=0,this._actionsCount=0,this._triggerFireCounts={},this._options=t;const n=Pt(t.middlewareUrl);this._endpoint=`${n}/v2/heartbeat`}start(){this._timer||this._destroyed||this._scheduleNext()}_scheduleNext(){this._destroyed||(this._timer=setTimeout(()=>{this._poll().finally(()=>this._scheduleNext())},this._options.intervalMs))}stop(){this._timer&&(clearTimeout(this._timer),this._timer=null)}recordAction(){this._actionsCount++,this._lastActivity=Date.now()}recordSearch(){this._searchesCount++,this._lastActivity=Date.now()}recordActivity(){this._lastActivity=Date.now()}destroy(){this._destroyed=!0,this._abortController?.abort(),this._abortController=null,this.stop()}async _poll(){if(this._destroyed)return;const t=Date.now(),n={account_id:this._options.accountId,thread_id:this._options.sessionId,output_language:this._options.locale.toUpperCase(),idle_seconds:(t-this._lastActivity)/1e3,page_type:this._options.getPageType(),current_sku:this._options.getCurrentSku(),cart_item_count:0,searches_count:this._searchesCount,actions_count:this._actionsCount,session_duration_seconds:(t-this._sessionStart)/1e3,trigger_fire_counts:{...this._triggerFireCounts}};this._abortController=new AbortController;try{const a=await fetch(this._endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:this._abortController.signal});if(this._destroyed||!a.ok)return;const i=await a.json();if(this._destroyed)return;i.action==="message"&&i.message&&(i.trigger_type&&(this._triggerFireCounts[i.trigger_type]=(this._triggerFireCounts[i.trigger_type]??0)+1),this._options.onMessage(i))}catch{}}}const no={currencySymbol:"TL",currencyPosition:"suffix",thousandsSeparator:".",decimalSeparator:",",alwaysShowDecimals:!1};function J(e,t){const n=Number(e);if(!Number.isFinite(n)||n<0)return e;const a={...no,...t},o=n%1!==0||a.alwaysShowDecimals?n.toFixed(2):n.toFixed(0),r=o.indexOf("."),s=r===-1?o:o.slice(0,r),c=r===-1?void 0:o.slice(r+1),l=s.replace(/\B(?=(\d{3})+(?!\d))/g,a.thousandsSeparator);let d;return c!==void 0?d=`${l}${a.decimalSeparator}${c}`:d=l,a.currencySymbol?a.currencyPosition==="prefix"?`${a.currencySymbol}${d}`:`${d} ${a.currencySymbol}`:d}const ao={screen_size:"Ekran Boyutu",weight:"Ağırlık",battery_capacity:"Batarya Kapasitesi",battery_life:"Batarya Ömrü",storage:"Depolama",memory:"Bellek",ram:"RAM",processor:"İşlemci",camera:"Kamera",resolution:"Çözünürlük",display_type:"Ekran Tipi",refresh_rate:"Yenileme Hızı",color:"Renk",material:"Malzeme",dimensions:"Boyutlar",warranty:"Garanti",connectivity:"Bağlantı",water_resistance:"Su Dayanıklılığı",operating_system:"İşletim Sistemi",brand:"Marka",model:"Model",price:"Fiyat",energy_class:"Enerji Sınıfı",noise_level:"Gürültü Seviyesi",capacity:"Kapasite",power:"Güç",voltage:"Voltaj",width:"Genişlik",height:"Yükseklik",depth:"Derinlik"};function io(e){return ao[e]??e.replace(/_/g," ").replace(/^\w/,t=>t.toUpperCase())}function oo(e){const{recommended:t,products:n,attributes:a,highlights:i,specialCases:o,onProductClick:r,i18n:s}=e,c=document.createElement("div");c.className="gengage-chat-comparison";const l=document.createElement("h3");if(l.className="gengage-chat-comparison-heading",l.textContent=s?.comparisonHeading??"KARŞILAŞTIRMA SONUÇLARI",c.appendChild(l),t){const d=document.createElement("div");d.className="gengage-chat-comparison-recommended";const u=document.createElement("div");u.className="gengage-chat-comparison-recommended-label",u.textContent=s?.recommendedChoiceLabel??"Önerilen Seçim",d.appendChild(u);const g=document.createElement("div");if(g.className="gengage-chat-comparison-recommended-body",t.imageUrl&&ce(t.imageUrl)){const v=document.createElement("img");v.src=t.imageUrl,v.alt=t.name,v.loading="lazy",v.addEventListener("error",()=>{v.style.display="none"},{once:!0}),g.appendChild(v)}const p=document.createElement("div");p.className="gengage-chat-comparison-recommended-info";const h=document.createElement("div");h.className="gengage-chat-comparison-recommended-title",h.textContent=t.name,p.appendChild(h);const _=document.createElement("div");if(_.className="gengage-chat-comparison-recommended-price",_.textContent=J(t.price,e.pricing),p.appendChild(_),g.appendChild(p),g.addEventListener("click",()=>{r(t.sku)}),g.style.cursor="pointer",d.appendChild(g),i.length>0){const v=document.createElement("div");v.className="gengage-chat-comparison-highlights";const E=document.createElement("div");E.className="gengage-chat-comparison-highlights-label",E.textContent=s?.highlightsLabel??"Öne Çıkan Özellikler",v.appendChild(E);const I=document.createElement("ul");for(const T of i){const y=document.createElement("li");y.textContent=T,I.appendChild(y)}v.appendChild(I),d.appendChild(v)}if(e.recommendedText){const v=document.createElement("div");v.className="gengage-chat-comparison-recommended-text",v.innerHTML=oe(e.recommendedText),d.appendChild(v)}c.appendChild(d)}if(e.keyDifferencesHtml){const d=document.createElement("div");d.className="gengage-chat-comparison-key-differences";const u=document.createElement("h4");u.textContent=s?.keyDifferencesLabel??"Temel Farklar",d.appendChild(u);const g=document.createElement("div");g.className="gengage-chat-comparison-key-differences-content",g.innerHTML=oe(ro(e.keyDifferencesHtml)),d.appendChild(g),c.appendChild(d)}if(o&&o.length>0){const d=document.createElement("details");d.className="gengage-chat-comparison-special";const u=document.createElement("summary");u.textContent=s?.specialCasesLabel??"Özel Durumlar İçin",d.appendChild(u);const g=document.createElement("ul");for(const p of o)so(g,p);g.childElementCount>0&&d.appendChild(g),c.appendChild(d)}if(n.length>0&&a.length>0){const d=document.createElement("table");d.className="gengage-chat-comparison-table";const u=document.createElement("thead"),g=document.createElement("tr"),p=document.createElement("th");g.appendChild(p);for(const _ of n){const v=document.createElement("th");if(_.sku===t?.sku&&(v.className="gengage-chat-comparison-selected"),_.imageUrl&&ce(_.imageUrl)){const T=document.createElement("img");T.src=_.imageUrl,T.alt=_.name,T.loading="lazy",T.addEventListener("error",()=>{T.style.display="none"},{once:!0}),v.appendChild(T)}const E=document.createElement("div");E.textContent=_.name,v.appendChild(E);const I=document.createElement("div");I.className="gengage-chat-comparison-table-price",I.textContent=J(_.price,e.pricing),v.appendChild(I),g.appendChild(v)}u.appendChild(g),d.appendChild(u);const h=document.createElement("tbody");for(const _ of a){const v=document.createElement("tr"),E=document.createElement("td");E.className="gengage-chat-comparison-label",E.textContent=io(_.label),v.appendChild(E);for(let I=0;I<_.values.length;I++){const T=document.createElement("td");n[I]?.sku===t?.sku&&(T.className="gengage-chat-comparison-selected"),T.textContent=_.values[I]??"",v.appendChild(T)}h.appendChild(v)}d.appendChild(h),c.appendChild(d)}if(e.productActions){const d=document.createElement("div");d.className="gengage-chat-comparison-product-actions";for(const u of n)if(e.productActions[u.sku]){const p=document.createElement("button");p.className="gengage-chat-comparison-view-btn",p.type="button",p.textContent=u.name,p.addEventListener("click",()=>r(u.sku)),d.appendChild(p)}d.childElementCount>0&&c.appendChild(d)}return c}function ro(e){const t=e.split(`
|
|
58
|
-
`).filter(n=>n.trim());return t.length<=1?e:"<ul>"+t.map(n=>`<li>${n.trim()}</li>`).join("")+"</ul>"}function so(e,t){const n=oe(t);if(!n)return;const a=document.createElement("template");a.innerHTML=n;const i=Array.from(a.content.querySelectorAll("li"));if(i.length>0){for(const r of i){const s=document.createElement("li");s.innerHTML=oe(r.innerHTML),e.appendChild(s)}return}const o=document.createElement("li");co(t)?o.innerHTML=n:o.textContent=t,e.appendChild(o)}function co(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function lo(e,t){const n=document.createElement("div");n.className="gengage-chat-review-highlights";const a=e.props?.reviews;if(!Array.isArray(a)||a.length===0){const g=document.createElement("div");return g.className="gengage-chat-review-empty",g.textContent=t?.emptyReviewsMessage??"Yorum özeti bulunamadı.",n.appendChild(g),n}const i=a.filter(g=>g!==null&&typeof g=="object"),o={all:i.length,positive:0,negative:0,neutral:0};for(const g of i)g.review_class==="positive"?o.positive++:g.review_class==="negative"?o.negative++:o.neutral++;const r=document.createElement("div");r.className="gengage-chat-review-tabs";const s=[{label:`Tümü (${o.all})`,filter:"all"}];o.positive>0&&s.push({label:`Olumlu (${o.positive})`,filter:"positive"}),o.negative>0&&s.push({label:`Olumsuz (${o.negative})`,filter:"negative"});let c="all";const l=document.createElement("div");l.className="gengage-chat-review-items";function d(){for(;l.firstChild;)l.removeChild(l.firstChild);const g=c==="all"?i:i.filter(p=>p.review_class===c);for(const p of g){const h=document.createElement("article");h.className="gengage-chat-review-item";const _=p.review_class;if((_==="positive"||_==="negative"||_==="neutral")&&(h.dataset.tone=_),typeof p.review_tag=="string"&&p.review_tag.length>0){const v=document.createElement("div");v.className="gengage-chat-review-tag",v.textContent=p.review_tag,h.appendChild(v)}if(typeof p.review_text=="string"&&p.review_text.length>0){const v=document.createElement("div");v.className="gengage-chat-review-text",v.textContent=p.review_text,h.appendChild(v)}if(p.review_rating!==void 0&&String(p.review_rating).length>0){const v=document.createElement("div");v.className="gengage-chat-review-rating",v.textContent=String(p.review_rating),h.appendChild(v)}l.appendChild(h)}}for(const g of s){const p=document.createElement("button");p.className="gengage-chat-review-tab",p.type="button",p.textContent=g.label,g.filter===c&&p.classList.add("gengage-chat-review-tab--active"),p.addEventListener("click",()=>{c=g.filter;for(const h of r.querySelectorAll(".gengage-chat-review-tab"))h.classList.toggle("gengage-chat-review-tab--active",h===p);d()}),r.appendChild(p)}n.appendChild(r);const u=new Map;for(const g of i)if(typeof g.review_tag=="string"&&g.review_tag.length>0){const p=u.get(g.review_tag);p?p.count++:u.set(g.review_tag,{count:1,sentiment:g.review_class??"neutral"})}if(u.size>0){const g=document.createElement("div");g.className="gengage-chat-review-pills";for(const[p,h]of u){const _=document.createElement("span");_.className="gengage-chat-review-pill",_.dataset.tone=h.sentiment;const v=document.createElement("span");v.className="gengage-chat-review-pill-icon",v.textContent=h.sentiment==="positive"?"✓":h.sentiment==="negative"?"✕":"●",_.appendChild(v);const E=document.createElement("span");if(E.textContent=p,_.appendChild(E),h.count>1){const I=document.createElement("span");I.className="gengage-chat-review-pill-count",I.textContent=String(h.count),_.appendChild(I)}g.appendChild(_)}n.appendChild(g)}return d(),n.appendChild(l),n}function Ye(e){return Number.isFinite(e)?Math.max(0,Math.min(5,e)):0}function Xe(e){return Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function Mt(e,t=!0){const n=Ye(e);if(t){const i=Math.floor(n),o=n-i>=.5?1:0,r=5-i-o;return"★".repeat(i)+(o?"½":"")+"☆".repeat(r)}const a=Math.round(n);return"★".repeat(a)+"☆".repeat(5-a)}function ve(e){e.addEventListener("error",()=>{e.style.display="none"},{once:!0})}function $t(e){const t=e.product.sku;if(typeof t=="string"&&t.length>0)return t;const n=e.action?.payload;return n&&typeof n=="object"&&"sku"in n&&typeof n.sku=="string"?n.sku:null}const go={winner:"roleWinner",best_value:"roleBestValue",best_alternative:"roleBestAlternative"};function Ot(e,t){if(!e||!t)return null;const n=go[e];return n?t[n]??e:e}function po(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-top-picks";const a=e.props?.suggestions??[];if(a.length===0)return n;const i=document.createElement("h3");i.className="gengage-chat-ai-top-picks-title",i.textContent=t.i18n?.aiTopPicksTitle??"Top Picks",n.appendChild(i);const o=document.createElement("div");o.className="gengage-chat-ai-top-picks-cards";for(let r=0;r<a.length;r++){const s=a[r],l=s.role==="winner"||r===0?uo(s,t):ho(s,t);o.appendChild(l)}return n.appendChild(o),n}function uo(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--winner";const a=document.createElement("span");a.className="gengage-chat-ai-toppick-badge",a.textContent=Ot(e.role,t.i18n)??t.i18n?.roleWinner??"TOP MATCH",n.appendChild(a);const i=e.product,o=i.discountPercent;if(typeof o=="number"&&o>0){const u=document.createElement("span");u.className="gengage-chat-ai-toppick-discount-badge",u.textContent=`%${Xe(o)}`,n.appendChild(u)}const r=i.imageUrl;if(r&&ce(r)){const u=document.createElement("img");u.className="gengage-chat-ai-toppick-img",V(u,"src",r),u.alt=i.name??"",ve(u),n.appendChild(u)}const s=document.createElement("div");s.className="gengage-chat-ai-toppick-body";const c=i.name;if(c){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-name",u.textContent=c,s.appendChild(u)}if(e.reason){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-reason",u.textContent=e.reason,s.appendChild(u)}if(e.labels&&e.labels.length>0&&s.appendChild(Bt(e.labels)),typeof e.expertQualityScore=="number"){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-score";const g=e.expertQualityScore<=5?5:10;u.textContent=`${e.expertQualityScore}/${g}`,s.appendChild(u)}if(e.reviewHighlight){const u=document.createElement("blockquote");u.className="gengage-chat-ai-toppick-review",u.textContent=e.reviewHighlight,s.appendChild(u)}const l=i.price,d=i.originalPrice;if(l){const u=document.createElement("div");if(u.className="gengage-chat-ai-toppick-price",d&&d!==l){const p=document.createElement("span");p.className="gengage-chat-ai-toppick-original-price",p.textContent=J(d,t.pricing),u.appendChild(p),u.appendChild(document.createTextNode(" "))}const g=document.createElement("span");g.textContent=J(l,t.pricing),u.appendChild(g),s.appendChild(u)}if(n.appendChild(s),e.action){const u=$t(e),g=i.url??"",p=document.createElement("div");p.className="gengage-chat-ai-toppick-spinner",p.style.display=u&&t.topPicksLoadingSku===u?"":"none",n.appendChild(p);const h=document.createElement("button");h.className="gengage-chat-ai-toppick-cta",h.type="button",h.textContent=t.i18n?.viewDetails??"View Details",h.addEventListener("click",()=>{if(e.action?.type==="findSimilar"&&u&&t.onProductClick){t.onProductClick({sku:u,url:g});return}t.onAction(e.action)}),n.appendChild(h)}return n}function ho(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--compact";const a=e.product,i=a.discountPercent;if(typeof i=="number"&&i>0){const d=document.createElement("span");d.className="gengage-chat-ai-toppick-discount-badge",d.textContent=`%${Xe(i)}`,n.appendChild(d)}const o=a.imageUrl;if(o&&ce(o)){const d=document.createElement("img");d.className="gengage-chat-ai-toppick-img",V(d,"src",o),d.alt=a.name??"",ve(d),n.appendChild(d)}const r=document.createElement("div");r.className="gengage-chat-ai-toppick-body";const s=Ot(e.role,t.i18n);if(s){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-role",d.textContent=s,r.appendChild(d)}const c=a.name;if(c){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-name",d.textContent=c,r.appendChild(d)}if(e.reason){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-reason",d.textContent=e.reason,r.appendChild(d)}e.labels&&e.labels.length>0&&r.appendChild(Bt(e.labels));const l=a.price;if(l){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-price",d.textContent=J(l,t.pricing),r.appendChild(d)}if(n.appendChild(r),e.action){const d=$t(e),u=a.url??"",g=document.createElement("div");g.className="gengage-chat-ai-toppick-spinner",g.style.display=d&&t.topPicksLoadingSku===d?"":"none",n.appendChild(g);const p=document.createElement("button");p.className="gengage-chat-ai-toppick-cta",p.type="button",p.textContent=t.i18n?.viewDetails??"View Details",p.addEventListener("click",()=>{if(e.action?.type==="findSimilar"&&d&&t.onProductClick){t.onProductClick({sku:d,url:u});return}t.onAction(e.action)}),n.appendChild(p)}return n}function Bt(e){const t=document.createElement("div");t.className="gengage-chat-ai-toppick-labels";for(const n of e){const a=document.createElement("span");a.className="gengage-chat-ai-toppick-label",a.dataset.sentiment=n.sentiment??"neutral",a.textContent=n.label,t.appendChild(a)}return t}function fo(e,t){const n=document.createElement("div");n.className="gengage-chat-grounding-review";const a=e.props??{},i=a.title,o=a.reviewCount,r=a.action,s=t.i18n?.groundingReviewCta??"Yorumları Oku",c=document.createElement("span");c.className="gengage-chat-grounding-review-icon",c.textContent="📋",n.appendChild(c);const l=document.createElement("div");l.className="gengage-chat-grounding-review-body";const d=document.createElement("div");if(d.className="gengage-chat-grounding-review-title",d.textContent=i??"Müşteri Yorumları",l.appendChild(d),o){const g=document.createElement("div");g.className="gengage-chat-grounding-review-subtitle";const p=t.i18n?.groundingReviewSubtitle??"{count} yorum mevcut";g.textContent=p.replace("{count}",o),l.appendChild(g)}n.appendChild(l);const u=document.createElement("span");return u.className="gengage-chat-grounding-review-cta",u.textContent=`${s} →`,n.appendChild(u),r&&(n.style.cursor="pointer",n.addEventListener("click",()=>t.onAction(r))),n}function mo(e){if(e.action.type!=="findSimilar")return e.action;const t=e.action.payload&&typeof e.action.payload=="object"?e.action.payload:null,n=typeof t?.input=="string"&&t.input.trim()||typeof t?.text=="string"&&t.text.trim()||e.name.trim();if(!n)return e.action;const a={text:n,is_suggested_text:1};if(typeof t?.sku=="string"&&t.sku.trim()&&(a.sku=t.sku),Array.isArray(t?.group_skus)){const i=t.group_skus.filter(o=>typeof o=="string"&&o.length>0);i.length>0&&(a.group_skus=i)}return{title:e.action.title,type:"inputText",payload:a}}function bo(e,t){const n=document.createElement("div");n.className="gengage-chat-grouping-cards";const a=e.props?.entries??[];if(a.length===0)return n;for(const i of a){const o=document.createElement("div");if(o.className="gengage-chat-grouping-card",o.style.cursor="pointer",o.addEventListener("click",()=>t.onAction(mo(i))),i.image&&ce(i.image)){const l=document.createElement("img");l.className="gengage-chat-grouping-card-img",l.src=i.image,l.alt=i.name,l.width=20,l.height=20,o.appendChild(l)}const r=document.createElement("div");r.className="gengage-chat-grouping-card-body";const s=document.createElement("span");if(s.className="gengage-chat-grouping-card-name",s.textContent=i.name,r.appendChild(s),i.description){const l=document.createElement("span");l.className="gengage-chat-grouping-card-desc",l.textContent=i.description,r.appendChild(l)}if(i.labels&&i.labels.length>0){const l=document.createElement("span");l.className="gengage-chat-grouping-card-labels",l.textContent=i.labels.slice(0,3).join(" · "),r.appendChild(l)}o.appendChild(r);const c=document.createElement("span");c.className="gengage-chat-grouping-card-arrow",c.textContent="↳",o.insertBefore(c,o.firstChild),n.appendChild(o)}return n}function _o(e,t){const n=document.createElement("div");n.className="gengage-chat-suggested-search-cards";const a=e.props?.entries??[];if(a.length===0)return n;for(const i of a){const o=document.createElement("div");if(o.className="gengage-chat-suggested-search-card",o.style.cursor="pointer",o.addEventListener("click",()=>t.onAction(i.action)),i.image&&ce(i.image)){const c=document.createElement("img");c.className="gengage-chat-suggested-search-card-img",c.src=i.image,c.alt=i.shortName,c.width=40,c.height=40,o.appendChild(c)}const r=document.createElement("div");r.className="gengage-chat-suggested-search-card-body";const s=document.createElement("div");if(s.className="gengage-chat-suggested-search-card-name",s.textContent=i.shortName,r.appendChild(s),i.detailedMessage){const c=document.createElement("div");c.className="gengage-chat-suggested-search-card-desc",c.textContent=i.detailedMessage,r.appendChild(c)}if(i.whyDifferent){const c=document.createElement("div");c.className="gengage-chat-suggested-search-card-diff",c.textContent=i.whyDifferent,r.appendChild(c)}o.appendChild(r),n.appendChild(o)}return n}function vo(e,t){const n=document.createElement("button");n.className="gengage-chat-comparison-floating-btn",n.type="button";const a=t.i18n?.compareSelected??"Karşılaştır";return n.textContent=`${a} (${e.length})`,n.addEventListener("click",()=>{t.onAction({title:a,type:"getComparisonTable",payload:{sku_list:[...e]}})}),n}function yo(e){const t=document.createElement("div");t.className="gengage-chat-pros-cons";const n=e.props?.productName;if(n){const o=document.createElement("h4");o.className="gengage-chat-pros-cons-heading",o.textContent=n,t.appendChild(o)}const a=e.props?.pros,i=e.props?.cons;if(a&&a.length>0){const o=document.createElement("ul");o.className="gengage-chat-pros-cons-list";for(const r of a){const s=document.createElement("li");s.className="gengage-chat-pros-cons-item";const c=document.createElement("span");c.className="gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--pro",c.textContent="✓",s.appendChild(c);const l=document.createElement("span");l.textContent=r,s.appendChild(l),o.appendChild(s)}t.appendChild(o)}if(i&&i.length>0){const o=document.createElement("ul");o.className="gengage-chat-pros-cons-list";for(const r of i){const s=document.createElement("li");s.className="gengage-chat-pros-cons-item";const c=document.createElement("span");c.className="gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--con",c.textContent="✗",s.appendChild(c);const l=document.createElement("span");l.textContent=r,s.appendChild(l),o.appendChild(s)}t.appendChild(o)}return t}function wo(e,t){const n=e.props?.groups??[],a=e.props?.filterTags??[],i=document.createElement("div");if(i.className="gengage-chat-categories",n.length===0)return i;const o=document.createElement("div");o.className="gengage-chat-categories-tabs",o.setAttribute("role","tablist");const r=[],s=[],c=l=>{for(let d=0;d<r.length;d++){const u=d===l;r[d].classList.toggle("gengage-chat-categories-tab--active",u),r[d].setAttribute("aria-selected",String(u)),r[d].tabIndex=u?0:-1,s[d].style.display=u?"":"none"}};for(let l=0;l<n.length;l++){const d=n[l],u=`gengage-cat-tab-${l}`,g=`gengage-cat-panel-${l}`,p=document.createElement("button");p.className="gengage-chat-categories-tab",p.type="button",p.id=u,p.setAttribute("role","tab"),p.setAttribute("aria-controls",g),p.setAttribute("aria-selected",String(l===0)),p.tabIndex=l===0?0:-1,l===0&&p.classList.add("gengage-chat-categories-tab--active"),p.textContent=d.groupName,p.addEventListener("click",()=>c(l)),p.addEventListener("keydown",_=>{let v=-1;_.key==="ArrowRight"||_.key==="ArrowDown"?v=(l+1)%n.length:_.key==="ArrowLeft"||_.key==="ArrowUp"?v=(l-1+n.length)%n.length:_.key==="Home"?v=0:_.key==="End"&&(v=n.length-1),v>=0&&(_.preventDefault(),c(v),r[v].focus())}),r.push(p),o.appendChild(p);const h=document.createElement("div");h.className="gengage-chat-categories-grid",h.id=g,h.setAttribute("role","tabpanel"),h.setAttribute("aria-labelledby",u),l!==0&&(h.style.display="none");for(const _ of d.products){const v=xo(_,t);h.appendChild(v)}s.push(h)}i.appendChild(o);for(const l of s)i.appendChild(l);if(a.length>0){const l=document.createElement("div");l.className="gengage-chat-categories-filter-tags";for(const d of a){const u=document.createElement("button");u.className="gengage-chat-categories-filter-tag",u.type="button",u.textContent=d.title,d.action&&u.addEventListener("click",()=>{t.onAction(d.action)}),l.appendChild(u)}i.appendChild(l)}return i}function xo(e,t){const n=document.createElement("div");if(n.className="gengage-chat-product-card",e.imageUrl&&ce(e.imageUrl)){const o=document.createElement("img");o.className="gengage-chat-product-card-img",o.src=e.imageUrl,o.alt=e.name,n.appendChild(o)}const a=document.createElement("div");a.className="gengage-chat-product-card-body";const i=document.createElement("div");if(i.className="gengage-chat-product-card-name",i.textContent=e.name,a.appendChild(i),e.price){const o=document.createElement("div");o.className="gengage-chat-product-card-price",o.textContent=e.price,a.appendChild(o)}return n.appendChild(a),t.onProductSelect&&(n.style.cursor="pointer",n.addEventListener("click",()=>{t.onProductSelect?.(e)})),n}function ko(e,t){const n=document.createElement("div");n.className="gengage-chat-handoff-notice",n.setAttribute("role","alert");const a=document.createElement("span");a.className="gengage-chat-handoff-notice-icon",a.textContent="👤",a.setAttribute("aria-hidden","true"),n.appendChild(a);const i=document.createElement("h4");i.className="gengage-chat-handoff-notice-heading",i.textContent=t.i18n?.handoffHeading??"Transferring to a support agent",n.appendChild(i);const o=e.props?.summary;if(o){const r=document.createElement("p");r.className="gengage-chat-handoff-notice-summary",r.textContent=o,n.appendChild(r)}return n}function Co(e,t){const n=e.props?.product??e.props,a=document.createElement("div");if(a.className="gengage-chat-product-summary",!n)return a;a.style.cursor="pointer",a.addEventListener("click",p=>{p.target.closest("a")||t.onProductSelect?.(n)});const i=n.imageUrl;if(i&&ie(i)){const p=document.createElement("div");p.className="gengage-chat-product-summary__image";const h=document.createElement("img");V(h,"src",i);const _=n.name;_&&(h.alt=_),ve(h),p.appendChild(h),a.appendChild(p)}const o=document.createElement("div");o.className="gengage-chat-product-summary__content";const r=n.brand,s=n.name;if(s){const p=document.createElement("div");p.className="gengage-chat-product-summary__name";const h=r&&!s.toLowerCase().startsWith(r.toLowerCase());p.textContent=h?`${r} ${s}`:s,o.appendChild(p)}const c=n.rating,l=n.reviewCount;if(typeof c=="number"&&Number.isFinite(c)&&c>0){const p=document.createElement("div");if(p.className="gengage-chat-product-summary__rating",p.textContent=Mt(Ye(c)),typeof l=="number"&&Number.isFinite(l)){const h=document.createElement("span");h.className="gengage-chat-product-summary__review-count",h.textContent=` (${l})`,p.appendChild(h)}o.appendChild(p)}const d=n.price,u=n.originalPrice;if(d){const p=document.createElement("div");if(p.className="gengage-chat-product-summary__price",u&&u!==d){const _=document.createElement("span");_.className="gengage-chat-product-summary__price-original",_.textContent=J(u,t.pricing),p.appendChild(_),p.appendChild(document.createTextNode(" "))}const h=document.createElement("span");h.className="gengage-chat-product-summary__price-current",h.textContent=J(d,t.pricing),p.appendChild(h),o.appendChild(p)}a.appendChild(o);const g=n.url;if(g&&ie(g)){const p=document.createElement("a");p.className="gengage-chat-product-summary__cta",V(p,"href",g),V(p,"target","_blank"),V(p,"rel","noopener noreferrer"),p.textContent=t.i18n?.productCtaLabel??"İncele",a.appendChild(p)}return a}function Dt(e){const t=e.min??1,n=e.max??99,a=Math.min(t,n),i=Math.max(t,n),o=Math.max(a,Math.min(i,e.initial??a)),r=e.compact??!1;let s=o;const c=document.createElement("div");c.className=`gengage-qty-stepper${r?" gengage-qty-stepper--compact":""}`;const l=document.createElement("button");l.className="gengage-qty-btn",l.type="button",l.textContent=e.decreaseSymbol??"−",l.setAttribute("aria-label",e.decreaseLabel??"Azalt");const d=document.createElement("span");d.className="gengage-qty-value",d.textContent=String(s),d.setAttribute("aria-live","polite"),d.setAttribute("aria-atomic","true");const u=document.createElement("button");u.className="gengage-qty-btn",u.type="button",u.textContent=e.increaseSymbol??"+",u.setAttribute("aria-label",e.increaseLabel??"Artır");const g=document.createElement("button");g.className="gengage-qty-submit",g.type="button",r?(g.textContent=e.submitIcon??"🛒",g.title=e.label??"Sepete Ekle"):g.textContent=e.label??"Sepete Ekle";function p(){l.disabled=s<=a,u.disabled=s>=i}return l.addEventListener("click",h=>{h.stopPropagation(),s>a&&(s--,d.textContent=String(s),p())}),u.addEventListener("click",h=>{h.stopPropagation(),s<i&&(s++,d.textContent=String(s),p())}),g.addEventListener("click",h=>{h.stopPropagation(),e.onSubmit(s)}),c.addEventListener("click",h=>{h.stopPropagation()}),p(),c.appendChild(l),c.appendChild(d),c.appendChild(u),c.appendChild(g),c}function Rt(){return window.innerWidth<768}const Ut={ActionButtons:({element:e,context:t})=>Eo(e,t),ActionButton:({element:e,context:t})=>So(e,t),ProductCard:({element:e,context:t})=>To(e,t),ProductDetailsPanel:({element:e,context:t})=>Io(e,t),ProductGrid:({element:e,spec:t,renderElement:n,context:a})=>Ao(e,t,n,a),ReviewHighlights:({element:e,context:t})=>lo(e,{emptyReviewsMessage:t.i18n?.emptyReviewsMessage}),ComparisonTable:({element:e,context:t})=>No(e,t),AITopPicks:({element:e,context:t})=>po(e,t),GroundingReviewCard:({element:e,context:t})=>fo(e,t),AIGroupingCards:({element:e,context:t})=>bo(e,t),AISuggestedSearchCards:({element:e,context:t})=>_o(e,t),ProsAndCons:({element:e})=>yo(e),CategoriesContainer:({element:e,context:t})=>wo(e,t),HandoffNotice:({element:e,context:t})=>ko(e,t),ProductSummaryCard:({element:e,context:t})=>Co(e,t),Divider:({element:e})=>Lo(e)},Qe=({element:e,renderElement:t})=>{if(!e.children||e.children.length===0)return null;const n=document.createElement("div");for(const a of e.children){const i=t(a);i&&n.appendChild(i)}return n};function Zt(){return{...Ut}}function jt(e,t,n=Ut,a=Qe){return ta({spec:e,context:t,registry:n,containerClassName:"gengage-chat-uispec",unknownRenderer:a})}function Eo(e,t){const n=document.createElement("div");n.className="gengage-chat-action-buttons";const a=e.props?.buttons;if(a)for(const i of a){const o=document.createElement("button");o.className="gengage-chat-action-btn",o.textContent=i.label,o.addEventListener("click",()=>t.onAction(i.action)),n.appendChild(o)}return n}function So(e,t){const n=document.createElement("button");n.className="gengage-chat-action-btn";const a=e.props?.label;typeof a=="string"&&(n.textContent=a);const i=e.props?.action;return i&&n.addEventListener("click",()=>t.onAction(i)),n}function To(e,t){const n=document.createElement("div");n.className="gengage-chat-product-card";const a=e.props?.product??e.props;if(!a)return n;const i=a.sku;i&&(n.dataset.sku=i),t.onProductSelect&&(n.style.cursor="pointer",n.addEventListener("click",y=>{y.target.closest(".gengage-chat-product-card-atc")||y.target.closest(".gengage-chat-product-card-cta")||t.onProductSelect?.(a)}));const o=a.imageUrl;if(o&&ie(o)){const y=document.createElement("div");y.className="gengage-chat-product-card-img-wrapper";const f=document.createElement("img");f.className="gengage-chat-product-card-img",f.loading="lazy",V(f,"src",o);const P=a.name;P&&(f.alt=P),ve(f),y.appendChild(f);const A=a.discountPercent;if(typeof A=="number"&&A>0){const C=document.createElement("span");C.className="gengage-chat-product-card-discount-badge",C.textContent=`%${Xe(A)}`,y.appendChild(C)}const b=a.sku;if(b){const C=document.createElement("button");C.className="gengage-chat-find-similar-pill",C.type="button",C.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",C.addEventListener("click",w=>{w.stopPropagation(),t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:b,...o?{image_url:o}:{}}})}),y.appendChild(C)}const x=a.sku;if(x&&t.onFavoriteToggle){const C=document.createElement("button");C.className="gengage-chat-favorite-btn",C.type="button",C.setAttribute("aria-label","Favorilere ekle");const w=t.favoritedSkus?.has(x)??!1;w&&C.classList.add("gengage-chat-favorite-btn--active");const M=w?"currentColor":"none";C.innerHTML=`<svg width="16" height="16" viewBox="0 0 24 24" fill="${M}" stroke="currentColor" stroke-width="2"><path 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"/></svg>`,C.addEventListener("click",z=>{z.stopPropagation(),C.classList.toggle("gengage-chat-favorite-btn--active");const N=C.querySelector("svg");N&&N.setAttribute("fill",C.classList.contains("gengage-chat-favorite-btn--active")?"currentColor":"none"),t.onFavoriteToggle(x,a)}),y.appendChild(C)}n.appendChild(y)}const r=document.createElement("div");r.className="gengage-chat-product-card-body";const s=a.brand;if(s){const y=document.createElement("div");y.className="gengage-chat-product-card-brand",y.textContent=s,r.appendChild(y)}const c=a.name;if(c){const y=document.createElement("div");y.className="gengage-chat-product-card-name",y.textContent=c,r.appendChild(y)}const l=a.rating,d=a.reviewCount;if(typeof l=="number"&&Number.isFinite(l)){const y=document.createElement("div");if(y.className="gengage-chat-product-card-rating",y.textContent=Mt(l),typeof d=="number"&&Number.isFinite(d)){const f=document.createElement("span");f.className="gengage-chat-product-card-review-count",f.textContent=` (${d})`,y.appendChild(f)}r.appendChild(y)}const u=a.price,g=a.originalPrice;if(a.price_async===!0){const y=document.createElement("div");y.className="gengage-chat-product-card-price";const f=document.createElement("span");f.className="gengage-chat-price-skeleton",y.appendChild(f),r.appendChild(y),setTimeout(()=>{f.parentElement&&(u?f.replaceWith(document.createTextNode(J(u,t.pricing))):f.remove())},300)}else if(u){const y=document.createElement("div");if(y.className="gengage-chat-product-card-price",g&&g!==u){const P=document.createElement("span");P.className="gengage-chat-product-card-original-price",P.textContent=J(g,t.pricing),y.appendChild(P),y.appendChild(document.createTextNode(" "))}const f=document.createElement("span");f.textContent=J(u,t.pricing),y.appendChild(f),r.appendChild(y)}const h=a.inStock;if(typeof h=="boolean"){const y=document.createElement("div");y.className=`gengage-chat-product-card-stock ${h?"is-in-stock":"is-out-of-stock"}`,y.textContent=h?t.i18n?.inStockLabel??"Stokta":t.i18n?.outOfStockLabel??"Tükendi",r.appendChild(y)}const _=a.promotions;if(_&&_.length>0){const y=document.createElement("div");y.className="gengage-chat-product-card-promos";for(const f of _){const P=document.createElement("span");P.className="gengage-chat-product-card-promo-badge",P.textContent=f,y.appendChild(P)}r.appendChild(y)}n.appendChild(r);const v=a.url,E=a.sku,I=e.props?.action;if(I){const y=document.createElement("button");y.className="gengage-chat-product-card-cta",y.type="button",y.textContent=I.title||t.i18n?.productCtaLabel||"Incele",y.addEventListener("click",()=>t.onAction(I)),n.appendChild(y)}else if(v&&ie(v)){const y=document.createElement("a");y.className="gengage-chat-product-card-cta",V(y,"href",v),V(y,"target","_blank"),V(y,"rel","noopener noreferrer"),y.textContent=t.i18n?.productCtaLabel??"İncele",y.addEventListener("click",f=>{t.onProductClick&&E&&(f.preventDefault(),t.onProductClick({sku:E,url:v}))}),n.appendChild(y)}const T=a.cartCode;if(T&&E&&h!==!1){const y=Dt({compact:!0,label:t.i18n?.addToCartButton??"Sepete Ekle",onSubmit:f=>{t.onAction({title:t.i18n?.addToCartButton??"Sepete Ekle",type:"addToCart",payload:{sku:E,cartCode:T,quantity:f}})}});y.classList.add("gengage-chat-product-card-atc"),n.appendChild(y)}if(t.comparisonSelectMode&&E&&t.onToggleComparisonSku){const y=document.createElement("div");y.className="gengage-chat-comparison-select-wrapper";const f=document.createElement("input");return f.type="checkbox",f.className="gengage-chat-comparison-checkbox",f.checked=t.comparisonSelectedSkus?.includes(E)??!1,f.addEventListener("change",()=>{t.onToggleComparisonSku?.(E)}),y.appendChild(f),y.appendChild(n),y}return n}function Io(e,t){const n=document.createElement("article");n.className="gengage-chat-product-details-panel";const a=e.props?.product??e.props;if(!a)return n;const i=a.images,o=a.imageUrl,r=a.sku;if(i&&i.length>1){const b=document.createElement("div");b.className="gengage-chat-product-details-media gengage-chat-product-details-gallery gengage-chat-product-details-img-wrap";const x=document.createElement("img");x.className="gengage-chat-product-details-img";const C=i.find(B=>ie(B));C&&V(x,"src",C);const w=a.name;w&&(x.alt=w),ve(x),b.appendChild(x);const M=document.createElement("div");M.className="gengage-chat-product-gallery-thumbs";let z=null,N=0;for(let B=0;B<i.length;B++){const Q=i[B];if(!Q||!ie(Q))continue;const K=document.createElement("img");K.className="gengage-chat-product-gallery-thumb",B===0&&(K.classList.add("gengage-chat-product-gallery-thumb--active"),z=K),V(K,"src",Q),K.alt=`${w??"Product"} ${B+1}`,K.width=48,K.height=48,ve(K),K.addEventListener("click",()=>{V(x,"src",Q),z&&z.classList.remove("gengage-chat-product-gallery-thumb--active"),K.classList.add("gengage-chat-product-gallery-thumb--active"),z=K,N=B}),M.appendChild(K)}let O=0;const L=50;if(x.addEventListener("touchstart",B=>{O=B.changedTouches[0].clientX},{passive:!0}),x.addEventListener("touchend",B=>{const Q=B.changedTouches[0].clientX,K=O-Q;if(Math.abs(K)<L)return;const ft=M.querySelectorAll(".gengage-chat-product-gallery-thumb"),mt=K>0?Math.min(N+1,ft.length-1):Math.max(N-1,0);mt!==N&&ft[mt]&&ft[mt].click()}),b.appendChild(M),r){const B=document.createElement("button");B.className="gengage-chat-find-similar-pill",B.type="button",B.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",B.addEventListener("click",()=>{t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:r,...C?{image_url:C}:{}}})}),b.appendChild(B)}n.appendChild(b)}else if(o&&ie(o)){const b=document.createElement("div");b.className="gengage-chat-product-details-media gengage-chat-product-details-img-wrap";const x=document.createElement("img");x.className="gengage-chat-product-details-img",x.loading="lazy",V(x,"src",o),ve(x);const C=a.name;if(C&&(x.alt=C),b.appendChild(x),r){const w=document.createElement("button");w.className="gengage-chat-find-similar-pill",w.type="button",w.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",w.addEventListener("click",()=>{t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:r,...o?{image_url:o}:{}}})}),b.appendChild(w)}n.appendChild(b)}const s=document.createElement("div");s.className="gengage-chat-product-details-content";const c=a.name;if(c){const b=document.createElement("h3");b.className="gengage-chat-product-details-title",b.textContent=c,s.appendChild(b)}const l=a.rating,d=a.reviewCount;if(typeof l=="number"&&Number.isFinite(l)){const b=document.createElement("div");if(b.className="gengage-chat-product-details-rating",b.textContent=`★ ${Ye(l).toFixed(1)}`,typeof d=="number"&&Number.isFinite(d)){const x=document.createElement("span");x.className="gengage-chat-product-details-review-count",x.textContent=` (${d})`,b.appendChild(x)}s.appendChild(b)}const u=a.price,g=a.originalPrice;if(a.price_async===!0){const b=document.createElement("div");b.className="gengage-chat-product-details-price";const x=document.createElement("span");x.className="gengage-chat-price-skeleton",b.appendChild(x),s.appendChild(b),setTimeout(()=>{if(x.parentElement)if(u){const C=document.createElement("span");C.className="gengage-chat-product-details-current-price",C.textContent=J(u,t.pricing),x.replaceWith(C)}else x.remove()},300)}else if(u){const b=document.createElement("div");if(b.className="gengage-chat-product-details-price",g&&g!==u){const C=document.createElement("span");C.className="gengage-chat-product-details-original-price",C.textContent=J(g,t.pricing),b.appendChild(C),b.appendChild(document.createTextNode(" "))}const x=document.createElement("span");x.className="gengage-chat-product-details-current-price",x.textContent=J(u,t.pricing),b.appendChild(x),s.appendChild(b)}const h=a.inStock;if(typeof h=="boolean"){const b=document.createElement("div");b.className=`gengage-chat-product-details-stock ${h?"is-in-stock":"is-out-of-stock"}`,b.textContent=h?"Stokta var":"Stokta yok",s.appendChild(b)}const _=a.promotions;if(_&&_.length>0){const b=document.createElement("div");b.className="gengage-chat-product-details-promos";for(const x of _){const C=document.createElement("span");C.className="gengage-chat-product-details-promo-badge",C.textContent=x,b.appendChild(C)}s.appendChild(b)}const v=a.variants;if(v&&v.length>0){const b=document.createElement("div");b.className="gengage-chat-product-variants";const x=document.createElement("div");x.className="gengage-chat-product-variants-label",x.textContent=t.i18n?.variantsLabel??"Varyantlar",b.appendChild(x);const C=document.createElement("div");C.className="gengage-chat-product-variants-list";for(const w of v){const M=w.name??w.variant_name,z=w.sku;if(!M&&!z)continue;const N=document.createElement("button");N.className="gengage-chat-product-variant-btn",N.type="button";const O=M??z??"",L=w.price;L&&String(L)!==String(u)?N.textContent=`${O} - ${J(String(L),t.pricing)}`:N.textContent=O,z&&N.addEventListener("click",()=>{t.onAction({title:O,type:"launchVariant",payload:{sku:z}})}),C.appendChild(N)}b.appendChild(C),s.appendChild(b)}const E=a.sku,I=a.cartCode,T=document.createElement("div");T.className="gengage-chat-product-details-actions";const y=e.props?.action;if(y){const b=document.createElement("button");b.className="gengage-chat-product-details-cta",b.type="button",b.textContent=y.title||t.i18n?.productCtaLabel||"Incele",b.addEventListener("click",()=>t.onAction(y)),T.appendChild(b)}else{const b=a.url;if(b&&ie(b)){const x=document.createElement("a");x.className="gengage-chat-product-details-cta",V(x,"href",b),V(x,"target","_blank"),V(x,"rel","noopener noreferrer"),x.textContent=t.i18n?.productCtaLabel??"Incele",x.addEventListener("click",C=>{t.onProductClick&&E&&(C.preventDefault(),t.onProductClick({sku:E,url:b}))}),T.appendChild(x)}}if(I&&E&&h!==!1){const b=Dt({compact:!1,label:t.i18n?.addToCartButton??"Sepete Ekle",onSubmit:x=>{t.onAction({title:t.i18n?.addToCartButton??"Sepete Ekle",type:"addToCart",payload:{sku:E,cartCode:I,quantity:x}})}});b.classList.add("gengage-chat-product-details-atc-stepper"),T.appendChild(b)}const f=a.url;if(f&&ie(f)){let b=function(N,O){const L=document.createElementNS(M,"circle");L.setAttribute("cx",N),L.setAttribute("cy",O),L.setAttribute("r","3"),z.appendChild(L)},x=function(N,O,L,B){const Q=document.createElementNS(M,"line");Q.setAttribute("x1",N),Q.setAttribute("y1",O),Q.setAttribute("x2",L),Q.setAttribute("y2",B),z.appendChild(Q)};const C=document.createElement("button");C.className="gengage-chat-product-details-share",C.type="button";const w=t.i18n?.shareButton??"Paylaş";C.title=w,C.setAttribute("aria-label",w);const M="http://www.w3.org/2000/svg",z=document.createElementNS(M,"svg");z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("viewBox","0 0 24 24"),z.setAttribute("fill","none"),z.setAttribute("stroke","currentColor"),z.setAttribute("stroke-width","2"),z.setAttribute("stroke-linecap","round"),z.setAttribute("stroke-linejoin","round"),b("18","5"),b("6","12"),b("18","19"),x("8.59","13.51","15.42","17.49"),x("15.41","6.51","8.59","10.49"),C.appendChild(z),C.addEventListener("click",async()=>{const N=a.name;try{navigator.share?await navigator.share({title:N??"",url:f}):navigator.clipboard&&(await navigator.clipboard.writeText(f),C.classList.add("gengage-chat-product-details-share--copied"),setTimeout(()=>C.classList.remove("gengage-chat-product-details-share--copied"),1500))}catch{}}),T.appendChild(C)}T.childElementCount>0&&s.appendChild(T),n.appendChild(s);const P=a.description,A=a.specifications;return(P||A)&&n.appendChild(zo(P,A,t)),n}function zo(e,t,n){const a=document.createElement("div");a.className="gengage-chat-product-detail-tabs";const i=document.createElement("div");i.className="gengage-chat-product-detail-tab-bar";const o=[];if(e){const s=document.createElement("button");s.className="gengage-chat-product-detail-tab gengage-chat-product-detail-tab--active",s.type="button",s.textContent=n.i18n?.productInfoTab??"Ürün Bilgileri",i.appendChild(s);const c=document.createElement("div");c.className="gengage-chat-product-detail-tab-panel",c.textContent=e,o.push(c)}if(t){const s=document.createElement("button");s.className=`gengage-chat-product-detail-tab${e?"":" gengage-chat-product-detail-tab--active"}`,s.type="button",s.textContent=n.i18n?.specificationsTab??"Teknik Özellikler",i.appendChild(s);const c=document.createElement("div");c.className="gengage-chat-product-detail-tab-panel",e&&(c.style.display="none");const l=document.createElement("table");l.className="gengage-chat-product-specs-table";const d=Array.isArray(t)?t:Object.entries(t).map(([u,g])=>({key:u,value:g}));for(const u of d){const g=document.createElement("tr"),p=document.createElement("td");p.className="gengage-chat-product-specs-key",p.textContent=u.key;const h=document.createElement("td");h.className="gengage-chat-product-specs-value",h.textContent=u.value,g.appendChild(p),g.appendChild(h),l.appendChild(g)}c.appendChild(l),o.push(c)}const r=i.querySelectorAll(".gengage-chat-product-detail-tab");r.forEach((s,c)=>{s.addEventListener("click",()=>{r.forEach(l=>l.classList.remove("gengage-chat-product-detail-tab--active")),s.classList.add("gengage-chat-product-detail-tab--active"),o.forEach((l,d)=>{l.style.display=d===c?"":"none"})})}),a.appendChild(i);for(const s of o)a.appendChild(s);return a}function Ft(e,t,n){if(!n||n.type==="related")return e;const a=e.map(i=>{const r=t.elements[i]?.props?.product,s=r?Number(r.price):NaN;return{id:i,price:Number.isFinite(s)?s:1/0}});return a.sort((i,o)=>i.price===1/0&&o.price===1/0?0:i.price===1/0?1:o.price===1/0?-1:n.direction==="desc"?o.price-i.price:i.price-o.price),a.map(i=>i.id)}function Po(e,t,n,a){const i=Ft(t,n,a),o=new Map;for(const r of Array.from(e.children)){const s=r.dataset.elementId;s&&o.set(s,r)}for(const r of i){const s=o.get(r);s&&e.appendChild(s)}}function Ao(e,t,n,a){const i=document.createElement("div");i.className="gengage-chat-product-grid-wrapper";const o=e.children??[];if(o.length>1&&a?.onSortChange){const l=document.createElement("div");l.className="gengage-chat-product-sort-toolbar";const d=a.productSort??{type:"related"},u=[{label:a.i18n?.sortRelated??"Önerilen",sortState:{type:"related"}},{label:a.i18n?.sortPriceAsc??"Fiyat ↑",sortState:{type:"price",direction:"asc"}},{label:a.i18n?.sortPriceDesc??"Fiyat ↓",sortState:{type:"price",direction:"desc"}}];for(const g of u){const p=document.createElement("button");p.className="gengage-chat-product-sort-btn",p.type="button",d.type===g.sortState.type&&d.direction===g.sortState.direction&&p.classList.add("gengage-chat-product-sort-btn--active"),p.textContent=g.label,p.addEventListener("click",()=>{a.onSortChange?.(g.sortState),Po(r,o,t,g.sortState),l.querySelectorAll(".gengage-chat-product-sort-btn").forEach(_=>_.classList.remove("gengage-chat-product-sort-btn--active")),p.classList.add("gengage-chat-product-sort-btn--active")}),l.appendChild(p)}if(a.onToggleComparisonSku){const g=document.createElement("div");g.className="gengage-chat-product-sort-separator",l.appendChild(g);const p=document.createElement("button");p.className="gengage-chat-comparison-toggle-btn",p.type="button",a.comparisonSelectMode&&p.classList.add("gengage-chat-comparison-toggle-btn--active"),p.textContent=a.i18n?.compareSelected??"Karşılaştır",p.addEventListener("click",()=>{a.onToggleComparisonSku?.("")}),l.appendChild(p)}i.appendChild(l)}const r=document.createElement("div");r.className="gengage-chat-product-grid";const s=Ft(o,t,a?.productSort);for(const l of s){if(!t.elements[l])continue;const d=n(l);d&&(d.dataset.elementId=l,r.appendChild(d))}if(Rt()&&r.classList.add("gengage-chat-product-grid--mobile"),i.appendChild(r),e.props?.endOfList!==!0&&o.length>0){const l=document.createElement("button");l.className="gengage-chat-product-grid-view-more",l.type="button",l.textContent=a?.i18n?.viewMoreLabel??"Daha Fazla Göster",l.addEventListener("click",()=>{a?.onAction({title:"More",type:"moreProductList",payload:{}})}),i.appendChild(l)}if(a?.comparisonSelectMode&&a.comparisonSelectedSkus&&a.comparisonSelectedSkus.length>=2){const l=vo(a.comparisonSelectedSkus,a);i.appendChild(l)}return i}function No(e,t){const n=e.props??{},a=n.keyDifferencesHtml,i=n.recommended,o=n.products??[],r=n.attributes??[],s=n.highlights??[],c=n.specialCases,l=n.recommendedText,d=n.winnerHits,u=n.productActions;if(!i)return document.createElement("div");const g={recommended:i,products:o,attributes:r,highlights:s,specialCases:c,onProductClick:h=>{t.onProductClick?.({sku:h,url:""})},pricing:t.pricing};l!==void 0&&(g.recommendedText=l),d!==void 0&&(g.winnerHits=d),u!==void 0&&(g.productActions=u),a!==void 0&&(g.keyDifferencesHtml=a),t.i18n&&(g.i18n={comparisonHeading:t.i18n.panelTitleComparisonResults,recommendedChoiceLabel:t.i18n.recommendedChoiceLabel,highlightsLabel:t.i18n.highlightsLabel,keyDifferencesLabel:t.i18n.keyDifferencesLabel,specialCasesLabel:t.i18n.specialCasesLabel,addToCartButton:t.i18n.addToCartButton});const p=oo(g);return Rt()&&p.classList.add("gengage-chat-comparison--mobile"),p}function Lo(e){const t=document.createElement("hr");t.className="gengage-chat-divider";const n=e.props?.label;if(n){const a=document.createElement("div");a.className="gengage-chat-divider-wrapper";const i=document.createElement("span");return i.className="gengage-chat-divider-label",i.textContent=n,a.appendChild(t),a.appendChild(i),a}return t}const Mo=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","LI","UL","OL","BLOCKQUOTE","PRE","TABLE","SECTION","HR","FIGURE","FIGCAPTION","DL","DT","DD"]);function $o(e){const t=[];let n=[];for(const a of e)a.nodeType===Node.ELEMENT_NODE&&Mo.has(a.tagName)?(n.length>0&&(t.push(n),n=[]),t.push([a])):n.push(a);return n.length>0&&t.push(n),t}function Oo(e){for(const t of e)for(const n of t)if(n.nodeType===Node.ELEMENT_NODE&&(n.tagName==="TABLE"||n.querySelector?.("table")))return!0;return!1}function Bo(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Do(e){const{container:t,html:n,delayMs:a=30,onTick:i,onComplete:o}=e,r=document.createElement("template");r.innerHTML=n;const s=$o(r.content.childNodes);if(Bo()||s.length<=1||Oo(s))return t.innerHTML=n,o?.(),{complete(){},cancel(){},isRunning:!1};t.innerHTML="";let c=0,l=null,d=!0;function u(){if(!d||c>=s.length){d=!1,o?.();return}const g=s[c],p=document.createElement("span");p.className="gengage-chat-typewriter-block";for(const h of g)p.appendChild(h.cloneNode(!0));t.appendChild(p),c++,i?.(),c<s.length?l=setTimeout(u,a):(d=!1,o?.())}return u(),{complete(){d&&(l!==null&&clearTimeout(l),d=!1,t.innerHTML=n,o?.())},cancel(){l!==null&&clearTimeout(l),d=!1},get isRunning(){return d}}}function qt(e){return e!==void 0&&/[\p{L}\p{N}_]/u.test(e)}function Ro(e){const{container:t,mentions:n,onProductClick:a}=e;if(n.length===0)return;const i=new Map;for(const o of n)o.short_name.length!==0&&i.set(o.short_name.toLowerCase(),o);if(i.size!==0)for(const[o,r]of i){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let c=s.nextNode(),l=!1;for(;c&&!l;){const d=c.textContent??"",u=d.toLowerCase().indexOf(o);if(u===-1){c=s.nextNode();continue}const g=u>0?d[u-1]:void 0,p=d[u+r.short_name.length];if(qt(g)||qt(p)){c=s.nextNode();continue}const h=d.slice(0,u),_=d.slice(u,u+r.short_name.length),v=d.slice(u+r.short_name.length),E=c.parentNode;if(!E){c=s.nextNode();continue}const I=document.createElement("a");I.className="gengage-product-mention",I.textContent=_,I.href="#",I.addEventListener("click",T=>{T.preventDefault(),a(r.sku)}),h&&E.insertBefore(document.createTextNode(h),c),E.insertBefore(I,c),v&&E.insertBefore(document.createTextNode(v),c),E.removeChild(c),l=!0}}}const Uo=new Set(["search","info","review","similar"]),Zo=new Set(["quickAnswer","reviewSummary","searchDiscovery","launchDiscovery","exploreTogetherV2"]);function jo(e){return!!(e.icon&&Uo.has(e.icon)||e.action?.type&&Zo.has(e.action.type))}const Ht="gengage_choice_prompter_dismissed";function Fo(e){const t=document.createElement("div");t.className="gengage-chat-choice-prompter";const n=document.createElement("div");n.className="gengage-chat-choice-prompter-heading",n.textContent=e.heading,t.appendChild(n);const a=document.createElement("div");a.className="gengage-chat-choice-prompter-suggestion",a.textContent=e.suggestion,t.appendChild(a);const i=document.createElement("button");i.type="button",i.className="gengage-chat-choice-prompter-cta",i.textContent=e.ctaLabel,i.addEventListener("click",()=>{Vt(),t.remove(),e.onCtaClick()}),t.appendChild(i);const o=document.createElement("button");return o.type="button",o.className="gengage-chat-choice-prompter-dismiss",o.textContent="×",o.setAttribute("aria-label","Dismiss"),o.addEventListener("click",()=>{Vt(),t.remove(),e.onDismiss?.()}),t.appendChild(o),t}function qo(){try{return sessionStorage.getItem(Ht)==="1"}catch{return!1}}function Vt(){try{sessionStorage.setItem(Ht,"1")}catch{}}const Ho="gengage_assistant",Vo=3,ge="sessions",ee="context",se="payload",te="favorites";function Pe(e){return new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)})}function ke(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error),e.onabort=()=>n(e.error??new DOMException("Transaction aborted"))})}class Go{constructor(t=Ho,n=Vo){this._db=null,this._dbName=t,this._version=n}async open(){return this._db?this._db:new Promise((t,n)=>{const a=indexedDB.open(this._dbName,this._version);a.onupgradeneeded=i=>{const o=a.result,r=i.oldVersion;r<1&&(o.createObjectStore(ge,{keyPath:["userId","appId","sessionId"]}),o.createObjectStore(ee,{keyPath:["sessionId","threadId"]}),o.createObjectStore(se,{keyPath:["threadId","messageId"]}).createIndex("threadId","threadId",{unique:!1}),o.createObjectStore(te,{keyPath:["userId","appId","sku"]})),r>=1&&r<2&&(o.objectStoreNames.contains(ge)&&o.deleteObjectStore(ge),o.objectStoreNames.contains(se)&&o.deleteObjectStore(se),o.createObjectStore(ge,{keyPath:["userId","appId","sessionId"]}),o.createObjectStore(se,{keyPath:["threadId","messageId"]}).createIndex("threadId","threadId",{unique:!1}),o.objectStoreNames.contains(ee)||o.createObjectStore(ee,{keyPath:["sessionId","threadId"]})),r<3&&(o.objectStoreNames.contains(te)||o.createObjectStore(te,{keyPath:["userId","appId","sku"]}))},a.onsuccess=()=>{this._db=a.result,t(this._db)},a.onerror=()=>n(a.error)})}close(){this._db?.close(),this._db=null}async saveSession(t){const a=this._requireDb().transaction(ge,"readwrite");a.objectStore(ge).put(t),await ke(a)}async loadSession(t,n,a){const o=this._requireDb().transaction(ge,"readonly");return await Pe(o.objectStore(ge).get([t,n,a]))??null}async saveContext(t){const a=this._requireDb().transaction(ee,"readwrite");a.objectStore(ee).put(t),await ke(a)}async loadContext(t,n){const i=this._requireDb().transaction(ee,"readonly");return await Pe(i.objectStore(ee).get([t,n]))??null}async deleteContextsAfterThread(t,n){const i=this._requireDb().transaction(ee,"readwrite"),r=i.objectStore(ee).openCursor();await new Promise((s,c)=>{r.onsuccess=()=>{const l=r.result;if(!l){s();return}const d=l.value;if(d.sessionId===t&&d.threadId>n)try{l.delete()}catch{}l.continue()},r.onerror=()=>c(r.error)}),await ke(i)}async loadLatestContext(t){const i=this._requireDb().transaction(ee,"readonly").objectStore(ee),o=IDBKeyRange.bound([t,""],[t,""]);return new Promise((r,s)=>{const c=i.openCursor(o,"prev");c.onsuccess=()=>{const l=c.result;r(l?l.value:null)},c.onerror=()=>s(c.error)})}async savePayload(t){const a=this._requireDb().transaction(se,"readwrite");a.objectStore(se).put(t),await ke(a)}async loadPayload(t,n){const i=this._requireDb().transaction(se,"readonly");return await Pe(i.objectStore(se).get([t,n]))??null}async loadPayloadsByThread(t){const i=this._requireDb().transaction(se,"readonly").objectStore(se).index("threadId"),o=[];return new Promise((r,s)=>{const c=i.openCursor(IDBKeyRange.only(t));c.onsuccess=()=>{const l=c.result;if(!l){r(o);return}o.push(l.value),l.continue()},c.onerror=()=>s(c.error)})}async saveFavorite(t){const a=this._requireDb().transaction(te,"readwrite");a.objectStore(te).put(t),await ke(a)}async removeFavorite(t,n,a){const o=this._requireDb().transaction(te,"readwrite");o.objectStore(te).delete([t,n,a]),await ke(o)}async loadFavorites(t,n){const i=this._requireDb().transaction(te,"readonly");return(await Pe(i.objectStore(te).getAll())).filter(r=>r.userId===t&&r.appId===n)}async isFavorite(t,n,a){const o=this._requireDb().transaction(te,"readonly");return await Pe(o.objectStore(te).get([t,n,a]))!==void 0}_requireDb(){if(!this._db)throw new Error("GengageIndexedDB: database not open. Call open() first.");return this._db}}const Wo=["comparisonTable","groupList","productDetailsSimilars","productList"];class Ko{constructor(t){this._lockCount=1,this._hiddenByUser=!1,this._lastPanelContentType=null,this._chatShown=!1,this._isFavoritesMode=!1,this._lastExtended=!1,this._onChange=t.onChange;const n=new Set(Wo);t.productDetailsInPanel&&n.add("productDetails"),this._panelContentTypes=n}get isExtended(){return this._lockCount===0&&!this._hiddenByUser&&!this._isFavoritesMode&&this._lastPanelContentType!==null&&this._panelContentTypes.has(this._lastPanelContentType)&&this._chatShown}unlock(){this._lockCount>0&&this._lockCount--,this._checkStateChange()}lock(){this._lockCount++,this._checkStateChange()}setHiddenByUser(t){this._hiddenByUser=t,this._checkStateChange()}setChatShown(t){this._chatShown=t,this._checkStateChange()}setFavoritesMode(t){this._isFavoritesMode=t,this._checkStateChange()}setPanelContentType(t){this._lastPanelContentType=t,this._checkStateChange()}_checkStateChange(){const t=this.isExtended;t!==this._lastExtended&&(this._lastExtended=t,this._onChange(t))}}class Jo{constructor(t){this.deps=t,this.snapshots=new Map,this.snapshotTypes=new Map,this.activePanelMessageId=null,this.currentType=null,this.threads=[],this.lastActionType=null}snapshotForMessage(t){const n=this.deps.drawer();if(!n?.hasPanelContent()||n.isPanelLoading())return;const a=n.getPanelContentElement();if(!a)return;const i=a.cloneNode(!0);this.snapshots.set(t,i),this.currentType&&this.snapshotTypes.set(t,this.currentType)}attachClickHandler(t){const a=this.deps.shadow()?.querySelector(`[data-message-id="${CSS.escape(t)}"]`);a&&(a.style.cursor="pointer",a.addEventListener("click",()=>this.restoreForMessage(t)))}restoreForMessage(t){const n=this.snapshots.get(t);if(!n)return!1;const a=this.deps.shadow(),i=this.deps.drawer();this.activePanelMessageId&&a?.querySelector(`[data-message-id="${CSS.escape(this.activePanelMessageId)}"]`)?.classList.remove("gengage-chat-bubble--active"),a?.querySelector(`[data-message-id="${CSS.escape(t)}"]`)?.classList.add("gengage-chat-bubble--active"),this.activePanelMessageId=t,i?.setPanelContent(n.cloneNode(!0));const r=this.snapshotTypes.get(t);return r&&(this.currentType=r,this.updateTopBar(r)),!0}notifyExtension(t){const n=this.deps.bridge();t?setTimeout(()=>n?.send("maximize-pdp",{}),350):setTimeout(()=>n?.send("minify-pdp",{}),200)}titleForComponent(t,n){if(n)return n;const a=this.deps.i18n();switch(t){case"ProductDetailsPanel":return a.panelTitleProductDetails;case"ProductGrid":return Gt(this.lastActionType)?a.panelTitleSearchResults:a.panelTitleSimilarProducts;case"ComparisonTable":return a.panelTitleComparisonResults;case"AIGroupingCards":return a.panelTitleCategories;default:return""}}updateTopBar(t,n){const a=this.deps.currentThreadId();if(!a)return;const i=this.threads.indexOf(a),o=i>0,r=i>=0&&i<this.threads.length-1,s=this.titleForComponent(t,n);this.deps.drawer()?.updatePanelTopBar(o,r,s)}updateTopBarForLoading(t){const n=this.deps.i18n(),i={productDetails:n.panelTitleProductDetails,productList:Gt(this.lastActionType)?n.panelTitleSearchResults:n.panelTitleSimilarProducts,comparisonTable:n.panelTitleComparisonResults,groupList:n.panelTitleCategories}[t]??"";if(i){const o=this.deps.currentThreadId(),r=o?this.threads.indexOf(o):-1,s=r>0,c=r>=0&&r<this.threads.length-1;this.deps.drawer()?.updatePanelTopBar(s,c,i)}}updateExtendedMode(t){const a={ComparisonTable:"comparisonTable",AIGroupingCards:"groupList",ProductDetailsPanel:"productDetails",ProductGrid:"productList"}[t]??null;this.deps.extendedModeManager()?.setPanelContentType(a)}navigateBack(){const t=this.deps.currentThreadId();if(!t)return;const n=this.threads.indexOf(t);if(n>0){const a=this.threads[n-1];a&&this.deps.rollbackToThread(a)}}navigateForward(){const t=this.deps.currentThreadId();if(!t)return;const n=this.threads.indexOf(t);if(n>=0&&n<this.threads.length-1){const a=this.threads[n+1];a&&this.deps.rollbackToThread(a)}}toPanelSpec(t){const n=t.elements[t.root];if(!n||n.type!=="ProductCard")return t;const a={...n,type:"ProductDetailsPanel"};return{root:t.root,elements:{...t.elements,[t.root]:a}}}destroy(){this.snapshots.clear(),this.snapshotTypes.clear(),this.activePanelMessageId=null,this.currentType=null,this.threads=[]}}function Gt(e){return e==="user_message"||e==="inputText"}class Wt{constructor(t){this.favoritedSkus=new Set,this._db=t}get db(){return this._db}set db(t){this._db=t}async persist(t){if(!this._db)return;const n=t.messages.map(i=>{const o={id:i.id,role:i.role,timestamp:i.timestamp,status:i.status==="streaming"?"done":i.status};return i.threadId!==void 0&&(o.threadId=i.threadId),i.content!==void 0&&(o.content=i.content),i.silent&&(o.silent=!0),o}),a={};for(const[i,o]of t.panelSnapshots)o.querySelector(".gengage-chat-panel-skeleton")||(a[i]=o.innerHTML);await this._db.saveSession({userId:t.userId,appId:t.appId,sessionId:t.sessionId,messages:n,currentThreadId:t.currentThreadId,lastThreadId:t.lastThreadId,createdAt:t.chatCreatedAt,panelThreads:t.panelThreads.length>0?t.panelThreads:void 0,thumbnailEntries:t.thumbnailEntries.length>0?t.thumbnailEntries:void 0,panelSnapshotHtml:Object.keys(a).length>0?a:void 0,sku:t.sku}),t.lastBackendContext&&t.currentThreadId&&await this._db.saveContext({sessionId:t.sessionId,threadId:t.currentThreadId,context:t.lastBackendContext});for(const i of t.messages)i.uiSpec&&i.threadId&&await this._db.savePayload({threadId:i.threadId,messageId:i.id,uiSpec:i.uiSpec})}async saveAndOpenURL(t,n,a){try{await n()}catch{}a?.send("openURLInNewTab",{url:t}),window.location.href=t}async loadPayload(t,n){if(!this._db)return null;for(let a=0;a<3;a++){try{const i=await this._db.loadPayload(t,n);if(i)return i.uiSpec}catch{}a<2&&await new Promise(i=>setTimeout(i,100))}return null}async loadFavorites(t,n){if(this._db)try{const a=await this._db.loadFavorites(t,n);for(const i of a)this.favoritedSkus.add(i.sku)}catch{}}async toggleFavorite(t,n,a,i){this._db&&(this.favoritedSkus.has(a)?(this.favoritedSkus.delete(a),await this._db.removeFavorite(t,n,a)):(this.favoritedSkus.add(a),await this._db.saveFavorite({userId:t,appId:n,sku:a,name:i.name,imageUrl:i.imageUrl,price:i.price,savedAt:new Date().toISOString()})))}close(){this._db?.close(),this._db=null}}const Kt="gengage_kvkk_shown",Yo=["kvkk","kişisel veri","kisisel veri"],Xo=/\b6698\b/;function et(e){const t=e.toLowerCase();return Yo.some(n=>t.includes(n))||Xo.test(t)}function Jt(e){try{return localStorage.getItem(`${Kt}_${e}`)==="1"}catch{return!1}}function Qo(e){try{localStorage.setItem(`${Kt}_${e}`,"1")}catch{}}function er(e){const n=new DOMParser().parseFromString(e,"text/html").body,a=Array.from(n.children);for(const i of a)if(et(i.textContent??"")){i.remove();break}return n.innerHTML.trim()}function tr(e){const t=new DOMParser().parseFromString(e,"text/html");for(const n of Array.from(t.body.children))if(et(n.textContent??""))return n.outerHTML;return null}const nr={tr:"TURKISH",en:"ENGLISH",de:"GERMAN",fr:"FRENCH"};function ar(e){return e?nr[e.toLowerCase().slice(0,2)]??"TURKISH":"TURKISH"}const ir=':host{all:initial;font-family:var(--gengage-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);font-size:var(--gengage-font-size, 14px)}.gengage-chat-root{position:fixed;z-index:var(--gengage-z-index, 2147483647);--_gengage-chat-offset: var(--gengage-chat-offset, 20px);--_gengage-chat-launcher-bottom: var(--gengage-chat-launcher-bottom, 20px);--_gengage-chat-launcher-right: var(--gengage-chat-launcher-right, 20px);--_gengage-chat-launcher-size: var(--gengage-chat-launcher-size, 56px);--_gengage-chat-drawer-width: var(--gengage-chat-width, 400px);--_gengage-chat-radius: var(--gengage-chat-shell-radius, 12px);--_gengage-chat-header-height: var(--gengage-chat-header-height, 60px);--_gengage-chat-conversation-width: var(--gengage-chat-conversation-width, 396px);--_gengage-chat-panel-min-width: var(--gengage-chat-panel-min-width, 320px);--_gengage-chat-panel-max-width: var(--gengage-chat-panel-max-width, 860px);--_gengage-chat-input-height: var(--gengage-chat-input-height, 48px);--_gengage-chat-shadow: var(--gengage-chat-shadow, 0 12px 40px rgba(15, 23, 42, .18));--_gengage-border-color: var(--gengage-border-color, #e5e7eb);--_gengage-discount-color: var(--gengage-discount-color, #ef4444);--_gengage-success-color: var(--gengage-success-color, #16a34a);--_gengage-text-secondary: var(--gengage-text-secondary, #64748b);--_gengage-qty-btn-size: var(--gengage-qty-btn-size, 28px);--_gengage-qty-btn-size-compact: var(--gengage-qty-btn-size-compact, 24px)}.gengage-chat-launcher-container{position:fixed;bottom:var(--_gengage-chat-launcher-bottom);right:var(--_gengage-chat-launcher-right);display:flex;flex-direction:column;align-items:flex-end;gap:10px;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-launcher-content-area,.gengage-chat-launcher-content-area-bottom{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.gengage-chat-launcher-content-area:empty,.gengage-chat-launcher-content-area-bottom:empty{display:none}.gengage-chat-root--open .gengage-chat-launcher-content-area,.gengage-chat-root--open .gengage-chat-launcher-content-area-bottom{display:none}.gengage-chat-root--open .gengage-chat-launcher-container{pointer-events:none;opacity:0;transition:opacity .2s ease}.gengage-chat-launcher{width:var(--_gengage-chat-launcher-size);height:var(--_gengage-chat-launcher-size);border-radius:50%;border:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px #0f172a47;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease;position:relative;flex-shrink:0}.gengage-chat-launcher:hover{transform:scale(1.05);box-shadow:0 14px 28px #0f172a47}.gengage-chat-launcher svg{width:24px;height:24px}.gengage-chat-launcher--hidden-mobile{display:none!important}.gengage-chat-launcher-tooltip{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);padding:6px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease;box-shadow:0 2px 8px #00000026}.gengage-chat-launcher-tooltip:after{content:"";position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#1e293b}.gengage-chat-launcher:hover .gengage-chat-launcher-tooltip{opacity:1}.gengage-chat-root--open .gengage-chat-launcher-tooltip{display:none}.gengage-chat-proactive{position:fixed;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 14px);right:var(--_gengage-chat-launcher-right);width:280px;padding:16px 18px;border-radius:16px;background:#fff;box-shadow:0 8px 30px #0000001f,0 2px 8px #0000000f;opacity:0;transform:translateY(8px) scale(.96);transition:opacity .25s ease,transform .25s ease;z-index:2147483645}.gengage-chat-proactive--visible{opacity:1;transform:translateY(0) scale(1)}.gengage-chat-proactive-message{margin:0 0 12px;font-size:14px;line-height:1.5;color:#1f2937}.gengage-chat-proactive-actions{display:flex;gap:8px}.gengage-chat-proactive-accept{flex:1;padding:8px 16px;border:none;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .15s ease}.gengage-chat-proactive-accept:hover{filter:brightness(1.08)}.gengage-chat-proactive-dismiss{position:absolute;top:8px;right:8px;width:24px;height:24px;border:none;border-radius:50%;background:transparent;color:#64748b;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center}.gengage-chat-proactive-dismiss:hover{color:#475569;background:#f1f5f9}.gengage-chat-drawer{position:fixed;top:0;bottom:0;right:0;width:var(--_gengage-chat-drawer-width);max-height:-webkit-fill-available;max-height:100dvh;border-radius:0;background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-root--mobile .gengage-chat-launcher-container{right:16px;bottom:calc(16px + env(safe-area-inset-bottom))}.gengage-chat-root--mobile .gengage-chat-drawer{left:0;right:0;bottom:0;width:100%;max-width:none;max-height:-webkit-fill-available;max-height:100dvh;border-radius:16px 16px 0 0;border-top:1px solid rgba(0,0,0,.06);box-shadow:0 -4px 16px #0000001a,0 12px 40px #0f172a2e;padding-bottom:env(safe-area-inset-bottom,0px)}.gengage-chat-root--mobile.gengage-chat-root--open:before{content:"";position:fixed;inset:0;background:#0000001f;z-index:-1;pointer-events:none}.gengage-chat-root--mobile.gengage-chat-root--mobile-half .gengage-chat-drawer{top:auto;height:min(72dvh,620px);max-height:min(72dvh,620px)}.gengage-chat-root--mobile.gengage-chat-root--mobile-full .gengage-chat-drawer{top:0;height:100dvh;max-height:100dvh;border-radius:0;border-top:none}.gengage-chat-root--mobile .gengage-chat-input-area{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--_gengage-border-color, #e5e7eb);transform:translateY(calc(-1 * var(--gengage-keyboard-offset, 0px)))}.gengage-chat-header{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:var(--_gengage-chat-header-height);padding:4px 12px;background:var(--gengage-chat-header-bg, #1d2939);color:var(--gengage-chat-header-foreground, #fff);box-shadow:0 4px 20px #00000014,0 0 2px #0000001f;border:none;position:relative;z-index:2}.gengage-chat-header-left{display:flex;align-items:center;gap:10px;min-width:0}.gengage-chat-header-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid rgba(255,255,255,.15)}.gengage-chat-header-info{display:flex;flex-direction:column;gap:2px;min-width:0}.gengage-chat-header-title-row{display:flex;align-items:center;gap:6px}.gengage-chat-header-title{font-weight:700;font-size:15px;line-height:1.25;letter-spacing:.01em;color:inherit}.gengage-chat-header-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:1.5}.gengage-chat-header-powered{display:flex;align-items:center;gap:4px;font-size:11px;color:#ffffffbf;text-decoration:none;transition:color .15s}.gengage-chat-header-powered:hover{color:#fffc}.gengage-chat-header-powered svg{width:12px;height:12px;opacity:.6}.gengage-chat-header-right{display:flex;align-items:center;gap:4px;flex-shrink:0}.gengage-chat-header-btn{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-header-btn:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-close{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;font-size:18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-close:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-body{display:flex;flex:1;overflow:hidden;min-height:0}.gengage-chat-panel{display:none;width:0;overflow:hidden;transition:width .22s cubic-bezier(.2,.72,.2,1)}.gengage-chat-panel--visible{display:flex;flex-direction:column;position:relative;box-sizing:border-box;width:440px;min-width:440px;border-right:1px solid var(--_gengage-border-color);overflow-y:auto;padding:16px;background:#f8fafc}.gengage-chat-panel-divider{display:flex;align-items:center;width:4px;cursor:pointer;background:#e5e7eb;position:relative;flex-shrink:0;transition:background .15s;z-index:2}.gengage-chat-panel-divider:hover{background:#cbd5e1}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-panel-divider-toggle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:24px;height:48px;border:1px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--_gengage-text-secondary);box-shadow:0 1px 3px #00000014;transition:background .15s,color .15s;padding:0;line-height:1}.gengage-chat-panel-divider-toggle:hover{background:#f1f5f9;color:#334155}.gengage-chat-panel--collapsed{flex:0 0 0px!important;width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border-right:none!important;overflow:hidden}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:0;transform:translateY(-50%)}.gengage-chat-conversation{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden;background:var(--gengage-background-color, #fff);position:relative;z-index:1}.gengage-chat-drawer--with-panel{width:auto;background:transparent;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-header{border-radius:0;flex-shrink:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex:1 1 0;min-height:0;gap:0;padding:0;align-items:stretch}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{flex:0 0 auto;width:clamp(var(--_gengage-chat-panel-min-width),50vw,var(--_gengage-chat-panel-max-width));min-width:var(--_gengage-chat-panel-min-width);max-width:var(--_gengage-chat-panel-max-width);border-right:none;background:#fff;padding:0 16px 16px;overflow-y:auto;margin:0;border-radius:0;box-shadow:0 8px 32px #0f172a1f,0 2px 8px #0f172a0f;max-height:100dvh}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{width:20px;height:48px;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;border:2px solid #fff;box-shadow:0 2px 8px #0f172a2e;font-size:12px;z-index:10}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover{background:var(--gengage-primary-hover, #2563eb);color:#fff}.gengage-chat-drawer--with-panel .gengage-chat-conversation{flex:0 0 var(--_gengage-chat-conversation-width);width:var(--_gengage-chat-conversation-width);border-left:none;background:var(--gengage-background-color, #fff);box-shadow:-4px 0 24px #0f172a1f,-1px 0 4px #0f172a0f}.gengage-chat-drawer--with-panel .gengage-chat-messages{padding-right:6px;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.12) transparent}.gengage-chat-drawer--with-panel .gengage-chat-messages::-webkit-scrollbar{width:0}.gengage-chat-drawer--with-panel:has(.gengage-chat-panel--collapsed){width:var(--_gengage-chat-conversation-width);background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow)}.gengage-chat-drawer--with-panel .gengage-chat-footer{display:none}.gengage-chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.gengage-chat-messages::-webkit-scrollbar{width:6px}.gengage-chat-messages::-webkit-scrollbar-track{background:transparent}.gengage-chat-messages::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.gengage-chat-messages::-webkit-scrollbar-thumb:hover{background:#0003}.gengage-chat-bubble{max-width:85%;padding:12px 16px;border-radius:12px;line-height:1.5;font-size:14px;font-weight:500;word-wrap:break-word;overflow-wrap:break-word;animation:gengage-chat-msg-in .3s cubic-bezier(.2,.7,.2,1)}@keyframes gengage-chat-msg-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-bubble--user{align-self:flex-end;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);border-bottom-right-radius:4px}.gengage-chat-bubble--assistant{align-self:flex-start;background:#f3f4f6;color:#1f2937;border-bottom-left-radius:4px;min-width:120px}.gengage-chat-bubble--active{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:-2px}.gengage-chat-bubble--assistant:empty{display:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a{color:var(--gengage-primary-color, #2563eb);text-decoration:underline}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a:hover{text-decoration:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p{margin:0 0 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p:last-child{margin-bottom:0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text ul,.gengage-chat-bubble--assistant .gengage-chat-bubble-text ol{margin:6px 0;padding-left:20px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text li{margin-bottom:6px;line-height:1.5}.gengage-chat-bubble--assistant .gengage-chat-bubble-text code{background:#0000000f;padding:1px 4px;border-radius:3px;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text pre{background:#0000000a;padding:8px;border-radius:6px;overflow-x:auto;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text table{border-collapse:collapse;margin:4px 0;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text th,.gengage-chat-bubble--assistant .gengage-chat-bubble-text td{border:1px solid var(--_gengage-border-color);padding:4px 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text img{max-width:100%;height:auto;border-radius:4px;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text h1,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h2,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h3,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h4,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h5,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h6{margin:8px 0 4px;line-height:1.3;color:#0f172a}.gengage-chat-bubble--assistant .gengage-chat-bubble-text blockquote{border-left:3px solid var(--_gengage-border-color);padding-left:12px;margin:4px 0;color:var(--_gengage-text-secondary)}.gengage-chat-bubble--first{border-left:3px solid var(--gengage-accent-primary, #3b82f6);padding-left:12px}.gengage-chat-bubble--first .gengage-chat-bubble-text{font-size:15px}.gengage-chat-typing{display:flex;align-items:center;gap:5px;padding:8px 4px;align-self:flex-start;max-width:85%}.gengage-chat-typing:has(.gengage-chat-typing-text),.gengage-chat-typing:has(.gengage-chat-thinking-steps){background:#f3f4f6;padding:10px 14px;border-radius:12px 12px 12px 4px;gap:8px}.gengage-chat-typing-dots{display:flex;align-items:center;gap:5px}.gengage-chat-typing-dots span{width:6px;height:6px;border-radius:50%;background:#94a3b8;display:inline-block;animation:gengage-chat-typing-fade 1.4s ease-in-out infinite}.gengage-chat-typing-dots span:nth-child(2){animation-delay:.2s}.gengage-chat-typing-dots span:nth-child(3){animation-delay:.4s}@keyframes gengage-chat-typing-fade{0%,to{opacity:.25}50%{opacity:1}}.gengage-chat-typing-sparkle{animation:gengage-sparkle-pulse 1.2s infinite}@keyframes gengage-sparkle-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-typing-text{font-size:13px;color:var(--_gengage-text-secondary);font-style:italic;flex:1;min-width:0;word-wrap:break-word;overflow-wrap:break-word}.gengage-chat-thinking-steps{display:flex;flex-direction:column;gap:4px;padding:4px 0}.gengage-chat-thinking-step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--gengage-chat-text-secondary, #666)}.gengage-chat-thinking-step-marker{font-size:12px;width:16px;text-align:center;flex-shrink:0}.gengage-chat-thinking-step-marker--done{color:var(--gengage-chat-success, #4caf50)}.gengage-chat-thinking-step-marker--active{color:var(--gengage-chat-primary, #1976d2);animation:gengage-thinking-pulse 1.5s ease-in-out infinite}@keyframes gengage-thinking-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-thinking-step-text{line-height:1.4}.gengage-chat-error{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:13px;text-align:center;border:1px solid #fecaca}.gengage-chat-error-retry{flex-shrink:0;padding:4px 12px;border:1px solid #fca5a5;border-radius:6px;background:#fff;color:#991b1b;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s}.gengage-chat-error-retry:hover{background:#fee2e2}.gengage-chat-input-area{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:8px 12px;border-top:1px solid var(--_gengage-border-color);background:var(--gengage-background-color, #fff)}.gengage-chat-input-pill{display:flex;align-items:center;gap:4px;flex:1;min-width:0;height:44px;background:#f3f4f6;border:1px solid var(--_gengage-border-color);border-radius:30px;padding:2px 8px;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.gengage-chat-input-pill:focus-within{border-color:var(--gengage-primary-color, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.gengage-chat-input{flex:1;min-width:0;min-height:40px;max-height:120px;padding:0 6px 0 14px;border:none;border-radius:0;font-size:14px;font-family:inherit;line-height:1.4;align-content:center;outline:none;background:transparent;color:#1f2937;resize:none;overflow-y:hidden}@media(max-width:767px){.gengage-chat-input-pill{height:52px;padding:3px 8px}.gengage-chat-input{min-height:44px;max-height:44px;font-size:16px;white-space:nowrap;overflow:hidden}.gengage-chat-input::placeholder{font-size:15px}}.gengage-chat-input::placeholder{font-size:14px;color:#6b7280}.gengage-chat-send{width:36px;height:36px;min-width:36px;padding:0;border:none;border-radius:50%;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-weight:700;font-size:0;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease,transform .15s ease;box-shadow:0 2px 4px #0000001f}.gengage-chat-send:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 4px 8px #0000002e}.gengage-chat-send:active{transform:translateY(0);box-shadow:0 1px 2px #0000001f}.gengage-chat-send svg{width:18px;height:18px}.gengage-chat-send:disabled{background:#d1d5db;box-shadow:none;cursor:not-allowed}.gengage-chat-footer{padding:4px 10px;text-align:center;font-size:10px;color:#6b7280;border-top:1px solid #f1f5f9;background:var(--gengage-background-color, #fff)}.gengage-chat-uispec{width:100%}.gengage-chat-uispec:empty{display:none}.gengage-chat-uispec>*{animation:gengage-chat-widget-enter .16s cubic-bezier(.2,.7,.2,1) both}@keyframes gengage-chat-widget-enter{0%{opacity:0;transform:translateY(5px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.gengage-chat-action-buttons{display:flex;gap:8px;padding:6px 0 4px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.gengage-chat-action-buttons::-webkit-scrollbar{display:none}.gengage-chat-action-btn{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;line-height:1.25;font-family:inherit;cursor:pointer;white-space:nowrap;transition:filter .15s ease,transform .1s ease}.gengage-chat-action-btn:hover{filter:brightness(.92)}.gengage-chat-action-btn:active{transform:scale(.97)}.gengage-chat-product-card{position:relative;border:1px solid #eee;border-radius:16px;overflow:hidden;background:#fff;width:160px;min-width:160px;max-width:160px;box-shadow:0 2px 8px #0000000f;transition:transform .1s ease,box-shadow .2s ease}.gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.gengage-chat-product-card-img{width:100%;height:120px;object-fit:contain;display:block;background:#fff;padding:8px;box-sizing:border-box}.gengage-chat-product-card-body{display:flex;flex-direction:column;gap:4px;padding:8px 10px 10px;text-align:center}.gengage-chat-product-card-name{font-size:13px;font-weight:600;color:#1f2937;line-height:1.35;margin-bottom:0;min-height:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.gengage-chat-product-card-brand{font-size:10px;color:#666}.gengage-chat-product-card-rating{font-size:11px;color:#f59e0b;line-height:1}.gengage-chat-product-card-review-count{color:#64748b;font-size:10px}.gengage-chat-product-card-price{display:flex;align-items:baseline;justify-content:center;gap:4px;font-size:16px;font-weight:800;color:#0f172a}.gengage-chat-product-card-original-price{text-decoration:line-through;color:#64748b;font-weight:400;font-size:12px}.gengage-chat-price-skeleton{display:inline-block;width:80px;height:16px;background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:gengage-skeleton-price-pulse 1.5s ease-in-out infinite;border-radius:4px;vertical-align:middle}@keyframes gengage-skeleton-price-pulse{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-product-card-cta{display:block;padding:8px 10px;text-align:center;background:transparent;color:var(--gengage-primary-color, #3b82f6);text-decoration:none;font-size:12px;font-weight:700;letter-spacing:.01em;border-top:1px solid #f1f5f9;transition:color .15s ease,background .15s ease}.gengage-chat-product-card-cta:hover{color:var(--gengage-primary-color, #0b24d6);background:#f8fafc}.gengage-chat-product-card-cta:active{background:#f1f5f9}.gengage-chat-product-summary{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;cursor:pointer;transition:background .15s,box-shadow .15s;margin:4px 0}.gengage-chat-product-summary:hover{background:#f9fafb;box-shadow:0 1px 4px #0000000f}.gengage-chat-product-summary__image{flex-shrink:0;width:64px;height:64px;border-radius:8px;overflow:hidden;border:1px solid #f3f4f6;background:#f9fafb}.gengage-chat-product-summary__image img{width:100%;height:100%;object-fit:cover;display:block}.gengage-chat-product-summary__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gengage-chat-product-summary__name{font-size:13px;font-weight:500;line-height:1.3;color:#111827;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-product-summary__rating{font-size:11px;color:#f59e0b;line-height:1}.gengage-chat-product-summary__review-count{color:#6b7280;font-size:11px}.gengage-chat-product-summary__price{font-size:13px;font-weight:600;color:#111827;line-height:1;margin-top:2px}.gengage-chat-product-summary__price-original{text-decoration:line-through;color:#6b7280;font-weight:400;font-size:11px}.gengage-chat-product-summary__price-current{color:var(--gengage-primary-color, #111827)}.gengage-chat-product-summary__cta{flex-shrink:0;font-size:12px;font-weight:500;color:var(--gengage-primary-color, #2563eb);text-decoration:none;padding:4px 10px;border-radius:8px;transition:background .15s;white-space:nowrap}.gengage-chat-product-summary__cta:hover{background:#0000000a}.gengage-chat-product-summary__cta:focus-visible{outline:2px solid var(--gengage-primary-color, #2563eb);outline-offset:2px}.gengage-chat-product-grid{display:flex;gap:12px;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;min-height:180px}.gengage-chat-product-grid>*{scroll-snap-align:start;flex:0 0 auto}.gengage-chat-product-grid::-webkit-scrollbar{display:none}.gengage-chat-review-highlights{padding:2px 0 6px}.gengage-chat-review-item{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:10px 12px;background:#fff}.gengage-chat-review-item[data-tone=positive]{border-color:#bbf7d0;background:#f0fdf4}.gengage-chat-review-item[data-tone=negative]{border-color:#fecaca;background:#fef2f2}.gengage-chat-review-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--_gengage-text-secondary);margin-bottom:4px}.gengage-chat-review-text{font-size:13px;line-height:1.45;color:#1f2937}.gengage-chat-review-rating{margin-top:6px;font-size:12px;font-weight:700;color:#0f172a}.gengage-chat-review-empty{font-size:12px;color:var(--_gengage-text-secondary)}.gengage-chat-review-tabs{display:flex;gap:6px;margin-bottom:10px}.gengage-chat-review-tab{padding:6px 14px;border:1px solid var(--_gengage-border-color);border-radius:999px;background:#fff;color:var(--_gengage-text-secondary);font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s,border-color .15s}.gengage-chat-review-tab:hover{background:#f8fafc}.gengage-chat-review-tab--active{background:#f1f5f9;border-color:#94a3b8;color:#0f172a}.gengage-chat-review-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.gengage-chat-review-pill{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--_gengage-border-color);border-radius:8px;background:#fff;font-size:12px;color:#334155;box-shadow:0 1px 2px #0000000a}.gengage-chat-review-pill[data-tone=positive]{border-color:#bbf7d0}.gengage-chat-review-pill[data-tone=negative]{border-color:#fecaca}.gengage-chat-review-pill-icon{font-size:11px;font-weight:700}.gengage-chat-review-pill[data-tone=positive] .gengage-chat-review-pill-icon{color:#16a34a}.gengage-chat-review-pill[data-tone=negative] .gengage-chat-review-pill-icon{color:#dc2626}.gengage-chat-review-pill-count{font-size:10px;font-weight:700;background:#f1f5f9;color:var(--_gengage-text-secondary);border-radius:4px;padding:1px 5px}.gengage-chat-review-items{display:grid;gap:10px}.gengage-chat-divider{border:none;border-top:1px solid var(--_gengage-border-color);margin:8px 0}.gengage-chat-divider-wrapper{display:flex;align-items:center;gap:8px;margin:8px 0}.gengage-chat-divider-wrapper hr{flex:1;border:none;border-top:1px solid var(--_gengage-border-color);margin:0}.gengage-chat-divider-label{font-size:11px;color:#6b7280;white-space:nowrap}.gengage-chat--overlay .gengage-chat-drawer{position:fixed;inset:0;width:100%;max-width:480px;max-height:100%;margin:0 auto;border-radius:0;animation:gengage-chat-overlay-in .24s cubic-bezier(.2,.72,.2,1)}.gengage-chat--overlay:before{content:"";position:fixed;inset:0;background:#00000073;z-index:-1}@keyframes gengage-chat-overlay-in{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-panel-skeleton{display:flex;flex-direction:column;gap:14px;padding:6px 0}.gengage-chat-panel-skeleton-block{height:110px;border-radius:10px;background:linear-gradient(90deg,#e5e7eb 25%,#f3f4f6,#e5e7eb 75%);background-size:200% 100%;animation:gengage-panel-shimmer 1.4s infinite}@keyframes gengage-panel-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-panel-skeleton-block--image{height:200px;border-radius:8px;margin-bottom:12px}.gengage-chat-panel-skeleton-block--text{height:16px;border-radius:4px;margin-bottom:8px}.gengage-chat-panel-skeleton-block--text:nth-child(3){width:80%}.gengage-chat-panel-skeleton-block--text:nth-child(4){width:60%}.gengage-chat-panel-skeleton-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gengage-chat-panel-skeleton-block--card{height:120px;border-radius:8px}.gengage-chat-panel-skeleton-block--row{height:32px;border-radius:4px;margin-bottom:4px}.gengage-chat-panel .gengage-chat-product-card{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--_gengage-border-color);box-shadow:0 1px 4px #0000000f;overflow:hidden;padding:0}.gengage-chat-panel .gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a;border-color:#d1d5db}.gengage-chat-panel .gengage-chat-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));overflow-x:visible;gap:12px;min-height:auto;padding:4px 0}.gengage-chat-panel .gengage-chat-product-card-img{width:100%;height:160px;border-radius:0;object-fit:contain;background:#fafafa;padding:12px;box-sizing:border-box}.gengage-chat-panel .gengage-chat-product-card-body{padding:10px 12px 12px;text-align:left;gap:4px}.gengage-chat-panel .gengage-chat-product-card-name{min-height:0;margin-bottom:2px;font-size:13px;-webkit-line-clamp:2;line-clamp:2}.gengage-chat-panel .gengage-chat-product-card-price{justify-content:flex-start;font-size:15px}.gengage-chat-panel .gengage-chat-product-card-cta{display:block;padding:10px 12px;text-align:center;border-top:1px solid #f1f5f9;border-radius:0;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-weight:700;font-size:13px}.gengage-chat-product-details-panel{display:flex;flex-direction:column;gap:12px;width:100%;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:16px;padding:14px;box-sizing:border-box}.gengage-chat-product-details-media{border:1px solid #f1f5f9;border-radius:12px;background:#fafafa;padding:12px;display:flex;flex-direction:column;align-items:center}.gengage-chat-product-details-img{width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px}.gengage-chat-product-details-content{display:flex;flex-direction:column;gap:8px;min-width:0}.gengage-chat-product-details-title{margin:0;font-size:17px;font-weight:700;line-height:1.3;color:#0f172a}.gengage-chat-product-details-rating{display:inline-flex;align-items:center;gap:4px;width:fit-content;padding:3px 8px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:13px;font-weight:700}.gengage-chat-product-details-review-count{color:#7c2d12;font-weight:600}.gengage-chat-product-details-price{display:flex;align-items:baseline;gap:6px}.gengage-chat-product-details-original-price{font-size:14px;color:#64748b;text-decoration:line-through}.gengage-chat-product-details-current-price{font-size:22px;font-weight:800;line-height:1.1;color:#0f172a}.gengage-chat-product-details-stock{width:fit-content;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}.gengage-chat-product-details-stock.is-in-stock{background:#dcfce7;color:#166534}.gengage-chat-product-details-stock.is-out-of-stock{background:#fee2e2;color:#991b1b}.gengage-chat-product-details-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px}.gengage-chat-product-details-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 20px;border-radius:999px;border:none;text-decoration:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:14px;font-weight:700;cursor:pointer;transition:filter .14s ease,transform .12s ease}.gengage-chat-product-details-cta:hover{filter:brightness(1.05);transform:translateY(-1px)}.gengage-chat-product-details-cta:active{transform:translateY(1px)}.gengage-chat-product-details-atc{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border:none;border-radius:10px;background:var(--_gengage-success-color);color:#fff;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .12s ease,transform .12s ease}.gengage-chat-product-details-atc:hover{filter:brightness(1.08);transform:translateY(-1px)}.gengage-chat-product-details-atc:active{transform:translateY(1px)}.gengage-chat-product-detail-tabs{margin-top:4px;border-top:1px solid var(--_gengage-border-color);padding-top:12px}.gengage-chat-product-detail-tab-bar{display:flex;gap:0;border-bottom:2px solid var(--_gengage-border-color);margin-bottom:12px}.gengage-chat-product-detail-tab{flex:1;padding:8px 12px;border:none;background:transparent;color:var(--_gengage-text-secondary);font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .15s,border-color .15s}.gengage-chat-product-detail-tab:hover{color:#334155}.gengage-chat-product-detail-tab--active{color:var(--gengage-primary-color, #3b82f6);border-bottom-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-detail-tab-panel{font-size:13px;line-height:1.6;color:#374151}.gengage-chat-product-specs-table{width:100%;border-collapse:collapse;font-size:13px}.gengage-chat-product-specs-table tr:nth-child(2n){background:#f8fafc}.gengage-chat-product-specs-key{padding:6px 10px;font-weight:600;color:#475569;white-space:nowrap;border-bottom:1px solid #f1f5f9;width:40%}.gengage-chat-product-specs-value{padding:6px 10px;color:#1f2937;border-bottom:1px solid #f1f5f9}.gengage-chat-product-card-atc{position:absolute;bottom:42px;right:6px;opacity:0;transition:opacity .15s ease;z-index:1}.gengage-chat-product-card:hover .gengage-chat-product-card-atc{opacity:1}.gengage-chat-drawer.gengage-chat-drawer--hidden,.gengage-chat-root--mobile .gengage-chat-drawer.gengage-chat-drawer--hidden{display:none!important;pointer-events:none;box-shadow:none}@media(max-width:900px){.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:clamp(280px,calc(100vw - var(--_gengage-chat-conversation-width)),560px);max-width:560px}}.gengage-chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f3f4f6;border:1px solid var(--_gengage-border-color);border-radius:8px;width:100%;box-sizing:border-box}.gengage-chat-attachment-preview--hidden{display:none}.gengage-chat-attachment-preview-thumb{width:40px;height:40px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-attachment-name{flex:1;font-size:12px;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gengage-chat-attachment-remove{background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:0 4px;line-height:1;flex-shrink:0}.gengage-chat-attachment-remove:hover{color:#ef4444}.gengage-chat-attach-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-attach-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-attach-btn svg{width:20px;height:20px}.gengage-chat-mic-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-mic-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-mic-btn svg{width:20px;height:20px}.gengage-chat-mic-btn--active{color:#ef4444;animation:gengage-mic-pulse 1.2s ease-in-out infinite}.gengage-chat-mic-btn--active:hover{color:#dc2626}@keyframes gengage-mic-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.15);opacity:.8}}.gengage-chat-input-area--dragover{outline:2px dashed var(--gengage-primary-color, #3b82f6);outline-offset:-2px;background:#eff6ff}.gengage-chat-attachment-thumb{width:120px;max-width:100%;height:auto;border-radius:8px;margin-bottom:6px;display:block}@media(max-width:768px){.gengage-chat-root{--_gengage-qty-btn-size: 44px;--_gengage-qty-btn-size-compact: 44px}.gengage-chat-header-btn,.gengage-chat-close{width:44px;height:44px;border-radius:12px}.gengage-chat-attach-btn,.gengage-chat-mic-btn,.gengage-chat-send{width:44px;height:44px;min-width:44px}.gengage-chat-attach-btn svg,.gengage-chat-mic-btn svg{width:22px;height:22px}.gengage-chat-panel-divider{display:flex;width:100%;height:20px;align-items:center;justify-content:center;cursor:ns-resize;background:transparent;touch-action:pan-y;position:relative;overflow:visible}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-drawer--with-panel{left:0;right:0;width:100%;border-radius:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex-direction:column}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:100%;min-width:0;max-width:none;max-height:30dvh;border-right:none;border-bottom:1px solid var(--_gengage-border-color);padding:0 12px 12px;margin:0;border-radius:0;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:100%;height:20px;background:transparent;border-bottom:1px solid rgba(148,163,184,.22)}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:44px;border:none;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:0;line-height:0;padding:0}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:before{content:"";display:block;width:52px;height:5px;margin:0 auto;border-radius:999px;background:#94a3b8;box-shadow:0 1px #64748b59;transition:background .15s ease}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active{background:transparent;color:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover:before,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active:before{background:#64748b}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:100%;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:50%;transform:translate(-50%,-50%)}.gengage-chat-drawer--with-panel .gengage-chat-conversation{width:100%;flex:1;border-left:none}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px;padding:0 12px;font-size:13px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{min-height:44px;padding:0 16px}.gengage-chat-product-details-share{width:44px;height:44px}.gengage-chat-panel .gengage-chat-product-card{grid-template-columns:84px 1fr}.gengage-chat-panel .gengage-chat-product-card-cta{grid-column:1 / -1;width:100%}.gengage-chat-product-details-panel{padding:12px;gap:12px}.gengage-chat-product-details-media{min-height:140px}.gengage-chat-product-details-title{font-size:15px}.gengage-chat-product-details-current-price{font-size:20px}.gengage-chat-product-grid{scroll-snap-type:x mandatory}.gengage-chat-product-card{width:280px;min-width:280px;scroll-snap-align:center}.gengage-chat-product-card-img{height:180px}}@media(max-width:480px){.gengage-chat-drawer{position:fixed;inset:0;width:100%;max-height:100%;border-radius:0}.gengage-chat-bubble{max-width:100%}}.gengage-chat-kvkk-banner{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#fffbeb;border-bottom:1px solid #fde68a;font-size:12px;line-height:1.5;color:#92400e}.gengage-chat-kvkk-content{flex:1;min-width:0}.gengage-chat-kvkk-content a{color:#b45309;text-decoration:underline}.gengage-chat-kvkk-dismiss{flex-shrink:0;width:20px;height:20px;border:none;background:transparent;color:#92400e;font-size:16px;cursor:pointer;padding:0;line-height:1}.gengage-chat-comparison{padding:16px}.gengage-chat-comparison-heading{font-size:14px;font-weight:700;letter-spacing:.05em;color:#0f172a;margin:0 0 16px}.gengage-chat-comparison-recommended{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:16px;background:#fff;box-shadow:0 1px 3px #0000000f;margin-bottom:12px}.gengage-chat-comparison-recommended-label{font-size:12px;font-weight:700;color:#16a34a;text-transform:uppercase;letter-spacing:.04em;margin-bottom:12px}.gengage-chat-comparison-recommended-body{display:flex;gap:12px;align-items:flex-start}.gengage-chat-comparison-recommended-body img{width:80px;height:80px;object-fit:contain;border-radius:8px;background:#f8fafc}.gengage-chat-comparison-recommended-info{flex:1;min-width:0}.gengage-chat-comparison-recommended-title{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:4px}.gengage-chat-comparison-recommended-price{font-size:16px;font-weight:700;color:#0f172a}.gengage-chat-comparison-highlights{margin-top:12px;padding-top:12px;border-top:1px solid #f1f5f9}.gengage-chat-comparison-highlights-label{font-size:12px;font-weight:600;color:var(--_gengage-text-secondary);margin-bottom:6px}.gengage-chat-comparison-highlights ul{margin:0;padding-left:18px;font-size:13px;color:#334155;line-height:1.6}.gengage-chat-comparison-special{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:12px 16px;margin-bottom:12px;font-size:13px;color:#92400e}.gengage-chat-comparison-special summary{cursor:pointer;font-weight:600}.gengage-chat-comparison-special ul{margin:8px 0 0;padding-left:18px;line-height:1.6}.gengage-chat-comparison-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}.gengage-chat-comparison-table th,.gengage-chat-comparison-table td{padding:10px 12px;text-align:center;border-bottom:1px solid #f1f5f9;vertical-align:top}.gengage-chat-comparison-table th{font-weight:600;font-size:12px;color:#334155}.gengage-chat-comparison-table th img{width:60px;height:60px;object-fit:contain;border-radius:6px;background:#f8fafc;margin-bottom:6px}.gengage-chat-comparison-table-price{font-weight:700;color:#0f172a}.gengage-chat-comparison-label{text-align:left;font-weight:600;color:var(--_gengage-text-secondary);white-space:nowrap}.gengage-chat-comparison-selected{background:#f0fdf4}.gengage-chat-comparison-recommended-text{padding:8px 12px;font-size:12px;color:var(--gengage-text-secondary, #475569);font-style:italic;border-top:1px solid var(--gengage-border-color, #e2e8f0);margin-top:8px}.gengage-chat-comparison-product-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.gengage-chat-comparison-view-btn{flex:1;min-width:0;padding:8px 12px;border:1px solid var(--gengage-primary-color, #3b82f6);border-radius:6px;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.gengage-chat-comparison-view-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-pills{position:relative;padding:8px 12px;border-top:1px solid #f1f5f9;background:var(--gengage-background-color, #fff)}.gengage-chat-pills-scroll{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-right:28px}.gengage-chat-pills-scroll::-webkit-scrollbar{display:none}.gengage-chat-pill{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;font-family:inherit;white-space:nowrap;cursor:pointer;transition:filter .15s,transform .1s}.gengage-chat-pill:hover{filter:brightness(.92)}.gengage-chat-pill:active{transform:scale(.97)}.gengage-chat-pill--rich{display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:20px}.gengage-chat-pill-img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#ffffff26}.gengage-chat-pill-text{font-size:13px;font-weight:600;line-height:1.2}.gengage-chat-pill-desc{display:none}.gengage-chat-pill--rich .gengage-chat-pill-desc{display:block;font-size:10px;font-weight:400;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.gengage-chat-pills-arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:50%;border:1px solid var(--_gengage-border-color);background:#fff;color:var(--_gengage-text-secondary);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:-4px 0 8px #ffffffe6;z-index:1}.gengage-chat-pills-arrow:hover{background:#f8fafc;color:#334155}@media(prefers-reduced-motion:reduce){.gengage-chat-uispec>*,.gengage-chat-action-btn,.gengage-chat-product-card,.gengage-chat-product-card-cta,.gengage-chat-send,.gengage-chat-launcher,.gengage-chat-pill,.gengage-chat-drawer,.gengage-chat-proactive,.gengage-chat-typing-dots span,.gengage-chat-typing-sparkle,.gengage-chat-thinking-step-marker--active,.gengage-chat-bubble,.gengage-chat-panel-skeleton-block,.gengage-chat-ai-toppick-card,.gengage-chat-mic-btn--active,.gengage-chat-ai-toppick-spinner:after,.gengage-chat-panel-shimmer,.gengage-chat-overlay,.gengage-chat-product-details-skeleton-price{animation:none!important;transition:none!important;transform:none!important}}.gengage-chat-bubble--user{position:relative}.gengage-chat-rollback-btn{position:absolute;left:-28px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;border-radius:50%;background:var(--gengage-surface-color, #f1f5f9);color:var(--gengage-text-secondary, #64748b);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;padding:0}.gengage-chat-bubble--user:hover .gengage-chat-rollback-btn{opacity:1}.gengage-chat-rollback-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-bubble--hidden{display:none}.gengage-chat-ai-top-picks{display:flex;flex-direction:column;gap:12px;padding:8px 0}.gengage-chat-ai-top-picks-title{font-size:15px;font-weight:600;color:var(--gengage-text-primary, #1e293b);margin:0 0 4px}.gengage-chat-ai-top-picks-cards{display:flex;flex-direction:column;gap:10px}.gengage-chat-ai-toppick-discount-badge{position:absolute;top:8px;left:8px;background:var(--gengage-discount-bg, #ef4444);color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;z-index:1}.gengage-chat-ai-toppick-card--winner{position:relative;display:flex;flex-direction:column;border:2px solid var(--gengage-primary-color, #3b82f6);border-radius:12px;background:#fff;overflow:hidden;transition:box-shadow .2s ease}.gengage-chat-ai-toppick-card--winner:hover{box-shadow:0 4px 16px #3b82f626}.gengage-chat-ai-toppick-card--winner .gengage-chat-ai-toppick-img{width:100%;height:140px;object-fit:contain;background:#f8fafc}.gengage-chat-ai-toppick-card--compact{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;background:#fff;padding:10px;transition:box-shadow .2s ease,transform .15s ease}.gengage-chat-ai-toppick-card--compact:hover{box-shadow:0 2px 8px #00000014;transform:translateY(-1px)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:#f8fafc;flex-shrink:0}.gengage-chat-ai-toppick-badge{position:absolute;top:8px;left:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;z-index:1;letter-spacing:.5px}.gengage-chat-ai-toppick-body{display:flex;flex-direction:column;gap:4px;padding:10px;flex:1;min-width:0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-body{padding:0}.gengage-chat-ai-toppick-name{font-size:13px;font-weight:600;color:var(--gengage-text-primary, #1e293b);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.gengage-chat-ai-toppick-role{font-size:11px;font-weight:600;color:var(--gengage-primary-color, #3b82f6);text-transform:uppercase;letter-spacing:.3px}.gengage-chat-ai-toppick-labels{display:flex;flex-wrap:wrap;gap:4px}.gengage-chat-ai-toppick-label{font-size:11px;padding:1px 6px;border-radius:4px;font-weight:500}.gengage-chat-ai-toppick-label[data-sentiment=positive]{background:#dcfce7;color:#166534}.gengage-chat-ai-toppick-label[data-sentiment=negative]{background:#fee2e2;color:#991b1b}.gengage-chat-ai-toppick-label[data-sentiment=neutral]{background:#f1f5f9;color:#475569}.gengage-chat-ai-toppick-score{font-size:12px;font-weight:700;color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-ai-toppick-reason{font-size:12px;color:var(--gengage-chat-text-secondary, #666);line-height:1.4;margin-top:4px}.gengage-chat-ai-toppick-review{font-size:12px;font-style:italic;color:var(--gengage-text-secondary, #64748b);margin:2px 0;padding-left:8px;border-left:2px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-ai-toppick-price{font-size:14px;font-weight:700;color:var(--gengage-text-primary, #1e293b)}.gengage-chat-ai-toppick-original-price{text-decoration:line-through;color:var(--gengage-text-secondary, #64748b);font-weight:400;font-size:12px}.gengage-chat-ai-toppick-cta{display:block;width:calc(100% - 20px);margin:6px 10px 10px;padding:8px 0;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:600;cursor:pointer;text-align:center;transition:background .15s ease}.gengage-chat-ai-toppick-cta:hover{filter:brightness(.92)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:auto;margin:0;padding:6px 14px;flex-shrink:0;align-self:center}.gengage-chat-ai-toppick-spinner{position:absolute;inset:0;background:#ffffffb3;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:3}.gengage-chat-ai-toppick-spinner:after{content:"";width:24px;height:24px;border:3px solid var(--gengage-border, #e2e8f0);border-top-color:var(--gengage-accent-primary, #3b82f6);border-radius:50%;animation:gengage-spin .7s linear infinite}@keyframes gengage-spin{to{transform:rotate(360deg)}}@media(max-width:768px){.gengage-chat-ai-top-picks-cards{flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding-bottom:4px}.gengage-chat-ai-toppick-card--winner,.gengage-chat-ai-toppick-card--compact{min-width:280px;max-width:280px;flex-shrink:0;scroll-snap-align:start}.gengage-chat-ai-toppick-card--compact{flex-direction:column;align-items:stretch}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:100%;height:100px;border-radius:8px 8px 0 0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:calc(100% - 20px);margin:6px 10px 10px;align-self:stretch}.gengage-chat-rollback-btn{left:-24px}}.gengage-chat-grounding-review{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grounding-review:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grounding-review-icon{font-size:20px;flex-shrink:0}.gengage-chat-grounding-review-body{flex:1;min-width:0}.gengage-chat-grounding-review-title{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grounding-review-subtitle{font-size:12px;color:var(--gengage-text-muted, #64748b);margin-top:2px}.gengage-chat-grounding-review-cta{font-size:13px;font-weight:500;color:var(--gengage-primary-color, #3b82f6);white-space:nowrap;flex-shrink:0}.gengage-chat-grouping-cards{display:flex;flex-direction:column;gap:6px}.gengage-chat-grouping-card{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:8px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grouping-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grouping-card-arrow{display:none;font-size:14px;color:var(--gengage-primary-color, #3b82f6);flex-shrink:0}.gengage-chat-grouping-card-img{width:20px;height:20px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-grouping-card-body{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.gengage-chat-grouping-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grouping-card-desc{font-size:12px;color:var(--gengage-text-muted, #64748b)}.gengage-chat-grouping-card-labels{display:block;font-size:11px;color:var(--gengage-chat-text-secondary, #888);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gengage-chat-root--mobile .gengage-chat-grouping-card-img{display:none}.gengage-chat-root--mobile .gengage-chat-grouping-card-arrow{display:inline}.gengage-chat-suggested-search-cards{display:flex;flex-direction:column;gap:8px}.gengage-chat-suggested-search-card{display:flex;align-items:flex-start;gap:12px;padding:10px 14px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-suggested-search-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-suggested-search-card-img{width:40px;height:40px;border-radius:6px;object-fit:cover;flex-shrink:0}.gengage-chat-suggested-search-card-body{flex:1;min-width:0}.gengage-chat-suggested-search-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-suggested-search-card-desc{font-size:12px;color:var(--gengage-text-secondary, #475569);margin-top:2px}.gengage-chat-suggested-search-card-diff{font-size:11px;color:var(--gengage-text-muted, #64748b);margin-top:2px;font-style:italic}.gengage-chat-product-details-gallery{position:relative}.gengage-chat-product-details-gallery .gengage-chat-product-details-img{touch-action:pan-y}.gengage-chat-product-gallery-thumbs{display:flex;gap:8px;padding:10px 0 4px;overflow-x:auto;scrollbar-width:thin;justify-content:center;width:100%}.gengage-chat-product-gallery-thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;flex-shrink:0;transition:border-color .15s ease;background:#fff}.gengage-chat-product-gallery-thumb:hover{border-color:var(--gengage-border-color, #cbd5e1)}.gengage-chat-product-gallery-thumb--active{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-variants{margin-top:12px}.gengage-chat-product-variants-label{font-size:12px;font-weight:600;color:var(--gengage-text-muted, #64748b);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.gengage-chat-product-variants-list{display:flex;flex-wrap:wrap;gap:6px}.gengage-chat-product-variant-btn{padding:6px 12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:6px;background:var(--gengage-surface-color, #f8fafc);color:var(--gengage-text-color, #1e293b);font-size:12px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-product-variant-btn:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-grid-wrapper{display:flex;flex-direction:column;gap:8px}.gengage-chat-product-sort-toolbar{display:flex;gap:4px;padding:4px;background:var(--gengage-surface-color, #f8fafc);border-radius:8px;border:1px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-product-sort-btn{flex:1;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease}.gengage-chat-product-sort-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-product-sort-btn--active,.gengage-chat-product-sort-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-product-sort-separator{width:1px;background:var(--gengage-border-color, #e2e8f0);margin:2px}.gengage-chat-comparison-toggle-btn{flex:none;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease;white-space:nowrap}.gengage-chat-comparison-toggle-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-comparison-toggle-btn--active,.gengage-chat-comparison-toggle-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-comparison-select-wrapper{position:relative}.gengage-chat-comparison-checkbox{position:absolute;top:8px;left:8px;z-index:2;width:18px;height:18px;cursor:pointer;accent-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-comparison-floating-btn{display:block;width:100%;margin-top:8px;padding:10px 16px;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease;text-align:center}.gengage-chat-comparison-floating-btn:hover{background:var(--gengage-primary-hover, #2563eb)}.gengage-chat-panel-topbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--_gengage-border-color);background:#f8fafc;min-height:44px;flex-shrink:0;position:sticky;top:0;z-index:3}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward{width:28px;height:28px;min-width:28px;padding:0;border:1px solid #d1d5db;border-radius:6px;background:transparent;color:#374151;font-size:14px;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,opacity .15s ease}.gengage-chat-panel-topbar-back:hover:not(:disabled),.gengage-chat-panel-topbar-forward:hover:not(:disabled){background:#f3f4f6;border-color:#9ca3af}.gengage-chat-panel-topbar-back:disabled,.gengage-chat-panel-topbar-forward:disabled{opacity:.3;cursor:default}.gengage-chat-panel-topbar-title{flex:1;font-size:14px;font-weight:600;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}@keyframes gengage-typewriter-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-typewriter-block{display:block;animation:gengage-typewriter-fade-in .15s ease both}@media(prefers-reduced-motion:reduce){.gengage-chat-typewriter-block{animation:none}}.gengage-product-mention{color:var(--gengage-primary-color, #3b82f6);text-decoration:none;cursor:pointer;font-weight:500;border-bottom:1px dashed var(--gengage-primary-color, #3b82f6);transition:border-color .15s}.gengage-product-mention:hover{border-bottom-style:solid}@keyframes gengage-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.8}}.gengage-chat-panel-skeleton-block{animation:gengage-skeleton-pulse 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.gengage-chat-panel-skeleton-block{animation:none}}.gengage-chat-input-chips{display:flex;gap:6px;padding:4px 12px 2px;flex-wrap:wrap}.gengage-chat-input-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:12px;border:1px solid var(--_gengage-border-color);background:#f9fafb;color:#374151;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.gengage-chat-input-chip:hover{background:#f3f4f6;border-color:#d1d5db}.gengage-chat-icon{width:14px;height:14px;flex-shrink:0}.gengage-chat-input-chip-icon,.gengage-chat-pill-icon{display:inline-flex;align-items:center;margin-right:4px}.gengage-chat-product-card-img-wrapper,.gengage-chat-product-details-img-wrap{position:relative;overflow:hidden}.gengage-chat-product-card-discount-badge{position:absolute;top:6px;left:6px;padding:2px 6px;border-radius:4px;background:var(--_gengage-discount-color);color:#fff;font-size:11px;font-weight:700;line-height:1.3;z-index:1}.gengage-chat-product-card-stock{font-size:11px;font-weight:600;margin-top:2px}.gengage-chat-product-card-stock.is-in-stock{color:var(--_gengage-success-color)}.gengage-chat-product-card-stock.is-out-of-stock{color:#dc2626}.gengage-chat-find-similar-pill{position:absolute;top:8px;right:8px;opacity:0;pointer-events:none;transition:opacity .2s ease;padding:4px 10px;font-size:11px;font-weight:500;font-family:inherit;border:none;border-radius:12px;background:var(--gengage-chat-pill-bg, rgba(0, 0, 0, .7));color:var(--gengage-chat-pill-text, #fff);cursor:pointer;white-space:nowrap;z-index:2}.gengage-chat-product-card-img-wrapper:hover .gengage-chat-find-similar-pill,.gengage-chat-product-details-img-wrap:hover .gengage-chat-find-similar-pill{opacity:1;pointer-events:auto}.gengage-chat-favorite-btn{position:absolute;top:8px;right:8px;background:#ffffffe6;border:none;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gengage-text-secondary, #64748b);z-index:3;transition:color .2s;padding:0}.gengage-chat-favorite-btn:hover,.gengage-chat-favorite-btn--active{color:var(--gengage-accent-primary, #ef4444)}.gengage-chat-product-card-promos,.gengage-chat-product-details-promos{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.gengage-chat-product-card-promo-badge,.gengage-chat-product-details-promo-badge{display:inline-block;padding:2px 6px;font-size:10px;font-weight:500;border-radius:4px;background:var(--gengage-chat-promo-bg, #e8f5e9);color:var(--gengage-chat-promo-text, #2e7d32);white-space:nowrap}.gengage-chat-thumbnails-column{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;z-index:2;pointer-events:auto}.gengage-chat-thumbnail-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:2px solid #e5e7eb;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden;transition:border-color .15s ease}.gengage-chat-thumbnail-btn:hover{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-thumbnail-img{width:100%;height:100%;object-fit:cover}.gengage-chat-choice-prompter{position:absolute;bottom:12px;right:12px;width:200px;padding:12px 14px;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:10px;box-shadow:0 4px 12px #0000001a;z-index:10;animation:gengage-choice-prompter-in .2s ease}@keyframes gengage-choice-prompter-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-choice-prompter-heading{font-size:13px;font-weight:600;color:#1f2937;margin-bottom:4px}.gengage-chat-choice-prompter-suggestion{font-size:12px;color:#6b7280;margin-bottom:10px;line-height:1.4}.gengage-chat-choice-prompter-cta{display:block;width:100%;padding:6px 12px;border:none;border-radius:6px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;text-align:center;transition:opacity .15s ease}.gengage-chat-choice-prompter-cta:hover{opacity:.9}.gengage-chat-choice-prompter-dismiss{position:absolute;top:4px;right:6px;padding:2px 6px;border:none;background:none;color:#6b7280;font-size:16px;cursor:pointer;line-height:1}.gengage-chat-choice-prompter-dismiss:hover{color:#6b7280}@media(prefers-reduced-motion:reduce){.gengage-chat-choice-prompter{animation:none}}.gengage-chat-pros-cons{padding:12px 14px;background:#f8fafc;border-radius:8px;margin:8px 0}.gengage-chat-pros-cons-heading{margin:0 0 10px;font-size:14px;font-weight:600;color:#0f172a}.gengage-chat-pros-cons-list{list-style:none;margin:0 0 8px;padding:0}.gengage-chat-pros-cons-list:last-child{margin-bottom:0}.gengage-chat-pros-cons-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.5;color:#334155}.gengage-chat-pros-cons-icon{flex-shrink:0;width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border-radius:50%}.gengage-chat-pros-cons-icon--pro{color:#16a34a;background:#dcfce7}.gengage-chat-pros-cons-icon--con{color:#dc2626;background:#fee2e2}.gengage-chat-categories{display:flex;flex-direction:column;gap:8px}.gengage-chat-categories-tabs{display:flex;gap:4px;overflow-x:auto;padding:4px 0;-webkit-overflow-scrolling:touch}.gengage-chat-categories-tab{padding:6px 14px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:20px;background:var(--gengage-bg, #fff);color:var(--gengage-text, #374151);cursor:pointer;white-space:nowrap;font-size:13px;transition:background .15s,color .15s}.gengage-chat-categories-tab:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-categories-tab--active{background:var(--gengage-primary, #2563eb);color:#fff;border-color:var(--gengage-primary, #2563eb)}.gengage-chat-categories-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.gengage-chat-categories-filter-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.gengage-chat-categories-filter-tag{padding:4px 10px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:14px;background:var(--gengage-bg, #fff);color:var(--gengage-text-secondary, #6b7280);font-size:12px;cursor:pointer;transition:background .15s}.gengage-chat-categories-filter-tag:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid-view-more{display:block;width:100%;padding:10px;margin-top:8px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:8px;background:var(--gengage-bg, #fff);color:var(--gengage-primary, #2563eb);font-size:14px;font-weight:500;cursor:pointer;text-align:center;transition:background .15s;grid-column:1 / -1}.gengage-chat-product-grid-view-more:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid--mobile{display:flex;overflow-x:auto;gap:8px;padding:8px 0;-webkit-overflow-scrolling:touch}.gengage-chat-product-grid--mobile .gengage-chat-product-card{min-width:160px;max-width:180px;flex-shrink:0}.gengage-chat-comparison--mobile{overflow-x:auto;-webkit-overflow-scrolling:touch}.gengage-chat-comparison--mobile .gengage-chat-comparison-table{min-width:480px}.gengage-chat-comparison-key-differences{margin-top:12px;padding:12px;background:var(--gengage-bg-secondary, #f9fafb);border-radius:8px}.gengage-chat-comparison-key-differences h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-comparison-key-differences-content{font-size:13px;color:var(--gengage-text-secondary, #6b7280);line-height:1.5}.gengage-chat-comparison-key-differences-content ul{margin:0;padding-left:18px}.gengage-chat-comparison-key-differences-content li{margin-bottom:4px}.gengage-chat-product-details-similars-heading{margin:16px 0 8px;font-size:15px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-product-details-similars{margin-top:8px}.gengage-chat-handoff-notice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px;margin:8px 0;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;text-align:center}.gengage-chat-handoff-notice-icon{font-size:24px}.gengage-chat-handoff-notice-heading{margin:0;font-size:14px;font-weight:600;color:#92400e}.gengage-chat-handoff-notice-summary{margin:0;font-size:13px;line-height:1.5;color:#78350f}.gengage-qty-stepper{display:inline-flex;align-items:center;gap:0;border:1px solid #d1d5db;border-radius:8px;overflow:hidden;background:#fff}.gengage-qty-btn{width:var(--_gengage-qty-btn-size);height:var(--_gengage-qty-btn-size);border:none;background:transparent;color:#374151;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .12s}.gengage-qty-btn:hover:not(:disabled){background:#f3f4f6}.gengage-qty-btn:disabled{opacity:.35;cursor:default}.gengage-qty-value{min-width:24px;text-align:center;font-size:13px;font-weight:600;color:#1f2937;-webkit-user-select:none;user-select:none}.gengage-qty-submit{border:none;border-left:1px solid #d1d5db;background:var(--_gengage-success-color);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;padding:6px 12px;transition:filter .12s ease,transform .12s ease}.gengage-qty-submit:hover{filter:brightness(1.08)}.gengage-qty-submit:active{transform:translateY(1px)}.gengage-qty-stepper--compact{border-radius:14px;box-shadow:0 2px 6px #0000001f}.gengage-qty-stepper--compact .gengage-qty-btn{width:var(--_gengage-qty-btn-size-compact);height:var(--_gengage-qty-btn-size-compact);font-size:12px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:18px;font-size:12px}.gengage-qty-stepper--compact .gengage-qty-submit{padding:4px 8px;font-size:13px;border-radius:0 14px 14px 0}.gengage-chat-product-details-atc-stepper{border-radius:10px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:32px;height:32px}.gengage-chat-product-details-atc-stepper .gengage-qty-value{min-width:28px;font-size:14px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{padding:8px 18px;font-size:14px;border-radius:0 10px 10px 0}.gengage-chat-product-details-share{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #d1d5db;border-radius:10px;background:transparent;color:#6b7280;cursor:pointer;transition:color .12s,border-color .12s,background-color .12s;position:relative;flex-shrink:0}.gengage-chat-product-details-share:hover{color:var(--gengage-primary-color, #3b82f6);border-color:var(--gengage-primary-color, #3b82f6);background:#f0f7ff}.gengage-chat-product-details-share:before{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:#1e293b;color:#fff;font-size:11px;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:2}.gengage-chat-product-details-share:hover:before{opacity:1}.gengage-chat-product-details-share--copied:after{content:"✓";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--_gengage-success-color);color:#fff;border-radius:10px;font-size:16px;font-weight:700}.gengage-chat-launcher:focus-visible,.gengage-chat-close:focus-visible,.gengage-chat-header-btn:focus-visible,.gengage-chat-header-powered:focus-visible,.gengage-chat-proactive-accept:focus-visible,.gengage-chat-proactive-dismiss:focus-visible,.gengage-chat-send:focus-visible,.gengage-chat-action-btn:focus-visible,.gengage-chat-pill:focus-visible,.gengage-chat-input-chip:focus-visible,.gengage-chat-pills-arrow:focus-visible,.gengage-chat-error-retry:focus-visible,.gengage-chat-product-card-cta:focus-visible,.gengage-chat-product-details-cta:focus-visible,.gengage-chat-product-details-atc:focus-visible,.gengage-chat-product-detail-tab:focus-visible,.gengage-chat-panel-divider-toggle:focus-visible,.gengage-chat-panel-topbar-back:focus-visible,.gengage-chat-panel-topbar-forward:focus-visible,.gengage-chat-rollback-btn:focus-visible,.gengage-chat-ai-toppick-cta:focus-visible,.gengage-chat-comparison-view-btn:focus-visible,.gengage-chat-comparison-toggle-btn:focus-visible,.gengage-chat-comparison-floating-btn:focus-visible,.gengage-chat-comparison-checkbox:focus-visible,.gengage-chat-product-sort-btn:focus-visible,.gengage-chat-product-variant-btn:focus-visible,.gengage-chat-product-gallery-thumb:focus-visible,.gengage-chat-thumbnail-btn:focus-visible,.gengage-chat-find-similar-pill:focus-visible,.gengage-chat-favorite-btn:focus-visible,.gengage-chat-attach-btn:focus-visible,.gengage-chat-mic-btn:focus-visible,.gengage-chat-attachment-remove:focus-visible,.gengage-chat-kvkk-dismiss:focus-visible,.gengage-chat-choice-prompter-cta:focus-visible,.gengage-chat-choice-prompter-dismiss:focus-visible,.gengage-chat-categories-tab:focus-visible,.gengage-chat-categories-filter-tag:focus-visible,.gengage-chat-product-grid-view-more:focus-visible,.gengage-chat-product-details-share:focus-visible,.gengage-qty-btn:focus-visible,.gengage-qty-submit:focus-visible{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:2px}@media(max-width:768px){.gengage-chat-choice-prompter{left:12px;right:12px;width:auto;max-width:none;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 12px + env(safe-area-inset-bottom,0px))}.gengage-chat-product-sort-btn,.gengage-chat-comparison-toggle-btn{min-height:40px}.gengage-chat-input-chip{min-height:40px;padding:8px 12px}.gengage-chat-choice-prompter-dismiss{width:32px;height:32px}.gengage-chat-panel-divider-toggle{min-height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:44px;height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit,.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px}.gengage-qty-stepper--compact .gengage-qty-submit{min-width:44px;padding:0 10px}.gengage-qty-stepper--compact .gengage-qty-btn{width:44px;height:44px;font-size:14px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-chat-product-card-cta,.gengage-chat-choice-prompter-cta,.gengage-chat-product-grid-view-more{min-height:44px;display:flex;align-items:center;justify-content:center}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward,.gengage-chat-favorite-btn,.gengage-chat-product-details-share{width:44px;height:44px}}';function or(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function G(e,t){const n={event:e,...t};or()&&window.dataLayer.push(n)}function rr(e){G("gengage-on-init",{gengage_widget:e})}function sr(e){G("gengage-show",{gengage_widget:e})}function cr(e,t){G("gengage-suggested-question",{gengage_question_title:e,gengage_action_type:t})}function lr(e){G("gengage-find-similars",{gengage_sku:e})}function dr(e){G("gengage-compare-preselection",{gengage_sku:e})}function Yt(e){G("gengage-compare-selected",{gengage_skus:e,gengage_product_count:e.length})}function gr(){G("gengage-compare-clear")}function pr(e){G("gengage-compare-received",{gengage_product_count:e})}function ur(e){G("gengage-like-product",{gengage_sku:e})}function hr(){G("gengage-like-list")}function fr(e,t){G("gengage-search",{gengage_search_query:e,gengage_result_count:t})}function mr(e,t){G("gengage-product-detail",{gengage_sku:e,gengage_product_name:t})}function br(e,t){G("gengage-cart-add",{gengage_sku:e,gengage_quantity:t})}function _r(){G("gengage-message-sent")}function Xt(){G("gengage-message-received")}function vr(){G("gengage-conversation-start")}function yr(){G("gengage-voice-input")}function m(e,t,n){function a(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:r,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);const l=r.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){const g=d[u];g in s||(s[g]=l[g].bind(s))}}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function r(s){var c;const l=n?.Parent?new o:this;a(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(r,"init",{value:a}),Object.defineProperty(r,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class Ce extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qt extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const en={};function pe(e){return en}function tn(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,i])=>t.indexOf(+a)===-1).map(([a,i])=>i)}function tt(e,t){return typeof t=="bigint"?t.toString():t}function nt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function at(e){return e==null}function it(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function wr(e,t){const n=(e.toString().split(".")[1]||"").length,a=t.toString();let i=(a.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(a)){const c=a.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}const o=n>i?n:i,r=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return r%s/10**o}const nn=Symbol("evaluating");function D(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==nn)return a===void 0&&(a=nn,a=n()),a},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ue(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function an(e){return JSON.stringify(e)}function xr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const on="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const kr=nt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ee(e){if($e(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!($e(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function rn(e){return Ee(e)?{...e}:Array.isArray(e)?[...e]:e}const Cr=new Set(["string","number","symbol"]);function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Er(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Sr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Tr(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=ue(e._zod.def,{get shape(){const r={};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(r[s]=n.shape[s])}return ye(this,"shape",r),r},checks:[]});return he(e,o)}function Ir(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=ue(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete r[s]}return ye(this,"shape",r),r},checks:[]});return he(e,o)}function zr(e,t){if(!Ee(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=ue(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return ye(this,"shape",o),o}});return he(e,i)}function Pr(e,t){if(!Ee(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ue(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ye(this,"shape",a),a}});return he(e,n)}function Ar(e,t){const n=ue(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return ye(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return he(e,n)}function Nr(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=ue(t._zod.def,{get shape(){const s=t._zod.def.shape,c={...s};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return ye(this,"shape",c),c},checks:[]});return he(t,r)}function Lr(e,t,n){const a=ue(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:i[r]}))}else for(const r in i)o[r]=new e({type:"nonoptional",innerType:i[r]});return ye(this,"shape",o),o}});return he(t,a)}function Se(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Te(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function Be(e){return typeof e=="string"?e:e?.message}function fe(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const i=Be(e.inst?._zod.def?.error?.(e))??Be(t?.error?.(e))??Be(n.customError?.(e))??Be(n.localeError?.(e))??"Invalid input";a.message=i}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function ot(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ae(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const sn=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cn=m("$ZodError",sn),ln=m("$ZodError",sn,{Parent:Error});function Mr(e,t=n=>n.message){const n={},a=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):a.push(t(i));return{formErrors:a,fieldErrors:n}}function $r(e,t=n=>n.message){const n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>a({issues:r}));else if(o.code==="invalid_key")a({issues:o.issues});else if(o.code==="invalid_element")a({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,s=0;for(;s<o.path.length;){const c=o.path[s];s===o.path.length-1?(r[c]=r[c]||{_errors:[]},r[c]._errors.push(t(o))):r[c]=r[c]||{_errors:[]},r=r[c],s++}}};return a(e),n}const rt=e=>(t,n,a,i)=>{const o=a?Object.assign(a,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new Ce;if(r.issues.length){const s=new(i?.Err??e)(r.issues.map(c=>fe(c,o,pe())));throw on(s,i?.callee),s}return r.value},st=e=>async(t,n,a,i)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const s=new(i?.Err??e)(r.issues.map(c=>fe(c,o,pe())));throw on(s,i?.callee),s}return r.value},De=e=>(t,n,a)=>{const i=a?{...a,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Ce;return o.issues.length?{success:!1,error:new(e??cn)(o.issues.map(r=>fe(r,i,pe())))}:{success:!0,data:o.value}},Or=De(ln),Re=e=>async(t,n,a)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>fe(r,i,pe())))}:{success:!0,data:o.value}},Br=Re(ln),Dr=e=>(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return rt(e)(t,n,i)},Rr=e=>(t,n,a)=>rt(e)(t,n,a),Ur=e=>async(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return st(e)(t,n,i)},Zr=e=>async(t,n,a)=>st(e)(t,n,a),jr=e=>(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return De(e)(t,n,i)},Fr=e=>(t,n,a)=>De(e)(t,n,a),qr=e=>async(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Re(e)(t,n,i)},Hr=e=>async(t,n,a)=>Re(e)(t,n,a),Vr=/^[cC][^\s-]{8,}$/,Gr=/^[0-9a-z]+$/,Wr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kr=/^[0-9a-vA-V]{20}$/,Jr=/^[A-Za-z0-9]{27}$/,Yr=/^[a-zA-Z0-9_-]{21}$/,Xr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,es=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ts="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ns(){return new RegExp(ts,"u")}const as=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,is=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,os=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ss=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,gn=/^[A-Za-z0-9_-]*$/,cs=/^\+[1-9]\d{6,14}$/,pn="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ls=new RegExp(`^${pn}$`);function un(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ds(e){return new RegExp(`^${un(e)}$`)}function gs(e){const t=un({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${n.join("|")})`;return new RegExp(`^${pn}T(?:${a})$`)}const ps=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},us=/^-?\d+$/,hn=/^-?\d+(?:\.\d+)?$/,hs=/^(?:true|false)$/i,fs=/^[^A-Z]*$/,ms=/^[^a-z]*$/,Y=m("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fn={number:"number",bigint:"bigint",object:"date"},mn=m("$ZodCheckLessThan",(e,t)=>{Y.init(e,t);const n=fn[typeof t.value];e._zod.onattach.push(a=>{const i=a._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bn=m("$ZodCheckGreaterThan",(e,t)=>{Y.init(e,t);const n=fn[typeof t.value];e._zod.onattach.push(a=>{const i=a._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bs=m("$ZodCheckMultipleOf",(e,t)=>{Y.init(e,t),e._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):wr(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_s=m("$ZodCheckNumberFormat",(e,t)=>{Y.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),a=n?"int":"number",[i,o]=Sr[t.format];e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,s.minimum=i,s.maximum=o,n&&(s.pattern=us)}),e._zod.check=r=>{const s=r.value;if(n){if(!Number.isInteger(s)){r.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?r.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):r.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}s<i&&r.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&r.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),vs=m("$ZodCheckMaxLength",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const i=a.value;if(i.length<=t.maximum)return;const r=ot(i);a.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ys=m("$ZodCheckMinLength",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const i=a.value;if(i.length>=t.minimum)return;const r=ot(i);a.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ws=m("$ZodCheckLengthEquals",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=a=>{const i=a.value,o=i.length;if(o===t.length)return;const r=ot(i),s=o>t.length;a.issues.push({origin:r,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),Ue=m("$ZodCheckStringFormat",(e,t)=>{var n,a;Y.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),xs=m("$ZodCheckRegex",(e,t)=>{Ue.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ks=m("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=fs),Ue.init(e,t)}),Cs=m("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ms),Ue.init(e,t)}),Es=m("$ZodCheckIncludes",(e,t)=>{Y.init(e,t);const n=Oe(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=a,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),Ss=m("$ZodCheckStartsWith",(e,t)=>{Y.init(e,t);const n=new RegExp(`^${Oe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),Ts=m("$ZodCheckEndsWith",(e,t)=>{Y.init(e,t);const n=new RegExp(`.*${Oe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),Is=m("$ZodCheckOverwrite",(e,t)=>{Y.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class zs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(`
|
|
58
|
+
`).filter(n=>n.trim());return t.length<=1?e:"<ul>"+t.map(n=>`<li>${n.trim()}</li>`).join("")+"</ul>"}function so(e,t){const n=oe(t);if(!n)return;const a=document.createElement("template");a.innerHTML=n;const i=Array.from(a.content.querySelectorAll("li"));if(i.length>0){for(const r of i){const s=document.createElement("li");s.innerHTML=oe(r.innerHTML),e.appendChild(s)}return}const o=document.createElement("li");co(t)?o.innerHTML=n:o.textContent=t,e.appendChild(o)}function co(e){return/<\/?[a-z][\s\S]*>/i.test(e)}function lo(e,t){const n=document.createElement("div");n.className="gengage-chat-review-highlights";const a=e.props?.reviews;if(!Array.isArray(a)||a.length===0){const g=document.createElement("div");return g.className="gengage-chat-review-empty",g.textContent=t?.emptyReviewsMessage??"Yorum özeti bulunamadı.",n.appendChild(g),n}const i=a.filter(g=>g!==null&&typeof g=="object"),o={all:i.length,positive:0,negative:0,neutral:0};for(const g of i)g.review_class==="positive"?o.positive++:g.review_class==="negative"?o.negative++:o.neutral++;const r=document.createElement("div");r.className="gengage-chat-review-tabs";const s=[{label:`Tümü (${o.all})`,filter:"all"}];o.positive>0&&s.push({label:`Olumlu (${o.positive})`,filter:"positive"}),o.negative>0&&s.push({label:`Olumsuz (${o.negative})`,filter:"negative"});let c="all";const l=document.createElement("div");l.className="gengage-chat-review-items";function d(){for(;l.firstChild;)l.removeChild(l.firstChild);const g=c==="all"?i:i.filter(p=>p.review_class===c);for(const p of g){const h=document.createElement("article");h.className="gengage-chat-review-item";const _=p.review_class;if((_==="positive"||_==="negative"||_==="neutral")&&(h.dataset.tone=_),typeof p.review_tag=="string"&&p.review_tag.length>0){const v=document.createElement("div");v.className="gengage-chat-review-tag",v.textContent=p.review_tag,h.appendChild(v)}if(typeof p.review_text=="string"&&p.review_text.length>0){const v=document.createElement("div");v.className="gengage-chat-review-text",v.textContent=p.review_text,h.appendChild(v)}if(p.review_rating!==void 0&&String(p.review_rating).length>0){const v=document.createElement("div");v.className="gengage-chat-review-rating",v.textContent=String(p.review_rating),h.appendChild(v)}l.appendChild(h)}}for(const g of s){const p=document.createElement("button");p.className="gengage-chat-review-tab",p.type="button",p.textContent=g.label,g.filter===c&&p.classList.add("gengage-chat-review-tab--active"),p.addEventListener("click",()=>{c=g.filter;for(const h of r.querySelectorAll(".gengage-chat-review-tab"))h.classList.toggle("gengage-chat-review-tab--active",h===p);d()}),r.appendChild(p)}n.appendChild(r);const u=new Map;for(const g of i)if(typeof g.review_tag=="string"&&g.review_tag.length>0){const p=u.get(g.review_tag);p?p.count++:u.set(g.review_tag,{count:1,sentiment:g.review_class??"neutral"})}if(u.size>0){const g=document.createElement("div");g.className="gengage-chat-review-pills";for(const[p,h]of u){const _=document.createElement("span");_.className="gengage-chat-review-pill",_.dataset.tone=h.sentiment;const v=document.createElement("span");v.className="gengage-chat-review-pill-icon",v.textContent=h.sentiment==="positive"?"✓":h.sentiment==="negative"?"✕":"●",_.appendChild(v);const E=document.createElement("span");if(E.textContent=p,_.appendChild(E),h.count>1){const I=document.createElement("span");I.className="gengage-chat-review-pill-count",I.textContent=String(h.count),_.appendChild(I)}g.appendChild(_)}n.appendChild(g)}return d(),n.appendChild(l),n}function Ye(e){return Number.isFinite(e)?Math.max(0,Math.min(5,e)):0}function Xe(e){return Number.isFinite(e)?Math.max(0,Math.min(100,Math.round(e))):0}function Mt(e,t=!0){const n=Ye(e);if(t){const i=Math.floor(n),o=n-i>=.5?1:0,r=5-i-o;return"★".repeat(i)+(o?"½":"")+"☆".repeat(r)}const a=Math.round(n);return"★".repeat(a)+"☆".repeat(5-a)}function ve(e){e.addEventListener("error",()=>{e.style.display="none"},{once:!0})}function $t(e){const t=e.product.sku;if(typeof t=="string"&&t.length>0)return t;const n=e.action?.payload;return n&&typeof n=="object"&&"sku"in n&&typeof n.sku=="string"?n.sku:null}const go={winner:"roleWinner",best_value:"roleBestValue",best_alternative:"roleBestAlternative"};function Ot(e,t){if(!e||!t)return null;const n=go[e];return n?t[n]??e:e}function po(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-top-picks";const a=e.props?.suggestions??[];if(a.length===0)return n;const i=document.createElement("h3");i.className="gengage-chat-ai-top-picks-title",i.textContent=t.i18n?.aiTopPicksTitle??"Top Picks",n.appendChild(i);const o=document.createElement("div");o.className="gengage-chat-ai-top-picks-cards";for(let r=0;r<a.length;r++){const s=a[r],l=s.role==="winner"||r===0?uo(s,t):ho(s,t);o.appendChild(l)}return n.appendChild(o),n}function uo(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--winner";const a=document.createElement("span");a.className="gengage-chat-ai-toppick-badge",a.textContent=Ot(e.role,t.i18n)??t.i18n?.roleWinner??"TOP MATCH",n.appendChild(a);const i=e.product,o=i.discountPercent;if(typeof o=="number"&&o>0){const u=document.createElement("span");u.className="gengage-chat-ai-toppick-discount-badge",u.textContent=`%${Xe(o)}`,n.appendChild(u)}const r=i.imageUrl;if(r&&ce(r)){const u=document.createElement("img");u.className="gengage-chat-ai-toppick-img",V(u,"src",r),u.alt=i.name??"",ve(u),n.appendChild(u)}const s=document.createElement("div");s.className="gengage-chat-ai-toppick-body";const c=i.name;if(c){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-name",u.textContent=c,s.appendChild(u)}if(e.reason){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-reason",u.textContent=e.reason,s.appendChild(u)}if(e.labels&&e.labels.length>0&&s.appendChild(Bt(e.labels)),typeof e.expertQualityScore=="number"){const u=document.createElement("div");u.className="gengage-chat-ai-toppick-score";const g=e.expertQualityScore<=5?5:10;u.textContent=`${e.expertQualityScore}/${g}`,s.appendChild(u)}if(e.reviewHighlight){const u=document.createElement("blockquote");u.className="gengage-chat-ai-toppick-review",u.textContent=e.reviewHighlight,s.appendChild(u)}const l=i.price,d=i.originalPrice;if(l){const u=document.createElement("div");if(u.className="gengage-chat-ai-toppick-price",d&&d!==l){const p=document.createElement("span");p.className="gengage-chat-ai-toppick-original-price",p.textContent=J(d,t.pricing),u.appendChild(p),u.appendChild(document.createTextNode(" "))}const g=document.createElement("span");g.textContent=J(l,t.pricing),u.appendChild(g),s.appendChild(u)}if(n.appendChild(s),e.action){const u=$t(e),g=i.url??"",p=document.createElement("div");p.className="gengage-chat-ai-toppick-spinner",p.style.display=u&&t.topPicksLoadingSku===u?"":"none",n.appendChild(p);const h=document.createElement("button");h.className="gengage-chat-ai-toppick-cta",h.type="button",h.textContent=t.i18n?.viewDetails??"View Details",h.addEventListener("click",()=>{if(e.action?.type==="findSimilar"&&u&&t.onProductClick){t.onProductClick({sku:u,url:g});return}t.onAction(e.action)}),n.appendChild(h)}return n}function ho(e,t){const n=document.createElement("div");n.className="gengage-chat-ai-toppick-card gengage-chat-ai-toppick-card--compact";const a=e.product,i=a.discountPercent;if(typeof i=="number"&&i>0){const d=document.createElement("span");d.className="gengage-chat-ai-toppick-discount-badge",d.textContent=`%${Xe(i)}`,n.appendChild(d)}const o=a.imageUrl;if(o&&ce(o)){const d=document.createElement("img");d.className="gengage-chat-ai-toppick-img",V(d,"src",o),d.alt=a.name??"",ve(d),n.appendChild(d)}const r=document.createElement("div");r.className="gengage-chat-ai-toppick-body";const s=Ot(e.role,t.i18n);if(s){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-role",d.textContent=s,r.appendChild(d)}const c=a.name;if(c){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-name",d.textContent=c,r.appendChild(d)}if(e.reason){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-reason",d.textContent=e.reason,r.appendChild(d)}e.labels&&e.labels.length>0&&r.appendChild(Bt(e.labels));const l=a.price;if(l){const d=document.createElement("div");d.className="gengage-chat-ai-toppick-price",d.textContent=J(l,t.pricing),r.appendChild(d)}if(n.appendChild(r),e.action){const d=$t(e),u=a.url??"",g=document.createElement("div");g.className="gengage-chat-ai-toppick-spinner",g.style.display=d&&t.topPicksLoadingSku===d?"":"none",n.appendChild(g);const p=document.createElement("button");p.className="gengage-chat-ai-toppick-cta",p.type="button",p.textContent=t.i18n?.viewDetails??"View Details",p.addEventListener("click",()=>{if(e.action?.type==="findSimilar"&&d&&t.onProductClick){t.onProductClick({sku:d,url:u});return}t.onAction(e.action)}),n.appendChild(p)}return n}function Bt(e){const t=document.createElement("div");t.className="gengage-chat-ai-toppick-labels";for(const n of e){const a=document.createElement("span");a.className="gengage-chat-ai-toppick-label",a.dataset.sentiment=n.sentiment??"neutral",a.textContent=n.label,t.appendChild(a)}return t}function fo(e,t){const n=document.createElement("div");n.className="gengage-chat-grounding-review";const a=e.props??{},i=a.title,o=a.reviewCount,r=a.action,s=t.i18n?.groundingReviewCta??"Yorumları Oku",c=document.createElement("span");c.className="gengage-chat-grounding-review-icon",c.textContent="📋",n.appendChild(c);const l=document.createElement("div");l.className="gengage-chat-grounding-review-body";const d=document.createElement("div");if(d.className="gengage-chat-grounding-review-title",d.textContent=i??"Müşteri Yorumları",l.appendChild(d),o){const g=document.createElement("div");g.className="gengage-chat-grounding-review-subtitle";const p=t.i18n?.groundingReviewSubtitle??"{count} yorum mevcut";g.textContent=p.replace("{count}",o),l.appendChild(g)}n.appendChild(l);const u=document.createElement("span");return u.className="gengage-chat-grounding-review-cta",u.textContent=`${s} →`,n.appendChild(u),r&&(n.style.cursor="pointer",n.addEventListener("click",()=>t.onAction(r))),n}function mo(e){if(e.action.type!=="findSimilar")return e.action;const t=e.action.payload&&typeof e.action.payload=="object"?e.action.payload:null,n=typeof t?.input=="string"&&t.input.trim()||typeof t?.text=="string"&&t.text.trim()||e.name.trim();if(!n)return e.action;const a={text:n,is_suggested_text:1};if(typeof t?.sku=="string"&&t.sku.trim()&&(a.sku=t.sku),Array.isArray(t?.group_skus)){const i=t.group_skus.filter(o=>typeof o=="string"&&o.length>0);i.length>0&&(a.group_skus=i)}return{title:e.action.title,type:"inputText",payload:a}}function bo(e,t){const n=document.createElement("div");n.className="gengage-chat-grouping-cards";const a=e.props?.entries??[];if(a.length===0)return n;for(const i of a){const o=document.createElement("div");if(o.className="gengage-chat-grouping-card",o.style.cursor="pointer",o.addEventListener("click",()=>t.onAction(mo(i))),i.image&&ce(i.image)){const l=document.createElement("img");l.className="gengage-chat-grouping-card-img",l.src=i.image,l.alt=i.name,l.width=20,l.height=20,o.appendChild(l)}const r=document.createElement("div");r.className="gengage-chat-grouping-card-body";const s=document.createElement("span");if(s.className="gengage-chat-grouping-card-name",s.textContent=i.name,r.appendChild(s),i.description){const l=document.createElement("span");l.className="gengage-chat-grouping-card-desc",l.textContent=i.description,r.appendChild(l)}if(i.labels&&i.labels.length>0){const l=document.createElement("span");l.className="gengage-chat-grouping-card-labels",l.textContent=i.labels.slice(0,3).join(" · "),r.appendChild(l)}o.appendChild(r);const c=document.createElement("span");c.className="gengage-chat-grouping-card-arrow",c.textContent="↳",o.insertBefore(c,o.firstChild),n.appendChild(o)}return n}function _o(e,t){const n=document.createElement("div");n.className="gengage-chat-suggested-search-cards";const a=e.props?.entries??[];if(a.length===0)return n;for(const i of a){const o=document.createElement("div");if(o.className="gengage-chat-suggested-search-card",o.style.cursor="pointer",o.addEventListener("click",()=>t.onAction(i.action)),i.image&&ce(i.image)){const c=document.createElement("img");c.className="gengage-chat-suggested-search-card-img",c.src=i.image,c.alt=i.shortName,c.width=40,c.height=40,o.appendChild(c)}const r=document.createElement("div");r.className="gengage-chat-suggested-search-card-body";const s=document.createElement("div");if(s.className="gengage-chat-suggested-search-card-name",s.textContent=i.shortName,r.appendChild(s),i.detailedMessage){const c=document.createElement("div");c.className="gengage-chat-suggested-search-card-desc",c.textContent=i.detailedMessage,r.appendChild(c)}if(i.whyDifferent){const c=document.createElement("div");c.className="gengage-chat-suggested-search-card-diff",c.textContent=i.whyDifferent,r.appendChild(c)}o.appendChild(r),n.appendChild(o)}return n}function vo(e,t){const n=document.createElement("button");n.className="gengage-chat-comparison-floating-btn",n.type="button";const a=t.i18n?.compareSelected??"Karşılaştır";return n.textContent=`${a} (${e.length})`,n.addEventListener("click",()=>{t.onAction({title:a,type:"getComparisonTable",payload:{sku_list:[...e]}})}),n}function yo(e){const t=document.createElement("div");t.className="gengage-chat-pros-cons";const n=e.props?.productName;if(n){const o=document.createElement("h4");o.className="gengage-chat-pros-cons-heading",o.textContent=n,t.appendChild(o)}const a=e.props?.pros,i=e.props?.cons;if(a&&a.length>0){const o=document.createElement("ul");o.className="gengage-chat-pros-cons-list";for(const r of a){const s=document.createElement("li");s.className="gengage-chat-pros-cons-item";const c=document.createElement("span");c.className="gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--pro",c.textContent="✓",s.appendChild(c);const l=document.createElement("span");l.textContent=r,s.appendChild(l),o.appendChild(s)}t.appendChild(o)}if(i&&i.length>0){const o=document.createElement("ul");o.className="gengage-chat-pros-cons-list";for(const r of i){const s=document.createElement("li");s.className="gengage-chat-pros-cons-item";const c=document.createElement("span");c.className="gengage-chat-pros-cons-icon gengage-chat-pros-cons-icon--con",c.textContent="✗",s.appendChild(c);const l=document.createElement("span");l.textContent=r,s.appendChild(l),o.appendChild(s)}t.appendChild(o)}return t}function wo(e,t){const n=e.props?.groups??[],a=e.props?.filterTags??[],i=document.createElement("div");if(i.className="gengage-chat-categories",n.length===0)return i;const o=document.createElement("div");o.className="gengage-chat-categories-tabs",o.setAttribute("role","tablist");const r=[],s=[],c=l=>{for(let d=0;d<r.length;d++){const u=d===l;r[d].classList.toggle("gengage-chat-categories-tab--active",u),r[d].setAttribute("aria-selected",String(u)),r[d].tabIndex=u?0:-1,s[d].style.display=u?"":"none"}};for(let l=0;l<n.length;l++){const d=n[l],u=`gengage-cat-tab-${l}`,g=`gengage-cat-panel-${l}`,p=document.createElement("button");p.className="gengage-chat-categories-tab",p.type="button",p.id=u,p.setAttribute("role","tab"),p.setAttribute("aria-controls",g),p.setAttribute("aria-selected",String(l===0)),p.tabIndex=l===0?0:-1,l===0&&p.classList.add("gengage-chat-categories-tab--active"),p.textContent=d.groupName,p.addEventListener("click",()=>c(l)),p.addEventListener("keydown",_=>{let v=-1;_.key==="ArrowRight"||_.key==="ArrowDown"?v=(l+1)%n.length:_.key==="ArrowLeft"||_.key==="ArrowUp"?v=(l-1+n.length)%n.length:_.key==="Home"?v=0:_.key==="End"&&(v=n.length-1),v>=0&&(_.preventDefault(),c(v),r[v].focus())}),r.push(p),o.appendChild(p);const h=document.createElement("div");h.className="gengage-chat-categories-grid",h.id=g,h.setAttribute("role","tabpanel"),h.setAttribute("aria-labelledby",u),l!==0&&(h.style.display="none");for(const _ of d.products){const v=xo(_,t);h.appendChild(v)}s.push(h)}i.appendChild(o);for(const l of s)i.appendChild(l);if(a.length>0){const l=document.createElement("div");l.className="gengage-chat-categories-filter-tags";for(const d of a){const u=document.createElement("button");u.className="gengage-chat-categories-filter-tag",u.type="button",u.textContent=d.title,d.action&&u.addEventListener("click",()=>{t.onAction(d.action)}),l.appendChild(u)}i.appendChild(l)}return i}function xo(e,t){const n=document.createElement("div");if(n.className="gengage-chat-product-card",e.imageUrl&&ce(e.imageUrl)){const o=document.createElement("img");o.className="gengage-chat-product-card-img",o.src=e.imageUrl,o.alt=e.name,n.appendChild(o)}const a=document.createElement("div");a.className="gengage-chat-product-card-body";const i=document.createElement("div");if(i.className="gengage-chat-product-card-name",i.textContent=e.name,a.appendChild(i),e.price){const o=document.createElement("div");o.className="gengage-chat-product-card-price",o.textContent=e.price,a.appendChild(o)}return n.appendChild(a),t.onProductSelect&&(n.style.cursor="pointer",n.addEventListener("click",()=>{t.onProductSelect?.(e)})),n}function ko(e,t){const n=document.createElement("div");n.className="gengage-chat-handoff-notice",n.setAttribute("role","alert");const a=document.createElement("span");a.className="gengage-chat-handoff-notice-icon",a.textContent="👤",a.setAttribute("aria-hidden","true"),n.appendChild(a);const i=document.createElement("h4");i.className="gengage-chat-handoff-notice-heading",i.textContent=t.i18n?.handoffHeading??"Transferring to a support agent",n.appendChild(i);const o=e.props?.summary;if(o){const r=document.createElement("p");r.className="gengage-chat-handoff-notice-summary",r.textContent=o,n.appendChild(r)}return n}function Co(e,t){const n=e.props?.product??e.props,a=document.createElement("div");if(a.className="gengage-chat-product-summary",!n)return a;a.style.cursor="pointer",a.addEventListener("click",p=>{p.target.closest("a")||t.onProductSelect?.(n)});const i=n.imageUrl;if(i&&ie(i)){const p=document.createElement("div");p.className="gengage-chat-product-summary__image";const h=document.createElement("img");V(h,"src",i);const _=n.name;_&&(h.alt=_),ve(h),p.appendChild(h),a.appendChild(p)}const o=document.createElement("div");o.className="gengage-chat-product-summary__content";const r=n.brand,s=n.name;if(s){const p=document.createElement("div");p.className="gengage-chat-product-summary__name";const h=r&&!s.toLowerCase().startsWith(r.toLowerCase());p.textContent=h?`${r} ${s}`:s,o.appendChild(p)}const c=n.rating,l=n.reviewCount;if(typeof c=="number"&&Number.isFinite(c)&&c>0){const p=document.createElement("div");if(p.className="gengage-chat-product-summary__rating",p.textContent=Mt(Ye(c)),typeof l=="number"&&Number.isFinite(l)){const h=document.createElement("span");h.className="gengage-chat-product-summary__review-count",h.textContent=` (${l})`,p.appendChild(h)}o.appendChild(p)}const d=n.price,u=n.originalPrice;if(d){const p=document.createElement("div");if(p.className="gengage-chat-product-summary__price",u&&u!==d){const _=document.createElement("span");_.className="gengage-chat-product-summary__price-original",_.textContent=J(u,t.pricing),p.appendChild(_),p.appendChild(document.createTextNode(" "))}const h=document.createElement("span");h.className="gengage-chat-product-summary__price-current",h.textContent=J(d,t.pricing),p.appendChild(h),o.appendChild(p)}a.appendChild(o);const g=n.url;if(g&&ie(g)){const p=document.createElement("a");p.className="gengage-chat-product-summary__cta",V(p,"href",g),V(p,"target","_blank"),V(p,"rel","noopener noreferrer"),p.textContent=t.i18n?.productCtaLabel??"İncele",a.appendChild(p)}return a}function Dt(e){const t=e.min??1,n=e.max??99,a=Math.min(t,n),i=Math.max(t,n),o=Math.max(a,Math.min(i,e.initial??a)),r=e.compact??!1;let s=o;const c=document.createElement("div");c.className=`gengage-qty-stepper${r?" gengage-qty-stepper--compact":""}`;const l=document.createElement("button");l.className="gengage-qty-btn",l.type="button",l.textContent=e.decreaseSymbol??"−",l.setAttribute("aria-label",e.decreaseLabel??"Azalt");const d=document.createElement("span");d.className="gengage-qty-value",d.textContent=String(s),d.setAttribute("aria-live","polite"),d.setAttribute("aria-atomic","true");const u=document.createElement("button");u.className="gengage-qty-btn",u.type="button",u.textContent=e.increaseSymbol??"+",u.setAttribute("aria-label",e.increaseLabel??"Artır");const g=document.createElement("button");g.className="gengage-qty-submit",g.type="button",r?(g.textContent=e.submitIcon??"🛒",g.title=e.label??"Sepete Ekle"):g.textContent=e.label??"Sepete Ekle";function p(){l.disabled=s<=a,u.disabled=s>=i}return l.addEventListener("click",h=>{h.stopPropagation(),s>a&&(s--,d.textContent=String(s),p())}),u.addEventListener("click",h=>{h.stopPropagation(),s<i&&(s++,d.textContent=String(s),p())}),g.addEventListener("click",h=>{h.stopPropagation(),e.onSubmit(s)}),c.addEventListener("click",h=>{h.stopPropagation()}),p(),c.appendChild(l),c.appendChild(d),c.appendChild(u),c.appendChild(g),c}function Rt(){return window.innerWidth<768}const Ut={ActionButtons:({element:e,context:t})=>Eo(e,t),ActionButton:({element:e,context:t})=>So(e,t),ProductCard:({element:e,context:t})=>To(e,t),ProductDetailsPanel:({element:e,context:t})=>Io(e,t),ProductGrid:({element:e,spec:t,renderElement:n,context:a})=>Ao(e,t,n,a),ReviewHighlights:({element:e,context:t})=>lo(e,{emptyReviewsMessage:t.i18n?.emptyReviewsMessage}),ComparisonTable:({element:e,context:t})=>No(e,t),AITopPicks:({element:e,context:t})=>po(e,t),GroundingReviewCard:({element:e,context:t})=>fo(e,t),AIGroupingCards:({element:e,context:t})=>bo(e,t),AISuggestedSearchCards:({element:e,context:t})=>_o(e,t),ProsAndCons:({element:e})=>yo(e),CategoriesContainer:({element:e,context:t})=>wo(e,t),HandoffNotice:({element:e,context:t})=>ko(e,t),ProductSummaryCard:({element:e,context:t})=>Co(e,t),Divider:({element:e})=>Lo(e)},Qe=({element:e,renderElement:t})=>{if(!e.children||e.children.length===0)return null;const n=document.createElement("div");for(const a of e.children){const i=t(a);i&&n.appendChild(i)}return n};function Zt(){return{...Ut}}function jt(e,t,n=Ut,a=Qe){return ta({spec:e,context:t,registry:n,containerClassName:"gengage-chat-uispec",unknownRenderer:a})}function Eo(e,t){const n=document.createElement("div");n.className="gengage-chat-action-buttons";const a=e.props?.buttons;if(a)for(const i of a){const o=document.createElement("button");o.className="gengage-chat-action-btn",o.textContent=i.label,o.addEventListener("click",()=>t.onAction(i.action)),n.appendChild(o)}return n}function So(e,t){const n=document.createElement("button");n.className="gengage-chat-action-btn";const a=e.props?.label;typeof a=="string"&&(n.textContent=a);const i=e.props?.action;return i&&n.addEventListener("click",()=>t.onAction(i)),n}function To(e,t){const n=document.createElement("div");n.className="gengage-chat-product-card";const a=e.props?.product??e.props;if(!a)return n;const i=a.sku;i&&(n.dataset.sku=i),t.onProductSelect&&(n.style.cursor="pointer",n.addEventListener("click",y=>{y.target.closest(".gengage-chat-product-card-atc")||y.target.closest(".gengage-chat-product-card-cta")||t.onProductSelect?.(a)}));const o=a.imageUrl;if(o&&ie(o)){const y=document.createElement("div");y.className="gengage-chat-product-card-img-wrapper";const f=document.createElement("img");f.className="gengage-chat-product-card-img",f.loading="lazy",V(f,"src",o);const P=a.name;P&&(f.alt=P),ve(f),y.appendChild(f);const A=a.discountPercent;if(typeof A=="number"&&A>0){const C=document.createElement("span");C.className="gengage-chat-product-card-discount-badge",C.textContent=`%${Xe(A)}`,y.appendChild(C)}const b=a.sku;if(b){const C=document.createElement("button");C.className="gengage-chat-find-similar-pill",C.type="button",C.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",C.addEventListener("click",w=>{w.stopPropagation(),t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:b,...o?{image_url:o}:{}}})}),y.appendChild(C)}const x=a.sku;if(x&&t.onFavoriteToggle){const C=document.createElement("button");C.className="gengage-chat-favorite-btn",C.type="button",C.setAttribute("aria-label","Favorilere ekle");const w=t.favoritedSkus?.has(x)??!1;w&&C.classList.add("gengage-chat-favorite-btn--active");const M=w?"currentColor":"none";C.innerHTML=`<svg width="16" height="16" viewBox="0 0 24 24" fill="${M}" stroke="currentColor" stroke-width="2"><path 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"/></svg>`,C.addEventListener("click",z=>{z.stopPropagation(),C.classList.toggle("gengage-chat-favorite-btn--active");const N=C.querySelector("svg");N&&N.setAttribute("fill",C.classList.contains("gengage-chat-favorite-btn--active")?"currentColor":"none"),t.onFavoriteToggle(x,a)}),y.appendChild(C)}n.appendChild(y)}const r=document.createElement("div");r.className="gengage-chat-product-card-body";const s=a.brand;if(s){const y=document.createElement("div");y.className="gengage-chat-product-card-brand",y.textContent=s,r.appendChild(y)}const c=a.name;if(c){const y=document.createElement("div");y.className="gengage-chat-product-card-name",y.textContent=c,r.appendChild(y)}const l=a.rating,d=a.reviewCount;if(typeof l=="number"&&Number.isFinite(l)){const y=document.createElement("div");if(y.className="gengage-chat-product-card-rating",y.textContent=Mt(l),typeof d=="number"&&Number.isFinite(d)){const f=document.createElement("span");f.className="gengage-chat-product-card-review-count",f.textContent=` (${d})`,y.appendChild(f)}r.appendChild(y)}const u=a.price,g=a.originalPrice;if(a.price_async===!0){const y=document.createElement("div");y.className="gengage-chat-product-card-price";const f=document.createElement("span");f.className="gengage-chat-price-skeleton",y.appendChild(f),r.appendChild(y),setTimeout(()=>{f.parentElement&&(u?f.replaceWith(document.createTextNode(J(u,t.pricing))):f.remove())},300)}else if(u){const y=document.createElement("div");if(y.className="gengage-chat-product-card-price",g&&g!==u){const P=document.createElement("span");P.className="gengage-chat-product-card-original-price",P.textContent=J(g,t.pricing),y.appendChild(P),y.appendChild(document.createTextNode(" "))}const f=document.createElement("span");f.textContent=J(u,t.pricing),y.appendChild(f),r.appendChild(y)}const h=a.inStock;if(typeof h=="boolean"){const y=document.createElement("div");y.className=`gengage-chat-product-card-stock ${h?"is-in-stock":"is-out-of-stock"}`,y.textContent=h?t.i18n?.inStockLabel??"Stokta":t.i18n?.outOfStockLabel??"Tükendi",r.appendChild(y)}const _=a.promotions;if(_&&_.length>0){const y=document.createElement("div");y.className="gengage-chat-product-card-promos";for(const f of _){const P=document.createElement("span");P.className="gengage-chat-product-card-promo-badge",P.textContent=f,y.appendChild(P)}r.appendChild(y)}n.appendChild(r);const v=a.url,E=a.sku,I=e.props?.action;if(I){const y=document.createElement("button");y.className="gengage-chat-product-card-cta",y.type="button",y.textContent=I.title||t.i18n?.productCtaLabel||"Incele",y.addEventListener("click",()=>t.onAction(I)),n.appendChild(y)}else if(v&&ie(v)){const y=document.createElement("a");y.className="gengage-chat-product-card-cta",V(y,"href",v),V(y,"target","_blank"),V(y,"rel","noopener noreferrer"),y.textContent=t.i18n?.productCtaLabel??"İncele",y.addEventListener("click",f=>{t.onProductClick&&E&&(f.preventDefault(),t.onProductClick({sku:E,url:v}))}),n.appendChild(y)}const T=a.cartCode;if(T&&E&&h!==!1){const y=Dt({compact:!0,label:t.i18n?.addToCartButton??"Sepete Ekle",onSubmit:f=>{t.onAction({title:t.i18n?.addToCartButton??"Sepete Ekle",type:"addToCart",payload:{sku:E,cartCode:T,quantity:f}})}});y.classList.add("gengage-chat-product-card-atc"),n.appendChild(y)}if(t.comparisonSelectMode&&E&&t.onToggleComparisonSku){const y=document.createElement("div");y.className="gengage-chat-comparison-select-wrapper";const f=document.createElement("input");return f.type="checkbox",f.className="gengage-chat-comparison-checkbox",f.checked=t.comparisonSelectedSkus?.includes(E)??!1,f.addEventListener("change",()=>{t.onToggleComparisonSku?.(E)}),y.appendChild(f),y.appendChild(n),y}return n}function Io(e,t){const n=document.createElement("article");n.className="gengage-chat-product-details-panel";const a=e.props?.product??e.props;if(!a)return n;const i=a.images,o=a.imageUrl,r=a.sku;if(i&&i.length>1){const b=document.createElement("div");b.className="gengage-chat-product-details-media gengage-chat-product-details-gallery gengage-chat-product-details-img-wrap";const x=document.createElement("img");x.className="gengage-chat-product-details-img";const C=i.find(B=>ie(B));C&&V(x,"src",C);const w=a.name;w&&(x.alt=w),ve(x),b.appendChild(x);const M=document.createElement("div");M.className="gengage-chat-product-gallery-thumbs";let z=null,N=0;for(let B=0;B<i.length;B++){const Q=i[B];if(!Q||!ie(Q))continue;const K=document.createElement("img");K.className="gengage-chat-product-gallery-thumb",B===0&&(K.classList.add("gengage-chat-product-gallery-thumb--active"),z=K),V(K,"src",Q),K.alt=`${w??"Product"} ${B+1}`,K.width=48,K.height=48,ve(K),K.addEventListener("click",()=>{V(x,"src",Q),z&&z.classList.remove("gengage-chat-product-gallery-thumb--active"),K.classList.add("gengage-chat-product-gallery-thumb--active"),z=K,N=B}),M.appendChild(K)}let O=0;const L=50;if(x.addEventListener("touchstart",B=>{O=B.changedTouches[0].clientX},{passive:!0}),x.addEventListener("touchend",B=>{const Q=B.changedTouches[0].clientX,K=O-Q;if(Math.abs(K)<L)return;const ft=M.querySelectorAll(".gengage-chat-product-gallery-thumb"),mt=K>0?Math.min(N+1,ft.length-1):Math.max(N-1,0);mt!==N&&ft[mt]&&ft[mt].click()}),b.appendChild(M),r){const B=document.createElement("button");B.className="gengage-chat-find-similar-pill",B.type="button",B.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",B.addEventListener("click",()=>{t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:r,...C?{image_url:C}:{}}})}),b.appendChild(B)}n.appendChild(b)}else if(o&&ie(o)){const b=document.createElement("div");b.className="gengage-chat-product-details-media gengage-chat-product-details-img-wrap";const x=document.createElement("img");x.className="gengage-chat-product-details-img",x.loading="lazy",V(x,"src",o),ve(x);const C=a.name;if(C&&(x.alt=C),b.appendChild(x),r){const w=document.createElement("button");w.className="gengage-chat-find-similar-pill",w.type="button",w.textContent=t.i18n?.findSimilarLabel??"Benzerlerini Bul",w.addEventListener("click",()=>{t.onAction({title:t.i18n?.findSimilarLabel??"Benzerlerini Bul",type:"findSimilar",payload:{sku:r,...o?{image_url:o}:{}}})}),b.appendChild(w)}n.appendChild(b)}const s=document.createElement("div");s.className="gengage-chat-product-details-content";const c=a.name;if(c){const b=document.createElement("h3");b.className="gengage-chat-product-details-title",b.textContent=c,s.appendChild(b)}const l=a.rating,d=a.reviewCount;if(typeof l=="number"&&Number.isFinite(l)){const b=document.createElement("div");if(b.className="gengage-chat-product-details-rating",b.textContent=`★ ${Ye(l).toFixed(1)}`,typeof d=="number"&&Number.isFinite(d)){const x=document.createElement("span");x.className="gengage-chat-product-details-review-count",x.textContent=` (${d})`,b.appendChild(x)}s.appendChild(b)}const u=a.price,g=a.originalPrice;if(a.price_async===!0){const b=document.createElement("div");b.className="gengage-chat-product-details-price";const x=document.createElement("span");x.className="gengage-chat-price-skeleton",b.appendChild(x),s.appendChild(b),setTimeout(()=>{if(x.parentElement)if(u){const C=document.createElement("span");C.className="gengage-chat-product-details-current-price",C.textContent=J(u,t.pricing),x.replaceWith(C)}else x.remove()},300)}else if(u){const b=document.createElement("div");if(b.className="gengage-chat-product-details-price",g&&g!==u){const C=document.createElement("span");C.className="gengage-chat-product-details-original-price",C.textContent=J(g,t.pricing),b.appendChild(C),b.appendChild(document.createTextNode(" "))}const x=document.createElement("span");x.className="gengage-chat-product-details-current-price",x.textContent=J(u,t.pricing),b.appendChild(x),s.appendChild(b)}const h=a.inStock;if(typeof h=="boolean"){const b=document.createElement("div");b.className=`gengage-chat-product-details-stock ${h?"is-in-stock":"is-out-of-stock"}`,b.textContent=h?"Stokta var":"Stokta yok",s.appendChild(b)}const _=a.promotions;if(_&&_.length>0){const b=document.createElement("div");b.className="gengage-chat-product-details-promos";for(const x of _){const C=document.createElement("span");C.className="gengage-chat-product-details-promo-badge",C.textContent=x,b.appendChild(C)}s.appendChild(b)}const v=a.variants;if(v&&v.length>0){const b=document.createElement("div");b.className="gengage-chat-product-variants";const x=document.createElement("div");x.className="gengage-chat-product-variants-label",x.textContent=t.i18n?.variantsLabel??"Varyantlar",b.appendChild(x);const C=document.createElement("div");C.className="gengage-chat-product-variants-list";for(const w of v){const M=w.name??w.variant_name,z=w.sku;if(!M&&!z)continue;const N=document.createElement("button");N.className="gengage-chat-product-variant-btn",N.type="button";const O=M??z??"",L=w.price;L&&String(L)!==String(u)?N.textContent=`${O} - ${J(String(L),t.pricing)}`:N.textContent=O,z&&N.addEventListener("click",()=>{t.onAction({title:O,type:"launchVariant",payload:{sku:z}})}),C.appendChild(N)}b.appendChild(C),s.appendChild(b)}const E=a.sku,I=a.cartCode,T=document.createElement("div");T.className="gengage-chat-product-details-actions";const y=e.props?.action;if(y){const b=document.createElement("button");b.className="gengage-chat-product-details-cta",b.type="button",b.textContent=y.title||t.i18n?.productCtaLabel||"Incele",b.addEventListener("click",()=>t.onAction(y)),T.appendChild(b)}else{const b=a.url;if(b&&ie(b)){const x=document.createElement("a");x.className="gengage-chat-product-details-cta",V(x,"href",b),V(x,"target","_blank"),V(x,"rel","noopener noreferrer"),x.textContent=t.i18n?.productCtaLabel??"Incele",x.addEventListener("click",C=>{t.onProductClick&&E&&(C.preventDefault(),t.onProductClick({sku:E,url:b}))}),T.appendChild(x)}}if(I&&E&&h!==!1){const b=Dt({compact:!1,label:t.i18n?.addToCartButton??"Sepete Ekle",onSubmit:x=>{t.onAction({title:t.i18n?.addToCartButton??"Sepete Ekle",type:"addToCart",payload:{sku:E,cartCode:I,quantity:x}})}});b.classList.add("gengage-chat-product-details-atc-stepper"),T.appendChild(b)}const f=a.url;if(f&&ie(f)){let b=function(N,O){const L=document.createElementNS(M,"circle");L.setAttribute("cx",N),L.setAttribute("cy",O),L.setAttribute("r","3"),z.appendChild(L)},x=function(N,O,L,B){const Q=document.createElementNS(M,"line");Q.setAttribute("x1",N),Q.setAttribute("y1",O),Q.setAttribute("x2",L),Q.setAttribute("y2",B),z.appendChild(Q)};const C=document.createElement("button");C.className="gengage-chat-product-details-share",C.type="button";const w=t.i18n?.shareButton??"Paylaş";C.title=w,C.setAttribute("aria-label",w);const M="http://www.w3.org/2000/svg",z=document.createElementNS(M,"svg");z.setAttribute("width","18"),z.setAttribute("height","18"),z.setAttribute("viewBox","0 0 24 24"),z.setAttribute("fill","none"),z.setAttribute("stroke","currentColor"),z.setAttribute("stroke-width","2"),z.setAttribute("stroke-linecap","round"),z.setAttribute("stroke-linejoin","round"),b("18","5"),b("6","12"),b("18","19"),x("8.59","13.51","15.42","17.49"),x("15.41","6.51","8.59","10.49"),C.appendChild(z),C.addEventListener("click",async()=>{const N=a.name;try{navigator.share?await navigator.share({title:N??"",url:f}):navigator.clipboard&&(await navigator.clipboard.writeText(f),C.classList.add("gengage-chat-product-details-share--copied"),setTimeout(()=>C.classList.remove("gengage-chat-product-details-share--copied"),1500))}catch{}}),T.appendChild(C)}T.childElementCount>0&&s.appendChild(T),n.appendChild(s);const P=a.description,A=a.specifications;return(P||A)&&n.appendChild(zo(P,A,t)),n}function zo(e,t,n){const a=document.createElement("div");a.className="gengage-chat-product-detail-tabs";const i=document.createElement("div");i.className="gengage-chat-product-detail-tab-bar";const o=[];if(e){const s=document.createElement("button");s.className="gengage-chat-product-detail-tab gengage-chat-product-detail-tab--active",s.type="button",s.textContent=n.i18n?.productInfoTab??"Ürün Bilgileri",i.appendChild(s);const c=document.createElement("div");c.className="gengage-chat-product-detail-tab-panel",c.textContent=e,o.push(c)}if(t){const s=document.createElement("button");s.className=`gengage-chat-product-detail-tab${e?"":" gengage-chat-product-detail-tab--active"}`,s.type="button",s.textContent=n.i18n?.specificationsTab??"Teknik Özellikler",i.appendChild(s);const c=document.createElement("div");c.className="gengage-chat-product-detail-tab-panel",e&&(c.style.display="none");const l=document.createElement("table");l.className="gengage-chat-product-specs-table";const d=Array.isArray(t)?t:Object.entries(t).map(([u,g])=>({key:u,value:g}));for(const u of d){const g=document.createElement("tr"),p=document.createElement("td");p.className="gengage-chat-product-specs-key",p.textContent=u.key;const h=document.createElement("td");h.className="gengage-chat-product-specs-value",h.textContent=u.value,g.appendChild(p),g.appendChild(h),l.appendChild(g)}c.appendChild(l),o.push(c)}const r=i.querySelectorAll(".gengage-chat-product-detail-tab");r.forEach((s,c)=>{s.addEventListener("click",()=>{r.forEach(l=>l.classList.remove("gengage-chat-product-detail-tab--active")),s.classList.add("gengage-chat-product-detail-tab--active"),o.forEach((l,d)=>{l.style.display=d===c?"":"none"})})}),a.appendChild(i);for(const s of o)a.appendChild(s);return a}function Ft(e,t,n){if(!n||n.type==="related")return e;const a=e.map(i=>{const r=t.elements[i]?.props?.product,s=r?Number(r.price):NaN;return{id:i,price:Number.isFinite(s)?s:1/0}});return a.sort((i,o)=>i.price===1/0&&o.price===1/0?0:i.price===1/0?1:o.price===1/0?-1:n.direction==="desc"?o.price-i.price:i.price-o.price),a.map(i=>i.id)}function Po(e,t,n,a){const i=Ft(t,n,a),o=new Map;for(const r of Array.from(e.children)){const s=r.dataset.elementId;s&&o.set(s,r)}for(const r of i){const s=o.get(r);s&&e.appendChild(s)}}function Ao(e,t,n,a){const i=document.createElement("div");i.className="gengage-chat-product-grid-wrapper";const o=e.children??[];if(o.length>1&&a?.onSortChange){const l=document.createElement("div");l.className="gengage-chat-product-sort-toolbar";const d=a.productSort??{type:"related"},u=[{label:a.i18n?.sortRelated??"Önerilen",sortState:{type:"related"}},{label:a.i18n?.sortPriceAsc??"Fiyat ↑",sortState:{type:"price",direction:"asc"}},{label:a.i18n?.sortPriceDesc??"Fiyat ↓",sortState:{type:"price",direction:"desc"}}];for(const g of u){const p=document.createElement("button");p.className="gengage-chat-product-sort-btn",p.type="button",d.type===g.sortState.type&&d.direction===g.sortState.direction&&p.classList.add("gengage-chat-product-sort-btn--active"),p.textContent=g.label,p.addEventListener("click",()=>{a.onSortChange?.(g.sortState),Po(r,o,t,g.sortState),l.querySelectorAll(".gengage-chat-product-sort-btn").forEach(_=>_.classList.remove("gengage-chat-product-sort-btn--active")),p.classList.add("gengage-chat-product-sort-btn--active")}),l.appendChild(p)}if(a.onToggleComparisonSku){const g=document.createElement("div");g.className="gengage-chat-product-sort-separator",l.appendChild(g);const p=document.createElement("button");p.className="gengage-chat-comparison-toggle-btn",p.type="button",a.comparisonSelectMode&&p.classList.add("gengage-chat-comparison-toggle-btn--active"),p.textContent=a.i18n?.compareSelected??"Karşılaştır",p.addEventListener("click",()=>{a.onToggleComparisonSku?.("")}),l.appendChild(p)}i.appendChild(l)}const r=document.createElement("div");r.className="gengage-chat-product-grid";const s=Ft(o,t,a?.productSort);for(const l of s){if(!t.elements[l])continue;const d=n(l);d&&(d.dataset.elementId=l,r.appendChild(d))}if(Rt()&&r.classList.add("gengage-chat-product-grid--mobile"),i.appendChild(r),e.props?.endOfList!==!0&&o.length>0){const l=document.createElement("button");l.className="gengage-chat-product-grid-view-more",l.type="button",l.textContent=a?.i18n?.viewMoreLabel??"Daha Fazla Göster",l.addEventListener("click",()=>{a?.onAction({title:"More",type:"moreProductList",payload:{}})}),i.appendChild(l)}if(a?.comparisonSelectMode&&a.comparisonSelectedSkus&&a.comparisonSelectedSkus.length>=2){const l=vo(a.comparisonSelectedSkus,a);i.appendChild(l)}return i}function No(e,t){const n=e.props??{},a=n.keyDifferencesHtml,i=n.recommended,o=n.products??[],r=n.attributes??[],s=n.highlights??[],c=n.specialCases,l=n.recommendedText,d=n.winnerHits,u=n.productActions;if(!i)return document.createElement("div");const g={recommended:i,products:o,attributes:r,highlights:s,specialCases:c,onProductClick:h=>{t.onProductClick?.({sku:h,url:""})},pricing:t.pricing};l!==void 0&&(g.recommendedText=l),d!==void 0&&(g.winnerHits=d),u!==void 0&&(g.productActions=u),a!==void 0&&(g.keyDifferencesHtml=a),t.i18n&&(g.i18n={comparisonHeading:t.i18n.panelTitleComparisonResults,recommendedChoiceLabel:t.i18n.recommendedChoiceLabel,highlightsLabel:t.i18n.highlightsLabel,keyDifferencesLabel:t.i18n.keyDifferencesLabel,specialCasesLabel:t.i18n.specialCasesLabel,addToCartButton:t.i18n.addToCartButton});const p=oo(g);return Rt()&&p.classList.add("gengage-chat-comparison--mobile"),p}function Lo(e){const t=document.createElement("hr");t.className="gengage-chat-divider";const n=e.props?.label;if(n){const a=document.createElement("div");a.className="gengage-chat-divider-wrapper";const i=document.createElement("span");return i.className="gengage-chat-divider-label",i.textContent=n,a.appendChild(t),a.appendChild(i),a}return t}const Mo=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","LI","UL","OL","BLOCKQUOTE","PRE","TABLE","SECTION","HR","FIGURE","FIGCAPTION","DL","DT","DD"]);function $o(e){const t=[];let n=[];for(const a of e)a.nodeType===Node.ELEMENT_NODE&&Mo.has(a.tagName)?(n.length>0&&(t.push(n),n=[]),t.push([a])):n.push(a);return n.length>0&&t.push(n),t}function Oo(e){for(const t of e)for(const n of t)if(n.nodeType===Node.ELEMENT_NODE&&(n.tagName==="TABLE"||n.querySelector?.("table")))return!0;return!1}function Bo(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Do(e){const{container:t,html:n,delayMs:a=30,onTick:i,onComplete:o}=e,r=document.createElement("template");r.innerHTML=n;const s=$o(r.content.childNodes);if(Bo()||s.length<=1||Oo(s))return t.innerHTML=n,o?.(),{complete(){},cancel(){},isRunning:!1};t.innerHTML="";let c=0,l=null,d=!0;function u(){if(!d||c>=s.length){d=!1,o?.();return}const g=s[c],p=document.createElement("span");p.className="gengage-chat-typewriter-block";for(const h of g)p.appendChild(h.cloneNode(!0));t.appendChild(p),c++,i?.(),c<s.length?l=setTimeout(u,a):(d=!1,o?.())}return u(),{complete(){d&&(l!==null&&clearTimeout(l),d=!1,t.innerHTML=n,o?.())},cancel(){l!==null&&clearTimeout(l),d=!1},get isRunning(){return d}}}function qt(e){return e!==void 0&&/[\p{L}\p{N}_]/u.test(e)}function Ro(e){const{container:t,mentions:n,onProductClick:a}=e;if(n.length===0)return;const i=new Map;for(const o of n)o.short_name.length!==0&&i.set(o.short_name.toLowerCase(),o);if(i.size!==0)for(const[o,r]of i){const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let c=s.nextNode(),l=!1;for(;c&&!l;){const d=c.textContent??"",u=d.toLowerCase().indexOf(o);if(u===-1){c=s.nextNode();continue}const g=u>0?d[u-1]:void 0,p=d[u+r.short_name.length];if(qt(g)||qt(p)){c=s.nextNode();continue}const h=d.slice(0,u),_=d.slice(u,u+r.short_name.length),v=d.slice(u+r.short_name.length),E=c.parentNode;if(!E){c=s.nextNode();continue}const I=document.createElement("a");I.className="gengage-product-mention",I.textContent=_,I.href="#",I.addEventListener("click",T=>{T.preventDefault(),a(r.sku)}),h&&E.insertBefore(document.createTextNode(h),c),E.insertBefore(I,c),v&&E.insertBefore(document.createTextNode(v),c),E.removeChild(c),l=!0}}}const Uo=new Set(["search","info","review","similar"]),Zo=new Set(["quickAnswer","reviewSummary","searchDiscovery","launchDiscovery","exploreTogetherV2"]);function jo(e){return!!(e.icon&&Uo.has(e.icon)||e.action?.type&&Zo.has(e.action.type))}const Ht="gengage_choice_prompter_dismissed";function Fo(e){const t=document.createElement("div");t.className="gengage-chat-choice-prompter";const n=document.createElement("div");n.className="gengage-chat-choice-prompter-heading",n.textContent=e.heading,t.appendChild(n);const a=document.createElement("div");a.className="gengage-chat-choice-prompter-suggestion",a.textContent=e.suggestion,t.appendChild(a);const i=document.createElement("button");i.type="button",i.className="gengage-chat-choice-prompter-cta",i.textContent=e.ctaLabel,i.addEventListener("click",()=>{Vt(),t.remove(),e.onCtaClick()}),t.appendChild(i);const o=document.createElement("button");return o.type="button",o.className="gengage-chat-choice-prompter-dismiss",o.textContent="×",o.setAttribute("aria-label","Dismiss"),o.addEventListener("click",()=>{Vt(),t.remove(),e.onDismiss?.()}),t.appendChild(o),t}function qo(){try{return sessionStorage.getItem(Ht)==="1"}catch{return!1}}function Vt(){try{sessionStorage.setItem(Ht,"1")}catch{}}const Ho="gengage_assistant",Vo=3,ge="sessions",ee="context",se="payload",te="favorites";function Pe(e){return new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)})}function ke(e){return new Promise((t,n)=>{e.oncomplete=()=>t(),e.onerror=()=>n(e.error),e.onabort=()=>n(e.error??new DOMException("Transaction aborted"))})}class Go{constructor(t=Ho,n=Vo){this._db=null,this._dbName=t,this._version=n}async open(){return this._db?this._db:new Promise((t,n)=>{const a=indexedDB.open(this._dbName,this._version);a.onupgradeneeded=i=>{const o=a.result,r=i.oldVersion;r<1&&(o.createObjectStore(ge,{keyPath:["userId","appId","sessionId"]}),o.createObjectStore(ee,{keyPath:["sessionId","threadId"]}),o.createObjectStore(se,{keyPath:["threadId","messageId"]}).createIndex("threadId","threadId",{unique:!1}),o.createObjectStore(te,{keyPath:["userId","appId","sku"]})),r>=1&&r<2&&(o.objectStoreNames.contains(ge)&&o.deleteObjectStore(ge),o.objectStoreNames.contains(se)&&o.deleteObjectStore(se),o.createObjectStore(ge,{keyPath:["userId","appId","sessionId"]}),o.createObjectStore(se,{keyPath:["threadId","messageId"]}).createIndex("threadId","threadId",{unique:!1}),o.objectStoreNames.contains(ee)||o.createObjectStore(ee,{keyPath:["sessionId","threadId"]})),r<3&&(o.objectStoreNames.contains(te)||o.createObjectStore(te,{keyPath:["userId","appId","sku"]}))},a.onsuccess=()=>{this._db=a.result,t(this._db)},a.onerror=()=>n(a.error)})}close(){this._db?.close(),this._db=null}async saveSession(t){const a=this._requireDb().transaction(ge,"readwrite");a.objectStore(ge).put(t),await ke(a)}async loadSession(t,n,a){const o=this._requireDb().transaction(ge,"readonly");return await Pe(o.objectStore(ge).get([t,n,a]))??null}async saveContext(t){const a=this._requireDb().transaction(ee,"readwrite");a.objectStore(ee).put(t),await ke(a)}async loadContext(t,n){const i=this._requireDb().transaction(ee,"readonly");return await Pe(i.objectStore(ee).get([t,n]))??null}async deleteContextsAfterThread(t,n){const i=this._requireDb().transaction(ee,"readwrite"),r=i.objectStore(ee).openCursor();await new Promise((s,c)=>{r.onsuccess=()=>{const l=r.result;if(!l){s();return}const d=l.value;if(d.sessionId===t&&d.threadId>n)try{l.delete()}catch{}l.continue()},r.onerror=()=>c(r.error)}),await ke(i)}async loadLatestContext(t){const i=this._requireDb().transaction(ee,"readonly").objectStore(ee),o=IDBKeyRange.bound([t,""],[t,""]);return new Promise((r,s)=>{const c=i.openCursor(o,"prev");c.onsuccess=()=>{const l=c.result;r(l?l.value:null)},c.onerror=()=>s(c.error)})}async savePayload(t){const a=this._requireDb().transaction(se,"readwrite");a.objectStore(se).put(t),await ke(a)}async loadPayload(t,n){const i=this._requireDb().transaction(se,"readonly");return await Pe(i.objectStore(se).get([t,n]))??null}async loadPayloadsByThread(t){const i=this._requireDb().transaction(se,"readonly").objectStore(se).index("threadId"),o=[];return new Promise((r,s)=>{const c=i.openCursor(IDBKeyRange.only(t));c.onsuccess=()=>{const l=c.result;if(!l){r(o);return}o.push(l.value),l.continue()},c.onerror=()=>s(c.error)})}async saveFavorite(t){const a=this._requireDb().transaction(te,"readwrite");a.objectStore(te).put(t),await ke(a)}async removeFavorite(t,n,a){const o=this._requireDb().transaction(te,"readwrite");o.objectStore(te).delete([t,n,a]),await ke(o)}async loadFavorites(t,n){const i=this._requireDb().transaction(te,"readonly");return(await Pe(i.objectStore(te).getAll())).filter(r=>r.userId===t&&r.appId===n)}async isFavorite(t,n,a){const o=this._requireDb().transaction(te,"readonly");return await Pe(o.objectStore(te).get([t,n,a]))!==void 0}_requireDb(){if(!this._db)throw new Error("GengageIndexedDB: database not open. Call open() first.");return this._db}}const Wo=["comparisonTable","groupList","productDetailsSimilars","productList"];class Ko{constructor(t){this._lockCount=1,this._hiddenByUser=!1,this._lastPanelContentType=null,this._chatShown=!1,this._isFavoritesMode=!1,this._lastExtended=!1,this._onChange=t.onChange;const n=new Set(Wo);t.productDetailsInPanel&&n.add("productDetails"),this._panelContentTypes=n}get isExtended(){return this._lockCount===0&&!this._hiddenByUser&&!this._isFavoritesMode&&this._lastPanelContentType!==null&&this._panelContentTypes.has(this._lastPanelContentType)&&this._chatShown}unlock(){this._lockCount>0&&this._lockCount--,this._checkStateChange()}lock(){this._lockCount++,this._checkStateChange()}setHiddenByUser(t){this._hiddenByUser=t,this._checkStateChange()}setChatShown(t){this._chatShown=t,this._checkStateChange()}setFavoritesMode(t){this._isFavoritesMode=t,this._checkStateChange()}setPanelContentType(t){this._lastPanelContentType=t,this._checkStateChange()}_checkStateChange(){const t=this.isExtended;t!==this._lastExtended&&(this._lastExtended=t,this._onChange(t))}}class Jo{constructor(t){this.deps=t,this.snapshots=new Map,this.snapshotTypes=new Map,this.activePanelMessageId=null,this.currentType=null,this.threads=[],this.lastActionType=null}snapshotForMessage(t){const n=this.deps.drawer();if(!n?.hasPanelContent()||n.isPanelLoading())return;const a=n.getPanelContentElement();if(!a)return;const i=a.cloneNode(!0);this.snapshots.set(t,i),this.currentType&&this.snapshotTypes.set(t,this.currentType)}attachClickHandler(t){const a=this.deps.shadow()?.querySelector(`[data-message-id="${CSS.escape(t)}"]`);a&&(a.style.cursor="pointer",a.addEventListener("click",()=>this.restoreForMessage(t)))}restoreForMessage(t){const n=this.snapshots.get(t);if(!n)return!1;const a=this.deps.shadow(),i=this.deps.drawer();this.activePanelMessageId&&a?.querySelector(`[data-message-id="${CSS.escape(this.activePanelMessageId)}"]`)?.classList.remove("gengage-chat-bubble--active"),a?.querySelector(`[data-message-id="${CSS.escape(t)}"]`)?.classList.add("gengage-chat-bubble--active"),this.activePanelMessageId=t,i?.setPanelContent(n.cloneNode(!0));const r=this.snapshotTypes.get(t);return r&&(this.currentType=r,this.updateTopBar(r)),!0}notifyExtension(t){const n=this.deps.bridge();t?setTimeout(()=>n?.send("maximize-pdp",{}),350):setTimeout(()=>n?.send("minify-pdp",{}),200)}titleForComponent(t,n){if(n)return n;const a=this.deps.i18n();switch(t){case"ProductDetailsPanel":return a.panelTitleProductDetails;case"ProductGrid":return Gt(this.lastActionType)?a.panelTitleSearchResults:a.panelTitleSimilarProducts;case"ComparisonTable":return a.panelTitleComparisonResults;case"AIGroupingCards":return a.panelTitleCategories;default:return""}}updateTopBar(t,n){const a=this.deps.currentThreadId();if(!a)return;const i=this.threads.indexOf(a),o=i>0,r=i>=0&&i<this.threads.length-1,s=this.titleForComponent(t,n);this.deps.drawer()?.updatePanelTopBar(o,r,s)}updateTopBarForLoading(t){const n=this.deps.i18n(),i={productDetails:n.panelTitleProductDetails,productList:Gt(this.lastActionType)?n.panelTitleSearchResults:n.panelTitleSimilarProducts,comparisonTable:n.panelTitleComparisonResults,groupList:n.panelTitleCategories}[t]??"";if(i){const o=this.deps.currentThreadId(),r=o?this.threads.indexOf(o):-1,s=r>0,c=r>=0&&r<this.threads.length-1;this.deps.drawer()?.updatePanelTopBar(s,c,i)}}updateExtendedMode(t){const a={ComparisonTable:"comparisonTable",AIGroupingCards:"groupList",ProductDetailsPanel:"productDetails",ProductGrid:"productList"}[t]??null;this.deps.extendedModeManager()?.setPanelContentType(a)}navigateBack(){const t=this.deps.currentThreadId();if(!t)return;const n=this.threads.indexOf(t);if(n>0){const a=this.threads[n-1];a&&this.deps.rollbackToThread(a)}}navigateForward(){const t=this.deps.currentThreadId();if(!t)return;const n=this.threads.indexOf(t);if(n>=0&&n<this.threads.length-1){const a=this.threads[n+1];a&&this.deps.rollbackToThread(a)}}toPanelSpec(t){const n=t.elements[t.root];if(!n||n.type!=="ProductCard")return t;const a={...n,type:"ProductDetailsPanel"};return{root:t.root,elements:{...t.elements,[t.root]:a}}}destroy(){this.snapshots.clear(),this.snapshotTypes.clear(),this.activePanelMessageId=null,this.currentType=null,this.threads=[]}}function Gt(e){return e==="user_message"||e==="inputText"}class Wt{constructor(t){this.favoritedSkus=new Set,this._db=t}get db(){return this._db}set db(t){this._db=t}async persist(t){if(!this._db)return;const n=t.messages.map(i=>{const o={id:i.id,role:i.role,timestamp:i.timestamp,status:i.status==="streaming"?"done":i.status};return i.threadId!==void 0&&(o.threadId=i.threadId),i.content!==void 0&&(o.content=i.content),i.silent&&(o.silent=!0),o}),a={};for(const[i,o]of t.panelSnapshots)o.querySelector(".gengage-chat-panel-skeleton")||(a[i]=o.innerHTML);await this._db.saveSession({userId:t.userId,appId:t.appId,sessionId:t.sessionId,messages:n,currentThreadId:t.currentThreadId,lastThreadId:t.lastThreadId,createdAt:t.chatCreatedAt,panelThreads:t.panelThreads.length>0?t.panelThreads:void 0,thumbnailEntries:t.thumbnailEntries.length>0?t.thumbnailEntries:void 0,panelSnapshotHtml:Object.keys(a).length>0?a:void 0,sku:t.sku}),t.lastBackendContext&&t.currentThreadId&&await this._db.saveContext({sessionId:t.sessionId,threadId:t.currentThreadId,context:t.lastBackendContext});for(const i of t.messages)i.uiSpec&&i.threadId&&await this._db.savePayload({threadId:i.threadId,messageId:i.id,uiSpec:i.uiSpec})}async saveAndOpenURL(t,n,a){try{await n()}catch{}a?.send("openURLInNewTab",{url:t}),window.location.href=t}async loadPayload(t,n){if(!this._db)return null;for(let a=0;a<3;a++){try{const i=await this._db.loadPayload(t,n);if(i)return i.uiSpec}catch{}a<2&&await new Promise(i=>setTimeout(i,100))}return null}async loadFavorites(t,n){if(this._db)try{const a=await this._db.loadFavorites(t,n);for(const i of a)this.favoritedSkus.add(i.sku)}catch{}}async toggleFavorite(t,n,a,i){this._db&&(this.favoritedSkus.has(a)?(this.favoritedSkus.delete(a),await this._db.removeFavorite(t,n,a)):(this.favoritedSkus.add(a),await this._db.saveFavorite({userId:t,appId:n,sku:a,name:i.name,imageUrl:i.imageUrl,price:i.price,savedAt:new Date().toISOString()})))}close(){this._db?.close(),this._db=null}}const Kt="gengage_kvkk_shown",Yo=["kvkk","kişisel veri","kisisel veri"],Xo=/\b6698\b/;function et(e){const t=e.toLowerCase();return Yo.some(n=>t.includes(n))||Xo.test(t)}function Jt(e){try{return localStorage.getItem(`${Kt}_${e}`)==="1"}catch{return!1}}function Qo(e){try{localStorage.setItem(`${Kt}_${e}`,"1")}catch{}}function er(e){const n=new DOMParser().parseFromString(e,"text/html").body,a=Array.from(n.children);for(const i of a)if(et(i.textContent??"")){i.remove();break}return n.innerHTML.trim()}function tr(e){const t=new DOMParser().parseFromString(e,"text/html");for(const n of Array.from(t.body.children))if(et(n.textContent??""))return n.outerHTML;return null}const nr={tr:"TURKISH",en:"ENGLISH",de:"GERMAN",fr:"FRENCH"};function ar(e){return e?nr[e.toLowerCase().slice(0,2)]??"TURKISH":"TURKISH"}const ir=':host{all:initial;font-family:var(--gengage-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);font-size:var(--gengage-font-size, 14px)}.gengage-chat-root{position:fixed;z-index:var(--gengage-z-index, 2147483647);--_gengage-chat-offset: var(--gengage-chat-offset, 20px);--_gengage-chat-launcher-bottom: var(--gengage-chat-launcher-bottom, 20px);--_gengage-chat-launcher-right: var(--gengage-chat-launcher-right, 20px);--_gengage-chat-launcher-size: var(--gengage-chat-launcher-size, 56px);--_gengage-chat-drawer-width: var(--gengage-chat-width, 400px);--_gengage-chat-radius: var(--gengage-chat-shell-radius, 12px);--_gengage-chat-header-height: var(--gengage-chat-header-height, 60px);--_gengage-chat-conversation-width: var(--gengage-chat-conversation-width, 396px);--_gengage-chat-panel-min-width: var(--gengage-chat-panel-min-width, 320px);--_gengage-chat-panel-max-width: var(--gengage-chat-panel-max-width, 860px);--_gengage-chat-input-height: var(--gengage-chat-input-height, 48px);--_gengage-chat-shadow: var(--gengage-chat-shadow, 0 12px 40px rgba(15, 23, 42, .18));--_gengage-border-color: var(--gengage-border-color, #e5e7eb);--_gengage-discount-color: var(--gengage-discount-color, #ef4444);--_gengage-success-color: var(--gengage-success-color, #16a34a);--_gengage-text-secondary: var(--gengage-text-secondary, #64748b);--_gengage-qty-btn-size: var(--gengage-qty-btn-size, 28px);--_gengage-qty-btn-size-compact: var(--gengage-qty-btn-size-compact, 24px)}.gengage-chat-launcher-container{position:fixed;bottom:var(--_gengage-chat-launcher-bottom);right:var(--_gengage-chat-launcher-right);display:flex;flex-direction:column;align-items:flex-end;gap:10px;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-launcher-content-area,.gengage-chat-launcher-content-area-bottom{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.gengage-chat-launcher-content-area:empty,.gengage-chat-launcher-content-area-bottom:empty{display:none}.gengage-chat-root--open .gengage-chat-launcher-content-area,.gengage-chat-root--open .gengage-chat-launcher-content-area-bottom{display:none}.gengage-chat-root--open .gengage-chat-launcher-container{pointer-events:none;opacity:0;transition:opacity .2s ease}.gengage-chat-launcher{width:var(--_gengage-chat-launcher-size);height:var(--_gengage-chat-launcher-size);border-radius:50%;border:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 8px 22px #0f172a47;transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease;position:relative;flex-shrink:0}.gengage-chat-launcher:hover{transform:scale(1.05);box-shadow:0 14px 28px #0f172a47}.gengage-chat-launcher svg{width:24px;height:24px}.gengage-chat-launcher--hidden-mobile{display:none!important}.gengage-chat-launcher-tooltip{position:absolute;right:calc(100% + 12px);top:50%;transform:translateY(-50%);padding:6px 12px;border-radius:8px;background:#1e293b;color:#fff;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s ease;box-shadow:0 2px 8px #00000026}.gengage-chat-launcher-tooltip:after{content:"";position:absolute;left:100%;top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#1e293b}.gengage-chat-launcher:hover .gengage-chat-launcher-tooltip{opacity:1}.gengage-chat-root--open .gengage-chat-launcher-tooltip{display:none}.gengage-chat-proactive{position:fixed;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 14px);right:var(--_gengage-chat-launcher-right);width:280px;padding:16px 18px;border-radius:16px;background:#fff;box-shadow:0 8px 30px #0000001f,0 2px 8px #0000000f;opacity:0;transform:translateY(8px) scale(.96);transition:opacity .25s ease,transform .25s ease;z-index:2147483645}.gengage-chat-proactive--visible{opacity:1;transform:translateY(0) scale(1)}.gengage-chat-proactive-message{margin:0 0 12px;font-size:14px;line-height:1.5;color:#1f2937}.gengage-chat-proactive-actions{display:flex;gap:8px}.gengage-chat-proactive-accept{flex:1;padding:8px 16px;border:none;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .15s ease}.gengage-chat-proactive-accept:hover{filter:brightness(1.08)}.gengage-chat-proactive-dismiss{position:absolute;top:8px;right:8px;width:24px;height:24px;border:none;border-radius:50%;background:transparent;color:#64748b;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center}.gengage-chat-proactive-dismiss:hover{color:#475569;background:#f1f5f9}.gengage-chat-drawer{position:fixed;top:0;bottom:0;right:0;width:var(--_gengage-chat-drawer-width);max-height:-webkit-fill-available;max-height:100dvh;border-radius:0;background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow);display:flex;flex-direction:column;overflow:hidden;z-index:var(--gengage-z-index, 2147483647)}.gengage-chat-root--mobile .gengage-chat-launcher-container{right:var(--gengage-chat-launcher-mobile-right, 16px);bottom:calc(var(--gengage-chat-launcher-mobile-bottom, 16px) + env(safe-area-inset-bottom,0px))}.gengage-chat-root--mobile .gengage-chat-drawer{left:0;right:0;bottom:0;width:100%;max-width:none;max-height:-webkit-fill-available;max-height:100dvh;border-radius:16px 16px 0 0;border-top:1px solid rgba(0,0,0,.06);box-shadow:0 -4px 16px #0000001a,0 12px 40px #0f172a2e;padding-bottom:env(safe-area-inset-bottom,0px)}.gengage-chat-root--mobile.gengage-chat-root--open:before{content:"";position:fixed;inset:0;background:#0000001f;z-index:-1;pointer-events:none}.gengage-chat-root--mobile.gengage-chat-root--mobile-half .gengage-chat-drawer{top:auto;height:min(72dvh,620px);max-height:min(72dvh,620px)}.gengage-chat-root--mobile.gengage-chat-root--mobile-full .gengage-chat-drawer{top:0;height:100dvh;max-height:100dvh;border-radius:0;border-top:none}.gengage-chat-root--mobile .gengage-chat-input-area{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--_gengage-border-color, #e5e7eb);transform:translateY(calc(-1 * var(--gengage-keyboard-offset, 0px)))}.gengage-chat-header{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;min-height:var(--_gengage-chat-header-height);padding:4px 12px;background:var(--gengage-chat-header-bg, #1d2939);color:var(--gengage-chat-header-foreground, #fff);box-shadow:0 4px 20px #00000014,0 0 2px #0000001f;border:none;position:relative;z-index:2}.gengage-chat-header-left{display:flex;align-items:center;gap:10px;min-width:0}.gengage-chat-header-avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;border:2px solid rgba(255,255,255,.15)}.gengage-chat-header-info{display:flex;flex-direction:column;gap:2px;min-width:0}.gengage-chat-header-title-row{display:flex;align-items:center;gap:6px}.gengage-chat-header-title{font-weight:700;font-size:15px;line-height:1.25;letter-spacing:.01em;color:inherit}.gengage-chat-header-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;line-height:1.5}.gengage-chat-header-powered{display:flex;align-items:center;gap:4px;font-size:11px;color:#ffffffbf;text-decoration:none;transition:color .15s}.gengage-chat-header-powered:hover{color:#fffc}.gengage-chat-header-powered svg{width:12px;height:12px;opacity:.6}.gengage-chat-header-right{display:flex;align-items:center;gap:4px;flex-shrink:0}.gengage-chat-header-btn{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-header-btn:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-close{width:32px;height:32px;border-radius:8px;background:transparent;border:1px solid rgba(255,255,255,.12);color:#ffffffb3;font-size:18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;line-height:1;transition:background-color .15s ease,color .15s ease,border-color .15s ease}.gengage-chat-close:hover{background:#ffffff1a;color:#fff;border-color:#ffffff40}.gengage-chat-body{display:flex;flex:1;overflow:hidden;min-height:0}.gengage-chat-panel{display:none;width:0;overflow:hidden;transition:width .22s cubic-bezier(.2,.72,.2,1)}.gengage-chat-panel--visible{display:flex;flex-direction:column;position:relative;box-sizing:border-box;width:440px;min-width:440px;border-right:1px solid var(--_gengage-border-color);overflow-y:auto;padding:16px;background:#f8fafc}.gengage-chat-panel-divider{display:flex;align-items:center;width:4px;cursor:pointer;background:#e5e7eb;position:relative;flex-shrink:0;transition:background .15s;z-index:2}.gengage-chat-panel-divider:hover{background:#cbd5e1}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-panel-divider-toggle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:24px;height:48px;border:1px solid var(--_gengage-border-color);border-radius:6px;background:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--_gengage-text-secondary);box-shadow:0 1px 3px #00000014;transition:background .15s,color .15s;padding:0;line-height:1}.gengage-chat-panel-divider-toggle:hover{background:#f1f5f9;color:#334155}.gengage-chat-panel--collapsed{flex:0 0 0px!important;width:0!important;min-width:0!important;max-width:0!important;padding:0!important;border-right:none!important;overflow:hidden}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:0;transform:translateY(-50%)}.gengage-chat-conversation{display:flex;flex-direction:column;flex:1;min-width:0;overflow:hidden;background:var(--gengage-background-color, #fff);position:relative;z-index:1}.gengage-chat-drawer--with-panel{width:auto;background:transparent;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-header{border-radius:0;flex-shrink:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex:1 1 0;min-height:0;gap:0;padding:0;align-items:stretch}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{flex:0 0 auto;width:clamp(var(--_gengage-chat-panel-min-width),50vw,var(--_gengage-chat-panel-max-width));min-width:var(--_gengage-chat-panel-min-width);max-width:var(--_gengage-chat-panel-max-width);border-right:none;background:#fff;padding:0 16px 16px;overflow-y:auto;margin:0;border-radius:0;box-shadow:0 8px 32px #0f172a1f,0 2px 8px #0f172a0f;max-height:100dvh}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:0;background:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{width:20px;height:48px;border-radius:10px;background:var(--gengage-primary-color, #3b82f6);color:#fff;border:2px solid #fff;box-shadow:0 2px 8px #0f172a2e;font-size:12px;z-index:10}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover{background:var(--gengage-primary-hover, #2563eb);color:#fff}.gengage-chat-drawer--with-panel .gengage-chat-conversation{flex:0 0 var(--_gengage-chat-conversation-width);width:var(--_gengage-chat-conversation-width);border-left:none;background:var(--gengage-background-color, #fff);box-shadow:-4px 0 24px #0f172a1f,-1px 0 4px #0f172a0f}.gengage-chat-drawer--with-panel .gengage-chat-messages{padding-right:6px;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,.12) transparent}.gengage-chat-drawer--with-panel .gengage-chat-messages::-webkit-scrollbar{width:0}.gengage-chat-drawer--with-panel:has(.gengage-chat-panel--collapsed){width:var(--_gengage-chat-conversation-width);background:var(--gengage-background-color, #fff);box-shadow:var(--_gengage-chat-shadow)}.gengage-chat-drawer--with-panel .gengage-chat-footer{display:none}.gengage-chat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;min-height:0;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-y}.gengage-chat-messages::-webkit-scrollbar{width:6px}.gengage-chat-messages::-webkit-scrollbar-track{background:transparent}.gengage-chat-messages::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.gengage-chat-messages::-webkit-scrollbar-thumb:hover{background:#0003}.gengage-chat-bubble{max-width:85%;padding:12px 16px;border-radius:12px;line-height:1.5;font-size:14px;font-weight:500;word-wrap:break-word;overflow-wrap:break-word;animation:gengage-chat-msg-in .3s cubic-bezier(.2,.7,.2,1)}@keyframes gengage-chat-msg-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-bubble--user{align-self:flex-end;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);border-bottom-right-radius:4px}.gengage-chat-bubble--assistant{align-self:flex-start;background:#f3f4f6;color:#1f2937;border-bottom-left-radius:4px;min-width:120px}.gengage-chat-bubble--active{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:-2px}.gengage-chat-bubble--assistant:empty{display:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a{color:var(--gengage-primary-color, #2563eb);text-decoration:underline}.gengage-chat-bubble--assistant .gengage-chat-bubble-text a:hover{text-decoration:none}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p{margin:0 0 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text p:last-child{margin-bottom:0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text ul,.gengage-chat-bubble--assistant .gengage-chat-bubble-text ol{margin:6px 0;padding-left:20px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text li{margin-bottom:6px;line-height:1.5}.gengage-chat-bubble--assistant .gengage-chat-bubble-text code{background:#0000000f;padding:1px 4px;border-radius:3px;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text pre{background:#0000000a;padding:8px;border-radius:6px;overflow-x:auto;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text table{border-collapse:collapse;margin:4px 0;font-size:.9em}.gengage-chat-bubble--assistant .gengage-chat-bubble-text th,.gengage-chat-bubble--assistant .gengage-chat-bubble-text td{border:1px solid var(--_gengage-border-color);padding:4px 8px}.gengage-chat-bubble--assistant .gengage-chat-bubble-text img{max-width:100%;height:auto;border-radius:4px;margin:4px 0}.gengage-chat-bubble--assistant .gengage-chat-bubble-text h1,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h2,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h3,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h4,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h5,.gengage-chat-bubble--assistant .gengage-chat-bubble-text h6{margin:8px 0 4px;line-height:1.3;color:#0f172a}.gengage-chat-bubble--assistant .gengage-chat-bubble-text blockquote{border-left:3px solid var(--_gengage-border-color);padding-left:12px;margin:4px 0;color:var(--_gengage-text-secondary)}.gengage-chat-bubble--first{border-left:3px solid var(--gengage-accent-primary, #3b82f6);padding-left:12px}.gengage-chat-bubble--first .gengage-chat-bubble-text{font-size:15px}.gengage-chat-typing{display:flex;align-items:center;gap:5px;padding:8px 4px;align-self:flex-start;max-width:85%}.gengage-chat-typing:has(.gengage-chat-typing-text),.gengage-chat-typing:has(.gengage-chat-thinking-steps){background:#f3f4f6;padding:10px 14px;border-radius:12px 12px 12px 4px;gap:8px}.gengage-chat-typing-dots{display:flex;align-items:center;gap:5px}.gengage-chat-typing-dots span{width:6px;height:6px;border-radius:50%;background:#94a3b8;display:inline-block;animation:gengage-chat-typing-fade 1.4s ease-in-out infinite}.gengage-chat-typing-dots span:nth-child(2){animation-delay:.2s}.gengage-chat-typing-dots span:nth-child(3){animation-delay:.4s}@keyframes gengage-chat-typing-fade{0%,to{opacity:.25}50%{opacity:1}}.gengage-chat-typing-sparkle{animation:gengage-sparkle-pulse 1.2s infinite}@keyframes gengage-sparkle-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-typing-text{font-size:13px;color:var(--_gengage-text-secondary);font-style:italic;flex:1;min-width:0;word-wrap:break-word;overflow-wrap:break-word}.gengage-chat-thinking-steps{display:flex;flex-direction:column;gap:4px;padding:4px 0}.gengage-chat-thinking-step{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--gengage-chat-text-secondary, #666)}.gengage-chat-thinking-step-marker{font-size:12px;width:16px;text-align:center;flex-shrink:0}.gengage-chat-thinking-step-marker--done{color:var(--gengage-chat-success, #4caf50)}.gengage-chat-thinking-step-marker--active{color:var(--gengage-chat-primary, #1976d2);animation:gengage-thinking-pulse 1.5s ease-in-out infinite}@keyframes gengage-thinking-pulse{0%,to{opacity:1}50%{opacity:.4}}.gengage-chat-thinking-step-text{line-height:1.4}.gengage-chat-error{display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 14px;border-radius:10px;background:#fef2f2;color:#991b1b;font-size:13px;text-align:center;border:1px solid #fecaca}.gengage-chat-error-retry{flex-shrink:0;padding:4px 12px;border:1px solid #fca5a5;border-radius:6px;background:#fff;color:#991b1b;font-size:12px;font-weight:500;cursor:pointer;transition:background .15s}.gengage-chat-error-retry:hover{background:#fee2e2}.gengage-chat-input-area{display:flex;flex-wrap:wrap;align-items:center;gap:0;padding:8px 12px;border-top:1px solid var(--_gengage-border-color);background:var(--gengage-background-color, #fff)}.gengage-chat-input-pill{display:flex;align-items:center;gap:4px;flex:1;min-width:0;height:44px;background:#f3f4f6;border:1px solid var(--_gengage-border-color);border-radius:30px;padding:2px 8px;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.gengage-chat-input-pill:focus-within{border-color:var(--gengage-primary-color, #3b82f6);box-shadow:0 0 0 2px #3b82f626}.gengage-chat-input{flex:1;min-width:0;min-height:40px;max-height:120px;padding:0 6px 0 14px;border:none;border-radius:0;font-size:14px;font-family:inherit;line-height:1.4;align-content:center;outline:none;background:transparent;color:#1f2937;resize:none;overflow-y:hidden}@media(max-width:767px){.gengage-chat-input-pill{height:52px;padding:3px 8px}.gengage-chat-input{min-height:44px;max-height:44px;font-size:16px;white-space:nowrap;overflow:hidden}.gengage-chat-input::placeholder{font-size:15px}}.gengage-chat-input::placeholder{font-size:14px;color:#6b7280}.gengage-chat-send{width:36px;height:36px;min-width:36px;padding:0;border:none;border-radius:50%;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-weight:700;font-size:0;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background-color .2s cubic-bezier(.4,0,.2,1),box-shadow .2s ease,transform .15s ease;box-shadow:0 2px 4px #0000001f}.gengage-chat-send:hover{filter:brightness(.92);transform:translateY(-1px);box-shadow:0 4px 8px #0000002e}.gengage-chat-send:active{transform:translateY(0);box-shadow:0 1px 2px #0000001f}.gengage-chat-send svg{width:18px;height:18px}.gengage-chat-send:disabled{background:#d1d5db;box-shadow:none;cursor:not-allowed}.gengage-chat-footer{padding:4px 10px;text-align:center;font-size:10px;color:#6b7280;border-top:1px solid #f1f5f9;background:var(--gengage-background-color, #fff)}.gengage-chat-uispec{width:100%}.gengage-chat-uispec:empty{display:none}.gengage-chat-uispec>*{animation:gengage-chat-widget-enter .16s cubic-bezier(.2,.7,.2,1) both}@keyframes gengage-chat-widget-enter{0%{opacity:0;transform:translateY(5px) scale(.99)}to{opacity:1;transform:translateY(0) scale(1)}}.gengage-chat-action-buttons{display:flex;gap:8px;padding:6px 0 4px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.gengage-chat-action-buttons::-webkit-scrollbar{display:none}.gengage-chat-action-btn{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;line-height:1.25;font-family:inherit;cursor:pointer;white-space:nowrap;transition:filter .15s ease,transform .1s ease}.gengage-chat-action-btn:hover{filter:brightness(.92)}.gengage-chat-action-btn:active{transform:scale(.97)}.gengage-chat-product-card{position:relative;border:1px solid #eee;border-radius:16px;overflow:hidden;background:#fff;width:160px;min-width:160px;max-width:160px;box-shadow:0 2px 8px #0000000f;transition:transform .1s ease,box-shadow .2s ease}.gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.gengage-chat-product-card-img{width:100%;height:120px;object-fit:contain;display:block;background:#fff;padding:8px;box-sizing:border-box}.gengage-chat-product-card-body{display:flex;flex-direction:column;gap:4px;padding:8px 10px 10px;text-align:center}.gengage-chat-product-card-name{font-size:13px;font-weight:600;color:#1f2937;line-height:1.35;margin-bottom:0;min-height:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.gengage-chat-product-card-brand{font-size:10px;color:#666}.gengage-chat-product-card-rating{font-size:11px;color:#f59e0b;line-height:1}.gengage-chat-product-card-review-count{color:#64748b;font-size:10px}.gengage-chat-product-card-price{display:flex;align-items:baseline;justify-content:center;gap:4px;font-size:16px;font-weight:800;color:#0f172a}.gengage-chat-product-card-original-price{text-decoration:line-through;color:#64748b;font-weight:400;font-size:12px}.gengage-chat-price-skeleton{display:inline-block;width:80px;height:16px;background:linear-gradient(90deg,#e2e8f0 25%,#f1f5f9,#e2e8f0 75%);background-size:200% 100%;animation:gengage-skeleton-price-pulse 1.5s ease-in-out infinite;border-radius:4px;vertical-align:middle}@keyframes gengage-skeleton-price-pulse{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-product-card-cta{display:block;padding:8px 10px;text-align:center;background:transparent;color:var(--gengage-primary-color, #3b82f6);text-decoration:none;font-size:12px;font-weight:700;letter-spacing:.01em;border-top:1px solid #f1f5f9;transition:color .15s ease,background .15s ease}.gengage-chat-product-card-cta:hover{color:var(--gengage-primary-color, #0b24d6);background:#f8fafc}.gengage-chat-product-card-cta:active{background:#f1f5f9}.gengage-chat-product-summary{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;cursor:pointer;transition:background .15s,box-shadow .15s;margin:4px 0}.gengage-chat-product-summary:hover{background:#f9fafb;box-shadow:0 1px 4px #0000000f}.gengage-chat-product-summary__image{flex-shrink:0;width:64px;height:64px;border-radius:8px;overflow:hidden;border:1px solid #f3f4f6;background:#f9fafb}.gengage-chat-product-summary__image img{width:100%;height:100%;object-fit:cover;display:block}.gengage-chat-product-summary__content{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.gengage-chat-product-summary__name{font-size:13px;font-weight:500;line-height:1.3;color:#111827;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gengage-chat-product-summary__rating{font-size:11px;color:#f59e0b;line-height:1}.gengage-chat-product-summary__review-count{color:#6b7280;font-size:11px}.gengage-chat-product-summary__price{font-size:13px;font-weight:600;color:#111827;line-height:1;margin-top:2px}.gengage-chat-product-summary__price-original{text-decoration:line-through;color:#6b7280;font-weight:400;font-size:11px}.gengage-chat-product-summary__price-current{color:var(--gengage-primary-color, #111827)}.gengage-chat-product-summary__cta{flex-shrink:0;font-size:12px;font-weight:500;color:var(--gengage-primary-color, #2563eb);text-decoration:none;padding:4px 10px;border-radius:8px;transition:background .15s;white-space:nowrap}.gengage-chat-product-summary__cta:hover{background:#0000000a}.gengage-chat-product-summary__cta:focus-visible{outline:2px solid var(--gengage-primary-color, #2563eb);outline-offset:2px}.gengage-chat-product-grid{display:flex;gap:12px;overflow-x:auto;padding:8px 0;-webkit-overflow-scrolling:touch;scrollbar-width:none;scroll-snap-type:x proximity;min-height:180px}.gengage-chat-product-grid>*{scroll-snap-align:start;flex:0 0 auto}.gengage-chat-product-grid::-webkit-scrollbar{display:none}.gengage-chat-review-highlights{padding:2px 0 6px}.gengage-chat-review-item{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:10px 12px;background:#fff}.gengage-chat-review-item[data-tone=positive]{border-color:#bbf7d0;background:#f0fdf4}.gengage-chat-review-item[data-tone=negative]{border-color:#fecaca;background:#fef2f2}.gengage-chat-review-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--_gengage-text-secondary);margin-bottom:4px}.gengage-chat-review-text{font-size:13px;line-height:1.45;color:#1f2937}.gengage-chat-review-rating{margin-top:6px;font-size:12px;font-weight:700;color:#0f172a}.gengage-chat-review-empty{font-size:12px;color:var(--_gengage-text-secondary)}.gengage-chat-review-tabs{display:flex;gap:6px;margin-bottom:10px}.gengage-chat-review-tab{padding:6px 14px;border:1px solid var(--_gengage-border-color);border-radius:999px;background:#fff;color:var(--_gengage-text-secondary);font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;transition:background .15s,border-color .15s}.gengage-chat-review-tab:hover{background:#f8fafc}.gengage-chat-review-tab--active{background:#f1f5f9;border-color:#94a3b8;color:#0f172a}.gengage-chat-review-pills{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}.gengage-chat-review-pill{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--_gengage-border-color);border-radius:8px;background:#fff;font-size:12px;color:#334155;box-shadow:0 1px 2px #0000000a}.gengage-chat-review-pill[data-tone=positive]{border-color:#bbf7d0}.gengage-chat-review-pill[data-tone=negative]{border-color:#fecaca}.gengage-chat-review-pill-icon{font-size:11px;font-weight:700}.gengage-chat-review-pill[data-tone=positive] .gengage-chat-review-pill-icon{color:#16a34a}.gengage-chat-review-pill[data-tone=negative] .gengage-chat-review-pill-icon{color:#dc2626}.gengage-chat-review-pill-count{font-size:10px;font-weight:700;background:#f1f5f9;color:var(--_gengage-text-secondary);border-radius:4px;padding:1px 5px}.gengage-chat-review-items{display:grid;gap:10px}.gengage-chat-divider{border:none;border-top:1px solid var(--_gengage-border-color);margin:8px 0}.gengage-chat-divider-wrapper{display:flex;align-items:center;gap:8px;margin:8px 0}.gengage-chat-divider-wrapper hr{flex:1;border:none;border-top:1px solid var(--_gengage-border-color);margin:0}.gengage-chat-divider-label{font-size:11px;color:#6b7280;white-space:nowrap}.gengage-chat--overlay .gengage-chat-drawer{position:fixed;inset:0;width:100%;max-width:480px;max-height:100%;margin:0 auto;border-radius:0;animation:gengage-chat-overlay-in .24s cubic-bezier(.2,.72,.2,1)}.gengage-chat--overlay:before{content:"";position:fixed;inset:0;background:#00000073;z-index:-1}@keyframes gengage-chat-overlay-in{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-panel-skeleton{display:flex;flex-direction:column;gap:14px;padding:6px 0}.gengage-chat-panel-skeleton-block{height:110px;border-radius:10px;background:linear-gradient(90deg,#e5e7eb 25%,#f3f4f6,#e5e7eb 75%);background-size:200% 100%;animation:gengage-panel-shimmer 1.4s infinite}@keyframes gengage-panel-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.gengage-chat-panel-skeleton-block--image{height:200px;border-radius:8px;margin-bottom:12px}.gengage-chat-panel-skeleton-block--text{height:16px;border-radius:4px;margin-bottom:8px}.gengage-chat-panel-skeleton-block--text:nth-child(3){width:80%}.gengage-chat-panel-skeleton-block--text:nth-child(4){width:60%}.gengage-chat-panel-skeleton-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gengage-chat-panel-skeleton-block--card{height:120px;border-radius:8px}.gengage-chat-panel-skeleton-block--row{height:32px;border-radius:4px;margin-bottom:4px}.gengage-chat-panel .gengage-chat-product-card{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;border-radius:12px;border:1px solid var(--_gengage-border-color);box-shadow:0 1px 4px #0000000f;overflow:hidden;padding:0}.gengage-chat-panel .gengage-chat-product-card:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000001a;border-color:#d1d5db}.gengage-chat-panel .gengage-chat-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));overflow-x:visible;gap:12px;min-height:auto;padding:4px 0}.gengage-chat-panel .gengage-chat-product-card-img{width:100%;height:160px;border-radius:0;object-fit:contain;background:#fafafa;padding:12px;box-sizing:border-box}.gengage-chat-panel .gengage-chat-product-card-body{padding:10px 12px 12px;text-align:left;gap:4px}.gengage-chat-panel .gengage-chat-product-card-name{min-height:0;margin-bottom:2px;font-size:13px;-webkit-line-clamp:2;line-clamp:2}.gengage-chat-panel .gengage-chat-product-card-price{justify-content:flex-start;font-size:15px}.gengage-chat-panel .gengage-chat-product-card-cta{display:block;padding:10px 12px;text-align:center;border-top:1px solid #f1f5f9;border-radius:0;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-weight:700;font-size:13px}.gengage-chat-product-details-panel{display:flex;flex-direction:column;gap:12px;width:100%;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:16px;padding:14px;box-sizing:border-box}.gengage-chat-product-details-media{border:1px solid #f1f5f9;border-radius:12px;background:#fafafa;padding:12px;display:flex;flex-direction:column;align-items:center}.gengage-chat-product-details-img{width:100%;height:auto;max-height:300px;object-fit:contain;border-radius:8px}.gengage-chat-product-details-content{display:flex;flex-direction:column;gap:8px;min-width:0}.gengage-chat-product-details-title{margin:0;font-size:17px;font-weight:700;line-height:1.3;color:#0f172a}.gengage-chat-product-details-rating{display:inline-flex;align-items:center;gap:4px;width:fit-content;padding:3px 8px;border-radius:999px;background:#fff7ed;color:#9a3412;font-size:13px;font-weight:700}.gengage-chat-product-details-review-count{color:#7c2d12;font-weight:600}.gengage-chat-product-details-price{display:flex;align-items:baseline;gap:6px}.gengage-chat-product-details-original-price{font-size:14px;color:#64748b;text-decoration:line-through}.gengage-chat-product-details-current-price{font-size:22px;font-weight:800;line-height:1.1;color:#0f172a}.gengage-chat-product-details-stock{width:fit-content;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}.gengage-chat-product-details-stock.is-in-stock{background:#dcfce7;color:#166534}.gengage-chat-product-details-stock.is-out-of-stock{background:#fee2e2;color:#991b1b}.gengage-chat-product-details-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px}.gengage-chat-product-details-cta{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 20px;border-radius:999px;border:none;text-decoration:none;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:14px;font-weight:700;cursor:pointer;transition:filter .14s ease,transform .12s ease}.gengage-chat-product-details-cta:hover{filter:brightness(1.05);transform:translateY(-1px)}.gengage-chat-product-details-cta:active{transform:translateY(1px)}.gengage-chat-product-details-atc{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border:none;border-radius:10px;background:var(--_gengage-success-color);color:#fff;font-size:14px;font-weight:700;font-family:inherit;cursor:pointer;transition:filter .12s ease,transform .12s ease}.gengage-chat-product-details-atc:hover{filter:brightness(1.08);transform:translateY(-1px)}.gengage-chat-product-details-atc:active{transform:translateY(1px)}.gengage-chat-product-detail-tabs{margin-top:4px;border-top:1px solid var(--_gengage-border-color);padding-top:12px}.gengage-chat-product-detail-tab-bar{display:flex;gap:0;border-bottom:2px solid var(--_gengage-border-color);margin-bottom:12px}.gengage-chat-product-detail-tab{flex:1;padding:8px 12px;border:none;background:transparent;color:var(--_gengage-text-secondary);font-size:13px;font-weight:600;font-family:inherit;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:color .15s,border-color .15s}.gengage-chat-product-detail-tab:hover{color:#334155}.gengage-chat-product-detail-tab--active{color:var(--gengage-primary-color, #3b82f6);border-bottom-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-detail-tab-panel{font-size:13px;line-height:1.6;color:#374151}.gengage-chat-product-specs-table{width:100%;border-collapse:collapse;font-size:13px}.gengage-chat-product-specs-table tr:nth-child(2n){background:#f8fafc}.gengage-chat-product-specs-key{padding:6px 10px;font-weight:600;color:#475569;white-space:nowrap;border-bottom:1px solid #f1f5f9;width:40%}.gengage-chat-product-specs-value{padding:6px 10px;color:#1f2937;border-bottom:1px solid #f1f5f9}.gengage-chat-product-card-atc{position:absolute;bottom:42px;right:6px;opacity:0;transition:opacity .15s ease;z-index:1}.gengage-chat-product-card:hover .gengage-chat-product-card-atc{opacity:1}.gengage-chat-drawer.gengage-chat-drawer--hidden,.gengage-chat-root--mobile .gengage-chat-drawer.gengage-chat-drawer--hidden{display:none!important;pointer-events:none;box-shadow:none}@media(max-width:900px){.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:clamp(280px,calc(100vw - var(--_gengage-chat-conversation-width)),560px);max-width:560px}}.gengage-chat-attachment-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f3f4f6;border:1px solid var(--_gengage-border-color);border-radius:8px;width:100%;box-sizing:border-box}.gengage-chat-attachment-preview--hidden{display:none}.gengage-chat-attachment-preview-thumb{width:40px;height:40px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-attachment-name{flex:1;font-size:12px;color:#4b5563;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gengage-chat-attachment-remove{background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:0 4px;line-height:1;flex-shrink:0}.gengage-chat-attachment-remove:hover{color:#ef4444}.gengage-chat-attach-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-attach-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-attach-btn svg{width:20px;height:20px}.gengage-chat-mic-btn{background:none;border:none;cursor:pointer;width:32px;height:32px;padding:0;line-height:1;flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:50%;color:#6b7280;transition:color .15s,background .15s}.gengage-chat-mic-btn:hover{color:#4b5563;background:#0000000d}.gengage-chat-mic-btn svg{width:20px;height:20px}.gengage-chat-mic-btn--active{color:#ef4444;animation:gengage-mic-pulse 1.2s ease-in-out infinite}.gengage-chat-mic-btn--active:hover{color:#dc2626}@keyframes gengage-mic-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.15);opacity:.8}}.gengage-chat-input-area--dragover{outline:2px dashed var(--gengage-primary-color, #3b82f6);outline-offset:-2px;background:#eff6ff}.gengage-chat-attachment-thumb{width:120px;max-width:100%;height:auto;border-radius:8px;margin-bottom:6px;display:block}@media(max-width:768px){.gengage-chat-root{--_gengage-qty-btn-size: 44px;--_gengage-qty-btn-size-compact: 44px}.gengage-chat-header-btn,.gengage-chat-close{width:44px;height:44px;border-radius:12px}.gengage-chat-attach-btn,.gengage-chat-mic-btn,.gengage-chat-send{width:44px;height:44px;min-width:44px}.gengage-chat-attach-btn svg,.gengage-chat-mic-btn svg{width:22px;height:22px}.gengage-chat-panel-divider{display:flex;width:100%;height:20px;align-items:center;justify-content:center;cursor:ns-resize;background:transparent;touch-action:pan-y;position:relative;overflow:visible}.gengage-chat-panel-divider--hidden{display:none}.gengage-chat-drawer--with-panel{left:0;right:0;width:100%;border-radius:0}.gengage-chat-drawer--with-panel .gengage-chat-body{flex-direction:column}.gengage-chat-drawer--with-panel .gengage-chat-panel--visible{width:100%;min-width:0;max-width:none;max-height:30dvh;border-right:none;border-bottom:1px solid var(--_gengage-border-color);padding:0 12px 12px;margin:0;border-radius:0;box-shadow:none}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider{width:100%;height:20px;background:transparent;border-bottom:1px solid rgba(148,163,184,.22)}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle{left:50%;top:50%;transform:translate(-50%,-50%);width:100%;height:44px;border:none;border-radius:0;background:transparent;box-shadow:none;color:transparent;font-size:0;line-height:0;padding:0}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:before{content:"";display:block;width:52px;height:5px;margin:0 auto;border-radius:999px;background:#94a3b8;box-shadow:0 1px #64748b59;transition:background .15s ease}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active{background:transparent;color:transparent}.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:hover:before,.gengage-chat-drawer--with-panel .gengage-chat-panel-divider-toggle:active:before{background:#64748b}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider{width:100%;background:transparent}.gengage-chat-panel--collapsed~.gengage-chat-panel-divider .gengage-chat-panel-divider-toggle{left:50%;transform:translate(-50%,-50%)}.gengage-chat-drawer--with-panel .gengage-chat-conversation{width:100%;flex:1;border-left:none}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px;padding:0 12px;font-size:13px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{min-height:44px;padding:0 16px}.gengage-chat-product-details-share{width:44px;height:44px}.gengage-chat-panel .gengage-chat-product-card{grid-template-columns:84px 1fr}.gengage-chat-panel .gengage-chat-product-card-cta{grid-column:1 / -1;width:100%}.gengage-chat-product-details-panel{padding:12px;gap:12px}.gengage-chat-product-details-media{min-height:140px}.gengage-chat-product-details-title{font-size:15px}.gengage-chat-product-details-current-price{font-size:20px}.gengage-chat-product-grid{scroll-snap-type:x mandatory}.gengage-chat-product-card{width:280px;min-width:280px;scroll-snap-align:center}.gengage-chat-product-card-img{height:180px}}@media(max-width:480px){.gengage-chat-drawer{position:fixed;inset:0;width:100%;max-height:100%;border-radius:0}.gengage-chat-bubble{max-width:100%}}.gengage-chat-kvkk-banner{display:flex;align-items:flex-start;gap:8px;padding:10px 14px;background:#fffbeb;border-bottom:1px solid #fde68a;font-size:12px;line-height:1.5;color:#92400e}.gengage-chat-kvkk-content{flex:1;min-width:0}.gengage-chat-kvkk-content a{color:#b45309;text-decoration:underline}.gengage-chat-kvkk-dismiss{flex-shrink:0;width:20px;height:20px;border:none;background:transparent;color:#92400e;font-size:16px;cursor:pointer;padding:0;line-height:1}.gengage-chat-comparison{padding:16px}.gengage-chat-comparison-heading{font-size:14px;font-weight:700;letter-spacing:.05em;color:#0f172a;margin:0 0 16px}.gengage-chat-comparison-recommended{border:1px solid var(--_gengage-border-color);border-radius:12px;padding:16px;background:#fff;box-shadow:0 1px 3px #0000000f;margin-bottom:12px}.gengage-chat-comparison-recommended-label{font-size:12px;font-weight:700;color:#16a34a;text-transform:uppercase;letter-spacing:.04em;margin-bottom:12px}.gengage-chat-comparison-recommended-body{display:flex;gap:12px;align-items:flex-start}.gengage-chat-comparison-recommended-body img{width:80px;height:80px;object-fit:contain;border-radius:8px;background:#f8fafc}.gengage-chat-comparison-recommended-info{flex:1;min-width:0}.gengage-chat-comparison-recommended-title{font-size:14px;font-weight:600;color:#0f172a;margin-bottom:4px}.gengage-chat-comparison-recommended-price{font-size:16px;font-weight:700;color:#0f172a}.gengage-chat-comparison-highlights{margin-top:12px;padding-top:12px;border-top:1px solid #f1f5f9}.gengage-chat-comparison-highlights-label{font-size:12px;font-weight:600;color:var(--_gengage-text-secondary);margin-bottom:6px}.gengage-chat-comparison-highlights ul{margin:0;padding-left:18px;font-size:13px;color:#334155;line-height:1.6}.gengage-chat-comparison-special{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:12px 16px;margin-bottom:12px;font-size:13px;color:#92400e}.gengage-chat-comparison-special summary{cursor:pointer;font-weight:600}.gengage-chat-comparison-special ul{margin:8px 0 0;padding-left:18px;line-height:1.6}.gengage-chat-comparison-table{width:100%;border-collapse:collapse;font-size:13px;margin-top:12px}.gengage-chat-comparison-table th,.gengage-chat-comparison-table td{padding:10px 12px;text-align:center;border-bottom:1px solid #f1f5f9;vertical-align:top}.gengage-chat-comparison-table th{font-weight:600;font-size:12px;color:#334155}.gengage-chat-comparison-table th img{width:60px;height:60px;object-fit:contain;border-radius:6px;background:#f8fafc;margin-bottom:6px}.gengage-chat-comparison-table-price{font-weight:700;color:#0f172a}.gengage-chat-comparison-label{text-align:left;font-weight:600;color:var(--_gengage-text-secondary);white-space:nowrap}.gengage-chat-comparison-selected{background:#f0fdf4}.gengage-chat-comparison-recommended-text{padding:8px 12px;font-size:12px;color:var(--gengage-text-secondary, #475569);font-style:italic;border-top:1px solid var(--gengage-border-color, #e2e8f0);margin-top:8px}.gengage-chat-comparison-product-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.gengage-chat-comparison-view-btn{flex:1;min-width:0;padding:8px 12px;border:1px solid var(--gengage-primary-color, #3b82f6);border-radius:6px;background:transparent;color:var(--gengage-primary-color, #3b82f6);font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .15s ease,color .15s ease;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.gengage-chat-comparison-view-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-pills{position:relative;padding:8px 12px;border-top:1px solid #f1f5f9;background:var(--gengage-background-color, #fff)}.gengage-chat-pills-scroll{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-right:28px}.gengage-chat-pills-scroll::-webkit-scrollbar{display:none}.gengage-chat-pill{flex:0 0 auto;padding:8px 16px;border:none;border-radius:999px;background:var(--gengage-primary-color, #3b82f6);color:var(--gengage-primary-foreground, #fff);font-size:13px;font-weight:600;font-family:inherit;white-space:nowrap;cursor:pointer;transition:filter .15s,transform .1s}.gengage-chat-pill:hover{filter:brightness(.92)}.gengage-chat-pill:active{transform:scale(.97)}.gengage-chat-pill--rich{display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:20px}.gengage-chat-pill-img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex-shrink:0;background:#ffffff26}.gengage-chat-pill-text{font-size:13px;font-weight:600;line-height:1.2}.gengage-chat-pill-desc{display:none}.gengage-chat-pill--rich .gengage-chat-pill-desc{display:block;font-size:10px;font-weight:400;opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.gengage-chat-pills-arrow{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border-radius:50%;border:1px solid var(--_gengage-border-color);background:#fff;color:var(--_gengage-text-secondary);font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:-4px 0 8px #ffffffe6;z-index:1}.gengage-chat-pills-arrow:hover{background:#f8fafc;color:#334155}@media(prefers-reduced-motion:reduce){.gengage-chat-uispec>*,.gengage-chat-action-btn,.gengage-chat-product-card,.gengage-chat-product-card-cta,.gengage-chat-send,.gengage-chat-launcher,.gengage-chat-pill,.gengage-chat-drawer,.gengage-chat-proactive,.gengage-chat-typing-dots span,.gengage-chat-typing-sparkle,.gengage-chat-thinking-step-marker--active,.gengage-chat-bubble,.gengage-chat-panel-skeleton-block,.gengage-chat-ai-toppick-card,.gengage-chat-mic-btn--active,.gengage-chat-ai-toppick-spinner:after,.gengage-chat-panel-shimmer,.gengage-chat-overlay,.gengage-chat-product-details-skeleton-price{animation:none!important;transition:none!important;transform:none!important}}.gengage-chat-bubble--user{position:relative}.gengage-chat-rollback-btn{position:absolute;left:-28px;top:50%;transform:translateY(-50%);width:24px;height:24px;border:none;border-radius:50%;background:var(--gengage-surface-color, #f1f5f9);color:var(--gengage-text-secondary, #64748b);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease;padding:0}.gengage-chat-bubble--user:hover .gengage-chat-rollback-btn{opacity:1}.gengage-chat-rollback-btn:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-bubble--hidden{display:none}.gengage-chat-ai-top-picks{display:flex;flex-direction:column;gap:12px;padding:8px 0}.gengage-chat-ai-top-picks-title{font-size:15px;font-weight:600;color:var(--gengage-text-primary, #1e293b);margin:0 0 4px}.gengage-chat-ai-top-picks-cards{display:flex;flex-direction:column;gap:10px}.gengage-chat-ai-toppick-discount-badge{position:absolute;top:8px;left:8px;background:var(--gengage-discount-bg, #ef4444);color:#fff;font-size:11px;font-weight:700;padding:2px 6px;border-radius:4px;z-index:1}.gengage-chat-ai-toppick-card--winner{position:relative;display:flex;flex-direction:column;border:2px solid var(--gengage-primary-color, #3b82f6);border-radius:12px;background:#fff;overflow:hidden;transition:box-shadow .2s ease}.gengage-chat-ai-toppick-card--winner:hover{box-shadow:0 4px 16px #3b82f626}.gengage-chat-ai-toppick-card--winner .gengage-chat-ai-toppick-img{width:100%;height:140px;object-fit:contain;background:#f8fafc}.gengage-chat-ai-toppick-card--compact{position:relative;display:flex;flex-direction:row;align-items:center;gap:12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;background:#fff;padding:10px;transition:box-shadow .2s ease,transform .15s ease}.gengage-chat-ai-toppick-card--compact:hover{box-shadow:0 2px 8px #00000014;transform:translateY(-1px)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:#f8fafc;flex-shrink:0}.gengage-chat-ai-toppick-badge{position:absolute;top:8px;left:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:10px;font-weight:700;text-transform:uppercase;padding:2px 8px;border-radius:4px;z-index:1;letter-spacing:.5px}.gengage-chat-ai-toppick-body{display:flex;flex-direction:column;gap:4px;padding:10px;flex:1;min-width:0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-body{padding:0}.gengage-chat-ai-toppick-name{font-size:13px;font-weight:600;color:var(--gengage-text-primary, #1e293b);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.gengage-chat-ai-toppick-role{font-size:11px;font-weight:600;color:var(--gengage-primary-color, #3b82f6);text-transform:uppercase;letter-spacing:.3px}.gengage-chat-ai-toppick-labels{display:flex;flex-wrap:wrap;gap:4px}.gengage-chat-ai-toppick-label{font-size:11px;padding:1px 6px;border-radius:4px;font-weight:500}.gengage-chat-ai-toppick-label[data-sentiment=positive]{background:#dcfce7;color:#166534}.gengage-chat-ai-toppick-label[data-sentiment=negative]{background:#fee2e2;color:#991b1b}.gengage-chat-ai-toppick-label[data-sentiment=neutral]{background:#f1f5f9;color:#475569}.gengage-chat-ai-toppick-score{font-size:12px;font-weight:700;color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-ai-toppick-reason{font-size:12px;color:var(--gengage-chat-text-secondary, #666);line-height:1.4;margin-top:4px}.gengage-chat-ai-toppick-review{font-size:12px;font-style:italic;color:var(--gengage-text-secondary, #64748b);margin:2px 0;padding-left:8px;border-left:2px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-ai-toppick-price{font-size:14px;font-weight:700;color:var(--gengage-text-primary, #1e293b)}.gengage-chat-ai-toppick-original-price{text-decoration:line-through;color:var(--gengage-text-secondary, #64748b);font-weight:400;font-size:12px}.gengage-chat-ai-toppick-cta{display:block;width:calc(100% - 20px);margin:6px 10px 10px;padding:8px 0;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:13px;font-weight:600;cursor:pointer;text-align:center;transition:background .15s ease}.gengage-chat-ai-toppick-cta:hover{filter:brightness(.92)}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:auto;margin:0;padding:6px 14px;flex-shrink:0;align-self:center}.gengage-chat-ai-toppick-spinner{position:absolute;inset:0;background:#ffffffb3;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:3}.gengage-chat-ai-toppick-spinner:after{content:"";width:24px;height:24px;border:3px solid var(--gengage-border, #e2e8f0);border-top-color:var(--gengage-accent-primary, #3b82f6);border-radius:50%;animation:gengage-spin .7s linear infinite}@keyframes gengage-spin{to{transform:rotate(360deg)}}@media(max-width:768px){.gengage-chat-ai-top-picks-cards{flex-direction:row;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;gap:10px;padding-bottom:4px}.gengage-chat-ai-toppick-card--winner,.gengage-chat-ai-toppick-card--compact{min-width:280px;max-width:280px;flex-shrink:0;scroll-snap-align:start}.gengage-chat-ai-toppick-card--compact{flex-direction:column;align-items:stretch}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-img{width:100%;height:100px;border-radius:8px 8px 0 0}.gengage-chat-ai-toppick-card--compact .gengage-chat-ai-toppick-cta{width:calc(100% - 20px);margin:6px 10px 10px;align-self:stretch}.gengage-chat-rollback-btn{left:-24px}}.gengage-chat-grounding-review{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grounding-review:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grounding-review-icon{font-size:20px;flex-shrink:0}.gengage-chat-grounding-review-body{flex:1;min-width:0}.gengage-chat-grounding-review-title{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grounding-review-subtitle{font-size:12px;color:var(--gengage-text-muted, #64748b);margin-top:2px}.gengage-chat-grounding-review-cta{font-size:13px;font-weight:500;color:var(--gengage-primary-color, #3b82f6);white-space:nowrap;flex-shrink:0}.gengage-chat-grouping-cards{display:flex;flex-direction:column;gap:6px}.gengage-chat-grouping-card{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:8px;transition:background .15s ease,border-color .15s ease}.gengage-chat-grouping-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-grouping-card-arrow{display:none;font-size:14px;color:var(--gengage-primary-color, #3b82f6);flex-shrink:0}.gengage-chat-grouping-card-img{width:20px;height:20px;border-radius:4px;object-fit:cover;flex-shrink:0}.gengage-chat-grouping-card-body{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.gengage-chat-grouping-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-grouping-card-desc{font-size:12px;color:var(--gengage-text-muted, #64748b)}.gengage-chat-grouping-card-labels{display:block;font-size:11px;color:var(--gengage-chat-text-secondary, #888);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gengage-chat-root--mobile .gengage-chat-grouping-card-img{display:none}.gengage-chat-root--mobile .gengage-chat-grouping-card-arrow{display:inline}.gengage-chat-suggested-search-cards{display:flex;flex-direction:column;gap:8px}.gengage-chat-suggested-search-card{display:flex;align-items:flex-start;gap:12px;padding:10px 14px;background:var(--gengage-surface-color, #f8fafc);border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:10px;transition:background .15s ease,border-color .15s ease}.gengage-chat-suggested-search-card:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-suggested-search-card-img{width:40px;height:40px;border-radius:6px;object-fit:cover;flex-shrink:0}.gengage-chat-suggested-search-card-body{flex:1;min-width:0}.gengage-chat-suggested-search-card-name{font-weight:600;font-size:13px;color:var(--gengage-text-color, #1e293b)}.gengage-chat-suggested-search-card-desc{font-size:12px;color:var(--gengage-text-secondary, #475569);margin-top:2px}.gengage-chat-suggested-search-card-diff{font-size:11px;color:var(--gengage-text-muted, #64748b);margin-top:2px;font-style:italic}.gengage-chat-product-details-gallery{position:relative}.gengage-chat-product-details-gallery .gengage-chat-product-details-img{touch-action:pan-y}.gengage-chat-product-gallery-thumbs{display:flex;gap:8px;padding:10px 0 4px;overflow-x:auto;scrollbar-width:thin;justify-content:center;width:100%}.gengage-chat-product-gallery-thumb{width:56px;height:56px;object-fit:cover;border-radius:8px;border:2px solid transparent;cursor:pointer;flex-shrink:0;transition:border-color .15s ease;background:#fff}.gengage-chat-product-gallery-thumb:hover{border-color:var(--gengage-border-color, #cbd5e1)}.gengage-chat-product-gallery-thumb--active{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-variants{margin-top:12px}.gengage-chat-product-variants-label{font-size:12px;font-weight:600;color:var(--gengage-text-muted, #64748b);margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}.gengage-chat-product-variants-list{display:flex;flex-wrap:wrap;gap:6px}.gengage-chat-product-variant-btn{padding:6px 12px;border:1px solid var(--gengage-border-color, #e2e8f0);border-radius:6px;background:var(--gengage-surface-color, #f8fafc);color:var(--gengage-text-color, #1e293b);font-size:12px;cursor:pointer;transition:background .15s ease,border-color .15s ease}.gengage-chat-product-variant-btn:hover{background:var(--gengage-hover-color, #f1f5f9);border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-product-grid-wrapper{display:flex;flex-direction:column;gap:8px}.gengage-chat-product-sort-toolbar{display:flex;gap:4px;padding:4px;background:var(--gengage-surface-color, #f8fafc);border-radius:8px;border:1px solid var(--gengage-border-color, #e2e8f0)}.gengage-chat-product-sort-btn{flex:1;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease}.gengage-chat-product-sort-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-product-sort-btn--active,.gengage-chat-product-sort-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-product-sort-separator{width:1px;background:var(--gengage-border-color, #e2e8f0);margin:2px}.gengage-chat-comparison-toggle-btn{flex:none;padding:6px 10px;border:none;border-radius:6px;background:transparent;color:var(--gengage-text-muted, #64748b);font-size:12px;font-weight:500;cursor:pointer;transition:background .15s ease,color .15s ease;white-space:nowrap}.gengage-chat-comparison-toggle-btn:hover{background:var(--gengage-hover-color, #f1f5f9);color:var(--gengage-text-color, #1e293b)}.gengage-chat-comparison-toggle-btn--active,.gengage-chat-comparison-toggle-btn--active:hover{background:var(--gengage-primary-color, #3b82f6);color:#fff}.gengage-chat-comparison-select-wrapper{position:relative}.gengage-chat-comparison-checkbox{position:absolute;top:8px;left:8px;z-index:2;width:18px;height:18px;cursor:pointer;accent-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-comparison-floating-btn{display:block;width:100%;margin-top:8px;padding:10px 16px;border:none;border-radius:8px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease;text-align:center}.gengage-chat-comparison-floating-btn:hover{background:var(--gengage-primary-hover, #2563eb)}.gengage-chat-panel-topbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--_gengage-border-color);background:#f8fafc;min-height:44px;flex-shrink:0;position:sticky;top:0;z-index:3}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward{width:28px;height:28px;min-width:28px;padding:0;border:1px solid #d1d5db;border-radius:6px;background:transparent;color:#374151;font-size:14px;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .15s ease,border-color .15s ease,opacity .15s ease}.gengage-chat-panel-topbar-back:hover:not(:disabled),.gengage-chat-panel-topbar-forward:hover:not(:disabled){background:#f3f4f6;border-color:#9ca3af}.gengage-chat-panel-topbar-back:disabled,.gengage-chat-panel-topbar-forward:disabled{opacity:.3;cursor:default}.gengage-chat-panel-topbar-title{flex:1;font-size:14px;font-weight:600;color:#1f2937;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}@keyframes gengage-typewriter-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-typewriter-block{display:block;animation:gengage-typewriter-fade-in .15s ease both}@media(prefers-reduced-motion:reduce){.gengage-chat-typewriter-block{animation:none}}.gengage-product-mention{color:var(--gengage-primary-color, #3b82f6);text-decoration:none;cursor:pointer;font-weight:500;border-bottom:1px dashed var(--gengage-primary-color, #3b82f6);transition:border-color .15s}.gengage-product-mention:hover{border-bottom-style:solid}@keyframes gengage-skeleton-pulse{0%,to{opacity:.4}50%{opacity:.8}}.gengage-chat-panel-skeleton-block{animation:gengage-skeleton-pulse 1.5s ease-in-out infinite}@media(prefers-reduced-motion:reduce){.gengage-chat-panel-skeleton-block{animation:none}}.gengage-chat-input-chips{display:flex;gap:6px;padding:4px 12px 2px;flex-wrap:wrap}.gengage-chat-input-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:12px;border:1px solid var(--_gengage-border-color);background:#f9fafb;color:#374151;font-size:12px;font-weight:500;font-family:inherit;cursor:pointer;transition:background .12s,border-color .12s;white-space:nowrap}.gengage-chat-input-chip:hover{background:#f3f4f6;border-color:#d1d5db}.gengage-chat-icon{width:14px;height:14px;flex-shrink:0}.gengage-chat-input-chip-icon,.gengage-chat-pill-icon{display:inline-flex;align-items:center;margin-right:4px}.gengage-chat-product-card-img-wrapper,.gengage-chat-product-details-img-wrap{position:relative;overflow:hidden}.gengage-chat-product-card-discount-badge{position:absolute;top:6px;left:6px;padding:2px 6px;border-radius:4px;background:var(--_gengage-discount-color);color:#fff;font-size:11px;font-weight:700;line-height:1.3;z-index:1}.gengage-chat-product-card-stock{font-size:11px;font-weight:600;margin-top:2px}.gengage-chat-product-card-stock.is-in-stock{color:var(--_gengage-success-color)}.gengage-chat-product-card-stock.is-out-of-stock{color:#dc2626}.gengage-chat-find-similar-pill{position:absolute;top:8px;right:8px;opacity:0;pointer-events:none;transition:opacity .2s ease;padding:4px 10px;font-size:11px;font-weight:500;font-family:inherit;border:none;border-radius:12px;background:var(--gengage-chat-pill-bg, rgba(0, 0, 0, .7));color:var(--gengage-chat-pill-text, #fff);cursor:pointer;white-space:nowrap;z-index:2}.gengage-chat-product-card-img-wrapper:hover .gengage-chat-find-similar-pill,.gengage-chat-product-details-img-wrap:hover .gengage-chat-find-similar-pill{opacity:1;pointer-events:auto}.gengage-chat-favorite-btn{position:absolute;top:8px;right:8px;background:#ffffffe6;border:none;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--gengage-text-secondary, #64748b);z-index:3;transition:color .2s;padding:0}.gengage-chat-favorite-btn:hover,.gengage-chat-favorite-btn--active{color:var(--gengage-accent-primary, #ef4444)}.gengage-chat-product-card-promos,.gengage-chat-product-details-promos{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.gengage-chat-product-card-promo-badge,.gengage-chat-product-details-promo-badge{display:inline-block;padding:2px 6px;font-size:10px;font-weight:500;border-radius:4px;background:var(--gengage-chat-promo-bg, #e8f5e9);color:var(--gengage-chat-promo-text, #2e7d32);white-space:nowrap}.gengage-chat-thumbnails-column{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;gap:4px;z-index:2;pointer-events:auto}.gengage-chat-thumbnail-btn{display:flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:2px solid #e5e7eb;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden;transition:border-color .15s ease}.gengage-chat-thumbnail-btn:hover{border-color:var(--gengage-primary-color, #3b82f6)}.gengage-chat-thumbnail-img{width:100%;height:100%;object-fit:cover}.gengage-chat-choice-prompter{position:absolute;bottom:12px;right:12px;width:200px;padding:12px 14px;background:#fff;border:1px solid var(--_gengage-border-color);border-radius:10px;box-shadow:0 4px 12px #0000001a;z-index:10;animation:gengage-choice-prompter-in .2s ease}@keyframes gengage-choice-prompter-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.gengage-chat-choice-prompter-heading{font-size:13px;font-weight:600;color:#1f2937;margin-bottom:4px}.gengage-chat-choice-prompter-suggestion{font-size:12px;color:#6b7280;margin-bottom:10px;line-height:1.4}.gengage-chat-choice-prompter-cta{display:block;width:100%;padding:6px 12px;border:none;border-radius:6px;background:var(--gengage-primary-color, #3b82f6);color:#fff;font-size:12px;font-weight:600;font-family:inherit;cursor:pointer;text-align:center;transition:opacity .15s ease}.gengage-chat-choice-prompter-cta:hover{opacity:.9}.gengage-chat-choice-prompter-dismiss{position:absolute;top:4px;right:6px;padding:2px 6px;border:none;background:none;color:#6b7280;font-size:16px;cursor:pointer;line-height:1}.gengage-chat-choice-prompter-dismiss:hover{color:#6b7280}@media(prefers-reduced-motion:reduce){.gengage-chat-choice-prompter{animation:none}}.gengage-chat-pros-cons{padding:12px 14px;background:#f8fafc;border-radius:8px;margin:8px 0}.gengage-chat-pros-cons-heading{margin:0 0 10px;font-size:14px;font-weight:600;color:#0f172a}.gengage-chat-pros-cons-list{list-style:none;margin:0 0 8px;padding:0}.gengage-chat-pros-cons-list:last-child{margin-bottom:0}.gengage-chat-pros-cons-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.5;color:#334155}.gengage-chat-pros-cons-icon{flex-shrink:0;width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border-radius:50%}.gengage-chat-pros-cons-icon--pro{color:#16a34a;background:#dcfce7}.gengage-chat-pros-cons-icon--con{color:#dc2626;background:#fee2e2}.gengage-chat-categories{display:flex;flex-direction:column;gap:8px}.gengage-chat-categories-tabs{display:flex;gap:4px;overflow-x:auto;padding:4px 0;-webkit-overflow-scrolling:touch}.gengage-chat-categories-tab{padding:6px 14px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:20px;background:var(--gengage-bg, #fff);color:var(--gengage-text, #374151);cursor:pointer;white-space:nowrap;font-size:13px;transition:background .15s,color .15s}.gengage-chat-categories-tab:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-categories-tab--active{background:var(--gengage-primary, #2563eb);color:#fff;border-color:var(--gengage-primary, #2563eb)}.gengage-chat-categories-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.gengage-chat-categories-filter-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}.gengage-chat-categories-filter-tag{padding:4px 10px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:14px;background:var(--gengage-bg, #fff);color:var(--gengage-text-secondary, #6b7280);font-size:12px;cursor:pointer;transition:background .15s}.gengage-chat-categories-filter-tag:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid-view-more{display:block;width:100%;padding:10px;margin-top:8px;border:1px solid var(--gengage-border-color, #e5e7eb);border-radius:8px;background:var(--gengage-bg, #fff);color:var(--gengage-primary, #2563eb);font-size:14px;font-weight:500;cursor:pointer;text-align:center;transition:background .15s;grid-column:1 / -1}.gengage-chat-product-grid-view-more:hover{background:var(--gengage-bg-hover, #f3f4f6)}.gengage-chat-product-grid--mobile{display:flex;overflow-x:auto;gap:8px;padding:8px 0;-webkit-overflow-scrolling:touch}.gengage-chat-product-grid--mobile .gengage-chat-product-card{min-width:160px;max-width:180px;flex-shrink:0}.gengage-chat-comparison--mobile{overflow-x:auto;-webkit-overflow-scrolling:touch}.gengage-chat-comparison--mobile .gengage-chat-comparison-table{min-width:480px}.gengage-chat-comparison-key-differences{margin-top:12px;padding:12px;background:var(--gengage-bg-secondary, #f9fafb);border-radius:8px}.gengage-chat-comparison-key-differences h4{margin:0 0 8px;font-size:14px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-comparison-key-differences-content{font-size:13px;color:var(--gengage-text-secondary, #6b7280);line-height:1.5}.gengage-chat-comparison-key-differences-content ul{margin:0;padding-left:18px}.gengage-chat-comparison-key-differences-content li{margin-bottom:4px}.gengage-chat-product-details-similars-heading{margin:16px 0 8px;font-size:15px;font-weight:600;color:var(--gengage-text, #374151)}.gengage-chat-product-details-similars{margin-top:8px}.gengage-chat-handoff-notice{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px;margin:8px 0;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;text-align:center}.gengage-chat-handoff-notice-icon{font-size:24px}.gengage-chat-handoff-notice-heading{margin:0;font-size:14px;font-weight:600;color:#92400e}.gengage-chat-handoff-notice-summary{margin:0;font-size:13px;line-height:1.5;color:#78350f}.gengage-qty-stepper{display:inline-flex;align-items:center;gap:0;border:1px solid #d1d5db;border-radius:8px;overflow:hidden;background:#fff}.gengage-qty-btn{width:var(--_gengage-qty-btn-size);height:var(--_gengage-qty-btn-size);border:none;background:transparent;color:#374151;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .12s}.gengage-qty-btn:hover:not(:disabled){background:#f3f4f6}.gengage-qty-btn:disabled{opacity:.35;cursor:default}.gengage-qty-value{min-width:24px;text-align:center;font-size:13px;font-weight:600;color:#1f2937;-webkit-user-select:none;user-select:none}.gengage-qty-submit{border:none;border-left:1px solid #d1d5db;background:var(--_gengage-success-color);color:#fff;font-size:13px;font-weight:700;font-family:inherit;cursor:pointer;padding:6px 12px;transition:filter .12s ease,transform .12s ease}.gengage-qty-submit:hover{filter:brightness(1.08)}.gengage-qty-submit:active{transform:translateY(1px)}.gengage-qty-stepper--compact{border-radius:14px;box-shadow:0 2px 6px #0000001f}.gengage-qty-stepper--compact .gengage-qty-btn{width:var(--_gengage-qty-btn-size-compact);height:var(--_gengage-qty-btn-size-compact);font-size:12px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:18px;font-size:12px}.gengage-qty-stepper--compact .gengage-qty-submit{padding:4px 8px;font-size:13px;border-radius:0 14px 14px 0}.gengage-chat-product-details-atc-stepper{border-radius:10px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:32px;height:32px}.gengage-chat-product-details-atc-stepper .gengage-qty-value{min-width:28px;font-size:14px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit{padding:8px 18px;font-size:14px;border-radius:0 10px 10px 0}.gengage-chat-product-details-share{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid #d1d5db;border-radius:10px;background:transparent;color:#6b7280;cursor:pointer;transition:color .12s,border-color .12s,background-color .12s;position:relative;flex-shrink:0}.gengage-chat-product-details-share:hover{color:var(--gengage-primary-color, #3b82f6);border-color:var(--gengage-primary-color, #3b82f6);background:#f0f7ff}.gengage-chat-product-details-share:before{content:attr(aria-label);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);padding:4px 8px;border-radius:4px;background:#1e293b;color:#fff;font-size:11px;font-weight:500;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .15s ease;z-index:2}.gengage-chat-product-details-share:hover:before{opacity:1}.gengage-chat-product-details-share--copied:after{content:"✓";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--_gengage-success-color);color:#fff;border-radius:10px;font-size:16px;font-weight:700}.gengage-chat-launcher:focus-visible,.gengage-chat-close:focus-visible,.gengage-chat-header-btn:focus-visible,.gengage-chat-header-powered:focus-visible,.gengage-chat-proactive-accept:focus-visible,.gengage-chat-proactive-dismiss:focus-visible,.gengage-chat-send:focus-visible,.gengage-chat-action-btn:focus-visible,.gengage-chat-pill:focus-visible,.gengage-chat-input-chip:focus-visible,.gengage-chat-pills-arrow:focus-visible,.gengage-chat-error-retry:focus-visible,.gengage-chat-product-card-cta:focus-visible,.gengage-chat-product-details-cta:focus-visible,.gengage-chat-product-details-atc:focus-visible,.gengage-chat-product-detail-tab:focus-visible,.gengage-chat-panel-divider-toggle:focus-visible,.gengage-chat-panel-topbar-back:focus-visible,.gengage-chat-panel-topbar-forward:focus-visible,.gengage-chat-rollback-btn:focus-visible,.gengage-chat-ai-toppick-cta:focus-visible,.gengage-chat-comparison-view-btn:focus-visible,.gengage-chat-comparison-toggle-btn:focus-visible,.gengage-chat-comparison-floating-btn:focus-visible,.gengage-chat-comparison-checkbox:focus-visible,.gengage-chat-product-sort-btn:focus-visible,.gengage-chat-product-variant-btn:focus-visible,.gengage-chat-product-gallery-thumb:focus-visible,.gengage-chat-thumbnail-btn:focus-visible,.gengage-chat-find-similar-pill:focus-visible,.gengage-chat-favorite-btn:focus-visible,.gengage-chat-attach-btn:focus-visible,.gengage-chat-mic-btn:focus-visible,.gengage-chat-attachment-remove:focus-visible,.gengage-chat-kvkk-dismiss:focus-visible,.gengage-chat-choice-prompter-cta:focus-visible,.gengage-chat-choice-prompter-dismiss:focus-visible,.gengage-chat-categories-tab:focus-visible,.gengage-chat-categories-filter-tag:focus-visible,.gengage-chat-product-grid-view-more:focus-visible,.gengage-chat-product-details-share:focus-visible,.gengage-qty-btn:focus-visible,.gengage-qty-submit:focus-visible{outline:2px solid var(--gengage-primary-color, #3b82f6);outline-offset:2px}@media(max-width:768px){.gengage-chat-choice-prompter{left:12px;right:12px;width:auto;max-width:none;bottom:calc(var(--_gengage-chat-launcher-bottom) + var(--_gengage-chat-launcher-size) + 12px + env(safe-area-inset-bottom,0px))}.gengage-chat-product-sort-btn,.gengage-chat-comparison-toggle-btn{min-height:40px}.gengage-chat-input-chip{min-height:40px;padding:8px 12px}.gengage-chat-choice-prompter-dismiss{width:32px;height:32px}.gengage-chat-panel-divider-toggle{min-height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-btn{width:44px;height:44px}.gengage-chat-product-details-atc-stepper .gengage-qty-submit,.gengage-qty-stepper--compact .gengage-qty-submit{min-height:44px}.gengage-qty-stepper--compact .gengage-qty-submit{min-width:44px;padding:0 10px}.gengage-qty-stepper--compact .gengage-qty-btn{width:44px;height:44px;font-size:14px}.gengage-qty-stepper--compact .gengage-qty-value{min-width:24px;font-size:13px}.gengage-chat-product-card-cta,.gengage-chat-choice-prompter-cta,.gengage-chat-product-grid-view-more{min-height:44px;display:flex;align-items:center;justify-content:center}.gengage-chat-panel-topbar-back,.gengage-chat-panel-topbar-forward,.gengage-chat-favorite-btn,.gengage-chat-product-details-share{width:44px;height:44px}}';function or(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function G(e,t){const n={event:e,...t};or()&&window.dataLayer.push(n)}function rr(e){G("gengage-on-init",{gengage_widget:e})}function sr(e){G("gengage-show",{gengage_widget:e})}function cr(e,t){G("gengage-suggested-question",{gengage_question_title:e,gengage_action_type:t})}function lr(e){G("gengage-find-similars",{gengage_sku:e})}function dr(e){G("gengage-compare-preselection",{gengage_sku:e})}function Yt(e){G("gengage-compare-selected",{gengage_skus:e,gengage_product_count:e.length})}function gr(){G("gengage-compare-clear")}function pr(e){G("gengage-compare-received",{gengage_product_count:e})}function ur(e){G("gengage-like-product",{gengage_sku:e})}function hr(){G("gengage-like-list")}function fr(e,t){G("gengage-search",{gengage_search_query:e,gengage_result_count:t})}function mr(e,t){G("gengage-product-detail",{gengage_sku:e,gengage_product_name:t})}function br(e,t){G("gengage-cart-add",{gengage_sku:e,gengage_quantity:t})}function _r(){G("gengage-message-sent")}function Xt(){G("gengage-message-received")}function vr(){G("gengage-conversation-start")}function yr(){G("gengage-voice-input")}function m(e,t,n){function a(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:r,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);const l=r.prototype,d=Object.keys(l);for(let u=0;u<d.length;u++){const g=d[u];g in s||(s[g]=l[g].bind(s))}}const i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function r(s){var c;const l=n?.Parent?new o:this;a(l,s),(c=l._zod).deferred??(c.deferred=[]);for(const d of l._zod.deferred)d();return l}return Object.defineProperty(r,"init",{value:a}),Object.defineProperty(r,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(r,"name",{value:e}),r}class Ce extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Qt extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const en={};function pe(e){return en}function tn(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,i])=>t.indexOf(+a)===-1).map(([a,i])=>i)}function tt(e,t){return typeof t=="bigint"?t.toString():t}function nt(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function at(e){return e==null}function it(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function wr(e,t){const n=(e.toString().split(".")[1]||"").length,a=t.toString();let i=(a.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(a)){const c=a.match(/\d?e-(\d?)/);c?.[1]&&(i=Number.parseInt(c[1]))}const o=n>i?n:i,r=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return r%s/10**o}const nn=Symbol("evaluating");function D(e,t,n){let a;Object.defineProperty(e,t,{get(){if(a!==nn)return a===void 0&&(a=nn,a=n()),a},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function ye(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ue(...e){const t={};for(const n of e){const a=Object.getOwnPropertyDescriptors(n);Object.assign(t,a)}return Object.defineProperties({},t)}function an(e){return JSON.stringify(e)}function xr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const on="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const kr=nt(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ee(e){if($e(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!($e(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function rn(e){return Ee(e)?{...e}:Array.isArray(e)?[...e]:e}const Cr=new Set(["string","number","symbol"]);function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(e,t,n){const a=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(a._zod.parent=e),a}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Er(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Sr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Tr(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const o=ue(e._zod.def,{get shape(){const r={};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(r[s]=n.shape[s])}return ye(this,"shape",r),r},checks:[]});return he(e,o)}function Ir(e,t){const n=e._zod.def,a=n.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const o=ue(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete r[s]}return ye(this,"shape",r),r},checks:[]});return he(e,o)}function zr(e,t){if(!Ee(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=e._zod.def.shape;for(const r in t)if(Object.getOwnPropertyDescriptor(o,r)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=ue(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return ye(this,"shape",o),o}});return he(e,i)}function Pr(e,t){if(!Ee(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=ue(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return ye(this,"shape",a),a}});return he(e,n)}function Ar(e,t){const n=ue(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return ye(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return he(e,n)}function Nr(e,t,n){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const r=ue(t._zod.def,{get shape(){const s=t._zod.def.shape,c={...s};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(const l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return ye(this,"shape",c),c},checks:[]});return he(t,r)}function Lr(e,t,n){const a=ue(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const r in n){if(!(r in o))throw new Error(`Unrecognized key: "${r}"`);n[r]&&(o[r]=new e({type:"nonoptional",innerType:i[r]}))}else for(const r in i)o[r]=new e({type:"nonoptional",innerType:i[r]});return ye(this,"shape",o),o}});return he(t,a)}function Se(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Te(e,t){return t.map(n=>{var a;return(a=n).path??(a.path=[]),n.path.unshift(e),n})}function Be(e){return typeof e=="string"?e:e?.message}function fe(e,t,n){const a={...e,path:e.path??[]};if(!e.message){const i=Be(e.inst?._zod.def?.error?.(e))??Be(t?.error?.(e))??Be(n.customError?.(e))??Be(n.localeError?.(e))??"Invalid input";a.message=i}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function ot(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ae(...e){const[t,n,a]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:a}:{...t}}const sn=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,tt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},cn=m("$ZodError",sn),ln=m("$ZodError",sn,{Parent:Error});function Mr(e,t=n=>n.message){const n={},a=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):a.push(t(i));return{formErrors:a,fieldErrors:n}}function $r(e,t=n=>n.message){const n={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(r=>a({issues:r}));else if(o.code==="invalid_key")a({issues:o.issues});else if(o.code==="invalid_element")a({issues:o.issues});else if(o.path.length===0)n._errors.push(t(o));else{let r=n,s=0;for(;s<o.path.length;){const c=o.path[s];s===o.path.length-1?(r[c]=r[c]||{_errors:[]},r[c]._errors.push(t(o))):r[c]=r[c]||{_errors:[]},r=r[c],s++}}};return a(e),n}const rt=e=>(t,n,a,i)=>{const o=a?Object.assign(a,{async:!1}):{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new Ce;if(r.issues.length){const s=new(i?.Err??e)(r.issues.map(c=>fe(c,o,pe())));throw on(s,i?.callee),s}return r.value},st=e=>async(t,n,a,i)=>{const o=a?Object.assign(a,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise&&(r=await r),r.issues.length){const s=new(i?.Err??e)(r.issues.map(c=>fe(c,o,pe())));throw on(s,i?.callee),s}return r.value},De=e=>(t,n,a)=>{const i=a?{...a,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new Ce;return o.issues.length?{success:!1,error:new(e??cn)(o.issues.map(r=>fe(r,i,pe())))}:{success:!0,data:o.value}},Or=De(ln),Re=e=>async(t,n,a)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(r=>fe(r,i,pe())))}:{success:!0,data:o.value}},Br=Re(ln),Dr=e=>(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return rt(e)(t,n,i)},Rr=e=>(t,n,a)=>rt(e)(t,n,a),Ur=e=>async(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return st(e)(t,n,i)},Zr=e=>async(t,n,a)=>st(e)(t,n,a),jr=e=>(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return De(e)(t,n,i)},Fr=e=>(t,n,a)=>De(e)(t,n,a),qr=e=>async(t,n,a)=>{const i=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Re(e)(t,n,i)},Hr=e=>async(t,n,a)=>Re(e)(t,n,a),Vr=/^[cC][^\s-]{8,}$/,Gr=/^[0-9a-z]+$/,Wr=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kr=/^[0-9a-vA-V]{20}$/,Jr=/^[A-Za-z0-9]{27}$/,Yr=/^[a-zA-Z0-9_-]{21}$/,Xr=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qr=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,es=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ts="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ns(){return new RegExp(ts,"u")}const as=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,is=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,os=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ss=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,gn=/^[A-Za-z0-9_-]*$/,cs=/^\+[1-9]\d{6,14}$/,pn="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ls=new RegExp(`^${pn}$`);function un(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ds(e){return new RegExp(`^${un(e)}$`)}function gs(e){const t=un({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${n.join("|")})`;return new RegExp(`^${pn}T(?:${a})$`)}const ps=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},us=/^-?\d+$/,hn=/^-?\d+(?:\.\d+)?$/,hs=/^(?:true|false)$/i,fs=/^[^A-Z]*$/,ms=/^[^a-z]*$/,Y=m("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fn={number:"number",bigint:"bigint",object:"date"},mn=m("$ZodCheckLessThan",(e,t)=>{Y.init(e,t);const n=fn[typeof t.value];e._zod.onattach.push(a=>{const i=a._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bn=m("$ZodCheckGreaterThan",(e,t)=>{Y.init(e,t);const n=fn[typeof t.value];e._zod.onattach.push(a=>{const i=a._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bs=m("$ZodCheckMultipleOf",(e,t)=>{Y.init(e,t),e._zod.onattach.push(n=>{var a;(a=n._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):wr(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_s=m("$ZodCheckNumberFormat",(e,t)=>{Y.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),a=n?"int":"number",[i,o]=Sr[t.format];e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,s.minimum=i,s.maximum=o,n&&(s.pattern=us)}),e._zod.check=r=>{const s=r.value;if(n){if(!Number.isInteger(s)){r.issues.push({expected:a,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?r.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort}):r.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!t.abort});return}}s<i&&r.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>o&&r.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),vs=m("$ZodCheckMaxLength",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const i=a.value;if(i.length<=t.maximum)return;const r=ot(i);a.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ys=m("$ZodCheckMinLength",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const i=a.value;if(i.length>=t.minimum)return;const r=ot(i);a.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),ws=m("$ZodCheckLengthEquals",(e,t)=>{var n;Y.init(e,t),(n=e._zod.def).when??(n.when=a=>{const i=a.value;return!at(i)&&i.length!==void 0}),e._zod.onattach.push(a=>{const i=a._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=a=>{const i=a.value,o=i.length;if(o===t.length)return;const r=ot(i),s=o>t.length;a.issues.push({origin:r,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),Ue=m("$ZodCheckStringFormat",(e,t)=>{var n,a;Y.init(e,t),e._zod.onattach.push(i=>{const o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),xs=m("$ZodCheckRegex",(e,t)=>{Ue.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ks=m("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=fs),Ue.init(e,t)}),Cs=m("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ms),Ue.init(e,t)}),Es=m("$ZodCheckIncludes",(e,t)=>{Y.init(e,t);const n=Oe(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=a,e._zod.onattach.push(i=>{const o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),Ss=m("$ZodCheckStartsWith",(e,t)=>{Y.init(e,t);const n=new RegExp(`^${Oe(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),Ts=m("$ZodCheckEndsWith",(e,t)=>{Y.init(e,t);const n=new RegExp(`.*${Oe(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),Is=m("$ZodCheckOverwrite",(e,t)=>{Y.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class zs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const a=t.split(`
|
|
59
59
|
`).filter(r=>r),i=Math.min(...a.map(r=>r.length-r.trimStart().length)),o=a.map(r=>r.slice(i)).map(r=>" ".repeat(this.indent*2)+r);for(const r of o)this.content.push(r)}compile(){const t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
|
|
60
60
|
`))}}const Ps={major:4,minor:3,patch:6},F=m("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ps;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const i of a)for(const o of i._zod.onattach)o(e);if(a.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(r,s,c)=>{let l=Se(r),d;for(const u of s){if(u._zod.def.when){if(!u._zod.def.when(r))continue}else if(l)continue;const g=r.issues.length,p=u._zod.check(r);if(p instanceof Promise&&c?.async===!1)throw new Ce;if(d||p instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await p,r.issues.length!==g&&(l||(l=Se(r,g)))});else{if(r.issues.length===g)continue;l||(l=Se(r,g))}}return d?d.then(()=>r):r},o=(r,s,c)=>{if(Se(r))return r.aborted=!0,r;const l=i(s,a,c);if(l instanceof Promise){if(c.async===!1)throw new Ce;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(r,s)=>{if(s.skipChecks)return e._zod.parse(r,s);if(s.direction==="backward"){const l=e._zod.parse({value:r.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>o(d,r,s)):o(l,r,s)}const c=e._zod.parse(r,s);if(c instanceof Promise){if(s.async===!1)throw new Ce;return c.then(l=>i(l,a,s))}return i(c,a,s)}}D(e,"~standard",()=>({validate:i=>{try{const o=Or(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Br(e,i).then(r=>r.success?{value:r.data}:{issues:r.error?.issues})}},vendor:"zod",version:1}))}),ct=m("$ZodString",(e,t)=>{F.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ps(e._zod.bag),e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),U=m("$ZodStringFormat",(e,t)=>{Ue.init(e,t),ct.init(e,t)}),As=m("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qr),U.init(e,t)}),Ns=m("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=dn(a))}else t.pattern??(t.pattern=dn());U.init(e,t)}),Ls=m("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=es),U.init(e,t)}),Ms=m("$ZodURL",(e,t)=>{U.init(e,t),e._zod.check=n=>{try{const a=n.value.trim(),i=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=a;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),$s=m("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=ns()),U.init(e,t)}),Os=m("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yr),U.init(e,t)}),Bs=m("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vr),U.init(e,t)}),Ds=m("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gr),U.init(e,t)}),Rs=m("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Wr),U.init(e,t)}),Us=m("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Kr),U.init(e,t)}),Zs=m("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jr),U.init(e,t)}),js=m("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=gs(t)),U.init(e,t)}),Fs=m("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ls),U.init(e,t)}),qs=m("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ds(t)),U.init(e,t)}),Hs=m("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xr),U.init(e,t)}),Vs=m("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=as),U.init(e,t),e._zod.bag.format="ipv4"}),Gs=m("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=is),U.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ws=m("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=os),U.init(e,t)}),Ks=m("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=rs),U.init(e,t),e._zod.check=n=>{const a=n.value.split("/");try{if(a.length!==2)throw new Error;const[i,o]=a;if(!o)throw new Error;const r=Number(o);if(`${r}`!==o)throw new Error;if(r<0||r>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function _n(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Js=m("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=ss),U.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{_n(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ys(e){if(!gn.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return _n(n)}const Xs=m("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=gn),U.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ys(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Qs=m("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cs),U.init(e,t)});function ec(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[a]=n;if(!a)return!1;const i=JSON.parse(atob(a));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const tc=m("$ZodJWT",(e,t)=>{U.init(e,t),e._zod.check=n=>{ec(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),vn=m("$ZodNumber",(e,t)=>{F.init(e,t),e._zod.pattern=e._zod.bag.pattern??hn,e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),nc=m("$ZodNumberFormat",(e,t)=>{_s.init(e,t),vn.init(e,t)}),ac=m("$ZodBoolean",(e,t)=>{F.init(e,t),e._zod.pattern=hs,e._zod.parse=(n,a)=>{if(t.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),ic=m("$ZodUnknown",(e,t)=>{F.init(e,t),e._zod.parse=n=>n}),oc=m("$ZodNever",(e,t)=>{F.init(e,t),e._zod.parse=(n,a)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function yn(e,t,n){e.issues.length&&t.issues.push(...Te(n,e.issues)),t.value[n]=e.value}const rc=m("$ZodArray",(e,t)=>{F.init(e,t),e._zod.parse=(n,a)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const o=[];for(let r=0;r<i.length;r++){const s=i[r],c=t.element._zod.run({value:s,issues:[]},a);c instanceof Promise?o.push(c.then(l=>yn(l,n,r))):yn(c,n,r)}return o.length?Promise.all(o).then(()=>n):n}});function Ze(e,t,n,a,i){if(e.issues.length){if(i&&!(n in a))return;t.issues.push(...Te(n,e.issues))}e.value===void 0?n in a&&(t.value[n]=void 0):t.value[n]=e.value}function wn(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const n=Er(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xn(e,t,n,a,i,o){const r=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,d=c.optout==="optional";for(const u in t){if(s.has(u))continue;if(l==="never"){r.push(u);continue}const g=c.run({value:t[u],issues:[]},a);g instanceof Promise?e.push(g.then(p=>Ze(p,n,u,t,d))):Ze(g,n,u,t,d)}return r.length&&n.issues.push({code:"unrecognized_keys",keys:r,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}const sc=m("$ZodObject",(e,t)=>{if(F.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}const a=nt(()=>wn(t));D(e._zod,"propValues",()=>{const s=t.shape,c={};for(const l in s){const d=s[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(const u of d.values)c[l].add(u)}}return c});const i=$e,o=t.catchall;let r;e._zod.parse=(s,c)=>{r??(r=a.value);const l=s.value;if(!i(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};const d=[],u=r.shape;for(const g of r.keys){const p=u[g],h=p._zod.optout==="optional",_=p._zod.run({value:l[g],issues:[]},c);_ instanceof Promise?d.push(_.then(v=>Ze(v,s,g,l,h))):Ze(_,s,g,l,h)}return o?xn(d,l,s,c,a.value,e):d.length?Promise.all(d).then(()=>s):s}}),cc=m("$ZodObjectJIT",(e,t)=>{sc.init(e,t);const n=e._zod.parse,a=nt(()=>wn(t)),i=g=>{const p=new zs(["shape","payload","ctx"]),h=a.value,_=T=>{const y=an(T);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};p.write("const input = payload.value;");const v=Object.create(null);let E=0;for(const T of h.keys)v[T]=`key_${E++}`;p.write("const newResult = {};");for(const T of h.keys){const y=v[T],f=an(T),A=g[T]?._zod?.optout==="optional";p.write(`const ${y} = ${_(T)};`),A?p.write(`
|
|
61
61
|
if (${y}.issues.length) {
|