tanya-chatbot 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,27 @@
1
- import { useEffect as tt, useState as $, useRef as _t } from "react";
1
+ import { useEffect as it, 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
- import { createHttpLink as ar, ApolloClient as ir, InMemoryCache as sr, ApolloProvider as lr } from "@apollo/client";
4
- import { Provider as cr, useDispatch as je, useSelector as Mt } from "react-redux";
5
- import { createSlice as De, configureStore as dr } from "@reduxjs/toolkit";
6
- import * as Ae from "@radix-ui/react-popover";
3
+ import { createHttpLink as sr, ApolloClient as lr, InMemoryCache as cr, ApolloProvider as dr } from "@apollo/client";
4
+ import { Provider as ur, useDispatch as je, useSelector as Ht } from "react-redux";
5
+ import { createSlice as De, configureStore as pr } from "@reduxjs/toolkit";
6
+ import * as Le from "@radix-ui/react-popover";
7
7
  import "clsx";
8
8
  import "tailwind-merge";
9
9
  import T from "axios";
10
10
  import "crypto-js";
11
- import { Icon as we } from "@iconify/react";
11
+ import { Icon as ge } from "@iconify/react";
12
12
  import { toast as M } from "react-toastify";
13
- const ur = '*,: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
- function bo() {
15
- return tt(() => {
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
+ function vo() {
15
+ return it(() => {
16
16
  if (typeof document < "u") {
17
17
  const t = document.createElement("style");
18
- return t.textContent = ur, document.head.appendChild(t), () => {
18
+ return t.textContent = fr, document.head.appendChild(t), () => {
19
19
  document.head.removeChild(t);
20
20
  };
21
21
  }
22
22
  }, []), null;
23
23
  }
24
- const pr = {
24
+ const hr = {
25
25
  store: {
26
26
  storeCode: "",
27
27
  storeName: "",
@@ -55,30 +55,30 @@ const pr = {
55
55
  mobile: []
56
56
  }
57
57
  }
58
- }, Le = De({
58
+ }, Be = De({
59
59
  name: "store",
60
- initialState: pr,
60
+ initialState: hr,
61
61
  reducers: {
62
62
  setStore: (t, e) => {
63
63
  t.store = e.payload;
64
64
  }
65
65
  }
66
- }), { setStore: yo } = Le.actions, fr = Le.reducer, mr = {
66
+ }), { setStore: ko } = Be.actions, mr = Be.reducer, wr = {
67
67
  product: null
68
- }, Be = De({
68
+ }, Ue = De({
69
69
  name: "product",
70
- initialState: mr,
70
+ initialState: wr,
71
71
  reducers: {
72
72
  setProduct: (t, e) => {
73
73
  t.product = e.payload;
74
74
  }
75
75
  }
76
- }), { setProduct: oe } = Be.actions, hr = Be.reducer, wr = dr({
76
+ }), { setProduct: oe } = Ue.actions, gr = Ue.reducer, br = pr({
77
77
  reducer: {
78
- store: fr,
79
- product: hr
78
+ store: mr,
79
+ product: gr
80
80
  }
81
- }), gr = ({ children: t }) => /* @__PURE__ */ a(cr, { store: wr, children: t }), Ht = (t) => {
81
+ }), xr = ({ children: t }) => /* @__PURE__ */ a(ur, { store: br, children: t }), Vt = (t) => {
82
82
  const e = new CustomEvent("reactCartUpdated", {
83
83
  detail: {
84
84
  cartUpdated: !0,
@@ -87,31 +87,31 @@ const pr = {
87
87
  });
88
88
  window.dispatchEvent(e);
89
89
  };
90
- function xr({
90
+ function yr({
91
91
  ...t
92
92
  }) {
93
- return /* @__PURE__ */ a(Ae.Root, { "data-slot": "popover", ...t });
93
+ return /* @__PURE__ */ a(Le.Root, { "data-slot": "popover", ...t });
94
94
  }
95
- function br({
95
+ function vr({
96
96
  ...t
97
97
  }) {
98
- return /* @__PURE__ */ a(Ae.Trigger, { "data-slot": "popover-trigger", ...t });
98
+ return /* @__PURE__ */ a(Le.Trigger, { "data-slot": "popover-trigger", ...t });
99
99
  }
100
- const yt = () => ({ 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" }), Ue = async () => {
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 () => {
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=${rt()}&siteId=${R()}`
104
+ `${t}api/auth/token-bm-grant?baseUrl=${Q()}&siteId=${H()}`
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) {
108
108
  return T.isAxiosError(e) ? console.error("Error fetching token:", e.response || e.message) : console.error("Unexpected error:", e), null;
109
109
  }
110
- }, qe = async (t) => {
110
+ }, Me = async (t) => {
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=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
114
+ `${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
115
115
  {},
116
116
  {
117
117
  headers: {
@@ -125,45 +125,42 @@ const yt = () => ({ 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 Tt() {
129
- var x;
130
- const t = R(), e = "access_token_" + t, r = "expires_in_" + t, o = localStorage.getItem(r), n = localStorage.getItem(e);
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
131
  console.log(n);
132
- const l = ((x = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : x.isGuest) || !0;
132
+ const d = ((b = JSON.parse(sessionStorage.getItem("customerData") || "{}")) == null ? void 0 : b.isGuest) || !0;
133
133
  if (o && n && (/* @__PURE__ */ new Date()).getTime() < parseInt(o))
134
134
  return console.log("access token found in local storage"), { access_token: n, expires_in: o };
135
- const { serverUrl: c } = yt(), d = JSON.parse(
135
+ const { serverUrl: s } = lt(), l = JSON.parse(
136
136
  sessionStorage.getItem("customerData") || "{}"
137
137
  ).dwsid, i = JSON.parse(
138
138
  sessionStorage.getItem("customerData") || "{}"
139
139
  ).usrRef;
140
140
  try {
141
- const h = l ? "unregister-auth" : "register-auth", S = await T.get(
142
- `${c}sc-api/${h}?dwsid=${d}&email=${i}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}&siteId=${R()}&token=true`,
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`,
143
144
  {
144
145
  withCredentials: !0
145
146
  }
146
- );
147
- return localStorage.setItem(e, S.data.access_token), localStorage.setItem(
148
- r,
149
- String((/* @__PURE__ */ new Date()).getTime() + S.data.expires_in * 1e3)
150
- ), localStorage.setItem("isGuest", l ? "true" : "false"), S.data;
151
- } catch (h) {
152
- console.log(h);
147
+ )).data;
148
+ } catch (m) {
149
+ console.log(m);
153
150
  }
154
151
  }
155
- const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getItem("SiteId"), ot = () => sessionStorage.getItem("pubCfg"), nt = () => sessionStorage.getItem("envRef"), at = () => sessionStorage.getItem("orgRef"), ge = async (t) => {
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) => {
156
153
  console.log("fetching results");
157
- const { serverUrl: e, basePath: r } = yt();
154
+ const { serverUrl: e, basePath: r } = lt();
158
155
  let o = "";
159
156
  {
160
- const n = await Tt();
157
+ const n = await Ot();
161
158
  console.log("the token from getSearchResults", n), o = n.access_token;
162
159
  }
163
160
  try {
164
- const n = rt();
161
+ const n = Q();
165
162
  return (await T.get(
166
- `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
163
+ `${e}${r}/search-sfcc?baseUrl=${n}&query=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
167
164
  {
168
165
  headers: {
169
166
  "Content-Type": "application/json",
@@ -174,13 +171,13 @@ const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getIte
174
171
  } catch (n) {
175
172
  throw console.error("Error fetching search results:", n), n;
176
173
  }
177
- }, Me = async (t) => {
174
+ }, He = async (t) => {
178
175
  if (!t) throw new Error("Product ID is required");
179
- const { serverUrl: e, basePath: r } = yt(), o = rt();
176
+ const { serverUrl: e, basePath: r } = lt(), o = Q();
180
177
  console.log("calling access");
181
- const { access_token: n } = await Tt();
178
+ const { access_token: n } = await Ot();
182
179
  return console.log(n), (await T.get(
183
- `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
180
+ `${e}${r}/product-sfcc/${t}?baseUrl=${o}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
184
181
  {
185
182
  headers: {
186
183
  "Content-Type": "application/json",
@@ -188,24 +185,24 @@ const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getIte
188
185
  }
189
186
  }
190
187
  )).data;
191
- }, yr = async (t) => {
188
+ }, kr = async (t) => {
192
189
  if (!t) throw new Error("customerId is required");
193
- const e = await Ue(), { customer_token: r } = await qe(
190
+ const e = await qe(), { customer_token: r } = await Me(
194
191
  e
195
- ), { serverUrl: o, basePath: n } = yt(), c = (await Tt()).access_token;
192
+ ), { serverUrl: o, basePath: n } = lt(), s = (await Ot()).access_token;
196
193
  return (await T.get(
197
- `${o}${n}/get-interest?baseUrl=${rt()}&customerId=${t}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
194
+ `${o}${n}/get-interest?baseUrl=${Q()}&customerId=${t}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
198
195
  {
199
196
  headers: {
200
197
  "Content-Type": "application/json",
201
- Authorization: `Bearer ${c}`
198
+ Authorization: `Bearer ${s}`
202
199
  }
203
200
  }
204
201
  )).data;
205
- }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), be = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), vr = (t, e) => t.toLocaleString("en-US", {
202
+ }, xe = (t) => String(typeof t == "string" ? t : t["en-US"] || t), ye = (t) => t != null && t.image ? [t.image] : "variants" in t ? t.variants[0].images : t.masterVariant.images.map((e) => e.url), Sr = (t, e) => t.toLocaleString("en-US", {
206
203
  style: "currency",
207
204
  currency: e || "USD"
208
- }), ye = (t) => {
205
+ }), ve = (t) => {
209
206
  var e, r, o;
210
207
  return "variants" in t ? {
211
208
  centAmount: (e = t.variants[0]) == null ? void 0 : e.prices.EUR.max,
@@ -214,37 +211,37 @@ const rt = () => sessionStorage.getItem("Host"), R = () => sessionStorage.getIte
214
211
  centAmount: (r = t.masterVariant) == null ? void 0 : r.prices[0].value.centAmount,
215
212
  currencyCode: (o = t.masterVariant) == null ? void 0 : o.prices[0].value.currencyCode
216
213
  };
217
- }, kr = (t) => t.charAt(0).toUpperCase() + t.slice(1), ve = (t, e) => t.length < e ? t : t.slice(0, e) + "...", Xt = (t) => t.split("\\n").map((e, r) => {
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) => {
218
215
  const o = e.match(/^(\d+)\.\s(.+)/);
219
216
  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/>";
220
217
  }).join("");
221
- function Sr() {
222
- const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = $(t);
223
- return tt(() => {
218
+ function _r() {
219
+ const t = () => window.innerWidth < 425 ? 1 : window.innerWidth < 768 ? 2 : 4, [e, r] = z(t);
220
+ return it(() => {
224
221
  const o = () => r(t());
225
222
  return window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
226
223
  }, []), e;
227
224
  }
228
- const Cr = ({
225
+ const Fr = ({
229
226
  product: t
230
227
  }) => {
231
- const e = je(), r = Sr(), [o, n] = $(0), l = () => {
228
+ const e = je(), r = _r(), [o, n] = z(0), d = () => {
232
229
  n(
233
230
  (i) => i + r >= t.length ? 0 : i + r
234
231
  );
235
- }, c = () => {
232
+ }, s = () => {
236
233
  n(
237
234
  (i) => i - r < 0 ? t.length - (t.length % r || r) : i - r
238
235
  );
239
- }, d = async (i) => {
240
- const x = await Me(i);
241
- e(oe(x));
236
+ }, l = async (i) => {
237
+ const b = await He(i);
238
+ e(oe(b));
242
239
  };
243
240
  return /* @__PURE__ */ a("div", { className: "mt-2 overflow-x-hidden", children: /* @__PURE__ */ u("div", { className: "flex items-center justify-center gap-4 relative", children: [
244
241
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
245
242
  "button",
246
243
  {
247
- onClick: c,
244
+ onClick: s,
248
245
  className: "absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
249
246
  style: {
250
247
  height: "30px",
@@ -255,19 +252,19 @@ const Cr = ({
255
252
  }
256
253
  ),
257
254
  /* @__PURE__ */ a("div", { className: "flex gap-5 justify-center flex-1 overflow-hidden", children: t.slice(o, o + r).map((i) => {
258
- var x, h, S, _;
255
+ var b, m, S, _;
259
256
  return /* @__PURE__ */ u(
260
257
  "div",
261
258
  {
262
259
  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]",
263
260
  onClick: () => {
264
- d(i.product_id ?? i.productId);
261
+ l(i.product_id ?? i.productId);
265
262
  },
266
263
  children: [
267
264
  /* @__PURE__ */ a("div", { className: "w-full p-2 flex items-center justify-center bg-white", children: /* @__PURE__ */ a(
268
265
  "img",
269
266
  {
270
- src: ((x = be(i)[0]) == null ? void 0 : x.link) || be(i)[0] || // fallback if it's a string
267
+ src: ((b = ye(i)[0]) == null ? void 0 : b.link) || ye(i)[0] || // fallback if it's a string
271
268
  "https://via.placeholder.com/120",
272
269
  alt: i != null && i.productName ? i.productName : "Product",
273
270
  className: "w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"
@@ -279,8 +276,8 @@ const Cr = ({
279
276
  className: "text-white w-full p-2 text-[12px] text-center h-[60px]",
280
277
  children: [
281
278
  /* @__PURE__ */ u("div", { className: "relative inline-block group", children: [
282
- /* @__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 : ve(
283
- xe((h = i == null ? void 0 : i.name) == null ? void 0 : h["en-US"]),
279
+ /* @__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"]),
284
281
  60
285
282
  ) || "Product" }),
286
283
  /* @__PURE__ */ a(
@@ -294,7 +291,7 @@ const Cr = ({
294
291
  marginBottom: "5px",
295
292
  zIndex: 50
296
293
  },
297
- children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ve(
294
+ children: i != null && i.productName ? i.productName : i != null && i.product_name ? i.product_name : ke(
298
295
  xe((S = i == null ? void 0 : i.name) == null ? void 0 : S["en-US"]),
299
296
  60
300
297
  ) || "Product"
@@ -302,9 +299,9 @@ const Cr = ({
302
299
  )
303
300
  ] }),
304
301
  /* @__PURE__ */ u("div", { className: " flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1", children: [
305
- /* @__PURE__ */ a("p", { children: vr(
306
- i != null && i.price ? Number(i == null ? void 0 : i.price) : ye(i).centAmount || 0,
307
- (_ = ye(i)) == null ? void 0 : _.currencyCode
302
+ /* @__PURE__ */ a("p", { children: Sr(
303
+ i != null && i.price ? Number(i == null ? void 0 : i.price) : ve(i).centAmount || 0,
304
+ (_ = ve(i)) == null ? void 0 : _.currencyCode
308
305
  ) }),
309
306
  /* @__PURE__ */ u("p", { className: "text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate", children: [
310
307
  "$",
@@ -322,7 +319,7 @@ const Cr = ({
322
319
  (t == null ? void 0 : t.length) > r && /* @__PURE__ */ a(
323
320
  "button",
324
321
  {
325
- onClick: l,
322
+ onClick: d,
326
323
  className: "absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",
327
324
  style: {
328
325
  height: "30px",
@@ -333,7 +330,7 @@ const Cr = ({
333
330
  }
334
331
  )
335
332
  ] }) });
336
- }, _r = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
333
+ }, Ir = ({ chat: t, storeDetails: e }) => /* @__PURE__ */ a("div", { className: "bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full", children: t.map((r, o) => /* @__PURE__ */ u(
337
334
  "div",
338
335
  {
339
336
  className: "mb-4 p-3 rounded-xl",
@@ -346,11 +343,11 @@ const Cr = ({
346
343
  "div",
347
344
  {
348
345
  className: "font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",
349
- children: kr(r.keyword) || "No keyword"
346
+ children: Cr(r.keyword) || "No keyword"
350
347
  }
351
348
  ),
352
349
  /* @__PURE__ */ a(
353
- Cr,
350
+ Fr,
354
351
  {
355
352
  product: r.items,
356
353
  storeDetails: e
@@ -359,13 +356,14 @@ const Cr = ({
359
356
  ]
360
357
  },
361
358
  o
362
- )) }), He = async (t, e) => {
363
- const { serverUrl: r, basePath: o } = yt(), n = `${r}`;
359
+ )) }), Ve = async (t, e) => {
360
+ var d, s;
361
+ const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
364
362
  console.log(`customer_token
365
363
  `, t);
366
364
  try {
367
- return (await T.post(
368
- `${n}${o}/basket/create?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
365
+ const l = await T.post(
366
+ `${n}${o}/basket/create?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
369
367
  e,
370
368
  {
371
369
  headers: {
@@ -373,15 +371,22 @@ const Cr = ({
373
371
  Authorization: t
374
372
  }
375
373
  }
376
- )).data;
374
+ );
375
+ return window.postMessage(
376
+ {
377
+ type: "WIDGET_CREATED_BASKET",
378
+ basketId: ((d = l.data) == null ? void 0 : d.basket_id) || ((s = l.data) == null ? void 0 : s.basketId)
379
+ },
380
+ "*"
381
+ ), l.data;
377
382
  } catch (l) {
378
383
  return T.isAxiosError(l) ? console.error("Error creating basket:", l.response || l.message) : console.error("Unexpected error:", l), null;
379
384
  }
380
- }, Vt = async (t, e, r) => {
381
- const { serverUrl: o, basePath: n } = yt(), l = `${o}`;
385
+ }, Rt = async (t, e, r) => {
386
+ const { serverUrl: o, basePath: n } = lt(), d = `${o}`;
382
387
  try {
383
- const c = await T.post(
384
- `${l}${n}/basket/add-product/${t}?baseUrl=${rt()}&siteId=${R()}&pubCfg=${ot()}&envRef=${nt()}&orgRef=${at()}`,
388
+ const s = await T.post(
389
+ `${d}${n}/basket/add-product/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
385
390
  e,
386
391
  {
387
392
  headers: {
@@ -390,42 +395,62 @@ const Cr = ({
390
395
  }
391
396
  }
392
397
  );
393
- return c.status === 200 && c.data ? c.data : null;
394
- } catch (c) {
395
- return T.isAxiosError(c) ? console.error(
398
+ return s.status === 200 && s.data ? s.data : null;
399
+ } catch (s) {
400
+ return T.isAxiosError(s) ? console.error(
396
401
  "Error adding products to basket:",
397
- c.response || c.message
398
- ) : console.error("Unexpected error:", c), null;
402
+ s.response || s.message
403
+ ) : console.error("Unexpected error:", s), null;
404
+ }
405
+ }, Re = async ({
406
+ basketId: t,
407
+ customer_token: e
408
+ }) => {
409
+ var d;
410
+ const { serverUrl: r, basePath: o } = lt(), n = `${r}`;
411
+ try {
412
+ const s = await T.get(
413
+ `${n}${o}/basket/${t}?baseUrl=${Q()}&siteId=${H()}&pubCfg=${Z()}&envRef=${tt()}&orgRef=${et()}`,
414
+ {
415
+ headers: {
416
+ "Content-Type": "application/json",
417
+ Authorization: e
418
+ }
419
+ }
420
+ );
421
+ return { status: s.status, data: s.data };
422
+ } catch (s) {
423
+ return T.isAxiosError(s) ? { status: (d = s.response) == null ? void 0 : d.status, data: null } : { status: null, data: null };
399
424
  }
400
- }, Yt = "sfcc_basket_id", ke = "sfcc_customer_token", Et = "sfcc_token_expiry", Fr = 300 * 1e3, Ft = "1.0.0";
401
- const et = (t) => {
425
+ }, Yt = "sfcc_basket_id", Se = "sfcc_customer_token", Tt = "sfcc_token_expiry", Nr = 300 * 1e3, It = "1.0.0";
426
+ const st = (t) => {
402
427
  try {
403
428
  t ? localStorage.setItem(Yt, t) : localStorage.removeItem(Yt);
404
429
  } catch (e) {
405
430
  console.error("Error saving basket ID to storage:", e);
406
431
  }
407
- }, Rt = (t) => {
432
+ }, Kt = (t) => {
408
433
  try {
409
434
  if (t) {
410
- localStorage.setItem(ke, t);
411
- const e = Date.now() + Fr;
412
- localStorage.setItem(Et, e.toString());
435
+ localStorage.setItem(Se, t);
436
+ const e = Date.now() + Nr;
437
+ localStorage.setItem(Tt, e.toString());
413
438
  } else
414
- localStorage.removeItem(ke);
439
+ localStorage.removeItem(Se);
415
440
  } catch (e) {
416
441
  console.error("Error storing token:", e);
417
442
  }
418
- }, Se = 300, Ir = () => {
419
- var d, i, x, h, S, _;
420
- const t = je(), e = Mt((F) => F.product.product), r = Mt((F) => F.store.store), [o, n] = $(!!e);
421
- if (tt(() => {
443
+ }, Ce = 300, Er = () => {
444
+ var l, i, b, m, S, _;
445
+ const t = je(), e = Ht((F) => F.product.product), r = Ht((F) => F.store.store), [o, n] = z(!!e);
446
+ if (it(() => {
422
447
  n(!!e);
423
448
  }, [e]), !e) return null;
424
- const l = async () => {
425
- var F, D, K, it, H, st, vt, Ot, Q, kt, St, lt, Pt, $t, Ct, O;
449
+ const d = async () => {
450
+ var F, j, K, ct, V, dt, kt, Pt, rt, St, Ct, ut, $t, zt, _t, P;
426
451
  console.log(e, "the prod");
427
452
  try {
428
- if (!((D = (F = e == null ? void 0 : e.variants) == null ? void 0 : F[0]) != null && D.product_id) && !(e.type.item || e.type.bundle) && !((it = (K = e == null ? void 0 : e.variants) == null ? void 0 : K[0]) != null && it.productId)) {
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)) {
429
454
  M.error("Variants not available", {
430
455
  position: "bottom-right",
431
456
  autoClose: 1e3
@@ -434,92 +459,97 @@ const et = (t) => {
434
459
  }
435
460
  const C = [
436
461
  {
437
- product_id: ((H = e.variants) == null ? void 0 : H[0].product_id) || ((st = e.variants) == null ? void 0 : st[0].productId) || (e == null ? void 0 : e.id),
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),
438
463
  quantity: 1
439
464
  }
440
465
  ];
441
466
  console.log(C, "the product data");
442
467
  const k = JSON.parse(
443
468
  sessionStorage.getItem("customerData") || "{}"
444
- ), ct = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Jt = !1, zt = localStorage.getItem(Et), jt = Date.now();
445
- if (!Jt || !zt || jt >= parseInt(zt)) {
446
- let z = "";
469
+ ), ot = (k == null ? void 0 : k.basketId) || localStorage.getItem(Yt), Wt = !1, At = localStorage.getItem(Tt), jt = Date.now();
470
+ if (!Wt || !At || jt >= parseInt(At)) {
471
+ let $ = "";
447
472
  {
448
- const A = await Tt();
449
- console.log("token from auth data"), z = "Bearer " + A.access_token;
473
+ const ft = await Ot();
474
+ console.log("token from auth data"), $ = "Bearer " + ft.access_token;
450
475
  }
451
- if (!z) {
476
+ if (!$) {
452
477
  console.error("Failed to get customer_token");
453
478
  return;
454
479
  }
455
- const dt = jt + 300 * 1e3;
456
- if (Rt(z), localStorage.setItem(Et, dt.toString()), ct) {
457
- console.log(ct, "basket id from customer");
458
- const A = await Vt(
459
- ct,
460
- C,
461
- z
462
- );
463
- (((vt = A == null ? void 0 : A.product_items) == null ? void 0 : vt.length) > 0 || ((Ot = A == null ? void 0 : A.productItems) == null ? void 0 : Ot.length) > 0) && (M.success("Added to cart", {
464
- position: "bottom-right",
465
- autoClose: 3e3,
466
- hideProgressBar: !1,
467
- closeOnClick: !0,
468
- pauseOnHover: !0,
469
- draggable: !0
470
- }), Ht(ct));
471
- return;
480
+ const pt = jt + 300 * 1e3;
481
+ if (Kt($), localStorage.setItem(Tt, pt.toString()), ot) {
482
+ const ft = await Re({
483
+ basketId: ot,
484
+ customer_token: $
485
+ });
486
+ if (console.log(ot, "basket id from customer"), ft.status === 200 && ft) {
487
+ const D = await Rt(
488
+ ot,
489
+ C,
490
+ $
491
+ );
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", {
493
+ position: "bottom-right",
494
+ autoClose: 3e3,
495
+ hideProgressBar: !1,
496
+ closeOnClick: !0,
497
+ pauseOnHover: !0,
498
+ draggable: !0
499
+ }), Vt(ot));
500
+ return;
501
+ }
472
502
  }
473
503
  const Dt = {
474
504
  productItems: [
475
505
  {
476
- productId: ((Q = e.variants) == null ? void 0 : Q[0].product_id) || ((kt = e.variants) == null ? void 0 : kt[0].productId) || (e == null ? void 0 : e.id),
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),
477
507
  quantity: 1
478
508
  }
479
509
  ]
480
510
  };
481
511
  console.log("before create basket");
482
- const m = await He(z, Dt);
512
+ const h = await Ve($, Dt);
483
513
  if (console.log(
484
- m,
485
- m == null ? void 0 : m.basket_id,
486
- m == null ? void 0 : m.basketId,
514
+ h,
515
+ h == null ? void 0 : h.basket_id,
516
+ h == null ? void 0 : h.basketId,
487
517
  "the basket response"
488
- ), !(m != null && m.basket_id) && !(m != null && m.basketId)) {
518
+ ), !(h != null && h.basket_id) && !(h != null && h.basketId)) {
489
519
  console.error("Failed to create basket");
490
520
  return;
491
521
  }
492
522
  console.log(
493
523
  "setting stored id",
494
- (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
495
- ), et(
496
- (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId)
524
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
525
+ ), st(
526
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId)
497
527
  ), console.log("adding product to basket");
498
- const J = await Vt(
499
- (m == null ? void 0 : m.basket_id) || (m == null ? void 0 : m.basketId),
528
+ const J = await Rt(
529
+ (h == null ? void 0 : h.basket_id) || (h == null ? void 0 : h.basketId),
500
530
  C,
501
- z
531
+ $
502
532
  );
503
- console.log("object added to basket"), (((St = J == null ? void 0 : J.product_items) == null ? void 0 : St.length) > 0 || ((lt = J == null ? void 0 : J.productItems) == null ? void 0 : lt.length) > 0) && M.success("Added to cart", {
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", {
504
534
  position: "bottom-right",
505
535
  autoClose: 3e3,
506
536
  hideProgressBar: !1,
507
537
  closeOnClick: !0,
508
538
  pauseOnHover: !0,
509
539
  draggable: !0
510
- }), Ht(m.basket_id || (m == null ? void 0 : m.basketId));
540
+ }), Vt(h.basket_id || (h == null ? void 0 : h.basketId));
511
541
  }
512
542
  } catch (C) {
513
543
  console.error("Error adding to cart:", C), M.error("Failed to add product to cart", {
514
544
  position: "bottom-right",
515
545
  autoClose: 3e3
516
- }), ((Pt = C == null ? void 0 : C.response) == null ? void 0 : Pt.status) === 404 || // Basket not found
517
- (($t = C == null ? void 0 : C.response) == null ? void 0 : $t.status) === 401 ? (((Ct = C == null ? void 0 : C.response) == null ? void 0 : Ct.status) === 404 && et(null), ((O = C == null ? void 0 : C.response) == null ? void 0 : O.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", C.message), M.error("Failed to add product to cart", {
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", {
518
548
  position: "bottom-right",
519
549
  autoClose: 3e3
520
550
  }));
521
551
  }
522
- }, c = () => {
552
+ }, s = () => {
523
553
  e && (window.location.href = e.c_pdpUrl);
524
554
  };
525
555
  return console.log(e, "the prod"), /* @__PURE__ */ u(re, { children: [
@@ -528,7 +558,7 @@ const et = (t) => {
528
558
  {
529
559
  className: "fixed inset-0 z-40 bg-black/30",
530
560
  onClick: () => {
531
- n(!1), setTimeout(() => t(oe(null)), Se);
561
+ n(!1), setTimeout(() => t(oe(null)), Ce);
532
562
  }
533
563
  }
534
564
  ),
@@ -546,14 +576,14 @@ const et = (t) => {
546
576
  /* @__PURE__ */ u("div", { className: "mt-3 flex flex-row justify-between w-full ", children: [
547
577
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("p", { className: "text-[#000000] font-bold font-nunitoSans", children: e.name }) }),
548
578
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
549
- we,
579
+ ge,
550
580
  {
551
581
  icon: "mdi:close",
552
582
  className: "text-[#555555] w-6 h-6 cursor-pointer",
553
583
  onClick: () => {
554
584
  n(!1), setTimeout(
555
585
  () => t(oe(null)),
556
- Se
586
+ Ce
557
587
  );
558
588
  }
559
589
  }
@@ -563,20 +593,20 @@ const et = (t) => {
563
593
  /* @__PURE__ */ a("div", { className: "flex flex-row items-center justify-center w-[120px] h-[120px] my-5", children: /* @__PURE__ */ a(
564
594
  "img",
565
595
  {
566
- src: (h = (x = (i = (d = e.imageGroups) == null ? void 0 : d[0]) == null ? void 0 : i.images) == null ? void 0 : x[0]) == null ? void 0 : h.link,
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,
567
597
  alt: e.name,
568
598
  className: "rounded-[10px]"
569
599
  }
570
600
  ) }),
571
601
  /* @__PURE__ */ a("div", { className: "flex flex-col items-center gap-2", children: e.imageGroups.slice(1, 2).map(
572
- (F) => F.images.slice(1, 2).map((D) => /* @__PURE__ */ a(
602
+ (F) => F.images.slice(1, 2).map((j) => /* @__PURE__ */ a(
573
603
  "img",
574
604
  {
575
- src: D.link,
605
+ src: j.link,
576
606
  alt: e.name,
577
607
  className: "rounded-[10px] w-[60px] h-[60px]"
578
608
  },
579
- D.link
609
+ j.link
580
610
  ))
581
611
  ) })
582
612
  ] }),
@@ -623,19 +653,19 @@ const et = (t) => {
623
653
  " ratings"
624
654
  ] })
625
655
  ] }) }),
626
- /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((F, D) => {
656
+ /* @__PURE__ */ a("div", { className: "mt-2 flex flex-row items-center gap-2", children: Array.from({ length: 5 }).map((F, j) => {
627
657
  var K;
628
658
  return /* @__PURE__ */ a(
629
- we,
659
+ ge,
630
660
  {
631
661
  icon: "mdi:star",
632
662
  width: "20",
633
663
  height: "20",
634
664
  className: `text-yellow-500
635
- ${((K = e == null ? void 0 : e.rating) == null ? void 0 : K.rate) > D ? "text-yellow-500" : "text-gray-300"}
665
+ ${((K = e == null ? void 0 : e.rating) == null ? void 0 : K.rate) > j ? "text-yellow-500" : "text-gray-300"}
636
666
  `
637
667
  },
638
- D
668
+ j
639
669
  );
640
670
  }) })
641
671
  ] }),
@@ -650,7 +680,7 @@ const et = (t) => {
650
680
  {
651
681
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer",
652
682
  style: { backgroundColor: r.tanyaThemeColor },
653
- onClick: l,
683
+ onClick: d,
654
684
  children: "Add to Cart"
655
685
  }
656
686
  ),
@@ -659,7 +689,7 @@ const et = (t) => {
659
689
  {
660
690
  className: "rounded-[5px] shadow-sm text-[#FBFBFC] bg-[#6851C6] p-2 w-full text-center cursor-pointer mb-16",
661
691
  style: { backgroundColor: r.tanyaThemeColor },
662
- onClick: c,
692
+ onClick: s,
663
693
  children: "View more"
664
694
  }
665
695
  )
@@ -670,7 +700,7 @@ const et = (t) => {
670
700
  }
671
701
  )
672
702
  ] });
673
- }, Nr = ({
703
+ }, Tr = ({
674
704
  tanyaConfig: t,
675
705
  basketId: e
676
706
  }) => {
@@ -688,36 +718,36 @@ const et = (t) => {
688
718
  "Niece/Nephew": "his/her niece/nephew",
689
719
  "My Friends": "his/her friends",
690
720
  Others: "others"
691
- }, n = _t(null), l = _t(null), c = _t(null), d = _t(null), [i, x] = $(null), [h, S] = $(!1), [_, F] = $(!1), [D, K] = $(!1), [it, H] = $(!1), [st, vt] = $(!1), [Ot, Q] = $(!1), [kt, St] = $(""), [lt, Pt] = $(""), $t = (s) => ({
692
- id: s.id,
693
- title: s.name,
694
- image: s.image ?? "",
695
- price: s.price ?? 0
696
- }), [Ct, O] = $([]), C = _t(null), k = Mt((s) => s.store.store), ct = Mt((s) => s.product.product), Jt = () => {
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 = () => {
697
727
  K(!0), setTimeout(() => F(!0), 10);
698
- }, zt = () => {
728
+ }, At = () => {
699
729
  F(!1), setTimeout(() => K(!1), 300);
700
730
  };
701
- tt(() => {
702
- h ? Jt() : zt();
703
- }, [h]);
704
- const jt = (s) => {
705
- Pt(o[s]);
731
+ it(() => {
732
+ m ? Wt() : At();
733
+ }, [m]);
734
+ const jt = (c) => {
735
+ $t(o[c]);
706
736
  };
707
- tt(() => {
737
+ it(() => {
708
738
  C.current && (C.current.scrollTop += 150);
709
- }, [Ct]);
710
- let z = null, dt = null;
739
+ }, [_t]);
740
+ let $ = null, pt = null;
711
741
  const Dt = async () => {
712
- if (z && dt && Date.now() < dt)
713
- return z;
742
+ if ($ && pt && Date.now() < pt)
743
+ return $;
714
744
  try {
715
- const s = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
745
+ const c = "https://us-east-1lsr29ln3u.auth.us-east-1.amazoncognito.com/oauth2/token", v = new URLSearchParams({
716
746
  grant_type: "client_credentials",
717
747
  client_id: "4i8rd70sgt961tc4dhskgf08c",
718
748
  client_secret: "bnsfq1220loh2cn2cm2ttn8fdhdpt0u8m1fgj8vfk2rn61aurjg",
719
749
  scope: "default-m2m-resource-server-8xzfzo/read"
720
- }), w = await fetch(s, {
750
+ }), w = await fetch(c, {
721
751
  method: "POST",
722
752
  headers: {
723
753
  "Content-Type": "application/x-www-form-urlencoded"
@@ -728,71 +758,71 @@ const et = (t) => {
728
758
  throw new Error(
729
759
  `Token request failed! status: ${w.status}`
730
760
  );
731
- const b = await w.json();
732
- z = b.access_token;
733
- const p = b.expires_in || 3600;
734
- return dt = Date.now() + (p - 60) * 1e3, z;
735
- } catch (s) {
736
- return console.error("Error obtaining JWT token:", s), z = null, dt = null, null;
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;
737
767
  }
738
- }, m = async () => {
739
- const s = await Tt();
740
- s != null && x(s);
768
+ }, h = async () => {
769
+ const c = await Ot();
770
+ c != null && b(c);
741
771
  };
742
- tt(() => {
772
+ it(() => {
743
773
  if (t != null && t.siteId) {
744
- const { clientID: s, host: v, organizationID: w, shortCode: b, siteId: p } = t;
745
- sessionStorage.setItem("Host", v), sessionStorage.setItem("SiteId", p), sessionStorage.setItem("pubCfg", btoa(s)), sessionStorage.setItem("envRef", b), sessionStorage.setItem("orgRef", w);
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);
746
776
  }
747
- m(), console.log("scapi environment v1");
748
- }, []), tt(() => {
749
- e && (console.log("setting the basket id", e), et(e));
777
+ h(), console.log("scapi environment v1");
778
+ }, []), it(() => {
779
+ e && (console.log("setting the basket id", e), st(e));
750
780
  }, [e]);
751
781
  const J = async () => {
752
- const s = JSON.parse(
782
+ const c = JSON.parse(
753
783
  sessionStorage.getItem("customerData") || "{}"
754
784
  ).customerId;
755
- return (await yr(s || "")).c_interests;
756
- }, A = async (s, v) => {
757
- console.log("in secondary flow", Ft);
785
+ return (await kr(c || "")).c_interests;
786
+ }, ft = async (c, v) => {
787
+ console.log("in secondary flow", It);
758
788
  const w = await J();
759
- if (console.log(w, "interests of customer", Ft), !!w)
789
+ if (console.log(w, "interests of customer", It), !!w)
760
790
  try {
761
- O(
791
+ P(
762
792
  (U) => U.map(
763
- (V, Y) => Y === U.length - 1 ? { ...V, secondaryLoading: !0 } : V
793
+ (R, Y) => Y === U.length - 1 ? { ...R, secondaryLoading: !0 } : R
764
794
  )
765
795
  );
766
- const b = await Dt();
767
- if (!b) throw new Error("Failed to fetch token");
768
- const p = localStorage.getItem("customerNumber"), g = localStorage.getItem("isLoggedIn"), ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
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({
769
799
  registered: String(g || !1),
770
800
  userId: String(p || (/* @__PURE__ */ new Date()).getTime())
771
- }).toString()}`, pt = JSON.stringify({
801
+ }).toString()}`, mt = JSON.stringify({
772
802
  flowId: "Q166PR519W",
773
803
  flowAliasId: "HKFUVLWVH2",
774
804
  input: {
775
805
  loyaltyPoints: "",
776
- productName: s,
806
+ productName: c,
777
807
  productPoints: String(v || 0),
778
808
  interests: w
779
809
  }
780
- }), L = await fetch(ut, {
810
+ }), L = await fetch(ht, {
781
811
  signal: AbortSignal.timeout(3e4),
782
812
  method: "POST",
783
813
  headers: {
784
814
  "Content-Type": "application/json",
785
- Authorization: `Bearer ${b}`
815
+ Authorization: `Bearer ${x}`
786
816
  },
787
- body: pt
817
+ body: mt
788
818
  });
789
819
  if (!L.body) throw new Error("Readable stream not supported");
790
- const ft = L.body.getReader(), mt = new TextDecoder();
820
+ const wt = L.body.getReader(), gt = new TextDecoder();
791
821
  let B = "";
792
822
  for (; ; ) {
793
- const { done: U, value: V } = await ft.read();
823
+ const { done: U, value: R } = await wt.read();
794
824
  if (U) break;
795
- B += mt.decode(V, { stream: !0 });
825
+ B += gt.decode(R, { stream: !0 });
796
826
  const Y = B.split(`
797
827
  `);
798
828
  B = Y.pop() || "";
@@ -801,31 +831,31 @@ const et = (t) => {
801
831
  const f = W.slice(5).trim();
802
832
  try {
803
833
  const q = JSON.parse(f);
804
- q.index === 0 && O(
834
+ q.index === 0 && P(
805
835
  (I) => I.map(
806
- (P, G) => G === I.length - 1 ? {
807
- ...P,
836
+ (O, G) => G === I.length - 1 ? {
837
+ ...O,
808
838
  secondaryResponse: q.data,
809
839
  secondaryLoading: !1
810
- } : P
840
+ } : O
811
841
  )
812
842
  );
813
843
  } catch (q) {
814
- O(
844
+ P(
815
845
  (I) => I.map(
816
- (P, G) => G === I.length - 1 ? { ...P, secondaryLoading: !1 } : P
846
+ (O, G) => G === I.length - 1 ? { ...O, secondaryLoading: !1 } : O
817
847
  )
818
848
  ), console.error("Secondary flow JSON parse error:", q);
819
849
  }
820
850
  }
821
851
  }
822
- } catch (b) {
823
- console.error("Secondary flow error:", b);
852
+ } catch (x) {
853
+ console.error("Secondary flow error:", x);
824
854
  }
825
- }, Wt = async (s) => {
826
- const v = s || kt.trim();
855
+ }, D = async (c) => {
856
+ const v = c || St.trim();
827
857
  if (v) {
828
- vt(!0), St(""), n.current = null, l.current = null, c.current = null, d.current = null, O((w) => [
858
+ kt(!0), Ct(""), n.current = null, d.current = null, s.current = null, l.current = null, P((w) => [
829
859
  ...w,
830
860
  {
831
861
  query: v,
@@ -836,38 +866,38 @@ const et = (t) => {
836
866
  }
837
867
  ]);
838
868
  try {
839
- const w = lt, b = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
869
+ const w = ut, x = localStorage.getItem("customerNumber"), p = localStorage.getItem("isLoggedIn"), g = await Dt();
840
870
  if (!g)
841
871
  throw new Error("Failed to obtain access token");
842
- const ut = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
872
+ const ht = `https://tanya.aspiresystems.com/api/bedrock/invoke/stream?${new URLSearchParams({
843
873
  registered: String(p || !1),
844
- userId: String(b || (/* @__PURE__ */ new Date()).getTime())
845
- }).toString()}`, pt = JSON.stringify({
874
+ userId: String(x || (/* @__PURE__ */ new Date()).getTime())
875
+ }).toString()}`, mt = JSON.stringify({
846
876
  flowId: "MMHQKYI1NE",
847
877
  flowAliasId: "SZF9ZK1ATE",
848
878
  input: {
849
879
  userPrompt: v,
850
880
  whom: w
851
881
  }
852
- }), L = await fetch(ut, {
882
+ }), L = await fetch(ht, {
853
883
  signal: AbortSignal.timeout(3e4),
854
884
  method: "POST",
855
885
  headers: {
856
886
  "Content-Type": "application/json",
857
887
  Authorization: `Bearer ${g}`
858
888
  },
859
- body: pt
889
+ body: mt
860
890
  });
861
891
  if (!L.ok)
862
892
  throw new Error(`HTTP error! status: ${L.status}`);
863
893
  if (!L.body) throw new Error("Readable stream not supported");
864
- const ft = L.body.getReader(), mt = new TextDecoder();
894
+ const wt = L.body.getReader(), gt = new TextDecoder();
865
895
  let B = "", U = "";
866
896
  for (; ; ) {
867
- Q(!0);
868
- const { done: V, value: Y } = await ft.read();
869
- if (V) break;
870
- B += mt.decode(Y, { stream: !0 });
897
+ rt(!0);
898
+ const { done: R, value: Y } = await wt.read();
899
+ if (R) break;
900
+ B += gt.decode(Y, { stream: !0 });
871
901
  const W = B.split(`
872
902
  `);
873
903
  B = W.pop() || "";
@@ -876,9 +906,9 @@ const et = (t) => {
876
906
  const q = f.slice(5).trim();
877
907
  try {
878
908
  const I = JSON.parse(q);
879
- I.index == 1 && (U = I.data), O(
880
- (P) => P.map(
881
- (G, At) => At === P.length - 1 ? {
909
+ I.index == 1 && (U = I.data), P(
910
+ (O) => O.map(
911
+ (G, Lt) => Lt === O.length - 1 ? {
882
912
  ...G,
883
913
  [I.index == 0 ? "response" : I.index == 1 ? "keywords" : I.index == 2 ? "potentialQuestions" : "end"]: I.data
884
914
  } : G
@@ -889,47 +919,47 @@ const et = (t) => {
889
919
  }
890
920
  }
891
921
  }
892
- tr(Ze(U));
922
+ rr(er(U));
893
923
  } catch (w) {
894
924
  console.error("Error sending message to Tanya:", w);
895
925
  } finally {
896
- vt(!1);
926
+ kt(!1);
897
927
  }
898
928
  }
899
- }, Ze = (s) => {
900
- const v = s.match(
929
+ }, er = (c) => {
930
+ const v = c.match(
901
931
  /top five relevant product or category names are: (.*)/i
902
- ), p = (v ? v[1] : s).split(", ").map((j) => j.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
932
+ ), p = (v ? v[1] : c).split(", ").map((A) => A.replace(/\s*(Toys|Bags|Miniature|etc\.*)\s*/gi, "").trim());
903
933
  return [...new Set(p)].filter(Boolean).join(",");
904
- }, tr = async (s) => {
905
- if (typeof s == "string") {
906
- console.log(s, "keywords");
907
- const v = s.split(",");
934
+ }, rr = async (c) => {
935
+ if (typeof c == "string") {
936
+ console.log(c, "keywords");
937
+ const v = c.split(",");
908
938
  for (const w of v) {
909
- const b = await ge(w);
910
- if (Q(!1), (b == null ? void 0 : b.length) > 0 && (O(
939
+ const x = await be(w);
940
+ if (rt(!1), (x == null ? void 0 : x.length) > 0 && (P(
911
941
  (p) => p.map(
912
- (g, j) => j === p.length - 1 ? {
942
+ (g, A) => A === p.length - 1 ? {
913
943
  ...g,
914
944
  products: [
915
945
  ...g.products || [],
916
- { keyword: w, items: b, loading: !1 }
946
+ { keyword: w, items: x, loading: !1 }
917
947
  ]
918
948
  } : g
919
949
  )
920
- ), !n.current || l.current == null)) {
921
- const p = b[0];
922
- n.current = String((p == null ? void 0 : p.product_name) ?? ""), c.current = p.image.link, l.current = p.product_id;
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;
923
953
  const g = typeof (p == null ? void 0 : p.price) == "number" ? p.price : void 0;
924
- d.current = typeof g == "number" && Number.isFinite(g) ? g : null;
954
+ l.current = typeof g == "number" && Number.isFinite(g) ? g : null;
925
955
  }
926
956
  }
927
957
  } else
928
- for (const v of s) {
929
- const w = await ge(v);
930
- Q(!1), (w == null ? void 0 : w.length) > 0 && O(
931
- (b) => b.map(
932
- (p, g) => g === b.length - 1 ? {
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 ? {
933
963
  ...p,
934
964
  products: [
935
965
  ...p.products || [],
@@ -940,34 +970,34 @@ const et = (t) => {
940
970
  );
941
971
  }
942
972
  if (n.current) {
943
- O(
973
+ P(
944
974
  (w) => w.map(
945
- (b, p) => p === w.length - 1 ? {
946
- ...b,
975
+ (x, p) => p === w.length - 1 ? {
976
+ ...x,
947
977
  productSnapshot: {
948
- id: l.current,
978
+ id: d.current,
949
979
  name: n.current,
950
- image: c.current,
951
- price: d.current ?? null,
980
+ image: s.current,
981
+ price: l.current ?? null,
952
982
  points: 0,
953
983
  quantity: 1
954
984
  }
955
- } : b
985
+ } : x
956
986
  )
957
987
  );
958
988
  const v = JSON.parse(
959
989
  sessionStorage.getItem("customerData") || "{}"
960
990
  );
961
- (v == null ? void 0 : v.isGuest) == !1 ? (console.log("running secondary flow", Ft), A(n.current, 0)) : console.log("not running secondary flow", Ft);
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);
962
992
  }
963
- Q(!1);
964
- }, er = async (s, v) => {
965
- var w, b, p, g, j, ut, pt, L, ft, mt, B, U, V, Y, W;
966
- H(!0);
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);
967
997
  try {
968
- const f = await Me(s.id);
969
- if (!((b = (w = f == null ? void 0 : f.variants) == null ? void 0 : w[0]) != null && b.product_id || (g = (p = f == null ? void 0 : f.variants) == null ? void 0 : p[0]) != null && g.productId) && !(f.type.item || f.type.bundle)) {
970
- H(!1), M.error("Variants not found", {
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", {
971
1001
  position: "bottom-right",
972
1002
  autoClose: 1e3
973
1003
  }), console.error("No product variant found");
@@ -975,89 +1005,95 @@ const et = (t) => {
975
1005
  }
976
1006
  const q = [
977
1007
  {
978
- product_id: ((j = f.variants) == null ? void 0 : j[0].product_id) || ((ut = f.variants) == null ? void 0 : ut[0].productId) || (f == null ? void 0 : f.id),
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),
979
1009
  quantity: v
980
1010
  }
981
1011
  ];
982
- console.log(q, "product data", "app version", Ft);
1012
+ console.log(q, "product data", "app version", It);
983
1013
  const I = JSON.parse(
984
1014
  sessionStorage.getItem("customerData") || "{}"
985
- ), P = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, At = localStorage.getItem(Et), he = Date.now();
986
- if (!G || !At || he >= parseInt(At)) {
987
- const rr = await Ue();
988
- let { customer_token: ht } = await qe(
989
- rr
1015
+ ), O = (I == null ? void 0 : I.basketId) || localStorage.getItem(Yt), G = !1, Lt = localStorage.getItem(Tt), me = Date.now();
1016
+ if (!G || !Lt || me >= parseInt(Lt)) {
1017
+ const nr = await qe();
1018
+ let { customer_token: nt } = await Me(
1019
+ nr
990
1020
  );
991
- if (ht = "Bearer " + i.access_token, !ht) {
1021
+ if (nt = "Bearer " + i.access_token, !nt) {
992
1022
  console.error("Failed to get customer_token");
993
1023
  return;
994
1024
  }
995
- const or = he + 300 * 1e3;
996
- if (Rt(ht), localStorage.setItem(Et, or.toString()), console.log(P, "basketIdFromCustomer"), P) {
997
- const Gt = await Vt(
998
- P,
999
- q,
1000
- ht
1001
- );
1002
- ((pt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : pt.length) > 0 && (M.success("Added to cart", {
1003
- position: "bottom-right",
1004
- autoClose: 3e3,
1005
- hideProgressBar: !1,
1006
- closeOnClick: !0,
1007
- pauseOnHover: !0,
1008
- draggable: !0
1009
- }), Ht(P), H(!1));
1010
- return;
1025
+ const ar = me + 300 * 1e3;
1026
+ if (Kt(nt), localStorage.setItem(Tt, ar.toString()), console.log(O, "basketIdFromCustomer"), O) {
1027
+ const we = await Re({
1028
+ basketId: O,
1029
+ customer_token: nt
1030
+ });
1031
+ if (we.status === 200 && we) {
1032
+ const Gt = await Rt(
1033
+ O,
1034
+ q,
1035
+ nt
1036
+ );
1037
+ ((mt = Gt == null ? void 0 : Gt.product_items) == null ? void 0 : mt.length) > 0 && (M.success("Added to cart", {
1038
+ position: "bottom-right",
1039
+ autoClose: 3e3,
1040
+ hideProgressBar: !1,
1041
+ closeOnClick: !0,
1042
+ pauseOnHover: !0,
1043
+ draggable: !0
1044
+ }), Vt(O), V(!1));
1045
+ return;
1046
+ }
1011
1047
  }
1012
- const nr = {
1048
+ const ir = {
1013
1049
  productItems: [
1014
1050
  {
1015
- productId: ((L = f.variants) == null ? void 0 : L[0].product_id) || ((ft = f.variants) == null ? void 0 : ft[0].productId) || (f == null ? void 0 : f.id),
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),
1016
1052
  quantity: 1
1017
1053
  }
1018
1054
  ]
1019
- }, y = await He(ht, nr);
1055
+ }, y = await Ve(nt, ir);
1020
1056
  if (console.log(
1021
1057
  y,
1022
1058
  y == null ? void 0 : y.basket_id,
1023
1059
  y == null ? void 0 : y.basketId,
1024
1060
  "the basket response"
1025
1061
  ), !(y != null && y.basket_id || !(y != null && y.basketId))) {
1026
- H(!1), console.error("Failed to create basket");
1062
+ V(!1), console.error("Failed to create basket");
1027
1063
  return;
1028
1064
  }
1029
- et(
1065
+ st(
1030
1066
  (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId)
1031
1067
  );
1032
- const wt = await Vt(
1068
+ const bt = await Rt(
1033
1069
  (y == null ? void 0 : y.basket_id) || (y == null ? void 0 : y.basketId),
1034
1070
  q,
1035
- ht
1071
+ nt
1036
1072
  );
1037
- (((mt = wt == null ? void 0 : wt.product_items) == null ? void 0 : mt.length) > 0 || ((B = wt == null ? void 0 : wt.productItems) == null ? void 0 : B.length) > 0) && M.success("Added to cart", {
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", {
1038
1074
  position: "bottom-right",
1039
1075
  autoClose: 3e3,
1040
1076
  hideProgressBar: !1,
1041
1077
  closeOnClick: !0,
1042
1078
  pauseOnHover: !0,
1043
1079
  draggable: !0
1044
- }), Ht(y.basket_id || (y == null ? void 0 : y.basketId));
1080
+ }), Vt(y.basket_id || (y == null ? void 0 : y.basketId));
1045
1081
  }
1046
1082
  } catch (f) {
1047
- H(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1083
+ V(!1), console.error("Error adding to cart:", f), M.error("Failed to add product to cart", {
1048
1084
  position: "bottom-right",
1049
1085
  autoClose: 3e3
1050
1086
  }), ((U = f == null ? void 0 : f.response) == null ? void 0 : U.status) === 404 || // Basket not found
1051
- ((V = f == null ? void 0 : f.response) == null ? void 0 : V.status) === 401 ? (((Y = f == null ? void 0 : f.response) == null ? void 0 : Y.status) === 404 && et(null), ((W = f == null ? void 0 : f.response) == null ? void 0 : W.status) === 401 && (et(null), Rt(null))) : (console.error("Failed to add product to basket:", f.message), M.error("Failed to add product to cart", {
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", {
1052
1088
  position: "bottom-right",
1053
1089
  autoClose: 3e3
1054
1090
  }));
1055
1091
  }
1056
- H(!1);
1092
+ V(!1);
1057
1093
  };
1058
- return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(xr, { open: h, onOpenChange: S, children: [
1094
+ return /* @__PURE__ */ a("div", { className: "relative flex justify-center", children: /* @__PURE__ */ u(yr, { open: m, onOpenChange: S, children: [
1059
1095
  /* @__PURE__ */ a(
1060
- br,
1096
+ vr,
1061
1097
  {
1062
1098
  onClick: () => S(!0),
1063
1099
  style: {
@@ -1119,7 +1155,7 @@ const et = (t) => {
1119
1155
  ) })
1120
1156
  }
1121
1157
  ),
1122
- D && /* @__PURE__ */ u(re, { children: [
1158
+ j && /* @__PURE__ */ u(re, { children: [
1123
1159
  /* @__PURE__ */ a(
1124
1160
  "div",
1125
1161
  {
@@ -1267,7 +1303,7 @@ const et = (t) => {
1267
1303
  /* @__PURE__ */ u(
1268
1304
  "div",
1269
1305
  {
1270
- className: `flex flex-col h-full ${ct ? "lg:w-2/3 w-full" : "w-full"}`,
1306
+ className: `flex flex-col h-full ${ot ? "lg:w-2/3 w-full" : "w-full"}`,
1271
1307
  children: [
1272
1308
  /* @__PURE__ */ u(
1273
1309
  "div",
@@ -1281,32 +1317,32 @@ const et = (t) => {
1281
1317
  className: "mx-3 p-3 rounded-2xl bg-[#FFFFFF]",
1282
1318
  children: [
1283
1319
  /* @__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?" }) }),
1284
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((s) => /* @__PURE__ */ a(
1320
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2 mt-2", children: r.map((c) => /* @__PURE__ */ a(
1285
1321
  "button",
1286
1322
  {
1287
- onClick: () => jt(s),
1323
+ onClick: () => jt(c),
1288
1324
  className: "px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",
1289
1325
  style: {
1290
- backgroundColor: lt === o[s] ? "#FFFFFF" : "#F3F3F3",
1291
- borderColor: lt === o[s] ? "#BBB3DD" : ""
1326
+ backgroundColor: ut === o[c] ? "#FFFFFF" : "#F3F3F3",
1327
+ borderColor: ut === o[c] ? "#BBB3DD" : ""
1292
1328
  },
1293
- children: s
1329
+ children: c
1294
1330
  },
1295
- s
1331
+ c
1296
1332
  )) })
1297
1333
  ]
1298
1334
  }
1299
1335
  ),
1300
- Ct.map((s, v) => {
1301
- var w, b;
1336
+ _t.map((c, v) => {
1337
+ var w, x;
1302
1338
  return /* @__PURE__ */ u("div", { children: [
1303
- /* @__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: s.query }) }),
1304
- s.response && s.response.includes("Thinking") ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
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(
1305
1341
  "div",
1306
1342
  {
1307
1343
  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",
1308
1344
  dangerouslySetInnerHTML: {
1309
- __html: Xt(s.response)
1345
+ __html: Xt(c.response)
1310
1346
  }
1311
1347
  }
1312
1348
  ) }) : /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
@@ -1314,19 +1350,19 @@ const et = (t) => {
1314
1350
  {
1315
1351
  className: "font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",
1316
1352
  dangerouslySetInnerHTML: {
1317
- __html: Xt(s.response)
1353
+ __html: Xt(c.response)
1318
1354
  }
1319
1355
  }
1320
1356
  ) }),
1321
- Ot && !s.response.includes("Thinking") && ((w = s.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" }) }),
1322
- (s == null ? void 0 : s.products) && ((b = s == null ? void 0 : s.products) == null ? void 0 : b.length) > 0 && /* @__PURE__ */ a(
1323
- _r,
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(
1359
+ Ir,
1324
1360
  {
1325
- chat: s.products,
1361
+ chat: c.products,
1326
1362
  storeDetails: k
1327
1363
  }
1328
1364
  ),
1329
- s.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1365
+ c.potentialQuestions.length > 0 && /* @__PURE__ */ u("div", { className: "my-2 px-4 text-sm text-gray-700", children: [
1330
1366
  /* @__PURE__ */ a(
1331
1367
  "p",
1332
1368
  {
@@ -1335,11 +1371,11 @@ const et = (t) => {
1335
1371
  children: "Why not explore these inquiries..."
1336
1372
  }
1337
1373
  ),
1338
- s.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1374
+ c.potentialQuestions.split(",").map((p, g) => /* @__PURE__ */ a(
1339
1375
  "button",
1340
1376
  {
1341
1377
  className: `cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${k.themeDarkColor} m-1 rounded-xl px-2 py-1`,
1342
- onClick: () => Wt(p),
1378
+ onClick: () => D(p),
1343
1379
  style: {
1344
1380
  backgroundColor: k.tanyaThemeColorLight
1345
1381
  },
@@ -1348,7 +1384,7 @@ const et = (t) => {
1348
1384
  g
1349
1385
  ))
1350
1386
  ] }),
1351
- s.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1387
+ c.secondaryLoading && /* @__PURE__ */ a("div", { className: "mt-3 mb-4 px-4", children: /* @__PURE__ */ u(
1352
1388
  "div",
1353
1389
  {
1354
1390
  className: "tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",
@@ -1381,7 +1417,7 @@ const et = (t) => {
1381
1417
  ]
1382
1418
  }
1383
1419
  ) }),
1384
- s.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1420
+ c.secondaryResponse && /* @__PURE__ */ a(re, { children: /* @__PURE__ */ u("div", { className: "mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]", children: [
1385
1421
  /* @__PURE__ */ a(
1386
1422
  "div",
1387
1423
  {
@@ -1391,12 +1427,12 @@ const et = (t) => {
1391
1427
  },
1392
1428
  dangerouslySetInnerHTML: {
1393
1429
  __html: Xt(
1394
- s.secondaryResponse
1430
+ c.secondaryResponse
1395
1431
  )
1396
1432
  }
1397
1433
  }
1398
1434
  ),
1399
- s.productSnapshot && // chat.productSnapshot.points > 0 &&
1435
+ c.productSnapshot && // chat.productSnapshot.points > 0 &&
1400
1436
  /* @__PURE__ */ a("div", { className: "mt-4 w-full", children: /* @__PURE__ */ u(
1401
1437
  "div",
1402
1438
  {
@@ -1414,11 +1450,11 @@ const et = (t) => {
1414
1450
  height: 112,
1415
1451
  borderColor: "#eee"
1416
1452
  },
1417
- children: s.productSnapshot.image ? /* @__PURE__ */ a(
1453
+ children: c.productSnapshot.image ? /* @__PURE__ */ a(
1418
1454
  "img",
1419
1455
  {
1420
- src: s.productSnapshot.image,
1421
- alt: s.productSnapshot.name,
1456
+ src: c.productSnapshot.image,
1457
+ alt: c.productSnapshot.name,
1422
1458
  className: "w-full h-full object-cover"
1423
1459
  }
1424
1460
  ) : /* @__PURE__ */ a("div", { className: "w-full h-full flex items-center justify-center text-xs text-gray-500", children: "No Image" })
@@ -1426,18 +1462,18 @@ const et = (t) => {
1426
1462
  ),
1427
1463
  /* @__PURE__ */ u("div", { className: "flex flex-col flex-1 justify-between", children: [
1428
1464
  /* @__PURE__ */ u("div", { children: [
1429
- /* @__PURE__ */ a("p", { className: "font-semibold text-[15px] leading-snug", children: s.productSnapshot.name }),
1430
- /* @__PURE__ */ a("p", { className: "mt-1 text-[14px] font-medium", children: s.productSnapshot.price != null ? new Intl.NumberFormat(void 0, {
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, {
1431
1467
  style: "currency",
1432
1468
  currency: (k == null ? void 0 : k.currency) || "USD"
1433
1469
  }).format(
1434
- s.productSnapshot.price
1470
+ c.productSnapshot.price
1435
1471
  ) : "" }),
1436
- s.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1472
+ c.productSnapshot.points > 0 && /* @__PURE__ */ u("p", { className: "mt-1 text-xs opacity-80", children: [
1437
1473
  "You will earn",
1438
1474
  " ",
1439
1475
  /* @__PURE__ */ u("strong", { children: [
1440
- s.productSnapshot.points,
1476
+ c.productSnapshot.points,
1441
1477
  " ",
1442
1478
  "points"
1443
1479
  ] })
@@ -1449,9 +1485,9 @@ const et = (t) => {
1449
1485
  "button",
1450
1486
  {
1451
1487
  className: "px-3 py-1 text-sm",
1452
- onClick: () => O(
1488
+ onClick: () => P(
1453
1489
  (p) => p.map(
1454
- (g, j) => j === v && g.productSnapshot ? {
1490
+ (g, A) => A === v && g.productSnapshot ? {
1455
1491
  ...g,
1456
1492
  productSnapshot: {
1457
1493
  ...g.productSnapshot,
@@ -1470,14 +1506,14 @@ const et = (t) => {
1470
1506
  children: "−"
1471
1507
  }
1472
1508
  ),
1473
- /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: s.productSnapshot.quantity }),
1509
+ /* @__PURE__ */ a("div", { className: "px-3 py-1 text-sm select-none", children: c.productSnapshot.quantity }),
1474
1510
  /* @__PURE__ */ a(
1475
1511
  "button",
1476
1512
  {
1477
1513
  className: "px-3 py-1 text-sm",
1478
- onClick: () => O(
1514
+ onClick: () => P(
1479
1515
  (p) => p.map(
1480
- (g, j) => j === v && g.productSnapshot ? {
1516
+ (g, A) => A === v && g.productSnapshot ? {
1481
1517
  ...g,
1482
1518
  productSnapshot: {
1483
1519
  ...g.productSnapshot,
@@ -1498,21 +1534,21 @@ const et = (t) => {
1498
1534
  "button",
1499
1535
  {
1500
1536
  onClick: () => {
1501
- er(
1502
- $t(
1503
- s.productSnapshot
1537
+ or(
1538
+ zt(
1539
+ c.productSnapshot
1504
1540
  ),
1505
- s.productSnapshot.quantity
1541
+ c.productSnapshot.quantity
1506
1542
  );
1507
1543
  },
1508
- disabled: it,
1544
+ disabled: ct,
1509
1545
  className: "px-4 py-2 rounded-full font-medium",
1510
1546
  style: {
1511
1547
  background: k.tanyaThemeColor,
1512
1548
  color: (k == null ? void 0 : k.tanyaThemeContrastColor) || "#fff",
1513
- opacity: it ? 0.8 : 1
1549
+ opacity: ct ? 0.8 : 1
1514
1550
  },
1515
- children: it ? "Adding..." : "Add to cart"
1551
+ children: ct ? "Adding..." : "Add to cart"
1516
1552
  }
1517
1553
  )
1518
1554
  ] })
@@ -1540,11 +1576,11 @@ const et = (t) => {
1540
1576
  {
1541
1577
  className: "flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",
1542
1578
  placeholder: "How can I help you...",
1543
- value: kt,
1579
+ value: St,
1544
1580
  autoFocus: !0,
1545
- onChange: (s) => St(s.target.value),
1546
- onKeyDown: (s) => {
1547
- s.key === "Enter" && !st && Wt();
1581
+ onChange: (c) => Ct(c.target.value),
1582
+ onKeyDown: (c) => {
1583
+ c.key === "Enter" && !dt && D();
1548
1584
  }
1549
1585
  }
1550
1586
  ),
@@ -1552,10 +1588,10 @@ const et = (t) => {
1552
1588
  "button",
1553
1589
  {
1554
1590
  type: "submit",
1555
- disabled: st,
1591
+ disabled: dt,
1556
1592
  className: "p-3",
1557
- onClick: () => Wt(),
1558
- children: st ? /* @__PURE__ */ a(
1593
+ onClick: () => D(),
1594
+ children: dt ? /* @__PURE__ */ a(
1559
1595
  "div",
1560
1596
  {
1561
1597
  className: "p-3 animate-spin rounded-full h-3 w-3 border-b-2",
@@ -1589,7 +1625,7 @@ const et = (t) => {
1589
1625
  ]
1590
1626
  }
1591
1627
  ),
1592
- /* @__PURE__ */ a(Ir, {})
1628
+ /* @__PURE__ */ a(Er, {})
1593
1629
  ] })
1594
1630
  ]
1595
1631
  }
@@ -1604,7 +1640,7 @@ var ne = function(t, e) {
1604
1640
  for (var n in o) Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
1605
1641
  }, ne(t, e);
1606
1642
  };
1607
- function Er(t, e) {
1643
+ function Or(t, e) {
1608
1644
  if (typeof e != "function" && e !== null)
1609
1645
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
1610
1646
  ne(t, e);
@@ -1617,12 +1653,12 @@ var X = function() {
1617
1653
  return X = Object.assign || function(e) {
1618
1654
  for (var r, o = 1, n = arguments.length; o < n; o++) {
1619
1655
  r = arguments[o];
1620
- for (var l in r) Object.prototype.hasOwnProperty.call(r, l) && (e[l] = r[l]);
1656
+ for (var d in r) Object.prototype.hasOwnProperty.call(r, d) && (e[d] = r[d]);
1621
1657
  }
1622
1658
  return e;
1623
1659
  }, X.apply(this, arguments);
1624
1660
  };
1625
- function Tr(t, e) {
1661
+ function Pr(t, e) {
1626
1662
  var r = {};
1627
1663
  for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.indexOf(o) < 0 && (r[o] = t[o]);
1628
1664
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -1630,50 +1666,50 @@ function Tr(t, e) {
1630
1666
  e.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(t, o[n]) && (r[o[n]] = t[o[n]]);
1631
1667
  return r;
1632
1668
  }
1633
- var Qt = "Invariant Violation", Ce = Object.setPrototypeOf, Or = Ce === void 0 ? function(t, e) {
1669
+ var Qt = "Invariant Violation", _e = Object.setPrototypeOf, $r = _e === void 0 ? function(t, e) {
1634
1670
  return t.__proto__ = e, t;
1635
- } : Ce, Ve = (
1671
+ } : _e, Ye = (
1636
1672
  /** @class */
1637
1673
  (function(t) {
1638
- Er(e, t);
1674
+ Or(e, t);
1639
1675
  function e(r) {
1640
1676
  r === void 0 && (r = Qt);
1641
1677
  var o = t.call(this, typeof r == "number" ? Qt + ": " + r + " (see https://github.com/apollographql/invariant-packages)" : r) || this;
1642
- return o.framesToPop = 1, o.name = Qt, Or(o, e.prototype), o;
1678
+ return o.framesToPop = 1, o.name = Qt, $r(o, e.prototype), o;
1643
1679
  }
1644
1680
  return e;
1645
1681
  })(Error)
1646
1682
  );
1647
- function Z(t, e) {
1683
+ function at(t, e) {
1648
1684
  if (!t)
1649
- throw new Ve(e);
1685
+ throw new Ye(e);
1650
1686
  }
1651
- var Ye = ["debug", "log", "warn", "error", "silent"], Pr = Ye.indexOf("log");
1652
- function Lt(t) {
1687
+ var Ke = ["debug", "log", "warn", "error", "silent"], zr = Ke.indexOf("log");
1688
+ function Bt(t) {
1653
1689
  return function() {
1654
- if (Ye.indexOf(t) >= Pr) {
1690
+ if (Ke.indexOf(t) >= zr) {
1655
1691
  var e = console[t] || console.log;
1656
1692
  return e.apply(console, arguments);
1657
1693
  }
1658
1694
  };
1659
1695
  }
1660
1696
  (function(t) {
1661
- t.debug = Lt("debug"), t.log = Lt("log"), t.warn = Lt("warn"), t.error = Lt("error");
1662
- })(Z || (Z = {}));
1663
- var Re = "3.14.0";
1664
- function gt(t) {
1697
+ t.debug = Bt("debug"), t.log = Bt("log"), t.warn = Bt("warn"), t.error = Bt("error");
1698
+ })(at || (at = {}));
1699
+ var Je = "3.14.0";
1700
+ function xt(t) {
1665
1701
  try {
1666
1702
  return t();
1667
1703
  } catch {
1668
1704
  }
1669
1705
  }
1670
- const ae = gt(function() {
1706
+ const ae = xt(function() {
1671
1707
  return globalThis;
1672
- }) || gt(function() {
1708
+ }) || xt(function() {
1673
1709
  return window;
1674
- }) || gt(function() {
1710
+ }) || xt(function() {
1675
1711
  return self;
1676
- }) || gt(function() {
1712
+ }) || xt(function() {
1677
1713
  return global;
1678
1714
  }) || // We don't expect the Function constructor ever to be invoked at runtime, as
1679
1715
  // long as at least one of globalThis, window, self, or global is defined, so
@@ -1681,21 +1717,21 @@ const ae = gt(function() {
1681
1717
  // detect syntactic usage of the Function constructor. If you think you can
1682
1718
  // improve your static analysis to detect this obfuscation, think again. This
1683
1719
  // is an arms race you cannot win, at least not in JavaScript.
1684
- gt(function() {
1685
- return gt.constructor("return this")();
1720
+ xt(function() {
1721
+ return xt.constructor("return this")();
1686
1722
  });
1687
- var _e = /* @__PURE__ */ new Map();
1688
- function $r(t) {
1689
- var e = _e.get(t) || 1;
1690
- return _e.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1723
+ var Fe = /* @__PURE__ */ new Map();
1724
+ function Ar(t) {
1725
+ var e = Fe.get(t) || 1;
1726
+ return Fe.set(t, e + 1), "".concat(t, ":").concat(e, ":").concat(Math.random().toString(36).slice(2));
1691
1727
  }
1692
- function zr(t, e) {
1693
- var r = $r("stringifyForDisplay");
1728
+ function jr(t, e) {
1729
+ var r = Ar("stringifyForDisplay");
1694
1730
  return JSON.stringify(t, function(o, n) {
1695
1731
  return n === void 0 ? r : n;
1696
1732
  }, e).split(JSON.stringify(r)).join("<undefined>");
1697
1733
  }
1698
- function Bt(t) {
1734
+ function Ut(t) {
1699
1735
  return function(e) {
1700
1736
  for (var r = [], o = 1; o < arguments.length; o++)
1701
1737
  r[o - 1] = arguments[o];
@@ -1709,41 +1745,41 @@ function Bt(t) {
1709
1745
  var Zt = Object.assign(function(e, r) {
1710
1746
  for (var o = [], n = 2; n < arguments.length; n++)
1711
1747
  o[n - 2] = arguments[n];
1712
- e || Z(e, le(r, o) || ce(r, o));
1748
+ e || at(e, le(r, o) || ce(r, o));
1713
1749
  }, {
1714
- debug: Bt(Z.debug),
1715
- log: Bt(Z.log),
1716
- warn: Bt(Z.warn),
1717
- error: Bt(Z.error)
1750
+ debug: Ut(at.debug),
1751
+ log: Ut(at.log),
1752
+ warn: Ut(at.warn),
1753
+ error: Ut(at.error)
1718
1754
  });
1719
- function Ke(t) {
1755
+ function We(t) {
1720
1756
  for (var e = [], r = 1; r < arguments.length; r++)
1721
1757
  e[r - 1] = arguments[r];
1722
- return new Ve(le(t, e) || ce(t, e));
1758
+ return new Ye(le(t, e) || ce(t, e));
1723
1759
  }
1724
- var Fe = Symbol.for("ApolloErrorMessageHandler_" + Re);
1725
- function Je(t) {
1760
+ var Ie = Symbol.for("ApolloErrorMessageHandler_" + Je);
1761
+ function Ge(t) {
1726
1762
  if (typeof t == "string")
1727
1763
  return t;
1728
1764
  try {
1729
- return zr(t, 2).slice(0, 1e3);
1765
+ return jr(t, 2).slice(0, 1e3);
1730
1766
  } catch {
1731
1767
  return "<non-serializable>";
1732
1768
  }
1733
1769
  }
1734
1770
  function le(t, e) {
1735
1771
  if (e === void 0 && (e = []), !!t)
1736
- return ae[Fe] && ae[Fe](t, e.map(Je));
1772
+ return ae[Ie] && ae[Ie](t, e.map(Ge));
1737
1773
  }
1738
1774
  function ce(t, e) {
1739
1775
  if (e === void 0 && (e = []), !!t)
1740
1776
  return "An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({
1741
- version: Re,
1777
+ version: Je,
1742
1778
  message: t,
1743
- args: e.map(Je)
1779
+ args: e.map(Ge)
1744
1780
  })));
1745
1781
  }
1746
- function jr(t) {
1782
+ function Dr(t) {
1747
1783
  return t.definitions.filter(function(e) {
1748
1784
  return e.kind === "OperationDefinition" && !!e.name;
1749
1785
  }).map(function(e) {
@@ -1751,13 +1787,13 @@ function jr(t) {
1751
1787
  })[0] || null;
1752
1788
  }
1753
1789
  let N = null;
1754
- const Ie = {};
1755
- let Dr = 1;
1756
- const Ar = () => class {
1790
+ const Ne = {};
1791
+ let Lr = 1;
1792
+ const Br = () => class {
1757
1793
  constructor() {
1758
1794
  this.id = [
1759
1795
  "slot",
1760
- Dr++,
1796
+ Lr++,
1761
1797
  Date.now(),
1762
1798
  Math.random().toString(36).slice(2)
1763
1799
  ].join(":");
@@ -1766,26 +1802,26 @@ const Ar = () => class {
1766
1802
  for (let e = N; e; e = e.parent)
1767
1803
  if (this.id in e.slots) {
1768
1804
  const r = e.slots[this.id];
1769
- if (r === Ie)
1805
+ if (r === Ne)
1770
1806
  break;
1771
1807
  return e !== N && (N.slots[this.id] = r), !0;
1772
1808
  }
1773
- return N && (N.slots[this.id] = Ie), !1;
1809
+ return N && (N.slots[this.id] = Ne), !1;
1774
1810
  }
1775
1811
  getValue() {
1776
1812
  if (this.hasValue())
1777
1813
  return N.slots[this.id];
1778
1814
  }
1779
1815
  withValue(e, r, o, n) {
1780
- const l = {
1816
+ const d = {
1781
1817
  __proto__: null,
1782
1818
  [this.id]: e
1783
- }, c = N;
1784
- N = { parent: c, slots: l };
1819
+ }, s = N;
1820
+ N = { parent: s, slots: d };
1785
1821
  try {
1786
1822
  return r.apply(n, o);
1787
1823
  } finally {
1788
- N = c;
1824
+ N = s;
1789
1825
  }
1790
1826
  }
1791
1827
  // Capture the current context and wrap a callback function so that it
@@ -1814,27 +1850,27 @@ const Ar = () => class {
1814
1850
  return e.apply(o, r);
1815
1851
  }
1816
1852
  };
1817
- function Ne(t) {
1853
+ function Ee(t) {
1818
1854
  try {
1819
1855
  return t();
1820
1856
  } catch {
1821
1857
  }
1822
1858
  }
1823
- const te = "@wry/context:Slot", Lr = (
1859
+ const te = "@wry/context:Slot", Ur = (
1824
1860
  // Prefer globalThis when available.
1825
1861
  // https://github.com/benjamn/wryware/issues/347
1826
- Ne(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1862
+ Ee(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
1827
1863
  // bundlers to the appropriate identifier (window, self, ...) depending on the
1828
1864
  // bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
1829
- Ne(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1865
+ Ee(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
1830
1866
  // back to using the Array constructor as a namespace, but that was flagged in
1831
1867
  // https://github.com/benjamn/wryware/issues/347, and can be avoided.
1832
1868
  /* @__PURE__ */ Object.create(null)
1833
- ), Ee = Lr, de = Ee[te] || // Earlier versions of this package stored the globalKey property on the Array
1869
+ ), Te = Ur, de = Te[te] || // Earlier versions of this package stored the globalKey property on the Array
1834
1870
  // constructor, so we check there as well, to prevent Slot class duplication.
1835
1871
  Array[te] || (function(t) {
1836
1872
  try {
1837
- Object.defineProperty(Ee, te, {
1873
+ Object.defineProperty(Te, te, {
1838
1874
  value: t,
1839
1875
  enumerable: !1,
1840
1876
  writable: !1,
@@ -1849,12 +1885,12 @@ Array[te] || (function(t) {
1849
1885
  } finally {
1850
1886
  return t;
1851
1887
  }
1852
- })(Ar()), { bind: ko, noContext: So } = de;
1888
+ })(Br()), { bind: Co, noContext: _o } = de;
1853
1889
  new de();
1854
- function Br(t, e) {
1890
+ function qr(t, e) {
1855
1891
  var r = typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
1856
1892
  if (r) return (r = r.call(t)).next.bind(r);
1857
- if (Array.isArray(t) || (r = Ur(t)) || e) {
1893
+ if (Array.isArray(t) || (r = Mr(t)) || e) {
1858
1894
  r && (t = r);
1859
1895
  var o = 0;
1860
1896
  return function() {
@@ -1864,96 +1900,96 @@ function Br(t, e) {
1864
1900
  throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1865
1901
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1866
1902
  }
1867
- function Ur(t, e) {
1903
+ function Mr(t, e) {
1868
1904
  if (t) {
1869
- if (typeof t == "string") return Te(t, e);
1905
+ if (typeof t == "string") return Oe(t, e);
1870
1906
  var r = Object.prototype.toString.call(t).slice(8, -1);
1871
1907
  if (r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set") return Array.from(t);
1872
- if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Te(t, e);
1908
+ if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Oe(t, e);
1873
1909
  }
1874
1910
  }
1875
- function Te(t, e) {
1911
+ function Oe(t, e) {
1876
1912
  (e == null || e > t.length) && (e = t.length);
1877
1913
  for (var r = 0, o = new Array(e); r < e; r++)
1878
1914
  o[r] = t[r];
1879
1915
  return o;
1880
1916
  }
1881
- function Oe(t, e) {
1917
+ function Pe(t, e) {
1882
1918
  for (var r = 0; r < e.length; r++) {
1883
1919
  var o = e[r];
1884
1920
  o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(t, o.key, o);
1885
1921
  }
1886
1922
  }
1887
1923
  function ue(t, e, r) {
1888
- return e && Oe(t.prototype, e), r && Oe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1924
+ return e && Pe(t.prototype, e), r && Pe(t, r), Object.defineProperty(t, "prototype", { writable: !1 }), t;
1889
1925
  }
1890
1926
  var pe = function() {
1891
1927
  return typeof Symbol == "function";
1892
1928
  }, fe = function(t) {
1893
1929
  return pe() && !!Symbol[t];
1894
- }, me = function(t) {
1930
+ }, he = function(t) {
1895
1931
  return fe(t) ? Symbol[t] : "@@" + t;
1896
1932
  };
1897
1933
  pe() && !fe("observable") && (Symbol.observable = Symbol("observable"));
1898
- var qr = me("iterator"), ie = me("observable"), We = me("species");
1899
- function Kt(t, e) {
1934
+ var Hr = he("iterator"), ie = he("observable"), Xe = he("species");
1935
+ function Jt(t, e) {
1900
1936
  var r = t[e];
1901
1937
  if (r != null) {
1902
1938
  if (typeof r != "function") throw new TypeError(r + " is not a function");
1903
1939
  return r;
1904
1940
  }
1905
1941
  }
1906
- function It(t) {
1942
+ function Nt(t) {
1907
1943
  var e = t.constructor;
1908
- return e !== void 0 && (e = e[We], e === null && (e = void 0)), e !== void 0 ? e : E;
1944
+ return e !== void 0 && (e = e[Xe], e === null && (e = void 0)), e !== void 0 ? e : E;
1909
1945
  }
1910
- function Mr(t) {
1946
+ function Vr(t) {
1911
1947
  return t instanceof E;
1912
1948
  }
1913
- function bt(t) {
1914
- bt.log ? bt.log(t) : setTimeout(function() {
1949
+ function vt(t) {
1950
+ vt.log ? vt.log(t) : setTimeout(function() {
1915
1951
  throw t;
1916
1952
  });
1917
1953
  }
1918
- function qt(t) {
1954
+ function Mt(t) {
1919
1955
  Promise.resolve().then(function() {
1920
1956
  try {
1921
1957
  t();
1922
1958
  } catch (e) {
1923
- bt(e);
1959
+ vt(e);
1924
1960
  }
1925
1961
  });
1926
1962
  }
1927
- function Ge(t) {
1963
+ function Qe(t) {
1928
1964
  var e = t._cleanup;
1929
1965
  if (e !== void 0 && (t._cleanup = void 0, !!e))
1930
1966
  try {
1931
1967
  if (typeof e == "function")
1932
1968
  e();
1933
1969
  else {
1934
- var r = Kt(e, "unsubscribe");
1970
+ var r = Jt(e, "unsubscribe");
1935
1971
  r && r.call(e);
1936
1972
  }
1937
1973
  } catch (o) {
1938
- bt(o);
1974
+ vt(o);
1939
1975
  }
1940
1976
  }
1941
1977
  function se(t) {
1942
1978
  t._observer = void 0, t._queue = void 0, t._state = "closed";
1943
1979
  }
1944
- function Hr(t) {
1980
+ function Rr(t) {
1945
1981
  var e = t._queue;
1946
1982
  if (e) {
1947
1983
  t._queue = void 0, t._state = "ready";
1948
- for (var r = 0; r < e.length && (Xe(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1984
+ for (var r = 0; r < e.length && (Ze(t, e[r].type, e[r].value), t._state !== "closed"); ++r)
1949
1985
  ;
1950
1986
  }
1951
1987
  }
1952
- function Xe(t, e, r) {
1988
+ function Ze(t, e, r) {
1953
1989
  t._state = "running";
1954
1990
  var o = t._observer;
1955
1991
  try {
1956
- var n = Kt(o, e);
1992
+ var n = Jt(o, e);
1957
1993
  switch (e) {
1958
1994
  case "next":
1959
1995
  n && n.call(o, r);
@@ -1966,10 +2002,10 @@ function Xe(t, e, r) {
1966
2002
  se(t), n && n.call(o);
1967
2003
  break;
1968
2004
  }
1969
- } catch (l) {
1970
- bt(l);
2005
+ } catch (d) {
2006
+ vt(d);
1971
2007
  }
1972
- t._state === "closed" ? Ge(t) : t._state === "running" && (t._state = "ready");
2008
+ t._state === "closed" ? Qe(t) : t._state === "running" && (t._state = "ready");
1973
2009
  }
1974
2010
  function ee(t, e, r) {
1975
2011
  if (t._state !== "closed") {
@@ -1984,35 +2020,35 @@ function ee(t, e, r) {
1984
2020
  t._state = "buffering", t._queue = [{
1985
2021
  type: e,
1986
2022
  value: r
1987
- }], qt(function() {
1988
- return Hr(t);
2023
+ }], Mt(function() {
2024
+ return Rr(t);
1989
2025
  });
1990
2026
  return;
1991
2027
  }
1992
- Xe(t, e, r);
2028
+ Ze(t, e, r);
1993
2029
  }
1994
2030
  }
1995
- var Vr = /* @__PURE__ */ (function() {
2031
+ var Yr = /* @__PURE__ */ (function() {
1996
2032
  function t(r, o) {
1997
2033
  this._cleanup = void 0, this._observer = r, this._queue = void 0, this._state = "initializing";
1998
- var n = new Yr(this);
2034
+ var n = new Kr(this);
1999
2035
  try {
2000
2036
  this._cleanup = o.call(void 0, n);
2001
- } catch (l) {
2002
- n.error(l);
2037
+ } catch (d) {
2038
+ n.error(d);
2003
2039
  }
2004
2040
  this._state === "initializing" && (this._state = "ready");
2005
2041
  }
2006
2042
  var e = t.prototype;
2007
2043
  return e.unsubscribe = function() {
2008
- this._state !== "closed" && (se(this), Ge(this));
2044
+ this._state !== "closed" && (se(this), Qe(this));
2009
2045
  }, ue(t, [{
2010
2046
  key: "closed",
2011
2047
  get: function() {
2012
2048
  return this._state === "closed";
2013
2049
  }
2014
2050
  }]), t;
2015
- })(), Yr = /* @__PURE__ */ (function() {
2051
+ })(), Kr = /* @__PURE__ */ (function() {
2016
2052
  function t(r) {
2017
2053
  this._subscription = r;
2018
2054
  }
@@ -2041,107 +2077,107 @@ var Vr = /* @__PURE__ */ (function() {
2041
2077
  next: o,
2042
2078
  error: arguments[1],
2043
2079
  complete: arguments[2]
2044
- }), new Vr(o, this._subscriber);
2080
+ }), new Yr(o, this._subscriber);
2045
2081
  }, e.forEach = function(o) {
2046
2082
  var n = this;
2047
- return new Promise(function(l, c) {
2083
+ return new Promise(function(d, s) {
2048
2084
  if (typeof o != "function") {
2049
- c(new TypeError(o + " is not a function"));
2085
+ s(new TypeError(o + " is not a function"));
2050
2086
  return;
2051
2087
  }
2052
- function d() {
2053
- i.unsubscribe(), l();
2088
+ function l() {
2089
+ i.unsubscribe(), d();
2054
2090
  }
2055
2091
  var i = n.subscribe({
2056
- next: function(x) {
2092
+ next: function(b) {
2057
2093
  try {
2058
- o(x, d);
2059
- } catch (h) {
2060
- c(h), i.unsubscribe();
2094
+ o(b, l);
2095
+ } catch (m) {
2096
+ s(m), i.unsubscribe();
2061
2097
  }
2062
2098
  },
2063
- error: c,
2064
- complete: l
2099
+ error: s,
2100
+ complete: d
2065
2101
  });
2066
2102
  });
2067
2103
  }, e.map = function(o) {
2068
2104
  var n = this;
2069
2105
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2070
- var l = It(this);
2071
- return new l(function(c) {
2106
+ var d = Nt(this);
2107
+ return new d(function(s) {
2072
2108
  return n.subscribe({
2073
- next: function(d) {
2109
+ next: function(l) {
2074
2110
  try {
2075
- d = o(d);
2111
+ l = o(l);
2076
2112
  } catch (i) {
2077
- return c.error(i);
2113
+ return s.error(i);
2078
2114
  }
2079
- c.next(d);
2115
+ s.next(l);
2080
2116
  },
2081
- error: function(d) {
2082
- c.error(d);
2117
+ error: function(l) {
2118
+ s.error(l);
2083
2119
  },
2084
2120
  complete: function() {
2085
- c.complete();
2121
+ s.complete();
2086
2122
  }
2087
2123
  });
2088
2124
  });
2089
2125
  }, e.filter = function(o) {
2090
2126
  var n = this;
2091
2127
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2092
- var l = It(this);
2093
- return new l(function(c) {
2128
+ var d = Nt(this);
2129
+ return new d(function(s) {
2094
2130
  return n.subscribe({
2095
- next: function(d) {
2131
+ next: function(l) {
2096
2132
  try {
2097
- if (!o(d)) return;
2133
+ if (!o(l)) return;
2098
2134
  } catch (i) {
2099
- return c.error(i);
2135
+ return s.error(i);
2100
2136
  }
2101
- c.next(d);
2137
+ s.next(l);
2102
2138
  },
2103
- error: function(d) {
2104
- c.error(d);
2139
+ error: function(l) {
2140
+ s.error(l);
2105
2141
  },
2106
2142
  complete: function() {
2107
- c.complete();
2143
+ s.complete();
2108
2144
  }
2109
2145
  });
2110
2146
  });
2111
2147
  }, e.reduce = function(o) {
2112
2148
  var n = this;
2113
2149
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2114
- var l = It(this), c = arguments.length > 1, d = !1, i = arguments[1], x = i;
2115
- return new l(function(h) {
2150
+ var d = Nt(this), s = arguments.length > 1, l = !1, i = arguments[1], b = i;
2151
+ return new d(function(m) {
2116
2152
  return n.subscribe({
2117
2153
  next: function(S) {
2118
- var _ = !d;
2119
- if (d = !0, !_ || c)
2154
+ var _ = !l;
2155
+ if (l = !0, !_ || s)
2120
2156
  try {
2121
- x = o(x, S);
2157
+ b = o(b, S);
2122
2158
  } catch (F) {
2123
- return h.error(F);
2159
+ return m.error(F);
2124
2160
  }
2125
2161
  else
2126
- x = S;
2162
+ b = S;
2127
2163
  },
2128
2164
  error: function(S) {
2129
- h.error(S);
2165
+ m.error(S);
2130
2166
  },
2131
2167
  complete: function() {
2132
- if (!d && !c) return h.error(new TypeError("Cannot reduce an empty sequence"));
2133
- h.next(x), h.complete();
2168
+ if (!l && !s) return m.error(new TypeError("Cannot reduce an empty sequence"));
2169
+ m.next(b), m.complete();
2134
2170
  }
2135
2171
  });
2136
2172
  });
2137
2173
  }, e.concat = function() {
2138
- for (var o = this, n = arguments.length, l = new Array(n), c = 0; c < n; c++)
2139
- l[c] = arguments[c];
2140
- var d = It(this);
2141
- return new d(function(i) {
2142
- var x, h = 0;
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;
2143
2179
  function S(_) {
2144
- x = _.subscribe({
2180
+ b = _.subscribe({
2145
2181
  next: function(F) {
2146
2182
  i.next(F);
2147
2183
  },
@@ -2149,54 +2185,54 @@ var Vr = /* @__PURE__ */ (function() {
2149
2185
  i.error(F);
2150
2186
  },
2151
2187
  complete: function() {
2152
- h === l.length ? (x = void 0, i.complete()) : S(d.from(l[h++]));
2188
+ m === d.length ? (b = void 0, i.complete()) : S(l.from(d[m++]));
2153
2189
  }
2154
2190
  });
2155
2191
  }
2156
2192
  return S(o), function() {
2157
- x && (x.unsubscribe(), x = void 0);
2193
+ b && (b.unsubscribe(), b = void 0);
2158
2194
  };
2159
2195
  });
2160
2196
  }, e.flatMap = function(o) {
2161
2197
  var n = this;
2162
2198
  if (typeof o != "function") throw new TypeError(o + " is not a function");
2163
- var l = It(this);
2164
- return new l(function(c) {
2165
- var d = [], i = n.subscribe({
2166
- next: function(h) {
2199
+ var d = Nt(this);
2200
+ return new d(function(s) {
2201
+ var l = [], i = n.subscribe({
2202
+ next: function(m) {
2167
2203
  if (o)
2168
2204
  try {
2169
- h = o(h);
2205
+ m = o(m);
2170
2206
  } catch (_) {
2171
- return c.error(_);
2207
+ return s.error(_);
2172
2208
  }
2173
- var S = l.from(h).subscribe({
2209
+ var S = d.from(m).subscribe({
2174
2210
  next: function(_) {
2175
- c.next(_);
2211
+ s.next(_);
2176
2212
  },
2177
2213
  error: function(_) {
2178
- c.error(_);
2214
+ s.error(_);
2179
2215
  },
2180
2216
  complete: function() {
2181
- var _ = d.indexOf(S);
2182
- _ >= 0 && d.splice(_, 1), x();
2217
+ var _ = l.indexOf(S);
2218
+ _ >= 0 && l.splice(_, 1), b();
2183
2219
  }
2184
2220
  });
2185
- d.push(S);
2221
+ l.push(S);
2186
2222
  },
2187
- error: function(h) {
2188
- c.error(h);
2223
+ error: function(m) {
2224
+ s.error(m);
2189
2225
  },
2190
2226
  complete: function() {
2191
- x();
2227
+ b();
2192
2228
  }
2193
2229
  });
2194
- function x() {
2195
- i.closed && d.length === 0 && c.complete();
2230
+ function b() {
2231
+ i.closed && l.length === 0 && s.complete();
2196
2232
  }
2197
2233
  return function() {
2198
- d.forEach(function(h) {
2199
- return h.unsubscribe();
2234
+ l.forEach(function(m) {
2235
+ return m.unsubscribe();
2200
2236
  }), i.unsubscribe();
2201
2237
  };
2202
2238
  });
@@ -2205,52 +2241,52 @@ var Vr = /* @__PURE__ */ (function() {
2205
2241
  }, t.from = function(o) {
2206
2242
  var n = typeof this == "function" ? this : t;
2207
2243
  if (o == null) throw new TypeError(o + " is not an object");
2208
- var l = Kt(o, ie);
2209
- if (l) {
2210
- var c = l.call(o);
2211
- if (Object(c) !== c) throw new TypeError(c + " is not an object");
2212
- return Mr(c) && c.constructor === n ? c : new n(function(d) {
2213
- return c.subscribe(d);
2244
+ var d = Jt(o, ie);
2245
+ if (d) {
2246
+ var s = d.call(o);
2247
+ 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);
2214
2250
  });
2215
2251
  }
2216
- if (fe("iterator") && (l = Kt(o, qr), l))
2217
- return new n(function(d) {
2218
- qt(function() {
2219
- if (!d.closed) {
2220
- for (var i = Br(l.call(o)), x; !(x = i()).done; ) {
2221
- var h = x.value;
2222
- if (d.next(h), d.closed) return;
2252
+ if (fe("iterator") && (d = Jt(o, Hr), d))
2253
+ return new n(function(l) {
2254
+ 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;
2223
2259
  }
2224
- d.complete();
2260
+ l.complete();
2225
2261
  }
2226
2262
  });
2227
2263
  });
2228
2264
  if (Array.isArray(o))
2229
- return new n(function(d) {
2230
- qt(function() {
2231
- if (!d.closed) {
2265
+ return new n(function(l) {
2266
+ Mt(function() {
2267
+ if (!l.closed) {
2232
2268
  for (var i = 0; i < o.length; ++i)
2233
- if (d.next(o[i]), d.closed) return;
2234
- d.complete();
2269
+ if (l.next(o[i]), l.closed) return;
2270
+ l.complete();
2235
2271
  }
2236
2272
  });
2237
2273
  });
2238
2274
  throw new TypeError(o + " is not observable");
2239
2275
  }, t.of = function() {
2240
- for (var o = arguments.length, n = new Array(o), l = 0; l < o; l++)
2241
- n[l] = arguments[l];
2242
- var c = typeof this == "function" ? this : t;
2243
- return new c(function(d) {
2244
- qt(function() {
2245
- if (!d.closed) {
2276
+ for (var o = arguments.length, n = new Array(o), d = 0; d < o; d++)
2277
+ n[d] = arguments[d];
2278
+ var s = typeof this == "function" ? this : t;
2279
+ return new s(function(l) {
2280
+ Mt(function() {
2281
+ if (!l.closed) {
2246
2282
  for (var i = 0; i < n.length; ++i)
2247
- if (d.next(n[i]), d.closed) return;
2248
- d.complete();
2283
+ if (l.next(n[i]), l.closed) return;
2284
+ l.complete();
2249
2285
  }
2250
2286
  });
2251
2287
  });
2252
2288
  }, ue(t, null, [{
2253
- key: We,
2289
+ key: Xe,
2254
2290
  get: function() {
2255
2291
  return this;
2256
2292
  }
@@ -2259,11 +2295,11 @@ var Vr = /* @__PURE__ */ (function() {
2259
2295
  pe() && Object.defineProperty(E, Symbol("extensions"), {
2260
2296
  value: {
2261
2297
  symbol: ie,
2262
- hostReportError: bt
2298
+ hostReportError: vt
2263
2299
  },
2264
2300
  configurable: !0
2265
2301
  });
2266
- function Rr(t) {
2302
+ function Jr(t) {
2267
2303
  var e, r = t.Symbol;
2268
2304
  if (typeof r == "function")
2269
2305
  if (r.observable)
@@ -2279,14 +2315,14 @@ function Rr(t) {
2279
2315
  e = "@@observable";
2280
2316
  return e;
2281
2317
  }
2282
- var xt;
2283
- typeof self < "u" ? xt = self : typeof window < "u" ? xt = window : typeof global < "u" ? xt = global : typeof module < "u" ? xt = module : xt = Function("return this")();
2284
- Rr(xt);
2285
- var Pe = E.prototype, $e = "@@observable";
2286
- Pe[$e] || (Pe[$e] = function() {
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);
2321
+ var $e = E.prototype, ze = "@@observable";
2322
+ $e[ze] || ($e[ze] = function() {
2287
2323
  return this;
2288
2324
  });
2289
- function Kr(t) {
2325
+ function Wr(t) {
2290
2326
  for (var e = [
2291
2327
  "query",
2292
2328
  "operationName",
@@ -2296,13 +2332,13 @@ function Kr(t) {
2296
2332
  ], r = 0, o = Object.keys(t); r < o.length; r++) {
2297
2333
  var n = o[r];
2298
2334
  if (e.indexOf(n) < 0)
2299
- throw Ke(58, n);
2335
+ throw We(58, n);
2300
2336
  }
2301
2337
  return t;
2302
2338
  }
2303
- function Jr(t, e) {
2304
- var r = X({}, t), o = function(l) {
2305
- typeof l == "function" ? r = X(X({}, r), l(r)) : r = X(X({}, r), l);
2339
+ 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);
2306
2342
  }, n = function() {
2307
2343
  return X({}, r);
2308
2344
  };
@@ -2314,32 +2350,32 @@ function Jr(t, e) {
2314
2350
  value: n
2315
2351
  }), e;
2316
2352
  }
2317
- function Wr(t) {
2353
+ function Xr(t) {
2318
2354
  var e = {
2319
2355
  variables: t.variables || {},
2320
2356
  extensions: t.extensions || {},
2321
2357
  operationName: t.operationName,
2322
2358
  query: t.query
2323
2359
  };
2324
- return e.operationName || (e.operationName = typeof e.query != "string" ? jr(e.query) || void 0 : ""), e;
2360
+ return e.operationName || (e.operationName = typeof e.query != "string" ? Dr(e.query) || void 0 : ""), e;
2325
2361
  }
2326
- var Gr = Symbol.for("apollo.deprecations"), Xr = ae, Qr = new de();
2327
- function Zr(t) {
2328
- return Xr[Gr] || (Qr.getValue() || []).includes(t);
2362
+ var Qr = Symbol.for("apollo.deprecations"), Zr = ae, to = new de();
2363
+ function eo(t) {
2364
+ return Zr[Qr] || (to.getValue() || []).includes(t);
2329
2365
  }
2330
- function to(t, e) {
2331
- Zr(t) || e();
2366
+ function ro(t, e) {
2367
+ eo(t) || e();
2332
2368
  }
2333
- function ze(t, e) {
2369
+ function Ae(t, e) {
2334
2370
  return e ? e(t) : E.of();
2335
2371
  }
2336
- function Nt(t) {
2337
- return typeof t == "function" ? new Qe(t) : t;
2372
+ function Et(t) {
2373
+ return typeof t == "function" ? new tr(t) : t;
2338
2374
  }
2339
- function Ut(t) {
2375
+ function qt(t) {
2340
2376
  return t.request.length <= 1;
2341
2377
  }
2342
- var Qe = (
2378
+ var tr = (
2343
2379
  /** @class */
2344
2380
  (function() {
2345
2381
  function t(e) {
@@ -2350,40 +2386,40 @@ var Qe = (
2350
2386
  return E.of();
2351
2387
  });
2352
2388
  }, t.from = function(e) {
2353
- return e.length === 0 ? t.empty() : e.map(Nt).reduce(function(r, o) {
2389
+ return e.length === 0 ? t.empty() : e.map(Et).reduce(function(r, o) {
2354
2390
  return r.concat(o);
2355
2391
  });
2356
2392
  }, t.split = function(e, r, o) {
2357
- var n = Nt(r), l = Nt(o || new t(ze)), c;
2358
- return Ut(n) && Ut(l) ? c = new t(function(d) {
2359
- return e(d) ? n.request(d) || E.of() : l.request(d) || E.of();
2360
- }) : c = new t(function(d, i) {
2361
- return e(d) ? n.request(d, i) || E.of() : l.request(d, i) || E.of();
2362
- }), Object.assign(c, { left: n, right: l });
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 });
2363
2399
  }, t.execute = function(e, r) {
2364
- return e.request(Jr(r.context, Wr(Kr(r)))) || E.of();
2400
+ return e.request(Gr(r.context, Xr(Wr(r)))) || E.of();
2365
2401
  }, t.concat = function(e, r) {
2366
- var o = Nt(e);
2367
- if (Ut(o))
2402
+ var o = Et(e);
2403
+ if (qt(o))
2368
2404
  return globalThis.__DEV__ !== !1 && Zt.warn(47, o), o;
2369
- var n = Nt(r), l;
2370
- return Ut(n) ? l = new t(function(c) {
2371
- return o.request(c, function(d) {
2372
- return n.request(d) || E.of();
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();
2373
2409
  }) || E.of();
2374
- }) : l = new t(function(c, d) {
2375
- return o.request(c, function(i) {
2376
- return n.request(i, d) || E.of();
2410
+ }) : d = new t(function(s, l) {
2411
+ return o.request(s, function(i) {
2412
+ return n.request(i, l) || E.of();
2377
2413
  }) || E.of();
2378
- }), Object.assign(l, { left: o, right: n });
2414
+ }), Object.assign(d, { left: o, right: n });
2379
2415
  }, t.prototype.split = function(e, r, o) {
2380
- return this.concat(t.split(e, r, o || new t(ze)));
2416
+ return this.concat(t.split(e, r, o || new t(Ae)));
2381
2417
  }, t.prototype.concat = function(e) {
2382
2418
  return t.concat(this, e);
2383
2419
  }, t.prototype.request = function(e, r) {
2384
- throw Ke(48);
2420
+ throw We(48);
2385
2421
  }, t.prototype.onError = function(e, r) {
2386
- if (globalThis.__DEV__ !== !1 && to("onError", function() {
2422
+ if (globalThis.__DEV__ !== !1 && ro("onError", function() {
2387
2423
  globalThis.__DEV__ !== !1 && Zt.warn(49);
2388
2424
  }), r && r.error)
2389
2425
  return r.error(e), !1;
@@ -2393,26 +2429,26 @@ var Qe = (
2393
2429
  }, t;
2394
2430
  })()
2395
2431
  );
2396
- function eo(t) {
2397
- return new Qe(function(e, r) {
2398
- var o = Tr(e, []);
2432
+ function oo(t) {
2433
+ return new tr(function(e, r) {
2434
+ var o = Pr(e, []);
2399
2435
  return new E(function(n) {
2400
- var l, c = !1;
2401
- return Promise.resolve(o).then(function(d) {
2402
- return t(d, e.getContext());
2436
+ var d, s = !1;
2437
+ return Promise.resolve(o).then(function(l) {
2438
+ return t(l, e.getContext());
2403
2439
  }).then(e.setContext).then(function() {
2404
- c || (l = r(e).subscribe({
2440
+ s || (d = r(e).subscribe({
2405
2441
  next: n.next.bind(n),
2406
2442
  error: n.error.bind(n),
2407
2443
  complete: n.complete.bind(n)
2408
2444
  }));
2409
2445
  }).catch(n.error.bind(n)), function() {
2410
- c = !0, l && l.unsubscribe();
2446
+ s = !0, d && d.unsubscribe();
2411
2447
  };
2412
2448
  });
2413
2449
  });
2414
2450
  }
2415
- const ro = async () => {
2451
+ const no = async () => {
2416
2452
  const t = "https://auth.australia-southeast1.gcp.commercetools.com/oauth/token", o = "Basic " + btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN") + ":" + encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));
2417
2453
  try {
2418
2454
  const n = await T.post(
@@ -2430,30 +2466,30 @@ const ro = async () => {
2430
2466
  } catch (n) {
2431
2467
  return T.isAxiosError(n) ? console.error("Error fetching token:", n.response || n.message) : console.error("Unexpected error:", n), null;
2432
2468
  }
2433
- }, oo = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", no = ar({
2434
- uri: `${oo}`
2435
- }), ao = eo(async (t, { headers: e }) => {
2436
- const r = await ro();
2469
+ }, ao = "https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql", io = sr({
2470
+ uri: `${ao}`
2471
+ }), so = oo(async (t, { headers: e }) => {
2472
+ const r = await no();
2437
2473
  return {
2438
2474
  headers: {
2439
2475
  ...e,
2440
2476
  authorization: `Bearer ${r}`
2441
2477
  }
2442
2478
  };
2443
- }), io = new ir({
2444
- link: ao.concat(no),
2445
- cache: new sr(),
2479
+ }), lo = new lr({
2480
+ link: so.concat(io),
2481
+ cache: new cr(),
2446
2482
  defaultOptions: {
2447
2483
  watchQuery: {
2448
2484
  fetchPolicy: "cache-and-network"
2449
2485
  }
2450
2486
  }
2451
- }), Co = (t) => {
2487
+ }), Fo = (t) => {
2452
2488
  const { tanyaConfig: e } = t;
2453
- return /* @__PURE__ */ a(lr, { client: io, children: /* @__PURE__ */ a(gr, { children: /* @__PURE__ */ a(Nr, { tanyaConfig: e }) }) });
2489
+ return /* @__PURE__ */ a(dr, { client: lo, children: /* @__PURE__ */ a(xr, { children: /* @__PURE__ */ a(Tr, { tanyaConfig: e }) }) });
2454
2490
  };
2455
2491
  export {
2456
- Co as TanyaChatbot,
2457
- bo as TanyaChatbotProvider
2492
+ Fo as TanyaChatbot,
2493
+ vo as TanyaChatbotProvider
2458
2494
  };
2459
2495
  //# sourceMappingURL=tanya-chatbot.es.js.map