tanya-chatbot 0.7.2 → 0.7.3

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.
@@ -1,19 +1,19 @@
1
- import { useEffect as be, useState as C, useRef as Re, forwardRef as _n, createElement as cr, useMemo as Rr } from "react";
2
- import { jsx as a, jsxs as c, Fragment as xe } from "react/jsx-runtime";
1
+ import { useEffect as ke, useState as C, useRef as Re, forwardRef as _n, createElement as cr, useMemo as Rr } from "react";
2
+ import { jsx as a, jsxs as c, Fragment as ve } from "react/jsx-runtime";
3
3
  import { createHttpLink as Eo, ApolloClient as Oo, InMemoryCache as Ao, ApolloProvider as jo } from "@apollo/client";
4
4
  import { Provider as $o, useDispatch as In, useSelector as Yt } from "react-redux";
5
5
  import { createSlice as Fn, configureStore as Do } from "@reduxjs/toolkit";
6
6
  import * as Pn from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
- import ge from "axios";
9
+ import we from "axios";
10
10
  import "crypto-js";
11
11
  import { Icon as Lo } from "@iconify/react";
12
12
  import { toast as Me } from "react-toastify";
13
13
  import { createPortal as zo } from "react-dom";
14
14
  const Mo = '*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media(min-width:640px){.container{max-width:640px}}@media(min-width:768px){.container{max-width:768px}}@media(min-width:1024px){.container{max-width:1024px}}@media(min-width:1280px){.container{max-width:1280px}}@media(min-width:1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-full{top:100%}.z-40{z-index:40}.z-50{z-index:50}.m-1{margin:.25rem}.m-3{margin:.75rem}.m-\\[15px\\]{margin:15px}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-1{margin-bottom:.25rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-20{height:5rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\\[120px\\]{height:120px}.h-\\[150px\\]{height:150px}.h-\\[200px\\]{height:200px}.h-\\[60px\\]{height:60px}.h-\\[90vh\\]{height:90vh}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-screen{height:100vh}.w-28{width:7rem}.w-3{width:.75rem}.w-3\\/4{width:75%}.w-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-8{width:2rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.w-\\[64\\.7vw\\]{width:64.7vw}.w-\\[96\\%\\]{width:96%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[75\\%\\]{max-width:75%}.max-w-\\[90\\%\\]{max-width:90%}.max-w-md{max-width:28rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-y-2{row-gap:.5rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[5px\\]{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-l-\\[20px\\]{border-top-left-radius:20px;border-bottom-left-radius:20px}.rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.rounded-r-xl{border-top-right-radius:.75rem;border-bottom-right-radius:.75rem}.rounded-bl-2xl{border-bottom-left-radius:1rem}.rounded-bl-xl{border-bottom-left-radius:.75rem}.rounded-br-xl{border-bottom-right-radius:.75rem}.rounded-tr-\\[20px\\]{border-top-right-radius:20px}.rounded-tr-\\[5px\\]{border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-\\[\\#C9C2DE\\]{--tw-border-opacity: 1;border-color:rgb(201 194 222 / var(--tw-border-opacity, 1))}.border-\\[\\#E5E5E5\\]{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.bg-\\[\\#553D94\\]{--tw-bg-opacity: 1;background-color:rgb(85 61 148 / var(--tw-bg-opacity, 1))}.bg-\\[\\#6851C6\\]{--tw-bg-opacity: 1;background-color:rgb(104 81 198 / var(--tw-bg-opacity, 1))}.bg-\\[\\#804C9E0D\\]{background-color:#804c9e0d}.bg-\\[\\#A21CAF\\]{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity, 1))}.bg-\\[\\#AB192D\\]{--tw-bg-opacity: 1;background-color:rgb(171 25 45 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E2DBFF\\]{--tw-bg-opacity: 1;background-color:rgb(226 219 255 / var(--tw-bg-opacity, 1))}.bg-\\[\\#E3DEEF\\]{--tw-bg-opacity: 1;background-color:rgb(227 222 239 / var(--tw-bg-opacity, 1))}.bg-\\[\\#F3F3F3\\]{--tw-bg-opacity: 1;background-color:rgb(243 243 243 / var(--tw-bg-opacity, 1))}.bg-\\[\\#FFFFFF\\],.bg-\\[\\#ffffff\\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-black\\/30{background-color:#0000004d}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity, 1))}.bg-popover{background-color:hsl(var(--popover))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\\/70{background-color:#ffffffb3}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\\.5{padding:.125rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\\[1px\\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,.text-sm\\/5{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-\\[\\#000000\\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-\\[\\#14121F\\]{--tw-text-opacity: 1;color:rgb(20 18 31 / var(--tw-text-opacity, 1))}.text-\\[\\#18181B\\]{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.text-\\[\\#232323\\]{--tw-text-opacity: 1;color:rgb(35 35 35 / var(--tw-text-opacity, 1))}.text-\\[\\#323135\\]{--tw-text-opacity: 1;color:rgb(50 49 53 / var(--tw-text-opacity, 1))}.text-\\[\\#494949\\]{--tw-text-opacity: 1;color:rgb(73 73 73 / var(--tw-text-opacity, 1))}.text-\\[\\#555555\\]{--tw-text-opacity: 1;color:rgb(85 85 85 / var(--tw-text-opacity, 1))}.text-\\[\\#5B5B5B\\]{--tw-text-opacity: 1;color:rgb(91 91 91 / var(--tw-text-opacity, 1))}.text-\\[\\#68656E\\]{--tw-text-opacity: 1;color:rgb(104 101 110 / var(--tw-text-opacity, 1))}.text-\\[\\#959595\\]{--tw-text-opacity: 1;color:rgb(149 149 149 / var(--tw-text-opacity, 1))}.text-\\[\\#EC5050\\]{--tw-text-opacity: 1;color:rgb(236 80 80 / var(--tw-text-opacity, 1))}.text-\\[\\#FBFBFC\\]{--tw-text-opacity: 1;color:rgb(251 251 252 / var(--tw-text-opacity, 1))}.text-\\[\\#FFFFFF\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-95{opacity:.95}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_2px_2px_0px_\\#9292BC40\\]{--tw-shadow: 0px 2px 2px 0px #9292BC40;--tw-shadow-colored: 0px 2px 2px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\\[0px_4px_10px_0px_\\#5F499840\\]{--tw-shadow: 0px 4px 10px 0px #5F499840;--tw-shadow-colored: 0px 4px 10px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.drop-shadow-xl{--tw-drop-shadow: drop-shadow(0 20px 13px rgb(0 0 0 / .03)) drop-shadow(0 8px 5px rgb(0 0 0 / .08));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.running{animation-play-state:running}html,body,#root{margin:0;padding:0}:root{line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;padding:0}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.placeholder\\:text-red-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.placeholder\\:text-red-400::placeholder{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\\:-translate-y-0\\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-125:hover{--tw-scale-x: 1.25;--tw-scale-y: 1.25;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-gray-300:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity, 1))}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\\:opacity-100{opacity:1}.data-\\[state\\=open\\]\\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[state\\=closed\\]\\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}@media(min-width:640px){.sm\\:col-span-10{grid-column:span 10 / span 10}.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:w-\\[80vw\\]{width:80vw}.sm\\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}.sm\\:justify-start{justify-content:flex-start}}@media(min-width:768px){.md\\:h-\\[100vh\\]{height:100vh}.md\\:w-1\\/2{width:50%}.md\\:w-\\[770px\\]{width:770px}.md\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}}@media(min-width:1024px){.lg\\:h-\\[100vh\\]{height:100vh}.lg\\:w-1\\/2{width:50%}.lg\\:w-2\\/3{width:66.666667%}.lg\\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\\:flex-row{flex-direction:row}.lg\\:rounded-l-xl{border-top-left-radius:.75rem;border-bottom-left-radius:.75rem}.lg\\:rounded-bl-xl{border-bottom-left-radius:.75rem}}';
