tanya-chatbot 0.4.4 → 0.4.5

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,4 +1,4 @@
1
- import { useEffect as it, useState as z, useRef as Ft } from "react";
1
+ import { useEffect as ot, useState as z, useRef as Ft } from "react";
2
2
  import { jsx as a, jsxs as u, Fragment as re } from "react/jsx-runtime";
3
3
  import { createHttpLink as sr, ApolloClient as lr, InMemoryCache as cr, ApolloProvider as dr } from "@apollo/client";
4
4
  import { Provider as ur, useDispatch as je, useSelector as Ht } from "react-redux";
@@ -12,7 +12,7 @@ import { Icon as ge } from "@iconify/react";
12
12
  import { toast as M } from "react-toastify";
13
13
  const fr = '*,: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}.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}.mx-3{margin-left:.75rem;margin-right:.75rem}.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-4{margin-bottom:1rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.h-12{height:3rem}.h-28{height:7rem}.h-3{height:.75rem}.h-6{height:1.5rem}.h-\\[120px\\]{height:120px}.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-5\\/6{width:83.333333%}.w-6{width:1.5rem}.w-72{width:18rem}.w-\\[100vw\\]{width:100vw}.w-\\[120px\\]{width:120px}.w-\\[150px\\]{width:150px}.w-\\[60px\\]{width:60px}.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%}.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-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.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}.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-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-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.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))}.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-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))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.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-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-4{padding-top:1rem;padding-bottom:1rem}.pb-2{padding-bottom:.5rem}.pl-2{padding-left:.5rem}.pr-5{padding-right:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.font-nunitoSans{font-family:Nunito Sans}.text-\\[12px\\]{font-size:12px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-snug{line-height:1.375}.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-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-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.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))}.line-through{text-decoration-line:line-through}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-80{opacity:.8}.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-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}.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-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-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-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}}.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\\:text-\\[\\#6952C7\\]:hover{--tw-text-opacity: 1;color:rgb(105 82 199 / var(--tw-text-opacity, 1))}.hover\\:opacity-90:hover{opacity:.9}.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\\:w-\\[80vw\\]{width:80vw}}@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\\: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}}';
