1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8304,9461],{58410:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(2389).Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},2966:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(2389).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},88623:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(2389).Z)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},86548:function(e,t,a){a.d(t,{Z:function(){return i}});let i=(0,a(2389).Z)("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},50365:function(e,t,a){a.d(t,{o:function(){return r}});var i=a(7653);function r(e){let{frameWidth:t,frameHeight:a,plaqueEnabled:r=!1,plaqueExtension:n=1.5,isMobile:l,minHeightMobile:s=320,minHeightDesktop:o=420,maxHeightDesktop:d=900,maxHeightMobile:c=620,containerPadding:u={mobile:32,desktop:64}}=e,m=(0,i.useRef)(null),[h,p]=(0,i.useState)(400);return(0,i.useEffect)(()=>{let e;if(!m.current)return;let t=new ResizeObserver(t=>{clearTimeout(e),e=setTimeout(()=>{for(let e of t){let t=Math.round(e.contentRect.width);p(e=>Math.abs(t-e)>2?t:e)}},16)});return t.observe(m.current),()=>{clearTimeout(e),t.disconnect()}},[]),{containerRef:m,previewContainerHeight:(0,i.useMemo)(()=>{let e=(r?a+n:a)/t,i=h>0?h:400,m=l?u.mobile:u.desktop;return Math.min(Math.max((i-m)*e+m,l?s:o),l?c:d)},[t,a,r,n,h,l,s,o,d,c,u]),containerWidth:h}}},81202:function(e,t,a){a.d(t,{U:function(){return r},y:function(){return n}});var i=a(7653);function r(e){let[t,a]=(0,i.useState)(!1),r=(0,i.useRef)(e);return r.current=e,(0,i.useEffect)(()=>{let e=null,t=()=>{e=null;let t=r.current;if(!t){a(e=>!1===e&&e);return}let i=!1;for(let e of document.querySelectorAll(t)){let t=e.getBoundingClientRect();if(t.height>0&&t.bottom>0&&t.top<window.innerHeight){i=!0;break}}a(e=>e===i?e:i)},i=()=>{null===e&&(e=requestAnimationFrame(t))};return i(),window.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",i,{passive:!0}),()=>{null!==e&&cancelAnimationFrame(e),window.removeEventListener("scroll",i),window.removeEventListener("resize",i)}},[e]),t}let n='[data-testid*="mat-single"]:not([data-testid*="anchor"])'},43665:function(e,t,a){a.d(t,{Z:function(){return r}});var i=a(7653);function r(){let[e,t]=(0,i.useState)(0),a=(0,i.useRef)(null),r=(0,i.useCallback)(e=>{var i;if(null===(i=a.current)||void 0===i||i.disconnect(),a.current=null,!e){t(0);return}t(e.getBoundingClientRect().height),"undefined"!=typeof ResizeObserver&&(a.current=new ResizeObserver(()=>{t(e.getBoundingClientRect().height)}),a.current.observe(e))},[]);return(0,i.useEffect)(()=>()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.disconnect()},[]),[r,e]}},91443:function(e,t,a){a.d(t,{$:function(){return i}});function i(e){var t,a,i;return!!e&&e.enabled&&!!e&&!!((null===(t=e.line1)||void 0===t?void 0:t.trim())||(null===(a=e.line2)||void 0===a?void 0:a.trim())||(null===(i=e.line3)||void 0===i?void 0:i.trim()))&&!e.proofreadConfirmed}},67536:function(e,t,a){a.d(t,{p:function(){return r}});let i=["black-wood","white-wood","brown-picture-frame","natural-picture-frame","gold-bamboo"];function r(e){let t=new Map(e.map(e=>[e.id,e])),a=i.map(e=>t.get(e)).filter(e=>!!e),r=new Set(a.map(e=>e.id));return[...a,...e.filter(e=>!r.has(e.id)).sort((e,t)=>{var a,i;return(null!==(a=t.searchVolume)&&void 0!==a?a:0)-(null!==(i=e.searchVolume)&&void 0!==i?i:0)})]}},72810:function(e,t,a){a.d(t,{Uk:function(){return c},v$:function(){return o}});var i,r=a(23880),n=a(74859);function l(e){let t=Math.round(100*e)/100;return Number.isInteger(t),String(t)}let s={"foam-board":"Custom-Cut Foam Board","cleat-hanger":'12" Heavy-Duty Metal Cleat Bar System',acrylic:"Custom Acrylic Sheet","acrylic-cleaner":"Acrylic Cleaner","security-hardware":"Security Hardware Kit","puzzle-glue-sheets":"Puzzle Glue Preservation Sheets","brass-nameplate":"Brass Nameplate","mat-board":"Custom Mat Board"};function o(e){var t,a;let i=null===(t=e.additionalInfo)||void 0===t?void 0:t["Product Type"];if("string"==typeof i&&i.trim())return i.trim();if(e.cardFormatId&&e.cardLayoutId)return"Graded Card Frame";if(e.shadowboxInfo)return"Shadowbox Frame";let r=null!==(a=e.orderSource)&&void 0!==a?a:"";if(r.startsWith("canvas-traditional-"))return"Traditional Canvas Frame";if(r.startsWith("canvas-"))return"Canvas Float Frame";if(r.startsWith("photo-collage-"))return"Photo Collage Frame";if(r.startsWith("cd-frame-")||r.startsWith("record-album-frame-"))return"Record/CD Frame";if("shadowbox"===r)return"Shadowbox Frame";if(r.startsWith("diploma-"))return"Diploma Frame";if(r.startsWith("certificate-"))return"Certificate Frame";if(r.startsWith("puzzle-frame-"))return"Puzzle Frame";if(r.startsWith("ticket-"))return"Ticket Stub Frame";if(r.startsWith("playbill-"))return"Playbill Frame";if(r.startsWith("newspaper-"))return"Newspaper Frame";if(r.startsWith("magazine-"))return"Magazine Frame";if(r.startsWith("comic-"))return"Comic Book Frame";if(r.startsWith("sonogram-"))return"Sonogram Frame";if(r.startsWith("jersey-"))return"Jersey Frame";if(r.startsWith("puck-")||r.startsWith("hockey-puck-"))return"Hockey Puck Frame";if(r.startsWith("bouquet-"))return"Bouquet Frame";if(r.startsWith("currency-"))return"Currency Frame";if(r.startsWith("military-"))return"Military Frame";if(r.startsWith("stamp-"))return"Stamp Frame";if(r.startsWith("coin-"))return"Coin Display Frame";if(r.startsWith("needlework-"))return"Needlework Frame";if(r.startsWith("signature-"))return"Signature Frame";if(r.startsWith("movie-poster-"))return"Movie Poster Frame";if(r.startsWith("challenge-coin-"))return"Challenge Coin Frame";if(r.startsWith("flag-"))return"Flag Case";if("brass-nameplate-standalone"===r)return"Brass Nameplate";let n=s[e.frameStyleId];return null!=n?n:"Custom Picture Frame"}let d=void 0!==n&&(null===(i=n.env)||void 0===i?void 0:"gid://shopify/ProductVariant/50693357011177")||null;function c(e,t){var a,i,n,s,c,u,m,h;let p,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,x=arguments.length>3?arguments[3]:void 0,g=(0,r.jE)(e.frameStyleId),v=(null==g?void 0:g.shopifyVariantId)||d||"gid://shopify/ProductVariant/mock",b=!!(e.cardFormatId&&e.cardLayoutId),j=null!==(s=null==x?void 0:x.productTitle)&&void 0!==s?s:o(e),w=null!==(c=null==g?void 0:g.name)&&void 0!==c?c:e.frameStyleId;if(b&&"number"==typeof e.cardInteriorWidthIn&&"number"==typeof e.cardInteriorHeightIn&&g){let t=null!==(u=g.mouldingWidth)&&void 0!==u?u:.75,a=e.cardInteriorWidthIn+2*t,i=e.cardInteriorHeightIn+2*t;p="".concat(w," - ").concat(l(a)," \xd7 ").concat(l(i))}else p="".concat(w," \xb7 ").concat(e.artworkWidth,'" \xd7 ').concat(e.artworkHeight,'"');let y=e.brassNameplateConfig,z=!!((null==y?void 0:null===(a=y.line1)||void 0===a?void 0:a.trim())||(null==y?void 0:null===(i=y.line2)||void 0===i?void 0:i.trim())||(null==y?void 0:null===(n=y.line3)||void 0===n?void 0:n.trim())),N=(null==y?void 0:y.enabled)&&z&&y.proofreadConfirmed&&!y.proofreadConfirmedAt?{...e,brassNameplateConfig:{...y,proofreadConfirmedAt:new Date().toISOString()}}:e;return{variantId:v,productHandle:"custom-frame",title:j,variantTitle:p,imageUrl:null!==(h=null!==(m=null==x?void 0:x.imageUrl)&&void 0!==m?m:e.imageUrl)&&void 0!==h?h:null,price:M
1ath.round(100*t),currency:"USD",quantity:f,configuration:N,customAttributes:null==x?void 0:x.customAttributes}}},2137:function(e,t,a){a.d(t,{$r:function(){return s},KK:function(){return o},SR:function(){return l},rQ:function(){return d},s$:function(){return n},sC:function(){return r}});let i=/^(?:(\d+)\s*[-\s]\s*)?(\d+)\s*\/\s*(\d+)$/;function r(e){if(!e)return 0;let t=e.trim();if(!t)return 0;let a=i.exec(t);if(a){let e=a[1]?parseInt(a[1],10):0,t=parseInt(a[2],10),i=parseInt(a[3],10);return i?e+t/i:e}let r=parseFloat(t);return Number.isFinite(r)?r:0}function n(e){let t=Math.floor(e),a=e-t;if(0===a)return t.toString();let i={1:"1/8",2:"1/4",3:"3/8",4:"1/2",5:"5/8",6:"3/4",7:"7/8"},r=Math.round(8*a);return .001>Math.abs(8*a-r)&&i[r]?0===t?i[r]:"".concat(t," ").concat(i[r]):e.toFixed(2)}function l(e){return Math.round(8*e)/8}function s(e){return l(r(e))}function o(e,t){let a=e>=4,i=t>=4;return a||i?a?i?{valid:!0}:{valid:!1,message:"Height must be at least ".concat(4," inches. Current: ").concat(n(t),'"')}:{valid:!1,message:"Width must be at least ".concat(4," inches. Current: ").concat(n(e),'"')}:{valid:!1,message:"Artwork must be at least ".concat(4,"\xd7").concat(4," inches. Current: ").concat(n(e),"\xd7").concat(n(t),'"')}}function d(e){let{artW:t,artH:a,matBorder:i,matBorderTop:r,matBorderRight:n,matBorderBottom:l,matBorderLeft:s,matReveal:o=0,frameFace:d=.75,containerWpx:c,containerHpx:u,paddingPx:m=12}=e,h=Math.max(t,1),p=Math.max(a,1),f=void 0!==r?r:i||0,x=void 0!==n?n:i||0,g=void 0!==l?l:i||0,v=void 0!==s?s:i||0,b=h+v+x,j=p+f+g,w=b+2*d+2*o,y=j+2*d+2*o,z=Math.min(Math.max(c-2*m,1)/w,Math.max(u-2*m,1)/y);return{scale:z,paddingPx:m,outerPx:{w:w*z,h:y*z},glassPx:{w:b*z,h:j*z},openingPx:{w:h*z,h:p*z},frameFacePx:d*z,matPx:i?i*z:f*z,matTopPx:f*z,matRightPx:x*z,matBottomPx:g*z,matLeftPx:v*z,matRevealPx:o*z}}},83294:function(e,t,a){a.d(t,{Q8:function(){return r},_F:function(){return l},qh:function(){return n}});let i=[{id:"puzzle-100",pieces:100,pieceLabel:"100",width:14.25,height:10.25,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:14.25/10.25,label:'100 pieces â 14.25" \xd7 10.25"'},{id:"puzzle-150",pieces:150,pieceLabel:"150",width:14.25,height:10.25,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:14.25/10.25,label:'150 pieces â 14.25" \xd7 10.25"'},{id:"puzzle-200",pieces:200,pieceLabel:"200",width:19.25,height:14.25,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:19.25/14.25,label:'200 pieces â 19.25" \xd7 14.25"'},{id:"puzzle-300",pieces:300,pieceLabel:"300",width:18,height:24,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:.75,label:'300 pieces â 18" \xd7 24"'},{id:"puzzle-500",pieces:500,pieceLabel:"500",width:19.25,height:14.25,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:19.25/14.25,label:'500 pieces â 19.25" \xd7 14.25"'},{id:"puzzle-750",pieces:750,pieceLabel:"750",width:24,height:18,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:24/18,label:'750 pieces â 24" \xd7 18"'},{id:"puzzle-1000",pieces:1e3,pieceLabel:"1000",width:27,height:20,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:1.35,label:'1000 pieces â 27" \xd7 20"'},{id:"puzzle-1500",pieces:1500,pieceLabel:"1500",width:32,height:24,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:32/24,label:'1500 pieces â 32" \xd7 24"'},{id:"puzzle-2000",pieces:2e3,pieceLabel:"2000",width:39,height:27,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:39/27,label:'2000 pieces â 39" \xd7 27"'},{id:"puzzle-500-panoramic",pieces:500,pieceLabel:"500 panoramic",width:26,height:9,isRound:!1,isPanoramic:!0,isSquare:!1,category:"panoramic",aspectRatio:26/9,label:'500 pieces (panoramic) â 26" \xd7 9"'},{id:"puzzle-750-panoramic",pieces:750,pieceLabel:"750 panoramic",width:37,height:12,isRound:!1,isPanoramic:!0,isSquare:!1,category:"panoramic",aspectRatio:37/12,label:'750 pieces (panoramic) â 37" \xd7 12"'},{id:"puzzle-1000-panoramic",pieces:1e3,pieceLabel:"1000 panoramic",width:39,height:13,isRound:!1,isPanoramic:!0,isSquare:!1,category:"panoramic",aspectRatio:3,label:'1000 pieces (panoramic) â 39" \xd7 13"'},{id:"puzzle-500-square",pieces:500,pieceLabel:"500 square",width:21,height:21,isRound:!1,isPanoramic:!1,isSquare:!0,category:"square",aspectRatio:1,label:'500 pieces (square) â 21" \xd7 21"'},{id:"puzzle-1000-square",pieces:1e3,pieceLabel:"1000 square",width:25,height:25,isRound:!1,isPanoramic:!1,isSquare:!0,category:"square",aspectRatio:1,label:'1000 pieces (square) â 25" \xd7 25"'},{id:"puzzle-500-round",pieces:500,pieceLabel:"500 round",width:25,height:25,diameter:25,isRound:!0,isPanoramic:!1,isSquare:!1,category:"round",aspectRatio:1,label:'500 pieces (round) â 25" diameter'},{id:"puzzle-1000-round",pieces:1e3,pieceLabel:"1000 round",width:27,height:27,diameter:27,isRound:!0,isPanoramic:!1,isSquare:!1,category:"round",aspectRatio:1,label:'1000 pieces (round) â 27" diameter'}];function r(e){return i.find(t=>
1t.id===e)}function n(e){return{type:"circle",diameter:e+.125,revealWidth:.0625}}function l(e,t){let a=function(){let e=i.map(e=>e.width),t=i.map(e=>e.height);return{minWidth:Math.min(...e),maxWidth:Math.max(...e),minHeight:Math.min(...t),maxHeight:Math.max(...t)}}();return e<a.minWidth||e>a.maxWidth?{valid:!1,error:"Width must be between ".concat(a.minWidth,'" and ').concat(a.maxWidth,'"')}:t<a.minHeight||t>a.maxHeight?{valid:!1,error:"Height must be between ".concat(a.minHeight,'" and ').concat(a.maxHeight,'"')}:{valid:!0}}},30857:function(e,t,a){a.d(t,{U:function(){return s}});var i=a(27573),r=a(28867),n=a(88548);let l={none:"No Mat",single:"Single Mat",double:"Double Mat"};function s(e){let{value:t,onChange:a,options:s,border:o,onBorderChange:d,borderMin:c=.5,borderMax:u=6,borderStep:m=.25,className:h}=e,p=null!=o&&null!=d&&"none"!==t;return(0,i.jsxs)("div",{className:(0,r.cn)("space-y-2",h),children:[(0,i.jsx)("div",{className:(0,r.cn)("grid w-full gap-2",2===s.length?"grid-cols-2":"grid-cols-3"),role:"radiogroup","aria-label":"Mat type","data-testid":"anchor-mat-type",children:s.map(e=>{var n;return(0,i.jsx)("button",{type:"button",role:"radio","aria-checked":t===e,onClick:()=>a(e),className:(0,r.cn)("min-h-9 rounded-md border-2 px-2 text-center text-xs font-semibold hover-elevate active-elevate-2",t===e?"border-primary bg-primary/10 text-primary":"border-border bg-background"),"data-testid":"button-anchor-mat-".concat(e),children:null!==(n=l[e])&&void 0!==n?n:e},e)})}),p&&(0,i.jsxs)("div",{className:"flex w-full items-center gap-3",children:[(0,i.jsx)("span",{className:"whitespace-nowrap text-xs text-muted-foreground",children:"Border"}),(0,i.jsx)(n.i,{min:c,max:u,step:m,value:[o],onValueChange:e=>{var t;return d(null!==(t=e[0])&&void 0!==t?t:o)},className:"flex-1","data-testid":"slider-anchor-mat-border","aria-label":"Mat border width in inches","aria-valuetext":"".concat(o.toFixed(2)," inches each side")}),(0,i.jsxs)("span",{className:"w-12 text-right text-xs font-medium","data-testid":"text-anchor-mat-border-value",children:[o.toFixed(2),'"']}
1)]})]})}},38547:function(e,t,a){a.d(t,{i:function(){return l}});var i=a(27573),r=a(28867);function n(e){return e.toFixed(2).replace(/\.?0+$/,"")}function l(e){let{width:t,height:a,scrollToStep:l,label:s="Artwork size",className:o}=e;return Number.isFinite(t)&&Number.isFinite(a)?(0,i.jsxs)("button",{type:"button",onClick:()=>{var e;null===(e=document.querySelector('[data-step="'.concat(l,'"]')))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},className:(0,r.cn)("flex w-full items-center justify-between gap-2 text-sm",o),"data-testid":"button-anchor-size-summary",children:[(0,i.jsx)("span",{className:"min-w-0 truncate text-muted-foreground",children:s}),(0,i.jsxs)("span",{className:"shrink-0 font-medium",children:[n(t),'" \xd7 ',n(a),'"',(0,i.jsx)("span",{className:"ml-2 text-primary underline underline-offset-4",children:"Change"})]})]}):null}},43453:function(e,t,a){a.d(t,{G:function(){return s}});var i=a(27573),r=a(86548),n=a(88623),l=a(12486);function s(){return(0,i.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-6 py-4","data-testid":"trust-box",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"trust-secure",children:[(0,i.jsx)(r.Z,{className:"w-4 h-4"}),(0,i.jsx)("span",{children:"Secure Checkout"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"trust-guarantee",children:[(0,i.jsx)(n.Z,{className:"w-4 h-4"}),(0,i.jsx)("span",{children:"Money-Back Guarantee"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"trust-usa",children:[(0,i.jsx)(l.Z,{className:"w-4 h-4"}),(0,i.jsx)("span",{children:"Proudly Made in the USA"})]})]})}},74747:function(e,t,a){a.d(t,{p:function(){return s}});var i=a(27573),r=a(7653),n=a(28867),l=a(1357);function s(e){let{open:t,onOpenChange:a,title:s,description:o,src:d,alt:c,children:u,fitContent:m=!1,className:h,"data-testid":p}=e,[f,x]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[b,j]=(0,r.useState)(null),w=m&&null!=u;return(0,r.useEffect)(()=>{if(!t){j(null);return}if(!w||!f||!g)return;let e=()=>{let e=g.offsetWidth,t=g.offsetHeight,a=f.clientWidth,i=f.clientHeight;e&&t&&a&&i&&j(Math.max(.1,Math.min(a/e,i/t)))};if(e(),"undefined"==typeof ResizeObserver)return;let a=new ResizeObserver(e);return a.observe(f),a.observe(g),()=>a.disconnect()},[t,w,f,g]),(0,i.jsx)(l.Vq,{open:t,onOpenChange:a,children:(0,i.jsxs)(l.cZ,{className:"p-0 max-w-none w-[100vw] h-[100vh] md:w-[95vw] md:h-[95vh] border-0 md:border",...o?{}:{"aria-describedby":void 0},"data-testid":null!=p?p:"dialog-image-expand",children:[(0,i.jsx)(l.$N,{className:"sr-only",children:s}),o?(0,i.jsx)(l.Be,{className:"sr-only",children:o}):null,(0,i.jsx)("div",{ref:x,className:(0,n.cn)("relative w-full h-full flex items-center justify-center overflow-hidden bg-white p-2 md:p-8",h),children:u?w?(0,i.jsx)("div",{ref:v,className:"absolute left-1/2 top-1/2",style:{transform:"translate(-50%, -50%) scale(".concat(null!=b?b:1,")"),visibility:null===b?"hidden":void 0},"data-testid":"container-expanded-content",children:u}):u:d&&(0,i.jsx)("img",{src:d,alt:null!=c?c:s,className:"max-w-full max-h-full object-contain","data-testid":"img-expanded"})})]})})}},8304:function(e,t,a){a.r(t),a.d(t,{PuzzleFrameDesigner:function(){return es}});var i=a(27573),r=a(19307),n=a(31331),l=a(81202),s=a(34184),o=a(91443),d=a(39161),c=a(76755),u=a(72810),m=a(83294),h=a(66631),p=a(23880),f=a(65436),x=a(750),g=a(76367),v=a(2137),b=a(67536),j=a(48170),w=a(40013),y=a(31266),z=a(50365),N=a(12688),k=a(43665),C=a(70979),S=a(55238),M=a(85094),F=a(27126),R=a(50294),P=a(7653),W=a(97918),I=a(13947),q=a(8299),E=a(87468),L=a(97427),B=a(50145),H=a(30857
1),T=a(72089),A=a(38547),Q=a(43453),Z=a(74747),D=a(23717),U=a(96979),V=a(51602),_=a(18390),O=a(90227),$=a(29608),G=a(15706),Y=a(23831),K=a(70240),J=a(97384),X=a(88548),ee=a(67163),et=a(36588),ea=a(24924),ei=a(83648),er=a(57543);let en=(0,b.p)((0,p.XO)("picture")),el=["size","frame","mat","nameplate","glass","hardware"];function es(e){var t,a,f;let{defaultFrameId:b,embedded:q=!1,getRandomPuzzlePhoto:es,getRandomPuzzleImage:ed}=e,ec=null!=es?es:x.JEI,eu=null!=ed?ed:x.J0i,{toast:em}=(0,W.pm)(),eh=(0,N.d)(),{headerOffset:ep,previewHeight:ef,previewSpacer:ex,previewSentinelRef:eg}=(0,C.j)({maxCapPx:460}),[ev,eb]=(0,k.Z)(),ej=(0,l.U)(l.y),{activeStep:ew,stepContainerRef:ey}=(0,w.C)(el,{offsetTop:ep+ef}),[ez,eN]=(0,P.useState)(!1);(0,P.useEffect)(()=>eN(!0),[]);let ek=(0,P.useMemo)(()=>(0,h.yn)(),[]),eC=(0,P.useMemo)(()=>{var e;if(b){let e=en.find(e=>e.id===b||e.sku===b);return null!=e?e:en[0]}let t=ek.get("frame");if(t){let e=en.find(e=>e.id===t||e.sku===t);return null!=e?e:en[0]}return null!==(e=en[0])&&void 0!==e?e:en[0]},[b,ek]),[eS,eM]=(0,P.useState)(()=>{let e=ek.get("puzzleSize");if(e){let t=(0,m.Q8)(e);if(t)return t}let t=parseFloat(ek.get("customWidth")||""),a=parseFloat(ek.get("customHeight")||"");return t&&a?{id:"custom",pieces:0,pieceLabel:"custom",width:t,height:a,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:t/a,label:"Custom â ".concat(t,'" \xd7 ').concat(a,'"')}:(0,m.Q8)("puzzle-1000")||null}),[eF,eR]=(0,P.useState)(()=>(null==eS?void 0:eS.id)==="custom"?eS.width.toString():""),[eP,eW]=(0,P.useState)(()=>(null==eS?void 0:eS.id)==="custom"?eS.height.toString():""),[eI,eq]=(0,P.useState)(()=>(null==eS?void 0:eS.id)==="custom"),[eE,eL]=(0,P.useState)(()=>{let e=["frame","mat","nameplate","glass","hardware"];return(null==eS?void 0:eS.id)==="custom"?["size",...e]:e}),[eB,eH]=(0,P.useState)(()=>null!=eC?eC:en[0]),eT=(0,I.K)(eB.id),[eA,eQ]=(0,P.useState)(()=>{let e=ek.get("matType");return(null==eS?void 0:eS.isRound)?"single":e||"single"}),[eZ,eD]=(0,P.useState)(()=>{let e=ek.get("matBorder"),t=(null==eS?void 0:eS.isRound)?"1.5":"2.5";return e||t}),[eU,eV]=(0,P.useState)(()=>{let e=ek.get("matReveal");return null!==e?e:"0.25"}),[e_,eO]=(0,P.useState)(()=>"true"===ek.get("bottomWeighted")),[e$,eG]=(0,P.useState)(()=>{let e=ek.get("mat");if(e){let t=r.EW.find(t=>t.id===e);if(t)return t}return r.EW[0]}),[eY,eK]=(0,P.useState)(()=>{let e=ek.get("bottomMat");if(e){let t=r.EW.find(t=>t.id===e);if(t)return t}return r.EW[1]}),[eJ,eX]=(0,P.useState)(()=>{let e=ek.get("glass");return["standard","non-glare"].includes(e||"")?e:"standard"}),[e0,e1]=(0,P.useState)(()=>ek.get("hardware")||"standard"),[e2,e5]=(0,P.useState)(()=>({enabled:"true"===ek.get("plaqueEnabled"),line1:ek.get("plaqueLine1")||"",line2:ek.get("plaqueLine2")||"",line3:ek.get("plaqueLine3")||"",font:ek.get("plaqueFont")||"georgia",color:"brass-black",includeFlag:!1})),[e3,e4]=(0,P.useState)(()=>ec()),e7=(0,P.useMemo)(()=>{var e,t;let a=null!==(e=eB.alternateImages)&&void 0!==e?e:[],i=null!==(t=a.find(e=>"corner"===e.type))&&void 0!==t?t:a[0];return i?(0,g.MX)(i.url):void 0},[eB]),e8=(0,P.useMemo)(()=>{var e,t;let a=null!==(e=eB.alternateImages)&&void 0!==e?e:[],i=null!==(t=a.find(e=>"profile"===e.type))&&void 0!==t?t:a[1];return i?(0,g.MX)(i.url):void 0},[eB]);(0,P.useEffect)(()=>{e4(ec())},[eB.id,ec]),(0,P.useEffect)(()=>{(async function(){try{let e=await fetch("/api/frames/".concat(eB.sku,"/photos"));if(e.ok){let t=await e.json();tu(t)}}catch(e){console.error("Failed to fetch frame photos:",e)}})()},[eB.sku]),(0,P.useEffect)(()=>{if(!eS)return;let e=parseFloat(eZ),t=eS.isRound?1.5:2.5;(1.5===e||2.5===e)&&e!==t&&eD(t.toString())},[eS,eZ]);let[e6,e9]=(0,P.useState)(!1),[te,tt]=(0,P.useState)(!1),[ta,ti]=(0,P.useState)(()=>{let e=ek.get("quantity");return e?Math.max(1,parseInt(e,10)):1}),[tr,tn]=(0,P.useState)(!1),tl=(0,P.useRef)(null),ts="".concat(ta,"|").concat(null!==(t=null==eS?void 0:eS.id)&&void 0!==t?t:"","|").concat(eF,"|").concat(eP,"|").concat(eB.id,"|").concat(eA,"|").concat(e$.id,"|").concat(eY.id,"|").concat(eZ,"|").concat(eU,"|").concat(null!=eJ?eJ:"","|").concat(e0,"|").concat(e_?1:0,"|").concat(JSON.stringify(e2)),{barState:to,scrollToConfigurator:td}=(0,y.G)(tl,{interactionSignal:ts}),[tc,tu]=(0,P.useState)({}),tm=(0,P.useMemo)(()=>Math.floor(1e4*Math.random()),[]),th=(0,P.useMemo)(()=>eu(tm),[tm,eu]),tp=parseFloat(eZ)||2.5,tf=parseFloat(eU)||.25,tx="none"!==eA?(0,S.LL)(e2.enabled,tp):0,tg=tx-tp,tv=e_?ea.h:0,tb=(0,P.useMemo)(()=>{var e;if(!(null==eS?void 0:eS.isRound)||"none"===eA)return null;let t=null!==(e=eS.diameter)&&void 0!==e?e:eS.width;return(0,m.qh)(t)},[eS,eA]),tj=(0,P.useMemo)(()=>
1{if(!eS||"none"===eA)return(null==eS?void 0:eS.width)||0;if(tb){let e="double"===eA?2*tf:0;return tb.diameter+2*tp+e}let e="double"===eA?2*tf:0;return eS.width+2*tp+e},[eS,eA,tp,tf,tb]),tw=(0,P.useMemo)(()=>{if(!eS||"none"===eA)return(null==eS?void 0:eS.height)||0;if(tb){let e="double"===eA?2*tf:0;return tb.diameter+2*tp+e}let e="double"===eA?2*tf:0;return eS.height+2*tp+e+tg+tv},[eS,eA,tp,tf,tb,tg,tv]),ty=tj+2*(eB.mouldingWidth||0),tz=tw+2*(eB.mouldingWidth||0),tN=e2.enabled&&"none"!==eA&&!(null==eS?void 0:eS.isRound),{containerRef:tk,previewContainerHeight:tC,containerWidth:tS}=(0,z.o)({frameWidth:ty,frameHeight:tz,plaqueEnabled:tN,plaqueExtension:1.5,isMobile:eh,minHeightMobile:300,minHeightDesktop:450}),tM=eh?Math.max(120,ef-32):tC,tF=(0,P.useMemo)(()=>"none"!==eA&&!!eS&&function(e){let{widthIn:t,heightIn:a}=e,[i,r]=t<=a?[t,a]:[a,t];return i>32||r>40}({widthIn:tj,heightIn:tw}),[eA,eS,tj,tw]),tR=(0,P.useMemo)(()=>{let e=eh?"mobile":"desktop",t=(0,r.Q3)(e);return!eS||"none"===eA||tF?t:t.filter(e=>(0,r.HR)(e,tj,tw))},[eS,eh,eA,tj,tw,tF]),tP=(0,P.useMemo)(()=>tR.filter(e=>e.isRegular),[tR]),tW=(0,P.useMemo)(()=>tR.filter(e=>e.isPremium),[tR]),tI=(0,P.useMemo)(()=>(0,p.zP)().filter(e=>"standard"===e.id||"non-glare"===e.id),[]);(0,P.useEffect)(()=>{(null==eS?void 0:eS.isRound)&&"none"===eA&&eQ("single")},[eS,eA]),(0,P.useEffect)(()=>{"none"===eA&&eO(!1)},[eA]),(0,P.useEffect)(()=>{if("none"===eA||!tF)return},[tF,eA,tj,tw,e$.id,eY.id]),(0,P.useEffect)(()=>{if(q)return;let e=new URLSearchParams;eS&&("custom"===eS.id?(e.set("customWidth",eS.width.toString()),e.set("customHeight",eS.height.toString())):e.set("puzzleSize",eS.id)),e.set("frame",eB.id),e.set("matType",eA),e.set("mat",e$.id),"none"!==eA&&(e.set("matBorder",eZ),e_?e.set("bottomWeighted","true"):e.delete("bottomWeighted")),"double"===eA&&(e.set("bottomMat",eY.id),e.set("matReveal",eU)),eJ&&e.set("glass",eJ),e.set("hardware",e0),ta>1?e.set("quantity",ta.toString()):e.delete("quantity"),e2.enabled?(e.set("plaqueEnabled","true"),e2.line1&&e.set("plaqueLine1",e2.line1),e2.line2&&e.set("plaqueLine2",e2.line2),e2.line3&&e.set("plaqueLine3",e2.line3),e2.font&&e.set("plaqueFont",e2.font)):(e.delete("plaqueEnabled"),e.delete("plaqueLine1"),e.delete("plaqueLine2"),e.delete("plaqueLine3"),e.delete("plaqueFont"));let t="".concat(window.location.pathname,"?").concat(e.toString());window.history.replaceState({},"",t)},[eS,eB,eA,e$,eY,eZ,eU,e_,eJ,e0,ta,e2,q]);let tq=(0,P.useMemo)(()=>{if(!eS)return null;try{let e="none"===eA?0:tp,t="double"===eA?tf:0,a={serviceType:"frame-only",artworkWidth:eS.width,artworkHeight:eS.height,matType:eA,matBorderWidth:e,matRevealWidth:t,frameStyleId:eB.id,matColorId:e$.id,matInnerColorId:"double"===eA?eY.id:void 0,glassTypeId:eJ||"standard"},i=(0,d.a4)(a),r="security"===e0?8.95:0,n=!e2.enabled||"none"===eA||(null==eS?void 0:eS.isRound)?0:S.af.PRICE,l=i.total+r+n+9.95;return{...i,hardwareCost:r,nameplateCost:n,total:l}}catch(e){return console.error("Error calculating pricing:",e),null}},[eS,eB,eA,e$,eY,eJ,e0,e2.enabled,tp,tf]),tE=(0,P.useMemo)(()=>{if(!tq)return[];let e=[];
1if(tq.framePrice&&e.push({label:"Frame",amount:tq.framePrice,testId:"text-frame-cost"}),tq.matPrice){let t="double"===eA?"Mat Board (double)":"Mat Board (single)";e.push({label:t,amount:tq.matPrice,testId:"text-mat-cost"})}let t=tI.find(e=>e.id===eJ),a=(null==t?void 0:t.name)||"Glass";return tq.glassPrice>0?e.push({label:a,amount:tq.glassPrice,testId:"text-glass-cost"}):e.push({label:a,amount:0,isIncluded:!0,testId:"text-glass-cost"}),tq.oversizeFee&&e.push({label:"Oversize Fee",amount:tq.oversizeFee,testId:"text-oversize-cost"}),tq.hardwareCost>0?e.push({label:"Security Hardware",amount:tq.hardwareCost,testId:"text-hardware-cost"}):e.push({label:"Standard Hardware",amount:0,isIncluded:!0,testId:"text-hardware-cost"}),tq.nameplateCost&&tq.nameplateCost>0&&e.push({label:"Engraved Brass Nameplate",amount:tq.nameplateCost,testId:"text-nameplate-cost"}),e},[tq,eA,eJ,tI]),tL=(e,t)=>{eR(e),eW(t);let a=(0,v.$r)(e),i=(0,v.$r)(t);isNaN(a)||isNaN(i)||!(0,m._F)(a,i).valid||eM({id:"custom",pieces:0,pieceLabel:"custom",width:a,height:i,isRound:!1,isPanoramic:!1,isSquare:!1,category:"standard",aspectRatio:a/i,label:"Custom â ".concat(a,'" \xd7 ').concat(i,'"')})},tB=(0,P.useMemo)(()=>{var e,t;let a=(null==eS?void 0:eS.id)==="custom";return(0,h.cr)({puzzleSize:eS&&!a?eS.id:"",customWidth:a?String(null!==(e=null==eS?void 0:eS.width)&&void 0!==e?e:""):"",customHeight:a?String(null!==(t=null==eS?void 0:eS.height)&&void 0!==t?t:""):"",frame:eB.id,matType:eA,mat:e$.id,matBorder:"none"===eA?"":eZ,bottomWeighted:"none"!==eA&&e_?"true":"",bottomMat:"double"===eA?eY.id:"",matReveal:"double"===eA?eU:"",glass:null!=eJ?eJ:"",hardware:e0,quantity:ta>1?String(ta):"",plaqueEnabled:e2.enabled?"true":"",plaqueLine1:e2.enabled?e2.line1:"",plaqueLine2:e2.enabled?e2.line2:"",plaqueLine3:e2.enabled?e2.line3:"",plaqueFont:e2.enabled?e2.font:""})},[eS,eB.id,eA,e$.id,eZ,e_,eY.id,eU,eJ,e0,ta,e2]),tH=(0,o.$)(e2),tT=async()=>{if(!tH&&eS&&tq){tn(!0);try{let e=await (0,c.ay)({enabled:e2.enabled,config:e2,filenameBase:"nameplate-puzzle-".concat(Date.now())}),t={serviceType:"frame-only",artworkWidth:eS.width,artworkHeight:eS.height,frameStyleId:eB.id,matType:"none"===eA?"none":eA,matBorderWidth:"none"===eA?0:parseFloat(eZ),matRevealWidth:"double"===eA?parseFloat(eU):0,matColorId:e$.id,matInnerColorId:"double"===eA?eY.id:void 0,glassTypeId:eJ||"standard",orderSource:"puzzle-frame-".concat(eS.id),hangingHardware:e0,puzzlePreservationSheets:!0,brassNameplateConfig:e2.enabled?e2:void 0,additionalInfo:{...e,"Product Type":"Puzzle Frame","Puzzle glue sheets SKU":n.f}},a=(0,u.Uk)(t,tq.total,ta);j.xS.getState().addItem(a),await (0,s.X2)(t,tq.total,ta),em({title:"Added to cart",description:"".concat(ta,"\xd7 Puzzle Frame added to cart")})}catch(e){console.error("Error adding to cart:",e),em({title:"Error",description:e instanceof Error?e.message:"Failed to add to cart. Please try again.",variant:"destructive"})}finally{tn(!1)}}};return(0,i.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,i.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,i.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[(0,i.jsx)("div",{ref:eg,className:"lg:hidden col-span-full h-0","aria-hidden":"true"}),(0,i.jsx)("style",{children:ez?"\n @media (max-width: 1023.98px) {\n [data-fc-steps] {\n --fc-section-top: ".concat(ep+ef+eb,'px;\n }\n [data-cpf-preview-band="true"] {\n height: ').concat(ef,"px !important;\n max-height: ").concat(ef,"px !important;\n margin-bottom: ").concat(ex,'px !important;\n overflow: hidden !important;\n }\n [data-cpf-preview-band="true"] [data-testid="card-preview"] {\n height: 100% !important;\n max-height: 100% !important;\n overflow: hidden !important;\n display: flex !important;\n flex-direction: column !important;\n }\n [data-cpf-preview-band="true"] [data-testid="preview-container"] {\n flex: 1 1 0% !important;\n min-height: 0 !important;\n max-height: 100% !important;\n overflow: hidden !important;\n }\n }\n '):""}),(0,i.jsxs)("div",{"data-cpf-preview-band":"true",className:"space-y-6 sticky z-30 lg:overflow-visible lg:top-[132px] lg:self-start lg:z-auto",style:eh?{top:"".concat(ep,"px")}:void 0,children:[(0,i.jsx)(V.Zb,{className:"relative p-2 md:p-6","data-testid":"card-preview",children:(0,i.jsxs)("div",{className:"space-y-4 max-lg:flex-1 max-lg:min-h-0 max-lg:flex max-lg:flex-col",children:[(0,i.jsxs)("div",{ref:tk,onClick:()=>tt(!0),className:"relative bg-muted/30 rounded-md overflow-hidden cursor-zoom-in max-lg:flex-1 max-lg:min-h-0",style:eh?void 0:{minHeight:"".concat(tC,"px")},"data-testid":"preview-container",children:[(0,i.jsxs)(U.z,{variant:"secondary",size:"sm",onClick:e=>{e.stopPropagation(),tt(!0)},className:"absolute top-3 left-3 z-10 inline-flex h-auto min-h-11 w-14 flex-col items-center justify-center gap-0.5 py-1.5
1shadow-md","data-testid":"button-fullscreen-preview","aria-label":"Fullscreen view",children:[(0,i.jsx)(M.Z,{className:"h-4 w-4","aria-hidden":!0}),(0,i.jsx)("span",{className:"text-[10px] font-medium leading-tight",children:"Zoom"})]}),eS&&(0,i.jsx)("div",{className:"absolute inset-0 flex items-center justify-center p-2 md:p-8",children:(0,i.jsx)(eo,{puzzleSize:eS,framePhotos:tc,frameSku:eB.sku,matType:eA,topMatColor:e$.hexColor||e$.id,matBorderWidth:tp,bottomMatBorderWidth:tx+tv,matRevealWidth:tf,bottomMatColor:eY.hexColor||eY.id,puzzleImage:th,containerWidth:tS,containerHeight:tM,topMatColorName:e$.name,roundOpening:tb,brassNameplateConfig:e2})})]}),(0,i.jsx)("p",{className:"hidden lg:block text-xs text-muted-foreground text-center mt-2",children:"Sample image. Not included with purchase."}),(0,i.jsxs)("div",{className:"hidden lg:block mt-2 p-3 rounded-md border bg-muted/30 text-sm text-muted-foreground","data-testid":"puzzle-glue-included-notice",children:[(0,i.jsxs)("span",{className:"font-medium text-foreground",children:["Puzzle glue sheets included â"," "]}),"Every puzzle frame ships with preservation glue sheets (",(0,i.jsx)("span",{className:"font-mono text-xs",children:n.f}),"). They are listed on your order confirmation and packing slip for fulfillment."]}),(0,i.jsxs)("div",{className:"hidden lg:block mt-4 p-3 bg-muted/50 rounded-md text-sm space-y-0.5",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsxs)("p",{className:"font-medium",children:["Finished Size:"," ",(0,i.jsxs)("span",{className:"text-primary",children:[ty.toFixed(2),'" \xd7 ',tz.toFixed(2),'"']}
1)]}),eB.dimensionalDiagram&&(0,i.jsx)(ee.TooltipProvider,{children:(0,i.jsxs)(ee.u,{delayDuration:200,children:[(0,i.jsx)(ee.aJ,{asChild:!0,children:(0,i.jsx)("button",{className:"text-muted-foreground hover:text-foreground transition-colors","data-testid":"button-dimensional-diagram","aria-label":"View dimensional diagram",children:(0,i.jsx)(F.Z,{className:"h-4 w-4"})})}),(0,i.jsx)(ee._v,{side:"right",className:"p-0 border-0 bg-transparent shadow-lg",children:(0,i.jsx)("img",{src:(0,g.MX)(eB.dimensionalDiagram),alt:"".concat(eB.name," dimensional diagram"),className:"w-64 rounded-lg border-2 border-border bg-background","data-testid":"img-dimensional-diagram"})})]})})]}),(0,i.jsxs)("p",{className:"text-muted-foreground text-xs",children:["Puzzle: ",null==eS?void 0:eS.width,'" \xd7 ',null==eS?void 0:eS.height,'"',"none"!==eA&&(0,i.jsxs)(i.Fragment,{children:[" ⢠Mat Border: ",tp.toFixed(2),'"']}),"double"===eA&&(0,i.jsxs)(i.Fragment,{children:[" ⢠Reveal: ",tf.toFixed(2),'"']})]})]}),eB.alternateImages&&eB.alternateImages.length>0&&(0,i.jsx)(et.s5,{cornerUrl:e7,profileUrl:e8,lifestyleUrl:e3.url,lifestyleAlt:e3.alt,frameName:eB.name,testIdPrefix:"puzzle",className:"hidden lg:grid grid-cols-3 gap-3 pt-4"})]})}),(0,i.jsx)("div",{className:"hidden lg:block",children:(0,i.jsx)(Q.G,{})})]}),(0,i.jsxs)("div",{ref:tl,className:"space-y-6",children:[(0,i.jsx)("h2",{className:"text-3xl font-bold",children:"Puzzle Frame Designer"}),(0,i.jsx)("p",{className:"text-muted-foreground",children:"Preserve and display your completed puzzles with custom framing"}),(0,i.jsx)("div",{className:"bg-primary/10 border-2 border-primary/20 rounded-lg p-4","data-testid":"glue-sheet-callout",children:(0,i.jsxs)("div",{className:"flex items-start gap-3",children:[(0,i.jsx)("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:(0,i.jsx)(F.Z,{className:"w-5 h-5 text-primary"})}),(0,i.jsxs)("div",{className:"flex-1",children:[(0,i.jsx)("h3",{className:"font-semibold text-base mb-1",children:"Complete Puzzle Framing Kit"}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground",children:"Every puzzle frame includes professional puzzle glue sheets to permanently preserve your completed puzzle before framing. No need to purchase glue separately!"})]})]})}),(0,i.jsx)(J.Z,{}),(0,i.jsx)(V.Zb,{className:"p-6",children:(0,i.jsxs)("div",{className:"space-y-4",children:[(0,i.jsx)($._,{htmlFor:"puzzle-size",children:"Puzzle Size"}),(0,i.jsxs)(K.Ph,{value:(null==eS?void 0:eS.id)==="custom"||eI?"custom":null==eS?void 0:eS.id,onValueChange:e=>{if("custom"===e)eq(!0),eE.includes("size")||eL([...eE,"size"]);else{eq(!1),eR(""),eW(""),eL(eE.filter(e=>"size"!==e));let t=(0,m.Q8)(e);t&&eM(t)}},children:[(0,i.jsx)(K.i4,{id:"puzzle-size","data-testid":"select-puzzle-size",children:(0,i.jsx)(K.ki,{placeholder:"Select a size"})}),(0,i.jsxs)(K.Bw,{children:[(0,i.jsx)(K.Ql,{value:"puzzle-100","data-testid":"select-size-100",children:'100 pieces â 14.25" \xd7 10.25"'}),(0,i.jsx)(K.Ql,{value:"puzzle-150","data-testid":"select-size-150",children:'150 pieces â 14.25" \xd7 10.25"'}),(0,i.jsx)(K.Ql,{value:"puzzle-200","data-testid":"select-size-200",children:'200 pieces â 19.25" \xd7 14.25"'}),(0,i.jsx)(K.Ql,{value:"puzzle-300","data-testid":"select-size-300",children:'300 pieces â 18" \xd7 24"'}),(0,i.jsx)(K.Ql,{value:"puzzle-500","data-testid":"select-size-500",children:'500 pieces â 19.25" \xd7 14.25"'}),(0,i.jsx)(K.Ql,{value:"puzzle-750","data-testid":"select-size-750",children:'750 pieces â 24" \xd7 18"'}),(0,i.jsx)(K.Ql,{value:"puzzle-1000","data-testid":"select-size-1000",children:'1000 pieces â 27" \xd7 20"'}),(0,i.jsx)(K.Ql,{value:"puzzle-1500","data-testid":"select-size-1500",children:'1500 pieces â 32" \xd7 24"'}),(0,i.jsx)(K.Ql,{value:"puzzle-2000","data-testid":"select-size-2000",children:'2000 pieces â 39" \xd7 27"'}),(0,i.jsx)(J.Z,{className:"my-2"}),(0,i.jsx)(K.Ql,{value:"puzzle-500-panoramic","data-testid":"select-size-500-panoramic",children:'500 pieces (panoramic) â 26" \xd7 9"'}),(0,i.jsx)(K.Ql,{value:"puzzle-750-panoramic","data-testid":"select-size-750-panoramic",children:'750 pieces (panoramic) â 37" \xd7 12"'}),(0,i.jsx)(K.Ql,{value:"puzzle-1000-panoramic","data-testid":"select-size-1000-panoramic",children:'1000 pieces (panoramic) â 39" \xd7 13"'}),(0,i.jsx)(J.Z,{className:"my-2"}),(0,i.jsx)(K.Ql,{value:"puzzle-500-square","data-testid":"select-size-500-square",children:'500 pieces (square) â 21" \xd7 21"'}),(0,i.jsx)(K.Ql,{value:"puzzle-1000-square","data-testid":"select-size-1000-square",children:'1000 pieces (square) â 25" \xd7 25"'}),(0,i.jsx)(J.Z,{className:"my-2"}),(0,i.jsx)(K.Ql,{value:"puzzle-500-round","data-testid":"select-size-500-round",children:'500 pieces (round) â 25" diameter'}),(0,i.jsx)(K.Ql,{value:"puzzle-1000-round","data-testid":"select-size-1000-round",children:'1000 pieces (round) â 27" diameter'}),(0,i.jsx)(J.Z,{className:"my-2"}),(0,i.jsx)(K.Ql,{value:"custom","data-testid":"select-size-custom",children:"Custom dimensions"})]})]})]})}
1),(0,i.jsxs)(L.D,{barRef:ev,top:ep+ef,className:"lg:hidden",children:["frame"===ew?(0,i.jsx)(A.i,{width:null==eS?void 0:eS.width,height:null==eS?void 0:eS.height,scrollToStep:"size"}):null,"mat"!==ew||ej?null:(0,i.jsx)(H.U,{value:eA,onChange:eQ,options:["none","single","double"],border:tp,onBorderChange:e=>eD(e.toString()),borderMin:(null==eS?void 0:eS.isRound)?er.i9:er.mL,borderMax:er.yY,borderStep:.25})]}),(0,i.jsxs)(D.UQ,{"data-fc-steps":!0,ref:ey,type:"multiple",value:eE,onValueChange:eL,className:"w-full",children:[eI&&(0,i.jsxs)(D.Qd,{value:"size","data-step":"size",children:[(0,i.jsx)(D.o4,{"data-testid":"accordion-size",children:"Custom Size"}),(0,i.jsxs)(D.vF,{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"flex items-end gap-4",children:[(0,i.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,i.jsx)($._,{htmlFor:"width",children:"Puzzle Width (inches)"}),(0,i.jsx)(O.I,{id:"width",value:eF,onChange:e=>tL(e.target.value,eP),onFocus:e=>{setTimeout(()=>{e.target.scrollIntoView({behavior:"smooth",block:"center"})},300)},placeholder:"e.g., 16 or 16 1/2","data-testid":"input-width"})]}),(0,i.jsxs)("div",{className:"flex-1 space-y-2",children:[(0,i.jsx)($._,{htmlFor:"height",children:"Puzzle Height (inches)"}),(0,i.jsx)(O.I,{id:"height",value:eP,onChange:e=>tL(eF,e.target.value),onFocus:e=>{setTimeout(()=>{e.target.scrollIntoView({behavior:"smooth",block:"center"})},300)},placeholder:"e.g., 20 or 20 3/4","data-testid":"input-height"})]})]}),eF&&eP&&(()=>{let e=parseFloat(eF),t=parseFloat(eP);if(!isNaN(e)&&!isNaN(t)){let a=(0,m._F)(e,t);if(!a.valid)return(0,i.jsx)("p",{className:"text-xs text-destructive",children:a.error})}return null})(),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"Minimum 4 inches. Enter whole numbers or fractions (e.g., 12.5 or 12 1/2)"})]})]}),(0,i.jsxs)(D.Qd,{value:"frame","data-step":"frame",children:[(0,i.jsx)(D.o4,{"data-testid":"accordion-frame",children:"Frame Style"}),(0,i.jsx)(D.vF,{children:(0,i.jsx)("div",{className:"md:max-h-[400px] md:overflow-y-auto md:pr-2",children:(0,i.jsx)("div",{className:"grid grid-cols-2 gap-2",children:en.map(e=>{let t=e.thumbnail?(0,g.uQ)(e.thumbnail.startsWith("/")?e.thumbnail.slice(1):e.thumbnail):void 0;return(0,i.jsxs)("button",{type:"button",ref:eB.id===e.id?eT:void 0,onClick:()=>eH(e),className:"p-3 rounded-md border-2 text-left hover-elevate active-elevate-2 ".concat(eB.id===e.id?"border-primary":"border-transparent"),"data-testid":"button-frame-".concat(e.id),children:[t?(0,i.jsx)("div",{className:"relative h-[34px] w-full rounded mb-2 overflow-hidden border",children:(0,i.jsx)(R.default,{src:t,alt:e.name,fill:!0,className:"object-cover",sizes:"220px"})}):(0,i.jsx)("div",{className:"h-[34px] w-full rounded mb-2 border border-border",style:{background:"linear-gradient(135deg, ".concat(e.color," 0%, ").concat(e.borderColor," 100%)")}}),(0,i.jsx)("p",{className:"font-medium text-sm mb-1.5",children:e.name}),(0,i.jsxs)("div",{className:"space-y-0.5 text-xs text-muted-foreground",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 7h6m0 10v-3m-3 3h.01M9 17h.01M9 14h.01M12 14h.01M15 11h.01M12 11h.01M9 11h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),(0,i.jsxs)("span",{children:["Width: ",e.mouldingWidth,'"']})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),(0,i.jsxs)("span",{children:["Depth: ",e.usableDepth,'"']})]})]})]},e.id)})})})})]}),(0,i.jsxs)(D.Qd,{value:"mat","data-step":"mat",children:[(0,i.jsx)(D.o4,{"data-testid":"accordion-mat",children:"Mat Board"}),(0,i.jsxs)(D.vF,{className:"space-y-4",children:[(0,i.jsxs)("div",{className:"grid gap-2 ".concat((null==eS?void 0:eS.isRound)?"grid-cols-2":"grid-cols-3"),children:[!(null==eS?void 0:eS.isRound)&&(0,i.jsx)(U.z,{type:"button",variant:"none"===eA?"default":"outline",onClick:()=>eQ("none"),"data-testid":"button-mat-none",children:(0,i.jsx)("span",{className:"font-semibold",children:"No Mat"})}),(0,i.jsx)(U.z,{type:"button",variant:"single"===eA?"default":"outline",onClick:()=>eQ("single"),"data-testid":"button-mat-single",children:(0,i.jsx)("span",{className:"font-semibold",children:"Single Mat"})}),(0,i.jsx)(U.z,{type:"button",variant:"double"===eA?"default":"outline",onClick:()=>eQ("double"),"data-testid":"button-mat-double",children:(0,i.jsx)("span",{className:"font-semibold",children:"Double Mat"})})]}),"none"!==eA&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)($._,{htmlFor:"matBorder",children:"Mat Border Width"}),(0,i.jsxs)("span",{className:"text-sm font-medium","data-testid":"text-mat-border-value",children:[tp.toFixed(2),'"']}
1)]}),(0,i.jsx)(X.i,{id:"matBorder",min:(null==eS?void 0:eS.isRound)?er.i9:er.mL,max:er.yY,step:.25,value:[tp],onValueChange:e=>{var t;return eD((null!==(t=e[0])&&void 0!==t?t:0).toString())},"data-testid":"slider-mat-border","aria-label":"Mat border width in inches","aria-valuemin":(null==eS?void 0:eS.isRound)?er.i9:er.mL,"aria-valuemax":er.yY,"aria-valuenow":tp,"aria-valuetext":"".concat(tp.toFixed(2)," inches")}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"Border on each side of the puzzle"})]}),tF&&(0,i.jsx)("div",{className:"bg-yellow-50 dark:bg-yellow-950 border border-yellow-200 dark:border-yellow-800 rounded-md p-3 text-sm text-yellow-800 dark:text-yellow-200","data-testid":"warning-oversize",children:(0,i.jsx)("p",{children:'This mat exceeds standard sheet size 32"\xd740". Limited color selection available.'})}),!(null==eS?void 0:eS.isRound)&&(0,i.jsx)(ea.D,{checked:e_,onCheckedChange:eO,testIdPrefix:"puzzle"}),(0,i.jsxs)("div",{className:"space-y-3 ".concat("double"===eA?"pt-4 pb-3 px-3 md:px-0 bg-muted/40 md:bg-transparent rounded-lg":""),children:["double"===eA?(0,i.jsxs)($._,{className:"text-base font-semibold",children:["Top Mat: ",e$.name]}):(0,i.jsxs)($._,{children:["Mat: ",e$.name]}),(0,i.jsx)(_.p,{standardColors:tP,premiumColors:tW,selectedId:e$.id,onSelect:e=>eG(e)})]}),"double"===eA&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(J.Z,{className:"my-6"}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between",children:[(0,i.jsx)($._,{htmlFor:"matReveal",children:"Mat Reveal Width"}),(0,i.jsxs)("span",{className:"text-sm font-medium","data-testid":"text-mat-reveal-value",children:[tf.toFixed(2),'"']}
1)]}),(0,i.jsx)(X.i,{id:"matReveal",min:.25,max:1,step:.25,value:[tf],onValueChange:e=>{var t;return eV((null!==(t=e[0])&&void 0!==t?t:0).toString())},"data-testid":"slider-mat-reveal","aria-label":"Mat reveal width in inches"}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"The reveal is the inner mat border visible around the puzzle"})]}),(0,i.jsxs)("div",{className:"space-y-3 pt-4 pb-3 px-3 md:px-0 bg-muted/40 md:bg-transparent rounded-lg",children:[(0,i.jsxs)($._,{className:"text-base font-semibold",children:["Accent Mat: ",eY.name]}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"Thin border mat visible around the opening"}),(0,i.jsx)(_.p,{standardColors:tP,premiumColors:tW,selectedId:eY.id,onSelect:e=>eK(e)})]})]})]})]})]}),"none"!==eA&&!(null==eS?void 0:eS.isRound)&&(0,i.jsxs)(D.Qd,{value:"nameplate","data-step":"nameplate",className:"border rounded-lg px-4",children:[(0,i.jsx)(D.o4,{className:"text-base font-semibold hover:no-underline py-4","data-testid":"accordion-nameplate",children:"Engraved Brass Nameplate"}),(0,i.jsx)(D.vF,{className:"pt-2 pb-4",children:(0,i.jsx)(E.W,{config:e2,onChange:e5})})]}),(0,i.jsxs)(D.Qd,{value:"glass","data-step":"glass",children:[(0,i.jsx)(D.o4,{"data-testid":"accordion-glass",children:"Glazing"}),(0,i.jsx)(D.vF,{children:(0,i.jsx)(Y.E,{value:eJ||void 0,onValueChange:e=>{eX(["standard","non-glare"].includes(e)?e:"standard")},children:(0,i.jsx)("div",{className:"space-y-2",children:tI.map(e=>(0,i.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,i.jsx)(Y.m,{value:e.id,id:"glass-".concat(e.id),"data-testid":"radio-glass-".concat(e.id)}),(0,i.jsx)($._,{htmlFor:"glass-".concat(e.id),className:"flex-1 cursor-pointer",children:e.name})]},e.id))})})})]}),(0,i.jsxs)(D.Qd,{value:"hardware","data-step":"hardware",children:[(0,i.jsx)(D.o4,{"data-testid":"accordion-hardware",children:"Hanging Hardware"}),(0,i.jsx)(D.vF,{className:"space-y-4 pt-4",children:(0,i.jsx)(ei.A,{hardwareType:e0,setHardwareType:e1,frameWidth:tj,frameHeight:tw})})]})]}),tq&&(0,i.jsx)(G.b,{totalPrice:tq.total,quantity:ta,onQuantityChange:ti,onAddToCart:tT,onCopyLink:()=>{navigator.clipboard.writeText(tB),em({title:"Link copied!",description:"Design link copied to clipboard"})},designUrl:tB,isProcessing:tr,disabled:!eS,priceItems:tE,testIdPrefix:"puzzle-"})]})]})}),(0,i.jsx)(Z.p,{open:te,onOpenChange:tt,title:"Preview",fitContent:!0,"data-testid":"dialog-puzzle-fullscreen",children:eS?(0,i.jsx)("div",{style:{filter:"drop-shadow(0 8px 32px rgba(0, 0, 0, 0.15))"},children:(0,i.jsx)(eo,{puzzleSize:eS,framePhotos:tc,frameSku:eB.sku,matType:eA,topMatColor:e$.hexColor||e$.id,matBorderWidth:tp,bottomMatBorderWidth:tx+tv,matRevealWidth:tf,bottomMatColor:eY.hexColor||eY.id,puzzleImage:th,containerWidth:800,containerHeight:600,topMatColorName:e$.name,roundOpening:tb,brassNameplateConfig:e2})}):null}),(0,i.jsx)(B.L,{barState:to,total:(null!==(a=null==tq?void 0:tq.total)&&void 0!==a?a:0)*ta,quantity:ta,onQuantityChange:ti,onAddToCart:tT,onContinueDesigning:td,isProcessing:tr,disabled:tH,ownershipGate:tH?(0,i.jsx)(T.O,{checked:null!==(f=e2.proofreadConfirmed)&&void 0!==f&&f,onChange:e=>e5({...e2,proofreadConfirmed:e})}):null,eyebrow:(()=>{let e=ty.toFixed(1).replace(/\.0$/,""),t=tz.toFixed(1).replace(/\.0$/,""),a=eB.name;return"Finished size: ".concat(e,"â³ \xd7 ").concat(t,"â³").concat(a?" | ".concat(a):"")})()})]})}function eo(e){let t,a,{puzzleSize:r,framePhotos:n,frameSku:l,matType:s,topMatColor:o,bottomMatColor:d,puzzleImage:c,containerWidth:u,containerHeight:m,topMatColorName:h,matBorderWidth:p=2.5,bottomMatBorderWidth:x,matRevealWidth:g=.25,roundOpening:v=null,brassNameplateConfig:b}=e,j="none"===s?0:p,w="none"===s?0:null!=x?x:p,y="double"===s?g:0;v&&r.isRound?(t=v.diameter+2*j+2*y,a=v.diameter+2*j+2*y):(t=r.width+2*j+2*y,a=r.height+j+w+2*y);let z=Math.min((u-40)/((t+2)*72),(m-40)/((a+2)*72),1),N=72*z,k=72*t*z+2*N,C=72*a*z+2*N,M=Math.max(2,4.5*z),F=h?(0,f.fs)(h):"#F5F3EE",R=72*r.width*z,P=72*r.height*z,W=72*j*z,I=72*w*z,E=(()=>{if(!(null==b?void 0:b.enabled)||"none"===s)return null;let e=72*S.af.NAMEPLATE_WIDTH*z,t=72*S.af.NAMEPLATE_HEIGHT*z;
1return{x:(k-e)/2,y:N+W+P+72*z,width:e,height:t,renderScale:72*z/150}})();return(0,i.jsxs)("div",{className:"relative",style:{width:k,height:C},children:[(null==n?void 0:n.topUrl)&&(null==n?void 0:n.bottomUrl)&&(null==n?void 0:n.leftUrl)&&(null==n?void 0:n.rightUrl)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,height:N,backgroundImage:"url(".concat(n.topUrl,")"),backgroundSize:"auto 100%",backgroundRepeat:"repeat-x",backgroundPosition:"left center",zIndex:20,clipPath:"polygon(\n 0 0,\n 100% 0,\n calc(100% - ".concat(N,"px) 100%,\n ").concat(N,"px 100%\n )")}}),(0,i.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:N,backgroundImage:"url(".concat(n.bottomUrl,")"),backgroundSize:"auto 100%",backgroundRepeat:"repeat-x",backgroundPosition:"left center",zIndex:20,clipPath:"polygon(\n ".concat(N,"px 0,\n calc(100% - ").concat(N,"px) 0,\n 100% 100%,\n 0 100%\n )")}}),(0,i.jsx)("div",{className:"absolute top-0 bottom-0 left-0 z-10",style:{width:N,backgroundImage:"url(".concat(n.leftUrl,")"),backgroundSize:"100% auto",backgroundRepeat:"repeat-y",backgroundPosition:"center top"}}),(0,i.jsx)("div",{className:"absolute top-0 bottom-0 right-0 z-10",style:{width:N,backgroundImage:"url(".concat(n.rightUrl,")"),backgroundSize:"100% auto",backgroundRepeat:"repeat-y",backgroundPosition:"center top"}})]}):(0,i.jsx)("div",{className:"absolute inset-0 rounded-sm",style:{backgroundColor:"#1a1a1a",boxShadow:"0 4px 12px rgba(0,0,0,0.15)"}}),(0,i.jsx)("div",{className:"absolute overflow-hidden",style:{inset:N},children:"none"===s?(0,i.jsx)("img",{src:c,alt:"Puzzle",className:"w-full h-full object-cover"}):"double"===s?(0,i.jsx)("div",{className:"relative w-full h-full",style:{backgroundColor:o},children:(0,i.jsx)("div",{className:"absolute",style:{backgroundColor:d,top:W,left:W,right:W,bottom:I,border:"".concat(5.76*z,"px solid #eeeeee"),borderRadius:r.isRound?"50%":void 0},children:(0,i.jsx)("div",{className:"absolute",style:{inset:72*y*z,borderRadius:r.isRound?"50%":void 0,overflow:"hidden"},children:r.isRound&&v?(0,i.jsxs)("svg",{className:"absolute",style:{top:0,left:0,width:"100%",height:"100%"},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid slice",children:[(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"roun
1d-puzzle-clip-".concat(l||"preview","-double"),clipPathUnits:"objectBoundingBox",children:(0,i.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5"})})}),(0,i.jsx)("image",{href:c,x:"0",y:"0",width:"100",height:"100",preserveAspectRatio:"xMidYMid slice",clipPath:"url(#round-puzzle-clip-".concat(l||"preview","-double)")}),(0,i.jsx)("circle",{cx:"50",cy:"50",r:50-M/(R/100)/2,fill:"none",stroke:F,strokeWidth:M/(R/100),vectorEffect:"non-scaling-stroke"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:c,alt:"Puzzle",className:"absolute inset-0 w-full h-full object-cover"}),(0,i.jsx)("div",{className:"absolute inset-0 pointer-events-none",style:{border:"".concat(M,"px solid ").concat(F)}})]})})})}):(0,i.jsx)("div",{className:"relative w-full h-full",style:{backgroundColor:o},children:(0,i.jsx)("div",{className:"absolute",style:{top:W,left:W,right:W,bottom:I,borderRadius:r.isRound?"50%":void 0,overflow:"hidden"},children:r.isRound&&v?(0,i.jsxs)("svg",{className:"absolute",style:{top:0,left:0,width:"100%",height:"100%"},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid slice",children:[(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"roun
1d-puzzle-clip-".concat(l||"preview","-single"),clipPathUnits:"objectBoundingBox",children:(0,i.jsx)("circle",{cx:"0.5",cy:"0.5",r:"0.5"})})}),(0,i.jsx)("image",{href:c,x:"0",y:"0",width:"100",height:"100",preserveAspectRatio:"xMidYMid slice",clipPath:"url(#round-puzzle-clip-".concat(l||"preview","-single)")}),(0,i.jsx)("circle",{cx:"50",cy:"50",r:50-M/(R/100)/2,fill:"none",stroke:F,strokeWidth:M/(R/100),vectorEffect:"non-scaling-stroke"})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("img",{src:c,alt:"Puzzle",className:"absolute inset-0 w-full h-full object-cover"}),(0,i.jsx)("div",{className:"absolute inset-0 pointer-events-none",style:{border:"".concat(M,"px solid ").concat(F)}})]})})})}),E&&b&&(0,i.jsx)("div",{style:{position:"absolute",left:E.x,top:E.y,width:E.width,height:E.height,zIndex:25},"data-testid":"preview-nameplate",children:(0,i.jsx)(q.N,{config:b,scale:E.renderScale})})]})}},61871:function(e,t,a){a.d(t,{N:function(){return m}});var i=a(27573),r=a(58410),n=a(85094),l=a(2966),s=a(10269),o=a(50294),d=a(7653),c=a(96979),u=a(63838);function m(e){let{eyebrow:t,title:a,subtitle:m,images:h,testIdPrefix:p,ariaLabel:f,randomize:x=!0}=e,[g,v]=(0,d.useState)(p);(0,d.useEffect)(()=>{v("".concat(p,"-").concat(Math.random().toString(36).slice(2)))},[p]);let b=(0,d.useMemo)(()=>(x?function(e,t){let a=[...e],i=0;for(let e=0;e<t.length;e++)i=Math.imul(31,i)+t.charCodeAt(e)|0;let r=()=>((i=Math.imul(1664525,i)+1013904223|0)>>>0)/4294967296;for(let e=a.length-1;e>0;e--){let t=Math.floor(r()*(e+1)),i=a[e];a[e]=a[t],a[t]=i}return a}(h,g):h).slice(0,9),[h,x,g]),{scrollContainerRef:j,showPrevButton:w,showNextButton:y,scrollPrevious:z,scrollNext:N,handleScroll:k,handleImageLoad:C}=(0,u.f)(b.length),[S,M]=(0,d.useState)(!1),[F,R]=(0,d.useState)(null);return((0,d.useEffect)(()=>{var e,t;if(S||F||b.length<=1||(null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(prefers-reduced-motion: reduce)").matches))return;let a=window.setInterval(()=>{let e=j.current;e&&(e.scrollLeft>=e.scrollWidth-e.clientWidth-10?e.scrollTo({left:0,behavior:"smooth"}):N())},3800);return()=>window.clearInterval(a)},[S,F,b.length,N,j]),(0,d.useEffect)(()=>{if(!F)return;let e=e=>{"Escape"===e.key&&R(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F]),0===b.length)?null:(0,i.jsxs)("section",{className:"py-8 md:py-12","data-testid":"".concat(p,"-section"),children:[(0,i.jsxs)("div",{className:"text-center mb-6",children:[t&&(0,i.jsx)("p",{className:"text-lg text-muted-foreground mb-2","data-testid":"".concat(p,"-eyebrow"),children:t}),(0,i.jsx)("h2",{className:"text-2xl md:text-3xl font-semibold mb-2","data-testid":"".concat(p,"-heading"),children:a}),m&&(0,i.jsx)("p",{className:"text-muted-foreground max-w-2xl mx-auto","data-testid":"".concat(p,"-subtitle"),children:m})]}),(0,i.jsxs)("div",{className:"relative group px-4",role:"region","aria-label":f,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),onFocusCapture:()=>M(!0),onBlurCapture:()=>M(!1),children:[w&&(0,i.jsx)(c.z,{variant:"ghost",size:"icon",className:"absolute left-4 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full bg-background/90 hover:bg-background shadow-lg opacity-80 hover:opacity-100 transition-opacity",onClick:z,"aria-label":"View previous photos","data-testid":"button-".concat(p,"-carousel-previous"),children:(0,i.jsx)(r.Z,{className:"h-6 w-6"})}),(0,i.jsx)("div",{ref:j,className:"overflow-x-auto scroll-smooth scrollbar-hide",onScroll:k,"data-testid":"".concat(p,"-carousel-container"),children:(0,i.jsx)("div",{className:"flex gap-5 px-2",children:b.map((e,t)=>(0,i.jsx)("button",{type:"button",onClick:()=>R(e),className:"group/card relative rounded-lg border bg-card flex-shrink-0 w-72 md:w-80 lg:w-[340px] overflow-hidden hover-elevate active-elevate-2 cursor-pointer","data-testid":"".concat(p,"-image-").concat(t),"aria-label":"Gallery image ".concat(t+1," of ").concat(b.length," - Click to enlarge"),children:(0,i.jsxs)("div",{className:"aspect-[4/3] relative overflow-hidden",children:[(0,i.jsx)(o.default,{src:e.url,alt:e.alt,fill:!0,className:"object-cover transition-transform duration-300 group-hover/card:scale-105",sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 50vw, 33vw",priority:!1,placeholder:"blur",blurDataURL:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Crect fill='%23e5e7eb' width='400' height='300'/%3E%3C/svg%3E",onLoad:C,onError:e=>{e.target.style.display="none"}}),(0,i.jsx)("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover/card:opacity-100 transition-opacity bg-black/30",children:(0,i.jsx)("div",{className:"bg-background/90 p-3 rounded-full shadow-lg",children:(0,i.jsx)(n.Z,{className:"h-6 w-6"})})})]})},"".concat(e.url,"-").concat(t)))})}),y&&(0,i.jsx)(c.z,{variant:"ghost",size:"icon",className:"absolute right-4 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full bg-background/90 hover:bg-background shadow-lg opacity-80 hover:opacity-100 transition-opacity",onClick:N,"aria-label":"View next photos","data-testid":"button-".concat(p,"-carousel-next"),children:(0,i.jsx)(l.Z,{className:"h-6 w-6"})})]}),F&&(0,i.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6",role:"dialog","aria-modal":"true","aria-label":"Enlarged gallery image","data-testid":"".concat(p,"-lightbox"),children:[(0,i.jsx)("button",{type:"button","aria-label":"Close enlarged image",className:"absolute inset-0 cursor-default bg-black/80",onClick:()=>R(null)}),(0,i.jsxs)("div",{className:"relative z-10 flex max-h-[90vh] max-w-[92vw] flex-col items-center",children:[(0,i.jsx)("img",{src:F.url,alt:F.alt,className:"max-h-[85vh] max-w-[92vw] rounded-lg object-contain"}),F.alt&&(0,i.jsx)("p",{className:"mt-2 text-center text-sm text-white/90",children:F.alt}),(0,i.jsx)(c.z,{variant:"ghost",size:"icon",className:"absolute -right-3 -top-3 h-9 w-9 rounded-full bg-background shadow-lg",onClick:()=>R(null),"aria-label":"Close enlarged image",children:(0,i.jsx)(s.Z,{className:"h-5 w-5"})})]})]})]})}},24924:function(e,t,a){a.d(t,{D:function(){return o},h:function(){return d}});var i=a(27573),r=a(27126),n=a(82874),l=a(29608),s=a(67163);function o(e){let{checked:t,onCheckedChange:a,testIdPrefix:o=""}=e,d=o?"".concat(o,"-"):"";return(0,i.jsxs)("div",{className:"flex items-center space-x-2 pt-2",children:[(0,i.jsx)(n.X,{id:"".concat(d,"bottomWeighted"),checked:t,onCheckedChange:e=>a(!0===e),"data-testid":"".concat(d,"checkbox-bottom-weighted")}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(l._,{htmlFor:"".concat(d,"bottomWeighted"),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:"Bottom-Weighted Matting"}),(0,i.jsxs)(s.u,{delayDuration:200,children:[(0,i.jsx)(s.aJ,{asChild:!0,children:(0,i.jsx)("button",{type:"button",className:"text-muted-foreground hover:text-foreground transition-colors","data-testid":"".concat(d,"button-bottom-weighted-info"),"aria-label":"Information about bottom-weighted matting",children:(0,i.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,i.jsx)(s._v,{className:"max-w-xs",children:(0,i.jsx)("p",{className:"text-sm",children:'Adds 0.5" to the bottom border for visual balance. This professional standard prevents artwork from appearing to sink.'})})]})]})]})}let d=.5},36588:function(e,t,a){a.d(t,{h$:function(){return o.h},DR:function(){return o.D},s5:function(){return l},AM:function(){return s.A}}),a(61871);var i=a(27573),r=a(7653),n=a(74747);function l(e){var t;let{cornerUrl:a,profileUrl:l,lifestyleUrl:s,lifestyleAlt:o="Frame in a home setting",frameName:d,testIdPrefix:c,className:u="hidden lg:grid grid-cols-3 gap-2",aspect:m="square"}=e,[h,p]=(0,r.useState)(null),f="4/3"===m?"aspect-[4/3]":"aspect-square",x="".concat(f," rounded-md border overflow-hidden bg-background hover:shadow-md active:scale-[0.98] transition-all cursor-zoom-in"),g="".concat(f," rounded-md border-2 border-dashed border-border flex items-center justify-center bg-muted/30"),v=e=>d?"".concat(d," â ").concat(e):e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:u,children:[{kind:"corner",url:a,label:"Frame Corner Detail",alt:"Frame corner detail"},{kind:"profile",url:l,label:"Frame Profile View",alt:"Frame profile view"},{kind:"lifestyle",url:s,label:"Lifestyle Photo",alt:o}].map(e=>{let{kind:t,url:a,label:r,alt:n}=e;return a?(0,i.jsx)("button",{type:"button",onClick:()=>p({kind:t,url:a,title:v(r),alt:n}
1),className:x,"data-testid":"button-".concat(c,"-thumb-").concat(t),"aria-label":"Enlarge ".concat(r.toLowerCase()),children:(0,i.jsx)("img",{src:a,alt:n,loading:"lazy",className:"w-full h-full object-cover"})},t):(0,i.jsx)("div",{className:g},t)})}),(0,i.jsx)(n.p,{open:null!==h,onOpenChange:e=>{e||p(null)},title:null!==(t=null==h?void 0:h.title)&&void 0!==t?t:"Frame detail",src:null==h?void 0:h.url,alt:null==h?void 0:h.alt,"data-testid":"dialog-".concat(c,"-thumb-expand")})]})}a(63838);var s=a(83648),o=a(24924)},57543:function(e,t,a){a.d(t,{i9:function(){return n},mL:function(){return i},yY:function(){return r}});let i=1,r=8,n=1.5},63838:function(e,t,a){a.d(t,{f:function(){return r}});var i=a(7653);function r(e){let t=(0,i.useRef)(null),[a,r]=(0,i.useState)(!1),[n,l]=(0,i.useState)(!1),s=(0,i.useCallback)(()=>{let e=t.current;if(!e)return;let{scrollLeft:a,scrollWidth:i,clientWidth:n}=e;if(i<=n+5){r(!1),l(!1);return}r(a>10),l(a<i-n-10)},[]),o=(0,i.useCallback)(()=>{let e=t.current;if(!e)return 340;let a=e.querySelector(".flex > div, .flex > button");if(!a)return 340;let i=a.offsetWidth,r=e.querySelector(".flex");return i+(parseFloat(window.getComputedStyle(r).gap)||20)},[]),d=(0,i.useCallback)(()=>{let e=t.current;if(!e)return;let{scrollWidth:a,clientWidth:i}=e;if(a<=i+5)return;let r=o();e.scrollBy({left:-r,behavior:"smooth"})},[o]),c=(0,i.useCallback)(()=>{let e=t.current;if(!e)return;let{scrollWidth:a,clientWidth:i}=e;if(a<=i+5)return;let r=o();e.scrollBy({left:r,behavior:"smooth"})},[o]),u=(0,i.useCallback)(()=>{s()},[s]),m=(0,i.useCallback)(e=>{"ArrowLeft"===e.key?(e.preventDefault(),d()):"ArrowRight"===e.key&&(e.preventDefault(),c())},[d,c]);return(0,i.useLayoutEffect)(()=>{s()},[e,s]),(0,i.useEffect)(()=>{let e=t.current;if(!e)return;let a=new ResizeObserver(()=>{s()});return a.observe(e),()=>{a.disconnect()}},[s]),(0,i.useEffect)(()=>(window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)),[s]),{scrollContainerRef:t,showPrevButton:a,showNextButton:n,scrollPrevious:d,scrollNext:c,handleScroll:s,handleImageLoad:u,handleKeyDown:m}}},13947:function(e,t,a){a.d(t,{K:function(){return r}});var i=a(7653);function r(e){let t=(0,i.useRef)(null);return(0,i.useLayoutEffect)(()=>{if(!e)return;let a=()=>{let e=t.current;if(!e)return;let a=e.parentElement;for(;a;){let t=getComputedStyle(a).overflowY;if(("auto"===t||"scroll"===t)&&a.scrollHeight>a.clientHeight){let t=e.getBoundingClientRect(),i=a.getBoundingClientRect();t.top<i.top?a.scrollTop-=i.top-t.top:t.bottom>i.bottom&&(a.scrollTop+=t.bottom-i.bottom);return}a=a.parentElement}};a();let i=requestAnimationFrame(a),r=window.setTimeout(a,80);return()=>{cancelAnimationFrame(i),window.clearTimeout(r)}},[e]),t}}}]);
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.