15
15
  function ri() {
16
- return be(() => {
16
+ return ke(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
19
19
  return e.textContent = Mo, document.head.appendChild(e), () => {
@@ -101,18 +101,18 @@ function Jo({
101
101
  const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1.amazonaws.com/dev/api/bedrock/invoke/stream", xAPIKey: "BJBtjpPkqGatuoa3qJqdR8aHXSsHkgvGaootbubi", serverUrl: "https://tanya-sfcc-server.vercel.app/", basePath: "sc-api" }), On = async () => {
102
102
  const e = "https://tanya-sfcc-server.vercel.app/";
103
103
  try {
104
- const t = await ge.post(
105
- `${e}api/auth/token-bm-grant?baseUrl=${Ge()}&siteId=${Ve()}`
104
+ const t = await we.post(
105
+ `${e}api/auth/token-bm-grant?baseUrl=${Qe()}&siteId=${Ve()}`
106
106
  );
107
107
  return t.status === 200 && t.data.access_token ? t.data.access_token : (console.error("Failed to fetch token:", t.data), null);
108
108
  } catch (t) {
109
- return ge.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
109
+ return we.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
110
110
  }
111
111
  }, An = async (e) => {
112
112
  const t = "https://tanya-sfcc-server.vercel.app/";
113
113
  try {
114
- const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await ge.post(
115
- `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
114
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await we.post(
115
+ `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
116
116
  {},
117
117
  {
118
118
  headers: {
@@ -123,7 +123,7 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
123
123
  );
124
124
  return n.status === 200 && n.data ? n.data : null;
125
125
  } catch (r) {
126
- return ge.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
+ return we.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
127
127
  }
128
128
  };
129
129
  async function vt() {
@@ -156,7 +156,7 @@ const ur = async (e, t) => {
156
156
  } catch (r) {
157
157
  return console.error("Error obtaining JWT token:", r), e = null, t = null, null;
158
158
  }
159
- }, Ge = () => sessionStorage.getItem("Host"), Ve = () => sessionStorage.getItem("SiteId"), ct = () => sessionStorage.getItem("pubCfg"), dt = () => sessionStorage.getItem("envRef"), ut = () => sessionStorage.getItem("orgRef"), Ko = async (e) => {
159
+ }, Qe = () => sessionStorage.getItem("Host"), Ve = () => sessionStorage.getItem("SiteId"), ct = () => sessionStorage.getItem("pubCfg"), dt = () => sessionStorage.getItem("envRef"), ut = () => sessionStorage.getItem("orgRef"), Ko = async (e) => {
160
160
  console.log("fetching results");
161
161
  const { serverUrl: t, basePath: r } = lt();
162
162
  let n = "";
@@ -165,8 +165,8 @@ const ur = async (e, t) => {
165
165
  console.log("the token from getSearchResults", o), n = o.access_token;
166
166
  }
167
167
  try {
168
- const o = Ge();
169
- return (await ge.get(
168
+ const o = Qe();
169
+ return (await we.get(
170
170
  `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
171
171
  {
172
172
  headers: {
@@ -180,10 +180,10 @@ const ur = async (e, t) => {
180
180
  }
181
181
  }, jn = async (e) => {
182
182
  if (!e) throw new Error("Product ID is required");
183
- const { serverUrl: t, basePath: r } = lt(), n = Ge();
183
+ const { serverUrl: t, basePath: r } = lt(), n = Qe();
184
184
  console.log("calling access");
185
185
  const { access_token: o } = await vt();
186
- return (await ge.get(
186
+ return (await we.get(
187
187
  `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
188
188
  {
189
189
  headers: {
@@ -197,8 +197,8 @@ const ur = async (e, t) => {
197
197
  const t = await On(), { customer_token: r } = await An(
198
198
  t
199
199
  ), { serverUrl: n, basePath: o } = lt(), i = (await vt()).access_token;
200
- return (await ge.get(
201
- `${n}${o}/get-interest?baseUrl=${Ge()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
200
+ return (await we.get(
201
+ `${n}${o}/get-interest?baseUrl=${Qe()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
202
202
  {
203
203
  headers: {
204
204
  "Content-Type": "application/json",
@@ -206,7 +206,7 @@ const ur = async (e, t) => {
206
206
  }
207
207
  }
208
208
  )).data;
209
- }, Hr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Vr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), Qo = (e, t) => e.toLocaleString("en-US", {
209
+ }, Hr = (e) => String(typeof e == "string" ? e : e["en-US"] || e), Vr = (e) => e != null && e.image ? [e.image] : "variants" in e ? e.variants[0].images : e.masterVariant.images.map((t) => t.url), Go = (e, t) => e.toLocaleString("en-US", {
210
210
  style: "currency",
211
211
  currency: t || "USD"
212
212
  }), Yr = (e) => {
@@ -218,13 +218,13 @@ const ur = async (e, t) => {
218
218
  centAmount: (r = e.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
219
219
  currencyCode: (n = e.masterVariant) == null ? void 0 : n.prices[0].value.currencyCode
220
220
  };
221
- }, Go = (e) => e.charAt(0).toUpperCase() + e.slice(1), Jr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", rr = (e) => e.split("\\n").map((t, r) => {
221
+ }, Qo = (e) => e.charAt(0).toUpperCase() + e.slice(1), Jr = (e, t) => e.length < t ? e : e.slice(0, t) + "...", rr = (e) => e.split("\\n").map((t, r) => {
222
222
  const n = t.match(/^(\d+)\.\s(.+)/);
223
223
  return n ? `<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>` : t.trim() ? `<p key=${r} class="mb-2">${t}</p>` : "<br/>";
224
224
  }).join("");
225
225
  function Xo() {
226
226
  const e = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [t, r] = C(e);
227
- return be(() => {
227
+ return ke(() => {
228
228
  const n = () => r(e());
229
229
  return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
230
230
  }, []), t;
@@ -306,7 +306,7 @@ const Zo = ({
306
306
  )
307
307
  ] }),
308
308
  /* @__PURE__ */ c("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
- /* @__PURE__ */ a("p", { children: Qo(
309
+ /* @__PURE__ */ a("p", { children: Go(
310
310
  l != null && l.price ? Number(l == null ? void 0 : l.price) : Yr(l).centAmount || 0,
311
311
  (x = Yr(l)) == null ? void 0 : x.currencyCode
312
312
  ) }),
@@ -350,7 +350,7 @@ const Zo = ({
350
350
  "div",
351
351
  {
352
352
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
353
- children: Go(r.keyword) || "No keyword"
353
+ children: Qo(r.keyword) || "No keyword"
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ a(
@@ -367,8 +367,8 @@ const Zo = ({
367
367
  var s, i;
368
368
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
369
369
  try {
370
- const d = await ge.post(
371
- `${o}${n}/basket/create?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
370
+ const d = await we.post(
371
+ `${o}${n}/basket/create?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
372
372
  t,
373
373
  {
374
374
  headers: {
@@ -385,13 +385,13 @@ const Zo = ({
385
385
  "*"
386
386
  ), d.data;
387
387
  } catch (d) {
388
- return ge.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
388
+ return we.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
389
389
  }
390
390
  }, fr = async (e, t, r) => {
391
391
  const { serverUrl: n, basePath: o } = lt(), s = `${n}`;
392
392
  try {
393
- const i = await ge.post(
394
- `${s}${o}/basket/add-product/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
393
+ const i = await we.post(
394
+ `${s}${o}/basket/add-product/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
395
395
  t,
396
396
  {
397
397
  headers: {
@@ -402,7 +402,7 @@ const Zo = ({
402
402
  );
403
403
  return i.status === 200 && i.data ? i.data : null;
404
404
  } catch (i) {
405
- return ge.isAxiosError(i) ? console.error(
405
+ return we.isAxiosError(i) ? console.error(
406
406
  "Error adding products to basket:",
407
407
  i.response || i.message
408
408
  ) : console.error("Unexpected error:", i), null;
@@ -414,8 +414,8 @@ const Zo = ({
414
414
  var s;
415
415
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
416
416
  try {
417
- const i = await ge.get(
418
- `${o}${n}/basket/${e}?baseUrl=${Ge()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
417
+ const i = await we.get(
418
+ `${o}${n}/basket/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
419
419
  {
420
420
  headers: {
421
421
  "Content-Type": "application/json",
@@ -425,7 +425,7 @@ const Zo = ({
425
425
  );
426
426
  return { status: i.status, data: i.data };
427
427
  } catch (i) {
428
- return ge.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
428
+ return we.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
429
429
  }
430
430
  }, Kt = "sfcc_basket_id", Kr = "sfcc_customer_token", Et = "sfcc_token_expiry", ta = 300 * 1e3, Lt = "1.0.0";
431
431
  const it = (e) => {
@@ -448,11 +448,11 @@ const it = (e) => {
448
448
  }, Wr = 300, ra = ({ addToCartPwa: e }) => {
449
449
  var l, g, p, y, x, S;
450
450
  const t = In(), r = Yt((_) => _.product.product), n = Yt((_) => _.store.store), [o, s] = C(!!r);
451
- if (be(() => {
451
+ if (ke(() => {
452
452
  s(!!r);
453
453
  }, [r]), !r) return null;
454
454
  const i = async () => {
455
- var _, F, N, P, R, w, V, je, E, H, we, ae, G, Pe, $e, he;
455
+ var _, F, N, P, R, w, Y, $e, E, H, ye, ie, Z, Oe, De, pe;
456
456
  try {
457
457
  if (!((F = (_ = r == null ? void 0 : r.variants) == null ? void 0 : _[0]) != null && F.product_id) && !(r.type.item || r.type.bundle) && !((P = (N = r == null ? void 0 : r.variants) == null ? void 0 : N[0]) != null && P.productId)) {
458
458
  Me.error("Variants not available", {
@@ -468,26 +468,26 @@ const it = (e) => {
468
468
  }
469
469
  ], O = JSON.parse(
470
470
  sessionStorage.getItem("customerData") || "{}"
471
- ), U = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), Xe = !1, Ye = localStorage.getItem(Et), ve = Date.now();
472
- if (!Xe || !Ye || ve >= parseInt(Ye)) {
473
- let _e = "";
474
- if (_e = "Bearer " + (await vt()).access_token, !_e) {
471
+ ), U = (O == null ? void 0 : O.basketId) || localStorage.getItem(Kt), Xe = !1, Ye = localStorage.getItem(Et), Se = Date.now();
472
+ if (!Xe || !Ye || Se >= parseInt(Ye)) {
473
+ let Pe = "";
474
+ if (Pe = "Bearer " + (await vt()).access_token, !Pe) {
475
475
  console.error("Failed to get customer_token");
476
476
  return;
477
477
  }
478
- const ft = ve + 300 * 1e3;
479
- if (Wt(_e), localStorage.setItem(Et, ft.toString()), U) {
480
- const Te = await Dn({
478
+ const ft = Se + 300 * 1e3;
479
+ if (Wt(Pe), localStorage.setItem(Et, ft.toString()), U) {
480
+ const Ae = await Dn({
481
481
  basketId: U,
482
- customer_token: _e
482
+ customer_token: Pe
483
483
  });
484
- if (Te.status === 200 && Te) {
485
- const Ie = await fr(
484
+ if (Ae.status === 200 && Ae) {
485
+ const Te = await fr(
486
486
  U,
487
487
  L,
488
- _e
488
+ Pe
489
489
  );
490
- (((V = Ie == null ? void 0 : Ie.product_items) == null ? void 0 : V.length) > 0 || ((je = Ie == null ? void 0 : Ie.productItems) == null ? void 0 : je.length) > 0) && (Me.success("Added to cart", {
490
+ (((Y = Te == null ? void 0 : Te.product_items) == null ? void 0 : Y.length) > 0 || (($e = Te == null ? void 0 : Te.productItems) == null ? void 0 : $e.length) > 0) && (Me.success("Added to cart", {
491
491
  position: "bottom-right",
492
492
  autoClose: 3e3,
493
493
  hideProgressBar: !1,
@@ -505,7 +505,7 @@ const it = (e) => {
505
505
  quantity: 1
506
506
  }
507
507
  ]
508
- }, M = await $n(_e, Ze);
508
+ }, M = await $n(Pe, Ze);
509
509
  if (!(M != null && M.basket_id) && !(M != null && M.basketId)) {
510
510
  console.error("Failed to create basket");
511
511
  return;
@@ -513,12 +513,12 @@ const it = (e) => {
513
513
  it(
514
514
  (M == null ? void 0 : M.basket_id) || (M == null ? void 0 : M.basketId)
515
515
  ), console.log("adding product to basket");
516
- const le = await fr(
516
+ const de = await fr(
517
517
  (M == null ? void 0 : M.basket_id) || (M == null ? void 0 : M.basketId),
518
518
  L,
519
- _e
519
+ Pe
520
520
  );
521
- console.log("object added to basket"), (((we = le == null ? void 0 : le.product_items) == null ? void 0 : we.length) > 0 || ((ae = le == null ? void 0 : le.productItems) == null ? void 0 : ae.length) > 0) && Me.success("Added to cart", {
521
+ console.log("object added to basket"), (((ye = de == null ? void 0 : de.product_items) == null ? void 0 : ye.length) > 0 || ((ie = de == null ? void 0 : de.productItems) == null ? void 0 : ie.length) > 0) && Me.success("Added to cart", {
522
522
  position: "bottom-right",
523
523
  autoClose: 3e3,
524
524
  hideProgressBar: !1,
@@ -531,8 +531,8 @@ const it = (e) => {
531
531
  console.error("Error adding to cart:", L), Me.error("Failed to add product to cart", {
532
532
  position: "bottom-right",
533
533
  autoClose: 3e3
534
- }), ((G = L == null ? void 0 : L.response) == null ? void 0 : G.status) === 404 || // Basket not found
535
- ((Pe = L == null ? void 0 : L.response) == null ? void 0 : Pe.status) === 401 ? ((($e = L == null ? void 0 : L.response) == null ? void 0 : $e.status) === 404 && it(null), ((he = L == null ? void 0 : L.response) == null ? void 0 : he.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", L.message), Me.error("Failed to add product to cart", {
534
+ }), ((Z = L == null ? void 0 : L.response) == null ? void 0 : Z.status) === 404 || // Basket not found
535
+ ((Oe = L == null ? void 0 : L.response) == null ? void 0 : Oe.status) === 401 ? (((De = L == null ? void 0 : L.response) == null ? void 0 : De.status) === 404 && it(null), ((pe = L == null ? void 0 : L.response) == null ? void 0 : pe.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", L.message), Me.error("Failed to add product to cart", {
536
536
  position: "bottom-right",
537
537
  autoClose: 3e3
538
538
  }));
@@ -542,7 +542,7 @@ const it = (e) => {
542
542
  const _ = window.location.origin + "/product/" + r.id;
543
543
  console.log("path", _), window.location.href = _;
544
544
  };
545
- return console.log(r, "the prod"), /* @__PURE__ */ c(xe, { children: [
545
+ return console.log(r, "the prod"), /* @__PURE__ */ c(ve, { children: [
546
546
  /* @__PURE__ */ a(
547
547
  "div",
548
548
  {
@@ -711,13 +711,13 @@ const it = (e) => {
711
711
  Others: "others"
712
712
  }, s = Re(null), i = Re(null), d = Re(null), l = Re(null), [g, p] = C(null);
713
713
  Re(null);
714
- const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [w, V] = C(!1), [je, E] = C(!1), [H, we] = C(""), [ae, G] = C(""), Pe = (m) => ({
714
+ const [y, x] = C(!1), [S, _] = C(!1), [F, N] = C(!1), [P, R] = C(!1), [w, Y] = C(!1), [$e, E] = C(!1), [H, ye] = C(""), [ie, Z] = C(""), Oe = (m) => ({
715
715
  id: m.id,
716
716
  title: m.name,
717
717
  image: m.image ?? "",
718
718
  price: m.price ?? 0
719
- }), [$e, he] = C([]), L = Re(null), O = Yt((m) => m.store.store), U = Yt((m) => m.product.product);
720
- be(() => {
719
+ }), [De, pe] = C([]), L = Re(null), O = Yt((m) => m.store.store), U = Yt((m) => m.product.product);
720
+ ke(() => {
721
721
  const m = localStorage.getItem(
722
722
  `access_token_${e.siteId}`
723
723
  ), j = localStorage.getItem(
@@ -725,47 +725,47 @@ const it = (e) => {
725
725
  );
726
726
  if (m && j === m) {
727
727
  const $ = localStorage.getItem("chatHistory");
728
- $ && he(JSON.parse($));
728
+ $ && pe(JSON.parse($));
729
729
  } else
730
730
  localStorage.setItem("chatHistory", JSON.stringify([])), localStorage.setItem(
731
731
  `chat-token-${e.siteId}`,
732
732
  m || ""
733
733
  );
734
- }, []), be(() => {
735
- localStorage.setItem("chatHistory", JSON.stringify($e));
734
+ }, []), ke(() => {
735
+ localStorage.setItem("chatHistory", JSON.stringify(De));
736
736
  const m = localStorage.getItem(
737
737
  `access_token_${e.siteId}`
738
738
  );
739
739
  m && localStorage.setItem(`chat-token-${e.siteId}`, m);
740
- }, [$e]);
740
+ }, [De]);
741
741
  const Xe = () => {
742
742
  N(!0), setTimeout(() => _(!0), 10);
743
743
  }, Ye = () => {
744
744
  _(!1), setTimeout(() => N(!1), 300);
745
745
  };
746
- be(() => {
746
+ ke(() => {
747
747
  y ? Xe() : Ye();
748
748
  }, [y]);
749
- const ve = (m) => {
750
- G(o[m]);
749
+ const Se = (m) => {
750
+ Z(o[m]);
751
751
  };
752
- be(() => {
752
+ ke(() => {
753
753
  F && L.current && L.current.scrollTo({
754
754
  top: L.current.scrollHeight,
755
755
  behavior: "smooth"
756
756
  });
757
- }, [$e, F]);
758
- const _e = null, ft = null, Ze = async () => {
757
+ }, [De, F]);
758
+ const Pe = null, ft = null, Ze = async () => {
759
759
  const m = await vt();
760
760
  m != null && p(m);
761
761
  };
762
- be(() => {
762
+ ke(() => {
763
763
  if (e != null && e.siteId) {
764
- const { clientID: m, host: j, organizationID: $, shortCode: Y, siteId: z } = e;
765
- sessionStorage.setItem("Host", j), sessionStorage.setItem("SiteId", z), sessionStorage.setItem("pubCfg", btoa(m)), sessionStorage.setItem("envRef", Y), sessionStorage.setItem("orgRef", $);
764
+ const { clientID: m, host: j, organizationID: $, shortCode: J, siteId: z } = e;
765
+ sessionStorage.setItem("Host", j), sessionStorage.setItem("SiteId", z), sessionStorage.setItem("pubCfg", btoa(m)), sessionStorage.setItem("envRef", J), sessionStorage.setItem("orgRef", $);
766
766
  }
767
767
  Ze(), console.log("scapi environment v1");
768
- }, []), be(() => {
768
+ }, []), ke(() => {
769
769
  t && (console.log("setting the basket id", t), it(t));
770
770
  }, [t]);
771
771
  const M = async () => {
@@ -773,18 +773,18 @@ const it = (e) => {
773
773
  sessionStorage.getItem("customerData") || "{}"
774
774
  ).customerId;
775
775
  return (await Wo(m || "")).c_interests;
776
- }, le = async (m, j) => {
776
+ }, de = async (m, j) => {
777
777
  console.log("in secondary flow", Lt);
778
778
  const $ = await M();
779
779
  if (console.log($, "interests of customer", Lt), !!$)
780
780
  try {
781
- he(
782
- (Z) => Z.map(
783
- (K, Ne) => Ne === Z.length - 1 ? { ...K, secondaryLoading: !0 } : K
781
+ pe(
782
+ (te) => te.map(
783
+ (W, _e) => _e === te.length - 1 ? { ...W, secondaryLoading: !0 } : W
784
784
  )
785
785
  );
786
- const Y = await ur(_e, ft);
787
- if (!Y) throw new Error("Failed to fetch token");
786
+ const J = await ur(Pe, ft);
787
+ if (!J) throw new Error("Failed to fetch token");
788
788
  const z = localStorage.getItem("customerNumber"), A = localStorage.getItem("isLoggedIn"), B = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
789
789
  registered: String(A || !1),
790
790
  userId: String(z || (/* @__PURE__ */ new Date()).getTime())
@@ -797,55 +797,55 @@ const it = (e) => {
797
797
  productPoints: String(j || 0),
798
798
  interests: $
799
799
  }
800
- }), X = await fetch(B, {
800
+ }), ee = await fetch(B, {
801
801
  signal: AbortSignal.timeout(3e4),
802
802
  method: "POST",
803
803
  headers: {
804
804
  "Content-Type": "application/json",
805
- Authorization: `Bearer ${Y}`
805
+ Authorization: `Bearer ${J}`
806
806
  },
807
807
  body: D
808
808
  });
809
- if (!X.body) throw new Error("Readable stream not supported");
810
- const ne = X.body.getReader(), ke = new TextDecoder();
811
- let Se = "";
809
+ if (!ee.body) throw new Error("Readable stream not supported");
810
+ const se = ee.body.getReader(), Ne = new TextDecoder();
811
+ let Ce = "";
812
812
  for (; ; ) {
813
- const { done: Z, value: K } = await ne.read();
814
- if (Z) break;
815
- Se += ke.decode(K, { stream: !0 });
816
- const Ne = Se.split(`
813
+ const { done: te, value: W } = await se.read();
814
+ if (te) break;
815
+ Ce += Ne.decode(W, { stream: !0 });
816
+ const _e = Ce.split(`
817
817
  `);
818
- Se = Ne.pop() || "";
819
- for (const ee of Ne)
820
- if (ee.startsWith("data:")) {
821
- const k = ee.slice(5).trim();
818
+ Ce = _e.pop() || "";
819
+ for (const re of _e)
820
+ if (re.startsWith("data:")) {
821
+ const k = re.slice(5).trim();
822
822
  try {
823
- const J = JSON.parse(k);
824
- J.index === 0 && he(
825
- (W) => W.map(
826
- (de, Ce) => Ce === W.length - 1 ? {
827
- ...de,
828
- secondaryResponse: J.data,
823
+ const K = JSON.parse(k);
824
+ K.index === 0 && pe(
825
+ (G) => G.map(
826
+ (fe, Ie) => Ie === G.length - 1 ? {
827
+ ...fe,
828
+ secondaryResponse: K.data,
829
829
  secondaryLoading: !1
830
- } : de
830
+ } : fe
831
831
  )
832
832
  );
833
- } catch (J) {
834
- he(
835
- (W) => W.map(
836
- (de, Ce) => Ce === W.length - 1 ? { ...de, secondaryLoading: !1 } : de
833
+ } catch (K) {
834
+ pe(
835
+ (G) => G.map(
836
+ (fe, Ie) => Ie === G.length - 1 ? { ...fe, secondaryLoading: !1 } : fe
837
837
  )
838
- ), console.error("Secondary flow JSON parse error:", J);
838
+ ), console.error("Secondary flow JSON parse error:", K);
839
839
  }
840
840
  }
841
841
  }
842
- } catch (Y) {
843
- console.error("Secondary flow error:", Y);
842
+ } catch (J) {
843
+ console.error("Secondary flow error:", J);
844
844
  }
845
- }, Te = async (m) => {
845
+ }, Ae = async (m) => {
846
846
  const j = m || H.trim();
847
847
  if (j) {
848
- V(!0), we(""), s.current = null, i.current = null, d.current = null, l.current = null, he(($) => [
848
+ Y(!0), ye(""), s.current = null, i.current = null, d.current = null, l.current = null, pe(($) => [
849
849
  ...$,
850
850
  {
851
851
  query: j,
@@ -856,12 +856,12 @@ const it = (e) => {
856
856
  }
857
857
  ]);
858
858
  try {
859
- const $ = ae, Y = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(_e, ft);
859
+ const $ = ie, J = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(Pe, ft);
860
860
  if (!A)
861
861
  throw new Error("Failed to obtain access token");
862
862
  const B = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
863
863
  registered: String(z || !1),
864
- userId: String(Y || (/* @__PURE__ */ new Date()).getTime())
864
+ userId: String(J || (/* @__PURE__ */ new Date()).getTime())
865
865
  }).toString()}`, D = JSON.stringify({
866
866
  flowId: "MMHQKYI1NE",
867
867
  flowAliasId: "SZF9ZK1ATE",
@@ -869,7 +869,7 @@ const it = (e) => {
869
869
  userPrompt: j,
870
870
  whom: $
871
871
  }
872
- }), X = await fetch(B, {
872
+ }), ee = await fetch(B, {
873
873
  signal: AbortSignal.timeout(3e4),
874
874
  method: "POST",
875
875
  headers: {
@@ -878,72 +878,72 @@ const it = (e) => {
878
878
  },
879
879
  body: D
880
880
  });
881
- if (!X.ok)
882
- throw new Error(`HTTP error! status: ${X.status}`);
883
- if (!X.body) throw new Error("Readable stream not supported");
884
- const ne = X.body.getReader(), ke = new TextDecoder();
885
- let Se = "", Z = "";
881
+ if (!ee.ok)
882
+ throw new Error(`HTTP error! status: ${ee.status}`);
883
+ if (!ee.body) throw new Error("Readable stream not supported");
884
+ const se = ee.body.getReader(), Ne = new TextDecoder();
885
+ let Ce = "", te = "";
886
886
  for (; ; ) {
887
887
  E(!0);
888
- const { done: K, value: Ne } = await ne.read();
889
- if (K) break;
890
- Se += ke.decode(Ne, { stream: !0 });
891
- const ee = Se.split(`
888
+ const { done: W, value: _e } = await se.read();
889
+ if (W) break;
890
+ Ce += Ne.decode(_e, { stream: !0 });
891
+ const re = Ce.split(`
892
892
  `);
893
- Se = ee.pop() || "";
894
- for (const k of ee)
893
+ Ce = re.pop() || "";
894
+ for (const k of re)
895
895
  if (k.startsWith("data:")) {
896
- const J = k.slice(5).trim();
896
+ const K = k.slice(5).trim();
897
897
  try {
898
- const W = JSON.parse(J);
899
- W.index == 1 && (Z = W.data), he(
900
- (de) => de.map(
901
- (Ce, et) => et === de.length - 1 ? {
902
- ...Ce,
903
- [W.index == 0 ? "response" : W.index == 1 ? "keywords" : W.index == 2 ? "potentialQuestions" : "end"]: W.data
904
- } : Ce
898
+ const G = JSON.parse(K);
899
+ G.index == 1 && (te = G.data), pe(
900
+ (fe) => fe.map(
901
+ (Ie, et) => et === fe.length - 1 ? {
902
+ ...Ie,
903
+ [G.index == 0 ? "response" : G.index == 1 ? "keywords" : G.index == 2 ? "potentialQuestions" : "end"]: G.data
904
+ } : Ie
905
905
  )
906
906
  );
907
- } catch (W) {
908
- console.error("Error parsing JSON:", W);
907
+ } catch (G) {
908
+ console.error("Error parsing JSON:", G);
909
909
  }
910
910
  }
911
911
  }
912
- Zt(Ie(Z));
912
+ Zt(Te(te));
913
913
  } catch ($) {
914
914
  console.error("Error sending message to Tanya:", $);
915
915
  } finally {
916
- V(!1);
916
+ Y(!1);
917
917
  }
918
918
  }
919
- }, Ie = (m) => {
919
+ }, Te = (m) => {
920
920
  const j = m.match(
921
921
  /top five relevant product or category names are: (.*)/i
922
- ), z = (j ? j[1] : m).split(", ").map((ce) => ce.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
922
+ ), z = (j ? j[1] : m).split(", ").map((ue) => ue.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
923
923
  return [...new Set(z)].filter(Boolean).join(",");
924
924
  }, Zt = async (m) => {
925
- var $, Y, z;
925
+ var $, J, z;
926
926
  const j = typeof m == "string" ? m.split(",") : m;
927
927
  E(!0);
928
928
  try {
929
929
  const A = await Promise.all(
930
930
  j.map((D) => Ko(D).catch(() => []))
931
931
  // prevent Promise.all crash
932
- ), ce = j.map((D, X) => ({
932
+ ), ue = j.map((D, ee) => ({
933
933
  keyword: D,
934
- items: A[X] ?? [],
934
+ items: A[ee] ?? [],
935
935
  loading: !1
936
- })).filter((D) => D.items.length > 0), B = (Y = ($ = ce[0]) == null ? void 0 : $.items) == null ? void 0 : Y[0];
936
+ })).filter((D) => D.items.length > 0), B = (J = ($ = ue[0]) == null ? void 0 : $.items) == null ? void 0 : J[0];
937
937
  if (B) {
938
938
  i.current = B.product_id, s.current = B.product_name, d.current = (z = B.image) == null ? void 0 : z.link;
939
939
  const D = typeof B.price == "number" ? B.price : null;
940
940
  l.current = D;
941
941
  }
942
- if (he(
942
+ if (pe(
943
943
  (D) => D.map(
944
- (X, ne) => ne === D.length - 1 ? {
945
- ...X,
946
- products: ce,
944
+ (ee, se) => se === D.length - 1 ? {
945
+ ...ee,
946
+ products: ue,
947
947
  productSnapshot: B ? {
948
948
  id: i.current,
949
949
  name: s.current,
@@ -951,14 +951,14 @@ const it = (e) => {
951
951
  price: l.current,
952
952
  points: 0,
953
953
  quantity: 1
954
- } : X.productSnapshot
955
- } : X
954
+ } : ee.productSnapshot
955
+ } : ee
956
956
  )
957
957
  ), B) {
958
958
  const D = JSON.parse(
959
959
  sessionStorage.getItem("customerData") || "{}"
960
960
  );
961
- D != null && D.isGuest || (console.log("running secondary flow", Lt), le(s.current, 0));
961
+ D != null && D.isGuest || (console.log("running secondary flow", Lt), de(s.current, 0));
962
962
  }
963
963
  } catch (A) {
964
964
  console.error("error in keyword search", A);
@@ -966,28 +966,28 @@ const it = (e) => {
966
966
  E(!1);
967
967
  }
968
968
  }, er = async (m, j) => {
969
- var $, Y, z, A, ce, B, D, X, ne, ke, Se, Z, K, Ne, ee;
969
+ var $, J, z, A, ue, B, D, ee, se, Ne, Ce, te, W, _e, re;
970
970
  R(!0);
971
971
  try {
972
972
  const k = await jn(m.id);
973
- if (!((Y = ($ = k == null ? void 0 : k.variants) == null ? void 0 : $[0]) != null && Y.product_id || (A = (z = k == null ? void 0 : k.variants) == null ? void 0 : z[0]) != null && A.productId) && !(k.type.item || k.type.bundle)) {
973
+ if (!((J = ($ = k == null ? void 0 : k.variants) == null ? void 0 : $[0]) != null && J.product_id || (A = (z = k == null ? void 0 : k.variants) == null ? void 0 : z[0]) != null && A.productId) && !(k.type.item || k.type.bundle)) {
974
974
  R(!1), Me.error("Variants not found", {
975
975
  position: "bottom-right",
976
976
  autoClose: 1e3
977
977
  }), console.error("No product variant found");
978
978
  return;
979
979
  }
980
- const J = [
980
+ const K = [
981
981
  {
982
- product_id: ((ce = k.variants) == null ? void 0 : ce[0].product_id) || ((B = k.variants) == null ? void 0 : B[0].productId) || (k == null ? void 0 : k.id),
982
+ product_id: ((ue = k.variants) == null ? void 0 : ue[0].product_id) || ((B = k.variants) == null ? void 0 : B[0].productId) || (k == null ? void 0 : k.id),
983
983
  quantity: j
984
984
  }
985
985
  ];
986
- console.log(J, "product data", "app version", Lt);
987
- const W = JSON.parse(
986
+ console.log(K, "product data", "app version", Lt);
987
+ const G = JSON.parse(
988
988
  sessionStorage.getItem("customerData") || "{}"
989
- ), de = (W == null ? void 0 : W.basketId) || localStorage.getItem(Kt), Ce = !1, et = localStorage.getItem(Et), mt = Date.now();
990
- if (!Ce || !et || mt >= parseInt(et)) {
989
+ ), fe = (G == null ? void 0 : G.basketId) || localStorage.getItem(Kt), Ie = !1, et = localStorage.getItem(Et), mt = Date.now();
990
+ if (!Ie || !et || mt >= parseInt(et)) {
991
991
  const At = await On();
992
992
  let { customer_token: Be } = await An(
993
993
  At
@@ -997,15 +997,15 @@ const it = (e) => {
997
997
  return;
998
998
  }
999
999
  const jt = mt + 300 * 1e3;
1000
- if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(de, "basketIdFromCustomer"), de) {
1000
+ if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(fe, "basketIdFromCustomer"), fe) {
1001
1001
  const tt = await Dn({
1002
- basketId: de,
1002
+ basketId: fe,
1003
1003
  customer_token: Be
1004
1004
  });
1005
1005
  if (tt.status === 200 && tt) {
1006
1006
  const kt = await fr(
1007
- de,
1008
- J,
1007
+ fe,
1008
+ K,
1009
1009
  Be
1010
1010
  );
1011
1011
  ((D = kt == null ? void 0 : kt.product_items) == null ? void 0 : D.length) > 0 && (Me.success("Added to cart", {
@@ -1015,14 +1015,14 @@ const it = (e) => {
1015
1015
  closeOnClick: !0,
1016
1016
  pauseOnHover: !0,
1017
1017
  draggable: !0
1018
- }), Jt(de), R(!1));
1018
+ }), Jt(fe), R(!1));
1019
1019
  return;
1020
1020
  }
1021
1021
  }
1022
1022
  const ht = {
1023
1023
  productItems: [
1024
1024
  {
1025
- productId: ((X = k.variants) == null ? void 0 : X[0].product_id) || ((ne = k.variants) == null ? void 0 : ne[0].productId) || (k == null ? void 0 : k.id),
1025
+ productId: ((ee = k.variants) == null ? void 0 : ee[0].product_id) || ((se = k.variants) == null ? void 0 : se[0].productId) || (k == null ? void 0 : k.id),
1026
1026
  quantity: 1
1027
1027
  }
1028
1028
  ]
@@ -1039,14 +1039,14 @@ const it = (e) => {
1039
1039
  it(
1040
1040
  (I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
1041
1041
  );
1042
- const De = await r(
1042
+ const Le = await r(
1043
1043
  {
1044
1044
  productId: i,
1045
1045
  quantity: j
1046
1046
  },
1047
1047
  (I == null ? void 0 : I.basket_id) || (I == null ? void 0 : I.basketId)
1048
1048
  );
1049
- (((ke = De == null ? void 0 : De.product_items) == null ? void 0 : ke.length) > 0 || ((Se = De == null ? void 0 : De.productItems) == null ? void 0 : Se.length) > 0) && Me.success("Added to cart", {
1049
+ (((Ne = Le == null ? void 0 : Le.product_items) == null ? void 0 : Ne.length) > 0 || ((Ce = Le == null ? void 0 : Le.productItems) == null ? void 0 : Ce.length) > 0) && Me.success("Added to cart", {
1050
1050
  position: "bottom-right",
1051
1051
  autoClose: 3e3,
1052
1052
  hideProgressBar: !1,
@@ -1059,15 +1059,15 @@ const it = (e) => {
1059
1059
  R(!1), console.error("Error adding to cart:", k), Me.error("Failed to add product to cart", {
1060
1060
  position: "bottom-right",
1061
1061
  autoClose: 3e3
1062
- }), ((Z = k == null ? void 0 : k.response) == null ? void 0 : Z.status) === 404 || // Basket not found
1063
- ((K = k == null ? void 0 : k.response) == null ? void 0 : K.status) === 401 ? (((Ne = k == null ? void 0 : k.response) == null ? void 0 : Ne.status) === 404 && it(null), ((ee = k == null ? void 0 : k.response) == null ? void 0 : ee.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", k.message), Me.error("Failed to add product to cart", {
1062
+ }), ((te = k == null ? void 0 : k.response) == null ? void 0 : te.status) === 404 || // Basket not found
1063
+ ((W = k == null ? void 0 : k.response) == null ? void 0 : W.status) === 401 ? (((_e = k == null ? void 0 : k.response) == null ? void 0 : _e.status) === 404 && it(null), ((re = k == null ? void 0 : k.response) == null ? void 0 : re.status) === 401 && (it(null), Wt(null))) : (console.error("Failed to add product to basket:", k.message), Me.error("Failed to add product to cart", {
1064
1064
  position: "bottom-right",
1065
1065
  autoClose: 3e3
1066
1066
  }));
1067
1067
  }
1068
1068
  R(!1);
1069
1069
  };
1070
- return be(() => {
1070
+ return ke(() => {
1071
1071
  F ? setTimeout(() => _(!0), 10) : _(!1);
1072
1072
  }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Yo, { open: y, onOpenChange: x, children: [
1073
1073
  /* @__PURE__ */ a(
@@ -1133,7 +1133,7 @@ const it = (e) => {
1133
1133
  ) })
1134
1134
  }
1135
1135
  ),
1136
- F && /* @__PURE__ */ c(xe, { children: [
1136
+ F && /* @__PURE__ */ c(ve, { children: [
1137
1137
  /* @__PURE__ */ a(
1138
1138
  "div",
1139
1139
  {
@@ -1294,11 +1294,11 @@ const it = (e) => {
1294
1294
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: n.map((m) => /* @__PURE__ */ a(
1295
1295
  "button",
1296
1296
  {
1297
- onClick: () => ve(m),
1297
+ onClick: () => Se(m),
1298
1298
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1299
1299
  style: {
1300
- backgroundColor: ae === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
- borderColor: ae === o[m] ? "#BBB3DD" : ""
1300
+ backgroundColor: ie === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
+ borderColor: ie === o[m] ? "#BBB3DD" : ""
1302
1302
  },
1303
1303
  children: m
1304
1304
  },
@@ -1307,8 +1307,8 @@ const it = (e) => {
1307
1307
  ]
1308
1308
  }
1309
1309
  ),
1310
- $e.map((m, j) => {
1311
- var $, Y;
1310
+ De.map((m, j) => {
1311
+ var $, J;
1312
1312
  return /* @__PURE__ */ c("div", { children: [
1313
1313
  /* @__PURE__ */ a(
1314
1314
  "div",
@@ -1334,8 +1334,8 @@ const it = (e) => {
1334
1334
  }
1335
1335
  }
1336
1336
  ) }),
1337
- je && !m.response.includes("Thinking") && (($ = m.products) == null ? void 0 : $.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1338
- (m == null ? void 0 : m.products) && ((Y = m == null ? void 0 : m.products) == null ? void 0 : Y.length) > 0 && /* @__PURE__ */ a(
1337
+ $e && !m.response.includes("Thinking") && (($ = m.products) == null ? void 0 : $.length) == 0 && /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]", children: "Finding best products for you" }) }),
1338
+ (m == null ? void 0 : m.products) && ((J = m == null ? void 0 : m.products) == null ? void 0 : J.length) > 0 && /* @__PURE__ */ a(
1339
1339
  ea,
1340
1340
  {
1341
1341
  chat: m.products,
@@ -1355,7 +1355,7 @@ const it = (e) => {
1355
1355
  "button",
1356
1356
  {
1357
1357
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${O.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1358
- onClick: () => Te(z),
1358
+ onClick: () => Ae(z),
1359
1359
  style: {
1360
1360
  backgroundColor: O.tanyaThemeColorLight
1361
1361
  },
@@ -1397,7 +1397,7 @@ const it = (e) => {
1397
1397
  ]
1398
1398
  }
1399
1399
  ) }),
1400
- (m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ c("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1400
+ (m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(ve, { children: /* @__PURE__ */ c("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1401
1401
  /* @__PURE__ */ a(
1402
1402
  "div",
1403
1403
  {
@@ -1465,9 +1465,9 @@ const it = (e) => {
1465
1465
  "button",
1466
1466
  {
1467
1467
  className: "px-3 py-1 text-sm",
1468
- onClick: () => he(
1468
+ onClick: () => pe(
1469
1469
  (z) => z.map(
1470
- (A, ce) => ce === j && A.productSnapshot ? {
1470
+ (A, ue) => ue === j && A.productSnapshot ? {
1471
1471
  ...A,
1472
1472
  productSnapshot: {
1473
1473
  ...A.productSnapshot,
@@ -1491,9 +1491,9 @@ const it = (e) => {
1491
1491
  "button",
1492
1492
  {
1493
1493
  className: "px-3 py-1 text-sm",
1494
- onClick: () => he(
1494
+ onClick: () => pe(
1495
1495
  (z) => z.map(
1496
- (A, ce) => ce === j && A.productSnapshot ? {
1496
+ (A, ue) => ue === j && A.productSnapshot ? {
1497
1497
  ...A,
1498
1498
  productSnapshot: {
1499
1499
  ...A.productSnapshot,
@@ -1515,7 +1515,7 @@ const it = (e) => {
1515
1515
  {
1516
1516
  onClick: () => {
1517
1517
  er(
1518
- Pe(
1518
+ Oe(
1519
1519
  m.productSnapshot
1520
1520
  ),
1521
1521
  m.productSnapshot.quantity
@@ -1558,9 +1558,9 @@ const it = (e) => {
1558
1558
  placeholder: "How can I help you...",
1559
1559
  value: H,
1560
1560
  autoFocus: !0,
1561
- onChange: (m) => we(m.target.value),
1561
+ onChange: (m) => ye(m.target.value),
1562
1562
  onKeyDown: (m) => {
1563
- m.key === "Enter" && !w && Te();
1563
+ m.key === "Enter" && !w && Ae();
1564
1564
  }
1565
1565
  }
1566
1566
  ),
@@ -1570,7 +1570,7 @@ const it = (e) => {
1570
1570
  type: "submit",
1571
1571
  disabled: w,
1572
1572
  className: "p-3",
1573
- onClick: () => Te(),
1573
+ onClick: () => Ae(),
1574
1574
  children: w ? /* @__PURE__ */ a(
1575
1575
  "div",
1576
1576
  {
@@ -1629,14 +1629,14 @@ function oa(e, t) {
1629
1629
  }
1630
1630
  e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
1631
1631
  }
1632
- var Qe = function() {
1633
- return Qe = Object.assign || function(t) {
1632
+ var Ge = function() {
1633
+ return Ge = Object.assign || function(t) {
1634
1634
  for (var r, n = 1, o = arguments.length; n < o; n++) {
1635
1635
  r = arguments[n];
1636
1636
  for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
1637
1637
  }
1638
1638
  return t;
1639
- }, Qe.apply(this, arguments);
1639
+ }, Ge.apply(this, arguments);
1640
1640
  };
1641
1641
  function aa(e, t) {
1642
1642
  var r = {};
@@ -1646,9 +1646,9 @@ function aa(e, t) {
1646
1646
  t.indexOf(n[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[o]) && (r[n[o]] = e[n[o]]);
1647
1647
  return r;
1648
1648
  }
1649
- var nr = "Invariant Violation", Qr = Object.setPrototypeOf, sa = Qr === void 0 ? function(e, t) {
1649
+ var nr = "Invariant Violation", Gr = Object.setPrototypeOf, sa = Gr === void 0 ? function(e, t) {
1650
1650
  return e.__proto__ = t, e;
1651
- } : Qr, Ln = (
1651
+ } : Gr, Ln = (
1652
1652
  /** @class */
1653
1653
  (function(e) {
1654
1654
  oa(t, e);
@@ -1700,10 +1700,10 @@ const hr = wt(function() {
1700
1700
  wt(function() {
1701
1701
  return wt.constructor("return this")();
1702
1702
  });
1703
- var Gr = /* @__PURE__ */ new Map();
1703
+ var Qr = /* @__PURE__ */ new Map();
1704
1704
  function la(e) {
1705
- var t = Gr.get(e) || 1;
1706
- return Gr.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1705
+ var t = Qr.get(e) || 1;
1706
+ return Qr.set(e, t + 1), "".concat(e, ":").concat(t, ":").concat(Math.random().toString(36).slice(2));
1707
1707
  }
1708
1708
  function ca(e, t) {
1709
1709
  var r = la("stringifyForDisplay");
@@ -1766,7 +1766,7 @@ function da(e) {
1766
1766
  return t.name.value;
1767
1767
  })[0] || null;
1768
1768
  }
1769
- let ie = null;
1769
+ let ce = null;
1770
1770
  const Zr = {};
1771
1771
  let ua = 1;
1772
1772
  const fa = () => class {
@@ -1779,52 +1779,52 @@ const fa = () => class {
1779
1779
  ].join(":");
1780
1780
  }
1781
1781
  hasValue() {
1782
- for (let t = ie; t; t = t.parent)
1782
+ for (let t = ce; t; t = t.parent)
1783
1783
  if (this.id in t.slots) {
1784
1784
  const r = t.slots[this.id];
1785
1785
  if (r === Zr)
1786
1786
  break;
1787
- return t !== ie && (ie.slots[this.id] = r), !0;
1787
+ return t !== ce && (ce.slots[this.id] = r), !0;
1788
1788
  }
1789
- return ie && (ie.slots[this.id] = Zr), !1;
1789
+ return ce && (ce.slots[this.id] = Zr), !1;
1790
1790
  }
1791
1791
  getValue() {
1792
1792
  if (this.hasValue())
1793
- return ie.slots[this.id];
1793
+ return ce.slots[this.id];
1794
1794
  }
1795
1795
  withValue(t, r, n, o) {
1796
1796
  const s = {
1797
1797
  __proto__: null,
1798
1798
  [this.id]: t
1799
- }, i = ie;
1800
- ie = { parent: i, slots: s };
1799
+ }, i = ce;
1800
+ ce = { parent: i, slots: s };
1801
1801
  try {
1802
1802
  return r.apply(o, n);
1803
1803
  } finally {
1804
- ie = i;
1804
+ ce = i;
1805
1805
  }
1806
1806
  }
1807
1807
  // Capture the current context and wrap a callback function so that it
1808
1808
  // reestablishes the captured context when called.
1809
1809
  static bind(t) {
1810
- const r = ie;
1810
+ const r = ce;
1811
1811
  return function() {
1812
- const n = ie;
1812
+ const n = ce;
1813
1813
  try {
1814
- return ie = r, t.apply(this, arguments);
1814
+ return ce = r, t.apply(this, arguments);
1815
1815
  } finally {
1816
- ie = n;
1816
+ ce = n;
1817
1817
  }
1818
1818
  };
1819
1819
  }
1820
1820
  // Immediately run a callback function without any captured context.
1821
1821
  static noContext(t, r, n) {
1822
- if (ie) {
1823
- const o = ie;
1822
+ if (ce) {
1823
+ const o = ce;
1824
1824
  try {
1825
- return ie = null, t.apply(n, r);
1825
+ return ce = null, t.apply(n, r);
1826
1826
  } finally {
1827
- ie = o;
1827
+ ce = o;
1828
1828
  }
1829
1829
  } else
1830
1830
  return t.apply(n, r);
@@ -1912,7 +1912,7 @@ var _r = function() {
1912
1912
  };
1913
1913
  _r() && !Ir("observable") && (Symbol.observable = Symbol("observable"));
1914
1914
  var ga = Fr("iterator"), pr = Fr("observable"), qn = Fr("species");
1915
- function Qt(e, t) {
1915
+ function Gt(e, t) {
1916
1916
  var r = e[t];
1917
1917
  if (r != null) {
1918
1918
  if (typeof r != "function") throw new TypeError(r + " is not a function");
@@ -1921,10 +1921,10 @@ function Qt(e, t) {
1921
1921
  }
1922
1922
  function _t(e) {
1923
1923
  var t = e.constructor;
1924
- return t !== void 0 && (t = t[qn], t === null && (t = void 0)), t !== void 0 ? t : me;
1924
+ return t !== void 0 && (t = t[qn], t === null && (t = void 0)), t !== void 0 ? t : he;
1925
1925
  }
1926
1926
  function wa(e) {
1927
- return e instanceof me;
1927
+ return e instanceof he;
1928
1928
  }
1929
1929
  function xt(e) {
1930
1930
  xt.log ? xt.log(e) : setTimeout(function() {
@@ -1947,7 +1947,7 @@ function Rn(e) {
1947
1947
  if (typeof t == "function")
1948
1948
  t();
1949
1949
  else {
1950
- var r = Qt(t, "unsubscribe");
1950
+ var r = Gt(t, "unsubscribe");
1951
1951
  r && r.call(t);
1952
1952
  }
1953
1953
  } catch (n) {
@@ -1969,7 +1969,7 @@ function Hn(e, t, r) {
1969
1969
  e._state = "running";
1970
1970
  var n = e._observer;
1971
1971
  try {
1972
- var o = Qt(n, t);
1972
+ var o = Gt(n, t);
1973
1973
  switch (t) {
1974
1974
  case "next":
1975
1975
  o && o.call(n, r);
@@ -2045,7 +2045,7 @@ var xa = /* @__PURE__ */ (function() {
2045
2045
  return this._subscription._state === "closed";
2046
2046
  }
2047
2047
  }]), e;
2048
- })(), me = /* @__PURE__ */ (function() {
2048
+ })(), he = /* @__PURE__ */ (function() {
2049
2049
  function e(r) {
2050
2050
  if (!(this instanceof e)) throw new TypeError("Observable cannot be called as a function");
2051
2051
  if (typeof r != "function") throw new TypeError("Observable initializer must be a function");
@@ -2221,7 +2221,7 @@ var xa = /* @__PURE__ */ (function() {
2221
2221
  }, e.from = function(n) {
2222
2222
  var o = typeof this == "function" ? this : e;
2223
2223
  if (n == null) throw new TypeError(n + " is not an object");
2224
- var s = Qt(n, pr);
2224
+ var s = Gt(n, pr);
2225
2225
  if (s) {
2226
2226
  var i = s.call(n);
2227
2227
  if (Object(i) !== i) throw new TypeError(i + " is not an object");
@@ -2229,7 +2229,7 @@ var xa = /* @__PURE__ */ (function() {
2229
2229
  return i.subscribe(d);
2230
2230
  });
2231
2231
  }
2232
- if (Ir("iterator") && (s = Qt(n, ga), s))
2232
+ if (Ir("iterator") && (s = Gt(n, ga), s))
2233
2233
  return new o(function(d) {
2234
2234
  Ut(function() {
2235
2235
  if (!d.closed) {
@@ -2272,7 +2272,7 @@ var xa = /* @__PURE__ */ (function() {
2272
2272
  }
2273
2273
  }]), e;
2274
2274
  })();
2275
- _r() && Object.defineProperty(me, Symbol("extensions"), {
2275
+ _r() && Object.defineProperty(he, Symbol("extensions"), {
2276
2276
  value: {
2277
2277
  symbol: pr,
2278
2278
  hostReportError: xt
@@ -2298,7 +2298,7 @@ function va(e) {
2298
2298
  var yt;
2299
2299
  typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2300
2300
  va(yt);
2301
- var on = me.prototype, an = "@@observable";
2301
+ var on = he.prototype, an = "@@observable";
2302
2302
  on[an] || (on[an] = function() {
2303
2303
  return this;
2304
2304
  });
@@ -2317,10 +2317,10 @@ function ka(e) {
2317
2317
  return e;
2318
2318
  }
2319
2319
  function Sa(e, t) {
2320
- var r = Qe({}, e), n = function(s) {
2321
- typeof s == "function" ? r = Qe(Qe({}, r), s(r)) : r = Qe(Qe({}, r), s);
2320
+ var r = Ge({}, e), n = function(s) {
2321
+ typeof s == "function" ? r = Ge(Ge({}, r), s(r)) : r = Ge(Ge({}, r), s);
2322
2322
  }, o = function() {
2323
- return Qe({}, r);
2323
+ return Ge({}, r);
2324
2324
  };
2325
2325
  return Object.defineProperty(t, "setContext", {
2326
2326
  enumerable: !1,
@@ -2347,7 +2347,7 @@ function Pa(e, t) {
2347
2347
  Fa(e) || t();
2348
2348
  }
2349
2349
  function sn(e, t) {
2350
- return t ? t(e) : me.of();
2350
+ return t ? t(e) : he.of();
2351
2351
  }
2352
2352
  function It(e) {
2353
2353
  return typeof e == "function" ? new Vn(e) : e;
@@ -2363,7 +2363,7 @@ var Vn = (
2363
2363
  }
2364
2364
  return e.empty = function() {
2365
2365
  return new e(function() {
2366
- return me.of();
2366
+ return he.of();
2367
2367
  });
2368
2368
  }, e.from = function(t) {
2369
2369
  return t.length === 0 ? e.empty() : t.map(It).reduce(function(r, n) {
@@ -2372,12 +2372,12 @@ var Vn = (
2372
2372
  }, e.split = function(t, r, n) {
2373
2373
  var o = It(r), s = It(n || new e(sn)), i;
2374
2374
  return Bt(o) && Bt(s) ? i = new e(function(d) {
2375
- return t(d) ? o.request(d) || me.of() : s.request(d) || me.of();
2375
+ return t(d) ? o.request(d) || he.of() : s.request(d) || he.of();
2376
2376
  }) : i = new e(function(d, l) {
2377
- return t(d) ? o.request(d, l) || me.of() : s.request(d, l) || me.of();
2377
+ return t(d) ? o.request(d, l) || he.of() : s.request(d, l) || he.of();
2378
2378
  }), Object.assign(i, { left: o, right: s });
2379
2379
  }, e.execute = function(t, r) {
2380
- return t.request(Sa(r.context, Na(ka(r)))) || me.of();
2380
+ return t.request(Sa(r.context, Na(ka(r)))) || he.of();
2381
2381
  }, e.concat = function(t, r) {
2382
2382
  var n = It(t);
2383
2383
  if (Bt(n))
@@ -2385,12 +2385,12 @@ var Vn = (
2385
2385
  var o = It(r), s;
2386
2386
  return Bt(o) ? s = new e(function(i) {
2387
2387
  return n.request(i, function(d) {
2388
- return o.request(d) || me.of();
2389
- }) || me.of();
2388
+ return o.request(d) || he.of();
2389
+ }) || he.of();
2390
2390
  }) : s = new e(function(i, d) {
2391
2391
  return n.request(i, function(l) {
2392
- return o.request(l, d) || me.of();
2393
- }) || me.of();
2392
+ return o.request(l, d) || he.of();
2393
+ }) || he.of();
2394
2394
  }), Object.assign(s, { left: n, right: o });
2395
2395
  }, e.prototype.split = function(t, r, n) {
2396
2396
  return this.concat(e.split(t, r, n || new e(sn)));
@@ -2412,7 +2412,7 @@ var Vn = (
2412
2412
  function Ta(e) {
2413
2413
  return new Vn(function(t, r) {
2414
2414
  var n = aa(t, []);
2415
- return new me(function(o) {
2415
+ return new he(function(o) {
2416
2416
  var s, i = !1;
2417
2417
  return Promise.resolve(n).then(function(d) {
2418
2418
  return e(d, t.getContext());
@@ -2431,7 +2431,7 @@ function Ta(e) {
2431
2431
  const Ea = async () => {
2432
2432
  const e = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", n = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2433
2433
  try {
2434
- const o = await ge.post(
2434
+ const o = await we.post(
2435
2435
  e,
2436
2436
  new URLSearchParams({ grant_type: "client_credentials" }),
2437
2437
  // Only grant_type in body
@@ -2444,7 +2444,7 @@ const Ea = async () => {
2444
2444
  );
2445
2445
  return o.status === 200 && o.data.access_token ? o.data.access_token : (console.error("Failed to fetch token:", o.data), null);
2446
2446
  } catch (o) {
2447
- return ge.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2447
+ return we.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2448
2448
  }
2449
2449
  }, Oa = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", Aa = Eo({
2450
2450
  uri: `${Oa}`
@@ -2486,13 +2486,13 @@ const Yn = Object.freeze({
2486
2486
  top: 0,
2487
2487
  width: 16,
2488
2488
  height: 16
2489
- }), Gt = Object.freeze({
2489
+ }), Qt = Object.freeze({
2490
2490
  rotate: 0,
2491
2491
  vFlip: !1,
2492
2492
  hFlip: !1
2493
2493
  }), Pr = Object.freeze({
2494
2494
  ...Yn,
2495
- ...Gt
2495
+ ...Qt
2496
2496
  }), wr = Object.freeze({
2497
2497
  ...Pr,
2498
2498
  body: "",
@@ -2506,7 +2506,7 @@ function La(e, t) {
2506
2506
  }
2507
2507
  function ln(e, t) {
2508
2508
  const r = La(e, t);
2509
- for (const n in wr) n in Gt ? n in e && !(n in r) && (r[n] = Gt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2509
+ for (const n in wr) n in Qt ? n in e && !(n in r) && (r[n] = Qt[n]) : n in t ? r[n] = t[n] : n in e && (r[n] = e[n]);
2510
2510
  return r;
2511
2511
  }
2512
2512
  function za(e, t, r) {
@@ -2582,7 +2582,7 @@ function Ua(e, t, r) {
2582
2582
  }
2583
2583
  return !1;
2584
2584
  }
2585
- const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2585
+ const Gn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2586
2586
  const o = e.split(":");
2587
2587
  if (e.slice(0, 1) === "@") {
2588
2588
  if (o.length < 2 || o.length > 3) return null;
@@ -2617,7 +2617,7 @@ const Qn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2617
2617
  return null;
2618
2618
  }, qt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
2619
2619
  let Ot = !1;
2620
- function Gn(e) {
2620
+ function Qn(e) {
2621
2621
  return typeof e == "boolean" && (Ot = e), Ot;
2622
2622
  }
2623
2623
  function dn(e) {
@@ -2654,7 +2654,7 @@ const Xn = Object.freeze({
2654
2654
  height: null
2655
2655
  }), Zn = Object.freeze({
2656
2656
  ...Xn,
2657
- ...Gt
2657
+ ...Qt
2658
2658
  }), Ha = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Va = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
2659
2659
  function un(e, t, r) {
2660
2660
  if (t === 1) return e;
@@ -2696,7 +2696,7 @@ function Ka(e, t, r) {
2696
2696
  return Ja(n.defs, t + n.content + r);
2697
2697
  }
2698
2698
  const Wa = (e) => e === "unset" || e === "undefined" || e === "none";
2699
- function Qa(e, t) {
2699
+ function Ga(e, t) {
2700
2700
  const r = {
2701
2701
  ...Pr,
2702
2702
  ...e
@@ -2714,19 +2714,19 @@ function Qa(e, t) {
2714
2714
  const N = [], P = F.hFlip, R = F.vFlip;
2715
2715
  let w = F.rotate;
2716
2716
  P ? R ? w += 2 : (N.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), N.push("scale(-1 1)"), o.top = o.left = 0) : R && (N.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), N.push("scale(1 -1)"), o.top = o.left = 0);
2717
- let V;
2717
+ let Y;
2718
2718
  switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
2719
2719
  case 1:
2720
- V = o.height / 2 + o.top, N.unshift("rotate(90 " + V.toString() + " " + V.toString() + ")");
2720
+ Y = o.height / 2 + o.top, N.unshift("rotate(90 " + Y.toString() + " " + Y.toString() + ")");
2721
2721
  break;
2722
2722
  case 2:
2723
2723
  N.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
2724
2724
  break;
2725
2725
  case 3:
2726
- V = o.width / 2 + o.left, N.unshift("rotate(-90 " + V.toString() + " " + V.toString() + ")");
2726
+ Y = o.width / 2 + o.left, N.unshift("rotate(-90 " + Y.toString() + " " + Y.toString() + ")");
2727
2727
  break;
2728
2728
  }
2729
- w % 2 === 1 && (o.left !== o.top && (V = o.left, o.left = o.top, o.top = V), o.width !== o.height && (V = o.width, o.width = o.height, o.height = V)), N.length && (s = Ka(s, '<g transform="' + N.join(" ") + '">', "</g>"));
2729
+ w % 2 === 1 && (o.left !== o.top && (Y = o.left, o.left = o.top, o.top = Y), o.width !== o.height && (Y = o.width, o.width = o.height, o.height = Y)), N.length && (s = Ka(s, '<g transform="' + N.join(" ") + '">', "</g>"));
2730
2730
  });
2731
2731
  const i = n.width, d = n.height, l = o.width, g = o.height;
2732
2732
  let p, y;
@@ -2747,12 +2747,12 @@ function Qa(e, t) {
2747
2747
  body: s
2748
2748
  };
2749
2749
  }
2750
- const Ga = /\sid="(\S+)"/g, Xa = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2750
+ const Qa = /\sid="(\S+)"/g, Xa = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
2751
2751
  let Za = 0;
2752
2752
  function es(e, t = Xa) {
2753
2753
  const r = [];
2754
2754
  let n;
2755
- for (; n = Ga.exec(e); ) r.push(n[1]);
2755
+ for (; n = Qa.exec(e); ) r.push(n[1]);
2756
2756
  if (!r.length) return e;
2757
2757
  const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
2758
2758
  return r.forEach((s) => {
@@ -3026,34 +3026,34 @@ function gs(e, t, r, n) {
3026
3026
  E.status === "pending" && (E.status = "aborted");
3027
3027
  }), x = [];
3028
3028
  }
3029
- function V(E, H, we) {
3030
- const ae = H !== "success";
3031
- switch (x = x.filter((G) => G !== E), l) {
3029
+ function Y(E, H, ye) {
3030
+ const ie = H !== "success";
3031
+ switch (x = x.filter((Z) => Z !== E), l) {
3032
3032
  case "pending":
3033
3033
  break;
3034
3034
  case "failed":
3035
- if (ae || !e.dataAfterTimeout) return;
3035
+ if (ie || !e.dataAfterTimeout) return;
3036
3036
  break;
3037
3037
  default:
3038
3038
  return;
3039
3039
  }
3040
3040
  if (H === "abort") {
3041
- p = we, R();
3041
+ p = ye, R();
3042
3042
  return;
3043
3043
  }
3044
- if (ae) {
3045
- p = we, x.length || (i.length ? je() : R());
3044
+ if (ie) {
3045
+ p = ye, x.length || (i.length ? $e() : R());
3046
3046
  return;
3047
3047
  }
3048
3048
  if (_(), w(), !e.random) {
3049
- const G = e.resources.indexOf(E.resource);
3050
- G !== -1 && G !== e.index && (e.index = G);
3049
+ const Z = e.resources.indexOf(E.resource);
3050
+ Z !== -1 && Z !== e.index && (e.index = Z);
3051
3051
  }
3052
- l = "completed", S.forEach((G) => {
3053
- G(we);
3052
+ l = "completed", S.forEach((Z) => {
3053
+ Z(ye);
3054
3054
  });
3055
3055
  }
3056
- function je() {
3056
+ function $e() {
3057
3057
  if (l !== "pending") return;
3058
3058
  _();
3059
3059
  const E = i.shift();
@@ -3070,13 +3070,13 @@ function gs(e, t, r, n) {
3070
3070
  const H = {
3071
3071
  status: "pending",
3072
3072
  resource: E,
3073
- callback: (we, ae) => {
3074
- V(H, we, ae);
3073
+ callback: (ye, ie) => {
3074
+ Y(H, ye, ie);
3075
3075
  }
3076
3076
  };
3077
- x.push(H), g++, y = setTimeout(je, e.rotate), r(E, t, H.callback);
3077
+ x.push(H), g++, y = setTimeout($e, e.rotate), r(E, t, H.callback);
3078
3078
  }
3079
- return setTimeout(je), P;
3079
+ return setTimeout($e), P;
3080
3080
  }
3081
3081
  function to(e) {
3082
3082
  const t = {
@@ -3150,7 +3150,7 @@ function xs(e) {
3150
3150
  function bs(e) {
3151
3151
  const t = [], r = [];
3152
3152
  return e.forEach((n) => {
3153
- (n.match(Qn) ? t : r).push(n);
3153
+ (n.match(Gn) ? t : r).push(n);
3154
3154
  }), {
3155
3155
  valid: t,
3156
3156
  invalid: r
@@ -3207,7 +3207,7 @@ function vs(e, t) {
3207
3207
  }
3208
3208
  const { valid: i, invalid: d } = bs(o);
3209
3209
  if (d.length && Pt(e, d, null), !i.length) return;
3210
- const l = n.match(Qn) ? xr(r) : null;
3210
+ const l = n.match(Gn) ? xr(r) : null;
3211
3211
  if (!l) {
3212
3212
  Pt(e, i, null);
3213
3213
  return;
@@ -3220,7 +3220,7 @@ function vs(e, t) {
3220
3220
  }));
3221
3221
  }
3222
3222
  const ks = (e, t) => {
3223
- const r = hs(e, !0, Gn()), n = ms(r);
3223
+ const r = hs(e, !0, Qn()), n = ms(r);
3224
3224
  if (!n.pending.length) {
3225
3225
  let l = !0;
3226
3226
  return t && setTimeout(() => {
@@ -3416,7 +3416,7 @@ const Ds = (e, t, r) => {
3416
3416
  n[N] === void 0 && (l[N] = P);
3417
3417
  }
3418
3418
  }
3419
- const g = Qa(e, o), p = g.attributes;
3419
+ const g = Ga(e, o), p = g.attributes;
3420
3420
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3421
3421
  l.style = {
3422
3422
  ...i,
@@ -3442,7 +3442,7 @@ const Ds = (e, t, r) => {
3442
3442
  ...d
3443
3443
  }, cr("span", l);
3444
3444
  };
3445
- Gn(!0);
3445
+ Qn(!0);
3446
3446
  ts("", cs);
3447
3447
  if (typeof document < "u" && typeof window < "u") {
3448
3448
  const e = window;
@@ -3527,7 +3527,7 @@ function oo(e) {
3527
3527
  });
3528
3528
  } else F && ((S = e.onLoad) === null || S === void 0 || S.call(e, _));
3529
3529
  }
3530
- be(() => (r(!0), l), []), be(() => {
3530
+ ke(() => (r(!0), l), []), ke(() => {
3531
3531
  t && p();
3532
3532
  }, [e.icon, t]);
3533
3533
  const { name: y, data: x } = i;
@@ -3536,7 +3536,7 @@ function oo(e) {
3536
3536
  ...x
3537
3537
  }, e, y) : e.children ? e.children : e.fallback ? e.fallback : cr("span", {});
3538
3538
  }
3539
- const re = _n((e, t) => oo({
3539
+ const ae = _n((e, t) => oo({
3540
3540
  ...e,
3541
3541
  _ref: t
3542
3542
  }));
@@ -3618,7 +3618,7 @@ const He = "USD", xn = (e) => {
3618
3618
  standard: "GROUND",
3619
3619
  express: "2-DAY SHIPPING",
3620
3620
  sameday: "OVERNIGHT"
3621
- }, Ae = (e, t) => {
3621
+ }, je = (e, t) => {
3622
3622
  try {
3623
3623
  return e.toLocaleString("en-US", {
3624
3624
  style: "currency",
@@ -3673,8 +3673,8 @@ const He = "USD", xn = (e) => {
3673
3673
  const i = null, d = null, l = Ht(r), g = Math.min(
3674
3674
  Math.max(0, n || 0),
3675
3675
  Math.max(0, l.length - 1)
3676
- ), p = l.length, [y, x] = C(g), [S, _] = C(null), [F, N] = C(null), P = Re(null), R = Re(null), w = Bs(r, y), [V, je] = C(""), [E, H] = C(!1), [we, ae] = C(!1), [G, Pe] = C(!1), [$e, he] = C(""), [L, O] = C(!1), [U, Xe] = C(null), [Ye, ve] = C([]), [_e, ft] = C([]), [Ze, M] = C([]), [le, Te] = C(!1), [Ie, Zt] = C(), [er, m] = C(!0), [j, $] = C(!1), [Y, z] = C(!1), [A, ce] = C("standard"), [B, D] = C(!1), [X, ne] = C(!1), [ke, Se] = C("card"), [Z, K] = C(!1), [Ne, ee] = C(!1), [k, J] = C(!1), [W, de] = C(null), [Ce, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), ht = Re(null);
3677
- be(() => {
3676
+ ), p = l.length, [y, x] = C(g), [S, _] = C(null), [F, N] = C(null), P = Re(null), R = Re(null), w = Bs(r, y), [Y, $e] = C(""), [E, H] = C(!1), [ye, ie] = C(!1), [Z, Oe] = C(!1), [De, pe] = C(""), [L, O] = C(!1), [U, Xe] = C(null), [Ye, Se] = C([]), [Pe, ft] = C([]), [Ze, M] = C([]), [de, Ae] = C(!1), [Te, Zt] = C(), [er, m] = C(!0), [j, $] = C(!1), [J, z] = C(!1), [A, ue] = C("standard"), [B, D] = C(!1), [ee, se] = C(!1), [Ne, Ce] = C("card"), [te, W] = C(!1), [_e, re] = C(!1), [k, K] = C(!1), [G, fe] = C(null), [Ie, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), ht = Re(null);
3677
+ ke(() => {
3678
3678
  const u = Ht(r), h = Math.min(
3679
3679
  Math.max(0, n || 0),
3680
3680
  Math.max(0, u.length - 1)
@@ -3682,32 +3682,32 @@ const He = "USD", xn = (e) => {
3682
3682
  x(h);
3683
3683
  const f = ao(r), v = qe(f), T = We(f);
3684
3684
  P.current = v || null, R.current = T || null, _(v || null), N(T || null);
3685
- }, [n, r]), be(() => {
3685
+ }, [n, r]), ke(() => {
3686
3686
  ht.current && (ht.current.scrollTop = ht.current.scrollHeight);
3687
3687
  }, [
3688
3688
  Ye,
3689
- le,
3689
+ de,
3690
3690
  j,
3691
- Y,
3691
+ J,
3692
3692
  B,
3693
- X,
3694
- Z,
3695
- Ne,
3693
+ ee,
3694
+ te,
3695
+ _e,
3696
3696
  k,
3697
3697
  E,
3698
- we
3698
+ ye
3699
3699
  ]);
3700
- const I = "var(--tanya)", De = "var(--tanya-contrast)", tt = I, kt = "#804c9e", so = () => {
3700
+ const I = "var(--tanya)", Le = "var(--tanya-contrast)", tt = I, kt = "#804c9e", so = () => {
3701
3701
  console.log("AgenticShopping feedback:", {
3702
- rating: Ce,
3702
+ rating: Ie,
3703
3703
  comment: mt
3704
3704
  }), jt(!0);
3705
3705
  }, io = () => {
3706
3706
  et(null), At(""), jt(!0);
3707
3707
  }, Ar = (u) => {
3708
- const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? W;
3708
+ const f = ((u == null ? void 0 : u.intentMandateId) || (u == null ? void 0 : u.intent_mandate_id) || (u == null ? void 0 : u.id) || null) ?? G;
3709
3709
  return e ? /* @__PURE__ */ c("div", { className: "mt-3 flex items-start gap-3 rounded-lg border border-green-200 bg-green-50 p-4 text-green-800", children: [
3710
- /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(re, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3710
+ /* @__PURE__ */ a("div", { className: "success-tick-animation", children: /* @__PURE__ */ a(ae, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3711
3711
  /* @__PURE__ */ c("div", { className: "text-sm w-full", children: [
3712
3712
  /* @__PURE__ */ a("div", { className: "font-semibold", children: "Success!" }),
3713
3713
  /* @__PURE__ */ a("div", { children: "Your smart order has been saved. I’ll watch the price and auto-purchase when the conditions are met." }),
@@ -3731,9 +3731,9 @@ const He = "USD", xn = (e) => {
3731
3731
  onClick: () => et(v),
3732
3732
  className: "p-0.5",
3733
3733
  children: /* @__PURE__ */ a(
3734
- re,
3734
+ ae,
3735
3735
  {
3736
- icon: Ce && Ce >= v ? "mdi:star" : "mdi:star-outline",
3736
+ icon: Ie && Ie >= v ? "mdi:star" : "mdi:star-outline",
3737
3737
  width: "20",
3738
3738
  className: "text-yellow-500"
3739
3739
  }
@@ -3769,7 +3769,7 @@ const He = "USD", xn = (e) => {
3769
3769
  onClick: so,
3770
3770
  className: "px-4 py-2 rounded-full text-sm font-semibold text-white shadow",
3771
3771
  style: { background: I },
3772
- disabled: !Ce && !mt.trim(),
3772
+ disabled: !Ie && !mt.trim(),
3773
3773
  children: "Submit"
3774
3774
  }
3775
3775
  )
@@ -3785,7 +3785,7 @@ const He = "USD", xn = (e) => {
3785
3785
  console.error("Error fetching addresses:", u);
3786
3786
  }
3787
3787
  }, St = (u, h) => {
3788
- ve((f) => [
3788
+ Se((f) => [
3789
3789
  ...f,
3790
3790
  {
3791
3791
  query: "",
@@ -3795,7 +3795,7 @@ const He = "USD", xn = (e) => {
3795
3795
  }
3796
3796
  ]);
3797
3797
  }, jr = (u, h) => {
3798
- ve(
3798
+ Se(
3799
3799
  (f) => f.map(
3800
3800
  (v) => v.response === "__CARD__" ? {
3801
3801
  ...v,
@@ -3806,32 +3806,32 @@ const He = "USD", xn = (e) => {
3806
3806
  )
3807
3807
  );
3808
3808
  }, co = () => {
3809
- ve(
3809
+ Se(
3810
3810
  (u) => u.filter(
3811
3811
  (h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
3812
3812
  )
3813
3813
  );
3814
3814
  }, $t = () => {
3815
- ee(!1), Te(!1), z(!1), ne(!1), $(!1), D(!1), K(!1), J(!1), O(!1), Xe(null), co(), H(!1), ae(!1);
3815
+ re(!1), Ae(!1), z(!1), se(!1), $(!1), D(!1), W(!1), K(!1), O(!1), Xe(null), co(), H(!1), ie(!1);
3816
3816
  }, uo = () => {
3817
- Te(!1), $(!1), z(!1), ce("standard"), D(!1), ne(!1), Se("card"), K(!1), ee(!1), J(!1), m(!0), Xe(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3818
- }, Fe = Rr(() => Ht(r).map((h, f) => ({
3817
+ Ae(!1), $(!1), z(!1), ue("standard"), D(!1), se(!1), Ce("card"), W(!1), re(!1), K(!1), m(!0), Xe(null), localStorage.removeItem("agentic_order"), localStorage.removeItem("agentic_order_address"), localStorage.removeItem("agentic_order_delivery"), localStorage.removeItem("agentic_order_payment"), localStorage.removeItem("agentic_order_final");
3818
+ }, Ee = Rr(() => Ht(r).map((h, f) => ({
3819
3819
  index: f,
3820
3820
  variant: h,
3821
3821
  images: ((h == null ? void 0 : h.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3822
3822
  })), [r]), Nt = Rr(() => {
3823
- if (!Fe.length) return !1;
3823
+ if (!Ee.length) return !1;
3824
3824
  const u = S || void 0, h = F || void 0, f = (v, T) => {
3825
3825
  var q;
3826
3826
  const b = ot(
3827
- Fe,
3827
+ Ee,
3828
3828
  v || void 0,
3829
3829
  T || void 0
3830
3830
  );
3831
3831
  return !!(b && ((q = b.variant) != null && q.sku));
3832
3832
  };
3833
3833
  return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(w && w.sku);
3834
- }, [Fe, S, F, w]), fo = G || L || !Nt, Ct = (u) => {
3834
+ }, [Ee, S, F, w]), fo = Z || L || !Nt, Ct = (u) => {
3835
3835
  const h = Number((u == null ? void 0 : u.quantity) ?? 1);
3836
3836
  return Number.isFinite(h) && h > 0 ? h : 1;
3837
3837
  }, $r = (u) => {
@@ -3842,15 +3842,15 @@ const He = "USD", xn = (e) => {
3842
3842
  const h = U, f = Vt(w), v = u || (h == null ? void 0 : h.currency) || f.currency || He, T = $r(h), b = +(T * 0.08).toFixed(2), q = ((Q = at[A]) == null ? void 0 : Q.fee) || 0;
3843
3843
  return { product_total: T, tax: b, shipping_fee: q, currency: v };
3844
3844
  }, tr = async (u, h, f) => {
3845
- jr(), uo(), Pe(!0), O(!0), H(!1), ae(!1);
3846
- const v = _e.slice(-Cn);
3845
+ jr(), uo(), Oe(!0), O(!0), H(!1), ie(!1);
3846
+ const v = Pe.slice(-Cn);
3847
3847
  try {
3848
3848
  const T = await ur(i, d);
3849
3849
  if (!T) throw new Error("Failed to fetch token");
3850
- const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), ue = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3850
+ const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), oe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3851
3851
  registered: String(q || !1),
3852
3852
  userId: String(b || (/* @__PURE__ */ new Date()).getTime())
3853
- }).toString()}`, te = await fetch(`${ue}`, {
3853
+ }).toString()}`, V = await fetch(`${oe}`, {
3854
3854
  method: "POST",
3855
3855
  headers: {
3856
3856
  "Content-Type": "application/json",
@@ -3870,100 +3870,100 @@ const He = "USD", xn = (e) => {
3870
3870
  }
3871
3871
  })
3872
3872
  });
3873
- if (!te.body) throw new Error("Readable stream not supported");
3874
- const ye = te.body.getReader(), oe = new TextDecoder();
3875
- let Ee = "", Oe = "", Le = "";
3873
+ if (!V.body) throw new Error("Readable stream not supported");
3874
+ const le = V.body.getReader(), X = new TextDecoder();
3875
+ let xe = "", be = "", Fe = "";
3876
3876
  for (; ; ) {
3877
- const { done: pe, value: Je } = await ye.read();
3878
- if (pe) break;
3879
- Ee += oe.decode(Je, { stream: !0 });
3880
- const pt = Ee.split(`
3877
+ const { done: ge, value: Je } = await le.read();
3878
+ if (ge) break;
3879
+ xe += X.decode(Je, { stream: !0 });
3880
+ const pt = xe.split(`
3881
3881
  `);
3882
- Ee = pt.pop() || "";
3882
+ xe = pt.pop() || "";
3883
3883
  for (const gt of pt) {
3884
3884
  if (!gt.startsWith("data:")) continue;
3885
3885
  const rt = gt.slice(5).trim();
3886
3886
  try {
3887
- const Ue = JSON.parse(rt), ze = Ue.index, fe = Ue.data;
3888
- ze === 0 ? Oe = String(fe ?? "") : ze === 1 && (Le = String(fe ?? ""));
3887
+ const Ue = JSON.parse(rt), ze = Ue.index, me = Ue.data;
3888
+ ze === 0 ? be = String(me ?? "") : ze === 1 && (Fe = String(me ?? ""));
3889
3889
  } catch (Ue) {
3890
3890
  console.error("Error parsing JSON chunk:", Ue);
3891
3891
  }
3892
3892
  }
3893
3893
  }
3894
- let se = null;
3895
- if (Oe) {
3896
- const pe = String(Oe).replace(/\\n/g, "").trim();
3897
- if (pe.startsWith("{") && pe.endsWith("}"))
3894
+ let ne = null;
3895
+ if (be) {
3896
+ const ge = String(be).replace(/\\n/g, "").trim();
3897
+ if (ge.startsWith("{") && ge.endsWith("}"))
3898
3898
  try {
3899
- se = JSON.parse(pe), se.product_id = h, se.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(se));
3899
+ ne = JSON.parse(ge), ne.product_id = h, ne.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(ne));
3900
3900
  } catch (Je) {
3901
3901
  console.log(Je);
3902
3902
  }
3903
3903
  }
3904
- Xe(se), se && ve((pe) => [
3905
- ...pe,
3904
+ Xe(ne), ne && Se((ge) => [
3905
+ ...ge,
3906
3906
  {
3907
3907
  query: "",
3908
3908
  response: "__CARD__",
3909
- snapshotPayload: { extractedDetails: se }
3909
+ snapshotPayload: { extractedDetails: ne }
3910
3910
  }
3911
- ]), ft((pe) => [
3912
- ...pe,
3911
+ ]), ft((ge) => [
3912
+ ...ge,
3913
3913
  {
3914
3914
  userQuery: u,
3915
- mainResponse: Oe || "",
3916
- keywords: Le || ""
3915
+ mainResponse: be || "",
3916
+ keywords: Fe || ""
3917
3917
  }
3918
3918
  ].slice(-Cn));
3919
3919
  } catch (T) {
3920
3920
  console.error("Error sending message to Tanya:", T), O(!1);
3921
3921
  } finally {
3922
- Pe(!1);
3922
+ Oe(!1);
3923
3923
  }
3924
3924
  }, Lr = async (u) => {
3925
- if (L || G || !Nt) return;
3926
- const h = $e.trim();
3925
+ if (L || Z || !Nt) return;
3926
+ const h = De.trim();
3927
3927
  if (!h) return;
3928
- ve((b) => [...b, { query: h, response: "" }]), he(""), je(h);
3928
+ Se((b) => [...b, { query: h, response: "" }]), pe(""), $e(h);
3929
3929
  const f = w == null ? void 0 : w.sku, v = Nn(r), T = f || v || "";
3930
3930
  if (p <= 1) {
3931
3931
  if (T) {
3932
3932
  tr(h, T, y);
3933
3933
  return;
3934
3934
  }
3935
- ae(!0), O(!0);
3935
+ ie(!0), O(!0);
3936
3936
  return;
3937
3937
  }
3938
- T ? (H(!0), O(!0)) : (ae(!0), O(!0));
3938
+ T ? (H(!0), O(!0)) : (ie(!0), O(!0));
3939
3939
  }, mo = () => {
3940
3940
  const u = w == null ? void 0 : w.sku;
3941
- u && tr(V, u, y);
3941
+ u && tr(Y, u, y);
3942
3942
  }, ho = () => {
3943
- H(!1), ae(!0), O(!0);
3943
+ H(!1), ie(!0), O(!0);
3944
3944
  }, po = () => {
3945
3945
  if (!w || !w.sku) return;
3946
3946
  const u = w.sku;
3947
- tr(V, u, y);
3947
+ tr(Y, u, y);
3948
3948
  }, go = async () => {
3949
- Te(!0), z(!1), ne(!1), ee(!1), $(!1), D(!1), K(!1), J(!1), await lo(), jr("initial", {
3949
+ Ae(!0), z(!1), se(!1), re(!1), $(!1), D(!1), W(!1), K(!1), await lo(), jr("initial", {
3950
3950
  extractedDetails: U ?? void 0
3951
3951
  });
3952
3952
  }, wo = () => {
3953
- if (!Ie) return;
3953
+ if (!Te) return;
3954
3954
  const u = Ze.find(
3955
- (h) => String(h.addressId ?? h.id) === Ie
3955
+ (h) => String(h.addressId ?? h.id) === Te
3956
3956
  ) || null;
3957
- u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), ne(!1), K(!1), ee(!1), J(!1), St("address", u));
3957
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), se(!1), W(!1), re(!1), K(!1), St("address", u));
3958
3958
  }, yo = () => {
3959
- $(!1), z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_address");
3959
+ $(!1), z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_address");
3960
3960
  }, xo = () => {
3961
- A && (localStorage.setItem("agentic_order_delivery", A), D(!0), ne(!0), K(!1), ee(!1), J(!1), St("delivery", {
3961
+ A && (localStorage.setItem("agentic_order_delivery", A), D(!0), se(!0), W(!1), re(!1), K(!1), St("delivery", {
3962
3962
  method: A,
3963
3963
  ...at[A]
3964
3964
  }));
3965
3965
  }, zr = () => {
3966
- z(!1), D(!1), ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3966
+ z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3967
3967
  ...u,
3968
3968
  {
3969
3969
  query: "",
@@ -3974,11 +3974,11 @@ const He = "USD", xn = (e) => {
3974
3974
  }
3975
3975
  ]);
3976
3976
  }, bo = () => {
3977
- D(!1), ne(!1), K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
3977
+ D(!1), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_delivery");
3978
3978
  }, vo = () => {
3979
- ke && (localStorage.setItem("agentic_order_payment", ke), K(!0), ee(!0), J(!1), St("payment", { method: ke }));
3979
+ Ne && (localStorage.setItem("agentic_order_payment", Ne), W(!0), re(!0), K(!1), St("payment", { method: Ne }));
3980
3980
  }, ko = () => {
3981
- ne(!1), K(!1), ee(!1), J(!1), O(!1), $t(), ve((u) => [
3981
+ se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3982
3982
  ...u,
3983
3983
  {
3984
3984
  query: "",
@@ -3989,38 +3989,38 @@ const He = "USD", xn = (e) => {
3989
3989
  }
3990
3990
  ]);
3991
3991
  }, So = () => {
3992
- K(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_payment");
3992
+ W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_payment");
3993
3993
  }, No = async () => {
3994
3994
  try {
3995
- Pe(!0);
3995
+ Oe(!0);
3996
3996
  const u = U || {}, h = JSON.parse(
3997
3997
  localStorage.getItem("agentic_order_address") || "null"
3998
3998
  ), f = localStorage.getItem(
3999
3999
  "agentic_order_delivery"
4000
- ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: q, currency: Q } = Dr(), ue = u.shopper_id || localStorage.getItem("customerId") || void 0, te = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, ye = f ? Ms[f] : "GROUND", oe = "card-visa", Ee = w == null ? void 0 : w.sku, Oe = (r == null ? void 0 : r.id) || "", Le = Ct(u), se = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), pt = {
4001
- shopper_id: ue,
4002
- shipping_address_id: te,
4003
- shipping_method_id: ye,
4004
- payment_method_id: oe,
4005
- sku: Ee,
4000
+ ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: q, currency: Q } = Dr(), oe = u.shopper_id || localStorage.getItem("customerId") || void 0, V = (h == null ? void 0 : h.addressId) || (h == null ? void 0 : h.id) || void 0, le = f ? Ms[f] : "GROUND", X = "card-visa", xe = w == null ? void 0 : w.sku, be = (r == null ? void 0 : r.id) || "", Fe = Ct(u), ne = typeof u.max_price_minor == "number" ? u.max_price_minor : Math.round(T * 100), pt = {
4001
+ shopper_id: oe,
4002
+ shipping_address_id: V,
4003
+ shipping_method_id: le,
4004
+ payment_method_id: X,
4005
+ sku: xe,
4006
4006
  platform: "SFCC",
4007
4007
  storeCode: "Sites-SiteGenesis-Site",
4008
- product_id: Oe,
4009
- quantity: Le,
4010
- max_price_minor: se,
4008
+ product_id: be,
4009
+ quantity: Fe,
4010
+ max_price_minor: ne,
4011
4011
  currency: Q,
4012
- instruction_text: V
4012
+ instruction_text: Y
4013
4013
  };
4014
- if (!ue || !te) {
4014
+ if (!oe || !V) {
4015
4015
  console.error(
4016
4016
  "Missing shopper_id or shipping_address_id for intent-mandate",
4017
4017
  {
4018
- shopperId: ue,
4019
- shippingAddressId: te
4018
+ shopperId: oe,
4019
+ shippingAddressId: V
4020
4020
  }
4021
4021
  ), alert(
4022
4022
  "Missing customer or address information. Please re-select address and try again."
4023
- ), Pe(!1);
4023
+ ), Oe(!1);
4024
4024
  return;
4025
4025
  }
4026
4026
  const rt = (await vt()).access_token;
@@ -4038,13 +4038,13 @@ const He = "USD", xn = (e) => {
4038
4038
  const To = await ze.text().catch(() => "");
4039
4039
  console.error("intent-mandate failed", ze.status, To), alert(
4040
4040
  "Something went wrong while saving your smart order. Please try again."
4041
- ), Pe(!1);
4041
+ ), Oe(!1);
4042
4042
  return;
4043
4043
  }
4044
- const fe = await ze.json().catch(() => null);
4045
- console.log("intent-mandate success:", fe);
4046
- const nt = (fe == null ? void 0 : fe.intent_mandate_id) || (fe == null ? void 0 : fe.intent_mandateId) || (fe == null ? void 0 : fe.key) || null;
4047
- nt && de(nt);
4044
+ const me = await ze.json().catch(() => null);
4045
+ console.log("intent-mandate success:", me);
4046
+ const nt = (me == null ? void 0 : me.intent_mandate_id) || (me == null ? void 0 : me.intent_mandateId) || (me == null ? void 0 : me.key) || null;
4047
+ nt && fe(nt);
4048
4048
  const Dt = {
4049
4049
  ...u,
4050
4050
  address: h,
@@ -4053,16 +4053,16 @@ const He = "USD", xn = (e) => {
4053
4053
  summary: { product_total: T, tax: b, shipping_fee: q, currency: Q },
4054
4054
  intent_mandate_id: nt
4055
4055
  };
4056
- localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), J(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
4056
+ localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), K(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
4057
4057
  } catch (u) {
4058
4058
  console.error("Error in handleConfirmWatch / intent-mandate:", u), alert(
4059
4059
  "Unable to complete your smart order right now. Please try again in a moment."
4060
4060
  );
4061
4061
  } finally {
4062
- Pe(!1);
4062
+ Oe(!1);
4063
4063
  }
4064
4064
  }, Mr = () => {
4065
- $t(), ve((u) => [
4065
+ $t(), Se((u) => [
4066
4066
  ...u,
4067
4067
  {
4068
4068
  query: "",
@@ -4073,17 +4073,18 @@ const He = "USD", xn = (e) => {
4073
4073
  }
4074
4074
  ]);
4075
4075
  }, Co = () => {
4076
+ var oe, V, le, X, xe, be, Fe, ne;
4076
4077
  const u = vn(r, w), h = kn(r), f = (w == null ? void 0 : w.sku) || "", v = qe(w) || "", T = We(w) || "", { amount: b } = Vt(w), q = !!(w != null && w.sku), Q = w && q ? xn(w) : !1;
4077
4078
  return /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ c("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4078
4079
  /* @__PURE__ */ a("div", { className: "flex-shrink-0 flex justify-center sm:justify-start", children: /* @__PURE__ */ a("div", { className: "w-[150px] h-[150px] rounded-lg bg-gray-50 border border-gray-200 flex items-center justify-center overflow-hidden", children: u ? /* @__PURE__ */ a(
4079
4080
  "img",
4080
4081
  {
4081
- src: u,
4082
+ src: ((X = (le = (V = (oe = r.imageGroups) == null ? void 0 : oe[0]) == null ? void 0 : V.images) == null ? void 0 : le[0]) == null ? void 0 : X.link) || ((ne = (Fe = (be = (xe = r.image_groups) == null ? void 0 : xe[0]) == null ? void 0 : be.images) == null ? void 0 : Fe[0]) == null ? void 0 : ne.link),
4082
4083
  alt: h,
4083
4084
  className: "object-contain w-full h-full"
4084
4085
  }
4085
4086
  ) : /* @__PURE__ */ a(
4086
- re,
4087
+ ae,
4087
4088
  {
4088
4089
  icon: "mdi:image-outline",
4089
4090
  width: "28",
@@ -4097,14 +4098,14 @@ const He = "USD", xn = (e) => {
4097
4098
  v && `Color: ${v}`,
4098
4099
  T && `Size: ${T}`
4099
4100
  ].filter(Boolean).join(" • ") || "—" }),
4100
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? Ae(Number(b) || 0, He) : "Currently unavailable" }),
4101
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? je(Number(b) || 0, He) : "Currently unavailable" }),
4101
4102
  q && !Q && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4102
4103
  ] })
4103
4104
  ] }) });
4104
4105
  }, Br = ({
4105
4106
  showSubmit: u = !0
4106
4107
  }) => {
4107
- const h = {}, f = Fe.map((b) => qe(b.variant)).filter((b) => !!b && !h[b] && (h[b] = !0)), v = {}, T = Fe.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4108
+ const h = {}, f = Ee.map((b) => qe(b.variant)).filter((b) => !!b && !h[b] && (h[b] = !0)), v = {}, T = Ee.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4108
4109
  return /* @__PURE__ */ c("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4109
4110
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4110
4111
  f.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
@@ -4113,31 +4114,31 @@ const He = "USD", xn = (e) => {
4113
4114
  S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
4114
4115
  ] }),
4115
4116
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((b) => {
4116
- var Le;
4117
- const q = S === b, Q = F || R.current || null, ue = Q ? ot(Fe, b, Q) : ot(Fe, b, null), te = !!ue, ye = te && xn(ue.variant), oe = te && ye ? vr(ue.variant, He) || vr(ue.variant) : null, Ee = Fe.find(
4118
- (se) => qe(se.variant) === b
4119
- ), Oe = (Le = Ee == null ? void 0 : Ee.images) == null ? void 0 : Le[0];
4117
+ var Fe;
4118
+ const q = S === b, Q = F || R.current || null, oe = Q ? ot(Ee, b, Q) : ot(Ee, b, null), V = !!oe, le = V && xn(oe.variant), X = V && le ? vr(oe.variant, He) || vr(oe.variant) : null, xe = Ee.find(
4119
+ (ne) => qe(ne.variant) === b
4120
+ ), be = (Fe = xe == null ? void 0 : xe.images) == null ? void 0 : Fe[0];
4120
4121
  return /* @__PURE__ */ c(
4121
4122
  "div",
4122
4123
  {
4123
4124
  className: `flex flex-col items-center w-28 border rounded-md p-2
4124
4125
  ${q ? "border-2 border-tanya-light" : "border-gray-300"}
4125
- ${!te || !ye ? "opacity-60" : ""}`,
4126
+ ${!V || !le ? "opacity-60" : ""}`,
4126
4127
  children: [
4127
4128
  /* @__PURE__ */ a(
4128
4129
  "button",
4129
4130
  {
4130
4131
  onClick: () => {
4131
4132
  _(b);
4132
- const se = F || R.current || null, pe = se && ot(Fe, b, se) || ot(Fe, b, null);
4133
- pe && x(pe.index);
4133
+ const ne = F || R.current || null, ge = ne && ot(Ee, b, ne) || ot(Ee, b, null);
4134
+ ge && x(ge.index);
4134
4135
  },
4135
4136
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4136
4137
  title: b,
4137
- children: Oe ? /* @__PURE__ */ a(
4138
+ children: be ? /* @__PURE__ */ a(
4138
4139
  "img",
4139
4140
  {
4140
- src: Oe,
4141
+ src: be,
4141
4142
  alt: b,
4142
4143
  className: "w/full h-full object-contain"
4143
4144
  }
@@ -4145,13 +4146,13 @@ const He = "USD", xn = (e) => {
4145
4146
  }
4146
4147
  ),
4147
4148
  /* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
4148
- te && !ye && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
4149
- !te && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
4150
- te && ye && oe && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4151
- Ae(oe.cent / 100, oe.cur),
4152
- oe.regularCent && oe.regularCent > oe.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: Ae(
4153
- oe.regularCent / 100,
4154
- oe.cur
4149
+ V && !le && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "Out of stock" }),
4150
+ !V && /* @__PURE__ */ a("div", { className: "text-[11px] text-red-600 text-center", children: "any not offered" }),
4151
+ V && le && X && /* @__PURE__ */ c("div", { className: "text-xs text-gray-800 font-medium text-center", children: [
4152
+ je(X.cent / 100, X.cur),
4153
+ X.regularCent && X.regularCent > X.cent && /* @__PURE__ */ a("span", { className: "ml-1 line-through text-gray-500", children: je(
4154
+ X.regularCent / 100,
4155
+ X.cur
4155
4156
  ) })
4156
4157
  ] })
4157
4158
  ]
@@ -4170,7 +4171,7 @@ const He = "USD", xn = (e) => {
4170
4171
  {
4171
4172
  onClick: () => {
4172
4173
  N(b);
4173
- const Q = S && ot(Fe, S, b) || ot(Fe, void 0, b);
4174
+ const Q = S && ot(Ee, S, b) || ot(Ee, void 0, b);
4174
4175
  Q && x(Q.index);
4175
4176
  },
4176
4177
  className: `px-4 py-2 rounded-md border text-sm ${F === b ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
@@ -4195,7 +4196,7 @@ const He = "USD", xn = (e) => {
4195
4196
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4196
4197
  const f = (u == null ? void 0 : u.extractedDetails) || U;
4197
4198
  if (!f) return null;
4198
- const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), q = Number((f == null ? void 0 : f.max_price_minor) ?? 0), ue = Number.isFinite(q) && q > 0 ? +(q / 100) : +(b * v), te = (f == null ? void 0 : f.currency) || T || He, ye = w != null && w.sku ? w.sku : f.product_id;
4199
+ const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), q = Number((f == null ? void 0 : f.max_price_minor) ?? 0), oe = Number.isFinite(q) && q > 0 ? +(q / 100) : +(b * v), V = (f == null ? void 0 : f.currency) || T || He, le = w != null && w.sku ? w.sku : f.product_id;
4199
4200
  return /* @__PURE__ */ c(
4200
4201
  "div",
4201
4202
  {
@@ -4206,20 +4207,20 @@ const He = "USD", xn = (e) => {
4206
4207
  "p",
4207
4208
  {
4208
4209
  className: "text-base font-semibold text-center mt-2",
4209
- style: { color: De },
4210
+ style: { color: Le },
4210
4211
  children: "Here’s what I found from your instruction:"
4211
4212
  }
4212
4213
  ),
4213
4214
  /* @__PURE__ */ c("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4214
4215
  /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4215
4216
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4216
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: ye }),
4217
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: le }),
4217
4218
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4218
4219
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ct(f) }),
4219
4220
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4220
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: te }),
4221
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: V }),
4221
4222
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4222
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ae(ue, te) })
4223
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: je(oe, V) })
4223
4224
  ] }),
4224
4225
  /* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4225
4226
  qe(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
@@ -4236,12 +4237,12 @@ const He = "USD", xn = (e) => {
4236
4237
  ] })
4237
4238
  ] })
4238
4239
  ] }),
4239
- !h && /* @__PURE__ */ c(xe, { children: [
4240
+ !h && /* @__PURE__ */ c(ve, { children: [
4240
4241
  /* @__PURE__ */ c(
4241
4242
  "p",
4242
4243
  {
4243
4244
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
4244
- style: { color: De },
4245
+ style: { color: Le },
4245
4246
  children: [
4246
4247
  "Would you like me to ",
4247
4248
  /* @__PURE__ */ a("strong", { children: "lock this in" }),
@@ -4254,12 +4255,12 @@ const He = "USD", xn = (e) => {
4254
4255
  "button",
4255
4256
  {
4256
4257
  onClick: go,
4257
- disabled: le,
4258
- className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${le ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4258
+ disabled: de,
4259
+ className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${de ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4259
4260
  style: { background: `${I}` },
4260
4261
  children: [
4261
4262
  /* @__PURE__ */ a(
4262
- re,
4263
+ ae,
4263
4264
  {
4264
4265
  icon: "fluent:checkmark-circle-24-filled",
4265
4266
  className: "mr-2",
@@ -4275,12 +4276,12 @@ const He = "USD", xn = (e) => {
4275
4276
  "button",
4276
4277
  {
4277
4278
  onClick: Mr,
4278
- disabled: le,
4279
- className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${le ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4280
- style: { borderColor: I, color: De },
4279
+ disabled: de,
4280
+ className: `relative inline-flex items-center justify-center px-6 py-2.5 rounded-full font-semibold border transition-all duration-300 ${de ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
4281
+ style: { borderColor: I, color: Le },
4281
4282
  children: [
4282
4283
  /* @__PURE__ */ a(
4283
- re,
4284
+ ae,
4284
4285
  {
4285
4286
  icon: "fluent:dismiss-circle-24-filled",
4286
4287
  className: "mr-2",
@@ -4298,22 +4299,22 @@ const He = "USD", xn = (e) => {
4298
4299
  }
4299
4300
  );
4300
4301
  }, qr = (u, h = !0) => {
4301
- var gt, rt, Ue, ze, fe, nt;
4302
- const f = u || {}, v = ((gt = f == null ? void 0 : f.summary) == null ? void 0 : gt.currency) || (U == null ? void 0 : U.currency) || He, T = vn(r, w), b = kn(r), q = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (U == null ? void 0 : U.product_id), Q = (w == null ? void 0 : w.sku) ?? Nn(r), ue = qe(w) || qs(r), te = We(w) || Rs(r), ye = Ct(f), oe = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), Ee = ye > 0 ? +(oe / ye).toFixed(2) : 0, Oe = oe, Le = ((Ue = f == null ? void 0 : f.summary) == null ? void 0 : Ue.tax) ?? +(oe * 0.08).toFixed(2), se = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((fe = at[A]) == null ? void 0 : fe.fee) || 0), pe = f != null && f.address ? [
4302
+ var gt, rt, Ue, ze, me, nt;
4303
+ const f = u || {}, v = ((gt = f == null ? void 0 : f.summary) == null ? void 0 : gt.currency) || (U == null ? void 0 : U.currency) || He, T = vn(r, w), b = kn(r), q = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (U == null ? void 0 : U.product_id), Q = (w == null ? void 0 : w.sku) ?? Nn(r), oe = qe(w) || qs(r), V = We(w) || Rs(r), le = Ct(f), X = ((rt = f == null ? void 0 : f.summary) == null ? void 0 : rt.product_total) != null ? +f.summary.product_total : $r(f), xe = le > 0 ? +(X / le).toFixed(2) : 0, be = X, Fe = ((Ue = f == null ? void 0 : f.summary) == null ? void 0 : Ue.tax) ?? +(X * 0.08).toFixed(2), ne = ((ze = f == null ? void 0 : f.summary) == null ? void 0 : ze.shipping_fee) ?? (((me = at[A]) == null ? void 0 : me.fee) || 0), ge = f != null && f.address ? [
4303
4304
  f.address.addressLine1,
4304
4305
  f.address.addressLine2,
4305
4306
  f.address.street,
4306
4307
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4307
4308
  f.address.country
4308
- ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(xe, { children: [
4309
+ ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(ve, { children: [
4309
4310
  "Credit Card — Mastercard",
4310
4311
  /* @__PURE__ */ a("br", {}),
4311
4312
  "•••• 7820 Exp: 12/26"
4312
- ] }) : /* @__PURE__ */ a(xe, { children: Ke(Je) });
4313
+ ] }) : /* @__PURE__ */ a(ve, { children: Ke(Je) });
4313
4314
  return /* @__PURE__ */ c("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4314
4315
  /* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ c("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
4315
4316
  /* @__PURE__ */ a(
4316
- re,
4317
+ ae,
4317
4318
  {
4318
4319
  icon: "mdi:receipt-text-check-outline",
4319
4320
  width: "24",
@@ -4331,7 +4332,7 @@ const He = "USD", xn = (e) => {
4331
4332
  className: "w-full h-full object-contain"
4332
4333
  }
4333
4334
  ) : /* @__PURE__ */ a(
4334
- re,
4335
+ ae,
4335
4336
  {
4336
4337
  icon: "mdi:image-outline",
4337
4338
  width: "24",
@@ -4346,38 +4347,38 @@ const He = "USD", xn = (e) => {
4346
4347
  " ",
4347
4348
  q ?? "—"
4348
4349
  ] }),
4349
- (Q || ue || te) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4350
- Q && /* @__PURE__ */ c(xe, { children: [
4350
+ (Q || oe || V) && /* @__PURE__ */ c("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4351
+ Q && /* @__PURE__ */ c(ve, { children: [
4351
4352
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4352
4353
  " ",
4353
4354
  Q,
4354
4355
  "  "
4355
4356
  ] }),
4356
- ue && /* @__PURE__ */ c(xe, { children: [
4357
+ oe && /* @__PURE__ */ c(ve, { children: [
4357
4358
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
4358
4359
  " ",
4359
- ue,
4360
+ oe,
4360
4361
  "  "
4361
4362
  ] }),
4362
- te && /* @__PURE__ */ c(xe, { children: [
4363
+ V && /* @__PURE__ */ c(ve, { children: [
4363
4364
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4364
4365
  " ",
4365
- te
4366
+ V
4366
4367
  ] })
4367
4368
  ] })
4368
4369
  ] }),
4369
4370
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4370
4371
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4371
4372
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4372
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Ee, v) })
4373
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(xe, v) })
4373
4374
  ] }),
4374
4375
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4375
4376
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4376
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ye })
4377
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: le })
4377
4378
  ] }),
4378
4379
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4379
4380
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4380
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Oe, v) })
4381
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(be, v) })
4381
4382
  ] })
4382
4383
  ] })
4383
4384
  ] })
@@ -4386,7 +4387,7 @@ const He = "USD", xn = (e) => {
4386
4387
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4387
4388
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4388
4389
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
4389
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: pe })
4390
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ge })
4390
4391
  ] }),
4391
4392
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4392
4393
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
@@ -4400,15 +4401,15 @@ const He = "USD", xn = (e) => {
4400
4401
  /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4401
4402
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4402
4403
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4403
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(oe, v) })
4404
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(X, v) })
4404
4405
  ] }),
4405
4406
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4406
4407
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4407
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(Le, v) })
4408
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(Fe, v) })
4408
4409
  ] }),
4409
4410
  /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4410
4411
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4411
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(se, v) })
4412
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(ne, v) })
4412
4413
  ] })
4413
4414
  ] }),
4414
4415
  /* @__PURE__ */ c(
@@ -4418,14 +4419,14 @@ const He = "USD", xn = (e) => {
4418
4419
  style: { background: tt },
4419
4420
  children: [
4420
4421
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4421
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: Ae(oe + Le + se, v) })
4422
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: je(X + Fe + ne, v) })
4422
4423
  ]
4423
4424
  }
4424
4425
  )
4425
4426
  ] }),
4426
4427
  !h && /* @__PURE__ */ c("div", { className: "px-6 pb-5", children: [
4427
4428
  !k && /* @__PURE__ */ a("p", { className: "mt-3 text-center text-sm text-gray-700", children: "Everything looks good! Do you want me to watch this product and buy it automatically when it meets your condition?" }),
4428
- k && Ar({ intentMandateId: W }),
4429
+ k && Ar({ intentMandateId: G }),
4429
4430
  er && !k && /* @__PURE__ */ c("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4430
4431
  /* @__PURE__ */ a(
4431
4432
  "button",
@@ -4464,7 +4465,7 @@ const He = "USD", xn = (e) => {
4464
4465
  style: { backgroundColor: "var(--tanya-light)" },
4465
4466
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4466
4467
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-2", children: [
4467
- /* @__PURE__ */ a(re, { icon: "mdi:home-map-marker", width: "20", color: I }),
4468
+ /* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: I }),
4468
4469
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4469
4470
  ] }),
4470
4471
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
@@ -4480,12 +4481,12 @@ const He = "USD", xn = (e) => {
4480
4481
  style: { backgroundColor: "var(--tanya-light)" },
4481
4482
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4482
4483
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4483
- /* @__PURE__ */ a(re, { icon: "mdi:truck-delivery", width: "20", color: I }),
4484
+ /* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: I }),
4484
4485
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4485
4486
  ] }),
4486
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(xe, { children: [
4487
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(ve, { children: [
4487
4488
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4488
- /* @__PURE__ */ a(re, { icon: f.icon, width: "18" }),
4489
+ /* @__PURE__ */ a(ae, { icon: f.icon, width: "18" }),
4489
4490
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4490
4491
  ] }),
4491
4492
  /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
@@ -4503,7 +4504,7 @@ const He = "USD", xn = (e) => {
4503
4504
  children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4504
4505
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4505
4506
  /* @__PURE__ */ a(
4506
- re,
4507
+ ae,
4507
4508
  {
4508
4509
  icon: "mdi:credit-card-outline",
4509
4510
  width: "20",
@@ -4512,7 +4513,7 @@ const He = "USD", xn = (e) => {
4512
4513
  ),
4513
4514
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4514
4515
  ] }),
4515
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(xe, { children: [
4516
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(ve, { children: [
4516
4517
  "Credit Card — Mastercard",
4517
4518
  /* @__PURE__ */ a("br", {}),
4518
4519
  "•••• 7820   Exp: 12/26"
@@ -4522,7 +4523,7 @@ const He = "USD", xn = (e) => {
4522
4523
  );
4523
4524
  }, Po = (u, h) => {
4524
4525
  const f = u.snapshotStage;
4525
- if (!f || f === "address" && le || f === "delivery" && Y || f === "payment" && X || f === "final" && Ne)
4526
+ if (!f || f === "address" && de || f === "delivery" && J || f === "payment" && ee || f === "final" && _e)
4526
4527
  return null;
4527
4528
  switch (f) {
4528
4529
  case "initial":
@@ -4581,7 +4582,7 @@ const He = "USD", xn = (e) => {
4581
4582
  gap: "0.5rem"
4582
4583
  },
4583
4584
  children: [
4584
- /* @__PURE__ */ a(re, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4585
+ /* @__PURE__ */ a(ae, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4585
4586
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "font-bold", children: "Agentic Shopping with TANYA" }) })
4586
4587
  ]
4587
4588
  }
@@ -4596,7 +4597,7 @@ const He = "USD", xn = (e) => {
4596
4597
  margin: "0.75rem"
4597
4598
  },
4598
4599
  children: /* @__PURE__ */ a(
4599
- re,
4600
+ ae,
4600
4601
  {
4601
4602
  icon: "fluent:dismiss-24-filled",
4602
4603
  color: "#ffffff",
@@ -4621,7 +4622,7 @@ const He = "USD", xn = (e) => {
4621
4622
  "div",
4622
4623
  {
4623
4624
  className: "text-sm text-[16px] rounded-r-xl p-3 m-3 rounded-bl-xl w-3/4 text-tanya-contrast",
4624
- style: { backgroundColor: "#804c9e" },
4625
+ style: { backgroundColor: "#e5dbeb" },
4625
4626
  children: [
4626
4627
  "Welcome to your smart shopping companion!",
4627
4628
  /* @__PURE__ */ c("p", { children: [
@@ -4695,8 +4696,8 @@ const He = "USD", xn = (e) => {
4695
4696
  )
4696
4697
  ] })
4697
4698
  ] }),
4698
- f && we && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4699
- f && G && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4699
+ f && ye && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4700
+ f && Z && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4700
4701
  "div",
4701
4702
  {
4702
4703
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4707,7 +4708,7 @@ const He = "USD", xn = (e) => {
4707
4708
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2 tanya-pulse-text", children: /* @__PURE__ */ a("p", { children: "Reading your instruction and setting things up…" }) })
4708
4709
  }
4709
4710
  ) }),
4710
- (v || u.response === "__CARD__") && (!G || !f) && /* @__PURE__ */ a(
4711
+ (v || u.response === "__CARD__") && (!Z || !f) && /* @__PURE__ */ a(
4711
4712
  "div",
4712
4713
  {
4713
4714
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4725,11 +4726,11 @@ const He = "USD", xn = (e) => {
4725
4726
  )
4726
4727
  ] }, h);
4727
4728
  }),
4728
- le && /* @__PURE__ */ c("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4729
+ de && /* @__PURE__ */ c("div", { className: "mt-6 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4729
4730
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4730
4731
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4731
4732
  /* @__PURE__ */ a(
4732
- re,
4733
+ ae,
4733
4734
  {
4734
4735
  icon: "mdi:home-map-marker",
4735
4736
  width: "24",
@@ -4738,7 +4739,7 @@ const He = "USD", xn = (e) => {
4738
4739
  ),
4739
4740
  "Select a Delivery Address"
4740
4741
  ] }),
4741
- j && /* @__PURE__ */ c(xe, { children: [
4742
+ j && /* @__PURE__ */ c(ve, { children: [
4742
4743
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4743
4744
  !k && /* @__PURE__ */ a(
4744
4745
  "button",
@@ -4771,7 +4772,7 @@ const He = "USD", xn = (e) => {
4771
4772
  className: `space-y-3 ${j ? "opacity-70" : ""}`,
4772
4773
  children: [
4773
4774
  Ze.map((u) => {
4774
- const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((Q) => Ke(Q || "")).join(" "), f = Ke(u.city || ""), v = `${Ke(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, T = Ke(u.country || ""), b = String(u.addressId ?? u.id), q = Ie === b;
4775
+ const h = [u.addressLine1, u.addressLine2].filter(Boolean).map((Q) => Ke(Q || "")).join(" "), f = Ke(u.city || ""), v = `${Ke(u.state || "")}${u.state && u.postalCode ? ", " : ""}${u.postalCode || ""}`, T = Ke(u.country || ""), b = String(u.addressId ?? u.id), q = Te === b;
4775
4776
  return /* @__PURE__ */ c(
4776
4777
  "label",
4777
4778
  {
@@ -4833,11 +4834,11 @@ const He = "USD", xn = (e) => {
4833
4834
  }
4834
4835
  ) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
4835
4836
  ] }),
4836
- Y && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4837
+ J && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4837
4838
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4838
4839
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4839
4840
  /* @__PURE__ */ a(
4840
- re,
4841
+ ae,
4841
4842
  {
4842
4843
  icon: "mdi:truck-delivery",
4843
4844
  width: "24",
@@ -4846,7 +4847,7 @@ const He = "USD", xn = (e) => {
4846
4847
  ),
4847
4848
  "Great! Now choose how fast you want it delivered 🚚"
4848
4849
  ] }),
4849
- B && /* @__PURE__ */ c(xe, { children: [
4850
+ B && /* @__PURE__ */ c(ve, { children: [
4850
4851
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4851
4852
  !k && /* @__PURE__ */ a(
4852
4853
  "button",
@@ -4885,18 +4886,18 @@ const He = "USD", xn = (e) => {
4885
4886
  className: "mt-1 accent-tanya-light",
4886
4887
  checked: f,
4887
4888
  disabled: B,
4888
- onChange: () => ce(u)
4889
+ onChange: () => ue(u)
4889
4890
  }
4890
4891
  ),
4891
4892
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
4892
4893
  /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4893
- /* @__PURE__ */ a(re, { icon: h.icon, width: "18" }),
4894
+ /* @__PURE__ */ a(ae, { icon: h.icon, width: "18" }),
4894
4895
  " ",
4895
4896
  h.label
4896
4897
  ] }),
4897
4898
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: h.subtitle })
4898
4899
  ] }),
4899
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : Ae(
4900
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : je(
4900
4901
  h.fee,
4901
4902
  (U == null ? void 0 : U.currency) || He
4902
4903
  ) })
@@ -4933,11 +4934,11 @@ const He = "USD", xn = (e) => {
4933
4934
  )
4934
4935
  ] })
4935
4936
  ] }),
4936
- X && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4937
+ ee && /* @__PURE__ */ c("div", { className: "mt-2 mb-6 mx-6 rounded-xl p-6 shadow-md border border-gray-200 bg-white animate-fade-in", children: [
4937
4938
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4938
4939
  /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4939
4940
  /* @__PURE__ */ a(
4940
- re,
4941
+ ae,
4941
4942
  {
4942
4943
  icon: "mdi:credit-card-outline",
4943
4944
  width: "24",
@@ -4946,7 +4947,7 @@ const He = "USD", xn = (e) => {
4946
4947
  ),
4947
4948
  "Almost done! 💳"
4948
4949
  ] }),
4949
- Z && /* @__PURE__ */ c(xe, { children: [
4950
+ te && /* @__PURE__ */ c(ve, { children: [
4950
4951
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4951
4952
  !k && /* @__PURE__ */ a(
4952
4953
  "button",
@@ -4967,12 +4968,12 @@ const He = "USD", xn = (e) => {
4967
4968
  /* @__PURE__ */ a(
4968
4969
  "div",
4969
4970
  {
4970
- className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4971
+ className: `space-y-3 ${te ? "opacity-70" : ""}`,
4971
4972
  children: /* @__PURE__ */ c(
4972
4973
  "label",
4973
4974
  {
4974
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${ke === "card" ? "border-tanya-light" : "border-gray-300"} ${Z ? "pointer-events-none" : ""}`,
4975
- title: Z ? "Payment already submitted" : "",
4975
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${Ne === "card" ? "border-tanya-light" : "border-gray-300"} ${te ? "pointer-events-none" : ""}`,
4976
+ title: te ? "Payment already submitted" : "",
4976
4977
  children: [
4977
4978
  /* @__PURE__ */ a(
4978
4979
  "input",
@@ -4980,18 +4981,18 @@ const He = "USD", xn = (e) => {
4980
4981
  type: "radio",
4981
4982
  name: "payment",
4982
4983
  className: "mt-1 accent-tanya-light",
4983
- checked: ke === "card",
4984
- disabled: Z,
4985
- onChange: () => Se("card")
4984
+ checked: Ne === "card",
4985
+ disabled: te,
4986
+ onChange: () => Ce("card")
4986
4987
  }
4987
4988
  ),
4988
4989
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
4989
4990
  /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4990
- /* @__PURE__ */ a(re, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4991
+ /* @__PURE__ */ a(ae, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4991
4992
  " ",
4992
4993
  "Credit Card"
4993
4994
  ] }),
4994
- ke === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4995
+ Ne === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4995
4996
  "Mastercard    •••• 7820",
4996
4997
  /* @__PURE__ */ a("br", {}),
4997
4998
  "Expiry: 12/26"
@@ -5019,15 +5020,15 @@ const He = "USD", xn = (e) => {
5019
5020
  "button",
5020
5021
  {
5021
5022
  onClick: vo,
5022
- disabled: Z,
5023
- className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${Z ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5023
+ disabled: te,
5024
+ className: `px-6 py-2.5 rounded-full font-semibold text-white shadow-md transition-all duration-300 ${te ? "opacity-60 cursor-not-allowed" : "hover:-translate-y-0.5 hover:shadow-lg"}`,
5024
5025
  style: { background: "var(--tanya)" },
5025
- children: Z ? "Payment Submitted" : "Submit Payment Method"
5026
+ children: te ? "Payment Submitted" : "Submit Payment Method"
5026
5027
  }
5027
5028
  )
5028
5029
  ] })
5029
5030
  ] }),
5030
- Ne && qr(
5031
+ _e && qr(
5031
5032
  {
5032
5033
  ...U,
5033
5034
  address: JSON.parse(
@@ -5050,29 +5051,29 @@ const He = "USD", xn = (e) => {
5050
5051
  disabled: fo,
5051
5052
  className: `w-full rounded-full p-4 outline-none border-none focus:ring-0 focus:border-transparent disabled:bg-gray-100 disabled:cursor-not-allowed
5052
5053
  ${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
5053
- value: $e,
5054
+ value: De,
5054
5055
  onKeyDown: (u) => {
5055
- u.key === "Enter" && !G && !L && Lr();
5056
+ u.key === "Enter" && !Z && !L && Lr();
5056
5057
  },
5057
- onChange: (u) => he(u.target.value)
5058
+ onChange: (u) => pe(u.target.value)
5058
5059
  }
5059
5060
  ),
5060
5061
  /* @__PURE__ */ a(
5061
5062
  "button",
5062
5063
  {
5063
5064
  type: "submit",
5064
- disabled: G || L,
5065
+ disabled: Z || L,
5065
5066
  className: "mr-6 font-medium",
5066
5067
  style: { color: "var(--tanya-light)" },
5067
5068
  onClick: () => Lr(),
5068
- children: G ? /* @__PURE__ */ a(
5069
+ children: Z ? /* @__PURE__ */ a(
5069
5070
  "div",
5070
5071
  {
5071
5072
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
5072
5073
  style: { borderBottom: "2px solid" }
5073
5074
  }
5074
5075
  ) : /* @__PURE__ */ a(
5075
- re,
5076
+ ae,
5076
5077
  {
5077
5078
  icon: "fluent:send-48-filled",
5078
5079
  color: "var(--tanya-light)",