tanya-chatbot 0.0.14 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),i=require("react/jsx-runtime"),Yt=require("@apollo/client"),gt=require("react-redux"),ye=require("@reduxjs/toolkit"),Vr=require("@radix-ui/react-popover");require("clsx");require("tailwind-merge");const M=require("axios");require("crypto-js");const Oe=require("@iconify/react"),Q=require("react-toastify");function Yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const dr=Yr(Vr),Jr='*,: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-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.p-\\[5px\\]{padding:5px}.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;background-color:#1a1a1a;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}}';function Kr(){return k.useEffect(()=>{if(typeof document<"u"){const t=document.createElement("style");return t.textContent=Jr,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[]),null}const Gr={store:{storeCode:"",storeName:"",storeDescription:"",activeCatalogId:0,isDefault:!1,logoDarkBg:"",logoLightBg:"",logoTransparent:"",catalogs:[],themeColor:"",themeContrastColor:"",tanyaThemeColor:"",tanyaThemeColorLight:"",favicon:"",websiteTitle:"",flowId:"",aliasId:"",searchConfigs:{endpoint:"",accessKey:"",secretKey:""},homePageCategories:[],carouselImages:{web:[],mobile:[]},otherImages:{web:[],mobile:[]}}},fr=ye.createSlice({name:"store",initialState:Gr,reducers:{setStore:(t,e)=>{t.store=e.payload}}}),{setStore:Ko}=fr.actions,Wr=fr.reducer,Qr={product:null},pr=ye.createSlice({name:"product",initialState:Qr,reducers:{setProduct:(t,e)=>{t.product=e.payload}}}),{setProduct:ue}=pr.actions,Xr=pr.reducer,Zr=ye.configureStore({reducer:{store:Wr,product:Xr}}),tn=({children:t})=>i.jsx(gt.Provider,{store:Zr,children:t}),It=t=>{const e=new CustomEvent("reactCartUpdated",{detail:{cartUpdated:!0,basketId:t}});window.dispatchEvent(e)};function en({...t}){return i.jsx(dr.Root,{"data-slot":"popover",...t})}function rn({...t}){return i.jsx(dr.Trigger,{"data-slot":"popover-trigger",...t})}const mt=()=>({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"}),hr=async()=>{const t="https://tanya-sfcc-server.vercel.app/";try{const e=await M.post(`${t}api/auth/token-bm-grant?baseUrl=${it()}&siteId=${et()}`);return e.status===200&&e.data.access_token?e.data.access_token:(console.error("Failed to fetch token:",e.data),null)}catch(e){return M.isAxiosError(e)?console.error("Error fetching token:",e.response||e.message):console.error("Unexpected error:",e),null}},gr=async t=>{const e="https://tanya-sfcc-server.vercel.app/";try{const r=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,n=await M.post(`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${it()}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});return n.status===200&&n.data?n.data:null}catch(r){return M.isAxiosError(r)?console.error("Error creating basket:",r.response||r.message):console.error("Unexpected error:",r),null}};async function Qt(){const t=localStorage.getItem("expires_in"),e=localStorage.getItem("access_token"),r=JSON.parse(sessionStorage.getItem("customerData")||"{}").isGuest;if(t&&e&&new Date().getTime()<parseInt(t)&&r===JSON.parse(localStorage.getItem("isGuest")||"false"))return console.log("access token found in local storage"),{access_token:e,expires_in:t};const{serverUrl:n}=mt(),o=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,s=JSON.parse(sessionStorage.getItem("customerData")||"{}").usrRef;try{const a=r?"unregister-auth":"register-auth",l=await M.get(`${n}sc-api/${a}?dwsid=${o}&email=${s}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}&siteId=${et()}`);return localStorage.setItem("access_token",l.data.access_token),localStorage.setItem("expires_in",String(new Date().getTime()+l.data.expires_in*1e3)),localStorage.setItem("isGuest",r.toString()),console.log(l.data),l.data}catch(a){console.log(a)}}const it=()=>sessionStorage.getItem("Host"),et=()=>sessionStorage.getItem("SiteId"),ct=()=>sessionStorage.getItem("pubCfg"),lt=()=>sessionStorage.getItem("envRef"),ut=()=>sessionStorage.getItem("orgRef"),$e=async(t,e)=>{const{serverUrl:r,basePath:n}=mt();try{const o=it();return(await M.get(`${r}${n}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}})).data.hits}catch(o){throw console.error("Error fetching search results:",o),o}},mr=async t=>{if(!t)throw new Error("Product ID is required");const{serverUrl:e,basePath:r}=mt(),n=it();console.log("calling access");const{access_token:o}=await Qt();return console.log(o),(await M.get(`${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}})).data},nn=async t=>{if(!t)throw new Error("customerId is required");const e=await hr(),{customer_token:r}=await gr(e),{serverUrl:n,basePath:o}=mt(),a=(await Qt()).access_token;return(await M.get(`${n}${o}/get-interest?baseUrl=${it()}&customerId=${t}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}})).data},Ae=t=>String(typeof t=="string"?t:t["en-US"]||t),Le=t=>t!=null&&t.image?[t.image]:"variants"in t?t.variants[0].images:t.masterVariant.images.map(e=>e.url),on=(t,e)=>t.toLocaleString("en-US",{style:"currency",currency:e||"USD"}),ze=t=>{var e,r,n;return"variants"in t?{centAmount:(e=t.variants[0])==null?void 0:e.prices.EUR.max,currencyCode:"DOL"}:{centAmount:(r=t.masterVariant)==null?void 0:r.prices[0].value.centAmount,currencyCode:(n=t.masterVariant)==null?void 0:n.prices[0].value.currencyCode}},sn=t=>t.charAt(0).toUpperCase()+t.slice(1),De=(t,e)=>t.length<e?t:t.slice(0,e)+"...",ne=t=>t.split("\\n").map((e,r)=>{const n=e.match(/^(\d+)\.\s(.+)/);return n?`<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>`:e.trim()?`<p key=${r} class="mb-2">${e}</p>`:"<br/>"}).join("");function an(t,e){const r=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=n[a]&&n[a].parent,c=l&&s(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(r).concat(Object.keys(n)).forEach(s),o}const wr=Object.freeze({left:0,top:0,width:16,height:16}),Jt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...wr,...Jt}),de=Object.freeze({...be,body:"",hidden:!1});function cn(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Me(t,e){const r=cn(t,e);for(const n in de)n in Jt?n in t&&!(n in r)&&(r[n]=Jt[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function ln(t,e,r){const n=t.icons,o=t.aliases||Object.create(null);let s={};function a(l){s=Me(n[l]||o[l],s)}return a(e),r.forEach(a),Me(t,s)}function xr(t,e){const r=[];if(typeof t!="object"||typeof t.icons!="object")return r;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),r.push(o)});const n=an(t);for(const o in n){const s=n[o];s&&(e(o,ln(t,o,s)),r.push(o))}return r}const un={provider:"",aliases:{},not_found:{},...wr};function oe(t,e){for(const r in e)if(r in t&&typeof t[r]!=typeof e[r])return!1;return!0}function yr(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!oe(t,un))return null;const r=e.icons;for(const o in r){const s=r[o];if(!o||typeof s.body!="string"||!oe(s,de))return null}const n=e.aliases||Object.create(null);for(const o in n){const s=n[o],a=s.parent;if(!o||typeof a!="string"||!r[a]&&!n[a]||!oe(s,de))return null}return e}const qe=Object.create(null);function dn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Ft(t,e){const r=qe[t]||(qe[t]=Object.create(null));return r[e]||(r[e]=dn(t,e))}function br(t,e){return yr(e)?xr(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function fn(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}const vr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xt=(t,e,r,n="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:n,prefix:c,name:l};return e&&!Rt(u)?null:u}const s=o[0],a=s.split("-");if(a.length>1){const l={provider:n,prefix:a.shift(),name:a.join("-")};return e&&!Rt(l)?null:l}if(r&&n===""){const l={provider:n,prefix:"",name:s};return e&&!Rt(l,r)?null:l}return null},Rt=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;let zt=!1;function kr(t){return typeof t=="boolean"&&(zt=t),zt}function Ue(t){const e=typeof t=="string"?Xt(t,!0,zt):t;if(e){const r=Ft(e.provider,e.prefix),n=e.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function pn(t,e){const r=Xt(t,!0,zt);if(!r)return!1;const n=Ft(r.provider,r.prefix);return e?fn(n,r.name,e):(n.missing.add(r.name),!0)}function hn(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),zt&&!e&&!t.prefix){let o=!1;return yr(t)&&(t.prefix="",xr(t,(s,a)=>{pn(s,a)&&(o=!0)})),o}const r=t.prefix;if(!Rt({prefix:r,name:"a"}))return!1;const n=Ft(e,r);return!!br(n,t)}const Sr=Object.freeze({width:null,height:null}),jr=Object.freeze({...Sr,...Jt}),gn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Be(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(gn);if(n===null||!n.length)return t;const o=[];let s=n.shift(),a=mn.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?o.push(s):o.push(Math.ceil(l*e*r)/r)}else o.push(s);if(s=n.shift(),s===void 0)return o.join("");a=!a}}function wn(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const o=t.indexOf(">",n),s=t.indexOf("</"+e);if(o===-1||s===-1)break;const a=t.indexOf(">",s);if(a===-1)break;r+=t.slice(o+1,s).trim(),t=t.slice(0,n).trim()+t.slice(a+1)}return{defs:r,content:t}}function xn(t,e){return t?"<defs>"+t+"</defs>"+e:e}function yn(t,e,r){const n=wn(t);return xn(n.defs,e+n.content+r)}const bn=t=>t==="unset"||t==="undefined"||t==="none";function vn(t,e){const r={...be,...t},n={...jr,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,n].forEach(I=>{const m=[],b=I.hFlip,q=I.vFlip;let T=I.rotate;b?q?T+=2:(m.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),m.push("scale(-1 1)"),o.top=o.left=0):q&&(m.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),m.push("scale(1 -1)"),o.top=o.left=0);let $;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:$=o.height/2+o.top,m.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:m.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:$=o.width/2+o.left,m.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}T%2===1&&(o.left!==o.top&&($=o.left,o.left=o.top,o.top=$),o.width!==o.height&&($=o.width,o.width=o.height,o.height=$)),m.length&&(s=yn(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const a=n.width,l=n.height,c=o.width,u=o.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?u:l,f=Be(p,c/u)):(f=a==="auto"?c:a,p=l===null?Be(f,u/c):l==="auto"?u:l);const h={},g=(I,m)=>{bn(m)||(h[I]=m.toString())};g("width",f),g("height",p);const v=[o.left,o.top,c,u];return h.viewBox=v.join(" "),{attributes:h,viewBox:v,body:s}}const kn=/\sid="(\S+)"/g,Sn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let jn=0;function Cn(t,e=Sn){const r=[];let n;for(;n=kn.exec(t);)r.push(n[1]);if(!r.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const a=typeof e=="function"?e(s):e+(jn++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const fe=Object.create(null);function In(t,e){fe[t]=e}function pe(t){return fe[t]||fe[""]}function ve(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ke=Object.create(null),Tt=["https://api.simplesvg.com","https://api.unisvg.com"],Ht=[];for(;Tt.length>0;)Tt.length===1||Math.random()>.5?Ht.push(Tt.shift()):Ht.push(Tt.pop());ke[""]=ve({resources:["https://api.iconify.design"].concat(Ht)});function _n(t,e){const r=ve(e);return r===null?!1:(ke[t]=r,!0)}function Se(t){return ke[t]}const Fn=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let Re=Fn();function Nn(t,e){const r=Se(t);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(a=>{o=Math.max(o,a.length)});const s=e+".json?icons=";n=r.maxURL-o-r.path.length-s.length}return n}function En(t){return t===404}const Tn=(t,e,r)=>{const n=[],o=Nn(t,e),s="icons";let a={type:s,provider:t,prefix:e,icons:[]},l=0;return r.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(n.push(a),a={type:s,provider:t,prefix:e,icons:[]},l=c.length),a.icons.push(c)}),n.push(a),n};function Pn(t){if(typeof t=="string"){const e=Se(t);if(e)return e.path}return"/"}const On=(t,e,r)=>{if(!Re){r("abort",424);return}let n=Pn(e.provider);switch(e.type){case"icons":{const s=e.prefix,l=e.icons.join(","),c=new URLSearchParams({icons:l});n+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:r("abort",400);return}let o=503;Re(t+n).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{r(En(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?r("abort",s):r("next",o)});return}setTimeout(()=>{r("success",s)})}).catch(()=>{r("next",o)})},$n={prepare:Tn,send:On};function Cr(t,e){t.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==e))})}function An(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let r=!1;const n=t.provider,o=t.prefix;e.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(t.icons[u])a.loaded.push({provider:n,prefix:o,name:u});else if(t.missing.has(u))a.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),a.pending.length!==l&&(r||Cr([t],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let Ln=0;function zn(t,e,r){const n=Ln++,o=Cr.bind(null,r,n);if(!e.pending.length)return o;const s={id:n,icons:e,callback:t,abort:o};return r.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function Dn(t){const e={loaded:[],missing:[],pending:[]},r=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return t.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,a=o.prefix,l=o.name,c=r[s]||(r[s]=Object.create(null)),u=c[a]||(c[a]=Ft(s,a));let f;l in u.icons?f=e.loaded:a===""||u.missing.has(l)?f=e.missing:f=e.pending;const p={provider:s,prefix:a,name:l};f.push(p)}),e}function Mn(t,e=!0,r=!1){const n=[];return t.forEach(o=>{const s=typeof o=="string"?Xt(o,e,r):o;s&&n.push(s)}),n}const qn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Un(t,e,r,n){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let S=t.resources.slice(0);for(a=[];S.length>1;){const L=Math.floor(Math.random()*S.length);a.push(S[L]),S=S.slice(0,L).concat(S.slice(L+1))}a=a.concat(S)}else a=t.resources.slice(s).concat(t.resources.slice(0,s));const l=Date.now();let c="pending",u=0,f,p=null,h=[],g=[];typeof n=="function"&&g.push(n);function v(){p&&(clearTimeout(p),p=null)}function I(){c==="pending"&&(c="aborted"),v(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function m(S,L){L&&(g=[]),typeof S=="function"&&g.push(S)}function b(){return{startTime:l,payload:e,status:c,queriesSent:u,queriesPending:h.length,subscribe:m,abort:I}}function q(){c="failed",g.forEach(S=>{S(void 0,f)})}function T(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function $(S,L,R){const H=L!=="success";switch(h=h.filter(P=>P!==S),c){case"pending":break;case"failed":if(H||!t.dataAfterTimeout)return;break;default:return}if(L==="abort"){f=R,q();return}if(H){f=R,h.length||(a.length?X():q());return}if(v(),T(),!t.random){const P=t.resources.indexOf(S.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",g.forEach(P=>{P(R)})}function X(){if(c!=="pending")return;v();const S=a.shift();if(S===void 0){if(h.length){p=setTimeout(()=>{v(),c==="pending"&&(T(),q())},t.timeout);return}q();return}const L={status:"pending",resource:S,callback:(R,H)=>{$(L,R,H)}};h.push(L),u++,p=setTimeout(X,t.rotate),r(S,e,L.callback)}return setTimeout(X),b}function Ir(t){const e={...qn,...t};let r=[];function n(){r=r.filter(l=>l().status==="pending")}function o(l,c,u){const f=Un(e,l,c,(p,h)=>{n(),u&&u(p,h)});return r.push(f),f}function s(l){return r.find(c=>l(c))||null}return{query:o,find:s,setIndex:l=>{e.index=l},getIndex:()=>e.index,cleanup:n}}function He(){}const se=Object.create(null);function Bn(t){if(!se[t]){const e=Se(t);if(!e)return;const r=Ir(e),n={config:e,redundancy:r};se[t]=n}return se[t]}function Rn(t,e,r){let n,o;if(typeof t=="string"){const s=pe(t);if(!s)return r(void 0,424),He;o=s.send;const a=Bn(t);a&&(n=a.redundancy)}else{const s=ve(t);if(s){n=Ir(s);const a=t.resources?t.resources[0]:"",l=pe(a);l&&(o=l.send)}}return!n||!o?(r(void 0,424),He):n.query(e,o,r)().abort}function Ve(){}function Hn(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,An(t)}))}function Vn(t){const e=[],r=[];return t.forEach(n=>{(n.match(vr)?e:r).push(n)}),{valid:e,invalid:r}}function Pt(t,e,r){function n(){const o=t.pendingIcons;e.forEach(s=>{o&&o.delete(s),t.icons[s]||t.missing.add(s)})}if(r&&typeof r=="object")try{if(!br(t,r).length){n();return}}catch(o){console.error(o)}n(),Hn(t)}function Ye(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function Yn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:r,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const s=t.loadIcon;if(t.loadIcons&&(o.length>1||!s)){Ye(t.loadIcons(o,n,r),f=>{Pt(t,o,f)});return}if(s){o.forEach(f=>{const p=s(f,n,r);Ye(p,h=>{const g=h?{prefix:n,icons:{[f]:h}}:null;Pt(t,[f],g)})});return}const{valid:a,invalid:l}=Vn(o);if(l.length&&Pt(t,l,null),!a.length)return;const c=n.match(vr)?pe(r):null;if(!c){Pt(t,a,null);return}c.prepare(r,n,a).forEach(f=>{Rn(r,f,p=>{Pt(t,f.icons,p)})})}))}const Jn=(t,e)=>{const r=Mn(t,!0,kr()),n=Dn(r);if(!n.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(n.loaded,n.missing,n.pending,Ve)}),()=>{c=!1}}const o=Object.create(null),s=[];let a,l;return n.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===l&&u===a)return;a=u,l=f,s.push(Ft(u,f));const p=o[u]||(o[u]=Object.create(null));p[f]||(p[f]=[])}),n.pending.forEach(c=>{const{provider:u,prefix:f,name:p}=c,h=Ft(u,f),g=h.pendingIcons||(h.pendingIcons=new Set);g.has(p)||(g.add(p),o[u][f].push(p))}),s.forEach(c=>{const u=o[c.provider][c.prefix];u.length&&Yn(c,u)}),e?zn(e,n,s):Ve};function Kn(t,e){const r={...t};for(const n in e){const o=e[n],s=typeof o;n in Sr?(o===null||o&&(s==="string"||s==="number"))&&(r[n]=o):s===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const Gn=/[\s,]+/;function Wn(t,e){e.split(Gn).forEach(r=>{switch(r.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Qn(t,e=0){const r=t.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(t);return isNaN(o)?0:n(o)}else if(r!==t){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-r.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return e}function Xn(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function Zn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function to(t){return"data:image/svg+xml,"+Zn(t)}function eo(t){return'url("'+to(t)+'")'}let Lt;function ro(){try{Lt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Lt=null}}function no(t){return Lt===void 0&&ro(),Lt?Lt.createHTML(t):t}const _r={...jr,inline:!1},oo={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},so={display:"inline-block"},he={backgroundColor:"currentColor"},Fr={backgroundColor:"transparent"},Je={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ke={WebkitMask:he,mask:he,background:Fr};for(const t in Ke){const e=Ke[t];for(const r in Je)e[t+r]=Je[r]}const ao={..._r,inline:!0};function Ge(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const io=(t,e,r)=>{const n=e.inline?ao:_r,o=Kn(n,e),s=e.mode||"svg",a={},l=e.style||{},c={...s==="svg"?oo:{}};if(r){const m=Xt(r,!1,!0);if(m){const b=["iconify"],q=["provider","prefix"];for(const T of q)m[T]&&b.push("iconify--"+m[T]);c.className=b.join(" ")}}for(let m in e){const b=e[m];if(b!==void 0)switch(m){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[m]=(c[m]?c[m]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[m]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&Wn(o,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?o[m]=Qn(b):typeof b=="number"&&(o[m]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:n[m]===void 0&&(c[m]=b)}}const u=vn(t,o),f=u.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){c.style={...a,...l},Object.assign(c,f);let m=0,b=e.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:no(Cn(u.body,b?()=>b+"ID"+m++:"iconifyReact"))},k.createElement("svg",c)}const{body:p,width:h,height:g}=t,v=s==="mask"||(s==="bg"?!1:p.indexOf("currentColor")!==-1),I=Xn(p,{...f,width:h+"",height:g+""});return c.style={...a,"--svg":eo(I),width:Ge(f.width),height:Ge(f.height),...so,...v?he:Fr,...l},k.createElement("span",c)};kr(!0);In("",$n);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!hn(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let r in e){const n="IconifyProviders["+r+"] is invalid.";try{const o=e[r];if(typeof o!="object"||!o||o.resources===void 0)continue;_n(r,o)||console.error(n)}catch{console.error(n)}}}}function Nr(t){const[e,r]=k.useState(!!t.ssr),[n,o]=k.useState({});function s(g){if(g){const v=t.icon;if(typeof v=="object")return{name:"",data:v};const I=Ue(v);if(I)return{name:v,data:I}}return{name:""}}const[a,l]=k.useState(s(!!t.ssr));function c(){const g=n.callback;g&&(g(),o({}))}function u(g){if(JSON.stringify(a)!==JSON.stringify(g))return c(),l(g),!0}function f(){var g;const v=t.icon;if(typeof v=="object"){u({name:"",data:v});return}const I=Ue(v);if(u({name:v,data:I}))if(I===void 0){const m=Jn([v],f);o({callback:m})}else I&&((g=t.onLoad)===null||g===void 0||g.call(t,v))}k.useEffect(()=>(r(!0),c),[]),k.useEffect(()=>{e&&f()},[t.icon,e]);const{name:p,data:h}=a;return h?io({...be,...h},t,p):t.children?t.children:t.fallback?t.fallback:k.createElement("span",{})}const We=k.forwardRef((t,e)=>Nr({...t,_ref:e}));k.forwardRef((t,e)=>Nr({inline:!0,...t,_ref:e}));function co(){const t=()=>window.innerWidth<425?1:window.innerWidth<768?2:4,[e,r]=k.useState(t);return k.useEffect(()=>{const n=()=>r(t());return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const lo=({product:t})=>{const e=gt.useDispatch(),r=co(),[n,o]=k.useState(0),s=()=>{o(c=>c+r>=t.length?0:c+r)},a=()=>{o(c=>c-r<0?t.length-(t.length%r||r):c-r)},l=async c=>{const u=await mr(c);e(ue(u))};return i.jsx("div",{className:"mt-2 overflow-x-hidden",children:i.jsxs("div",{className:"flex items-center justify-center gap-4 relative",children:[(t==null?void 0:t.length)>r&&i.jsx("button",{onClick:a,className:"absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:i.jsx(We,{icon:"mdi:chevron-left",width:"25"})}),i.jsx("div",{className:"flex gap-5 justify-center flex-1 overflow-hidden",children:t.slice(n,n+r).map(c=>{var u,f,p,h;return i.jsxs("div",{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]",onClick:()=>{l(c.product_id??c.productId)},children:[i.jsx("div",{className:"w-full p-2 flex items-center justify-center bg-white",children:i.jsx("img",{src:((u=Le(c)[0])==null?void 0:u.link)||Le(c)[0]||"https://via.placeholder.com/120",alt:c!=null&&c.productName?c.productName:"Product",className:"w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"})}),i.jsxs("div",{className:"text-white w-full p-2 text-[12px] text-center h-[60px]",children:[i.jsxs("div",{className:"relative inline-block group",children:[i.jsx("div",{className:"w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans",children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:De(Ae((f=c==null?void 0:c.name)==null?void 0:f["en-US"]),60)||"Product"}),i.jsx("div",{className:"absolute left-0 top-full mt-1 w-max max-w-[200px] p-2 bg-white shadow-lg text-black text-xs rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100 z-50 pointer-events-auto",style:{position:"absolute",top:"-100%",left:"0",marginBottom:"5px",zIndex:50},children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:De(Ae((p=c==null?void 0:c.name)==null?void 0:p["en-US"]),60)||"Product"})]}),i.jsxs("div",{className:" flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1",children:[i.jsx("p",{children:on(c!=null&&c.price?Number(c==null?void 0:c.price):ze(c).centAmount||0,(h=ze(c))==null?void 0:h.currencyCode)}),i.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate",children:["$",Number(c==null?void 0:c.price).toFixed(2)??5]})]})]})]},c.productId)})}),(t==null?void 0:t.length)>r&&i.jsx("button",{onClick:s,className:"absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:i.jsx(We,{icon:"mdi:chevron-right",width:"25"})})]})})},uo=({chat:t,storeDetails:e})=>i.jsx("div",{className:"bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",children:t.map((r,n)=>i.jsxs("div",{className:"mb-4 p-3 rounded-xl",style:{background:"linear-gradient(109.52deg, #F0EEF5 36.91%, #F4F3EE 100.34%"},children:[i.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",children:sn(r.keyword)||"No keyword"}),i.jsx(lo,{product:r.items,storeDetails:e})]},n))}),Er=async(t,e)=>{const{serverUrl:r,basePath:n}=mt(),o=`${r}`;console.log(`customer_token
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),i=require("react/jsx-runtime"),Yt=require("@apollo/client"),gt=require("react-redux"),ye=require("@reduxjs/toolkit"),Vr=require("@radix-ui/react-popover");require("clsx");require("tailwind-merge");const M=require("axios");require("crypto-js");const Oe=require("@iconify/react"),Q=require("react-toastify");function Yr(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const dr=Yr(Vr),Jr='*,: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-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-\\[1px\\]{padding:1px}.p-\\[5px\\]{padding:5px}.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}}';function Kr(){return k.useEffect(()=>{if(typeof document<"u"){const t=document.createElement("style");return t.textContent=Jr,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[]),null}const Gr={store:{storeCode:"",storeName:"",storeDescription:"",activeCatalogId:0,isDefault:!1,logoDarkBg:"",logoLightBg:"",logoTransparent:"",catalogs:[],themeColor:"",themeContrastColor:"",tanyaThemeColor:"",tanyaThemeColorLight:"",favicon:"",websiteTitle:"",flowId:"",aliasId:"",searchConfigs:{endpoint:"",accessKey:"",secretKey:""},homePageCategories:[],carouselImages:{web:[],mobile:[]},otherImages:{web:[],mobile:[]}}},fr=ye.createSlice({name:"store",initialState:Gr,reducers:{setStore:(t,e)=>{t.store=e.payload}}}),{setStore:Ko}=fr.actions,Wr=fr.reducer,Qr={product:null},pr=ye.createSlice({name:"product",initialState:Qr,reducers:{setProduct:(t,e)=>{t.product=e.payload}}}),{setProduct:ue}=pr.actions,Xr=pr.reducer,Zr=ye.configureStore({reducer:{store:Wr,product:Xr}}),tn=({children:t})=>i.jsx(gt.Provider,{store:Zr,children:t}),It=t=>{const e=new CustomEvent("reactCartUpdated",{detail:{cartUpdated:!0,basketId:t}});window.dispatchEvent(e)};function en({...t}){return i.jsx(dr.Root,{"data-slot":"popover",...t})}function rn({...t}){return i.jsx(dr.Trigger,{"data-slot":"popover-trigger",...t})}const mt=()=>({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"}),hr=async()=>{const t="https://tanya-sfcc-server.vercel.app/";try{const e=await M.post(`${t}api/auth/token-bm-grant?baseUrl=${it()}&siteId=${et()}`);return e.status===200&&e.data.access_token?e.data.access_token:(console.error("Failed to fetch token:",e.data),null)}catch(e){return M.isAxiosError(e)?console.error("Error fetching token:",e.response||e.message):console.error("Unexpected error:",e),null}},gr=async t=>{const e="https://tanya-sfcc-server.vercel.app/";try{const r=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,n=await M.post(`${e}api/auth/token-existing-guest-customer?dwsid=${r}&baseUrl=${it()}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});return n.status===200&&n.data?n.data:null}catch(r){return M.isAxiosError(r)?console.error("Error creating basket:",r.response||r.message):console.error("Unexpected error:",r),null}};async function Qt(){const t=localStorage.getItem("expires_in"),e=localStorage.getItem("access_token"),r=JSON.parse(sessionStorage.getItem("customerData")||"{}").isGuest;if(t&&e&&new Date().getTime()<parseInt(t)&&r===JSON.parse(localStorage.getItem("isGuest")||"false"))return console.log("access token found in local storage"),{access_token:e,expires_in:t};const{serverUrl:n}=mt(),o=JSON.parse(sessionStorage.getItem("customerData")||"{}").dwsid,s=JSON.parse(sessionStorage.getItem("customerData")||"{}").usrRef;try{const a=r?"unregister-auth":"register-auth",l=await M.get(`${n}sc-api/${a}?dwsid=${o}&email=${s}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}&siteId=${et()}`);return localStorage.setItem("access_token",l.data.access_token),localStorage.setItem("expires_in",String(new Date().getTime()+l.data.expires_in*1e3)),localStorage.setItem("isGuest",r.toString()),console.log(l.data),l.data}catch(a){console.log(a)}}const it=()=>sessionStorage.getItem("Host"),et=()=>sessionStorage.getItem("SiteId"),ct=()=>sessionStorage.getItem("pubCfg"),lt=()=>sessionStorage.getItem("envRef"),ut=()=>sessionStorage.getItem("orgRef"),$e=async(t,e)=>{const{serverUrl:r,basePath:n}=mt();try{const o=it();return(await M.get(`${r}${n}/search-sfcc?baseUrl=${o}&query=${t}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}})).data.hits}catch(o){throw console.error("Error fetching search results:",o),o}},mr=async t=>{if(!t)throw new Error("Product ID is required");const{serverUrl:e,basePath:r}=mt(),n=it();console.log("calling access");const{access_token:o}=await Qt();return console.log(o),(await M.get(`${e}${r}/product-sfcc/${t}?baseUrl=${n}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`}})).data},nn=async t=>{if(!t)throw new Error("customerId is required");const e=await hr(),{customer_token:r}=await gr(e),{serverUrl:n,basePath:o}=mt(),a=(await Qt()).access_token;return(await M.get(`${n}${o}/get-interest?baseUrl=${it()}&customerId=${t}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`}})).data},Ae=t=>String(typeof t=="string"?t:t["en-US"]||t),Le=t=>t!=null&&t.image?[t.image]:"variants"in t?t.variants[0].images:t.masterVariant.images.map(e=>e.url),on=(t,e)=>t.toLocaleString("en-US",{style:"currency",currency:e||"USD"}),ze=t=>{var e,r,n;return"variants"in t?{centAmount:(e=t.variants[0])==null?void 0:e.prices.EUR.max,currencyCode:"DOL"}:{centAmount:(r=t.masterVariant)==null?void 0:r.prices[0].value.centAmount,currencyCode:(n=t.masterVariant)==null?void 0:n.prices[0].value.currencyCode}},sn=t=>t.charAt(0).toUpperCase()+t.slice(1),De=(t,e)=>t.length<e?t:t.slice(0,e)+"...",ne=t=>t.split("\\n").map((e,r)=>{const n=e.match(/^(\d+)\.\s(.+)/);return n?`<p key=${r} class="mb-2"><strong>${n[1]}.</strong> ${n[2]}</p>`:e.trim()?`<p key=${r} class="mb-2">${e}</p>`:"<br/>"}).join("");function an(t,e){const r=t.icons,n=t.aliases||Object.create(null),o=Object.create(null);function s(a){if(r[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=n[a]&&n[a].parent,c=l&&s(l);c&&(o[a]=[l].concat(c))}return o[a]}return Object.keys(r).concat(Object.keys(n)).forEach(s),o}const wr=Object.freeze({left:0,top:0,width:16,height:16}),Jt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),be=Object.freeze({...wr,...Jt}),de=Object.freeze({...be,body:"",hidden:!1});function cn(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Me(t,e){const r=cn(t,e);for(const n in de)n in Jt?n in t&&!(n in r)&&(r[n]=Jt[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function ln(t,e,r){const n=t.icons,o=t.aliases||Object.create(null);let s={};function a(l){s=Me(n[l]||o[l],s)}return a(e),r.forEach(a),Me(t,s)}function xr(t,e){const r=[];if(typeof t!="object"||typeof t.icons!="object")return r;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),r.push(o)});const n=an(t);for(const o in n){const s=n[o];s&&(e(o,ln(t,o,s)),r.push(o))}return r}const un={provider:"",aliases:{},not_found:{},...wr};function oe(t,e){for(const r in e)if(r in t&&typeof t[r]!=typeof e[r])return!1;return!0}function yr(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!oe(t,un))return null;const r=e.icons;for(const o in r){const s=r[o];if(!o||typeof s.body!="string"||!oe(s,de))return null}const n=e.aliases||Object.create(null);for(const o in n){const s=n[o],a=s.parent;if(!o||typeof a!="string"||!r[a]&&!n[a]||!oe(s,de))return null}return e}const qe=Object.create(null);function dn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function Ft(t,e){const r=qe[t]||(qe[t]=Object.create(null));return r[e]||(r[e]=dn(t,e))}function br(t,e){return yr(e)?xr(e,(r,n)=>{n?t.icons[r]=n:t.missing.add(r)}):[]}function fn(t,e,r){try{if(typeof r.body=="string")return t.icons[e]={...r},!0}catch{}return!1}const vr=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xt=(t,e,r,n="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),c=o.pop(),u={provider:o.length>0?o[0]:n,prefix:c,name:l};return e&&!Rt(u)?null:u}const s=o[0],a=s.split("-");if(a.length>1){const l={provider:n,prefix:a.shift(),name:a.join("-")};return e&&!Rt(l)?null:l}if(r&&n===""){const l={provider:n,prefix:"",name:s};return e&&!Rt(l,r)?null:l}return null},Rt=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;let zt=!1;function kr(t){return typeof t=="boolean"&&(zt=t),zt}function Ue(t){const e=typeof t=="string"?Xt(t,!0,zt):t;if(e){const r=Ft(e.provider,e.prefix),n=e.name;return r.icons[n]||(r.missing.has(n)?null:void 0)}}function pn(t,e){const r=Xt(t,!0,zt);if(!r)return!1;const n=Ft(r.provider,r.prefix);return e?fn(n,r.name,e):(n.missing.add(r.name),!0)}function hn(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),zt&&!e&&!t.prefix){let o=!1;return yr(t)&&(t.prefix="",xr(t,(s,a)=>{pn(s,a)&&(o=!0)})),o}const r=t.prefix;if(!Rt({prefix:r,name:"a"}))return!1;const n=Ft(e,r);return!!br(n,t)}const Sr=Object.freeze({width:null,height:null}),jr=Object.freeze({...Sr,...Jt}),gn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Be(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(gn);if(n===null||!n.length)return t;const o=[];let s=n.shift(),a=mn.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?o.push(s):o.push(Math.ceil(l*e*r)/r)}else o.push(s);if(s=n.shift(),s===void 0)return o.join("");a=!a}}function wn(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const o=t.indexOf(">",n),s=t.indexOf("</"+e);if(o===-1||s===-1)break;const a=t.indexOf(">",s);if(a===-1)break;r+=t.slice(o+1,s).trim(),t=t.slice(0,n).trim()+t.slice(a+1)}return{defs:r,content:t}}function xn(t,e){return t?"<defs>"+t+"</defs>"+e:e}function yn(t,e,r){const n=wn(t);return xn(n.defs,e+n.content+r)}const bn=t=>t==="unset"||t==="undefined"||t==="none";function vn(t,e){const r={...be,...t},n={...jr,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let s=r.body;[r,n].forEach(I=>{const m=[],b=I.hFlip,q=I.vFlip;let T=I.rotate;b?q?T+=2:(m.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),m.push("scale(-1 1)"),o.top=o.left=0):q&&(m.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),m.push("scale(1 -1)"),o.top=o.left=0);let $;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:$=o.height/2+o.top,m.unshift("rotate(90 "+$.toString()+" "+$.toString()+")");break;case 2:m.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:$=o.width/2+o.left,m.unshift("rotate(-90 "+$.toString()+" "+$.toString()+")");break}T%2===1&&(o.left!==o.top&&($=o.left,o.left=o.top,o.top=$),o.width!==o.height&&($=o.width,o.width=o.height,o.height=$)),m.length&&(s=yn(s,'<g transform="'+m.join(" ")+'">',"</g>"))});const a=n.width,l=n.height,c=o.width,u=o.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?u:l,f=Be(p,c/u)):(f=a==="auto"?c:a,p=l===null?Be(f,u/c):l==="auto"?u:l);const h={},g=(I,m)=>{bn(m)||(h[I]=m.toString())};g("width",f),g("height",p);const v=[o.left,o.top,c,u];return h.viewBox=v.join(" "),{attributes:h,viewBox:v,body:s}}const kn=/\sid="(\S+)"/g,Sn="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let jn=0;function Cn(t,e=Sn){const r=[];let n;for(;n=kn.exec(t);)r.push(n[1]);if(!r.length)return t;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(s=>{const a=typeof e=="function"?e(s):e+(jn++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),t=t.replace(new RegExp(o,"g"),""),t}const fe=Object.create(null);function In(t,e){fe[t]=e}function pe(t){return fe[t]||fe[""]}function ve(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ke=Object.create(null),Tt=["https://api.simplesvg.com","https://api.unisvg.com"],Ht=[];for(;Tt.length>0;)Tt.length===1||Math.random()>.5?Ht.push(Tt.shift()):Ht.push(Tt.pop());ke[""]=ve({resources:["https://api.iconify.design"].concat(Ht)});function _n(t,e){const r=ve(e);return r===null?!1:(ke[t]=r,!0)}function Se(t){return ke[t]}const Fn=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let Re=Fn();function Nn(t,e){const r=Se(t);if(!r)return 0;let n;if(!r.maxURL)n=0;else{let o=0;r.resources.forEach(a=>{o=Math.max(o,a.length)});const s=e+".json?icons=";n=r.maxURL-o-r.path.length-s.length}return n}function En(t){return t===404}const Tn=(t,e,r)=>{const n=[],o=Nn(t,e),s="icons";let a={type:s,provider:t,prefix:e,icons:[]},l=0;return r.forEach((c,u)=>{l+=c.length+1,l>=o&&u>0&&(n.push(a),a={type:s,provider:t,prefix:e,icons:[]},l=c.length),a.icons.push(c)}),n.push(a),n};function Pn(t){if(typeof t=="string"){const e=Se(t);if(e)return e.path}return"/"}const On=(t,e,r)=>{if(!Re){r("abort",424);return}let n=Pn(e.provider);switch(e.type){case"icons":{const s=e.prefix,l=e.icons.join(","),c=new URLSearchParams({icons:l});n+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:r("abort",400);return}let o=503;Re(t+n).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{r(En(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?r("abort",s):r("next",o)});return}setTimeout(()=>{r("success",s)})}).catch(()=>{r("next",o)})},$n={prepare:Tn,send:On};function Cr(t,e){t.forEach(r=>{const n=r.loaderCallbacks;n&&(r.loaderCallbacks=n.filter(o=>o.id!==e))})}function An(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let r=!1;const n=t.provider,o=t.prefix;e.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==o)return!0;const u=c.name;if(t.icons[u])a.loaded.push({provider:n,prefix:o,name:u});else if(t.missing.has(u))a.missing.push({provider:n,prefix:o,name:u});else return r=!0,!0;return!1}),a.pending.length!==l&&(r||Cr([t],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let Ln=0;function zn(t,e,r){const n=Ln++,o=Cr.bind(null,r,n);if(!e.pending.length)return o;const s={id:n,icons:e,callback:t,abort:o};return r.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function Dn(t){const e={loaded:[],missing:[],pending:[]},r=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return t.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,a=o.prefix,l=o.name,c=r[s]||(r[s]=Object.create(null)),u=c[a]||(c[a]=Ft(s,a));let f;l in u.icons?f=e.loaded:a===""||u.missing.has(l)?f=e.missing:f=e.pending;const p={provider:s,prefix:a,name:l};f.push(p)}),e}function Mn(t,e=!0,r=!1){const n=[];return t.forEach(o=>{const s=typeof o=="string"?Xt(o,e,r):o;s&&n.push(s)}),n}const qn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Un(t,e,r,n){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let S=t.resources.slice(0);for(a=[];S.length>1;){const L=Math.floor(Math.random()*S.length);a.push(S[L]),S=S.slice(0,L).concat(S.slice(L+1))}a=a.concat(S)}else a=t.resources.slice(s).concat(t.resources.slice(0,s));const l=Date.now();let c="pending",u=0,f,p=null,h=[],g=[];typeof n=="function"&&g.push(n);function v(){p&&(clearTimeout(p),p=null)}function I(){c==="pending"&&(c="aborted"),v(),h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function m(S,L){L&&(g=[]),typeof S=="function"&&g.push(S)}function b(){return{startTime:l,payload:e,status:c,queriesSent:u,queriesPending:h.length,subscribe:m,abort:I}}function q(){c="failed",g.forEach(S=>{S(void 0,f)})}function T(){h.forEach(S=>{S.status==="pending"&&(S.status="aborted")}),h=[]}function $(S,L,R){const H=L!=="success";switch(h=h.filter(P=>P!==S),c){case"pending":break;case"failed":if(H||!t.dataAfterTimeout)return;break;default:return}if(L==="abort"){f=R,q();return}if(H){f=R,h.length||(a.length?X():q());return}if(v(),T(),!t.random){const P=t.resources.indexOf(S.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",g.forEach(P=>{P(R)})}function X(){if(c!=="pending")return;v();const S=a.shift();if(S===void 0){if(h.length){p=setTimeout(()=>{v(),c==="pending"&&(T(),q())},t.timeout);return}q();return}const L={status:"pending",resource:S,callback:(R,H)=>{$(L,R,H)}};h.push(L),u++,p=setTimeout(X,t.rotate),r(S,e,L.callback)}return setTimeout(X),b}function Ir(t){const e={...qn,...t};let r=[];function n(){r=r.filter(l=>l().status==="pending")}function o(l,c,u){const f=Un(e,l,c,(p,h)=>{n(),u&&u(p,h)});return r.push(f),f}function s(l){return r.find(c=>l(c))||null}return{query:o,find:s,setIndex:l=>{e.index=l},getIndex:()=>e.index,cleanup:n}}function He(){}const se=Object.create(null);function Bn(t){if(!se[t]){const e=Se(t);if(!e)return;const r=Ir(e),n={config:e,redundancy:r};se[t]=n}return se[t]}function Rn(t,e,r){let n,o;if(typeof t=="string"){const s=pe(t);if(!s)return r(void 0,424),He;o=s.send;const a=Bn(t);a&&(n=a.redundancy)}else{const s=ve(t);if(s){n=Ir(s);const a=t.resources?t.resources[0]:"",l=pe(a);l&&(o=l.send)}}return!n||!o?(r(void 0,424),He):n.query(e,o,r)().abort}function Ve(){}function Hn(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,An(t)}))}function Vn(t){const e=[],r=[];return t.forEach(n=>{(n.match(vr)?e:r).push(n)}),{valid:e,invalid:r}}function Pt(t,e,r){function n(){const o=t.pendingIcons;e.forEach(s=>{o&&o.delete(s),t.icons[s]||t.missing.add(s)})}if(r&&typeof r=="object")try{if(!br(t,r).length){n();return}}catch(o){console.error(o)}n(),Hn(t)}function Ye(t,e){t instanceof Promise?t.then(r=>{e(r)}).catch(()=>{e(null)}):e(t)}function Yn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:r,prefix:n}=t,o=t.iconsToLoad;if(delete t.iconsToLoad,!o||!o.length)return;const s=t.loadIcon;if(t.loadIcons&&(o.length>1||!s)){Ye(t.loadIcons(o,n,r),f=>{Pt(t,o,f)});return}if(s){o.forEach(f=>{const p=s(f,n,r);Ye(p,h=>{const g=h?{prefix:n,icons:{[f]:h}}:null;Pt(t,[f],g)})});return}const{valid:a,invalid:l}=Vn(o);if(l.length&&Pt(t,l,null),!a.length)return;const c=n.match(vr)?pe(r):null;if(!c){Pt(t,a,null);return}c.prepare(r,n,a).forEach(f=>{Rn(r,f,p=>{Pt(t,f.icons,p)})})}))}const Jn=(t,e)=>{const r=Mn(t,!0,kr()),n=Dn(r);if(!n.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(n.loaded,n.missing,n.pending,Ve)}),()=>{c=!1}}const o=Object.create(null),s=[];let a,l;return n.pending.forEach(c=>{const{provider:u,prefix:f}=c;if(f===l&&u===a)return;a=u,l=f,s.push(Ft(u,f));const p=o[u]||(o[u]=Object.create(null));p[f]||(p[f]=[])}),n.pending.forEach(c=>{const{provider:u,prefix:f,name:p}=c,h=Ft(u,f),g=h.pendingIcons||(h.pendingIcons=new Set);g.has(p)||(g.add(p),o[u][f].push(p))}),s.forEach(c=>{const u=o[c.provider][c.prefix];u.length&&Yn(c,u)}),e?zn(e,n,s):Ve};function Kn(t,e){const r={...t};for(const n in e){const o=e[n],s=typeof o;n in Sr?(o===null||o&&(s==="string"||s==="number"))&&(r[n]=o):s===typeof r[n]&&(r[n]=n==="rotate"?o%4:o)}return r}const Gn=/[\s,]+/;function Wn(t,e){e.split(Gn).forEach(r=>{switch(r.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Qn(t,e=0){const r=t.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(r===""){const o=parseInt(t);return isNaN(o)?0:n(o)}else if(r!==t){let o=0;switch(r){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-r.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return e}function Xn(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function Zn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function to(t){return"data:image/svg+xml,"+Zn(t)}function eo(t){return'url("'+to(t)+'")'}let Lt;function ro(){try{Lt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Lt=null}}function no(t){return Lt===void 0&&ro(),Lt?Lt.createHTML(t):t}const _r={...jr,inline:!1},oo={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},so={display:"inline-block"},he={backgroundColor:"currentColor"},Fr={backgroundColor:"transparent"},Je={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Ke={WebkitMask:he,mask:he,background:Fr};for(const t in Ke){const e=Ke[t];for(const r in Je)e[t+r]=Je[r]}const ao={..._r,inline:!0};function Ge(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const io=(t,e,r)=>{const n=e.inline?ao:_r,o=Kn(n,e),s=e.mode||"svg",a={},l=e.style||{},c={...s==="svg"?oo:{}};if(r){const m=Xt(r,!1,!0);if(m){const b=["iconify"],q=["provider","prefix"];for(const T of q)m[T]&&b.push("iconify--"+m[T]);c.className=b.join(" ")}}for(let m in e){const b=e[m];if(b!==void 0)switch(m){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":c.ref=b;break;case"className":c[m]=(c[m]?c[m]+" ":"")+b;break;case"inline":case"hFlip":case"vFlip":o[m]=b===!0||b==="true"||b===1;break;case"flip":typeof b=="string"&&Wn(o,b);break;case"color":a.color=b;break;case"rotate":typeof b=="string"?o[m]=Qn(b):typeof b=="number"&&(o[m]=b);break;case"ariaHidden":case"aria-hidden":b!==!0&&b!=="true"&&delete c["aria-hidden"];break;default:n[m]===void 0&&(c[m]=b)}}const u=vn(t,o),f=u.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){c.style={...a,...l},Object.assign(c,f);let m=0,b=e.id;return typeof b=="string"&&(b=b.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:no(Cn(u.body,b?()=>b+"ID"+m++:"iconifyReact"))},k.createElement("svg",c)}const{body:p,width:h,height:g}=t,v=s==="mask"||(s==="bg"?!1:p.indexOf("currentColor")!==-1),I=Xn(p,{...f,width:h+"",height:g+""});return c.style={...a,"--svg":eo(I),width:Ge(f.width),height:Ge(f.height),...so,...v?he:Fr,...l},k.createElement("span",c)};kr(!0);In("",$n);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!hn(n))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let r in e){const n="IconifyProviders["+r+"] is invalid.";try{const o=e[r];if(typeof o!="object"||!o||o.resources===void 0)continue;_n(r,o)||console.error(n)}catch{console.error(n)}}}}function Nr(t){const[e,r]=k.useState(!!t.ssr),[n,o]=k.useState({});function s(g){if(g){const v=t.icon;if(typeof v=="object")return{name:"",data:v};const I=Ue(v);if(I)return{name:v,data:I}}return{name:""}}const[a,l]=k.useState(s(!!t.ssr));function c(){const g=n.callback;g&&(g(),o({}))}function u(g){if(JSON.stringify(a)!==JSON.stringify(g))return c(),l(g),!0}function f(){var g;const v=t.icon;if(typeof v=="object"){u({name:"",data:v});return}const I=Ue(v);if(u({name:v,data:I}))if(I===void 0){const m=Jn([v],f);o({callback:m})}else I&&((g=t.onLoad)===null||g===void 0||g.call(t,v))}k.useEffect(()=>(r(!0),c),[]),k.useEffect(()=>{e&&f()},[t.icon,e]);const{name:p,data:h}=a;return h?io({...be,...h},t,p):t.children?t.children:t.fallback?t.fallback:k.createElement("span",{})}const We=k.forwardRef((t,e)=>Nr({...t,_ref:e}));k.forwardRef((t,e)=>Nr({inline:!0,...t,_ref:e}));function co(){const t=()=>window.innerWidth<425?1:window.innerWidth<768?2:4,[e,r]=k.useState(t);return k.useEffect(()=>{const n=()=>r(t());return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const lo=({product:t})=>{const e=gt.useDispatch(),r=co(),[n,o]=k.useState(0),s=()=>{o(c=>c+r>=t.length?0:c+r)},a=()=>{o(c=>c-r<0?t.length-(t.length%r||r):c-r)},l=async c=>{const u=await mr(c);e(ue(u))};return i.jsx("div",{className:"mt-2 overflow-x-hidden",children:i.jsxs("div",{className:"flex items-center justify-center gap-4 relative",children:[(t==null?void 0:t.length)>r&&i.jsx("button",{onClick:a,className:"absolute z-50 left-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:i.jsx(We,{icon:"mdi:chevron-left",width:"25"})}),i.jsx("div",{className:"flex gap-5 justify-center flex-1 overflow-hidden",children:t.slice(n,n+r).map(c=>{var u,f,p,h;return i.jsxs("div",{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]",onClick:()=>{l(c.product_id??c.productId)},children:[i.jsx("div",{className:"w-full p-2 flex items-center justify-center bg-white",children:i.jsx("img",{src:((u=Le(c)[0])==null?void 0:u.link)||Le(c)[0]||"https://via.placeholder.com/120",alt:c!=null&&c.productName?c.productName:"Product",className:"w-28 h-28 rounded-[10px] transition-transform duration-300 hover:scale-125 object-cover"})}),i.jsxs("div",{className:"text-white w-full p-2 text-[12px] text-center h-[60px]",children:[i.jsxs("div",{className:"relative inline-block group",children:[i.jsx("div",{className:"w-full line-clamp-1 overflow-hidden text-ellipsis text-[#000000] font-medium font-nunitoSans",children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:De(Ae((f=c==null?void 0:c.name)==null?void 0:f["en-US"]),60)||"Product"}),i.jsx("div",{className:"absolute left-0 top-full mt-1 w-max max-w-[200px] p-2 bg-white shadow-lg text-black text-xs rounded opacity-0 transition-opacity duration-300 group-hover:opacity-100 z-50 pointer-events-auto",style:{position:"absolute",top:"-100%",left:"0",marginBottom:"5px",zIndex:50},children:c!=null&&c.productName?c.productName:c!=null&&c.product_name?c.product_name:De(Ae((p=c==null?void 0:c.name)==null?void 0:p["en-US"]),60)||"Product"})]}),i.jsxs("div",{className:" flex text-center items-center gap-2 text-[14px] text-[#14121F] font-bold font-nunitoSans text-base mb-1",children:[i.jsx("p",{children:on(c!=null&&c.price?Number(c==null?void 0:c.price):ze(c).centAmount||0,(h=ze(c))==null?void 0:h.currencyCode)}),i.jsxs("p",{className:"text-[#14121F] font-normal line-through text-sm font-nunitoSans truncate",children:["$",Number(c==null?void 0:c.price).toFixed(2)??5]})]})]})]},c.productId)})}),(t==null?void 0:t.length)>r&&i.jsx("button",{onClick:s,className:"absolute z-50 right-0 text-[#000000] bg-[#ffffff] rounded-full p-2 flex items-center h-fit",children:i.jsx(We,{icon:"mdi:chevron-right",width:"25"})})]})})},uo=({chat:t,storeDetails:e})=>i.jsx("div",{className:"bg-[#FFFFFF] px-7 py-4 rounded-r-xl rounded-bl-2xl w-full",children:t.map((r,n)=>i.jsxs("div",{className:"mb-4 p-3 rounded-xl",style:{background:"linear-gradient(109.52deg, #F0EEF5 36.91%, #F4F3EE 100.34%"},children:[i.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] p-2 w-fit rounded-[20px]",children:sn(r.keyword)||"No keyword"}),i.jsx(lo,{product:r.items,storeDetails:e})]},n))}),Er=async(t,e)=>{const{serverUrl:r,basePath:n}=mt(),o=`${r}`;console.log(`customer_token
2
2
  `,t);try{return(await M.post(`${o}${n}/basket/create?baseUrl=${it()}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,e,{headers:{"Content-Type":"application/json",Authorization:t}})).data}catch(s){return M.isAxiosError(s)?console.error("Error creating basket:",s.response||s.message):console.error("Unexpected error:",s),null}},Kt=async(t,e,r)=>{const{serverUrl:n,basePath:o}=mt(),s=`${n}`;try{const a=await M.post(`${s}${o}/basket/add-product/${t}?baseUrl=${it()}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,e,{headers:{"Content-Type":"application/json",Authorization:r}});return a.status===200&&a.data?a.data:null}catch(a){return M.isAxiosError(a)?console.error("Error adding products to basket:",a.response||a.message):console.error("Unexpected error:",a),null}},Tr=async({basketId:t,customer_token:e})=>{var s;const{serverUrl:r,basePath:n}=mt(),o=`${r}`;try{const a=await M.get(`${o}${n}/basket/${t}?baseUrl=${it()}&siteId=${et()}&pubCfg=${ct()}&envRef=${lt()}&orgRef=${ut()}`,{headers:{"Content-Type":"application/json",Authorization:e}});return{status:a.status,data:a.data}}catch(a){return M.isAxiosError(a)?{status:(s=a.response)==null?void 0:s.status,data:null}:{status:null,data:null}}},Qe="sfcc_basket_id",Xe="sfcc_customer_token",Dt="sfcc_token_expiry",fo=300*1e3,Ot="1.0.0";const _t=t=>{try{t?localStorage.setItem(Qe,t):localStorage.removeItem(Qe)}catch(e){console.error("Error saving basket ID to storage:",e)}},Gt=t=>{try{if(t){localStorage.setItem(Xe,t);const e=Date.now()+fo;localStorage.setItem(Dt,e.toString())}else localStorage.removeItem(Xe)}catch(e){console.error("Error storing token:",e)}},Ze=300,po=()=>{var l,c,u,f,p,h;const t=gt.useDispatch(),e=gt.useSelector(g=>g.product.product),r=gt.useSelector(g=>g.store.store),[n,o]=k.useState(!!e);if(k.useEffect(()=>{o(!!e)},[e]),!e)return null;const s=async()=>{var g,v,I,m,b,q,T,$,X,S,L,R,H,P,wt,E;console.log(e,"the prod");try{if(!((v=(g=e==null?void 0:e.variants)==null?void 0:g[0])!=null&&v.product_id)&&!(e.type.item||e.type.bundle)&&!((m=(I=e==null?void 0:e.variants)==null?void 0:I[0])!=null&&m.productId)){Q.toast.error("Variants not available",{position:"bottom-right",autoClose:1e3}),console.error("No product variant found");return}const O=[{product_id:((b=e.variants)==null?void 0:b[0].product_id)||((q=e.variants)==null?void 0:q[0].productId)||(e==null?void 0:e.id),quantity:1}];console.log(O,"the product data");const Et=JSON.parse(sessionStorage.getItem("customerData")||"{}"),dt=Et==null?void 0:Et.basketId,Zt=!1,rt=localStorage.getItem(Dt),ft=Date.now();if(!Zt||!rt||ft>=parseInt(rt)){let V="";{const xt=await Qt();console.log("token from auth data"),V="Bearer "+xt.access_token}if(!V){console.error("Failed to get customer_token");return}const te=ft+300*1e3;if(Gt(V),localStorage.setItem(Dt,te.toString()),dt){const xt=await Tr({basketId:dt,customer_token:V});if(console.log(dt,"basket id from customer"),xt.status===200&&xt){const nt=await Kt(dt,O,V);(((T=nt==null?void 0:nt.product_items)==null?void 0:T.length)>0||(($=nt==null?void 0:nt.productItems)==null?void 0:$.length)>0)&&(Q.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),It(dt));return}}const ee={productItems:[{productId:((X=e.variants)==null?void 0:X[0].product_id)||((S=e.variants)==null?void 0:S[0].productId)||(e==null?void 0:e.id),quantity:1}]};console.log("before create basket");const x=await Er(V,ee);if(console.log(x,x==null?void 0:x.basket_id,x==null?void 0:x.basketId,"the basket response"),!(x!=null&&x.basket_id)&&!(x!=null&&x.basketId)){console.error("Failed to create basket");return}console.log("setting stored id",(x==null?void 0:x.basket_id)||(x==null?void 0:x.basketId)),_t((x==null?void 0:x.basket_id)||(x==null?void 0:x.basketId)),console.log("adding product to basket");const Y=await Kt((x==null?void 0:x.basket_id)||(x==null?void 0:x.basketId),O,V);console.log("object added to basket"),(((L=Y==null?void 0:Y.product_items)==null?void 0:L.length)>0||((R=Y==null?void 0:Y.productItems)==null?void 0:R.length)>0)&&Q.toast.success("Added to cart",{position:"bottom-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0}),It(x.basket_id||(x==null?void 0:x.basketId))}}catch(O){console.error("Error adding to cart:",O),Q.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}),((H=O==null?void 0:O.response)==null?void 0:H.status)===404||((P=O==null?void 0:O.response)==null?void 0:P.status)===401?(((wt=O==null?void 0:O.response)==null?void 0:wt.status)===404&&_t(null),((E=O==null?void 0:O.response)==null?void 0:E.status)===401&&(_t(null),Gt(null))):(console.error("Failed to add product to basket:",O.message),Q.toast.error("Failed to add product to cart",{position:"bottom-right",autoClose:3e3}))}finally{It()}},a=()=>{e&&(window.location.href=e.c_pdpUrl)};return console.log(e,"the prod"),i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>{o(!1),setTimeout(()=>t(ue(null)),Ze)}}),i.jsxs("div",{className:`
3
3
  flex flex-col gap-2 items-center h-[90vh] absolute right-0 bottom-0 z-50 w-full md:w-1/2 md:h-[100vh] lg:w-1/2 lg:h-[100vh] shadow-xl p-2 border-l-2 bg-white border-gray-200 overflow-y-scroll
4
4
  transition-all duration-300