PageSourceSearch

https://mimoapp.io/_next/static/chunks/5197.4745ae251d8d9329.js

js mimoapp.io collected 2026-10-02 01:58:32 UTC 17,205 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5197],{55197:(e,t,r)=>{r.r(t),r.d(t,{StorefrontQuickAddFlow:()=>C});var s=r(95155),i=r(12115),l=r(37206),a=r(47311),n=r(17691),o=r(40921);let d=(e,t)=>{let r=e.get(t);return r?(e.delete(t),e.set(t,r),r):null},c=e=>e.catalogSelection.selectedOptionsSnapshot.map(t=>{var r,s,i;let l;return`${r=t.name,s=e.colorPrefix,i=e.sizeLabel,"size"===(l=r.trim().toLowerCase())||"sizes"===l?i:"color"===l||"colors"===l||"colour"===l||"colours"===l?s:r}: ${t.value}`}).join(" \xb7 "),u=e=>e?{note:e}:{},p={addedInline:!1,directAddAttempted:!1,redirectedToProduct:!1},m={addedInline:!1,directAddAttempted:!1,redirectedToProduct:!0},x=e=>({addedInline:e,directAddAttempted:!0,redirectedToProduct:!1}),f=async({cache:e,fetchImpl:t,inFlightRequests:r,productId:s})=>{let i=d(e,s);if(i)return i;let l=r?.get(s);if(l)return l;let a=(async()=>{var r,i,l;let a,n=await t(`/api/store/products/${encodeURIComponent(s)}`);if(!n.ok)throw Error("Quick-add options request failed.");let o={source:"string"==typeof(a=(r=await n.json())&&"object"==typeof r?r:{}).source&&a.source.trim().length>0?a.source.trim().toLowerCase():null,countryCode:"string"==typeof a.countryCode&&a.countryCode.trim().length>0?a.countryCode.trim().toUpperCase():null,sizes:Array.isArray(a.sizes)?a.sizes.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.label&&"string"==typeof e.tokenType&&(null===e.system||"string"==typeof e.system)):[],colors:Array.isArray(a.colors)?a.colors.filter(e=>"string"==typeof e&&e.trim().length>0):[],sizingChartEnabled:!!a.sizingChartEnabled,variants:Array.isArray(i=a.variants)?i.flatMap(e=>{if(!e||"object"!=typeof e||"string"!=typeof e.id||!e.id.trim())return[];let t=Array.isArray(e.optionValues)?e.optionValues.flatMap(e=>e&&"object"==typeof e&&"string"==typeof e.name&&e.name.trim()&&"string"==typeof e.value&&e.value.trim()?[{name:e.name.trim(),value:e.value.trim()}]:[]):[];return[{id:e.id.trim(),title:"string"==typeof e.title?e.title:null,optionValues:t,imageUrl:"string"==typeof e.imageUrl?e.imageUrl:null,imageUrls:Array.isArray(e.imageUrls)?e.imageUrls.flatMap(e=>"string"==typeof e&&e.trim().length>0?[e.trim()]:[]):"string"==typeof e.imageUrl&&e.imageUrl.trim().length>0?[e.imageUrl.trim()]:[],currency:"string"==typeof e.currency?e.currency:null,price:"number"==typeof e.price&&Number.isFinite(e.price)?e.price:null,compareAtPrice:null,onSale:!1,purchasable:!!e.purchasable,nonPurchasableReason:"string"==typeof e.nonPurchasableReason?e.nonPurchasableReason:null,position:null}]}):[],optionGroups:Array.isArray(l=a.optionGroups)?l.flatMap(e=>{if(!e||"object"!=typeof e||"string"!=typeof e.name||!e.name.trim())return[];let t=Array.isArray(e.values)?e.values.flatMap(e=>{if(!e||"object"!=typeof e||"string"!=typeof e.value||!e.value.trim())return[];let t=Array.isArray(e.variantIds)?e.variantIds.filter(e=>"string"==typeof e&&e.trim().length>0):[];return[{value:e.value.trim(),variantIds:t,hasPurchasableVariant:!!e.hasPurchasableVariant}]}):[];return[{name:e.name.trim(),values:t}]}):[]};for(e.has(s)&&e.delete(s),e.set(s,o);e.size>24;){let t=e.keys().next().value;if("string"!=typeof t)break;e.delete(t)}return o})();r?.set(s,a);try{return await a}finally{r?.delete(s)}},g=({itemHasOptions:e,options:t,selectedCatalogOptions:r})=>{let s=!!t?.variants.length,i=s?(0,a.ct)({optionGroups:t?.optionGroups??[],selectedOptions:r,variants:t?.variants??[]}):null;return{quickAddDisplayVariant:s?i??t?.variants.find(e=>e.purchasable)??t?.variants[0]??null:null,quickAddHasVariants:s,quickAddRequiresPdpRedirect:!!(t&&(0,a.TG)({itemHasOptions:e,variants:t.variants,optionGroups:t.optionGroups})),quickAddSelectedVariant:i}};var b=r(5772),h=r(23916),y=r(4474),v=r(87803),k=r(84719);function z({addingItemId:e,copy:t,onClose:r,onConfirm:i,quickAdd:l}){let n=l.options;return(0,s.jsxs)(h.a,{open:!!l.quickAddItem,onClose:()=>{l.resetQuickAdd(),r?.()},title:t.addToWishlist,dismissible:!0,showCloseButton:!0,scrollLockStrategy:"soft",actions:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(y.$n,{variant:"primary",onClick:i,className:"button-no-lift w-full !rou
1nded-full !border-[#0041c8] !bg-gradient-to-br !from-[#0041c8] !to-[#0055ff] !text-white hover:!from-[#0039b3] hover:!to-[#004de6] sm:ml-auto sm:w-auto",disabled:!l.canConfirm,children:e===l.quickAddItem?.id?t.adding:t.addToWishlist})}),children:[l.quickAddItem&&(0,s.jsxs)("div",{className:"mb-5 flex items-start gap-3 rounded-[1.5rem] border border-[#c3c5d9]/35 bg-[#f6f3f2] p-3",children:[(0,s.jsx)("div",{className:"relative h-16 w-16 shrink-0 overflow-hidden rounded-[1rem] border border-[#c3c5d9]/35 bg-white",children:l.quickAddItem.imageUrl?(0,s.jsx)(b.default,{src:l.quickAddItem.imageUrl,alt:`${l.quickAddItem.brand} ${l.quickAddItem.title}`,fill:!0,unoptimized:(0,v.D)(l.quickAddItem.imageUrl),sizes:"64px",className:"object-contain p-1"}):(0,s.jsx)("div",{className:"flex h-full w-full items-center justify-center text-[9px] 3xl:text-[10px] 4xl:text-[11px] uppercase tracking-[0.12em] text-[#737688]",children:t.noImage})}),(0,s.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,s.jsx)("p",{className:"font-heading text-[12px] 3xl:text-sm 4xl:text-base font-semibold uppercase tracking-[0.08em] text-[#434656]",children:l.quickAddItem.brand}),(0,s.jsx)("p",{className:"line-clamp-2 text-sm leading-5 text-[#1c1b1b]",children:l.quickAddItem.title})]})]}),l.optionsLoading&&(0,s.jsx)("p",{className:"type-body text-[#737688]",children:t.loadingOptions}),l.optionsError&&(0,s.jsx)("p",{className:"type-body text-[#737688]",children:l.optionsError}),n&&(0,s.jsx)("div",{className:"space-y-4",children:l.quickAddHasVariants?(0,s.jsxs)(s.Fragment,{children:[n.optionGroups.map(e=>{var r;let i;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-[11px] 3xl:text-xs 4xl:text-sm font-medium uppercase tracking-[0.14em] text-[#737688]",children:(r=e.name,"size"===(i=r.trim().toLowerCase())||"sizes"===i?t.sizes:"color"===i||"colors"===i||"colour"===i||"colours"===i?t.colors:r)}),"size"===e.name.toLowerCase()&&n.sizingChartEnabled&&n.sizes.length>0&&l.quickAddSelectableTargetSystems.length>0&&(0,s.jsx)("button",{type:"button","data-testid":"open-size-guide",onClick:()=>l.setShowQuickAddSizeGuide(!0),className:"text-[11px] 3xl:text-xs 4xl:text-sm uppercase tracking-[0.14em] text-[#737688] underline underline-offset-2 transition hover:text-[#0039b3]",children:t.sizeGuide})]}),(0,s.jsx)("div",{className:e.values.length>=9?l.quickAddSizeGridClassName:l.quickAddColorGridClassName,children:e.values.map(t=>{let r=l.selectedCatalogOptions[e.name]===t.value;return(0,s.jsx)("button",{type:"button",onClick:()=>l.setCatalogOptionSelection(e.name,t.value),"aria-pressed":r,disabled:!t.hasPurchasableVariant,className:(0,y.El)({variant:"outline",size:"sm",className:(0,k.cn)("button-no-lift min-h-11 h-auto w-full overflow-hidden rounded-2xl border border-[#c3c5d9]/40 bg-white/80 px-0 py-2 text-[11px] 3xl:text-xs 4xl:text-sm text-[#243c88] shadow-[0_6px_18px_-16px_rgba(0,21,81,0.3)]",r?"border-[#95aafd] bg-[#dce1ff] font-semibold text-[#001551] shadow-[0_10px_24px_-20px_rgba(0,21,81,0.4)] hover:border-[#6f89e8]":t.hasPurchasableVariant?"border-[#c3c5d9]/55 text-[#243c88] hover:border-[#95aafd]":"border-[#c3c5d9]/35 text-[#8a90a6]")}),children:(0,s.jsx)("span",{className:"block max-w-full px-2 text-center leading-tight tracking-[0.04em] whitespace-normal [overflow-wrap:anywhere]",children:t.value})},`${e.name}:${t.value}`)})})]},e.name)}),l.quickAddDisplayVariant?.nonPurchasableReason&&(0,s.jsx)("p",{className:"type-label text-[#737688]",children:(0,a.VH)(l.quickAddDisplayVariant.nonPurchasableReason,{outOfStock:t.selectedVariantOutOfStock,missingPrice:t.selectedVariantMissingPrice,countryIneligible:t.selectedVariantCountryIneligible,unpublished:t.selectedVariantUnpublished,unavailable:t.selectedVariantUnavailable})})]}):(0,s.jsxs)(s.Fragment,{children:[n.sizes.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("p",{className:"text-[11px] 3xl:text-xs 4xl:text-sm font-medium uppercase tracking-[0.14em] text-[#737688]",children:t.sizes}),n.sizingChartEnabled&&n.sizes.length>0&&l.quickAddSelectableTargetSystems.length>0&&(0,s.jsx)("button",{type:"button","data-testid":"open-size-guide",onClick:()=>l.setShowQuickAddSizeGuide(!0),className:"text-[11px] 3xl:text-xs 4xl:text-sm uppercase tracking-[0.14em] text-[#737688] underline underline-offset-2 transition hover:text-[#0039b3]",children:t.sizeGuide})]}),(0,s.jsx)("div",{className:l.quickAddSizeGridClassName,children:n.sizes.map(e=>{let t=l.selectedSize?.label===e.label&&l.selectedSize?.system===e.system&&l.selectedSize?.tokenType===e.tokenType;return(0,s.jsx)("button",{type:"button",onClick:()=>l.setSelectedSize(e),"aria-pressed":t,className:(0,y.El)({variant:"outline",size:"sm",className:(0,k.cn)("button-no-lift min-h-11 h-auto w-full overflow-hidden rounded-2xl border border-[#c3c5d9]/40 bg-white/80 px-0 py-2 text-[11px] 3xl:text-xs 4xl:text-sm tabular-nums text-[#243c88] shadow-[0_6px_18px_-16px_rgba(0,21,81,0.3)]",t&&"border-[#95aafd] bg-[#dce1ff] font-semibold text-[#001551] shadow-[0_10px_24px_-20px_rgba(0,21,81,0.4)] hover:border-[#6f89e8]")}),children:(0,s.jsx)("span",{className:"block max-w-full px-2 text-center leading-tight tracking-[0.04em] whitespace-normal [overflow-wrap:anywhere]",children:(0,o.nt)(e)})},`${e.system??"UNK"}::${(0,o.nt)(e)}::${e.tokenType}`)})})]}),n.colors.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{className:"text-[11px] 3xl:text-xs 4xl:text-sm font-medium uppercase tracking-[0.14em] text-[#737688]",children:t.colors}),(0,s.jsx)("div",{className:l.quickAddColorGridClassName,children:n.colors.map(e=>{let t=l.selectedColor===e;return(0,s.jsx)("button",{type:"button",onClick:()=>l.setSelectedColor(e),"aria-pressed":t,className:(0,y.El)({variant:"outline",size:"sm",className:(0,k.cn)("button-no-lift min-h-11 h-auto w-full rounded-2xl border border-[#c3c5d9]/40 bg-white/80 px-0 py-2 text-[11px] 3xl:text-xs 4xl:text-sm text-[#243c88] shadow-[0_6px_18px_-16px_rgba(0,21,81,0.3)]",t&&"border-[#95aafd] bg-[#dce1ff] font-semibold text-[#001551] shadow-[0_10px_24px_-20px_rgba(0,21,81,0.4)] hover:border-[#6f89e8]")}),children:(0,s.jsx)("span",{className:"block truncate px-2 leading-tight tracking-[0.04em]",children:e})},e)})})]})]})})]})}let w=(0,l.default)(()=>r.e(3868).then(r.bind(r,13868)).then(e=>e.StorefrontQuickAddSizeGuide),{loadableGenerated:{webpack:()=>[13868]},ssr:!1});function C({addingItemId:e,copy:t,creatorCountry:r,item:l,onClose:b,onInlineAdd:h,onModalOpened:y,onRedirectToProduct:v}){let k=function({copy:e,creatorCountry:t,onInlineAdd:r}){let[s,l]=(0,i.useState)(null),[b,h]=(0,i.useState)(null),[y,v]=(0,i.useState)(!1),[k,z]=(0,i.useState)(null),[w,C]=(0,i.useState)(null),[A,j]=(0,i.useState)(null),[N,P]=(0,i.useState)({}),[S,I]=(0,i.useState)(!1),[V,q]=(0,i.useState)("US"),_=(0,i.useRef)(new Map),T=(0,i.useRef)(new Map),U=(0,i.useRef)(0),G=(0,i.useRef)(0),O=(0,i.useRef)(null),R=(0,i.useRef)(r);(0,i.useEffect)(()=>{R.current=r},[r]);let L=(0,i.useMemo)(()=>(0,o.kU)(s?.category,s?.brand),[s?.brand,s?.category]),M=(0,i.useMemo)(()=>(0,o.K6)(s?.brand),[s?.brand]),$=(0,i.useMemo)(()=>(0,n.Xs)({sizes:b?.sizes??[],domain:L,brandKey:M}),[b?.sizes,M,L]),E=(0,i.useMemo)(()=>(0,a.ao)($,b?.sizes??[]),[$,b?.sizes]),Q=(0,i.useMemo)(()=>(0,n.Z5)({sizes:b?.sizes??[],targetSystem:V,domain:L,brandKey:M}),[b?.sizes,M,L,V]),{quickAddDisplayVariant:F,quickAddHasVariants:D,quickAddRequiresPdpRedirect:H,quickAddSelectedVariant:K}=(0,i.useMemo)(()=>g({itemHasOptions:!!s?.hasOptions,options:b,selectedCatalogOptions:N}),[b,s?.hasOptions,N]),B=(0,i.useMemo)(()=>{let e=b?.sizes.length??0;return e<=1?"grid grid-cols-1 gap-2 sm:grid-cols-1 lg:grid-cols-1":e>=9?"grid grid-cols-3 gap-2 sm:grid-cols-4 lg:grid-cols-5":"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5"},[b?.sizes.length]),W=(0,i.useMemo)(()=>(b?.colors.length??0)<=1?"grid grid-cols-1 gap-2 sm:grid-cols-1 lg:grid-cols-1":"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5",[b?.colors.length]),X=(0,i.useCallback)(()=>{O.current=null,U.current+=1,G.current+=1},[]),Z=(0,i.useCallback)(()=>{X(),l(null),h(null),v(!1),z(null),C(null),j(null),P({}),I(!1),q("US")},[X]),J=(0,i.useCallback)(async t=>{let r=U.current+=1,s=()=>O.current===t&&U.current===r,i=d(_.current,t);if(i)return s()&&h(i),i;s()&&(v(!0),z(null));try{let e=await f({cache:_.current,fetchImpl:fetch,inFlightRequests:T.current,productId:t});return s()&&h(e),e}catch{return s()&&z(e.unableToLoadItems),null}finally{s()&&v(!1)}},[e.unableToLoadItems]),Y=(0,i.useCallback)(async t=>{var r;let s=G.current+=1,i=()=>O.current===t.id&&G.current===s;O.current=t.id,l(null),h(null),v(!1),z(null),C(null),j(null),P({});let n=await J(t.id);if(!i())return p;if(!n)return l(t),p;let d=(0,a.Kt)(n.variants);if(d){let r=c({catalogSelection:d,colorPrefix:e.colorPrefix,sizeLabel:e.sizeLabel}),s=await R.current({item:t,mode:"direct",overrides:u(r),catalogSelection:d});return i()&&(s?Z():l(t)),x(s)}let f=(r={colorPrefix:e.colorPrefix,options:n,sizeLabel:e.sizeLabel}).options.variants.length>0||r.options.sizes.length>1||r.options.colors.length>1||0===r.options.sizes.length&&0===r.options.colors.length?null:[r.options.sizes[0]?`${r.sizeLabel}: ${(0,o.nt)(r.options.sizes[0])}`:null,r.options.colors[0]?`${r.colorPrefix}: ${r.options.colors[0]}
1`:null].filter(Boolean).join(" \xb7 ");if(f){let e=await R.current({item:t,mode:"direct",overrides:u(f)});return i()&&(e?Z():(l(t),C(n.sizes[0]??null),j(n.colors[0]??null))),x(e)}return g({itemHasOptions:!!t.hasOptions,options:n,selectedCatalogOptions:{}}).quickAddRequiresPdpRedirect?(Z(),m):(l(t),p)},[e.colorPrefix,e.sizeLabel,J,Z]),ee=(0,i.useCallback)(async()=>{if(!s||!b)return{addedInline:!1,redirectedToProduct:!1};if(H)return Z(),{addedInline:!1,redirectedToProduct:!0};if(D){let t=(0,a.uf)({selectedVariant:K});if(!t)return K?K.purchasable?z(e.variantNotPurchasableCurrentCountry):z((0,a.VH)(K.nonPurchasableReason,{outOfStock:e.selectedVariantOutOfStock,missingPrice:e.selectedVariantMissingPrice,countryIneligible:e.selectedVariantCountryIneligible,unpublished:e.selectedVariantUnpublished,unavailable:e.selectedVariantUnavailable})):z(e.selectAvailableVariant),{addedInline:!1,redirectedToProduct:!1};let r=c({catalogSelection:t,colorPrefix:e.colorPrefix,sizeLabel:e.sizeLabel}),i=await R.current({item:s,mode:"modal",overrides:u(r),catalogSelection:t});return i&&Z(),{addedInline:i,redirectedToProduct:!1}}let t=[w?`${e.sizeLabel}: ${(0,o.nt)(w)}`:null,A?`${e.colorPrefix}: ${A}`:null].filter(Boolean).join(" \xb7 "),r=await R.current({item:s,mode:"modal",overrides:u(t)});return r&&Z(),{addedInline:r,redirectedToProduct:!1}},[e.colorPrefix,e.selectAvailableVariant,e.selectedVariantCountryIneligible,e.selectedVariantMissingPrice,e.selectedVariantOutOfStock,e.selectedVariantUnavailable,e.selectedVariantUnpublished,e.sizeLabel,e.variantNotPurchasableCurrentCountry,b,D,s,H,K,Z,A,w]),et=(0,i.useCallback)((e,t)=>{z(null),P(r=>(0,a.yD)({optionGroups:b?.optionGroups??[],selectedOptions:r,changedOptionName:e,changedOptionValue:t,variants:b?.variants??[]}))},[b?.optionGroups,b?.variants]);return(0,i.useEffect)(()=>{let e=(0,a.TD)(E,t);e&&q(e)},[t,E]),{confirmQuickAdd:ee,cancelQuickAddRequest:X,openQuickAdd:Y,options:b,optionsError:k,optionsLoading:y,quickAddColorGridClassName:W,quickAddConversions:Q,quickAddDisplayVariant:F,quickAddHasVariants:D,quickAddItem:s,quickAddRequiresPdpRedirect:H,quickAddSelectableTargetSystems:E,quickAddSelectedVariant:K,quickAddSizeGridClassName:B,resetQuickAdd:Z,selectedColor:A,selectedCatalogOptions:N,selectedSize:w,setOptionsError:z,setSelectedColor:j,setSelectedSize:C,setCatalogOptionSelection:et,setShowQuickAddSizeGuide:I,setTargetSystem:q,showQuickAddSizeGuide:S,targetSystem:V,canConfirm:!y&&!!s&&!!b&&(D?!H&&!!K?.purchasable&&!!b?.countryCode:(!b?.sizes.length||!!w)&&(!b?.colors.length||!!A))}}({copy:t,creatorCountry:r,onInlineAdd:h}),{cancelQuickAddRequest:C,openQuickAdd:A,confirmQuickAdd:j,quickAddItem:N}=k,P=(0,i.useRef)(null),S=(0,i.useRef)({onClose:b,onModalOpened:y,onRedirectToProduct:v});(0,i.useEffect)(()=>{S.current={onClose:b,onModalOpened:y,onRedirectToProduct:v}},[b,y,v]),(0,i.useEffect)(()=>{let e=!0;return A(l).then(t=>{if(e){if(t.redirectedToProduct){S.current.onRedirectToProduct(l.id),S.current.onClose();return}t.directAddAttempted&&t.addedInline&&S.current.onClose()}}),()=>{e=!1,C()}},[C,l,A]),(0,i.useEffect)(()=>{if(!N){P.current=null;return}P.current!==N.id&&(P.current=N.id,S.current.onModalOpened(N))},[N]);let I=(0,i.useCallback)(async()=>{let e=await j();if(e.redirectedToProduct&&N){S.current.onRedirectToProduct(N.id),S.current.onClose();return}e.addedInline&&S.current.onClose()},[j,N]);return(0,s.jsxs)(s.Fragment,{children:[N?(0,s.jsx)(z,{addingItemId:e,copy:t,onClose:b,onConfirm:I,quickAdd:k}):null,k.showQuickAddSizeGuide&&N?(0,s.jsx)(w,{open:!0,quickAdd:k,copy:t,onClose:()=>k.setShowQuickAddSizeGuide(!1)}):null]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.