PageSourceSearch

https://www.wired.com/verso/static/chunk.6677.3a3a8ae058c13e56ea5c.js

js wired.com collected 2026-09-24 05:18:34 UTC 14,448 bytes, 274 lines download raw bytes

1"use strict";(globalThis.webpackChunkverso=globalThis.webpackChunkverso||[]).push([[6677],{56677(e,a,i){i.r(a),i.d(a,{default:()=>le});var t=i(34786),r=i.n(t),n=i(5556),o=i.n(n),l=i(96540),s=i(6442),d=i(38267),h=i(76399),p=i(69657);const g=()=>"undefined"==typeof navigator?void 0:navigator,c=async(e,a=g())=>{if(!((e,a=g())=>{if(!e||!Object.keys(e).length||!a?.share)return!1;if(e.files?.length)try{return Boolean(a.canShare&&a.canShare(e))}catch{return!1}return!0})(e,a))return{attempted:!1,error:null};try{return await a.share(e),{attempted:!0,error:null}}catch(e){return{attempted:!0,error:e}}};var m=i(86157),u=i(53499),w=i(7285),y=i(16631),f=i(18608),v=i(26865),b=i(30093);const{card:x,details:$,footer:E,identity:S,media:R,profileImage:A,rating:C}=b.EY,k=(e,a,i)=>{const t=(0,v.nv)(e,a),r=(0,v.nv)(e,`typography.typefaces.${t.family}.fallback`,!1)?.replace(/^['"]|['"]$/g,"")||"sans-serif";return[i??t.italic?"italic":"normal",t.weight,`${t["mobile-size"]}px`,`${t.family}, ${r}`].join(" ")},M=d.Ay.div.withConfig({displayName:"ReviewShareAssetWrapper"})`
2  position: relative;
3  flex: 0 0 auto;
4  background: linear-gradient(
5    180deg,
6    ${(0,v.HK)("colors.interactive.base.dark")} 0%,
7    ${(0,v.HK)("colors.interactive.base.light")} 100%
8  );
9  width: ${b.EY.width}px;
10  height: ${b.EY.height}px;
11  overflow: hidden;
12`,N=d.Ay.div.withConfig({displayName:"ReviewShareAssetCard"})`
13  display: grid;
14  position: absolute;
15  top: ${x.y}px;
16  left: ${x.x}px;
17  grid-template-rows: ${x.detailsHeight}px ${x.footerHeight}px;
18  row-gap: ${E.gap}px;
19  width: ${x.width}px;
20  height: ${x.height}px;
21`,L=d.Ay.div.withConfig({displayName:"ReviewShareAssetDetails"})`
22  position: relative;
23  box-sizing: border-box;
24  border-radius: ${x.radius}px;
25  background: ${(0,v.HK)("colors.interactive.base.light")};
26  padding: ${$.paddingTop}px ${$.paddingX}px
27    ${$.paddingBottom}px;
28  height: ${x.detailsHeight}px;
29  overflow: hidden;
30`,H=d.Ay.div.withConfig({displayName:"ReviewShareAssetMediaRow"})`
31  display: flex;
32  column-gap: ${R.gap}px;
33  height: ${R.height}px;
34`,K=d.Ay.div.withConfig({displayName:"ReviewShareAssetProfileImage"})`
35  flex: 0 0 ${A.size}px;
36  width: ${A.size}px;
37  height: ${A.size}px;
38  overflow: hidden;
39
40  .responsive-asset,
41  .responsive-image,
42  picture,
43  img {
44    display: block;
45    width: 100%;
46    height: 100%;
47  }
48
49  img {
50    object-fit: cover;
51  }
52`,q=d.Ay.div.withConfig({displayName:"ReviewShareAssetRatingGroup"})`
53  flex: 0 0 ${C.size}px;
54  margin-top: ${C.offsetTop}px;
55  width: ${C.size}px;
56  text-align: center;
57`,I=(0,d.Ay)(w.A).withConfig({displayName:"ReviewShareAssetCircularRating"})`
58  box-sizing: border-box;
59  border: ${C.borderWidth}px solid
60    ${(0,v.HK)("colors.interactive.base.black")};
61  border-radius: 50%;
62  width: ${C.size}px;
63  height: ${C.size}px;
64
65  ${y.Vs} {
66    box-sizing: border-box;
67    border-width: ${C.borderWidth}px;
68    width: ${C.innerSize}px;
69    height: ${C.innerSize}px;
70
71    &::before {
72      content: none;
73    }
74  }
75
76  ${y.El} {
77    ${(0,v.Gg)("typography.definitions.consumptionEditorial.subhed-break-secondary")}
78    color: ${(0,v.HK)("colors.interactive.base.black")};
79  }
80`,z=(0,d.Ay)(f.vm).withConfig({displayName:"ReviewShareAssetRatingLabel"}).attrs({as:"span",typeIdentity:"typography.definitions.globalEditorial.accreditation-core"})`
81  display: block;
82  margin-top: ${C.labelGap}px;
83  height: ${C.labelLineHeight}px;
84  overflow: hidden;
85  text-transform: none;
86  text-overflow: ellipsis;
87  line-height: ${C.labelLineHeight}px;
88  white-space: nowrap;
89  color: ${(0,v.HK)("colors.background.black")};
90`,T=(0,d.Ay)(f.vm).withConfig({displayName:"ReviewShareAssetName"}).attrs({as:"p",typeIdentity:"typography.definitions.consumptionEditorial.hed-standard"})`
91  margin: 0;
92  max-width: 250px;
93  height: ${S.nameLineHeight}px;
94  overflow: hidden;
95  text-overflow: ellipsis;
96  line-height: ${S.nameLineHeight}px;
97  white-space: nowrap;
98  color: ${(0,v.HK)("colors.consumption.lead.standard.heading")};
99  font-style: italic;
100`,B=d.Ay.div.withConfig({displayName:"ReviewShareAssetIdentity"})`
101  margin-top: ${S.marginTop}px;
102`,j=(0,d.Ay)(f.vm).withConfig({displayName:"ReviewShareAssetUsername"}).attrs({as:"p",typeIdentity:"typography.definitions.globalEditorial.accreditation-core"})`
103  margin: 0;
104  max-width: 250px;
105  height: ${S.usernameLineHeight}px;
106  overflow: hidden;
107  text-transform: none;
108  text-overflow: ellipsis;
109  line-height: ${S.usernameLineHeight}px;
110  white-space: nowrap;
111  color: ${(0,v.HK)("colors.background.black")};
112`,O=d.Ay.div.withConfig({displayName:"ReviewShareAssetHandleContainer"})`
113  display: flex;
114  align-items: center;
115  justify-content: space-between;
116  border-radius: ${x.radius}px;
117  background: ${(0,v.HK)("colors.interactive.base.light")};
118  padding: 0 ${E.x}px;
119  height: ${x.footerHeight}px;
120`,P=(0,d.Ay)(f.vm).withConfig({displayName:"ReviewShareAssetHandle"}).attrs({as:"span",typeIdentity:"typography.definitions.globalEditorial.accreditation-feature"})`
121  flex: 1 1 auto;
122  min-width: 0;
123  max-width: ${E.handleWidth}px;
124  overflow: hidden;
125  text-overflow: ellipsis;
126  white-space: nowrap;
127  color: ${(0,v.HK)("colors.background.black")};
128`,U=d.Ay.div.withConfig({displayName:"ReviewShareAssetLogo"})`
129  flex: 0 0 ${E.logoWidth}px;
130  width: ${E.logoWidth}px;
131
132  .responsive-asset,
133  .responsive-image,
134  picture,
135  img {
136    display: block;
137    width: 100%;
138  }
139`,_=({handle:e,logo:a,name:i,profileImage:t,rating:r,ratingLabel:n,username:o})=>(l.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(u.G.RENDER,{name:"ReviewShareAsset"})},[]),l.createElement(M,{"data-testid":"ReviewShareAsset"},l.createElement(N,null,l.createElement(L,null,l.createElement(H,null,l.createElement(K,null,l.createElement(m.A,{...t,imageAttributes:{loading:"eager"},shouldHoldImageSpace:!0})),l.createElement(q,null,l.createElement(I,{rating:r,size:"lg"}),l.createElement(z,null,n))),l.createElement(B,null,l.createElement(T,null,e),l.createElement(j,null,i))),l.createElement(O,null,l.createElement(P,null,o),l.createElement(U,null,l.createElement(m.A,{...a,imageAttributes:{loading:"eager"},shouldHoldImageSpace:!0}))))));_.propTypes={handle:o().string.isRequired,logo:o().shape(m.A.propTypes).isRequired,name:o().string.isRequired,profileImage:o().shape(m.A.propTypes).isRequired,rating:o().oneOfType([o().number,o().string]).isRequired,ratingLabel:o().string.isRequired,username:o().string.isRequired};const W=_;var G=i(20312),Y=i.n(G),D=i(73730),V=i(50531);const X=({className:e,configuredComponentRef:a,...i})=>l.createElement(Y(),{...i,className:`${e}__content`,overlayClassName:`${e}__overlay`,portalClassName:e,ref:a});X.propTypes={className:o().string,configuredComponentRef:o().func};const F=(0,d.Ay)(X).withConfig({displayName:"ReviewShareModal"})`
140  &__overlay {
141    display: flex;
142    position: fixed;
143    top: 0;
144    right: 0;
145    bottom: 0;
146    left: 0;
147    align-items: center;
148    justify-content: center;
149    z-index: ${1e3};
150    background: #1d1d1dcc;
151  }
152
153  &__content {
154    display: grid;
155    position: relative;
156    grid-template-rows: auto auto;
157    row-gap: ${(0,v.Kq)(3)};
158    align-content: center;
159    outline: 0;
160    background: transparent;
161    width: min(100%, 393px);
162    height: min(100%, 900px);
163    overflow: hidden;
164  }
165`,J=(0,d.Ay)(D.A.UtilityInverted).withConfig({displayName:"ReviewShareModalCloseButton"})`
166  position: absolute;
167  top: ${(0,v.Kq)(2)};
168  right: ${(0,v.Kq)(1)};
169  z-index: 2;
170  border: 0;
171  background: transparent;
172  padding: ${(0,v.Kq)(1)};
173  min-width: 40px;
174  min-height: 40px;
175
176  &,
177  &:hover,
178  &:focus,
179  &:active {
180    border: 0;
181    background: transparent;
182  }
183
184  svg {
185    width: 24px;
186    height: 24px;
187    fill: ${(0,v.HK)("colors.interactive.base.white")};
188  }
189
190  svg g,
191  svg path {
192    stroke: ${(0,v.HK)("colors.interactive.base.white")};
193  }
194`,Q=d.Ay.div.withConfig({displayName:"ReviewShareModalPreviewStage"})`
195  display: flex;
196  align-items: center;
197  justify-content: center;
198  height: ${b.EY.height}px;
199  min-height: 0;
200  overflow: hidden;
201
202  @media (max-height: 760px) {
203    height: ${.84*b.EY.height}px;
204  }
205
206  @media (max-height: 660px) {
207    height: ${.72*b.EY.height}px;
208  }
209`,Z=d.Ay.div.withConfig({displayName:"ReviewShareModalPreview"})`
210  flex: 0 0 auto;
211
212  @media (max-height: 760px) {
213    transform: scale(0.84);
214  }
215
216  @media (max-height: 660px) {
217    transform: scale(0.72);
218  }
219`,ee=d.Ay.div.withConfig({displayName:"ReviewShareModalActions"})`
220  display: flex;
221  align-items: center;
222  justify-content: center;
223  column-gap: ${(0,v.Kq)(1)};
224  height: 50px;
225`,ae=(0,d.Ay)(D.A.Utility).withConfig({displayName:"ReviewShareModalSaveButton"})`
226  && {
227    margin: 0;
228    padding: 0 ${(0,v.Kq)(2.5)};
229    width: 181px;
230    height: 48px;
231  }
232
233  ${V.Lj} {
234    white-space: nowrap;
235  }
236`,ie=(0,d.Ay)(D.A.Primary).withConfig({displayName:"ReviewShareModalShareButton"})`
237  && {
238    margin: 0;
239    padding: 0 ${(0,v.Kq)(2.5)};
240    width: 168px;
241    height: 50px;
242  }
243
244  ${V.ny} {
245    padding-right: ${(0,v.Kq)(2)};
246  }
247
248  ${V.a2} {
249    width: ${(0,v.Kq)(3)};
250    height: ${(0,v.Kq)(3)};
251  }
252
253  ${V.Lj} {
254    white-space: nowrap;
255  }
256
257  svg path {
258    fill: currentColor;
259  }
260`,te=(0,d.Ay)(f.vm).withConfig({displayName:"ReviewShareModalStatusMessage"}).attrs({as:"p",typeIdentity:"typography.definitions.foundation.meta-secondary"})`
261  position: absolute;
262  bottom: 64px;
263  left: 50%;
264  transform: translateX(-50%);
265  margin: 0;
266  white-space: nowrap;
267  color: ${(0,v.HK)("colors.interactive.base.white")};
268`,re=(0,d.Ay)(te).withConfig({displayName:"ReviewShareModalErrorMessage"})`
269  bottom: 64px;
270  padding: 0 ${(0,v.Kq)(2)};
271  width: 100%;
272  text-align: center;
273  white-space: normal;
274`;const ne=(0,i(72267).YK)({closeLabel:{id:"ReviewShareModal.CloseLabel",defaultMessage:"Close share image",description:"Accessible label for the review share modal close button"},modalLabel:{id:"ReviewShareModal.ModalLabel",defaultMessage:"Share your review",description:"Accessible label for the review share modal"},saveLabel:{id:"ReviewShareModal.SaveLabel",defaultMessage:"Save to photos",description:"Button label for saving a review share image to photos"},shareLabel:{id:"ReviewShareModal.ShareLabel",defaultMessage:"Share image",description:"Button label for sharing a review image"}
274,generatingMessage:{id:"ReviewShareModal.GeneratingMessage",defaultMessage:"Creating your share image",description:"Status announced while a review share image is generated"},generationError:{id:"ReviewShareModal.GenerationError",defaultMessage:"We could not create your share image. Please try again.",description:"Error displayed when a review share image cannot be generated"},shareUnavailable:{id:"ReviewShareModal.ShareUnavailable",defaultMessage:"Image sharing is not available in this browser.",description:"Error displayed when native file sharing is unavailable"},shareError:{id:"ReviewShareModal.ShareError",defaultMessage:"We could not share your image. Please try again.",description:"Error displayed when native sharing fails"}}),oe=({asset:e,brandName:a,isVisible:t,onClose:n,onSave:o,onShare:g})=>{const{formatMessage:m}=(0,s.A)(),w=(0,d.DP)(),[y,f]=l.useState(null),[b,x]=l.useState("idle"),[$,E]=l.useState(null),[S,R]=l.useState(0),A=l.useMemo(()=>(e=>({backgroundEnd:(0,v.HK)(e,"colors.interactive.base.light"),backgroundStart:(0,v.HK)(e,"colors.interactive.base.dark"),surface:(0,v.HK)(e,"colors.interactive.base.light"),text:(0,v.HK)(e,"colors.interactive.base.black")}))(w),[w]),C=l.useMemo(()=>(e=>({handle:k(e,"typography.definitions.globalEditorial.accreditation-feature"),metadata:k(e,"typography.definitions.globalEditorial.accreditation-core"),name:k(e,"typography.definitions.consumptionEditorial.hed-standard",!0),rating:k(e,"typography.definitions.consumptionEditorial.subhed-break-secondary")}))(w),[w]);l.useEffect(()=>{window.Kendra.TRACK_COMPONENT.broadcast(u.G.RENDER,{name:"ReviewShareModal"})},[]),l.useEffect(()=>{let n=!0;return t?(f(null),x("generating"),E(null),i.e(6802).then(i.bind(i,46802)).then(({default:a})=>a({...e,shareAssetColors:A,shareAssetTypography:C})).then(i=>{n&&(f(((e,a)=>new File([e],a,{type:"image/png"}))(i,((e,a)=>{const i=r()(e||""),t=r()(a||"");return`${i?`${i}-`:""}review${t?`-${t}`:""}.png`})(a,e.handle))),x("ready"))}).catch(()=>{n&&(x("error"),E(m(ne.generationError)))}),()=>{n=!1}):(f(null),x("idle"),E(null),()=>{n=!1})},[e,a,m,t,A,C]),l.useEffect(()=>{if(!t)return void R(0);const e=document.querySelector("[data-testid='StackedNavigationHeader']"),a=e?.style.zIndex;e&&(e.style.zIndex="1001");const i=()=>{const a=e?.getBoundingClientRect().bottom??0;R(Math.max(0,Math.round(a)))};return i(),window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i),e&&(e.style.zIndex=a)}},[t]);const M="generating"===b,N="ready"!==b,L="undefined"==typeof document?void 0:document.getElementById("app-root");return l.createElement(F,{appElement:L,ariaHideApp:Boolean(L),contentLabel:m(ne.modalLabel),isOpen:t,onRequestClose:n,shouldCloseOnOverlayClick:!0,style:{overlay:{top:`${S}px`}}},l.createElement(J,{ariaLabel:m(ne.closeLabel),ButtonIcon:h.A,isIconButton:!0,label:m(ne.closeLabel),onClickHandler:n,shouldEnableClickTracking:!1}),l.createElement(Q,null,l.createElement(Z,null,l.createElement(W,{...e}))),l.createElement(te,{"aria-live":"polite"},M?m(ne.generatingMessage):null),$&&l.createElement(re,{role:"alert"},$),l.createElement(ee,null,l.createElement(ae,{ariaLabel:m(ne.saveLabel),isDisabled:N,label:m(ne.saveLabel),onClickHandler:()=>{y&&((e=>{const a=URL.createObjectURL(e),i=document.createElement("a");i.download=e.name,i.href=a,i.rel="noopener",i.style.display="none",document.body.appendChild(i),i.click(),i.remove(),window.setTimeout(()=>URL.revokeObjectURL(a),0)})(y),o?.({fileName:y.name,type:"review-image"}))},shouldEnableClickTracking:!1,shouldShowLoadingState:M}),l.createElement(ie,{ariaLabel:m(ne.shareLabel),ButtonIcon:p.A,hasEnableIcon:!0,iconPosition:"before",isDisabled:N,label:m(ne.shareLabel),onClickHandler:async()=>{if(!y)return;E(null);const e=await c({files:[y]});e.attempted?"AbortError"!==e.error?.name&&(e.error?E(m(ne.shareError)):g?.({fileName:y.name,type:"native-sharing"})):E(m(ne.shareUnavailable))},shouldEnableClickTracking:!1,shouldShowLoadingState:M})))};oe.propTypes={asset:o().shape(W.propTypes).isRequired,brandName:o().string,isVisible:o().bool.isRequired,onClose:o().func.isRequired,onSave:o().func,onShare:o().func};const le=oe}}]);

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.