tanya-chatbot 0.8.5 → 0.8.7

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.
@@ -14,7 +14,7 @@
14
14
 
15
15
  `,style:{background:"linear-gradient(170.1deg, #FFFFFF 60.03%, #E3DEEF 99.59%)"},children:[n.jsxs("div",{className:"flex justify-between p-3 bg-[#FFFFFF] border border-b-1 border-[#E5E5E5] ",children:[n.jsx("div",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsxs("div",{className:"flex gap-2 w-28 h-12 text-center items-center p-2 border rounded-l-[20px] rounded-tr-[20px]",style:{background:"linear-gradient(265.62deg, #6851C6 5.24%, #8668FF 98.49%)"},children:[n.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("path",{d:"M15 4.48438V0.5C15 0.5 8.94395 1.4375 6.78127 4.25C4.61859 7.0625 5.33095 15.5 5.33095 15.5H9.19857C9.19857 15.5 8.72793 7.76562 10.1654 6.125C11.6029 4.48438 15 4.48438 15 4.48438Z",fill:"white"}),n.jsx("path",{d:"M0 0.5H6.28488V4.25H0V0.5Z",fill:"white"})]}),n.jsx("p",{className:"text-[#FFFFFF] font-nunitoSans font-semibold",children:"TANYA"})]}),n.jsxs("p",{className:"text-[#5B5B5B] font-nunitoSans font-semibold",style:{fontStyle:"italic"},children:[" ","Your AI shopping assistant !"," "]})]})}),n.jsx("div",{style:{display:"flex",alignItems:"center",gap:"1.25rem",margin:"0.75rem"},children:n.jsx("button",{onClick:()=>y(!1),children:n.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[n.jsxs("g",{clipPath:"url(#clip0_501_6036)",children:[n.jsx("path",{d:"M18 6.5L6 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M6 6.5L18 18.5",stroke:"#555555",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),n.jsx("defs",{children:n.jsx("clipPath",{id:"clip0_501_6036",children:n.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 0.5)"})})})]})})})]}),n.jsxs("div",{className:"flex h-full md:flex-row lg:flex-row",children:[n.jsxs("div",{className:`flex flex-col h-full ${ue?"lg:w-2/3 w-full":"w-full"}`,children:[n.jsxs("div",{ref:q,className:"overflow-y-auto pr-5 pb-2 space-y-4 hide-scrollbar flex-grow mb-24",children:[(O==null?void 0:O.whomRequired)&&n.jsxs("div",{className:"mx-3 p-3 rounded-2xl bg-[#FFFFFF]",children:[n.jsx("div",{className:"flex gap-2 bg-[#FFFFFF]",children:n.jsx("p",{className:"font-bold font-nunitoSans text-[#494949]",children:"Is this for you or someone else?"})}),n.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:o.map(m=>n.jsx("button",{onClick:()=>He(m),className:"px-2 py-2 font-semibold text-xs text-[#18181B] bg-[#F3F3F3] rounded-2xl",style:{backgroundColor:ye===s[m]?"#FFFFFF":"#F3F3F3",borderColor:ye===s[m]?"#BBB3DD":""},children:m},m))})]}),be.map((m,z)=>{var P,R;return n.jsxs("div",{children:[n.jsx("div",{className:"flex justify-end",children:n.jsx("p",{className:"text-sm font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]",children:m.query})}),m.response&&m.response.includes("Thinking")?n.jsx("div",{children:n.jsx("div",{className:"font-nunitoSans animate-pulse font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",dangerouslySetInnerHTML:{__html:rr(m.response)}})}):n.jsx("div",{children:n.jsx("div",{className:"font-nunitoSans font-bold text-sm text-[#494949] bg-[#FFFFFF] px-7 py-1 rounded-r-xl rounded-bl-2xl w-full",dangerouslySetInnerHTML:{__html:rr(m.response)}})}),Ce&&!m.response.includes("Thinking")&&((P=m.products)==null?void 0:P.length)==0&&n.jsx("div",{children:n.jsx("p",{className:"text-sm animate-pulse font-nunitoSans font-bold text-[#000000] bg-[#E2DBFF] border border-[#C9C2DE] rounded-l-xl p-2 m-3 mb-4 rounded-br-xl max-w-[75%]",children:"Finding best products for you"})}),(m==null?void 0:m.products)&&((R=m==null?void 0:m.products)==null?void 0:R.length)>0&&n.jsx(Ko,{chat:m.products,storeDetails:O}),(m==null?void 0:m.potentialQuestions.length)>0&&n.jsxs("div",{className:"my-2 px-4 text-sm text-gray-700",children:[n.jsx("p",{className:"font-nunitoSans font-bold text-sm text-[#494949]",style:{color:O.themeDarkColor},children:"Why not explore these inquiries..."}),m.potentialQuestions.split(",").map((U,E)=>n.jsx("button",{className:`cursor-pointer font-nunitoSans font-semibold text-[#232323] border bg-[#804C9E0D] border-${O.themeDarkColor} m-1 rounded-xl px-2 py-1`,onClick:()=>ge(U),style:{backgroundColor:O.tanyaThemeColorLight},children:U},E))]}),(m==null?void 0:m.secondaryLoading)&&n.jsx("div",{className:"mt-3 mb-4 px-4",children:n.jsxs("div",{className:"tanya-surprise-wrapper bg-indigo-300 text-sm px-7 py-4 rounded-r-xl rounded-bl-2xl w-full relative overflow-hidden",style:{margin:"0.75rem"},children:[n.jsxs("div",{className:"flex gap-1",children:[n.jsx("div",{className:"tanya-sparkle tanya-sparkle-1",children:"✨"}),n.jsx("div",{className:"tanya-sparkle tanya-sparkle-2",children:"✨"}),n.jsx("div",{className:"tanya-sparkle tanya-sparkle-3",children:"✨"})]}),n.jsx("div",{className:"tanya-shimmer"}),n.jsx("p",{className:"font-semibold tanya-pulse",style:{color:O.themeDarkColor},children:"I’ve found a special surprise crafted just for you… hang on a sec!"}),n.jsx("p",{className:"tanya-dots mt-1",style:{color:O.themeDarkColor},children:"• • •"})]})}),(m==null?void 0:m.secondaryResponse)&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"mt-3 mb-8 px-4 bg-indigo-300 rounded-tr-[5px]",children:[n.jsx("div",{className:"text-sm text-[#232323] bg-[#FFFFFF] px-7 py-4 rounded-br-xl rounded-bl-2xl w-full",style:{backgroundColor:O.tanyaThemeColorLight},dangerouslySetInnerHTML:{__html:rr(m.secondaryResponse)}}),m.productSnapshot&&n.jsx("div",{className:"mt-4 w-full",children:n.jsxs("div",{className:"flex gap-4 items-stretch rounded-2xl p-4",style:{backgroundColor:O.tanyaThemeColorLight},children:[n.jsx("div",{className:"flex-shrink-0 rounded-xl overflow-hidden border",style:{width:112,height:112,borderColor:"#eee"},children:m.productSnapshot.image?n.jsx("img",{src:m.productSnapshot.image,alt:m.productSnapshot.name,className:"w-full h-full object-cover"}):n.jsx("div",{className:"w-full h-full flex items-center justify-center text-xs text-gray-500",children:"No Image"})}),n.jsxs("div",{className:"flex flex-col flex-1 justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"font-semibold text-[15px] leading-snug",children:m.productSnapshot.name}),n.jsx("p",{className:"mt-1 text-[14px] font-medium",children:m.productSnapshot.price!=null?new Intl.NumberFormat(void 0,{style:"currency",currency:(O==null?void 0:O.currency)||"USD"}).format(m.productSnapshot.price):""}),m.productSnapshot.points>0&&n.jsxs("p",{className:"mt-1 text-xs opacity-80",children:["You will earn"," ",n.jsxs("strong",{children:[m.productSnapshot.points," ","points"]})]})]}),n.jsxs("div",{className:"mt-3 flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center border rounded-full overflow-hidden",children:[n.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>pe(U=>U.map((E,W)=>W===z&&E.productSnapshot?{...E,productSnapshot:{...E.productSnapshot,quantity:Math.max(1,E.productSnapshot.quantity-1)}}:E)),style:{background:"transparent",color:O.themeDarkColor},children:"−"}),n.jsx("div",{className:"px-3 py-1 text-sm select-none",children:m.productSnapshot.quantity}),n.jsx("button",{className:"px-3 py-1 text-sm",onClick:()=>pe(U=>U.map((E,W)=>W===z&&E.productSnapshot?{...E,productSnapshot:{...E.productSnapshot,quantity:E.productSnapshot.quantity+1}}:E)),style:{background:"transparent",color:O.themeDarkColor},children:"+"})]}),n.jsx("button",{onClick:()=>{Zt(_e(m.productSnapshot),m.productSnapshot.quantity)},disabled:C,className:"px-4 py-2 rounded-full font-medium",style:{background:O.tanyaThemeColor,color:(O==null?void 0:O.tanyaThemeContrastColor)||"#fff",opacity:C?.8:1},children:C?"Adding...":"Add to cart"})]})]})]})})]})}),n.jsx("div",{className:"mb-20"})]},z)})]}),n.jsx("div",{className:"flex flex-col gap-2 sticky bottom-0 left-0 right-0 bg-[#E3DEEF] z-50 px-4 py-2",children:n.jsx("div",{className:"p-[1px] rounded-xl",style:{background:"linear-gradient(180deg, #B09FFF 0%, #8D79F6 100%)"},children:n.jsxs("div",{className:"flex items-center bg-[#FFFFFF] flex-1 rounded-xl px-2 py-1",children:[n.jsx("input",{className:"flex-1 bg-[#FFFFFF] text-[#232323] outline-none border-none px-2 py-2 text-sm",placeholder:"How can I help you...",value:J,autoFocus:!0,onChange:m=>de(m.target.value),onKeyDown:m=>{m.key==="Enter"&&!M&&ge()}}),n.jsx("button",{type:"submit",disabled:M,className:"p-3",onClick:()=>ge(),children:M?n.jsx("div",{className:"p-3 animate-spin rounded-full h-3 w-3 border-b-2",style:{borderBottom:"2px solid",color:O.tanyaThemeColor}}):n.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M16.6357 13.6701L18.3521 8.5208C19.8516 4.02242 20.6013 1.77322 19.414 0.585948C18.2268 -0.601312 15.9776 0.148418 11.4792 1.64788L6.32987 3.36432C2.69923 4.57453 0.883923 5.17964 0.368062 6.06698C-0.122688 6.91112 -0.122688 7.95369 0.368062 8.7978C0.883923 9.6852 2.69923 10.2903 6.32987 11.5005C6.77981 11.6505 7.28601 11.5434 7.62294 11.2096L13.1286 5.75495C13.4383 5.44808 13.9382 5.45041 14.245 5.76015C14.5519 6.06989 14.5496 6.56975 14.2398 6.87662L8.8231 12.2432C8.4518 12.6111 8.3342 13.1742 8.4995 13.6701C9.7097 17.3007 10.3148 19.1161 11.2022 19.6319C12.0463 20.1227 13.0889 20.1227 13.933 19.6319C14.8204 19.1161 15.4255 17.3008 16.6357 13.6701Z",fill:"#6952C7"})})})]})})})]}),n.jsx(Go,{addToCartPwa:r})]})]})]})]})})};var fr=function(e,t){return fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])},fr(e,t)};function Xo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");fr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ge=function(){return Ge=Object.assign||function(t){for(var r,o=1,s=arguments.length;o<s;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ge.apply(this,arguments)};function Zo(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,o=Object.getOwnPropertySymbols(e);s<o.length;s++)t.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(e,o[s])&&(r[o[s]]=e[o[s]]);return r}var nr="Invariant Violation",Wr=Object.setPrototypeOf,es=Wr===void 0?function(e,t){return e.__proto__=t,e}:Wr,On=(function(e){Xo(t,e);function t(r){r===void 0&&(r=nr);var o=e.call(this,typeof r=="number"?nr+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return o.framesToPop=1,o.name=nr,es(o,t.prototype),o}return t})(Error);function rt(e,t){if(!e)throw new On(t)}var An=["debug","log","warn","error","silent"],ts=An.indexOf("log");function zt(e){return function(){if(An.indexOf(e)>=ts){var t=console[e]||console.log;return t.apply(console,arguments)}}}(function(e){e.debug=zt("debug"),e.log=zt("log"),e.warn=zt("warn"),e.error=zt("error")})(rt||(rt={}));var $n="3.14.0";function ft(e){try{return e()}catch{}}const mr=ft(function(){return globalThis})||ft(function(){return window})||ft(function(){return self})||ft(function(){return global})||ft(function(){return ft.constructor("return this")()});var Gr=new Map;function rs(e){var t=Gr.get(e)||1;return Gr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function ns(e,t){var r=rs("stringifyForDisplay");return JSON.stringify(e,function(o,s){return s===void 0?r:s},t).split(JSON.stringify(r)).join("<undefined>")}function Mt(e){return function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(typeof t=="number"){var s=t;t=jr(s),t||(t=kr(s,r),r=[])}e.apply(void 0,[t].concat(r))}}var or=Object.assign(function(t,r){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];t||rt(t,jr(r,o)||kr(r,o))},{debug:Mt(rt.debug),log:Mt(rt.log),warn:Mt(rt.warn),error:Mt(rt.error)});function Ln(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new On(jr(e,t)||kr(e,t))}var Qr=Symbol.for("ApolloErrorMessageHandler_"+$n);function Dn(e){if(typeof e=="string")return e;try{return ns(e,2).slice(0,1e3)}catch{return"<non-serializable>"}}function jr(e,t){if(t===void 0&&(t=[]),!!e)return mr[Qr]&&mr[Qr](e,t.map(Dn))}function kr(e,t){if(t===void 0&&(t=[]),!!e)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:$n,message:e,args:t.map(Dn)})))}function os(e){return e.definitions.filter(function(t){return t.kind==="OperationDefinition"&&!!t.name}).map(function(t){return t.name.value})[0]||null}let ce=null;const Xr={};let ss=1;const as=()=>class{constructor(){this.id=["slot",ss++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let t=ce;t;t=t.parent)if(this.id in t.slots){const r=t.slots[this.id];if(r===Xr)break;return t!==ce&&(ce.slots[this.id]=r),!0}return ce&&(ce.slots[this.id]=Xr),!1}getValue(){if(this.hasValue())return ce.slots[this.id]}withValue(t,r,o,s){const a={__proto__:null,[this.id]:t},i=ce;ce={parent:i,slots:a};try{return r.apply(s,o)}finally{ce=i}}static bind(t){const r=ce;return function(){const o=ce;try{return ce=r,t.apply(this,arguments)}finally{ce=o}}}static noContext(t,r,o){if(ce){const s=ce;try{return ce=null,t.apply(o,r)}finally{ce=s}}else return t.apply(o,r)}};function Zr(e){try{return e()}catch{}}const sr="@wry/context:Slot",is=Zr(()=>globalThis)||Zr(()=>global)||Object.create(null),en=is,Sr=en[sr]||Array[sr]||(function(e){try{Object.defineProperty(en,sr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}})(as()),{bind:Ha,noContext:Va}=Sr;new Sr;function ls(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=cs(e))||t){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
16
16
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cs(e,t){if(e){if(typeof e=="string")return tn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tn(e,t)}}function tn(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function rn(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Nr(e,t,r){return t&&rn(e.prototype,t),r&&rn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var Cr=function(){return typeof Symbol=="function"},_r=function(e){return Cr()&&!!Symbol[e]},Ir=function(e){return _r(e)?Symbol[e]:"@@"+e};Cr()&&!_r("observable")&&(Symbol.observable=Symbol("observable"));var ds=Ir("iterator"),hr=Ir("observable"),zn=Ir("species");function Gt(e,t){var r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function St(e){var t=e.constructor;return t!==void 0&&(t=t[zn],t===null&&(t=void 0)),t!==void 0?t:he}function us(e){return e instanceof he}function ht(e){ht.log?ht.log(e):setTimeout(function(){throw e})}function Bt(e){Promise.resolve().then(function(){try{e()}catch(t){ht(t)}})}function Mn(e){var t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{var r=Gt(t,"unsubscribe");r&&r.call(t)}}catch(o){ht(o)}}function pr(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function fs(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(qn(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function qn(e,t,r){e._state="running";var o=e._observer;try{var s=Gt(o,t);switch(t){case"next":s&&s.call(o,r);break;case"error":if(pr(e),s)s.call(o,r);else throw r;break;case"complete":pr(e),s&&s.call(o);break}}catch(a){ht(a)}e._state==="closed"?Mn(e):e._state==="running"&&(e._state="ready")}function ar(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Bt(function(){return fs(e)});return}qn(e,t,r)}}var ms=(function(){function e(r,o){this._cleanup=void 0,this._observer=r,this._queue=void 0,this._state="initializing";var s=new hs(this);try{this._cleanup=o.call(void 0,s)}catch(a){s.error(a)}this._state==="initializing"&&(this._state="ready")}var t=e.prototype;return t.unsubscribe=function(){this._state!=="closed"&&(pr(this),Mn(this))},Nr(e,[{key:"closed",get:function(){return this._state==="closed"}}]),e})(),hs=(function(){function e(r){this._subscription=r}var t=e.prototype;return t.next=function(o){ar(this._subscription,"next",o)},t.error=function(o){ar(this._subscription,"error",o)},t.complete=function(){ar(this._subscription,"complete")},Nr(e,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),e})(),he=(function(){function e(r){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if(typeof r!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=r}var t=e.prototype;return t.subscribe=function(o){return(typeof o!="object"||o===null)&&(o={next:o,error:arguments[1],complete:arguments[2]}),new ms(o,this._subscriber)},t.forEach=function(o){var s=this;return new Promise(function(a,i){if(typeof o!="function"){i(new TypeError(o+" is not a function"));return}function c(){l.unsubscribe(),a()}var l=s.subscribe({next:function(h){try{o(h,c)}catch(p){i(p),l.unsubscribe()}},error:i,complete:a})})},t.map=function(o){var s=this;if(typeof o!="function")throw new TypeError(o+" is not a function");var a=St(this);return new a(function(i){return s.subscribe({next:function(c){try{c=o(c)}catch(l){return i.error(l)}i.next(c)},error:function(c){i.error(c)},complete:function(){i.complete()}})})},t.filter=function(o){var s=this;if(typeof o!="function")throw new TypeError(o+" is not a function");var a=St(this);return new a(function(i){return s.subscribe({next:function(c){try{if(!o(c))return}catch(l){return i.error(l)}i.next(c)},error:function(c){i.error(c)},complete:function(){i.complete()}})})},t.reduce=function(o){var s=this;if(typeof o!="function")throw new TypeError(o+" is not a function");var a=St(this),i=arguments.length>1,c=!1,l=arguments[1],h=l;return new a(function(p){return s.subscribe({next:function(b){var y=!c;if(c=!0,!y||i)try{h=o(h,b)}catch(N){return p.error(N)}else h=b},error:function(b){p.error(b)},complete:function(){if(!c&&!i)return p.error(new TypeError("Cannot reduce an empty sequence"));p.next(h),p.complete()}})})},t.concat=function(){for(var o=this,s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];var c=St(this);return new c(function(l){var h,p=0;function b(y){h=y.subscribe({next:function(N){l.next(N)},error:function(N){l.error(N)},complete:function(){p===a.length?(h=void 0,l.complete()):b(c.from(a[p++]))}})}return b(o),function(){h&&(h.unsubscribe(),h=void 0)}})},t.flatMap=function(o){var s=this;if(typeof o!="function")throw new TypeError(o+" is not a function");var a=St(this);return new a(function(i){var c=[],l=s.subscribe({next:function(p){if(o)try{p=o(p)}catch(y){return i.error(y)}var b=a.from(p).subscribe({next:function(y){i.next(y)},error:function(y){i.error(y)},complete:function(){var y=c.indexOf(b);y>=0&&c.splice(y,1),h()}});c.push(b)},error:function(p){i.error(p)},complete:function(){h()}});function h(){l.closed&&c.length===0&&i.complete()}return function(){c.forEach(function(p){return p.unsubscribe()}),l.unsubscribe()}})},t[hr]=function(){return this},e.from=function(o){var s=typeof this=="function"?this:e;if(o==null)throw new TypeError(o+" is not an object");var a=Gt(o,hr);if(a){var i=a.call(o);if(Object(i)!==i)throw new TypeError(i+" is not an object");return us(i)&&i.constructor===s?i:new s(function(c){return i.subscribe(c)})}if(_r("iterator")&&(a=Gt(o,ds),a))return new s(function(c){Bt(function(){if(!c.closed){for(var l=ls(a.call(o)),h;!(h=l()).done;){var p=h.value;if(c.next(p),c.closed)return}c.complete()}})});if(Array.isArray(o))return new s(function(c){Bt(function(){if(!c.closed){for(var l=0;l<o.length;++l)if(c.next(o[l]),c.closed)return;c.complete()}})});throw new TypeError(o+" is not observable")},e.of=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];var i=typeof this=="function"?this:e;return new i(function(c){Bt(function(){if(!c.closed){for(var l=0;l<s.length;++l)if(c.next(s[l]),c.closed)return;c.complete()}})})},Nr(e,null,[{key:zn,get:function(){return this}}]),e})();Cr()&&Object.defineProperty(he,Symbol("extensions"),{value:{symbol:hr,hostReportError:ht},configurable:!0});function ps(e){var t,r=e.Symbol;if(typeof r=="function")if(r.observable)t=r.observable;else{typeof r.for=="function"?t=r.for("https://github.com/benlesh/symbol-observable"):t=r("https://github.com/benlesh/symbol-observable");try{r.observable=t}catch{}}else t="@@observable";return t}var mt;typeof self<"u"?mt=self:typeof window<"u"?mt=window:typeof global<"u"?mt=global:typeof module<"u"?mt=module:mt=Function("return this")();ps(mt);var nn=he.prototype,on="@@observable";nn[on]||(nn[on]=function(){return this});function gs(e){for(var t=["query","operationName","variables","extensions","context"],r=0,o=Object.keys(e);r<o.length;r++){var s=o[r];if(t.indexOf(s)<0)throw Ln(58,s)}return e}function xs(e,t){var r=Ge({},e),o=function(a){typeof a=="function"?r=Ge(Ge({},r),a(r)):r=Ge(Ge({},r),a)},s=function(){return Ge({},r)};return Object.defineProperty(t,"setContext",{enumerable:!1,value:o}),Object.defineProperty(t,"getContext",{enumerable:!1,value:s}),t}function ws(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName=typeof t.query!="string"?os(t.query)||void 0:""),t}var ys=Symbol.for("apollo.deprecations"),bs=mr,vs=new Sr;function js(e){return bs[ys]||(vs.getValue()||[]).includes(e)}function ks(e,t){js(e)||t()}function sn(e,t){return t?t(e):he.of()}function Nt(e){return typeof e=="function"?new Bn(e):e}function qt(e){return e.request.length<=1}var Bn=(function(){function e(t){t&&(this.request=t)}return e.empty=function(){return new e(function(){return he.of()})},e.from=function(t){return t.length===0?e.empty():t.map(Nt).reduce(function(r,o){return r.concat(o)})},e.split=function(t,r,o){var s=Nt(r),a=Nt(o||new e(sn)),i;return qt(s)&&qt(a)?i=new e(function(c){return t(c)?s.request(c)||he.of():a.request(c)||he.of()}):i=new e(function(c,l){return t(c)?s.request(c,l)||he.of():a.request(c,l)||he.of()}),Object.assign(i,{left:s,right:a})},e.execute=function(t,r){return t.request(xs(r.context,ws(gs(r))))||he.of()},e.concat=function(t,r){var o=Nt(t);if(qt(o))return globalThis.__DEV__!==!1&&or.warn(47,o),o;var s=Nt(r),a;return qt(s)?a=new e(function(i){return o.request(i,function(c){return s.request(c)||he.of()})||he.of()}):a=new e(function(i,c){return o.request(i,function(l){return s.request(l,c)||he.of()})||he.of()}),Object.assign(a,{left:o,right:s})},e.prototype.split=function(t,r,o){return this.concat(e.split(t,r,o||new e(sn)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(t,r){throw Ln(48)},e.prototype.onError=function(t,r){if(globalThis.__DEV__!==!1&&ks("onError",function(){globalThis.__DEV__!==!1&&or.warn(49)}),r&&r.error)return r.error(t),!1;throw t},e.prototype.setOnError=function(t){return globalThis.__DEV__!==!1&&globalThis.__DEV__!==!1&&or.warn(50),this.onError=t,this},e})();function Ss(e){return new Bn(function(t,r){var o=Zo(t,[]);return new he(function(s){var a,i=!1;return Promise.resolve(o).then(function(c){return e(c,t.getContext())}).then(t.setContext).then(function(){i||(a=r(t).subscribe({next:s.next.bind(s),error:s.error.bind(s),complete:s.complete.bind(s)}))}).catch(s.error.bind(s)),function(){i=!0,a&&a.unsubscribe()}})})}const Ns=async()=>{const e="https://auth.australia-southeast1.gcp.commercetools.com/oauth/token",o="Basic "+btoa(encodeURIComponent("tfegsSBVOYnR7e_yE-AjxVVN")+":"+encodeURIComponent("pyKWgHuTxuMwDygh9JH1ehLEaLvAhBo4"));try{const s=await we.post(e,new URLSearchParams({grant_type:"client_credentials"}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Authorization:o}});return s.status===200&&s.data.access_token?s.data.access_token:(console.error("Failed to fetch token:",s.data),null)}catch(s){return we.isAxiosError(s)?console.error("Error fetching token:",s.response||s.message):console.error("Unexpected error:",s),null}},Cs="https://api.australia-southeast1.gcp.commercetools.com/kt-demo/graphql",_s=Yt.createHttpLink({uri:`${Cs}`}),Is=Ss(async(e,{headers:t})=>{const r=await Ns();return{headers:{...t,authorization:`Bearer ${r}`}}}),Fs=new Yt.ApolloClient({link:Is.concat(_s),cache:new Yt.InMemoryCache,defaultOptions:{watchQuery:{fetchPolicy:"cache-and-network"}}}),Ps=e=>{const{tanyaConfig:t}=e;return n.jsx(Yt.ApolloProvider,{client:Fs,children:n.jsx(Mo,{children:n.jsx(Qo,{tanyaConfig:t})})})};function Es(e,t){const r=e.icons,o=e.aliases||Object.create(null),s=Object.create(null);function a(i){if(r[i])return s[i]=[];if(!(i in s)){s[i]=null;const c=o[i]&&o[i].parent,l=c&&a(c);l&&(s[i]=[c].concat(l))}return s[i]}return Object.keys(r).concat(Object.keys(o)).forEach(a),s}const Rn=Object.freeze({left:0,top:0,width:16,height:16}),Qt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Fr=Object.freeze({...Rn,...Qt}),gr=Object.freeze({...Fr,body:"",hidden:!1});function Ts(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(r.rotate=o),r}function an(e,t){const r=Ts(e,t);for(const o in gr)o in Qt?o in e&&!(o in r)&&(r[o]=Qt[o]):o in t?r[o]=t[o]:o in e&&(r[o]=e[o]);return r}function Os(e,t,r){const o=e.icons,s=e.aliases||Object.create(null);let a={};function i(c){a=an(o[c]||s[c],a)}return i(t),r.forEach(i),an(e,a)}function Un(e,t){const r=[];if(typeof e!="object"||typeof e.icons!="object")return r;e.not_found instanceof Array&&e.not_found.forEach(s=>{t(s,null),r.push(s)});const o=Es(e);for(const s in o){const a=o[s];a&&(t(s,Os(e,s,a)),r.push(s))}return r}const As={provider:"",aliases:{},not_found:{},...Rn};function ir(e,t){for(const r in t)if(r in e&&typeof e[r]!=typeof t[r])return!1;return!0}function Hn(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!ir(e,As))return null;const r=t.icons;for(const s in r){const a=r[s];if(!s||typeof a.body!="string"||!ir(a,gr))return null}const o=t.aliases||Object.create(null);for(const s in o){const a=o[s],i=a.parent;if(!s||typeof i!="string"||!r[i]&&!o[i]||!ir(a,gr))return null}return t}const ln=Object.create(null);function $s(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function pt(e,t){const r=ln[e]||(ln[e]=Object.create(null));return r[t]||(r[t]=$s(e,t))}function Vn(e,t){return Hn(t)?Un(t,(r,o)=>{o?e.icons[r]=o:e.missing.add(r)}):[]}function Ls(e,t,r){try{if(typeof r.body=="string")return e.icons[t]={...r},!0}catch{}return!1}const Yn=/^[a-z0-9]+(-[a-z0-9]+)*$/,Xt=(e,t,r,o="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;o=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:o,prefix:l,name:c};return t&&!Rt(h)?null:h}const a=s[0],i=a.split("-");if(i.length>1){const c={provider:o,prefix:i.shift(),name:i.join("-")};return t&&!Rt(c)?null:c}if(r&&o===""){const c={provider:o,prefix:"",name:a};return t&&!Rt(c,r)?null:c}return null},Rt=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;let Pt=!1;function Jn(e){return typeof e=="boolean"&&(Pt=e),Pt}function cn(e){const t=typeof e=="string"?Xt(e,!0,Pt):e;if(t){const r=pt(t.provider,t.prefix),o=t.name;return r.icons[o]||(r.missing.has(o)?null:void 0)}}function Ds(e,t){const r=Xt(e,!0,Pt);if(!r)return!1;const o=pt(r.provider,r.prefix);return t?Ls(o,r.name,t):(o.missing.add(r.name),!0)}function zs(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),Pt&&!t&&!e.prefix){let s=!1;return Hn(e)&&(e.prefix="",Un(e,(a,i)=>{Ds(a,i)&&(s=!0)})),s}const r=e.prefix;if(!Rt({prefix:r,name:"a"}))return!1;const o=pt(t,r);return!!Vn(o,e)}const Kn=Object.freeze({width:null,height:null}),Wn=Object.freeze({...Kn,...Qt}),Ms=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dn(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const o=e.split(Ms);if(o===null||!o.length)return e;const s=[];let a=o.shift(),i=qs.test(a);for(;;){if(i){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*t*r)/r)}else s.push(a);if(a=o.shift(),a===void 0)return s.join("");i=!i}}function Bs(e,t="defs"){let r="";const o=e.indexOf("<"+t);for(;o>=0;){const s=e.indexOf(">",o),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const i=e.indexOf(">",a);if(i===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,o).trim()+e.slice(i+1)}return{defs:r,content:e}}function Rs(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Us(e,t,r){const o=Bs(e);return Rs(o.defs,t+o.content+r)}const Hs=e=>e==="unset"||e==="undefined"||e==="none";function Vs(e,t){const r={...Fr,...e},o={...Wn,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,o].forEach(I=>{const j=[],C=I.hFlip,Y=I.vFlip;let M=I.rotate;C?Y?M+=2:(j.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),j.push("scale(-1 1)"),s.top=s.left=0):Y&&(j.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),j.push("scale(1 -1)"),s.top=s.left=0);let x;switch(M<0&&(M-=Math.floor(M/4)*4),M=M%4,M){case 1:x=s.height/2+s.top,j.unshift("rotate(90 "+x.toString()+" "+x.toString()+")");break;case 2:j.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:x=s.width/2+s.left,j.unshift("rotate(-90 "+x.toString()+" "+x.toString()+")");break}M%2===1&&(s.left!==s.top&&(x=s.left,s.left=s.top,s.top=x),s.width!==s.height&&(x=s.width,s.width=s.height,s.height=x)),j.length&&(a=Us(a,'<g transform="'+j.join(" ")+'">',"</g>"))});const i=o.width,c=o.height,l=s.width,h=s.height;let p,b;i===null?(b=c===null?"1em":c==="auto"?h:c,p=dn(b,l/h)):(p=i==="auto"?l:i,b=c===null?dn(p,h/l):c==="auto"?h:c);const y={},N=(I,j)=>{Hs(j)||(y[I]=j.toString())};N("width",p),N("height",b);const S=[s.left,s.top,l,h];return y.viewBox=S.join(" "),{attributes:y,viewBox:S,body:a}}const Ys=/\sid="(\S+)"/g,Js="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Ks=0;function Ws(e,t=Js){const r=[];let o;for(;o=Ys.exec(e);)r.push(o[1]);if(!r.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const i=typeof t=="function"?t(a):t+(Ks++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const xr=Object.create(null);function Gs(e,t){xr[e]=t}function wr(e){return xr[e]||xr[""]}function Pr(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Er=Object.create(null),Ct=["https://api.simplesvg.com","https://api.unisvg.com"],Ut=[];for(;Ct.length>0;)Ct.length===1||Math.random()>.5?Ut.push(Ct.shift()):Ut.push(Ct.pop());Er[""]=Pr({resources:["https://api.iconify.design"].concat(Ut)});function Qs(e,t){const r=Pr(t);return r===null?!1:(Er[e]=r,!0)}function Tr(e){return Er[e]}const Xs=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let un=Xs();function Zs(e,t){const r=Tr(e);if(!r)return 0;let o;if(!r.maxURL)o=0;else{let s=0;r.resources.forEach(i=>{s=Math.max(s,i.length)});const a=t+".json?icons=";o=r.maxURL-s-r.path.length-a.length}return o}function ea(e){return e===404}const ta=(e,t,r)=>{const o=[],s=Zs(e,t),a="icons";let i={type:a,provider:e,prefix:t,icons:[]},c=0;return r.forEach((l,h)=>{c+=l.length+1,c>=s&&h>0&&(o.push(i),i={type:a,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),o.push(i),o};function ra(e){if(typeof e=="string"){const t=Tr(e);if(t)return t.path}return"/"}const na=(e,t,r)=>{if(!un){r("abort",424);return}let o=ra(t.provider);switch(t.type){case"icons":{const a=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});o+=a+".json?"+l.toString();break}case"custom":{const a=t.uri;o+=a.slice(0,1)==="/"?a.slice(1):a;break}default:r("abort",400);return}let s=503;un(e+o).then(a=>{const i=a.status;if(i!==200){setTimeout(()=>{r(ea(i)?"abort":"next",i)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?r("abort",a):r("next",s)});return}setTimeout(()=>{r("success",a)})}).catch(()=>{r("next",s)})},oa={prepare:ta,send:na};function Gn(e,t){e.forEach(r=>{const o=r.loaderCallbacks;o&&(r.loaderCallbacks=o.filter(s=>s.id!==t))})}function sa(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let r=!1;const o=e.provider,s=e.prefix;t.forEach(a=>{const i=a.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==s)return!0;const h=l.name;if(e.icons[h])i.loaded.push({provider:o,prefix:s,name:h});else if(e.missing.has(h))i.missing.push({provider:o,prefix:s,name:h});else return r=!0,!0;return!1}),i.pending.length!==c&&(r||Gn([e],a.id),a.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),a.abort))})}))}let aa=0;function ia(e,t,r){const o=aa++,s=Gn.bind(null,r,o);if(!t.pending.length)return s;const a={id:o,icons:t,callback:e,abort:s};return r.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(a)}),s}function la(e){const t={loaded:[],missing:[],pending:[]},r=Object.create(null);e.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let o={provider:"",prefix:"",name:""};return e.forEach(s=>{if(o.name===s.name&&o.prefix===s.prefix&&o.provider===s.provider)return;o=s;const a=s.provider,i=s.prefix,c=s.name,l=r[a]||(r[a]=Object.create(null)),h=l[i]||(l[i]=pt(a,i));let p;c in h.icons?p=t.loaded:i===""||h.missing.has(c)?p=t.missing:p=t.pending;const b={provider:a,prefix:i,name:c};p.push(b)}),t}function ca(e,t=!0,r=!1){const o=[];return e.forEach(s=>{const a=typeof s=="string"?Xt(s,t,r):s;a&&o.push(a)}),o}const da={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ua(e,t,r,o){const s=e.resources.length,a=e.random?Math.floor(Math.random()*s):e.index;let i;if(e.random){let F=e.resources.slice(0);for(i=[];F.length>1;){const J=Math.floor(Math.random()*F.length);i.push(F[J]),F=F.slice(0,J).concat(F.slice(J+1))}i=i.concat(F)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));const c=Date.now();let l="pending",h=0,p,b=null,y=[],N=[];typeof o=="function"&&N.push(o);function S(){b&&(clearTimeout(b),b=null)}function I(){l==="pending"&&(l="aborted"),S(),y.forEach(F=>{F.status==="pending"&&(F.status="aborted")}),y=[]}function j(F,J){J&&(N=[]),typeof F=="function"&&N.push(F)}function C(){return{startTime:c,payload:t,status:l,queriesSent:h,queriesPending:y.length,subscribe:j,abort:I}}function Y(){l="failed",N.forEach(F=>{F(void 0,p)})}function M(){y.forEach(F=>{F.status==="pending"&&(F.status="aborted")}),y=[]}function x(F,J,de){const ye=J!=="success";switch(y=y.filter(te=>te!==F),l){case"pending":break;case"failed":if(ye||!e.dataAfterTimeout)return;break;default:return}if(J==="abort"){p=de,Y();return}if(ye){p=de,y.length||(i.length?Ce():Y());return}if(S(),M(),!e.random){const te=e.resources.indexOf(F.resource);te!==-1&&te!==e.index&&(e.index=te)}l="completed",N.forEach(te=>{te(de)})}function Ce(){if(l!=="pending")return;S();const F=i.shift();if(F===void 0){if(y.length){b=setTimeout(()=>{S(),l==="pending"&&(M(),Y())},e.timeout);return}Y();return}const J={status:"pending",resource:F,callback:(de,ye)=>{x(J,de,ye)}};y.push(J),h++,b=setTimeout(Ce,e.rotate),r(F,t,J.callback)}return setTimeout(Ce),C}function Qn(e){const t={...da,...e};let r=[];function o(){r=r.filter(c=>c().status==="pending")}function s(c,l,h){const p=ua(t,c,l,(b,y)=>{o(),h&&h(b,y)});return r.push(p),p}function a(c){return r.find(l=>c(l))||null}return{query:s,find:a,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function fn(){}const lr=Object.create(null);function fa(e){if(!lr[e]){const t=Tr(e);if(!t)return;const r=Qn(t),o={config:t,redundancy:r};lr[e]=o}return lr[e]}function ma(e,t,r){let o,s;if(typeof e=="string"){const a=wr(e);if(!a)return r(void 0,424),fn;s=a.send;const i=fa(e);i&&(o=i.redundancy)}else{const a=Pr(e);if(a){o=Qn(a);const i=e.resources?e.resources[0]:"",c=wr(i);c&&(s=c.send)}}return!o||!s?(r(void 0,424),fn):o.query(t,s,r)().abort}function mn(){}function ha(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,sa(e)}))}function pa(e){const t=[],r=[];return e.forEach(o=>{(o.match(Yn)?t:r).push(o)}),{valid:t,invalid:r}}function _t(e,t,r){function o(){const s=e.pendingIcons;t.forEach(a=>{s&&s.delete(a),e.icons[a]||e.missing.add(a)})}if(r&&typeof r=="object")try{if(!Vn(e,r).length){o();return}}catch(s){console.error(s)}o(),ha(e)}function hn(e,t){e instanceof Promise?e.then(r=>{t(r)}).catch(()=>{t(null)}):t(e)}function ga(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:r,prefix:o}=e,s=e.iconsToLoad;if(delete e.iconsToLoad,!s||!s.length)return;const a=e.loadIcon;if(e.loadIcons&&(s.length>1||!a)){hn(e.loadIcons(s,o,r),p=>{_t(e,s,p)});return}if(a){s.forEach(p=>{const b=a(p,o,r);hn(b,y=>{const N=y?{prefix:o,icons:{[p]:y}}:null;_t(e,[p],N)})});return}const{valid:i,invalid:c}=pa(s);if(c.length&&_t(e,c,null),!i.length)return;const l=o.match(Yn)?wr(r):null;if(!l){_t(e,i,null);return}l.prepare(r,o,i).forEach(p=>{ma(r,p,b=>{_t(e,p.icons,b)})})}))}const xa=(e,t)=>{const r=ca(e,!0,Jn()),o=la(r);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,mn)}),()=>{l=!1}}const s=Object.create(null),a=[];let i,c;return o.pending.forEach(l=>{const{provider:h,prefix:p}=l;if(p===c&&h===i)return;i=h,c=p,a.push(pt(h,p));const b=s[h]||(s[h]=Object.create(null));b[p]||(b[p]=[])}),o.pending.forEach(l=>{const{provider:h,prefix:p,name:b}=l,y=pt(h,p),N=y.pendingIcons||(y.pendingIcons=new Set);N.has(b)||(N.add(b),s[h][p].push(b))}),a.forEach(l=>{const h=s[l.provider][l.prefix];h.length&&ga(l,h)}),t?ia(t,o,a):mn};function wa(e,t){const r={...e};for(const o in t){const s=t[o],a=typeof s;o in Kn?(s===null||s&&(a==="string"||a==="number"))&&(r[o]=s):a===typeof r[o]&&(r[o]=o==="rotate"?s%4:s)}return r}const ya=/[\s,]+/;function ba(e,t){t.split(ya).forEach(r=>{switch(r.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function va(e,t=0){const r=e.replace(/^-?[0-9.]*/,"");function o(s){for(;s<0;)s+=4;return s%4}if(r===""){const s=parseInt(e);return isNaN(s)?0:o(s)}else if(r!==e){let s=0;switch(r){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(e.slice(0,e.length-r.length));return isNaN(a)?0:(a=a/s,a%1===0?o(a):0)}}return t}function ja(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)r+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function ka(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Sa(e){return"data:image/svg+xml,"+ka(e)}function Na(e){return'url("'+Sa(e)+'")'}let It;function Ca(){try{It=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{It=null}}function _a(e){return It===void 0&&Ca(),It?It.createHTML(e):e}const Xn={...Wn,inline:!1},Ia={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Fa={display:"inline-block"},yr={backgroundColor:"currentColor"},Zn={backgroundColor:"transparent"},pn={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},gn={WebkitMask:yr,mask:yr,background:Zn};for(const e in gn){const t=gn[e];for(const r in pn)t[e+r]=pn[r]}const Pa={...Xn,inline:!0};function xn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Ea=(e,t,r)=>{const o=t.inline?Pa:Xn,s=wa(o,t),a=t.mode||"svg",i={},c=t.style||{},l={...a==="svg"?Ia:{}};if(r){const j=Xt(r,!1,!0);if(j){const C=["iconify"],Y=["provider","prefix"];for(const M of Y)j[M]&&C.push("iconify--"+j[M]);l.className=C.join(" ")}}for(let j in t){const C=t[j];if(C!==void 0)switch(j){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=C;break;case"className":l[j]=(l[j]?l[j]+" ":"")+C;break;case"inline":case"hFlip":case"vFlip":s[j]=C===!0||C==="true"||C===1;break;case"flip":typeof C=="string"&&ba(s,C);break;case"color":i.color=C;break;case"rotate":typeof C=="string"?s[j]=va(C):typeof C=="number"&&(s[j]=C);break;case"ariaHidden":case"aria-hidden":C!==!0&&C!=="true"&&delete l["aria-hidden"];break;default:o[j]===void 0&&(l[j]=C)}}const h=Vs(e,s),p=h.attributes;if(s.inline&&(i.verticalAlign="-0.125em"),a==="svg"){l.style={...i,...c},Object.assign(l,p);let j=0,C=t.id;return typeof C=="string"&&(C=C.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:_a(Ws(h.body,C?()=>C+"ID"+j++:"iconifyReact"))},g.createElement("svg",l)}const{body:b,width:y,height:N}=e,S=a==="mask"||(a==="bg"?!1:b.indexOf("currentColor")!==-1),I=ja(b,{...p,width:y+"",height:N+""});return l.style={...i,"--svg":Na(I),width:xn(p.width),height:xn(p.height),...Fa,...S?yr:Zn,...c},g.createElement("span",l)};Jn(!0);Gs("",oa);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!zs(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let r in t){const o="IconifyProviders["+r+"] is invalid.";try{const s=t[r];if(typeof s!="object"||!s||s.resources===void 0)continue;Qs(r,s)||console.error(o)}catch{console.error(o)}}}}function eo(e){const[t,r]=g.useState(!!e.ssr),[o,s]=g.useState({});function a(N){if(N){const S=e.icon;if(typeof S=="object")return{name:"",data:S};const I=cn(S);if(I)return{name:S,data:I}}return{name:""}}const[i,c]=g.useState(a(!!e.ssr));function l(){const N=o.callback;N&&(N(),s({}))}function h(N){if(JSON.stringify(i)!==JSON.stringify(N))return l(),c(N),!0}function p(){var N;const S=e.icon;if(typeof S=="object"){h({name:"",data:S});return}const I=cn(S);if(h({name:S,data:I}))if(I===void 0){const j=xa([S],p);s({callback:j})}else I&&((N=e.onLoad)===null||N===void 0||N.call(e,S))}g.useEffect(()=>(r(!0),l),[]),g.useEffect(()=>{t&&p()},[e.icon,t]);const{name:b,data:y}=i;return y?Ea({...Fr,...y},e,b):e.children?e.children:e.fallback?e.fallback:g.createElement("span",{})}const oe=g.forwardRef((e,t)=>eo({...e,_ref:t}));g.forwardRef((e,t)=>eo({inline:!0,...e,_ref:t}));const Be="USD",wn=e=>{var o,s,a;const t=e==null?void 0:e.availability;if(!t)return!1;const r=(a=(s=(o=t.channels)==null?void 0:o.results)==null?void 0:s[0])==null?void 0:a.availability;return r?r.isOnStock===!0&&(r.availableQuantity??0)>0:!1},br=(e,t=Be)=>{const r=(e==null?void 0:e.prices)??[];if(!r.length)return null;const o=i=>{var h,p;const c=i.find(b=>{var y;return!!((y=b.discounted)!=null&&y.value)});if(c)return{cent:c.discounted.value.centAmount,cur:c.discounted.value.currencyCode,regularCent:(h=c.value)==null?void 0:h.centAmount};const l=(p=i[0])==null?void 0:p.value;return l?{cent:l.centAmount,cur:l.currencyCode}:null},s=r.filter(i=>{var c,l;return((l=((c=i.discounted)==null?void 0:c.value)||i.value)==null?void 0:l.currencyCode)===t}),a=o(s);return a||o(r)||null},Ta=(e,t)=>{if(!Array.isArray(e))return"";const r=e.find(o=>o.name===t)||e.find(o=>{var s;return((s=o.name)==null?void 0:s.toLowerCase())===t.toLowerCase()});return!r||!r.value?"":typeof r.value=="object"?r.value.label||"":r.value},Oa=e=>{let t="";if(Array.isArray(e)){const r=e.find(o=>o.name==="size")||e.find(o=>o.name==="Size");r&&r.value&&(t=typeof r.value=="object"?r.value.label||"":r.value)}return{sizeLabel:t}},qe=e=>Ta((e==null?void 0:e.attributesRaw)??[],"color"),We=e=>Oa((e==null?void 0:e.attributesRaw)??[]).sizeLabel,et=(e,t,r)=>{for(const o of e){const s=qe(o.variant),a=We(o.variant);if((t?s===t:!0)&&(r?a===r:!0))return o}return null},Aa=({value:e,name:t,variant:r="square",image:o,selected:s,onClick:a})=>{const i=r==="circle"?"h-12 w-12 rounded-full":"h-12 w-12 rounded-md";return n.jsxs("button",{onClick:a,className:`
17
- flex items-center justify-center border
17
+ flex items-center justify-center border p-2
18
18
  ${i}
19
19
  bg-white cursor-pointer relative
20
20
  ${s?"border-black":"border-gray-300 hover:border-gray-500"}