14
14
  function vo() {
15
- return it(() => {
15
+ return ot(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
18
  return t.textContent = fr, document.head.appendChild(t), () => {
@@ -97,11 +97,11 @@ function vr({
97
97
  }) {
98
98
  return /* @__PURE__ */ a(Le.Trigger, { "data-slot": "popover-trigger", ...t });
99
99
  }
100
- 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" }), qe = async () => {
100
+ const vt = () => ({ 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" }), qe = async () => {
101
101
  const t = "https://tanya-sfcc-server.vercel.app/";
102
102
  try {
103
103
  const e = await T.post(
104
- `${t}api/auth/token-bm-grant?baseUrl=${Q()}&siteId=${H()}`
104
+ `${t}api/auth/token-bm-grant?baseUrl=${Q()}&siteId=${Y()}`
105
105
  );
106
106
  return e.status === 200 && e.data.access_token ? e.data.access_token : (console.error("Failed to fetch token:", e.data), null);
107
107
  } catch (e) {
@@ -111,7 +111,7 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
111
111
  const e = "https://tanya-sfcc-server.vercel.app/";
112
112
  try {
113
113
  const r = JSON.parse(sessionStorage.getItem("customerData") || "{}").dwsid, o = await T.post(
114
- `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Q()}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
115
115
  {},
116
116
  {
117
117
  headers: {
@@ -125,42 +125,25 @@ const lt = () => ({ aiConversationUrl: "https://mdv3qwfi2j.execute-api.us-east-1
125
125
  return T.isAxiosError(r) ? console.error("Error creating basket:", r.response || r.message) : console.error("Unexpected error:", r), null;
126
126
  }
127
127
  };
128
- async function Ot() {
129
- var b;
130
- const t = H(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
131
- console.log(n);
132
- const d = ((b = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : b.isGuest) || !0;
133
- if (o && n && (/* @__PURE__ */ new Date()).getTime() < parseInt(o))
128
+ async function Pt() {
129
+ var c;
130
+ const t = Y(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
131
+ if (console.log(n), (c = JSON.parse(sessionStorage.getItem("customerData") || "{}")) != null && c.isGuest, o && n && (/* @__PURE__ */ new Date()).getTime() < parseInt(o))
134
132
  return console.log("access token found in local storage"), { access_token: n, expires_in: o };
135
- const { serverUrl: s } = lt(), l = JSON.parse(
136
- sessionStorage.getItem("customerData") || "{}"
137
- ).dwsid, i = JSON.parse(
138
- sessionStorage.getItem("customerData") || "{}"
139
- ).usrRef;
140
- try {
141
- const m = d ? "unregister-auth" : "register-auth";
142
- return (await T.get(
143
- `${s}sc-api/${m}?dwsid=${l}&email=${i}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}&siteId=${H()}&token=true`,
144
- {
145
- withCredentials: !0
146
- }
147
- )).data;
148
- } catch (m) {
149
- console.log(m);
150
- }
133
+ console.log("access token not found in local storage");
151
134
  }
152
- const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem("SiteId"), Z = () => sessionStorage.getItem("pubCfg"), tt = () => sessionStorage.getItem("envRef"), et = () => sessionStorage.getItem("orgRef"), be = async (t) => {
135
+ const Q = () => sessionStorage.getItem("Host"), Y = () => sessionStorage.getItem("SiteId"), at = () => sessionStorage.getItem("pubCfg"), it = () => sessionStorage.getItem("envRef"), st = () => sessionStorage.getItem("orgRef"), be = async (t) => {
153
136
  console.log("fetching results");
154
- const { serverUrl: e, basePath: r } = lt();
137
+ const { serverUrl: e, basePath: r } = vt();
155
138
  let o = "";
156
139
  {
157
- const n = await Ot();
140
+ const n = await Pt();
158
141
  console.log("the token from getSearchResults", n), o = n.access_token;
159
142
  }
160
143
  try {
161
144
  const n = Q();
162
145
  return (await T.get(
163
- `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
146
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
164
147
  {
165
148
  headers: {
166
149
  "Content-Type": "application/json",
@@ -173,11 +156,11 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
173
156
  }
174
157
  }, He = async (t) => {
175
158
  if (!t) throw new Error("Product ID is required");
176
- const { serverUrl: e, basePath: r } = lt(), o = Q();
159
+ const { serverUrl: e, basePath: r } = vt(), o = Q();
177
160
  console.log("calling access");
178
- const { access_token: n } = await Ot();
161
+ const { access_token: n } = await Pt();
179
162
  return console.log(n), (await T.get(
180
- `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
163
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
181
164
  {
182
165
  headers: {
183
166
  "Content-Type": "application/json",
@@ -189,9 +172,9 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
189
172
  if (!t) throw new Error("customerId is required");
190
173
  const e = await qe(), { customer_token: r } = await Me(
191
174
  e
192
- ), { serverUrl: o, basePath: n } = lt(), s = (await Ot()).access_token;
175
+ ), { serverUrl: o, basePath: n } = vt(), s = (await Pt()).access_token;
193
176
  return (await T.get(
194
- `${o}${n}/get-interest?baseUrl=${Q()}&customerId=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
177
+ `${o}${n}/get-interest?baseUrl=${Q()}&customerId=${t}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
195
178
  {
196
179
  headers: {
197
180
  "Content-Type": "application/json",
@@ -211,13 +194,13 @@ const Q = () => sessionStorage.getItem("Host"), H = () => sessionStorage.getItem
211
194
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
212
195
  currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
213
196
  };
214
- }, Cr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ke = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
197
+ }, _r = (t) => t.charAt(0).toUpperCase() + t.slice(1), ke = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
215
198
  const o = e.match(/^(\d+)\.\s(.+)/);
216
199
  return o ? `<p key=${r} class="mb-2"><strong>${o[1]}.</strong> ${o[2]}</p>` : e.trim() ? `<p key=${r} class="mb-2">${e}</p>` : "<br/>";
217
200
  }).join("");
218
- function _r() {
201
+ function Cr() {
219
202
  const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
220
- return it(() => {
203
+ return ot(() => {
221
204
  const o = () => r(t());
222
205
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
223
206
  }, []), e;
@@ -225,7 +208,7 @@ function _r() {
225
208
  const Fr = ({
226
209
  product: t
227
210
  }) => {
228
- const e = je(), r = _r(), [o, n] = z(0), d = () => {
211
+ const e = je(), r = Cr(), [o, n] = z(0), c = () => {
229
212
  n(
230
213
  (i) => i + r >= t.length ? 0 : i + r
231
214
  );
@@ -233,9 +216,9 @@ const Fr = ({
233
216
  n(
234
217
  (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
235
218
  );
236
- }, l = async (i) => {
237
- const b = await He(i);
238
- e(oe(b));
219
+ }, d = async (i) => {
220
+ const y = await He(i);
221
+ e(oe(y));
239
222
  };
240
223
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
241
224
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
@@ -252,19 +235,19 @@ const Fr = ({
252
235
  }
253
236
  ),
254
237
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
255
- var b, m, S, _;
238
+ var y, g, _, C;
256
239
  return /* @__PURE__ */ u(
257
240
  "div",
258
241
  {
259
242
  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]",
260
243
  onClick: () => {
261
- l(i.product_id ?? i.productId);
244
+ d(i.product_id ?? i.productId);
262
245
  },
263
246
  children: [
264
247
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
265
248
  "img",
266
249
  {
267
- src: ((b = ye(i)[0]) == null ? void 0 : b.link) || ye(i)[0] || // fallback if it's a string
250
+ src: ((y = ye(i)[0]) == null ? void 0 : y.link) || ye(i)[0] || // fallback if it's a string
268
251
  "https://via.placeholder.com/120",
269
252
  alt: i != null && i.productName ? i.productName : "Product",
270
253
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -277,7 +260,7 @@ const Fr = ({
277
260
  children: [
278
261
  /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
279
262
  /* @__PURE__ */ a("div", { className: "w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans", children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
280
- xe((m = i == null ? void 0 : i.name) == null ? void 0 : m["en-US"]),
263
+ xe((g = i == null ? void 0 : i.name) == null ? void 0 : g["en-US"]),
281
264
  60
282
265
  ) || "Product" }),
283
266
  /* @__PURE__ */ a(
@@ -292,7 +275,7 @@ const Fr = ({
292
275
  zIndex: 50
293
276
  },
294
277
  children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
295
- xe((S = i == null ? void 0 : i.name) == null ? void 0 : S["en-US"]),
278
+ xe((_ = i == null ? void 0 : i.name) == null ? void 0 : _["en-US"]),
296
279
  60
297
280
  ) || "Product"
298
281
  }
@@ -301,7 +284,7 @@ const Fr = ({
301
284
  /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
302
285
  /* @__PURE__ */ a("p", { children: Sr(
303
286
  i != null && i.price ? Number(i == null ? void 0 : i.price) : ve(i).centAmount || 0,
304
- (_ = ve(i)) == null ? void 0 : _.currencyCode
287
+ (C = ve(i)) == null ? void 0 : C.currencyCode
305
288
  ) }),
306
289
  /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
307
290
  "$",
@@ -319,7 +302,7 @@ const Fr = ({
319
302
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
320
303
  "button",
321
304
  {
322
- onClick: d,
305
+ onClick: c,
323
306
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
324
307
  style: {
325
308
  height: "30px",
@@ -343,7 +326,7 @@ const Fr = ({
343
326
  "div",
344
327
  {
345
328
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
346
- children: Cr(r.keyword) || "No keyword"
329
+ children: _r(r.keyword) || "No keyword"
347
330
  }
348
331
  ),
349
332
  /* @__PURE__ */ a(
@@ -357,13 +340,13 @@ const Fr = ({
357
340
  },
358
341
  o
359
342
  )) }), Ve = async (t, e) => {
360
- var d, s;
361
- const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
343
+ var c, s;
344
+ const { serverUrl: r, basePath: o } = vt(), n = `${r}`;
362
345
  console.log(`customer_token
363
346
  `, t);
364
347
  try {
365
- const l = await T.post(
366
- `${n}${o}/basket/create?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
348
+ const d = await T.post(
349
+ `${n}${o}/basket/create?baseUrl=${Q()}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
367
350
  e,
368
351
  {
369
352
  headers: {
@@ -375,18 +358,18 @@ const Fr = ({
375
358
  return window.postMessage(
376
359
  {
377
360
  type: "WIDGET_CREATED_BASKET",
378
- basketId: ((d = l.data) == null ? void 0 : d.basket_id) || ((s = l.data) == null ? void 0 : s.basketId)
361
+ basketId: ((c = d.data) == null ? void 0 : c.basket_id) || ((s = d.data) == null ? void 0 : s.basketId)
379
362
  },
380
363
  "*"
381
- ), l.data;
382
- } catch (l) {
383
- return T.isAxiosError(l) ? console.error("Error creating basket:", l.response || l.message) : console.error("Unexpected error:", l), null;
364
+ ), d.data;
365
+ } catch (d) {
366
+ return T.isAxiosError(d) ? console.error("Error creating basket:", d.response || d.message) : console.error("Unexpected error:", d), null;
384
367
  }
385
368
  }, Rt = async (t, e, r) => {
386
- const { serverUrl: o, basePath: n } = lt(), d = `${o}`;
369
+ const { serverUrl: o, basePath: n } = vt(), c = `${o}`;
387
370
  try {
388
371
  const s = await T.post(
389
- `${d}${n}/basket/add-product/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
372
+ `${c}${n}/basket/add-product/${t}?baseUrl=${Q()}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
390
373
  e,
391
374
  {
392
375
  headers: {
@@ -406,11 +389,11 @@ const Fr = ({
406
389
  basketId: t,
407
390
  customer_token: e
408
391
  }) => {
409
- var d;
410
- const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
392
+ var c;
393
+ const { serverUrl: r, basePath: o } = vt(), n = `${r}`;
411
394
  try {
412
395
  const s = await T.get(
413
- `${n}${o}/basket/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
396
+ `${n}${o}/basket/${t}?baseUrl=${Q()}&siteId=${Y()}&pubCfg=${at()}&envRef=${it()}&orgRef=${st()}`,
414
397
  {
415
398
  headers: {
416
399
  "Content-Type": "application/json",
@@ -420,10 +403,10 @@ const Fr = ({
420
403
  );
421
404
  return { status: s.status, data: s.data };
422
405
  } catch (s) {
423
- return T.isAxiosError(s) ? { status: (d = s.response) == null ? void 0 : d.status, data: null } : { status: null, data: null };
406
+ return T.isAxiosError(s) ? { status: (c = s.response) == null ? void 0 : c.status, data: null } : { status: null, data: null };
424
407
  }
425
408
  }, Yt = "sfcc_basket_id", Se = "sfcc_customer_token", Tt = "sfcc_token_expiry", Nr = 300 * 1e3, It = "1.0.0";
426
- const st = (t) => {
409
+ const nt = (t) => {
427
410
  try {
428
411
  t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
429
412
  } catch (e) {
@@ -440,70 +423,70 @@ const st = (t) => {
440
423
  } catch (e) {
441
424
  console.error("Error storing token:", e);
442
425
  }
443
- }, Ce = 300, Er = () => {
444
- var l, i, b, m, S, _;
426
+ }, _e = 300, Er = () => {
427
+ var d, i, y, g, _, C;
445
428
  const t = je(), e = Ht((F) => F.product.product), r = Ht((F) => F.store.store), [o, n] = z(!!e);
446
- if (it(() => {
429
+ if (ot(() => {
447
430
  n(!!e);
448
431
  }, [e]), !e) return null;
449
- const d = async () => {
450
- var F, j, K, ct, V, dt, kt, Pt, rt, St, Ct, ut, $t, zt, _t, P;
432
+ const c = async () => {
433
+ var F, j, K, lt, H, ct, kt, Ot, Z, St, _t, dt, $t, zt, Ct, O;
451
434
  console.log(e, "the prod");
452
435
  try {
453
- if (!((j = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && j.product_id) && !(e.type.item || e.type.bundle) && !((ct = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && ct.productId)) {
436
+ if (!((j = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && j.product_id) && !(e.type.item || e.type.bundle) && !((lt = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && lt.productId)) {
454
437
  M.error("Variants not available", {
455
438
  position: "bottom-right",
456
439
  autoClose: 1e3
457
440
  }), console.error("No product variant found");
458
441
  return;
459
442
  }
460
- const C = [
443
+ const S = [
461
444
  {
462
- product_id: ((V = e.variants) == null ? void 0 : V[0].product_id) || ((dt = e.variants) == null ? void 0 : dt[0].productId) || (e == null ? void 0 : e.id),
445
+ product_id: ((H = e.variants) == null ? void 0 : H[0].product_id) || ((ct = e.variants) == null ? void 0 : ct[0].productId) || (e == null ? void 0 : e.id),
463
446
  quantity: 1
464
447
  }
465
448
  ];
466
- console.log(C, "the product data");
449
+ console.log(S, "the product data");
467
450
  const k = JSON.parse(
468
451
  sessionStorage.getItem("customerData") || "{}"
469
- ), ot = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Wt = !1, At = localStorage.getItem(Tt), jt = Date.now();
452
+ ), tt = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Wt = !1, At = localStorage.getItem(Tt), jt = Date.now();
470
453
  if (!Wt || !At || jt >= parseInt(At)) {
471
454
  let $ = "";
472
455
  {
473
- const ft = await Ot();
474
- console.log("token from auth data"), $ = "Bearer " + ft.access_token;
456
+ const pt = await Pt();
457
+ console.log("token from auth data"), $ = "Bearer " + pt.access_token;
475
458
  }
476
459
  if (!$) {
477
460
  console.error("Failed to get customer_token");
478
461
  return;
479
462
  }
480
- const pt = jt + 300 * 1e3;
481
- if (Kt($), localStorage.setItem(Tt, pt.toString()), ot) {
482
- const ft = await Re({
483
- basketId: ot,
463
+ const ut = jt + 300 * 1e3;
464
+ if (Kt($), localStorage.setItem(Tt, ut.toString()), tt) {
465
+ const pt = await Re({
466
+ basketId: tt,
484
467
  customer_token: $
485
468
  });
486
- if (console.log(ot, "basket id from customer"), ft.status === 200 && ft) {
469
+ if (console.log(tt, "basket id from customer"), pt.status === 200 && pt) {
487
470
  const D = await Rt(
488
- ot,
489
- C,
471
+ tt,
472
+ S,
490
473
  $
491
474
  );
492
- (((kt = D == null ? void 0 : D.product_items) == null ? void 0 : kt.length) > 0 || ((Pt = D == null ? void 0 : D.productItems) == null ? void 0 : Pt.length) > 0) && (M.success("Added to cart", {
475
+ (((kt = D == null ? void 0 : D.product_items) == null ? void 0 : kt.length) > 0 || ((Ot = D == null ? void 0 : D.productItems) == null ? void 0 : Ot.length) > 0) && (M.success("Added to cart", {
493
476
  position: "bottom-right",
494
477
  autoClose: 3e3,
495
478
  hideProgressBar: !1,
496
479
  closeOnClick: !0,
497
480
  pauseOnHover: !0,
498
481
  draggable: !0
499
- }), Vt(ot));
482
+ }), Vt(tt));
500
483
  return;
501
484
  }
502
485
  }
503
486
  const Dt = {
504
487
  productItems: [
505
488
  {
506
- productId: ((rt = e.variants) == null ? void 0 : rt[0].product_id) || ((St = e.variants) == null ? void 0 : St[0].productId) || (e == null ? void 0 : e.id),
489
+ productId: ((Z = e.variants) == null ? void 0 : Z[0].product_id) || ((St = e.variants) == null ? void 0 : St[0].productId) || (e == null ? void 0 : e.id),
507
490
  quantity: 1
508
491
  }
509
492
  ]
@@ -522,15 +505,15 @@ const st = (t) => {
522
505
  console.log(
523
506
  "setting stored id",
524
507
  (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
525
- ), st(
508
+ ), nt(
526
509
  (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
527
510
  ), console.log("adding product to basket");
528
511
  const J = await Rt(
529
512
  (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId),
530
- C,
513
+ S,
531
514
  $
532
515
  );
533
- console.log("object added to basket"), (((Ct = J == null ? void 0 : J.product_items) == null ? void 0 : Ct.length) > 0 || ((ut = J == null ? void 0 : J.productItems) == null ? void 0 : ut.length) > 0) && M.success("Added to cart", {
516
+ console.log("object added to basket"), (((_t = J == null ? void 0 : J.product_items) == null ? void 0 : _t.length) > 0 || ((dt = J == null ? void 0 : J.productItems) == null ? void 0 : dt.length) > 0) && M.success("Added to cart", {
534
517
  position: "bottom-right",
535
518
  autoClose: 3e3,
536
519
  hideProgressBar: !1,
@@ -539,12 +522,12 @@ const st = (t) => {
539
522
  draggable: !0
540
523
  }), Vt(h.basket_id || (h == null ? void 0 : h.basketId));
541
524
  }
542
- } catch (C) {
543
- console.error("Error adding to cart:", C), M.error("Failed to add product to cart", {
525
+ } catch (S) {
526
+ console.error("Error adding to cart:", S), M.error("Failed to add product to cart", {
544
527
  position: "bottom-right",
545
528
  autoClose: 3e3
546
- }), (($t = C == null ? void 0 : C.response) == null ? void 0 : $t.status) === 404 || // Basket not found
547
- ((zt = C == null ? void 0 : C.response) == null ? void 0 : zt.status) === 401 ? (((_t = C == null ? void 0 : C.response) == null ? void 0 : _t.status) === 404 && st(null), ((P = C == null ? void 0 : C.response) == null ? void 0 : P.status) === 401 && (st(null), Kt(null))) : (console.error("Failed to add product to basket:", C.message), M.error("Failed to add product to cart", {
529
+ }), (($t = S == null ? void 0 : S.response) == null ? void 0 : $t.status) === 404 || // Basket not found
530
+ ((zt = S == null ? void 0 : S.response) == null ? void 0 : zt.status) === 401 ? (((Ct = S == null ? void 0 : S.response) == null ? void 0 : Ct.status) === 404 && nt(null), ((O = S == null ? void 0 : S.response) == null ? void 0 : O.status) === 401 && (nt(null), Kt(null))) : (console.error("Failed to add product to basket:", S.message), M.error("Failed to add product to cart", {
548
531
  position: "bottom-right",
549
532
  autoClose: 3e3
550
533
  }));
@@ -558,7 +541,7 @@ const st = (t) => {
558
541
  {
559
542
  className: "fixed inset-0 z-40 bg-black/30",
560
543
  onClick: () => {
561
- n(!1), setTimeout(() => t(oe(null)), Ce);
544
+ n(!1), setTimeout(() => t(oe(null)), _e);
562
545
  }
563
546
  }
564
547
  ),
@@ -583,7 +566,7 @@ const st = (t) => {
583
566
  onClick: () => {
584
567
  n(!1), setTimeout(
585
568
  () => t(oe(null)),
586
- Ce
569
+ _e
587
570
  );
588
571
  }
589
572
  }
@@ -593,7 +576,7 @@ const st = (t) => {
593
576
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
594
577
  "img",
595
578
  {
596
- src: (m = (b = (i = (l = e.imageGroups) == null ? void 0 : l[0]) == null ? void 0 : i.images) == null ? void 0 : b[0]) == null ? void 0 : m.link,
579
+ src: (g = (y = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : y[0]) == null ? void 0 : g.link,
597
580
  alt: e.name,
598
581
  className: "rounded-[10px]"
599
582
  }
@@ -642,14 +625,14 @@ const st = (t) => {
642
625
  /* @__PURE__ */ u("div", { className: "mt-4 flex flex-col gap-2 w-full p-2", children: [
643
626
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2", children: /* @__PURE__ */ u("div", { className: "flex items-center gap-2 text-left font-nunitoSans", children: [
644
627
  /* @__PURE__ */ u("div", { className: "text-[#323135] font-bold", children: [
645
- ((S = e == null ? void 0 : e.rating) == null ? void 0 : S.rate) || 0,
628
+ ((_ = e == null ? void 0 : e.rating) == null ? void 0 : _.rate) || 0,
646
629
  " /",
647
630
  " ",
648
631
  /* @__PURE__ */ a("span", { className: "text-[#68656E]", children: "5" })
649
632
  ] }),
650
633
  /* @__PURE__ */ a("div", { className: "text-[#323135] font-semibold text-sm", children: "Overall Rating" }),
651
634
  /* @__PURE__ */ u("div", { className: "text-[#68656E] font-semibold text-sm", children: [
652
- ((_ = e == null ? void 0 : e.rating) == null ? void 0 : _.count) || 0,
635
+ ((C = e == null ? void 0 : e.rating) == null ? void 0 : C.count) || 0,
653
636
  " ratings"
654
637
  ] })
655
638
  ] }) }),
@@ -680,7 +663,7 @@ const st = (t) => {
680
663
  {
681
664
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
682
665
  style: { backgroundColor: r.tanyaThemeColor },
683
- onClick: d,
666
+ onClick: c,
684
667
  children: "Add to Cart"
685
668
  }
686
669
  ),
@@ -718,145 +701,145 @@ const st = (t) => {
718
701
  "Niece/Nephew": "his/her niece/nephew",
719
702
  "My Friends": "his/her friends",
720
703
  Others: "others"
721
- }, n = Ft(null), d = Ft(null), s = Ft(null), l = Ft(null), [i, b] = z(null), [m, S] = z(!1), [_, F] = z(!1), [j, K] = z(!1), [ct, V] = z(!1), [dt, kt] = z(!1), [Pt, rt] = z(!1), [St, Ct] = z(""), [ut, $t] = z(""), zt = (c) => ({
722
- id: c.id,
723
- title: c.name,
724
- image: c.image ?? "",
725
- price: c.price ?? 0
726
- }), [_t, P] = z([]), C = Ft(null), k = Ht((c) => c.store.store), ot = Ht((c) => c.product.product), Wt = () => {
704
+ }, n = Ft(null), c = Ft(null), s = Ft(null), d = Ft(null), [i, y] = z(null), [g, _] = z(!1), [C, F] = z(!1), [j, K] = z(!1), [lt, H] = z(!1), [ct, kt] = z(!1), [Ot, Z] = z(!1), [St, _t] = z(""), [dt, $t] = z(""), zt = (l) => ({
705
+ id: l.id,
706
+ title: l.name,
707
+ image: l.image ?? "",
708
+ price: l.price ?? 0
709
+ }), [Ct, O] = z([]), S = Ft(null), k = Ht((l) => l.store.store), tt = Ht((l) => l.product.product), Wt = () => {
727
710
  K(!0), setTimeout(() => F(!0), 10);
728
711
  }, At = () => {
729
712
  F(!1), setTimeout(() => K(!1), 300);
730
713
  };
731
- it(() => {
732
- m ? Wt() : At();
733
- }, [m]);
734
- const jt = (c) => {
735
- $t(o[c]);
714
+ ot(() => {
715
+ g ? Wt() : At();
716
+ }, [g]);
717
+ const jt = (l) => {
718
+ $t(o[l]);
736
719
  };
737
- it(() => {
738
- C.current && (C.current.scrollTop += 150);
739
- }, [_t]);
740
- let $ = null, pt = null;
720
+ ot(() => {
721
+ S.current && (S.current.scrollTop += 150);
722
+ }, [Ct]);
723
+ let $ = null, ut = null;
741
724
  const Dt = async () => {
742
- if ($ && pt && Date.now() < pt)
725
+ if ($ && ut && Date.now() < ut)
743
726
  return $;
744
727
  try {
745
- const c = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
728
+ const l = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
746
729
  grant_type: "client_credentials",
747
730
  client_id: "4i8rd70sgt961tc4dhskgf08c",
748
731
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
749
732
  scope: "default-m2m-resource-server-8xzfzo/read"
750
- }), w = await fetch(c, {
733
+ }), m = await fetch(l, {
751
734
  method: "POST",
752
735
  headers: {
753
736
  "Content-Type": "application/x-www-form-urlencoded"
754
737
  },
755
738
  body: v
756
739
  });
757
- if (!w.ok)
740
+ if (!m.ok)
758
741
  throw new Error(
759
- `Token request failed! status: ${w.status}`
742
+ `Token request failed! status: ${m.status}`
760
743
  );
761
- const x = await w.json();
762
- $ = x.access_token;
763
- const p = x.expires_in || 3600;
764
- return pt = Date.now() + (p - 60) * 1e3, $;
765
- } catch (c) {
766
- return console.error("Error obtaining JWT token:", c), $ = null, pt = null, null;
744
+ const b = await m.json();
745
+ $ = b.access_token;
746
+ const p = b.expires_in || 3600;
747
+ return ut = Date.now() + (p - 60) * 1e3, $;
748
+ } catch (l) {
749
+ return console.error("Error obtaining JWT token:", l), $ = null, ut = null, null;
767
750
  }
768
751
  }, h = async () => {
769
- const c = await Ot();
770
- c != null && b(c);
752
+ const l = await Pt();
753
+ l != null && y(l);
771
754
  };
772
- it(() => {
755
+ ot(() => {
773
756
  if (t != null && t.siteId) {
774
- const { clientID: c, host: v, organizationID: w, shortCode: x, siteId: p } = t;
775
- sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(c)), sessionStorage.setItem("envRef", x), sessionStorage.setItem("orgRef", w);
757
+ const { clientID: l, host: v, organizationID: m, shortCode: b, siteId: p } = t;
758
+ sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(l)), sessionStorage.setItem("envRef", b), sessionStorage.setItem("orgRef", m);
776
759
  }
777
760
  h(), console.log("scapi environment v1");
778
- }, []), it(() => {
779
- e && (console.log("setting the basket id", e), st(e));
761
+ }, []), ot(() => {
762
+ e && (console.log("setting the basket id", e), nt(e));
780
763
  }, [e]);
781
764
  const J = async () => {
782
- const c = JSON.parse(
765
+ const l = JSON.parse(
783
766
  sessionStorage.getItem("customerData") || "{}"
784
767
  ).customerId;
785
- return (await kr(c || "")).c_interests;
786
- }, ft = async (c, v) => {
768
+ return (await kr(l || "")).c_interests;
769
+ }, pt = async (l, v) => {
787
770
  console.log("in secondary flow", It);
788
- const w = await J();
789
- if (console.log(w, "interests of customer", It), !!w)
771
+ const m = await J();
772
+ if (console.log(m, "interests of customer", It), !!m)
790
773
  try {
791
- P(
774
+ O(
792
775
  (U) => U.map(
793
- (R, Y) => Y === U.length - 1 ? { ...R, secondaryLoading: !0 } : R
776
+ (V, R) => R === U.length - 1 ? { ...V, secondaryLoading: !0 } : V
794
777
  )
795
778
  );
796
- const x = await Dt();
797
- if (!x) throw new Error("Failed to fetch token");
798
- const p = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), ht = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
799
- registered: String(g || !1),
779
+ const b = await Dt();
780
+ if (!b) throw new Error("Failed to fetch token");
781
+ const p = localStorage.getItem("customerNumber"), w = localStorage.getItem("isLoggedIn"), ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
782
+ registered: String(w || !1),
800
783
  userId: String(p || (/* @__PURE__ */ new Date()).getTime())
801
- }).toString()}`, mt = JSON.stringify({
784
+ }).toString()}`, ht = JSON.stringify({
802
785
  flowId: "Q166PR519W",
803
786
  flowAliasId: "HKFUVLWVH2",
804
787
  input: {
805
788
  loyaltyPoints: "",
806
- productName: c,
789
+ productName: l,
807
790
  productPoints: String(v || 0),
808
- interests: w
791
+ interests: m
809
792
  }
810
- }), L = await fetch(ht, {
793
+ }), L = await fetch(ft, {
811
794
  signal: AbortSignal.timeout(3e4),
812
795
  method: "POST",
813
796
  headers: {
814
797
  "Content-Type": "application/json",
815
- Authorization: `Bearer ${x}`
798
+ Authorization: `Bearer ${b}`
816
799
  },
817
- body: mt
800
+ body: ht
818
801
  });
819
802
  if (!L.body) throw new Error("Readable stream not supported");
820
- const wt = L.body.getReader(), gt = new TextDecoder();
803
+ const mt = L.body.getReader(), wt = new TextDecoder();
821
804
  let B = "";
822
805
  for (; ; ) {
823
- const { done: U, value: R } = await wt.read();
806
+ const { done: U, value: V } = await mt.read();
824
807
  if (U) break;
825
- B += gt.decode(R, { stream: !0 });
826
- const Y = B.split(`
808
+ B += wt.decode(V, { stream: !0 });
809
+ const R = B.split(`
827
810
  `);
828
- B = Y.pop() || "";
829
- for (const W of Y)
811
+ B = R.pop() || "";
812
+ for (const W of R)
830
813
  if (W.startsWith("data:")) {
831
814
  const f = W.slice(5).trim();
832
815
  try {
833
816
  const q = JSON.parse(f);
834
- q.index === 0 && P(
817
+ q.index === 0 && O(
835
818
  (I) => I.map(
836
- (O, G) => G === I.length - 1 ? {
837
- ...O,
819
+ (P, G) => G === I.length - 1 ? {
820
+ ...P,
838
821
  secondaryResponse: q.data,
839
822
  secondaryLoading: !1
840
- } : O
823
+ } : P
841
824
  )
842
825
  );
843
826
  } catch (q) {
844
- P(
827
+ O(
845
828
  (I) => I.map(
846
- (O, G) => G === I.length - 1 ? { ...O, secondaryLoading: !1 } : O
829
+ (P, G) => G === I.length - 1 ? { ...P, secondaryLoading: !1 } : P
847
830
  )
848
831
  ), console.error("Secondary flow JSON parse error:", q);
849
832
  }
850
833
  }
851
834
  }
852
- } catch (x) {
853
- console.error("Secondary flow error:", x);
835
+ } catch (b) {
836
+ console.error("Secondary flow error:", b);
854
837
  }
855
- }, D = async (c) => {
856
- const v = c || St.trim();
838
+ }, D = async (l) => {
839
+ const v = l || St.trim();
857
840
  if (v) {
858
- kt(!0), Ct(""), n.current = null, d.current = null, s.current = null, l.current = null, P((w) => [
859
- ...w,
841
+ kt(!0), _t(""), n.current = null, c.current = null, s.current = null, d.current = null, O((m) => [
842
+ ...m,
860
843
  {
861
844
  query: v,
862
845
  response: "Thinking for what suits you best...",
@@ -866,38 +849,38 @@ const st = (t) => {
866
849
  }
867
850
  ]);
868
851
  try {
869
- const w = ut, x = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
870
- if (!g)
852
+ const m = dt, b = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), w = await Dt();
853
+ if (!w)
871
854
  throw new Error("Failed to obtain access token");
872
- const ht = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
855
+ const ft = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
873
856
  registered: String(p || !1),
874
- userId: String(x || (/* @__PURE__ */ new Date()).getTime())
875
- }).toString()}`, mt = JSON.stringify({
857
+ userId: String(b || (/* @__PURE__ */ new Date()).getTime())
858
+ }).toString()}`, ht = JSON.stringify({
876
859
  flowId: "MMHQKYI1NE",
877
860
  flowAliasId: "SZF9ZK1ATE",
878
861
  input: {
879
862
  userPrompt: v,
880
- whom: w
863
+ whom: m
881
864
  }
882
- }), L = await fetch(ht, {
865
+ }), L = await fetch(ft, {
883
866
  signal: AbortSignal.timeout(3e4),
884
867
  method: "POST",
885
868
  headers: {
886
869
  "Content-Type": "application/json",
887
- Authorization: `Bearer ${g}`
870
+ Authorization: `Bearer ${w}`
888
871
  },
889
- body: mt
872
+ body: ht
890
873
  });
891
874
  if (!L.ok)
892
875
  throw new Error(`HTTP error! status: ${L.status}`);
893
876
  if (!L.body) throw new Error("Readable stream not supported");
894
- const wt = L.body.getReader(), gt = new TextDecoder();
877
+ const mt = L.body.getReader(), wt = new TextDecoder();
895
878
  let B = "", U = "";
896
879
  for (; ; ) {
897
- rt(!0);
898
- const { done: R, value: Y } = await wt.read();
899
- if (R) break;
900
- B += gt.decode(Y, { stream: !0 });
880
+ Z(!0);
881
+ const { done: V, value: R } = await mt.read();
882
+ if (V) break;
883
+ B += wt.decode(R, { stream: !0 });
901
884
  const W = B.split(`
902
885
  `);
903
886
  B = W.pop() || "";
@@ -906,9 +889,9 @@ const st = (t) => {
906
889
  const q = f.slice(5).trim();
907
890
  try {
908
891
  const I = JSON.parse(q);
909
- I.index == 1 && (U = I.data), P(
910
- (O) => O.map(
911
- (G, Lt) => Lt === O.length - 1 ? {
892
+ I.index == 1 && (U = I.data), O(
893
+ (P) => P.map(
894
+ (G, Lt) => Lt === P.length - 1 ? {
912
895
  ...G,
913
896
  [I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
914
897
  } : G
@@ -920,84 +903,84 @@ const st = (t) => {
920
903
  }
921
904
  }
922
905
  rr(er(U));
923
- } catch (w) {
924
- console.error("Error sending message to Tanya:", w);
906
+ } catch (m) {
907
+ console.error("Error sending message to Tanya:", m);
925
908
  } finally {
926
909
  kt(!1);
927
910
  }
928
911
  }
929
- }, er = (c) => {
930
- const v = c.match(
912
+ }, er = (l) => {
913
+ const v = l.match(
931
914
  /top five relevant product or category names are: (.*)/i
932
- ), p = (v ? v[1] : c).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
915
+ ), p = (v ? v[1] : l).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
933
916
  return [...new Set(p)].filter(Boolean).join(",");
934
- }, rr = async (c) => {
935
- if (typeof c == "string") {
936
- console.log(c, "keywords");
937
- const v = c.split(",");
938
- for (const w of v) {
939
- const x = await be(w);
940
- if (rt(!1), (x == null ? void 0 : x.length) > 0 && (P(
917
+ }, rr = async (l) => {
918
+ if (typeof l == "string") {
919
+ console.log(l, "keywords");
920
+ const v = l.split(",");
921
+ for (const m of v) {
922
+ const b = await be(m);
923
+ if (Z(!1), (b == null ? void 0 : b.length) > 0 && (O(
941
924
  (p) => p.map(
942
- (g, A) => A === p.length - 1 ? {
943
- ...g,
925
+ (w, A) => A === p.length - 1 ? {
926
+ ...w,
944
927
  products: [
945
- ...g.products || [],
946
- { keyword: w, items: x, loading: !1 }
928
+ ...w.products || [],
929
+ { keyword: m, items: b, loading: !1 }
947
930
  ]
948
- } : g
931
+ } : w
949
932
  )
950
- ), !n.current || d.current == null)) {
951
- const p = x[0];
952
- n.current = String((p == null ? void 0 : p.product_name) ?? ""), s.current = p.image.link, d.current = p.product_id;
953
- const g = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
954
- l.current = typeof g == "number" && Number.isFinite(g) ? g : null;
933
+ ), !n.current || c.current == null)) {
934
+ const p = b[0];
935
+ n.current = String((p == null ? void 0 : p.product_name) ?? ""), s.current = p.image.link, c.current = p.product_id;
936
+ const w = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
937
+ d.current = typeof w == "number" && Number.isFinite(w) ? w : null;
955
938
  }
956
939
  }
957
940
  } else
958
- for (const v of c) {
959
- const w = await be(v);
960
- rt(!1), (w == null ? void 0 : w.length) > 0 && P(
961
- (x) => x.map(
962
- (p, g) => g === x.length - 1 ? {
941
+ for (const v of l) {
942
+ const m = await be(v);
943
+ Z(!1), (m == null ? void 0 : m.length) > 0 && O(
944
+ (b) => b.map(
945
+ (p, w) => w === b.length - 1 ? {
963
946
  ...p,
964
947
  products: [
965
948
  ...p.products || [],
966
- { keyword: v, items: w, loading: !1 }
949
+ { keyword: v, items: m, loading: !1 }
967
950
  ]
968
951
  } : p
969
952
  )
970
953
  );
971
954
  }
972
955
  if (n.current) {
973
- P(
974
- (w) => w.map(
975
- (x, p) => p === w.length - 1 ? {
976
- ...x,
956
+ O(
957
+ (m) => m.map(
958
+ (b, p) => p === m.length - 1 ? {
959
+ ...b,
977
960
  productSnapshot: {
978
- id: d.current,
961
+ id: c.current,
979
962
  name: n.current,
980
963
  image: s.current,
981
- price: l.current ?? null,
964
+ price: d.current ?? null,
982
965
  points: 0,
983
966
  quantity: 1
984
967
  }
985
- } : x
968
+ } : b
986
969
  )
987
970
  );
988
971
  const v = JSON.parse(
989
972
  sessionStorage.getItem("customerData") || "{}"
990
973
  );
991
- (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", It), ft(n.current, 0)) : console.log("not running secondary flow", It);
974
+ (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", It), pt(n.current, 0)) : console.log("not running secondary flow", It);
992
975
  }
993
- rt(!1);
994
- }, or = async (c, v) => {
995
- var w, x, p, g, A, ht, mt, L, wt, gt, B, U, R, Y, W;
996
- V(!0);
976
+ Z(!1);
977
+ }, or = async (l, v) => {
978
+ var m, b, p, w, A, ft, ht, L, mt, wt, B, U, V, R, W;
979
+ H(!0);
997
980
  try {
998
- const f = await He(c.id);
999
- if (!((x = (w = f == null ? void 0 : f.variants) == null ? void 0 : w[0]) != null && x.product_id || (g = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && g.productId) && !(f.type.item || f.type.bundle)) {
1000
- V(!1), M.error("Variants not found", {
981
+ const f = await He(l.id);
982
+ if (!((b = (m = f == null ? void 0 : f.variants) == null ? void 0 : m[0]) != null && b.product_id || (w = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && w.productId) && !(f.type.item || f.type.bundle)) {
983
+ H(!1), M.error("Variants not found", {
1001
984
  position: "bottom-right",
1002
985
  autoClose: 1e3
1003
986
  }), console.error("No product variant found");
@@ -1005,97 +988,97 @@ const st = (t) => {
1005
988
  }
1006
989
  const q = [
1007
990
  {
1008
- product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ht = f.variants) == null ? void 0 : ht[0].productId) || (f == null ? void 0 : f.id),
991
+ product_id: ((A = f.variants) == null ? void 0 : A[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
1009
992
  quantity: v
1010
993
  }
1011
994
  ];
1012
995
  console.log(q, "product data", "app version", It);
1013
996
  const I = JSON.parse(
1014
997
  sessionStorage.getItem("customerData") || "{}"
1015
- ), O = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, Lt = localStorage.getItem(Tt), me = Date.now();
998
+ ), P = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, Lt = localStorage.getItem(Tt), me = Date.now();
1016
999
  if (!G || !Lt || me >= parseInt(Lt)) {
1017
1000
  const nr = await qe();
1018
- let { customer_token: nt } = await Me(
1001
+ let { customer_token: et } = await Me(
1019
1002
  nr
1020
1003
  );
1021
- if (nt = "Bearer " + i.access_token, !nt) {
1004
+ if (et = "Bearer " + i.access_token, !et) {
1022
1005
  console.error("Failed to get customer_token");
1023
1006
  return;
1024
1007
  }
1025
1008
  const ar = me + 300 * 1e3;
1026
- if (Kt(nt), localStorage.setItem(Tt, ar.toString()), console.log(O, "basketIdFromCustomer"), O) {
1009
+ if (Kt(et), localStorage.setItem(Tt, ar.toString()), console.log(P, "basketIdFromCustomer"), P) {
1027
1010
  const we = await Re({
1028
- basketId: O,
1029
- customer_token: nt
1011
+ basketId: P,
1012
+ customer_token: et
1030
1013
  });
1031
1014
  if (we.status === 200 && we) {
1032
1015
  const Gt = await Rt(
1033
- O,
1016
+ P,
1034
1017
  q,
1035
- nt
1018
+ et
1036
1019
  );
1037
- ((mt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : mt.length) > 0 && (M.success("Added to cart", {
1020
+ ((ht = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : ht.length) > 0 && (M.success("Added to cart", {
1038
1021
  position: "bottom-right",
1039
1022
  autoClose: 3e3,
1040
1023
  hideProgressBar: !1,
1041
1024
  closeOnClick: !0,
1042
1025
  pauseOnHover: !0,
1043
1026
  draggable: !0
1044
- }), Vt(O), V(!1));
1027
+ }), Vt(P), H(!1));
1045
1028
  return;
1046
1029
  }
1047
1030
  }
1048
1031
  const ir = {
1049
1032
  productItems: [
1050
1033
  {
1051
- productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((wt = f.variants) == null ? void 0 : wt[0].productId) || (f == null ? void 0 : f.id),
1034
+ productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((mt = f.variants) == null ? void 0 : mt[0].productId) || (f == null ? void 0 : f.id),
1052
1035
  quantity: 1
1053
1036
  }
1054
1037
  ]
1055
- }, y = await Ve(nt, ir);
1038
+ }, x = await Ve(et, ir);
1056
1039
  if (console.log(
1057
- y,
1058
- y == null ? void 0 : y.basket_id,
1059
- y == null ? void 0 : y.basketId,
1040
+ x,
1041
+ x == null ? void 0 : x.basket_id,
1042
+ x == null ? void 0 : x.basketId,
1060
1043
  "the basket response"
1061
- ), !(y != null && y.basket_id || !(y != null && y.basketId))) {
1062
- V(!1), console.error("Failed to create basket");
1044
+ ), !(x != null && x.basket_id || !(x != null && x.basketId))) {
1045
+ H(!1), console.error("Failed to create basket");
1063
1046
  return;
1064
1047
  }
1065
- st(
1066
- (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId)
1048
+ nt(
1049
+ (x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId)
1067
1050
  );
1068
- const bt = await Rt(
1069
- (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId),
1051
+ const gt = await Rt(
1052
+ (x == null ? void 0 : x.basket_id) || (x == null ? void 0 : x.basketId),
1070
1053
  q,
1071
- nt
1054
+ et
1072
1055
  );
1073
- (((gt = bt == null ? void 0 : bt.product_items) == null ? void 0 : gt.length) > 0 || ((B = bt == null ? void 0 : bt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
1056
+ (((wt = gt == null ? void 0 : gt.product_items) == null ? void 0 : wt.length) > 0 || ((B = gt == null ? void 0 : gt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
1074
1057
  position: "bottom-right",
1075
1058
  autoClose: 3e3,
1076
1059
  hideProgressBar: !1,
1077
1060
  closeOnClick: !0,
1078
1061
  pauseOnHover: !0,
1079
1062
  draggable: !0
1080
- }), Vt(y.basket_id || (y == null ? void 0 : y.basketId));
1063
+ }), Vt(x.basket_id || (x == null ? void 0 : x.basketId));
1081
1064
  }
1082
1065
  } catch (f) {
1083
- V(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1066
+ H(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1084
1067
  position: "bottom-right",
1085
1068
  autoClose: 3e3
1086
1069
  }), ((U = f == null ? void 0 : f.response) == null ? void 0 : U.status) === 404 || // Basket not found
1087
- ((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && st(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (st(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
1070
+ ((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 401 ? (((R = f == null ? void 0 : f.response) == null ? void 0 : R.status) === 404 && nt(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (nt(null), Kt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
1088
1071
  position: "bottom-right",
1089
1072
  autoClose: 3e3
1090
1073
  }));
1091
1074
  }
1092
- V(!1);
1075
+ H(!1);
1093
1076
  };
1094
- return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(yr, { open: m, onOpenChange: S, children: [
1077
+ return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(yr, { open: g, onOpenChange: _, children: [
1095
1078
  /* @__PURE__ */ a(
1096
1079
  vr,
1097
1080
  {
1098
- onClick: () => S(!0),
1081
+ onClick: () => _(!0),
1099
1082
  style: {
1100
1083
  // background: storeDetails.tanyaThemeColor,
1101
1084
  },
@@ -1160,7 +1143,7 @@ const st = (t) => {
1160
1143
  "div",
1161
1144
  {
1162
1145
  className: "fixed inset-0 z-40 bg-black/30",
1163
- onClick: () => S(!1)
1146
+ onClick: () => _(!1)
1164
1147
  }
1165
1148
  ),
1166
1149
  /* @__PURE__ */ u(
@@ -1171,9 +1154,9 @@ const st = (t) => {
1171
1154
  top-0 right-0
1172
1155
  transition-transform duration-300 ease-in-out
1173
1156
  lg:transform
1174
- ${_ ? "lg:translate-x-0" : "lg:translate-x-full"}
1157
+ ${C ? "lg:translate-x-0" : "lg:translate-x-full"}
1175
1158
  // For mobile: animate from bottom
1176
- ${_ ? "translate-y-0" : "translate-y-full"}
1159
+ ${C ? "translate-y-0" : "translate-y-full"}
1177
1160
  lg:translate-y-0
1178
1161
  `,
1179
1162
  style: {
@@ -1251,7 +1234,7 @@ const st = (t) => {
1251
1234
  gap: "1.25rem",
1252
1235
  margin: "0.75rem"
1253
1236
  },
1254
- children: /* @__PURE__ */ a("button", { onClick: () => S(!1), children: /* @__PURE__ */ u(
1237
+ children: /* @__PURE__ */ a("button", { onClick: () => _(!1), children: /* @__PURE__ */ u(
1255
1238
  "svg",
1256
1239
  {
1257
1240
  width: "24",
@@ -1303,12 +1286,12 @@ const st = (t) => {
1303
1286
  /* @__PURE__ */ u(
1304
1287
  "div",
1305
1288
  {
1306
- className: `flex flex-col h-full ${ot ? "lg:w-2/3 w-full" : "w-full"}`,
1289
+ className: `flex flex-col h-full ${tt ? "lg:w-2/3 w-full" : "w-full"}`,
1307
1290
  children: [
1308
1291
  /* @__PURE__ */ u(
1309
1292
  "div",
1310
1293
  {
1311
- ref: C,
1294
+ ref: S,
1312
1295
  className: "overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",
1313
1296
  children: [
1314
1297
  (k == null ? void 0 : k.whomRequired) && /* @__PURE__ */ u(
@@ -1317,32 +1300,32 @@ const st = (t) => {
1317
1300
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
1318
1301
  children: [
1319
1302
  /* @__PURE__ */ a("div", { className: "flex gap-2 bg-[#FFFFFF]", children: /* @__PURE__ */ a("p", { className: "font-bold font-nunitoSans text-[#494949]", children: "Is this for you or someone else?" }) }),
1320
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((c) => /* @__PURE__ */ a(
1303
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((l) => /* @__PURE__ */ a(
1321
1304
  "button",
1322
1305
  {
1323
- onClick: () => jt(c),
1306
+ onClick: () => jt(l),
1324
1307
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1325
1308
  style: {
1326
- backgroundColor: ut === o[c] ? "#FFFFFF" : "#F3F3F3",
1327
- borderColor: ut === o[c] ? "#BBB3DD" : ""
1309
+ backgroundColor: dt === o[l] ? "#FFFFFF" : "#F3F3F3",
1310
+ borderColor: dt === o[l] ? "#BBB3DD" : ""
1328
1311
  },
1329
- children: c
1312
+ children: l
1330
1313
  },
1331
- c
1314
+ l
1332
1315
  )) })
1333
1316
  ]
1334
1317
  }
1335
1318
  ),
1336
- _t.map((c, v) => {
1337
- var w, x;
1319
+ Ct.map((l, v) => {
1320
+ var m, b;
1338
1321
  return /* @__PURE__ */ u("div", { children: [
1339
- /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a("p", { className: "text-sm 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: c.query }) }),
1340
- c.response && c.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1322
+ /* @__PURE__ */ a("div", { className: "flex justify-end", children: /* @__PURE__ */ a("p", { className: "text-sm 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: l.query }) }),
1323
+ l.response && l.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
1341
1324
  "div",
1342
1325
  {
1343
1326
  className: "font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1344
1327
  dangerouslySetInnerHTML: {
1345
- __html: Xt(c.response)
1328
+ __html: Xt(l.response)
1346
1329
  }
1347
1330
  }
1348
1331
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1350,19 +1333,19 @@ const st = (t) => {
1350
1333
  {
1351
1334
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1352
1335
  dangerouslySetInnerHTML: {
1353
- __html: Xt(c.response)
1336
+ __html: Xt(l.response)
1354
1337
  }
1355
1338
  }
1356
1339
  ) }),
1357
- Pt && !c.response.includes("Thinking") && ((w = c.products) == null ? void 0 : w.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" }) }),
1358
- (c == null ? void 0 : c.products) && ((x = c == null ? void 0 : c.products) == null ? void 0 : x.length) > 0 && /* @__PURE__ */ a(
1340
+ Ot && !l.response.includes("Thinking") && ((m = l.products) == null ? void 0 : m.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" }) }),
1341
+ (l == null ? void 0 : l.products) && ((b = l == null ? void 0 : l.products) == null ? void 0 : b.length) > 0 && /* @__PURE__ */ a(
1359
1342
  Ir,
1360
1343
  {
1361
- chat: c.products,
1344
+ chat: l.products,
1362
1345
  storeDetails: k
1363
1346
  }
1364
1347
  ),
1365
- c.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1348
+ l.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1366
1349
  /* @__PURE__ */ a(
1367
1350
  "p",
1368
1351
  {
@@ -1371,7 +1354,7 @@ const st = (t) => {
1371
1354
  children: "Why not explore these inquiries..."
1372
1355
  }
1373
1356
  ),
1374
- c.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1357
+ l.potentialQuestions.split(",").map((p, w) => /* @__PURE__ */ a(
1375
1358
  "button",
1376
1359
  {
1377
1360
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
@@ -1381,10 +1364,10 @@ const st = (t) => {
1381
1364
  },
1382
1365
  children: p
1383
1366
  },
1384
- g
1367
+ w
1385
1368
  ))
1386
1369
  ] }),
1387
- c.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1370
+ l.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1388
1371
  "div",
1389
1372
  {
1390
1373
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1417,7 +1400,7 @@ const st = (t) => {
1417
1400
  ]
1418
1401
  }
1419
1402
  ) }),
1420
- c.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1403
+ l.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1421
1404
  /* @__PURE__ */ a(
1422
1405
  "div",
1423
1406
  {
@@ -1427,12 +1410,12 @@ const st = (t) => {
1427
1410
  },
1428
1411
  dangerouslySetInnerHTML: {
1429
1412
  __html: Xt(
1430
- c.secondaryResponse
1413
+ l.secondaryResponse
1431
1414
  )
1432
1415
  }
1433
1416
  }
1434
1417
  ),
1435
- c.productSnapshot && // chat.productSnapshot.points > 0 &&
1418
+ l.productSnapshot && // chat.productSnapshot.points > 0 &&
1436
1419
  /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
1437
1420
  "div",
1438
1421
  {
@@ -1450,11 +1433,11 @@ const st = (t) => {
1450
1433
  height: 112,
1451
1434
  borderColor: "#eee"
1452
1435
  },
1453
- children: c.productSnapshot.image ? /* @__PURE__ */ a(
1436
+ children: l.productSnapshot.image ? /* @__PURE__ */ a(
1454
1437
  "img",
1455
1438
  {
1456
- src: c.productSnapshot.image,
1457
- alt: c.productSnapshot.name,
1439
+ src: l.productSnapshot.image,
1440
+ alt: l.productSnapshot.name,
1458
1441
  className: "w-full h-full object-cover"
1459
1442
  }
1460
1443
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -1462,18 +1445,18 @@ const st = (t) => {
1462
1445
  ),
1463
1446
  /* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
1464
1447
  /* @__PURE__ */ u("div", { children: [
1465
- /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: c.productSnapshot.name }),
1466
- /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: c.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1448
+ /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: l.productSnapshot.name }),
1449
+ /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: l.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
1467
1450
  style: "currency",
1468
1451
  currency: (k == null ? void 0 : k.currency) || "USD"
1469
1452
  }).format(
1470
- c.productSnapshot.price
1453
+ l.productSnapshot.price
1471
1454
  ) : "" }),
1472
- c.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1455
+ l.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1473
1456
  "You will earn",
1474
1457
  " ",
1475
1458
  /* @__PURE__ */ u("strong", { children: [
1476
- c.productSnapshot.points,
1459
+ l.productSnapshot.points,
1477
1460
  " ",
1478
1461
  "points"
1479
1462
  ] })
@@ -1485,18 +1468,18 @@ const st = (t) => {
1485
1468
  "button",
1486
1469
  {
1487
1470
  className: "px-3 py-1 text-sm",
1488
- onClick: () => P(
1471
+ onClick: () => O(
1489
1472
  (p) => p.map(
1490
- (g, A) => A === v && g.productSnapshot ? {
1491
- ...g,
1473
+ (w, A) => A === v && w.productSnapshot ? {
1474
+ ...w,
1492
1475
  productSnapshot: {
1493
- ...g.productSnapshot,
1476
+ ...w.productSnapshot,
1494
1477
  quantity: Math.max(
1495
1478
  1,
1496
- g.productSnapshot.quantity - 1
1479
+ w.productSnapshot.quantity - 1
1497
1480
  )
1498
1481
  }
1499
- } : g
1482
+ } : w
1500
1483
  )
1501
1484
  ),
1502
1485
  style: {
@@ -1506,20 +1489,20 @@ const st = (t) => {
1506
1489
  children: "−"
1507
1490
  }
1508
1491
  ),
1509
- /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: c.productSnapshot.quantity }),
1492
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: l.productSnapshot.quantity }),
1510
1493
  /* @__PURE__ */ a(
1511
1494
  "button",
1512
1495
  {
1513
1496
  className: "px-3 py-1 text-sm",
1514
- onClick: () => P(
1497
+ onClick: () => O(
1515
1498
  (p) => p.map(
1516
- (g, A) => A === v && g.productSnapshot ? {
1517
- ...g,
1499
+ (w, A) => A === v && w.productSnapshot ? {
1500
+ ...w,
1518
1501
  productSnapshot: {
1519
- ...g.productSnapshot,
1520
- quantity: g.productSnapshot.quantity + 1
1502
+ ...w.productSnapshot,
1503
+ quantity: w.productSnapshot.quantity + 1
1521
1504
  }
1522
- } : g
1505
+ } : w
1523
1506
  )
1524
1507
  ),
1525
1508
  style: {
@@ -1536,19 +1519,19 @@ const st = (t) => {
1536
1519
  onClick: () => {
1537
1520
  or(
1538
1521
  zt(
1539
- c.productSnapshot
1522
+ l.productSnapshot
1540
1523
  ),
1541
- c.productSnapshot.quantity
1524
+ l.productSnapshot.quantity
1542
1525
  );
1543
1526
  },
1544
- disabled: ct,
1527
+ disabled: lt,
1545
1528
  className: "px-4 py-2 rounded-full font-medium",
1546
1529
  style: {
1547
1530
  background: k.tanyaThemeColor,
1548
1531
  color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
1549
- opacity: ct ? 0.8 : 1
1532
+ opacity: lt ? 0.8 : 1
1550
1533
  },
1551
- children: ct ? "Adding..." : "Add to cart"
1534
+ children: lt ? "Adding..." : "Add to cart"
1552
1535
  }
1553
1536
  )
1554
1537
  ] })
@@ -1578,9 +1561,9 @@ const st = (t) => {
1578
1561
  placeholder: "How can I help you...",
1579
1562
  value: St,
1580
1563
  autoFocus: !0,
1581
- onChange: (c) => Ct(c.target.value),
1582
- onKeyDown: (c) => {
1583
- c.key === "Enter" && !dt && D();
1564
+ onChange: (l) => _t(l.target.value),
1565
+ onKeyDown: (l) => {
1566
+ l.key === "Enter" && !ct && D();
1584
1567
  }
1585
1568
  }
1586
1569
  ),
@@ -1588,10 +1571,10 @@ const st = (t) => {
1588
1571
  "button",
1589
1572
  {
1590
1573
  type: "submit",
1591
- disabled: dt,
1574
+ disabled: ct,
1592
1575
  className: "p-3",
1593
1576
  onClick: () => D(),
1594
- children: dt ? /* @__PURE__ */ a(
1577
+ children: ct ? /* @__PURE__ */ a(
1595
1578
  "div",
1596
1579
  {
1597
1580
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -1640,7 +1623,7 @@ var ne = function(t, e) {
1640
1623
  for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1641
1624
  }, ne(t, e);
1642
1625
  };
1643
- function Or(t, e) {
1626
+ function Pr(t, e) {
1644
1627
  if (typeof e != "function" && e !== null)
1645
1628
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1646
1629
  ne(t, e);
@@ -1653,12 +1636,12 @@ var X = function() {
1653
1636
  return X = Object.assign || function(e) {
1654
1637
  for (var r, o = 1, n = arguments.length; o < n; o++) {
1655
1638
  r = arguments[o];
1656
- for (var d in r) Object.prototype.hasOwnProperty.call(r, d) && (e[d] = r[d]);
1639
+ for (var c in r) Object.prototype.hasOwnProperty.call(r, c) && (e[c] = r[c]);
1657
1640
  }
1658
1641
  return e;
1659
1642
  }, X.apply(this, arguments);
1660
1643
  };
1661
- function Pr(t, e) {
1644
+ function Or(t, e) {
1662
1645
  var r = {};
1663
1646
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
1664
1647
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1666,12 +1649,12 @@ function Pr(t, e) {
1666
1649
  e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
1667
1650
  return r;
1668
1651
  }
1669
- var Qt = "Invariant Violation", _e = Object.setPrototypeOf, $r = _e === void 0 ? function(t, e) {
1652
+ var Qt = "Invariant Violation", Ce = Object.setPrototypeOf, $r = Ce === void 0 ? function(t, e) {
1670
1653
  return t.__proto__ = e, t;
1671
- } : _e, Ye = (
1654
+ } : Ce, Ye = (
1672
1655
  /** @class */
1673
1656
  (function(t) {
1674
- Or(e, t);
1657
+ Pr(e, t);
1675
1658
  function e(r) {
1676
1659
  r === void 0 && (r = Qt);
1677
1660
  var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
@@ -1680,7 +1663,7 @@ var Qt = "Invariant Violation", _e = Object.setPrototypeOf, $r = _e === void 0 ?
1680
1663
  return e;
1681
1664
  })(Error)
1682
1665
  );
1683
- function at(t, e) {
1666
+ function rt(t, e) {
1684
1667
  if (!t)
1685
1668
  throw new Ye(e);
1686
1669
  }
@@ -1695,21 +1678,21 @@ function Bt(t) {
1695
1678
  }
1696
1679
  (function(t) {
1697
1680
  t.debug = Bt("debug"), t.log = Bt("log"), t.warn = Bt("warn"), t.error = Bt("error");
1698
- })(at || (at = {}));
1681
+ })(rt || (rt = {}));
1699
1682
  var Je = "3.14.0";
1700
- function xt(t) {
1683
+ function bt(t) {
1701
1684
  try {
1702
1685
  return t();
1703
1686
  } catch {
1704
1687
  }
1705
1688
  }
1706
- const ae = xt(function() {
1689
+ const ae = bt(function() {
1707
1690
  return globalThis;
1708
- }) || xt(function() {
1691
+ }) || bt(function() {
1709
1692
  return window;
1710
- }) || xt(function() {
1693
+ }) || bt(function() {
1711
1694
  return self;
1712
- }) || xt(function() {
1695
+ }) || bt(function() {
1713
1696
  return global;
1714
1697
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1715
1698
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1717,8 +1700,8 @@ const ae = xt(function() {
1717
1700
  // detect syntactic usage of the Function constructor. If you think you can
1718
1701
  // improve your static analysis to detect this obfuscation, think again. This
1719
1702
  // is an arms race you cannot win, at least not in JavaScript.
1720
- xt(function() {
1721
- return xt.constructor("return this")();
1703
+ bt(function() {
1704
+ return bt.constructor("return this")();
1722
1705
  });
1723
1706
  var Fe = /* @__PURE__ */ new Map();
1724
1707
  function Ar(t) {
@@ -1745,12 +1728,12 @@ function Ut(t) {
1745
1728
  var Zt = Object.assign(function(e, r) {
1746
1729
  for (var o = [], n = 2; n < arguments.length; n++)
1747
1730
  o[n - 2] = arguments[n];
1748
- e || at(e, le(r, o) || ce(r, o));
1731
+ e || rt(e, le(r, o) || ce(r, o));
1749
1732
  }, {
1750
- debug: Ut(at.debug),
1751
- log: Ut(at.log),
1752
- warn: Ut(at.warn),
1753
- error: Ut(at.error)
1733
+ debug: Ut(rt.debug),
1734
+ log: Ut(rt.log),
1735
+ warn: Ut(rt.warn),
1736
+ error: Ut(rt.error)
1754
1737
  });
1755
1738
  function We(t) {
1756
1739
  for (var e = [], r = 1; r < arguments.length; r++)
@@ -1813,11 +1796,11 @@ const Br = () => class {
1813
1796
  return N.slots[this.id];
1814
1797
  }
1815
1798
  withValue(e, r, o, n) {
1816
- const d = {
1799
+ const c = {
1817
1800
  __proto__: null,
1818
1801
  [this.id]: e
1819
1802
  }, s = N;
1820
- N = { parent: s, slots: d };
1803
+ N = { parent: s, slots: c };
1821
1804
  try {
1822
1805
  return r.apply(n, o);
1823
1806
  } finally {
@@ -1885,7 +1868,7 @@ Array[te] || (function(t) {
1885
1868
  } finally {
1886
1869
  return t;
1887
1870
  }
1888
- })(Br()), { bind: Co, noContext: _o } = de;
1871
+ })(Br()), { bind: _o, noContext: Co } = de;
1889
1872
  new de();
1890
1873
  function qr(t, e) {
1891
1874
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
@@ -1902,26 +1885,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1902
1885
  }
1903
1886
  function Mr(t, e) {
1904
1887
  if (t) {
1905
- if (typeof t == "string") return Oe(t, e);
1888
+ if (typeof t == "string") return Pe(t, e);
1906
1889
  var r = Object.prototype.toString.call(t).slice(8, -1);
1907
1890
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
1908
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
1891
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Pe(t, e);
1909
1892
  }
1910
1893
  }
1911
- function Oe(t, e) {
1894
+ function Pe(t, e) {
1912
1895
  (e == null || e > t.length) && (e = t.length);
1913
1896
  for (var r = 0, o = new Array(e); r < e; r++)
1914
1897
  o[r] = t[r];
1915
1898
  return o;
1916
1899
  }
1917
- function Pe(t, e) {
1900
+ function Oe(t, e) {
1918
1901
  for (var r = 0; r < e.length; r++) {
1919
1902
  var o = e[r];
1920
1903
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1921
1904
  }
1922
1905
  }
1923
1906
  function ue(t, e, r) {
1924
- return e && Pe(t.prototype, e), r && Pe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1907
+ return e && Oe(t.prototype, e), r && Oe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1925
1908
  }
1926
1909
  var pe = function() {
1927
1910
  return typeof Symbol == "function";
@@ -1946,8 +1929,8 @@ function Nt(t) {
1946
1929
  function Vr(t) {
1947
1930
  return t instanceof E;
1948
1931
  }
1949
- function vt(t) {
1950
- vt.log ? vt.log(t) : setTimeout(function() {
1932
+ function yt(t) {
1933
+ yt.log ? yt.log(t) : setTimeout(function() {
1951
1934
  throw t;
1952
1935
  });
1953
1936
  }
@@ -1956,7 +1939,7 @@ function Mt(t) {
1956
1939
  try {
1957
1940
  t();
1958
1941
  } catch (e) {
1959
- vt(e);
1942
+ yt(e);
1960
1943
  }
1961
1944
  });
1962
1945
  }
@@ -1971,7 +1954,7 @@ function Qe(t) {
1971
1954
  r && r.call(e);
1972
1955
  }
1973
1956
  } catch (o) {
1974
- vt(o);
1957
+ yt(o);
1975
1958
  }
1976
1959
  }
1977
1960
  function se(t) {
@@ -2002,8 +1985,8 @@ function Ze(t, e, r) {
2002
1985
  se(t), n && n.call(o);
2003
1986
  break;
2004
1987
  }
2005
- } catch (d) {
2006
- vt(d);
1988
+ } catch (c) {
1989
+ yt(c);
2007
1990
  }
2008
1991
  t._state === "closed" ? Qe(t) : t._state === "running" && (t._state = "ready");
2009
1992
  }
@@ -2034,8 +2017,8 @@ var Yr = /* @__PURE__ */ (function() {
2034
2017
  var n = new Kr(this);
2035
2018
  try {
2036
2019
  this._cleanup = o.call(void 0, n);
2037
- } catch (d) {
2038
- n.error(d);
2020
+ } catch (c) {
2021
+ n.error(c);
2039
2022
  }
2040
2023
  this._state === "initializing" && (this._state = "ready");
2041
2024
  }
@@ -2080,42 +2063,42 @@ var Yr = /* @__PURE__ */ (function() {
2080
2063
  }), new Yr(o, this._subscriber);
2081
2064
  }, e.forEach = function(o) {
2082
2065
  var n = this;
2083
- return new Promise(function(d, s) {
2066
+ return new Promise(function(c, s) {
2084
2067
  if (typeof o != "function") {
2085
2068
  s(new TypeError(o + " is not a function"));
2086
2069
  return;
2087
2070
  }
2088
- function l() {
2089
- i.unsubscribe(), d();
2071
+ function d() {
2072
+ i.unsubscribe(), c();
2090
2073
  }
2091
2074
  var i = n.subscribe({
2092
- next: function(b) {
2075
+ next: function(y) {
2093
2076
  try {
2094
- o(b, l);
2095
- } catch (m) {
2096
- s(m), i.unsubscribe();
2077
+ o(y, d);
2078
+ } catch (g) {
2079
+ s(g), i.unsubscribe();
2097
2080
  }
2098
2081
  },
2099
2082
  error: s,
2100
- complete: d
2083
+ complete: c
2101
2084
  });
2102
2085
  });
2103
2086
  }, e.map = function(o) {
2104
2087
  var n = this;
2105
2088
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2106
- var d = Nt(this);
2107
- return new d(function(s) {
2089
+ var c = Nt(this);
2090
+ return new c(function(s) {
2108
2091
  return n.subscribe({
2109
- next: function(l) {
2092
+ next: function(d) {
2110
2093
  try {
2111
- l = o(l);
2094
+ d = o(d);
2112
2095
  } catch (i) {
2113
2096
  return s.error(i);
2114
2097
  }
2115
- s.next(l);
2098
+ s.next(d);
2116
2099
  },
2117
- error: function(l) {
2118
- s.error(l);
2100
+ error: function(d) {
2101
+ s.error(d);
2119
2102
  },
2120
2103
  complete: function() {
2121
2104
  s.complete();
@@ -2125,19 +2108,19 @@ var Yr = /* @__PURE__ */ (function() {
2125
2108
  }, e.filter = function(o) {
2126
2109
  var n = this;
2127
2110
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2128
- var d = Nt(this);
2129
- return new d(function(s) {
2111
+ var c = Nt(this);
2112
+ return new c(function(s) {
2130
2113
  return n.subscribe({
2131
- next: function(l) {
2114
+ next: function(d) {
2132
2115
  try {
2133
- if (!o(l)) return;
2116
+ if (!o(d)) return;
2134
2117
  } catch (i) {
2135
2118
  return s.error(i);
2136
2119
  }
2137
- s.next(l);
2120
+ s.next(d);
2138
2121
  },
2139
- error: function(l) {
2140
- s.error(l);
2122
+ error: function(d) {
2123
+ s.error(d);
2141
2124
  },
2142
2125
  complete: function() {
2143
2126
  s.complete();
@@ -2147,37 +2130,37 @@ var Yr = /* @__PURE__ */ (function() {
2147
2130
  }, e.reduce = function(o) {
2148
2131
  var n = this;
2149
2132
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2150
- var d = Nt(this), s = arguments.length > 1, l = !1, i = arguments[1], b = i;
2151
- return new d(function(m) {
2133
+ var c = Nt(this), s = arguments.length > 1, d = !1, i = arguments[1], y = i;
2134
+ return new c(function(g) {
2152
2135
  return n.subscribe({
2153
- next: function(S) {
2154
- var _ = !l;
2155
- if (l = !0, !_ || s)
2136
+ next: function(_) {
2137
+ var C = !d;
2138
+ if (d = !0, !C || s)
2156
2139
  try {
2157
- b = o(b, S);
2140
+ y = o(y, _);
2158
2141
  } catch (F) {
2159
- return m.error(F);
2142
+ return g.error(F);
2160
2143
  }
2161
2144
  else
2162
- b = S;
2145
+ y = _;
2163
2146
  },
2164
- error: function(S) {
2165
- m.error(S);
2147
+ error: function(_) {
2148
+ g.error(_);
2166
2149
  },
2167
2150
  complete: function() {
2168
- if (!l && !s) return m.error(new TypeError("Cannot reduce an empty sequence"));
2169
- m.next(b), m.complete();
2151
+ if (!d && !s) return g.error(new TypeError("Cannot reduce an empty sequence"));
2152
+ g.next(y), g.complete();
2170
2153
  }
2171
2154
  });
2172
2155
  });
2173
2156
  }, e.concat = function() {
2174
- for (var o = this, n = arguments.length, d = new Array(n), s = 0; s < n; s++)
2175
- d[s] = arguments[s];
2176
- var l = Nt(this);
2177
- return new l(function(i) {
2178
- var b, m = 0;
2179
- function S(_) {
2180
- b = _.subscribe({
2157
+ for (var o = this, n = arguments.length, c = new Array(n), s = 0; s < n; s++)
2158
+ c[s] = arguments[s];
2159
+ var d = Nt(this);
2160
+ return new d(function(i) {
2161
+ var y, g = 0;
2162
+ function _(C) {
2163
+ y = C.subscribe({
2181
2164
  next: function(F) {
2182
2165
  i.next(F);
2183
2166
  },
@@ -2185,54 +2168,54 @@ var Yr = /* @__PURE__ */ (function() {
2185
2168
  i.error(F);
2186
2169
  },
2187
2170
  complete: function() {
2188
- m === d.length ? (b = void 0, i.complete()) : S(l.from(d[m++]));
2171
+ g === c.length ? (y = void 0, i.complete()) : _(d.from(c[g++]));
2189
2172
  }
2190
2173
  });
2191
2174
  }
2192
- return S(o), function() {
2193
- b && (b.unsubscribe(), b = void 0);
2175
+ return _(o), function() {
2176
+ y && (y.unsubscribe(), y = void 0);
2194
2177
  };
2195
2178
  });
2196
2179
  }, e.flatMap = function(o) {
2197
2180
  var n = this;
2198
2181
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2199
- var d = Nt(this);
2200
- return new d(function(s) {
2201
- var l = [], i = n.subscribe({
2202
- next: function(m) {
2182
+ var c = Nt(this);
2183
+ return new c(function(s) {
2184
+ var d = [], i = n.subscribe({
2185
+ next: function(g) {
2203
2186
  if (o)
2204
2187
  try {
2205
- m = o(m);
2206
- } catch (_) {
2207
- return s.error(_);
2188
+ g = o(g);
2189
+ } catch (C) {
2190
+ return s.error(C);
2208
2191
  }
2209
- var S = d.from(m).subscribe({
2210
- next: function(_) {
2211
- s.next(_);
2192
+ var _ = c.from(g).subscribe({
2193
+ next: function(C) {
2194
+ s.next(C);
2212
2195
  },
2213
- error: function(_) {
2214
- s.error(_);
2196
+ error: function(C) {
2197
+ s.error(C);
2215
2198
  },
2216
2199
  complete: function() {
2217
- var _ = l.indexOf(S);
2218
- _ >= 0 && l.splice(_, 1), b();
2200
+ var C = d.indexOf(_);
2201
+ C >= 0 && d.splice(C, 1), y();
2219
2202
  }
2220
2203
  });
2221
- l.push(S);
2204
+ d.push(_);
2222
2205
  },
2223
- error: function(m) {
2224
- s.error(m);
2206
+ error: function(g) {
2207
+ s.error(g);
2225
2208
  },
2226
2209
  complete: function() {
2227
- b();
2210
+ y();
2228
2211
  }
2229
2212
  });
2230
- function b() {
2231
- i.closed && l.length === 0 && s.complete();
2213
+ function y() {
2214
+ i.closed && d.length === 0 && s.complete();
2232
2215
  }
2233
2216
  return function() {
2234
- l.forEach(function(m) {
2235
- return m.unsubscribe();
2217
+ d.forEach(function(g) {
2218
+ return g.unsubscribe();
2236
2219
  }), i.unsubscribe();
2237
2220
  };
2238
2221
  });
@@ -2241,47 +2224,47 @@ var Yr = /* @__PURE__ */ (function() {
2241
2224
  }, t.from = function(o) {
2242
2225
  var n = typeof this == "function" ? this : t;
2243
2226
  if (o == null) throw new TypeError(o + " is not an object");
2244
- var d = Jt(o, ie);
2245
- if (d) {
2246
- var s = d.call(o);
2227
+ var c = Jt(o, ie);
2228
+ if (c) {
2229
+ var s = c.call(o);
2247
2230
  if (Object(s) !== s) throw new TypeError(s + " is not an object");
2248
- return Vr(s) && s.constructor === n ? s : new n(function(l) {
2249
- return s.subscribe(l);
2231
+ return Vr(s) && s.constructor === n ? s : new n(function(d) {
2232
+ return s.subscribe(d);
2250
2233
  });
2251
2234
  }
2252
- if (fe("iterator") && (d = Jt(o, Hr), d))
2253
- return new n(function(l) {
2235
+ if (fe("iterator") && (c = Jt(o, Hr), c))
2236
+ return new n(function(d) {
2254
2237
  Mt(function() {
2255
- if (!l.closed) {
2256
- for (var i = qr(d.call(o)), b; !(b = i()).done; ) {
2257
- var m = b.value;
2258
- if (l.next(m), l.closed) return;
2238
+ if (!d.closed) {
2239
+ for (var i = qr(c.call(o)), y; !(y = i()).done; ) {
2240
+ var g = y.value;
2241
+ if (d.next(g), d.closed) return;
2259
2242
  }
2260
- l.complete();
2243
+ d.complete();
2261
2244
  }
2262
2245
  });
2263
2246
  });
2264
2247
  if (Array.isArray(o))
2265
- return new n(function(l) {
2248
+ return new n(function(d) {
2266
2249
  Mt(function() {
2267
- if (!l.closed) {
2250
+ if (!d.closed) {
2268
2251
  for (var i = 0; i < o.length; ++i)
2269
- if (l.next(o[i]), l.closed) return;
2270
- l.complete();
2252
+ if (d.next(o[i]), d.closed) return;
2253
+ d.complete();
2271
2254
  }
2272
2255
  });
2273
2256
  });
2274
2257
  throw new TypeError(o + " is not observable");
2275
2258
  }, t.of = function() {
2276
- for (var o = arguments.length, n = new Array(o), d = 0; d < o; d++)
2277
- n[d] = arguments[d];
2259
+ for (var o = arguments.length, n = new Array(o), c = 0; c < o; c++)
2260
+ n[c] = arguments[c];
2278
2261
  var s = typeof this == "function" ? this : t;
2279
- return new s(function(l) {
2262
+ return new s(function(d) {
2280
2263
  Mt(function() {
2281
- if (!l.closed) {
2264
+ if (!d.closed) {
2282
2265
  for (var i = 0; i < n.length; ++i)
2283
- if (l.next(n[i]), l.closed) return;
2284
- l.complete();
2266
+ if (d.next(n[i]), d.closed) return;
2267
+ d.complete();
2285
2268
  }
2286
2269
  });
2287
2270
  });
@@ -2295,7 +2278,7 @@ var Yr = /* @__PURE__ */ (function() {
2295
2278
  pe() && Object.defineProperty(E, Symbol("extensions"), {
2296
2279
  value: {
2297
2280
  symbol: ie,
2298
- hostReportError: vt
2281
+ hostReportError: yt
2299
2282
  },
2300
2283
  configurable: !0
2301
2284
  });
@@ -2315,9 +2298,9 @@ function Jr(t) {
2315
2298
  e = "@@observable";
2316
2299
  return e;
2317
2300
  }
2318
- var yt;
2319
- typeof self < "u" ? yt = self : typeof window < "u" ? yt = window : typeof global < "u" ? yt = global : typeof module < "u" ? yt = module : yt = Function("return this")();
2320
- Jr(yt);
2301
+ var xt;
2302
+ typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2303
+ Jr(xt);
2321
2304
  var $e = E.prototype, ze = "@@observable";
2322
2305
  $e[ze] || ($e[ze] = function() {
2323
2306
  return this;
@@ -2337,8 +2320,8 @@ function Wr(t) {
2337
2320
  return t;
2338
2321
  }
2339
2322
  function Gr(t, e) {
2340
- var r = X({}, t), o = function(d) {
2341
- typeof d == "function" ? r = X(X({}, r), d(r)) : r = X(X({}, r), d);
2323
+ var r = X({}, t), o = function(c) {
2324
+ typeof c == "function" ? r = X(X({}, r), c(r)) : r = X(X({}, r), c);
2342
2325
  }, n = function() {
2343
2326
  return X({}, r);
2344
2327
  };
@@ -2390,28 +2373,28 @@ var tr = (
2390
2373
  return r.concat(o);
2391
2374
  });
2392
2375
  }, t.split = function(e, r, o) {
2393
- var n = Et(r), d = Et(o || new t(Ae)), s;
2394
- return qt(n) && qt(d) ? s = new t(function(l) {
2395
- return e(l) ? n.request(l) || E.of() : d.request(l) || E.of();
2396
- }) : s = new t(function(l, i) {
2397
- return e(l) ? n.request(l, i) || E.of() : d.request(l, i) || E.of();
2398
- }), Object.assign(s, { left: n, right: d });
2376
+ var n = Et(r), c = Et(o || new t(Ae)), s;
2377
+ return qt(n) && qt(c) ? s = new t(function(d) {
2378
+ return e(d) ? n.request(d) || E.of() : c.request(d) || E.of();
2379
+ }) : s = new t(function(d, i) {
2380
+ return e(d) ? n.request(d, i) || E.of() : c.request(d, i) || E.of();
2381
+ }), Object.assign(s, { left: n, right: c });
2399
2382
  }, t.execute = function(e, r) {
2400
2383
  return e.request(Gr(r.context, Xr(Wr(r)))) || E.of();
2401
2384
  }, t.concat = function(e, r) {
2402
2385
  var o = Et(e);
2403
2386
  if (qt(o))
2404
2387
  return globalThis.__DEV__ !== !1 && Zt.warn(47, o), o;
2405
- var n = Et(r), d;
2406
- return qt(n) ? d = new t(function(s) {
2407
- return o.request(s, function(l) {
2408
- return n.request(l) || E.of();
2388
+ var n = Et(r), c;
2389
+ return qt(n) ? c = new t(function(s) {
2390
+ return o.request(s, function(d) {
2391
+ return n.request(d) || E.of();
2409
2392
  }) || E.of();
2410
- }) : d = new t(function(s, l) {
2393
+ }) : c = new t(function(s, d) {
2411
2394
  return o.request(s, function(i) {
2412
- return n.request(i, l) || E.of();
2395
+ return n.request(i, d) || E.of();
2413
2396
  }) || E.of();
2414
- }), Object.assign(d, { left: o, right: n });
2397
+ }), Object.assign(c, { left: o, right: n });
2415
2398
  }, t.prototype.split = function(e, r, o) {
2416
2399
  return this.concat(t.split(e, r, o || new t(Ae)));
2417
2400
  }, t.prototype.concat = function(e) {
@@ -2431,19 +2414,19 @@ var tr = (
2431
2414
  );
2432
2415
  function oo(t) {
2433
2416
  return new tr(function(e, r) {
2434
- var o = Pr(e, []);
2417
+ var o = Or(e, []);
2435
2418
  return new E(function(n) {
2436
- var d, s = !1;
2437
- return Promise.resolve(o).then(function(l) {
2438
- return t(l, e.getContext());
2419
+ var c, s = !1;
2420
+ return Promise.resolve(o).then(function(d) {
2421
+ return t(d, e.getContext());
2439
2422
  }).then(e.setContext).then(function() {
2440
- s || (d = r(e).subscribe({
2423
+ s || (c = r(e).subscribe({
2441
2424
  next: n.next.bind(n),
2442
2425
  error: n.error.bind(n),
2443
2426
  complete: n.complete.bind(n)
2444
2427
  }));
2445
2428
  }).catch(n.error.bind(n)), function() {
2446
- s = !0, d && d.unsubscribe();
2429
+ s = !0, c && c.unsubscribe();
2447
2430
  };
2448
2431
  });
2449
2432
  });