1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9052],{476046:function(e,t,o){(window.__NEXT_P=window.__NEXT_P||[]).push(["/template-maker",function(){return o(357344)}])},912819:function(e,t,o){"use strict";var n=o(983680);t.Z=n.ci},459159:function(e,t,o){"use strict";var n=o(912819);t.Z=n.Z},868453:function(e,t,o){"use strict";o.d(t,{o9:function(){return n.Z},u7:function(){return p}});o(488984);var n=o(634660),r=o(397458),s=o(15071),a=o(615736);var i=(0,o(589915).Z)(e=>({root:{backgroundColor:"#FAFAFA"},body:{display:"flex",minHeight:"calc(100vh - 72px)",flexDirection:"column",justifyContent:"space-between"},innerContainer:{fontFamily:'"Roboto", sans-serif',width:"80%",maxWidth:"1280px",padding:"15px",margin:"0 auto",[e.breakpoints.down("lg")]:{width:"100%"},[e.breakpoints.down("sm")]:{width:"100%"}}})),c=o(397028),l=o(682485),d=o.n(l),u=o(51458);const m=new Set;var p=e=>{let{pageLayoutData:{menu:t,footer:o},description:l,hubspotForm:p}=e;const h=i(),g={...o};return(0,r.jsxs)(a.Z,{className:h.root,children:[(0,r.jsx)(n.Z,{menu:t}),(0,r.jsxs)(a.Z,{component:"div",className:h.body,children:[(0,r.jsxs)(a.Z,{component:"div",className:h.innerContainer,children:[(0,r.jsx)(s.PF,{htmlDescriptionWithTitleView:{description:l}}),p&&(0,r.jsx)(d(),{src:u.KM4,onLoad:()=>{if(p&&window.hbspt){const{formId:e,portalId:t,region:o}=p;if(m.has(e))return;m.add(e),window.hbspt.forms.create({portalId:t,formId:e,region:o,target:"#".concat(u.AYs).concat(e)})}}})]}),(0,r.jsx)(c.default,{data:g})]})]})};o(131141)},429383:function(e,t,o){"use strict";o.d(t,{QK:function(){return n},default:function(){return r}});o(42437);var n=JSON.parse('{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.boxup.com#org","name":"BoxUp","alternateName":"BoxUp.com","url":"https://www.boxup.com","image":"https://www.datocms-assets.com/61470/1679416831-display-mailer-your-brand-here-fast-delivery-pink.png","logo":"https://www.datocms-assets.com/61470/1650472062-boxup-logo.png","sameAs":["https://www.facebook.com/boxup.printing/","https://www.instagram.com/iboxup/","https://www.youtube.com/@iboxup","https://www.tiktok.com/@iboxup"],"description":"Affordable custom-printed boxes & packaging for your business. Design your logo box with easy online tools, no minimums, & full-color printing.","address":{"@type":"PostalAddress","streetAddress":"1303 E Industrial Dr","addressLocality":"Terre Haute","addressRegion":"IN","addressCountry":"US"},"telephone":"8125659090","email":"[email protected]","contactPoint":[{"@type":"ContactPoint","contactType":"Customer Service","email":"[email protected]","availableLanguage":["English"],"areaServed":"US"}],"brand":{"@type":"Brand","name":"BoxUp"},"knowsAbout":["custom printed boxes","custom packaging","shipping boxes","mailer boxes","ecommerce packaging","custom tape","subscription boxes","custom poly mailers","logo boxes"]},{"@type":"WebSite","@id":"https://www.boxup.com#website","url":"https://www.boxup.com","name":"BoxUp â Custom Printed Boxes & Packaging","publisher":{"@id":"https://www.boxup.com#org"}},{"@type":"WebPage","@id":"https://www.boxup.com/#webpage","url":"https://www.boxup.com/","name":"Custom Printed Boxes & Packaging | BoxUp","isPartOf":{"@id":"https://www.boxup.com#website"},"about":{"@id":"https://www.boxup.com#org"},"description":"Custom printed boxes with low minimums, an online 3D design tool, and fast U.S. production."},{"@type":"BreadcrumbList","@id":"https://www.boxup.com#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.boxup.com/"}]},{"@type":"Service","@id":"https://www.boxup.com#service","name":"Custom Printed Packaging Boxes","serviceType":"Custom printed corrugated packaging","provider":{"@id":"https://www.boxup.com#org"},"description":"Create full-color custom printed boxes, mailers, and shipping cartons. No minimum order quantity. Online 3D design tool and templates.","areaServed":"US","url":"https://www.boxup.com"},{"@type":"FAQPage","@id":"https://www.boxup.com#faq","mainEntity":[{"@type":"Question","name":"What does BoxUp do?","acceptedA
1nswer":{"@type":"Answer","text":"BoxUp provides custom-printed boxes and packaging. Customers can design mailers, shipping boxes, custom packaging tape, stickers/roll labels and poly mailers online using a 3D design tool. Expect low minimum order quantity and fast turnarounds."}},{"@type":"Question","name":"What types of custom printed products can I buy?","acceptedAnswer":{"@type":"Answer","text":"We offer six different styles of full color custom printed boxes: shipper boxes, end-open mailers, top-open gift mailers, display mailers, square mailers, and gable boxes. You may also choose from our custom logo boxes, which are a more affordable custom box option with less printable area. We also offer custom tape, poly mailers, and roll labels/stickers."}},{"@type":"Question","name":"How does the BoxUp design tool work?","acceptedAnswer":{"@type":"Answer","text":"You choose a box style and size, upload your logo or artwork, and preview the box in 3D before ordering. You can also start with one of our templates and alter the design to meet your needs. Our web-based editor requires no design software and automatically generates dielines for production."}},{"@type":"Question","name":"Can you help me choose the right size for my box?","acceptedA
1nswer":{"@type":"Answer","text":"Certainly! Reach out to us to get a better feel for what our custom printed boxes can fit. We also offer $1 pre-printed stock samples of each of our products so you can test the sizes before placing a full order. You can order stock sample boxes by clicking the \\"Order a Sample\\" link located under the orange \\"Design Now\\" button. You can also choose \\"$1 Stock Box Samples\\" from our navigation header."}},{"@type":"Question","name":"Can I get a printed sample before placing a large order?","acceptedAnswer":{"@type":"Answer","text":"Yes! We offer every customer a free printed proof of your custom box design to evaluate the print quality and structural fit before placing a larger order. Use the promo code FREEPROOF at checkout to order a single custom print and you\'ll only pay for shipping! And if you just need to determine the correct box size, we offer $1 preprinted or blank samples. Just select the \\"Order A Sample\\" link on any box product page."}},{"@type":"Question","name":"How long does production and shipping take?","acceptedA
1nswer":{"@type":"Answer","text":"Production and shipping time is dependent on which shipping option you choose at checkout, but can take as little as 4 business days. Rush, Express, and Economy shipping options are available with estimated in-hands dates for each option. And we print and ship boxes from our U.S. facility for fast delivery."}},{"@type":"Question","name":"Is there a minimum order quantity?","acceptedAnswer":{"@type":"Answer","text":"There is no minimum quantity on boxes. You can always order a single print of any box design. If you choose to place a larger order, boxes can be ordered in multiples of 12, up to 20,148."}},{"@type":"Question","name":"Can you print inside the box?","acceptedAnswer":{"@type":"Answer","text":"Yes, you can print on the inside of any of our Display Mailers, Shippers, or Square Mailers."}},{"@type":"Question","name":"How do I contact customer support?","acceptedAnswer":{"@type":"Answer","text":"You can reach our U.S.-based support team by email at [email protected] or via live chat during business hours. We\'ll help with design questions, artwork setup, and shipping."}}]}]}'),r={DIGITAL_CATALOG_FILE_NAME:"BoxUp_Digital_Catalog.pdf"}},357344:function(e,t,o){"use strict";o.r(t),o.d(t,{__N_SSG:function(){return ct},default:function(){return lt}});var n=o(397458),r=o(868453),s=o(397028),a=o(696198),i=o(544658),c=o(615736),l=o(590003),d=o(652983),u=o(59277),m=o(186023),p=o(695726),h=o(589915);const g=e=>({tileBackgroundColor:e.palette.background.default,tileBorderColor:"#707070",crossBtnColor:"#E6E6E6",btnColor:e.palette.secondary.dark});var x=(0,h.Z)(e=>({filterCardRoot:{padding:"4px 8px",borderRadius:"5px",border:"1px solid ".concat(g(e).tileBorderColor),background:"".concat(g(e).tileBackgroundColor," 0% 0% no-repeat padding-box")},clearAllBtn:{textTransform:"initial",cursor:"pointer",color:g(e).btnColor},iconBtn:{padding:"2px",color:g(e).tileBorderColor,background:"".concat(g(e).crossBtnColor," 0% 0% no-repeat padding-box"),marginBottom:"3px"},crossIcon:{fontSize:"15px"}}));const f=e=>{let{label:t,onClick:o}=e;const r=x();return(0,n.jsxs)(c.Z,{component:"span",className:r.filterCardRoot,children:[(0,n.jsx)(l.Z,{component:"span",variant:"body2",children:t}),"Â Â ",(0,n.jsx)(u.Z,{"aria-label":"Remove applied filters",className:r.iconBtn,onClick:o,size:"small",children:(0,n.jsx)(m.Z,{fontSize:"small",className:r.crossIcon})})]})};var b=(0,p.Z)(e=>{let{items:t,refine:o,setIsResetFilter:r}=e;const s=x();return 0===t.length?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)("div",{children:(0,n.jsxs)(a.ZP,{container:!0,spacing:1,children:[(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(l.Z,{component:"span",variant:"body1",children:(0,n.jsx)("b",{children:"You've Selected:"})})}),t.map((e,t)=>(0,n.jsx)(n.Fragment,{children:e.items?(0,n.jsx)(n.Fragment,{children:e.items.map((e,t)=>(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(f,{label:e.label,onClick:()=>o(e.value)},"".concat(e.label,"-").concat(t))},e.label))}):(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(f,{label:e.label,onClick:()=>o(e.value)},"".concat(e.value,"-").concat(t))})})),(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(l.Z,{component:"span",variant:"subtitle1",className:s.clearAllBtn,onClick:()=>{r&&r(!0),o(t)},children:"Clear All"})})]})})}),y=o(930810),v=o(68389),w=o(234212),j=o(103848),C=o(434959);const k=e=>({tileBackgroundColor:e.palette.background.default,tileBorderColor:"rgba(0, 0, 0, 0.25)",imgContainerBorderColor:e.palette.text.primary});var I=(0,h.Z)(e=>({tileRoot:{border:"2px solid ".concat(k(e).tileBorderColor),cursor:"pointer",background:k(e).tileBackgroundColor,height:"100%"},camTileHoverPad:{"&:hover img":{paddingTop:"12px"}},defaultTileRoot:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"12.5rem","& .defaultImg":{height:"80px",padding:"5px 0px",[e.breakpoints.down("sm")]:{height:"55px"}}},imgContainer:{border:"1px solid ".concat(k(e).imgContainerBorderColor)},imageLoaderRoot:{height:"150px",display:"flex",alignItems:"center"},imgRoot:{display:"block",margin:"0 auto"},imgClass:{height:"150px",width:"calc(100% - 20px)",objectFit:"contain",[e.breakpoints.down("sm")]:{height:"50px"},[e.breakpoints.down("md")]:{height:"100px"}}
1,divider:{height:"2px",backgroundColor:k(e).tileBackgroundColor},belowDividerSectionRoot:{padding:"10px 0px"}})),S=o(968451),Z=o.n(S),N=o(345936);var P=(0,h.Z)(e=>({productSection:{position:"relative"},loader:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},skeleton:{[e.breakpoints.up("md")]:{height:"150px",width:"90%"},height:"100px",position:"absolute",margin:" 0px auto",textAlign:"center",left:" 10px",right:"10px",top:"10px"}}));const T=e=>"string"==typeof e;var R=e=>{let{previewURL:t,alt:o,className:r,index:s,onLoad:i}=e;const[l,u]=(0,d.useState)(!t),m=P();return(0,n.jsx)(a.ZP,{item:!0,component:"div",className:m.productSection,children:(0,n.jsxs)(c.Z,{component:"div",children:[!l&&(0,n.jsx)(N.Z,{variant:"rectangular",className:m.skeleton}),(0,n.jsx)(Z(),{src:t,alt:o,width:120,height:120,onLoad:()=>{u(!0),null==i||i()},style:{visibility:l?"visible":"hidden",objectFit:"contain"},className:r,priority:0===s,unoptimized:T(t)})]})})};const A=e=>{let{onClick:t}=e;const o=I(),r=()=>{t&&t()};return(0,n.jsx)(c.Z,{className:"".concat(o.defaultTileRoot," ").concat(o.tileRoot),onClick:r,onKeyDown:r,role:"button",tabIndex:-1,children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(Z(),{className:"".concat(o.imgRoot," ").concat(o.imgClass," defaultImg"),src:C.T5,alt:"Default"}),(0,n.jsxs)(c.Z,{className:o.belowDividerSectionRoot,children:[(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:(0,n.jsx)("b",{children:y.$J.DESIGN_ONLINE})}),(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:(0,n.jsx)("b",{children:y.$J.START_FROM_SCRATCH})})]})]})})},E=e=>{let{actualProductName:t,onClick:o,image:r,hoverImage:s="",index:a}=e;const i=I(),[u,m]=(0,d.useState)(!1),[p,h]=(0,d.useState)(!1),g=u&&p;(0,d.useEffect)(()=>{if(!p)return;if(!s||s===r)return;(new window.Image).src=s},[p,s,r]);const x=()=>{o&&o()};return(0,n.jsxs)(c.Z,{className:i.tileRoot,onClick:x,onKeyDown:x,role:"button",tabIndex:-1,children:[(0,n.jsx)(c.Z,{component:"div",onMouseOver:()=>m(!0),onMouseOut:()=>m(!1),onBlur:()=>m(!1),onFocus:()=>m(!0),children:(0,n.jsx)(R,{className:"".concat(i.imgRoot," ").concat(i.imgClass),previewURL:g?s||r||C.T5:r||C.T5,alt:"".concat(t,"-Image"),index:a,onLoad:()=>h(!0)})}),(0,n.jsx)(c.Z,{className:i.belowDividerSectionRoot,children:(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:t})})]},t)},D={noOfColumnsInGrid:{md:3,sm:4,xs:6},noOfRows:{md:5,sm:8,xs:10},noOfDefaultTile:1},U={md:12/D.noOfColumnsInGrid.md*D.noOfRows.md-D.noOfDefaultTile,sm:12/D.noOfColumnsInGrid.sm*D.noOfRows.sm-D.noOfDefaultTile,xs:12/D.noOfColumnsInGrid.xs*D.noOfRows.xs-D.noOfDefaultTile};var _=(0,j.Z)(e=>{let{hits:t,onClickDefault:o,setTemplateInfo:r,templateViewEvent:s,enable2DPreview:i}=e;const[c,l]=(0,d.useState)("");return(0,d.useEffect)(()=>{if(t.length&&s){const e=t[0].__queryID;if(e!==c){const o=[],n=[];t.forEach(e=>{const{__position:t,objectID:r}=e;o.push(r),n.push(t)});const r={eventType:"view",queryID:e,objectIDs:o,positions:n};l(e),s(r)}}},[t,c,s]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(a.ZP,{container:!0,spacing:3,direction:"row",children:[(0,n.jsx)(a.ZP,{item:!0,md:D.noOfColumnsInGrid.md,sm:D.noOfColumnsInGrid.sm,xs:D.noOfColumnsInGrid.xs,children:(0,n.jsx)(A,{onClick:o})}),t&&t.length>0&&(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>{const{images:o=[],vortex3DSnapshots:s=[]}=e,c=o.length?o[0]:void 0,l=s.length?s[0]:void 0,d=i?c:l;return(0,n.jsx)(a.ZP,{item:!0,md:D.noOfColumnsInGrid.md,sm:D.noOfColumnsInGrid.sm,xs:D.noOfColumnsInGrid.xs,children:(0,n.jsx)(E,{actualProductName:e.name,productDesc:e.description,hoverImage:c,image:d,onClick:()=>{r&&r(e)},index:t})},e.objectID)})})]}),(0,n.jsx)(v.Z,{only:["xs","sm"],children:(0,n.jsx)(w.Z,{hitsPerPage:U.md,clickAnalytics:!0})}),(0,n.jsx)(v.Z,{only:["xs","md","lg","xl"],children:(0,n.jsx)(w.Z,{hitsPerPage:U.sm,clickAnalytics:!0})}),(0,n.jsx)(v.Z,{only:["sm","md","lg","xl"],children:(0,n.jsx)(w.Z,{hitsPerPage:U.xs,clickAnalytics:!0})})]})}),O=o(21488),B=o(601895);const L=(0,O.Z)(e=>{let{nbPages:t,refine:o}=e;const[r,s]=d.useState(1);return(0,n.jsx)(B.Z,{count:t,shape:"rounded",page:r,onChange:(e,t)=>
1{s(t),o(t)}})});var F=o(68782),M=o(869722),V=o(505060),z=o(917325),q=o(738739),G=o(419358),J=o(578905),W=o(412425),K=o(133701),Y=o(438570);const H=e=>({textSecondary:e.palette.text.secondary,textPrimary:e.palette.text.primary,checkedColor:e.palette.secondary.main,fontSizeSubItem:e.typography.subtitle1.fontSize,fontWeightBold:e.typography.subtitle1.fontWeight});var Q=(0,h.Z)(e=>({root:{width:"100%"},colorRefinementList:{flexGrow:"initial",display:"flex"},colorTypeRoot:{width:"25px",height:"25px",borderRadius:"50%",margin:"0 5px 3px 2px",padding:"0",cursor:"pointer",border:"1px solid ".concat(H(e).textSecondary)},attributeType:{fontWeight:H(e).fontWeightBold,color:H(e).textPrimary},colorActive:{border:"3px solid ".concat(H(e).textPrimary)},subItem:{fontSize:H(e).fontSizeSubItem},checkBoxIcon:{color:H(e).checkedColor},skeletonParent:{display:"block"},colorSpace:{marginRight:"5px"},noDataFound:{padding:"0px 16px"}})),$=o(459159);const X=[{width:"40%",id:1},{width:"50%",id:2},{width:"20%",id:3},{width:"30%",id:4},{width:"20%",id:5},{width:"25%",id:6},{width:"30%",id:7},{width:"35%",id:8},{width:"10%",id:9},{width:"15%",id:10}],ee=[{width:"40%",id:1},{width:"60%",id:2},{width:"50%",id:3},{width:"30%",id:4},{width:"20%",id:5},{width:"25%",id:6},{width:"20%",id:7},{width:"55%",id:8}],te=[{id:1},{id:2},{id:3},{id:4},{id:5},{id:6},{id:7},{id:8},{id:9},{id:10}];var oe=e=>({checkboxListSkeleton:t=>[{type:"multiSkeleton",withParent:!0,isContainer:!0,items:[{type:"singleSkeleton",className:e.subItem,width:"80%",height:"30px",gridSize:1,withGrid:!0},{type:"singleSkeleton",width:t,height:"30px",className:e.subItem,gridSize:11,withGrid:!0}]}],colorListSkeleton:[{type:"singleSkeleton",className:e.colorSpace,width:"5%",height:"25px",skeletonType:"circular"}]});var ne=e=>{let{attributeName:t,type:o}=e;const r=Q(),{checkboxListSkeleton:s,colorListSkeleton:a}=oe(r);return"color"===o?(0,n.jsx)(n.Fragment,{children:"Color"===t&&(0,n.jsx)(z.Z,{className:r.colorRefinementList,children:te.map((e,t)=>(0,n.jsx)($.Z,{data:a},"".concat(e.id,"-").concat(t)))})}):(0,n.jsxs)(n.Fragment,{children:["Industry"===t&&(0,n.jsx)(z.Z,{className:r.skeletonParent,children:X.map((e,t)=>(0,n.jsx)($.Z,{data:s(e.width)},"".concat(e.id,"-").concat(t)))}),"Themes"===t&&(0,n.jsx)(z.Z,{className:r.skeletonParent,children:ee.map((e,t)=>(0,n.jsx)($.Z,{data:s(e.width)},"".concat(e.id,"-").concat(t)))})]})};var re=(0,F.Z)(e=>{let{items:t,type:o="checkbox",refine:r,attributeName:s,setIsAllFiltersRenderedFirst:i,isAllFiltersRenderedFirst:u,preSelectedFacetValues:m}=e;const p=Q(),h=e=>{r(e)};return(0,d.useEffect)(()=>{(null==m?void 0:m.length)&&r(m)},[r,m]),(0,d.useEffect)(()=>{!u&&(null==t?void 0:t.length)&&i&&i(!0)},[t,u,i]),(0,n.jsx)(c.Z,{component:"div",className:p.root,children:(0,n.jsxs)(M.Z,{defaultExpanded:!0,elevation:0,children:[(0,n.jsx)(V.Z,{expandIcon:(0,n.jsx)(Y.Z,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:(0,n.jsx)(l.Z,{variant:"h6",className:p.attributeType,children:s})}
1),0===t.length&&(u?(0,n.jsx)(c.Z,{className:p.noDataFound,children:"No Data"}):(0,n.jsx)(ne,{attributeName:s,type:o})),(0,n.jsxs)(z.Z,{children:["checkbox"===o&&(0,n.jsx)(q.Z,{children:t.sort((e,t)=>e.label.localeCompare(t.label)).map((e,t)=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(G.Z,{control:(0,n.jsx)(J.Z,{checked:e.isRefined,onChange:()=>h(e.value),icon:(0,n.jsx)(K.Z,{fontSize:"small"}),checkedIcon:(0,n.jsx)(W.Z,{fontSize:"small",className:p.checkBoxIcon}),name:e.label,className:p.subItem}),label:"".concat(e.label," (").concat(e.count,")")},"".concat(e.value,"-").concat(t))}))}),"color"===o&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.ZP,{container:!0,direction:"row",spacing:1,children:t.sort((e,t)=>e.label.localeCompare(t.label)).map((e,t)=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(a.ZP,{container:!0,item:!0,xs:!0,className:p.colorRefinementList,children:(0,n.jsx)(c.Z,{title:"".concat(e.label," (").concat(e.count,")"),component:"span",onClick:()=>h(e.value),className:"".concat(p.colorTypeRoot," ").concat(e.isRefined?p.colorActive:""),style:{background:e.label}})},"".concat(e.value,"-").concat(t,"-").concat(e.label,"-").concat(e.count))}))})})]})]})})});const se=(0,o(757815).Z)(e=>{let{nbHits:t}=e;return(0,n.jsx)(l.Z,{variant:"body1",children:"".concat(t.toLocaleString()," Designs")})});const ae=(0,o(474730).Z)(e=>{let{searchState:{query:t},searchResults:o,searching:n,isSearchStalled:r,onSearchResultUpdate:s}=e;return(0,d.useEffect)(()=>{s&&t&&!n&&!r&&s(t,(null==o?void 0:o.nbHits)||0)},[t,null==o?void 0:o.nbHits,n,r,s]),null}),ie=e=>({sectionBackgroundColor:e.palette.background.paper});var ce=(0,h.Z)(e=>({root:{backgroundColor:ie(e).sectionBackgroundColor},selectedFilters:{zIndex:9,padding:"8px",minHeight:"44px"},searchBox:{zIndex:9}})),le=o(983680);const de=(0,le.eZ)();var ue=e=>(0,n.jsx)(le.PY,{...e,useStyles:de}),me=o(955559),pe=o(608883),he=o(305083);var ge=e=>{let{algoliaInit:{client:t,searchDebounceDelay:o},product:{productAttribute:r,productName:s},algoliaInfo:{indexName:i},onClickDefault:u,filterQuery:m,trackEvent:p,setSearchBox:h,searchTerm:g,templateInfoSet:x,enable2DPreview:f,preSelectedFacets:v}=e;const{root:j,selectedFilters:C,searchBox:k}=ce(),[I,S]=(0,d.useState)(!1),[Z,N]=(0,d.useState)(0);(0,d.useEffect)(()=>{if(p&&g){const e={productName:s,size:r.Size,quantity:Number(r.Quantity),filteredTemplatesCount:Z,searchTerm:g};p(me.SegmentEvents.PRODUCT_TEMPLATE_SEARCH_SUBMITTED_EVENT,e)}},[r.Quantity,r.Size,s,g,Z,p]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(pe.Z,{searchClient:t,indexName:i,children:[m&&(0,n.jsx)(w.Z,{filters:m,clickAnalytics:!0}),(0,n.jsx)(ae,{onSearchResultUpdate:(e,t)=>{h(e),N(t)}}),(0,n.jsxs)(c.Z,{className:j,"data-testid":"template-maker",children:[(0,n.jsxs)(a.ZP,{container:!0,spacing:2,direction:"row",alignItems:"flex-start",children:[(0,n.jsx)(a.ZP,{item:!0,sm:12,md:3,xs:12,children:(0,n.jsx)(l.Z,{component:"h4",variant:"h4",children:y.$J.TEMPLATE_MAKER})}),(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:9,xs:12,children:[(0,n.jsx)(c.Z,{display:"flex",justifyContent:"space-between",children:(0,n.jsx)(l.Z,{variant:"h5",className:"productHeadingClassName",children:s})}),(0,n.jsxs)(a.ZP,{container:!0,sm:12,children:[(0,n.jsx)(a.ZP,{item:!0,sm:12,md:8,children:(0,n.jsx)(l.Z,{variant:"body1",className:"productAttrClassName",children:r&&(0,he.aF)(JSON.stringify(r))||""})}),(0,n.jsx)(a.ZP,{item:!0,sm:12,md:4,display:"flex",alignItems:"right",className:k,children:(0,n.jsx)(ue,{searchDebounceDelay:o})})]})]})]}),(0,n.jsxs)(a.ZP,{container:!0,spacing:2,direction:"row",alignItems:"flex-start",children:[(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:3,children:[(0,n.jsx)(re,{attribute:"Industry",attributeName:"Industry",isAllFiltersRenderedFirst:I,setIsAllFiltersRenderedFirst:S,preSelectedFacetValues:null==v?void 0:v.Industry,showMore:!0}),(0,n.jsx)(re,{attribute:"Theme",attributeName:"Themes",isAllFiltersRenderedFirst:I,setIsAllFiltersRenderedFirst:S,preSelectedFacetValues:null==v?void 0:v.Theme,showMore:!0}),(0,n.jsx)(re,{attribute:"Color",attributeName:"Color",type:"color",isAllFiltersRenderedFirst:I,setIsAllFiltersRenderedFirst:S,preSelectedFacetValues:null==v?void 0:v.Color,showMore:!0})]}),(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:9,children:[(0,n.jsxs)(a.ZP,{container:!0,children:[(0,n.jsx)(a.ZP,{item:!0,xs:12,md:10,className:C,children:(0,n.jsx)(b,{})}),(0,n.jsx)(a.ZP,{item:!0,xs:12,md:2,display:"flex",justifyContent:"flex-end",children:(0,n.jsx)(se,{})})]}),(0,n.jsxs)(a.ZP,{container:!0,spacing:2,children:[(0,n.jsx)(a.ZP,{item:!0,xs:12,children:(0,n.jsx)(_,{productName:s,onClickDefault:u,setTemplateInfo:x,templateViewEvent:e=>{p&&p(me.SegmentEvents.PRODUCT_TEMPLATE_VIEW_EVENT,{...e,index:i})},enable2DPreview:f})}),(0,n.jsx)(a.ZP,{item:!0,xs:12,display:"flex",justifyContent:"flex-end",children:(0,n.jsx)(L,{})})]})]})]})]})]})})},xe=o(995931);const fe=3,be=4,ye=6,ve=(0,le.eZ)(),we=e=>{let{name:t,defaultUrl:o,hoverUrl:r,onSelect:s,tileClassName:a,imgClassName:i,captionClassName:u}=e;const[m,p]=(0,d.useState)(!1),[h,g]=(0,d.useState)(!1),[x,f]=(0,d.useState)(!1),b=h?void 0:o,y=x?void 0:r,v=m?null!=y?y:b:null!=b?b:y;return(0,n.jsxs)(c.Z,{className:a,onClick:s,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||s()},role:"button",tabIndex:-1,onMouseOver:()=>p(!0),onMouseOut:()=>p(!1),onFocus:()=>p(!0),onBlur:()=>p(!1),children:[(0,n.jsx)(Z(),{className:i,src:null!=v?v:C.T5,alt:t,width:150,height:150,onError:()=>{v&&v===r?f(!0):g(!0)}}),(0,n.jsx)(c.Z,{className:u,children:(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:t})})]})},je=e=>{let{product:{productName:t,productAttribute:o},templates:r,isLoading:s,error:i,total:p,currentPage:h,totalPages:g,onClickDefault:f,onSearch:b,onNextPage:v,onPrevPage:w,onSetPage:j,onSelectTemplate:k,getPreviewUrl:S,getHoverPreviewUrl:N,industries:P,themes:T,colors:R,selectedIndustries:A,onToggleIndustry:E,selectedThemes:D,onToggleTheme:U,selectedColors:_,onToggleColor:O,onClearAllFilters:L}=e;const{root:F,selectedFilters:H,searchBox:$}=ce(),X=I(),ee=Q(),te=x(),oe=ve(),ne=A.length>0||D.length>0||_.length>0,re=P.filter(e=>e.count>0||A.includes(e.label)),se=T.filter(e=>e.count>0||D.includes(e.label)),ae=R.filter(e=>e.count>0||_.includes(e.label)),ie=(0,d.useRef)((0,le.Ds)(e=>b(e),500)).current,de=(0,d.useCallback)(e=>{const t=e.currentTarget.value.trim();ie(t.length>2?t:"")},[ie]);return(0,n.jsxs)(c.Z,{className:F,"data-testid":"cam-template-maker",children:[(0,n.jsxs)(a.ZP,{container:!0,spacing:2,direction:"row",alignItems:"flex-start",children:[(0,n.jsx)(a.ZP,{item:!0,sm:12,md:3,xs:12,children:(0,n.jsx)(l.Z,{component:"h4",variant:"h4",children:y.$J.TEMPLATE_MAKER})}),(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:9,xs:12,children:[(0,n.jsx)(c.Z,{display:"flex",justifyContent:"space-between",children:(0,n.jsx)(l.Z,{variant:"h5",children:t})}),(0,n.jsxs)(a.ZP,{container:!0,sm:12,children:[(0,n.jsx)(a.ZP,{item:!0,sm:12,md:8,children:(0,n.jsx)(l.Z,{variant:"body1",children:o&&(0,he.aF)(JSON.stringify(o))||""})}),(0,n.jsx)(a.ZP,{item:!0,sm:12,md:4,display:"flex",alignItems:"right",className:$,children:(0,n.jsxs)(c.Z,{className:oe.searchBox,children:[(0,n.jsx)("input",{type:"search",placeholder:"Type minimum 3 chars",onChange:de,className:oe.searchTextBox,title:"Please type minimum 3 characters."}),(0,n.jsx)(c.Z,{className:oe.searchIconWrapper,display:"flex",alignItems:"center",justifyContent:"center",children:(0,n.jsx)(xe.Z,{className:oe.searchIcon})})]})})]})]})]}),(0,n.jsxs)(a.ZP,{container:!0,spacing:2,direction:"row",alignItems:"flex-start",children:[(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:3,children:[(0,n.jsx)(c.Z,{component:"div",className:ee.root,children:(0,n.jsxs)(M.Z,{defaultExpanded:!0,elevation:0,
1children:[(0,n.jsx)(V.Z,{expandIcon:(0,n.jsx)(Y.Z,{}),"aria-controls":"industry-content",id:"industry-header",children:(0,n.jsx)(l.Z,{variant:"h6",className:ee.attributeType,children:"Industry"})}),0===re.length&&(0,n.jsx)(c.Z,{className:ee.noDataFound,children:"No Data"}),(0,n.jsx)(z.Z,{children:re.length>0&&(0,n.jsx)(q.Z,{children:re.map(e=>(0,n.jsx)(G.Z,{control:(0,n.jsx)(J.Z,{checked:A.includes(e.label),onChange:()=>E(e.label),icon:(0,n.jsx)(K.Z,{fontSize:"small"}),checkedIcon:(0,n.jsx)(W.Z,{fontSize:"small",className:ee.checkBoxIcon}),className:ee.subItem}),label:"".concat(e.label," (").concat(e.count.toLocaleString(),")"),sx:{"& .MuiFormControlLabel-label":{textTransform:"capitalize"}}},e.id))})})]})}),(0,n.jsx)(c.Z,{component:"div",className:ee.root,children:(0,n.jsxs)(M.Z,{defaultExpanded:!0,elevation:0,children:[(0,n.jsx)(V.Z,{expandIcon:(0,n.jsx)(Y.Z,{}),"aria-controls":"themes-content",id:"themes-header",children:(0,n.jsx)(l.Z,{variant:"h6",className:ee.attributeType,children:"Themes"})}),0===se.length&&(0,n.jsx)(c.Z,{className:ee.noDataFound,children:"No Data"}),(0,n.jsx)(z.Z,{children:se.length>0&&(0,n.jsx)(q.Z,{children:se.map(e=>(0,n.jsx)(G.Z,{control:(0,n.jsx)(J.Z,{checked:D.includes(e.label),onChange:()=>U(e.label),icon:(0,n.jsx)(K.Z,{fontSize:"small"}),checkedIcon:(0,n.jsx)(W.Z,{fontSize:"small",className:ee.checkBoxIcon}),className:ee.subItem}),label:"".concat(e.label," (").concat(e.count.toLocaleString(),")")},e.id))})})]})}),(0,n.jsx)(c.Z,{component:"div",className:ee.root,children:(0,n.jsxs)(M.Z,{defaultExpanded:!0,elevation:0,children:[(0,n.jsx)(V.Z,{expandIcon:(0,n.jsx)(Y.Z,{}),"aria-controls":"color-content",id:"color-header",children:(0,n.jsx)(l.Z,{variant:"h6",className:ee.attributeType,children:"Color"})}),0===ae.length&&(0,n.jsx)(c.Z,{className:ee.noDataFound,children:"No Data"}),(0,n.jsx)(z.Z,{children:ae.length>0&&(0,n.jsx)(a.ZP,{container:!0,direction:"row",spacing:1,children:ae.map(e=>{const t=_.includes(e.label);return(0,n.jsx)(a.ZP,{container:!0,item:!0,xs:!0,className:ee.colorRefinementList,children:(0,n.jsx)(c.Z,{title:"".concat(e.label," (").concat(e.count.toLocaleString(),")"),component:"span",role:"button",tabIndex:0,onClick:()=>O(e.label),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||O(e.label)},className:"".concat(ee.colorTypeRoot," ").concat(t?ee.colorActive:""),style:{background:e.label}})},e.id)})})})]})})]}),(0,n.jsxs)(a.ZP,{item:!0,sm:12,md:9,children:[(0,n.jsxs)(a.ZP,{container:!0,children:[(0,n.jsx)(a.ZP,{item:!0,xs:12,md:10,className:H,children:ne&&(0,n.jsxs)(a.ZP,{container:!0,spacing:1,alignItems:"center",children:[(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(l.Z,{component:"span",variant:"body1",children:(0,n.jsx)("b",{children:"You've Selected:"})})}),A.map(e=>(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsxs)(c.Z,{component:"span",className:te.filterCardRoot,children:[(0,n.jsx)(l.Z,{component:"span",variant:"body2",sx:{textTransform:"capitalize"},children:e}),"  ",(0,n.jsx)(u.Z,{"aria-label":"Remove industry filter",className:te.iconBtn,onClick:()=>E(e),size:"small",children:(0,n.jsx)(m.Z,{fontSize:"small",className:te.crossIcon})})]})},"industry-".concat(e))),D.map(e=>(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsxs)(c.Z,{component:"span",className:te.filterCardRoot,children:[(0,n.jsx)(l.Z,{component:"span",variant:"body2",sx:{textTransform:"capitalize"},children:e}),"  ",(0,n.jsx)(u.Z,{"aria-label":"Remove theme filter",className:te.iconBtn,onClick:()=>U(e),size:"small",children:(0,n.jsx)(m.Z,{fontSize:"small",className:te.crossIcon})})]})},"theme-".concat(e))),_.map(e=>(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsxs)(c.Z,{component:"span",className:te.filterCardRoot,children:[(0,n.jsx)(c.Z,{component:"span",sx:{display:"inline-block",width:12,height:12,borderRadius:"50%",border:"1px solid #707070",background:e,verticalAlign:"middle",marginRight:1}}),(0,n.jsx)(l.Z,{component:"span",variant:"body2",sx:{textTransform:"capitalize"},children:e}),"  ",(0,n.jsx)(u.Z,{"aria-label":"Remove color filter",className:te.iconBtn,onClick:()=>O(e),size:"small",children:(0,n.jsx)(m.Z,{fontSize:"small",className:te.crossIcon})})]})},"color-".concat(e))),(0,n.jsx)(a.ZP,{item:!0,children:(0,n.jsx)(l.Z,{component:"span",variant:"subtitle1",className:te.clearAllBtn,onClick:L,children:"Clear All"})})]})}),(0,n.jsx)(a.ZP,{item:!0,xs:12,md:2,display:"flex",justifyContent:"flex-end",children:i?(0,n.jsx)(l.Z,{variant:"body2",color:"error",children:y.$J.LOAD_ERROR}):(0,n.jsx)(l.Z,{variant:"body2",color:"text.secondary",children:s?"Loadingâ¦":"".concat(p," template").concat(1!==p?"s":"")})})]}),(0,n.jsxs)(a.ZP,{container:!0,spacing:3,direction:"row",children:[(0,n.jsx)(a.ZP,{item:!0,md:fe,sm:be,xs:ye,children:(0,n.jsx)(c.Z,{className:"".concat(X.defaultTileRoot," ").concat(X.tileRoot),onClick:f,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||null==f||f()}
1,role:"button",tabIndex:-1,children:(0,n.jsxs)(c.Z,{children:[(0,n.jsx)(Z(),{className:"".concat(X.imgRoot," ").concat(X.imgClass," defaultImg"),src:C.T5,alt:"Default"}),(0,n.jsxs)(c.Z,{className:X.belowDividerSectionRoot,children:[(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:(0,n.jsx)("b",{children:y.$J.DESIGN_ONLINE})}),(0,n.jsx)(l.Z,{variant:"body1",align:"center",children:(0,n.jsx)("b",{children:y.$J.START_FROM_SCRATCH})})]})]})})}),r.map(e=>{var t,o;const r=e.customProperties.assetName||(null===(t=e.categories[0])||void 0===t?void 0:t.name)||e.customProperties.mcpSku;var s;const i=null!==(s=null==S?void 0:S(e))&&void 0!==s?s:null===(o=e.deliveryResources)||void 0===o?void 0:o.preview,c=null==N?void 0:N(e);return(0,n.jsx)(a.ZP,{item:!0,md:fe,sm:be,xs:ye,children:(0,n.jsx)(we,{name:null!=r?r:"",defaultUrl:i,hoverUrl:c,onSelect:()=>k(e),tileClassName:"".concat(X.tileRoot," ").concat(X.camTileHoverPad),imgClassName:"".concat(X.imgRoot," ").concat(X.imgClass),captionClassName:X.belowDividerSectionRoot})},e.id)})]}),(0,n.jsx)(a.ZP,{item:!0,xs:12,display:"flex",justifyContent:"flex-end",children:(0,n.jsx)(B.Z,{count:g,page:h,onChange:(e,t)=>
1{t!==h&&(t===h+1?v():t===h-1?w():j(t))},shape:"rounded"})})]})]})]})};var Ce=o(939838),ke=o(712472),Ie=o(353959),Se=o(51458),Ze=o(754142),Ne=o(354185),Pe=o(6776),Te=o(250391),Re=o.n(Te),Ae=o(529292);const Ee=e=>({containerBackgroundColor:e.palette.background.paper});var De=(0,h.Z)(e=>({root:{backgroundColor:Ee(e).containerBackgroundColor},innerContainer:{padding:"20px 24px",width:"90%",margin:"auto",[e.breakpoints.down("lg")]:{width:"100%"}}})),Ue=o(724763);var _e={seo:[{tag:"title",content:"BoxUp - Template Maker | Choose Your Box Template",attributes:null},{tag:"meta",content:null,attributes:{content:"BoxUp - Template Maker | Choose Your Box Template",property:"og:title"}},{tag:"meta",content:null,attributes:{name:"description",content:"Explore the BoxUp template library to design your perfect mailer or shipping box. All templates are fully customizable - simply add your company logo and colors."}},{tag:"meta",content:null,attributes:{content:"Explore the BoxUp template library to design your perfect mailer or shipping box. All templates are fully customizable - simply add your company logo and colors.",property:"og:description"}}]};var Oe={seo:[{tag:"title",content:"Your Box Design - Template Maker | Choose Your Box ",attributes:null},{tag:"meta",content:null,attributes:{content:"Your Box Design - Template Maker | Choose Your Box Template",property:"og:title"}},{tag:"meta",content:null,attributes:{name:"description",content:"Explore the Your Box Design template library to design your perfect mailer or shipping box. All templates are fully customizable - simply add your company logo and colors."}},{tag:"meta",content:null,attributes:{content:"Explore the Your Box Design template library to design your perfect mailer or shipping box. All templates are fully customizable - simply add your company logo and colors.",property:"og:description"}}]},Be=o(700201),Le=o(159439),Fe=o(42437),Me=o(640927),Ve=o(847186);var ze=function(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,i=!(arguments.length>7&&void 0!==arguments[7])||arguments[7],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:(0,Fe.Ov)();const[l,u]=(0,d.useState)([]),[m,p]=(0,d.useState)(!1),[h,g]=(0,d.useState)(null),[x,f]=(0,d.useState)(0),[b,y]=(0,d.useState)(1),[v,w]=(0,d.useState)(!1),{accountId:j,contentAreaId:C,requestor:k,pageSize:I,productFilter:S}=c,Z="sku"===S?e:t,N=n.slice().sort().join("|"),P=r.slice().sort().join("|"),T="sku"===S?(0,Ve.p)(e,a,s):void 0,R=null!=T?T:"";(0,d.useEffect)(()=>{y(1),w(!1)},[Z,o,N,P,R]),(0,d.useEffect)(()=>{if(!i)return;let s=!1;const a=b>1?String((b-1)*I):void 0;return p(!0),g(null),(0,Se.xn5)({accountId:j,contentAreaId:C,requestor:k,sku:"sku"===S?e:void 0,productReferenceId:"productReferenceId"===S?t:void 0,surfaceSpecificationUrl:T,search:o||void 0,limit:I,offset:a,categoryValues:n.length>0?n:void 0,colorValues:r.length>0?r:void 0}).then(e=>{var t;s||(u(e._embedded.item),f(null!==(t=e.total)&&void 0!==t?t:0),w(null!=e.offset&&""!==e.offset))}).catch(n=>{if(s)return;const r=n instanceof Error?n.message:"Failed to load templates";console.error("useCAMTemplates: template fetch failed",{error:r,accountId:j,contentAreaId:C,sku:e,productReferenceId:t,searchTerm:o,currentPage:b}),u([]),g(r)}).finally(()=>{s||p(!1)}),()=>{s=!0}},[b,Z,o,N,P,R,i,j,C,k,I,S]);const A=x>0?Math.ceil(x/I):v?b+1:b;return{templates:l,isLoading:m,error:h,total:x,currentPage:b,totalPages:A,nextPage:()=>y(e=>Math.min(e+1,A||e+1)),prevPage:()=>y(e=>Math.max(1,e-1)),setPage:e=>y(()=>Math.min(Math.max(1,e),A||e))}};const qe=(e,t,o)=>{if(0===t.length&&0===o.length)return[];const n=e.filter(e=>{const[n,r]=e.split("/"),s=null==n?void 0:n.trim(),a=null==r?void 0:r.trim(),i=0===t.length||!!s&&t.includes(s),c=0===o.length||!!a&&o.includes(a);return i&&c});return n.length>0?n:["__no_category_match__"]},Ge=(e,t)=>t.count-e.count||e.label.localeCompare(t.label),Je=e=>e.filter(e=>e.key).map(e=>({id:e.key,label:e.key,count:e.count})).sort(Ge),We=e=>{const t=new Map,o=new Map;for(const s of e){if(!s.key)continue;const[e,a]=s.key.split("/"),i=null==e?void 0:e.trim(),c=null==a?void 0:a.trim();var n,r;if(i)t.set(i,(null!==(n=t.get(i))&&void 0!==n?n:0)+s.count);if(c)o.set(c,(null!==(r=o.get(c))&&void 0!==r?r:0)+s.count)}const s=e=>Array.from(e.entries()).map(e=>{let[t,o]=e;return{id:t,label:t,count:o}}).sort(Ge);return{industries:s(t),themes:s(o)}},Ke=e=>e.reduce((e,t)=>
1(e[t.label]=t.count,e),{}),Ye=(e,t)=>e.map(e=>{var o;return{...e,count:null!==(o=t[e.label])&&void 0!==o?o:0}});var He=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,Fe.Ov)();const[n,r]=(0,d.useState)([]),[s,a]=(0,d.useState)([]),[i,c]=(0,d.useState)([]),[l,u]=(0,d.useState)([]),[m,p]=(0,d.useState)({}),[h,g]=(0,d.useState)({}),[x,f]=(0,d.useState)({}),[b,y]=(0,d.useState)(!1),[v,w]=(0,d.useState)(null),{accountId:j,contentAreaId:C,requestor:k,productFilter:I}=o,{sku:S,productReferenceId:Z,surfaceAttributes:N,mcpSkuVersion:P,selectedIndustries:T=[],selectedThemes:R=[],selectedColors:A=[]}=t,E="sku"===I?(0,Ve.p)(S,P,N):void 0,D="sku"===I?S:void 0,U="productReferenceId"===I?Z:void 0,_=T.slice().sort().join("|"),O=R.slice().sort().join("|"),B=A.slice().sort().join("|"),L=null!=E?E:"";(0,d.useEffect)(()=>{if(!e)return;let t=!1;const o=T.length>0||R.length>0,d=A.length>0,m=d?A:void 0,h=(e,t)=>{if(0===e.length&&0===t.length)return;const o=qe(l,e,t);return o.length>0?o:void 0},x=h([],R),b=h(T,[]),v=h(T,R),I=JSON.stringify(x)===JSON.stringify(b),S=l.length>0,Z=S&&0===R.length&&!d,N=S&&0===T.length&&!d,P=S&&!o;y(!0),w(null);const _=e=>(0,Se.Qdk)({accountId:j,contentAreaId:C,requestor:k,facet:"categories",sku:D,productReferenceId:U,surfaceSpecificationUrl:E,categoryValues:e,colorValues:m}),O=Z?null:_(x),B=N?null:!Z&&I?O:_(b),L=P?null:(0,Se.Qdk)({accountId:j,contentAreaId:C,requestor:k,facet:"derivedProperties.colorNames",sku:D,productReferenceId:U,surfaceSpecificationUrl:E,categoryValues:v});return Promise.all([O,B,L]).then(e=>{let[l,m,h]=e;if(!t&&(p(Ke(l?We(l._embedded.item).industries:n)),g(Ke(m?We(m._embedded.item).themes:s)),f(Ke(h?Je(h._embedded.item):i)),!o&&!d&&l)){const e=We(l._embedded.item);r(e.industries),a(e.themes),h&&c(Je(h._embedded.item)),u(l._embedded.item.map(e=>e.key).filter(e=>Boolean(e)))}}).catch(e=>{if(t)return;const o=e instanceof Error?e.message:"Failed to load facets";console.error("useCAMCategories: facets fetch failed",{error:o,accountId:j,contentAreaId:C,sku:D,productReferenceId:U}),p({}),g({}),f({}),w(o)}).finally(()=>{t||y(!1)}),()=>{t=!0}},[e,j,C,k,D,U,L,_,O,B]);return{industries:(0,d.useMemo)(()=>Ye(n,m),[n,m]),themes:(0,d.useMemo)(()=>Ye(s,h),[s,h]),colors:(0,d.useMemo)(()=>Ye(i,x),[i,x]),rawCategories:l,isLoading:b,error:v}};const Qe="Industry",$e="Theme",Xe="Color",et=e=>e.trim().toLowerCase(),tt=(e,t)=>{if(!(null==e?void 0:e.length)||!t.length)return[];const o=new Map(t.map(e=>[et(e.label),e.label])),n=[];for(const t of e){if("string"!=typeof t||!t.trim())continue;const e=o.get(et(t));e&&!n.includes(e)&&n.push(e)}return n};var ot=o(73759),nt=o(869383),rt=o(161958),st=o(623947);const at=[{type:"overlay",source:"safe",stroke:{color:"rgb(100,100,100)",dotted:!0}},{type:"overlay",source:"trim",stroke:{color:"rgb(100,100,100)",dotted:!1}},{type:"overlay",source:"bleed",fillColor:"rgb(255,255,255)",stroke:{color:"rgb(100,100,100)",dotted:!1}},{type:"overlay",source:"fold",stroke:{color:"rgb(255,0,0)",dotted:!0}},{type:"overlay",source:"cut",stroke:{color:"rgb(0,0,255)",dotted:!1}}];var it=()=>{const{algoliaInfo:{appId:e,searchApiKey:t,indexName:o},tenantId:r,tenantType:s}=Fe.templateMakerInfo,{accountId:i,contentAreaId:c,requestor:l,deliveryBaseUrl:u,instructionsBaseUrl:m,renderingBaseUrl:p,scenesBaseUrl:h,designPhysicalSpecBaseUrl:g,assetsBaseUrl:x}=(0,Fe.Ov)(),{euiAppState:{snackbar:f}}=(0,d.useContext)(Ue.H),b=De(),y=(0,Le.useSearchParams)(),v=(0,d.useMemo)(()=>(0,Be.vl)(y),[y]),{sku:w="",skuVars:j,productName:C="",productReferenceId:k="",totalPrice:I="",price:S="",merchandisedUserSelection:Z={},indexName:N=o,mcpSkuVersion:P,surfaceAttributes:T,preSelectedFacetsFromURL:R,returnUrl:A}=v,{query:E,variables:D}=(0,nt.D$)(w,k,(0,st.K)(),C),{data:U={},loading:_}=(0,ot.aM)(E,{variables:D,skip:!k&&!w&&!C}),{productDetail:O,showroomProductDetail:B}=U,L=(O||B)&&(0,rt.jC)(U),{algoliaPreSelectedFacets:F,enable2DPreview:M}=(null==L?void 0:L.additionalModelInfo)||{},V=R||F,z=(0,d.useMemo)(()=>Se.O9M.init(e,t,N),[e,t,N]),{trackEvent:q}=(0,Ie.uT)(),{PRODUCT_TEMPLATE_CLICK_EVENT:G,PRODUCT_TEMPLATE_VIEW_EVENT:J,PRODUCT_TEMPLATE_SEARCH_SUBMITTED_EVENT:W}=me.SegmentEvents,{DESIGN_FROM_SCRATCH_FLOW:K,TM_BROWSING_FLOW:Y}=ke.DESIGNER_FLOW_TYPE,H=(0,d.useCallback)((e,t)=>{let o="";const{PRODUCT_TEMPLATE_CLICKED:n,PRODUCT_TEMPLATE_VIEWED:r,PRODUCT_TEMPLATE_SEARCH_BOX_SUBMITTED:s}=me.EVENT_NAMES;switch(e){case G:o=n;break;case J:o=r;break;case W:o=s;break;default:o=""}q({eventName:o,properties:t})},[G,W,J,q]),Q=()=>
1{if(!w||!j||!T)return void f("Missing information");const e=(0,Be.A1)({flowType:K,cimSku:w,productReferenceId:k,skuAttributes:j,productName:C,merchandisedUserSelection:Z,price:S,totalPrice:I,mcpSkuVersion:P,surfaceAttributes:T,returnUrl:A});(0,Ne.Jy)(Ce.PAGES.TEMPLATE_DESIGNER.URL,(0,Ze.qp)(e))},[$,X]=(0,d.useState)(""),[ee,te]=(0,d.useState)([]),[oe,ne]=(0,d.useState)([]),[re,se]=(0,d.useState)([]),ae=(0,d.useCallback)(e=>{te(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),ie=(0,d.useCallback)(e=>{ne(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),ce=(0,d.useCallback)(e=>{se(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),le=(0,d.useCallback)(()=>{te([]),ne([]),se([])},[]),{value:de}=(0,Se.ye9)("is_boxup_cam_templates_enabled",!1),ue=Boolean(de),{industries:pe,themes:he,colors:xe,rawCategories:fe}=He(ue,{sku:w||void 0,productReferenceId:k||void 0,surfaceAttributes:T,mcpSkuVersion:P,selectedIndustries:ee,selectedThemes:oe,selectedColors:re}),be=(0,d.useRef)(!1);(0,d.useEffect)(()=>{if(!ue||be.current)return;if(!R&&_)return;if(!(pe.length>0||he.length>0||xe.length>0))return;if(be.current=!0,!V)return;const{industries:e,themes:t,colors:o}=((e,t)=>({industries:tt(null==e?void 0:e[Qe],t.industries),themes:tt(null==e?void 0:e[$e],t.themes),colors:tt(null==e?void 0:e[Xe],t.colors)}))(V,{industries:pe,themes:he,colors:xe});e.length&&te(e),t.length&&ne(t),o.length&&se(o)},[ue,_,V,R,pe,he,xe]);const ye=(0,d.useMemo)(()=>qe(fe,ee,oe),[fe,ee,oe]),{templates:ve,isLoading:we,error:Te,total:Ee,currentPage:Ve,totalPages:Ge,nextPage:Je,prevPage:We,setPage:Ke}=ze(w||void 0,k||void 0,$,ye,re,T,P,ue);(0,d.useEffect)(()=>{if(!ue)return;if(!$)return;var e,t;const o={productName:C,size:null!==(e=Z.Size)&&void 0!==e?e:"",quantity:Number(null!==(t=Z.Quantity)&&void 0!==t?t:0),filteredTemplatesCount:Ee,searchTerm:$};H(W,o)},[ue,$,Ee,C,Z,H,W]);const Ye=(0,d.useCallback)(e=>{var t,o;const n=e.customProperties.legacyIdentifiers;var r;const s=null!==(r=null==n?void 0:n.panels)&&void 0!==r?r:[];var a;const d=null!==(a=s.find(e=>"front"===e.name))&&void 0!==a?a:s[0],x=null==d?void 0:d.latestTemplateToken,f=d?null==n||null===(t=n.designPhysicalSpecIds)||void 0===t?void 0:t[d.name]:void 0;if(x&&f){const e="".concat(u,"/api/v1/accounts/").concat(i)+"/contentAreas/".concat(c,"/assets:deliver")+"?templateToken=".concat(x,"&templateDeliveryMode=renderDoc&culture=en-US")+"&requestor=".concat(l,"&backgroundColor=rgb(255,255,255)"),t="".concat(m,"/v3/instructions:preview")+"?documentUri=".concat(encodeURIComponent(e)),o={width:500,page:1,showFullBleed:!0,product:{calculatedSurfaceSetUrl:"".concat(g,"/api/v3/DesignPhysicalSpecs/").concat(f)+"/surfaceSet?requestor=cam-prod"},layers:at},n="".concat(h,"/v3/transient")+"?data=".concat(encodeURIComponent(btoa(JSON.stringify(o))));return"".concat(p,"/v1/cse/preview")+"?width=".concat(500,"&height=").concat(500,"&format=png")+"&instructions_uri=".concat(encodeURIComponent(t))+"&scene=".concat(encodeURIComponent(n))}if(null===(o=e.deliveryResources)||void 0===o?void 0:o.preview)return e.deliveryResources.preview;var b;const y=null!==(b=e.contentAssetVersionNumber)&&void 0!==b?b:1,v="".concat(u,"/api/v1/accounts/").concat(i)+"/contentAreas/".concat(c,"/assets:deliver")+"?contentAssetId=".concat(e.id,"&contentAssetVersion=").concat(y)+"&templateDeliveryMode=editDoc&culture=en-us&excludePlaceholders=false&swapWordArts=false&requestor=".concat(l),w="".concat(m,"/v3/instructions:preview")+"?documentUri=".concat(encodeURIComponent(v));return"".concat(p,"/v1/cse/preview")+"?width=150&instructions_uri=".concat(encodeURIComponent(w))},[i,c,l,u,m,p,h,g]),et=(0,d.useCallback)(e=>{if(!w)return;var t;const o=null!==(t=e.contentAssetVersionNumber)&&void 0!==t?t:1,n="".concat(u,"/api/v1/accounts/").concat(i)+"/contentAreas/".concat(c,"/assets:deliver")+"?contentAssetId=".concat(e.id,"&contentAssetVersion=").concat(o)+"&templateDeliveryMode=editDoc&culture=en-us&excludePlaceholders=false&swapWordArts=false&requestor=".concat(l),a="".concat(m,"/v3/instructions:preview")+"?documentUri=".concat(encodeURIComponent(n));var d;const p=JSON.stringify(null!==(d=null!=j?j:T)&&void 0!==d?d:{}),h="https://cdn.previews.cimpress.io/v2/modelConfig"+"?sku=".concat(w,"&skuAttributes=").concat(encodeURIComponent(p))+"&tenantId=".concat(r,"&tenantType=").concat(s);return"https://raster.vortex.documents.cimpress.io/v1/app/raster"+"?width=".concat(ke.X.width,"&height=").concat(ke.X.height,"&format=").concat(ke.X.format)+"&productC
1onfigUrl=".concat(encodeURIComponent(h))+"&renderingInstructionsUrl=".concat(encodeURIComponent(a))+"&stageConfigUrl=".concat(encodeURIComponent(ke.X.stageConfigUrl))},[i,c,l,u,m,w,j,T,r,s]);let it;w&&T&&(it="referenceId:".concat(w),Object.entries(T).forEach(e=>{let[t,o]=e;return it="".concat(it," AND (skuAttributes.").concat(encodeURI(t),':"').concat(o.replaceAll('"','\\"'),'")'),it}));const ct=(0,Me.hE)()?Oe.seo:_e.seo;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Re(),{children:(0,Ae.y)(ct)}),(0,n.jsx)(Pe.Z,{maxWidth:"xl",className:b.root,children:(0,n.jsx)(a.ZP,{className:b.innerContainer,children:(0,n.jsx)(a.ZP,{item:!0,children:ue?(0,n.jsx)(je,{product:{productName:C,productAttribute:Z},templates:ve,isLoading:we,error:Te,total:Ee,currentPage:Ve,totalPages:Ge,onClickDefault:Q,onSearch:X,onNextPage:Je,onPrevPage:We,onSetPage:Ke,onSelectTemplate:e=>{if(!e.id)return void f("Invalid Template");localStorage.setItem(Ce.LOCAL_STORAGE_KEYS.TEMPLATE_OBJ,JSON.stringify(e));const t=e.customProperties.sourceId;if(!t)return void f("Template is missing a source asset id");const o="".concat(x,"/v3/assets/").concat(t,"/content");H(G,{index:"cam",eventType:"click",queryID:"",objectIDs:[e.id],positions:[0],searchTerm:$});const n=(0,Be.md)({flowType:Y,cimSku:e.customProperties.mcpSku||w,productReferenceId:k,skuAttributes:j||{},templateMakerCimDocRefUrl:o,productName:C,merchandisedUserSelection:Z,price:S,totalPrice:I,mcpSkuVersion:P,surfaceAttributes:T||j||{},returnUrl:A});(0,Ne.Jy)(Ce.PAGES.TEMPLATE_DESIGNER.URL,n)},getPreviewUrl:et,getHoverPreviewUrl:Ye,industries:pe,themes:he,colors:xe,selectedIndustries:ee,onToggleIndustry:ae,selectedThemes:oe,onToggleTheme:ie,selectedColors:re,onToggleColor:ce,onClearAllFilters:le}):(0,n.jsx)(ge,{algoliaInfo:{indexName:N},product:{productName:C,productAttribute:Z},trackEvent:H,filterQuery:it,algoliaInit:z,onClickDefault:Q,setSearchBox:e=>{X(e)},searchTerm:$,templateInfoSet:e=>{if(e){const t=(e=>{if(e){const{__queryID:t,__position:o,objectID:n}=e;return{index:N,eventType:"click",queryID:t,objectIDs:[n],positions:[o],templateInfo:e,searchTerm:$}}})(e);H(G,t),(e=>{if(!e.referenceId||!e.skuAttributes||!e.templateMakerAssetContentUrl)return void f("Invalid Template");localStorage.setItem(Ce.LOCAL_STORAGE_KEYS.TEMPLATE_OBJ,JSON.stringify(e));const t=(0,Be.A1)({flowType:Y,cimSku:e.referenceId,productReferenceId:k,skuAttributes:j||e.skuAttributes,templateMakerCimDocRefUrl:e.templateMakerAssetContentUrl,productName:C,merchandisedUserSelection:Z,price:S,totalPrice:I,mcpSkuVersion:P,surfaceAttributes:T||e.skuAttributes,returnUrl:A});(0,Ne.Jy)(Ce.PAGES.TEMPLATE_DESIGNER.URL,(0,Ze.qp)(t))})(e)}},preSelectedFacets:V,enable2DPreview:M})})})})]})};var ct=!0,lt=e=>{let{pageLayoutData:{menu:t,footer:o}}=e;const c=(0,i.D)(),l=(0,Le.useSearchParams)(),d={...o},u=Boolean(null==l?void 0:l.get("returnUrl"));return(0,n.jsxs)(a.ZP,{item:!0,xs:12,className:c.root,children:[!u&&(0,n.jsx)(r.o9,{menu:t}),(0,n.jsx)(it,{}),!u&&(0,n.jsx)(s.default,{data:d})]})}},847186:function(e,t,o){"use strict";o.d(t,{p:function(){return n}});const n=function(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"en-us";if(!e||null==t||!o||0===Object.keys(o).length)return;const r=Object.entries(o).map(e=>{let[t,o]=e;return"optionSelections[".concat((e=>e.charAt(0).toLowerCase()+e.slice(1))(t),"]=").concat(encodeURIComponent(o))});return r.push("culture=".concat(n)),"".concat("https://design-specifications.design.vpsvc.com/v3/surfaces/products","/").concat(encodeURIComponent(e),"/").concat(t,"?").concat(r.join("&"))}},161958:function(e,t,o){"use strict";o.d(t,{_b:function(){return l},jC:function(){return d}});var n=o(758525),r=o(939838),s=o(414005),a=o(640927),i=o(296636),c=o(51458);const l=(e,t)=>{if(!t)return;if(!t.order)return;const{layout:o,isMissingLayout:n}=(0,c.EX9)(t.layout);n&&(0,i.Jo)({tag:"toIGenericAttrConfiguration",msg:"Missing layout in dato CMS generic attribute configuration, falling back to a default layout",args:{order:t.order}});const r={},s={},a={layout:o,order:t.order,attributeSpecifications:{}},l={};t.attributeSpecifications&&Object.entries(t.attributeSpecifications).forEac
1h(t=>{let[o,n]=t;var a,i,c,d;l[o]={attributeNameTemplate:(null===(c=n.attributeNameTemplate)||void 0===c||null===(i=c.attributeNameCustomizationConfig)||void 0===i||null===(a=i.filter(t=>t.languageCode===e)[0])||void 0===a?void 0:a.attributeTemplateValue)||o,attributeValueDisplayOrder:n.attributeValueDisplayOrder,isIconicViewEnabled:n.isIconicViewEnabled};const u={};if((null===(d=n.attributeNameTemplate)||void 0===d?void 0:d.attributeNameCustomizationConfig)&&n.attributeNameTemplate.attributeNameCustomizationConfig.forEach(e=>{u[e.languageCode]=e.attributeTemplateValue||o}),r[o]=u,n.attributeValues){const t={};Object.entries(n.attributeValues).forEach(n=>{let[r,a]=n;var i;const c=(null===(i=a.attributeValueList)||void 0===i?void 0:i.filter(t=>t.languageCode===e)[0])||{attributeValueTemplate:r,imageUrl:void 0,languageCode:void 0};t[r]={imageUrl:c.imageUrl,attributeValueTemplate:c.attributeValueTemplate};const l={};a.attributeValueList&&a.attributeValueList.forEach(e=>{l[e.languageCode]=e.attributeValueTemplate||r}),s["".concat(o,"|").concat(r)]=l}),l[o].attributeValues=t}}),a.attributeSpecifications=l;return{attributeNameTranslations:r,attributeValueTranslations:s,genericAttrConfiguration:a}},d=e=>{const{productDetail:t,showroomProductDetail:o,site:c}=e,l=(0,a.DP)()?t:o;if(!l)throw(0,i.Jo)({tag:"toProductDetails",msg:"No data found from dato CMS",args:n.gL}),new Error("Product detail graphql response error",{cause:n.gL});const{seo:d,recordId:u,referenceId:m,sku:p,fulfillerId:h="",productId:g="",updatedAt:x,productVersion:f,configuration:b,title:y="",slug:v="",images:w,shortDescription:j,detailsDescription:C,processDescription:k,selectorDefaultConfiguration:I,additionalModelInfo:S,recommendations:Z,showroomRecommendations:N,mcpSkuVersion:P,sizes:T,contentId:R,faqTitle:A,faqCards:E}=l,D=d||[],U=(null==c?void 0:c.favicon)||[];let _=D.concat(U);const{additionalMetaTags:O}=S||{};if(O){const e=(0,s.DJ)(O);e&&(_=_.concat(e))}const B=w&&w.length?w.map(e=>({...e.responsiveImage,customData:null==e?void 0:e.customData})):[r.vs.PRODUCT_COLLECTION_IMG.PRODUCT_OVERVIEW_TILE],L=A&&(null==E?void 0:E.length)?{title:{type:"normal",content:A},cards:E.map(e=>{let{faqCardTitle:t="",faqCardDescription:o="",faqCardJson:n}=e;return{title:{type:"normal",content:t},description:{type:"html",content:o},json:n}})}:void 0;return{recordId:u,referenceId:m,sku:p,fulfillerId:h,productId:g,updatedAt:x,productVersion:Number(f)||1,configuration:b,title:y,slug:v,images:B,seo:_,shortDescription:j||"",detailsDescription:C||"",processDescription:k||"",defaultSelection:I||void 0,additionalModelInfo:S||{},contentId:R,mcpSkuVersion:Number(P),sizeRelationship:(T||[]).map(e=>{var t;return{size:e.productSize,assests:(null==e||null===(t=e.sizeAssets)||void 0===t?void 0:t.length)?e.sizeAssets.map(e=>e.responsiveImage):[],sizeDescription:null==e?void 0:e.sizeDescription}}),recommendations:N||Z,productFaq:L}}},354185:function(e,t,o){"use strict";o.d(t,{Ip:function(){return i},Jy:function(){return c}});var n=o(414005),r=o(640927),s=o(980535);const a=(0,r.hE)(),i=e=>{if(a&&-1===e.indexOf("linkID=")){const t=(0,n.Le)().replace("?","");t&&(e+="&".concat(t))}return e},c=(e,t)=>{let o=t;if(a){const e=(0,n.Le)().replace("?","");e&&(o="".concat(o,"&").concat(e))}let r="".concat((e=>{const t=s.env.NEXT_PUBLIC_TEMPLATE_DESIGNER_ORIGIN;if("/template-designer"!==e||!t)return window.location.origin;try{const e=new URL(t);if("http:"===e.protocol||"https:"===e.protocol)return e.origin}catch(e){}return window.location.origin})(e)).concat(e);o&&(r="".concat(r,"/").concat(o)),window.location.href=r}},700201:function(e,t,o){"use strict";o.d(t,{A1:function(){return y},md:function(){return v},vl:function(){return b}});var n=o(712472),r=o(754142);const s="sku",a="productReferenceId",i="skuVars",c="productName",l="merchandisedUserSelection",d="price",u="totalPrice",m="mcpSkuVersion",p="indexName",h="surfaceAttributes",g="preSelectedFacetsFromURL",x="returnUrl",{templateBrowsingFlow:f}=n.DESIGN_EXPERIENCE_QUERY_PARAM,b=e=>{const t=new URLSearchParams(e),o={mcpSkuVersion:t.get(m)||""};t.has(s)&&t.get(s)&&(o.sku=t.get(s)||""),t.has(a)&&t.get(a)&&(o.productReferenceId=t.get(a)||""),t.has(i)&&t.get(i)&&(o.skuVars=JSON.parse(decodeURIComponent(t.get(i)||"{}"))),t.has(h)&&t.get(h)&&(o.surfaceAttributes=JSON.parse(decodeURIComponent(t.get(h)||"{}"))),t.has(c)&&t.get(c)&&(o.productName=t.get(c)||""),t.has(l)&&t.get(l)&&(o.merchandisedUserSelection=JSON.parse(decodeURIComponent(t.get(l)||"{}"))),t.has(d)&&t.get(d)&&(o.price=t.get(d)||""),t.has(u)&&t.get(u)&&(o.totalPrice=t.get(u)||""),t.has(p)&&t.get(p)&&(o.indexName=t.get(p)||""),t.has(x)&&t.get(x)&&(o.returnUrl=t.get(x)||"");const n=t.get(g)||"";return n&&(o.preSelectedFacetsFromURL=JSON.parse(decodeURIComponent(n))),o},y=e=>{const{cimSku:t,productReferenceId:o="",skuAttributes:n,productName:r="",merchandisedUserSelection:s,price:a="",totalPrice:i="",flowType:c,templateMakerCimDocRefUrl:l,mcpSkuVersion:d,returnUrl:u}=e,m={flowType:c,[f.cimSku.queryKey]:t,[f.productReferenceId.queryKey]:o,[f.skuAttributes.queryKey]:encodeURIComponent(JSON.stringify(n)),[f.productName.queryKey]:r,[f.merchandisedUserSelection.queryKey]:encodeURIComponent(JSON.stringify(s)),[f.price.queryKey]:a,[f.totalPrice.queryKey]:i,[f.mcpSkuVersion.queryKey]:d};return l&&(m[f.templateMakerCimDocRefUrl.queryKey]=encodeURIComponent(l)),u&&(m[f.returnUrl.queryKey]=encodeURIComponent(u)),m},v=e=>(0,r.qp)(y(e))}},function(e){e.O(0,[8451,6465,1895,2868,2594,4660,8984,1141,9383,9774,2888,179],function(){return t=476046,e(e.s=t);var t});var t=e.O();_N_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.