tanya-chatbot 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
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";
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 d, Fragment as xe } 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 we from "axios";
9
+ import ge 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 ke(() => {
16
+ return be(() => {
17
17
  if (typeof document < "u") {
18
18
  const e = document.createElement("style");
19
19
  return e.textContent = Mo, document.head.appendChild(e), () => {
@@ -101,17 +101,17 @@ 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 we.post(
104
+ const t = await ge.post(
105
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 we.isAxiosError(t) ? console.error("Error fetching token:", t.response || t.message) : console.error("Unexpected error:", t), null;
109
+ return ge.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 we.post(
114
+ const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, n = await ge.post(
115
115
  `${t}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
116
116
  {},
117
117
  {
@@ -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 we.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
+ return ge.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() {
@@ -166,7 +166,7 @@ const ur = async (e, t) => {
166
166
  }
167
167
  try {
168
168
  const o = Qe();
169
- return (await we.get(
169
+ return (await ge.get(
170
170
  `${t}${r}/search-sfcc?baseUrl=${o}&query=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
171
171
  {
172
172
  headers: {
@@ -183,7 +183,7 @@ const ur = async (e, t) => {
183
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 we.get(
186
+ return (await ge.get(
187
187
  `${t}${r}/product-sfcc/${e}?baseUrl=${n}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
188
188
  {
189
189
  headers: {
@@ -197,7 +197,7 @@ 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 we.get(
200
+ return (await ge.get(
201
201
  `${n}${o}/get-interest?baseUrl=${Qe()}&customerId=${e}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
202
202
  {
203
203
  headers: {
@@ -224,7 +224,7 @@ const ur = async (e, t) => {
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 ke(() => {
227
+ return be(() => {
228
228
  const n = () => r(e());
229
229
  return window.addEventListener("resize", n), () => window.removeEventListener("resize", n);
230
230
  }, []), t;
@@ -240,11 +240,11 @@ const Zo = ({
240
240
  o(
241
241
  (l) => l - r < 0 ? e.length - (e.length % r || r) : l - r
242
242
  );
243
- }, d = async (l) => {
244
- const g = await jn(l);
245
- t(dr(g));
243
+ }, c = async (l) => {
244
+ const h = await jn(l);
245
+ t(dr(h));
246
246
  };
247
- return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ c("div", { className: "flex items-center justify-center gap-4 relative", children: [
247
+ return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-4 relative", children: [
248
248
  (e == null ? void 0 : e.length) > r && /* @__PURE__ */ a(
249
249
  "button",
250
250
  {
@@ -259,32 +259,32 @@ const Zo = ({
259
259
  }
260
260
  ),
261
261
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: e.slice(n, n + r).map((l) => {
262
- var g, p, y, x;
263
- return /* @__PURE__ */ c(
262
+ var h, g, y, x;
263
+ return /* @__PURE__ */ d(
264
264
  "div",
265
265
  {
266
266
  className: "flex-shrink-0 flex flex-col w-[150px] h-[200px] p-2 items-center justify-between cursor-pointer bg-[#FFFFFF] rounded-[10px] shadow-[0px_2px_2px_0px_#9292BC40]",
267
267
  onClick: () => {
268
- d(l.product_id ?? l.productId);
268
+ c(l.product_id ?? l.productId);
269
269
  },
270
270
  children: [
271
271
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
272
272
  "img",
273
273
  {
274
- src: ((g = Vr(l)[0]) == null ? void 0 : g.link) || Vr(l)[0] || // fallback if it's a string
274
+ src: ((h = Vr(l)[0]) == null ? void 0 : h.link) || Vr(l)[0] || // fallback if it's a string
275
275
  "https://via.placeholder.com/120",
276
276
  alt: l != null && l.productName ? l.productName : "Product",
277
277
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
278
278
  }
279
279
  ) }),
280
- /* @__PURE__ */ c(
280
+ /* @__PURE__ */ d(
281
281
  "div",
282
282
  {
283
283
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
284
284
  children: [
285
- /* @__PURE__ */ c("div", { className: "relative inline-block group", children: [
285
+ /* @__PURE__ */ d("div", { className: "relative inline-block group", children: [
286
286
  /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: l != null && l.productName ? l.productName : l != null && l.product_name ? l.product_name : Jr(
287
- Hr((p = l == null ? void 0 : l.name) == null ? void 0 : p["en-US"]),
287
+ Hr((g = l == null ? void 0 : l.name) == null ? void 0 : g["en-US"]),
288
288
  60
289
289
  ) || "Product" }),
290
290
  /* @__PURE__ */ a(
@@ -305,12 +305,12 @@ const Zo = ({
305
305
  }
306
306
  )
307
307
  ] }),
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: [
308
+ /* @__PURE__ */ d("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
309
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
  ) }),
313
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
313
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
314
314
  "$",
315
315
  Number(l == null ? void 0 : l.price).toFixed(2) ?? 5
316
316
  ] })
@@ -337,7 +337,7 @@ const Zo = ({
337
337
  }
338
338
  )
339
339
  ] }) });
340
- }, ea = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((r, n) => /* @__PURE__ */ c(
340
+ }, ea = ({ chat: e, storeDetails: t }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: e.map((r, n) => /* @__PURE__ */ d(
341
341
  "div",
342
342
  {
343
343
  className: "mb-4 p-3 rounded-xl",
@@ -367,7 +367,7 @@ const Zo = ({
367
367
  var s, i;
368
368
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
369
369
  try {
370
- const d = await we.post(
370
+ const c = await ge.post(
371
371
  `${o}${n}/basket/create?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
372
372
  t,
373
373
  {
@@ -380,17 +380,17 @@ const Zo = ({
380
380
  return window.postMessage(
381
381
  {
382
382
  type: "WIDGET_CREATED_BASKET",
383
- basketId: ((s = d.data) == null ? void 0 : s.basket_id) || ((i = d.data) == null ? void 0 : i.basketId)
383
+ basketId: ((s = c.data) == null ? void 0 : s.basket_id) || ((i = c.data) == null ? void 0 : i.basketId)
384
384
  },
385
385
  "*"
386
- ), d.data;
387
- } catch (d) {
388
- return we.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
386
+ ), c.data;
387
+ } catch (c) {
388
+ return ge.isAxiosError(c) ? console.error("Error creating basket:", c.response || c.message) : console.error("Unexpected error:", c), 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 we.post(
393
+ const i = await ge.post(
394
394
  `${s}${o}/basket/add-product/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
395
395
  t,
396
396
  {
@@ -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 we.isAxiosError(i) ? console.error(
405
+ return ge.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,7 +414,7 @@ const Zo = ({
414
414
  var s;
415
415
  const { serverUrl: r, basePath: n } = lt(), o = `${r}`;
416
416
  try {
417
- const i = await we.get(
417
+ const i = await ge.get(
418
418
  `${o}${n}/basket/${e}?baseUrl=${Qe()}&siteId=${Ve()}&pubCfg=${ct()}&envRef=${dt()}&orgRef=${ut()}`,
419
419
  {
420
420
  headers: {
@@ -425,7 +425,7 @@ const Zo = ({
425
425
  );
426
426
  return { status: i.status, data: i.data };
427
427
  } catch (i) {
428
- return we.isAxiosError(i) ? { status: (s = i.response) == null ? void 0 : s.status, data: null } : { status: null, data: null };
428
+ return ge.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) => {
@@ -446,13 +446,13 @@ const it = (e) => {
446
446
  console.error("Error storing token:", t);
447
447
  }
448
448
  }, Wr = 300, ra = ({ addToCartPwa: e }) => {
449
- var l, g, p, y, x, S;
449
+ var l, h, g, y, x, S;
450
450
  const t = In(), r = Yt((_) => _.product.product), n = Yt((_) => _.store.store), [o, s] = C(!!r);
451
- if (ke(() => {
451
+ if (be(() => {
452
452
  s(!!r);
453
453
  }, [r]), !r) return null;
454
454
  const i = async () => {
455
- var _, F, N, P, R, w, Y, $e, E, H, ye, ie, Z, Oe, De, pe;
455
+ var _, F, N, P, R, w, V, je, E, H, we, ae, Q, Pe, $e, 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,33 +468,33 @@ 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), Se = Date.now();
472
- if (!Xe || !Ye || Se >= parseInt(Ye)) {
473
- let Pe = "";
474
- if (Pe = "Bearer " + (await vt()).access_token, !Pe) {
471
+ ), q = (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) {
475
475
  console.error("Failed to get customer_token");
476
476
  return;
477
477
  }
478
- const ft = Se + 300 * 1e3;
479
- if (Wt(Pe), localStorage.setItem(Et, ft.toString()), U) {
480
- const Ae = await Dn({
481
- basketId: U,
482
- customer_token: Pe
478
+ const ft = ve + 300 * 1e3;
479
+ if (Wt(_e), localStorage.setItem(Et, ft.toString()), q) {
480
+ const Te = await Dn({
481
+ basketId: q,
482
+ customer_token: _e
483
483
  });
484
- if (Ae.status === 200 && Ae) {
485
- const Te = await fr(
486
- U,
484
+ if (Te.status === 200 && Te) {
485
+ const Ie = await fr(
486
+ q,
487
487
  L,
488
- Pe
488
+ _e
489
489
  );
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", {
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", {
491
491
  position: "bottom-right",
492
492
  autoClose: 3e3,
493
493
  hideProgressBar: !1,
494
494
  closeOnClick: !0,
495
495
  pauseOnHover: !0,
496
496
  draggable: !0
497
- }), Jt(U));
497
+ }), Jt(q));
498
498
  return;
499
499
  }
500
500
  }
@@ -505,7 +505,7 @@ const it = (e) => {
505
505
  quantity: 1
506
506
  }
507
507
  ]
508
- }, M = await $n(Pe, Ze);
508
+ }, M = await $n(_e, 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 de = await fr(
516
+ const le = await fr(
517
517
  (M == null ? void 0 : M.basket_id) || (M == null ? void 0 : M.basketId),
518
518
  L,
519
- Pe
519
+ _e
520
520
  );
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", {
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", {
522
522
  position: "bottom-right",
523
523
  autoClose: 3e3,
524
524
  hideProgressBar: !1,
@@ -531,18 +531,18 @@ 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
- }), ((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", {
534
+ }), ((Q = L == null ? void 0 : L.response) == null ? void 0 : Q.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), ((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
  }));
539
539
  }
540
- }, d = () => {
540
+ }, c = () => {
541
541
  if (!r) return;
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(ve, { children: [
545
+ return console.log(r, "the prod"), /* @__PURE__ */ d(xe, { children: [
546
546
  /* @__PURE__ */ a(
547
547
  "div",
548
548
  {
@@ -552,7 +552,7 @@ const it = (e) => {
552
552
  }
553
553
  }
554
554
  ),
555
- /* @__PURE__ */ c(
555
+ /* @__PURE__ */ d(
556
556
  "div",
557
557
  {
558
558
  className: `
@@ -563,7 +563,7 @@ const it = (e) => {
563
563
  style: { willChange: "transform, opacity" },
564
564
  onClick: (_) => _.stopPropagation(),
565
565
  children: [
566
- /* @__PURE__ */ c("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
566
+ /* @__PURE__ */ d("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
567
567
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: r.name }) }),
568
568
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
569
569
  "div",
@@ -579,11 +579,11 @@ const it = (e) => {
579
579
  }
580
580
  ) })
581
581
  ] }),
582
- /* @__PURE__ */ c("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
582
+ /* @__PURE__ */ d("div", { className: "flex flex-row gap-2 items-center flex-wrap", children: [
583
583
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
584
584
  "img",
585
585
  {
586
- src: (y = (p = (g = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : g.images) == null ? void 0 : p[0]) == null ? void 0 : y.link,
586
+ src: (y = (g = (h = (l = r.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : h.images) == null ? void 0 : g[0]) == null ? void 0 : y.link,
587
587
  alt: r.name,
588
588
  className: "rounded-[10px]"
589
589
  }
@@ -600,15 +600,15 @@ const it = (e) => {
600
600
  ))
601
601
  ) })
602
602
  ] }),
603
- /* @__PURE__ */ c("div", { className: "flex flex-row items-center justify-between w-full", children: [
604
- /* @__PURE__ */ c("div", { className: "flex flex-row items-center gap-2", children: [
605
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
603
+ /* @__PURE__ */ d("div", { className: "flex flex-row items-center justify-between w-full", children: [
604
+ /* @__PURE__ */ d("div", { className: "flex flex-row items-center gap-2", children: [
605
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-bold font-nunitoSans", children: [
606
606
  " ",
607
607
  "$",
608
608
  r.price.toFixed(2)
609
609
  ] }),
610
610
  " ",
611
- /* @__PURE__ */ c("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
611
+ /* @__PURE__ */ d("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans", children: [
612
612
  " ",
613
613
  "$",
614
614
  (r.price + 5).toFixed(2)
@@ -617,7 +617,7 @@ const it = (e) => {
617
617
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#EC5050] font-bold font-nunitoSans", children: r.discount }) })
618
618
  ] }),
619
619
  /* @__PURE__ */ a("div", { className: "mt-2 w-full border-t-2 border-gray-200" }),
620
- /* @__PURE__ */ c("div", { className: "w-full text-left", children: [
620
+ /* @__PURE__ */ d("div", { className: "w-full text-left", children: [
621
621
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-bold font-nunitoSans mt-3 text-[14px]", children: "Product Details" }),
622
622
  /* @__PURE__ */ a(
623
623
  "div",
@@ -629,16 +629,16 @@ const it = (e) => {
629
629
  }
630
630
  )
631
631
  ] }),
632
- /* @__PURE__ */ c("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
633
- /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
634
- /* @__PURE__ */ c("div", { className: "text-[#323135] font-bold", children: [
632
+ /* @__PURE__ */ d("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
633
+ /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
634
+ /* @__PURE__ */ d("div", { className: "text-[#323135] font-bold", children: [
635
635
  ((x = r == null ? void 0 : r.rating) == null ? void 0 : x.rate) || 0,
636
636
  " /",
637
637
  " ",
638
638
  /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
639
639
  ] }),
640
640
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
641
- /* @__PURE__ */ c("div", { className: "text-[#68656E] font-semibold text-sm", children: [
641
+ /* @__PURE__ */ d("div", { className: "text-[#68656E] font-semibold text-sm", children: [
642
642
  ((S = r == null ? void 0 : r.rating) == null ? void 0 : S.count) || 0,
643
643
  " ratings"
644
644
  ] })
@@ -659,7 +659,7 @@ const it = (e) => {
659
659
  );
660
660
  }) })
661
661
  ] }),
662
- /* @__PURE__ */ c(
662
+ /* @__PURE__ */ d(
663
663
  "div",
664
664
  {
665
665
  className: "flex flex-col items-center justify-between font-nunitoSans font-semibold w-5/6 text-black gap-2",
@@ -679,7 +679,7 @@ const it = (e) => {
679
679
  {
680
680
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
681
681
  style: { backgroundColor: n.tanyaThemeColor },
682
- onClick: d,
682
+ onClick: c,
683
683
  children: "View more"
684
684
  }
685
685
  )
@@ -709,15 +709,15 @@ const it = (e) => {
709
709
  "Niece/Nephew": "his/her niece/nephew",
710
710
  "My Friends": "his/her friends",
711
711
  Others: "others"
712
- }, s = Re(null), i = Re(null), d = Re(null), l = Re(null), [g, p] = C(null);
712
+ }, s = Re(null), i = Re(null), c = Re(null), l = Re(null), [h, g] = C(null);
713
713
  Re(null);
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) => ({
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, Q] = C(""), Pe = (m) => ({
715
715
  id: m.id,
716
716
  title: m.name,
717
717
  image: m.image ?? "",
718
718
  price: m.price ?? 0
719
- }), [De, pe] = C([]), L = Re(null), O = Yt((m) => m.store.store), U = Yt((m) => m.product.product);
720
- ke(() => {
719
+ }), [$e, pe] = C([]), L = Re(null), O = Yt((m) => m.store.store), q = Yt((m) => m.product.product);
720
+ be(() => {
721
721
  const m = localStorage.getItem(
722
722
  `access_token_${e.siteId}`
723
723
  ), j = localStorage.getItem(
@@ -731,41 +731,41 @@ const it = (e) => {
731
731
  `chat-token-${e.siteId}`,
732
732
  m || ""
733
733
  );
734
- }, []), ke(() => {
735
- localStorage.setItem("chatHistory", JSON.stringify(De));
734
+ }, []), be(() => {
735
+ localStorage.setItem("chatHistory", JSON.stringify($e));
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
- }, [De]);
740
+ }, [$e]);
741
741
  const Xe = () => {
742
742
  N(!0), setTimeout(() => _(!0), 10);
743
743
  }, Ye = () => {
744
744
  _(!1), setTimeout(() => N(!1), 300);
745
745
  };
746
- ke(() => {
746
+ be(() => {
747
747
  y ? Xe() : Ye();
748
748
  }, [y]);
749
- const Se = (m) => {
750
- Z(o[m]);
749
+ const ve = (m) => {
750
+ Q(o[m]);
751
751
  };
752
- ke(() => {
752
+ be(() => {
753
753
  F && L.current && L.current.scrollTo({
754
754
  top: L.current.scrollHeight,
755
755
  behavior: "smooth"
756
756
  });
757
- }, [De, F]);
758
- const Pe = null, ft = null, Ze = async () => {
757
+ }, [$e, F]);
758
+ const _e = null, ft = null, Ze = async () => {
759
759
  const m = await vt();
760
- m != null && p(m);
760
+ m != null && g(m);
761
761
  };
762
- ke(() => {
762
+ be(() => {
763
763
  if (e != null && e.siteId) {
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", $);
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", $);
766
766
  }
767
767
  Ze(), console.log("scapi environment v1");
768
- }, []), ke(() => {
768
+ }, []), be(() => {
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
- }, de = async (m, j) => {
776
+ }, le = 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
781
  pe(
782
- (te) => te.map(
783
- (W, _e) => _e === te.length - 1 ? { ...W, secondaryLoading: !0 } : W
782
+ (Z) => Z.map(
783
+ (W, Ne) => Ne === Z.length - 1 ? { ...W, secondaryLoading: !0 } : W
784
784
  )
785
785
  );
786
- const J = await ur(Pe, ft);
787
- if (!J) throw new Error("Failed to fetch token");
786
+ const Y = await ur(_e, ft);
787
+ if (!Y) 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
- }), ee = await fetch(B, {
800
+ }), X = 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 ${J}`
805
+ Authorization: `Bearer ${Y}`
806
806
  },
807
807
  body: D
808
808
  });
809
- if (!ee.body) throw new Error("Readable stream not supported");
810
- const se = ee.body.getReader(), Ne = new TextDecoder();
811
- let Ce = "";
809
+ if (!X.body) throw new Error("Readable stream not supported");
810
+ const ne = X.body.getReader(), ke = new TextDecoder();
811
+ let Se = "";
812
812
  for (; ; ) {
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(`
813
+ const { done: Z, value: W } = await ne.read();
814
+ if (Z) break;
815
+ Se += ke.decode(W, { stream: !0 });
816
+ const Ne = Se.split(`
817
817
  `);
818
- Ce = _e.pop() || "";
819
- for (const re of _e)
820
- if (re.startsWith("data:")) {
821
- const k = re.slice(5).trim();
818
+ Se = Ne.pop() || "";
819
+ for (const ee of Ne)
820
+ if (ee.startsWith("data:")) {
821
+ const k = ee.slice(5).trim();
822
822
  try {
823
- const K = JSON.parse(k);
824
- K.index === 0 && pe(
823
+ const J = JSON.parse(k);
824
+ J.index === 0 && pe(
825
825
  (G) => G.map(
826
- (fe, Ie) => Ie === G.length - 1 ? {
827
- ...fe,
828
- secondaryResponse: K.data,
826
+ (de, Ce) => Ce === G.length - 1 ? {
827
+ ...de,
828
+ secondaryResponse: J.data,
829
829
  secondaryLoading: !1
830
- } : fe
830
+ } : de
831
831
  )
832
832
  );
833
- } catch (K) {
833
+ } catch (J) {
834
834
  pe(
835
835
  (G) => G.map(
836
- (fe, Ie) => Ie === G.length - 1 ? { ...fe, secondaryLoading: !1 } : fe
836
+ (de, Ce) => Ce === G.length - 1 ? { ...de, secondaryLoading: !1 } : de
837
837
  )
838
- ), console.error("Secondary flow JSON parse error:", K);
838
+ ), console.error("Secondary flow JSON parse error:", J);
839
839
  }
840
840
  }
841
841
  }
842
- } catch (J) {
843
- console.error("Secondary flow error:", J);
842
+ } catch (Y) {
843
+ console.error("Secondary flow error:", Y);
844
844
  }
845
- }, Ae = async (m) => {
845
+ }, Te = async (m) => {
846
846
  const j = m || H.trim();
847
847
  if (j) {
848
- Y(!0), ye(""), s.current = null, i.current = null, d.current = null, l.current = null, pe(($) => [
848
+ V(!0), we(""), s.current = null, i.current = null, c.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 $ = ie, J = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(Pe, ft);
859
+ const $ = ae, Y = localStorage.getItem("customerNumber"), z = localStorage.getItem("isLoggedIn"), A = await ur(_e, 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(J || (/* @__PURE__ */ new Date()).getTime())
864
+ userId: String(Y || (/* @__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
- }), ee = await fetch(B, {
872
+ }), X = await fetch(B, {
873
873
  signal: AbortSignal.timeout(3e4),
874
874
  method: "POST",
875
875
  headers: {
@@ -878,30 +878,30 @@ const it = (e) => {
878
878
  },
879
879
  body: D
880
880
  });
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 = "";
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 = "";
886
886
  for (; ; ) {
887
887
  E(!0);
888
- const { done: W, value: _e } = await se.read();
888
+ const { done: W, value: Ne } = await ne.read();
889
889
  if (W) break;
890
- Ce += Ne.decode(_e, { stream: !0 });
891
- const re = Ce.split(`
890
+ Se += ke.decode(Ne, { stream: !0 });
891
+ const ee = Se.split(`
892
892
  `);
893
- Ce = re.pop() || "";
894
- for (const k of re)
893
+ Se = ee.pop() || "";
894
+ for (const k of ee)
895
895
  if (k.startsWith("data:")) {
896
- const K = k.slice(5).trim();
896
+ const J = k.slice(5).trim();
897
897
  try {
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,
898
+ const G = JSON.parse(J);
899
+ G.index == 1 && (Z = G.data), pe(
900
+ (de) => de.map(
901
+ (Ce, et) => et === de.length - 1 ? {
902
+ ...Ce,
903
903
  [G.index == 0 ? "response" : G.index == 1 ? "keywords" : G.index == 2 ? "potentialQuestions" : "end"]: G.data
904
- } : Ie
904
+ } : Ce
905
905
  )
906
906
  );
907
907
  } catch (G) {
@@ -909,56 +909,56 @@ const it = (e) => {
909
909
  }
910
910
  }
911
911
  }
912
- Zt(Te(te));
912
+ Zt(Ie(Z));
913
913
  } catch ($) {
914
914
  console.error("Error sending message to Tanya:", $);
915
915
  } finally {
916
- Y(!1);
916
+ V(!1);
917
917
  }
918
918
  }
919
- }, Te = (m) => {
919
+ }, Ie = (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((ue) => ue.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
922
+ ), z = (j ? j[1] : m).split(", ").map((ce) => ce.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 $, J, z;
925
+ var $, Y, 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
- ), ue = j.map((D, ee) => ({
932
+ ), ce = j.map((D, X) => ({
933
933
  keyword: D,
934
- items: A[ee] ?? [],
934
+ items: A[X] ?? [],
935
935
  loading: !1
936
- })).filter((D) => D.items.length > 0), B = (J = ($ = ue[0]) == null ? void 0 : $.items) == null ? void 0 : J[0];
936
+ })).filter((D) => D.items.length > 0), B = (Y = ($ = ce[0]) == null ? void 0 : $.items) == null ? void 0 : Y[0];
937
937
  if (B) {
938
- i.current = B.product_id, s.current = B.product_name, d.current = (z = B.image) == null ? void 0 : z.link;
938
+ i.current = B.product_id, s.current = B.product_name, c.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
942
  if (pe(
943
943
  (D) => D.map(
944
- (ee, se) => se === D.length - 1 ? {
945
- ...ee,
946
- products: ue,
944
+ (X, ne) => ne === D.length - 1 ? {
945
+ ...X,
946
+ products: ce,
947
947
  productSnapshot: B ? {
948
948
  id: i.current,
949
949
  name: s.current,
950
- image: d.current,
950
+ image: c.current,
951
951
  price: l.current,
952
952
  points: 0,
953
953
  quantity: 1
954
- } : ee.productSnapshot
955
- } : ee
954
+ } : X.productSnapshot
955
+ } : X
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), de(s.current, 0));
961
+ D != null && D.isGuest || (console.log("running secondary flow", Lt), le(s.current, 0));
962
962
  }
963
963
  } catch (A) {
964
964
  console.error("error in keyword search", A);
@@ -966,46 +966,46 @@ const it = (e) => {
966
966
  E(!1);
967
967
  }
968
968
  }, er = async (m, j) => {
969
- var $, J, z, A, ue, B, D, ee, se, Ne, Ce, te, W, _e, re;
969
+ var $, Y, z, A, ce, B, D, X, ne, ke, Se, Z, W, Ne, ee;
970
970
  R(!0);
971
971
  try {
972
972
  const k = await jn(m.id);
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)) {
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)) {
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 K = [
980
+ const J = [
981
981
  {
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),
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),
983
983
  quantity: j
984
984
  }
985
985
  ];
986
- console.log(K, "product data", "app version", Lt);
986
+ console.log(J, "product data", "app version", Lt);
987
987
  const G = JSON.parse(
988
988
  sessionStorage.getItem("customerData") || "{}"
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)) {
989
+ ), de = (G == null ? void 0 : G.basketId) || localStorage.getItem(Kt), Ce = !1, et = localStorage.getItem(Et), mt = Date.now();
990
+ if (!Ce || !et || mt >= parseInt(et)) {
991
991
  const At = await On();
992
992
  let { customer_token: Be } = await An(
993
993
  At
994
994
  );
995
- if (Be = "Bearer " + g.access_token, !Be) {
995
+ if (Be = "Bearer " + h.access_token, !Be) {
996
996
  console.error("Failed to get customer_token");
997
997
  return;
998
998
  }
999
999
  const jt = mt + 300 * 1e3;
1000
- if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(fe, "basketIdFromCustomer"), fe) {
1000
+ if (Wt(Be), localStorage.setItem(Et, jt.toString()), console.log(de, "basketIdFromCustomer"), de) {
1001
1001
  const tt = await Dn({
1002
- basketId: fe,
1002
+ basketId: de,
1003
1003
  customer_token: Be
1004
1004
  });
1005
1005
  if (tt.status === 200 && tt) {
1006
1006
  const kt = await fr(
1007
- fe,
1008
- K,
1007
+ de,
1008
+ J,
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,18 +1015,18 @@ const it = (e) => {
1015
1015
  closeOnClick: !0,
1016
1016
  pauseOnHover: !0,
1017
1017
  draggable: !0
1018
- }), Jt(fe), R(!1));
1018
+ }), Jt(de), R(!1));
1019
1019
  return;
1020
1020
  }
1021
1021
  }
1022
- const ht = {
1022
+ const pt = {
1023
1023
  productItems: [
1024
1024
  {
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),
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),
1026
1026
  quantity: 1
1027
1027
  }
1028
1028
  ]
1029
- }, I = await $n(Be, ht);
1029
+ }, I = await $n(Be, pt);
1030
1030
  if (console.log(
1031
1031
  I,
1032
1032
  I == null ? void 0 : I.basket_id,
@@ -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 Le = await r(
1042
+ const De = 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
- (((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", {
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", {
1050
1050
  position: "bottom-right",
1051
1051
  autoClose: 3e3,
1052
1052
  hideProgressBar: !1,
@@ -1059,17 +1059,17 @@ 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
- }), ((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", {
1062
+ }), ((Z = k == null ? void 0 : k.response) == null ? void 0 : Z.status) === 404 || // Basket not found
1063
+ ((W = k == null ? void 0 : k.response) == null ? void 0 : W.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", {
1064
1064
  position: "bottom-right",
1065
1065
  autoClose: 3e3
1066
1066
  }));
1067
1067
  }
1068
1068
  R(!1);
1069
1069
  };
1070
- return ke(() => {
1070
+ return be(() => {
1071
1071
  F ? setTimeout(() => _(!0), 10) : _(!1);
1072
- }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ c(Yo, { open: y, onOpenChange: x, children: [
1072
+ }, [F]), /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ d(Yo, { open: y, onOpenChange: x, children: [
1073
1073
  /* @__PURE__ */ a(
1074
1074
  Jo,
1075
1075
  {
@@ -1078,7 +1078,7 @@ const it = (e) => {
1078
1078
  // background: storeDetails.tanyaThemeColor,
1079
1079
  },
1080
1080
  className: "flex items-center rounded-lg cursor-pointer hover:opacity-90 transition-opacity p-0",
1081
- children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: /* @__PURE__ */ c(
1081
+ children: /* @__PURE__ */ a("div", { className: "flex flex-col", children: /* @__PURE__ */ d(
1082
1082
  "svg",
1083
1083
  {
1084
1084
  width: "40",
@@ -1087,7 +1087,7 @@ const it = (e) => {
1087
1087
  fill: "none",
1088
1088
  xmlns: "http://www.w3.org/2000/svg",
1089
1089
  children: [
1090
- /* @__PURE__ */ c("g", { clipPath: "url(#clip0_958_585)", children: [
1090
+ /* @__PURE__ */ d("g", { clipPath: "url(#clip0_958_585)", children: [
1091
1091
  /* @__PURE__ */ a(
1092
1092
  "path",
1093
1093
  {
@@ -1110,8 +1110,8 @@ const it = (e) => {
1110
1110
  }
1111
1111
  )
1112
1112
  ] }),
1113
- /* @__PURE__ */ c("defs", { children: [
1114
- /* @__PURE__ */ c(
1113
+ /* @__PURE__ */ d("defs", { children: [
1114
+ /* @__PURE__ */ d(
1115
1115
  "linearGradient",
1116
1116
  {
1117
1117
  id: "paint0_linear_958_585",
@@ -1133,7 +1133,7 @@ const it = (e) => {
1133
1133
  ) })
1134
1134
  }
1135
1135
  ),
1136
- F && /* @__PURE__ */ c(ve, { children: [
1136
+ F && /* @__PURE__ */ d(xe, { children: [
1137
1137
  /* @__PURE__ */ a(
1138
1138
  "div",
1139
1139
  {
@@ -1141,7 +1141,7 @@ const it = (e) => {
1141
1141
  onClick: () => x(!1)
1142
1142
  }
1143
1143
  ),
1144
- /* @__PURE__ */ c(
1144
+ /* @__PURE__ */ d(
1145
1145
  "div",
1146
1146
  {
1147
1147
  className: `
@@ -1155,7 +1155,7 @@ const it = (e) => {
1155
1155
  background: "linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"
1156
1156
  },
1157
1157
  children: [
1158
- /* @__PURE__ */ c(
1158
+ /* @__PURE__ */ d(
1159
1159
  "div",
1160
1160
  {
1161
1161
  className: "flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",
@@ -1168,8 +1168,8 @@ const it = (e) => {
1168
1168
  alignItems: "center",
1169
1169
  gap: "0.5rem"
1170
1170
  },
1171
- children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-1", children: [
1172
- /* @__PURE__ */ c(
1171
+ children: /* @__PURE__ */ d("div", { className: "flex flex-col gap-1", children: [
1172
+ /* @__PURE__ */ d(
1173
1173
  "div",
1174
1174
  {
1175
1175
  className: "flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",
@@ -1177,7 +1177,7 @@ const it = (e) => {
1177
1177
  background: "linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"
1178
1178
  },
1179
1179
  children: [
1180
- /* @__PURE__ */ c(
1180
+ /* @__PURE__ */ d(
1181
1181
  "svg",
1182
1182
  {
1183
1183
  width: "20",
@@ -1201,7 +1201,7 @@ const it = (e) => {
1201
1201
  ]
1202
1202
  }
1203
1203
  ),
1204
- /* @__PURE__ */ c(
1204
+ /* @__PURE__ */ d(
1205
1205
  "p",
1206
1206
  {
1207
1207
  className: "text-[#5B5B5B] font-nunitoSans font-semibold",
@@ -1225,7 +1225,7 @@ const it = (e) => {
1225
1225
  gap: "1.25rem",
1226
1226
  margin: "0.75rem"
1227
1227
  },
1228
- children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ c(
1228
+ children: /* @__PURE__ */ a("button", { onClick: () => x(!1), children: /* @__PURE__ */ d(
1229
1229
  "svg",
1230
1230
  {
1231
1231
  width: "24",
@@ -1234,7 +1234,7 @@ const it = (e) => {
1234
1234
  fill: "none",
1235
1235
  xmlns: "http://www.w3.org/2000/svg",
1236
1236
  children: [
1237
- /* @__PURE__ */ c("g", { clipPath: "url(#clip0_501_6036)", children: [
1237
+ /* @__PURE__ */ d("g", { clipPath: "url(#clip0_501_6036)", children: [
1238
1238
  /* @__PURE__ */ a(
1239
1239
  "path",
1240
1240
  {
@@ -1273,19 +1273,19 @@ const it = (e) => {
1273
1273
  ]
1274
1274
  }
1275
1275
  ),
1276
- /* @__PURE__ */ c("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
1277
- /* @__PURE__ */ c(
1276
+ /* @__PURE__ */ d("div", { className: "flex h-full md:flex-row lg:flex-row", children: [
1277
+ /* @__PURE__ */ d(
1278
1278
  "div",
1279
1279
  {
1280
- className: `flex flex-col h-full ${U ? "lg:w-2/3 w-full" : "w-full"}`,
1280
+ className: `flex flex-col h-full ${q ? "lg:w-2/3 w-full" : "w-full"}`,
1281
1281
  children: [
1282
- /* @__PURE__ */ c(
1282
+ /* @__PURE__ */ d(
1283
1283
  "div",
1284
1284
  {
1285
1285
  ref: L,
1286
1286
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1287
1287
  children: [
1288
- (O == null ? void 0 : O.whomRequired) && /* @__PURE__ */ c(
1288
+ (O == null ? void 0 : O.whomRequired) && /* @__PURE__ */ d(
1289
1289
  "div",
1290
1290
  {
1291
1291
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
@@ -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: () => Se(m),
1297
+ onClick: () => ve(m),
1298
1298
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1299
1299
  style: {
1300
- backgroundColor: ie === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
- borderColor: ie === o[m] ? "#BBB3DD" : ""
1300
+ backgroundColor: ae === o[m] ? "#FFFFFF" : "#F3F3F3",
1301
+ borderColor: ae === o[m] ? "#BBB3DD" : ""
1302
1302
  },
1303
1303
  children: m
1304
1304
  },
@@ -1307,9 +1307,9 @@ const it = (e) => {
1307
1307
  ]
1308
1308
  }
1309
1309
  ),
1310
- De.map((m, j) => {
1311
- var $, J;
1312
- return /* @__PURE__ */ c("div", { children: [
1310
+ $e.map((m, j) => {
1311
+ var $, Y;
1312
+ return /* @__PURE__ */ d("div", { children: [
1313
1313
  /* @__PURE__ */ a(
1314
1314
  "div",
1315
1315
  {
@@ -1334,15 +1334,15 @@ const it = (e) => {
1334
1334
  }
1335
1335
  }
1336
1336
  ) }),
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(
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(
1339
1339
  ea,
1340
1340
  {
1341
1341
  chat: m.products,
1342
1342
  storeDetails: O
1343
1343
  }
1344
1344
  ),
1345
- (m == null ? void 0 : m.potentialQuestions.length) > 0 && /* @__PURE__ */ c("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1345
+ (m == null ? void 0 : m.potentialQuestions.length) > 0 && /* @__PURE__ */ d("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1346
1346
  /* @__PURE__ */ a(
1347
1347
  "p",
1348
1348
  {
@@ -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: () => Ae(z),
1358
+ onClick: () => Te(z),
1359
1359
  style: {
1360
1360
  backgroundColor: O.tanyaThemeColorLight
1361
1361
  },
@@ -1364,7 +1364,7 @@ const it = (e) => {
1364
1364
  A
1365
1365
  ))
1366
1366
  ] }),
1367
- (m == null ? void 0 : m.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ c(
1367
+ (m == null ? void 0 : m.secondaryLoading) && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ d(
1368
1368
  "div",
1369
1369
  {
1370
1370
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1372,7 +1372,7 @@ const it = (e) => {
1372
1372
  margin: "0.75rem"
1373
1373
  },
1374
1374
  children: [
1375
- /* @__PURE__ */ c("div", { className: "flex gap-1", children: [
1375
+ /* @__PURE__ */ d("div", { className: "flex gap-1", children: [
1376
1376
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-1", children: "✨" }),
1377
1377
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-2", children: "✨" }),
1378
1378
  /* @__PURE__ */ a("div", { className: "tanya-sparkle tanya-sparkle-3", children: "✨" })
@@ -1397,7 +1397,7 @@ const it = (e) => {
1397
1397
  ]
1398
1398
  }
1399
1399
  ) }),
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: [
1400
+ (m == null ? void 0 : m.secondaryResponse) && /* @__PURE__ */ a(xe, { children: /* @__PURE__ */ d("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1401
1401
  /* @__PURE__ */ a(
1402
1402
  "div",
1403
1403
  {
@@ -1413,7 +1413,7 @@ const it = (e) => {
1413
1413
  }
1414
1414
  ),
1415
1415
  m.productSnapshot && // chat.productSnapshot.points > 0 &&
1416
- /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ c(
1416
+ /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ d(
1417
1417
  "div",
1418
1418
  {
1419
1419
  className: "flex gap-4 items-stretch rounded-2xl p-4",
@@ -1440,8 +1440,8 @@ const it = (e) => {
1440
1440
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
1441
1441
  }
1442
1442
  ),
1443
- /* @__PURE__ */ c("div", { className: "flex flex-col flex-1 justify-between", children: [
1444
- /* @__PURE__ */ c("div", { children: [
1443
+ /* @__PURE__ */ d("div", { className: "flex flex-col flex-1 justify-between", children: [
1444
+ /* @__PURE__ */ d("div", { children: [
1445
1445
  /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: m.productSnapshot.name }),
1446
1446
  /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: m.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1447
1447
  style: "currency",
@@ -1449,25 +1449,25 @@ const it = (e) => {
1449
1449
  }).format(
1450
1450
  m.productSnapshot.price
1451
1451
  ) : "" }),
1452
- m.productSnapshot.points > 0 && /* @__PURE__ */ c("p", { className: "mt-1 text-xs opacity-80", children: [
1452
+ m.productSnapshot.points > 0 && /* @__PURE__ */ d("p", { className: "mt-1 text-xs opacity-80", children: [
1453
1453
  "You will earn",
1454
1454
  " ",
1455
- /* @__PURE__ */ c("strong", { children: [
1455
+ /* @__PURE__ */ d("strong", { children: [
1456
1456
  m.productSnapshot.points,
1457
1457
  " ",
1458
1458
  "points"
1459
1459
  ] })
1460
1460
  ] })
1461
1461
  ] }),
1462
- /* @__PURE__ */ c("div", { className: "mt-3 flex items-center gap-3", children: [
1463
- /* @__PURE__ */ c("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
1462
+ /* @__PURE__ */ d("div", { className: "mt-3 flex items-center gap-3", children: [
1463
+ /* @__PURE__ */ d("div", { className: "flex items-center border rounded-full overflow-hidden", children: [
1464
1464
  /* @__PURE__ */ a(
1465
1465
  "button",
1466
1466
  {
1467
1467
  className: "px-3 py-1 text-sm",
1468
1468
  onClick: () => pe(
1469
1469
  (z) => z.map(
1470
- (A, ue) => ue === j && A.productSnapshot ? {
1470
+ (A, ce) => ce === j && A.productSnapshot ? {
1471
1471
  ...A,
1472
1472
  productSnapshot: {
1473
1473
  ...A.productSnapshot,
@@ -1493,7 +1493,7 @@ const it = (e) => {
1493
1493
  className: "px-3 py-1 text-sm",
1494
1494
  onClick: () => pe(
1495
1495
  (z) => z.map(
1496
- (A, ue) => ue === j && A.productSnapshot ? {
1496
+ (A, ce) => ce === 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
- Oe(
1518
+ Pe(
1519
1519
  m.productSnapshot
1520
1520
  ),
1521
1521
  m.productSnapshot.quantity
@@ -1550,7 +1550,7 @@ const it = (e) => {
1550
1550
  style: {
1551
1551
  background: "linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"
1552
1552
  },
1553
- children: /* @__PURE__ */ c("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
1553
+ children: /* @__PURE__ */ d("div", { className: "flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1", children: [
1554
1554
  /* @__PURE__ */ a(
1555
1555
  "input",
1556
1556
  {
@@ -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) => ye(m.target.value),
1561
+ onChange: (m) => we(m.target.value),
1562
1562
  onKeyDown: (m) => {
1563
- m.key === "Enter" && !w && Ae();
1563
+ m.key === "Enter" && !w && Te();
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: () => Ae(),
1573
+ onClick: () => Te(),
1574
1574
  children: w ? /* @__PURE__ */ a(
1575
1575
  "div",
1576
1576
  {
@@ -1683,7 +1683,7 @@ function wt(e) {
1683
1683
  } catch {
1684
1684
  }
1685
1685
  }
1686
- const hr = wt(function() {
1686
+ const pr = wt(function() {
1687
1687
  return globalThis;
1688
1688
  }) || wt(function() {
1689
1689
  return window;
@@ -1749,7 +1749,7 @@ function Un(e) {
1749
1749
  }
1750
1750
  function kr(e, t) {
1751
1751
  if (t === void 0 && (t = []), !!e)
1752
- return hr[Xr] && hr[Xr](e, t.map(Un));
1752
+ return pr[Xr] && pr[Xr](e, t.map(Un));
1753
1753
  }
1754
1754
  function Sr(e, t) {
1755
1755
  if (t === void 0 && (t = []), !!e)
@@ -1766,7 +1766,7 @@ function da(e) {
1766
1766
  return t.name.value;
1767
1767
  })[0] || null;
1768
1768
  }
1769
- let ce = null;
1769
+ let ie = 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 = ce; t; t = t.parent)
1782
+ for (let t = ie; 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 !== ce && (ce.slots[this.id] = r), !0;
1787
+ return t !== ie && (ie.slots[this.id] = r), !0;
1788
1788
  }
1789
- return ce && (ce.slots[this.id] = Zr), !1;
1789
+ return ie && (ie.slots[this.id] = Zr), !1;
1790
1790
  }
1791
1791
  getValue() {
1792
1792
  if (this.hasValue())
1793
- return ce.slots[this.id];
1793
+ return ie.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 = ce;
1800
- ce = { parent: i, slots: s };
1799
+ }, i = ie;
1800
+ ie = { parent: i, slots: s };
1801
1801
  try {
1802
1802
  return r.apply(o, n);
1803
1803
  } finally {
1804
- ce = i;
1804
+ ie = 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 = ce;
1810
+ const r = ie;
1811
1811
  return function() {
1812
- const n = ce;
1812
+ const n = ie;
1813
1813
  try {
1814
- return ce = r, t.apply(this, arguments);
1814
+ return ie = r, t.apply(this, arguments);
1815
1815
  } finally {
1816
- ce = n;
1816
+ ie = 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 (ce) {
1823
- const o = ce;
1822
+ if (ie) {
1823
+ const o = ie;
1824
1824
  try {
1825
- return ce = null, t.apply(n, r);
1825
+ return ie = null, t.apply(n, r);
1826
1826
  } finally {
1827
- ce = o;
1827
+ ie = o;
1828
1828
  }
1829
1829
  } else
1830
1830
  return t.apply(n, r);
@@ -1867,10 +1867,10 @@ Array[ar] || (function(e) {
1867
1867
  }
1868
1868
  })(fa()), { bind: ai, noContext: si } = Nr;
1869
1869
  new Nr();
1870
- function ha(e, t) {
1870
+ function pa(e, t) {
1871
1871
  var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1872
1872
  if (r) return (r = r.call(e)).next.bind(r);
1873
- if (Array.isArray(e) || (r = pa(e)) || t) {
1873
+ if (Array.isArray(e) || (r = ha(e)) || t) {
1874
1874
  r && (e = r);
1875
1875
  var n = 0;
1876
1876
  return function() {
@@ -1880,7 +1880,7 @@ function ha(e, t) {
1880
1880
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1881
1881
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1882
1882
  }
1883
- function pa(e, t) {
1883
+ function ha(e, t) {
1884
1884
  if (e) {
1885
1885
  if (typeof e == "string") return rn(e, t);
1886
1886
  var r = Object.prototype.toString.call(e).slice(8, -1);
@@ -1911,7 +1911,7 @@ var _r = function() {
1911
1911
  return Ir(e) ? Symbol[e] : "@@" + e;
1912
1912
  };
1913
1913
  _r() && !Ir("observable") && (Symbol.observable = Symbol("observable"));
1914
- var ga = Fr("iterator"), pr = Fr("observable"), qn = Fr("species");
1914
+ var ga = Fr("iterator"), hr = Fr("observable"), qn = Fr("species");
1915
1915
  function Gt(e, t) {
1916
1916
  var r = e[t];
1917
1917
  if (r != null) {
@@ -1921,10 +1921,10 @@ function Gt(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 : he;
1924
+ return t !== void 0 && (t = t[qn], t === null && (t = void 0)), t !== void 0 ? t : me;
1925
1925
  }
1926
1926
  function wa(e) {
1927
- return e instanceof he;
1927
+ return e instanceof me;
1928
1928
  }
1929
1929
  function xt(e) {
1930
1930
  xt.log ? xt.log(e) : setTimeout(function() {
@@ -2045,7 +2045,7 @@ var xa = /* @__PURE__ */ (function() {
2045
2045
  return this._subscription._state === "closed";
2046
2046
  }
2047
2047
  }]), e;
2048
- })(), he = /* @__PURE__ */ (function() {
2048
+ })(), me = /* @__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");
@@ -2065,15 +2065,15 @@ var xa = /* @__PURE__ */ (function() {
2065
2065
  i(new TypeError(n + " is not a function"));
2066
2066
  return;
2067
2067
  }
2068
- function d() {
2068
+ function c() {
2069
2069
  l.unsubscribe(), s();
2070
2070
  }
2071
2071
  var l = o.subscribe({
2072
- next: function(g) {
2072
+ next: function(h) {
2073
2073
  try {
2074
- n(g, d);
2075
- } catch (p) {
2076
- i(p), l.unsubscribe();
2074
+ n(h, c);
2075
+ } catch (g) {
2076
+ i(g), l.unsubscribe();
2077
2077
  }
2078
2078
  },
2079
2079
  error: i,
@@ -2086,16 +2086,16 @@ var xa = /* @__PURE__ */ (function() {
2086
2086
  var s = _t(this);
2087
2087
  return new s(function(i) {
2088
2088
  return o.subscribe({
2089
- next: function(d) {
2089
+ next: function(c) {
2090
2090
  try {
2091
- d = n(d);
2091
+ c = n(c);
2092
2092
  } catch (l) {
2093
2093
  return i.error(l);
2094
2094
  }
2095
- i.next(d);
2095
+ i.next(c);
2096
2096
  },
2097
- error: function(d) {
2098
- i.error(d);
2097
+ error: function(c) {
2098
+ i.error(c);
2099
2099
  },
2100
2100
  complete: function() {
2101
2101
  i.complete();
@@ -2108,16 +2108,16 @@ var xa = /* @__PURE__ */ (function() {
2108
2108
  var s = _t(this);
2109
2109
  return new s(function(i) {
2110
2110
  return o.subscribe({
2111
- next: function(d) {
2111
+ next: function(c) {
2112
2112
  try {
2113
- if (!n(d)) return;
2113
+ if (!n(c)) return;
2114
2114
  } catch (l) {
2115
2115
  return i.error(l);
2116
2116
  }
2117
- i.next(d);
2117
+ i.next(c);
2118
2118
  },
2119
- error: function(d) {
2120
- i.error(d);
2119
+ error: function(c) {
2120
+ i.error(c);
2121
2121
  },
2122
2122
  complete: function() {
2123
2123
  i.complete();
@@ -2127,37 +2127,37 @@ var xa = /* @__PURE__ */ (function() {
2127
2127
  }, t.reduce = function(n) {
2128
2128
  var o = this;
2129
2129
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2130
- var s = _t(this), i = arguments.length > 1, d = !1, l = arguments[1], g = l;
2131
- return new s(function(p) {
2130
+ var s = _t(this), i = arguments.length > 1, c = !1, l = arguments[1], h = l;
2131
+ return new s(function(g) {
2132
2132
  return o.subscribe({
2133
2133
  next: function(y) {
2134
- var x = !d;
2135
- if (d = !0, !x || i)
2134
+ var x = !c;
2135
+ if (c = !0, !x || i)
2136
2136
  try {
2137
- g = n(g, y);
2137
+ h = n(h, y);
2138
2138
  } catch (S) {
2139
- return p.error(S);
2139
+ return g.error(S);
2140
2140
  }
2141
2141
  else
2142
- g = y;
2142
+ h = y;
2143
2143
  },
2144
2144
  error: function(y) {
2145
- p.error(y);
2145
+ g.error(y);
2146
2146
  },
2147
2147
  complete: function() {
2148
- if (!d && !i) return p.error(new TypeError("Cannot reduce an empty sequence"));
2149
- p.next(g), p.complete();
2148
+ if (!c && !i) return g.error(new TypeError("Cannot reduce an empty sequence"));
2149
+ g.next(h), g.complete();
2150
2150
  }
2151
2151
  });
2152
2152
  });
2153
2153
  }, t.concat = function() {
2154
2154
  for (var n = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
2155
2155
  s[i] = arguments[i];
2156
- var d = _t(this);
2157
- return new d(function(l) {
2158
- var g, p = 0;
2156
+ var c = _t(this);
2157
+ return new c(function(l) {
2158
+ var h, g = 0;
2159
2159
  function y(x) {
2160
- g = x.subscribe({
2160
+ h = x.subscribe({
2161
2161
  next: function(S) {
2162
2162
  l.next(S);
2163
2163
  },
@@ -2165,12 +2165,12 @@ var xa = /* @__PURE__ */ (function() {
2165
2165
  l.error(S);
2166
2166
  },
2167
2167
  complete: function() {
2168
- p === s.length ? (g = void 0, l.complete()) : y(d.from(s[p++]));
2168
+ g === s.length ? (h = void 0, l.complete()) : y(c.from(s[g++]));
2169
2169
  }
2170
2170
  });
2171
2171
  }
2172
2172
  return y(n), function() {
2173
- g && (g.unsubscribe(), g = void 0);
2173
+ h && (h.unsubscribe(), h = void 0);
2174
2174
  };
2175
2175
  });
2176
2176
  }, t.flatMap = function(n) {
@@ -2178,15 +2178,15 @@ var xa = /* @__PURE__ */ (function() {
2178
2178
  if (typeof n != "function") throw new TypeError(n + " is not a function");
2179
2179
  var s = _t(this);
2180
2180
  return new s(function(i) {
2181
- var d = [], l = o.subscribe({
2182
- next: function(p) {
2181
+ var c = [], l = o.subscribe({
2182
+ next: function(g) {
2183
2183
  if (n)
2184
2184
  try {
2185
- p = n(p);
2185
+ g = n(g);
2186
2186
  } catch (x) {
2187
2187
  return i.error(x);
2188
2188
  }
2189
- var y = s.from(p).subscribe({
2189
+ var y = s.from(g).subscribe({
2190
2190
  next: function(x) {
2191
2191
  i.next(x);
2192
2192
  },
@@ -2194,60 +2194,60 @@ var xa = /* @__PURE__ */ (function() {
2194
2194
  i.error(x);
2195
2195
  },
2196
2196
  complete: function() {
2197
- var x = d.indexOf(y);
2198
- x >= 0 && d.splice(x, 1), g();
2197
+ var x = c.indexOf(y);
2198
+ x >= 0 && c.splice(x, 1), h();
2199
2199
  }
2200
2200
  });
2201
- d.push(y);
2201
+ c.push(y);
2202
2202
  },
2203
- error: function(p) {
2204
- i.error(p);
2203
+ error: function(g) {
2204
+ i.error(g);
2205
2205
  },
2206
2206
  complete: function() {
2207
- g();
2207
+ h();
2208
2208
  }
2209
2209
  });
2210
- function g() {
2211
- l.closed && d.length === 0 && i.complete();
2210
+ function h() {
2211
+ l.closed && c.length === 0 && i.complete();
2212
2212
  }
2213
2213
  return function() {
2214
- d.forEach(function(p) {
2215
- return p.unsubscribe();
2214
+ c.forEach(function(g) {
2215
+ return g.unsubscribe();
2216
2216
  }), l.unsubscribe();
2217
2217
  };
2218
2218
  });
2219
- }, t[pr] = function() {
2219
+ }, t[hr] = function() {
2220
2220
  return this;
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 = Gt(n, pr);
2224
+ var s = Gt(n, hr);
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");
2228
- return wa(i) && i.constructor === o ? i : new o(function(d) {
2229
- return i.subscribe(d);
2228
+ return wa(i) && i.constructor === o ? i : new o(function(c) {
2229
+ return i.subscribe(c);
2230
2230
  });
2231
2231
  }
2232
2232
  if (Ir("iterator") && (s = Gt(n, ga), s))
2233
- return new o(function(d) {
2233
+ return new o(function(c) {
2234
2234
  Ut(function() {
2235
- if (!d.closed) {
2236
- for (var l = ha(s.call(n)), g; !(g = l()).done; ) {
2237
- var p = g.value;
2238
- if (d.next(p), d.closed) return;
2235
+ if (!c.closed) {
2236
+ for (var l = pa(s.call(n)), h; !(h = l()).done; ) {
2237
+ var g = h.value;
2238
+ if (c.next(g), c.closed) return;
2239
2239
  }
2240
- d.complete();
2240
+ c.complete();
2241
2241
  }
2242
2242
  });
2243
2243
  });
2244
2244
  if (Array.isArray(n))
2245
- return new o(function(d) {
2245
+ return new o(function(c) {
2246
2246
  Ut(function() {
2247
- if (!d.closed) {
2247
+ if (!c.closed) {
2248
2248
  for (var l = 0; l < n.length; ++l)
2249
- if (d.next(n[l]), d.closed) return;
2250
- d.complete();
2249
+ if (c.next(n[l]), c.closed) return;
2250
+ c.complete();
2251
2251
  }
2252
2252
  });
2253
2253
  });
@@ -2256,12 +2256,12 @@ var xa = /* @__PURE__ */ (function() {
2256
2256
  for (var n = arguments.length, o = new Array(n), s = 0; s < n; s++)
2257
2257
  o[s] = arguments[s];
2258
2258
  var i = typeof this == "function" ? this : e;
2259
- return new i(function(d) {
2259
+ return new i(function(c) {
2260
2260
  Ut(function() {
2261
- if (!d.closed) {
2261
+ if (!c.closed) {
2262
2262
  for (var l = 0; l < o.length; ++l)
2263
- if (d.next(o[l]), d.closed) return;
2264
- d.complete();
2263
+ if (c.next(o[l]), c.closed) return;
2264
+ c.complete();
2265
2265
  }
2266
2266
  });
2267
2267
  });
@@ -2272,9 +2272,9 @@ var xa = /* @__PURE__ */ (function() {
2272
2272
  }
2273
2273
  }]), e;
2274
2274
  })();
2275
- _r() && Object.defineProperty(he, Symbol("extensions"), {
2275
+ _r() && Object.defineProperty(me, Symbol("extensions"), {
2276
2276
  value: {
2277
- symbol: pr,
2277
+ symbol: hr,
2278
2278
  hostReportError: xt
2279
2279
  },
2280
2280
  configurable: !0
@@ -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 = he.prototype, an = "@@observable";
2301
+ var on = me.prototype, an = "@@observable";
2302
2302
  on[an] || (on[an] = function() {
2303
2303
  return this;
2304
2304
  });
@@ -2339,7 +2339,7 @@ function Na(e) {
2339
2339
  };
2340
2340
  return t.operationName || (t.operationName = typeof t.query != "string" ? da(t.query) || void 0 : ""), t;
2341
2341
  }
2342
- var Ca = Symbol.for("apollo.deprecations"), _a = hr, Ia = new Nr();
2342
+ var Ca = Symbol.for("apollo.deprecations"), _a = pr, Ia = new Nr();
2343
2343
  function Fa(e) {
2344
2344
  return _a[Ca] || (Ia.getValue() || []).includes(e);
2345
2345
  }
@@ -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) : he.of();
2350
+ return t ? t(e) : me.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 he.of();
2366
+ return me.of();
2367
2367
  });
2368
2368
  }, e.from = function(t) {
2369
2369
  return t.length === 0 ? e.empty() : t.map(It).reduce(function(r, n) {
@@ -2371,26 +2371,26 @@ var Vn = (
2371
2371
  });
2372
2372
  }, e.split = function(t, r, n) {
2373
2373
  var o = It(r), s = It(n || new e(sn)), i;
2374
- return Bt(o) && Bt(s) ? i = new e(function(d) {
2375
- return t(d) ? o.request(d) || he.of() : s.request(d) || he.of();
2376
- }) : i = new e(function(d, l) {
2377
- return t(d) ? o.request(d, l) || he.of() : s.request(d, l) || he.of();
2374
+ return Bt(o) && Bt(s) ? i = new e(function(c) {
2375
+ return t(c) ? o.request(c) || me.of() : s.request(c) || me.of();
2376
+ }) : i = new e(function(c, l) {
2377
+ return t(c) ? o.request(c, l) || me.of() : s.request(c, l) || me.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)))) || he.of();
2380
+ return t.request(Sa(r.context, Na(ka(r)))) || me.of();
2381
2381
  }, e.concat = function(t, r) {
2382
2382
  var n = It(t);
2383
2383
  if (Bt(n))
2384
2384
  return globalThis.__DEV__ !== !1 && or.warn(47, n), n;
2385
2385
  var o = It(r), s;
2386
2386
  return Bt(o) ? s = new e(function(i) {
2387
- return n.request(i, function(d) {
2388
- return o.request(d) || he.of();
2389
- }) || he.of();
2390
- }) : s = new e(function(i, d) {
2387
+ return n.request(i, function(c) {
2388
+ return o.request(c) || me.of();
2389
+ }) || me.of();
2390
+ }) : s = new e(function(i, c) {
2391
2391
  return n.request(i, function(l) {
2392
- return o.request(l, d) || he.of();
2393
- }) || he.of();
2392
+ return o.request(l, c) || me.of();
2393
+ }) || me.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,10 +2412,10 @@ var Vn = (
2412
2412
  function Ta(e) {
2413
2413
  return new Vn(function(t, r) {
2414
2414
  var n = aa(t, []);
2415
- return new he(function(o) {
2415
+ return new me(function(o) {
2416
2416
  var s, i = !1;
2417
- return Promise.resolve(n).then(function(d) {
2418
- return e(d, t.getContext());
2417
+ return Promise.resolve(n).then(function(c) {
2418
+ return e(c, t.getContext());
2419
2419
  }).then(t.setContext).then(function() {
2420
2420
  i || (s = r(t).subscribe({
2421
2421
  next: o.next.bind(o),
@@ -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 we.post(
2434
+ const o = await ge.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 we.isAxiosError(o) ? console.error("Error fetching token:", o.response || o.message) : console.error("Unexpected error:", o), null;
2447
+ return ge.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}`
@@ -2474,8 +2474,8 @@ function Da(e, t) {
2474
2474
  if (r[i]) return o[i] = [];
2475
2475
  if (!(i in o)) {
2476
2476
  o[i] = null;
2477
- const d = n[i] && n[i].parent, l = d && s(d);
2478
- l && (o[i] = [d].concat(l));
2477
+ const c = n[i] && n[i].parent, l = c && s(c);
2478
+ l && (o[i] = [c].concat(l));
2479
2479
  }
2480
2480
  return o[i];
2481
2481
  }
@@ -2512,8 +2512,8 @@ function ln(e, t) {
2512
2512
  function za(e, t, r) {
2513
2513
  const n = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
2514
2514
  let s = {};
2515
- function i(d) {
2516
- s = ln(n[d] || o[d], s);
2515
+ function i(c) {
2516
+ s = ln(n[c] || o[c], s);
2517
2517
  }
2518
2518
  return i(t), r.forEach(i), ln(e, s);
2519
2519
  }
@@ -2590,29 +2590,29 @@ const Gn = /^[a-z0-9]+(-[a-z0-9]+)*$/, Xt = (e, t, r, n = "") => {
2590
2590
  }
2591
2591
  if (o.length > 3 || !o.length) return null;
2592
2592
  if (o.length > 1) {
2593
- const d = o.pop(), l = o.pop(), g = {
2593
+ const c = o.pop(), l = o.pop(), h = {
2594
2594
  provider: o.length > 0 ? o[0] : n,
2595
2595
  prefix: l,
2596
- name: d
2596
+ name: c
2597
2597
  };
2598
- return t && !qt(g) ? null : g;
2598
+ return t && !qt(h) ? null : h;
2599
2599
  }
2600
2600
  const s = o[0], i = s.split("-");
2601
2601
  if (i.length > 1) {
2602
- const d = {
2602
+ const c = {
2603
2603
  provider: n,
2604
2604
  prefix: i.shift(),
2605
2605
  name: i.join("-")
2606
2606
  };
2607
- return t && !qt(d) ? null : d;
2607
+ return t && !qt(c) ? null : c;
2608
2608
  }
2609
2609
  if (r && n === "") {
2610
- const d = {
2610
+ const c = {
2611
2611
  provider: n,
2612
2612
  prefix: "",
2613
2613
  name: s
2614
2614
  };
2615
- return t && !qt(d, r) ? null : d;
2615
+ return t && !qt(c, r) ? null : c;
2616
2616
  }
2617
2617
  return null;
2618
2618
  }, qt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
@@ -2666,8 +2666,8 @@ function un(e, t, r) {
2666
2666
  let s = n.shift(), i = Va.test(s);
2667
2667
  for (; ; ) {
2668
2668
  if (i) {
2669
- const d = parseFloat(s);
2670
- isNaN(d) ? o.push(s) : o.push(Math.ceil(d * t * r) / r);
2669
+ const c = parseFloat(s);
2670
+ isNaN(c) ? o.push(s) : o.push(Math.ceil(c * t * r) / r);
2671
2671
  } else o.push(s);
2672
2672
  if (s = n.shift(), s === void 0) return o.join("");
2673
2673
  i = !i;
@@ -2714,32 +2714,32 @@ function Ga(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 Y;
2717
+ let V;
2718
2718
  switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
2719
2719
  case 1:
2720
- Y = o.height / 2 + o.top, N.unshift("rotate(90 " + Y.toString() + " " + Y.toString() + ")");
2720
+ V = o.height / 2 + o.top, N.unshift("rotate(90 " + V.toString() + " " + V.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
- Y = o.width / 2 + o.left, N.unshift("rotate(-90 " + Y.toString() + " " + Y.toString() + ")");
2726
+ V = o.width / 2 + o.left, N.unshift("rotate(-90 " + V.toString() + " " + V.toString() + ")");
2727
2727
  break;
2728
2728
  }
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>"));
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>"));
2730
2730
  });
2731
- const i = n.width, d = n.height, l = o.width, g = o.height;
2732
- let p, y;
2733
- i === null ? (y = d === null ? "1em" : d === "auto" ? g : d, p = un(y, l / g)) : (p = i === "auto" ? l : i, y = d === null ? un(p, g / l) : d === "auto" ? g : d);
2731
+ const i = n.width, c = n.height, l = o.width, h = o.height;
2732
+ let g, y;
2733
+ i === null ? (y = c === null ? "1em" : c === "auto" ? h : c, g = un(y, l / h)) : (g = i === "auto" ? l : i, y = c === null ? un(g, h / l) : c === "auto" ? h : c);
2734
2734
  const x = {}, S = (F, N) => {
2735
2735
  Wa(N) || (x[F] = N.toString());
2736
2736
  };
2737
- S("width", p), S("height", y);
2737
+ S("width", g), S("height", y);
2738
2738
  const _ = [
2739
2739
  o.left,
2740
2740
  o.top,
2741
2741
  l,
2742
- g
2742
+ h
2743
2743
  ];
2744
2744
  return x.viewBox = _.join(" "), {
2745
2745
  attributes: x,
@@ -2756,8 +2756,8 @@ function es(e, t = Xa) {
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) => {
2759
- const i = typeof t == "function" ? t(s) : t + (Za++).toString(), d = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2760
- e = e.replace(new RegExp('([#;"])(' + d + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2759
+ const i = typeof t == "function" ? t(s) : t + (Za++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2760
+ e = e.replace(new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"), "$1" + i + o + "$3");
2761
2761
  }), e = e.replace(new RegExp(o, "g"), ""), e;
2762
2762
  }
2763
2763
  const yr = /* @__PURE__ */ Object.create(null);
@@ -2825,14 +2825,14 @@ const ss = (e, t, r) => {
2825
2825
  provider: e,
2826
2826
  prefix: t,
2827
2827
  icons: []
2828
- }, d = 0;
2829
- return r.forEach((l, g) => {
2830
- d += l.length + 1, d >= o && g > 0 && (n.push(i), i = {
2828
+ }, c = 0;
2829
+ return r.forEach((l, h) => {
2830
+ c += l.length + 1, c >= o && h > 0 && (n.push(i), i = {
2831
2831
  type: s,
2832
2832
  provider: e,
2833
2833
  prefix: t,
2834
2834
  icons: []
2835
- }, d = l.length), i.icons.push(l);
2835
+ }, c = l.length), i.icons.push(l);
2836
2836
  }), n.push(i), n;
2837
2837
  };
2838
2838
  function is(e) {
@@ -2850,7 +2850,7 @@ const ls = (e, t, r) => {
2850
2850
  let n = is(t.provider);
2851
2851
  switch (t.type) {
2852
2852
  case "icons": {
2853
- const s = t.prefix, d = t.icons.join(","), l = new URLSearchParams({ icons: d });
2853
+ const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({ icons: c });
2854
2854
  n += s + ".json?" + l.toString();
2855
2855
  break;
2856
2856
  }
@@ -2904,24 +2904,24 @@ function ds(e) {
2904
2904
  let r = !1;
2905
2905
  const n = e.provider, o = e.prefix;
2906
2906
  t.forEach((s) => {
2907
- const i = s.icons, d = i.pending.length;
2907
+ const i = s.icons, c = i.pending.length;
2908
2908
  i.pending = i.pending.filter((l) => {
2909
2909
  if (l.prefix !== o) return !0;
2910
- const g = l.name;
2911
- if (e.icons[g]) i.loaded.push({
2910
+ const h = l.name;
2911
+ if (e.icons[h]) i.loaded.push({
2912
2912
  provider: n,
2913
2913
  prefix: o,
2914
- name: g
2914
+ name: h
2915
2915
  });
2916
- else if (e.missing.has(g)) i.missing.push({
2916
+ else if (e.missing.has(h)) i.missing.push({
2917
2917
  provider: n,
2918
2918
  prefix: o,
2919
- name: g
2919
+ name: h
2920
2920
  });
2921
2921
  else
2922
2922
  return r = !0, !0;
2923
2923
  return !1;
2924
- }), i.pending.length !== d && (r || eo([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2924
+ }), i.pending.length !== c && (r || eo([e], s.id), s.callback(i.loaded.slice(0), i.missing.slice(0), i.pending.slice(0), s.abort));
2925
2925
  });
2926
2926
  }));
2927
2927
  }
@@ -2954,25 +2954,25 @@ function ms(e) {
2954
2954
  return e.forEach((o) => {
2955
2955
  if (n.name === o.name && n.prefix === o.prefix && n.provider === o.provider) return;
2956
2956
  n = o;
2957
- const s = o.provider, i = o.prefix, d = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), g = l[i] || (l[i] = bt(s, i));
2958
- let p;
2959
- d in g.icons ? p = t.loaded : i === "" || g.missing.has(d) ? p = t.missing : p = t.pending;
2957
+ const s = o.provider, i = o.prefix, c = o.name, l = r[s] || (r[s] = /* @__PURE__ */ Object.create(null)), h = l[i] || (l[i] = bt(s, i));
2958
+ let g;
2959
+ c in h.icons ? g = t.loaded : i === "" || h.missing.has(c) ? g = t.missing : g = t.pending;
2960
2960
  const y = {
2961
2961
  provider: s,
2962
2962
  prefix: i,
2963
- name: d
2963
+ name: c
2964
2964
  };
2965
- p.push(y);
2965
+ g.push(y);
2966
2966
  }), t;
2967
2967
  }
2968
- function hs(e, t = !0, r = !1) {
2968
+ function ps(e, t = !0, r = !1) {
2969
2969
  const n = [];
2970
2970
  return e.forEach((o) => {
2971
2971
  const s = typeof o == "string" ? Xt(o, t, r) : o;
2972
2972
  s && n.push(s);
2973
2973
  }), n;
2974
2974
  }
2975
- const ps = {
2975
+ const hs = {
2976
2976
  resources: [],
2977
2977
  index: 0,
2978
2978
  timeout: 2e3,
@@ -2991,8 +2991,8 @@ function gs(e, t, r, n) {
2991
2991
  }
2992
2992
  i = i.concat(E);
2993
2993
  } else i = e.resources.slice(s).concat(e.resources.slice(0, s));
2994
- const d = Date.now();
2995
- let l = "pending", g = 0, p, y = null, x = [], S = [];
2994
+ const c = Date.now();
2995
+ let l = "pending", h = 0, g, y = null, x = [], S = [];
2996
2996
  typeof n == "function" && S.push(n);
2997
2997
  function _() {
2998
2998
  y && (clearTimeout(y), y = null);
@@ -3007,10 +3007,10 @@ function gs(e, t, r, n) {
3007
3007
  }
3008
3008
  function P() {
3009
3009
  return {
3010
- startTime: d,
3010
+ startTime: c,
3011
3011
  payload: t,
3012
3012
  status: l,
3013
- queriesSent: g,
3013
+ queriesSent: h,
3014
3014
  queriesPending: x.length,
3015
3015
  subscribe: N,
3016
3016
  abort: F
@@ -3018,7 +3018,7 @@ function gs(e, t, r, n) {
3018
3018
  }
3019
3019
  function R() {
3020
3020
  l = "failed", S.forEach((E) => {
3021
- E(void 0, p);
3021
+ E(void 0, g);
3022
3022
  });
3023
3023
  }
3024
3024
  function w() {
@@ -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 Y(E, H, ye) {
3030
- const ie = H !== "success";
3031
- switch (x = x.filter((Z) => Z !== E), l) {
3029
+ function V(E, H, we) {
3030
+ const ae = H !== "success";
3031
+ switch (x = x.filter((Q) => Q !== E), l) {
3032
3032
  case "pending":
3033
3033
  break;
3034
3034
  case "failed":
3035
- if (ie || !e.dataAfterTimeout) return;
3035
+ if (ae || !e.dataAfterTimeout) return;
3036
3036
  break;
3037
3037
  default:
3038
3038
  return;
3039
3039
  }
3040
3040
  if (H === "abort") {
3041
- p = ye, R();
3041
+ g = we, R();
3042
3042
  return;
3043
3043
  }
3044
- if (ie) {
3045
- p = ye, x.length || (i.length ? $e() : R());
3044
+ if (ae) {
3045
+ g = we, x.length || (i.length ? je() : R());
3046
3046
  return;
3047
3047
  }
3048
3048
  if (_(), w(), !e.random) {
3049
- const Z = e.resources.indexOf(E.resource);
3050
- Z !== -1 && Z !== e.index && (e.index = Z);
3049
+ const Q = e.resources.indexOf(E.resource);
3050
+ Q !== -1 && Q !== e.index && (e.index = Q);
3051
3051
  }
3052
- l = "completed", S.forEach((Z) => {
3053
- Z(ye);
3052
+ l = "completed", S.forEach((Q) => {
3053
+ Q(we);
3054
3054
  });
3055
3055
  }
3056
- function $e() {
3056
+ function je() {
3057
3057
  if (l !== "pending") return;
3058
3058
  _();
3059
3059
  const E = i.shift();
@@ -3070,37 +3070,37 @@ function gs(e, t, r, n) {
3070
3070
  const H = {
3071
3071
  status: "pending",
3072
3072
  resource: E,
3073
- callback: (ye, ie) => {
3074
- Y(H, ye, ie);
3073
+ callback: (we, ae) => {
3074
+ V(H, we, ae);
3075
3075
  }
3076
3076
  };
3077
- x.push(H), g++, y = setTimeout($e, e.rotate), r(E, t, H.callback);
3077
+ x.push(H), h++, y = setTimeout(je, e.rotate), r(E, t, H.callback);
3078
3078
  }
3079
- return setTimeout($e), P;
3079
+ return setTimeout(je), P;
3080
3080
  }
3081
3081
  function to(e) {
3082
3082
  const t = {
3083
- ...ps,
3083
+ ...hs,
3084
3084
  ...e
3085
3085
  };
3086
3086
  let r = [];
3087
3087
  function n() {
3088
- r = r.filter((d) => d().status === "pending");
3088
+ r = r.filter((c) => c().status === "pending");
3089
3089
  }
3090
- function o(d, l, g) {
3091
- const p = gs(t, d, l, (y, x) => {
3092
- n(), g && g(y, x);
3090
+ function o(c, l, h) {
3091
+ const g = gs(t, c, l, (y, x) => {
3092
+ n(), h && h(y, x);
3093
3093
  });
3094
- return r.push(p), p;
3094
+ return r.push(g), g;
3095
3095
  }
3096
- function s(d) {
3097
- return r.find((l) => d(l)) || null;
3096
+ function s(c) {
3097
+ return r.find((l) => c(l)) || null;
3098
3098
  }
3099
3099
  return {
3100
3100
  query: o,
3101
3101
  find: s,
3102
- setIndex: (d) => {
3103
- t.index = d;
3102
+ setIndex: (c) => {
3103
+ t.index = c;
3104
3104
  },
3105
3105
  getIndex: () => t.index,
3106
3106
  cleanup: n
@@ -3134,13 +3134,13 @@ function ys(e, t, r) {
3134
3134
  const s = Tr(e);
3135
3135
  if (s) {
3136
3136
  n = to(s);
3137
- const i = e.resources ? e.resources[0] : "", d = xr(i);
3138
- d && (o = d.send);
3137
+ const i = e.resources ? e.resources[0] : "", c = xr(i);
3138
+ c && (o = c.send);
3139
3139
  }
3140
3140
  }
3141
3141
  return !n || !o ? (r(void 0, 424), mn) : n.query(t, o, r)().abort;
3142
3142
  }
3143
- function hn() {
3143
+ function pn() {
3144
3144
  }
3145
3145
  function xs(e) {
3146
3146
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
@@ -3173,7 +3173,7 @@ function Pt(e, t, r) {
3173
3173
  }
3174
3174
  n(), xs(e);
3175
3175
  }
3176
- function pn(e, t) {
3176
+ function hn(e, t) {
3177
3177
  e instanceof Promise ? e.then((r) => {
3178
3178
  t(r);
3179
3179
  }).catch(() => {
@@ -3187,63 +3187,63 @@ function vs(e, t) {
3187
3187
  if (delete e.iconsToLoad, !o || !o.length) return;
3188
3188
  const s = e.loadIcon;
3189
3189
  if (e.loadIcons && (o.length > 1 || !s)) {
3190
- pn(e.loadIcons(o, n, r), (p) => {
3191
- Pt(e, o, p);
3190
+ hn(e.loadIcons(o, n, r), (g) => {
3191
+ Pt(e, o, g);
3192
3192
  });
3193
3193
  return;
3194
3194
  }
3195
3195
  if (s) {
3196
- o.forEach((p) => {
3197
- const y = s(p, n, r);
3198
- pn(y, (x) => {
3196
+ o.forEach((g) => {
3197
+ const y = s(g, n, r);
3198
+ hn(y, (x) => {
3199
3199
  const S = x ? {
3200
3200
  prefix: n,
3201
- icons: { [p]: x }
3201
+ icons: { [g]: x }
3202
3202
  } : null;
3203
- Pt(e, [p], S);
3203
+ Pt(e, [g], S);
3204
3204
  });
3205
3205
  });
3206
3206
  return;
3207
3207
  }
3208
- const { valid: i, invalid: d } = bs(o);
3209
- if (d.length && Pt(e, d, null), !i.length) return;
3208
+ const { valid: i, invalid: c } = bs(o);
3209
+ if (c.length && Pt(e, c, null), !i.length) return;
3210
3210
  const l = n.match(Gn) ? xr(r) : null;
3211
3211
  if (!l) {
3212
3212
  Pt(e, i, null);
3213
3213
  return;
3214
3214
  }
3215
- l.prepare(r, n, i).forEach((p) => {
3216
- ys(r, p, (y) => {
3217
- Pt(e, p.icons, y);
3215
+ l.prepare(r, n, i).forEach((g) => {
3216
+ ys(r, g, (y) => {
3217
+ Pt(e, g.icons, y);
3218
3218
  });
3219
3219
  });
3220
3220
  }));
3221
3221
  }
3222
3222
  const ks = (e, t) => {
3223
- const r = hs(e, !0, Qn()), n = ms(r);
3223
+ const r = ps(e, !0, Qn()), n = ms(r);
3224
3224
  if (!n.pending.length) {
3225
3225
  let l = !0;
3226
3226
  return t && setTimeout(() => {
3227
- l && t(n.loaded, n.missing, n.pending, hn);
3227
+ l && t(n.loaded, n.missing, n.pending, pn);
3228
3228
  }), () => {
3229
3229
  l = !1;
3230
3230
  };
3231
3231
  }
3232
3232
  const o = /* @__PURE__ */ Object.create(null), s = [];
3233
- let i, d;
3233
+ let i, c;
3234
3234
  return n.pending.forEach((l) => {
3235
- const { provider: g, prefix: p } = l;
3236
- if (p === d && g === i) return;
3237
- i = g, d = p, s.push(bt(g, p));
3238
- const y = o[g] || (o[g] = /* @__PURE__ */ Object.create(null));
3239
- y[p] || (y[p] = []);
3235
+ const { provider: h, prefix: g } = l;
3236
+ if (g === c && h === i) return;
3237
+ i = h, c = g, s.push(bt(h, g));
3238
+ const y = o[h] || (o[h] = /* @__PURE__ */ Object.create(null));
3239
+ y[g] || (y[g] = []);
3240
3240
  }), n.pending.forEach((l) => {
3241
- const { provider: g, prefix: p, name: y } = l, x = bt(g, p), S = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
- S.has(y) || (S.add(y), o[g][p].push(y));
3241
+ const { provider: h, prefix: g, name: y } = l, x = bt(h, g), S = x.pendingIcons || (x.pendingIcons = /* @__PURE__ */ new Set());
3242
+ S.has(y) || (S.add(y), o[h][g].push(y));
3243
3243
  }), s.forEach((l) => {
3244
- const g = o[l.provider][l.prefix];
3245
- g.length && vs(l, g);
3246
- }), t ? fs(t, n, s) : hn;
3244
+ const h = o[l.provider][l.prefix];
3245
+ h.length && vs(l, h);
3246
+ }), t ? fs(t, n, s) : pn;
3247
3247
  };
3248
3248
  function Ss(e, t) {
3249
3249
  const r = { ...e };
@@ -3352,7 +3352,7 @@ function yn(e) {
3352
3352
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
3353
3353
  }
3354
3354
  const Ds = (e, t, r) => {
3355
- const n = t.inline ? $s : ro, o = Ss(n, t), s = t.mode || "svg", i = {}, d = t.style || {}, l = {
3355
+ const n = t.inline ? $s : ro, o = Ss(n, t), s = t.mode || "svg", i = {}, c = t.style || {}, l = {
3356
3356
  ...s === "svg" ? As : {}
3357
3357
  };
3358
3358
  if (r) {
@@ -3416,30 +3416,30 @@ const Ds = (e, t, r) => {
3416
3416
  n[N] === void 0 && (l[N] = P);
3417
3417
  }
3418
3418
  }
3419
- const g = Ga(e, o), p = g.attributes;
3419
+ const h = Ga(e, o), g = h.attributes;
3420
3420
  if (o.inline && (i.verticalAlign = "-0.125em"), s === "svg") {
3421
3421
  l.style = {
3422
3422
  ...i,
3423
- ...d
3424
- }, Object.assign(l, p);
3423
+ ...c
3424
+ }, Object.assign(l, g);
3425
3425
  let N = 0, P = t.id;
3426
3426
  return typeof P == "string" && (P = P.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
3427
- __html: Os(es(g.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3427
+ __html: Os(es(h.body, P ? () => P + "ID" + N++ : "iconifyReact"))
3428
3428
  }, cr("svg", l);
3429
3429
  }
3430
3430
  const { body: y, width: x, height: S } = e, _ = s === "mask" || (s === "bg" ? !1 : y.indexOf("currentColor") !== -1), F = Is(y, {
3431
- ...p,
3431
+ ...g,
3432
3432
  width: x + "",
3433
3433
  height: S + ""
3434
3434
  });
3435
3435
  return l.style = {
3436
3436
  ...i,
3437
3437
  "--svg": Ts(F),
3438
- width: yn(p.width),
3439
- height: yn(p.height),
3438
+ width: yn(g.width),
3439
+ height: yn(g.height),
3440
3440
  ...js,
3441
3441
  ..._ ? br : no,
3442
- ...d
3442
+ ...c
3443
3443
  }, cr("span", l);
3444
3444
  };
3445
3445
  Qn(!0);
@@ -3496,39 +3496,39 @@ function oo(e) {
3496
3496
  name: ""
3497
3497
  };
3498
3498
  }
3499
- const [i, d] = C(s(!!e.ssr));
3499
+ const [i, c] = C(s(!!e.ssr));
3500
3500
  function l() {
3501
3501
  const S = n.callback;
3502
3502
  S && (S(), o({}));
3503
3503
  }
3504
- function g(S) {
3504
+ function h(S) {
3505
3505
  if (JSON.stringify(i) !== JSON.stringify(S))
3506
- return l(), d(S), !0;
3506
+ return l(), c(S), !0;
3507
3507
  }
3508
- function p() {
3508
+ function g() {
3509
3509
  var S;
3510
3510
  const _ = e.icon;
3511
3511
  if (typeof _ == "object") {
3512
- g({
3512
+ h({
3513
3513
  name: "",
3514
3514
  data: _
3515
3515
  });
3516
3516
  return;
3517
3517
  }
3518
3518
  const F = dn(_);
3519
- if (g({
3519
+ if (h({
3520
3520
  name: _,
3521
3521
  data: F
3522
3522
  }))
3523
3523
  if (F === void 0) {
3524
- const N = ks([_], p);
3524
+ const N = ks([_], g);
3525
3525
  o({
3526
3526
  callback: N
3527
3527
  });
3528
3528
  } else F && ((S = e.onLoad) === null || S === void 0 || S.call(e, _));
3529
3529
  }
3530
- ke(() => (r(!0), l), []), ke(() => {
3531
- t && p();
3530
+ be(() => (r(!0), l), []), be(() => {
3531
+ t && g();
3532
3532
  }, [e.icon, t]);
3533
3533
  const { name: y, data: x } = i;
3534
3534
  return x ? Ds({
@@ -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 ae = _n((e, t) => oo({
3539
+ const re = _n((e, t) => oo({
3540
3540
  ...e,
3541
3541
  _ref: t
3542
3542
  }));
@@ -3555,23 +3555,23 @@ const He = "USD", xn = (e) => {
3555
3555
  const r = (e == null ? void 0 : e.prices) ?? [];
3556
3556
  if (!r.length) return null;
3557
3557
  const n = (i) => {
3558
- var g, p;
3559
- const d = i.find((y) => {
3558
+ var h, g;
3559
+ const c = i.find((y) => {
3560
3560
  var x;
3561
3561
  return !!((x = y.discounted) != null && x.value);
3562
3562
  });
3563
- if (d)
3563
+ if (c)
3564
3564
  return {
3565
- cent: d.discounted.value.centAmount,
3566
- cur: d.discounted.value.currencyCode,
3567
- regularCent: (g = d.value) == null ? void 0 : g.centAmount
3565
+ cent: c.discounted.value.centAmount,
3566
+ cur: c.discounted.value.currencyCode,
3567
+ regularCent: (h = c.value) == null ? void 0 : h.centAmount
3568
3568
  };
3569
- const l = (p = i[0]) == null ? void 0 : p.value;
3569
+ const l = (g = i[0]) == null ? void 0 : g.value;
3570
3570
  return l ? { cent: l.centAmount, cur: l.currencyCode } : null;
3571
3571
  }, o = r.filter(
3572
3572
  (i) => {
3573
- var d, l;
3574
- return ((l = ((d = i.discounted) == null ? void 0 : d.value) || i.value) == null ? void 0 : l.currencyCode) === t;
3573
+ var c, l;
3574
+ return ((l = ((c = i.discounted) == null ? void 0 : c.value) || i.value) == null ? void 0 : l.currencyCode) === t;
3575
3575
  }
3576
3576
  ), s = n(o);
3577
3577
  return s || n(r) || null;
@@ -3618,7 +3618,7 @@ const He = "USD", xn = (e) => {
3618
3618
  standard: "GROUND",
3619
3619
  express: "2-DAY SHIPPING",
3620
3620
  sameday: "OVERNIGHT"
3621
- }, je = (e, t) => {
3621
+ }, Ae = (e, t) => {
3622
3622
  try {
3623
3623
  return e.toLocaleString("en-US", {
3624
3624
  style: "currency",
@@ -3634,10 +3634,10 @@ const He = "USD", xn = (e) => {
3634
3634
  var t, r;
3635
3635
  return ((r = (t = e == null ? void 0 : e.images) == null ? void 0 : t[0]) == null ? void 0 : r.url) ?? "";
3636
3636
  }, vn = (e, t) => {
3637
- var r, n, o, s;
3638
- return Us(t) || (e == null ? void 0 : e.image) || ((n = (r = e == null ? void 0 : e.images) == null ? void 0 : r[0]) == null ? void 0 : n.src) || ((s = (o = e == null ? void 0 : e.media) == null ? void 0 : o[0]) == null ? void 0 : s.url) || "";
3637
+ var r, n, o, s, i, c, l, h;
3638
+ return Us(t) || ((s = (o = (n = (r = e.imageGroups) == null ? void 0 : r[0]) == null ? void 0 : n.images) == null ? void 0 : o[0]) == null ? void 0 : s.link) || ((h = (l = (c = (i = e.image_groups) == null ? void 0 : i[0]) == null ? void 0 : c.images) == null ? void 0 : l[0]) == null ? void 0 : h.link) || "";
3639
3639
  }, kn = (e) => (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || (e == null ? void 0 : e.productName) || "any", Vt = (e) => {
3640
- var s, i, d, l, g, p;
3640
+ var s, i, c, l, h, g;
3641
3641
  const t = e ? vr(e, He) : null;
3642
3642
  if (t != null && t.cent && (t != null && t.cur))
3643
3643
  return {
@@ -3645,7 +3645,7 @@ const He = "USD", xn = (e) => {
3645
3645
  currency: t.cur,
3646
3646
  regularAmount: t.regularCent ? t.regularCent / 100 : void 0
3647
3647
  };
3648
- const r = (d = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : d.centAmount, n = ((p = (g = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : g.value) == null ? void 0 : p.currencyCode) ?? He;
3648
+ const r = (c = (i = (s = e == null ? void 0 : e.prices) == null ? void 0 : s[0]) == null ? void 0 : i.value) == null ? void 0 : c.centAmount, n = ((g = (h = (l = e == null ? void 0 : e.prices) == null ? void 0 : l[0]) == null ? void 0 : h.value) == null ? void 0 : g.currencyCode) ?? He;
3649
3649
  return { amount: Number.isFinite(r) ? +(Number(r) / 100) : 0, currency: n };
3650
3650
  }, Sn = (e, t) => {
3651
3651
  const { amount: r } = Vt(t);
@@ -3670,48 +3670,48 @@ const He = "USD", xn = (e) => {
3670
3670
  addressLoading: s
3671
3671
  }) => {
3672
3672
  console.log(r, "the product for ai shopping");
3673
- const i = null, d = null, l = Ht(r), g = Math.min(
3673
+ const i = null, c = null, l = Ht(r), h = 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), [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
- const u = Ht(r), h = Math.min(
3676
+ ), g = l.length, [y, x] = C(h), [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), [Q, Pe] = C(!1), [$e, pe] = C(""), [L, O] = C(!1), [q, 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, W] = C(!1), [Ne, ee] = C(!1), [k, J] = C(!1), [G, de] = C(null), [Ce, et] = C(null), [mt, At] = C(""), [Be, jt] = C(!1), pt = Re(null);
3677
+ be(() => {
3678
+ const u = Ht(r), p = Math.min(
3679
3679
  Math.max(0, n || 0),
3680
3680
  Math.max(0, u.length - 1)
3681
3681
  );
3682
- x(h);
3682
+ x(p);
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]), ke(() => {
3686
- ht.current && (ht.current.scrollTop = ht.current.scrollHeight);
3685
+ }, [n, r]), be(() => {
3686
+ pt.current && (pt.current.scrollTop = pt.current.scrollHeight);
3687
3687
  }, [
3688
3688
  Ye,
3689
- de,
3689
+ le,
3690
3690
  j,
3691
- J,
3691
+ Y,
3692
3692
  B,
3693
- ee,
3694
- te,
3695
- _e,
3693
+ X,
3694
+ Z,
3695
+ Ne,
3696
3696
  k,
3697
3697
  E,
3698
- ye
3698
+ we
3699
3699
  ]);
3700
- const I = "var(--tanya)", Le = "var(--tanya-contrast)", tt = I, kt = "#804c9e", so = () => {
3700
+ const I = "var(--tanya)", De = "var(--tanya-contrast)", tt = I, kt = "#804c9e", so = () => {
3701
3701
  console.log("AgenticShopping feedback:", {
3702
- rating: Ie,
3702
+ rating: Ce,
3703
3703
  comment: mt
3704
3704
  }), jt(!0);
3705
3705
  }, io = () => {
3706
3706
  et(null), At(""), jt(!0);
3707
3707
  }, Ar = (u) => {
3708
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
- 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(ae, { icon: "mdi:check-circle", width: "28", color: "#16a34a" }) }),
3711
- /* @__PURE__ */ c("div", { className: "text-sm w-full", children: [
3709
+ return e ? /* @__PURE__ */ d("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" }) }),
3711
+ /* @__PURE__ */ d("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." }),
3714
- f && /* @__PURE__ */ c("div", { className: "mt-2 text-xs font-medium", children: [
3714
+ f && /* @__PURE__ */ d("div", { className: "mt-2 text-xs font-medium", children: [
3715
3715
  "Your Smart Order ID: ",
3716
3716
  /* @__PURE__ */ a(
3717
3717
  "span",
@@ -3721,7 +3721,7 @@ const He = "USD", xn = (e) => {
3721
3721
  }
3722
3722
  )
3723
3723
  ] }),
3724
- !Be && /* @__PURE__ */ c("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3724
+ !Be && /* @__PURE__ */ d("div", { className: "mt-4 rounded-lg bg-white/70 p-3 text-gray-900", children: [
3725
3725
  /* @__PURE__ */ a("h4", { className: "font-semibold mb-1", children: "Please post your feedback here" }),
3726
3726
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-700 mb-3", children: "Rate us on how much our response was helpful" }),
3727
3727
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 mb-3", children: [1, 2, 3, 4, 5].map((v) => /* @__PURE__ */ a(
@@ -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
- ae,
3734
+ re,
3735
3735
  {
3736
- icon: Ie && Ie >= v ? "mdi:star" : "mdi:star-outline",
3736
+ icon: Ce && Ce >= v ? "mdi:star" : "mdi:star-outline",
3737
3737
  width: "20",
3738
3738
  className: "text-yellow-500"
3739
3739
  }
@@ -3752,7 +3752,7 @@ const He = "USD", xn = (e) => {
3752
3752
  placeholder: "Your feedback helps us improve..."
3753
3753
  }
3754
3754
  ),
3755
- /* @__PURE__ */ c("div", { className: "mt-3 flex justify-end gap-2", children: [
3755
+ /* @__PURE__ */ d("div", { className: "mt-3 flex justify-end gap-2", children: [
3756
3756
  /* @__PURE__ */ a(
3757
3757
  "button",
3758
3758
  {
@@ -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: !Ie && !mt.trim(),
3772
+ disabled: !Ce && !mt.trim(),
3773
3773
  children: "Submit"
3774
3774
  }
3775
3775
  )
@@ -3784,73 +3784,73 @@ const He = "USD", xn = (e) => {
3784
3784
  } catch (u) {
3785
3785
  console.error("Error fetching addresses:", u);
3786
3786
  }
3787
- }, St = (u, h) => {
3788
- Se((f) => [
3787
+ }, St = (u, p) => {
3788
+ ve((f) => [
3789
3789
  ...f,
3790
3790
  {
3791
3791
  query: "",
3792
3792
  response: "__SNAPSHOT__",
3793
3793
  snapshotStage: u,
3794
- snapshotPayload: h
3794
+ snapshotPayload: p
3795
3795
  }
3796
3796
  ]);
3797
- }, jr = (u, h) => {
3798
- Se(
3797
+ }, jr = (u, p) => {
3798
+ ve(
3799
3799
  (f) => f.map(
3800
3800
  (v) => v.response === "__CARD__" ? {
3801
3801
  ...v,
3802
3802
  response: "__SNAPSHOT__",
3803
3803
  snapshotStage: u ?? v.snapshotStage,
3804
- snapshotPayload: h ?? v.snapshotPayload
3804
+ snapshotPayload: p ?? v.snapshotPayload
3805
3805
  } : v
3806
3806
  )
3807
3807
  );
3808
3808
  }, co = () => {
3809
- Se(
3809
+ ve(
3810
3810
  (u) => u.filter(
3811
- (h) => !(h.query === "" && h.response !== "__SNAPSHOT__" && h.response !== "__TEXT__")
3811
+ (p) => !(p.query === "" && p.response !== "__SNAPSHOT__" && p.response !== "__TEXT__")
3812
3812
  )
3813
3813
  );
3814
3814
  }, $t = () => {
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);
3815
+ ee(!1), Te(!1), z(!1), ne(!1), $(!1), D(!1), W(!1), J(!1), O(!1), Xe(null), co(), H(!1), ae(!1);
3816
3816
  }, uo = () => {
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) => ({
3817
+ Te(!1), $(!1), z(!1), ce("standard"), D(!1), ne(!1), Se("card"), W(!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((p, f) => ({
3819
3819
  index: f,
3820
- variant: h,
3821
- images: ((h == null ? void 0 : h.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3820
+ variant: p,
3821
+ images: ((p == null ? void 0 : p.images) || []).map((v) => (v == null ? void 0 : v.url) || "").filter(Boolean)
3822
3822
  })), [r]), Nt = Rr(() => {
3823
- if (!Ee.length) return !1;
3824
- const u = S || void 0, h = F || void 0, f = (v, T) => {
3825
- var q;
3823
+ if (!Fe.length) return !1;
3824
+ const u = S || void 0, p = F || void 0, f = (v, T) => {
3825
+ var U;
3826
3826
  const b = ot(
3827
- Ee,
3827
+ Fe,
3828
3828
  v || void 0,
3829
3829
  T || void 0
3830
3830
  );
3831
- return !!(b && ((q = b.variant) != null && q.sku));
3831
+ return !!(b && ((U = b.variant) != null && U.sku));
3832
3832
  };
3833
- return u && h ? f(u, h) : u && !h ? f(u, null) : !u && h ? f(void 0, h) : !!(w && w.sku);
3834
- }, [Ee, S, F, w]), fo = Z || L || !Nt, Ct = (u) => {
3835
- const h = Number((u == null ? void 0 : u.quantity) ?? 1);
3836
- return Number.isFinite(h) && h > 0 ? h : 1;
3833
+ return u && p ? f(u, p) : u && !p ? f(u, null) : !u && p ? f(void 0, p) : !!(w && w.sku);
3834
+ }, [Fe, S, F, w]), fo = Q || L || !Nt, Ct = (u) => {
3835
+ const p = Number((u == null ? void 0 : u.quantity) ?? 1);
3836
+ return Number.isFinite(p) && p > 0 ? p : 1;
3837
3837
  }, $r = (u) => {
3838
- const h = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3839
- return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, w) * h);
3838
+ const p = Ct(u), f = Number((u == null ? void 0 : u.max_price_minor) ?? 0);
3839
+ return Number.isFinite(f) && f > 0 ? +(f / 100) : +(Sn(r, w) * p);
3840
3840
  }, Dr = (u) => {
3841
- var Q;
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
- return { product_total: T, tax: b, shipping_fee: q, currency: v };
3844
- }, tr = async (u, h, f) => {
3845
- jr(), uo(), Oe(!0), O(!0), H(!1), ie(!1);
3846
- const v = Pe.slice(-Cn);
3841
+ var K;
3842
+ const p = q, f = Vt(w), v = u || (p == null ? void 0 : p.currency) || f.currency || He, T = $r(p), b = +(T * 0.08).toFixed(2), U = ((K = at[A]) == null ? void 0 : K.fee) || 0;
3843
+ return { product_total: T, tax: b, shipping_fee: U, currency: v };
3844
+ }, tr = async (u, p, f) => {
3845
+ jr(), uo(), Pe(!0), O(!0), H(!1), ae(!1);
3846
+ const v = _e.slice(-Cn);
3847
3847
  try {
3848
- const T = await ur(i, d);
3848
+ const T = await ur(i, c);
3849
3849
  if (!T) throw new Error("Failed to fetch token");
3850
- const b = localStorage.getItem("customerNumber"), q = localStorage.getItem("isLoggedIn"), oe = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3851
- registered: String(q || !1),
3850
+ const b = localStorage.getItem("customerNumber"), U = localStorage.getItem("isLoggedIn"), ue = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
3851
+ registered: String(U || !1),
3852
3852
  userId: String(b || (/* @__PURE__ */ new Date()).getTime())
3853
- }).toString()}`, V = await fetch(`${oe}`, {
3853
+ }).toString()}`, te = await fetch(`${ue}`, {
3854
3854
  method: "POST",
3855
3855
  headers: {
3856
3856
  "Content-Type": "application/json",
@@ -3860,110 +3860,110 @@ const He = "USD", xn = (e) => {
3860
3860
  flowId: "MTMI0P4LC6",
3861
3861
  flowAliasId: "BCUA138F2Q",
3862
3862
  input: {
3863
- instruction: `Use SKU ${h}. Currency is USD. ${u}`,
3863
+ instruction: `Use SKU ${p}. Currency is USD. ${u}`,
3864
3864
  metadata: {
3865
3865
  productId: (r == null ? void 0 : r.id) ?? null,
3866
- skuId: h ?? null,
3866
+ skuId: p ?? null,
3867
3867
  variantIndex: f
3868
3868
  },
3869
3869
  context: v
3870
3870
  }
3871
3871
  })
3872
3872
  });
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 = "";
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 = "";
3876
3876
  for (; ; ) {
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(`
3877
+ const { done: he, value: Je } = await ye.read();
3878
+ if (he) break;
3879
+ Ee += oe.decode(Je, { stream: !0 });
3880
+ const ht = Ee.split(`
3881
3881
  `);
3882
- xe = pt.pop() || "";
3883
- for (const gt of pt) {
3882
+ Ee = ht.pop() || "";
3883
+ for (const gt of ht) {
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, me = Ue.data;
3888
- ze === 0 ? be = String(me ?? "") : ze === 1 && (Fe = String(me ?? ""));
3887
+ const Ue = JSON.parse(rt), ze = Ue.index, fe = Ue.data;
3888
+ ze === 0 ? Oe = String(fe ?? "") : ze === 1 && (Le = String(fe ?? ""));
3889
3889
  } catch (Ue) {
3890
3890
  console.error("Error parsing JSON chunk:", Ue);
3891
3891
  }
3892
3892
  }
3893
3893
  }
3894
- let ne = null;
3895
- if (be) {
3896
- const ge = String(be).replace(/\\n/g, "").trim();
3897
- if (ge.startsWith("{") && ge.endsWith("}"))
3894
+ let se = null;
3895
+ if (Oe) {
3896
+ const he = String(Oe).replace(/\\n/g, "").trim();
3897
+ if (he.startsWith("{") && he.endsWith("}"))
3898
3898
  try {
3899
- ne = JSON.parse(ge), ne.product_id = h, ne.sku_id = h, localStorage.setItem("agentic_order", JSON.stringify(ne));
3899
+ se = JSON.parse(he), se.product_id = p, se.sku_id = p, localStorage.setItem("agentic_order", JSON.stringify(se));
3900
3900
  } catch (Je) {
3901
3901
  console.log(Je);
3902
3902
  }
3903
3903
  }
3904
- Xe(ne), ne && Se((ge) => [
3905
- ...ge,
3904
+ Xe(se), se && ve((he) => [
3905
+ ...he,
3906
3906
  {
3907
3907
  query: "",
3908
3908
  response: "__CARD__",
3909
- snapshotPayload: { extractedDetails: ne }
3909
+ snapshotPayload: { extractedDetails: se }
3910
3910
  }
3911
- ]), ft((ge) => [
3912
- ...ge,
3911
+ ]), ft((he) => [
3912
+ ...he,
3913
3913
  {
3914
3914
  userQuery: u,
3915
- mainResponse: be || "",
3916
- keywords: Fe || ""
3915
+ mainResponse: Oe || "",
3916
+ keywords: Le || ""
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
- Oe(!1);
3922
+ Pe(!1);
3923
3923
  }
3924
3924
  }, Lr = async (u) => {
3925
- if (L || Z || !Nt) return;
3926
- const h = De.trim();
3927
- if (!h) return;
3928
- Se((b) => [...b, { query: h, response: "" }]), pe(""), $e(h);
3925
+ if (L || Q || !Nt) return;
3926
+ const p = $e.trim();
3927
+ if (!p) return;
3928
+ ve((b) => [...b, { query: p, response: "" }]), pe(""), je(p);
3929
3929
  const f = w == null ? void 0 : w.sku, v = Nn(r), T = f || v || "";
3930
- if (p <= 1) {
3930
+ if (g <= 1) {
3931
3931
  if (T) {
3932
- tr(h, T, y);
3932
+ tr(p, T, y);
3933
3933
  return;
3934
3934
  }
3935
- ie(!0), O(!0);
3935
+ ae(!0), O(!0);
3936
3936
  return;
3937
3937
  }
3938
- T ? (H(!0), O(!0)) : (ie(!0), O(!0));
3938
+ T ? (H(!0), O(!0)) : (ae(!0), O(!0));
3939
3939
  }, mo = () => {
3940
3940
  const u = w == null ? void 0 : w.sku;
3941
- u && tr(Y, u, y);
3942
- }, ho = () => {
3943
- H(!1), ie(!0), O(!0);
3941
+ u && tr(V, u, y);
3944
3942
  }, po = () => {
3943
+ H(!1), ae(!0), O(!0);
3944
+ }, ho = () => {
3945
3945
  if (!w || !w.sku) return;
3946
3946
  const u = w.sku;
3947
- tr(Y, u, y);
3947
+ tr(V, u, y);
3948
3948
  }, go = async () => {
3949
- Ae(!0), z(!1), se(!1), re(!1), $(!1), D(!1), W(!1), K(!1), await lo(), jr("initial", {
3950
- extractedDetails: U ?? void 0
3949
+ Te(!0), z(!1), ne(!1), ee(!1), $(!1), D(!1), W(!1), J(!1), await lo(), jr("initial", {
3950
+ extractedDetails: q ?? void 0
3951
3951
  });
3952
3952
  }, wo = () => {
3953
- if (!Te) return;
3953
+ if (!Ie) return;
3954
3954
  const u = Ze.find(
3955
- (h) => String(h.addressId ?? h.id) === Te
3955
+ (p) => String(p.addressId ?? p.id) === Ie
3956
3956
  ) || null;
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));
3957
+ u && (localStorage.setItem("agentic_order_address", JSON.stringify(u)), $(!0), z(!0), D(!1), ne(!1), W(!1), ee(!1), J(!1), St("address", u));
3958
3958
  }, yo = () => {
3959
- $(!1), z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_address");
3959
+ $(!1), z(!1), D(!1), ne(!1), W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_address");
3960
3960
  }, xo = () => {
3961
- A && (localStorage.setItem("agentic_order_delivery", A), D(!0), se(!0), W(!1), re(!1), K(!1), St("delivery", {
3961
+ A && (localStorage.setItem("agentic_order_delivery", A), D(!0), ne(!0), W(!1), ee(!1), J(!1), St("delivery", {
3962
3962
  method: A,
3963
3963
  ...at[A]
3964
3964
  }));
3965
3965
  }, zr = () => {
3966
- z(!1), D(!1), se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3966
+ z(!1), D(!1), ne(!1), W(!1), ee(!1), J(!1), O(!1), $t(), ve((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), se(!1), W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_delivery");
3977
+ D(!1), ne(!1), W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_delivery");
3978
3978
  }, vo = () => {
3979
- Ne && (localStorage.setItem("agentic_order_payment", Ne), W(!0), re(!0), K(!1), St("payment", { method: Ne }));
3979
+ ke && (localStorage.setItem("agentic_order_payment", ke), W(!0), ee(!0), J(!1), St("payment", { method: ke }));
3980
3980
  }, ko = () => {
3981
- se(!1), W(!1), re(!1), K(!1), O(!1), $t(), Se((u) => [
3981
+ ne(!1), W(!1), ee(!1), J(!1), O(!1), $t(), ve((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
- W(!1), re(!1), K(!1), localStorage.removeItem("agentic_order_payment");
3992
+ W(!1), ee(!1), J(!1), localStorage.removeItem("agentic_order_payment");
3993
3993
  }, No = async () => {
3994
3994
  try {
3995
- Oe(!0);
3996
- const u = U || {}, h = JSON.parse(
3995
+ Pe(!0);
3996
+ const u = q || {}, p = 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(), 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,
4000
+ ), v = localStorage.getItem("agentic_order_payment") || "card", { product_total: T, tax: b, shipping_fee: U, currency: K } = Dr(), ue = u.shopper_id || localStorage.getItem("customerId") || void 0, te = (p == null ? void 0 : p.addressId) || (p == null ? void 0 : p.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), ht = {
4001
+ shopper_id: ue,
4002
+ shipping_address_id: te,
4003
+ shipping_method_id: ye,
4004
+ payment_method_id: oe,
4005
+ sku: Ee,
4006
4006
  platform: "SFCC",
4007
4007
  storeCode: "Sites-SiteGenesis-Site",
4008
- product_id: be,
4009
- quantity: Fe,
4010
- max_price_minor: ne,
4011
- currency: Q,
4012
- instruction_text: Y
4008
+ product_id: Oe,
4009
+ quantity: Le,
4010
+ max_price_minor: se,
4011
+ currency: K,
4012
+ instruction_text: V
4013
4013
  };
4014
- if (!oe || !V) {
4014
+ if (!ue || !te) {
4015
4015
  console.error(
4016
4016
  "Missing shopper_id or shipping_address_id for intent-mandate",
4017
4017
  {
4018
- shopperId: oe,
4019
- shippingAddressId: V
4018
+ shopperId: ue,
4019
+ shippingAddressId: te
4020
4020
  }
4021
4021
  ), alert(
4022
4022
  "Missing customer or address information. Please re-select address and try again."
4023
- ), Oe(!1);
4023
+ ), Pe(!1);
4024
4024
  return;
4025
4025
  }
4026
4026
  const rt = (await vt()).access_token;
@@ -4032,37 +4032,37 @@ const He = "USD", xn = (e) => {
4032
4032
  "Content-Type": "application/json",
4033
4033
  Authorization: `Bearer ${rt}`
4034
4034
  },
4035
- body: JSON.stringify(pt)
4035
+ body: JSON.stringify(ht)
4036
4036
  });
4037
4037
  if (!ze.ok) {
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
- ), Oe(!1);
4041
+ ), Pe(!1);
4042
4042
  return;
4043
4043
  }
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);
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);
4048
4048
  const Dt = {
4049
4049
  ...u,
4050
- address: h,
4050
+ address: p,
4051
4051
  delivery: f,
4052
4052
  payment: v,
4053
- summary: { product_total: T, tax: b, shipping_fee: q, currency: Q },
4053
+ summary: { product_total: T, tax: b, shipping_fee: U, currency: K },
4054
4054
  intent_mandate_id: nt
4055
4055
  };
4056
- localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), K(!0), m(!1), St("final", Dt), St("success", { intentMandateId: nt }), $t();
4056
+ localStorage.setItem("agentic_order_final", JSON.stringify(Dt)), J(!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
- Oe(!1);
4062
+ Pe(!1);
4063
4063
  }
4064
4064
  }, Mr = () => {
4065
- $t(), Se((u) => [
4065
+ $t(), ve((u) => [
4066
4066
  ...u,
4067
4067
  {
4068
4068
  query: "",
@@ -4073,72 +4073,71 @@ const He = "USD", xn = (e) => {
4073
4073
  }
4074
4074
  ]);
4075
4075
  }, Co = () => {
4076
- var oe, V, le, X, xe, be, Fe, ne;
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;
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: [
4076
+ const u = vn(r, w), p = kn(r), f = (w == null ? void 0 : w.id) || "", v = qe(w) || "", T = We(w) || "", { amount: b } = Vt(w), U = !!(w != null && w.id), K = w && U ? xn(w) : !1;
4077
+ return console.log(u, p, f, v, T, b, U, K, "base product"), /* @__PURE__ */ a("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4", children: /* @__PURE__ */ d("div", { className: "flex flex-col sm:flex-row items-center sm:items-center gap-4", children: [
4079
4078
  /* @__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(
4080
4079
  "img",
4081
4080
  {
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),
4083
- alt: h,
4081
+ src: u,
4082
+ alt: p,
4084
4083
  className: "object-contain w-full h-full"
4085
4084
  }
4086
4085
  ) : /* @__PURE__ */ a(
4087
- ae,
4086
+ re,
4088
4087
  {
4089
4088
  icon: "mdi:image-outline",
4090
4089
  width: "28",
4091
4090
  className: "opacity-60"
4092
4091
  }
4093
4092
  ) }) }),
4094
- /* @__PURE__ */ c("div", { className: "flex-grow flex flex-col justify-center text-center", children: [
4095
- /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: h }),
4093
+ /* @__PURE__ */ d("div", { className: "flex-grow flex flex-col justify-center text-center", children: [
4094
+ /* @__PURE__ */ a("div", { className: "text-2xl font-bold text-gray-900 mb-1", children: p }),
4096
4095
  /* @__PURE__ */ a("div", { className: "text-sm text-gray-700 mb-1", children: [
4097
4096
  f && `SKU: ${f}`,
4098
4097
  v && `Color: ${v}`,
4099
4098
  T && `Size: ${T}`
4100
4099
  ].filter(Boolean).join(" • ") || "—" }),
4101
- /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: q ? je(Number(b) || 0, He) : "Currently unavailable" }),
4102
- q && !Q && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4100
+ /* @__PURE__ */ a("div", { className: "mt-1 text-xl font-semibold text-gray-900", children: U ? Ae(Number(b) || 0, He) : "Currently unavailable" }),
4101
+ U && !K && /* @__PURE__ */ a("div", { className: "mt-1 text-xs font-medium text-red-600", children: "Currently out of stock" })
4103
4102
  ] })
4104
4103
  ] }) });
4105
4104
  }, Br = ({
4106
4105
  showSubmit: u = !0
4107
4106
  }) => {
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));
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: [
4107
+ const p = {}, f = Fe.map((b) => qe(b.variant)).filter((b) => !!b && !p[b] && (p[b] = !0)), v = {}, T = Fe.map((b) => We(b.variant)).filter((b) => !!b && !v[b] && (v[b] = !0));
4108
+ return /* @__PURE__ */ d("div", { className: "mx-4 mt-4 mb-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4110
4109
  /* @__PURE__ */ a("h3", { className: "font-semibold text-gray-800", children: "Choose a variant" }),
4111
- f.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
4112
- /* @__PURE__ */ c("div", { className: "flex items-baseline gap-2", children: [
4110
+ f.length > 0 && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4111
+ /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4113
4112
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Color :" }),
4114
4113
  S && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: S })
4115
4114
  ] }),
4116
4115
  /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-4 mt-2", children: f.map((b) => {
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];
4121
- return /* @__PURE__ */ c(
4116
+ var Le;
4117
+ const U = S === b, K = F || R.current || null, ue = K ? ot(Fe, b, K) : 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];
4120
+ return /* @__PURE__ */ d(
4122
4121
  "div",
4123
4122
  {
4124
4123
  className: `flex flex-col items-center w-28 border rounded-md p-2
4125
- ${q ? "border-2 border-tanya-light" : "border-gray-300"}
4126
- ${!V || !le ? "opacity-60" : ""}`,
4124
+ ${U ? "border-2 border-tanya-light" : "border-gray-300"}
4125
+ ${!te || !ye ? "opacity-60" : ""}`,
4127
4126
  children: [
4128
4127
  /* @__PURE__ */ a(
4129
4128
  "button",
4130
4129
  {
4131
4130
  onClick: () => {
4132
4131
  _(b);
4133
- const ne = F || R.current || null, ge = ne && ot(Ee, b, ne) || ot(Ee, b, null);
4134
- ge && x(ge.index);
4132
+ const se = F || R.current || null, he = se && ot(Fe, b, se) || ot(Fe, b, null);
4133
+ he && x(he.index);
4135
4134
  },
4136
4135
  className: "w-full h-20 flex items-center justify-center overflow-hidden",
4137
4136
  title: b,
4138
- children: be ? /* @__PURE__ */ a(
4137
+ children: Oe ? /* @__PURE__ */ a(
4139
4138
  "img",
4140
4139
  {
4141
- src: be,
4140
+ src: Oe,
4142
4141
  alt: b,
4143
4142
  className: "w/full h-full object-contain"
4144
4143
  }
@@ -4146,13 +4145,13 @@ const He = "USD", xn = (e) => {
4146
4145
  }
4147
4146
  ),
4148
4147
  /* @__PURE__ */ a("div", { className: "w-full border-t my-2" }),
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
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__ */ d("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
4156
4155
  ) })
4157
4156
  ] })
4158
4157
  ]
@@ -4161,8 +4160,8 @@ const He = "USD", xn = (e) => {
4161
4160
  );
4162
4161
  }) })
4163
4162
  ] }),
4164
- T.length > 0 && /* @__PURE__ */ c("div", { className: "mt-4", children: [
4165
- /* @__PURE__ */ c("div", { className: "flex items-baseline gap-2", children: [
4163
+ T.length > 0 && /* @__PURE__ */ d("div", { className: "mt-4", children: [
4164
+ /* @__PURE__ */ d("div", { className: "flex items-baseline gap-2", children: [
4166
4165
  /* @__PURE__ */ a("div", { className: "text-sm font-bold", children: "Size :" }),
4167
4166
  F && /* @__PURE__ */ a("div", { className: "text-sm text-gray-600", children: F })
4168
4167
  ] }),
@@ -4171,8 +4170,8 @@ const He = "USD", xn = (e) => {
4171
4170
  {
4172
4171
  onClick: () => {
4173
4172
  N(b);
4174
- const Q = S && ot(Ee, S, b) || ot(Ee, void 0, b);
4175
- Q && x(Q.index);
4173
+ const K = S && ot(Fe, S, b) || ot(Fe, void 0, b);
4174
+ K && x(K.index);
4176
4175
  },
4177
4176
  className: `px-4 py-2 rounded-md border text-sm ${F === b ? "border-2 border-tanya-light font-semibold" : "border-gray-300"}`,
4178
4177
  title: b,
@@ -4184,7 +4183,7 @@ const He = "USD", xn = (e) => {
4184
4183
  u && /* @__PURE__ */ a("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a(
4185
4184
  "button",
4186
4185
  {
4187
- onClick: po,
4186
+ onClick: ho,
4188
4187
  className: "px-6 py-2.5 rounded-full font-semibold text-white shadow-md",
4189
4188
  style: { background: I },
4190
4189
  disabled: !Nt,
@@ -4192,12 +4191,12 @@ const He = "USD", xn = (e) => {
4192
4191
  }
4193
4192
  ) })
4194
4193
  ] });
4195
- }, Ur = (u, h = !0) => {
4194
+ }, Ur = (u, p = !0) => {
4196
4195
  !(u != null && u.extractedDetails) && u && (u = { extractedDetails: u });
4197
- const f = (u == null ? void 0 : u.extractedDetails) || U;
4196
+ const f = (u == null ? void 0 : u.extractedDetails) || q;
4198
4197
  if (!f) return null;
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;
4200
- return /* @__PURE__ */ c(
4198
+ const v = Ct(f), { currency: T } = Vt(w), b = Sn(r, w), U = Number((f == null ? void 0 : f.max_price_minor) ?? 0), ue = Number.isFinite(U) && U > 0 ? +(U / 100) : +(b * v), te = (f == null ? void 0 : f.currency) || T || He, ye = w != null && w.sku ? w.sku : f.product_id;
4199
+ return /* @__PURE__ */ d(
4201
4200
  "div",
4202
4201
  {
4203
4202
  className: "px-6 pb-6 flex flex-col items-center space-y-4",
@@ -4207,42 +4206,42 @@ const He = "USD", xn = (e) => {
4207
4206
  "p",
4208
4207
  {
4209
4208
  className: "text-base font-semibold text-center mt-2",
4210
- style: { color: Le },
4209
+ style: { color: De },
4211
4210
  children: "Here’s what I found from your instruction:"
4212
4211
  }
4213
4212
  ),
4214
- /* @__PURE__ */ c("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4215
- /* @__PURE__ */ c("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4213
+ /* @__PURE__ */ d("div", { className: "w-full max-w-md bg-white rounded-xl shadow-inner p-4", children: [
4214
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-y-2 text-sm", children: [
4216
4215
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "SKU:" }),
4217
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: le }),
4216
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: ye }),
4218
4217
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Quantity:" }),
4219
4218
  /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ct(f) }),
4220
4219
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Currency:" }),
4221
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: V }),
4220
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: te }),
4222
4221
  /* @__PURE__ */ a("p", { className: "font-semibold text-gray-600", children: "Maximum Total Price:" }),
4223
- /* @__PURE__ */ a("p", { className: "text-gray-800", children: je(oe, V) })
4222
+ /* @__PURE__ */ a("p", { className: "text-gray-800", children: Ae(ue, te) })
4224
4223
  ] }),
4225
- /* @__PURE__ */ c("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4226
- qe(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4224
+ /* @__PURE__ */ d("div", { className: "mt-3 flex flex-wrap gap-2 text-xs", children: [
4225
+ qe(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4227
4226
  "Color: ",
4228
4227
  qe(w)
4229
4228
  ] }),
4230
- We(w) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4229
+ We(w) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4231
4230
  "Size: ",
4232
4231
  We(w)
4233
4232
  ] }),
4234
- (w == null ? void 0 : w.sku) && /* @__PURE__ */ c("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4233
+ (w == null ? void 0 : w.sku) && /* @__PURE__ */ d("span", { className: "rounded-full bg-gray-100 px-2 py-1", children: [
4235
4234
  "SKU: ",
4236
4235
  w.sku
4237
4236
  ] })
4238
4237
  ] })
4239
4238
  ] }),
4240
- !h && /* @__PURE__ */ c(ve, { children: [
4241
- /* @__PURE__ */ c(
4239
+ !p && /* @__PURE__ */ d(xe, { children: [
4240
+ /* @__PURE__ */ d(
4242
4241
  "p",
4243
4242
  {
4244
4243
  className: "text-sm font-medium text-gray-700 text-center max-w-[90%] leading-relaxed",
4245
- style: { color: Le },
4244
+ style: { color: De },
4246
4245
  children: [
4247
4246
  "Would you like me to ",
4248
4247
  /* @__PURE__ */ a("strong", { children: "lock this in" }),
@@ -4250,17 +4249,17 @@ const He = "USD", xn = (e) => {
4250
4249
  ]
4251
4250
  }
4252
4251
  ),
4253
- /* @__PURE__ */ c("div", { className: "flex flex-wrap justify-center gap-4", children: [
4254
- /* @__PURE__ */ c(
4252
+ /* @__PURE__ */ d("div", { className: "flex flex-wrap justify-center gap-4", children: [
4253
+ /* @__PURE__ */ d(
4255
4254
  "button",
4256
4255
  {
4257
4256
  onClick: go,
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"}`,
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"}`,
4260
4259
  style: { background: `${I}` },
4261
4260
  children: [
4262
4261
  /* @__PURE__ */ a(
4263
- ae,
4262
+ re,
4264
4263
  {
4265
4264
  icon: "fluent:checkmark-circle-24-filled",
4266
4265
  className: "mr-2",
@@ -4272,16 +4271,16 @@ const He = "USD", xn = (e) => {
4272
4271
  ]
4273
4272
  }
4274
4273
  ),
4275
- /* @__PURE__ */ c(
4274
+ /* @__PURE__ */ d(
4276
4275
  "button",
4277
4276
  {
4278
4277
  onClick: Mr,
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 },
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 },
4282
4281
  children: [
4283
4282
  /* @__PURE__ */ a(
4284
- ae,
4283
+ re,
4285
4284
  {
4286
4285
  icon: "fluent:dismiss-circle-24-filled",
4287
4286
  className: "mr-2",
@@ -4298,23 +4297,23 @@ const He = "USD", xn = (e) => {
4298
4297
  ]
4299
4298
  }
4300
4299
  );
4301
- }, qr = (u, h = !0) => {
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 ? [
4300
+ }, qr = (u, p = !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) || (q == null ? void 0 : q.currency) || He, T = vn(r, w), b = kn(r), U = w != null && w.sku ? w.sku : (r == null ? void 0 : r.id) ?? (q == null ? void 0 : q.product_id), K = (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), he = f != null && f.address ? [
4304
4303
  f.address.addressLine1,
4305
4304
  f.address.addressLine2,
4306
4305
  f.address.street,
4307
4306
  [f.address.city, f.address.state, f.address.postalCode].filter(Boolean).join(", "),
4308
4307
  f.address.country
4309
- ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", pt = Je === "card" ? /* @__PURE__ */ c(ve, { children: [
4308
+ ].filter(Boolean).map((Dt) => Ke(String(Dt))).join(", ") : "—", Je = (f == null ? void 0 : f.payment) || "card", ht = Je === "card" ? /* @__PURE__ */ d(xe, { children: [
4310
4309
  "Credit Card — Mastercard",
4311
4310
  /* @__PURE__ */ a("br", {}),
4312
4311
  "•••• 7820 Exp: 12/26"
4313
- ] }) : /* @__PURE__ */ a(ve, { children: Ke(Je) });
4314
- return /* @__PURE__ */ c("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
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: [
4312
+ ] }) : /* @__PURE__ */ a(xe, { children: Ke(Je) });
4313
+ return /* @__PURE__ */ d("div", { className: "mx-auto mt-3 mb-3 rounded-2xl bg-white", children: [
4314
+ /* @__PURE__ */ a("div", { className: "px-6 pt-5 pb-3", children: /* @__PURE__ */ d("h3", { className: "font-semibold text-lg mb-2 text-gray-800 flex items-center gap-2", children: [
4316
4315
  /* @__PURE__ */ a(
4317
- ae,
4316
+ re,
4318
4317
  {
4319
4318
  icon: "mdi:receipt-text-check-outline",
4320
4319
  width: "24",
@@ -4323,7 +4322,7 @@ const He = "USD", xn = (e) => {
4323
4322
  ),
4324
4323
  "All set! Here’s what your smart order looks like 🧾"
4325
4324
  ] }) }),
4326
- /* @__PURE__ */ a("div", { className: "px-6 pb-4", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-12 gap-4 rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4325
+ /* @__PURE__ */ a("div", { className: "px-6 pb-4", children: /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-12 gap-4 rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4327
4326
  /* @__PURE__ */ a("div", { className: "sm:col-span-2 flex", children: /* @__PURE__ */ a("div", { className: "w-30 h-26 sm:w-30 sm:h-26 overflow-hidden rounded-lg bg-white border border-gray-200 flex items-center justify-center mx-auto sm:mx-0", children: T ? /* @__PURE__ */ a(
4328
4327
  "img",
4329
4328
  {
@@ -4332,102 +4331,102 @@ const He = "USD", xn = (e) => {
4332
4331
  className: "w-full h-full object-contain"
4333
4332
  }
4334
4333
  ) : /* @__PURE__ */ a(
4335
- ae,
4334
+ re,
4336
4335
  {
4337
4336
  icon: "mdi:image-outline",
4338
4337
  width: "24",
4339
4338
  className: "opacity-50"
4340
4339
  }
4341
4340
  ) }) }),
4342
- /* @__PURE__ */ c("div", { className: "sm:col-span-10", children: [
4343
- /* @__PURE__ */ c("div", { className: "mb-3", children: [
4341
+ /* @__PURE__ */ d("div", { className: "sm:col-span-10", children: [
4342
+ /* @__PURE__ */ d("div", { className: "mb-3", children: [
4344
4343
  /* @__PURE__ */ a("div", { className: "text-lg text-center font-bold text-gray-900", children: b }),
4345
- /* @__PURE__ */ c("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4344
+ /* @__PURE__ */ d("div", { className: "text-xs text-center font-bold text-gray-600", children: [
4346
4345
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4347
4346
  " ",
4348
- q ?? "—"
4347
+ U ?? "—"
4349
4348
  ] }),
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: [
4349
+ (K || ue || te) && /* @__PURE__ */ d("div", { className: "text-xs text-gray-600 mt-0.5 text-center", children: [
4350
+ K && /* @__PURE__ */ d(xe, { children: [
4352
4351
  /* @__PURE__ */ a("span", { className: "font-medium", children: "SKU:" }),
4353
4352
  " ",
4354
- Q,
4353
+ K,
4355
4354
  "  "
4356
4355
  ] }),
4357
- oe && /* @__PURE__ */ c(ve, { children: [
4356
+ ue && /* @__PURE__ */ d(xe, { children: [
4358
4357
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Color:" }),
4359
4358
  " ",
4360
- oe,
4359
+ ue,
4361
4360
  "  "
4362
4361
  ] }),
4363
- V && /* @__PURE__ */ c(ve, { children: [
4362
+ te && /* @__PURE__ */ d(xe, { children: [
4364
4363
  /* @__PURE__ */ a("span", { className: "font-medium", children: "Size:" }),
4365
4364
  " ",
4366
- V
4365
+ te
4367
4366
  ] })
4368
4367
  ] })
4369
4368
  ] }),
4370
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4371
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4369
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 md-grid-cols-3 md:grid-cols-3 gap-3", children: [
4370
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4372
4371
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Unit Price" }),
4373
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(xe, v) })
4372
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Ee, v) })
4374
4373
  ] }),
4375
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4374
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4376
4375
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Quantity" }),
4377
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: le })
4376
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: ye })
4378
4377
  ] }),
4379
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4378
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-white p-3 text-center", children: [
4380
4379
  /* @__PURE__ */ a("div", { className: "text-[11px] uppercase tracking-wide text-gray-500", children: "Subtotal" }),
4381
- /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: je(be, v) })
4380
+ /* @__PURE__ */ a("div", { className: "mt-0.5 text-base font-bold text-gray-900", children: Ae(Oe, v) })
4382
4381
  ] })
4383
4382
  ] })
4384
4383
  ] })
4385
4384
  ] }) }),
4386
- /* @__PURE__ */ c("div", { className: "px-6 pb-2", children: [
4387
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4388
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4385
+ /* @__PURE__ */ d("div", { className: "px-6 pb-2", children: [
4386
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3 mb-3", children: [
4387
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4389
4388
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏠 Address" }),
4390
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ge })
4389
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: he })
4391
4390
  ] }),
4392
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4391
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4393
4392
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💳 Payment" }),
4394
- /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: pt })
4393
+ /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: ht })
4395
4394
  ] }),
4396
- /* @__PURE__ */ c("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4395
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center rounded-xl border border-gray-200 bg-gray-50 p-3", children: [
4397
4396
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Delivery" }),
4398
4397
  /* @__PURE__ */ a("div", { className: "mt-1 text-sm font-semibold text-gray-900 text-center", children: f != null && f.delivery && ((nt = at[f.delivery]) == null ? void 0 : nt.label) || "—" })
4399
4398
  ] })
4400
4399
  ] }),
4401
- /* @__PURE__ */ c("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
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: [
4400
+ /* @__PURE__ */ d("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
4401
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4403
4402
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "💰 any(s)" }),
4404
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(X, v) })
4403
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(oe, v) })
4405
4404
  ] }),
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: [
4405
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4407
4406
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🏛️ Taxes" }),
4408
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(Fe, v) })
4407
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(Le, v) })
4409
4408
  ] }),
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: [
4409
+ /* @__PURE__ */ d("div", { className: "flex flex-col items-center justify-center rounded-xl border border-gray-200 bg-gray-50 p-4 text-center", children: [
4411
4410
  /* @__PURE__ */ a("div", { className: "text-xs uppercase tracking-wide text-gray-500", children: "🚚 Shipping" }),
4412
- /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: je(ne, v) })
4411
+ /* @__PURE__ */ a("div", { className: "mt-1 text-2xl font-bold text-gray-900", children: Ae(se, v) })
4413
4412
  ] })
4414
4413
  ] }),
4415
- /* @__PURE__ */ c(
4414
+ /* @__PURE__ */ d(
4416
4415
  "div",
4417
4416
  {
4418
4417
  className: "mt-4 rounded-xl p-4 text-center text-white shadow-sm",
4419
4418
  style: { background: tt },
4420
4419
  children: [
4421
4420
  /* @__PURE__ */ a("div", { className: "text-sm/5 opacity-95", children: "🔹 Total Payable" }),
4422
- /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: je(X + Fe + ne, v) })
4421
+ /* @__PURE__ */ a("div", { className: "mt-1 text-3xl font-extrabold tracking-tight", children: Ae(oe + Le + se, v) })
4423
4422
  ]
4424
4423
  }
4425
4424
  )
4426
4425
  ] }),
4427
- !h && /* @__PURE__ */ c("div", { className: "px-6 pb-5", children: [
4426
+ !p && /* @__PURE__ */ d("div", { className: "px-6 pb-5", children: [
4428
4427
  !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?" }),
4429
4428
  k && Ar({ intentMandateId: G }),
4430
- er && !k && /* @__PURE__ */ c("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4429
+ er && !k && /* @__PURE__ */ d("div", { className: "mt-4 flex flex-wrap items-center justify-center gap-3", children: [
4431
4430
  /* @__PURE__ */ a(
4432
4431
  "button",
4433
4432
  {
@@ -4451,7 +4450,7 @@ const He = "USD", xn = (e) => {
4451
4450
  ] });
4452
4451
  }, _o = (u) => {
4453
4452
  if (!u) return null;
4454
- const h = [
4453
+ const p = [
4455
4454
  u.addressLine1,
4456
4455
  u.addressLine2,
4457
4456
  u.street,
@@ -4463,30 +4462,30 @@ const He = "USD", xn = (e) => {
4463
4462
  {
4464
4463
  className: "px-6 py-4",
4465
4464
  style: { backgroundColor: "var(--tanya-light)" },
4466
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4467
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-2", children: [
4468
- /* @__PURE__ */ a(ae, { icon: "mdi:home-map-marker", width: "20", color: I }),
4465
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4466
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-2", children: [
4467
+ /* @__PURE__ */ a(re, { icon: "mdi:home-map-marker", width: "20", color: I }),
4469
4468
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Address" })
4470
4469
  ] }),
4471
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h })
4470
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: p })
4472
4471
  ] })
4473
4472
  }
4474
4473
  );
4475
4474
  }, Io = (u) => {
4476
- const h = u == null ? void 0 : u.method, f = h ? at[h] : void 0;
4475
+ const p = u == null ? void 0 : u.method, f = p ? at[p] : void 0;
4477
4476
  return /* @__PURE__ */ a(
4478
4477
  "div",
4479
4478
  {
4480
4479
  className: "px-6 py-4",
4481
4480
  style: { backgroundColor: "var(--tanya-light)" },
4482
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4483
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4484
- /* @__PURE__ */ a(ae, { icon: "mdi:truck-delivery", width: "20", color: I }),
4481
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4482
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4483
+ /* @__PURE__ */ a(re, { icon: "mdi:truck-delivery", width: "20", color: I }),
4485
4484
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Delivery Method" })
4486
4485
  ] }),
4487
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ c(ve, { children: [
4488
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4489
- /* @__PURE__ */ a(ae, { icon: f.icon, width: "18" }),
4486
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: f ? /* @__PURE__ */ d(xe, { children: [
4487
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4488
+ /* @__PURE__ */ a(re, { icon: f.icon, width: "18" }),
4490
4489
  /* @__PURE__ */ a("span", { className: "font-medium", children: f.label })
4491
4490
  ] }),
4492
4491
  /* @__PURE__ */ a("div", { className: "text-gray-600", children: f.subtitle })
@@ -4495,16 +4494,16 @@ const He = "USD", xn = (e) => {
4495
4494
  }
4496
4495
  );
4497
4496
  }, Fo = (u) => {
4498
- const h = (u == null ? void 0 : u.method) || "card";
4497
+ const p = (u == null ? void 0 : u.method) || "card";
4499
4498
  return /* @__PURE__ */ a(
4500
4499
  "div",
4501
4500
  {
4502
4501
  className: "px-6 py-4",
4503
4502
  style: { backgroundColor: "var(--tanya-light)" },
4504
- children: /* @__PURE__ */ c("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4505
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2 mb-1", children: [
4503
+ children: /* @__PURE__ */ d("div", { className: "rounded-xl border border-gray-200 bg-white p-4", children: [
4504
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2 mb-1", children: [
4506
4505
  /* @__PURE__ */ a(
4507
- ae,
4506
+ re,
4508
4507
  {
4509
4508
  icon: "mdi:credit-card-outline",
4510
4509
  width: "20",
@@ -4513,21 +4512,21 @@ const He = "USD", xn = (e) => {
4513
4512
  ),
4514
4513
  /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: "Payment Method" })
4515
4514
  ] }),
4516
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: h === "card" ? /* @__PURE__ */ c(ve, { children: [
4515
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-800", children: p === "card" ? /* @__PURE__ */ d(xe, { children: [
4517
4516
  "Credit Card — Mastercard",
4518
4517
  /* @__PURE__ */ a("br", {}),
4519
4518
  "•••• 7820   Exp: 12/26"
4520
- ] }) : Ke(h) })
4519
+ ] }) : Ke(p) })
4521
4520
  ] })
4522
4521
  }
4523
4522
  );
4524
- }, Po = (u, h) => {
4523
+ }, Po = (u, p) => {
4525
4524
  const f = u.snapshotStage;
4526
- if (!f || f === "address" && de || f === "delivery" && J || f === "payment" && ee || f === "final" && _e)
4525
+ if (!f || f === "address" && le || f === "delivery" && Y || f === "payment" && X || f === "final" && Ne)
4527
4526
  return null;
4528
4527
  switch (f) {
4529
4528
  case "initial":
4530
- return Ur(u.snapshotPayload, !h);
4529
+ return Ur(u.snapshotPayload, !p);
4531
4530
  case "address":
4532
4531
  return _o(u.snapshotPayload);
4533
4532
  case "delivery":
@@ -4535,7 +4534,7 @@ const He = "USD", xn = (e) => {
4535
4534
  case "payment":
4536
4535
  return Fo(u.snapshotPayload);
4537
4536
  case "final":
4538
- return qr(u.snapshotPayload, !h);
4537
+ return qr(u.snapshotPayload, !p);
4539
4538
  case "success":
4540
4539
  return Ar(u.snapshotPayload);
4541
4540
  default:
@@ -4543,7 +4542,7 @@ const He = "USD", xn = (e) => {
4543
4542
  }
4544
4543
  };
4545
4544
  return zo(
4546
- /* @__PURE__ */ c(
4545
+ /* @__PURE__ */ d(
4547
4546
  "div",
4548
4547
  {
4549
4548
  className: "fixed inset-0",
@@ -4559,8 +4558,8 @@ const He = "USD", xn = (e) => {
4559
4558
  onClick: t
4560
4559
  }
4561
4560
  ),
4562
- /* @__PURE__ */ a("div", { className: "absolute right-0 ", children: /* @__PURE__ */ c("div", { className: "w-[64.7vw] h-screen bg-white rounded-xl overflow-hidden flex flex-col shadow-xl", children: [
4563
- /* @__PURE__ */ c(
4561
+ /* @__PURE__ */ a("div", { className: "absolute right-0 ", children: /* @__PURE__ */ d("div", { className: "w-[64.7vw] h-screen bg-white rounded-xl overflow-hidden flex flex-col shadow-xl", children: [
4562
+ /* @__PURE__ */ d(
4564
4563
  "div",
4565
4564
  {
4566
4565
  style: {
@@ -4572,7 +4571,7 @@ const He = "USD", xn = (e) => {
4572
4571
  background: kt
4573
4572
  },
4574
4573
  children: [
4575
- /* @__PURE__ */ c(
4574
+ /* @__PURE__ */ d(
4576
4575
  "div",
4577
4576
  {
4578
4577
  style: {
@@ -4582,7 +4581,7 @@ const He = "USD", xn = (e) => {
4582
4581
  gap: "0.5rem"
4583
4582
  },
4584
4583
  children: [
4585
- /* @__PURE__ */ a(ae, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4584
+ /* @__PURE__ */ a(re, { icon: "ph:sparkle-duotone", width: "25", height: "25" }),
4586
4585
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "font-bold", children: "Agentic Shopping with TANYA" }) })
4587
4586
  ]
4588
4587
  }
@@ -4597,7 +4596,7 @@ const He = "USD", xn = (e) => {
4597
4596
  margin: "0.75rem"
4598
4597
  },
4599
4598
  children: /* @__PURE__ */ a(
4600
- ae,
4599
+ re,
4601
4600
  {
4602
4601
  icon: "fluent:dismiss-24-filled",
4603
4602
  color: "#ffffff",
@@ -4612,20 +4611,20 @@ const He = "USD", xn = (e) => {
4612
4611
  ]
4613
4612
  }
4614
4613
  ),
4615
- /* @__PURE__ */ c(
4614
+ /* @__PURE__ */ d(
4616
4615
  "div",
4617
4616
  {
4618
- ref: ht,
4617
+ ref: pt,
4619
4618
  className: "overflow-y-auto pr-5 pb-4 space-y-4 hide-scrollbar flex-grow",
4620
4619
  children: [
4621
- /* @__PURE__ */ c(
4620
+ /* @__PURE__ */ d(
4622
4621
  "div",
4623
4622
  {
4624
4623
  className: "text-sm text-[16px] rounded-r-xl p-3 m-3 rounded-bl-xl w-3/4 text-tanya-contrast",
4625
4624
  style: { backgroundColor: "#e5dbeb" },
4626
4625
  children: [
4627
4626
  "Welcome to your smart shopping companion!",
4628
- /* @__PURE__ */ c("p", { children: [
4627
+ /* @__PURE__ */ d("p", { children: [
4629
4628
  "Simply share your instruction — like “If this product goes below $",
4630
4629
  parseInt(r.price) - 5,
4631
4630
  " grab it for me.”"
@@ -4635,11 +4634,11 @@ const He = "USD", xn = (e) => {
4635
4634
  }
4636
4635
  ),
4637
4636
  /* @__PURE__ */ a(Co, {}),
4638
- p > 1 && /* @__PURE__ */ a(Br, { showSubmit: !1 }),
4639
- Ye.map((u, h) => {
4637
+ g > 1 && /* @__PURE__ */ a(Br, { showSubmit: !1 }),
4638
+ Ye.map((u, p) => {
4640
4639
  var T;
4641
- const f = h === Ye.length - 1, v = !!u.snapshotStage;
4642
- return /* @__PURE__ */ c("div", { children: [
4640
+ const f = p === Ye.length - 1, v = !!u.snapshotStage;
4641
+ return /* @__PURE__ */ d("div", { children: [
4643
4642
  u.query && /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a(
4644
4643
  "p",
4645
4644
  {
@@ -4662,8 +4661,8 @@ const He = "USD", xn = (e) => {
4662
4661
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ a("p", { children: u.snapshotPayload.text }) })
4663
4662
  }
4664
4663
  ) }),
4665
- f && E && p > 1 && /* @__PURE__ */ c("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4666
- /* @__PURE__ */ c("div", { className: "text-sm text-gray-800", children: [
4664
+ f && E && g > 1 && /* @__PURE__ */ d("div", { className: "mx-4 mt-2 rounded-xl border border-gray-200 bg-white p-4 animate-fade-in", children: [
4665
+ /* @__PURE__ */ d("div", { className: "text-sm text-gray-800", children: [
4667
4666
  "Proceed with color:",
4668
4667
  " ",
4669
4668
  /* @__PURE__ */ a("span", { className: "font-semibold", children: qe(w) || "—" }),
@@ -4672,7 +4671,7 @@ const He = "USD", xn = (e) => {
4672
4671
  /* @__PURE__ */ a("span", { className: "font-semibold", children: We(w) || "—" }),
4673
4672
  "?"
4674
4673
  ] }),
4675
- /* @__PURE__ */ c("div", { className: "mt-3 flex gap-3", children: [
4674
+ /* @__PURE__ */ d("div", { className: "mt-3 flex gap-3", children: [
4676
4675
  /* @__PURE__ */ a(
4677
4676
  "button",
4678
4677
  {
@@ -4685,7 +4684,7 @@ const He = "USD", xn = (e) => {
4685
4684
  /* @__PURE__ */ a(
4686
4685
  "button",
4687
4686
  {
4688
- onClick: ho,
4687
+ onClick: po,
4689
4688
  className: "px-5 py-2 rounded-full font-semibold border",
4690
4689
  style: {
4691
4690
  borderColor: I,
@@ -4696,8 +4695,8 @@ const He = "USD", xn = (e) => {
4696
4695
  )
4697
4696
  ] })
4698
4697
  ] }),
4699
- f && ye && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4700
- f && Z && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4698
+ f && we && /* @__PURE__ */ a(Br, { showSubmit: !0 }),
4699
+ f && Q && /* @__PURE__ */ a("div", { className: "mt-4", children: /* @__PURE__ */ a(
4701
4700
  "div",
4702
4701
  {
4703
4702
  className: "text-sm text-tanya-contrast px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",
@@ -4708,7 +4707,7 @@ const He = "USD", xn = (e) => {
4708
4707
  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…" }) })
4709
4708
  }
4710
4709
  ) }),
4711
- (v || u.response === "__CARD__") && (!Z || !f) && /* @__PURE__ */ a(
4710
+ (v || u.response === "__CARD__") && (!Q || !f) && /* @__PURE__ */ a(
4712
4711
  "div",
4713
4712
  {
4714
4713
  className: "mt-6 mb-4 mx-4 animate-fade-in",
@@ -4724,13 +4723,13 @@ const He = "USD", xn = (e) => {
4724
4723
  )
4725
4724
  }
4726
4725
  )
4727
- ] }, h);
4726
+ ] }, p);
4728
4727
  }),
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: [
4730
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4731
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4728
+ le && /* @__PURE__ */ d("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
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4730
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4732
4731
  /* @__PURE__ */ a(
4733
- ae,
4732
+ re,
4734
4733
  {
4735
4734
  icon: "mdi:home-map-marker",
4736
4735
  width: "24",
@@ -4739,7 +4738,7 @@ const He = "USD", xn = (e) => {
4739
4738
  ),
4740
4739
  "Select a Delivery Address"
4741
4740
  ] }),
4742
- j && /* @__PURE__ */ c(ve, { children: [
4741
+ j && /* @__PURE__ */ d(xe, { children: [
4743
4742
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4744
4743
  !k && /* @__PURE__ */ a(
4745
4744
  "button",
@@ -4757,7 +4756,7 @@ const He = "USD", xn = (e) => {
4757
4756
  ] })
4758
4757
  ] }),
4759
4758
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-600 mb-4", children: "Choose where you’d like us to deliver this item." }),
4760
- s ? /* @__PURE__ */ c("div", { className: "flex items-center py-6", children: [
4759
+ s ? /* @__PURE__ */ d("div", { className: "flex items-center py-6", children: [
4761
4760
  /* @__PURE__ */ a(
4762
4761
  "div",
4763
4762
  {
@@ -4766,17 +4765,17 @@ const He = "USD", xn = (e) => {
4766
4765
  }
4767
4766
  ),
4768
4767
  /* @__PURE__ */ a("p", { className: "ml-3 text-gray-600", children: "Fetching your addresses..." })
4769
- ] }) : Ze.length > 0 ? /* @__PURE__ */ c(
4768
+ ] }) : Ze.length > 0 ? /* @__PURE__ */ d(
4770
4769
  "div",
4771
4770
  {
4772
4771
  className: `space-y-3 ${j ? "opacity-70" : ""}`,
4773
4772
  children: [
4774
4773
  Ze.map((u) => {
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;
4776
- return /* @__PURE__ */ c(
4774
+ const p = [u.addressLine1, u.addressLine2].filter(Boolean).map((K) => Ke(K || "")).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), U = Ie === b;
4775
+ return /* @__PURE__ */ d(
4777
4776
  "label",
4778
4777
  {
4779
- className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${q ? "border-tanya-light" : "border-gray-300"} ${j ? "pointer-events-none" : ""}`,
4778
+ className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${U ? "border-tanya-light" : "border-gray-300"} ${j ? "pointer-events-none" : ""}`,
4780
4779
  title: j ? "Address already submitted" : "",
4781
4780
  children: [
4782
4781
  /* @__PURE__ */ a(
@@ -4785,15 +4784,15 @@ const He = "USD", xn = (e) => {
4785
4784
  type: "radio",
4786
4785
  name: "address",
4787
4786
  className: "mt-1 accent-tanya-light",
4788
- checked: q,
4787
+ checked: U,
4789
4788
  disabled: j,
4790
4789
  onChange: () => Zt(b),
4791
4790
  value: b
4792
4791
  }
4793
4792
  ),
4794
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4795
- /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: h || "Address" }),
4796
- /* @__PURE__ */ c("div", { className: "text-sm text-gray-700", children: [
4793
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4794
+ /* @__PURE__ */ a("div", { className: "font-semibold text-gray-800", children: p || "Address" }),
4795
+ /* @__PURE__ */ d("div", { className: "text-sm text-gray-700", children: [
4797
4796
  f,
4798
4797
  /* @__PURE__ */ a("br", {}),
4799
4798
  v,
@@ -4806,7 +4805,7 @@ const He = "USD", xn = (e) => {
4806
4805
  b
4807
4806
  );
4808
4807
  }),
4809
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-2", children: [
4808
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-2", children: [
4810
4809
  /* @__PURE__ */ a(
4811
4810
  "button",
4812
4811
  {
@@ -4834,11 +4833,11 @@ const He = "USD", xn = (e) => {
4834
4833
  }
4835
4834
  ) : /* @__PURE__ */ a("div", { className: "text-center py-8 text-gray-600", children: "No addresses found. Please add a new one in your profile." })
4836
4835
  ] }),
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: [
4838
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4839
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4836
+ Y && /* @__PURE__ */ d("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
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4838
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4840
4839
  /* @__PURE__ */ a(
4841
- ae,
4840
+ re,
4842
4841
  {
4843
4842
  icon: "mdi:truck-delivery",
4844
4843
  width: "24",
@@ -4847,7 +4846,7 @@ const He = "USD", xn = (e) => {
4847
4846
  ),
4848
4847
  "Great! Now choose how fast you want it delivered 🚚"
4849
4848
  ] }),
4850
- B && /* @__PURE__ */ c(ve, { children: [
4849
+ B && /* @__PURE__ */ d(xe, { children: [
4851
4850
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4852
4851
  !k && /* @__PURE__ */ a(
4853
4852
  "button",
@@ -4871,8 +4870,8 @@ const He = "USD", xn = (e) => {
4871
4870
  className: `space-y-3 ${B ? "opacity-70" : ""}`,
4872
4871
  children: Object.keys(at).map(
4873
4872
  (u) => {
4874
- const h = at[u], f = A === u;
4875
- return /* @__PURE__ */ c(
4873
+ const p = at[u], f = A === u;
4874
+ return /* @__PURE__ */ d(
4876
4875
  "label",
4877
4876
  {
4878
4877
  className: `flex items-start gap-3 p-4 border rounded-lg cursor-pointer transition hover:shadow-sm ${f ? "border-tanya-light" : "border-gray-300"} ${B ? "pointer-events-none" : ""}`,
@@ -4886,20 +4885,20 @@ const He = "USD", xn = (e) => {
4886
4885
  className: "mt-1 accent-tanya-light",
4887
4886
  checked: f,
4888
4887
  disabled: B,
4889
- onChange: () => ue(u)
4888
+ onChange: () => ce(u)
4890
4889
  }
4891
4890
  ),
4892
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4893
- /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4894
- /* @__PURE__ */ a(ae, { icon: h.icon, width: "18" }),
4891
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4892
+ /* @__PURE__ */ d("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4893
+ /* @__PURE__ */ a(re, { icon: p.icon, width: "18" }),
4895
4894
  " ",
4896
- h.label
4895
+ p.label
4897
4896
  ] }),
4898
- /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: h.subtitle })
4897
+ /* @__PURE__ */ a("div", { className: "text-sm text-gray-700", children: p.subtitle })
4899
4898
  ] }),
4900
- /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: h.fee === 0 ? "Free" : je(
4901
- h.fee,
4902
- (U == null ? void 0 : U.currency) || He
4899
+ /* @__PURE__ */ a("div", { className: "text-sm font-semibold text-gray-800", children: p.fee === 0 ? "Free" : Ae(
4900
+ p.fee,
4901
+ (q == null ? void 0 : q.currency) || He
4903
4902
  ) })
4904
4903
  ]
4905
4904
  },
@@ -4909,7 +4908,7 @@ const He = "USD", xn = (e) => {
4909
4908
  )
4910
4909
  }
4911
4910
  ),
4912
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-4", children: [
4911
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-4", children: [
4913
4912
  /* @__PURE__ */ a(
4914
4913
  "button",
4915
4914
  {
@@ -4934,11 +4933,11 @@ const He = "USD", xn = (e) => {
4934
4933
  )
4935
4934
  ] })
4936
4935
  ] }),
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: [
4938
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4939
- /* @__PURE__ */ c("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4936
+ X && /* @__PURE__ */ d("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
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
4938
+ /* @__PURE__ */ d("h3", { className: "font-semibold text-lg text-gray-800 flex items-center gap-2", children: [
4940
4939
  /* @__PURE__ */ a(
4941
- ae,
4940
+ re,
4942
4941
  {
4943
4942
  icon: "mdi:credit-card-outline",
4944
4943
  width: "24",
@@ -4947,7 +4946,7 @@ const He = "USD", xn = (e) => {
4947
4946
  ),
4948
4947
  "Almost done! 💳"
4949
4948
  ] }),
4950
- te && /* @__PURE__ */ c(ve, { children: [
4949
+ Z && /* @__PURE__ */ d(xe, { children: [
4951
4950
  /* @__PURE__ */ a("span", { className: "ml-2 text-xs px-2 py-1 rounded-full bg-green-100 text-green-700 font-semibold", children: "Selected" }),
4952
4951
  !k && /* @__PURE__ */ a(
4953
4952
  "button",
@@ -4968,12 +4967,12 @@ const He = "USD", xn = (e) => {
4968
4967
  /* @__PURE__ */ a(
4969
4968
  "div",
4970
4969
  {
4971
- className: `space-y-3 ${te ? "opacity-70" : ""}`,
4972
- children: /* @__PURE__ */ c(
4970
+ className: `space-y-3 ${Z ? "opacity-70" : ""}`,
4971
+ children: /* @__PURE__ */ d(
4973
4972
  "label",
4974
4973
  {
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" : "",
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" : "",
4977
4976
  children: [
4978
4977
  /* @__PURE__ */ a(
4979
4978
  "input",
@@ -4981,18 +4980,18 @@ const He = "USD", xn = (e) => {
4981
4980
  type: "radio",
4982
4981
  name: "payment",
4983
4982
  className: "mt-1 accent-tanya-light",
4984
- checked: Ne === "card",
4985
- disabled: te,
4986
- onChange: () => Ce("card")
4983
+ checked: ke === "card",
4984
+ disabled: Z,
4985
+ onChange: () => Se("card")
4987
4986
  }
4988
4987
  ),
4989
- /* @__PURE__ */ c("div", { className: "flex-1", children: [
4990
- /* @__PURE__ */ c("div", { className: "font-semibold text-gray-800 flex items-center gap-2", children: [
4991
- /* @__PURE__ */ a(ae, { icon: "mdi:credit-card-chip-outline", width: "18" }),
4988
+ /* @__PURE__ */ d("div", { className: "flex-1", children: [
4989
+ /* @__PURE__ */ d("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" }),
4992
4991
  " ",
4993
4992
  "Credit Card"
4994
4993
  ] }),
4995
- Ne === "card" && /* @__PURE__ */ c("div", { className: "text-sm text-gray-700 mt-1", children: [
4994
+ ke === "card" && /* @__PURE__ */ d("div", { className: "text-sm text-gray-700 mt-1", children: [
4996
4995
  "Mastercard    •••• 7820",
4997
4996
  /* @__PURE__ */ a("br", {}),
4998
4997
  "Expiry: 12/26"
@@ -5003,7 +5002,7 @@ const He = "USD", xn = (e) => {
5003
5002
  )
5004
5003
  }
5005
5004
  ),
5006
- /* @__PURE__ */ c("div", { className: "flex justify-between pt-4", children: [
5005
+ /* @__PURE__ */ d("div", { className: "flex justify-between pt-4", children: [
5007
5006
  /* @__PURE__ */ a(
5008
5007
  "button",
5009
5008
  {
@@ -5020,30 +5019,30 @@ const He = "USD", xn = (e) => {
5020
5019
  "button",
5021
5020
  {
5022
5021
  onClick: vo,
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"}`,
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"}`,
5025
5024
  style: { background: "var(--tanya)" },
5026
- children: te ? "Payment Submitted" : "Submit Payment Method"
5025
+ children: Z ? "Payment Submitted" : "Submit Payment Method"
5027
5026
  }
5028
5027
  )
5029
5028
  ] })
5030
5029
  ] }),
5031
- _e && qr(
5030
+ Ne && qr(
5032
5031
  {
5033
- ...U,
5032
+ ...q,
5034
5033
  address: JSON.parse(
5035
5034
  localStorage.getItem("agentic_order_address") || "null"
5036
5035
  ),
5037
5036
  delivery: localStorage.getItem("agentic_order_delivery"),
5038
5037
  payment: localStorage.getItem("agentic_order_payment"),
5039
- summary: Dr(U == null ? void 0 : U.currency)
5038
+ summary: Dr(q == null ? void 0 : q.currency)
5040
5039
  },
5041
5040
  !1
5042
5041
  )
5043
5042
  ]
5044
5043
  }
5045
5044
  ),
5046
- /* @__PURE__ */ c("div", { className: "sticky bottom-0 w-[96%] drop-shadow-xl flex items-center rounded-full bg-white border border-gray-300 m-[15px]", children: [
5045
+ /* @__PURE__ */ d("div", { className: "sticky bottom-0 w-[96%] drop-shadow-xl flex items-center rounded-full bg-white border border-gray-300 m-[15px]", children: [
5047
5046
  /* @__PURE__ */ a(
5048
5047
  "input",
5049
5048
  {
@@ -5051,9 +5050,9 @@ const He = "USD", xn = (e) => {
5051
5050
  disabled: fo,
5052
5051
  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
5053
5052
  ${Nt ? "" : "placeholder:text-red-400 text-red-500"}`,
5054
- value: De,
5053
+ value: $e,
5055
5054
  onKeyDown: (u) => {
5056
- u.key === "Enter" && !Z && !L && Lr();
5055
+ u.key === "Enter" && !Q && !L && Lr();
5057
5056
  },
5058
5057
  onChange: (u) => pe(u.target.value)
5059
5058
  }
@@ -5062,18 +5061,18 @@ const He = "USD", xn = (e) => {
5062
5061
  "button",
5063
5062
  {
5064
5063
  type: "submit",
5065
- disabled: Z || L,
5064
+ disabled: Q || L,
5066
5065
  className: "mr-6 font-medium",
5067
5066
  style: { color: "var(--tanya-light)" },
5068
5067
  onClick: () => Lr(),
5069
- children: Z ? /* @__PURE__ */ a(
5068
+ children: Q ? /* @__PURE__ */ a(
5070
5069
  "div",
5071
5070
  {
5072
5071
  className: "m-3 animate-spin rounded-full h-6 w-6 border-b-2",
5073
5072
  style: { borderBottom: "2px solid" }
5074
5073
  }
5075
5074
  ) : /* @__PURE__ */ a(
5076
- ae,
5075
+ re,
5077
5076
  {
5078
5077
  icon: "fluent:send-48-filled",
5079
5078
  color: "var(--tanya-light)",