PageSourceSearch

https://puffy.com/_next/static/chunks/7c230be8a6596bc9.js?dpl=dpl_7vVaWDBoR23N1YCADZCw1HXCoomw

js puffy.com collected 2026-09-25 18:42:16 UTC 17,288 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,130012,e=>{"use strict";var t=e.i(827293),n=e.i(705268),r=e.i(647163),s=e.i(174884),i=e.i(349841),a=e.i(506567),o=e.i(359884),l=e.i(192251);let c=({review:e,isActive:n=!0})=>{let[r,s]=(0,l.useState)(!1),[i,c]=(0,l.useState)(!1);(0,l.useEffect)(()=>{n||s(!1)},[n]);let u=(0,l.useCallback)(e=>{e.preventDefault(),s(e=>!e)},[]);return(0,t.jsxs)("div",{className:"w-full rounded-lg px-7 py-2 md:p-5 lg:p-10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"text-xl font-medium text-strong",children:e.author}),(0,t.jsxs)("div",{className:"flex items-center gap-1 text-soft",children:[(0,t.jsx)(a.CircleCheckIcon,{className:"size-8 text-icon-soft-slate"}),(0,t.jsx)("span",{className:"text-lg font-medium md:text-sm",children:"Verified"})]})]}),(0,t.jsx)("div",{className:"mt-2 text-primary-500 lg:mt-4",children:Array.from({length:5},(n,r)=>(0,t.jsx)("svg",{className:"inline-block size-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M8.0625 0.5L9.85861 6.02786H15.671L10.9687 9.44427L12.7648 14.9721L8.0625 11.5557L3.36022 14.9721L5.15633 9.44427L0.454048 6.02786H6.26639L8.0625 0.5Z",fill:"#333333"})},`rating-${e.author}-${r}`))}),(0,t.jsxs)("div",{className:"mt-4 lg:mt-6",children:[!!e.title&&(0,t.jsx)("p",{className:"text-lg font-bold text-strong",children:e.title}),(0,t.jsx)("div",{className:"mt-2 text-lg font-medium text-soft",children:e.lines?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Truncate,{lines:r?0:e.lines,onTruncate:c,ellipsis:(0,t.jsxs)("span",{children:["..."," ",(0,t.jsx)("a",{href:"#",className:"font-medium underline hover:no-underline",onClick:u,children:"Read more"})]}),children:e.review}),!i&&r&&(0,t.jsxs)("span",{children:[" ",(0,t.jsx)("a",{href:"#",className:"font-medium underline hover:no-underline",onClick:u,children:"Show less"})]})]}):e.review})]})]})};var u=e.i(919737),d=e.i(955103);let m=({className:e})=>(0,t.jsxs)("div",{className:(0,r.cn)("relative flex w-fit max-w-[160px] items-center justify-center",e),children:[(0,t.jsx)("span",{className:"pointer-events-none absolute left-[50%] top-[50%] z-10 h-[25px] w-[2px] bg-strong [transform:translate(-50%,_-50%)]"}),(0,t.jsx)(u.CarouselPrevious,{iconElement:(0,t.jsx)(d.ArrowRight_36,{className:"size-6 rotate-[180deg] text-strong"}),className:"static m-0 h-[72px] w-[80px] shrink-0 transform-none rounded-none rounded-l-lg border border-r-0 border-sub-strong bg-transparent hover:bg-transparent disabled:bg-transparent disabled:opacity-100 [&:disabled>svg]:text-primary-300"}),(0,t.jsx)(u.CarouselNext,{iconElement:(0,t.jsx)(d.ArrowRight_36,{className:"size-6 text-strong"}),className:"static m-0 h-[72px] w-[80px] shrink-0 transform-none rounded-none rounded-r-lg border border-l-0 border-sub-strong bg-transparent hover:bg-transparent disabled:bg-transparent disabled:opacity-100 [&:disabled>svg]:text-primary-300"})]});var f=e.i(513225),h=e.i(71829),p=e.i(418764),x=e.i(293701);let v=({content:e,ctaButtonClassName:s})=>(0,t.jsxs)("section",{children:[(0,t.jsx)("div",{className:"mx-auto flex max-w-[468px] flex-col gap-4 md:max-w-none md:flex-row md:gap-6 lg:gap-8",children:e.map((e,n)=>(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(c,{review:e})},`review-${e.author}-${n}`))}),(0,t.jsx)(n.CTAButton,{variant:"outline",href:"/pages/puffy-mattress-reviews",className:(0,r.cn)("mx-auto mt-8 md:mt-10 lg:mt-12",s),children:"Read More Reviews"})]});e.s(["ReviewsCarousel",0,({content:e=s.emptyCartReviews,title:n=(0,t.jsxs)("strong",{children:["Join ",h.TOTAL_REVIEWS,"+ Well-Rested Puffy Sleepers",(0,t.jsx)("br",{})," Who Rate Us 5 Stars"]}),description:a="","data-testid":o="reviews_carousel",noCarousel:d=!1,className:g,ctaButtonClassName:w})=>{let b=(0,i.useMediaQuery)("(max-width: 767px)"),[j,M]=(0,l.useState)(),[E,y]=(0,l.useState)(0);(0,l.useEffect)(()=>{if(!j)return;let e=()=>y(j.selectedScrollSnap());return j.on("select",e),()=>{j.off("select",e)}},[j]);let S=b&&e.length>1||!b&&e.length>3;return(0,t.jsxs)("section",{className:(0,r.cn)("container py-10 md:px-8 md:py-14 lg:py-20",g),"data-testid":o,children:[(0,t.jsx)(f.SectionHeader,{title:n,description:a}
1),d||!S?(0,t.jsx)(v,{content:e,ctaButtonClassName:w}):(0,t.jsxs)(u.Carousel,{setApi:M,className:"w-full max-w-full overflow-hidden",opts:{dragFree:!1,align:"start",inViewThreshold:1},plugins:[(0,x.WheelGesturesPlugin)(),(0,p.default)({draggable:"cursor-grab",dragging:"cursor-grabbing"})],children:[(0,t.jsx)(u.CarouselContent,{className:"ml-0 gap-4 overflow-visible md:gap-6 lg:gap-8",children:e.map((e,n)=>(0,t.jsx)(u.CarouselItem,{className:"w-full select-none pl-0 [flex:0_0_100%] md:[flex:0_0_calc(100%/2)] lg:[flex:0_0_calc((100%/3)-32px)]",children:(0,t.jsx)(c,{review:e,isActive:E===n})},`review-${e.author}-${n}`))}),(0,t.jsx)(m,{className:"mx-auto mt-8 md:mt-10 lg:mt-12"})]})]})}],130012)},293701,e=>{"use strict";function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function n(e,t){if(e.length!==t.length)throw Error("vectors must be same length");return e.map(function(e,n){return e+t[n]})}function r(e){return Math.max.apply(Math,e.map(Math.abs))}function s(e){return Object.freeze(e),Object.values(e).forEach(function(e){null===e||"object"!=typeof e||Object.isFrozen(e)||s(e)}),e}e.i(128265);var i=[1,18,"u">typeof window&&window.innerHeight||800],a=[-1,-1,-1],o=s({preventWheelAction:!0,reverseSign:[!0,!0,!1]});function l(){return{isStarted:!1,isStartPublished:!1,isMomentum:!1,startTime:0,lastAbsDelta:1/0,axisMovement:[0,0,0],axisVelocity:[0,0,0],accelerationFactors:[],scrollPoints:[],scrollPointsToMerge:[],willEndTimeout:400}}let c=function(e){void 0===e&&(e={});var c,u,d,m,f,h=function(){var e={};function t(t,n){e[t]=(e[t]||[]).filter(function(e){return e!==n})}return s({on:function(n,r){return e[n]=(e[n]||[]).concat(r),function(){return t(n,r)}},off:t,dispatch:function(t,n){t in e&&e[t].forEach(function(e){return e(n)})}})}(),p=h.on,x=h.off,v=h.dispatch,g=o,w=l(),b=!1,j=function(e){Array.isArray(e)?e.forEach(function(e){return S(e)}):S(e)},M=function(e){return(void 0===e&&(e={}),Object.values(e).some(function(e){return null==e}))?g:g=s(t({},o,g,e))},E=function(e){var r=t({event:m,isStart:!1,isEnding:!1,isMomentumCancel:!1,isMomentum:w.isMomentum,axisDelta:[0,0,0],axisVelocity:w.axisVelocity,axisMovement:w.axisMovement,get axisMovementProjection(){return n(r.axisMovement,r.axisVelocity.map(function(e){var t;return void 0===t&&(t=.996),e*t/(1-t)}))}},e);v("wheel",t({},r,{previous:f})),f=r},y=function(e,t){var n=g.preventWheelAction,r=t[0],s=t[1],i=t[2];if("boolean"==typeof n)return n;switch(n){case"x":return Math.abs(r)>=e;case"y":return Math.abs(s)>=e;case"z":return Math.abs(i)>=e;default:return!1}},S=function(e){var s,o,l,c,u=(c=function(e,n){if(!n)return e;var r=!0===n?a:n.map(function(e){return e?-1:1});return t({},e,{axisDelta:e.axisDelta.map(function(e,t){return e*r[t]})})}((s=e.deltaX*i[e.deltaMode],o=e.deltaY*i[e.deltaMode],l=(e.deltaZ||0)*i[e.deltaMode],{timeStamp:e.timeStamp,axisDelta:[s,o,l]}),g.reverseSign),t({},c,{axisDelta:c.axisDelta.map(function(e){return Math.min(Math.max(-700,e),700)})})),d=u.axisDelta,f=u.timeStamp,h=r(d);if(e.preventDefault&&y(h,d)&&e.preventDefault(),w.isStarted?w.isMomentum&&h>Math.max(2,2*w.lastAbsDelta)&&(O(!0),D()):D(),0===h&&Object.is&&Object.is(e.deltaX,-0)){b=!0;return}m=e,w.axisMovement=n(w.axisMovement,d),w.lastAbsDelta=h,w.scrollPointsToMerge.push({axisDelta:d,timeStamp:f}),N(),E({axisDelta:d,isStart:!w.isStartPublished}),w.isStartPublished=!0,R()},N=function(){if(2===w.scrollPointsToMerge.length){var e;w.scrollPoints.unshift({axisDeltaSum:w.scrollPointsToMerge.map(function(e){return e.axisDelta}).reduce(n),timeStamp:(e=w.scrollPointsToMerge.map(function(e){return e.timeStamp})).reduce(function(e,t){return e+t})/e.length}),T(),w.scrollPointsToMerge.length=0,w.scrollPoints.length=1,w.isMomentum||P()}else w.isStartPublished||C()},C=function(){var e;w.axisVelocity=(e=w.scrollPointsToMerge)[e.length-1].axisDelta.map(function(e){return e/w.willEndTimeout})},T=function(){var e=w.scrollPoints,t=e[0],n=e[1];if(n&&t){var r=t.timeStamp-n.timeStamp;if(r<=0)return;var s=t.axisDeltaSum.map(function(e){return e/r}
1),i=s.map(function(e,t){return e/(w.axisVelocity[t]||1)});w.axisVelocity=s,w.accelerationFactors.push(i),L(r)}},L=function(e){var t=10*Math.ceil(e/10)*1.2;w.isMomentum||(t=Math.max(100,2*t)),w.willEndTimeout=Math.min(1e3,Math.round(t))},k=function(e){return 0===e||e<=.96&&e>=.6},P=function(){if(w.accelerationFactors.length>=5){if(b&&(b=!1,r(w.axisVelocity)>=.2))return void A();var e=w.accelerationFactors.slice(-5);e.every(function(e){var t=!!e.reduce(function(e,t){return e&&e<1&&e===t?1:0}),n=e.filter(k).length===e.length;return t||n})&&A(),w.accelerationFactors=e}},A=function(){w.isMomentum=!0},D=function(){(w=l()).isStarted=!0,w.startTime=Date.now(),f=void 0,b=!1},R=function(){clearTimeout(c),c=setTimeout(O,w.willEndTimeout)},O=function(e){void 0===e&&(e=!1),w.isStarted&&(w.isMomentum&&e?E({isEnding:!0,isMomentumCancel:!0}):E({isEnding:!0}),w.isMomentum=!1,w.isStarted=!1)},W=(u=[],s({observe:function(e){return e.addEventListener("wheel",j,{passive:!1}),u.push(e),function(){return d(e)}},unobserve:d=function(e){e.removeEventListener("wheel",j),u=u.filter(function(t){return t!==e})},disconnect:function(){u.forEach(d)}})),F=W.observe,_=W.unobserve,z=W.disconnect;return M(e),s({on:p,off:x,observe:F,unobserve:_,disconnect:z,feedWheel:j,updateOptions:M})};var u={active:!0,breakpoints:{},wheelDraggingClass:"is-wheel-dragging",forceWheelAxis:void 0,target:void 0};function d(e){void 0===e&&(e={});var t,n=function(){};return{name:"wheelGestures",options:e,init:function(r,s){var i,a,o,l=s.mergeOptions,m=s.optionsAtMedia,f=l(u,d.globalOptions);t=m(l(f,e));var h=r.internalEngine(),p=null!=(i=t.target)?i:r.containerNode().parentNode,x=null!=(a=t.forceWheelAxis)?a:h.options.axis,v=c({preventWheelAction:x,reverseSign:[!0,!0,!1]}),g=v.observe(p),w=v.on("wheel",function(e){var r=e.axisDelta,s=r[0],i=r[1],a="x"===x?s:i,l="x"===x?i:s,c=e.isMomentum&&e.previous&&!e.previous.isMomentum,u=e.isEnding&&!e.isMomentum||c;!(Math.abs(a)>Math.abs(l))||b||e.isMomentum||function(e){try{o=new MouseEvent("mousedown",e.event),y(o)}catch(e){return n()}b=!0,document.documentElement.addEventListener("mousemove",M,!0),document.documentElement.addEventListener("mouseup",M,!0),document.documentElement.addEventListener("mousedown",M,!0),t.wheelDraggingClass&&p.classList.add(t.wheelDraggingClass)}(e),b&&(u?(b=!1,y(E("mouseup",e)),j(),t.wheelDraggingClass&&p.classList.remove(t.wheelDraggingClass)):y(E("mousemove",e)))}),b=!1;function j(){document.documentElement.removeEventListener("mousemove",M,!0),document.documentElement.removeEventListener("mouseup",M,!0),document.documentElement.removeEventListener("mousedown",M,!0)}function M(e){b&&e.isTrusted&&e.stopImmediatePropagation()}function E(e,t){var n,r;if(x===h.options.axis){var s=t.axisMovement;n=s[0],r=s[1]}else{var i=t.axisMovement;r=i[0],n=i[1]}if(!h.options.skipSnaps&&!h.options.dragFree){var a=h.containerRect.width,l=h.containerRect.height;n=n<0?Math.max(n,-a):Math.min(n,a),r=r<0?Math.max(r,-l):Math.min(r,l)}return new MouseEvent(e,{clientX:o.clientX+n,clientY:o.clientY+r,screenX:o.screenX+n,screenY:o.screenY+r,movementX:n,movementY:r,button:0,bubbles:!0,cancelable:!0,composed:!0})}function y(e){r.containerNode().dispatchEvent(e)}n=function(){g(),w(),j()}},destroy:function(){return n()}}}d.globalOptions=void 0,e.s(["WheelGesturesPlugin",()=>d],293701)},359884,e=>{"use strict";var t=e.i(827293),n=e.i(192251);let r=e=>e.split("\x01").join("").split("\x02").join(""),s=(e,n=!1)=>
1{if(!n&&!e.includes("\x01")&&!e.includes("\x02"))return{node:e,endsBold:!1};let s=[],i=e,a=0,o=n;for(;i.length;)if(o){let e=i.indexOf("\x02");-1===e?(s.push((0,t.jsx)("strong",{children:r(i)},a++)),i=""):(e>0&&s.push((0,t.jsx)("strong",{children:r(i.slice(0,e))},a++)),i=i.slice(e+1),o=!1)}else{let e=i.indexOf("\x01");-1===e?(s.push(r(i)),i=""):(e>0&&s.push(r(i.slice(0,e))),i=i.slice(e+1),o=!0)}return{node:(0,t.jsx)(t.Fragment,{children:s}),endsBold:o}};e.s(["Truncate",0,({children:e,ellipsis:i,lines:a=1,trimWhitespace:o=!1,width:l=0,onTruncate:c,...u})=>{let[d,m]=(0,n.useState)(),[f,h]=(0,n.useState)(),[p,x]=(0,n.useState)(0),[v,g]=(0,n.useState)(0),w=(0,n.useRef)(null),b=(0,n.useRef)(null),j=(0,n.useRef)(null);(0,n.useEffect)(()=>{b&&b.current&&b.current.parentNode&&b.current.parentNode.removeChild(b.current)},[p]);let M=(0,n.useCallback)(()=>{if(!w.current?.parentElement)return;let e=l||Math.floor(w.current.parentElement.getBoundingClientRect().width);if(!e)return window.requestAnimationFrame(()=>M());let t=window.getComputedStyle(w.current),n=[t.fontWeight,t.fontStyle,t.fontSize,t.fontFamily].join(" ");d&&(d.font=n),x(e)},[d,l]);(0,n.useEffect)(()=>{m(document.createElement("canvas").getContext("2d"))},[]),(0,n.useEffect)(()=>(M(),window.addEventListener("resize",M),()=>{window.removeEventListener("resize",M),window.cancelAnimationFrame(v)}),[M,v]);let E=(0,n.useCallback)(e=>{"function"==typeof c&&g(window.requestAnimationFrame(()=>{c(e)}))},[c]),y=(0,n.useCallback)(e=>d?.measureText(e).width||0,[d]),S=e=>e.replace(/\s+$/,""),N=(0,n.useCallback)(()=>{var e;let n,l,c,u,d,m=[],f=(e=b.current,n=document.createElement("div"),l="innerText"in window.HTMLElement.prototype?"innerText":"textContent",n.innerHTML=(e?.innerHTML||"").replace(/\r\n|\r|\n/g," ").replace(/<(strong|b)(?:\s[^>]*)?>/gi,"\x01").replace(/<\/(strong|b)>/gi,"\x02"),c=n[l],(u=document.createElement("div")).innerHTML="foo<br/>bar",u[l]?.replace(/\r\n|\r/g,"\n")!=="foo\nbar"&&(n.innerHTML=n.innerHTML.replace(/<br.*?\/?>/gi,"\n"),c=n[l]),c||"").split("\n").map(e=>e.split(" ")),h=(d=j.current,d?.offsetWidth||0),x=!0,v=!1;for(let e=1;e<=a;e++){let n=f[0];if(0===n.length){m.push(),f.shift(),e--;continue}let l=n.join(" ")||"";if(y(r(l))<=p&&1===f.length){x=!1,m.push(s(l,v).node);break}if(e===a){let e=n.join(" "),a=0,c=e.length-1;for(;a<=c;){let t=Math.floor((a+c)/2);y(r(e.slice(0,t+1)))+h<=p?a=t+1:c=t-1}let u=e.slice(0,a);if(o)for(u=S(u);!u.length&&m.length;){let e=m.pop();e&&"string"==typeof e&&(u=S(e))}l=(0,t.jsxs)("span",{children:[s(u,v).node,i]})}else{let t=0,i=n.length-1;for(;t<=i;){let e=Math.floor((t+i)/2);y(r(n.slice(0,e+1).join(" ")))<=p?t=e+1:i=e-1}if(0===t){e=a-1;continue}let o=s(n.slice(0,t).join(" "),v);l=o.node,v=o.endsBold,f[0].splice(0,t)}m.push(l)}return E(x),m},[i,a,y,E,p,o]),C=(e,n,r)=>{if(n===r.length-1)return(0,t.jsx)("span",{className:"whitespace-nowrap",children:e},n);{let r=(0,t.jsx)("br",{},`${n}br`);return e?[(0,t.jsx)("span",{className:"whitespace-nowrap",children:e},n),r]:r}};return(0,n.useEffect)(()=>{w.current&&p&&(a>0?h(N().map(C)):(h(e),E(!1)))},[e,a,p,N,E]),(0,t.jsxs)("span",{...u,ref:w,children:[(0,t.jsx)("span",{children:f}),(0,t.jsx)("span",{ref:b,children:e}),(0,t.jsx)("span",{ref:j,style:{position:"fixed",visibility:"hidden",top:0,left:0},children:i})]})}])},506567,e=>{"use strict";var t=e.i(827293);let n=e=>(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 33",...e,children:[(0,t.jsx)("path",{fill:"currentColor",d:"M28.57 16.5v-.45l-.01-.14-.01-.17v-.11l-.02-.2v-.08l-.03-.21v-.05a12.3 12.3 0 0 0-24.42 0v.06l-.03.2v.1l-.02.18v.11l-.01.18v.14l-.01.15-.01.24v.35l.01.14v.15l.02.17v.11l.02.19v.08l.02.22v.05a12.3 12.3 0 0 0 24.43 0v-.06l.02-.21v-.09l.02-.18v-.12l.02-.17v-.29l.01-.25v-.05c0 .01 0 .01 0 0Z"}),(0,t.jsx)("path",{stroke:"#fff",strokeMiterlimit:10,strokeWidth:1.58,d:"m14.05 21.15 8.23-8.23m-7.16 8.28-4.18-4.17"})]});e.s(["CircleCheckIcon",()=>n])},955103,e=>{"use strict";var t=e.i(827293);let n=e=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 36 36",id:"arrow-right-36",role:"img","aria-labelledby":"arrow-right-36",...e,children:(0,t.jsxs)("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:2,children:[(0,t.jsx)("path",{d:"M6.5 18H32"}),(0,t.jsx)("path",{strokeLinejoin:"round",d:"m23 27 9-9-9-9"})]})});e.s(["ArrowRight_36",()=>n])},190024,e=>{"use strict";var t=e.i(827293),n=e.i(432341),r=e.i(701355),s=e.i(809076);e.s(["CartEmptyContactUs",0,()=>(0,t.jsxs)("div",{className:"space-y-4 px-4 text-center lg:space-y-6",children:[(0,t.jsx)("p",{className:"font-serif text-xl font-bold text-strong lg:text-3xl",children:"Questions? We’ve Got Answers"}),(0,t.jsxs)("p",{className:"text-lg font-medium text-sub-strong lg:text-xl lg:font-normal",children:[(0,t.jsx)(n.SupportPhoneLink,{className:"underline hover:no-underline","data-testid":"call-phone-number-button",children:"Call"}),","," ",(0,t.jsx)("a",{href:`mailto:${s.SUPPORT_EMAIL}`,className:"underline hover:no-underline",children:"email"}),", or"," ",(0,t.jsx)("button",{onClick:()=>(0,r.openGleenChat)(),className:"underline hover:no-underline",children:"chat"})," ","with us"," ",(0,t.jsx)("span",{className:"xxs:whitespace-nowrap",children:"7 days a week. For best-in-class support."})]})]})])}]);

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.