PageSourceSearch

https://www.icaniwill.fi/_next/static/chunks/blocks/ShopTheLook.50…?dpl=dpl_J6DYkRVNUMv5UKTAoV5Q9hbP73uA

js icaniwill.fi collected 2026-09-26 09:35:33 UTC 7,544 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3216],{88770:(e,r,t)=>{t.r(r),t.d(r,{default:()=>J});var n,i,a,o,s,c,l,d,p,u=t(32228),h=t(66284),g=t(14232),m=t(10914),v=t(46842),x=t(77215),b=t(90642),f=t(66685),j=t(98089),y=t(63857),A=t(43604),k=t(52269),w=t(32206),O=t(43994),C=t(64291),S=t(99239),P=t(3801),D=t(93719),N=t(64665);function T(e,r){return"".concat(e," ").concat(r)}var E=t(37876);function R(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function _(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?R(Object(t),!0).forEach(function(r){(0,h.A)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var q="blocks/ShopTheLook/partials/ShopTheLookDialog.tsx",W=(0,v.Ay)("div",{target:"e19fjum61"})(e=>{var{theme:r}=e;return _(_({},r.typography.caption),{},{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",position:"relative",height:24,width:24,borderRadius:"50%",marginRight:r.spacing(1),border:"solid 1px currentColor"})},""),L=(0,v.Ay)("div",{target:"e19fjum60"})({name:"1itt64f",styles:"display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0, 1fr);gap:var(--cia-grid-gap)"});let M=function(e){var{currency:r,open:t,products:p,onClose:h}=e,{addItem:v}=(0,j.Oj)(),{onCartOpen:R}=(0,j.aT)(),{t:M}=(0,j.s9)(),z=g.useMemo(()=>p.map(e=>{var r=e.variants[0],t=r.items.find(D.SN)||r.items[0];return{variant:r,item:t}}),[p]),[I,B]=g.useState(!1),[H,K]=g.useState(!1),[U,F]=g.useState(z),G=g.useCallback(e=>r=>{var t=r.target.value,n=p[e].variants.find(e=>e.id===t),i=n.items.find(D.SN)||n.items[0];F(r=>r.map((r,t)=>e===t?{variant:n,item:i}:r))},[p]),J=g.useCallback(e=>r=>{var t=r.target.value;F(r=>r.map((r,n)=>e===n?_(_({},r),{},{item:r.variant.items.find(e=>e.item===t)}):r))},[]),Q=g.useCallback((0,y.A)(function*(){K(!1);var e=[];B(!0);var r=function*(){var r=t.item.item;yield v(r,"shop_the_look_block").then(t=>{t&&"errors"in t&&(console.error(t.errors),e.push(r))}).catch(t=>{console.error(t),e.push(r)})};for(var t of U)yield*r();(B(!1),e.length)?K(!0):(h(),R())}),[U,v,R,h]);g.useEffect(()=>{F(z)},[z]);var V=p.length>0&&U.every(e=>(0,D.SN)(e.item)),X=U.reduce((e,r)=>e+r.variant.priceAsNumber,0);return(0,E.jsxs)(A.A,{open:t,onClose:h,children:[(0,E.jsxs)(k.A,{variant:"h3",children:[M(q)(n||(n=(0,u.A)(["Shop the look"]))),(0,E.jsx)(w.A,{sx:{float:"right",p:0},onClick:h,color:"inherit","aria-label":M(q)(i||(i=(0,u.A)(['Close "Shop the look" dialog']))),children:a||(a=(0,E.jsx)(b.US,{}))})]}),(0,E.jsxs)(O.A,{children:[(0,E.jsx)(L,{children:p.length>0&&p.map((e,r)=>{var t,n,i=U[r];return(0,E.jsxs)("article",{children:[(0,E.jsx)(f.Wk,{href:i.variant.href,children:(0,E.jsx)(m.A,_(_({},N.C1.product),{},{children:(0,E.jsx)(b.RA,{component:"img",src:(null==(t=i.variant)?void 0:t.image)||""})}))}),(0,E.jsx)(C.A,{value:i.variant.id,onChange:G(r),variant:"standard",sx:{mt:1},fullWidth:!0,children:e.variants.map((e,r)=>(0,E.jsxs)(S.A,{value:e.id,children:[(0,E.jsx)(W,{sx:{backgroundColor:e.colorHex||"#000"}}),e.variantName]},r))}),(0,E.jsx)(C.A,{value:i.item.item,onChange:J(r),variant:"standard",sx:{mt:1},fullWidth:!0,children:null==(n=i.variant)?void 0:n.items.map((e,r)=>{var t=(0,D.SN)(e);return(0,E.jsxs)(S.A,{value:e.item,disabled:!t,children:[(0,E.jsx)(W,{children:e.name}),t?M(q)(o||(o=(0,u.A)(["Size ",""])),e.name):M(q)(s||(s=(0,u.A)(["Sold out"])))]},r)})})]},r)})}),(0,E.jsxs)(P.A,{variant:"contained",sx:{mt:4},fullWidth:!0,disabled:!V,onClick:Q,loading:I,children:[M(q)(c||(c=(0,u.A)(["Add to cart"])))," (",T(X,r),")"]}),!V&&(0,E.jsx)(x.A,{variant:"subtitle2",color:"error",textAlign:"center",sx:{mt:1},children:M(q)(l||(l=(0,u.A)(["Some selected sizes are out of stock"])))}),V&&H&&(0,E.jsx)(x.A,{variant:"subtitle2",color:"error",textAlign:"center",sx:{mt:1},children:M(q)(d||(d=(0,u.A)(["There was an error when adding the products to the cart"])))})]})]})};function z(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function I(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
1r%2?z(Object(t),!0).forEach(function(r){(0,h.A)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):z(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var B={width:1,height:2},H=(0,v.Ay)("section",{target:"e1fwxwqo4"})({name:"kfamuy",styles:"margin-block:var(--cia-section-spacing);max-width:900px;margin-inline:auto"}),K=(0,v.Ay)("div",{target:"e1fwxwqo3"})({name:"xdmj3u",styles:"display:grid;grid-template-columns:repeat(3, 1fr);grid-template-rows:auto auto;column-gap:var(--cia-grid-gap);row-gap:0;& > article{display:contents;}"}),U=(0,v.Ay)("div",{target:"e1fwxwqo2"})(e=>{var{theme:r}=e;return{position:"absolute",bottom:0,right:0,backgroundColor:"rgba(256,256,256,0.45)",padding:r.spacing(.5)}},""),F=(0,v.Ay)("div",{target:"e1fwxwqo1"})(e=>{var{theme:r}=e;return{paddingInline:r.spacing(1),paddingBlock:r.spacing(1)}},""),G=(0,v.Ay)("button",{target:"e1fwxwqo0"})(e=>{var{theme:r}=e;return{all:"unset",appearance:"none",width:"100%",display:"grid",gridTemplateRows:"subgrid",gridRow:"span 2",cursor:"pointer",transition:r.transitions.create("background-color"),"&:hover, &:focus":{backgroundColor:r.palette.action.hover},"&:focus-visible":{outline:"-webkit-focus-ring-color auto 5px;",outlineOffset:2}}},"");let J=function(e){var{currency:r,heading:t,lookImageSrc:n,lookName:i,products:a}=e,{t:o}=(0,j.s9)(),[s,c]=g.useState(!1),l=g.useCallback(()=>{c(!0)},[]),d=g.useCallback(()=>{c(!1)},[]),h=null==a?void 0:a.reduce((e,r)=>e+Math.min(...r.variants.map(e=>e.priceAsNumber)),0),v=null==a?void 0:a.reduce((e,r)=>e+Math.max(...r.variants.map(e=>e.priceAsNumber)),0),y=h===v?T(h,r):"".concat(T(h,r)," - ").concat(T(v,r));return(0,E.jsxs)(H,{children:[t&&(0,E.jsx)(b.Tw,{heading:t}),(0,E.jsxs)(K,{children:[(0,E.jsx)("article",{children:(0,E.jsxs)(G,{onClick:l,type:"button",children:[(0,E.jsxs)("div",{style:{position:"relative"},children:[(0,E.jsx)(m.A,{children:(0,E.jsx)(b.RA,I({component:"img",src:n},B))}),(0,E.jsx)(U,{children:(0,E.jsx)(b.Kj,{sx:{display:"block"}})})]}),(0,E.jsxs)(F,{children:[(0,E.jsx)(x.A,{component:"h3",variant:"subtitle2",sx:e=>I(I({},e.mixins.lineClamp(2)),{},{[e.breakpoints.up("md")]:e.typography.h6}),children:i}),(0,E.jsx)(x.A,{variant:"body2",sx:e=>({[e.breakpoints.up("md")]:e.typography.body1}),children:y})]})]})}),a.map((e,r)=>(0,E.jsx)("article",{children:(0,E.jsxs)(G,{as:f.Wk,href:e.href,style:{textDecoration:"none"},children:[(0,E.jsx)(m.A,{children:(0,E.jsx)(b.RA,I({component:"img",src:e.imageSrc},B))}),(0,E.jsxs)(F,{children:[(0,E.jsx)(x.A,{component:"h3",variant:"subtitle2",sx:e=>I(I({},e.mixins.lineClamp(2)),{},{[e.breakpoints.up("md")]:e.typography.h6}),children:e.name}),(0,E.jsx)(x.A,{variant:"body2",sx:e=>({[e.breakpoints.up("md")]:e.typography.body1}),children:o("blocks/ShopTheLook/ShopTheLook.tsx")(p||(p=(0,u.A)([""," colors"])),e.variants.length)})]})]})},r))]}),(0,E.jsx)(M,{currency:r,open:s,onClose:d,products:a})]})}}}]);

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.