PageSourceSearch

https://assets.jiffy.com/packs/js/product-details-dtf-sheet-8fa12eb58f36110d.chunk.js

js jiffy.com collected 2026-10-03 21:42:36 UTC 2,215,427 bytes, 1 lines download raw bytes

1(self.webpackChunk=self.webpackChunk||[]).push([["1863"],{306780(e,t,r){"use strict";r.d(t,{A:()=>CheckSvg});function CheckSvg(e={}){let t=e.className||e.class,r="0 0 24 24",n='xmlns="http://www.w3.org/2000/svg"';return r&&(n+=' viewBox="'+r+'"'),t&&(n+=' class="'+t+'"'),void 0!==e.width&&(n+=' width="'+e.width+'"'),void 0!==e.height&&(n+=' height="'+e.height+'"'),"<svg "+n+'><path fill="currentColor" fill-rule="evenodd" d="M20.707 5.293a1 1 0 0 1 0 1.414l-11 11a1 1 0 0 1-1.414 0l-5-5a1 1 0 1 1 1.414-1.414L9 15.586 19.293 5.293a1 1 0 0 1 1.414 0" clip-rule="evenodd"/></svg>'}},20908(e,t,r){"use strict";r.d(t,{A:()=>CrossSvg});function CrossSvg(e={}){let t=e.className||e.class,r="0 0 13 14",n='xmlns="http://www.w3.org/2000/svg"';return r&&(n+=' viewBox="'+r+'"'),t&&(n+=' class="'+t+'"'),void 0!==e.width&&(n+=' width="'+e.width+'"'),void 0!==e.height&&(n+=' height="'+e.height+'"'),"<svg "+n+'><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.803 1.697 1.197 12.303m0-10.606 10.606 10.606"/></svg>'}},406536(e,t,r){"use strict";r.d(t,{A:()=>EditSvg});function EditSvg(e={}){let t=e.className||e.class,r="0 0 1024 1024",n='xmlns="http://www.w3.org/2000/svg"';return r&&(n+=' viewBox="'+r+'"'),t&&(n+=' class="'+t+'"'),void 0!==e.width&&(n+=' width="'+e.width+'"'),void 0!==e.height&&(n+=' height="'+e.height+'"'),"<svg "+n+'><path fill="currentColor" d="M766.701 84.07c47.846-47.843 125.414-47.843 173.254 0s47.84 125.412 0 173.255L534.621 662.656a32 32 0 0 1-14.865 8.416l-170.667 42.669c-23.436 5.856-44.665-15.366-38.806-38.803L352.95 504.27a32 32 0 0 1 8.417-14.865zM495.636 611.137 894.7 212.07c22.848-22.849 22.848-59.896 0-82.745s-59.891-22.85-82.746 0L412.888 528.389l-27.581 110.328zm-324.974-472.44h298.666c17.673 0 32 14.327 32 32s-14.327 32-32 32H170.662c-29.455 0-53.334 23.878-53.334 53.334v597.332c0 29.459 23.878 53.331 53.334 53.331h597.332c29.459 0 53.338-23.872 53.338-53.331V554.697c0-17.672 14.323-32 32-32 17.67 0 32 14.328 32 32v298.666c0 64.8-52.531 117.331-117.338 117.331H170.662c-64.801 0-117.334-52.531-117.334-117.331V256.031c0-64.802 52.532-117.334 117.334-117.334"/></svg>'}},727485(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=_interopRequireDefault(r(293534));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _objectWithoutProperties(e,t){var r={};for(var n in e)!(t.indexOf(n)>=0)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}t.default=function(e){var t=e.fill,r=e.width,i=e.height,l=e.style,c=_objectWithoutProperties(e,["fill","width","height","style"]);return o.default.createElement("svg",n({viewBox:"0 0 24 24",style:n({fill:void 0===t?"currentColor":t,width:void 0===r?24:r,height:void 0===i?24:i},void 0===l?{}:l)},c),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},372322(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=_interopRequireDefault(r(293534));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _objectWithoutProperties(e,t){var r={};for(var n in e)!(t.indexOf(n)>=0)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}t.default=function(e){var t=e.fill,r=e.width,i=e.height,l=e.style,c=_objectWithoutProperties(e,["fill","width","height","style"]);return o.default.createElement("svg",n({viewBox:"0 0 24 24",style:n({fill:void 0===t?"currentColor":t,width:void 0===r?24:r,height:void 0===i?24:i},void 0===l?{}:l)},c),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},894980(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
1).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1067 1024"},e),n||(n=o.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:4,strokeWidth:85.333,d:"M192 512h682.667m0 0-256-256m256 256-256 256"})))},101497(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e),n||(n=o.createElement("path",{fill:"currentColor",d:"M24 2C11.85 2 2 11.85 2 24s9.85 22 22 22 22-9.85 22-22a21.9 21.9 0 0 0-1.583-8.21c-.427-1.06-.64-1.59-1.145-1.933-.4-.271-1.034-.4-1.508-.307-.599.117-1.064.583-1.995 1.515L25.415 29.435a2 2 0 0 1-2.83 0l-6-6a2 2 0 1 1 2.83-2.828l4.584 4.585 13.956-13.97c.752-.752 1.127-1.128 1.27-1.62.116-.396.088-.93-.067-1.311-.192-.475-.552-.768-1.27-1.354A21.9 21.9 0 0 0 24 2"})))},401377(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24"},e),n||(n=o.createElement("path",{d:"m18 15-6-6-6 6"})))},219909(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",role:"presentation",viewBox:"0 0 36.662 33.328"},e),n||(n=o.createElement("path",{fill:"#1D4ED8",fillRule:"evenodd",d:"M14.16 3.328a10.833 10.833 0 0 0-7.673 18.48 1.667 1.667 0 1 1-2.362 2.352 14.168 14.168 0 1 1 22.06-17.494 10.833 10.833 0 0 1 6.538 19.185 1.667 1.667 0 0 1-2.125-2.57 7.5 7.5 0 0 0-4.77-13.286A2.7 2.7 0 0 1 23.5 8.671a10.82 10.82 0 0 0-9.34-5.343m2.99 12.156a1.667 1.667 0 0 1 2.355 0l6.667 6.667a1.667 1.667 0 1 1-2.356 2.355l-3.822-3.822v10.978a1.667 1.667 0 0 1-3.334 0V20.684l-3.822 3.822a1.667 1.667 0 0 1-2.355-2.355z",clipRule:"evenodd"})))},348810(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none","aria-hidden":"true",role:"presentation",viewBox:"0 0 482.387 452.103"},e),n||(n=o.createElement("g",{stroke:"#D1DDFF",strokeMiterlimit:10,strokeWidth:5},o.createElement("path",{fill:"#fff",d:"M192.413 2.568c4.683-1.483 41.036 22.109 97.512.278 4.313-.278 7.384 1.817 10.849 3.477 29.629 14.183 63.633 27.57 88.392 34.8 15.58 5.005 90.095 102.856 90.095 102.856-20.165 27.258-44.199 49.832-68.179 62.849l-37.237-27.299.743 265.162c-96.734 6.589-171.875 6.511-269.017 0l1.484-267.387-34.27 29.524c-26.428-11.958-55.84-34.993-69.865-60.891 0 0 66.9-99.105 82.838-104.249 43.399-11.495 96.27-34.437 96.27-34.437s5.703-3.198 10.385-4.68z"}),o.createElement("path",{d:"M195.653 12.388c31.183 11.214 61.401 10.803 92.191-.847"}),o.createElement("path",{d:"M196.972 16.016c30.31 10.704 60.094 9.94 90.044-1.358"}),o.createElement("path",{d:"M192.412 2.568s7.233 39.906 50.356 39.906c43.122 0 47.156-39.629 47.156-39.629"}),o.createElement("path",{d:"M182.029 7.247s11.963 47.553 61.76 47.555c50.448-.556 56.986-48.482 56.986-48.482M373.337 178.925c-.09-40.511 13.82-76.662 17.347-137.128M83.953 42.535c6.639 56.948 23.332 87.537 23.612 133.793"}),o.createElement("path",{d:"M104.595 142.772c-6.651-16.436-13.81-32.833-20.461-49.268M374.497 432.918c-87.765 6.793-178.471 6.553-269.441 0M403.537 201.296c25.516-16.771 49.018-37.96 69.912-64.872M8.2 138.209c20.72 26.158 44.306 47.456 71.49 62.66h.007M386.537 126.225a809 809 0 0 0-12.434 38.923"}))))},270312(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o,i,l,c,u,d=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}
1).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>d.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 272 95"},e),n||(n=d.createElement("path",{fill:"#1F1D55",d:"m239.355 29.17 3.274 32.09 17.246-32.09h11.571L245.14 76.105q-3.93 6.877-7.968 10.588-4.04 3.712-8.842 5.458-4.694 1.747-10.478 1.965-5.676.327-12.99.327l1.638-7.531q3.601 0 6.658-.11 3.165-.108 5.021-.655 2.51-.655 3.602-2.4 1.092-1.638 1.092-4.913 0-2.183-.437-5.02a272 272 0 0 0-.764-6.004l-5.349-38.64z"})),o||(o=d.createElement("path",{fill:"#1F1D55",d:"M141.185 29.17h8.405l.437-1.856q1.419-6.55 4.038-11.024 2.73-4.585 6.55-7.423t8.732-4.039q5.02-1.31 11.024-1.31 4.585 0 9.06.656 4.476.654 8.296 1.855a25.4 25.4 0 0 1 8.404-3.93Q210.826.9 216.174.9q3.383 0 7.204.437 3.82.436 8.077 1.419l-1.856 8.732a54 54 0 0 0-5.13-.437q-2.619-.218-4.257-.218-2.183 0-3.82.327-1.638.328-2.838 1.31-1.201.874-2.074 2.51-.873 1.638-1.419 4.367l-2.074 9.824h11.461l-1.419 7.313h-11.57l-8.405 39.622h-22.267l8.405-39.622h-13.863l-8.405 39.622h-22.158l8.296-39.622h-8.405zm30.672 0h13.863l.982-4.476a49 49 0 0 1 1.528-5.457 37 37 0 0 1 2.183-4.803q-3.82-.982-7.531-.982-4.039 0-6.222 1.746-2.183 1.637-3.274 6.767z"})),i||(i=d.createElement("path",{fill:"#1F1D55",d:"M131.802 76.105h-22.158l9.932-46.935h22.377zm12.989-61.235q0 2.511-1.092 4.367a9.45 9.45 0 0 1-2.729 3.165q-1.636 1.31-3.82 1.965a15.5 15.5 0 0 1-4.475.655q-4.367 0-7.313-2.074-2.948-2.074-2.948-6.55 0-2.401.983-4.256.982-1.965 2.62-3.166a12.5 12.5 0 0 1 3.929-1.965 17 17 0 0 1 4.694-.654q4.257 0 7.204 2.073 2.947 2.075 2.947 6.44M105.065 72.067q-1.638 7.64-5.13 12.007-3.384 4.475-7.968 6.767-4.585 2.292-9.824 2.947a88 88 0 0 1-10.697.655l1.31-7.531q1.637 0 3.056-.328 1.31-.327 2.401-1.419 1.092-1.092 2.074-3.275.873-2.073 1.637-5.785l9.933-46.935h22.377zm11.788-57.196q0 2.51-1.091 4.366a9.5 9.5 0 0 1-2.729 3.165q-1.637 1.31-3.82 1.965a15.5 15.5 0 0 1-4.476.655q-4.365 0-7.313-2.074t-2.947-6.55q0-2.401.983-4.256.982-1.965 2.62-3.166a12.5 12.5 0 0 1 3.929-1.965 17 17 0 0 1 4.693-.654q4.257 0 7.204 2.073 2.947 2.075 2.947 6.44"})),l||(l=d.createElement("rect",{width:50,height:12,x:27,y:25,fill:"#D23731",rx:6})),c||(c=d.createElement("rect",{width:50,height:12,x:11,y:69,fill:"#D23731",rx:6})),u||(u=d.createElement("rect",{width:69,height:12,y:47,fill:"#D23731",rx:6})))},463144(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>o.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,viewBox:"0 0 24 24"},e),n||(n=o.createElement("path",{d:"M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"})))},678373(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o,i,l=r(293534);function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}let __rspack_default_export=e=>l.createElement("svg",_extends({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 33 33"},e),n||(n=l.createElement("path",{fill:"currentColor",d:"M23.798 23.864H12.54a1.178 1.178 0 1 1 0-2.357h11.258a1.179 1.179 0 0 1 0 2.357m6.487 0h-.283a1.178 1.178 0 1 1 0-2.357h.283a.58.58 0 0 0 .594-.585v-4.045a.594.594 0 0 0-.453-.575h-6.948a2.95 2.95 0 0 1-2.952-2.942V7.043a.573.573 0 0 0-.584-.584H6.054a1.179 1.179 0 0 1 0-2.357h13.888a2.94 2.94 0 0 1 2.942 2.941v6.299a.585.585 0 0 0 .594.584h6.807q.323.005.641.066l.208.066a2.92 2.92 0 0 1 2.102 2.829v4.045a2.95 2.95 0 0 1-2.951 2.932"})),o||(o=l.createElement("path",{fill:"currentColor",d:"M30.69 16.34a1.17 1.17 0 0 1-1.103-.782l-1.886-5.242a.57.57 0 0 0-.443-.236h-5.572a1.179 1.179 0 0 1 0-2.357h5.572a2.9 2.9 0 0 1 2.546 1.527q.044.083.075.17l1.886 5.346a1.19 1.19 0 0 1-.717 1.508q-.174.056-.358.066M26.9 28.9a4.29 4.29 0 1 1 0-8.58 4.29 4.29 0 0 1 0 8.58m0-6.224a1.932 1.932 0 1 0-.095 3.863 1.932 1.932 0 0 0 .095-3.863M9.429 28.9a4.29 4.29 0 1 1 0-8.58 4.29 4.29 0 0 1 0 8.58m0-6.223a1.933 1.933 0 1 0 0 3.866 1.933 1.933 0 0 0 0-3.866"})),i||(i=l.createElement("path",{fill:"currentColor",d:"M21.686 23.864a1.17 1.17 0 0 1-1.179-1.179V12.38a1.179 1.179 0 0 1 2.357 0v10.305a1.17 1.17 0 0 1-1.178 1.179M9.608 12.418H1.886a1.179 1.179 0 0 1 0-2.357h7.722a1.179 1.179 0 0 1 0 2.357m1.452 5.26H7.024a1.178 1.178 0 1 1 0-2.356h4.036a1.179 1.179 0 0 1 0 2.357"})))},106630(e,t,r){var n=r(265442),o={ease:n(.25,.1,.25,1),easeIn:n(.42,0,1,1),easeOut:n(0,0,.58,1),easeInOut:n(.42,0,.58,1),linear:n(0,0,1,1)};function noop(){}function getScheduler(e){if(!e)return"u">typeof window&&window.requestAnimationFrame?rafScheduler():timeoutScheduler();if("function"!=typeof e.next)throw Error("Scheduler is supposed to have next(cb) function");if("function"!=typeof e.cancel)throw Error("Scheduler is supposed to have cancel(handle) function");return e}function rafScheduler(){return{next:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)}}function timeoutScheduler(){return{next:function(e){return setTimeout(e,1e3/60)},cancel:function(e){return clearTimeout(e)}}}function makeAggregateRaf(){var e=new Set,t=new Set,r=0;return{next:next,cancel:next,clearAll:clearAll};function clearAll(){e.clear(),t.clear(),cancelAnimationFrame(r),r=0}function next(e){t.add(e),renderNextFrame()}function renderNextFrame(){r||(r=requestAnimationFrame(renderFrame))}function renderFrame(){r=0;var n=t;
1t=e,(e=n).forEach(function(e){e()}),e.clear()}}e.exports=function animate(e,t,r){var n,i=Object.create(null),l=Object.create(null),c="function"==typeof(r=r||{}).easing?r.easing:o[r.easing];c||(r.easing&&console.warn("Unknown easing function in amator: "+r.easing),c=o.ease);var u="function"==typeof r.step?r.step:noop,d="function"==typeof r.done?r.done:noop,p=getScheduler(r.scheduler),f=Object.keys(t);f.forEach(function(r){i[r]=e[r],l[r]=t[r]-e[r]});var _=Math.max(1,.06*("number"==typeof r.duration?r.duration:400)),h=0;return n=p.next(loop),{cancel:cancel};function cancel(){p.cancel(n),n=0}function loop(){var t=c(h/_);h+=1,setValues(t),h<=_?(n=p.next(loop),u(e)):(n=0,setTimeout(function(){d(e)},0))}function setValues(t){f.forEach(function(r){e[r]=l[r]*t+i[r]})}},e.exports.makeAggregateRaf=makeAggregateRaf,e.exports.sharedScheduler=makeAggregateRaf()},265442(e){var t="function"==typeof Float32Array;function calcBezier(e,t,r){return(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e}function getSlope(e,t,r){return 3*(1-3*r+3*t)*e*e+2*(3*r-6*t)*e+3*t}function binarySubdivide(e,t,r,n,o){var i,l,c=0;do(i=calcBezier(l=t+(r-t)/2,n,o)-e)>0?r=l:t=l;while(Math.abs(i)>1e-7&&++c<10);return l}function newtonRaphsonIterate(e,t,r,n){for(var o=0;o<4;++o){var i=getSlope(t,r,n);if(0===i)break;var l=calcBezier(t,r,n)-e;t-=l/i}return t}function LinearEasing(e){return e}e.exports=function(e,r,n,o){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(e===r&&n===o)return LinearEasing;for(var i=t?new Float32Array(11):Array(11),l=0;l<11;++l)i[l]=calcBezier(.1*l,e,n);function getTForX(t){for(var r=0,o=1;10!==o&&i[o]<=t;++o)r+=.1;var l=r+(t-i[--o])/(i[o+1]-i[o])*.1,c=getSlope(l,e,n);return c>=.001?newtonRaphsonIterate(t,l,e,n):0===c?l:binarySubdivide(t,r,r+.1,e,n)}return function(e){return 0===e?0:1===e?1:calcBezier(getTForX(e),r,o)}}},176375(e,t,r){"use strict";r.d(t,{A:()=>addClass});var n=r(836570);function addClass(e,t){e.classList?e.classList.add(t):(0,n.A)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}},836570(e,t,r){"use strict";function hasClass(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}r.d(t,{A:()=>hasClass})},57080(e,t,r){"use strict";function replaceClassName(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\
1s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=replaceClassName(e.className,t):e.setAttribute("class",replaceClassName(e.className&&e.className.baseVal||"",t))}r.d(t,{A:()=>removeClass})},724005(e,t,r){e=r.nmd(e);var n,o="__lodash_hash_undefined__",i="[object Arguments]",l="[object Array]",c="[object Boolean]",u="[object Date]",d="[object Error]",p="[object Function]",f="[object Map]",_="[object Number]",h="[object Object]",m="[object Promise]",g="[object RegExp]",b="[object Set]",y="[object String]",v="[object WeakMap]",w="[object ArrayBuffer]",j="[object DataView]",k=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,S={};S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S[i]=S[l]=S[w]=S[c]=S[j]=S[u]=S[d]=S[p]=S[f]=S[_]=S[h]=S[g]=S[b]=S[y]=S[v]=!1;var O="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,P="object"==typeof self&&self&&self.Object===Object&&self,A=O||P||Function("return this")(),C=t&&!t.nodeType&&t,I=C&&e&&!e.nodeType&&e,E=I&&I.exports===C,N=E&&O.process,D=function(){try{return N&&N.binding&&N.binding("util")}catch(e){}}(),T=D&&D.isTypedArray;function arrayFilter(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var l=e[r];t(l,r,e)&&(i[o++]=l)}return i}function arrayPush(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function arraySome(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function baseTimes(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function baseUnary(e){return function(t){return e(t)}}function cacheHas(e,t){return e.has(t)}function getValue(e,t){return null==e?void 0:e[t]}function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function overArg(e,t){return function(r){return e(t(r))}}function setToArray(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var M=Array.prototype,R=Function.prototype,F=Object.prototype,L=A["__core-js_shared__"],B=R.toString,z=F.hasOwnProperty,U=(n=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",H=F.toString,q=RegExp("^"+B.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=E?A.Buffer:void 0,G=A.Symbol,K=A.Uint8Array,W=F.propertyIsEnumerable,Q=M.splice,J=G?G.toStringTag:void 0,Z=Object.getOwnPropertySymbols,Y=V?V.isBuffer:void 0,X=overArg(Object.keys,Object),ee=getNative(A,"DataView"),et=getNative(A,"Map"),er=getNative(A,"Promise"),en=getNative(A,"Set"),eo=getNative(A,"WeakMap"),ea=getNative(Object,"create"),ei=toSource(ee),es=toSource(et),el=toSource(er),ec=toSource(en),eu=toSource(eo),ed=G?G.prototype:void 0,ep=ed?ed.valueOf:void 0;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hashClear(){this.__data__=ea?ea(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}function hashGet(e){var t=this.__data__;if(ea){var r=t[e];return r===o?void 0:r}return z.call(t,e)?t[e]:void 0}function hashHas(e){var t=this.__data__;return ea?void 0!==t[e]:z.call(t,e)}function hashSet(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=ea&&void 0===t?o:t,this}function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function listCacheClear(){this.__data__=[],this.size=0}function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():Q.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(et||ListCache),string:new Hash}}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=!!t,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this}function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}
1function setCacheAdd(e){return this.__data__.set(e,o),this}function setCacheHas(e){return this.__data__.has(e)}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function stackGet(e){return this.__data__.get(e)}function stackHas(e){return this.__data__.has(e)}function stackSet(e,t){var r=this.__data__;if(r instanceof ListCache){var n=r.__data__;if(!et||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new MapCache(n)}return r.set(e,t),this.size=r.size,this}function arrayLikeKeys(e,t){var r=em(e),n=!r&&eh(e),o=!r&&!n&&eg(e),i=!r&&!n&&!o&&eb(e),l=r||n||o||i,c=l?baseTimes(e.length,String):[],u=c.length;for(var d in e)(t||z.call(e,d))&&!(l&&("length"==d||o&&("offset"==d||"parent"==d)||i&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||isIndex(d,u)))&&c.push(d);return c}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return -1}function baseGetAllKeys(e,t,r){var n=t(e);return em(e)?n:arrayPush(n,r(e))}function baseGetTag(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":J&&J in Object(e)?getRawTag(e):objectToString(e)}function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==i}function baseIsEqual(e,t,r,n,o){return e===t||(null!=e&&null!=t&&(isObjectLike(e)||isObjectLike(t))?baseIsEqualDeep(e,t,r,n,baseIsEqual,o):e!=e&&t!=t)}function baseIsEqualDeep(e,t,r,n,o,c){var u=em(e),d=em(t),p=u?l:e_(e),f=d?l:e_(t);p=p==i?h:p,f=f==i?h:f;var _=p==h,m=f==h,g=p==f;if(g&&eg(e)){if(!eg(t))return!1;u=!0,_=!1}if(g&&!_)return c||(c=new Stack),u||eb(e)?equalArrays(e,t,r,n,o,c):equalByTag(e,t,p,r,n,o,c);if(!(1&r)){var b=_&&z.call(e,"__wrapped__"),y=m&&z.call(t,"__wrapped__");
1if(b||y){var v=b?e.value():e,w=y?t.value():t;return c||(c=new Stack),o(v,w,r,n,c)}}return!!g&&(c||(c=new Stack),equalObjects(e,t,r,n,o,c))}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?q:k).test(toSource(e))}function baseIsTypedArray(e){return isObjectLike(e)&&isLength(e.length)&&!!S[baseGetTag(e)]}function baseKeys(e){if(!isPrototype(e))return X(e);var t=[];for(var r in Object(e))z.call(e,r)&&"constructor"!=r&&t.push(r);return t}function equalArrays(e,t,r,n,o,i){var l=1&r,c=e.length,u=t.length;if(c!=u&&!(l&&u>c))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,f=!0,_=2&r?new SetCache:void 0;for(i.set(e,t),i.set(t,e);++p<c;){var h=e[p],m=t[p];if(n)var g=l?n(m,h,p,t,e,i):n(h,m,p,e,t,i);if(void 0!==g){if(g)continue;f=!1;break}if(_){if(!arraySome(t,function(e,t){if(!cacheHas(_,t)&&(h===e||o(h,e,r,n,i)))return _.push(t)})){f=!1;break}}else if(!(h===m||o(h,m,r,n,i))){f=!1;break}}return i.delete(e),i.delete(t),f}function equalByTag(e,t,r,n,o,i,l){switch(r){case j:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case w:if(e.byteLength!=t.byteLength||!i(new K(e),new K(t)))break;return!0;case c:case u:case _:return eq(+e,+t);case d:return e.name==t.name&&e.message==t.message;case g:case y:return e==t+"";case f:var p=mapToArray;case b:var h=1&n;if(p||(p=setToArray),e.size!=t.size&&!h)break;var m=l.get(e);if(m)return m==t;n|=2,l.set(e,t);var v=equalArrays(p(e),p(t),n,o,i,l);return l.delete(e),v;case"[object Symbol]":if(ep)return ep.call(e)==ep.call(t)}return!1}function equalObjects(e,t,r,n,o,i){var l=1&r,c=baseGetAllKeys(e,keys,ef),u=c.length;if(u!=baseGetAllKeys(t,keys,ef).length&&!l)return!1;for(var d=u;d--;){var p=c[d];if(!(l?p in t:z.call(t,p)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var _=!0;i.set(e,t),i.set(t,e);for(var h=l;++d<u;){var m=e[p=c[d]],g=t[p];if(n)var b=l?n(g,m,p,t,e,i):n(m,g,p,e,t,i);if(!(void 0===b?m===g||o(m,g,r,n,i):b)){_=!1;break}h||(h="constructor"==p)}if(_&&!h){var y=e.constructor,v=t.constructor;y!=v&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v)&&(_=!1)}return i.delete(e),i.delete(t),_}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}function getRawTag(e){var t=z.call(e,J),r=e[J];try{e[J]=void 0;var n=!0}catch(e){}var o=H.call(e);return n&&(t?e[J]=r:delete e[J]),o}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var ef=Z?function(e){return null==e?[]:arrayFilter(Z(e=Object(e)),function(t){return W.call(e,t)})}:stubArray,e_=baseGetTag;function isIndex(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function isMasked(e){return!!U&&U in e}function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||F)}function objectToString(e){return H.call(e)}function toSource(e){if(null!=e){try{return B.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eq(e,t){return e===t||e!=e&&t!=t}(ee&&e_(new ee(new ArrayBuffer(1)))!=j||et&&e_(new et)!=f||er&&e_(er.resolve())!=m||en&&e_(new en)!=b||eo&&e_(new eo)!=v)&&(e_=function(e){var t=baseGetTag(e),r=t==h?e.constructor:void 0,n=r?toSource(r):"";if(n)switch(n){case ei:return j;case es:return f;case el:return m;case ec:return b;case eu:return v}return t});var eh=baseIsArguments(function(){return arguments}())?baseIsArguments:function(e){return isObjectLike(e)&&z.call(e,"callee")&&!W.call(e,"callee")},em=Array.isArray;function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}var eg=Y||stubFalse;function isEqual(e,t){return baseIsEqual(e,t)}function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==p||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function isObjectLike(e){return null!=e&&"object"==typeof e}var eb=T?baseUnary(T):baseIsTypedArray;function keys(e){return isArrayLike(e)?arrayLikeKeys(e):baseKeys(e)}function stubArray(){return[]}function stubFalse(){return!1}e.exports=isEqual},592303(e,t,r){var n,o="__lodash_hash_undefined__",i=1/0,l=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,u="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")();function apply(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function arrayIncludes(e,t){return!!(e?e.length:0)&&baseIndexOf(e,t,0)>-1}function arrayIncludesWith(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function arrayMap(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function arrayPush(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function baseFindIndex(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return -1}function baseIndexOf(e,t,r){if(t!=t)return baseFindIndex(e,baseIsNaN,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return -1}function baseIsNaN(e){return e!=e}function baseTimes(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function baseUnary(e){return function(t){return e(t)}}function cacheHas(e,t){return e.has(t)}function getValue(e,t){return null==e?void 0:e[t]}function isHostObject(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function overArg(e,t){return function(r){return e(t(r))}}var f=Array.prototype,_=Function.prototype,h=Object.prototype,m=p["__core-js_shared__"],g=(n=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(sr
1c)_1."+n:"",b=_.toString,y=h.hasOwnProperty,v=h.toString,w=RegExp("^"+b.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=p.Symbol,k=overArg(Object.getPrototypeOf,Object),x=h.propertyIsEnumerable,S=f.splice,O=j?j.isConcatSpreadable:void 0,P=Object.getOwnPropertySymbols,A=Math.max,C=getNative(p,"Map"),I=getNative(Object,"create");function Hash(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hashClear(){this.__data__=I?I(null):{}}function hashDelete(e){return this.has(e)&&delete this.__data__[e]}function hashGet(e){var t=this.__data__;if(I){var r=t[e];return r===o?void 0:r}return y.call(t,e)?t[e]:void 0}function hashHas(e){var t=this.__data__;return I?void 0!==t[e]:y.call(t,e)}function hashSet(e,t){return this.__data__[e]=I&&void 0===t?o:t,this}function ListCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():S.call(t,r,1),!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}function MapCache(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(C||ListCache),string:new Hash}}function mapCacheDelete(e){return getMapData(this,e).delete(e)}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){return getMapData(this,e).set(e,t),this}function SetCache(e){var t=-1,r=e?e.length:0;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}function setCacheAdd(e){return this.__data__.set(e,o),this}function setCacheHas(e){return this.__data__.has(e)}function arrayLikeKeys(e,t){var r=D(e)||isArguments(e)?baseTimes(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||y.call(e,i))&&!(o&&("length"==i||isIndex(i,n)))&&r.push(i);return r}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return -1}function baseDifference(e,t,r,n){var o=-1,i=arrayIncludes,l=!0,c=e.length,u=[],d=t.length;if(!c)return u;r&&(t=arrayMap(t,baseUnary(r))),n?(i=arrayIncludesWith,l=!1):t.length>=200&&(i=cacheHas,l=!1,t=new SetCache(t));e:for(;++o<c;){var p=e[o],f=r?r(p):p;if(p=n||0!==p?p:0,l&&f==f){for(var _=d;_--;)if(t[_]===f)continue e;u.push(p)}else i(t,f,n)||u.push(p)}return u}function baseFlatten(e,t,r,n,o){var i=-1,l=e.length;for(r||(r=isFlattenable),o||(o=[]);++i<l;){var c=e[i];t>0&&r(c)?t>1?baseFlatten(c,t-1,r,n,o):arrayPush(o,c):n||(o[o.length]=c)}return o}function baseGetAllKeys(e,t,r){var n=t(e);return D(e)?n:arrayPush(n,r(e))}function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)||isHostObject(e)?w:l).test(toSource(e))}function baseKeysIn(e){if(!isObject(e))return nativeKeysIn(e);var t=isPrototype(e),r=[];for(var n in e)"constructor"==n&&(t||!y.call(e,n))||r.push(n);return r}function basePick(e,t){return basePickBy(e=Object(e),t,function(t,r){return r in e})}function basePickBy(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var l=t[n],c=e[l];r(c,l)&&(i[l]=c)}return i}function baseRest(e,t){return t=A(void 0===t?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=A(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var l=Array(t+1);++n<t;)l[n]=r[n];return l[t]=i,apply(e,this,l)}}function getAllKeysIn(e){return baseGetAllKeys(e,keysIn,N)}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCac
1he.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var E=P?overArg(P,Object):stubArray,N=P?function(e){for(var t=[];e;)arrayPush(t,E(e)),e=k(e);return t}:stubArray;function isFlattenable(e){return D(e)||isArguments(e)||!!(O&&e&&e[O])}function isIndex(e,t){return!!(t=null==t?0x1fffffffffffff:t)&&("number"==typeof e||c.test(e))&&e>-1&&e%1==0&&e<t}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function isMasked(e){return!!g&&g in e}function isPrototype(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||h)}function nativeKeysIn(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}function toKey(e){if("string"==typeof e||isSymbol(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}function toSource(e){if(null!=e){try{return b.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function eq(e,t){return e===t||e!=e&&t!=t}function isArguments(e){return isArrayLikeObject(e)&&y.call(e,"callee")&&(!x.call(e,"callee")||"[object Arguments]"==v.call(e))}var D=Array.isArray;function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function isArrayLikeObject(e){return isObjectLike(e)&&isArrayLike(e)}function isFunction(e){var t=isObject(e)?v.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&"[object Symbol]"==v.call(e)}function keysIn(e){return isArrayLike(e)?arrayLikeKeys(e,!0):baseKeysIn(e)}function stubArray(){return[]}e.exports=baseRest(function(e,t){return null==e?{}:(t=arrayMap(baseFlatten(t,1),toKey),basePick(e,baseDifference(getAllKeysIn(e),t)))})},908365(e,t,r){e.exports=r(172564)(r(880911),"DataView")},902079(e,t,r){var n=r(971014),o=r(254640),i=r(796211),l=r(225215),c=r(607223);function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash.prototype.clear=n,Hash.prototype.delete=o,Hash.prototype.get=i,Hash.prototype.has=l,Hash.prototype.set=c,e.exports=Hash},650021(e,t,r){var n=r(559080),o=r(583198),i=r(262697),l=r(263589),c=r(693869);function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache.prototype.clear=n,ListCache.prototype.delete=o,ListCache.prototype.get=i,ListCache.prototype.has=l,ListCache.prototype.set=c,e.exports=ListCache},361761(e,t,r){e.exports=r(172564)(r(880911),"Map")},244683(e,t,r){var n=r(759818),o=r(788364),i=r(53791),l=r(227683),c=r(945019);function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache.prototype.clear=n,MapCache.prototype.delete=o,MapCache.prototype.get=i,MapCache.prototype.has=l,MapCache.prototype.set=c,e.exports=MapCache},633218(e,t,r){e.exports=r(172564)(r(880911),"Promise")},65943(e,t,r){e.exports=r(172564)(r(880911),"Set")},757589(e,t,r){var n=r(244683),o=r(177130),i=r(78421);function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=o,SetCache.prototype.has=i,e.exports=SetCache},964679(e,t,r){var n=r(650021),o=r(491630),i=r(165352),l=r(957707),c=r(501543),u=r(656015);function Stack(e){var t=this.__data__=new n(e);this.size=t.size}Stack.prototype.clear=o,Stack.prototype.delete=i,Stack.prototype.get=l,Stack.prototype.has=c,Stack.prototype.set=u,e.exports=Stack},824163(e,t,r){e.exports=r(880911).Symbol},746814(e,t,r){e.exports=r(880911).Uint8Array},846185(e,t,r){e.exports=r(172564)(r(880911),"WeakMap")},527375(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},372148(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var l=e[r];t(l,r,e)&&(i[o++]=l)}return i}},92949(e,t,r){var n=r(631838),o=r(9226),i=r(854639),l=r(974306),c=r(865083),u=r(893873),d=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),p=!r&&o(e),f=!r&&!p&&l(e),_=!r&&!p&&!f&&u(e),h=r||p||f||_,m=h?n(e.length,String):[],g=m.length;for(var b in e)(t||d.call(e,b))&&!(h&&("length"==b||f&&("offset"==b||"parent"==b)||_&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||c(b,g)))&&m.push(b);return m}},196170(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},909814(e){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},305522(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},844961(e,t,r){var n=r(116774),o=r(912406),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var l=e[t];i.call(e,t)&&o(l,r)&&(void 0!==r||t in e)||n(e,t,r)}},538691(e,t,r){var n=r(912406);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},549355(e,t,r){var n=r(365605),o=r(675460);e.exports=function(e,t){return e&&n(t,o(t),e)}},685848(e,t,r){var n=r(365605),o=r(659307);e.exports=function(e,t){return e&&n(t,o(t),e)}},116774(e,t,r){var n=r(971781);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},530309(e,t,r){var n=r(964679),o=r(527375),i=r(844961),l=r(549355),c=r(685848),u=r(897120),d=r(674473),p=r(813393),f=r(206746),_=r(323460),h=r(580331),m=r(372099),g=r(375467),b=r(782957),y=r(223083),v=r(854639),w=r(974306),j=r(463816),
1k=r(953263),x=r(758034),S=r(675460),O=r(659307),P="[object Arguments]",A="[object Function]",C="[object Object]",I={};function baseClone(e,t,r,E,N,D){var T,M=1&t,R=2&t,F=4&t;if(r&&(T=N?r(e,E,N,D):r(e)),void 0!==T)return T;if(!k(e))return e;var L=v(e);if(L){if(T=g(e),!M)return d(e,T)}else{var B=m(e),z=B==A||"[object GeneratorFunction]"==B;if(w(e))return u(e,M);if(B==C||B==P||z&&!N){if(T=R||z?{}:y(e),!M)return R?f(e,c(T,e)):p(e,l(T,e))}else{if(!I[B])return N?e:{};T=b(e,B,M)}}D||(D=new n);var U=D.get(e);if(U)return U;D.set(e,T),x(e)?e.forEach(function(n){T.add(baseClone(n,t,r,n,e,D))}):j(e)&&e.forEach(function(n,o){T.set(o,baseClone(n,t,r,o,e,D))});var H=F?R?h:_:R?O:S,q=L?void 0:H(e);return o(q||e,function(n,o){q&&(n=e[o=n]),i(T,o,baseClone(n,t,r,o,e,D))}),T}I[P]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[C]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[A]=I["[object WeakMap]"]=!1,e.exports=baseClone},721070(e,t,r){var n=r(953263),o=Object.create;e.exports=function(){function object(){}return function(e){if(!n(e))return{};if(o)return o(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}()},701719(e,t,r){var n=r(922671);e.exports=r(555211)(n)},665295(e,t,r){e.exports=r(560515)()},922671(e,t,r){var n=r(665295),o=r(675460);e.exports=function(e,t){return e&&n(e,t,o)}},661244(e,t,r){var n=r(731767),o=r(824255);e.exports=function(e,t){t=n(t,e);for(var r=0,i=t.length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},491601(e,t,r){var n=r(909814),o=r(854639);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},175790(e,t,r){var n=r(824163),o=r(719685),i=r(3920),l=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?o(e):i(e)}},497767(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},358140(e,t,r){var n=r(175790),o=r(885208);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},99540(e,t,r){var n=r(600890),o=r(885208);function baseIsEqual(e,t,r,i,l){return e===t||(null!=e&&null!=t&&(o(e)||o(t))?n(e,t,r,i,baseIsEqual,l):e!=e&&t!=t)}e.exports=baseIsEqual},600890(e,t,r){var n=r(964679),o=r(459189),i=r(362576),l=r(378715),c=r(372099),u=r(854639),d=r(974306),p=r(893873),f="[object Arguments]",_="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,g,b,y){var v=u(e),w=u(t),j=v?_:c(e),k=w?_:c(t);j=j==f?h:j,k=k==f?h:k;var x=j==h,S=k==h,O=j==k;if(O&&d(e)){if(!d(t))return!1;v=!0,x=!1}if(O&&!x)return y||(y=new n),v||p(e)?o(e,t,r,g,b,y):i(e,t,j,r,g,b,y);if(!(1&r)){var P=x&&m.call(e,"__wrapped__"),A=S&&m.call(t,"__wrapped__");
vendor: 13,391 bytes, line 1
1if(P||A){var C=P?e.value():e,I=A?t.value():t;return y||(y=new n),b(C,I,r,g,y)}}return!!O&&(y||(y=new n),l(e,t,r,g,b,y))}},709634(e,t,r){var n=r(372099),o=r(885208);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},504433(e,t,r){var n=r(964679),o=r(99540);e.exports=function(e,t,r,i){var l=r.length,c=l,u=!i;if(null==e)return!c;for(e=Object(e);l--;){var d=r[l];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++l<c;){var p=(d=r[l])[0],f=e[p],_=d[1];if(u&&d[2]){if(void 0===f&&!(p in e))return!1}else{var h=new n;if(i)var m=i(f,_,p,e,t,h);if(!(void 0===m?o(_,f,3,i,h):m))return!1}}return!0}},828533(e,t,r){var n=r(838760),o=r(948498),i=r(953263),l=r(260051),c=/^\[object .+?Constructor\]$/,u=Object.prototype,d=Function.prototype.toString,p=u.hasOwnProperty,f=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:c).test(l(e))}},19032(e,t,r){var n=r(372099),o=r(885208);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},377087(e,t,r){var n=r(175790),o=r(999448),i=r(885208),l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l["[object Arguments]"]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l["[object Function]"]=l["[object Map]"]=l["[object Number]"]=l["[object Object]"]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!l[n(e)]}},513423(e,t,r){var n=r(213873),o=r(622752),i=r(305874),l=r(854639),c=r(357361);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?l(e)?o(e[0],e[1]):n(e):c(e)}},766(e,t,r){var n=r(104457),o=r(543360),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},735945(e,t,r){var n=r(953263),o=r(104457),i=r(103311),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var c in e)"constructor"==c&&(t||!l.call(e,c))||r.push(c);return r}},258466(e,t,r){var n=r(701719),o=r(344664);e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,function(e,n,o){i[++r]=t(e,n,o)}),i}},213873(e,t,r){var n=r(504433),o=r(941022),i=r(768123);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},622752(e,t,r){var n=r(99540),o=r(116354),i=r(718145),l=r(794596),c=r(222650),u=r(768123),d=r(824255);e.exports=function(e,t){return l(e)&&c(t)?u(d(e),t):function(r){var l=o(r,e);return void 0===l&&l===t?i(r,e):n(t,l,3)}}},471879(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},270841(e,t,r){var n=r(661244);e.exports=function(e){return function(t){return n(t,e)}}},631838(e){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},327798(e,t,r){var n=r(824163),o=r(196170),i=r(854639),l=r(162560),c=1/0,u=n?n.prototype:void 0,d=u?u.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if(i(e))return o(e,baseToString)+"";if(l(e))return d?d.call(e):"";var t=e+"";return"0"==t&&1/e==-c?"-0":t}e.exports=baseToString},388079(e){e.exports=function(e){return function(t){return e(t)}}},351165(e){e.exports=function(e,t){return e.has(t)}},38628(e,t,r){var n=r(305874);e.exports=function(e){return"function"==typeof e?e:n}},731767(e,t,r){var n=r(854639),o=r(794596),i=r(183196),l=r(771568);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(l(e))}},141927(e,t,r){var n=r(746814);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},897120(e,t,r){e=r.nmd(e);var n=r(880911),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,l=i&&i.exports===o?n.Buffer:void 0,c=l?l.allocUnsafe:void 0;function cloneBuffer(e,t){if(t)return e.slice();var r=e.length,n=c?c(r):new e.constructor(r);return e.copy(n),n}e.exports=cloneBuffer},419871(e,t,r){var n=r(141927);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},961999(e){var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},122050(e,t,r){var n=r(824163),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},455399(e,t,r){var n=r(141927);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},674473(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},365605(e,t,r){var n=r(844961),o=r(116774);e.exports=function(e,t,r,i){var l=!r;r||(r={});for(var c=-1,u=t.length;++c<u;){var d=t[c],p=i?i(r[d],e[d],d,r,e):void 0;void 0===p&&(p=e[d]),l?o(r,d,p):n(r,d,p)}return r}},813393(e,t,r){var n=r(365605),o=r(446458);e.exports=function(e,t){return n(e,o(e),t)}},206746(e,t,r){var n=r(365605),o=r(414845);e.exports=function(e,t){return n(e,o(e),t)}},706563(e,t,r){e.exports=r(880911)["__core-js_shared__"]},555211(e,t,r){var n=r(344664);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,l=t?i:-1,c=Object(r);(t?l--:++l<i)&&!1!==o(c[l],l,c););return r}}},560515(e){e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),l=n(t),c=l.length;c--;){var u=l[e?c:++o];if(!1===r(i[u],u,i))break}return t}}},971781(e,t,r){var n=r(172564);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},459189(e,t,r){var n=r(757589),o=r(305522),i=r(351165);e.exports=function(e,t,r,l,c,u){var d=1&r,p=e.length,f=t.length;if(p!=f&&!(d&&f>p))return!1;var _=u.get(e),h=u.get(t);if(_&&h)return _==t&&h==e;var m=-1,g=!0,b=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++m<p;){var y=e[m],v=t[m];if(l)var w=d?l(v,y,m,t,e,u):l(y,v,m,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(b){if(!o(t,function(e,t){if(!i(b,t)&&(y===e||c(y,e,r,l,u)))return b.push(t)})){g=!1;break}}else if(!(y===v||c(y,v,r,l,u))){g=!1;break}}return u.delete(e),u.delete(t),g}},362576(e,t,r){var n=r(824163),o=r(746814),i=r(912406),l=r(459189),c=r(222839),u=r(21061),d=n?n.prototype:void 0,p=d?d.valueOf:void 0;e.exports=function(e,t,r,n,d,f,_){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!f(new o(e),new o(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=c;case"[object Set]":var m=1&n;if(h||(h=u),e.size!=t.size&&!m)break;var g=_.get(e);if(g)return g==t;n|=2,_.set(e,t);var b=l(h(e),h(t),n,d,f,_);return _.delete(e),b;case"[object Symbol]":if(p)return p.call(e)==p.call(t)}return!1}},378715(e,t,r){var n=r(323460),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,l,c){var u=1&r,d=n(e),p=d.length;if(p!=n(t).length&&!u)return!1;for(var f=p;f--;){var _=d[f];if(!(u?_ in t:o.call(t,_)))return!1}var h=c.get(e),m=c.get(t);if(h&&m)return h==t&&m==e;var g=!0;c.set(e,t),c.set(t,e);for(var b=u;++f<p;){var y=e[_=d[f]],v=t[_];if(i)var w=u?i(v,y,_,t,e,c):i(y,v,_,e,t,c);if(!(void 0===w?y===v||l(y,v,r,i,c):w)){g=!1;break}b||(b="constructor"==_)}if(g&&!b){var j=e.constructor,k=t.constructor;j!=k&&"constructor"in e&&"constructor"in t&&!("function"==typeof j&&j instanceof j&&"function"==typeof k&&k instanceof k)&&(g=!1)}return c.delete(e),c.delete(t),g}},150474(e,t,r){e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},323460(e,t,r){var n=r(491601),o=r(446458),i=r(675460);e.exports=function(e){return n(e,i,o)}},580331(e,t,r){var n=r(491601),o=r(414845),i=r(659307);e.exports=function(e){return n(e,i,o)}},256197(e,t,r){var n=r(668904);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},941022(e,t,r){var n=r(222650),o=r(675460);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],l=e[i];t[r]=[i,l,n(l)]}return t}},172564(e,t,r){var n=r(828533),o=r(714030);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},881157(e,t,r){e.exports=r(130981)(Object.getPrototypeOf,Object)},719685(e,t,r){var n=r(824163),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,c=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[c]=r:delete e[c]),o}},446458(e,t,r){var n=r(372148),o=r(56803),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols;e.exports=l?function(e){return null==e?[]:n(l(e=Object(e)),function(t){return i.call(e,t)})}:o},414845(e,t,r){var n=r(909814),o=r(881157),i=r(446458),l=r(56803);e.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:l},372099(e,t,r){var n=r(908365),o=r(361761),i=r(633218),l=r(65943),c=r(846185),u=r(175790),d=r(260051),p="[object Map]",f="[object Promise]",_="[object Set]",h="[object WeakMap]",m="[object DataView]",g=d(n),b=d(o),y=d(i),v=d(l),w=d(c),j=u;(n&&j(new n(new ArrayBuffer(1)))!=m||o&&j(new o)!=p||i&&j(i.resolve())!=f||l&&j(new l)!=_||c&&j(new c)!=h)&&(j=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?d(r):"";if(n)switch(n){case g:return m;case b:return p;case y:return f;case v:return _;case w:return h}return t}),e.exports=j},714030(e){e.exports=function(e,t){return null==e?void 0:e[t]}},334284(e,t,r){var n=r(731767),o=r(9226),i=r(854639),l=r(865083),c=r(999448),u=r(824255);e.exports=function(e,t,r){t=n(t,e);for(var d=-1,p=t.length,f=!1;++d<p;){var _=u(t[d]);if(!(f=null!=e&&r(e,_)))break;e=e[_]}return f||++d!=p?f:!!(p=null==e?0:e.length)&&c(p)&&l(_,p)&&(i(e)||o(e))}},971014(e,t,r){var n=r(92088);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},254640(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},796211(e,t,r){var n=r(92088),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},225215(e,t,r){var n=r(92088),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},607223(e,t,r){var n=r(92088);e.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},375467(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},782957(e,t,r){var n=r(141927),o=r(419871),i=r(961999),l=r(122050),c=r(455399);e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return c(e,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Symbol]":return l(e)}}},223083(e,t,r){var n=r(721070),o=r(881157),i=r(104457);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},865083(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?0x1fffffffffffff:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},794596(e,t,r){var n=r(854639),o=r(162560),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||o(e))||l.test(e)||!i.test(e)||null!=t&&e in Object(t)}},668904(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},948498(e,t,r){var n,o=r(706563),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},104457(e){var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},222650(e,t,r){var n=r(953263);e.exports=function(e){return e==e&&!n(e)}},559080(e){e.exports=function(){this.__data__=[],this.size=0}},583198(e,t,r){var n=r(538691),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},262697(e,t,r){var n=r(538691);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},263589(e,t,r){var n=r(538691);e.exports=function(e){return n(this.__data__,e)>-1}},693869(e,t,r){var n=r(538691);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},759818(e,t,r){var n=r(902079),o=r(650021),i=r(361761);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),str
1ing:new n}}},788364(e,t,r){var n=r(256197);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},53791(e,t,r){var n=r(256197);e.exports=function(e){return n(this,e).get(e)}},227683(e,t,r){var n=r(256197);e.exports=function(e){return n(this,e).has(e)}},945019(e,t,r){var n=r(256197);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=+(r.size!=o),this}},222839(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},768123(e){e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},398526(e,t,r){var n=r(415690);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},92088(e,t,r){e.exports=r(172564)(Object,"create")},543360(e,t,r){e.exports=r(130981)(Object.keys,Object)},103311(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},257847(e,t,r){e=r.nmd(e);var n=r(150474),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,l=i&&i.exports===o&&n.process,c=function(){try{var e=i&&i.require&&i.require("util").types;if(e)return e;return l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=c},3920(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},130981(e){e.exports=function(e,t){return function(r){return e(t(r))}}},880911(e,t,r){var n=r(150474),o="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||o||Function("return this")()},177130(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},78421(e){e.exports=function(e){return this.__data__.has(e)}},21061(e){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},491630(e,t,r){var n=r(650021);e.exports=function(){this.__data__=new n,this.size=0}},165352(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},957707(e){e.exports=function(e){return this.__data__.get(e)}},501543(e){e.exports=function(e){return this.__data__.has(e)}},656015(e,t,r){var n=r(650021),o=r(361761),i=r(244683);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var l=r.__data__;if(!o||l.length<199)return l.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(l)}return r.set(e,t),this.size=r.size,this}},183196(e,t,r){var n=r(398526),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;e.exports=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)}),t})},824255(e,t,r){var n=r(162560),o=1/0;e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},260051(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},605205(e,t,r){var n=r(530309);e.exports=function(e){return n(e,5)}},912406(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},523181(e,t,r){var n=r(922671),o=r(38628);e.exports=function(e,t){return e&&n(e,o(t))}},116354(e,t,r){var n=r(661244);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},718145(e,t,r){var n=r(497767),o=r(334284);e.exports=function(e,t){return null!=e&&o(e,t,n)}},305874(e){e.exports=function(e){return e}},9226(e,t,r){var n=r(358140),o=r(885208),i=Object.prototype,l=i.hasOwnProperty,c=i.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return o(e)&&l.call(e,"callee")&&!c.call(e,"callee")}},854639(e){e.exports=Array.isArray},344664(e,t,r){var n=r(838760),o=r(999448);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},974306(e,t,r){e=r.nmd(e);var n=r(880911),o=r(65553),i=t&&!t.nodeType&&t,l=i&&e&&!e.nodeType&&e,c=l&&l.exports===i?n.Buffer:void 0,u=c?c.isBuffer:void 0;e.exports=u||o},838760(e,t,r){var n=r(175790),o=r(953263);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},999448(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},463816(e,t,r){var n=r(709634),o=r(388079),i=r(257847),l=i&&i.isMap;e.exports=l?o(l):n},953263(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},885208(e){e.exports=function(e){return null!=e&&"object"==typeof e}},899389(e,t,r){var n=r(175790),o=r(881157),i=r(885208),l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,d=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==d}},758034(e,t,r){var n=r(19032),o=r(388079),i=r(257847),l=i&&i.isSet;e.exports=l?o(l):n},186809(e,t,r){var n=r(175790),o=r(854639),i=r(885208);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},162560(e,t,r){var n=r(175790),o=r(885208);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},893873(e,t,r){var n=r(377087),o=r(388079),i=r(257847),l=i&&i.isTypedArray;e.exports=l?o(l):n},675460(e,t,r){var n=r(92949),o=r(766),i=r(344664);e.exports=function(e){return i(e)?n(e):o(e)}},659307(e,t,r){var n=r(92949),o=r(735945),i=r(344664);e.exports=function(e){return i(e)?n(e,!0):o(e)}},693580(e,t,r){var n=r(196170),o=r(513423),i=r(258466),l=r(854639);e.exports=function(e,t){return(l(e)?n:i)(e,o(t,3))}},415690(e,t,r){var n=r(244683);function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],o=memoized.cache;if(o.has(n))return o.get(n);var i=e.apply(this,r);return memoized.cache=o.set(n,i)||o,i};return memoized.cache=new(memoize.Cache||n),memoized}memoize.Cache=n,e.exports=memoize},357361(e,t,r){var n=r(471879),o=r(270841),i=r(794596),l=r(824255);e.exports=function(e){return i(e)?n(l(e)):o(e)}},56803(e){e.exports=function(){return[]}},65553(e){e.exports=function(){return!1}},771568(e,t,r){var n=r(327798);e.exports=function(e){return null==e?"":n(e)}},674051(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(293534),o=r(719956),i=r(958012);let l=(0,n.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:u,iconNode:d,...p},f)=>(0,n.createElement)("svg",{ref:f,...o.A,width:t,height:t,stroke:e,strokeWidth:l?24*Number(r)/Number(t):r,className:(0,i.zP)("lucide",c),...!u&&!(0,i.m$)(p)&&{"aria-hidden":"true"},...p},[...d.map(([e,t])=>(0,n.createElement)(e,t)),...Array.isArray(u)?u:[u]]))},417495(e,t,r){"use strict";r.d(t,{A:()=>createLucideIcon});var n=r(293534),o=r(958012),i=r(674051);let createLucideIcon=(e,t)=>{let r=(0,n.forwardRef)(({className:r,...l},c)=>(0,n.createElement)(i.A,{ref:c,iconNode:t,className:(0,o.zP)(`lucide-${(0,o.fX)((0,o.MX)(e))}`,`lucide-${e}`,r),...l}));return r.displayName=(0,o.MX)(e),r}},719956(e,t,r){"use strict";r.d(t,{A:()=>n});var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}},208374(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(417495).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},72285(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(417495).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},987205(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(417495).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},250456(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(417495).A)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
1],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},972173(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(417495).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},958012(e,t,r){"use strict";r.d(t,{MX:()=>toPascalCase,fX:()=>toKebabCase,m$:()=>hasA11yProp,zP:()=>mergeClasses});let toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),toPascalCase=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},mergeClasses=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),hasA11yProp=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0}},128286(e,t,r){"use strict";r.d(t,{$S:()=>f,D9:()=>g,EM:()=>h,Gg:()=>m,Gi:()=>b,Jc:()=>l,Q_:()=>p,T_:()=>y,U6:()=>j,Vu:()=>o,Xk:()=>w,Zp:()=>i,jr:()=>v,tD:()=>d,wL:()=>_,wv:()=>n,xV:()=>c,z1:()=>u});var n={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a400:"#ff1744",a700:"#d50000"},o={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a400:"#f50057",a700:"#c51162"},i={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a400:"#d500f9",a700:"#aa00ff"},l={50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a400:"#651fff",a700:"#6200ea"},c={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a400:"#3d5afe",a700:"#304ffe"},u={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a400:"#2979ff",a700:"#2962ff"},d={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a400:"#00b0ff",a700:"#0091ea"},p={50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a400:"#00e5ff",a700:"#00b8d4"},f={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a400:"#1de9b6",a700:"#00bfa5"},_={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a400:"#00e676",a700:"#00c853"},h={50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a400:"#76ff03",a700:"#64dd17"},m={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a400:"#c6ff00",a700:"#aeea00"},g={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a400:"#ffea00",a700:"#ffd600"},b={50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a400:"#ffc400",a700:"#ffab00"},y={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a400:"#ff9100",a700:"#ff6d00"},v={50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a400:"#ff3d00",a700:"#dd2c00"}
1,w={50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},j={50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"}},190500(e,t,r){"use strict";var n=r(797265),o=r(106630),i=r(16095),l=r(128811),c=r(512744),u=c(),d=c(!0),p=r(331536),f=r(222790),_=r(9308);function createPanZoom(e,t){var r,c,h,m,g,b,y,v,w,j,k,x=(t=t||{}).controller;if(!x&&(f.canAttach(e)?x=f(e,t):_.canAttach(e)&&(x=_(e,t))),!x)throw Error("Cannot create panzoom for the current type of dom element");var S=x.getOwner(),O={x:0,y:0},P=!1,A=new p;x.initTransform&&x.initTransform(A);var C="function"==typeof t.filterKey?t.filterKey:noop,I="number"==typeof t.pinchSpeed?t.pinchSpeed:1,E=t.bounds,N="number"==typeof t.maxZoom?t.maxZoom:1/0,D="number"==typeof t.minZoom?t.minZoom:0,T="number"==typeof t.boundsPadding?t.boundsPadding:.05,M="number"==typeof t.zoomDoubleClickSpeed?t.zoomDoubleClickSpeed:1.75,R=t.beforeWheel||noop,F=t.beforeMouseDown||noop,L="number"==typeof t.zoomSpeed?t.zoomSpeed:1,B=parseTransformOrigin(t.transformOrigin),z=t.enableTextSelection?d:u;validateBounds(E),t.autocenter&&autocenter();var U=0,H=0,q=0,V=null,G=new Date,K=!1,W=!1;v="smoothScroll"in t&&!t.smoothScroll?rigidScroll():l(getPoint,scroll,t.smoothScroll);var Q=!1;listenForEvents();var J={dispose:dispose,moveBy:internalMoveBy,moveTo:moveTo,smoothMoveTo:smoothMoveTo,centerOn:centerOn,zoomTo:publicZoomTo,zoomAbs:zoomAbs,smoothZoom:smoothZoom,smoothZoomAbs:smoothZoomAbs,showRectangle:showRectangle,pause:pause,resume:resume,isPaused:isPaused,getTransform:getTransformModel,getMinZoom:getMinZoom,setMinZoom:setMinZoom,getMaxZoom:getMaxZoom,setMaxZoom:setMaxZoom,getTransformOrigin:getTransformOrigin,setTransformOrigin:setTransformOrigin,getZoomSpeed:getZoomSpeed,setZoomSpeed:setZoomSpeed};i(J);var Z="number"==typeof t.initialX?t.initialX:A.x,Y="number"==typeof t.initialY?t.initialY:A.y,X="number"==typeof t.initialZoom?t.initialZoom:A.scale;return(Z!=A.x||Y!=A.y||X!=A.scale)&&zoomAbs(Z,Y,X),J;function pause(){releaseEvents(),Q=!0}function resume(){Q&&(listenForEvents(),Q=!1)}function isPaused(){return Q}function showRectangle(e){var t=S.getBoundingClientRect(),r=transformToScreen(t.width,t.height),n=e.right-e.left,o=e.bottom-e.top;if(!Number.isFinite(n)||!Number.isFinite(o))throw Error("Invalid rectangle");var i=Math.min(r.x/n,r.y/o);A.x=-(e.left+n/2)*i+r.x/2,A.y=-(e.top+o/2)*i+r.y/2,A.scale=i}function transformToScreen(e,t){if(x.getScreenCTM){var r=x.getScreenCTM(),n=r.a,o=r.d,i=r.e,l=r.f;O.x=e*n-i,O.y=t*o-l}else O.x=e,O.y=t;return O}function autocenter(){var e,t,r=0,n=0,o=getBoundingBox();if(o)r=o.left,n=o.top,e=o.right-o.left,t=o.bottom-o.top;else{var i=S.getBoundingClientRect();e=i.width,t=i.height}var l=x.getBBox();if(0!==l.width&&0!==l.height){var c=t/l.height,u=Math.min(e/l.width,c);A.x=-(l.left+l.width/2)*u+e/2+r,A.y=-(l.top+l.height/2)*u+t/2+n,A.scale=u}}function getTransformModel(){return A}function getMinZoom(){return D}function setMinZoom(e){D=e}function getMaxZoom(){return N}function setMaxZoom(e){N=e}function getTransformOrigin(){return B}function setTransformOrigin(e){B=parseTransformOrigin(e)}function getZoomSpeed(){return L}function setZoomSpeed(e){if(!Number.isFinite(e))throw Error("Zoom speed should be a number");L=e}function getPoint(){return{x:A.x,y:A.y}}function moveTo(e,t){A.x=e,A.y=t,keepTransformInsideBounds(),triggerEvent("pan"),makeDirty()}function moveBy(e,t){moveTo(A.x+e,A.y+t)}function keepTransformInsideBounds(){var e=getBoundingBox();if(e){var t=!1,r=getClientRect(),n=e.left-r.right;return n>0&&(A.x+=n,t=!0),(n=e.right-r.left)<0&&(A.x+=n,t=!0),(n=e.top-r.bottom)>0&&(A.y+=n,t=!0),(n=e.bottom-r.top)<0&&(A.y+=n,t=!0),t}}function getBoundingBox(){if(E){if("boolean"==typeof E){var e=S.getBoundingClientRect(),t=e.width,r=e.height;return{left:t*T,top:r*T,right:t*(1-T),bottom:r*(1-T)}}return E}}function getClientRect(){var e=x.getBBox(),t=client(e.left,e.top);return{left:t.x,top:t.y,right:e.width*A.scale+t.x,bottom:e.height*A.scale+t.y}}function client(e,t){return{x:e*A.scale+A.x,y:t*A.scale+A.y}}function makeDirty(){P=!0,r=window.requestAnimationFrame(frame)}function zoomByRatio(e,t,r){if(isNaN(e)||isNaN(t)||isNaN(r))throw Error("zoom requires valid numbers");var n=A.scale*r;if(n<D){if(A.scale===D)return;r=D/A.scale}if(n>N){if(A.scale===N)return;r=N/A.scale}var o=transformToScreen(e,t);A.x=o.x-r*(o.x-A.x),A.y=o.y-r*(o.y-A.y),E&&1===T&&1===D?(A.scale*=r,keepTransformInsideBounds()):keepTransformInsideBounds()||(A.scale*=r),triggerEvent("zoom"),makeDirty()}function zoomAbs(e,t,r){zoomByRatio(e,t,r/A.scale)}function centerOn(e){var t=e.ownerSVGElement;if(!t)throw Error("ui element is required to be within the scene");
1var r=e.getBoundingClientRect(),n=r.left+r.width/2,o=r.top+r.height/2,i=t.getBoundingClientRect();internalMoveBy(i.width/2-n,i.height/2-o,!0)}function smoothMoveTo(e,t){internalMoveBy(e-A.x,t-A.y,!0)}function internalMoveBy(e,t,r){if(!r)return moveBy(e,t);w&&w.cancel();var n=0,i=0;w=o({x:0,y:0},{x:e,y:t},{step:function(e){moveBy(e.x-n,e.y-i),n=e.x,i=e.y}})}function scroll(e,t){cancelZoomAnimation(),moveTo(e,t)}function dispose(){releaseEvents()}function listenForEvents(){S.addEventListener("mousedown",onMouseDown,{passive:!1}),S.addEventListener("dblclick",onDoubleClick,{passive:!1}),S.addEventListener("touchstart",onTouch,{passive:!1}),S.addEventListener("keydown",onKeyDown,{passive:!1}),n.addWheelListener(S,onMouseWheel,{passive:!1}),makeDirty()}function releaseEvents(){n.removeWheelListener(S,onMouseWheel),S.removeEventListener("mousedown",onMouseDown),S.removeEventListener("keydown",onKeyDown),S.removeEventListener("dblclick",onDoubleClick),S.removeEventListener("touchstart",onTouch),r&&(window.cancelAnimationFrame(r),r=0),v.cancel(),releaseDocumentMouse(),releaseTouches(),z.release(),triggerPanEnd()}function frame(){P&&applyTransform()}function applyTransform(){P=!1,x.applyTransform(A),triggerEvent("transform"),r=0}function onKeyDown(e){var t=0,r=0,n=0;if(38===e.keyCode?r=1:40===e.keyCode?r=-1:37===e.keyCode?t=1:39===e.keyCode?t=-1:189===e.keyCode||109===e.keyCode?n=1:(187===e.keyCode||107===e.keyCode)&&(n=-1),!C(e,t,r,n)){if(t||r){e.preventDefault(),e.stopPropagation();var o=S.getBoundingClientRect(),i=Math.min(o.width,o.height);internalMoveBy(.05*i*t,.05*i*r)}if(n){var l=getScaleMultiplier(100*n),i=B?getTransformOriginOffset():midPoint();publicZoomTo(i.x,i.y,l)}}}function midPoint(){var e=S.getBoundingClientRect();return{x:e.width/2,y:e.height/2}}function onTouch(e){if(beforeTouch(e),clearPendingClickEventTimeout(),1===e.touches.length)return handleSingleFingerTouch(e,e.touches[0]);2===e.touches.length&&(y=getPinchZoomLength(e.touches[0],e.touches[1]),k=!0,startTouchListenerIfNeeded())}function beforeTouch(e){(!t.onTouch||t.onTouch(e))&&(e.stopPropagation(),e.preventDefault())}function beforeDoubleClick(e){clearPendingClickEventTimeout(),(!t.onDoubleClick||t.onDoubleClick(e))&&(e.preventDefault(),e.stopPropagation())}function handleSingleFingerTouch(e){H=new Date;var t=getOffsetXY(e.touches[0]);c=t;var r=transformToScreen(t.x,t.y);h=r.x,m=r.y,g=h,b=m,v.cancel(),startTouchListenerIfNeeded()}function startTouchListenerIfNeeded(){K||(K=!0,document.addEventListener("touchmove",handleTouchMove),document.addEventListener("touchend",handleTouchEnd),document.addEventListener("touchcancel",handleTouchEnd))}function handleTouchMove(e){if(1===e.touches.length){e.stopPropagation();var t=getOffsetXY(e.touches[0]),r=transformToScreen(t.x,t.y),n=r.x-h,o=r.y-m;0!==n&&0!==o&&triggerPanStart(),h=r.x,m=r.y,internalMoveBy(n,o)}else if(2===e.touches.length){k=!0;var i=e.touches[0],l=e.touches[1],c=getPinchZoomLength(i,l),u=1+(c/y-1)*I,d=getOffsetXY(i),p=getOffsetXY(l);if(h=(d.x+p.x)/2,m=(d.y+p.y)/2,B){var t=getTransformOriginOffset();h=t.x,m=t.y}publicZoomTo(h,m,u),y=c,e.stopPropagation(),e.preventDefault()}}function clearPendingClickEventTimeout(){q&&(clearTimeout(q),q=0)}function handlePotentialClickEvent(e){if(t.onClick){clearPendingClickEventTimeout();var r=h-g,n=m-b;Math.sqrt(r*r+n*n)>5||(q=setTimeout(function(){q=0,t.onClick(e)},300))}}function handleTouchEnd(e){if(clearPendingClickEventTimeout(),e.touches.length>0){var t=getOffsetXY(e.touches[0]),r=transformToScreen(t.x,t.y);h=r.x,m=r.y}else{var n=new Date;if(n-U<300)if(B){var t=getTransformOriginOffset();smoothZoom(t.x,t.y,M)}else smoothZoom(c.x,c.y,M);else n-H<200&&handlePotentialClickEvent(e);U=n,triggerPanEnd(),releaseTouches()}}function getPinchZoomLength(e,t){var r=e.clientX-t.clientX,n=e.clientY-t.clientY;return Math.sqrt(r*r+n*n)}function onDoubleClick(e){beforeDoubleClick(e);var t=getOffsetXY(e);B&&(t=getTransformOriginOffset()),smoothZoom(t.x,t.y,M)}function onMouseDown(e){if(clearPendingClickEventTimeout(),!F(e)){if(V=e,G=new Date,K)return e.stopPropagation(),!1;if(1===e.button&&null!==window.event||0===e.button){v.cancel();var t=getOffsetXY(e),r=transformToScreen(t.x,t.y);return g=h=r.x,b=m=r.y,document.addEventListener("mousemove",onMouseMove),document.addEventListener("mouseup",onMouseUp),z.capture(e.target||e.srcElement),!1}}}function onMouseMove(e){if(!K){triggerPanStart();var t=getOffsetXY(e),r=transformToScreen(t.x,t.y),n=r.x-h,o=r.y-m;h=r.x,m=r.y,internalMoveBy(n,o)}}function onMouseUp(){new Date-G<200&&handlePotentialClickEvent(V),z.release(),triggerPanEnd(),releaseDocumentMouse()}function releaseDocumentMouse(){document.removeEventListener("mousemove",onMouseMove),document.removeEventListener("mouseup",onMouseUp),W=!1}function releaseTouches(){document.removeEventListener("touchmove",handleTouchMove),document.removeEventListener("touchend",handleTouchEnd),document.removeEventListener("touchcancel",handleTouchEnd),W=!1,k=!1,K=!1}function onMouseWheel(e){if(!R(e)){v.cancel();var t=e.deltaY;e.deltaMode>0&&(t*=100);var r=getScaleMultiplier(t);if(1!==r){var n=B?getTransformOriginOffset():getOffsetXY(e);publicZoomTo(n.x,n.y,r),e.preventDefault()}}}function getOffsetXY(e){var t=S.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}function smoothZoom(e,t,r){var n=A.scale;v.cancel(),cancelZoomAnimation(),j=o({scale:n},{scale:r*n},{step:function(r){zoomAbs(e,t,r.scale)},done:triggerZoomEnd})}function smoothZoomAbs(e,t,r){var n=A.scale;v.cancel(),cancelZoomAnimation(),j=o({scale:n},{scale:r},{step:function(r){zoomAbs(e,t,r.scale)}})}function getTransformOriginOffset(){var e=S.getBoundingClientRect();return{x:e.width*B.x,y:e.height*B.y}}function publicZoomTo(e,t,r){return v.cancel(),cancelZoomAnimation(),zoomByRatio(e,t,r)}function cancelZoomAnimation(){j&&(j.cancel(),j=null)}function getScaleMultiplier(e){return 1-Math.sign(e)*Math.min(.25,Math.abs(L*e/128))}function triggerPanStart(){W||(triggerEvent("panstart"),W=!0,v.start())}function triggerPanEnd(){W&&(k||v.stop(),triggerEvent("panend"))}function triggerZoomEnd(){triggerEvent("zoomend")}function triggerEvent(e){J.fire(e,J)}}function parseTransformOrigin(e){if(e){if("object"==typeof e)return isNumber(e.x)&&isNumber(e.y)||failTransformOrigin(e),e;failTransformOrigin()}}function failTransformOrigin(e){throw console.error(e),Error('Cannot parse transform origin.\nSome good examples:\n  "center center" can be achieved with {x: 0.5, y: 0.5}\n  "top center" can be achieved with {x: 0.5, y: 0}\n  "bottom right" can be achieved with {x: 1, y: 1}')}function noop(){}function validateBounds(e){var t=typeof e;if("undefined"!==t&&"boolean"!==t&&!(isNumber(e.left)&&isNumber(e.top)&&isNumber(e.bottom)&&isNumber(e.right)))throw Error("Bounds object is not val
1id. It can be: undefined, boolean (true|false) or an object {left, top, right, bottom}")}function isNumber(e){return Number.isFinite(e)}function isNaN(e){return Number.isNaN?Number.isNaN(e):e!=e}function rigidScroll(){return{start:noop,stop:noop,cancel:noop}}e.exports=createPanZoom,function(){if("u"<typeof document)return;var e,t=document.getElementsByTagName("script");if(t){for(var r=0;r<t.length;++r){var n=t[r];if(n.src&&n.src.match(/\bpanzoom(\.min)?\.js/)){e=n;break}}if(e){var o=e.getAttribute("query");if(o){var i=e.getAttribute("name")||"pz",l=Date.now();tryAttach()}}}function tryAttach(){var t=document.querySelector(o);if(!t)return Date.now()-l<2e3?void setTimeout(tryAttach,100):void console.error("Cannot find the panzoom element",i);var r=collectOptions(e);window[i]=createPanZoom(t,r)}function collectOptions(e){for(var t=e.attributes,r={},n=0;n<t.length;++n){var o=getPanzoomAttributeNameValue(t[n]);o&&(r[o.name]=o.value)}return r}function getPanzoomAttributeNameValue(e){if(e.name&&"p"===e.name[0]&&"z"===e.name[1]&&"-"===e.name[2])return{name:e.name.substr(3),value:JSON.parse(e.value)}}}()},512744(e){function disabled(e){return e.stopPropagation(),!1}function noop(){}e.exports=function createTextSelectionInterceptor(e){if(e)return{capture:noop,release:noop};var t,r,n,o=!1;return{capture:capture,release:release};function capture(e){o=!0,r=window.document.onselectstart,n=window.document.ondragstart,window.document.onselectstart=disabled,(t=e).ondragstart=disabled}function release(){o&&(o=!1,window.document.onselectstart=r,t&&(t.ondragstart=n))}}},9308(e){function isDomElement(e){return e&&e.parentElement&&e.style}e.exports=function makeDomController(e,t){if(!isDomElement(e))throw Error("panzoom requires DOM element to be attached to the DOM tree");var r=e.parentElement;return e.scrollTop=0,t.disableKeyboardInteraction||r.setAttribute("tabindex",0),{getBBox:getBBox,getOwner:getOwner,applyTransform:applyTransform};function getOwner(){return r}function getBBox(){return{left:0,top:0,width:e.clientWidth,height:e.clientHeight}}function applyTransform(t){e.style.transformOrigin="0 0 0",e.style.transform="matrix("+t.scale+", 0, 0, "+t.scale+", "+t.x+", "+t.y+")"}},e.exports.canAttach=isDomElement},128811(e){function getCancelAnimationFrame(){return"function"==typeof cancelAnimationFrame?cancelAnimationFrame:clearTimeout}function getRequestAnimationFrame(){return"function"==typeof requestAnimationFrame?requestAnimationFrame:function(e){return setTimeout(e,16)}}e.exports=function kinetic(e,t,r){"object"!=typeof r&&(r={});var n,o,i,l,c,u,d,p,f,_,h="number"==typeof r.minVelocity?r.minVelocity:5,m="number"==typeof r.amplitude?r.amplitude:.25,g="function"==typeof r.cancelAnimationFrame?r.cancelAnimationFrame:getCancelAnimationFrame(),b="function"==typeof r.requestAnimationFrame?r.requestAnimationFrame:getRequestAnimationFrame();return{start:start,stop:stop,cancel:dispose};function dispose(){g(i),g(_)}function start(){n=e(),u=f=l=d=0,o=new Date,g(i),g(_),i=b(track)}function track(){var t=Date.now(),r=t-o;o=t;var c=e(),u=c.x-n.x,p=c.y-n.y;n=c;var f=1e3/(1+r);l=.8*u*f+.2*l,d=.8*p*f+.2*d,i=b(track)}function stop(){g(i),g(_);var t=e();c=t.x,p=t.y,o=Date.now(),(l<-h||l>h)&&(c+=u=m*l),(d<-h||d>h)&&(p+=f=m*d),_=b(autoScroll)}function autoScroll(){var e=Date.now()-o,r=!1,n=0,i=0;u&&((n=-u*Math.exp(-e/342))>.5||n<-.5?r=!0:n=u=0),f&&((i=-f*Math.exp(-e/342))>.5||i<-.5?r=!0:i=f=0),r&&(t(c+n,p+i),_=b(autoScroll))}}},222790(e){function isSVGElement(e){return e&&e.ownerSVGElement&&e.getCTM}e.exports=function makeSvgController(e,t){if(!isSVGElement(e))throw Error("svg element is required for svg.panzoom to work");var r=e.ownerSVGElement;if(!r)throw Error("Do not apply panzoom to the root <svg> element. Use its child instead (e.g. <g></g>). As of March 2016 only FireFox supported transform on the root element");return t.disableKeyboardInteraction||r.setAttribute("tabindex",0),{getBBox:getBBox,getScreenCTM:getScreenCTM,getOwner:getOwner,applyTransform:applyTransform,initTransform:initTransform};function getOwner(){return r}function getBBox(){var t=e.getBBox();return{left:t.x,top:t.y,width:t.width,height:t.height}}function getScreenCTM(){var e=r.getCTM();return e||r.getScreenCTM()}function initTransform(t){var n=e.getCTM();null===n&&(n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix()),t.x=n.e,t.y=n.f,t.scale=n.a,r.removeAttributeNS(null,"viewBox")}function applyTransform(t){e.setAttribute("transform","matrix("+t.scale+" 0 0 "+t.scale+" "+t.x+" "+t.y+")")}},e.exports.canAttach=isSVGElement},331536(e){e.exports=Transform;function Transform(){this.x=0,this.y=0,this.scale=1}},177445(e,t,r){"use strict";var n=r(855382);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,r,o,i,l){if(l!==n){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol
1:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},81577(e,t,r){e.exports=r(177445)()},855382(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},57540(e,t,r){"use strict";var n=r(293534),o=r(94306),i=r(584857),l=r(45507),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},AlphaPicker=function(e){var t=e.rgb,r=e.hsl,l=e.width,u=e.height,d=e.onChange,p=e.direction,f=e.style,_=e.renderers,h=e.pointer,m=e.className,g=(0,o.default)({default:{picker:{position:"relative",width:l,height:u},alpha:{radius:"2px",style:f}}});return n.createElement("div",{style:g.picker,className:"alpha-picker "+(void 0===m?"":m)},n.createElement(i.ry,c({},g.alpha,{rgb:t,hsl:r,pointer:h,renderers:_,onChange:d,direction:p})))};AlphaPicker.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:l.A},(0,i.Q$)(AlphaPicker)},45507(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.direction,r=(0,o.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n.createElement("div",{style:r.picker})}},33756(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(347651),d=r(584857),p=r(47284),Block=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.hex,i=e.colors,f=e.width,_=e.triangle,h=e.styles,m=e.className,g="transparent"===o,handleChange=function(e,r){u.qt(e)&&t({hex:e,source:"hex"},r)},b=(0,l.default)((0,c.A)({default:{card:{width:f,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:o,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:u.OB(o),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+o+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},void 0===h?{}:h),{"hide-triangle":"hide"===_});return n.createElement("div",{style:b.card,className:"block-picker "+(void 0===m?"":m)},n.createElement("div",{style:b.triangle}),n.createElement("div",{style:b.head},g&&n.createElement(d.xu,{borderRadius:"6px 6px 0 0"}),n.createElement("div",{style:b.label},o)),n.createElement("div",{style:b.body},n.createElement(p.A,{colors:i,onClick:handleChange,onSwatchHover:r}),n.createElement(d.jc,{style:{input:b.input},value:o,onChange:handleChange})))};Block.propTypes={width:i().oneOfType([i().string,i().number]),colors:i().arrayOf(i().string),triangle:i().oneOf(["top","hide"]),styles:i().object},Block.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},(0,d.Q$)(Block)},47284(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(222781),l=r(584857);let __rspack_default_export=function(e){var t=e.colors,r=e.onClick,c=e.onSwatchHover,u=(0,o.default)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return n.createElement("div",{style:u.swatches},(0,i.A)(t,function(e){return n.createElement(l.rp,{key:e,color:e,style:u.swatch,onClick:r,onHover:c,focusStyle:{boxShadow:"0 0 4px "+e}})}),n.createElement("div",{style:u.clear}))}},828746(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(577383),p=r(556017),f=r(583849),Chrome=function(e){var t=e.width,r=e.onChange,o=e.disableAlpha,i=e.rgb,_=e.hsl,h=e.hsv,m=e.hex,g=e.renderers,b=e.styles,y=e.className,v=e.defaultView,w=(0,l.default)((0,c.A)({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"}
1,Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},void 0===b?{}:b),{disableAlpha:o});return n.createElement("div",{style:w.picker,className:"chrome-picker "+(void 0===y?"":y)},n.createElement("div",{style:w.saturation},n.createElement(u.VI,{style:w.Saturation,hsl:_,hsv:h,pointer:f.A,onChange:r})),n.createElement("div",{style:w.body},n.createElement("div",{style:w.controls,className:"flexbox-fix"},n.createElement("div",{style:w.color},n.createElement("div",{style:w.swatch},n.createElement("div",{style:w.active}),n.createElement(u.xu,{renderers:g}))),n.createElement("div",{style:w.toggles},n.createElement("div",{style:w.hue},n.createElement(u.RG,{style:w.Hue,hsl:_,pointer:p.A,onChange:r})),n.createElement("div",{style:w.alpha},n.createElement(u.ry,{style:w.Alpha,rgb:i,hsl:_,pointer:p.A,renderers:g,onChange:r})))),n.createElement(d.A,{rgb:i,hsl:_,hex:m,view:v,onChange:r,disableAlpha:o})))};Chrome.propTypes={width:i().oneOfType([i().string,i().number]),disableAlpha:i().bool,styles:i().object,defaultView:i().oneOf(["hex","rgb","hsl"])},Chrome.defaultProps={width:225,disableAlpha:!1,styles:{}};let _=(0,u.Q$)(Chrome)},577383(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(293534),o=r(94306),i=r(347651),l=r(582847),c=r(584857),u=r(372322),d=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=function(e){function ChromeFields(e){_classCallCheck(this,ChromeFields);var t=_possibleConstructorReturn(this,(ChromeFields.__proto__||Object.getPrototypeOf(ChromeFields)).call(this));return t.toggleViews=function(){"hex"===t.state.view?t.setState({view:"rgb"}):"rgb"===t.state.view?t.setState({view:"hsl"}):"hsl"===t.state.view&&(1===t.props.hsl.a?t.setState({view:"hex"}):t.setState({view:"rgb"}))},t.handleChange=function(e,r){e.hex?i.qt(e.hex)&&t.props.onChange({hex:e.hex,source:"hex"},r):e.r||e.g||e.b?t.props.onChange({r:e.r||t.props.rgb.r,g:e.g||t.props.rgb.g,b:e.b||t.props.rgb.b,source:"rgb"},r):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),t.props.onChange({h:t.props.hsl.h,s:t.props.hsl.s,l:t.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},r)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),t.props.onChange({h:e.h||t.props.hsl.h,s:Number((0,l.A)(e.s)?t.props.hsl.s:e.s),l:Number((0,l.A)(e.l)?t.props.hsl.l:e.l),source:"hsl"},r))},t.showHighlight=function(e){e.currentTarget.style.background="#eee"},t.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?t.state={view:"rgb"}:t.state={view:e.view},t}return _inherits(ChromeFields,e),d(ChromeFields,[{key:"render",value:function(){var e=this,t=(0,o.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),r=void 0;return"hex"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}
1))):"rgb"===this.state.view?r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(r=n.createElement("div",{style:t.fields,className:"flexbox-fix"},n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.field},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),n.createElement("div",{style:t.alpha},n.createElement(c.jc,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),n.createElement("div",{style:t.wrap,className:"flexbox-fix"},r,n.createElement("div",{style:t.toggle},n.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},n.createElement(u.default,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),ChromeFields}(n.Component);p.defaultProps={view:"hex"};let f=p},556017(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n.createElement("div",{style:e.picker})}},583849(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n.createElement("div",{style:e.picker})}},698470(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(222781),u=r(888543),d=r(128286),p=r(584857),f=r(85346),Circle=function(e){var t=e.width,r=e.onChange,o=e.onSwatchHover,i=e.colors,d=e.hex,p=e.circleSize,_=e.styles,h=e.circleSpacing,m=e.className,g=(0,l.default)((0,u.A)({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-h,marginBottom:-h}}},void 0===_?{}:_)),handleChange=function(e,t){return r({hex:e,source:"hex"},t)};return n.createElement("div",{style:g.card,className:"circle-picker "+(void 0===m?"":m)},(0,c.A)(i,function(e){return n.createElement(f.A,{key:e,color:e,onClick:handleChange,onSwatchHover:o,active:d===e.toLowerCase(),circleSize:p,circleSpacing:h})}))};Circle.propTypes={width:i().oneOfType([i().string,i().number]),circleSize:i().number,circleSpacing:i().number,styles:i().object},Circle.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[d.wv["500"],d.Vu["500"],d.Zp["500"],d.Jc["500"],d.xV["500"],d.z1["500"],d.tD["500"],d.Q_["500"],d.$S["500"],d.wL["500"],d.EM["500"],d.Gg["500"],d.D9["500"],d.Gi["500"],d.T_["500"],d.jr["500"],d.Xk["500"],d.U6["500"]],styles:{}},(0,p.Q$)(Circle)},85346(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(293534),o=r(94306),i=r(584857),CircleSwatch=function(e){var t=e.color,r=e.onClick,l=e.onSwatchHover,c=e.hover,u=e.active,d=e.circleSize,p=e.circleSpacing,f=(0,o.default)({default:{swatch:{width:d,height:d,marginRight:p,marginBottom:p,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(d/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:c,active:u});return n.createElement("div",{style:f.swatch},n.createElement(i.rp,{style:f.Swatch,color:t,onClick:r,onHover:l,focusStyle:{boxShadow:f.Swatch.boxSh
1adow+", 0 0 5px "+t}}))};CircleSwatch.defaultProps={circleSize:28,circleSpacing:14};let l=(0,o.handleHover)(CircleSwatch)},629141(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(293534),o=r(94306),i=r(900540),l=r(806197),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}let d=function(e){function Alpha(){_classCallCheck(this,Alpha);for(var e,t,r,n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];return t=r=_possibleConstructorReturn(this,(e=Alpha.__proto__||Object.getPrototypeOf(Alpha)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=i.Z(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},_possibleConstructorReturn(r,t)}return _inherits(Alpha,e),u(Alpha,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,r=(0,o.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n           rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:c({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return n.createElement("div",{style:r.alpha},n.createElement("div",{style:r.checkboard},n.createElement(l.A,{renderers:this.props.renderers})),n.createElement("div",{style:r.gradient}),n.createElement("div",{style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("div",{style:r.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:r.slider}))))}}]),Alpha}(n.PureComponent||n.Component)},806197(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(293534),o=r(94306),i=r(474850),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Checkboard=function(e){var t=e.white,r=e.grey,c=e.size,u=e.renderers,d=e.borderRadius,p=e.boxShadow,f=e.children,_=(0,o.default)({default:{grid:{borderRadius:d,boxShadow:p,absolute:"0px 0px 0px 0px",background:"url("+i.J(t,r,c,u.canvas)+") center left"}}});return(0,n.isValidElement)(f)?n.cloneElement(f,l({},f.props,{style:l({},f.props.style,_.grid)})):n.createElement("div",{style:_.grid})};Checkboard.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};let c=Checkboard},934166(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(608324),i=r(347651),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}let __rspack_default_export=function(e){var t=function(t){function ColorPicker(e){_classCallCheck(this,ColorPicker);var t=_possibleConstructorReturn(this,(ColorPicker.__proto__||Object.getPrototypeOf(ColorPicker)).call(this));return t.handleChange=function(e,r){if(i.v5(e)){var n=i.xU(e,e.h||t.state.oldHue);t.setState(n),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,n,r),t.props.onChange&&t.props.onChange(n,r)}},t.handleSwatchHover=function(e,r){if(i.v5(e)){var n=i.xU(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(n,r)}},t.state=l({},i.xU(e.color,0)),t.debounce=(0,o.A)(function(e,t,r){e(t,r)},100),t}return _inherits(ColorPicker,t),c(ColorPicker,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),n.createElement(e,l({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return l({},i.xU(e.color,t.oldHue))}}]),ColorPicker}(n.PureComponent||n.Component);return t.propTypes=l({},e.propTypes),t.defaultProps=l({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t}},297137(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(293534),o=r(94306),i=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=[38,40],c=1;let u=function(e){function EditableInput(e){_classCallCheck(this,EditableInput);var t=_possibleConstructorReturn(this,(EditableInput.__proto__||Object.getPrototypeOf(EditableInput)).call(this));return t.handleBlur=function(){t.state.blurValue&&t.setState({value:t.state.blurValue,blurValue:null})},t.handleChange=function(e){t.setUpdatedValue(e.target.value,e)},t.handleKeyDown=function(e){var r,n=Number(String(e.target.value).replace(/%/g,""));if(!isNaN(n)&&(r=e.keyCode,l.indexOf(r)>-1)){var o=t.getArrowOffset(),i=38===e.keyCode?n+o:n-o;t.setUpdatedValue(i,e)}},t.handleDrag=function(e){if(t.props.dragLabel){var r=Math.round(t.props.value+e.movementX);r>=0&&r<=t.props.dragMax&&t.props.onChange&&t.props.onChange(t.getValueObjectWithLabel(r),e)}},t.handleMouseDown=function(e){t.props.dragLabel&&(e.preventDefault(),t.handleDrag(e),window.addEventListener("mousemove",t.handleDrag),window.addEventListener("mouseup",t.handleMouseUp))},t.handleMouseUp=function(){t.unbindEventListeners()},t.unbindEventListeners=function(){window.removeEventListener("mousemove",t.handleDrag),window.removeEventListener("mouseup",t.handleMouseUp)},t.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},t.inputId="rc-editable-input-"+c++,t}
1return _inherits(EditableInput,e),i(EditableInput,[{key:"componentDidUpdate",value:function(e,t){this.props.value!==this.state.value&&(e.value!==this.props.value||t.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return _defineProperty({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,o.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return n.createElement("div",{style:t.wrap},n.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?n.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),EditableInput}(n.PureComponent||n.Component)},107091(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(293534),o=r(94306),i=r(444750),l=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}let c=function(e){function Hue(){_classCallCheck(this,Hue);for(var e,t,r,n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];return t=r=_possibleConstructorReturn(this,(e=Hue.__proto__||Object.getPrototypeOf(Hue)).call.apply(e,[this].concat(o))),r.handleChange=function(e){var t=i.Z(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},_possibleConstructorReturn(r,t)}return _inherits(Hue,e),l(Hue,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,r=void 0===t?"horizontal":t,i=(0,o.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(100*this.props.hsl.h/360)+100+"%"}}},{vertical:"vertical"===r});return n.createElement("div",{style:i.hue},n.createElement("div",{className:"hue-"+r,style:i.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n            .hue-horizontal {\n              background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n                33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n                17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n\n            .hue-vertical {\n              background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n                #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n              background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n                #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n            }\n          "),n.createElement("div",{style:i.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:i.slider}))))}}]),Hue}(n.PureComponent||n.Component)},392809(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),Raised=function(e){var t=e.zDepth,r=e.radiu
1s,o=e.background,i=e.children,u=e.styles,d=(0,l.default)((0,c.A)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:r,background:o}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},void 0===u?{}:u),{"zDepth-1":1===t});return n.createElement("div",{style:d.wrap},n.createElement("div",{style:d.bg}),n.createElement("div",{style:d.content},i))};Raised.propTypes={background:i().string,zDepth:i().oneOf([0,1,2,3,4,5]),radius:i().number,styles:i().object},Raised.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};let u=Raised},626621(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(293534),o=r(94306),i=r(148455),l=r(956190),c=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}let u=function(e){function Saturation(e){_classCallCheck(this,Saturation);var t=_possibleConstructorReturn(this,(Saturation.__proto__||Object.getPrototypeOf(Saturation)).call(this,e));return t.handleChange=function(e){"function"==typeof t.props.onChange&&t.throttle(t.props.onChange,l.Z(e,t.props.hsl,t.container),e)},t.handleMouseDown=function(e){t.handleChange(e);var r=t.getContainerRenderWindow();r.addEventListener("mousemove",t.handleChange),r.addEventListener("mouseup",t.handleMouseUp)},t.handleMouseUp=function(){t.unbindEventListeners()},t.throttle=(0,i.A)(function(e,t,r){e(t,r)},50),t}return _inherits(Saturation,e),c(Saturation,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,i=t.white,l=t.black,c=t.pointer,u=t.circle,d=(0,o.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-(100*this.props.hsv.v)+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n            0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:i,black:l,pointer:c,circle:u}},{custom:!!this.props.style});return n.createElement("div",{style:d.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.createElement("style",null,"\n          .saturation-white {\n            background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n            background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n          }\n          .saturation-black {\n            background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n            background: linear-gradient(to top, #000, rgba(0,0,0,0));\n          }\n        "),n.createElement("div",{style:d.white,className:"saturation-white"},n.createElement("div",{style:d.black,className:"saturation-black"}),n.createElement("div",{style:d.pointer},this.props.pointer?n.createElement(this.props.pointer,this.props):n.createElement("div",{style:d.circle}))))}}]),Saturation}(n.PureComponent||n.Component)},855197(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(293534),o=r(94306),i=r(69404),l=r(806197),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};let u=(0,i.l)(function(e){var t=e.color,r=e.style,i=e.onClick,u=void 0===i?function(){}:i,d=e.onHover,p=e.title,f=void 0===p?t:p,_=e.children,h=e.focus,m=e.focusStyle,g="transparent"===t,b=(0,o.default)({default:{swatch:c({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,h?void 0===m?{}:m:{})}}),y={};return d&&(y.onMouseOver=function(e){return d(t,e)}),n.createElement("div",c({style:b.swatch,onClick:function(e){return u(t,e)},title:f,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&u(t,e)}},y),_,g&&n.createElement(l.A,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))})},584857(e,t,r){"use strict";r.d(t,{H1:()=>c.A,Q$:()=>d.A,RG:()=>l.A,VI:()=>u.A,jc:()=>i.A,rp:()=>p.A,ry:()=>n.A,xu:()=>o.A});var n=r(629141),o=r(806197),i=r(297137),l=r(107091),c=r(392809),u=r(626621),d=r(934166),p=r(855197)},17304(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(222781),u=r(888543),d=r(347651),p=r(584857),f=r(209461),_=r(654461),Compact=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.colors,i=e.hex,h=e.rgb,m=e.styles,g=void 0===m?{}:m,b=e.className,y=(0,l.default)((0,u.A)({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},g)),handleChange=function(e,r){e.hex?d.qt(e.hex)&&t({hex:e.hex,source:"hex"},r):t(e,r)};return n.createElement(p.H1,{style:y.Compact,styles:g},n.createElement("div",{style:y.compact,className:"compact-picker "+(void 0===b?"":b)},n.createElement("div",null,(0,c.A)(o,function(e){return n.createElement(f.A,{key:e,color:e,active:e.toLowerCase()===i,onClick:handleChange,onSwatchHover:r})}),n.createElement("div",{style:y.clear})),n.createElement(_.A,{hex:i,rgb:h,onChange:handleChange})))};Compact.propTypes={colors:i().arrayOf(i().string),styles:i().object},Compact.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},(0,p.Q$)(Compact)},209461(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(347651),l=r(584857);let __rspack_default_export=function(e){var t=e.color,r=e.onClick,c=e.onSwatchHover,u=e.active,d=(0,o.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:i.OB(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:u,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.createElement(l.rp,{style:d.color,color:t,onClick:void 0===r?function(){}:r,onHover:c,focusStyle:{boxShadow:"0 0 4px "+t}},n.createElement("div",{style:d.dot}))}},654461(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(584857);let __rspack_default_export=function(e){var t=e.hex,r=e.rgb,l=e.onChange,c=(0,o.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),handleChange=function(e,t){e.r||e.g||e.b?l({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},t):l({hex:e.hex,source:"hex"},t)};return n.createElement("div",{style:c.fields,className:"flexbox-fix"},n.createElement("div",{style:c.active}
1),n.createElement(i.jc,{style:{wrap:c.HEXwrap,input:c.HEXinput,label:c.HEXlabel},label:"hex",value:t,onChange:handleChange}),n.createElement(i.jc,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"r",value:r.r,onChange:handleChange}),n.createElement(i.jc,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"g",value:r.g,onChange:handleChange}),n.createElement(i.jc,{style:{wrap:c.RGBwrap,input:c.RGBinput,label:c.RGBlabel},label:"b",value:r.b,onChange:handleChange}))}},154940(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(222781),u=r(888543),d=r(584857),p=r(677988),Github=function(e){var t=e.width,r=e.colors,o=e.onChange,i=e.onSwatchHover,d=e.triangle,f=e.styles,_=e.className,h=(0,l.default)((0,u.A)({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},void 0===f?{}:f),{"hide-triangle":"hide"===d,"top-left-triangle":"top-left"===d,"top-right-triangle":"top-right"===d,"bottom-left-triangle":"bottom-left"===d,"bottom-right-triangle":"bottom-right"===d}),handleChange=function(e,t){return o({hex:e,source:"hex"},t)};return n.createElement("div",{style:h.card,className:"github-picker "+(void 0===_?"":_)},n.createElement("div",{style:h.triangleShadow}),n.createElement("div",{style:h.triangle}),(0,c.A)(r,function(e){return n.createElement(p.A,{color:e,key:e,onClick:handleChange,onSwatchHover:i})}))};Github.propTypes={width:i().oneOfType([i().string,i().number]),colors:i().arrayOf(i().string),triangle:i().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:i().object},Github.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},(0,d.Q$)(Github)},677988(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(293534),o=r(94306),i=r(584857);let l=(0,o.handleHover)(function(e){var t=e.hover,r=e.color,l=e.onClick,c=e.onSwatchHover,u={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},d=(0,o.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:u}},{hover:t});return n.createElement("div",{style:d.swatch},n.createElement(i.rp,{color:r,onClick:l,onHover:c,focusStyle:u}))})},731532(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(885159),p=r(784139),f=r(752097),Google=function(e){var t=e.width,r=e.onChange,o=e.rgb,i=e.hsl,_=e.hsv,h=e.hex,m=e.header,g=e.styles,b=e.className,y=(0,l.default)((0,c.A)({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+o.r+", "+o.g+", "+o.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",
1width:"100%"},Hue:{radius:"2px"}}},void 0===g?{}:g));return n.createElement("div",{style:y.picker,className:"google-picker "+(void 0===b?"":b)},n.createElement("div",{style:y.head},m),n.createElement("div",{style:y.swatch}),n.createElement("div",{style:y.saturation},n.createElement(u.VI,{hsl:i,hsv:_,pointer:d.A,onChange:r})),n.createElement("div",{style:y.body},n.createElement("div",{style:y.controls,className:"flexbox-fix"},n.createElement("div",{style:y.hue},n.createElement(u.RG,{style:y.Hue,hsl:i,radius:"4px",pointer:p.A,onChange:r}))),n.createElement(f.A,{rgb:o,hsl:i,hex:h,hsv:_,onChange:r})))};Google.propTypes={width:i().oneOfType([i().string,i().number]),styles:i().object,header:i().string},Google.defaultProps={width:652,styles:{},header:"Color picker"},(0,u.Q$)(Google)},752097(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(347651),l=r(584857);let __rspack_default_export=function(e){var t=e.onChange,r=e.rgb,c=e.hsl,u=e.hex,d=e.hsv,handleChange=function(e,r){if(e.hex)i.qt(e.hex)&&t({hex:e.hex,source:"hex"},r);else if(e.rgb){var n=e.rgb.split(",");i.Zk(e.rgb,"rgb")&&t({r:n[0],g:n[1],b:n[2],a:1,source:"rgb"},r)}else if(e.hsv){var o=e.hsv.split(",");i.Zk(e.hsv,"hsv")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("\xb0",""),1==o[1]?o[1]=.01:1==o[2]&&(o[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsv"},r))}else if(e.hsl){var l=e.hsl.split(",");i.Zk(e.hsl,"hsl")&&(l[2]=l[2].replace("%",""),l[1]=l[1].replace("%",""),l[0]=l[0].replace("\xb0",""),1==h[1]?h[1]=.01:1==h[2]&&(h[2]=.01),t({h:Number(l[0]),s:Number(l[1]),v:Number(l[2]),source:"hsl"},r))}},p=(0,o.default)({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),f=r.r+", "+r.g+", "+r.b,_=Math.round(c.h)+"\xb0, "+Math.round(100*c.s)+"%, "+Math.round(100*c.l)+"%",h=Math.round(d.h)+"\xb0, "+Math.round(100*d.s)+"%, "+Math.round(100*d.v)+"%";return n.createElement("div",{style:p.wrap,className:"flexbox-fix"},n.createElement("div",{style:p.fields},n.createElement("div",{style:p.double},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"hex",value:u,onChange:handleChange})),n.createElement("div",{style:p.column},n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input2,label:p.label2},label:"rgb",value:f,onChange:handleChange})),n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input2,label:p.label2},label:"hsv",value:h,onChange:handleChange})),n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input2,label:p.label2},label:"hsl",value:_,onChange:handleChange})))))}},784139(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(293534),o=r(94306),i=r(81577),l=r.n(i),GooglePointer=function(e){var t=(0,o.default)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return n.createElement("div",{style:t.picker})};GooglePointer.propTypes={hsl:l().shape({h:l().number,s:l().number,l:l().number,a:l().number})},GooglePointer.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};let c=GooglePointer},885159(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(293534),o=r(94306),i=r(81577),l=r.n(i),GooglePointerCircle=function(e){var t=(0,o.default)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return n.createElement("div",{style:t.picker})};GooglePointerCircle.propTypes={hsl:l().shape({h:l().number,s:l().number,l:l().number,a:l().number})},GooglePointerCircle.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};let c=GooglePointerCircle},172568(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(252015),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},HuePicker=function(e){var t=e.width,r=e.height,o=e.onChange,i=e.hsl,d=e.direction,f=e.pointer,_=e.styles,h=e.className,m=(0,l.default)((0,c.A)({default:{picker:{position:"relative",width:t,height:r},hue:{radius:"2px"}}},void 0===_?{}:_));return n.createElement("div",{style:m.picker,className:"hue-picker "+(void 0===h?"":h)},n.createElement(u.RG,p({},m.hue,{hsl:i,pointer:f,onChange:function(e){return o({a:1,h:e.h,l:.5,s:1})},direction:d})))};HuePicker.propTypes={styles:i().object},HuePicker.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:d.A,styles:{}},(0,u.Q$)(HuePicker)},252015(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.direction,r=(0,o.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n.createElement("div",{style:r.picker})}},55652(e,t,r){"use strict";var n=r(293534),o=r(94306),i=r(888543),l=r(347651),c=r(584857);(0,c.Q$)(function(e){var t=e.onChange,r=e.hex,u=e.rgb,d=e.styles,p=void 0===d?{}:d,f=e.className,_=(0,o.default)((0,i.A)({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+r,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},p)),handleChange=function(e,r){e.hex?l.qt(e.hex)&&t({hex:e.hex,source:"hex"},r):(e.r||e.g||e.b)&&t({r:e.r||u.r,g:e.g||u.g,b:e.b||u.b,source:"rgb"},r)};return n.createElement(c.H1,{styles:p},n.createElement("div",{style:_.material,className:"material-picker "+(void 0===f?"":f)},n.createElement(c.jc,{style:{wrap:_.HEXwrap,input:_.HEXinput,label:_.HEXlabel},label:"hex",value:r,onChange:handleChange}),n.createElement("div",{style:_.split,className:"flexbox-fix"},n.createElement("div",{style:_.third},n.createElement(c.jc,{style:{wrap:_.RGBwrap,input:_.RGBinput,label:_.RGBlabel},label:"r",value:u.r,onChange:handleChange})),n.createElement("div",{style:_.third},n.createElement(c.jc,{style:{wrap:_.RGBwrap,input:_.RGBinput,label:_.RGBlabel},label:"g",value:u.g,onChange:handleChange})),n.createElement("div",{style:_.third},n.createElement(c.jc,{style:{wrap:_.RGBwrap,input:_.RGBinput,label:_.RGBlabel},label:"b",value:u.b,onChange:handleChange})))))})},352172(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(50689),p=r(563783),f=r(301803),_=r(834484),h=r(72281),m=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var g=function(e){function Photoshop(e){_classCallCheck(this,Photoshop);var t=_possibleConstructorReturn(this,(Photoshop.__proto__||Object.getPrototypeOf(Photoshop)).call(this));return t.state={currentColor:e.hex},t}return _inherits(Photoshop,e),m(Photoshop,[{key:"render",value:function(){var e=this.props,t=e.styles,r=e.className,o=(0,l.default)((0,c.A)({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px s
1olid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},void 0===t?{}:t));return n.createElement("div",{style:o.picker,className:"photoshop-picker "+(void 0===r?"":r)},n.createElement("div",{style:o.head},this.props.header),n.createElement("div",{style:o.body,className:"flexbox-fix"},n.createElement("div",{style:o.saturation},n.createElement(u.VI,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:p.A,onChange:this.props.onChange})),n.createElement("div",{style:o.hue},n.createElement(u.RG,{direction:"vertical",hsl:this.props.hsl,pointer:f.A,onChange:this.props.onChange})),n.createElement("div",{style:o.controls},n.createElement("div",{style:o.top,className:"flexbox-fix"},n.createElement("div",{style:o.previews},n.createElement(h.A,{rgb:this.props.rgb,currentColor:this.state.currentColor})),n.createElement("div",{style:o.actions},n.createElement(_.A,{label:"OK",onClick:this.props.onAccept,active:!0}),n.createElement(_.A,{label:"Cancel",onClick:this.props.onCancel}),n.createElement(d.A,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),Photoshop}(n.Component);g.propTypes={header:i().string,styles:i().object},g.defaultProps={header:"Color Picker",styles:{}},(0,u.Q$)(g)},834484(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.onClick,r=e.label,i=e.children,l=e.active,c=(0,o.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:l});return n.createElement("div",{style:c.button,onClick:t},r||i)}},50689(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(347651),l=r(584857);let __rspack_default_export=function(e){var t=e.onChange,r=e.rgb,c=e.hsv,u=e.hex,d=(0,o.default)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),handleChange=function(e,n){e["#"]?i.qt(e["#"])&&t({hex:e["#"],source:"hex"},n):e.r||e.g||e.b?t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n):(e.h||e.s||e.v)&&t({h:e.h||c.h,s:e.s||c.s,v:e.v||c.v,source:"hsv"},n)};return n.createElement("div",{style:d.fields},n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"h",value:Math.round(c.h),onChange:handleChange}),n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"s",value:Math.round(100*c.s),onChange:handleChange}),n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"v",value:Math.round(100*c.v),onChange:handleChange}),n.createElement("div",{style:d.divider}),n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"r",value:r.r,onChange:handleChange}
1),n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"g",value:r.g,onChange:handleChange}),n.createElement(l.jc,{style:{wrap:d.RGBwrap,input:d.RGBinput,label:d.RGBlabel},label:"b",value:r.b,onChange:handleChange}),n.createElement("div",{style:d.divider}),n.createElement(l.jc,{style:{wrap:d.HEXwrap,input:d.HEXinput,label:d.HEXlabel},label:"#",value:u.replace("#",""),onChange:handleChange}),n.createElement("div",{style:d.fieldSymbols},n.createElement("div",{style:d.symbol},"\xb0"),n.createElement("div",{style:d.symbol},"%"),n.createElement("div",{style:d.symbol},"%")))}},301803(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(){var e=(0,o.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return n.createElement("div",{style:e.pointer},n.createElement("div",{style:e.left},n.createElement("div",{style:e.leftInside})),n.createElement("div",{style:e.right},n.createElement("div",{style:e.rightInside})))}},563783(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.hsl,r=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return n.createElement("div",{style:r.picker})}},72281(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.rgb,r=e.currentColor,i=(0,o.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:r,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n.createElement("div",null,n.createElement("div",{style:i.label},"new"),n.createElement("div",{style:i.swatches},n.createElement("div",{style:i.new}),n.createElement("div",{style:i.current})),n.createElement("div",{style:i.label},"current"))}},974862(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(901419),p=r(605337),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sketch=function(e){var t=e.width,r=e.rgb,o=e.hex,i=e.hsv,_=e.hsl,h=e.onChange,m=e.onSwatchHover,g=e.disableAlpha,b=e.presetColors,y=e.renderers,v=e.styles,w=void 0===v?{}:v,j=e.className,k=(0,l.default)((0,c.A)({default:f({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+r.r+","+r.g+","+r.b+","+r.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"}
1,Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},w),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},w),{disableAlpha:g});return n.createElement("div",{style:k.picker,className:"sketch-picker "+(void 0===j?"":j)},n.createElement("div",{style:k.saturation},n.createElement(u.VI,{style:k.Saturation,hsl:_,hsv:i,onChange:h})),n.createElement("div",{style:k.controls,className:"flexbox-fix"},n.createElement("div",{style:k.sliders},n.createElement("div",{style:k.hue},n.createElement(u.RG,{style:k.Hue,hsl:_,onChange:h})),n.createElement("div",{style:k.alpha},n.createElement(u.ry,{style:k.Alpha,rgb:r,hsl:_,renderers:y,onChange:h}))),n.createElement("div",{style:k.color},n.createElement(u.xu,null),n.createElement("div",{style:k.activeColor}))),n.createElement(d.A,{rgb:r,hsl:_,hex:o,onChange:h,disableAlpha:g}),n.createElement(p.A,{colors:b,onClick:h,onSwatchHover:m}))};Sketch.propTypes={disableAlpha:i().bool,width:i().oneOfType([i().string,i().number]),styles:i().object},Sketch.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]};let _=(0,u.Q$)(Sketch)},901419(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(347651),l=r(584857);let __rspack_default_export=function(e){var t=e.onChange,r=e.rgb,c=e.hsl,u=e.hex,d=e.disableAlpha,p=(0,o.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:d}),handleChange=function(e,n){e.hex?i.qt(e.hex)&&t({hex:e.hex,source:"hex"},n):e.r||e.g||e.b?t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,a:r.a,source:"rgb"},n):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:c.h,s:c.s,l:c.l,a:e.a,source:"rgb"},n))};return n.createElement("div",{style:p.fields,className:"flexbox-fix"},n.createElement("div",{style:p.double},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"hex",value:u.replace("#",""),onChange:handleChange})),n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"r",value:r.r,onChange:handleChange,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"g",value:r.g,onChange:handleChange,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:p.single},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"b",value:r.b,onChange:handleChange,dragLabel:"true",dragMax:"255"})),n.createElement("div",{style:p.alpha},n.createElement(l.jc,{style:{input:p.input,label:p.label},label:"a",value:Math.round(100*r.a),onChange:handleChange,dragLabel:"true",dragMax:"100"})))}},605337(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(584857),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},SketchPresetColors=function(e){var t=e.colors,r=e.onClick,o=void 0===r?function(){}:r,i=e.onSwatchHover,d=(0,l.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),handleClick=function(e,t){o({hex:e,source:"hex"},t)};return n.createElement("div",{style:d.colors,className:"flexbox-fix"},t.map(function(e){var t="string"==typeof e?{color:e}:e,r=""+t.color+(t.title||"");
1return n.createElement("div",{key:r,style:d.swatchWrap},n.createElement(c.rp,u({},t,{style:d.swatch,onClick:handleClick,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))}))};SketchPresetColors.propTypes={colors:i().arrayOf(i().oneOfType([i().string,i().shape({color:i().string,title:i().string})])).isRequired};let d=SketchPresetColors},905144(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(888543),u=r(584857),d=r(92952),p=r(921359),Slider=function(e){var t=e.hsl,r=e.onChange,o=e.pointer,i=e.styles,p=e.className,f=(0,l.default)((0,c.A)({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},void 0===i?{}:i));return n.createElement("div",{style:f.wrap||{},className:"slider-picker "+(void 0===p?"":p)},n.createElement("div",{style:f.hue},n.createElement(u.RG,{style:f.Hue,hsl:t,pointer:o,onChange:r})),n.createElement("div",{style:f.swatches},n.createElement(d.A,{hsl:t,onClick:r})))};Slider.propTypes={styles:i().object},Slider.defaultProps={pointer:p.A,styles:{}},(0,u.Q$)(Slider)},921359(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(){var e=(0,o.default)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n.createElement("div",{style:e.picker})}},753520(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306);let __rspack_default_export=function(e){var t=e.hsl,r=e.offset,i=e.onClick,l=void 0===i?function(){}:i,c=e.active,u=e.first,d=e.last,p=(0,o.default)({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*r+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:c,first:u,last:d});return n.createElement("div",{style:p.swatch,onClick:function(e){return l({h:t.h,s:.5,l:r,source:"hsl"},e)}})}},92952(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(753520);let __rspack_default_export=function(e){var t=e.onClick,r=e.hsl,l=(0,o.default)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}});return n.createElement("div",{style:l.swatches},n.createElement("div",{style:l.swatch},n.createElement(i.A,{hsl:r,offset:".80",active:.1>Math.abs(r.l-.8)&&.1>Math.abs(r.s-.5),onClick:t,first:!0})),n.createElement("div",{style:l.swatch},n.createElement(i.A,{hsl:r,offset:".65",active:.1>Math.abs(r.l-.65)&&.1>Math.abs(r.s-.5),onClick:t})),n.createElement("div",{style:l.swatch},n.createElement(i.A,{hsl:r,offset:".50",active:.1>Math.abs(r.l-.5)&&.1>Math.abs(r.s-.5),onClick:t})),n.createElement("div",{style:l.swatch},n.createElement(i.A,{hsl:r,offset:".35",active:.1>Math.abs(r.l-.35)&&.1>Math.abs(r.s-.5),onClick:t})),n.createElement("div",{style:l.swatch},n.createElement(i.A,{hsl:r,offset:".20",active:.1>Math.abs(r.l-.2)&&.1>Math.abs(r.s-.5),onClick:t,last:!0})),n.createElement("div",{style:l.clear}))}},263454(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(222781),u=r(888543),d=r(128286),p=r(584857),f=r(974603),Swatches=function(e){var t=e.width,r=e.height,o=e.onChange,i=e.onSwatchHover,d=e.colors,_=e.hex,h=e.styles,m=e.className,g=(0,l.default)((0,u.A)({default:{picker:{width:t,height:r},overflow:{height:r,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},void 0===h?{}:h)),handleChange=function(e,t){return o({hex:e,source:"hex"},t)};return n.createElement("div",{style:g.picker,className:"swatches-picker "+(void 0===m?"":m)},n.createElement(p.H1,null,n.createElement("div",{style:g.overflow},n.createElement("div",{style:g.body},(0,c.A)(d,function(e){return n.createElement(f.A,{key:e.toString(),group:e,active:_,onClick:handleChange,onSwatchHover:i})}),n.createElement("div",{style:g.clear})))))};Swatches.propTypes={width:i().oneOfType([i().string,i().number]),height:i().oneOfType([i().string,i().number]),colors:i().arrayOf(i().arrayOf(i().string)),styles:i().object},Swatches.defaultProps={width:320,height:240,colors:[[d.wv["900"],d.wv["700"],d.wv["500"],d.wv["300"],d.wv["100"]],[d.Vu["900"],d.Vu["700"],d.Vu["500"],d.Vu["300"],d.Vu["100"]],[d.Zp["900"],d.Zp["700"],d.Zp["500"],d.Zp["300"],d.Zp["100"]],[d.Jc["900"],d.Jc["700"],d.Jc["500"],d.Jc["300"],d.Jc["100"]],[d.xV["900"],d.xV["700"],d.xV["500"],d.xV["300"],d.xV["100"]],[d.z1["900"],d.z1["700"],d.z1["500"],d.z1["300"],d.z1["100"]],[d.tD["900"],d.tD["700"],d.tD["500"],d.tD["300"],d.tD["100"]],[d.Q_["900"],d.Q_["700"],d.Q_["500"],d.Q_["300"],d.Q_["100"]],[d.$S["900"],d.$S["700"],d.$S["500"],d.$S["300"],d.$S["100"]],["#194D33",d.wL["700"],d.wL["500"],d.wL["300"],d.wL["100"]],[d.EM["900"],d.EM["700"],d.EM["500"],d.EM["300"],d.EM["100"]],[d.Gg["900"],d.Gg["700"],d.Gg["500"],d.Gg["300"],d.Gg["100"]],[d.D9["900"],d.D9["700"],d.D9["500"],d.D9["300"],d.D9["100"]],[d.Gi["900"],d.Gi["700"],d.Gi["500"],d.Gi["300"],d.Gi["100"]],[d.T_["900"],d.T_["700"],d.T_["500"],d.T_["300"],d.T_["100"]],[d.jr["900"],d.jr["700"],d.jr["500"],d.jr["300"],d.jr["100"]],[d.Xk["900"],d.Xk["700"],d.Xk["500"],d.Xk["300"],d.Xk["100"]],[d.U6["900"],d.U6["700"],d.U6["500"],d.U6["300"],d.U6["100"]],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},(0,p.Q$)(Swatches)},294799(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(347651),l=r(584857),c=r(727485);let __rspack_default_export=function(e){var t=e.color,r=e.onClick,u=e.onSwatchHover,d=e.first,p=e.last,f=e.active,_=(0,o.default)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:i.OB(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:d,last:p,active:f,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n.createElement(l.rp,{color:t,style:_.color,onClick:void 0===r?function(){}:r,onHover:u,focusStyle:{boxShadow:"0 0 4px "+t}},n.createElement("div",{style:_.check},n.createElement(c.default,null)))}},974603(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(293534),o=r(94306),i=r(222781),l=r(294799);let __rspack_default_export=function(e){var t=e.onClick,r=e.onSwatchHover,c=e.group,u=e.active,d=(0,o.default)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return n.createElement("div",{style:d.group},(0,i.A)(c,function(e,o){return n.createElement(l.A,{key:e,color:e,active:e.toLowerCase()===u,first:0===o,last:o===c.length-1,onClick:t,onSwatchHover:r})}))}},304572(e,t,r){"use strict";var n=r(293534),o=r(81577),i=r.n(o),l=r(94306),c=r(222781),u=r(888543),d=r(347651),p=r(584857),Twitter=function(e){var t=e.onChange,r=e.onSwatchHover,o=e.hex,i=e.colors,f=e.width,_=e.triangle,h=e.styles,m=e.className,g=(0,l.default)((0,u.A)({default:{card:{width:f,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",dis
1play:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},void 0===h?{}:h),{"hide-triangle":"hide"===_,"top-left-triangle":"top-left"===_,"top-right-triangle":"top-right"===_}),handleChange=function(e,r){d.qt(e)&&t({hex:e,source:"hex"},r)};return n.createElement("div",{style:g.card,className:"twitter-picker "+(void 0===m?"":m)},n.createElement("div",{style:g.triangleShadow}),n.createElement("div",{style:g.triangle}),n.createElement("div",{style:g.body},(0,c.A)(i,function(e,t){return n.createElement(p.rp,{key:t,color:e,hex:e,style:g.swatch,onClick:handleChange,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})}),n.createElement("div",{style:g.hash},"#"),n.createElement(p.jc,{label:null,style:{input:g.input},value:o.replace("#",""),onChange:handleChange}),n.createElement("div",{style:g.clear})))};Twitter.propTypes={width:i().oneOfType([i().string,i().number]),triangle:i().oneOf(["hide","top-left","top-right"]),colors:i().arrayOf(i().string),styles:i().object},Twitter.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},(0,p.Q$)(Twitter)},900540(e,t,r){"use strict";r.d(t,{Z:()=>calculateChange});var calculateChange=function(e,t,r,n,o){var i=o.clientWidth,l=o.clientHeight,c="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,d=c-(o.getBoundingClientRect().left+window.pageXOffset),p=u-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var f=void 0;if(f=p<0?0:p>l?1:Math.round(100*p/l)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var _=void 0;if(n!==(_=d<0?0:d>i?1:Math.round(100*d/i)/100))return{h:t.h,s:t.s,l:t.l,a:_,source:"rgb"}}return null}},474850(e,t,r){"use strict";r.d(t,{J:()=>get});var n={},render=function(e,t,r,n){if("u"<typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var i=o.getContext("2d");return i?(i.fillStyle=e,i.fillRect(0,0,o.width,o.height),i.fillStyle=t,i.fillRect(0,0,r,r),i.translate(r,r),i.fillRect(0,0,r,r),o.toDataURL()):null},get=function(e,t,r,o){var i=e+"-"+t+"-"+r+(o?"-server":"");if(n[i])return n[i];var l=render(e,t,r,o);return n[i]=l,l}},347651(e,t,r){"use strict";r.d(t,{OB:()=>getContrastingColor,Zk:()=>isvalidColorString,qt:()=>isValidHex,v5:()=>simpleCheckForValidColor,xU:()=>toState});var n=r(634893),o=r(683919),simpleCheckForValidColor=function(e){var t=0,r=0;return(0,n.A)(["r","g","b","a","h","s","l","v"],function(n){e[n]&&(t+=1,isNaN(e[n])||(r+=1),("s"===n||"l"===n)&&/^\d+%$/.test(e[n])&&(r+=1))}),t===r&&e},toState=function(e,t){var r=e.hex?(0,o.A)(e.hex):(0,o.A)(e),n=r.toHsl(),i=r.toHsv(),l=r.toRgb(),c=r.toHex();return 0===n.s&&(n.h=t||0,i.h=t||0),{hsl:n,hex:"000000"===c&&0===l.a?"transparent":"#"+c,rgb:l,hsv:i,oldHue:e.h||t||n.h,source:e.source}},isValidHex=function(e){if("transparent"===e)return!0;var t=+("#"===String(e).charAt(0));return e.length!==4+t&&e.length<7+t&&(0,o.A)(e).isValid()},getContrastingColor=function(e){if(!e)return"#fff";var t=toState(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},isvalidColorString=function(e,t){var r=e.replace("\xb0","");return(0,o.A)(t+" ("+r+")")._ok}},444750(e,t,r){"use strict";r.d(t,{Z:()=>calculateChange});var calculateChange=function(e,t,r,n){var o=n.clientWidth,i=n.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=l-(n.getBoundingClientRect().left+window.pageXOffset),d=c-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var p=void 0;if(p=d<0?359:d>i?0:360*(-(100*d/i)+100)/100,r.h!==p)return{h:p,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var f=void 0;if(f=u<0?0:u>o?359:100*u/o*360/100,r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null}},69404(e,t,r){"use strict";r.d(t,{l:()=>handleFocus});var n=r(293534),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(){function defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&defineProperties(e.prototype,t),r&&defineProperties(e,r),e}}();function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var handleFocus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";function Focus(){_classCallCheck(this,Focus);for(var e,t,r,n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return t=r=_possibleConstructorReturn(this,(e=Focus.__proto__||Object.getPrototypeOf(Focus)).call.apply(e,[this].concat(o))),r.state={focus:!1},r.handleFocus=function(){return r.setState({focus:!0})},r.handleBlur=function(){return r.setState({focus:!1})},_possibleConstructorReturn(r,t)}return _inherits(Focus,n.Component),i(Focus,[{key:"render",value:function(){return n.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},n.createElement(e,o({},this.props,this.state)))}}]),Focus}},956190(e,t,r){"use strict";r.d(t,{Z:()=>calculateChange});var calculateChange=function(e,t,r){var n=r.getBoundingClientRect(),o=n.width,i=n.height,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,c="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,u=l-(r.getBoundingClientRect().left+window.pageXOffset),d=c-(r.getBoundingClientRect().top+window.pageYOffset);u<0?u=0:u>o&&(u=o),d<0?d=0:d>i&&(d=i);var p=u/o,f=1-d/i;return{h:t.h,s:p,v:f,a:t.a,source:"hsv"}}},490770(e,t,r){"use strict";r.d(t,{Xq:()=>o.A,xk:()=>n.A}),r(57540),r(33756),r(698470);var n=r(828746);r(17304),r(154940),r(172568),r(55652),r(352172);var o=r(974862);r(905144),r(263454),r(304572),r(731532),r(934166)},183863(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(609883),o=r(959394),i=r(285896),l=r(176375),c=r(57080),u=r(293534),d=r(244208),p=r(455036),removeClass=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,c.A)(e,t)})},f=function(e){function CSSTransition(){for(var t,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,r){var n=t.resolveArguments(e,r),o=n[0],i=n[1];t.removeClasses(o,"exit"),t.addClass(o,i?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,r)},t.onEntering=function(e,r){var n=t.resolveArguments(e,r),o=n[0],i=n[1];t.addClass(o,i?"appear":"enter","active"),t.props.onEntering&&t.props.onEntering(e,r)},t.onEntered=function(e,r){var n=t.resolveArguments(e,r),o=n[0],i=n[1]?"appear":"enter";t.removeClasses(o,i),t.addClass(o,i,"done"),t.props.onEntered&&t.props.onEntered(e,r)},t.onExit=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"appear"),t.removeClasses(r,"enter"),t.addClass(r,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var r=t.resolveArguments(e)[0];t.addClass(r,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var r=t.resolveArguments(e)[0];t.removeClasses(r,"exit"),t.addClass(r,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,r){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,r]},t.getClassNames=function(e){var r=t.props.classNames,n="string"==typeof r,o=n&&r?r+"-":"",i=n?""+o+e:r[e],l=n?i+"-active":r[e+"Active"],c=n?i+"-done":r[e+"Done"];return{baseClassName:i,activeClassName:l,doneClassName:c}},t}(0,i.A)(CSSTransition,e);var t=CSSTransition.prototype;return t.addClass=function(e,t,r){var n,o=this.getClassNames(t)[r+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===r&&i&&(o+=" "+i),"active"===r&&e&&(0,p.F)(e),o&&(this.appliedClasse
1s[t][r]=o,n=o,e&&n&&n.split(" ").forEach(function(t){return(0,l.A)(e,t)}))},t.removeClasses=function(e,t){var r=this.appliedClasses[t],n=r.base,o=r.active,i=r.done;this.appliedClasses[t]={},n&&removeClass(e,n),o&&removeClass(e,o),i&&removeClass(e,i)},t.render=function(){var e=this.props,t=(e.classNames,(0,o.A)(e,["classNames"]));return u.createElement(d.Ay,(0,n.A)({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},CSSTransition}(u.Component);f.defaultProps={classNames:""},f.propTypes={};let _=f},219612(e,t,r){"use strict";r.d(t,{A:()=>m});var n,o,i=r(285896),l=r(293534),c=r(244208),u=r(837886);function areChildrenDifferent(e,t){return!(e===t||l.isValidElement(e)&&l.isValidElement(t)&&null!=e.key&&e.key===t.key)}var d="out-in",p="in-out",callHook=function(e,t,r){return function(){var n;e.props[t]&&(n=e.props)[t].apply(n,arguments),r()}},f=((n={})[d]=function(e){var t=e.current,r=e.changeState;return l.cloneElement(t,{in:!1,onExited:callHook(t,"onExited",function(){r(c.ns,null)})})},n[p]=function(e){var t=e.current,r=e.changeState,n=e.children;return[t,l.cloneElement(n,{in:!0,onEntered:callHook(n,"onEntered",function(){r(c.ns)})})]},n),_=((o={})[d]=function(e){var t=e.children,r=e.changeState;return l.cloneElement(t,{in:!0,onEntered:callHook(t,"onEntered",function(){r(c._K,l.cloneElement(t,{in:!0}))})})},o[p]=function(e){var t=e.current,r=e.children,n=e.changeState;return[l.cloneElement(t,{in:!1,onExited:callHook(t,"onExited",function(){n(c._K,l.cloneElement(r,{in:!0}))})}),l.cloneElement(r,{in:!0})]},o),h=function(e){function SwitchTransition(){for(var t,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={status:c._K,current:null},t.appeared=!1,t.changeState=function(e,r){void 0===r&&(r=t.state.current),t.setState({status:e,current:r})},t}(0,i.A)(SwitchTransition,e);var t=SwitchTransition.prototype;return t.componentDidMount=function(){this.appeared=!0},SwitchTransition.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===c.ns&&e.mode===p?{status:c.ns}:t.current&&areChildrenDifferent(t.current,e.children)?{status:c.ze}:{current:l.cloneElement(e.children,{in:!0})}},t.render=function(){var e,t=this.props,r=t.children,n=t.mode,o=this.state,i=o.status,d=o.current,p={children:r,current:d,changeState:this.changeState,status:i};switch(i){case c.ns:e=_[n](p);break;case c.ze:e=f[n](p);break;case c._K:e=d}return l.createElement(u.A.Provider,{value:{isMounting:!this.appeared}},e)},SwitchTransition}(l.Component);h.propTypes={},h.defaultProps={mode:d};let m=h},244208(e,t,r){"use strict";r.d(t,{Ay:()=>b,_K:()=>h,ns:()=>_,ze:()=>m});var n=r(959394),o=r(285896),i=r(293534),l=r(207214),c=r(910585),u=r(837886),d=r(455036),p="unmounted",f="exited",_="entering",h="entered",m="exiting",g=function(e){function Transition(t,r){var n,o=e.call(this,t,r)||this,i=r&&!r.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(n=f,o.appearStatus=_):n=h:n=t.unmountOnExit||t.mountOnEnter?p:f,o.state={status:n},o.nextCallback=null,o}(0,o.A)(Transition,e),Transition.getDerivedStateFromProps=function(e,t){return e.in&&t.status===p?{status:f}:null};var t=Transition.prototype;return t.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},t.componentDidUpdate=function(e){var t=null;if(e!==this.props){var r=this.state.status;this.props.in?r!==_&&r!==h&&(t=_):(r===_||r===h)&&(t=m)}this.updateStatus(!1,t)},t.componentWillUnmount=function(){this.cancelNextCallback()},t.getTimeouts=function(){var e,t,r,n=this.props.timeout;return e=t=r=n,null!=n&&"number"!=typeof n&&(e=n.exit,t=n.enter,r=void 0!==n.appear?n.appear:t),{exit:e,enter:t,appear:r}},t.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===_){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this);r&&(0,d.F)(r)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===f&&this.setState({status:p})},t.performEnter=function(e){var t=this,r=this.props.enter,n=this.context?this.context.
1isMounting:e,o=this.props.nodeRef?[n]:[l.findDOMNode(this),n],i=o[0],u=o[1],d=this.getTimeouts(),p=n?d.appear:d.enter;(e||r)&&!c.A.disabled?(this.props.onEnter(i,u),this.safeSetState({status:_},function(){t.props.onEntering(i,u),t.onTransitionEnd(p,function(){t.safeSetState({status:h},function(){t.props.onEntered(i,u)})})})):this.safeSetState({status:h},function(){t.props.onEntered(i)})},t.performExit=function(){var e=this,t=this.props.exit,r=this.getTimeouts(),n=this.props.nodeRef?void 0:l.findDOMNode(this);!t||c.A.disabled?this.safeSetState({status:f},function(){e.props.onExited(n)}):(this.props.onExit(n),this.safeSetState({status:m},function(){e.props.onExiting(n),e.onTransitionEnd(r.exit,function(){e.safeSetState({status:f},function(){e.props.onExited(n)})})}))},t.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},t.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},t.setNextCallback=function(e){var t=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},t.onTransitionEnd=function(e,t){this.setNextCallback(t);var r=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this),n=null==e&&!this.props.addEndListener;if(!r||n)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],i=o[0],c=o[1];this.props.addEndListener(i,c)}null!=e&&setTimeout(this.nextCallback,e)},t.render=function(){var e=this.state.status;if(e===p)return null;var t=this.props,r=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,n.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(u.A.Provider,{value:null},"function"==typeof r?r(e,o):i.cloneElement(i.Children.only(r),o))},Transition}(i.Component);function noop(){}g.contextType=u.A,g.propTypes={},g.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop,onEntering:noop,onEntered:noop,onExit:noop,onExiting:noop,onExited:noop},g.UNMOUNTED=p,g.EXITED=f,g.ENTERING=_,g.ENTERED=h,g.EXITING=m;let b=g},29125(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(959394),o=r(609883),i=r(937286),l=r(285896),c=r(293534),u=r(837886),d=r(919357),p=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},f=function(e){function TransitionGroup(t,r){var n=e.call(this,t,r)||this,o=n.handleExited.bind((0,i.A)(n));return n.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},n}(0,l.A)(TransitionGroup,e);var t=TransitionGroup.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function(e,t){var r=t.children,n=t.handleExited;
1return{children:t.firstRender?(0,d.dw)(e,n):(0,d.qX)(e,r,n),firstRender:!1}},t.handleExited=function(e,t){var r=(0,d.p7)(this.props.children);e.key in r||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var r=(0,o.A)({},t.children);return delete r[e.key],{children:r}}))},t.render=function(){var e=this.props,t=e.component,r=e.childFactory,o=(0,n.A)(e,["component","childFactory"]),i=this.state.contextValue,l=p(this.state.children).map(r);return(delete o.appear,delete o.enter,delete o.exit,null===t)?c.createElement(u.A.Provider,{value:i},l):c.createElement(u.A.Provider,{value:i},c.createElement(t,o,l))},TransitionGroup}(c.Component);f.propTypes={},f.defaultProps={component:"div",childFactory:function(e){return e}};let _=f},837886(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(293534).createContext(null)},910585(e,t,r){"use strict";r.d(t,{A:()=>n});let n={disabled:!1}},919357(e,t,r){"use strict";r.d(t,{dw:()=>getInitialChildMapping,p7:()=>getChildMapping,qX:()=>getNextChildMapping});var n=r(293534);function getChildMapping(e,t){var r=Object.create(null);return e&&n.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=t&&(0,n.isValidElement)(e)?t(e):e}),r}function mergeChildMappings(e,t){function getValueForKey(r){return r in t?t[r]:e[r]}e=e||{},t=t||{};var r,n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var l={};for(var c in t){if(n[c])for(r=0;r<n[c].length;r++){var u=n[c][r];l[n[c][r]]=getValueForKey(u)}l[c]=getValueForKey(c)}for(r=0;r<o.length;r++)l[o[r]]=getValueForKey(o[r]);return l}function getProp(e,t,r){return null!=r[t]?r[t]:e.props[t]}function getInitialChildMapping(e,t){return getChildMapping(e.children,function(r){return(0,n.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:getProp(r,"appear",e),enter:getProp(r,"enter",e),exit:getProp(r,"exit",e)})})}function getNextChildMapping(e,t,r){var o=getChildMapping(e.children),i=mergeChildMappings(t,o);
1return Object.keys(i).forEach(function(l){var c=i[l];if((0,n.isValidElement)(c)){var u=l in t,d=l in o,p=t[l],f=(0,n.isValidElement)(p)&&!p.props.in;d&&(!u||f)?i[l]=(0,n.cloneElement)(c,{onExited:r.bind(null,c),in:!0,exit:getProp(c,"exit",e),enter:getProp(c,"enter",e)}):d||!u||f?d&&u&&(0,n.isValidElement)(p)&&(i[l]=(0,n.cloneElement)(c,{onExited:r.bind(null,c),in:p.props.in,exit:getProp(c,"exit",e),enter:getProp(c,"enter",e)})):i[l]=(0,n.cloneElement)(c,{in:!1})}}),i}},455036(e,t,r){"use strict";r.d(t,{F:()=>forceReflow});var forceReflow=function(e){return e.scrollTop}},778547(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var n=_interopRequireDefault(r(523181)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var r=t[e];return r||{extend:e}}},l=t.autoprefix=function(e){var t={};return(0,n.default)(e,function(e,r){var l={};(0,n.default)(e,function(e,t){var r=i[t];r?l=o({},l,r(e)):l[t]=e}),t[r]=l}),t};t.default=l},43461(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=_interopRequireDefault(r(293534));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";function Active(){_classCallCheck(this,Active);for(var r,i,l,c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return i=l=_possibleConstructorReturn(this,(r=Active.__proto__||Object.getPrototypeOf(Active)).call.apply(r,[this].concat(u))),l.state={active:!1},l.handleMouseDown=function(){return l.setState({active:!0})},l.handleMouseUp=function(){return l.setState({active:!1})},l.render=function(){return o.default.createElement(t,{onMouseDown:l.handleMouseDown,onMouseUp:l.handleMouseUp},o.default.createElement(e,n({},l.props,l.state)))},_possibleConstructorReturn(l,i)}return _inherits(Active,o.default.Component),Active};t.default=i},570837(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=_interopRequireDefault(r(293534));
1function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var i=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";function Hover(){_classCallCheck(this,Hover);for(var r,i,l,c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return i=l=_possibleConstructorReturn(this,(r=Hover.__proto__||Object.getPrototypeOf(Hover)).call.apply(r,[this].concat(u))),l.state={hover:!1},l.handleMouseOver=function(){return l.setState({hover:!0})},l.handleMouseOut=function(){return l.setState({hover:!1})},l.render=function(){return o.default.createElement(t,{onMouseOver:l.handleMouseOver,onMouseOut:l.handleMouseOut},o.default.createElement(e,n({},l.props,l.state)))},_possibleConstructorReturn(l,i)}return _inherits(Hover,o.default.Component),Hover};t.default=i},352178(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var n=_interopRequireDefault(r(186809)),o=_interopRequireDefault(r(523181)),i=_interopRequireDefault(r(899389)),l=_interopRequireDefault(r(693580));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var c=t.flattenNames=function flattenNames(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];return(0,l.default)(e,function(e){Array.isArray(e)?flattenNames(e).map(function(e){return t.push(e)}):(0,i.default)(e)?(0,o.default)(e,function(e,r){!0===e&&t.push(r),t.push(r+"-"+e)}):(0,n.default)(e)&&t.push(e)}),t};t.default=c},94306(e,t,r){"use strict";t.handleHover=void 0;var n=_interopRequireDefault(r(352178)),o=_interopRequireDefault(r(115376)),i=_interopRequireDefault(r(778547)),l=_interopRequireDefault(r(570837)),c=_interopRequireDefault(r(43461)),u=_interopRequireDefault(r(367282));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}l.default,t.handleHover=l.default,c.default,u.default,t.default=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),l=1;l<t;l++)r[l-1]=arguments[l];var c=(0,n.default)(r),u=(0,o.default)(e,c);return(0,i.default)(u)}},367282(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r={},setProp=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];r[e]=t};return 0===e&&setProp("first-child"),e===t-1&&setProp("last-child"),(0===e||e%2==0)&&setProp("even"),1===Math.abs(e%2)&&setProp("odd"),setProp("nth-child",e),r}},115376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var n=_interopRequireDefault(r(523181)),o=_interopRequireDefault(r(605205)),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var l=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,o.default)(e.default)||{};return t.map(function(t){var o=e[t];return o&&(0,n.default)(o,function(e,t){r[t]||(r[t]={}),r[t]=i({},r[t],o[t])}),t}),r};t.default=l},731807(e){(function(){function getDefaultOpts(e){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated 
1with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,describe:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `\xab\xab\xab` and `\xbb\xbb\xbb` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n].defaultValue);return r}function allOptionsOn(){"use strict";var e=getDefaultOpts(!0),t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=!0);return t}var t={},r={},n={},o=getDefaultOpts(!0),i="vanilla",l={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:getDefaultOpts(!0),allOn:allOptionsOn()};function validate(e,r){"use strict";var n=r?"Error in "+r+" extension->":"Error in unnamed extension",o={valid:!0,error:""};t.helper.isArray(e)||(e=[e]);for(var i=0;i<e.length;++i){var l=n+" sub-extension "+i+": ",c=e[i];if("object"!=typeof c){o.valid=!1,o.error=l+"must be an object, but "+typeof c+" given";break}if(!t.helper.isString(c.type)){o.valid=!1,o.error=l+'property "type" must be a string, but '+typeof c.type+" given";break}var u=c.type=c.type.toLowerCase();if("language"===u&&(u=c.type="lang"),"html"===u&&(u=c.type="output"),"lang"!==u&&"output"!==u&&"listener"!==u){o.valid=!1,o.error=l+"type "+u+' is not recognized. Valid values: "lang/language", "output/html" or "listener"';break}if("listener"===u){if(t.helper.isUndefined(c.listeners)){o.valid=!1,o.error=l+'. Extensions of type "listener" must have a property called "listeners"';break}}else if(t.helper.isUndefined(c.filter)&&t.helper.isUndefined(c.regex)){o.valid=!1,o.error=l+u+' extensions must define either a "regex" property or a "filter" method';break}if(c.listeners){if("object"!=typeof c.listeners)return o.valid=!1,o.error=l+'"listeners" property must be an object but '+typeof c.listeners+" given",o;for(var d in c.listeners)if(c.listeners.hasOwnProperty(d)&&"function"!=typeof c.listeners[d])return o.valid=!1,o.error=l+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+d+" must be a function but "+typeof c.listeners[d]+" given",o}if(c.filter){if("function"!=typeof c.filter){o.valid=!1,o.error=l+'"filter" must be a function, but '+typeof c.filter+" given";break}}else if(c.regex){if(t.helper.isString(c.regex)&&(c.regex=RegExp(c.regex,"g")),!(c.regex instanceof RegExp))return o.valid=!1,o.error=l+'"regex" property must either be a string or a RegExp object, but '+typeof c.regex+" given",o;if(t.helper.isUndefined(c.replace)){o.valid=!1,o.error=l+'"regex" extensions must implement a replace string or function';break}}}return o}function escapeCharactersCallback(e,t){return"\xa8E"+t.charCodeAt(0)+"E"}t.helper={},t.extensions={},t.setOption=function(e,t){return o[e]=t,this},t.getOption=function(e){return o[e]},t.getOptions=function(){return o},t.resetOptions=function(){"use strict";o=getDefaultOpts(!0)},t.setFlavor=function(e){"use strict";if(!l.hasOwnProperty(e))throw Error(e+" flavor was not found");t.resetOptions();var r=l[e];for(var n in i=e,r)r.hasOwnProperty(n)&&(o[n]=r[n])},t.getFlavor=function(){return i},t.getFlavorOptions=function(e){"use strict";if(l.hasOwnProperty(e))return l[e]},t.getDefaultOptions=function(e){return getDefaultOpts(e)},t.subParser=function(e,n){"use strict";if(t.helper.isString(e))if(void 0!==n)r[e]=n;else if(r.hasOwnProperty(e))return r[e];else throw Error("SubParser named "+e+" not registered!")},t.extension=function(e,r){"use strict";if(!t.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=t.helper.stdExtName(e),t.helper.isUndefined(r)){if(!n.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return n[e]}"function"==typeof r&&(r=r()),t.helper.isArray(r)||(r=[r]);var o=validate(r,e);if(o.valid)n[e]=r;else throw Error(o.error)},t.getAllExtensions=function(){return n},t.removeExtension=function(e){"use strict";delete n[e]},t.resetExtensions=function(){"use strict";n={}},t.validateExtension=function(e){"use strict";var t=validate(e,null);return!!t.valid||(console.warn(t.error),!1)},t.hasOwnProperty("helper")||(t.helper={}),t.helper.isString=function(e){return"string"==typeof e||e instanceof String},t.helper.isFunction=function(e){return e&&"[object Function]"===({}).toString.call(e)},t.helper.isArray=function(e){return Array.isArray(e)},t.helper.isUndefined=function(e){return void 0===e},t.helper.forEach=function(e,r){"use strict";if(t.helper.isUndefined(e))throw Error("obj param is required");if(t.helper.isUndefined(r))throw Error("callback param is required");if(!t.helper.isFunction(r))throw Error("callback param must be a function/closure");if("function"==typeof e.forEach)e.forEach(r);else if(t.helper.isArray(e))for(var n=0;n<e.length;n++)r(e[n],n,e);else if("object"==typeof e)for(var o in e)e.hasOwnProperty(o)&&r(e[o],o,e);else throw Error("obj does not seem to be an array or an iterable object")},t.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},t.helper.escapeCharactersCallback=escapeCharactersCallback,t.helper.escapeCharacters=function(e,t,r){"use strict";var n="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";r&&(n="\\\\"+n);var o=RegExp(n,"g");return e.replace(o,escapeCharactersCallback)},t.helper.unescapeHTMLEntities=function(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var rgxFindMatchPos=function(e,t,r,n){"use strict";var o,i,l,c,u,d=n||"",p=d.indexOf("g")>-1,f=RegExp(t+"|"+r,"g"+d.replace(/g/g,"")),_=new RegExp(t,d.replace(/g/g,"")),h=[];do for(o=0;l=f.exec(e);)if(_.test(l[0]))o++||(c=(i=f.lastIndex)-l[0].length);else if(o&&!--o){u=l.index+l[0].length;var m={left:{start:c,end:i},match:{start:i,end:l.index},right:{start:l.index,end:u},wholeMatch:{start:c,end:u}};if(h.push(m),!p)return h}while(o&&(f.lastIndex=i));return h};t.helper.matchRecursiveRegExp=function(e,t,r,n){"use strict";for(var o=rgxFindMatchPos(e,t,r,n),i=[],l=0;l<o.length;++l)i.push([e.slice(o[l].wholeMatch.start,o[l].wholeMatch.end),e.slice(o[l].match.start,o[l].match.end),e.slice(o[l].left.start,o[l].left.end),e.slice(o[l].right.start,o[l].right.end)]);return i},t.helper.replaceRecursiveRegExp=function(e,r,n,o,i){"use strict";if(!t.helper.isFunction(r)){var l=r;r=function(){return l}}var c=rgxFindMatchPos(e,n,o,i),u=e,d=c.length;if(d>0){var p=[];0!==c[0].wholeMatch.start&&p.push(e.slice(0,c[0].wholeMatch.start));for(var f=0;f<d;
vendor: 8,018 bytes, line 1
1++f)p.push(r(e.slice(c[f].wholeMatch.start,c[f].wholeMatch.end),e.slice(c[f].match.start,c[f].match.end),e.slice(c[f].left.start,c[f].left.end),e.slice(c[f].right.start,c[f].right.end))),f<d-1&&p.push(e.slice(c[f].wholeMatch.end,c[f+1].wholeMatch.start));c[d-1].wholeMatch.end<e.length&&p.push(e.slice(c[d-1].wholeMatch.end)),u=p.join("")}return u},t.helper.regexIndexOf=function(e,r,n){"use strict";if(!t.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(r instanceof RegExp==!1)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var o=e.substring(n||0).search(r);return o>=0?o+(n||0):o},t.helper.splitAtIndex=function(e,r){"use strict";if(!t.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,r),e.substring(r)]},t.helper.encodeEmailAddress=function(e){"use strict";var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var r=Math.random();e=r>.9?t[2](e):r>.45?t[1](e):t[0](e)}return e})},t.helper.padEnd=function(e,t,r){return(t|=0,r=String(r||" "),e.length>t)?String(e):((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),String(e)+r.slice(0,t))},"u"<typeof console&&(console={warn:function(e){"use strict";alert(e)},log:function(e){"use strict";alert(e)},error:function(e){"use strict";throw e}}),t.helper.regexes={asteriskDashAndColon:/([*_:~])/g},t.helper.emojis={"+1":"\uD83D\uDC4D","-1":"\uD83D\uDC4E",100:"\uD83D\uDCAF",1234:"\uD83D\uDD22","1st_place_medal":"\uD83E\uDD47","2nd_place_medal":"\uD83E\uDD48","3rd_place_medal":"\uD83E\uDD49","8ball":"\uD83C\uDFB1",a:"\uD83C\uDD70️",ab:"\uD83C\uDD8E",abc:"\uD83D\uDD24",abcd:"\uD83D\uDD21",accept:"\uD83C\uDE51",aerial_tramway:"\uD83D\uDEA1",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"\uD83D\uDC7D",ambulance:"\uD83D\uDE91",amphora:"\uD83C\uDFFA",anchor:"⚓️",angel:"\uD83D\uDC7C",anger:"\uD83D\uDCA2",angry:"\uD83D\uDE20",anguished:"\uD83D\uDE27",ant:"\uD83D\uDC1C",apple:"\uD83C\uDF4E",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"\uD83D\uDD3D",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"\uD83D\uDD3C",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"\uD83D\uDD03",arrows_counterclockwise:"\uD83D\uDD04",art:"\uD83C\uDFA8",articulated_lorry:"\uD83D\uDE9B",artificial_satellite:"\uD83D\uDEF0",astonished:"\uD83D\uDE32",athletic_shoe:"\uD83D\uDC5F",atm:"\uD83C\uDFE7",atom_symbol:"⚛️",avocado:"\uD83E\uDD51",b:"\uD83C\uDD71️",baby:"\uD83D\uDC76",baby_bottle:"\uD83C\uDF7C",baby_chick:"\uD83D\uDC24",baby_symbol:"\uD83D\uDEBC",back:"\uD83D\uDD19",bacon:"\uD83E\uDD53",badminton:"\uD83C\uDFF8",baggage_claim:"\uD83D\uDEC4",baguette_bread:"\uD83E\uDD56",balance_scale:"⚖️",balloon:"\uD83C\uDF88",ballot_box:"\uD83D\uDDF3",ballot_box_with_check:"☑️",bamboo:"\uD83C\uDF8D",banana:"\uD83C\uDF4C",bangbang:"‼️",bank:"\uD83C\uDFE6",bar_chart:"\uD83D\uDCCA",barber:"\uD83D\uDC88",baseball:"⚾️",basketball:"\uD83C\uDFC0",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"\uD83E\uDD87",bath:"\uD83D\uDEC0",bathtub:"\uD83D\uDEC1",battery:"\uD83D\uDD0B",beach_umbrella:"\uD83C\uDFD6",bear:"\uD83D\uDC3B",bed:"\uD83D\uDECF",bee:"\uD83D\uDC1D",beer:"\uD83C\uDF7A",beers:"\uD83C\uDF7B",beetle:"\uD83D\uDC1E",beginner:"\uD83D\uDD30",bell:"\uD83D\uDD14",bellhop_bell:"\uD83D\uDECE",bento:"\uD83C\uDF71",biking_man:"\uD83D\uDEB4",bike:"\uD83D\uDEB2",biking_woman:"\uD83D\uDEB4&zwj;♀️",bikini:"\uD83D\uDC59",biohazard:"☣️",bird:"\uD83D\uDC26",birthday:"\uD83C\uDF82",black_circle:"⚫️",black_flag:"\uD83C\uDFF4",black_heart:"\uD83D\uDDA4",black_joker:"\uD83C\uDCCF",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"\uD83D\uDD32",blonde_man:"\uD83D\uDC71",blonde_woman:"\uD83D\uDC71&zwj;♀️",blossom:"\uD83C\uDF3C",blowfish:"\uD83D\uDC21",blue_book:"\uD83D\uDCD8",blue_car:"\uD83D\uDE99",blue_heart:"\uD83D\uDC99",blush:"\uD83D\uDE0A",boar:"\uD83D\uDC17",boat:"⛵️",bomb:"\uD83D\uDCA3",book:"\uD83D\uDCD6",bookmark:"\uD83D\uDD16",bookmark_tabs:"\uD83D\uDCD1",books:"\uD83D\uDCDA",boom:"\uD83D\uDCA5",boot:"\uD83D\uDC62",bouquet:"\uD83D\uDC90",bowing_man:"\uD83D\uDE47",bow_and_arrow:"\uD83C\uDFF9",bowing_woman:"\uD83D\uDE47&zwj;♀️",bowling:"\uD83C\uDFB3",boxing_glove:"\uD83E\uDD4A",boy:"\uD83D\uDC66",bread:"\uD83C\uDF5E",bride_with_veil:"\uD83D\uDC70",bridge_at_night:"\uD83C\uDF09",briefcase:"\uD83D\uDCBC",broken_heart:"\uD83D\uDC94",bug:"\uD83D\uDC1B",building_construction:"\uD83C\uDFD7",bulb:"\uD83D\uDCA1",bullettrain_front:"\uD83D\uDE85",bullettrain_side:"\uD83D\uDE84",burrito:"\uD83C\uDF2F",bus:"\uD83D\uDE8C",business_suit_levitating:"\uD83D\uDD74",busstop:"\uD83D\uDE8F",bust_in_silhouette:"\uD83D\uDC64",busts_in_silhouette:"\uD83D\uDC65",butterfly:"\uD83E\uDD8B",cactus:"\uD83C\uDF35",cake:"\uD83C\uDF70",calendar:"\uD83D\uDCC6",call_me_hand:"\uD83E\uDD19",calling:"\uD83D\uDCF2",camel:"\uD83D\uDC2B",camera:"\uD83D\uDCF7",camera_flash:"\uD83D\uDCF8",camping:"\uD83C\uDFD5",cancer:"♋️",candle:"\uD83D\uDD6F",candy:"\uD83C\uDF6C",canoe:"\uD83D\uDEF6",capital_abcd:"\uD83D\uDD20",capricorn:"♑️",car:"\uD83D\uDE97",card_file_box:"\uD83D\uDDC3",card_index:"\uD83D\uDCC7",card_index_dividers:"\uD83D\uDDC2",carousel_horse:"\uD83C\uDFA0",carrot:"\uD83E\uDD55",cat:"\uD83D\uDC31",cat2:"\uD83D\uDC08",cd:"\uD83D\uDCBF",chains:"⛓",champagne:"\uD83C\uDF7E",chart:"\uD83D\uDCB9",chart_with_downwards_trend:"\uD83D\uDCC9",chart_with_upwards_trend:"\uD83D\uDCC8",checkered_flag:"\uD83C\uDFC1",cheese:"\uD83E\uDDC0",cherries:"\uD83C\uDF52",cherry_blossom:"\uD83C\uDF38",chestnut:"\uD83C\uDF30",chicken:"\uD83D\uDC14",children_crossing:"\uD83D\uDEB8",chipmunk:"\uD83D\uDC3F",chocolate_bar:"\uD83C\uDF6B",christmas_tree:"\uD83C\uDF84",church:"⛪️",cinema:"\uD83C\uDFA6",circus_tent:"\uD83C\uDFAA",city_sunrise:"\uD83C\uDF07",city_sunset:"\uD83C\uDF06",cityscape:"\uD83C\uDFD9",cl:"\uD83C\uDD91",clamp:"\uD83D\uDDDC",clap:"\uD83D\uDC4F",clapper:"\uD83C\uDFAC",classical_building:"\uD83C\uDFDB",clinking_glasses:"\uD83E\uDD42",clipboard:"\uD83D\uDCCB",clock1:"\uD83D\uDD50",clock10:"\uD83D\uDD59",clock1030:"\uD83D\uDD65",clock11:"\uD83D\uDD5A",clock1130:"\uD83D\uDD66",clock12:"\uD83D\uDD5B",clock1230:"\uD83D\uDD67",clock130:"\uD83D\uDD5C",clock2:"\uD83D\uDD51",clock230:"\uD83D\uDD5D",clock3:"\uD83D\uDD52",clock330:"\uD83D\uDD5E",clock4:"\uD83D\uDD53",clock430:"\uD83D\uDD5F",clock5:"\uD83D\uDD54",clock530:"\uD83D\uDD60",clock6:"\uD83D\uDD55",clock630:"\uD83D\uDD61",clock7:"\uD83D\uDD56",clock730:"\uD83D\uDD62",clock8:"\uD83D\uDD57",clock830:"\uD83D\uDD63",clock9:"\uD83D\uDD58",clock930:"\uD83D\uDD64",closed_book:"\uD83D\uDCD5",closed_lock_with_key:"\uD83D\uDD10",closed_umbrella:"\uD83C\uDF02",cloud:"☁️",cloud_with_lightning:"\uD83C\uDF29",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"\uD83C\uDF27",cloud_with_snow:"\uD83C\uDF28",clown_face:"\uD83E\uDD21",clubs:"♣️",cocktail:"\uD83C\uDF78",coffee:"☕️",coffin:"⚰️",cold_sweat:"\uD83D\uDE30",comet:"☄️",computer:"\uD83D\uDCBB",computer_mouse:"\uD83D\uDDB1",confetti_ball:"\uD83C\uDF8A",confounded:"\uD83D\uDE16",confused:"\uD83D\uDE15",congratulations:"㊗️",construction:"\uD83D\uDEA7",construction_worker_man:"\uD83D\uDC77",construction_worker_woman:"\uD83D\uDC77&zwj;♀️",control_knobs:"\uD83C\uDF9B",convenience_store:"\uD83C\uDFEA",cookie:"\uD83C\uDF6A",co
1ol:"\uD83C\uDD92",policeman:"\uD83D\uDC6E",copyright:"\xa9️",corn:"\uD83C\uDF3D",couch_and_lamp:"\uD83D\uDECB",couple:"\uD83D\uDC6B",couple_with_heart_woman_man:"\uD83D\uDC91",couple_with_heart_man_man:"\uD83D\uDC68&zwj;❤️&zwj;\uD83D\uDC68",couple_with_heart_woman_woman:"\uD83D\uDC69&zwj;❤️&zwj;\uD83D\uDC69",couplekiss_man_man:"\uD83D\uDC68&zwj;❤️&zwj;\uD83D\uDC8B&zwj;\uD83D\uDC68",couplekiss_man_woman:"\uD83D\uDC8F",couplekiss_woman_woman:"\uD83D\uDC69&zwj;❤️&zwj;\uD83D\uDC8B&zwj;\uD83D\uDC69",cow:"\uD83D\uDC2E",cow2:"\uD83D\uDC04",cowboy_hat_face:"\uD83E\uDD20",crab:"\uD83E\uDD80",crayon:"\uD83D\uDD8D",credit_card:"\uD83D\uDCB3",crescent_moon:"\uD83C\uDF19",cricket:"\uD83C\uDFCF",crocodile:"\uD83D\uDC0A",croissant:"\uD83E\uDD50",crossed_fingers:"\uD83E\uDD1E",crossed_flags:"\uD83C\uDF8C",crossed_swords:"⚔️",crown:"\uD83D\uDC51",cry:"\uD83D\uDE22",crying_cat_face:"\uD83D\uDE3F",crystal_ball:"\uD83D\uDD2E",cucumber:"\uD83E\uDD52",cupid:"\uD83D\uDC98",curly_loop:"➰",currency_exchange:"\uD83D\uDCB1",curry:"\uD83C\uDF5B",custard:"\uD83C\uDF6E",customs:"\uD83D\uDEC3",cyclone:"\uD83C\uDF00",dagger:"\uD83D\uDDE1",dancer:"\uD83D\uDC83",dancing_women:"\uD83D\uDC6F",dancing_men:"\uD83D\uDC6F&zwj;♂️",dango:"\uD83C\uDF61",dark_sunglasses:"\uD83D\uDD76",dart:"\uD83C\uDFAF",dash:"\uD83D\uDCA8",date:"\uD83D\uDCC5",deciduous_tree:"\uD83C\uDF33",deer:"\uD83E\uDD8C",department_store:"\uD83C\uDFEC",derelict_house:"\uD83C\uDFDA",desert:"\uD83C\uDFDC",desert_island:"\uD83C\uDFDD",desktop_computer:"\uD83D\uDDA5",male_detective:"\uD83D\uDD75️",diamond_shape_with_a_dot_inside:"\uD83D\uDCA0",diamonds:"♦️",disappointed:"\uD83D\uDE1E",disappointed_relieved:"\uD83D\uDE25",dizzy:"\uD83D\uDCAB",dizzy_face:"\uD83D\uDE35",do_not_litter:"\uD83D\uDEAF",dog:"\uD83D\uDC36",dog2:"\uD83D\uDC15",dollar:"\uD83D\uDCB5",dolls:"\uD83C\uDF8E",dolphin:"\uD83D\uDC2C",door:"\uD83D\uDEAA",doughnut:"\uD83C\uDF69",dove:"\uD83D\uDD4A",dragon:"\uD83D\uDC09",dragon_face:"\uD83D\uDC32",dress:"\uD83D\uDC57",dromedary_camel:"\uD83D\uDC2A",drooling_face:"\uD83E\uDD24",droplet:"\uD83D\uDCA7",drum:"\uD83E\uDD41",duck:"\uD83E\uDD86",dvd:"\uD83D\uDCC0","e-mail":"\uD83D\uDCE7",eagle:"\uD83E\uDD85",ear:"\uD83D\uDC42",ear_of_rice:"\uD83C\uDF3E",earth_africa:"\uD83C\uDF0D",earth_americas:"\uD83C\uDF0E",earth_asia:"\uD83C\uDF0F",egg:"\uD83E\uDD5A",eggplant:"\uD83C\uDF46",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"\uD83D\uDD0C",elephant:"\uD83D\uDC18",email:"✉️",end:"\uD83D\uDD1A",envelope_with_arrow:"\uD83D\uDCE9",euro:"\uD83D\uDCB6",european_castle:"\uD83C\uDFF0",european_post_office:"\uD83C\uDFE4",evergreen_tree:"\uD83C\uDF32",exclamation:"❗️",expressionless:"\uD83D\uDE11",eye:"\uD83D\uDC41",eye_speech_bubble:"\uD83D\uDC41&zwj;\uD83D\uDDE8",eyeglasses:"\uD83D\uDC53",eyes:"\uD83D\uDC40",face_with_head_bandage:"\uD83E\uDD15",face_with_thermometer:"\uD83E\uDD12",fist_oncoming:"\uD83D\uDC4A",factory:"\uD83C\uDFED",fallen_leaf:"\uD83C\uDF42",family_man_woman_boy:"\uD83D\uDC6A",family_man_boy:"\uD83D\uDC68&zwj;\uD83D\uDC66",family_man_boy_boy:"\uD83D\uDC68&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",family_man_girl:"\uD83D\uDC68&zwj;\uD83D\uDC67",family_man_girl_boy:"\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",family_man_girl_girl:"\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",family_man_man_boy:"\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC66",family_man_man_boy_boy:"\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",family_man_man_girl:"\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67",family_man_man_girl_boy:"\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",family_man_man_girl_girl:"\uD83D\uDC68&zwj;\uD83D\uDC68&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",family_man_woman_boy_boy:"\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",family_man_woman_girl:"\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67",family_man_woman_girl_boy:"\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",family_man_woman_girl_girl:"\uD83D\uDC68&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",family_woman_boy:"\uD83D\uDC69&zwj;\uD83D\uDC66",family_woman_boy_boy:"\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",family_woman_girl:"\uD83D\uDC69&zwj;\uD83D\uDC67",family_woman_girl_boy:"\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",family_woman_girl_girl:"\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",family_woman_woman_boy:"\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66",family_woman_woman_boy_boy:"\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC66&zwj;\uD83D\uDC66",family_woman_woman_girl:"\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67",family_woman_woman_girl_boy:"\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC66",family_woman_woman_girl_girl:"\uD83D\uDC69&zwj;\uD83D\uDC69&zwj;\uD83D\uDC67&zwj;\uD83D\uDC67",fast_forward:"⏩",fax:"\uD83D\uDCE0",fearful:"\uD83D\uDE28",feet:"\uD83D\uDC3E",female_detective:"\uD83D\uDD75️&zwj;♀️",ferris_wheel:"\uD83C\uDFA1",ferry:"⛴",field_hockey:"\uD83C\uDFD1",file_cabinet:"\uD83D\uDDC4",file_folder:"\uD83D\uDCC1",film_projector:"\uD83D\uDCFD",film_strip:"\uD83C\uDF9E",fire:"\uD83D\uDD25",fire_engine:"\uD83D\uDE92",fireworks:"\uD83C\uDF86",first_quarter_moon:"\uD83C\uDF13",first_quarter_moon_with_face:"\uD83C\uDF1B",fish:"\uD83D\uDC1F",fish_cake:"\uD83C\uDF65",fishing_pole_and_fish:"\uD83C\uDFA3",fist_raised:"✊",fist_left:"\uD83E\uDD1B",fist_right:"\uD83E\uDD1C",flags:"\uD83C\uDF8F",flashlight:"\uD83D\uDD2
16",fleur_de_lis:"⚜️",flight_arrival:"\uD83D\uDEEC",flight_departure:"\uD83D\uDEEB",floppy_disk:"\uD83D\uDCBE",flower_playing_cards:"\uD83C\uDFB4",flushed:"\uD83D\uDE33",fog:"\uD83C\uDF2B",foggy:"\uD83C\uDF01",football:"\uD83C\uDFC8",footprints:"\uD83D\uDC63",fork_and_knife:"\uD83C\uDF74",fountain:"⛲️",fountain_pen:"\uD83D\uDD8B",four_leaf_clover:"\uD83C\uDF40",fox_face:"\uD83E\uDD8A",framed_picture:"\uD83D\uDDBC",free:"\uD83C\uDD93",fried_egg:"\uD83C\uDF73",fried_shrimp:"\uD83C\uDF64",fries:"\uD83C\uDF5F",frog:"\uD83D\uDC38",frowning:"\uD83D\uDE26",frowning_face:"☹️",frowning_man:"\uD83D\uDE4D&zwj;♂️",frowning_woman:"\uD83D\uDE4D",middle_finger:"\uD83D\uDD95",fuelpump:"⛽️",full_moon:"\uD83C\uDF15",full_moon_with_face:"\uD83C\uDF1D",funeral_urn:"⚱️",game_die:"\uD83C\uDFB2",gear:"⚙️",gem:"\uD83D\uDC8E",gemini:"♊️",ghost:"\uD83D\uDC7B",gift:"\uD83C\uDF81",gift_heart:"\uD83D\uDC9D",girl:"\uD83D\uDC67",globe_with_meridians:"\uD83C\uDF10",goal_net:"\uD83E\uDD45",goat:"\uD83D\uDC10",golf:"⛳️",golfing_man:"\uD83C\uDFCC️",golfing_woman:"\uD83C\uDFCC️&zwj;♀️",gorilla:"\uD83E\uDD8D",grapes:"\uD83C\uDF47",green_apple:"\uD83C\uDF4F",green_book:"\uD83D\uDCD7",green_heart:"\uD83D\uDC9A",green_salad:"\uD83E\uDD57",grey_exclamation:"❕",grey_question:"❔",grimacing:"\uD83D\uDE2C",grin:"\uD83D\uDE01",grinning:"\uD83D\uDE00",guardsman:"\uD83D\uDC82",guardswoman:"\uD83D\uDC82&zwj;♀️",guitar:"\uD83C\uDFB8",gun:"\uD83D\uDD2B",haircut_woman:"\uD83D\uDC87",haircut_man:"\uD83D\uDC87&zwj;♂️",hamburger:"\uD83C\uDF54",hammer:"\uD83D\uDD28",hammer_and_pick:"⚒",hammer_and_wrench:"\uD83D\uDEE0",hamster:"\uD83D\uDC39",hand:"✋",handbag:"\uD83D\uDC5C",handshake:"\uD83E\uDD1D",hankey:"\uD83D\uDCA9",hatched_chick:"\uD83D\uDC25",hatching_chick:"\uD83D\uDC23",headphones:"\uD83C\uDFA7",hear_no_evil:"\uD83D\uDE49",heart:"❤️",heart_decoration:"\uD83D\uDC9F",heart_eyes:"\uD83D\uDE0D",heart_eyes_cat:"\uD83D\uDE3B",heartbeat:"\uD83D\uDC93",heartpulse:"\uD83D\uDC97",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"\uD83D\uDCB2",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"\uD83D\uDE81",herb:"\uD83C\uDF3F",hibiscus:"\uD83C\uDF3A",high_brightness:"\uD83D\uDD06",high_heel:"\uD83D\uDC60",hocho:"\uD83D\uDD2A",hole:"\uD83D\uDD73",honey_pot:"\uD83C\uDF6F",horse:"\uD83D\uDC34",horse_racing:"\uD83C\uDFC7",hospital:"\uD83C\uDFE5",hot_pepper:"\uD83C\uDF36",hotdog:"\uD83C\uDF2D",hotel:"\uD83C\uDFE8",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"\uD83C\uDFE0",house_with_garden:"\uD83C\uDFE1",houses:"\uD83C\uDFD8",hugs:"\uD83E\uDD17",hushed:"\uD83D\uDE2F",ice_cream:"\uD83C\uDF68",ice_hockey:"\uD83C\uDFD2",ice_skate:"⛸",icecream:"\uD83C\uDF66",id:"\uD83C\uDD94",ideograph_advantage:"\uD83C\uDE50",imp:"\uD83D\uDC7F",inbox_tray:"\uD83D\uDCE5",incoming_envelope:"\uD83D\uDCE8",tipping_hand_woman:"\uD83D\uDC81",information_source:"ℹ️",innocent:"\uD83D\uDE07",interrobang:"⁉️",iphone:"\uD83D\uDCF1",izakaya_lantern:"\uD83C\uDFEE",jack_o_lantern:"\uD83C\uDF83",japan:"\uD83D\uDDFE",japanese_castle:"\uD83C\uDFEF",japanese_goblin:"\uD83D\uDC7A",japanese_ogre:"\uD83D\uDC79",jeans:"\uD83D\uDC56",joy:"\uD83D\uDE02",joy_cat:"\uD83D\uDE39",joystick:"\uD83D\uDD79",kaaba:"\uD83D\uDD4B",key:"\uD83D\uDD11",keyboard:"⌨️",keycap_ten:"\uD83D\uDD1F",kick_scooter:"\uD83D\uDEF4",kimono:"\uD83D\uDC58",kiss:"\uD83D\uDC8B",kissing:"\uD83D\uDE17",kissing_cat:"\uD83D\uDE3D",kissing_closed_eyes:"\uD83D\uDE1A",kissing_heart:"\uD83D\uDE18",kissing_smiling_eyes:"\uD83D\uDE19",kiwi_fruit:"\uD83E\uDD5D",koala:"\uD83D\uDC28",koko:"\uD83C\uDE01",label:"\uD83C\uDFF7",large_blue_circle:"\uD83D\uDD35",large_blue_diamond:"\uD83D\uDD37",large_orange_diamond:"\uD83D\uDD36",last_quarter_moon:"\uD83C\uDF17",last_quarter_moon_with_face:"\uD83C\uDF1C",latin_cross:"✝️",laughing:"\uD83D\uDE06",leaves:"\uD83C\uDF43",ledger:"\uD83D\uDCD2",left_luggage:"\uD83D\uDEC5",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"\uD83C\uDF4B",leo:"♌️",leopard:"\uD83D\uDC06",level_slider:"\uD83C\uDF9A",libra:"♎️",light_rail:"\uD83D\uDE88",link:"\uD83D\uDD17",lion:"\uD83E\uDD81",lips:"\uD83D\uDC44",lipstick:"\uD83D\uDC84",lizard:"\uD83E\uDD8E",lock:"\uD83D\uDD12",lock_with_ink_pen:"\uD83D\uDD0F",lollipop:"\uD83C\uDF6D",loop:"➿",loud_sound:"\uD83D\uDD0A",loudspeaker:"\uD83D\uDCE2",love_hotel:"\uD83C\uDFE9",love_letter:"\uD83D\uDC8C",low_brightness:"\uD83D\uDD05",lying_face:"\uD83E\uDD25",m:"Ⓜ️",mag:"\uD83D\uDD0D",mag_right:"\uD83D\uDD0E",mahjong:"\uD83C\uDC04️",mailbox:"\uD83D\uDCEB",mailbox_closed:"\uD83D\uDCEA",mailbox_with_mail:"\uD83D\uDCEC",mailbox_with_no_mail:"\uD83D\uDCED",man:"\uD83D\uDC68",man_artist:"\uD83D\uDC68&zwj;\uD83C\uDFA8",man_astronaut:"\uD83D\uDC68&zwj;\uD83D\uDE80",man_cartwheeling:"\uD83E\uDD38&zwj;♂️",man_cook:"\uD83D\uDC68&zwj;\uD83C\uDF73",man_dancing:"\uD83D\uDD7A",man_facepalming:"\uD83E\uDD26&zwj;♂️",man_factory_worker:"\uD83D\uDC68&zwj;\uD83C\uDFED",man_farmer:"\uD83D\uDC68&zwj;\uD83C\uDF3E",man_firefighter:"\uD83D\uDC68&zwj;\uD83D\uDE92",man_health_worker:"\uD83D\uDC68&zwj;⚕️",man_in_tuxedo:"\uD83E\uDD35",man_judge:"\uD83D\uDC68&zwj;⚖️",man_juggling:"\uD83E\uDD39&zwj;♂️",man_mechanic:"\uD83D\uDC68&zwj;\uD83D\uDD27",man_office_worker:"\uD83D\uDC68&zwj;\uD83D\uDCBC",man_pilot:"\uD83D\uDC68&zwj;✈️",man_playing_handball:"\uD83E\uDD3E&zwj;♂️",man_playing_water_polo:"\uD83E\uDD3D&zwj;
1♂️",man_scientist:"\uD83D\uDC68&zwj;\uD83D\uDD2C",man_shrugging:"\uD83E\uDD37&zwj;♂️",man_singer:"\uD83D\uDC68&zwj;\uD83C\uDFA4",man_student:"\uD83D\uDC68&zwj;\uD83C\uDF93",man_teacher:"\uD83D\uDC68&zwj;\uD83C\uDFEB",man_technologist:"\uD83D\uDC68&zwj;\uD83D\uDCBB",man_with_gua_pi_mao:"\uD83D\uDC72",man_with_turban:"\uD83D\uDC73",tangerine:"\uD83C\uDF4A",mans_shoe:"\uD83D\uDC5E",mantelpiece_clock:"\uD83D\uDD70",maple_leaf:"\uD83C\uDF41",martial_arts_uniform:"\uD83E\uDD4B",mask:"\uD83D\uDE37",massage_woman:"\uD83D\uDC86",massage_man:"\uD83D\uDC86&zwj;♂️",meat_on_bone:"\uD83C\uDF56",medal_military:"\uD83C\uDF96",medal_sports:"\uD83C\uDFC5",mega:"\uD83D\uDCE3",melon:"\uD83C\uDF48",memo:"\uD83D\uDCDD",men_wrestling:"\uD83E\uDD3C&zwj;♂️",menorah:"\uD83D\uDD4E",mens:"\uD83D\uDEB9",metal:"\uD83E\uDD18",metro:"\uD83D\uDE87",microphone:"\uD83C\uDFA4",microscope:"\uD83D\uDD2C",milk_glass:"\uD83E\uDD5B",milky_way:"\uD83C\uDF0C",minibus:"\uD83D\uDE90",minidisc:"\uD83D\uDCBD",mobile_phone_off:"\uD83D\uDCF4",money_mouth_face:"\uD83E\uDD11",money_with_wings:"\uD83D\uDCB8",moneybag:"\uD83D\uDCB0",monkey:"\uD83D\uDC12",monkey_face:"\uD83D\uDC35",monorail:"\uD83D\uDE9D",moon:"\uD83C\uDF14",mortar_board:"\uD83C\uDF93",mosque:"\uD83D\uDD4C",motor_boat:"\uD83D\uDEE5",motor_scooter:"\uD83D\uDEF5",motorcycle:"\uD83C\uDFCD",motorway:"\uD83D\uDEE3",mount_fuji:"\uD83D\uDDFB",mountain:"⛰",mountain_biking_man:"\uD83D\uDEB5",mountain_biking_woman:"\uD83D\uDEB5&zwj;♀️",mountain_cableway:"\uD83D\uDEA0",mountain_railway:"\uD83D\uDE9E",mountain_snow:"\uD83C\uDFD4",mouse:"\uD83D\uDC2D",mouse2:"\uD83D\uDC01",movie_camera:"\uD83C\uDFA5",moyai:"\uD83D\uDDFF",mrs_claus:"\uD83E\uDD36",muscle:"\uD83D\uDCAA",mushroom:"\uD83C\uDF44",musical_keyboard:"\uD83C\uDFB9",musical_note:"\uD83C\uDFB5",musical_score:"\uD83C\uDFBC",mute:"\uD83D\uDD07",nail_care:"\uD83D\uDC85",name_badge:"\uD83D\uDCDB",national_park:"\uD83C\uDFDE",nauseated_face:"\uD83E\uDD22",necktie:"\uD83D\uDC54",negative_squared_cross_mark:"❎",nerd_face:"\uD83E\uDD13",neutral_face:"\uD83D\uDE10",new:"\uD83C\uDD95",new_moon:"\uD83C\uDF11",new_moon_with_face:"\uD83C\uDF1A",newspaper:"\uD83D\uDCF0",newspaper_roll:"\uD83D\uDDDE",next_track_button:"⏭",ng:"\uD83C\uDD96",no_good_man:"\uD83D\uDE45&zwj;♂️",no_good_woman:"\uD83D\uDE45",night_with_stars:"\uD83C\uDF03",no_bell:"\uD83D\uDD15",no_bicycles:"\uD83D\uDEB3",no_entry:"⛔️",no_entry_sign:"\uD83D\uDEAB",no_mobile_phones:"\uD83D\uDCF5",no_mouth:"\uD83D\uDE36",no_pedestrians:"\uD83D\uDEB7",no_smoking:"\uD83D\uDEAD","non-potable_water":"\uD83D\uDEB1",nose:"\uD83D\uDC43",notebook:"\uD83D\uDCD3",notebook_with_decorative_cover:"\uD83D\uDCD4",notes:"\uD83C\uDFB6",nut_and_bolt:"\uD83D\uDD29",o:"⭕️",o2:"\uD83C\uDD7E️",ocean:"\uD83C\uDF0A",octopus:"\uD83D\uDC19",oden:"\uD83C\uDF62",office:"\uD83C\uDFE2",oil_drum:"\uD83D\uDEE2",ok:"\uD83C\uDD97",ok_hand:"\uD83D\uDC4C",ok_man:"\uD83D\uDE46&zwj;♂️",ok_woman:"\uD83D\uDE46",old_key:"\uD83D\uDDDD",older_man:"\uD83D\uDC74",older_woman:"\uD83D\uDC75",om:"\uD83D\uDD49",on:"\uD83D\uDD1B",oncoming_automobile:"\uD83D\uDE98",oncoming_bus:"\uD83D\uDE8D",oncoming_police_car:"\uD83D\uDE94",oncoming_taxi:"\uD83D\uDE96",open_file_folder:"\uD83D\uDCC2",open_hands:"\uD83D\uDC50",open_mouth:"\uD83D\uDE2E",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"\uD83D\uDCD9",orthodox_cross:"☦️",outbox_tray:"\uD83D\uDCE4",owl:"\uD83E\uDD89",ox:"\uD83D\uDC02",package:"\uD83D\uDCE6",page_facing_up:"\uD83D\uDCC4",page_with_curl:"\uD83D\uDCC3",pager:"\uD83D\uDCDF",paintbrush:"\uD83D\uDD8C",palm_tree:"\uD83C\uDF34",pancakes:"\uD83E\uDD5E",panda_face:"\uD83D\uDC3C",paperclip:"\uD83D\uDCCE",paperclips:"\uD83D\uDD87",parasol_on_ground:"⛱",parking:"\uD83C\uDD7F️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"\uD83D\uDEF3",passport_control:"\uD83D\uDEC2",pause_button:"⏸",peace_symbol:"☮️",peach:"\uD83C\uDF51",peanuts:"\uD83E\uDD5C",pear:"\uD83C\uDF50",pen:"\uD83D\uDD8A",pencil2:"✏️",penguin:"\uD83D\uDC27",pensive:"\uD83D\uDE14",performing_arts:"\uD83C\uDFAD",persevere:"\uD83D\uDE23",person_fencing:"\uD83E\uDD3A",pouting_woman:"\uD83D\uDE4E",phone:"☎️",pick:"⛏",pig:"\uD83D\uDC37",pig2:"\uD83D\uDC16",pig_nose:"\uD83D\uDC3D",pill:"\uD83D\uDC8A",pineapple:"\uD83C\uDF4D",ping_pong:"\uD83C\uDFD3",pisces:"♓️",pizza:"\uD83C\uDF55",place_of_worship:"\uD83D\uDED0",plate_with_cutlery:"\uD83C\uDF7D",play_or_pause_button:"⏯",point_down:"\uD83D\uDC47",point_left:"\uD83D\uDC48",point_right:"\uD83D\uDC49",point_up:"☝️",point_up_2:"\uD83D\uDC46",police_car:"\uD83D\uDE93",policewoman:"\uD83D\uDC6E&zwj;♀️",poodle:"\uD83D\uDC29",popcorn:"\uD83C\uDF7F",post_office:"\uD83C\uDFE3",postal_horn:"\uD83D\uDCEF",postbox:"\uD83D\uDCEE",potable_water:"\uD83D\uDEB0",potato:"\uD83E\uDD54",pouch:"\uD83D\uDC5D",poultry_leg:"\uD83C\uDF57",pound:"\uD83D\uDCB7",rage:"\uD83D\uDE21",pouting_cat:"\uD83D\uDE3E",pouting_man:"\uD83D\uDE4E&zwj;♂️",pray:"\uD83D\uDE4F",prayer_beads:"\uD83D\uDCFF",pregnant_woman:"\uD83E\uDD30",previous_track_button:"⏮",prince:"\uD83E\uDD34",princess:"\uD83D\uDC78",printer:"\uD83D\uDDA8",purple_heart:"\uD83D\uDC9C",purse:"\uD83D\uDC5B",pushpin:"\uD83D\uDCCC",put_litter_in_its_place:"\uD83D\uDEAE",question:"❓",rabbit:"\uD83D\uDC30",rabbit2:"\uD83D\uDC07",racehorse:"\uD83D\uDC0E",racing_car:"\uD83C\uDFCE",radio:"\uD83D\uDCFB",radio_button:"\uD83D\uDD18",radioactive:"☢️",railway_car:"\uD83D\uDE83",railway_track:"\uD83D\uDEE4",rainbow:"\uD83C\uDF08",rainbow_flag:"\uD83C\uDFF3️&zwj;\uD83C\uDF08",raised_back_of_hand:"\uD83E\uDD1A",raised_hand_with_fingers_splayed:"\uD83D\uDD90",raised_hands:"\uD83D\uDE4C",raising_hand_woman:"\uD83D\uDE4B",raising_hand_man:"\uD83D\uDE4B&zwj;♂️",ram:"\uD83D\uDC0F",ramen:"\uD83C\uDF5C",rat:"\uD83D\uDC00",record_button:"⏺",recycle:"♻️",red_circle:"\uD83D\uDD34",registered:"\xae️",relaxed:"☺️",relieved:"\uD83D\uDE0C",reminder_ribbon:"\uD83C\uDF97",repeat:"\uD83D\uDD01",repeat_one:"\uD83D\uDD02",rescue_worker_helmet:"⛑",restroom:"\uD83D\uDEBB",revolving_hearts:"\uD83D\uDC9E",rewind:"⏪",rhinoceros:"\uD83E\uDD8F",ribbon:"\uD83C\uDF80",rice:"\uD83C\uDF5A",rice_ball:"\uD83C\uDF59",rice_cracker:"\uD83C\uDF58",rice_scene:"\uD83C\uDF91",right_anger_bubble:"\uD83D\uDDEF",ring:"\uD83D\uDC8D",robot:"\uD83E\uDD16",rocket:"\uD83D\uDE80",rofl:"\uD83E\uDD23",roll_eyes:"\uD83D\uDE44",roller_coaster:"\uD83C\uDFA2",rooster:"\uD83D\uDC13",rose:"\uD83C\uDF39",rosette:"\uD83C\uDFF5",rotating_light:"\uD83D\uDEA8",round_pushpin:"\uD83D\uDCCD",rowing_man:"\uD83D\uDEA3",rowing_woman:"\uD83D\uDEA3&zwj;♀️",rugby_football:"\uD83C\uDFC9",running_man:"\uD83C\uDFC3",running_shirt_with_sash:"\uD83C\uDFBD",running_woman:"\uD83C\uDFC3&zwj;♀️",sa:"\uD83C\uDE02️",sagittarius:"♐️",sake:"\uD83C\uDF76",sandal:"\uD83D\uDC61",santa:"\uD83C\uDF85",satellite:"\uD83D\uDCE1",saxophone:"\uD83C\uDFB7",school:"\uD83C\uDFEB",school_satchel:"\uD83C\uDF92",scissors:"✂️",scorpion:"\uD83E\uDD82",scorpius:"♏️",
1scream:"\uD83D\uDE31",scream_cat:"\uD83D\uDE40",scroll:"\uD83D\uDCDC",seat:"\uD83D\uDCBA",secret:"㊙️",see_no_evil:"\uD83D\uDE48",seedling:"\uD83C\uDF31",selfie:"\uD83E\uDD33",shallow_pan_of_food:"\uD83E\uDD58",shamrock:"☘️",shark:"\uD83E\uDD88",shaved_ice:"\uD83C\uDF67",sheep:"\uD83D\uDC11",shell:"\uD83D\uDC1A",shield:"\uD83D\uDEE1",shinto_shrine:"⛩",ship:"\uD83D\uDEA2",shirt:"\uD83D\uDC55",shopping:"\uD83D\uDECD",shopping_cart:"\uD83D\uDED2",shower:"\uD83D\uDEBF",shrimp:"\uD83E\uDD90",signal_strength:"\uD83D\uDCF6",six_pointed_star:"\uD83D\uDD2F",ski:"\uD83C\uDFBF",skier:"⛷",skull:"\uD83D\uDC80",skull_and_crossbones:"☠️",sleeping:"\uD83D\uDE34",sleeping_bed:"\uD83D\uDECC",sleepy:"\uD83D\uDE2A",slightly_frowning_face:"\uD83D\uDE41",slightly_smiling_face:"\uD83D\uDE42",slot_machine:"\uD83C\uDFB0",small_airplane:"\uD83D\uDEE9",small_blue_diamond:"\uD83D\uDD39",small_orange_diamond:"\uD83D\uDD38",small_red_triangle:"\uD83D\uDD3A",small_red_triangle_down:"\uD83D\uDD3B",smile:"\uD83D\uDE04",smile_cat:"\uD83D\uDE38",smiley:"\uD83D\uDE03",smiley_cat:"\uD83D\uDE3A",smiling_imp:"\uD83D\uDE08",smirk:"\uD83D\uDE0F",smirk_cat:"\uD83D\uDE3C",smoking:"\uD83D\uDEAC",snail:"\uD83D\uDC0C",snake:"\uD83D\uDC0D",sneezing_face:"\uD83E\uDD27",snowboarder:"\uD83C\uDFC2",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"\uD83D\uDE2D",soccer:"⚽️",soon:"\uD83D\uDD1C",sos:"\uD83C\uDD98",sound:"\uD83D\uDD09",space_invader:"\uD83D\uDC7E",spades:"♠️",spaghetti:"\uD83C\uDF5D",sparkle:"❇️",sparkler:"\uD83C\uDF87",sparkles:"✨",sparkling_heart:"\uD83D\uDC96",speak_no_evil:"\uD83D\uDE4A",speaker:"\uD83D\uDD08",speaking_head:"\uD83D\uDDE3",speech_balloon:"\uD83D\uDCAC",speedboat:"\uD83D\uDEA4",spider:"\uD83D\uDD77",spider_web:"\uD83D\uDD78",spiral_calendar:"\uD83D\uDDD3",spiral_notepad:"\uD83D\uDDD2",spoon:"\uD83E\uDD44",squid:"\uD83E\uDD91",stadium:"\uD83C\uDFDF",star:"⭐️",star2:"\uD83C\uDF1F",star_and_crescent:"☪️",star_of_david:"✡️",stars:"\uD83C\uDF20",station:"\uD83D\uDE89",statue_of_liberty:"\uD83D\uDDFD",steam_locomotive:"\uD83D\uDE82",stew:"\uD83C\uDF72",stop_button:"⏹",stop_sign:"\uD83D\uDED1",stopwatch:"⏱",straight_ruler:"\uD83D\uDCCF",strawberry:"\uD83C\uDF53",stuck_out_tongue:"\uD83D\uDE1B",stuck_out_tongue_closed_eyes:"\uD83D\uDE1D",stuck_out_tongue_winking_eye:"\uD83D\uDE1C",studio_microphone:"\uD83C\uDF99",stuffed_flatbread:"\uD83E\uDD59",sun_behind_large_cloud:"\uD83C\uDF25",sun_behind_rain_cloud:"\uD83C\uDF26",sun_behind_small_cloud:"\uD83C\uDF24",sun_with_face:"\uD83C\uDF1E",sunflower:"\uD83C\uDF3B",sunglasses:"\uD83D\uDE0E",sunny:"☀️",sunrise:"\uD83C\uDF05",sunrise_over_mountains:"\uD83C\uDF04",surfing_man:"\uD83C\uDFC4",surf
1ing_woman:"\uD83C\uDFC4&zwj;♀️",sushi:"\uD83C\uDF63",suspension_railway:"\uD83D\uDE9F",sweat:"\uD83D\uDE13",sweat_drops:"\uD83D\uDCA6",sweat_smile:"\uD83D\uDE05",sweet_potato:"\uD83C\uDF60",swimming_man:"\uD83C\uDFCA",swimming_woman:"\uD83C\uDFCA&zwj;♀️",symbols:"\uD83D\uDD23",synagogue:"\uD83D\uDD4D",syringe:"\uD83D\uDC89",taco:"\uD83C\uDF2E",tada:"\uD83C\uDF89",tanabata_tree:"\uD83C\uDF8B",taurus:"♉️",taxi:"\uD83D\uDE95",tea:"\uD83C\uDF75",telephone_receiver:"\uD83D\uDCDE",telescope:"\uD83D\uDD2D",tennis:"\uD83C\uDFBE",tent:"⛺️",thermometer:"\uD83C\uDF21",thinking:"\uD83E\uDD14",thought_balloon:"\uD83D\uDCAD",ticket:"\uD83C\uDFAB",tickets:"\uD83C\uDF9F",tiger:"\uD83D\uDC2F",tiger2:"\uD83D\uDC05",timer_clock:"⏲",tipping_hand_man:"\uD83D\uDC81&zwj;♂️",tired_face:"\uD83D\uDE2B",tm:"™️",toilet:"\uD83D\uDEBD",tokyo_tower:"\uD83D\uDDFC",tomato:"\uD83C\uDF45",tongue:"\uD83D\uDC45",top:"\uD83D\uDD1D",tophat:"\uD83C\uDFA9",tornado:"\uD83C\uDF2A",trackball:"\uD83D\uDDB2",tractor:"\uD83D\uDE9C",traffic_light:"\uD83D\uDEA5",train:"\uD83D\uDE8B",train2:"\uD83D\uDE86",tram:"\uD83D\uDE8A",triangular_flag_on_post:"\uD83D\uDEA9",triangular_ruler:"\uD83D\uDCD0",trident:"\uD83D\uDD31",triumph:"\uD83D\uDE24",trolleybus:"\uD83D\uDE8E",trophy:"\uD83C\uDFC6",tropical_drink:"\uD83C\uDF79",tropical_fish:"\uD83D\uDC20",truck:"\uD83D\uDE9A",trumpet:"\uD83C\uDFBA",tulip:"\uD83C\uDF37",tumbler_glass:"\uD83E\uDD43",turkey:"\uD83E\uDD83",turtle:"\uD83D\uDC22",tv:"\uD83D\uDCFA",twisted_rightwards_arrows:"\uD83D\uDD00",two_hearts:"\uD83D\uDC95",two_men_holding_hands:"\uD83D\uDC6C",two_women_holding_hands:"\uD83D\uDC6D",u5272:"\uD83C\uDE39",u5408:"\uD83C\uDE34",u55b6:"\uD83C\uDE3A",u6307:"\uD83C\uDE2F️",u6708:"\uD83C\uDE37️",u6709:"\uD83C\uDE36",u6e80:"\uD83C\uDE35",u7121:"\uD83C\uDE1A️",u7533:"\uD83C\uDE38",u7981:"\uD83C\uDE32",u7a7a:"\uD83C\uDE33",umbrella:"☔️",unamused:"\uD83D\uDE12",underage:"\uD83D\uDD1E",unicorn:"\uD83E\uDD84",unlock:"\uD83D\uDD13",up:"\uD83C\uDD99",upside_down_face:"\uD83D\uDE43",v:"✌️",vertical_traffic_light:"\uD83D\uDEA6",vhs:"\uD83D\uDCFC",vibration_mode:"\uD83D\uDCF3",video_camera:"\uD83D\uDCF9",video_game:"\uD83C\uDFAE",violin:"\uD83C\uDFBB",virgo:"♍️",volcano:"\uD83C\uDF0B",volleyball:"\uD83C\uDFD0",vs:"\uD83C\uDD9A",vulcan_salute:"\uD83D\uDD96",walking_man:"\uD83D\uDEB6",walking_woman:"\uD83D\uDEB6&zwj;♀️",waning_crescent_moon:"\uD83C\uDF18",waning_gibbous_moon:"\uD83C\uDF16",warning:"⚠️",wastebasket:"\uD83D\uDDD1",watch:"⌚️",water_buffalo:"\uD83D\uDC03",watermelon:"\uD83C\uDF49",wave:"\uD83D\uDC4B",wavy_dash:"〰️",waxing_crescent_moon:"\uD83C\uDF12",wc:"\uD83D\uDEBE",weary:"\uD83D\uDE29",wedding:"\uD83D\uDC92",weight_lifting_man:"\uD83C\uDFCB️",weight_lifting_woman:"\uD83C\uDFCB️&zwj;♀️",whale:"\uD83D\uDC33",whale2:"\uD83D\uDC0B",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"\uD83C\uDFF3️",white_flower:"\uD83D\uDCAE",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"\uD83D\uDD33",wilted_flower:"\uD83E\uDD40",wind_chime:"\uD83C\uDF90",wind_face:"\uD83C\uDF2C",wine_glass:"\uD83C\uDF77",wink:"\uD83D\uDE09",wolf:"\uD83D\uDC3A",woman:"\uD83D\uDC69",woman_artist:"\uD83D\uDC69&zwj;\uD83C\uDFA8",woman_astronaut:"\uD83D\uDC69&zwj;\uD83D\uDE80",woman_cartwheeling:"\uD83E\uDD38&zwj;♀️",woman_cook:"\uD83D\uDC69&zwj;\uD83C\uDF73",woman_facepalming:"\uD83E\uDD26&zwj;♀️",woman_factory_worker:"\uD83D\uDC69&zwj;\uD83C\uDFED",woman_farmer:"\uD83D\uDC69&zwj;\uD83C\uDF3E",woman_firefighter:"\uD83D\uDC69&zwj;\uD83D\uDE92",woman_health_worker:"\uD83D\uDC69&zwj;⚕️",woman_judge:"\uD83D\uDC69&zwj;⚖️",woman_juggling:"\uD83E\uDD39&zwj;♀️",woman_mechanic:"\uD83D\uDC69&zwj;\uD83D\uDD27",woman_office_worker:"\uD83D\uDC69&zwj;\uD83D\uDCBC",woman_pilot:"\uD83D\uDC69&zwj;✈️",woman_playing_handball:"\uD83E\uDD3E&zwj;♀️",woman_playing_water_polo:"\uD83E\uDD3D&zwj;♀️",woman_scientist:"\uD83D\uDC69&zwj;\uD83D\uDD2C",woman_shrugging:"\uD83E\uDD37&zwj;♀️",woman_singer:"\uD83D\uDC69&zwj;\uD83C\uDFA4",woman_student:"\uD83D\uDC69&zwj;\uD83C\uDF93",woman_teacher:"\uD83D\uDC69&zwj;\uD83C\uDFEB",woman_technologist:"\uD83D\uDC69&zwj;\uD83D\uDCBB",woman_with_turban:"\uD83D\uDC73&zwj;♀️",womans_clothes:"\uD83D\uDC5A",womans_hat:"\uD83D\uDC52",women_wrestling:"\uD83E\uDD3C&zwj;♀️",womens:"\uD83D\uDEBA",world_map:"\uD83D\uDDFA",worried:"\uD83D\uDE1F",wrench:"\uD83D\uDD27",writing_hand:"✍️",x:"❌",yellow_heart:"\uD83D\uDC9B",yen:"\uD83D\uDCB4",yin_yang:"☯️",yum:"\uD83D\uDE0B",zap:"⚡️",zipper_mouth_face:"\uD83E\uDD10",zzz:"\uD83D\uDCA4",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">
1',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},t.Converter=function(e){"use strict";var r={},c=[],u=[],d={},p=i,f={parsed:{},raw:"",format:""};function _parseExtension(e,r){if(r=r||null,t.helper.isString(e)){if(r=e=t.helper.stdExtName(e),t.extensions[e]){console.warn("DEPRECATION WARNING: "+e+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),legacyExtensionLoading(t.extensions[e],e);return}if(t.helper.isUndefined(n[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=n[e]}"function"==typeof e&&(e=e()),t.helper.isArray(e)||(e=[e]);var o=validate(e,r);if(!o.valid)throw Error(o.error);for(var i=0;i<e.length;++i){switch(e[i].type){case"lang":c.push(e[i]);break;case"output":u.push(e[i])}if(e[i].hasOwnProperty("listeners"))for(var l in e[i].listeners)e[i].listeners.hasOwnProperty(l)&&listen(l,e[i].listeners[l])}}function legacyExtensionLoading(e,r){"function"==typeof e&&(e=e(new t.Converter)),t.helper.isArray(e)||(e=[e]);var n=validate(e,r);if(!n.valid)throw Error(n.error);for(var o=0;o<e.length;++o)switch(e[o].type){case"lang":c.push(e[o]);break;case"output":u.push(e[o]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}function listen(e,r){if(!t.helper.isString(e))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+typeof e+" given");if("function"!=typeof r)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+typeof r+" given");d.hasOwnProperty(e)||(d[e]=[]),d[e].push(r)}function rTrimInputText(e){var t=RegExp("^\\s{0,"+e.match(/^\s*/)[0].length+"}","gm");return e.replace(t,"")}(function _constructor(){for(var n in e=e||{},o)o.hasOwnProperty(n)&&(r[n]=o[n]);if("object"==typeof e)for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof e+" was passed instead.");r.extensions&&t.helper.forEach(r.extensions,_parseExtension)})(),this._dispatch=function(e,t,r,n){if(d.hasOwnProperty(e))for(var o=0;o<d[e].length;++o){var i=d[e][o](e,t,this,r,n);i&&void 0!==i&&(t=i)}return t},this.listen=function(e,t){return listen(e,t),this},this.makeHtml=function(e){if(!e)return e;var n={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:c,outputModifiers:u,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/¨/g,"\xa8T")).replace(/\$/g,"\xa8D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),r.smartIndentationFix&&(e=rTrimInputText(e)),e="\n\n"+e+"\n\n",e=(e=t.subParser("detab")(e,r,n)).replace(/^[ \t]+$/mg,""),t.helper.forEach(c,function(o){e=t.subParser("runExtension")(o,e,r,n)}),e=t.subParser("metadata")(e,r,n),e=t.subParser("hashPreCodeTags")(e,r,n),e=t.subParser("githubCodeBlocks")(e,r,n),e=t.subParser("hashHTMLBlocks")(e,r,n),e=t.subParser("hashCodeTags")(e,r,n),e=t.subParser("stripLinkDefinitions")(e,r,n),e=t.subParser("blockGamut")(e,r,n),e=t.subParser("unhashHTMLSpans")(e,r,n),e=(e=(e=t.subParser("unescapeSpecialChars")(e,r,n)).replace(/¨D/g,"$$")).replace(/¨T/g,"\xa8"),e=t.subParser("completeHTMLDocument")(e,r,n),t.helper.forEach(u,function(o){e=t.subParser("runExtension")(o,e,r,n)}),f=n.metadata,e},this.makeMarkdown=this.makeMd=function(e,r){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">\xa8NBSP;<"),!r)if(window&&window.document)r=window.document;else throw Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var n=r.createElement("div");n.innerHTML=e;var o={preList:substitutePreCodeTags(n)};clean(n);for(var i=n.childNodes,l="",c=0;c<i.length;c++)l+=t.subParser("makeMarkdown.node")(i[c],o);function clean(e){for(var t=0;t<e.childNodes.length;++t){var r=e.childNodes[t];3===r.nodeType?/\S/.test(r.nodeValue)||/^[ ]+$/.test(r.nodeValue)?(r.nodeValue=r.nodeValue.split("\n").join(" "),r.nodeValue=r.nodeValue.replace(/(\s)+/g,"$1")):(e.removeChild(r),--t):1===r.nodeType&&clean(r)}}function substitutePreCodeTags(e){for(var r=e.querySelectorAll("pre"),n=[],o=0;o<r.length;++o)if(1===r[o].childElementCount&&"code"===r[o].firstChild.tagName.toLowerCase()){var i=r[o].firstChild.innerHTML.trim(),l=r[o].firstChild.getAttribute("data-language")||"";if(""===l)for(var c=r[o].firstChild.className.split(" "),u=0;u<c.length;++u){var d=c[u].match(/^language-(.+)$/);if(null!==d){l=d[1];break}}i=t.helper.unescapeHTMLEntities(i),n.push(i),r[o].outerHTML='<precode language="'+l+'" precodenum="'+o.toString()+'"></precode>'}else n.push(r[o].innerHTML),r[o].innerHTML="",r[o].setAttribute("prenum",o.toString());return n}return l},this.setOption=function(e,t){r[e]=t},this.getOption=function(e){return r[e]},this.getOptions=function(){return r},this.addExtension=function(e,t){_parseExtension(e,t=t||null)},this.useExtension=function(e){_parseExtension(e)},this.setFlavor=function(e){if(!l.hasOwnProperty(e))throw Error(e+" flavor was not found");var t=l[e];for(var n in p=e,t)t.hasOwnProperty(n)&&(r[n]=t[n])},this.getFlavor=function(){return p},this.removeExtension=function(e){t.helper.isArray(e)||(e=[e]);for(var r=0;r<e.length;++r){for(var n=e[r],o=0;o<c.length;++o)c[o]===n&&c.splice(o,1);for(var i=0;i<u.length;++i)u[i]===n&&u.splice(i,1)}},this.getAllExtensions=function(){return{language:c,output:u}},this.getMetadata=function(e){return e?f.raw:f.parsed},this.getMetadataFormat=function(){return f.format},this._setMetadataPair=function(e,t){f.parsed[e]=t},this._setMetadataFormat=function(e){f.format=e},this._setMetadataRaw=function(e){f.raw=e}},t.subParser("anchors",function(e,r,n){"use strict";e=n.converter._dispatch("anchors.before",e,r,n);var writeAnchorTag=function(e,o,i,l,c,u,d){if(t.helper.isUndefined(d)&&(d=""),i=i.toLowerCase(),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)l="";else if(!l){if(i||(i=o.toLowerCase().replace(/ ?\n/g," ")),l="#"+i,t.helper.isUndefined(n.gUrls[i]))return e;l=n.gUrls[i],t.helper.isUndefined(n.gTitles[i])||(d=n.gTitles[i])}var p='<a href="'+(l=l.replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback))+'"';return""!==d&&null!==d&&(p+=' title="'+(d=(d=d.replace(/"/g,"&quot;")).replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback))+'"'),r.openLinksInNewWindow&&!/^#/.test(l)&&(p+=' rel="noopener noreferrer" target="\xa8E95Eblank"'),p+=">"+o+"</a>"};
1return e=(e=(e=(e=e.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,writeAnchorTag)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,writeAnchorTag)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,writeAnchorTag)).replace(/\[([^\[\]]+)]()()()()()/g,writeAnchorTag),r.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(e,n,o,i,l){if("\\"===o)return n+i;if(!t.helper.isString(r.ghMentionsLink))throw Error("ghMentionsLink option must be a string");var c=r.ghMentionsLink.replace(/\{u}/g,l),u="";return r.openLinksInNewWindow&&(u=' rel="noopener noreferrer" target="\xa8E95Eblank"'),n+'<a href="'+c+'"'+u+">"+i+"</a>"})),e=n.converter._dispatch("anchors.after",e,r,n)});var c=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,u=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,d=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,p=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,f=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,replaceLink=function(e){return function(r,n,o,i,l,c,u){var d=o=o.replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback),p="",f="";return/^www\./i.test(o)&&(o=o.replace(/^www\./i,"http://www.")),e.excludeTrailingPunctuationFromURLs&&c&&(p=c),e.openLinksInNewWindow&&(f=' rel="noopener noreferrer" target="\xa8E95Eblank"'),(n||"")+'<a href="'+o+'"'+f+">"+d+"</a>"+p+(u||"")}},replaceMail=function(e,r){return function(n,o,i){var l="mailto:";return o=o||"",i=t.subParser("unescapeSpecialChars")(i,e,r),e.encodeEmails?(l=t.helper.encodeEmailAddress(l+i),i=t.helper.encodeEmailAddress(i)):l+=i,o+'<a href="'+l+'">'+i+"</a>"}};t.subParser("autoLinks",function(e,t,r){return e=(e=(e=r.converter._dispatch("autoLinks.before",e,t,r)).replace(d,replaceLink(t))).replace(f,replaceMail(t,r)),e=r.converter._dispatch("autoLinks.after",e,t,r)}),t.subParser("simplifiedAutoLinks",function(e,t,r){return t.simplifiedAutoLink?(e=r.converter._dispatch("simplifiedAutoLinks.before",e,t,r),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(u,replaceLink(t)):e.replace(c,replaceLink(t))).replace(p,replaceMail(t,r)),e=r.converter._dispatch("simplifiedAutoLinks.after",e,t,r)):e}),t.subParser("blockGamut",function(e,r,n){return e=n.converter._dispatch("blockGamut.before",e,r,n),e=t.subParser("blockQuotes")(e,r,n),e=t.subParser("headers")(e,r,n),e=t.subParser("horizontalRule")(e,r,n),e=t.subParser("lists")(e,r,n),e=t.subParser("codeBlocks")(e,r,n),e=t.subParser("tables")(e,r,n),e=t.subParser("hashHTMLBlocks")(e,r,n),e=t.subParser("paragraphs")(e,r,n),e=n.converter._dispatch("blockGamut.after",e,r,n)}),t.subParser("blockQuotes",function(e,r,n){"use strict";e=n.converter._dispatch("blockQuotes.before",e,r,n)+"\n\n";var o=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return r.splitAdjacentBlockquotes&&(o=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(o,function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/¨0/g,"")).replace(/^[ \t]+$/gm,""),e=t.subParser("githubCodeBlocks")(e,r,n),e=(e=(e=t.subParser("blockGamut")(e,r,n)).replace(/(^|\n)/g,"$1  ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,t){var r=t;return(r=r.replace(/^  /mg,"\xa80")).replace(/¨0/g,"")}),t.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",r,n)}),e=n.converter._dispatch("blockQuotes.after",e,r,n)}),t.subParser("codeBlocks",function(e,r,n){return e=(e=(e=n.converter._dispatch("codeBlocks.before",e,r,n)+"\xa80").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g,function(e,o,i){var l=o,c="\n";return l=t.subParser("outdent")(l,r,n),l=t.subParser("encodeCode")(l,r,n),l=(l=(l=t.subParser("detab")(l,r,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""),r.omitExtraWLInCodeBlocks&&(c=""),l="<pre><code>"+l+c+"</code></pre>",t.subParser("hashBlock")(l,r,n)+i})).replace(/¨0/,""),e=n.converter._dispatch("codeBlocks.after",e,r,n)}),t.subParser("codeSpans",function(e,r,n){return void 0===(e=n.converter._dispatch("codeSpans.before",e,r,n))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,o,i,l){var c=l;return c=(c=c.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),c=o+"<code>"+(c=t.subParser("encodeCode")(c,r,n))+"</code>",c=t.subParser("hashHTMLSpans")(c,r,n)}),e=n.converter._dispatch("codeSpans.after",e,r,n)}),t.subParser("completeHTMLDocument",function(e,t,r){"use strict";if(!t.completeHTMLDocument)return e;e=r.converter._dispatch("completeHTMLDocument.before",e,t,r);var n="html",o="<!DOCTYPE HTML>\n",i="",l='<meta charset="utf-8">\n',c="",u="";for(var d in void 0!==r.metadata.parsed.doctype&&(o="<!DOCTYPE "+r.metadata.parsed.doctype+">\n",("html"===(n=r.metadata.parsed.doctype.toString().toLowerCase())||"html5"===n)&&(l='<meta charset="utf-8">')),r.metadata.parsed)if(r.metadata.parsed.hasOwnProperty(d))switch(d.toLowerCase()){case"doctype":break;case"title":i="<title>"+r.metadata.parsed.title+"</title>\n";break;case"charset":l="html"===n||"html5"===n?'<meta charset="'+r.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+r.metadata.parsed.charset+'">\n';break;case"language":case"lang":c=' lang="'+r.metadata.parsed[d]+'"',u+='<meta name="'+d+'" content="'+r.metadata.parsed[d]+'">\n';break;default:u+='<meta name="'+d+'" content="'+r.metadata.parsed[d]+'">\n'}return e=o+"<html"+c+">\n<head>\n"+i+l+u+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",e=r.converter._dispatch("completeHTMLDocument.after",e,t,r)}
vendor: 5,123 bytes, line 1
1),t.subParser("detab",function(e,t,r){return e=(e=(e=(e=(e=(e=r.converter._dispatch("detab.before",e,t,r)).replace(/\t(?=\t)/g,"    ")).replace(/\t/g,"\xa8A\xa8B")).replace(/¨B(.+?)¨A/g,function(e,t){for(var r=t,n=4-r.length%4,o=0;o<n;o++)r+=" ";return r})).replace(/¨A/g,"    ")).replace(/¨B/g,""),e=r.converter._dispatch("detab.after",e,t,r)}),t.subParser("ellipsis",function(e,t,r){return t.ellipsis?(e=(e=r.converter._dispatch("ellipsis.before",e,t,r)).replace(/\.\.\./g,"…"),e=r.converter._dispatch("ellipsis.after",e,t,r)):e}),t.subParser("emoji",function(e,r,n){return r.emoji?(e=(e=n.converter._dispatch("emoji.before",e,r,n)).replace(/:([\S]+?):/g,function(e,r){return t.helper.emojis.hasOwnProperty(r)?t.helper.emojis[r]:e}),e=n.converter._dispatch("emoji.after",e,r,n)):e}),t.subParser("encodeAmpsAndAngles",function(e,t,r){return e=(e=(e=(e=(e=r.converter._dispatch("encodeAmpsAndAngles.before",e,t,r)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),e=r.converter._dispatch("encodeAmpsAndAngles.after",e,t,r)}),t.subParser("encodeBackslashEscapes",function(e,r,n){return e=(e=(e=n.converter._dispatch("encodeBackslashEscapes.before",e,r,n)).replace(/\\(\\)/g,t.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|:-])/g,t.helper.escapeCharactersCallback),e=n.converter._dispatch("encodeBackslashEscapes.after",e,r,n)}),t.subParser("encodeCode",function(e,r,n){return e=(e=n.converter._dispatch("encodeCode.before",e,r,n)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,t.helper.escapeCharactersCallback),e=n.converter._dispatch("encodeCode.after",e,r,n)}),t.subParser("escapeSpecialCharsWithinTagAttributes",function(e,r,n){return e=(e=(e=n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,r,n)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,t.helper.escapeCharactersCallback)})).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,function(e){return e.replace(/([\\`*_~=|])/g,t.helper.escapeCharactersCallback)}),e=n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,r,n)}),t.subParser("githubCodeBlocks",function(e,r,n){return r.ghCodeBlocks?(e=(e=(e=n.converter._dispatch("githubCodeBlocks.before",e,r,n)+"\xa80").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(e,o,i,l){var c=r.omitExtraWLInCodeBlocks?"":"\n";return l=t.subParser("encodeCode")(l,r,n),l="<pre><code"+(i?' class="'+i+" language-"+i+'"':"")+">"+(l=(l=(l=t.subParser("detab")(l,r,n)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+c+"</code></pre>",l=t.subParser("hashBlock")(l,r,n),"\n\n\xa8G"+(n.ghCodeBlocks.push({text:e,codeblock:l})-1)+"G\n\n"})).replace(/¨0/,""),n.converter._dispatch("githubCodeBlocks.after",e,r,n)):e}),t.subParser("hashBlock",function(e,t,r){return e=(e=r.converter._dispatch("hashBlock.before",e,t,r)).replace(/(^\n+|\n+$)/g,""),e="\n\n\xa8K"+(r.gHtmlBlocks.push(e)-1)+"K\n\n",e=r.converter._dispatch("hashBlock.after",e,t,r)}),t.subParser("hashCodeTags",function(e,r,n){return e=n.converter._dispatch("hashCodeTags.before",e,r,n),e=t.helper.replaceRecursiveRegExp(e,function(e,o,i,l){var c=i+t.subParser("encodeCode")(o,r,n)+l;return"\xa8C"+(n.gHtmlSpans.push(c)-1)+"C"},"<code\\b[^>]*>","</code>","gim"),e=n.converter._dispatch("hashCodeTags.after",e,r,n)}),t.subParser("hashElement",function(e,t,r){return function(e,t){var n=t;return n=(n=(n=n.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),n="\n\n\xa8K"+(r.gHtmlBlocks.push(n)-1)+"K\n\n"}}),t.subParser("hashHTMLBlocks",function(e,r,n){"use strict";e=n.converter._dispatch("hashHTMLBlocks.before",e,r,n);var o=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],repFunc=function(e,t,r,o){var i=e;return -1!==r.search(/\bmarkdown\b/)&&(i=r+n.converter.makeHtml(t)+o),"\n\n\xa8K"+(n.gHtmlBlocks.push(i)-1)+"K\n\n"};r.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,function(e,t){return"&lt;"+t+"&gt;"}));for(var i=0;i<o.length;++i)for(var l,c=RegExp("^ {0,3}(<"+o[i]+"\\b[^>]*>)","im"),u="<"+o[i]+"\\b[^>]*>",d="</"+o[i]+">";-1!==(l=t.helper.regexIndexOf(e,c));){var p=t.helper.splitAtIndex(e,l),f=t.helper.replaceRecursiveRegExp(p[1],repFunc,u,d,"im");if(f===p[1])break;e=p[0].concat(f)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,t.subParser("hashElement")(e,r,n)),e=(e=t.helper.replaceRecursiveRegExp(e,function(e){return"\n\n\xa8K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"},"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,t.subParser("hashElement")(e,r,n)),e=n.converter._dispatch("hashHTMLBlocks.after",e,r,n)}),t.subParser("hashHTMLSpans",function(e,t,r){"use strict";function hashHTMLSpan(e){return"\xa8C"+(r.gHtmlSpans.push(e)-1)+"C"}
vendor: 9,445 bytes, line 1
1return e=(e=(e=(e=(e=r.converter._dispatch("hashHTMLSpans.before",e,t,r)).replace(/<[^>]+?\/>/gi,function(e){return hashHTMLSpan(e)})).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(e){return hashHTMLSpan(e)})).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(e){return hashHTMLSpan(e)})).replace(/<[^>]+?>/gi,function(e){return hashHTMLSpan(e)}),e=r.converter._dispatch("hashHTMLSpans.after",e,t,r)}),t.subParser("unhashHTMLSpans",function(e,t,r){"use strict";e=r.converter._dispatch("unhashHTMLSpans.before",e,t,r);for(var n=0;n<r.gHtmlSpans.length;++n){for(var o=r.gHtmlSpans[n],i=0;/¨C(\d+)C/.test(o);){var l=RegExp.$1;if(o=o.replace("\xa8C"+l+"C",r.gHtmlSpans[l]),10===i){console.error("maximum nesting of 10 spans reached!!!");break}++i}e=e.replace("\xa8C"+n+"C",o)}return r.converter._dispatch("unhashHTMLSpans.after",e,t,r)}),t.subParser("hashPreCodeTags",function(e,r,n){return e=n.converter._dispatch("hashPreCodeTags.before",e,r,n),e=t.helper.replaceRecursiveRegExp(e,function(e,o,i,l){var c=i+t.subParser("encodeCode")(o,r,n)+l;return"\n\n\xa8G"+(n.ghCodeBlocks.push({text:e,codeblock:c})-1)+"G\n\n"},"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),e=n.converter._dispatch("hashPreCodeTags.after",e,r,n)}),t.subParser("headers",function(e,r,n){"use strict";e=n.converter._dispatch("headers.before",e,r,n);var o=isNaN(parseInt(r.headerLevelStart))?1:parseInt(r.headerLevelStart),i=r.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,l=r.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(i,function(e,i){var l=t.subParser("spanGamut")(i,r,n),c="<h"+o+(r.noHeaderId?"":' id="'+headerId(i)+'"')+">"+l+"</h"+o+">";return t.subParser("hashBlock")(c,r,n)})).replace(l,function(e,i){var l=t.subParser("spanGamut")(i,r,n),c=r.noHeaderId?"":' id="'+headerId(i)+'"',u=o+1,d="<h"+u+c+">"+l+"</h"+u+">";return t.subParser("hashBlock")(d,r,n)});var c=r.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function headerId(e){var o,i;if(r.customizedHeaderId){var l=e.match(/\{([^{]+?)}\s*$/);l&&l[1]&&(e=l[1])}return o=e,i=t.helper.isString(r.prefixHeaderId)?r.prefixHeaderId:!0===r.prefixHeaderId?"section-":"",r.rawPrefixHeaderId||(o=i+o),o=r.ghCompatibleHeaderId?o.replace(/ /g,"-").replace(/&amp;/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():r.rawHeaderId?o.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/¨T/g,"\xa8").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():o.replace(/[^\w]/g,"").toLowerCase(),r.rawPrefixHeaderId&&(o=i+o),n.hashLinkCounts[o]?o=o+"-"+n.hashLinkCounts[o]++:n.hashLinkCounts[o]=1,o}return e=e.replace(c,function(e,i,l){var c=l;r.customizedHeaderId&&(c=l.replace(/\s?\{([^{]+?)}\s*$/,""));var u=t.subParser("spanGamut")(c,r,n),d=r.noHeaderId?"":' id="'+headerId(l)+'"',p=o-1+i.length,f="<h"+p+d+">"+u+"</h"+p+">";return t.subParser("hashBlock")(f,r,n)}),e=n.converter._dispatch("headers.after",e,r,n)}),t.subParser("horizontalRule",function(e,r,n){"use strict";e=n.converter._dispatch("horizontalRule.before",e,r,n);var o=t.subParser("hashBlock")("<hr />",r,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,o)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,o)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,o),e=n.converter._dispatch("horizontalRule.after",e,r,n)}),t.subParser("images",function(e,r,n){"use strict";function writeImageTagBase64(e,t,r,n,o,i,l,c){return writeImageTag(e,t,r,n=n.replace(/\s/g,""),o,i,l,c)}function writeImageTag(e,r,o,i,l,c,u,d){var p=n.gUrls,f=n.gTitles,_=n.gDimensions;if(o=o.toLowerCase(),d||(d=""),e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m)>-1)i="";else if(""===i||null===i){if((""===o||null===o)&&(o=r.toLowerCase().replace(/ ?\n/g," ")),i="#"+o,t.helper.isUndefined(p[o]))return e;i=p[o],t.helper.isUndefined(f[o])||(d=f[o]),t.helper.isUndefined(_[o])||(l=_[o].width,c=_[o].height)}r=r.replace(/"/g,"&quot;").replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback);var h='<img src="'+(i=i.replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback))+'" alt="'+r+'"';return d&&t.helper.isString(d)&&(h+=' title="'+(d=d.replace(/"/g,"&quot;").replace(t.helper.regexes.asteriskDashAndColon,t.helper.escapeCharactersCallback))+'"'),l&&c&&(h+=' width="'+(l="*"===l?"auto":l)+'"'+(' height="'+(c="*"===c?"auto":c))+'"'),h+=" />"}return e=(e=(e=(e=(e=(e=n.converter._dispatch("images.before",e,r,n)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,writeImageTag)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,writeImageTagBase64)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,writeImageTag)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,writeImageTag)).replace(/!\[([^\[\]]+)]()()()()()/g,writeImageTag),e=n.converter._dispatch("images.after",e,r,n)}),t.subParser("italicsAndBold",function(e,t,r){return e=r.converter._dispatch("italicsAndBold.before",e,t,r),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return"<strong><em>"+t+"</em></strong>"})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return"<strong>"+t+"</strong>"})).replace(/\b_(\S[\s\S]*?)_\b/g,function(e,t){return"<em>"+t+"</em>"}):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?"<strong><em>"+t+"</em></strong>":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?"<strong>"+t+"</strong>":e})).replace(/_([^\s_][\s\S]*?)_/g,function(e,t){return/\S$/.test(t)?"<em>"+t+"</em>":e}),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(e,t,r){return t+"<strong><em>"+r+"</em></strong>"})).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(e,t,r){return t+"<strong>"+r+"</strong>"})).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(e,t,r){return t+"<em>"+r+"</em>"}):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(e,t){return/\S$/.test(t)?"<strong><em>"+t+"</em></strong>":e})).replace(/\*\*(\S[\s\S]*?)\*\*/g,function(e,t){return/\S$/.test(t)?"<strong>"+t+"</strong>":e})).replace(/\*([^\s*][\s\S]*?)\*/g,function(e,t){return/\S$/.test(t)?"<em>"+t+"</em>":e}),e=r.converter._dispatch("italicsAndBold.after",e,t,r)}),t.subParser("lists",function(e,r,n){"use strict";function processListItems(e,o){n.gListLevel++,e=e.replace(/\n{2,}$/,"\n")+"\xa80";var i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,l=/\n[ \t]*\n(?!¨0)/.test(e);return r.disableForced4SpacesIndentedSublists&&(i=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(i,function(e,o,i,c,u,d,p){p=p&&""!==p.trim();var f=t.subParser("outdent")(u,r,n),_="";return d&&r.tasklists&&(_=' class="task-list-item" style="list-style-type: none;"',f=f.replace(/^[ \t]*\[(x|X| )?]/m,function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return p&&(e+=" checked"),e+=">"})),f=f.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,function(e){return"\xa8A"+e}),o||f.search(/\n{2,}/)>-1?(f=t.subParser("githubCodeBlocks")(f,r,n),f=t.subParser("blockGamut")(f,r,n)):(f=(f=t.subParser("lists")(f,r,n)).replace(/\n$/,""),f=(f=t.subParser("hashHTMLBlocks")(f,r,n)).replace(/\n\n+/g,"\n\n"),f=l?t.subParser("paragraphs")(f,r,n):t.subParser("spanGamut")(f,r,n)),f="<li"+_+">"+(f=f.replace("\xa8A",""))+"</li>\n"})).replace(/¨0/g,""),n.gListLevel--,o&&(e=e.replace(/\s+$/,"")),e}function styleStartNumber(e,t){if("ol"===t){var r=e.match(/^ *(\d+)\./);if(r&&"1"!==r[1])return' start="'+r[1]+'"'}return""}function parseConsecutiveLists(e,t,n){var o=r.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,i=r.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,l="ul"===t?o:i,c="";if(-1!==e.search(l))!function parseCL(r){var u=r.search(l),d=styleStartNumber(e,t);-1!==u?(c+="\n\n<"+t+d+">\n"+processListItems(r.slice(0,u),!!n)+"</"+t+">\n",l="ul"==(t="ul"===t?"ol":"ul")?o:i,parseCL(r.slice(u))):c+="\n\n<"+t+d+">\n"+processListItems(r,!!n)+"</"+t+">\n"}(e);else{var u=styleStartNumber(e,t);c="\n\n<"+t+u+">\n"+processListItems(e,!!n)+"</"+t+">\n"}return c}return e=n.converter._dispatch("lists.before",e,r,n)+"\xa80",e=(e=n.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r){return parseConsecutiveLists(t,r.search(/[*+-]/g)>-1?"ul":"ol",!0)}):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(e,t,r,n){return parseConsecutiveLists(r,n.search(/[*+-]/g)>-1?"ul":"ol",!1)})).replace(/¨0/,""),e=n.converter._dispatch("lists.after",e,r,n)}),t.subParser("metadata",function(e,t,r){"use strict";if(!t.metadata)return e;function parseMetadataContents(e){r.metadata.raw=e,(e=(e=e.replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,function(e,t,n){return r.metadata.parsed[t]=n,""})}
1return e=(e=(e=(e=r.converter._dispatch("metadata.before",e,t,r)).replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(e,t,r){return parseMetadataContents(r),"\xa8M"})).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(e,t,n){return t&&(r.metadata.format=t),parseMetadataContents(n),"\xa8M"})).replace(/¨M/g,""),e=r.converter._dispatch("metadata.after",e,t,r)}),t.subParser("outdent",function(e,t,r){return e=(e=(e=r.converter._dispatch("outdent.before",e,t,r)).replace(/^(\t|[ ]{1,4})/gm,"\xa80")).replace(/¨0/g,""),e=r.converter._dispatch("outdent.after",e,t,r)}),t.subParser("paragraphs",function(e,r,n){"use strict";for(var o=(e=(e=(e=n.converter._dispatch("paragraphs.before",e,r,n)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),i=[],l=o.length,c=0;c<l;c++){var u=o[c];u.search(/¨(K|G)(\d+)\1/g)>=0?i.push(u):u.search(/\S/)>=0&&(u=(u=t.subParser("spanGamut")(u,r,n)).replace(/^([ \t]*)/g,"<p>")+"</p>",i.push(u))}for(c=0,l=i.length;c<l;c++){for(var d="",p=i[c],f=!1;/¨(K|G)(\d+)\1/.test(p);){var _=RegExp.$2;d=(d="K"===RegExp.$1?n.gHtmlBlocks[_]:f?t.subParser("encodeCode")(n.ghCodeBlocks[_].text,r,n):n.ghCodeBlocks[_].codeblock).replace(/\$/g,"$$$$"),p=p.replace(/(\n\n)?¨(K|G)\d+\2(\n\n)?/,d),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(p)&&(f=!0)}i[c]=p}return e=(e=(e=i.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,r,n)}),t.subParser("runExtension",function(e,t,r,n){"use strict";if(e.filter)t=e.filter(t,n.converter,r);else if(e.regex){var o=e.regex;o instanceof RegExp||(o=RegExp(o,"g")),t=t.replace(o,e.replace)}return t}),t.subParser("spanGamut",function(e,r,n){return e=n.converter._dispatch("spanGamut.before",e,r,n),e=t.subParser("codeSpans")(e,r,n),e=t.subParser("escapeSpecialCharsWithinTagAttributes")(e,r,n),e=t.subParser("encodeBackslashEscapes")(e,r,n),e=t.subParser("images")(e,r,n),e=t.subParser("anchors")(e,r,n),e=t.subParser("autoLinks")(e,r,n),e=t.subParser("simplifiedAutoLinks")(e,r,n),e=t.subParser("emoji")(e,r,n),e=t.subParser("underline")(e,r,n),e=t.subParser("italicsAndBold")(e,r,n),e=t.subParser("strikethrough")(e,r,n),e=t.subParser("ellipsis")(e,r,n),e=t.subParser("hashHTMLSpans")(e,r,n),e=t.subParser("encodeAmpsAndAngles")(e,r,n),r.simpleLineBreaks?/\n\n¨K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/  +\n/g,"<br />\n"),e=n.converter._dispatch("spanGamut.after",e,r,n)}),t.subParser("strikethrough",function(e,r,n){"use strict";function parseInside(e){return r.simplifiedAutoLink&&(e=t.subParser("simplifiedAutoLinks")(e,r,n)),"<del>"+e+"</del>"}return r.strikethrough&&(e=(e=n.converter._dispatch("strikethrough.before",e,r,n)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(e,t){return parseInside(t)}),e=n.converter._dispatch("strikethrough.after",e,r,n)),e}),t.subParser("stripLinkDefinitions",function(e,r,n){"use strict";e+="\xa80";var replaceFunc=function(o,i,l,c,u,d,p){return(i=i.toLowerCase(),e.toLowerCase().split(i).length-1<2)?o:(l.match(/^data:.+?\/.+?;base64,/)?n.gUrls[i]=l.replace(/\s/g,""):n.gUrls[i]=t.subParser("encodeAmpsAndAngles")(l,r,n),d)?d+p:(p&&(n.gTitles[i]=p.replace(/"|'/g,"&quot;")),r.parseImgDimensions&&c&&u&&(n.gDimensions[i]={width:c,height:u}),"")};return e=(e=(e=e.replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm,replaceFunc)).replace(/^ {0,3}\[([^\]]+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,replaceFunc)).replace(/¨0/,"")}),t.subParser("tables",function(e,r,n){"use strict";if(!r.tables)return e;function parseStyles(e){return/^:[ \t]*--*$/.test(e)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(e)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(e)?' style="text-align:center;"':""}function parseHeaders(e,o){var i="";return e=e.trim(),(r.tablesHeaderId||r.tableHeaderId)&&(i=' id="'+e.replace(/ /g,"_").toLowerCase()+'"'),"<th"+i+o+">"+(e=t.subParser("spanGamut")(e,r,n))+"</th>\n"}function parseCells(e,o){return"<td"+o+">"+t.subParser("spanGamut")(e,r,n)+"</td>\n"}function buildTable(e,t){for(var r="<table>\n<thead>\n<tr>\n",n=e.length,o=0;o<n;++o)r+=e[o];for(r+="</tr>\n</thead>\n<tbody>\n",o=0;o<t.length;++o){r+="<tr>\n";for(var i=0;i<n;++i)r+=t[o][i];r+="</tr>\n"}return r+"</tbody>\n</table>\n"}function parseTable(e){var o,i=e.split("\n");for(o=0;o<i.length;++o)/^ {0,3}\|/.test(i[o])&&(i[o]=i[o].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(i[o])&&(i[o]=i[o].replace(/\|[ \t]*$/,"")),i[o]=t.subParser("codeSpans")(i[o],r,n);var l=i[0].split("|").map(function(e){return e.trim()}),c=i[1].split("|").map(function(e){return e.trim()}),u=[],d=[],p=[],f=[];for(i.shift(),i.shift(),o=0;o<i.length;++o)""!==i[o].trim()&&u.push(i[o].split("|").map(function(e){return e.trim()}));if(l.length<c.length)return e;for(o=0;o<c.length;++o)p.push(parseStyles(c[o]));for(o=0;o<l.length;++o)t.helper.isUndefined(p[o])&&(p[o]=""),d.push(parseHeaders(l[o],p[o]));for(o=0;o<u.length;++o){for(var _=[],h=0;h<d.length;++h)t.helper.isUndefined(u[o][h]),_.push(parseCells(u[o][h],p[h]));f.push(_)}return buildTable(d,f)}
vendor: 5,252 bytes, line 1
1return e=(e=(e=(e=n.converter._dispatch("tables.before",e,r,n)).replace(/\\(\|)/g,t.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,parseTable)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm,parseTable),e=n.converter._dispatch("tables.after",e,r,n)}),t.subParser("underline",function(e,r,n){return r.underline?(e=n.converter._dispatch("underline.before",e,r,n),e=(e=r.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,function(e,t){return"<u>"+t+"</u>"})).replace(/\b__(\S[\s\S]*?)__\b/g,function(e,t){return"<u>"+t+"</u>"}):(e=e.replace(/___(\S[\s\S]*?)___/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/__(\S[\s\S]*?)__/g,function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e})).replace(/(_)/g,t.helper.escapeCharactersCallback),e=n.converter._dispatch("underline.after",e,r,n)):e}),t.subParser("unescapeSpecialChars",function(e,t,r){return e=(e=r.converter._dispatch("unescapeSpecialChars.before",e,t,r)).replace(/¨E(\d+)E/g,function(e,t){return String.fromCharCode(parseInt(t))}),e=r.converter._dispatch("unescapeSpecialChars.after",e,t,r)}),t.subParser("makeMarkdown.blockquote",function(e,r){"use strict";var n="";if(e.hasChildNodes())for(var o=e.childNodes,i=o.length,l=0;l<i;++l){var c=t.subParser("makeMarkdown.node")(o[l],r);""!==c&&(n+=c)}return"> "+(n=n.trim()).split("\n").join("\n> ")}),t.subParser("makeMarkdown.codeBlock",function(e,t){"use strict";var r=e.getAttribute("language"),n=e.getAttribute("precodenum");return"```"+r+"\n"+t.preList[n]+"\n```"}),t.subParser("makeMarkdown.codeSpan",function(e){return"`"+e.innerHTML+"`"}),t.subParser("makeMarkdown.emphasis",function(e,r){"use strict";var n="";if(e.hasChildNodes()){n+="*";for(var o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);n+="*"}return n}),t.subParser("makeMarkdown.header",function(e,r,n){"use strict";var o=Array(n+1).join("#"),i="";if(e.hasChildNodes()){i=o+" ";for(var l=e.childNodes,c=l.length,u=0;u<c;++u)i+=t.subParser("makeMarkdown.node")(l[u],r)}return i}),t.subParser("makeMarkdown.hr",function(){return"---"}),t.subParser("makeMarkdown.image",function(e){"use strict";var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"]("+("<"+e.getAttribute("src"))+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t}),t.subParser("makeMarkdown.links",function(e,r){"use strict";var n="";if(e.hasChildNodes()&&e.hasAttribute("href")){var o=e.childNodes,i=o.length;n="[";for(var l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);n+="](",n+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(n+=' "'+e.getAttribute("title")+'"'),n+=")"}return n}),t.subParser("makeMarkdown.list",function(e,r,n){"use strict";var o="";if(!e.hasChildNodes())return"";for(var i=e.childNodes,l=i.length,c=e.getAttribute("start")||1,u=0;u<l;++u)void 0!==i[u].tagName&&"li"===i[u].tagName.toLowerCase()&&(o+=("ol"===n?c.toString()+". ":"- ")+t.subParser("makeMarkdown.listItem")(i[u],r),++c);return(o+="\n\x3c!-- --\x3e\n").trim()}),t.subParser("makeMarkdown.listItem",function(e,r){"use strict";for(var n="",o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);return/\n$/.test(n)?n=n.split("\n").join("\n    ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):n+="\n",n}),t.subParser("makeMarkdown.node",function(e,r,n){"use strict";n=n||!1;var o="";if(3===e.nodeType)return t.subParser("makeMarkdown.txt")(e,r);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":n||(o=t.subParser("makeMarkdown.header")(e,r,1)+"\n\n");break;case"h2":n||(o=t.subParser("makeMarkdown.header")(e,r,2)+"\n\n");break;case"h3":n||(o=t.subParser("makeMarkdown.header")(e,r,3)+"\n\n");break;case"h4":n||(o=t.subParser("makeMarkdown.header")(e,r,4)+"\n\n");break;case"h5":n||(o=t.subParser("makeMarkdown.header")(e,r,5)+"\n\n");break;case"h6":n||(o=t.subParser("makeMarkdown.header")(e,r,6)+"\n\n");break;case"p":n||(o=t.subParser("makeMarkdown.paragraph")(e,r)+"\n\n");break;case"blockquote":n||(o=t.subParser("makeMarkdown.blockquote")(e,r)+"\n\n");break;case"hr":n||(o=t.subParser("makeMarkdown.hr")(e,r)+"\n\n");break;case"ol":n||(o=t.subParser("makeMarkdown.list")(e,r,"ol")+"\n\n");break;case"ul":n||(o=t.subParser("makeMarkdown.list")(e,r,"ul")+"\n\n");break;case"precode":n||(o=t.subParser("makeMarkdown.codeBlock")(e,r)+"\n\n");break;case"pre":n||(o=t.subParser("makeMarkdown.pre")(e,r)+"\n\n");break;case"table":n||(o=t.subParser("makeMarkdown.table")(e,r)+"\n\n");break;case"code":o=t.subParser("makeMarkdown.codeSpan")(e,r);break;case"em":case"i":o=t.subParser("makeMarkdown.emphasis")(e,r);break;case"strong":case"b":o=t.subParser("makeMarkdown.strong")(e,r);break;case"del":o=t.subParser("makeMarkdown.strikethrough")(e,r);break;case"a":o=t.subParser("makeMarkdown.links")(e,r);break;case"img":o=t.subParser("makeMarkdown.image")(e,r);break;default:o=e.outerHTML+"\n\n"}return o}
1),t.subParser("makeMarkdown.paragraph",function(e,r){"use strict";var n="";if(e.hasChildNodes())for(var o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);return n.trim()}),t.subParser("makeMarkdown.pre",function(e,t){"use strict";var r=e.getAttribute("prenum");return"<pre>"+t.preList[r]+"</pre>"}),t.subParser("makeMarkdown.strikethrough",function(e,r){"use strict";var n="";if(e.hasChildNodes()){n+="~~";for(var o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);n+="~~"}return n}),t.subParser("makeMarkdown.strong",function(e,r){"use strict";var n="";if(e.hasChildNodes()){n+="**";for(var o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r);n+="**"}return n}),t.subParser("makeMarkdown.table",function(e,r){"use strict";var n,o,i="",l=[[],[]],c=e.querySelectorAll("thead>tr>th"),u=e.querySelectorAll("tbody>tr");for(n=0;n<c.length;++n){var d=t.subParser("makeMarkdown.tableCell")(c[n],r),p="---";if(c[n].hasAttribute("style"))switch(c[n].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":p=":---";break;case"text-align:right;":p="---:";break;case"text-align:center;":p=":---:"}l[0][n]=d.trim(),l[1][n]=p}for(n=0;n<u.length;++n){var f=l.push([])-1,_=u[n].getElementsByTagName("td");for(o=0;o<c.length;++o){var h=" ";void 0!==_[o]&&(h=t.subParser("makeMarkdown.tableCell")(_[o],r)),l[f].push(h)}}var m=3;for(n=0;n<l.length;++n)for(o=0;o<l[n].length;++o){var g=l[n][o].length;g>m&&(m=g)}for(n=0;n<l.length;++n){for(o=0;o<l[n].length;++o)1===n?":"===l[n][o].slice(-1)?l[n][o]=t.helper.padEnd(l[n][o].slice(-1),m-1,"-")+":":l[n][o]=t.helper.padEnd(l[n][o],m,"-"):l[n][o]=t.helper.padEnd(l[n][o],m);i+="| "+l[n].join(" | ")+" |\n"}return i.trim()}),t.subParser("makeMarkdown.tableCell",function(e,r){"use strict";var n="";if(!e.hasChildNodes())return"";for(var o=e.childNodes,i=o.length,l=0;l<i;++l)n+=t.subParser("makeMarkdown.node")(o[l],r,!0);return n.trim()}),t.subParser("makeMarkdown.txt",function(e){"use strict";var r=e.nodeValue;return r=(r=r.replace(/ +/g," ")).replace(/¨NBSP;/g," "),r=(r=(r=(r=(r=(r=(r=(r=(r=t.helper.unescapeHTMLEntities(r)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")}),"function"==typeof define&&define.amd?define(function(){return t}):e.exports?e.exports=t:this.showdown=t}).call(this)},797265(e){function addWheelListener(e,t,r){e.addEventListener("wheel",t,r)}function removeWheelListener(e,t,r){e.removeEventListener("wheel",t,r)}e.exports=addWheelListener,e.exports.addWheelListener=addWheelListener,e.exports.removeWheelListener=removeWheelListener},640554(e,t,r){"use strict";r.d(t,{M:()=>ArtistEditsSlaDisclosure});var n=r(483134),o=r(755741);function ArtistEditsSlaDisclosure(e){var t=e.sla,r=void 0===t?o.z:t,i=e.className,l=e.lineClassName,c=(0,o.U)(r);return(0,n.jsx)("div",{"data-testid":"artist-edits-sla-disclosure",role:c.length>0?"note":void 0,className:c.length>0?void 0===i?"space-y-0.5 text-xs leading-tight text-gray-600":i:void 0,children:c.map(function(e){return(0,n.jsx)("p",{className:l,"data-testid":"artist-edits-sla-line",children:e},e)})})}},755741(e,t,r){"use strict";r.d(t,{U:()=>artistEditsSlaLines,z:()=>n});var n={turnaround:null,deliveryImpact:null};function artistEditsSlaLines(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,t=[];return e.turnaround&&t.push("Usually done in ".concat(e.turnaround)),e.deliveryImpact&&t.push(e.deliveryImpact),t}},733334(e,t,r){"use strict";r.d(t,{V:()=>useScrollIntoViewOnMobileFocus});var n=r(293534),o=r(147141);function findScrollableAncestor(e){for(var t,r,n=null!=(t=null==e?void 0:e.parentElement)?t:null;n&&n!==document.body;){var o=window.getComputedStyle(n).overflowY;if("auto"===o||"scroll"===o)return n;n=n.parentElement}return null!=(r=document.scrollingElement)?r:document.documentElement}function useScrollIntoViewOnMobileFocus(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.padding,i=void 0===r?16:r;
1(0,n.useEffect)(function(){if(!(!window.visualViewport||(0,o.IV)())){var t=e.current;if(t){var r=null;return t.addEventListener("focus",handleFocus),function(){null!=r&&clearTimeout(r),t.removeEventListener("focus",handleFocus)}}}function handleFocus(){null!=r&&clearTimeout(r),r=setTimeout(function(){if(r=null,window.visualViewport&&!(window.innerHeight-window.visualViewport.height<=0)){var t=e.current;if(t){var n=t.getBoundingClientRect().bottom+i-window.visualViewport.height;n>0&&findScrollableAncestor(t).scrollBy({top:n,behavior:"smooth"})}}},300)}},[e,i])}},137105(e,t,r){"use strict";r.d(t,{L:()=>markAcceleratedPaymentNavigation,d:()=>isAcceleratedPaymentNavigationInFlight});var n=!1,markAcceleratedPaymentNavigation=function(){n=!0},isAcceleratedPaymentNavigationInFlight=function(){return n}},385746(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=["com.apple.authenticationservices.webauthenticationsession error 3","canceledlogin"];let __rspack_default_export=function(e){if(!e)return!1;var t=("string"==typeof e?e:(null==e?void 0:e.message)||"").toLowerCase();return n.some(function(e){return t.includes(e)})}},808290(e,t,r){"use strict";r.d(t,{W:()=>n});var n={w:284,h:336,q:75,auto:"format"}},413861(e,t,r){"use strict";r.d(t,{XI:()=>c,k0:()=>o,nL:()=>n,o6:()=>i,uj:()=>l});var n="I’m",o=["making your design print-ready","sharpening your image clarity","making your background removable","enriching your colors","smoothing your image edges","running a final quality check"],i="All done!",l=" It's print perfect now.",c=o.length+1},419250(e,t,r){"use strict";r.d(t,{G:()=>n});var n=500},835324(e,t,r){"use strict";r.d(t,{B2:()=>sanitizeRichHtml,ZD:()=>escapeHtml,pn:()=>sanitizeHtml});var n=r(133172);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var o=["br","strong","b","em","i","span","ul","li"],i=["a"],l=["title","style"],c=["href","rel"],u=new Set(["inline-flex","items-baseline","gap-[1px]","inline-block","h-3","w-3","rounded","border","border-gray-300"]),d=["form","fieldset","button","select","textarea","style"];function forceSafeAnchorRel(e){"A"===e.tagName&&e.hasAttribute("href")&&(e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"))}function constrainSanitizedAttributes(e,t){"style"===t.attrName?t.attrValue=t.attrValue.split(";").map(function(e){return e.trim()}).filter(function(e){return/^background-color\s*:\s*#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e)}).join("; "):"class"===t.attrName&&(t.attrValue=t.attrValue.split(/\s+/).filter(function(e){return u.has(e)}).join(" "))}function stripNonCheckboxInputs(e,t){if("input"===t.tagName&&_instanceof(e,Element)&&"checkbox"!==e.getAttribute("type")){var r;null==(r=e.parentNode)||r.removeChild(e)}}function sanitizeScoped(e,t){n.A.addHook("uponSanitizeElement",stripNonCheckboxInputs),n.A.addHook("afterSanitizeAttributes",forceSafeAnchorRel),n.A.addHook("uponSanitizeAttribute",constrainSanitizedAttributes);try{return n.A.sanitize(e,t)}finally{n.A.removeHook("uponSanitizeElement"),n.A.removeHook("afterSanitizeAttributes"),n.A.removeHook("uponSanitizeAttribute")}}function sanitizeHtml(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null!=(t=r.allowLinks)&&t;return sanitizeScoped(e,{ALLOWED_TAGS:n?_to_consumable_array(o).concat(_to_consumable_array(i)):o,ALLOWED_ATTR:n?_to_consumable_array(l).concat(_to_consumable_array(c)):l})}function sanitizeRichHtml(e){return sanitizeScoped(e,{USE_PROFILES:{html:!0},FORBID_TAGS:d})}function escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},369303(e,t,r){"use strict";r.d(t,{CY:()=>h,Dh:()=>c,Jv:()=>f,Lb:()=>u,Lr:()=>i,QO:()=>o,Ve:()=>isFreeShippingCouponExcludedCategory,W$:()=>p,j9:()=>l,mk:()=>anySelectedShipmentExcludedFromFreeShipping,nf:()=>sumAutomaticPromotionShippingDiscount,vB:()=>isFixedGroupFreeShippingPromotion,yF:()=>offersFreeShippingCouponExcludedCategory,z9:()=>d});var n=r(299410),o=new Set(["asap","local","next_day","nextDay","same_day","sameDay"]),i={local:"Faster",same_day:"Same Day",next_day:"Next Day"},l={courier:"Fast Delivery",standard:"Standard Shipping"}
1,c="guaranteedOvernight",u="Guaranteed Overnight",d="Courier",p="Jiffy Local",f="Same Day",_=new Set([c,"asap"]),isFreeShippingCouponExcludedCategory=function(e){return _.has((0,n.PT)(null!=e?e:""))},h="jiffy_local",isFixedGroupFreeShippingPromotion=function(e){return"single"===e||e===h},offersFreeShippingCouponExcludedCategory=function(e){return Object.keys(null!=e?e:{}).some(isFreeShippingCouponExcludedCategory)},anySelectedShipmentExcludedFromFreeShipping=function(e){return Object.values(null!=e?e:{}).some(function(e){return isFreeShippingCouponExcludedCategory(null==e?void 0:e.category)})},sumAutomaticPromotionShippingDiscount=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).couponSupersedes;return Object.values(null!=e?e:{}).reduce(function(e,r){var n;return t&&!isFreeShippingCouponExcludedCategory(null==r?void 0:r.category)?e:e+(parseFloat(String(null!=(n=null==r?void 0:r.automaticPromotionShippingDiscount)?n:0))||0)},0)}},263127(e,t,r){"use strict";r.d(t,{A:()=>trackDeliveryOptionsLoaded});var n=r(433769),o=r(482797);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function computeHoursFromNow(e){if(!e)return null;var t=new Date(e).getTime();return Number.isNaN(t)?null:Math.round((t-(0,o.s)().getTime())/36e5)}function solvedDate(e){var t;return null!=(t=e.unpadded_delivery_date)?t:e.delivery_date}function solvedDateFields(e){var t={delivery_date:solvedDate(e)};return e.display_pad_days&&(t.display_pad_days=e.display_pad_days),t}function trackDeliveryOptionsLoaded(e){var t,r=null==e?void 0:e.order_id,o=(null==e||null==(t=e.shipments)?void 0:t.orders)||{},i=new Date().toISOString();Object.values(o).forEach(function(e){(e.options||[]).forEach(function(t){var o=t.delivery_option_id||t.assignment_group_uid||t.assignment_decision_id?{delivery_option_id:t.delivery_option_id,assignment_group_uid:t.assignment_group_uid,assignment_decision_id:t.assignment_decision_id,promise_presented_at:i}:{};(0,n.trackRudderstack)("Cart Delivery Option Loaded",_object_spread_props(_object_spread(_object_spread_props(_object_spread({order_id:r},o),{type:e.title,category:t.category}),solvedDateFields(t)),{shipping_method:t.shipping_method,location_codes:t.location_codes,valid_until_time:t.valid_until_time,zipcode:e.zipcode,hours_from_now:computeHoursFromNow(t.delivery_time||solvedDate(t)),business_line:e.business_line,selected:t.selected}))})})}},46519(e,t,r){"use strict";r.d(t,{Q:()=>canonicalWhichCheckout});var n=new Set(["credit_card","card","custom"]),o=new Set(["apple_pay","apple-pay","device_pay"]),i=new Set(["google_pay","google-pay"]),l=new Set(["paypal","venmo","klarna","affirm","afterpay","sezzle","cashapp","link"]);function canonicalWhichCheckout(e){var t,r=null!=(t=null==e?void 0:e.trim().toLowerCase())?t:"";return n.has(r)?"default":o.has(r)?"apple_pay":i.has(r)?"google_pay":l.has(r)?r:"unknown"}},558236(e,t,r){"use strict";r.d(t,{v:()=>isCheckoutReviewRedirect});var n=/^\/(?:ca\/)?checkout(?:[?#]|$)/;function isCheckoutReviewRedirect(e){return"string"==typeof e&&n.test(e)}},778267(e,t,r){"use strict";function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}r.d(t,{v:()=>createEventTracker});var createEventTracker=function(e){var t=e.dispatch,r=e.getBaseProperties,n=void 0===r?function(){return{}}:r;return{track:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,_object_spread({},n(),r))},trackWithBase:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t(e,_object_spread({},r,n))},dispatch:t,getBaseProperties:n}}},475953(e,t,r){"use strict";r.d(t,{M:()=>publishSessionZipcodeChange});var n,o=r(280857),i=r(471242),l=!1,recordAnnouncement=function(e){n="string"==typeof e?e.trim():""},publishSessionZipcodeChange=function(e){l||(l=!0,o.A.on(i.A.ZIPCODE_UPDATED,function(e,t){return recordAnnouncement(t)}));var t,r,c=null!=n?n:null==(r=document.documentElement)||null==(t=r.dataset)?void 0:t.zipcode;recordAnnouncement(e),o.A.publish(i.A.SESSION_ZIPCODE_CHANGED,null,e,c)}},736602(e,t,r){"use strict";r.d(t,{KV:()=>isProduction});var getCanonicalUrl=function(){var e=document.querySelector("link[rel='canonical']");return(null==e?void 0:e.href)||""},isProduction=function(){var e;return(null==(e=window.jiffy)?void 0:e.env)==="production"||RegExp("https://www.jiffy.com").test(getCanonicalUrl())}},610906(e,t,r){"use strict";function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _construct(e,t,r){return(_construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o}).apply(null,arguments)}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _is_native_function(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return(_wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(Wrapper,e)})(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}r.d(t,{PH:()=>isReportableCartError,j6:()=>i,wD:()=>isExpectedCartValidation}),r(586519);var n=/^(?:[A-Za-z]*Error: )?HTTP (\d{3})\b/,resolveErrorStatus=function(e){if("number"==typeof(null==e?void 0:e.status))return e.status;var t="string"==typeof e?e:null==e?void 0:e.message;if("string"!=typeof t)return null;var r=n.exec(t);return r?Number(r[1]):null},isReportableCartError=function(e){if(!e)return!0;var t=resolveErrorStatus(e);return!t||!(t>=400)||!(t<500)},o=[/\bwe do not ship to\b/i],isExpectedCartValidation=function(e){return"string"==typeof e&&o.some(function(t){return t.test(e)})},i=function(e){function PlainError(e){var t;return _class_call_check(this,PlainError),(t=_call_super(this,PlainError,[e])).name="",t}return _inherits(PlainError,e),PlainError}(_wrap_native_super(Error))},496567(e,t,r){"use strict";function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function extractErrorMessage(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"An unexpected error occurred";return _instanceof(e,Error)?e.message:"string"==typeof e?e:t}r.d(t,{P:()=>extractErrorMessage})},404903(e,t,r){"use strict";r.d(t,{L$:()=>toggle,gK:()=>isOff,hZ:()=>set});var n=r(741235),isOn=function(e){return!!(0,n.v8)(e)},isOff=function(e){return!isOn(e)},set=function(e,t){return(0,n.pR)(e,t)},toggle=function(e){return set(e,new Date)}},171473(e,t,r){"use strict";r.d(t,{E:()=>findIndexById});var findIndexById=function(e,t){return Math.max(e.findIndex(function(e){return String(t)===String(e.id)}),0)}},774280(e,t,r){"use strict";r.d(t,{h:()=>getRandomInt,k:()=>generateRandomString});var getRandomInt=function(e,t){return Math.floor(Math.random()*(t-e)+e)},generateRandomString=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return Math.random().toString(36).substring(2,2+e)}},594446(e,t,r){"use strict";r.d(t,{q:()=>submitProcolorRoutableTaggedForArtwork});var n=r(467265),submitProcolorRoutableTaggedForArtwork=function(e,t){var r=t.multiArtwork;if(e){var o=null!=(i=e.procolor_routable)?i:e.procolorRoutable;if(!1!==o){if(null==o){var i,l,c,u,d,p,f,_,h,m,g,b,y,v,w,j,k,x,S,O,P,A,C=null!=(P=null!=(A=e.id)?A:e.artwork_id)?P:e.artworkId;C&&console.warn("[PIP-3054] procolor_routable field missing on artwork",{artworkId:C});return}var I=null!=(l=null!=(c=e.procolor_routing_details)?c:e.procolorRoutingDetails)?l:null,E=null!=(u=null!=(d=e.id)?d:e.artwork_id)?u:e.artworkId,N=null!=(p=null!=(f=e.procolor_routing_mode)?f:e.procolorRoutingMode)?p:null,D=null!=(_=null!=(h=null==I?void 0:I.procolor)?h:null==I?void 0:I.procolor_block)?_:null,T=null!=(m=null!=(g=null!=(b=null!=(y=null==D?void 0:D.delta_e_value)?y:null==D?void 0:D.deltaEValue)?b:null==I?void 0:I.delta_e_value)?g:null==I?void 0:I.deltaEValue)?m:null,M=null!=(v=null!=(w=null!=(j=null!=(k=null==D?void 0:D.profile_sha256)?k:null==D?void 0:D.profileSha256)?j:null==I?void 0:I.profile_sha256)?w:null==I?void 0:I.profileSha256)?v:null;(0,n.re)({artwork_id:E,procolor_routing_mode:N,procolor_delta_e:T,procolor_threshold:null!=(x=null==I?void 0:I.threshold)?x:null,procolor_profile_sha256:M,procolor_percentile_label:null!=(S=null!=(O=null==I?void 0:I.percentile_label)?O:null==I?void 0:I.percentileLabel)?S:null,multi_artwork:r})}}}},817643(e,t,r){"use strict";r.d(t,{mk:()=>getNeckLabelPageMeta,sN:()=>getOrderNumber});var n="neck_label";function getOrderNumber(){if(!("u"<typeof window)&&void 0!==window.jiffy&&null!=window.jiffy.orderNumber)return String(window.jiffy.orderNumber)}function getNeckLabelPageMeta(){var e;return"u"<typeof window||void 0===window.jiffy?{catalogNumber:"",pdpType:n}:{catalogNumber:String(null!=(e=window.jiffy.neckLabelCatalogNumber)?e:""),pdpType:window.jiffy.neckLabelPdpType||n}}},398433(e,t,r){"use strict";r.d(t,{q:()=>nextPollDelay});var n=new Set([403,429]);function nextPollDelay(e){var t=e.error,r=e.attempt,o=e.lastStatus,i=e.baseIntervalMs,l=e.capMs,c=e.remainingBudgetMs;if(!t)return{delayMs:i,shouldStop:!1,attemptNext:0,lastStatusNext:void 0};var u=t.status;if(401===u)return{delayMs:i,shouldStop:!0,attemptNext:0,lastStatusNext:void 0};if(!u||u>=500||!n.has(u))return{delayMs:i,shouldStop:!1,attemptNext:0,lastStatusNext:void 0};var d=u===o?r:0,p=Math.min(i*Math.pow(2,d),l),f=d+1;return{delayMs:p,shouldStop:f>=3||p>c,attemptNext:f,lastStatusNext:u}}},489067(e,t,r){"use strict";r.d(t,{F3:()=>onProcolorOptOutChanged,xy:()=>announceProcolorOptOutChanged});var n="jiffy-procolor-optout",isBroadcastChannelAvailable=function(){return"u">typeof BroadcastChannel},announceProcolorOptOutChanged=function(){if(isBroadcastChannelAvailable())try{var e=new BroadcastChannel(n);e.postMessage({type:"procolor_optout_changed"}),e.close()}catch(e){}},openListeningChannel=function(e){try{var t=new BroadcastChannel(n);return t.onmessage=function(){return e()},t}catch(e){return null}},onProcolorOptOutChanged=function(e){if(!isBroadcastChannelAvailable())return function(){};var t=openListeningChannel(e);
1if(!t)return function(){};var onPageHide=function(){null==t||t.close(),t=null},onPageShow=function(r){r.persisted&&!t&&(t=openListeningChannel(e))};return window.addEventListener("pagehide",onPageHide),window.addEventListener("pageshow",onPageShow),function(){window.removeEventListener("pagehide",onPageHide),window.removeEventListener("pageshow",onPageShow),null==t||t.close(),t=null}}},705472(e,t,r){"use strict";r.d(t,{i:()=>n});var n={upload_artwork:{label:["Determining file type"],percentage:[15,15],interval:[100],catchUpInterval:20,rate:.1},validate_artwork:{label:["Determining print area"],percentage:[75,55],interval:[200,250],catchUpInterval:10,rate:.1},process_artwork:{label:["Analyzing background"],percentage:[85,60],interval:[100],catchUpInterval:20,rate:.1},extract_bg_metadata:{label:["Getting prices"],percentage:[90,65],interval:[100,500],catchUpInterval:20,rate:.01},fetch_price:{label:["Getting delivery date"],percentage:[100,70],interval:[100,700],rate:.1,catchUpInterval:20,skipCatchUp:!0},fetch_delivery_date:{label:["","Spangling image"],percentage:[100,100],interval:[100],rate:.1,catchUpInterval:20},spangle_image:{label:[""],percentage:[0,100],interval:[100],rate:.1,catchUpInterval:20}}},708043(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function safeRedirect(e,t){try{var r,n=new URL(e,window.location.href);if(!["http:","https:"].includes(n.protocol))return console.warn("[safeRedirect] Blocked redirect to disallowed protocol: ".concat(e)),!1;var o=(null!=(r=null==t?void 0:t.additionalOrigins)?r:[]).map(function(e){try{return new URL(e).origin}catch(t){return e}});if([window.location.origin].concat(_to_consumable_array(o)).includes(n.origin))return window.location.href=n.href,!0;return console.warn("[safeRedirect] Blocked redirect to disallowed origin: ".concat(e)),!1}catch(t){return console.warn("[safeRedirect] Blocked redirect due to malformed URL: ".concat(e)),!1}}r.d(t,{Y:()=>safeRedirect})},68977(e,t,r){"use strict";r.d(t,{b:()=>getStickerDimensions});var defaultStickerDimensions=function(e,t,r){var n=e,o=t;return n>=o?o=(n=3)/r:n=(o=3)*r,{width:n,height:o}},enforceMinDimensions=function(e,t,r){var n=e,o=t;return n<1?o=(n=1)/r:o<1&&(n=(o=1)*r),{width:n,height:o}},getStickerDimensions=function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e/t,l=parseFloat(e),c=parseFloat(t);return o||(l=(r=defaultStickerDimensions(l,c,i)).width,c=r.height),l=(n=enforceMinDimensions(l,c,i)).width,c=n.height,{width:l.toFixed(2),height:c.toFixed(2)}}},70811(e,t,r){"use strict";r.d(t,{J:()=>n});var n={bgColor:"#FFFFFF",paddingSize:"medium",shape:"die-cut",width:1,height:1,quantity:10}},946296(e,t,r){"use strict";function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}r.d(t,{I:()=>n});var n=new(function(){function Storage(){_class_call_check(this,Storage),this.prefix="Jiffy",this.storage=window.localStorage}return _create_class(Storage,[{key:"storageKey",value:function(e){return"".concat(this.prefix,"/").concat(e)}},{key:"get",value:function(e){var t=this.storage.getItem(this.storageKey(e));try{return"undefined"===t?void 0:JSON.parse(null!=t?t:"")}catch(e){return t}}},{key:"set",value:function(e,t){this.storage.setItem(this.storageKey(e),JSON.stringify(t))}},{key:"isExists",value:function(e){return null!=this.get(e)}},{key:"remove",value:function(e){this.storage.removeItem(this.storageKey(e))}},{key:"clear",value:function(){this.storage.clear()}}]),Storage}())},472162(e,t,r){"use strict";r.d(t,{N:()=>readJiffyCreditControl});var n=r(857342),readLineMap=function(e){return void 0===e?{}:(0,n.u4)(e)&&Object.values(e).every(n.At)?e:null},readJiffyCreditControl=function(e){if(!(0,n.u4)(e))return null;var t=e.jiffy_credit;if(!(0,n.u4)(t))return null;var r=t.expected_cents,o=t.applied_cents;if(!(0,n.At)(r)||!(0,n.At)(o))return null;var i=readLineMap(t.lines);if(null===i)return null;var l=readLineMap(t.line_caps);
1return null===l?null:{expectedCents:r,appliedCents:o,lines:i,lineCaps:l}}},130746(e,t,r){"use strict";r.d(t,{C_:()=>appliedCreditText,lX:()=>orderCreditAmounts,rs:()=>earningCreditText});var n=r(251636),o=r(425196),orderCreditAmounts=function(e){if(!e||"order"!==e.context||!e.order)return{expectedCents:0,appliedCents:null};var t=e.order,r=t.expected_credit_cents,n=t.applied_credit_cents;return{expectedCents:r>0?r:0,appliedCents:null!==n&&n>0?n:null}},earningCreditText=function(e){return"Your transfers are earning ".concat((0,n.$5)(e)," in ").concat(o.r," for apparel")},appliedCreditText=function(e){return"".concat((0,n.$5)(e)," ").concat(o.r," applied")}},681236(e,t,r){"use strict";function getUserId(){var e,t=document.head.querySelector('meta[property="user_id"]');if(!t)return null;var r=(null==(e=window.jiffy)?void 0:e.userId)||t.content;return r?String(r):null}r.d(t,{F6:()=>getUserId})},250817(e,t,r){"use strict";r.d(t,{Go:()=>validatePhoneWithMessage,Q7:()=>validatePhoneNumber});var n=/^(?:\+?1[\s.,-]?)?(?:\(([2-9]\d{2})\)|([2-9]\d{2}))[\s.,-]?([2-9]\d{2})[\s.,-]?\d{4}$/,validatePhoneNumber=function(e){return!!e&&"string"==typeof e&&n.test(e.trim())},validatePhoneWithMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.required,n=t.emptyMessage,o=t.invalidMessage;return e&&"string"==typeof e&&""!==e.trim()?validatePhoneNumber(e)?{valid:!0,message:""}:{valid:!1,message:void 0===o?"Please enter a valid 10-digit phone number":o}:void 0===r||r?{valid:!1,message:void 0===n?"Please enter a phone number":n}:{valid:!0,message:""}}},636003(e,t,r){"use strict";r.d(t,{Y:()=>VueTeleport});var n=r(207214);function resolveTarget(e){return e?"string"==typeof e?document.querySelector(e):e:null}function VueTeleport(e){var t=e.children,r=e.to,o=e.disabled;if(void 0!==o&&o)return t;var i=resolveTarget(void 0===r?"body":r);return i?(0,n.createPortal)(t,i):t}},713803(e,t,r){"use strict";r.d(t,{e:()=>VueTransition});var n=r(483134),o=r(293534),i=r(183863),l=r(219612),c=r(29125),u=r(215008);function resolveChild(e){var t=o.Children.toArray(e).find(function(e){return(0,o.isValidElement)(e)});return t||null}function VueTransition(e){var t,r=e.children,d=e.name,p=void 0===d?"v":d,f=e.mode,_=e.appear,h=e.duration,m=e.enterFromClass,g=e.enterActiveClass,b=e.enterToClass,y=e.leaveFromClass,v=e.leaveActiveClass,w=e.leaveToClass,j=e.onBeforeEnter,k=e.onEnter,x=e.onAfterEnter,S=e.onBeforeLeave,O=e.onLeave,P=e.onAfterLeave,A=(0,o.useRef)(new Map),C=resolveChild(r);if(!C)return null;if("string"!=typeof C.type)return C;var I=String(null!=(t=C.key)?t:"__vue-transition__"),E=function(){var e=A.current.get(I);if(e)return e;var t={current:null};return A.current.set(I,t),t}(),N=(0,u.t3)(C),D=(0,o.cloneElement)(C,{ref:function(e){E.current=e,(0,u.bl)(N,e)}}),T=null!=m?m:"".concat(p,"-enter-from"),M=null!=g?g:"".concat(p,"-enter-active"),R=null!=b?b:"".concat(p,"-enter-to"),F={appear:T,appearActive:(0,u.zP)(M,R),appearDone:"",enter:T,enterActive:(0,u.zP)(M,R),enterDone:"",exit:null!=y?y:"".concat(p,"-leave-from"),exitActive:(0,u.zP)(null!=v?v:"".concat(p,"-leave-active"),null!=w?w:"".concat(p,"-leave-to")),exitDone:""},L=(0,n.jsx)(i.A,{timeout:(0,u.ah)(h),classNames:F,appear:void 0!==_&&_,nodeRef:E,onEnter:function(){E.current&&(null==j||j(E.current),null==k||k(E.current))},onEntered:function(){E.current&&(null==x||x(E.current))},onExit:function(){E.current&&(null==S||S(E.current))},onExiting:function(){E.current&&(null==O||O(E.current))},onExited:function(){E.current&&(null==P||P(E.current))},children:D},I);return f?(0,n.jsx)(l.A,{mode:f,children:L}):(0,n.jsx)(c.A,{component:null,children:L})}},102006(e,t,r){"use strict";r.d(t,{V:()=>VueTransitionGroup});var n=r(483134),o=r(293534),i=r(183863),l=r(29125),c=r(215008);function VueTransitionGroup(e){var t=e.children,r=e.name,u=void 0===r?"v":r,d=e.tag,p=e.duration,f=e.enterFromClass,_=e.enterActiveClass,h=e.enterToClass,m=e.leaveFromClass,g=e.leaveActiveClass,b=e.leaveToClass,y=(0,o.useRef)(new Map),getNodeRef=function(e){var t=y.current.get(e);if(t)return t;var r={current:null};return y.current.set(e,r),r},v={enter:null!=f?f:"".concat(u,"-enter-from"),enterActive:(0,c.zP)(null!=_?_:"".concat(u,"-enter-active"),null!=h?h:"".concat(u,"-enter-to")),enterDone:"",exit:null!=m?m:"".concat(u,"-leave-from"),exitActive:(0,c.zP)(null!=g?g:"".concat(u,"-leave-active"),null!=b?b:"".concat(u,"-leave-to")),exitDone:""},w=o.Children.toArray(t).filter(function(e){return(0,o.isValidElement)(e)}).map(function(e,t){if("string"!=typeof e.type)return e;var r,l=String(null!=(r=e.key)?r:"__vue-transition-group__".concat(t)),u=getNodeRef(l),d=(0,c.t3)(e),f=(0,o.cloneElement)(e,{ref:function(e){u.current=e,(0,c.bl)(d,e)}});return(0,n.jsx)(i.A,{timeout:(0,c.ah)(p),classNames:v,nodeRef:u,children:f},l)});return 0===w.length?null:(0,n.jsx)(l.A,{component:void 0===d?null:d,children:w})}},5786(e,t,r){"use strict";r.d(t,{A:()=>CommonModal});var n=r(483134),o=r(293534),i=r(997252),l=r(835828),c=r(636003),u=r(367559),d=r(895986);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function getDefaultProps(e){return{title:(0,u.n3)(void 0),compact:(0,u.n3)(!1),hideCloseButton:(0,u.n3)(!1),bottomAligned:(0,u.n3)(!1)}}function CommonModal(e){var t=e.ref,r=_object_without_properties(e,["ref"]),p=r.className,f=(r.title,r.compact,r.hideCloseButton,r.bottomAligned,_object_without_properties(r,["className","title","compact","hideCloseButton","bottomAligned"])),_=(0,u.Mm)(r,getDefaultProps),h=(0,o.useRef)(null);function $$modal(){return window.$(h.current)}function onShow(){$$modal().modal("show").on("hidden.bs.modal",function(e){if($$modal().off("hidden.bs.modal"),e.target===h.current){var t,r;null==(t=(r=_.current).onClose)||t.call(r),close()}})}function close(){$$modal().modal("hide")}return(0,o.useImperativeHandle)(t,function(){return{close:close}}),(0,o.useEffect)(function(){onShow()},[]),(0,n.jsx)(c.Y,{to:"body",children:(0,n.jsx)("div",{className:(0,i.cn)("modal","common-modal","scope-669571c0"),id:"common-modal",ref:h,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,i.cn)(["common-modal__modal-box modal-dialog scope-669571c0",{"common-modal__modal-box--no-padding":_.current.compact,"common-modal__modal-box--bottom-aligned":_.current.bottomAligned}],p)},(0,l.d)(f)),{children:[_.current.hideCloseButton?null:(0,n.jsx)("button",{className:(0,i.cn)("common-modal__modal-button-close scope-669571c0",{"common-modal__modal-button-close--no-bg":_.current.compact}),type:"button",onClick:close,"data-testid":"common-modal-modal-button-close",children:(0,n.jsx)(d.A,{className:(0,i.cn)("common-modal__modal-button-close-icon","scope-669571c0"),"data-testid":"common-modal-modal-button-close-icon"})}),_.current.title?(0,n.jsx)("div",{className:(0,i.cn)("common-modal__modal-header","scope-669571c0"),role:"heading",tabIndex:0,"data-testid":"common-modal-modal-header",children:(0,n.jsx)("span",{className:(0,i.cn)("common-modal__title","scope-669571c0"),children:_.current.title})}):null,r.children]}))})})}},350933(e,t,r){"use strict";r.d(t,{A:()=>Loader});var n=r(483134);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Loader(e){_object_destructuring_empty(e);var t=_extends({},e);return(0,n.jsxs)("svg",_object_spread_props(_object_spread({},t),{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",children:[(0,n.jsx)("circle",{cx:"4",cy:"12",r:"3",fill:"currentColor",children:(0,n.jsx)("animate",{id:"3-dots-bounce-0",attributeName:"cy",begin:"0;3-dots-bounce-1.end+0.25s",calcMode:"spline",dur:"0.6s",keySplines:".33,.66,.66,1;.33,0,.66,.33",values:"12;6;12"})}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor",children:(0,n.jsx)("animate",{attributeName:"cy",begin:"3-dots-bounce-0.begin+0.1s",calcMode:"spline",dur:"0.6s",keySplines:".33,.66,.66,1;.33,0,.66,.33",values:"12;6;12"})}),(0,n.jsx)("circle",{cx:"20",cy:"12",r:"3",fill:"currentColor",children:(0,n.jsx)("animate",{id:"3-dots-bounce-1",attributeName:"cy",begin:"3-dots-bounce-0.begin+0.2s",calcMode:"spline",dur:"0.6s",keySplines:".33,.66,.66,1;.33,0,.66,.33",values:"12;6;12"})})]}))}},703601(e,t,r){"use strict";r.d(t,{A:()=>PreCutPopup});var n=r(483134),o=r(293534),i=r(997252),l=r(835828),c=r(927997),u=r(808290),d=r(129771);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PreCutPopup(e){var t=e.className,r=_object_without_properties(e,["className"]);function noPreCutImageUrl(){return(0,c.lt)("gen/pre-cut-tooltip/no-pre-cut.jpeg",_object_spread_props(_object_spread({},u.W),{ixlib:"rb-0.3.5"}))}function preCutImageUrl(){return(0,c.lt)("gen/pre-cut-tooltip/pre-cut.png",_object_spread_props(_object_spread({},u.W),{ixlib:"rb-0.3.5"}))}return(0,o.useRef)(e).current=e,(0,n.jsxs)("div",_object_spread_props(_object_spread({},(0,l.d)(r)),{className:(0,i.cn)("pre-cut-popup scope-591df4cb",t),children:[(0,n.jsx)(d.A,{className:(0,i.cn)("icon","icon--svg","icon--info-circle-bold","scope-591df4cb"),height:"16",width:"16","data-testid":"icon-svg"}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__tooltip","scope-591df4cb"),children:[(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__title","scope-591df4cb"),children:"\uD83D\uDD0D What’s pre-cut?"}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__body","scope-591df4cb"),children:[(0,n.jsxs)("p",{className:(0,i.cn)("pre-cut-popup__description","scope-591df4cb"),children:[" ","Pre-cut transfers are ready to apply right out of the package—no trimming required!"," ",(0,n.jsx)("br",{className:(0,i.cn)("scope-591df4cb")})," This ensures a faster, cleaner application every time."," "]}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison","scope-591df4cb"),children:[(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison-container","scope-591df4cb"),children:[(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__comparison-image-container","scope-591df4cb"),children:(0,n.jsx)("img",{className:(0,i.cn)("pre-cut-popup__comparison-image","scope-591df4cb"),src:noPreCutImageUrl(),alt:"No Pre-cut Image"})}),(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__comparison-title","scope-591df4cb"),children:"No Pre-cut"}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison-description","scope-591df4cb"),children:[" ","Time per 
110 transfers:"," "]}),(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__comparison-duration","scope-591df4cb"),children:"10 minutes"})]}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison-container","scope-591df4cb"),children:[(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__comparison-image-container","scope-591df4cb"),children:(0,n.jsx)("img",{className:(0,i.cn)("pre-cut-popup__comparison-image","scope-591df4cb"),src:preCutImageUrl(),alt:"No Pre-cut Image"})}),(0,n.jsx)("div",{className:(0,i.cn)("pre-cut-popup__comparison-title","scope-591df4cb"),children:"Pre-cut"}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison-description","scope-591df4cb"),children:[" ","Time per 10 transfers:"," "]}),(0,n.jsxs)("div",{className:(0,i.cn)("pre-cut-popup__comparison-duration","pre-cut-popup__comparison-duration-precut","scope-591df4cb"),children:[" ","0 minutes"," "]})]})]})]})]})]}))}},369171(e,t,r){"use strict";r.d(t,{A:()=>StoreCreditTiers});var n=r(483134),o=r(997252),i=r(835828),l=r(367559),c=r(927997),u=r(257889),d=r(958469),p=r(338908),f=r(129771);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function getDefaultProps(e){return{expectedCredits:(0,l.n3)(null),totalAmount:(0,l.n3)(null),currentTier:(0,l.n3)(null),tiers:(0,l.Uu)(function(){return[]}),isTooltip:(0,l.n3)(!1)}}function StoreCreditTiers(e){var t,r,_=e.className,h=(e.expectedCredits,e.totalAmount,e.currentTier,e.tiers,e.isTooltip,_object_without_properties(e,["className","expectedCredits","totalAmount","currentTier","tiers","isTooltip"])),m=(0,l.Mm)(e,getDefaultProps),g=(0,p.s)().n;function loyaltyBadgeUrl(){return(0,c.lt)("gen/loyalty-badge.png")}function currentTiers(){var e;return null!=(e=m.current.tiers)?e:[]}function currentTotalAmount(){var e;return Number(null!=(e=m.current.totalAmount)?e:0)}function currentExpectedCredits(){var e;return Number(null!=(e=m.current.expectedCredits)?e:0)}function filteredTiers(){return currentTiers().filter(function(e){return e.percentage>0})}function nextTier(){return currentTiers().find(function(e){return currentTotalAmount()>0&&currentTotalAmount()<e.min})||null}function amountToNextTier(){var e=nextTier();return e?e.min-currentTotalAmount():0}function maxPercentage(){var e,t=currentTiers();return t.length?(e=Math).max.apply(e,_to_consumable_array(t.map(function(e){return e.percentage}
1))):0}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},(0,i.d)(h)),{className:(0,o.cn)(["store-credit-tiers scope-045e67ae",{"store-credit-tiers--tooltip":m.current.isTooltip}],_),children:[m.current.isTooltip?null:(0,n.jsxs)("div",{className:(0,o.cn)("store-credit-tiers__header","scope-045e67ae"),children:[(0,n.jsx)("img",{className:(0,o.cn)("store-credit-tiers__icon","scope-045e67ae"),alt:"Loyalty Badge",src:loyaltyBadgeUrl()}),(0,n.jsx)("p",{className:(0,o.cn)("store-credit-tiers__text","scope-045e67ae"),children:currentExpectedCredits()>0?(0,n.jsxs)("span",{className:(0,o.cn)("scope-045e67ae"),children:[" ","You'll earn"," ",(0,n.jsxs)("strong",{className:(0,o.cn)("scope-045e67ae"),children:[g(currentExpectedCredits(),"currency")," credit"]})," ","on Transfers!"," "]}):(0,n.jsx)("span",{className:(0,o.cn)("scope-045e67ae"),children:" Earn credits on Transfers! "})})]}),(0,n.jsxs)("div",{className:(0,o.cn)("store-credit-tiers__progress","scope-045e67ae"),children:[nextTier()?(0,n.jsxs)("p",{className:(0,o.cn)("store-credit-tiers__progress-text","scope-045e67ae"),children:[" ","You're"," ",(0,n.jsx)("strong",{className:(0,o.cn)("scope-045e67ae"),children:g(amountToNextTier(),"currency")})," ","away from ",(0,n.jsxs)("strong",{className:(0,o.cn)("scope-045e67ae"),children:[null==(t=nextTier())?void 0:t.percentage,"%"]})," ","store credit."," "]}):(0,n.jsxs)("p",{className:(0,o.cn)("store-credit-tiers__progress-text","scope-045e67ae"),children:[" ","You've earned"," ",(0,n.jsxs)("strong",{className:(0,o.cn)("scope-045e67ae"),children:[(null==(r=m.current.currentTier)?void 0:r.percentage)||0,"%"]})," ","store credit!"," "]}),m.current.isTooltip?null:(0,n.jsx)(u.A,{className:(0,o.cn)("scope-045e67ae"),trigger:"click",position:"top-right",slots:{target:function(){return(0,n.jsx)(f.A,{className:(0,o.cn)("store-credit-tiers__info-icon","scope-045e67ae"),"data-testid":"store-credit-tiers-info-icon"})},content:function(){return(0,n.jsxs)("div",{className:(0,o.cn)("store-credit-tiers__tooltip","scope-045e67ae"),children:[" ","Earn up to ",maxPercentage(),"% back on every purchase!"," ",(0,n.jsx)("a",{className:(0,o.cn)("scope-045e67ae"),href:"/transfer-rewards-terms-conditions","data-testid":"store-credit-tiers-a",children:"Terms and Conditions"})]})}},"data-testid":"tooltip"})]}),(0,n.jsx)("div",{className:(0,o.cn)("store-credit-tiers__tiers","scope-045e67ae"),children:(0,d.p)(filteredTiers(),function(e,t){var r;return(0,n.jsxs)("div",{className:(0,o.cn)("store-credit-tiers__tier scope-045e67ae",{"store-credit-tiers__tier--active":(null==(r=m.current.currentTier)?void 0:r.percentage)===e.percentage}),children:[(0,n.jsxs)("span",{className:(0,o.cn)("store-credit-tiers__tier-rate","scope-045e67ae"),children:[e.percentage,"%"]}),(0,n.jsx)("span",{className:(0,o.cn)("store-credit-tiers__tier-range","scope-045e67ae"),children:e.range})]},t)})}),m.current.isTooltip?(0,n.jsxs)("a",{className:(0,o.cn)("store-credit-tiers__link","scope-045e67ae"),href:"/transfer-rewards-terms-conditions","data-testid":"store-credit-tiers-link",children:[" ","Terms and Conditions"," "]}):null]}))}},257889(e,t,r){"use strict";r.d(t,{A:()=>VueTooltip});var n=r(483134),o=r(293534),i=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function VueTooltip(e){var t,r,l=e.ref,c=e.className,u=e.disabled,d=void 0!==u&&u,p=e.position,f=e.trigger,_=void 0===f?"hover":f,h=e.customPosition,m=e.onShow,g=e.onHide,b=e.slots,y=void 0===b?{}:b,v=_object_without_properties(e,["ref","className","disabled","position","trigger","customPosition","onShow","onHide","slots"]),w=_sliced_to_array((0,o.useState)(!1),2),j=w[0],k=w[1],x=(0,o.useRef)(null),S=(0,o.useRef)(null);function customPositionStyle(){return h?_object_spread({position:"absolute"},h):{}}function showTooltip(){d||(k(!0),null==m||m())}function hideTooltip(){d||(k(!1),null==g||g())}function toggleTooltip(){if(!d){x.current&&clearTimeout(x.current);var e=!j;k(e),e?(x.current=setTimeout(function(){x.current=null},100),null==m||m()):null==g||g()}}function handleClickOutside(){!x.current&&j&&hideTooltip()}function handleTargetMouseEnter(){"hover"===_&&showTooltip()}function handleTargetMouseLeave(){"hover"===_&&hideTooltip()}function handleTargetClick(e){e.stopPropagation(),"click"===_&&toggleTooltip()}return(0,o.useEffect)(function(){return function(){x.current&&clearTimeout(x.current)}},[]),(0,o.useImperativeHandle)(void 0===l?null:l,function(){return{hideTooltip:hideTooltip,showTooltip:showTooltip}}),(0,o.useEffect)(function(){if(j)return document.addEventListener("pointerdown",onPointerDown,!0),function(){return document.removeEventListener("pointerdown",onPointerDown,!0)};function onPointerDown(e){S.current&&!S.current.contains(e.target)&&handleClickOutside()}},[j]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},v),{ref:S,className:(0,i.cn)("vue-tooltip scope-aca0e50a",c),children:[(0,n.jsx)("div",{className:"vue-tooltip__target scope-aca0e50a",onMouseEnter:handleTargetMouseEnter,onMouseLeave:handleTargetMouseLeave,onClick:handleTargetClick,"data-testid":"vue-tooltip-target",children:null==(t=y.target)?void 0:t.call(y)}),j&&(0,n.jsx)("div",{className:(0,i.cn)("vue-tooltip__content scope-aca0e50a","vue-tooltip__content--".concat(void 0===p?"top":p),{"vue-tooltip__content--custom":h}),style:customPositionStyle(),children:null==(r=y.content)?void 0:r.call(y)})]}))}},834057(e,t,r){"use strict";r.d(t,{A:()=>useTransfersStoreCredit,q:()=>generateTiersObject});var n=r(646736);function generateTiersObject(e){return(null!=e?e:[]).toSorted(function(e,t){return e.min-t.min}).reduce(function(e,t,r,n){var o=r<n.length-1?n[r+1]:null;return o?e.push({range:"$".concat(t.min," - $").concat((o.min-.01).toFixed(2)),min:t.min,max:o.min-.01,percentage:100*t.rate}):e.push({range:"Above $".concat(t.min),min:t.min,max:Number.MAX_SAFE_INTEGER,percentage:100*t.rate}),e},[])}function useTransfersStoreCredit(){var e=(0,n.KR)(null),t=(0,n.EW)(function(){var t,r,n,o;return Number(null!=(t=null==(o=e.value)||null==(n=o.userStoreCredits)||null==(r=n.transfers)?void 0:r.totalAmount)?t:0)}
1),r=(0,n.EW)(function(){var t,r;return Number(null!=(t=null==(r=e.value)?void 0:r.orderSubtotal)?t:0)}),o=(0,n.EW)(function(){var t,r;return Number(null!=(t=null==(r=e.value)?void 0:r.expectedCredits)?t:0)}),i=(0,n.EW)(function(){var t,r;return Number(null!=(t=null==(r=e.value)?void 0:r.transfersCartSubtotal)?t:0)}),l=(0,n.EW)(function(){var t,r;return generateTiersObject(null!=(t=null==(r=e.value)?void 0:r.tiers)?t:[])}),c=(0,n.EW)(function(){var t;return(null==(t=e.value)?void 0:t.earnSunset)===!0}),u=(0,n.EW)(function(){var t;return(null==(t=e.value)?void 0:t.jiffyCreditLive)===!0}),d=(0,n.EW)(function(){return r.value+i.value}),p=(0,n.EW)(function(){var e,t,r=(0,n.R1)(l);if(!(null==r?void 0:r.length))return null;var o=r[r.length-1];return null!=(e=null!=(t=r.find(function(e){return d.value<=e.max}))?t:o)?e:null}),f=(0,n.EW)(function(){var e=0;if(p.value){var t=p.value.percentage/100;e=d.value*t}return e});return{storeCreditInfo:e,creditAmount:t,orderSubtotal:r,expectedCredits:o,transfersCartSubtotal:i,tiers:l,totalCartAmount:d,currentTier:p,currentExpectedCredits:f,earnSunset:c,jiffyCreditLive:u,updateStoreCreditInfo:function(t){e.value=t}}}},631116(e,t,r){"use strict";r.d(t,{z:()=>createJotaiPiniaFacadeForReact});var n=r(802436),o=r(492624),i=r(684204);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function createJotaiPiniaFacadeForReact(e){var t=e.jotaiStore,r=e.state,l=e.getters,c=void 0===l?{}:l,u=e.actions,d=void 0===u?{}:u,p=e.scopedReads,f=void 0===p?function(){return!0}:p;(0,i.ht)(!1);var _={},h=Object.values(r),m=0,g=new Map,b=(0,n.eU)(function(e){var t=!1,r=!0,n=!1,o=void 0;try{for(var i,l=h[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=i.value,u=e(c);g.has(c)&&g.get(c)===u||(t=!0,g.set(c,u))}}catch(e){n=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw o}}return t&&m++,m}),y={};y=new Proxy({},{get:function(e,n){if("$reset"===n)return function(){var e=!0,n=!1,o=void 0;try{for(var i,l=Object.entries(r)[Symbol.iterator]();!(e=(i=l.next()).done);e=!0){var c=_sliced_to_array(i.value,2)[1];t.set(c,c.init)}}catch(e){n=!0,o=e}finally{try{e||null==l.return||l.return()}finally{if(n)throw o}}};if(n in d){var o;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(o=d[n]).call.apply(o,[y].concat(_to_consumable_array(t)))}}return n in c?c[n].call(y):n in r?t.get(r[n]):_[n]},set:function(e,n,o){return n in r?t.set(r[n],"function"==typeof o?function(){return o}:o):_[n]=o,!0}});var v=(0,n.eU)(void 0),w=new Map;function trackingSelf(e){var t=new Proxy({},{get:function(n,o){if(o in r)return e(r[o]);if(o in c)return c[o].call(t);if(o in d){var i;return function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(i=d[o]).call.apply(i,[y].concat(_to_consumable_array(t)))}}return _[o]}});return t}function getterAtom(e){var t=w.get(e);if(!t){var r=c[e];t=(0,n.eU)(function(e){var t=r.call(trackingSelf(e));if("function"!=typeof t)return t;var n=!0,o=!1,i=void 0;try{for(var l,c=h[Symbol.iterator]();!(n=(l=c.next()).done);
1n=!0){var u=l.value;e(u)}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r.call(y)}),w.set(e,t)}return t}function sourceAtomFor(e){return e in r?r[e]:e in c?getterAtom(e):v}var j=new Map;function cachedAction(e){var t,r=j.get(e);return r||(r=function(){for(var r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=d[e]).call.apply(t,[y].concat(_to_consumable_array(n)))},j.set(e,r)),r}function useStoreValue(e){var n=f(),i=n?sourceAtomFor(e):b,l=(0,o.md)(i,{store:t});return e in d?cachedAction(e):n&&(e in r||e in c)?l:y[e]}function useStore(){return(0,o.md)(b,{store:t}),y}return useStore.store=y,useStore.useValue=useStoreValue,useStore}},152793(e,t,r){"use strict";r.d(t,{S:()=>createJotaiVuexFacadeForReact});var n=r(802436),o=r(492624),i=r(684204),l=r(724005),c=r.n(l);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function createJotaiVuexFacadeForReact(e){var t=e.jotaiStore,r=e.state,l=e.stateKey,u=void 0===l?"cartState":l,d=e.getters,p=void 0===d?{}:d,f=e.mutations,_=void 0===f?{}:f,h=e.actions,m=void 0===h?{}:h,g=e.modules,b=void 0===g?{}:g,y=e.plugins;(0,i.ht)(!1);var v=[],w={};function ensureDynamicAtom(e,o){if(!(e in r)&&!(e in w)){console.warn('[jotai-facade-react] Auto-registering dynamic atom for undeclared state key "'.concat(e,'". ')+"Add it to the state atom map to silence this warning.");var i=(0,n.eU)(o);w[e]=i,j.push(i),t.sub(i,refresh)}}function readAtomMap(e){var r={},n=!0,o=!1,i=void 0;try{for(var l,c=Object.entries(e)[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var u=_sliced_to_array(l.value,2),d=u[0],p=u[1];r[d]=t.get(p)}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}return r}function buildCombinedState(){var e=readAtomMap(r),n=!0,o=!1,i=void 0;try{for(var l,c=Object.entries(w)[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var d=_sliced_to_array(l.value,2),p=d[0],f=d[1];e[p]=t.get(f)}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}var _=_define_property({},u,e),h=!0,m=!1,g=void 0;try{for(var y,v=Object.entries(b)[Symbol.iterator]();!(h=(y=v.next()).done);h=!0){var j=_sliced_to_array(y.value,2),k=j[0],x=j[1];_[k]=readAtomMap(x.state())}}catch(e){m=!0,g=e}finally{try{h||null==v.return||v.return()}finally{if(m)throw g}}return _}function setAtom(e,r){t.set(e,"function"==typeof r?function(){return r}:r)}function flushAtomMap(e,t,r){var n=!0,o=!1,i=void 0;try{for(var l,c=Object.entries(e)[Symbol.iterator]();!(n=(l=c.next()).done);
1n=!0){var u=_sliced_to_array(l.value,2),d=u[0],p=u[1];r[d]!==t[d]&&setAtom(p,r[d])}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}}function flushRootStateSlice(e,t){flushAtomMap(r,e,t);var n=!0,o=!1,i=void 0;try{for(var l,c=Object.keys(t)[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var u=l.value;if(!(u in r)){ensureDynamicAtom(u,t[u]);var d=w[u];t[u]!==e[u]&&setAtom(d,t[u])}}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}var p=!0,f=!1,_=void 0;try{for(var h,m=Object.entries(w)[Symbol.iterator]();!(p=(h=m.next()).done);p=!0){var g=_sliced_to_array(h.value,2),b=g[0],y=g[1];b in t&&t[b]!==e[b]&&setAtom(y,t[b])}}catch(e){f=!0,_=e}finally{try{p||null==m.return||m.return()}finally{if(f)throw _}}}function flushCombinedState(e,t){flushRootStateSlice(e[u],t[u]);var r=!0,n=!1,o=void 0;try{for(var i,l=Object.entries(b)[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=_sliced_to_array(i.value,2),d=c[0],p=c[1];flushAtomMap(p.state(),e[d],t[d])}}catch(e){n=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw o}}}var j=_to_consumable_array(Object.values(r)).concat(_to_consumable_array(Object.values(b).flatMap(function(e){return Object.values(e.state())}))),k=new Map,x=!0,S=!1,O=void 0;try{for(var P,A=Object.entries(r)[Symbol.iterator]();!(x=(P=A.next()).done);x=!0){var C=_sliced_to_array(P.value,2),I=C[0],E=C[1];k.set(E,I)}}catch(e){S=!0,O=e}finally{try{x||null==A.return||A.return()}finally{if(S)throw O}}var N=!0,D=!1,T=void 0;try{for(var M,R=Object.entries(b)[Symbol.iterator]();!(N=(M=R.next()).done);N=!0){var F=_sliced_to_array(M.value,2),L=F[0],B=F[1],z=!0,U=!1,H=void 0;try{for(var q,V=Object.entries(B.state())[Symbol.iterator]();!(z=(q=V.next()).done);z=!0){var G=_sliced_to_array(q.value,2),K=G[0],W=G[1];k.set(W,"".concat(L,"/").concat(K))}}catch(e){U=!0,H=e}finally{try{z||null==V.return||V.return()}finally{if(U)throw H}}}}catch(e){D=!0,T=e}finally{try{N||null==R.return||R.return()}finally{if(D)throw T}}var Q=0,J=new Map,Z=(0,n.eU)(function(e){var t=!1,r=!0,n=!1,o=void 0;try{for(var i,l=j[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var u=i.value,d=e(u);J.has(u)&&c()(J.get(u),d)||(t=!0,k.get(u),J.set(u,d))}}catch(e){n=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw o}}return t&&Q++,Q}),Y={},X={};function makeModuleGetterProxy(e){return new Proxy({},{get:function(t,r){return Y["".concat(e,"/").concat(r)]}})}function getterChanged(e,t){return"function"==typeof t?"function"!=typeof e:!c()(e,t)}function recomputeGetters(){for(var e=buildCombinedState(),t=0,r=!1;t<32;t+=1){var n=!1,o=!0,i=!1,l=void 0;try{for(var c,u=Object.entries(p)[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d=_sliced_to_array(c.value,2),f=d[0],_=d[1];try{var h=_(e,Y);getterChanged(Y[f],h)?(Y[f]=h,n=!0):"function"==typeof h&&(Y[f]=h)}catch(e){}}}catch(e){i=!0,l=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}var m=!0,g=!1,y=void 0;try{for(var v,w=Object.entries(b)[Symbol.iterator]();!(m=(v=w.next()).done);m=!0){var j=_sliced_to_array(v.value,2),k=j[0],x=j[1];if(x.getters){var S=e[k],O=makeModuleGetterProxy(k),P=!0,A=!1,C=void 0;try{for(var I,E=Object.entries(x.getters)[Symbol.iterator]();!(P=(I=E.next()).done);P=!0){var N=_sliced_to_array(I.value,2),D=N[0],T=N[1],M=x.namespaced?"".concat(k,"/").concat(D):D;try{var R=T(S,O,e,Y);getterChanged(Y[M],R)?(Y[M]=R,n=!0):"function"==typeof R&&(Y[M]=R)}catch(e){}}}catch(e){A=!0,C=e}finally{try{P||null==E.return||E.return()}finally{if(A)throw C}}}}}catch(e){g=!0,y=e}finally{try{m||null==w.return||w.return()}finally{if(g)throw y}}if(!n)break}}function refresh(){recomputeGetters(),X=buildCombinedState()}function resolveCommit(e){if(_[e])return{fn:_[e],scope:"root"};var t=e.indexOf("/");if(-1!==t){var r,n=e.slice(0,t),o=e.slice(t+1),i=b[n];if(null==i||null==(r=i.mutations)?void 0:r[o])return{fn:i.mutations[o],scope:n}}return null}function resolveDispatch(e){if(m[e])return{fn:m[e],scope:"root"};var t=e.indexOf("/");if(-1!==t){var r,n=e.slice(0,t),o=e.slice(t+1),i=b[n];if(null==i||null==(r=i.actions)?void 0:r[o])return{fn:i.actions[o],scope:n}}return _[e]?{fn:_[e],scope:"root"}:null}function execMutation(e,t){var r=resolveCommit(e);
1if(!r)return void console.warn("[jotai-facade-react] Unknown mutation: ".concat(e));if("root"===r.scope){var n=buildCombinedState(),o=(0,i.jM)(n,function(e){r.fn(e,t)});flushCombinedState(n,o)}else{var l=b[r.scope].state(),c=readAtomMap(l),u=(0,i.jM)(c,function(e){r.fn(e,t)});flushAtomMap(l,c,u)}}function makeModuleContext(e){var t=b[e];return{get state(){return readAtomMap(t.state())},get getters(){if(!t.namespaced)return Y;return new Proxy({},{get:function(t,r){return Y["".concat(e,"/").concat(r)]}})},get rootState(){return buildCombinedState()},get rootGetters(){return Y},commit:function(t,r,n){var o=(null==n?void 0:n.root)?t:"".concat(e,"/").concat(t);ee.commit(o,r)},dispatch:function(t,r,n){var o=(null==n?void 0:n.root)?t:"".concat(e,"/").concat(t);return ee.dispatch(o,r)}}}function makeRootContext(){return{get state(){return buildCombinedState()},get getters(){return Y},commit:function(e,t,r){ee.commit(e,t)},dispatch:function(e,t,r){return ee.dispatch(e,t)}}}function notifySubscribers(e,t){var r=buildCombinedState(),n=!0,o=!1,i=void 0;try{for(var l,c=v[Symbol.iterator]();!(n=(l=c.next()).done);n=!0)(0,l.value)({type:e,payload:t},r)}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}}refresh(),t.sub(Z,refresh);var ee={get state(){return X},getters:new Proxy({},{get:function(e,t){return Y[t]}}),commit:function(e,t,r){execMutation(e,t),notifySubscribers(e,t)},dispatch:function(e,t,r){var n=resolveDispatch(e);return n?new Promise(function(r){if("root"===n.scope)m[e]?r(m[e](makeRootContext(),t)):(execMutation(e,t),notifySubscribers(e,t),r(void 0));else{var o=makeModuleContext(n.scope);r(n.fn(o,t))}}):(console.warn("[jotai-facade-react] Unknown action: ".concat(e)),Promise.resolve())},subscribe:function(e){return v.push(e),function(){var t=v.indexOf(e);-1!==t&&v.splice(t,1)}},useStore:function(){return(0,o.md)(Z,{store:t}),ee}},et=!0,er=!1,en=void 0;try{for(var eo,ea=(void 0===y?[]:y)[Symbol.iterator]();!(et=(eo=ea.next()).done);et=!0)(0,eo.value)(ee)}catch(e){er=!0,en=e}finally{try{et||null==ea.return||ea.return()}finally{if(er)throw en}}return ee}},215008(e,t,r){"use strict";function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function resolveTimeout(e){if("number"==typeof e)return{enter:e,exit:e};if(e){var t,r,n;return{enter:null!=(t=e.enter)?t:200,exit:null!=(r=null!=(n=e.leave)?n:e.enter)?r:200}}return{enter:200,exit:200}}function assignRef(e,t){if(e){if("function"==typeof e)return void e(t);(void 0===e?"undefined":_type_of(e))==="object"&&"current"in e&&(e.current=t)}}function extractRef(e){var t,r;return null!=(t=e.ref)?t:null==(r=e.props)?void 0:r.ref}function mergeClasses(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}r.d(t,{ah:()=>resolveTimeout,bl:()=>assignRef,t3:()=>extractRef,zP:()=>mergeClasses})},667702(e,t,r){"use strict";r.d(t,{Eh:()=>i,Lz:()=>getLinkConfig,WS:()=>saveLinkClickData,_k:()=>trackLinkLifecycleEvent,b7:()=>stripeLinkProperties,dL:()=>getLinkClickTimestamp,dN:()=>fireLinkCheckoutCompletedFromStorage,o:()=>clearLinkClickData,xw:()=>trackCheckoutV3Event});var n=r(433769);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}var o={checkout_version:"v3",flow:"unified_checkout",surface:"checkout_v3"},i={apple_pay:"Apple Pay",google_pay:"Google Pay",link:"Link"};function trackCheckoutV3Event(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.track)(e,_object_spread({},o,t))}function stripeLinkProperties(e){var t,r;return{stripe_link_enabled:null!=(t=e.stripeLinkEnabled)&&t,ab_str
1ipe_link_variant:null!=(r=e.stripeLinkVariant)?r:null}}var l=!1;function trackLinkLifecycleEvent(e,t,r){if("link_auth_started"===e)l=!1;else if("link_auth_failed"===e){if(l)return;l=!0}var o=r.extra,i=_object_without_properties(r,["extra"]);try{(0,n.track)(e,_object_spread({surface:t},stripeLinkProperties(i),o))}catch(e){}}var c="link_lifecycle_data";function saveLinkClickData(e,t,r){try{sessionStorage.setItem(c,JSON.stringify({clickTimestamp:null!=r?r:Date.now(),surface:e,stripeLinkEnabled:t.stripeLinkEnabled,stripeLinkVariant:t.stripeLinkVariant}))}catch(e){}}function fireLinkCheckoutCompletedFromStorage(){try{var e=sessionStorage.getItem(c);if(!e)return;sessionStorage.removeItem(c);var t=JSON.parse(e);trackLinkLifecycleEvent("link_checkout_completed",t.surface,{stripeLinkEnabled:t.stripeLinkEnabled,stripeLinkVariant:t.stripeLinkVariant,extra:{time_to_complete_ms:Date.now()-t.clickTimestamp}})}catch(e){}}function getLinkClickTimestamp(){try{var e=sessionStorage.getItem(c);if(!e)return null;var t=JSON.parse(e).clickTimestamp;return"number"==typeof t?t:null}catch(e){return null}}function clearLinkClickData(){try{sessionStorage.removeItem(c)}catch(e){}}function getLinkConfig(){var e,t,r;return{stripeLinkEnabled:(null==(t=window.jiffy)?void 0:t.stripeLinkEnabled)===!0,stripeLinkVariant:null!=(e=null==(r=window.jiffy)?void 0:r.stripeLinkVariant)?e:null}}},125072(e,t,r){"use strict";r.d(t,{W:()=>getUserType,x:()=>isUserLoggedIn});var n=r(741235);function isUserLoggedIn(){return!!(0,n.v8)("name")}function getUserType(){return(0,n.v8)("name")?"signed_in":"guest_user"}},553263(e,t,r){"use strict";r.d(t,{G3:()=>f,J9:()=>l,Je:()=>u,LI:()=>c,OI:()=>o,fq:()=>i,lm:()=>p,w6:()=>d,xS:()=>n});var n="/?customizable=Customizable&bare=true",o="432292",i="DTF001",l="L",c=["XS","S","M","L","XL","2XL","3XL","4XL","5XL"],u=["front","frontLeftChest","back"],d={SHIRT:"shirt",GREEN:"green",CHECKERED:"checkered",GRAY:"gray"},p={GREEN_BACKGROUND:"#04F404",GREEN_SCREEN:"#00FF00",GRAY_BACKGROUND:"#E5E7EB",WHITE_BACKGROUND:"#FFFFFF",BLACK_TEXT:"#000000"},f={CHECKERED_SVG:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQiIGhlaWdodD0iNCIgZmlsbD0iI0M1QzVDNSIvPgo8cmVjdCB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjQzVDNUM1Ii8+CjxyZWN0IHg9IjE2IiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB0cmFuc2Zvcm09InJvdGF0ZSgtMTgwIDE2IDgpIiBmaWxsPSIjQzVDNUM1Ii8+CjxyZWN0IHg9IjE2IiB5PSIxNiIgd2lkdGg9IjQiIGhlaWdodD0iNCIgdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCAxNiAxNikiIGZpbGw9IiNDNUM1QzUiLz4KPHJlY3QgeD0iOCIgd2lkdGg9IjQiIGhlaWdodD0iNCIgZmlsbD0iI0M1QzVDNSIvPgo8cmVjdCB4PSI4IiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjQzVDNUM1Ii8+CjxyZWN0IHg9IjgiIHk9IjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIHRyYW5zZm9ybT0icm90YXRlKC0xODAgOCA4KSIgZmlsbD0iI0M1QzVDNSIvPgo8cmVjdCB4PSI4IiB5PSIxNiIgd2lkdGg9IjQiIGhlaWdodD0iNCIgdHJhbnNmb3JtPSJyb3RhdGUoLTE4MCA4IDE2KSIgZmlsbD0iI0M1QzVDNSIvPgo8cmVjdCB4PSI0IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjOUI5QjlCIi8+CjxyZWN0IHg9IjQiIHk9IjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIGZpbGw9IiM5QjlCOUIiLz4KPHJlY3QgeD0iMTIiIHk9IjgiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIHRyYW5zZm9ybT0icm90YXRlKC0xODAgMTIgOCkiIGZpbGw9IiM5QjlCOUIiLz4KPHJlY3QgeD0iMTIiIHk9IjE2IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB0cmFuc2Zvcm09InJvdGF0ZSgtMTgwIDEyIDE2KSIgZmlsbD0iIzlCOUI5QiIvPgo8cmVjdCB4PSIxMiIgd2lkdGg9IjQiIGhlaWdodD0iNCIgZmlsbD0iIzlCOUI5QiIvPgo8cmVjdCB4PSIxMiIgeT0iOCIgd2lkdGg9IjQiIGhlaWdodD0iNCIgZmlsbD0iIzlCOUI5QiIvPgo8cmVjdCB4PSI0IiB5PSI4IiB3aWR0aD0iNCIgaGVpZ2h0PSI0IiB0cmFuc2Zvcm09InJvdGF0ZSgtMTgwIDQgOCkiIGZpbGw9IiM5QjlCOUIiLz4KPHJlY3QgeD0iNCIgeT0iMTYiIHdpZHRoPSI0IiBoZWlnaHQ9IjQiIHRyYW5zZm9ybT0icm90YXRlKC0xODAgNCAxNikiIGZpbGw9IiM5QjlCOUIiLz4KPC9zdmc+Cg=="}},700118(e,t,r){"use strict";r.d(t,{G3:()=>n.G3,J9:()=>n.J9,Je:()=>n.Je,LI:()=>n.LI,Lo:()=>o.L,OI:()=>n.OI,cS:()=>i.cS,fq:()=>n.fq,lm:()=>n.lm,p7:()=>i.p7,pt:()=>i.pt,w6:()=>n.w6});var n=r(553263),o=r(245666),i=r(6305)},245666(e,t,r){"use strict";r.d(t,{L:()=>n});var n={ESTIMATED_DURATION:55e3}},6305(e,t,r){"use strict";r.d(t,{cS:()=>n.cS,p7:()=>n.p7,pt:()=>n.pt});var n=r(727754)},826992(e,t,r){"use strict";r.d(t,{p:()=>startPinSessionRecording});var n=r(759670),o="design_lab_pinning_mode_entered",i=!1;function startPinSessionRecording(e){var t=e.enabled,r=e.forceMixpanelRecording;return!!t&&!i&&(i=!0,(0,n.qH)(100,{force:void 0!==r&&r}),function(){var e=window.hj;if("function"==typeof e)e("event",o);else{var t=0,checkHotjar=function(){var e=window.hj;"function"==typeof e?e("event",o):t<50?(t+=1,setTimeout(checkHotjar,100)):console.warn("Hotjar not available after maximum retries")};setTimeout(checkHotjar,100)}}(),!0)}},888043(e,t,r){"use strict";r.d(t,{F8:()=>trackCancelDismissedClick,K4:()=>_,Mk:()=>trackStartDesign,Ml:()=>trackAddToCart,OB:()=>trackCancelButtonClick,PA:()=>trackSaveButtonClick,Sj:()=>d,Tb:()=>
1trackCancelConfirmationClick,_c:()=>p,d2:()=>trackImageUploadStarted,du:()=>trackBackButtonClick,ju:()=>trackNextButtonClick,lO:()=>trackImageUploadCompleted,lX:()=>trackNeckLabelUploadFailed,oF:()=>trackTemplateChosen,rv:()=>trackImageUploadFailed});var n=r(433769),o=r(213896),i=r(817643),l=r(901765),c=r(778267);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var u="image_upload_completed",d={STYLES:1,DETAILS:2,SIZES:3},p={X_BUTTON:"X",GO_BACK:"go_back"};function getUserDetails(){var e,t,r=null==(e=window.jiffy)?void 0:e.user,n=null==(t=document.querySelector("[data-user-id]"))?void 0:t.getAttribute("data-user-id"),o={},i=(null==r?void 0:r.id)||n;i&&(o.user_id=i);var l=null==r?void 0:r.email;return l&&(o.user_email=l),o}
1var f=(0,c.v)({dispatch:function(e,t){(0,n.track)(e,t),(0,o.u4)(e,t)},getBaseProperties:function(){return _object_spread({order_number:(0,i.sN)()},getUserDetails())}});function trackTemplateChosen(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"neck_label",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"neck_label";f.track("neck_label_template_chosen",{template_id:e.id,template_name:e.name,template_type:e.custom?"custom":"system_created",page:t,location:r})}function trackNextButtonClick(e,t){f.track("neck_label_next_button_clicked",{step_number:e,metadata:t})}function trackBackButtonClick(e,t){f.track("neck_label_back_button_clicked",{step_number:e,metadata:t})}function trackStartDesign(e){var t=e||{},r=t.location,n=t.platform,o=void 0===n?window.MOBILE_APP_PLATFORM||"web":n,i=t.isApp,l=void 0===i?!!window.MOBILE_APP:i;f.track("neck_label_start_design",{is_app:l,location:void 0===r?"pdp":r,platform:o})}function trackCancelButtonClick(e,t){f.track("neck_label_cancel_button_clicked",{step_number:e,metadata:t})}function trackCancelConfirmationClick(e,t){f.track("neck_label_cancel_confirmation_clicked",{step_number:e,metadata:t})}function trackCancelDismissedClick(e,t,r){f.track("neck_label_cancel_dismissed_clicked",{step_number:e,dismissed_cta:t,metadata:r})}function trackSaveButtonClick(e){f.track("neck_label_save_button_clicked",e)}function trackNeckLabelUploadFailed(e){var t;f.track("neck_label_upload_failed",{pdp_type:"neck_label",style_id:e.styleId,size_variant:e.sizeVariant,error_message:e.errorMessage,http_status:null!=(t=e.httpStatus)?t:null})}function trackImageUploadStarted(e){var t=e.file,r=e.catalogNumber,n=e.pdpType,o=e.uploadUuid;f.track("image_upload_started",_object_spread({page:"neck_label",type:"logo",pdp_type:n,file_name:t.name,file_type:t.type,file_size:t.size,catalog_number:r,dpi:300,project_id:null},o&&{upload_uuid:o}))}function trackImageUploadFailed(e){var t=e.file,r=e.catalogNumber,n=e.errorMessage,o=e.isNetworkError;f.track(void 0!==o&&o?"image_upload_network_error":"image_upload_failed",_object_spread({page:"neck_label",file_name:t.name,file_type:t.type,file_size:t.size,catalog_number:r},n&&{error_message:n}))}function trackImageUploadCompleted(e){var t,r=e.file,i=e.artwork,c=e.catalogNumber,d=e.dpi,p=e.preCutTransfers,f=e.artworksCount,_=e.response,h=e.multiArtwork,m=e.pdpType,g=e.uploadedOn,b=e.uploadStartTime,y=e.validationErrors,v=e.businessLine,w=e.orderType,j=e.uploadUuid;if(b){var k=(0,l.E)(r.size,b,performance.now()),x=(null==i?void 0:i.id)||(null==_?void 0:_.id),S=(null==i?void 0:i.metadata)||{},O=g||(null==S?void 0:S.uploaded_on)||"neck_label",P=(null==i?void 0:i.project_id)||(null==_?void 0:_.project_id),A=null==i?void 0:i.url,C=(null==i?void 0:i.data)||{},I=null!=(t=null==C?void 0:C.worker_enhancement)&&t,E=y||(null==i?void 0:i.errors);!E&&(null==_?void 0:_.error)&&(E=[_.error]);var N=_object_spread({data:{filetype:r.type,filesize:r.size,filename:r.name,artwork_filetype:null==i?void 0:i.filetype,artwork_filesize:null==i?void 0:i.filesize},upload_speed_megabits_per_second:k,metadata:S,catalog_number:c,page:O,pdp_type:m,validation_errors:E,multi_artwork:null!=h&&h,project_id:P,artwork_id:x,image_url:A,business_line:v,success:null==_?void 0:_.success,is_successful:null==_?void 0:_.success,worker_enhancement:I},w&&{order_type:w},j&&{upload_uuid:j});(0,n.track)(u,N),(0,o.u4)(u,{location:O,file:r,artwork:i,dpi:d||300,business_line:v,catalog_number:c,pre_cut_transfers:p,artworks_count:f||1})}}function trackAddToCart(e){var t=f.getBaseProperties();e.addedSizes.forEach(function(r){(0,n.track)("product_added",_object_spread_props(_object_spread({},t),{catalog_number:e.catalogNumber,pdp_type:e.pdpType,neck_label_size:e.neckLabelSize,pre_cut:e.preCut,added_sizes:[r],total_quantity:e.totalQuantity}))})}var _={forStyles:function(e){var t=e.selectedStyleId,r=e.selectedStyle,n=e.selectedSize,o=e.designData;return{selected_style_id:t,selected_style_name:null==r?void 0:r.name,selected_template_type:(null==r?void 0:r.custom)?"custom":"system_created",selected_size:n,selected_color:o.selectedColor,company_name:o.companyName,website_tagline:o.websiteTagline,remove_background:o.removeBackgroun
1d,uploaded_artwork_id:o.uploadedArtworkId?String(o.uploadedArtworkId):null,uploaded_file_name:o.uploadedFileName}},forDetails:function(e){return e},forSizes:function(e,t){return{garment_sizes:e,pre_cut:t}}}},367134(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(232157),o=r(759578),i=r(967344);function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}let l=function(){function ImageMagnifier(e,t){if(_class_call_check(this,ImageMagnifier),!e)throw Error("ImageMagnifier: Unique wrapper ID is required");this.wrapperClass=".".concat(e),this.config=t||{}}return _create_class(ImageMagnifier,[{key:"initializeMagnifier",value:function(){(0,o.A)({eventSelector:this.wrapperClass,config:this.config}),(0,i.A)({eventSelector:this.wrapperClass}),(0,n.A)({eventSelector:this.wrapperClass})}}]),ImageMagnifier}()},759578(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(643577);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _class_apply_descriptor_get(e,t){return t.get?t.get.call(e):t.value}function _class_apply_descriptor_set(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _class_extract_field_descriptor(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _class_private_field_get(e,t){var r=_class_extract_field_descriptor(e,t,"get");return _class_apply_descriptor_get(e,r)}function _class_private_field_init(e,t,r){_check_private_redeclaration(e,t),t.set(e,r)}function _class_private_field_set(e,t,r){var n=_class_extract_field_descriptor(e,t,"set");return _class_apply_descriptor_set(e,n,r),r}function _class_private_method_get(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function _class_private_method_init(e,t){_check_private_redeclaration(e,t),t.add(e)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}var o=new WeakMap,i=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,p=new WeakMap,f=new WeakMap,_=new WeakMap,h=new WeakMap,m=new WeakMap,g=new WeakMap,b=new WeakSet,y=new WeakSet,v=new WeakSet,w=new WeakSet,j=new WeakSet,k=new WeakSet,x=new WeakSet,S=function(e){function MagnifierMouseEnterHandler(e){var t,r=e.event,n=e.eventSelector,S=e.config;return _class_call_check(this,MagnifierMouseEnterHandler),_class_private_field_init(t=_call_super(this,MagnifierMouseEnterHandler,[{eventSelector:n,event:r}]),u,{get:get_$original,set:void 0}),_class_private_field_init(t,d,{get:get_$magnified,set:void 0}),_class_private_field_init(t,p,{get:get_$lens,set:void 0}),_class_private_field_init(t,f,{get:get_isLeftSided,set:void 0}),_class_private_field_init(t,_,{get:get_backgroundColor,set:void 0}),_class_private_field_init(t,h,{get:get_isTransparentBackground,set:void 0}),_class_private_field_init(t,m,{get:get_useFixedPositioning,set:void 0}),_class_private_field_init(t,g,{get:get_$panel,set:void 0}),_class_private_method_init(t,b),_class_private_method_init(t,y),_class_private_method_init(t,v),_class_private_method_init(t,w),_class_private_method_init(t,j),_class_private_method_init(t,k),_class_private_method_init(t,x),_class_private_field_init(t,o,{writable:!0,value:void 0}),_class_private_field_init(t,i,{writable:!0,value:void 0}),_class_private_field_init(t,l,{writable:!0,value:void 0}),_class_private_field_init(t,c,{writable:!0,value:null}),_class_private_field_set(t,o,document.querySelector(n)),_class_private_field_set(t,i,S||{}),t}return _inherits(MagnifierMouseEnterHandler,e),_create_class(MagnifierMouseEnterHandler,[{key:"event",value:function(){if(_class_private_field_get(this,u)){var e=_class_private_field_get(this,u).getBoundingClientRect();_class_private_method_get(this,w,setupMagnifiedWidth).call(this,e),_class_private_method_get(this,j,applyCursorStyles).call(this),_class_private_field_get(this,d).style.display="block",_class_private_field_get(this,m)?_class_private_method_get(this,k,setupFixedPositioning).call(this,e):_class_private_method_get(this,x,setupAbsolutePositioning).call(this),_class_private_field_get(this,p).style.display="block",_class_private_method_get(this,b,setBackgroundImage).call(this)}}}]),MagnifierMouseEnterHandler}(n.A);function get_$original(){return _class_private_field_get(this,o).querySelector(".js-magnify-image")}function get_$magnified(){return _class_private_field_get(this,o).querySelector(".js-magnify-preview")}function get_$lens(){return _class_private_field_get(this,o).querySelector(".js-magnify-lens")}function get_isLeftSided(){return"left"===_class_private_field_get(this,i).position}function get_backgroundColor(){return _class_private_field_get(this,d).dataset.backgroundColor}
1function get_isTransparentBackground(){return void 0===_class_private_field_get(this,_)||"transparent"===_class_private_field_get(this,_)}function get_useFixedPositioning(){return!0===_class_private_field_get(this,i).useFixedPositioning}function get_$panel(){return _class_private_field_get(this,f)?document.querySelector(".js-info-left"):document.querySelector(".js-info-right")}function setBackgroundImage(){var e=_sliced_to_array(getComputedStyle(_class_private_field_get(this,d)).backgroundImage.split(", "),2),t=(e[0],e[1]);if(_class_private_field_get(this,h)){_class_private_field_set(this,l,null!=t?t:_class_private_field_get(this,l)),_class_private_field_get(this,d).style.backgroundImage='url("'.concat(_class_private_field_get(this,u).src,'"), ').concat(_class_private_field_get(this,l)),_class_private_field_get(this,d).style.backgroundRepeat="no-repeat, repeat";return}_class_private_field_get(this,d).style.backgroundImage='url("'.concat(_class_private_field_get(this,u).src,'")'),_class_private_field_get(this,d).style.backgroundColor=_class_private_field_get(this,_)}function panelWidth(e){var t=_class_private_field_get(this,g);if(!t)return 0;var r=t.getBoundingClientRect();return _class_private_field_get(this,f)?r.width:r.right-e.right-S.GAP}function availableWidth(e){return Math.min((_class_private_field_get(this,f)?e.left:window.innerWidth-e.right)-2*S.GAP,S.MAX_PREVIEW_WIDTH)}function setupMagnifiedWidth(e){if(_class_private_field_set(this,c,null),!_class_private_field_get(this,i).isModal){var t=_class_private_method_get(this,y,panelWidth).call(this,e);if(t>0){_class_private_field_get(this,d).style.width="".concat(t,"px");return}var r=_class_private_method_get(this,v,availableWidth).call(this,e);r<=0||(_class_private_field_set(this,c,r),_class_private_field_get(this,d).style.width="".concat(r,"px"))}}function applyCursorStyles(){_class_private_field_get(this,u).style.cursor="pointer",_class_private_field_get(this,o)&&(_class_private_field_get(this,o).style.cursor="pointer"),_class_private_field_get(this,p).style.cursor="pointer"}function setupFixedPositioning(e){var t=window.innerHeight,r=_class_private_field_get(this,d).getBoundingClientRect().height;r||(r=S.DEFAULT_PREVIEW_HEIGHT),_class_private_field_get(this,d).style.position="fixed",_class_private_field_get(this,d).style.right="auto";var n=(t-r)/2;_class_private_field_get(this,d).style.top="".concat(Math.max(10,n),"px");var o=null===_class_private_field_get(this,c)?e.left-S.LEGACY_LEFT_OFFSET:e.left-_class_private_field_get(this,c)-S.GAP;_class_private_field_get(this,d).style.left=_class_private_field_get(this,f)?"".concat(Math.max(S.GAP,o),"px"):"".concat(e.right+S.GAP,"px")}function setupAbsolutePositioning(){_class_private_field_get(this,d).style.position="absolute",_class_private_field_get(this,d).style.top="-2px",_class_private_field_get(this,f)?(_class_private_field_get(this,d).style.right="calc(100% + 10px)",_class_private_field_get(this,d).style.left="auto"):(_class_private_field_get(this,d).style.left="".concat(_class_private_field_get(this,u).offsetWidth+10,"px"),_class_private_field_get(this,d).style.right="auto")}function __rspack_default_export(e){return new S(_object_spread({event:"mouseenter"},e))}_define_property(S,"DEFAULT_PREVIEW_HEIGHT",600),_define_property(S,"MAX_PREVIEW_WIDTH",600),_define_property(S,"GAP",10),_define_property(S,"LEGACY_LEFT_OFFSET",540)},232157(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(643577);function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _class_apply_descriptor_get(e,t){return t.get?t.get.call(e):t.value}function _class_apply_descriptor_set(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _class_extract_field_descriptor(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _class_private_field_get(e,t){var r=_class_extract_field_descriptor(e,t,"get");return _class_apply_descriptor_get(e,r)}function _class_private_field_init(e,t,r){_check_private_redeclaration(e,t),t.set(e,r)}function _class_private_field_set(e,t,r){var n=_class_extract_field_descriptor(e,t,"set");return _class_apply_descriptor_set(e,n,r),r}function _class_private_method_get(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function _class_private_method_init(e,t){_check_private_redeclaration(e,t),t.add(e)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}var o=new WeakMap,i=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakSet,p=new WeakSet,f=new WeakSet,_=new WeakSet,h=new WeakSet,m=function(e){function MagnifierMouseMoveHandler(e){var t;return _class_call_check(this,MagnifierMouseMoveHandler),_class_private_field_init(t=_call_super(this,MagnifierMouseMoveHandler,[e]),i,{get:get_$original,set:void 0}),_class_private_field_init(t,l,{get:get_$magnified,set:void 0}),_class_private_field_init(t,c,{get:get_$lens,set:void 0}),_class_private_field_init(t,u,{get:get_$panel,set:void 0}),_class_private_method_init(t,d),_class_private_method_init(t,p),_class_private_method_init(t,f),_class_private_method_init(t,_),_class_private_method_init(t,h),_class_private_field_init(t,o,{writable:!0,value:void 0}),_class_private_field_set(t,o,document.querySelector(e.eventSelector)),t}return _inherits(MagnifierMouseMoveHandler,e),_create_class(MagnifierMouseMoveHandler,[{key:"event",value:function(e){var t=this;if(_class_private_field_get(this,i)){var r=_class_private_method_get(this,p,getMouseCoordinates).call(this,e),n=r.x,o=r.y,u=_class_private_method_get(this,d,getDimensions).call(this,_class_private_field_get(this,i)),m=u.width,g=u.height,b=_class_private_method_get(this,_,getLensSize).call(this,m,g),y=b.lensWidth,v=b.lensHeight,w=_class_private_method_get(this,f,constrain).call(this,n,y/2,m-y/2),j=_class_private_method_get(this,f,constrain).call(this,o,v/2,g-v/2),k=_class_private_method_get(this,h,getBackgroundPosition).call(this,w-y/2,m,y),x=_class_private_method_get(this,h,getBackgroundPosition).call(this,j-v/2,g,v);requestAnimationFrame(function(){_class_private_field_get(t,c).style.left="".concat(w,"px"),_class_private_field_get(t,c).style.top="".concat(j,"px"),_class_private_field_get(t,c).style.width="".concat(y,"px"),_class_private_field_get(t,c).style.height="".concat(v,"px"),_class_private_field_get(t,l).style.backgroundSize="".concat(300,"%, 20%"),_class_private_field_get(t,l).style.backgroundPosition="".concat(k,"% ").concat(x,"%, center")})}}}]),MagnifierMouseMoveHandler}(n.A);function get_$original(){return _class_private_field_get(this,o).querySelector(".js-magnify-image")}function get_$magnified(){return _class_private_field_get(this,o).querySelector(".js-magnify-preview")}function get_$lens(){return _class_private_field_get(this,o).querySelector(".js-magnify-lens")}function get_$panel(){return document.querySelector(".js-info-right")}function getDimensions(e){return{width:e.offsetWidth,height:e.offsetHeight,actualWidth:e.naturalWidth,actualHeight:e.naturalHeight}}function getMouseCoordinates(e){var t=_class_private_field_get(this,i).getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}function constrain(e,t,r){var n=null!=r?r:Number.MAX_VALUE;return Math.min(Math.max(Math.round(parseFloat(e)),null!=t?t:5e-324),n)}function getLensSize(e,t){var r=_class_private_field_get(this,l).getBoundingClientRect(),n=Math.min(e/3,e);return{lensWidth:n,lensHeight:Math.min(n*(r.width>0?r.height/r.width:1),t)}}function getBackgroundPosition(e,t,r){var n=t-r;return n<=0?50:Math.min(Math.max(e/n*100,0),100)}function __rspack_default_export(e){return new m(_object_spread({event:"mousemove"},e))}},967344(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(643577);function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _class_apply_descriptor_get(e,t){return t.get?t.get.call(e):t.value}function _class_apply_descriptor_set(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _class_extract_field_descriptor(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _class_private_field_get(e,t){var r=_class_extract_field_descriptor(e,t,"get");return _class_apply_descriptor_get(e,r)}function _class_private_field_init(e,t,r){_check_private_redeclaration(e,t),t.set(e,r)}function _class_private_field_set(e,t,r){var n=_class_extract_field_descriptor(e,t,"set");return _class_apply_descriptor_set(e,n,r),r}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}var o=new WeakMap,i=new WeakMap,l=new WeakMap,c=function(e){function MagnifierMouseOutHandler(e){var t;return _class_call_check(this,MagnifierMouseOutHandler),_class_private_field_init(t=_call_super(this,MagnifierMouseOutHandler,[e]),i,{get:get_$magnified,set:void 0}),_class_private_field_init(t,l,{get:get_$lens,set:void 0}),_class_private_field_init(t,o,{writable:!0,value:void 0}),_class_private_field_set(t,o,document.querySelector(e.eventSelector)),t}return _inherits(MagnifierMouseOutHandler,e),_create_class(MagnifierMouseOutHandler,[{key:"event",value:function(){_class_private_field_get(this,i).style.display="none",_class_private_field_get(this,l).style.display="none"}}]),MagnifierMouseOutHandler}(n.A);function get_$magnified(){return _class_private_field_get(this,o).querySelector(".js-magnify-preview")}function get_$lens(){return _class_private_field_get(this,o).querySelector(".js-magnify-lens")}function __rspack_default_export(e){return new c(_object_spread({event:"mouseout"},e))}},44613(e,t,r){"use strict";function isJiffyFirstBadgeHandoff(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.querySelector('meta[name="'.concat("jiffy-first-badge-handoff",'"]'));return(null==t?void 0:t.getAttribute("content"))==="true"}r.d(t,{s:()=>isJiffyFirstBadgeHandoff})},821771(e,t,r){"use strict";r.d(t,{g:()=>JiffyBadge});var n=r(483134),o=r(333908);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function JiffyBadge(e){var t=e.programme,r=e.size,i=e.surface,l=e.decorative,c=e.className,u=e["data-testid"],d=void 0!==l&&l?{"aria-hidden":!0}:{role:"img","aria-label":o.dB[t]};return(0,n.jsx)("span",_object_spread_props(_object_spread({className:(0,o.p6)({programme:t,size:void 0===r?"card":r,surface:void 0===i?"default":i,className:c}),"data-testid":u},d),{children:(0,n.jsxs)("span",{className:"jiffy-badge__wordmark",children:[(0,n.jsx)("svg",{className:"jiffy-badge__logo","aria-hidden":"true",focusable:"false",children:(0,n.jsx)("use",{href:o.HN})}),(0,n.jsx)("span",{className:"jiffy-badge__mod",children:"local"===t?"local":(0,n.jsxs)(n.Fragment,{children:["1",(0,n.jsx)("span",{className:"jiffy-badge__st",children:"st"})]})})]})}))}},181766(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(864188),o=r(277889),i=r(569278),l=r(375138),c=r(433769),u=r(741235);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var d=".js-rename-modal-submit",p="Name this cart",f="naming-benefits-modal__input--invalid",_="naming-benefits-modal__label--invalid";function saveCartChanges(e,t,r){return _async_to_generator(function(){var u;return _ts_generator(this,function(d){switch(d.label){case 0:return[4,o.api.jiffyshirts.savedCart.update({id:r},{saved_carts:t})];case 1:return u=d.sent(),e.modal("hide"),(0,i.A)(u.cart_name),n.EventBus.publish(n.Events.SAVED_CART_CHANGED,this,{cartNumber:r,newName:u.cart_name}),(0,l.wz)(r,u.cart_name),(0,c.track)("saved_carts_naming_cta_modal_saved"),[2]}})}).call(this)}var inputHandler=function(e){var t=e.target,r=document.querySelector(d);_instanceof(t,HTMLElement)&&(""===t.value?(r.classList.add("disabled"),t.placeholder="",t.classList.add(f),t.nextElementSibling.classList.add(_)):(r.classList.remove("disabled"),t.placeholder=p,t.classList.remove(f),t.nextElementSibling.classList.remove(_)))};function __rspack_default_export(e){var t=e.querySelector(".js-qty-form-saved-carts-input"),r=document.querySelector(".js-naming-benefits-modal"),o=document.querySelectorAll(".js-naming-benefits-modal-close"),i=document.querySelector(".js-rename-modal-form"),l=document.querySelectorAll(".js-naming-benefits-modal-input"),h=document.querySelector(".js-naming-benefits-modal-input-name"),m=document.querySelector(d),g=$(r);r&&(t.addEventListener("click",function(){var e;e=n.store.get(function(e){return e.pdp.activeCart}),!document.cookie.split(";").find(function(e){return"renameCtaShown"===e.split("=")[0].trim()})&&(null==e?void 0:e.cart_name)&&(null==e?void 0:e.default_cart_name)&&e.cart_name.startsWith(e.default_cart_name)&&1&&(g.modal("show"),(0,u.o)("renameCtaShown","1"),(0,c.track)("saved_carts_naming_cta_modal_opened"))}),i.addEventListener("submit",function(e){e.preventDefault();var t=n.store.get(function(e){return e.pdp.activeCart}).number,r={};l.forEach(function(e){r[e.id]=e.value}),saveCartChanges(g,r,t)}),o.forEach(function(e){e.addEventListener("click",function(){g.modal("hide"),i.reset()})}),l.forEach(function(e){e.addEventListener("blur",function(){(0,c.track)("saved_carts_naming_cta_modal_input",{field:e.id})})}),h.addEventListener("blur",function(e){inputHandler({target:e.target})}),g.on("shown.bs.modal",function(){l.forEach(function(e){e.id===h.id?(e.focu
1s(),e.placeholder=p,e.classList.remove(f),e.nextElementSibling.classList.remove(_),m.classList.remove("disabled")):"notes-control"===e.id&&(e.placeholder="Add some notes")})}),g.on("hide.bs.modal",function(e){e.stopPropagation(),g.is(":visible")&&(0,c.track)("saved_carts_naming_cta_modal_dismissed")}))}},956883(e,t,r){"use strict";r.d(t,{_:()=>u});var n=r(797466),o=r(886408);function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _class_apply_descriptor_get(e,t){return t.get?t.get.call(e):t.value}function _class_apply_descriptor_set(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=r}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _class_extract_field_descriptor(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function _class_private_field_get(e,t){var r=_class_extract_field_descriptor(e,t,"get");return _class_apply_descriptor_get(e,r)}function _class_private_field_init(e,t,r){_check_private_redeclaration(e,t),t.set(e,r)}function _class_private_field_set(e,t,r){var n=_class_extract_field_descriptor(e,t,"set");return _class_apply_descriptor_set(e,n,r),r}function _class_private_method_get(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function _class_private_method_init(e,t){_check_private_redeclaration(e,t),t.add(e)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=new WeakSet,l=new WeakMap,c=new WeakSet,u=function(){function DtfPricesDecorator(){_class_call_check(this,DtfPricesDecorator),_class_private_method_init(this,i),_class_private_method_init(this,c),_define_property(this,"extraCharge",0),_class_private_field_init(this,l,{writable:!0,value:null})}return _create_class(DtfPricesDecorator,[{key:"updateCostInfo",value:function(e){var t=(0,n.mg)(e),r=t.cart_dates,o=t.composition_dates;return _class_private_method_get(this,i,applyExtraCharge).call(this,r),_class_private_method_get(this,i,applyExtraCharge).call(this,o),t}},{key:"subscribe",value:function(){var e=this;_class_private_field_set(this,l,o.Zs.sub(o.KJ,function(){_class_private_method_get(e,c,updateExtraCharge).call(e)})),_class_private_method_get(this,c,updateExtraCharge).call(this)}},{key:"unsubscribe",value:function(){var e;null==(e=_class_private_field_get(this,l))||e.call(this),_class_private_field_set(this,l,null)}}]),DtfPricesDecorator}();function applyExtraCharge(e){var t=null==e?void 0:e.shipping_cost_info;t&&t.free_shipping_threshold>0&&(t.amount_until_free-=this.extraCharge,t.free=t.amount_until_free<=0)}function updateExtraCharge(){var e=this,t=o.Zs.get(o.KJ);this.extraCharge=0,Object.values((null==t?void 0:t.enhancements)||{}).forEach(function(t){e.extraCharge+=parseFloat(t.totalPrice)||0})}},319850(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(864188),o=r(277889),i=r(433769),l=r(350272),c=r(475953),u=r(246070),d=r(540977),p=r(48859),f=r(86087);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var $getContainer=function(){return document.getElementById(f.A.local.CONTAINER)},$getSpinner=function(){return $getContainer().querySelector(f.A.local.SPINNER)},$getForm=function(){return $getContainer().querySelector(f.A.local.FORM)},toggleFormLoading=function(e){$getForm().classList.toggle("hidden",e),$getSpinner().classList.toggle("shown",e)},showError=function(e){$getForm().querySelector(f.A.local.FORM_ERROR).innerHTML=void 0!==e?e:"Please enter a valid zipcode.",toggleFormLoading(!1),(0,d.Ze)("zipcode")},trackPDPZipcode=function(e){var t=document.getElementById(f.A.global.PRODUCT_PAGE_CONTAINER),r=document.querySelector(f.A.global.ACTIVE_COLOR_SLIDE),n=null==r?void 0:r.querySelector("[data-composition-name]");
1if(t&&n){var o=t.dataset,l=o.realProductId,c=o.productId,u=r.dataset.compositionId,d=n.dataset.compositionName;l&&d&&(0,i.track)("product_detail_zipcode",{product_id:parseInt(l,10),spree_composition_id:parseInt(u,10),composition:d,zipcode:e,product:c})}},handleSubmit=function(){var e=$getForm();e.addEventListener("submit",function(t){return _async_to_generator(function(){return _ts_generator(this,function(r){return t.preventDefault(),toggleFormLoading(!0),o.api.jiffyshirts.locations.create({zipcode:$getForm().querySelector(f.A.local.FORM_INPUT).value}).then(function(t){if(t.error)t.error?showError(t.message):showError();else{var r=t.cities,n=t.zipcode,o=Array.isArray(r)?r[0].name:"";(0,d.sB)("zipcode"),(0,i.registerMixpanel)({zipcode:n}),trackPDPZipcode(n),e.classList.add("hidden"),(0,p.Ay)(),(0,u.A)({zipcode:n,city:o}),(0,c.M)(n)}}).catch(function(){showError("Something went wrong. Please try again later.")}),[2]})})()})};let __rspack_default_export=function(){var e=$getContainer();$getSpinner().classList.remove("shown"),$getForm().classList.remove("hidden"),n.EventBus.on(n.Events.PRODUCT_COLOR_SELECTED,function(t,r){var n=r.color;return _async_to_generator(function(){var t;return _ts_generator(this,function(r){return(t=(0,l.bL)(n))&&(e.dataset.selectedColor=t),[2]})})()}),n.EventBus.on(n.Events.SAVED_CART_SELECTED,function(t,r){var n=r.number;return _async_to_generator(function(){return _ts_generator(this,function(t){return e.dataset.selectedCart=n,[2]})})()}),handleSubmit()}},582789(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(277889),o=r(864188),i=r(835942),l=r(697397),c=r(200685),u=r(356437),d=r(530950),p=r(482797),f=r(473991),_=r(809646),h=r(980644),m=r(248326),g=r(86087),b=r(751902);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var y=void 0,v="js-made-product-details-delivery-dates-simple-container",w=!1,$getCutoff=function(){return document.querySelectorAll(g.A.made.CUTOFF)},j="data-made-cutoff-countdown-mounted",k=0,nextCutoffRenderToken=function(){return String(k+=1)},x="data-made-cutoff-countdown-live",$getCutoffContainers=function(){var e=new Set;
1return $getCutoff().forEach(function(t){t.parentNode&&e.add(t.parentNode)}),document.querySelectorAll("[".concat(j,"]")).forEach(function(t){return e.add(t)}),e},$getDeliveryDates=function(){return document.querySelector(g.A.global.DELIVERY_DATES)},$getDirectDeliveryDates=function(){return document.querySelectorAll(g.A.made.DIRECT_DELIVERY_DATE)},$getModalShipmentList=function(){return document.querySelector(g.A.made.MODAL_SHIPMENTS_LIST)},$getDeliveryLabel=function(){return document.querySelector(g.A.made.DELIVERY_TYPE_LABEL)},addHighLight=function(e){e.classList.add(g.A.global.DATE_HIGHLIGHT),setTimeout(function(){return e.classList.remove(g.A.global.DATE_HIGHLIGHT)},500)},insertDate=function(e,t,r){var n=_sliced_to_array((e.value_full||"").split(" & "),1)[0];if(!t&&(0,c.r)(n)&&(null==e?void 0:e.delivery_time)&&(null==e?void 0:e.delivery_time_end)){r.innerHTML="".concat((0,c.Mx)(n)," ").concat((0,c.qO)(e.delivery_time,e.delivery_time_end));var o=document.querySelector(r.dataset.deliveryOrderBySelector),i=null==o?void 0:o.hasAttribute(x);o&&(null==e?void 0:e.cutoff_label)&&!i&&writeFallbackCutoff(o,e.cutoff_label)}else r.innerHTML=t?(0,f.D)(n):(0,c.DB)(n);var l=(0,c.Kh)(e.shipments);l&&(r.dataset.deliveryDate=l),addHighLight(r)},insertDeliveryDates=function(e){var t,r,n=e.cart_dates,o=e.composition_dates,i=(0,f.s)(e);
1$getDirectDeliveryDates().forEach(insertDate.bind(y,o,i));var l=n.shipments||o.shipments;l&&(null==(r=$getDeliveryDates())||null==(t=r.classList)||t.remove("hidden"),$getModalShipmentList().innerHTML=l.map(function(e){var t=e.date,r=i?(0,f.D)(t):(0,c.DB)(t);return'<div class="continue-shopping-modal__delivery-dates-item">'.concat(r,"</div>")}).join(""))},updateFreeShippingThreshold=function(e){if(e){var t=document.querySelector(g.A.made.FREE_SHIPPING_THRESHOLD);t&&(t.textContent="".concat((0,l.S)(e.user_free_shipping_threshold)))}},setPDPDatesLoadingAnimation=function(){$getDirectDeliveryDates().forEach(function(e){"true"===e.dataset.invert?e.innerHTML='<div class="relative top-[1px] left-0 w-full h-[10px] rounded bg-gray-200 dark:bg-gray-700 animate-pulse"></div>':e.innerHTML='<div class="relative top-[1px] left-0 w-full h-4 rounded bg-gray-200 dark:bg-gray-700 w-37 animate-pulse"></div>'})},setPDPDatesLoading=function(e){var t,r;null==(t=document.querySelectorAll(g.A.made.SPINNER))||t.forEach(function(t){return null==t?void 0:t.classList.toggle("shown",e)}),null==(r=document.querySelectorAll(g.A.made.WRAPPER))||r.forEach(function(e){return null==e?void 0:e.classList.remove("hidden")}),e&&setPDPDatesLoadingAnimation()},applyCachedDeliveryDate=function(){clearCutoff(),i.u.applyCachedDelivery({deliveryDateElements:$getDirectDeliveryDates(),cutoffElements:$getCutoff(),setLoadingState:setPDPDatesLoading,highlightCallback:addHighLight})},S=null,replayExpediteShippingNote=function(){S&&updateExpediteShippingNote.apply(void 0,_to_consumable_array(S))},updateExpediteShippingNote=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];S=[e,t];var r=!t&&(0,_.vd)({deliveryDate:null==e?void 0:e.value_full},"made-pdp-expedite-note");document.querySelectorAll(".js-expedite-shipping-note").forEach(function(e){if(e){e.textContent=r?", with expedite shipping":"";var t=e.parentElement;t&&(r?t.setAttribute("data-expedite-shipping","true"):t.removeAttribute("data-expedite-shipping"))}})},updateDeliveryLabel=function(e){if(e){var t=(0,_.Ch)({deliveryType:e.delivery_type})?"Local Delivery":"Standard Delivery",r=$getDeliveryLabel();r&&(r.textContent=t)}},CUTOFF_WRAPPER_HTML=function(e,t){return'Order by <b class="'.concat(e,'">').concat(t,'</b> <span class="js-expedite-shipping-note"></span>')},rememberCutoffClassName=function(e){var t,r=null==e||null==(t=e.querySelector(g.A.made.CUTOFF))?void 0:t.className;r&&(e.dataset.madeCutoffClass=r)},readCutoffClassName=function(e){var t,r;return(null==(t=e.querySelector(g.A.made.CUTOFF))?void 0:t.className)||(null==(r=e.dataset)?void 0:r.madeCutoffClass)||"product-details-delivery-date-simple__cutoff-date product-details-delivery-date-simple__cutoff-date--truck js-made-product-details-delivery-dates-simple-cutoff"},writeFallbackCutoff=function(e,t){if(e){var r=e.querySelector(g.A.made.CUTOFF);if(r){r.textContent=t||"";return}e.innerHTML=CUTOFF_WRAPPER_HTML(readCutoffClassName(e),t||"")}},mountCountdownIfGated=function(e,t,n){var o,i,l=new Set;if(!(null==(i=window.jiffy)||null==(o=i.flip)?void 0:o.deliveryCountdownPdp))return l;var c=new Date(t).getTime();if(!Number.isFinite(c))return l;var u=new Date(c).toISOString();return e.forEach(function(e){if(null==e||null==(t=e.hasAttribute)?void 0:t.call(e,"data-cutoff-react-mount")){var t,o=readCutoffClassName(e),i='Order by <b class="'.concat(o,'">').concat(n,"</b>");l.add(e);var c=e.hasAttribute(x),d=nextCutoffRenderToken();e.setAttribute(j,d),r.e("7300").then(r.bind(r,329905)).then(function(t){var r=t.mountDeliveryCountdown,n=t.scheduleAfterLcp;(c?function(e){return e()}:n)(function(){e.getAttribute(j)===d&&(e.setAttribute(x,"true"),r(e,{cutoffAt:u,variant:"pdp",fallbackHtml:i,onElapsed:function(){return loadDeliveryEstimates(!1,!1)}}))})})}}),l},handledLiveContainer=function(e,t,r){var n;return!!(null==e||null==(n=e.hasAttribute)?void 0:n.call(e,x))&&(t||clearCutoff(r),!0)},paintCutoffFirstPass=function(e,t,r){var n,o,i=!!(null==(o=window.jiffy)||null==(n=o.flip)?void 0:n.deliveryCountdownPdp),l=new Date(t).getTime(),c=i&&Number.isFinite(l)?(0,u.Z4)(Math.max(0,Math.floor((l-(0,d.tD)()-(0,p.s)().getTime())/1e3))):null;e.forEach(function(e){rememberCutoffClassName(e);var t,n,o=i&&(null==e||null==(t=e.hasAttribute)?void 0:t.call(e,"data-cutoff-react-mount"));handledLiveContainer(e,o&&c,r)||(o&&c&&e?e.innerHTML='<span class="cutoff-countdown cutoff-countdown--pdp" aria-l
1ive="polite" role="status" data-testid="cutoff-countdown">Order in the next <span class="cutoff-countdown__value">'.concat(c,"</span></span>"):(null==e||null==(n=e.removeAttribute)||n.call(e,j),writeFallbackCutoff(e,r)))})},hideUnlabelledCutoff=function(e,t){var r;t||null==e||null==(r=e.classList)||r.add("hidden")},tearDownReactCutoff=function(e,t){var n=readCutoffClassName(e);if(!e.hasAttribute(x)){e.innerHTML=CUTOFF_WRAPPER_HTML(n,t),hideUnlabelledCutoff(e,t),e.removeAttribute(j);return}var o=nextCutoffRenderToken();e.setAttribute(j,o),r.e("4919").then(r.bind(r,329905)).then(function(r){var i=r.unmountDeliveryCountdown;e.getAttribute(j)===o&&(i(e),e.innerHTML=CUTOFF_WRAPPER_HTML(n,t),replayExpediteShippingNote(),hideUnlabelledCutoff(e,t),e.removeAttribute(j),e.removeAttribute(x))})},clearCutoff=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";$getCutoffContainers().forEach(function(t){if(!t.hasAttribute(j)){var r=t.querySelector(g.A.made.CUTOFF);r&&(r.textContent=e),hideUnlabelledCutoff(t,e);return}tearDownReactCutoff(t,e)})},renderCutoff=function(e,t){if(!e)return void clearCutoff();var r=$getCutoffContainers(),n=t||(0,c.k2)(e,!1);paintCutoffFirstPass(r,e,n),mountCountdownIfGated(r,e,n)},clearMadeStaleAdornments=function(){updateExpediteShippingNote({});var e,t,r=$getDeliveryLabel();r&&(r.textContent=""),null==(e=$getModalShipmentList())||e.replaceChildren(),null==(t=$getDeliveryDates())||t.classList.add("hidden")},restoreCutoffWrappers=function(){$getDirectDeliveryDates().forEac
1h(function(e){var t,r=e.dataset.deliveryOrderBySelector;r&&(null==(t=document.querySelector(r))||t.classList.remove("hidden"))})},clearFallbackDates=function(){$getDirectDeliveryDates().forEach(function(e){e.querySelector('[data-testid="delivery-estimate-fallback"]')&&e.replaceChildren()})},insertFallbackDates=function(e){$getDirectDeliveryDates().forEach(function(t){t.replaceChildren((0,m.B)(e.text)),delete t.dataset.deliveryDate;var r,n=t.dataset.deliveryOrderBySelector;n&&(null==(r=document.querySelector(n))||r.classList.add("hidden"))}),$getCutoff().forEach(function(e){e.textContent=""}),clearMadeStaleAdornments(),w||(w=!0,(0,h.n)("made-pdp"))},cutoffOf=function(e){var t;return(Number.isFinite(new Date(t=null==e?void 0:e.cut_off_time).getTime())?t:null)||(null==e?void 0:e.timeleft)},updateHTML=function(e){var t,r,n=e.cart_dates,o=e.composition_dates,i=e.fallback;if(!(null==n?void 0:n.timeleft)&&!(null==o?void 0:o.timeleft)){clearCutoff(),(null==i?void 0:i.text)?insertFallbackDates(i):(clearFallbackDates(),w=!1);return}w=!1,restoreCutoffWrappers();var l=(null==n||null==(t=n.shipments)?void 0:t.length)>0&&cutoffOf(n)||cutoffOf(o),c=(null==n||null==(r=n.shipments)?void 0:r.length)>0&&(null==n?void 0:n.cutoff_label)||o.cutoff_label,u=o.shipping_cost_info;insertDeliveryDates(e),renderCutoff(l,c),updateDeliveryLabel(o),updateExpediteShippingNote(o,(0,f.s)(e)),updateFreeShippingThreshold(u)},isFastEtaEnabled=function(){var e,t,r;return(null==(r=window)||null==(t=r.jiffy)||null==(e=t.flip)?void 0:e.fastDeliveryEstimate)===!0},buildDatesFromEstimate=function(e){var t={date:e.date,date_with_day_name:e.date,items:1};return{value_full:e.date,timeleft:e.timeleft||null,cut_off_time:e.cut_off_time||null,cutoff_label:e.cutoff_label||null,delivery_type:null,delivery_time:e.delivery_time||null,delivery_time_end:e.delivery_time_end||null,shipments:[t],only_cart_shipments:[t],shipping_cost_info:null}},O=0,claimMadeRequest=function(){return O+=1},ownsMadeRender=function(e){return void 0===e||e===O},P=null,releaseMadeLoader=function(e,t){e&&P===t&&(P=null,setPDPDatesLoading(!1))},retireMadeLoader=function(){null!==P&&(P=null,setPDPDatesLoading(!1))},loadDeliveryEstimates=function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.suppressRudderstack,l=void 0!==o&&o,c=r.requestToken;return _async_to_generator(function(){var r,o;return _ts_generator(this,function(u){switch(u.label){case 0:if(i.u.shouldUseCachedDelivery(v))return ownsMadeRender(c)&&(retireMadeLoader(),applyCachedDeliveryDate()),[2,{}];r=null!=c?c:claimMadeRequest(),e&&(P=r,setPDPDatesLoading(!0)),u.label=1;case 1:return u.trys.push([1,,3,4]),[4,_async_to_generator(function(){var e,t,r,o,i,l,c,u,d,p;return _ts_generator(this,function(f){switch(f.label){case 0:if(o=(r=(null==(e=document.querySelector(g.A.global.ACTIVE_COLOR_SLIDE))?void 0:e.dataset)||{}).compositionId,i=r.supportsMade,!(l=o||(null==(t=window.jiffy_made_product_props)?void 0:t.composition_id))||"false"===i)return[2,{}];if(!isFastEtaEnabled())return[3,4];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,n.api.product.fetchETA({business_line:"print"},{composition_hash:JSON.stringify(_define_property({},l,1)),source:"pdp"})];case 2:if(null==(d=(null==(u=f.sent())?void 0:u.success)?null==u||null==(c=u.estimates)?void 0:c[l]:null)?void 0:d.date)return[2,{success:!0,composition_dates:p=buildDatesFromEstimate(d),cart_dates:p,generic_estimate:u.generic_estimate}];return[3,4];case 3:return f.sent(),[3,4];case 4:var _;return[2,(_=l,_async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,n.api.print.estimatedDelivery({composition_id:_})];case 1:return e=r.sent(),[3,3];case 2:return t=r.sent(),(0,b.Bc)({productId:null,compositionName:_,payload:{},error:t}),[2,{}];case 3:if(e.success)return[2,e];return[2,e.fallback?{fallback:e.fallback}:{}]}})})())]}})})()];case 2:return o=u.sent(),[3,4];case 3:return releaseMadeLoader(e,r),[7];case 4:return ownsMadeRender(r)&&(retireMadeLoader(),updateHTML(o)),t&&(0,b.DS)(o,{suppressRudderstack:l}),[2,o]}})})()};let __rspack_default_export=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.suppressRudderstackProductViewed,r=e.trackInitialView;loadDeliveryEstimates(!0,void 0===r||r,{suppressRudderstack:void 0!==t&&t}),o.EventBus.on(o.Events.PRODUCT_COLOR_SELECTED,function(){var e=claimMadeRequest
1();i.u.handleRefreshDeliveryDates({containerId:v,isCurrent:function(){return ownsMadeRender(e)},applyCachedCallback:function(){ownsMadeRender(e)&&applyCachedDeliveryDate()},fallbackCallback:function(){return loadDeliveryEstimates(!1,!1,{requestToken:e})}})}),o.EventBus.on(o.Events.ZIPCODE_UPDATED,function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return e=claimMadeRequest(),[4,i.u.handleRefreshDeliveryDates({containerId:v,isCurrent:function(){return ownsMadeRender(e)},applyCachedCallback:function(){ownsMadeRender(e)&&applyCachedDeliveryDate()},fallbackCallback:function(){return loadDeliveryEstimates(!0,!1,{requestToken:e})}})];case 1:return t.sent(),[2]}})})()})}},75798(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(148782),o=r(864188),i=r(433769),l=r(811430),c=r(667050),u=r(48859),d=r(582789),p=r(319850),f=r(956883),_=r(86087),h=r(134128);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var $getContainer=function(){return document.getElementById(_.A.local.CONTAINER)},$getMadeContainer=function(){return document.getElementById(_.A.made.CONTAINER)},initFormWithDynamicData=function(){var e=document.pdpDynamicData.isAddressExists,t=document.pdpDynamicData.zipcode;e||t||(0,p.A)()},initPrintBoxOnly=function(e){($getMadeContainer()||e)&&(0,d.A)({trackInitialView:!1})};function __rspack_default_export(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return _async_to_generator(function(){var t,r,p;return _ts_generator(this,function(_){switch(_.label){case 0:return[4,(0,n.Xn)()];case 1:if(_.sent())return[2,initPrintBoxOnly(e)];if(!(t=$getContainer()||$getMadeContainer()))return[2,void 0];return"true"===t.dataset.enabledShippingEnhancementServices&&(r=new f._).subscribe(),(0,c.d9)()||(0,u.Ay)({dtfPricesDecorator:r}),($getMadeContainer()||e)&&(0,d.A)(),window.dynamicDataLoaded?initFormWithDynamicData():document.addEventListener("dynamicDataLoaded",initFormWithDynamicData,!1),(0,l.UX)()&&(0,l.PB)($getContainer(),function(e,t){(0,i.track)("viewed_on_pdp",{target:"delivery_date",scrolled:t})},{mobileOnly:!0,once:!0}),p=function(e,r){var n=r.showEstimates;t.classList.toggle("hidden",(0,h.Fj)(n))},o.EventBus.on(o.Events.PRODUCT_COLOR_SELECTED,p),[2,function(){null==r||r.unsubscribe(),o.EventBus.off(o.Events.PRODUCT_COLOR_SELECTED,p),document.removeEventListener("dynamicDataLoaded",initFormWithDynamicData,!1)}]}})})()}},304368(){"use strict";document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector(".js-pdp-bulk-discount-summary-table"),t=document.querySelector(".js-bulk-buyer-modal-content"),r=document.querySelector(".js-bulk-buyer-modal-trigger");e&&r&&(r.classList.remove("hidden"),r.addEventListener("click",function(){if(!t.hasChildNodes()){t.appendChild(e.cloneNode(!0));var r=t.querySelector(".js-bulk-table-spacer");null==r||r.classList.add("hidden")}
1$(".js-bulk-buyer-modal").modal("show")}))})},122614(e,t,r){"use strict";r.r(t),r.d(t,{default:()=>__rspack_default_export});var n=r(741235),o=r(632397),i=r(56832),l=r(842948);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}r(304368);var $getRoot=function(){return document.querySelector(".js-product-details-dtf-sheet")};function __rspack_default_export(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){return $getRoot()&&(document.getElementById("product-page-container").classList.add("product-details__container--dtf"),(0,o.A)(),(0,i.K)(".js-upsell-container"),(0,l.A)(),(0,n.v8)("uploaded_artwork_ids")&&(e=$getRoot().getBoundingClientRect().top+window.scrollY,window.scrollTo({top:e,behavior:"smooth"}))),[2]})})()}},119978(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(414735).A},650574(e,t,r){"use strict";r.d(t,{Ay:()=>__rspack_default_export,Mm:()=>initSavedCartsSelectorsWithin});var n=r(277889),o=r(864188),i=r(433769),l=r(163964),c=r(181766),u=r(375138),d=r(406536),p=r(306780),f=r(20908);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var _=".js-qty-form-saved-carts-item",h=".js-qty-create-cart",m=".js-qty-form-saved-cart-edit",g=".js-qty-form-saved-cart-name",b=".js-qty-form-saved-cart-input",y=".js-qty-form-saved-cart-approve",v=".js-qty-form-saved-cart-cancel",w=".js-product-grid-saved-cart",setNameInputValue=function(e,t){e.value=t,e.defaultValue=t},cartDisplayName=function(e){var t=null==e?void 0:e.cart_name;if("string"==typeof t&&""!==t.trim())return t;var r=null==e?void 0:e.default_cart_name;return"string"==typeof r&&""!==r.trim()?r:"My Cart"},j=function(){function SavedCartsSelector(e,t,r,w){var j=this;_class_call_check(this,SavedCartsSelector),_define_property(this,"isOpen",!1),_define_property(this,"showCreateModal",!1),_define_property(this,"getNodeByNumber",function(e){return j.list.querySelector('.js-qty-form-saved-carts-item[data-number="'.concat(e,'"]'))}),_define_property(this,"getCartByNumber",function(e){return j.carts.find(function(t){return t.number===e})}),_define_property(this,"getItem",function(e,t){var r=document.createElement("template");r.innerHTML='\n    <div\n      class="product-saved-carts-selector__saved-carts-item js-qty-form-saved-carts-item"\n      data-number="'.concat(e.number,'" data-active="').concat(t,'"\n      role="button"\n      tabindex="0"\n    >\n      <div class="product-saved-carts-selector__saved-carts-item-row">\n        <div class="product-saved-carts-selector__saved-carts-option js-qty-form-saved-cart-option ').concat(t?"product-saved-carts-selector__saved-carts-option--active":"",'"\n        data-number="').concat(e.number,'"\n        ></div>\n        <div class="product-saved-carts-selector__cart-name js-qty-form-saved-cart-name"></div>\n        <input\n          type="text"\n          class="product-saved-carts-selector__name-input js-qty-form-saved-cart-input hidden"\n          maxlength="50"\n        />\n        <button type="button" class="product-saved-carts-selector__edit js-qty-form-saved-cart-edit">\n          ').concat((0,d.A)({className:"icon icon--svg icon--edit"}),'\n        </button>\n        <button type="button" class="product-saved-carts-selector__edit-button product-saved-carts-selector__edit-button--approve js-qty-form-saved-cart-approve hidden">\n          ').concat((0,p.A)({className:"icon icon--svg icon--check"}),'\n        </button>\n        <button type="button" class="product-saved-carts-selector__edit-button js-qty-form-saved-cart-cancel hidden">\n          ').concat((0,f.A)({className:"icon icon--svg icon--cross"}),'\n        </button>\n        <div class="product-saved-carts-selector__badge js-qty-saved-carts-badge ').concat(t&&j.showActiveBadge?"":"hidden",'">Active Cart</div>\n      </div>\n      <div class="product-saved-carts-selector__saved-carts-item-row">\n        <div><span class="js-qty-form-saved-carts-qty">').concat(e.items,'</span> Items</div>\n        <div class="product-saved-carts-selector__saved-carts-amount">
1\n          ').concat(j.currencySign,'\n          <span class="js-qty-form-saved-cart-amount">').concat(e.amount,"</span>\n        </div>\n      </div>\n    </div>\n    ").trim();var n=r.content.firstChild,o=n.querySelector(m),i=n.querySelector(v),l=n.querySelector(y),c=n.querySelector(b),u=n.querySelector(g),_=cartDisplayName(e);return u.textContent=_,setNameInputValue(c,_),o.addEventListener("click",function(e){return j.enableEdit(e,n)}),i.addEventListener("click",function(e){j.hideEdits(),e.stopPropagation()}),n.addEventListener("click",function(){return j.onSwitch(n,e.number)}),n.addEventListener("keydown",function(t){(13===t.keyCode||32===t.keyCode)&&"INPUT"!==document.activeElement.tagName&&(t.preventDefault(),j.input.focus(),j.onSwitch(n,e.number))}),l.addEventListener("click",function(t){return j.onChangeName(t,n,e.number)}),c.addEventListener("keydown",function(t){"Enter"===t.key&&j.onChangeName(t,n,e.number)},!0),c.addEventListener("input",function(){j.toggleInputValidity(c,!1)}),c.addEventListener("click",function(e){e.stopPropagation()}),n}),_define_property(this,"switchNode",function(e,t){j.activeNode&&j.setActiveStatus(j.activeNode,!1),j.setActiveStatus(e,!0),j.active=j.carts.find(function(e){return e.number===t}),j.name.textContent=cartDisplayName(j.active),j.numberInput.value=j.active.number}),_define_property(this,"updateCartName",function(e,t){var r,n=j.getCartByNumber(e);if(n.cart_name===t)return null;var o=j.getNodeByNumber(e),i=o.querySelector(b),l=o.querySelector(g);return n.cart_name=t,i.defaultValue=t,o.classList.contains("inline-edit")||(i.value=t),l.textContent=t,(null==(r=j.active)?void 0:r.number)===e&&(j.name.textContent=t,j.active.cart_name=t),n}),_define_property(this,"onChangeName",function(e,t,r){return _async_to_generator(function(){var l,c,d;return _ts_generator(this,function(p){switch(p.label){case 0:if(e.preventDefault(),e.stopPropagation(),!(c=(l=t.querySelector(b)).value.trim()))return this.toggleInputValidity(l,!0),[2];if(d=this.updateCartName(r,c),this.hideEdits(),!d)return[2];return this.toggleLoading(!0,"Renaming Cart"),[4,n.api.jiffyshirts.savedCart.update({id:r},{saved_carts:d})];case 1:return p.sent(),this.toggleLoading(!1),o.store.pdp.change({activeCart:this.active,carts:this.carts}),o.EventBus.publish(o.Events.SAVED_CART_CHANGED,this,{cartNumber:r,newName:d.cart_name}),(0,u.wz)(r,d.cart_name),(0,i.track)("saved_carts_inline_edit_saved"),[2]}})}).call(j)}),_define_property(this,"onCreate",function(e){var t=_object_spread({},e);if(!j.carts.some(function(e){return t.number===e.number})){j.carts.unshift(t);var r=j.getItem(t,!1);j.list.prepend(r),j.switchNode(r,t.number),o.store.pdp.change({activeCart:j.active,savedCarts:j.carts})}}),_define_property(this,"hideEdits",function(){var e=j.list.querySelectorAll(g),t=j.list.querySelectorAll(b),r=j.list.querySelectorAll(m),n=j.list.querySelectorAll(y),o=j.list.querySelectorAll(v),l=j.list.querySelectorAll(_);j.isNameEdit&&(0,i.track)("saved_carts_inline_edit_dismissed"),j.isNameEdit=!1;var showElems=function(e){return e.classList.remove("hidden")},hideElems=function(e){return e.classList.add("hidden")};j.resetNameInputs(),e.forEach(showElems),t.forEach(hideElems),r.forEach(showElems),n.forEach(hideElems),o.forEach(hideElems),l.forEach(function(e){return e.classList.remove("inline-edit")})}),_define_property(this,"enableEdit",function(e,t){j.hideEdits(),j.isNameEdit=!0;var r=t.querySelector(g),n=t.querySelector(b),o=t.querySelector(m),l=t.querySelector(y),c=t.querySelector(v);e.preventDefault(),e.stopPropagation(),t.classList.add("inline-edit"),r.classList.add("hidden"),o.classList.add("hidden"),n.classList.remove("hidden"),l.classList.remove("hidden"),c.classList.remove("hidden"),(0,i.track)("saved_carts_inline_edit_started",{page:"product_page"})}),_define_property(this,"onSwitch",function(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(l){switch(l.label){case 0:if((null==(r=this.active)?void 0:r.number)===t)return[2];return this.hideEdits(),this.toggleLoading(!0,"Switching Cart"),[4,n.api.account.savedCarts.switch({number:t})];case 1:return l.sent(),this.switchNode(e,t),this.toggleLoading(!1),o.store.pdp.change({activeCart:this.active}),(0,i.track)("saved_carts_default_changed",{trigger:"product_page"}),o.EventBus.publish(o.Events.SAVED_CART_SELECTED,this,{number:t,name:this.active.cart_name,items:this.active.items}),this.toggleSelector(!1),[2]}})}).call(j)}),_define_property(this,"toggleLoading",function(e,t){j.spinnerText.textContent=t,j.listSpinner.classList.toggle("hidden",!e)}),_define_property(this,"toggleSelector",function(e){j.isOpen=e,j.input.ariaExpanded=e,j.select.classList.toggle("hidden",!j.isOpen),j.backdrop.classList.toggle("hidden",!j.isOpen),j.arrow.classList.toggle("product-saved-carts-selector__chevron--open",j.isOpen),document.documentElement.classList.toggle("locked-mobile",j.isOpen),e?(0,i.track)("saved_carts_dropdown_add_to_cart_selector_opened",{page:"product_page"}):j.hideEdits()}),_define_property(this,"toggleInputValidity",function(e,t){e.classList.toggle("product-saved-carts-selector__name-input--invalid",t)});var k=e.dataset.currencySign;this.carts=t.map(function(e){return _object_spread({},e)}),this.active=r,this.wrapper=e.querySelector(".js-qty-form-saved-carts-wrapper"),this.list=e.querySelector(".js-qty-form-saved-carts-list"),this.name=e.querySelector(".js-qty-form-saved-carts-name"),this.input=e.querySelector(".js-qty-form-saved-carts-input"),this.numberInput=e.querySelector(".js-qty-form-saved-carts-number"),this.select=e.querySelector(".js-qty-form-saved-carts-select"),this.arrow=e.querySelector(".js-qty-saved-cart-chevron"),this.backdrop=e.querySelector(".js-qty-saved-carts-backdrop"),this.popupClose=e.querySelector(".js-saved-carts-close"),this.spinner=e.querySelector(".js-qty-form-saved-carts-spinner"),this.createCartBtn=document.querySelector(h),this.wrapperSpinner=e.querySelector(".js-qty-form-saved-carts-wrapper-spinner"),this.listSpinner=e.querySelector(".js-qty-form-saved-carts-list-spinner"),this.spinnerText=e.querySelector(".js-qty-form-saved-carts-spinner-text"),this.showActiveBadge=w,this.currencySign=k,this.isNameEdit=!1,this.render(),this.initListeners(),(0,l.A)(h,e,null,!0),(0,c.A)(this.wrapper)}return _create_class(SavedCartsSelector,[{key:"activeNode",get:function(){return this.list.querySelector('.js-qty-form-saved-carts-item[data-active="true"]')}},{key:"setActiveStatus",value:function(e,t){e.setAttribute("data-active",t.toString());var r=e.querySelector(".js-qty-form-saved-cart-option"),n=e.querySelector(".js-qty-saved-carts-badge");r.classList.toggle("product-saved-carts-selector__saved-carts-option--active",t),n.classList.toggle("hidden",!t)}},{key:"resetNameInputs",value:function(){var e=this;this.list.querySelectorAll(_).forEach(function(t){var r=t.dataset.number,n=e.getCartByNumber(r);
1if(n){var o=t.querySelector(b);e.toggleInputValidity(o,!1),setNameInputValue(o,cartDisplayName(n))}})}},{key:"initListeners",value:function(){var e=this;this.input.addEventListener("click",function(){e.toggleSelector(!e.isOpen)}),this.popupClose.addEventListener("click",function(){e.toggleSelector(!1)}),this.createCartBtn.addEventListener("click",function(){e.toggleSelector(!1)}),this.input.addEventListener("keydown",function(t){(13===t.keyCode||32===t.keyCode)&&(t.preventDefault(),e.toggleSelector(!e.isOpen)),27===t.keyCode&&e.toggleSelector(!1)}),this.select.addEventListener("keydown",function(t){27===t.keyCode&&(e.input.focus(),e.toggleSelector(!1))}),document.addEventListener("mousedown",function(t){e.isOpen&&(t.composedPath().includes(e.wrapper)||e.toggleSelector(!1))}),o.EventBus.on(o.Events.SAVED_CART_SELECTED,function(t,r){var n,o=r.number;if((null==(n=e.active)?void 0:n.number)!==o||!e.showActiveBadge){e.showActiveBadge=!0;var i=e.getNodeByNumber(o);e.switchNode(i,o)}}),o.EventBus.on(o.Events.SAVED_CART_CREATED,function(t,r){return _async_to_generator(function(){return _ts_generator(this,function(e){return[2,this.onCreate(r)]})}).call(e)}),o.EventBus.on(o.Events.SAVED_CART_CHANGED,function(t,r){var n=r.cartNumber,o=r.newName;return e.updateCartName(n,o)}),o.EventBus.on(o.Events.ITEMS_ADDED_TO_CART,function(t){var r=t.target;if(e.active&&e.activeNode){e.active.items+=r.quantity,e.active.amount=r.cart_total;var n=e.activeNode,i=n.querySelector(".js-qty-form-saved-carts-qty"),l=n.querySelector(".js-qty-form-saved-cart-amount");i.textContent=e.active.items,l.textContent=Number(e.active.amount).toFixed(2),e.carts=e.carts.map(function(t){return t.number===e.active.number?e.active:t});var c=o.store.get(function(e){return e.pdp.activeCart});(null==c?void 0:c.items)!==e.active.items&&o.store.pdp.change({savedCarts:e.carts,activeCart:e.active})}})}},{key:"render",value:function(){var e,t,r,n=this,o=this.carts.map(function(e){var t;return n.getItem(e,(null==(t=n.active)?void 0:t.number)===e.number)});(e=this.list).replaceChildren.apply(e,_to_consumable_array(o)),this.name.textContent=this.active?cartDisplayName(this.active):"Select a cart",this.numberInput.value=null!=(t=null==(r=this.active)?void 0:r.number)?t:"",this.wrapper.classList.remove("hidden"),this.wrapperSpinner.classList.add("hidden")}}]),SavedCartsSelector}(),init=function(e){var t=null==e?void 0:e.querySelector(".js-qty-form-saved-carts");t&&_async_to_generator(function(){var e,r,i,l,c,u,d,p,f,_;return _ts_generator(this,function(h){switch(h.label){case 0:if((e=o.store.get(function(e){return{carts:e.pdp.savedCarts,active:e.pdp.activeCart,showActiveBadge:e.pdp.showActiveBadge}})).carts){if(!(null==(r=e.active)?void 0:r.number)){if(!e.carts.length)return t.classList.add("hidden"),[2,null];return[2,new j(t,e.carts,void 0,!1)]}return l=(i=e.carts.find(function(t){return t.number===e.active.number}))?_object_spread_props(_object_spread({},e.active),{cart_name:i.cart_name}):e.active,[2,new j(t,e.carts,l,e.showActiveBadge)]}return[4,Promise.all([n.api.jiffyshirts.savedCart.list(),n.api.jiffyshirts.savedCart.current()])];case 1:if((c=h.sent())[0].error||(d=(u=_sliced_to_array(c,2))[0].carts,!(p=u[1])))return t.classList.add("hidden"),[2,null];if(f=d.find(function(e){return e.number===(null==p?void 0:p.number)}),_=!0,f||(f=_sliced_to_array(d,1)[0],_=!1),!f)return o.store.pdp.change({savedCarts:d,activeCart:void 0,showActiveBadge:!1}),t.classList.add("hidden"),[2,null];return o.store.pdp.change({savedCarts:d,activeCart:f,showActiveBadge:_}),[2,new j(t,d,f,_)]}})})()},initAllSelectors=function(){document.querySelectorAll(w).forEach(function(e){init(e),e.classList.remove("hidden")})},initSavedCartsSelectorsWithin=function(e){e&&e.querySelectorAll(w).forEach(function(e){init(e),e.classList.remove("hidden")})};function __rspack_default_export(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.querySelector(".js-product-details-quantity-form");e?initAllSelectors():init(t);var r=!1;o.store.pdp.changed(function(e,t){!t.data.productGridLoaded||r||!window.inventory||(r=!0,o.store.get(function(e){return e.pdp.savedCarts})&&initAllSelectors())})}},497512(e,t,r){"use strict";r.d(t,{HS:()=>observeBannerInsertions,initAllBanners:()=>initAllBanners});var n=r(277889),o=r(433769),i=r(864188);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var l=".js-pdp-banner",c=".js-color-variant-selector-active",getActiveSlideCompositionId=function(){var e,t;return null==(t=document.querySelector(c))||null==(e=t.dataset)?void 0:e.compositionId},getPdpCatalogNumber=function(){var e,t;return null==(t=document.querySelector(".js-design-upload-cta"))||null==(e=t.dataset)?void 0:e.catalogNumber},getCurrentColor=function(){var e,t;return new URLSearchParams(window.location.search).get("ac")||(null==(t=document.querySelector(c))||null==(e=t.dataset)?void 0:e.color)},u=new Map,d=new Map,p=new WeakMap,cacheKey=function(e,t,r){return"".concat(e,"::").concat(t||"","::").concat(null!=r?r:"")},isFastEtaEnabled=function(){var e,t,r;return(null==(r=window)||null==(t=r.jiffy)||null==(e=t.flip)?void 0:e.fastDeliveryEstimate)===!0},callDeliveryApi=function(e,t,r){return r?_async_to_generator(function(){var e,t;return _ts_generator(this,function(o){switch(o.label){case 0:if(!isFastEtaEnabled())return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.api.product.fetchETA({business_line:"print"},{composition_hash:JSON.stringify(_define_property({},r,1)),source:"pdp"})];case 2:if((null==(e=o.sent())?void 0:e.success)&&(null==e?void 0:e.estimates)&&(null==(t=e.estimates[r])?void 0:t.date))return[2,{composition_dates:{value_full:t.date}}];return[3,4];case 3:return o.sent(),[3,4];case 4:return[2,n.api.print.estimatedDelivery({composition_id:r})]}})})():n.api.product.fetchDeliveryEstimatesForCurrentCart({productId:e},{composition_name:t,variants_hash:JSON.stringify({})})},fetchDeliveryDate=function(e,t,r){var n=cacheKey(e,t,r);if(u.has(n))return Promise.resolve(u.get(n));if(d.has(n))return d.get(n);var o=_async_to_generator(function(){var n,o,i,l,c;return _ts_generator(this,function(p){switch(p.label){case 0:n=cacheKey(e,t,r),p.label=1;case 1:return p.trys.push([1,3,4,5]),[4,callDeliveryApi(e,t,r)];case 2:if(!(l=null==(i=p.sent())||null==(o=i.composition_dates)?void 0:o.value_full))return[2,null];return u.size>=50&&(c=u.keys().next().value,u.delete(c)),u.set(n,l),[2,l];case 3:return console.warn("Failed to fetch delivery date:",p.sent()),[2,null];case 4:return d.delete(n),[7];case 5:return[2]}})})();return d.set(n,o),o},f=function(){function PromotionBannerClass(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,r=e.onButtonClick,n=e.onLinkClick;_class_call_check(this,PromotionBannerClass),this.$container=void 0===t?null:t,this.onButtonClick=void 0===r?null:r,this.onLinkClick=void 0===n?null:n}return _create_class(PromotionBannerClass,[{key:"$button",get:function(){var e;return null==(e=this.$container)?void 0:e.querySelector(".js-pdp-banner-cta-button")}},{key:"$link",get:function(){var e;return null==(e=this.$container)?void 0:e.querySelector(".js-pdp-banner-cta-link")}},{key:"$deliveryDates",get:function(){var e;return _to_consumable_array((null==(e=this.$container)?void 0:e.querySelectorAll(".js-pdp-banner-delivery-date"))||[])}},{key:"initDeliveryDate",value:function(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c,u,d;return _ts_generator(this,function(p){switch(p.label){case 0:if(!(o=this.$deliveryDates).length||(l=(i=this.$container.dataset).deliveryProductSlug,c=i.deliveryCompositionName,u=i.deliveryCompositionId,!l))return[2];return[4,fetchDeliveryDate(l,c,u?Number(null!=(e=null!=(t=null!=(r=this.currentCompositionId)?r:getActiveSlideCompositionId())?t:null==(n=window.jiffy_made_product_props)?void 0:n.composition_id)?e:u):void 0)];case 1:return(d=p.sent())&&o.forEach(function(e){e.textContent=d}),[2]}})}).call(this)}},{key:"initDeliveryDateOnVisible",value:function(){var e=this;if(this.$deliveryDates.length&&this.$container.dataset.deliveryProductSlug){var t=0;this.deliveryObserver=new IntersectionObserver(function(r){var n=r[0];if(null==n?void 0:n.isIntersecting){var o=e.$container.getBoundingClientRect(),i=document.elementFromPoint(o.left+o.width/2,o.top+o.height/2);if((!i||!e.$container.contains(i))&&(t+=1)<3)return;e.deliveryObserver.disconnect(),e.deliveryObserver=null,e.initDeliveryDate()}},{threshold:.5}),this.deliveryObserver.observe(this.$container)}}},{key:"initViewTracking",value:function(){var e=this.$container.dataset,t=e.bannerLocation,r=e.promoShown,n=e.promoVariant;this.viewObserver=(0,o.createPromoViewObserver)(this.$container,void 0===t?"":t,{promoShown:void 0===r?"":r,promoVariant:void 0===n?"":n})}},{key:"isPrintBanner",get:function(){var e,t;return!!(null==(t=this.$container)||null==(e=t.dataset)?void 0:e.deliveryCompositionId)}},{key:"updateCtaForCurrentProduct",value:function(){var e=this.$button;if(e&&this.isPrintBanner){var t=e.getAttribute("href");if(t&&t.startsWith("/design-lab")){var r=getPdpCatalogNumber(),n=this.currentColor||getCurrentColor();if(r||n){var o=new URL(t,window.location.origin);r&&o.searchParams.set("catalog_number",r),n&&o.searchParams.set("ac",n),e.href=o.pathname+o.search}}}}},{key:"init",value:function(){var e=this;return!!this.$container&&(this.handleButtonClick=function(t){var r;PromotionBannerClass.trackClick(t.currentTarget),null==(r=e.onButtonClick)||r.call(e,t)},this.handleLinkClick=function(t){var r;PromotionBannerClass.trackClick(t.currentTarget),null==(r=e.onLinkClick)||r.call(e,t)},this.$button&&this.$button.addEventListener("click",this.handleButtonClick),this.$link&&this.$link.addEventListener("click",this.handleLinkClick),this.initViewTracking(),this.initDeliveryDateOnVisible(),this.updateCtaForCurrentProduct(),this.isPrintBanner&&(this.handleColorChange=function(t,r){var n=r.compositionId,o=r.color;e.currentCompositionId=n,e.currentColor=o,e.initDeliveryDate(),e.updateCtaForCurrentProduct()},i.EventBus.on(i.Events.PRODUCT_COLOR_SELECTED,this.handleColorChange)),!0)}},{key:"destroy",value:function(){this.$button&&this.handleButtonClick&&(this.$button.removeEventListener("click",this.handleButtonClick),this.handleButtonClick=null),this.$link&&this.handleLinkClick&&(this.$link.removeEventListener("click",this.handleLinkClick),this.handleLinkClick=null),this.viewObserver&&(this.viewObserver.disconnect(),this.viewObserver=null),this.deliveryObserver&&(this.deliveryObserver.disconnect(),this.deliveryObserver=null),this.handleColorChange&&(i.EventBus.off(i.Events.PRODUCT_COLOR_SELECTED,this.handleColorChange),this.handleColorChange=null)}}],[{key:"trackClick",value:function(e){(0,o.track)("promo_click",{cta_text:e.textContent.trim(),destination:e.href||""})}}]),PromotionBannerClass}(),initAllBanners=function(){document.querySelectorAll(l).forEach(function(e){var t=p.get(e);if(t)return void t.initDeliveryDate();var r=new f({container:e});r.init()&&p.set(e,r)})},observeBannerInsertions=function(){var e=new MutationObserver(function(e){e.forEach(function(e){Array.from(e.addedNodes).filter(function(e){return e.no
1deType===Node.ELEMENT_NODE}).forEach(function(e){var t,r;((null==(t=e.matches)?void 0:t.call(e,l))?[e]:_to_consumable_array((null==(r=e.querySelectorAll)?void 0:r.call(e,l))||[])).filter(function(e){return!p.has(e)}).forEach(function(e){var t=new f({container:e});t.init()&&p.set(e,t)})})})});return e.observe(document.body,{childList:!0,subtree:!0}),e}},629499(e,t,r){"use strict";r.d(t,{A:()=>CanvaModule});var n=r(483134),o=r(293534),i=r(997252),l=r(147141),c=r(708043),u=r(467265),d=r(586519),p=r(970134),f=r(53696),_=r(147229),h=r(903683);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function CanvaModule(e){var t=e.fileLanding,r=e.namespace,m=e.replica,g=void 0!==m&&m,b=e.settings,y=void 0===b?{}
1:b,v=e.skipSettingsLoading,w=void 0!==v&&v,j=e.skipInitialModalShow,k=void 0!==j&&j,x=e.onClick,S=_object_without_properties(e,["fileLanding","namespace","replica","settings","skipSettingsLoading","skipInitialModalShow","onClick"]),O="open_canva_modal_on_start",P=p.A.useStore(),A=_sliced_to_array((0,o.useState)(!1),2),C=A[0],I=A[1],E="canva-button-".concat(r);function handleCanva(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];x&&x(),(0,l.vA)()[O]||(0,u.Py)("canva_button_click",{namespace:r});var t=P.getters["canva/settings"];if("authorized"in t){if(!t.authorized)return void(0,c.Y)(t.url,{additionalOrigins:["https://www.canva.com","https://canva.com"]});I(!0),queueMicrotask(function(){e||jQuery(P.getters["canva/$modal"]).modal("show"),P.dispatch("canva/resetModalState")})}}function handleProxy(){var e;null==(e=document.getElementById(E))||e.click()}var N=JSON.stringify(y);return(0,o.useEffect)(function(){g||P.commit("canva/setSettings",y)},[N,g]),(0,o.useEffect)(function(){_async_to_generator(function(){var e,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:if(i.trys.push([0,3,,4]),g)return[2];if(y&&P.commit("canva/setSettings",y),P.commit("canva/$setFileInput",document.querySelector(t)),w)return[3,2];return[4,P.dispatch("canva/fetchSettings",r)];case 1:i.sent(),i.label=2;case 2:return e=(0,l.vA)(),n=P.getters["canva/settings"],e[O]&&"authorized"in n&&n.authorized&&(handleCanva(k),(0,l.qm)(O),(0,u.Py)("canva_account_linked",{namespace:r})),[3,4];case 3:return o=i.sent(),(0,d.notifyError)(_instanceof(o,Error)?o:Error(String(o)),{context:{component:"CanvaButton",namespace:r,action:"mount_fetch_settings"}}),[3,4];case 4:return[2]}})})()},[]),(0,n.jsx)(n.Fragment,{children:g?(0,n.jsx)(h.A,_object_spread_props(_object_spread({},S),{className:(0,i.cn)("canva-trigger--".concat(r),S.className),onClick:handleProxy,"data-testid":"canva-trigger"})):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(h.A,{className:(0,i.cn)("canva-trigger--".concat(r)),id:E,onClick:function(){return handleCanva()},"data-testid":"canva-trigger-1"}),C?(0,n.jsx)(_.A,{component:f.A,props:{className:(0,i.cn)("canva-modal--".concat(r)),store:P}}):null]})})}},53696(e,t,r){"use strict";r.d(t,{A:()=>CanvaModal});var n=r(483134),o=r(293534),i=r(997252),l=r(343351),c=r(319636),u=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function CanvaModal(e){var t=e.store,r=_object_without_properties(e,["store"]);t.useStore();var d=(0,o.useRef)(null),p=_sliced_to_array((0,o.useState)(null),2),f=p[0],_=p[1];function continuation(){return t.getters["canva/continuation"]}function designs(){return t.getters["canva/designs"]}function error(){return t.getters["canva/error"]}function loading(){return t.getters["canva/loading"]}function uploading(){return t.getters["canva/uploading"]}function disabled(){return!f||!!error()||loading()||uploading()}function moreButtonText(){return loading()&&designs().length?"Loading...":"Load more..."}function submitButtonText(){return uploading()?"Uploading":"Proceed"}function handleDesignSelect(e){return _async_to_generator(function(){return _ts_generator(this,function(r){return e&&t.dispatch("canva/selectDesign",e),[2]})})()}function fetchDesigns(){t.dispatch("canva/fetchDesigns",continuation())}function getDesignAlt(e){return(null==e?void 0:e.title)||"Untitled Design"}function getDesignSrc(e){var t;return null==e||null==(t=e.thumbnail)?void 0:t.url}return(0,o.useEffect)(function(){t.commit("canva/$setModal",d.current),fetchDesigns()},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("canva-modal modal scope-86c8d61d",r.className),ref:d,onClick:function(e){e.stopPropagation()},"data-testid":"canva-modal",children:(0,n.jsxs)("div",{className:"canva-modal__modal-box scope-86c8d61d",children:[(0,n.jsx)("div",{className:"canva-modal__modal-header scope-86c8d61d",children:(0,n.jsxs)("div",{className:"canva-modal__header scope-86c8d61d",children:[(0,n.jsx)("h3",{className:"canva-modal__title scope-86c8d61d",children:"Choose image you want to upload:"}),(0,n.jsx)("button",{className:"canva-modal__modal-close scope-86c8d61d",type:"button","data-dismiss":"modal","data-testid":"canva-modal-modal-close",children:(0,n.jsx)(c.A,{className:"scope-86c8d61d","data-testid":"canva-modal-close-icon"})})]})}),(0,n.jsx)("div",{className:"canva-modal__modal-body scope-86c8d61d",children:loading()&&!designs().length?(0,n.jsx)("div",{className:"canva-modal__loading scope-86c8d61d",children:" Loading... "}):error()?(0,n.jsx)("div",{className:"canva-modal__error scope-86c8d61d",children:error()}):loading()||designs().length?(0,n.jsx)("div",{className:(0,i.cn)("canva-modal__gallery scope-86c8d61d",uploading()&&"canva-modal__gallery--uploading"),children:(0,u.p)(designs(),function(e){return(0,n.jsxs)("a",{className:(0,i.cn)("canva-modal__gallery-item scope-86c8d61d",e.id===f&&"canva-modal__gallery-item--selected"),href:"#",onClick:function(t){t.preventDefault(),_(e.id)},"data-testid":"canva-modal-gallery-item",children:[(0,n.jsx)("img",{className:(0,i.cn)("canva-modal__gallery-image scope-86c8d61d",!getDesignSrc(e)&&"canva-modal__gallery-image--placeholder"),alt:getDesignAlt(e),src:getDesignSrc(e)}),e.id===f?(0,n.jsx)(l.A,{className:"canva-modal__gallery-check scope-86c8d61d","data-testid":"canva-modal-gallery-check"}):null]},e.id)})}):(0,n.jsx)("div",{className:"scope-86c8d61d",children:"No images found"})}),(0,n.jsxs)("div",{className:"canva-modal__actions scope-86c8d61d",children:[continuation()?(0,n.jsx)("button",{className:"canva-modal__action canva-modal__action--secondary scope-86c8d61d",disabled:loading()||uploading(),type:"button",onClick:function(){fetchDesigns()},"data-testid":"canva-modal-action",children:moreButtonText()}):null,(0,n.jsx)("button",{className:"canva-modal__action canva-modal__action--primary scope-86c8d61d",disabled:disabled(),type:"button",onClick:function(){handleDesignSelect(f)},"data-testid":"canva-modal-action-1",children:submitButtonText()})]})]})}))}},147229(e,t,r){"use strict";r.d(t,{A:()=>CanvaPortal});var n=r(483134),o=r(293534),i=r(207214);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function CanvaPortal(e){var t=e.component,r=e.props,l=e.children,c=_sliced_to_array((0,o.useState)(null),2),u=c[0],d=c[1];return(0,o.useEffect)(function(){var e=document.createElement("div");return document.body.appendChild(e),d(e),function(){document.body.removeChild(e)}},[]),(0,n.jsxs)(n.Fragment,{children:[l,u&&(0,i.createPortal)((0,n.jsx)(t,_object_spread({},void 0===r?{}:r)),u)]})}},903683(e,t,r){"use strict";r.d(t,{A:()=>CanvaTrigger});var n=r(483134),o=r(997252),i=r(669801);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function CanvaTrigger(e){var t=e.onClick,r=_object_without_properties(e,["onClick"]);return(0,n.jsx)("a",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("canva-trigger scope-24f6a37c",r.className),href:"#",onClick:function(e){e.preventDefault(),e.stopPropagation(),t&&t()},"data-testid":"canva-trigger",children:(0,n.jsx)(i.A,{className:"canva-trigger__icon scope-24f6a37c","data-testid":"canva-trigger-icon"})}))}},332467(e,t,r){"use strict";r.d(t,{FU:()=>p,HP:()=>f,UX:()=>c,WX:()=>o,Zs:()=>_,iR:()=>d,lg:()=>i,qS:()=>u,rD:()=>l});var n=r(802436),o=(0,n.eU)(null),i=(0,n.eU)(null),l=(0,n.eU)({continuation:void 0,items:[]}),c=(0,n.eU)(null),u=(0,n.eU)(null),d=(0,n.eU)(!1),p=(0,n.eU)({}),f=(0,n.eU)(!1),_=(0,n.y$)()},902803(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(277889),o=r(811430),i=r(496567),l=r(467265),c=r(332467);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var buildTerminalPayload=function(e,t){return{outcome:e,elapsed_ms:Math.max(0,Date.now()-t.startedAt),poll_count:t.requestCount}};let u={namespaced:!0,state:function(){return{$fileInput:c.WX,$modal:c.lg,designs:c.rD,error:c.UX,intervalId:c.qS,loading:c.iR,settings:c.FU,uploading:c.HP}},getters:{$fileInput:function(e){return e.$fileInput},$modal:function(e){return e.$modal},continuation:function(e){return e.designs.continuation},designs:function(e){return e.designs.items},error:function(e){return e.error},intervalId:function(e){return e.intervalId},loading:function(e){return e.loading},settings:function(e){return e.settings},uploading:function(e){return e.uploading}},mutations:{$setFileInput:function(e,t){e.$fileInput=t},$setModal:function(e,t){e.$modal=t},setError:function(e,t){e.error="Something went wrong, please try again.";try{var r=t.match(/\{.*\}/),n=JSON.parse(r[0]);e.error="Error: ".concat(n.message)}catch(e){console.error(t)}},setDesigns:function(e,t){e.designs={continuation:t.continuation,items:_to_consumable_array(e.designs.items).concat(_to_consumable_array(t.items))}},clearDesigns:function(e){e.designs={continuation:void 0,items:[]}},clearError:function(e){e.error=null},setErrorMessage:function(e,t){e.error=t},setIntervalId:function(e,t){e.intervalId=t},setSettings:function(e,t){e.settings=t},toggleLoading:function(e,t){e.loading=t},toggleUploading:function(e,t){e.uploading=t}},actions:{checkDesignStatus:function(e,t){return _async_to_generator(function(e,t){var r,c,u,d,p,f,_,h,m,g,b,y,v,w,j;return _ts_generator(this,function(k){switch(k.label){case 0:if(r=e.commit,c=e.dispatch,u=e.getters,d=t.jobId,p=t.deadline,f=t.pollId,_=t.telemetry,h=function(){clearInterval(f),r("setIntervalId",null)},m=!1,g=function(e){m=!0,(0,l.Py)("canva_export_terminal",buildTerminalPayload(e,_))},!(b=function(){return u.intervalId===f})())return[2];if(!(0,o.J9)(u.$modal))return h(),r("toggleUploading",!1),g("cancelled"),[2];if(Date.now()>p)return h(),r("setErrorMessage","The Canva export timed out. Please try again."),r("toggleUploading",!1),g("timeout"),[2];y=!1,k.label=1;case 1:return k.trys.push([1,6,,7]),_.requestCount+=1,[4,n.api.canva.designStatus({jobId:d})];case 2:if(v=k.sent().job,!b())return[2];if(y=!0,"success"!==v.status)return[3,4];return h(),g("success"),[4,c("setImageFromURL",v.urls[0])];case 3:return k.sent(),r("toggleUploading",!1),[3,5];case 4:"failed"===v.status&&(h(),g("failed"),r("setErrorMessage","Canva could not export this design. Please try again."),r("toggleUploading",!1)),k.label=5;case 5:return[3,7];case 6:if(w=k.sent(),!y&&!b())return[2];return h(),j=(0,i.P)(w),r("setError",j),r("toggleUploading",!1),m||g("error"),[3,7];case 7:return[2]}})}).apply(this,arguments)},fetchDesigns:function(e,t){return _async_to_generator(function(e,t){var r,o,l,c,u;return _ts_generator(this,function(d){switch(d.label){case 0:(r=e.commit)("toggleLoading",!0),d.label=1;case 1:return d.trys.push([1,3,4,5]),o=t?{continuation:t}:{},[4,n.api.canva.designs(o)];case 2:return l=d.sent(),r("setDesigns",l),[3,5];case 3:if(_instanceof(c=d.sent(),Object)&&"status"in c&&401===c.status)return window.location.reload(),[2];return u=(0,i.P)(c),r("setError",u),[3,5];case 4:return r("toggleLoading",!1),[7];case 5:return[2]}})}).apply(this,arguments)},fetchSettings:function(e,t){return _async_to_generator(function(e,t){var r,o,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:r=e.commit,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,n.api.canva.settings({source:t,redirect_url:window.location.pathname})];case 2:return o=u.sent(),r("setSettings",o),[3,4];case 3:return l=u.sent(),c=(0,i.P)(l),r("setError",c),[3,4];case 4:return[2]}})}).apply(this,arguments)},selectDesign:function(e,t){return _async_to_generator(function(e,t){var r,o,c,u,d,p,f,_,h,m,g;return _ts_generator(this,function(b){switch(b.label){case 0:if(r=e.commit,o=e.dispatch,(c=e.getters).uploading)return[2];r("toggleUploading",!0),(0,l.Py)("canva_design_selected",{design_id:t}),u={startedAt:Date.now(),requestCount:0},(d=c.intervalId)&&(clearInterval(d),r("setIntervalId",null)),b.label=1;case 1:return b.trys.push([1,3,,4]),[4,n.api.canva.selectDesign({designId:t})];case 2:return p=b.sent().job,f=Date.now()+9e5,u.startedAt=Date.now(),_=!1,h=setInterval(function(){_&&Date.now()<=f||(_=!0,Promise.resolve(o("checkDesignStatus",{jobId:p.id,deadline:f,pollId:h,telemetry:u})).finally(function(){_=!1}))},1e3),r("setIntervalId",h),[3,4];case 3:return m=b.sent(),g=(0,i.P)(m),r("setError",g),r("toggleUploading",!1),(0,l.Py)("canva_export_terminal",buildTerminalPayload("error",u)),[3,4];case 4:return[2]}})}).apply(this,arguments)},setImageFromURL:function(e,t){return _async_to_generator(function(e,t){var r,n,o,l,c,u,d,p,f,_,h;return _ts_generator(this,function(m){switch(m.label){case 0:r=e.commit,n=e.getters,m.label=1;case 1:return m.trys.push([1,4,,5]),[4,fetch(t)];case 2:if(!(o=m.sent()).ok)throw Error("Canva asset download failed: ".concat(o.status));return[4,o.blob()];case 3:l=m.sent(),c=new Event("change",{bubbles:!0}),d=new File([l],(u=new URL(t).pathname).substring(u.lastIndexOf("/")+1),{type:l.type}
1),(p=new DataTransfer).items.add(d),(f=n.$fileInput).files=p.files,f.setAttribute("data-upload-source","canva");try{f.dispatchEvent(c)}finally{f.removeAttribute("data-upload-source")}return jQuery(n.$modal).modal("hide"),[3,5];case 4:return _=m.sent(),h=(0,i.P)(_),r("setError",h),[3,5];case 5:return[2]}})}).apply(this,arguments)},resetModalState:function(e){var t=e.commit,r=e.dispatch,n=e.getters,o=n.intervalId;o&&(clearInterval(o),t("setIntervalId",null)),t("toggleUploading",!1),t("toggleLoading",!1),n.error&&(t("clearError"),t("clearDesigns"),r("fetchDesigns"))}}}},970134(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(152793),o=r(332467),i=r(902803);let l=(0,n.S)({jotaiStore:o.Zs,state:{},stateKey:"canvaState",modules:{canva:i.A}})},923057(e,t,r){"use strict";r.d(t,{A:()=>Spinner});var n=r(483134),o=r(293534),i=r(997252),l=r(835828),c=r(367559),u=r(927997);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function getDefaultProps(e){return{classes:(0,c.n3)(""),inline:(0,c.n3)(!1),size:(0,c.n3)(""),theme:(0,c.n3)("grey"),paused:(0,c.n3)(!1)}}function Spinner(e){var t=e.className,r=(e.classes,e.inline,e.size,e.theme,e.paused,_object_without_properties(e,["className","classes","inline","size","theme","paused"])),d=(0,c.Mm)(e,getDefaultProps),p=_sliced_to_array((0,o.useReducer)(function(){return{}},{}),2);p[0],p[1];var f=(0,o.useRef)({dark:"gen/spinner.png",grey:"gen/spinner-grey.png",white:"gen/spinner-white.png"});function classHash(){var e={spinner:!0,"spinner--inline":!!d.current.inline};return d.current.size&&(e["spinner--size-".concat(d.current.size)]=!0),d.current.classes&&d.current.classes.split(" ").forEach(function(t){e[t]=!0}),e}function imageSource(){return(0,u.lt)(f.current[d.current.theme])}return(0,n.jsx)("div",_object_spread_props(_object_spread({},(0,l.d)(r)),{className:(0,i.cn)(classHash(),t),children:(0,n.jsx)("img",{className:(0,i.cn)("spinner__image",{"spinner__image--paused":d.current.paused}),alt:"Loading…",src:imageSource(),"data-testid":"spinner-image"})}))}},723341(e,t,r){"use strict";r.d(t,{g:()=>
1broadcastExpressCheckoutError,w:()=>n});var n="jiffy:express-checkout-error";function broadcastExpressCheckoutError(e){window.dispatchEvent(new CustomEvent(n,{detail:{paymentMethod:e}}))}},445101(e,t,r){"use strict";function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _ts_values(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function createQuantitySaveQueue(){var e=[],t=!1,r=0,n=null;function drain(){return _async_to_generator(function(){var o,i,l,c,u,d,p,f,_;return _ts_generator(this,function(h){switch(h.label){case 0:o=function(){var t,r,o;return _ts_generator(this,function(i){switch(i.label){case 0:t=e.shift(),r=n,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return r.send(t.payload)})];case 2:return c={response:i.sent(),generation:r.generation()},l.push({job:t,failed:!1}),[3,4];case 3:return o=i.sent(),r.fail(o),l.push({job:t,failed:!0,error:o}),[3,4];case 4:return[2]}})},t=!0,l=[],c=null,h.label=1;case 1:if(!(e.length>0))return[3,3];return[5,_ts_values(o())];case 2:return h.sent(),[3,1];case 3:t=!1,u=n,d=!0,p=null,f=(null==(i=l[l.length-1])?void 0:i.failed)===!0,_=!!(c&&f&&u.generation()!==c.generation);try{c&&!_&&(d=u.apply(c.response))}catch(e){p={error:e}}if(r=0,u.count(0),!d)return[2];return l.forEach(function(e){var t=e.job,r=e.failed,n=e.error;return t.settlers.forEach(function(e){p?e.reject(p.error):r?e.reject(n):e.resolve()})}),[2]}})})()}return{enqueue:function(o,i){return n=i,new Promise(function(n,l){var c=o.line_item_id,u=void 0===c?void 0:e.find(function(e){return e.payload.line_item_id===c});u?(u.payload=o,u.settlers.push({resolve:n,reject:l})):e.push({payload:o,settlers:[{resolve:n,reject:l}]}),r+=1,i.count(r),t||drain()})},reset:function(){e=[],t=!1,r=0,n=null}}}r.d(t,{O:()=>createQuantitySaveQueue})},35926(e,t,r){"use strict";function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}r.d(t,{A:()=>__rspack_default_export,e:()=>scrollToTop});var scrollToTop=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#vue-cart",t=document.querySelector(e).getBoundingClientRect().top+window.scrollY-20;window.scrollTo({top:t,behavior:"smooth"})};let __rspack_default_export=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!Array.isArray(e)||!Array.isArray(t))return"incorrect function params";
1if(0===t.length)return"zero notifications";if(e.length!==t.length)return scrollToTop(),"not equal notifications";for(var r=0;r<t.length;r+=1){var n=function(r){var n=t[r];if(!e.find(function(e){return JSON.stringify(e)===JSON.stringify(n)}))return scrollToTop(),{v:"different alerts"}}(r);if("object"===_type_of(n))return n.v}return"equal notifications"}},884272(e,t,r){"use strict";r.d(t,{HE:()=>l,QK:()=>o,np:()=>i,sh:()=>c,wm:()=>u});var n=r(802436),o=(0,n.eU)(null),i=(0,n.eU)(!1),l=(0,n.eU)(null),c=(0,n.eU)(null),u=(0,n.eU)(null)},3592(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(299410),o=r(277889),i=r(674785),l=r(727754),c=r(884272);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}let u={namespaced:!0,state:function(){return{channelUuid:c.QK,isUploading:c.np,uploadError:c.HE,deliveryDate:c.sh,uploadResponse:c.wm}},mutations:{setChannelUuid:function(e,t){e.channelUuid=t},setUploadingStatus:function(e,t){e.isUploading=t},setUploadError:function(e,t){e.uploadError=t},setDeliveryDate:function(e,t){e.deliveryDate=t},setUploadResponse:function(e,t){e.uploadResponse=t}},getters:{channelUuid:function(e){return e.channelUuid},isUploading:function(e){return e.isUploading},uploadError:function(e){return e.uploadError},deliveryDate:function(e){return e.deliveryDate},uploadResponse:function(e){return e.uploadResponse},blanksQuantity:function(e,t,r,n){return n.allLineItems.filter(function(e){return"Blanks"===e.businessLine}).reduce(function(e,t){return e+t.quantity},0)},standardTransfersQuantity:function(e,t,r,n){return n.allLineItems.filter(function(e){var t=e.bogoGetEligible,r=e.productStyle;return!0===t||null==t&&"DTF001"===r}).reduce(function(e,t){return e+t.quantity},0)},remainingFreeTransfers:function(e,t){var r=t.bogoMaxFreeQuantity;return Math.max(0,Math.min(null!=r?r:1/0,t.blanksQuantity)-t.standardTransfersQuantity)},isEligibleForBogoPromotion:function(e,t,r){return r.cartState.isEligibleForBogoPromotion},bogoMaxFreeQuantity:function(e,t,r){var n,o;return null!=(n=null==(o=r.cartState)?void 0:o.bogoMaxFreeQuantity)?n:null},isEligibleForBogoTransfers:function(e,t){var r=t.isEligibleForBogoPromotion,n=t.remainingFreeTransfers>0;return r&&n}},actions:{initDtfChannel:function(e,t){return _async_to_generator(function(e,t){var r,i,l,c,u;return _ts_generator(this,function(d){switch(d.label){case 0:r=e.commit,i=t.catalogNumber,d.label=1;case 1:return d.trys.push([1,3,,4]),[4,o.api.dtf.getInitConfig({catalog_number:i})];case 2:return l=d.sent(),c=(0,n.Tm)(l).dtfChannelUuid,r("setChannelUuid",null!=c?c:null),[3,4];case 3:throw console.warn("Failed to initialize DTF channel",u=d.sent()),u;case 4:return[2]}})}).apply(this,arguments)},uploadArtwork:function(e,t){return _async_to_generator(function(e,t){var r,n,o,c,u,d,p,f,_,h,m;return _ts_generator(this,function(g){switch(g.label){case 0:(r=e.commit)("setUploadingStatus",!0),r("setUploadError",null),r("setUploadResponse",null),o=(0,l.pK)(null==(n=t.get("file"))?void 0:n.size),c={pageValue:"cart/buy",businessLine:"Transfers"},g.label=1;case 1:return g.trys.push([1,3,,4]),[4,(0,i.F)(t,c,{raw:!0,headers:{"Content-Type":void 0},useAxiosForRequest:!0,timeout:o})];case 2:return u=g.sent(),r("setUploadingStatus",!1),r("setUploadResponse",u),[3,4];case 3:throw d=g.sent(),r("setUploadingStatus",!1),m="Network Error"===(h=(null==(_=null==(p=(f=d).response)?void 0:p.data)?void 0:_.error)||f.message)?"Upload error":h,r("setUploadError",null!=m?m:null),d;case 4:return[2]}})}).apply(this,arguments)},fetchDeliveryDate:function(e){return _async_to_generator(function(e){var t,r,n,i,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:t=e.commit,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,o.api.product.fetchBusinessDeliveryDates({business_line:"Transfers"})];case 2:return(r=u.sent()).success&&r.composition_ids&&r.composition_ids.length>0?(i=r.composition_ids[0],c=(null==(l=null==(n=r.estimates)?void 0:n[i])?void 0:l.date)||null,t("setDeliveryDate",c)):t("setDeliveryDate",null),[3,4];case 3:return u.sent(),t("setDeliveryDate",null),[3,4];case 4:return[2]}})}).apply(this,arguments)}}}},107932(e,t,r){"use strict";r.d(t,{QY:()=>isSameDayOption,Qu:()=>partialPairRow,UF:()=>asapRow,Vh:()=>claimedRows,W:()=>isUberOption,Yp:()=>blanksOnlyRow,zz:()=>isAsapOption});var n=r(465390);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function isSameDayOption(e){return(null==e?void 0:e.category)==="same_day"||(null==e?void 0:e.category)==="sameDay"}function isAsapOption(e){return(null==e?void 0:e.category)==="asap"}function isUberOption(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(null==e?void 0:e.category)==="fastest"&&(null==e?void 0:e.gofoQuoted)===!0;return!!(isSameDayOption(e)||isAsapOption(e)||r)&&(t||(null==e?void 0:e.jiffyLocal)!=null)}function claimedRows(e,t){return(0,n.S5)(e).map(function(e){var r=t.map(function(t){var r,n=_sliced_to_array(t,2),o=n[0],i=n[1];return{groupId:o,option:(null!=(r=null==i?void 0:i.options)?r:[]).find(function(t){return(null==t?void 0:t.category)===e&&(null==t?void 0:t.coversFullBasket)===!0&&(null==t?void 0:t.disabled)!==!0})}}).filter(function(e){return e.option});return{category:e,groupIds:r.map(function(e){return e.groupId}),halves:r,claimed:!0}}).filter(function(e){return e.halves.length>=2})}function partialPairRow(e){var t=e.map(function(e){var t,r=_sliced_to_array(e,2),n=r[0],o=r[1];return{groupId:n,option:(null!=(t=null==o?void 0:o.options)?t:[]).find(function(e){return isSameDayOption(e)&&(null==e?void 0:e.oneParcel)===!0&&(null==e?void 0:e.coversFullBasket)!==!0&&(null==e?void 0:e.disabled)!==!0})}}).filter(function(e){return e.option});return 2===t.length&&t.some(function(e){return"0"===e.groupId})?{category:"same_day",groupIds:t.map(function(e){return e.groupId}),halves:t,claimed:!1}:null}function asapRow(e){var t,r=e.find(function(e){return"0"===_sliced_to_array(e,1)[0]});if(!r)return null;var n=_sliced_to_array(r,2),o=n[0],i=n[1],l=(null!=(t=null==i?void 0:i.options)?t:[]).find(function(e){return isAsapOption(e)&&(null==e?void 0:e.disabled)!==!0});return l?{category:"asap",groupIds:[o],halves:[{groupId:o,option:l}],claimed:!1}:null}function participatesInLadder(e){var t;return(null!=(t=null==e?void 0:e.options)?t:[]).some(function(e){return isSameDayOption(e)||(null==e?void 0:e.oneParcel)===!0||(null==e?void 0:e.coversFullBasket)===!0})}function blanksOnlyRow(e,t){if(!(null==t?void 0:t.sameDayAvailable))return null;var r,n=e.find(function(e){return"0"===_sliced_to_array(e,1)[0]}),o=e.filter(function(e){return"0"!==_sliced_to_array(e,1)[0]});if(!n||o.some(function(e){return participatesInLadder(_sliced_to_array(e,2)[1])}))return null;var i=_sliced_to_array(n,2),l=i[0],c=i[1],u=(null!=(r=null==c?void 0:c.options)?r:[]).find(function(e){return isSameDayOption(e)&&(null==e?void 0:e.disabled)!==!0&&(null==e?void 0:e.oneParcel)!==!0&&(null==e?void 0:e.coversFullBasket)!==!0});return u?{category:"same_day",groupIds:[l],halves:[{groupId:l,option:u}],claimed:!1}:null}},275857(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ownsLine(e){var t=null==e?void 0:e.jiffyLocalSplit;return!t||!1!==t.owner}function ownedLineItems(e){return Object.fromEntries(Object.entries(null!=e?e:{}).filter(function(e){return ownsLine(_sliced_to_array(e,2)[1])}))}function ownedLineItemGroups(e){return Object.fromEntries(Object.entries(null!=e?e:{}).map(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];return[r,_object_spread_props(_object_spread({},n),{lineItems:ownedLineItems(null==n?void 0:n.lineItems)})]}))}function jiffyLocalGroupIdFor(e,t){var r=Object.entries(null!=e?e:{}).find(function(e){var r,n=_sliced_to_array(e,2)[1],o=null==n||null==(r=n.lineItems)?void 0:r[String(t)];return!!(null==o?void 0:o.jiffyLocalSplit)&&!ownsLine(o)});return r?r[0]:null}r.d(t,{Fp:()=>ownedLineItemGroups,NH:()=>jiffyLocalGroupIdFor,Sk:()=>ownedLineItems,ow:()=>ownsLine})},465390(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function isJointFeeHostGroup(e,t,r){var n=null==r?void 0:e.find(function(e){return String(e)===String(r)});return void 0!==n?String(t)===String(n):"0"===String(t)}function jiffyLocalGroupId(e){var t,r=Object.entries(null!=(t=null==e?void 0:e.orders)?t:{}).find(function(e){var t=_sliced_to_array(e,2)[1];return(null==t?void 0:t.jiffyLocal)===!0});return null==r?void 0:r[0]}function hostsJointSmallOrderFee(e,t,r){var n,o=jiffyLocalGroupId(e);return void 0!==o?String(t)===o:isJointFeeHostGroup(null!=(n=null==e?void 0:e.groupIds)?n:[],t,r)}r.d(t,{Mc:()=>isJointFeeHostGroup,S5:()=>jointLocalCategories,cT:()=>jiffyLocalGroupId,hT:()=>hostsJointSmallOrderFee});var n="coversFullBasket";function jointLocalCategories(e){var t,r=Object.values(null!=(t=null==e?void 0:e.orders)?t:{}).filter(function(e){var t,r;return(null!=(t=null!=(r=e.options)?r:[])?t:[]).some(function(e){return!0===e[n]})});if(r.length<2)return[];var o=r.map(function(e){var t;return new Set((null!=(t=e.options)?t:[]).filter(function(e){return!0===e[n]}).map(function(e){return String(e.category)}))}),i=o[0];return i?_to_consumable_array(i).filter(function(e){return o.every(function(t){return t.has(e)})}):[]}},922867(e,t,r){"use strict";r.d(t,{Ul:()=>i,Wv:()=>l,jk:()=>o,oz:()=>c});var n=r(802436),o=(0,n.eU)({}),i=(0,n.eU)(""),l=(0,n.eU)(null),c=(0,n.eU)(!1)},48979(e,t,r){"use strict";r.d(t,{A:()=>w,T:()=>jiffyCreditApplied});var n=r(277889),o=r(433769),i=r(667702),l=r(385746),c=r(137105),u=r(147141),d=r(865169),p=r(586519),f=r(558236),_=r(46519),h=r(299410),m=r(425196),g=r(369303),b=r(723341),y=r(982242),v=r(922867);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var jiffyCreditApplied=function(e){var t;return Number(null!=(t=e.jiffyCreditAppliedCents)?t:0)/100};let w={namespaced:!0,state:function(){return{checkoutButtons:v.jk,lastCompletedOrderPaymentMethodSubtype:v.Ul,mobileAp
1plePayVersion:v.Wv,stripeFinancingSupported:v.oz}},mutations:{init:function(e,t){var r,n,o=(0,h.Tm)(t);e.checkoutButtons=o.checkoutButtons||e.checkoutButtons,e.Quote=o.Quote||e.Quote,e.mobileApplePayVersion=null!=(r=o.mobileApplePayVersion)?r:e.mobileApplePayVersion,e.stripeFinancingSupported=null!=(n=o.stripeFinancingSupported)?n:e.stripeFinancingSupported,e.lastCompletedOrderPaymentMethodSubtype=o.lastCompletedOrderPaymentMethodSubtype||e.lastCompletedOrderPaymentMethodSubtype},setMobileApplePayVersion:function(e,t){e.mobileApplePayVersion=t},setStripeFinancingSupported:function(e,t){e.stripeFinancingSupported=t},setLastCompletedOrderPaymentMethodSubtype:function(e,t){e.lastCompletedOrderPaymentMethodSubtype=t}},actions:{updateAddressAndRecalculate:function(e,t){return _async_to_generator(function(e,t){var r,o,i;return _ts_generator(this,function(l){return r=e.rootGetters,o=e.dispatch,i={address:{zipcode:null==t?void 0:t.postalCode,city:null==t?void 0:t.locality,current:(null==t?void 0:t.current)||!1,country_code:null==t?void 0:t.countryCode,state_code:null==t?void 0:t.administrativeArea},use_store_credits:r.storeCredit.isUsed,use_specific_store_credits:r.useSpecificStoreCredits},[2,n.api.jiffyshirts.orders.updateApplePayAddressAndRecalculate({order_number:r.orderNumber},i).then(function(e){return o("setCartResponse",e,{root:!0}),o("applyTransfersCreditResponse",e,{root:!0}),e}).catch(function(e){throw o("setSystemError",e,{root:!0}),e})]})}).apply(this,arguments)},updatePaypalOrder:function(e,t){var r=e.rootGetters,o=e.dispatch;return n.api.jiffyshirts.orders.updatePaypalSummary({order_number:r.orderNumber},t).then(function(e){return(0,f.v)(null==e?void 0:e.redirect_to)||(o("setCartResponse",e,{root:!0}),o("applyTransfersCreditResponse",e,{root:!0})),e}).catch(function(e){o("setSystemError",e,{root:!0})})},createPaypalOrder:function(e,t){return _async_to_generator(function(e,t){var r,o;return _ts_generator(this,function(i){return r=e.rootGetters,o=e.dispatch,[2,n.api.jiffyshirts.orders.createPaypalOrder({order_number:r.orderNumber},t).then(function(e){return(0,f.v)(null==e?void 0:e.redirect_to)||(o("setCartResponse",e,{root:!0}),o("applyTransfersCreditResponse",e,{root:!0})),e}).catch(function(e){o("setSystemError",e,{root:!0})})]})}).apply(this,arguments)},googleSelectShipping:function(e,t){var r=_to_array([e,t]),o=r[0],i=o.rootGetters,l=o.dispatch,c=_sliced_to_array(r.slice(1),1)[0],u=c.isStale,d=_object_without_properties(c,["isStale"]);return n.api.jiffyshirts.orders.googlePaySummary({order_number:i.orderNumber},d).then(function(e){return"function"==typeof u&&u()||(l("setCartResponse",e,{root:!0}),l("applyTransfersCreditResponse",e,{root:!0})),e}).catch(function(e){"function"==typeof u&&u()||l("setSystemError",e,{root:!0})})},submitApplePayToken:function(e,t){return _async_to_generator(function(e,t){var r,o,i,l,u,p,f,_,h,m,g,y,v,w,j,k,x,S,O;return _ts_generator(this,function(P){switch(P.label){case 0:r=e.dispatch,o=t.nonce,i=t.payment,u=void 0===(l=t.surface)?"cart":l,m=i.shippingContact,g=i.billingContact,y={addressLine:m.addressLines,country:null==(p=m.countryCode)?void 0:p.toUpperCase(),postalCode:m.postalCode,recipient:"".concat(m.givenName," ").concat(m.familyName),region:m.administrativeArea,city:m.locality,phone:m.phoneNumber},v={name:"".concat(g.givenName," ").concat(g.familyName),address_city:g.locality,address_country:null==(f=g.countryCode)?void 0:f.toUpperCase(),address_line1:null==(_=g.addressLines)?void 0:_[0],address_line2:null==(h=g.addressLines)?void 0:h[1],address_state:g.administrativeArea,address_zip:g.postalCode},w={checkout_no_confirmation:!0,shipping:{fullname:"".concat(m.givenName," ").concat(m.familyName)},billing:{fullname:"".concat(g.givenName," ").concat(g.familyName)},order:{ship_address_attributes:{},bill_address_attributes:{}},payment_method_subtype:"apple-pay",payment_token:o,state:"payment",payment_method:"device_pay",payment_type:"device_pay",checkout:!0,"device-pay-token":JSON.stringify({id:o,email:g.emailAddress||m.emailAddress,phone:g.phoneNumber||m.phoneNumber,card:v,shippingAddress:y,type:"card",paymentMethod:"apple-pay"})},P.label=1;case 1:return P.trys.push([1,3,,4]),[4,n.api.jiffyshirts.checkout.submitPayment(w)];case 2:return j=P.sent(),(0,c.L)(),window.location.href=(null==j?void 0:j.redirect_to)||(0,d.Q)(),[3,4];case 3:return k=P.sent(),(null==(O=window.jiffy)||null==(S=O.ui)||null==(x=S.cart)?void 0:x.form)&&(window.jiffy.ui.cart.form.loading=!1),r("setSystemError",k,{root:!0}),"cart"!==u&&(document.body.classList.remove("processing-visible"),(0,b.g)("apple_pay")),[3,4];case 4:return[2]}})}).apply(this,arguments)},stripeCreatePaymentIntent:function(e,t){return _async_to_generator(function(e,t){var r,o,i,l,d,p,f,_,h,m,g;return _ts_generator(this,function(b){switch(b.label){case 0:r=e.dispatch,o=t.stripe,i=t.elements,l=t.paymentMethod,d=t.paymentData,f=void 0===(p=t.surface)?"cart":p,b.label=1;case 1:return b.trys.push([1,4,5,6]),[4,n.api.jiffyshirts.checkout.stripeCreateIntent
1(d)];case 2:if(h=(_=b.sent()).error,m=_.redirect_to)return(0,c.L)(),(0,u.SE)(m),[2];if(h)throw h;return i.update({customerSessionClientSecret:_.client_secret}),[4,r("stripeConfirmPayment",{stripe:o,elements:i,clientSecret:_.client_secret,returnUrl:_.return_url})];case 3:return b.sent(),[3,6];case 4:return g=b.sent(),r("expressCheckoutHandleError",{error:g,paymentMethod:l,surface:f}),[3,6];case 5:return document.body.classList.remove("processing-visible"),[7];case 6:return[2]}})}).apply(this,arguments)},stripeConfirmPayment:function(e,t){return _async_to_generator(function(e,t){var r,n,o,i,l;return _ts_generator(this,function(e){switch(e.label){case 0:return r=t.stripe,n=t.elements,o=t.clientSecret,i=t.returnUrl,(0,c.L)(),[4,r.confirmPayment({elements:n,clientSecret:o,confirmParams:{return_url:i},redirect:"always"})];case 1:if((l=e.sent()).error)throw l.error;return[2,l]}})}).apply(this,arguments)},expressCheckoutHandleError:function(e,t){var r,n,o,l=e.dispatch,c=e.rootGetters,d=t.error,p=t.paymentMethod,f=t.redirectUrl,_=void 0===f?null:f,h=t.surface,m=void 0===h?"cart":h;if(l("logCheckoutData",{data:d,kind:"".concat(p,".checkout_error")}),(null==(o=window.jiffy)||null==(n=o.ui)||null==(r=n.cart)?void 0:r.form)&&(window.jiffy.ui.cart.form.loading=!1),document.body.classList.remove("processing-visible"),l("resetDeliveryAddress"),l("raiseErrorTracking",{error:d,paymentMethod:p}),"link"===p){var g=(0,i.dL)();(0,i._k)("link_auth_failed","atc_modal"===m?"atc_modal":"cart",_object_spread_props(_object_spread({},(0,i.Lz)()),{extra:{reason:"confirm_failed",time_to_failure_ms:null===g?null:Date.now()-g}})),(0,i.o)()}if(_)return void(0,u.SE)(_);if("cart"!==m)return void(0,b.g)(p);var y=c.isUs?"/cart":"/ca/cart";(0,u.SE)(y)},logCheckoutData:function(e,t){var r,o=t.data,i=t.kind,l={order_number:null==(r=window.jiffy)?void 0:r.orderNumber,data:o,kind:i};try{n.api.jiffyshirts.checkout.log(l)}catch(e){}},resetDeliveryAddress:function(e){var t,r,n,o=e.commit,i=e.dispatch,l=e.rootGetters,c=l.addressSelected,u=l.addresses,d=c||u[0];d?o("changeAddress",{id:d.id},{root:!0}):i("shipping/getAllDeliveryDates",null,{root:!0}),(null==(n=window.jiffy)||null==(r=n.ui)||null==(t=r.cart)?void 0:t.form)&&(window.jiffy.ui.cart.form.loading=!1)},raiseErrorTracking:function(e,t){var r=t.error,n=t.paymentMethod;(0,l.A)(r)||((0,p.notifyError)("".concat(n," Checkout Error"),{params:{error:JSON.stringify(r)}}),(0,o.track)("checkout_error",{log_code:"ce-fe-rcc-x-01-express-payment-failed",error_message:JSON.stringify(r),payment_method:n,which_checkout:(0,_.Q)(n),error_details:r}))},proceedCheckout:function(e){var t=e.commit;setTimeout(function(){t("setCheckoutLoadingStatus",!0,{root:!0}),t("setInventoryLoadingStatus",!0,{root:!0})},0)}},getters:{checkoutButtons:function(e){return e.checkoutButtons},androidGpayButtonEnabled:function(e,t){return t.checkoutButtons.androidGpayButtonEnabled},iosApplePayButtonEnabled:function(e,t){return t.checkoutButtons.iosApplePayButtonEnabled},googlePayButtonEnabled:function(e,t){return t.checkoutButtons.googlePayButtonEnabled},googlePayStripeButtonEnabled:function(e,t){return t.checkoutButtons.googlePayStripeButtonEnabled},applePayStripeButtonEnabled:function(e,t){return t.checkoutButtons.applePayStripeButtonEnabled},googlePayLogo:function(e,t){return t.checkoutButtons.googlePayLogo},affirmButtonEnabled:function(e,t){return t.checkoutButtons.affirmButtonEnabled},afterpayButtonEnabled:function(e,t){return t.checkoutButtons.afterpayButtonEnabled},sezzleButtonEnabled:function(e,t){return t.checkoutButtons.sezzleButtonEnabled},nativePaypalCheckoutEnabled:function(e,t){return t.checkoutButtons.nativePaypalCheckoutEnabled},mobileApplePayVersion:function(e){return e.mobileApplePayVersion},stripeFinancingSupported:function(e){return e.stripeFinancingSupported},lastCompletedOrderPaymentMethodSubtype:function(e){return e.lastCompletedOrderPaymentMethodSubtype||"custom"},standardApplePayPayload:function(e,t,r,n){return n["shipping/standardShippingOptions"].map(function(e){if(!e)return{};var t=(0,y.u)(n.location),r=n.couponCode.freeShipping&&!(0,g.Ve)(e.category)||e.free?e.surcharge||0:e.cost+(e.surcharge||0),o=_to_consumable_array(new Set((0,n["shipping/sortedStandardShippingOptions"])(e).map(function(r){return" - ".concat((0,y.D)((null==r?void 0:r.formattedDeliveryDate)||(null==r?void 0:r.formattedArrivalDate),{dallas:t,option:e,leg:r}))})));return{id:e.id,identifier:e.category,label:e.title||"Shipping",detail:o.length>0?"Estimated Arrival: \n".concat(o.join("\n")):"",amount:r,selected:e.selected}})},mcuApplePayPayload:function(e,t,r,n){var o=!n["shipping/selectedShipments"][0],i=(0,y.u)(n.location);if(o){var l=n["shipping/deliveryDates"];return Object.keys(l).map(function(e){var t,r,o=null!=(t=l[e])?t:[],c=_to_consumable_array(new Set(o.map(function(t){return" - ".concat((0,y.D)(t.formattedDeliveryDate,{dallas:i,option:{category:e},leg:t}))}))),u=n.couponCode,d=n["shipping/mcuShippingCost"],p=u.freeShipping&&!(0,g.Ve)(e)?0:d(e);return{identifier:e,label:n["shipping/shipments"].titles[(0,h.PT)(e)],detail:o.length>0?"Estimated Arrival: \n".concat(c.join("\n")):"",amount:p,selected:e===((null==(r=n["shipping/mcuOnlySelectedOption"])?void 0:r.category)||"fastest")}})}var c=n["shipping/mcuShippingCost"];return t.standardApplePayPayload.map(function(e){return _object_spread_props(_object_spread({},e),{amount:parseFloat(e.amount)+c(e.identifier)})})},applePayPayload:function(e,t,r,n){var o=["email","name","phone","postalAddress"],i=n.countryCode,l=n.currencyCode,c=n.cartTotal,u=n.shippingTotal,d=n.taxTotal,p=n.isMcuCart,f=n.processingFee,_=n.storeCredit,h=_.amount,g=_.isUsed,b=[{label:"Item Total",type:"final",amount:c-u-d-f},{label:"Shipping",type:"final",amount:u},{label:"Tax Total",type:"final",amount:d}],y=c;if(f>0&&(b=_to_consumable_array(b).concat([{label:"Processing Fee",type:"final",amount:f}])),Object.values(n.specificStoreCredits).some(function(e){var t=e.isUsed,r=e.amount;if(t){var n=Math.min(r,y);b=_to_consumable_array(b).concat([{label:"Store Credit",type:"final",amount:-n}]),y-=n}return 0===y}),y>0&&g){var v=Math.min(h,y);b=_to_consumable_array(b).concat([{label:"Store Credit",type:"final",amount:-v}]),y-=v}var w=Math.min(jiffyCreditApplied(n),y);w>0&&(b=_to_consumable_array(b).concat([{label:m.r,type:"final",amount:-w}]),y-=w);var j=b.map(function(e){return{name:e.label,amount:Math.round(100*e.amount)}});return{countryCode:i,currencyCode:l,total:{label:"Total",type:"final",amount:y},lineItems:b,stripeLineItems:j,stripeTotalAmount:Math.round(100*y),requiredBillingContactFields:o,requiredShippingContactFields:o,shippingMethods:p?t.mcuApplePayPayload:t.standardApplePayPayload}},paypalPayload:function(e,t,r,n){var o,i,l,c,u,d,p=n.env,f=n.host,_=n.addressSelected,h=n.orderNumber,m=n.currencyCode,g=n.cartTotal,b=n.cartSummary,y=n.shippingTotal,v=n.taxTotal,w=n.hasCouponApplied,j=n.couponCode,k=n.processingFee,x=n["shipping/surchargeTotal"],S=n.storeCredit,O=S.amount,P=S.isUsed,A=Math.max(y-x,0),C=g,I=parseFloat(b.total),E=0;if(Object.values(n.specificStoreCredits).some(function(e){var t=e.isUsed,r=e.amount;if(t){var n=Math.min(r,C);C-=n,E+=n}return 0===C}),C>0&&P){var N=Math.min(O,C);C-=N,E+=N}var D=Math.min(jiffyCreditApplied(n),C);C-=D,E+=D,w&&!j.freeShipping&&(I+=parseFloat(j.couponDiscount),E+=parseFloat(j.couponDiscount));var T="production"!==p?"".concat(f,"-").concat(new Date().toJSON().slice(0,10),"-").concat(h):h,M={item_total:{value:String(I.toFixed(2)),currency_code:m},tax_total:{value:String(v.toFixed(2)),currency_code:m},discount:{value:String(E.toFixed(2)),currency_code:m},shipping:{value:String(A.toFixed(2)),currency_code:m}},R=x+k;R>0&&(M.handling={value:String(R.toFixed(2)),currency_code:m});var F={invoice_id:T,amount:{value:String(C.toFixed(2)),currency_code:m,breakdown:M}};return _?F.shipping={address:{address_line_1:null!=(o=_.address1)?o:"",address_line_2:null!=(i=_.address2)?i:"",admin_area_2:null!=(l=_.city)?l:"",admin_area_1:null!=(c=_.state)?c:"",postal_code:null!=(u=_.zipcode)?u:"",country_code:null!=(d=_.country)?d:""}}:F.shipping={options:n["shipping/paypalShippingOptions"]},F},stripeLineItems:function(e,t,r,n){return function(e){var t=n.storeCredit,r=t.amount,o=t.isUsed,i=n.couponCode,l=i.freeShipping,c=i.couponDiscount,u=i.freeShippingPromotionType,d=n.cartTotal,p=n.cartBulkDiscount,f=n.cartSummary,_=n.productsSubtotal,b=n.productsMarkedUpTotal,y=n.productMarkedUp,v=n.hasCouponApplied,w=n.taxTotal,j=n.processingFee,k=n["shipping/surchargeTotal"],x=n["shipping/selectedShipments"],S=n["shipping/shippingDiscount"],O=!0===y,P=Number(b),A=[{name:"Product Total",amount:Math.round(100*(O&&!Number.isNaN(P)?P:Number(_)))}];!O&&p>0&&(A=_to_consumable_array(A).concat([{name:"Bulk Discount",amount:Math.round(-(100*p))}]));var C=parseFloat(f.automaticPromotionDiscount||"0");C>0&&(A=_to_consumable_array(A).concat([{name:"Promotion Discount",amount:Math.round(-(100*C))}])),j>0&&(A=_to_consumable_array(A).concat([{name:"Processing Fee",amount:Math.round(100*j)}])),v&&!l&&(A=_to_consumable_array(A).concat([{name:"Discount Coupon",amount:Math.round(-(100*c))}]));var I=Object.values(x).reduce(function(e,t){return e+parseFloat(String((null==t?void 0:t.strikedShipPrice)||0))},0),E=(0,g.nf)(x,{couponSupersedes:l});if(A=_to_consumable_array(A).concat([{name:"Shipping",amount:Math.round(100*I)}]),S>0&&(A=_to_consumable_array(A).concat([{name:"Shipping Discount",amount:Math.round(-(100*S))}])),E>0&&(A=_to_consumable_array(A).concat([{name:"Promotion Shipping Discount",amount:Math.round(-(100*E))}])),v&&l){var N=c;if(e&&"single"===u){var D=Object.values(x).find(function(t){return(0,h.PT)(t.category||"")===e});N=(0,g.Ve)(e)?0:(null==D?void 0:D.strikedShipPrice)||0}A=_to_consumable_array(A).concat([{name:"Discount Coupon",amount:Math.round(-(100*N))}])}k>0&&(A=_to_consumable_array(A).concat([{name:"Fuel Surcharge",amount:Math.round(100*k)}])),w>0&&(A=_to_consumable_array(A).concat([{name:"Tax Total",amount:Math.round(100*w)}]));var T=d;if(Object.values(n.specificStoreCredits).some(function(e){var t=e.isUsed,r=e.amount;if(t){var n=Math.min(parseFloat(String(r)),T);A=_to_consumable_array(A).concat([{name:"Store Credits",amount:Math.round(-(100*n))}]),T-=n}return 0===T}),T>0&&o){var M=Math.min(r,T);A=_to_consumable_array(A).concat([{name:"Store Credits",amount:Math.round(-(100*M))}]),T-=M}var R=Math.min(jiffyCreditApplied(n),T);return R>0&&(A=_to_consumable_array(A).concat([{name:m.r,amount:Math.round(-(100*R))}])),A}},stripeTotal:function(e,t,r,n){var o=n.cartTotal,i=n.storeCredit,l=i.amount,c=i.isUsed;if(Object.values(n.specificStoreCredits).some(function(e){var t=e.isUsed,r=e.amount;if(t){var n=Math.min(parseFloat(String(r)),o);o-=n}return 0===o}),o>0&&c){var u=Math.min(l,o);o-=u}return{amount:Math.round(100*(o-=Math.min(jiffyCreditApplied(n),o))),currency:n.currencyCode.toLowerCase()}}
1,mcuStripePayload:function(e,t,r,n){var o=n.couponCode,i=n["shipping/selectedShipments"],l=n["shipping/deliveryDates"],c=n["shipping/shipments"],u=o.freeShipping,d=!i[0],p=(0,y.u)(n.location);if(d){var f=n["shipping/mcuShippingCost"];return Object.keys(l).map(function(e){var t,r,o=null!=(t=l[e])?t:[],i=_to_consumable_array(new Set(o.map(function(t){return(0,y.D)(t.formattedDeliveryDate,{dallas:p,option:{category:e},leg:t})}))),d=_to_consumable_array(new Set([i[0],i[i.length-1]])),_=u&&!(0,g.Ve)(e)?0:f(e);return{identifier:(0,h.PT)(e),label:c.titles[(0,h.PT)(e)]||"Shipping",detail:o.length>0?"Estimated Arrival: \n".concat(d.join(" - ")):"",amount:_,surcharge:0,selected:e===((null==(r=n["shipping/mcuOnlySelectedOption"])?void 0:r.category)||"fastest"),deliveryEstimate:o.length>0?"Estimated Arrival: \n".concat(d.join(" - ")):""}})}var _=n["shipping/mcuShippingCost"];return t.standardStripePayload.map(function(e){return _object_spread_props(_object_spread({},e),{amount:parseFloat(e.amount)+_(e.identifier)})})},standardStripePayload:function(e,t,r,n){var o=n.couponCode,i=n["shipping/standardShippingOptions"],l=o.freeShipping,c=(0,y.u)(n.location);return i.map(function(e){if(!e)return{};var t=l&&!(0,g.Ve)(e.category)||e.free?e.surcharge||0:e.cost+(e.surcharge||0),r=_to_consumable_array(new Set((0,n["shipping/sortedStandardShippingOptions"])(e).map(function(t){return" - ".concat((0,y.D)((null==t?void 0:t.formattedDeliveryDate)||(null==t?void 0:t.formattedArrivalDate),{dallas:c,option:e,leg:t}))})));return{identifier:(0,h.PT)(e.category),label:e.title||"Shipping",amount:t,cost:e.cost,surcharge:e.surcharge||0,selected:e.selected,deliveryEstimate:r.length>0?"Estimated Arrival: ".concat(r.join(" - ")):""}})}}}},255399(e,t,r){"use strict";r.d(t,{Dx:()=>l,F4:()=>c,GA:()=>A,PK:()=>_,TR:()=>f,UX:()=>d,Uo:()=>x,V5:()=>j,WP:()=>k,Yy:()=>i,aC:()=>P,ax:()=>u,cS:()=>y,cu:()=>w,gc:()=>h,kQ:()=>S,lT:()=>g,pd:()=>O,qc:()=>p,rg:()=>m,tK:()=>b,uT:()=>v});var n=r(802436),o=r(404903),i=(0,n.eU)(null),l=(0,n.eU)(null),c=(0,n.eU)([]),u=(0,n.eU)(null),d=(0,n.eU)(null),p=(0,n.eU)(!1),f=(0,n.eU)(!1),_=(0,n.eU)(!1),h=(0,n.eU)(!1),m=(0,n.eU)(!1),g=(0,n.eU)(!1),b=(0,n.eU)(!1),y=(0,n.eU)(!1),v=(0,n.eU)(!1),w=(0,n.eU)(!1),j=(0,n.eU)(""),k=(0,n.eU)(!1),x=(0,n.eU)(!1),S=(0,n.eU)(!1),O=(0,n.eU)(o.gK("__JIFFY__VUE__MULTI_CARTS_DATE_TOOLTIP__")),P=(0,n.eU)(null),A=(0,n.eU)(null)},916743(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(277889),o=r(137105),i=r(299410),l=r(375138),c=r(404903),u=r(797466),d=r(864188),p=r(255399),f=r(35926);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}let _={namespaced:!0,state:function(){return{active:p.Yy,cartName:p.Dx,carts:p.F4,defaultCartName:p.ax,error:p.UX,hidden:p.qc,isAttaching:p.TR,isCreating:p.PK,isCustomerChoosing:p.gc,isCustomerCreating:p.rg,isDetaching:p.lT,isLoaded:p.tK,isLoading:p.cS,isSwitching:p.uT,isUpdating:p.cu,notes:p.V5,showAnnouncement:p.WP,showDateAnnouncement:p.Uo,showDateTooltip:p.kQ,showDateTooltipOnce:p.pd,updatedAt:p.aC,customer:p.GA}},mutations:{init:function(e,t){var r=t.cartConfig||t.cart_config||{},n=r.cartName||r.cart_name,o=r.notes,i=r.defaultCartName||r.default_cart_name,l=r.updatedAt||r.updated_at;void 0!==n&&(e.cartName=n),void 0!==o&&(e.notes=o),void 0!==i&&(e.defaultCartName=i),void 0!==l&&(e.updatedAt=l)},setSavedCartsLoading:function(e,t){e.isLoading=t},setSavedCartsUpdating:function(e,t){e.isUpdating=t},setSavedCartsSwitching:function(e,t){e.isSwitching=t},setSavedCartsCreating:function(e,t){e.isCreating=t},setSavedCartsError:function(e,t){e.error=t},setSavedCarts:function(e,t){var r=t.carts,n=t.active;e.carts=r,e.isLoaded=!0,n&&(e.active=n)},setSavedCartsUpdatedAt:function(e,t){e.updatedAt=t},setSavedCartsAnnouncement:function(e,t){e.showAnnouncement=t},setSavedCartsDateAnnouncement:function(e,t){e.showDateAnnouncement=t},setSavedCartsDateTooltip:function(e,t){e.showDateTooltip=t},setSavedCartsDateTooltipOnce:function(e){e.showDateTooltipOnce=!1},setSavedCartsName:function(e,t){e.cartName=t},setSavedCartsNotes:function(e,t){e.notes=t},setSavedCartsCustomerAttaching:function(e,t){e.isAttaching=t},setSavedCartsCustomer:function(e,t){e.customer=t},setSavedCartsCustomerDetaching:function(e,t){e.isDetaching=t},setSavedCartsCustomerCreating:function(e,t){e.isCustomerCreating=t},setSavedCartsCustomerChoosing:function(e,t){e.isCustomerChoosing=t}},actions:{loadSavedCarts:function(e){return _async_to_generator(function(e){var t,r,o,i,l,c,u,p;return _ts_generator(this,function(f){switch(f.label){case 0:if(t=e.commit,(r=e.state).isLoaded&&r.carts.length>0)return[2];f.label=1;case 1:return f.trys.push([1,3,4,5]),t("setSavedCartsLoading",!0),[4,Promise.all([n.api.jiffyshirts.savedCart.list(),n.api.jiffyshirts.savedCart.current()])];case 2:return l=(i=_sliced_to_array.apply(void 0,[f.sent(),2]))[0].carts,c=i[1],t("setSavedCarts",{carts:l,active:c}),t("setSavedCartsName",null!=(o=null==c?void 0:c.cart_name)?o:null),d.EventBus.publish(d.Events.SAVED_CARTS_LOADED,null,{carts:l,activeCart:c}),[3,5];case 3:return p=_instanceof(u=f.sent(),Error)?u.message:String(u),t("setSavedCartsError",p),[3,5];case 4:return t("setSavedCartsLoading",!1),[7];case 5:return[2]}})}).apply(this,arguments)},handleCartUpdate:function(e,t){return _async_to_generator(function(e,t){var r,o,i,l,c,u,d,p,f,_;return _ts_generator(this,function(h){switch(h.label){case 0:r=e.commit,o=e.getters,h.label=1;case 1:return h.trys.push([1,4,5,6]),r("setSavedCartsError",null),r("setSavedCartsUpdating",!0),u=t.
1number||(null==(l=o.savedCartsActive)?void 0:l.number),[4,n.api.jiffyshirts.savedCart.update({id:u},{saved_carts:t})];case 2:return h.sent(),r("setSavedCartsUpdatedAt",new Date().toString()),[4,n.api.jiffyshirts.savedCart.list()];case 3:return d=h.sent().carts,r("setSavedCarts",{carts:d}),r("setSavedCartsName",null!=(i=null==d||null==(c=d[0])?void 0:c.cart_name)?i:null),r("setSavedCartsUpdating",!1),[3,6];case 4:return p=h.sent(),f=["NetworkError when attempting to fetch resource."],_=_instanceof(p,Error)?p.message:String(p),f.includes(_)||r("setSavedCartsError",_),[3,6];case 5:return r("setSavedCartsUpdating",!1),[7];case 6:return[2]}})}).apply(this,arguments)},handleCartChange:function(e,t){return _async_to_generator(function(e,t){var r,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:r=e.commit,l.label=1;case 1:return l.trys.push([1,3,,4]),r("setSavedCartsError",null),r("setSavedCartsSwitching",!0),[4,n.api.jiffyshirts.savedCart.switch({id:t.number})];case 2:return l.sent(),window.location.reload(),[3,4];case 3:return i=_instanceof(o=l.sent(),Error)?o.message:String(o),r("setSavedCartsError",i),r("setSavedCartsSwitching",!1),[3,4];case 4:return[2]}})}).apply(this,arguments)},handleCartCreate:function(e,t){return _async_to_generator(function(e,t){var r,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:r=e.commit,l.label=1;case 1:return l.trys.push([1,3,4,5]),r("setSavedCartsError",null),r("setSavedCartsCreating",!0),[4,n.api.jiffyshirts.savedCart.create({saved_carts:t})];case 2:return l.sent(),window.location.reload(),[3,5];case 3:return i=_instanceof(o=l.sent(),Error)?o.message:String(o),r("setSavedCartsError",i),[3,5];case 4:return r("setSavedCartsCreating",!1),[7];case 5:return[2]}})}).apply(this,arguments)},hideSavedCartsAnnouncement:function(e){(0,e.commit)("setSavedCartsAnnouncement",!1),c.L$("__JIFFY__VUE__MULTI_CARTS_ANNOUNCEMENT__")},hideSavedCartsDateAnnouncement:function(e){(0,e.commit)("setSavedCartsDateAnnouncement",!1),c.L$("__JIFFY__VUE__MULTI_CARTS_DATE_ANNOUNCEMENT__")},toggleSavedCartsDateTooltip:function(e,t){var r=e.commit;r("setSavedCartsDateTooltip",t),t||(r("setSavedCartsDateTooltipOnce"),c.L$("__JIFFY__VUE__MULTI_CARTS_DATE_TOOLTIP__"))},updateSavedCartsName:function(e,t){(0,e.commit)("setSavedCartsName",t),(0,l.a9)(t)},attachCartCustomer:function(e,t){return _async_to_generator(function(e,t){var r,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:r=e.commit,o=e.rootGetters,c.label=1;case 1:return c.trys.push([1,3,4,5]),r("setSavedCartsError",null),r("setSavedCartsCustomerAttaching",!0),[4,n.api.consumers.attachToOrder({orderId:o.orderNumber},{consumer_guid:t.guid})];case 2:return c.sent(),r("setSavedCartsCustomer",t),[3,5];case 3:return l=_instanceof(i=c.sent(),Error)?i.message:String(i),r("setSavedCartsError",l),[3,5];case 4:return r("setSavedCartsCustomerAttaching",!1),[7];case 5:return[2]}})}).apply(this,arguments)},detachCartCustomer:function(e){return _async_to_generator(function(e){var t,r,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:t=e.commit,r=e.rootGetters,l.label=1;case 1:return l.trys.push([1,3,4,5]),t("setSavedCartsError",null),t("setSavedCartsCustomerDetaching",!0),[4,n.api.consumers.detachFromOrder({orderId:r.orderNumber})];case 2:return l.sent(),t("setSavedCartsCustomer",null),[3,5];case 3:return i=_instanceof(o=l.sent(),Error)?o.message:String(o),t("setSavedCartsError",i),[3,5];case 4:return t("setSavedCartsCustomerDetaching",!1),[7];case 5:return[2]}})}).apply(this,arguments)},createCartCustomer:function(e,t){return _async_to_generator(function(e,t){var r,o,l,c,u,d;return _ts_generator(this,function(p){switch(p.label){case 0:r=e.commit,o=e.rootGetters,p.label=1;case 1:return p.trys.push([1,3,,4]),r("setSavedCartsCustomerCreating",!0),[4,n.api.consumers.create({consumer:t,order_number:o.orderNumber})];case 2:return c=(l=p.sent()).consumer,u=l.errors,r("setSavedCartsCustomerCreating",!1),c&&r("setSavedCartsCustomer",(0,i.Tm)(c)),[2,{consumer:c,errors:u}];case 3:throw d=p.sent(),r("setSavedCartsCustomerCreating",!1),d;case 4:return[2]}})}).apply(this,arguments)},checkCurrentCartActive:function(e){return _async_to_generator(function(e){var t,r,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:return t=e.commit,r=e.state,[4,n.api.jiffyshirts.savedCart.current()];case 1:if(i=c.sent(),null===(l=r.active))return[2];if((null==i?void 0:i.number)!==l.number){if((0,o.d)())return[2];(0,f.e)(),t("setSavedCartsError",null),t("setSavedCartsSwitching",!0),t("pushNotification",{type:"warning",text:"Your cart has been changed. Updating your cart..."},{root:!0}),window.location.reload()}return[2]}})}).apply(this,arguments)},updateFromEventBus:function(e,t){var r,n,o=e.commit;t&&t.carts&&t.activeCart&&(o("setSavedCarts",{carts:t.carts,active:t.activeCart}),o("setSavedCartsName",null!=(r=null==(n=t.activeCart)?void 0:n.cart_name)?r:null))}},getters:{savedCartsError:function(e){return e.error},savedCartsLoading:function(e){return e.isLoading},savedCartsUpdating:function(e){return e.isUpdating},savedCartsSwitching:function(e){return e.isSwitching},savedCartsCreating:function(e){return e.isCreating},savedCartsList:function(e){return e.carts},savedCartsActive:function(e){return e.active},savedCartsHidden:function(e){return e.hidden},savedCartsLoaded:function(e){return e.isLoaded},savedCartsShowAnnouncement:function(e){return e.showAnnouncement},savedCartsShowDateAnnouncement:function(e){return e.showDateAnnouncement},savedCartsShowDateTooltip:function(e){return e.showDateTooltip},savedCartsShowDateTooltipOnce:function(e){return e.showDateTooltipOnce},savedCartsUpdatedAt:function(e){return e.updatedAt},savedCartsName:function(e){return e.cartName},savedCartsNotes:function(e){return e.notes},currentSavedCart:function(e){return{cart_name:e.cartName,notes:e.notes,customer_purchase_order_number:""}},defaultCartName:function(e){return e.defaultCartName},isDefaultCartName:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.savedCartsName;return RegExp("^".concat(t.defaultCartName,"(\\s#\\d+){0,1}$"),"g").test(e)}},savedCartsCustomer:function(e){var t=e.customer;return t&&(0,u.Gv)(t)&&Object.keys(t).length?t:null},savedCartsIsCustomerAttaching:function(e){return e.isAttaching},savedCartsIsCustomerDetaching:function(e){return e.isDetaching},savedCartsIsCustomerCreating:function(e){return e.isCustomerCreating},savedCartsIsCustomerChoosing:function(e){return e.isCustomerChoosing}}}},508690(e,t,r){"use strict";r.d(t,{AO:()=>c,Az:()=>d,E_:()=>f,H$:()=>b,IP:()=>v,K6:()=>o,M1:()=>
1_,QJ:()=>u,TD:()=>h,ZZ:()=>w,cK:()=>g,d7:()=>j,f5:()=>m,i_:()=>k,jS:()=>p,oN:()=>l,oP:()=>y,yS:()=>i});var n=r(802436),o=(0,n.eU)(0),i=(0,n.eU)({earliestExpectedDeliveryDate:null,latestExpectedDeliveryDate:null,previousEarliestDate:null,previousLatestDate:null,earliestTimeToGetDate:null,earliestTimeToRenderDate:null,cartTimeToGetDate:null,cartTimeToRenderDate:null}),l=(0,n.eU)({deliveryDates:{mixed:[],mixedFastest:[]},sortedShipments:[],subOrdersDeliveryDates:{},changedDeliveryDates:null,deliveryDatesChanged:!1,assignmentUid:null,isLongWait:!1}),c=(0,n.eU)(!1),u=(0,n.eU)(0),d=(0,n.eU)(0),p=(0,n.eU)({mixed:{deliveryDate:null,isPreOrder:!1,isMultipleDeliveries:!1,isShippingToday:!1},mixedFastest:{deliveryDate:null,isPreOrder:!1,isMultipleDeliveries:!1,isShippingToday:!1}}),f=(0,n.eU)({isSent:!1,earliestTimeToGetDate:null,earliestTimeToRenderDate:null,cartTimeToGetDate:null,cartTimeToRenderDate:null}),_=(0,n.eU)({}),h=(0,n.eU)(null),m=(0,n.eU)({groupIds:[],orders:{},titles:{},totalShipping:{},totalSurcharges:{}}),g=(0,n.eU)({freeShippingOver:null,saleShippingChargeShown:!1,shippingSaleEndDate:null,underShippingPrice:null}),b=(0,n.eU)({}),y=(0,n.eU)(null),v=(0,n.eU)({}),w=(0,n.eU)([]),j=(0,n.eU)(null),k=(0,n.eU)(null)},952062(e,t,r){"use strict";r.d(t,{Ay:()=>w,NS:()=>getCartMutationSeq,PC:()=>bumpCartMutationSeq,sV:()=>getCartSummaryEpoch});var n=r(277889),o=r(433769),i=r(299410),l=r(369303),c=r(263127),u=r(88051),d=r(508690);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var p=null,f=!1,_=!1,h=null,m=0;function bumpCartMutationSeq(){return m+=1}function getCartMutationSeq(){return m}var g=0,b=0,y=0;function bumpCartSummaryEpoch(){return y+=1}function getCartSummaryEpoch(){return y}function splitLineInGroup(e,t,r){var n,o,i=null==e||null==(n=e.orderGroups)?void 0:n.groups,l=null==i?void 0:i[String(t)],c=null==l||null==(o=l.lineItems)?void 0:o[String(r)];return!!(null==c?void 0:c.jiffyLocalSplit)}function legsOfGroup(e,t){return e.filter(function(e){var r;return String(null!=(r=e.shippingRuleId)?r:"0")===String(t)})}function fallbackShippingOption(e){var t,r=e.filter(function(e){return(0,i.PT)(e.category)!==l.Dh});return null!=(t=r[r.length-1])?t:e[e.length-1]}var v={earliestExpectedDeliveryDate:null,latestExpectedDeliveryDate:null,previousEarliestDate:null,previousLatestDate:null,earliestTimeToGetDate:null,earliestTimeToRenderDate:null,cartTimeToGetDate:null,cartTimeToRenderDate:null};let w={namespaced:!0,state:function(){return{changeCartItemStartTime:d.K6,changeDeliveryDateMixpanelData:d.yS,delivery:d.oN,deliveryLoading:d.AO,deliveryLoadingCounter:d.QJ,shippingUpdateInFlightCounter:d.Az,deliveryNotification:d.jS,deliveryUnavailable:d.i_,initialDeliveryDateMixpanelData:d.E_,saleImprovedShippingPriceDetails:d.M1,shipMethodChangeGroupId:d.TD,shipments:d.f5,shippingInfo:d.cK,subOrdersFreeShipping:d.H$,jointShipping:d.oP,shippingTexts:d.IP,assignmentStuckTimers:d.ZZ,assignmentTrackingStartTime:d.d7}},mutations:{init:function(e,t){t.summary&&bumpCartSummaryEpoch();var r,n,o=(0,i.Tm)(t);e.delivery=o.delivery||e.delivery,e.deliveryNotification=o.deliveryNotification||e.deliveryNotification,e.saleImprovedShippingPriceDetails=o.saleImprovedShippingPriceDetails||e.saleImprovedShippingPriceDetails,e.shipments=o.shipments||e.shipments,e.shippingInfo=o.shippingInfo||e.shippingInfo,e.shippingTexts=(null==(n=o.cartConfig)?void 0:n.shippingTexts)||e.shippingTexts,e.subOrdersFreeShipping=o.subOrdersFreeShipping||e.subOrdersFreeShipping,e.jointShipping=t.summary||"joint_shipping"in t?null!=(r=o.jointShipping)?r:null:o.jointShipping||e.jointShipping,e.deliveryUnavailable=null},setDeliveryLoadingStatus:function(e,t){t?e.deliveryLoadingCounter+=1:e.deliveryLoadingCounter=Math.max(0,e.deliveryLoadingCounter-1)},setShippingUpdateInFlight:function(e,t){t?e.shippingUpdateInFlightCounter+=1:e.shippingUpdateInFlightCounter=Math.max(0,e.shippingUpdateInFlightCounter-1)},setSelectedShipmentOption:function(e,t){var r,n=t.category,o=t.groupId;if(e.shipments&&e.shipments.orders&&e.shipments.orders[o]){var l=e.shipments.orders[o];if(l.options=l.options.map(function(e){return e.category===n||(0,i.PT)(e.category)===n?(r=e,e.selected=!0):e.selected=!1,e}),!r){var c=fallbackShippingOption(l.options);c&&(c.selected=!0)}}},setShipMethodChangeGroupId:function(e,t){e.shipMethodChangeGroupId=t.groupId},setInitialDeliveryDateMixpanelData:function(e,t){e.initialDeliveryDateMixpanelData=_object_spread({},e.initialDeliveryDateMixpanelData,t)},setChangeDeliveryDateMixpanelData:function(e,t){e.changeDeliveryDateMixpanelData=_object_spread({},e.changeDeliveryDateMixpanelData,t)},setChangeCartItemStartTime:function(e,t){var r;e.changeCartItemStartTime=void 0===t?(null==(r=performance)?void 0:r.now())||0:t},setAssignmentStuckTimers:function(e,t){e.assignmentStuckTimers=t},setAssignmentTrackingStartTime:function(e,t){e.assignmentTrackingStartTime=t},setDeliveryUnavailable:function(e,t){e.deliveryUnavailable=t}},actions:{getAllDeliveryDates:function(e,t){var r,o,i=e.commit,l=e.dispatch;if(l("prepareToAjax",null,{root:!0}),l("startAssignmentStuckTracking"),p&&(null==t?void 0:t.cutoffElapsed)){var c=p;return i("setDeliveryLoadingStatus",!1),c.catch(function(){}).then(function(){return l("getAllDeliveryDates",t)})}if(p)return(null==t?void 0:t.getAddressChangeSeq)&&!f&&(_=!0,h=t),i("setDeliveryLoadingStatus",!1),p;var u=null==t||null==(r=t.getAddressChangeSeq)?void 0:r.call(t);f=void 0!==u,_=!1,h=null;var d=new Date().getTime(),m=(null==(o=performance)?void 0:o.now())||0,g=((null==t?void 0:t.cutoffElapsed)?n.api.vueCart.deliveryCutoffElapsed:n.api.vueCart.delivery)({cb:d}).then(function(e){var r,n,o,c,d=void 0===u&&_;if(void 0!==u&&(null==t||null==(r=t.getAddressChangeSeq)?void 0:r.call(t))!==u||d){i("setCouponLoadingStatus",!1,{root:!0}),i("setDeliveryLoadingStatus",!1),l("stopAssignmentStuckTracking"),p=null;var f=d?h:t,waitForAddressChangeQueueSettled=function(e){var t=e();return t.then(function(){return e()===t?void 0:waitForAddressChangeQueueSettled(e)})},g=null==f?void 0:f.getAddressChangeSettled;return g?waitForAddressChangeQueueSettled(g).then(function(){return l("getAllDeliveryDates",f)}):l("getAllDeliveryDates",f)}var b=((null==(n=performance)?void 0:n.now())||0)-m;return(i("setInitialDeliveryDateMixpanelData",{earliestTimeToGetDate:b,cartTimeToGetDate:b}),i("setAssignmentDuration",b,{root:!0}),i("setChangeDeliveryDateMixpanelData",{earliestTimeToGetDate:b,cartTimeToGetDate:b}),(null==e?void 0:e.status)==="unavailable")?(i("setDeliveryUnavailable",{reason:null!=(o=e.reason)?o:"unknown",suggestedZip:null!=(c=e.suggested_zip)?c:null}),i("setCouponLoadingStatus",!1,{root:!0}),i("setDeliveryLoadingStatus",!1),i("setTransfersCreditQuote",null,{root:!0})):(i("setDeliveryUnavailable",null),l("setCartResponse",e,{root:!0}),l("applyTransfersCreditResponse",e,{root:!0}),l("trackDeliveryOptionsLoaded",e)),l("stopAssignmentStuckTracking"),e}).catch(function(e){throw l("stopAssignmentStuckTracking"),e}).finally(function(){i("setDeliveryLoadingStatus",!1),p===g&&(p=null)});return p=g,g},getInitialDeliveryDates:function(e){var t,r,n,o,i,l,c,u,d,p,f,_=e.commit,h=e.dispatch,g=e.state;h("prepareToAjax",null,{root:!0}),h("startAssignmentStuckTracking");var b=(null==(n=window)||null==(r=n.jiffy)||null==(t=r.timers)?void 0:t.cartRenderStartTime)||(null==(o=performance)?void 0:o.now())||0,y=!!(null==(c=window)||null==(l=c.jiffy)||null==(i=l.cart)?void 0:i.initialDeliveryDatesPromise),fallback=function(){return h("getAllDeliveryDates")},v=(null==(f=window)||null==(p=f.jiffy)||null==(d=p.cart)||null==(u=d.initialDeliveryDatesPromise)?void 0:u.catch(function(){return fallback()}))||fallback(),w=g.assignmentStuckTimers,j=m;return v.then(function(e){if(j!==m){g.assignmentStuckTimers===w&&h("stopAssignmentStuckTracking"),_("setCouponLoadingStatus",!1,{root:!0}),_("setDeliveryLoadingStatus",!1);return}var t,r,n,o=((null==(t=performance)?void 0:t.now())||0)-b;if(_("setInitialDeliveryDateMixpanelData",{earliestTimeToGetDate:o,cartTimeToGetDate:o}),_("setAssignmentDuration",o,{root:!0}),(null==e?void 0:e.status)==="unavailable"){_("setDeliveryUnavailable",{reason:null!=(r=e.reason)?r:"unknown",suggestedZip:null!=(n=e.suggested_zip)?n:null}),_("setCouponLoadingStatus",!1,{root:!0}),_("setDeliveryLoadingStatus",!1),_("setTransfersCreditQuote",null,{root:!0}),h("stopAssignmentStuckTracking");return}_("setDeliveryUnavailable",null),h("setCartResponse",e,{root:!0}),h("applyTransfersCreditResponse",e,{root:!0}),y&&h("trackDeliveryOptionsLoaded",e),h("stopAssignmentStuckTracking")}).catch(function(e){throw _("setCouponLoadingStatus",!1,{root:!0}),_("setDeliveryLoadingStatus",!1),h("stopAssignmentStuckTracking"),e})},changeShippingOptions:function(e,t){var r=e.commit,n=e.dispatch,o=e.getters.shipments;o&&o.groupIds&&(o.groupIds.map(function(e){return r("setSelectedShipmentOption",{category:t,groupId:e})}),n("persistSelectedShipments"))},changeShippingOptionsForGroups:function(e,t){var r=e.commit,n=e.dispatch,o=t.category;t.groupIds.forEach(function(e){return r("setSelectedShipmentOption",{category:o,groupId:e})}),n("persistSelectedShipments")},changeShippingOption:function(e,t){var r=e.commit,n=e.dispatch,o=e.getters,i=e.rootGetters,c=t.category,u=t.groupId;r("setSelectedShipmentOption",{category:c,groupId:u}),r("setShipMethodChangeGroupId",{groupId:u});var d=g+=1,p=n("persistSelectedShipments",{skipLoadingUpdate:!0,changedGroupId:u}),f=l.QO.has(c),_=o.shipments,h=1===(_&&_.groupIds?_.groupIds:[]).filter(function(e){return"285"!==e}).length,m=i.couponCode,b=null==m?void 0:m.freeShipping,y=(null==m?void 0:m.freeShippingPromotionType)===l.CY;f&&h&&b&&!y&&(null==p||p.finally(function(){d===g&&n("removeCoupon","coupon_not_eligible_for_selected_shipping",{root:!0})}
1))},persistSelectedShipments:function(e){var t=e.commit,r=e.dispatch,o=e.getters,i=e.rootGetters,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=o.selectedShipments;if(!c||0===Object.keys(c).length)return Promise.resolve();var d=l.retriesLeft,p=void 0===d?1:d,f=l.isRetryAttempt,_=void 0!==f&&f,h=l.changedGroupId,g=_object_without_properties(l,["retriesLeft","isRetryAttempt","changedGroupId"]),v=b+=1,w=y,j=_object_spread({delivery_option_ids:Object.values(c).map(function(e){return e.id}),delivery_option_uids:Object.values(c).reduce(function(e,t){var r=t.quoteUid;return r&&(e[String(t.id)]=r),e},{})},void 0!==h&&{changed_group_id:h},(0,u.WK)()&&{cart_page:u.Ln});t("setShippingUpdateInFlight",!0);var k=bumpCartMutationSeq();return n.api.jiffyshirts.orders.setShippingSpeed({order_number:i.orderNumber},j).then(function(e){if(k!==m)return v===b&&p>0?r("persistSelectedShipments",_object_spread_props(_object_spread({},g),{changedGroupId:h,retriesLeft:p-1,isRetryAttempt:!0})):void 0;if(!_||y===w){if(null==e)return r("getAllDeliveryDates");var t=r("setCartResponse",_object_spread({},e,g),{root:!0});return r("applyTransfersCreditResponse",e,{root:!0}),t}}).catch(function(e){return v!==b?r("setSystemError",e,{root:!0}):r("getAllDeliveryDates").catch(function(){}).then(function(){return r("setSystemError",e,{root:!0})})}).finally(function(){t("setShippingUpdateInFlight",!1)})},sendDeliveryDateMixpanelData:function(e){var t=e.rootState.shipping.initialDeliveryDateMixpanelData||{},r=t.isSent,n=_object_without_properties(t,["isSent"]);void 0!==r&&r||Object.values(n).every(function(e){return null!==e})},sendChangeDeliveryDateMixpanelData:function(e){var t=e.commit,r=e.getters,n=r.changeDeliveryDateMixpanelData||{},i=Object.values(n).every(function(e){return null!==e});r.deliveryDatesChanged&&i&&((0,o.track)("delivery_dates_changed",n),t("setChangeDeliveryDateMixpanelData",v),t("setChangeCartItemStartTime",0))},trackDeliveryOptionsLoaded:function(e,t){(0,c.A)(t)},startAssignmentStuckTracking:function(e){var t=e.commit,r=e.state,n=e.dispatch;r.assignmentStuckTimers.forEach(function(e){return clearTimeout(e)});var i=Date.now();t("setAssignmentStuckTimers",[60,90,120,180,240,300].map(function(e){return setTimeout(function(){(0,o.track)("cart_assignment_stuck",{wait_time:e})},1e3*e)})),t("setAssignmentTrackingStartTime",i);var handleBeforeUnload=function(){n("stopAssignmentStuckTracking")};window.assignmentStuckCleanup&&window.removeEventListener("beforeunload",window.assignmentStuckCleanup),window.addEventListener("beforeunload",handleBeforeUnload),window.assignmentStuckCleanup=handleBeforeUnload},stopAssignmentStuckTracking:function(e){var t=e.commit;e.state.assignmentStuckTimers.forEach(function(e){return clearTimeout(e)}),t("setAssignmentStuckTimers",[]),t("setAssignmentTrackingStartTime",null),window.assignmentStuckCleanup&&(window.removeEventListener("beforeunload",window.assignmentStuckCleanup),window.assignmentStuckCleanup=null)}},getters:{changeCartItemStartTime:function(e){return e.changeCartItemStartTime},deliveryUnavailable:function(e){return e.deliveryUnavailable},changeDeliveryDateMixpanelData:function(e,t,r){var n,o,l,c=e.changeDeliveryDateMixpanelData||{},u=c.earliestTimeToGetDate,d=void 0===u?null:u,p=c.earliestTimeToRenderDate,f=void 0===p?null:p,_=c.cartTimeToGetDate,h=void 0===_?null:_,m=c.cartTimeToRenderDate,g=void 0===m?null:m;return _object_spread_props(_object_spread({},(0,i.p8)(c)),{page:r.isMcuCart?"mcu-cart":"cart",earliest_time_to_get_date:null!==d?Math.floor(d):null,earliest_time_to_render_date:null!==f?Math.floor(f):null,cart_time_to_get_date:null!==h?Math.floor(h):null,cart_time_to_render_date:null!==g?Math.floor(g):null,zipcode:r.guestZipcode||(null==(n=r.addressSelected)?void 0:n.zipcode),reason:t.isLongWait?"long_waiting":"cart_update",version:1,shipments:(null==(l=e.shipments)||null==(o=l.groupIds)?void 0:o.length)||0})},deliveryDates:function(e){return e.delivery.deliveryDates},deliveryDatesMixed:function(e){return e.delivery.deliveryDates.mixed},deliveryDatesMixedFastest:function(e){return e.delivery.deliveryDates.mixedFastest},deliveryLoading:function(e){return e.deliveryLoadingCounter>0},shippingUpdateInFlight:function(e){return e.shippingUpdateInFlightCounter>0},initialDeliveryDateMixpanelData:function(e){return e.initialDeliveryDateMixpanelData},shipments:function(e){return e.shipments},shippingResolved:function(e,t){var r,n;return!!(null==(n=e.shipments)||null==(r=n.groupIds)?void 0:r.length)&&!t.invali
1dDeliveryState},totalPending:function(e,t){return!!(t.shippingUpdateInFlight||t.deliveryLoading)},selectedShipments:function(e){return e.shipments&&e.shipments.orders?Object.fromEntries(Object.values(e.shipments.orders).map(function(e){return[e.id,e.options.find(function(e){return e.selected})]}).filter(function(e){return void 0!==e[1]})):{}},shipMethodChangeGroupId:function(e){return e.shipMethodChangeGroupId},shippingInfo:function(e){return e.shippingInfo},shippingTexts:function(e){return e.shippingTexts},deliveryNotificationObject:function(e){return e.deliveryNotification},sortedShipments:function(e){return e.delivery.sortedShipments},pegasusShipping:function(e){return function(t){return e.subOrdersFreeShipping[t]}},jointShipping:function(e){return e.jointShipping},only59FreeShippingThresholds:function(e){return!Object.values(e.subOrdersFreeShipping).find(function(e){return 59!==e.freeShippingThresholdValue})},only199FreeShippingThresholds:function(e){return!Object.values(e.subOrdersFreeShipping).find(function(e){return 199!==e.freeShippingThresholdValue})},lineItemDeliveryDates:function(e,t,r,n){return function(r,o){var l=t.selectedShipments,datesUnder=function(t){if(!t)return null;var l,c,u,d=(0,i.PT)(t.category),p=null!=(l=null==(u=e.delivery.subOrdersDeliveryDates)||null==(c=u[d])?void 0:c[o])?l:null;return p&&splitLineInGroup(n,r,o)?_object_spread_props(_object_spread({},p),{dates:legsOfGroup(p.dates,r)}):p},c=datesUnder(l[r]);if(c)return c;var u=!0,d=!1,p=void 0;try{for(var f,_=Object.values(l)[Symbol.iterator]();!(u=(f=_.next()).done);u=!0){var h=f.value,m=datesUnder(h);if(m)return m}}catch(e){d=!0,p=e}finally{try{u||null==_.return||_.return()}finally{if(d)throw p}}return[]}},compositionGroupedDates:function(e){return e.delivery.compositionGroupedDates||{}},hasSameOrNextDayDelivery:function(e,t){return["sameDay","nextDay"].some(function(e){return!!t.deliveryDates[e]})},hasSameDayDelivery:function(e,t){var r;return!!(null==(r=t.deliveryDates.sameDay)?void 0:r.length)},deliveryTimeleft:function(e,t){var r=Object.values(t.selectedShipments)[0];return r?r.validUntilTime:null},deliveryCutoffLabel:function(e,t){var r=Object.values(t.selectedShipments)[0];return r?r.cutoffLabel:null},minimumDeliveryTimeleft:function(e,t){return e.shipments&&e.shipments.orders&&_sliced_to_array(Object.values(e.shipments.orders).flatMap(function(e){return e.options.map(function(e){return e.validUntilTime})}).filter(Boolean).sort(function(e,t){return new Date(e).getTime()-new Date(t).getTime()}),1)[0]||t.deliveryTimeleft},firstAndLastDeliveryDates:function(e,t,r,n){return function(r,o){var l=(0,t.deliveryOptions)(r).find(function(e){return e.selected});if(!l)return 0;var c=(0,i.PT)(l.category),u=e.delivery.subOrdersDeliveryDates[c];if(!u)return 0;var d=u[o];if(!d)return 0;var p=splitLineInGroup(n,r,o)?_object_spread_props(_object_spread({},d),{dates:legsOfGroup(d.dates,r)}):d,stampOf=function(e){if("string"==typeof e&&e){var t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}},firstParseable=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.map(stampOf).find(function(e){return void 0!==e})},f=p.dates.flatMap(function(e){var t,r=firstParseable(e.deliveryTime,e.deliveryDate),n=[e.paddedDeliveryDate,e.deliveryTimeEnd,e.deliveryTime,e.deliveryDate].map(stampOf).filter(function(e){return void 0!==e});return[r,n.length?(t=Math).max.apply(t,_to_consumable_array(n)):void 0]}).filter(function(e){return void 0!==e}).sort(function(e,t){return e-t}),_=f[0],h=f[f.length-1];return void 0===_||void 0===h?0:[_,h]}},changedDeliveryDates:function(e){return e.delivery.changedDeliveryDates},deliveryDatesChanged:function(e){return e.delivery.deliveryDatesChanged},assignmentUid:function(e){return e.delivery.assignmentUid},isLongWait:function(e){return e.delivery.isLongWait},orderShipmentPrice:function(e,t){var r=t.selectedShipments;return r&&0!==Object.keys(r).length?Object.values(r).reduce(function(e,t){return e+t.fee},0):0},subOrderShipmentPrice:function(e,t){return function(e){var r;return null==(r=t.selectedShipments[e])?void 0:r.fee}},subOrderSurcharge:function(e,t){return function(e){var r;return null==(r=t.selectedShipments[e])?void 0:r.surcharge}},subOrderOption:function(e,t){var r=t.shipments;return r&&r.orders?Object.values(r.orders).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t.id,Object.values(t.options).reduce(function(e,t){var r=t.title,n=t.deliveryDate,o=t.actualTransitDays,l=t.calendarTransitDays,c=t.shippingMethod,u=t.surcharge,d=t.cost,p=t.unpaddedDeliveryDate,f=t.displayPad
1Days;return _object_spread_props(_object_spread({},e),_define_property({},(0,i.PT)(t.category),{title:r,deliveryDate:n,actualTransitDays:o,calendarTransitDays:l,shippingProvider:c,surcharge:u,cost:d,unpaddedDeliveryDate:p,displayPadDays:f}))},{})))},{}):{}},deliveryOptions:function(e){return function(t){return e.shipments.orders&&e.shipments.orders[t]?e.shipments.orders[t].options:[]}},saleShippingPrices:function(e){return e.saleImprovedShippingPriceDetails},deliveryTotal:function(e,t){var r=t.selectedShipments;return r&&0!==Object.keys(r).length?Object.values(r).reduce(function(e,t){return t.fee+e},0):0},surchargeTotal:function(e,t){var r=t.selectedShipments;if(!r||0===Object.keys(r).length)return 0;var n=Object.values(r).find(function(e){return e.surcharge>0});return n?n.surcharge:0},selectedShipmentsProxy:function(e,t){var r=t.selectedShipments;if(!r||0===Object.keys(r).length)return{summary:{fee:0,strikedShipPrice:0,surcharge:0}};var n=Object.values(r).find(function(e){return e.surcharge>0}),o=n?n.surcharge:0;return{summary:{fee:Object.values(r).reduce(function(e,t){return e+t.fee},0),strikedShipPrice:Object.values(r).reduce(function(e,t){return e+t.strikedShipPrice},0),surcharge:o}}},shipmentsOrdersProxy:function(e,t){var r=t.shipments;if(!r||!r.orders)return{};var n=r.orders;return Object.values(n).length?{summary:{id:"summary",title:"Shipping"}}:n},shippingDiscount:function(e,t){var r=t.shipmentsOrdersProxy,n=t.selectedShipmentsProxy;return Object.values(r).reduce(function(e,t){var r=n[t.id];if(r){var o=r.strikedShipPrice-r.fee;o>0&&(e+=o)}return e},0)},freeShipping:function(e,t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return!!((0,t.pegasusShipping)(e)||{}).freeShipping}},mcuOnlySelectedOption:function(e,t,r,n){var o,i=t.selectedShipments,l=n.fgWithNonFastestOption[0];return void 0!==l&&(o=i[l]),o||(o=_sliced_to_array(Object.values(i),1)[0]),o},sortedSelectedShipments:function(e,t){var r=t.selectedShipments;return t.sortedShipments.filter(function(e){var t=e.groupId,n=e.category;return!!Object.entries(r).find(function(e){var r=_sliced_to_array(e,2),o=r[0],i=r[1];return t===+o&&n===i.category})})},groupedSortedShipments:function(e,t){return Object.values(t.sortedShipments).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t.groupId,_to_consumable_array(e[t.groupId]||[]).concat([t])))},{})},deliveryNotification:function(e,t,r,n){var o=t.deliveryNotificationObject;if(!o)return null;var l=t.sortedSelectedShipments,c=t.selectedShipments,u=(n.isMcuCart?l[0]||{}:c[0]||{}).category;return u&&o[(0,i.PT)(u)]?o[(0,i.PT)(u)]:o.mixedFastest||o.mixed},freeShippingCouponDiscount:function(e,t,r,n){var o=n.couponCode;if(!o||!o.freeShipping)return 0;var i=t.subOrderShipmentPrice,c=t.selectedShipments;if((0,l.vB)(o.freeShippingPromotionType)){var u,d=o.singleFreeShippingSubOrderId;if((0,l.Ve)(null==(u=c[d])?void 0:u.category))return 0;var p=i(d),f=Number(o.deliveryDiscount);return o.freeShippingPromotionType===l.CY&&null!=o.deliveryDiscount&&Number.isFinite(f)?Math.max(0,Math.min(p,f)):p}return Object.values(c).reduce(function(e,t){return e+(t.free||(0,l.Ve)(t.category)?0:t.strikedShipPrice)},0)},automaticPromotionShippingDiscount:function(e,t){var r=t.invalidDeliveryState,n=t.freeShippingCouponDiscount,o=t.selectedShipments;return r?0:(0,l.nf)(o,{couponSupersedes:n})},shippingTotal:function(e,t){var r=t.deliveryTotal,n=t.surchargeTotal,o=t.invalidDeliveryState,i=t.freeShippingCouponDiscount,l=t.automaticPromotionShippingDiscount,c=0;return!o&&(c+=r,c+=n,i&&(c-=i),l>0&&(c-=l)),c},mcuPaypalShippingOptions:function(e,t,r,n){if(!t.selectedShipments[0]){var o=t.deliveryDates;return Object.keys(o).map(function(e){var r=_to_consumable_array(new Set((o[e]||[]).map(function(e){return e.formattedDeliveryDate}))),c=_to_consumable_array(new Set([r[0],r[r.length-1]])),u=t.shipments.titles[(0,i.PT)(e)]||"Shipping",d=c.filter(Boolean),p=d.length?"".concat(u," - ").concat(d.join(" - ")):u,f=n.couponCode,_=t.mcuShippingCost,h=f.freeShipping&&!(0,l.Ve)(e)?0:_(e),m=t.mcuOnlySelectedOption;return{type:"SHIPPING",id:e,label:p,selected:e===((null==m?void 0:m.category)||"fastest"),amount:{value:h.toFixed(2),currency_code:n.currencyCode}}})}var c=t.mcuShippingCost;return t.standardPaypalShippingOptions.map(function(e){return _object_spread_props(_object_spread({},e),{amount:{value:(parseFloat(e.amount.value)+c(e.id)).toFixed(2),currency_code:e.amount.currency_code}})})},standardPaypalShippingOptions:function(e,t,r,n){return t.standardShippingOptions.filter(function(e){return!!e}).map(function(e){var r=n.couponCode.freeShipping&&!(0,l.Ve)(e.category)||e.free?0:e.cost,o=_to_consumable_array(new Set((0,t.sortedStandardShippingOptions)(e).map(function(e){return(null==e?void 0:e.formattedDeliveryDate)||(null==e?void 0:e.formattedArrivalDate)}))),i=_to_consumable_array(new Set([o[0],o[o.length-1]])).filter(
1Boolean),c=i.length?"".concat(e.title||"Shipping"," - ").concat(i.join(" - ")):e.title||"Shipping";return{type:"SHIPPING",id:e.category,label:c,selected:e.selected,amount:{value:r.toFixed(2),currency_code:n.currencyCode}}})},standardShipmentOption:function(e,t){return function(e){var r=t.deliveryOptions;return r(0)&&r(0).find(function(t){return(0,i.PT)(t.category)===(0,i.PT)(e)})}},standardShippingOptions:function(e,t){var r=t.deliveryDates,n=t.standardShipmentOption;return Object.keys(r).map(function(e){return n(e)})},sortedStandardShippingOptions:function(e,t,r,n){return function(e){var r=t.selectedShipments;r[0];var o=Object.values(_object_without_properties(r,["0"])).flat().map(function(e){return e.shipments}).flat();return _to_consumable_array(t.deliveryDates[n.isUs?(0,i.PT)(e.category):"caFastest"]||[]).concat(_to_consumable_array(o||[])).sort(function(e,t){var r,n;return new Date((null==e?void 0:e.date)||(null==e||null==(r=e.deprecated)?void 0:r.date)||"").getTime()-new Date((null==t?void 0:t.date)||(null==t||null==(n=t.deprecated)?void 0:n.date)||"").getTime()})}},mcuShippingCost:function(e,t,r,n){return function(e){var r=t.shipments.orders;return Object.values((r[0],_object_without_properties(r,["0"]))).flat().reduce(function(t,r){var o=r.options.find(function(t){return(0,i.PT)(t.category)===e});return(o||(o=fallbackShippingOption(r.options)),o)?t+(n.couponCode.freeShipping&&!(0,l.Ve)(o.category)||o.free?0:o.cost)+(o.surcharge||0):t},0)}},textForCategory:function(e,t){return function(e){var r=t.shippingTexts;return r&&r[(0,i.PT)(e)]?r[(0,i.PT)(e)].content:""}},madeShippingRule:function(e,t,r){return r.cartState.cartConfig.madeShippingRule},dtfShippingRule:function(e,t,r){return r.cartState.cartConfig.dtfShippingRule},imageServiceShippingRule:function(e,t,r){return r.cartState.cartConfig.imageServiceShippingRule},spangleShippingRule:function(e,t,r){return r.cartState.cartConfig.spangleShippingRule},deliveryWarehouses:function(e,t,r){return r.cartState.cartConfig.deliveryWarehouses},invalidDeliveryState:function(e,t,r,n){if(e.deliveryUnavailable)return!0;var o=n.locationLoaded,i=n.addressSelected;if(i)return!i.stateValid;var l=r.cartState.location;return o&&(!1===l.stateValid||!0===l.stateResolutionFailed)},orderGroupsSortOrder:function(e,t){return[t.dtfShippingRule,t.spangleShippingRule,"0"]},stripeShippingOptions:function(e,t,r,n){var o=n["payments/mcuStripePayload"],i=n["payments/standardStripePayload"];return(n.isMcuCart?o:i).filter(function(e){return e&&e.identifier})},stripeShippingRates:function(e,t,r,n){var o,i=n.storeCurrency,l=t.stripeShippingOptions,c=l.map(function(e){var t="",r=e.surcharge||0;if(e.amount-r>0){var n=e.amount-r;t="".concat(e.label," ").concat(i).concat(n.toFixed(2)," Flat Rate")}else t="FREE ".concat(e.label," Shipping");return r>0&&(t+=" + ".concat(i).concat(r," Fuel Surcharge")),{id:e.identifier,displayName:t,amount:Math.round(100*e.amount),deliveryEstimate:e.deliveryEstimate}}),u=(null==(o=l.find(function(e){return e.selected}))?void 0:o.identifier)||"standard";return c.sort(function(e,t){return e.id===u?-1:1})},paypalShippingOptions:function(e,t,r,n){var o=n.isMcuCart,i=t.mcuPaypalShippingOptions,l=t.standardPaypalShippingOptions;return o?i:l},debugInfo:function(e,t,r,n){var o=n.isMcuCart,i=n.couponCode,l=t.paypalShippingOptions,c=t.standardShippingOptions,u=t.deliveryDates,d=t.selectedShipments;return{shipments_orders:t.shipments.orders,couponCode:i,deliveryDates:u,isMcuCart:o,paypalShippingOptions:l,selectedShipments:d,standardShippingOptions:c}}}}},982242(e,t,r){"use strict";r.d(t,{D:()=>walletArrivalLabel,u:()=>isDallasSameDayCart});var n=r(200685),o=r(107932);function isDallasSameDayCart(e){return(null==e?void 0:e.dallasSameDayExperience)===!0}function walletArrivalLabel(e,t){var r,i,l=t.dallas,c=t.option,u=t.leg;if(!e||!l||!(0,o.QY)(c))return e;var d=null!=(r=null==u?void 0:u.deliveryTime)?r:null==c?void 0:c.deliveryTime,p=null!=(i=null==u?void 0:u.deliveryTimeEnd)?i:null==c?void 0:c.deliveryTimeEnd;return(0,n.r)(e)&&d&&p?"".concat((0,n.Mx)(e),", ").concat((0,n.qO)(d,p)):e}},232656(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(375138),o=r(506541);let i=[function(e){var getTotalItems=function(e){try{return e.summary.totalItems}catch(e){return o.A.error(e),0}},t=getTotalItems(e.state.cartState);e.subscribe(function(e,r){var o=getTotalItems(r.cartState);t!==o&&(t=o,(0,n.ZF)(t))})}]},445591(e,t,r){"use strict";r.d(t,{d:()=>n,v:()=>reloadOrNotifyCartStoreFatal});var n="jiffy:cart-store-fatal";function reloadOrNotifyCartStoreFatal(){document.getElementById("vue-cart")?window.location.reload():window.dispatchEvent(new CustomEvent(n))}},801921(e,t,r){"use strict";r.d(t,{$X:()=>U,AV:()=>Q,Aw:()=>er,Br:()=>R,Dl:()=>H,Eh:()=>y,Eu:()=>C,Gd:()=>B,JT:()=>S,K8:()=>J,KJ:()=>w,Ki:()=>j,L5:()=>V,Lq:()=>el,MN:()=>d,Mb:()=>N,Mq:()=>k,OU:()=>P,Pe:()=>ei,Pp:()=>f,QJ:()=>W,Qe:()=>v,Sh:()=>_,Sy:()=>Z,TB:()=>x,TW:()=>m,U$:()=>z,U9:()=>ea,UG:()=>E,Vr:()=>eu,Yn:()=>A,Zr:()=>L,Zs:()=>u,_z:()=>ec,aC:()=>ee,d9:()=>O,dp:()=>I,eG:()=>et,f1:()=>X,fx:()=>b,gE:()=>g,hT:()=>h,j2:()=>es,kZ:()=>D,oP:()=>q,pA:()=>T,ro:()=>en,xV:()=>p,y2:()=>Y,yd:()=>F,yg:()=>eo,yp:()=>K,ze:()=>G,zh:()=>M});var n,o,i,l=r(802436),c=r(147141),u=(0,l.y$)(),d=(0,l.eU)({orderNumber:null,storeCode:"us",isMcuCart:!1,twoPageCart:!1,isCrafterOnboarded:!1,productSuggestions:!1,j1Cart:!1,checkoutLoading:!1,inventoryLoading:!1,couponLoading:!1,locationLoading:!1,removingItem:!1,refreshLoading:!1,isIncorrectAddress:!1,isAccountPresent:!1,procolorConsumerOptoutEnabled:!1,procolorOptoutLoggedIn:!1,procolorToggleOffered:!1,procolorAutoUpgradeDisabled:!1,blankReturnsBadge:!1,customer:{},guestZipcode:"",autoCartType:null,signInURL:null,createAccountURL:null,fgWithNonFastestOption:["4"],csrfToken:null==(n=document.querySelector('meta[name="csrf-token"]'))?void 0:n.getAttribute("content"),dtfPromotionBlockVisible:!1,dtfCouponApplied:!1,madeShippingRule:null,dtfShippingRule:null,imageServiceShippingRule:null,spangleShippingRule:null,showCouponBoxOnBogo:!0}),p=(0,l.eU)({clearButtonInformation:{}}
1),f=(0,l.eU)({addresses:null,shipAddressId:null}),_=(0,l.eU)({}),h=(0,l.eU)({}),m=(0,l.eU)({appliedCouponCode:"",couponDiscount:0,freeShipping:!1}),g=(0,l.eU)({}),b=(0,l.eU)({}),y=(0,l.eU)(!1),v=(0,l.eU)([]),w=(0,l.eU)({isRetailPriceCorrect:!0,retailSavings:0,productsSubtotal:0,automaticPromotionDiscount:0,totalItems:0,total:0,taxTotal:0,retailTotal:0,shippingUrl:"",bulkDiscount:0,saleDiscount:0,couponDiscount:0,currencyCode:"USD",countryCode:"US",groups:[]}),j=(0,l.eU)({}),k=(0,l.eU)({amount:0,isVisible:!1,isUsed:!1,closestToExpire:{}}),x=(0,l.eU)({}),S=(0,l.eU)({}),O=(0,l.eU)([]),P=(0,l.eU)(null),A=(0,l.eU)(null),C=(0,l.eU)({shownZipcodeModal:!1,showStickyCheckout:!1}),I=(0,l.eU)({appPlatform:window.MOBILE_APP_PLATFORM,env:null==(o=window.jiffy)?void 0:o.env,host:null==(i=window.jiffy)?void 0:i.host,isApp:window.MOBILE_APP,isMobile:(0,c.Fr)()}),E=(0,l.eU)({bulkDiscountAt:"$99",dtfFreeShippingThreshold:"",freeShippingAt:"",freeReturnsFor:"100"}),N=(0,l.eU)({isRetrying:!1,showModal:!1,actionCableConnected:!0}),D=(0,l.eU)({}),T=(0,l.eU)(null),M=(0,l.eU)({}),R=(0,l.eU)({sticker:{avgRating:null,reviewsCount:null}}),F=(0,l.eU)([]),L=(0,l.eU)(!1),B=(0,l.eU)(!1),z=(0,l.eU)(null),U=(0,l.eU)(null),H=(0,l.eU)(null),q=(0,l.eU)(null),V=(0,l.eU)(!1),G=(0,l.eU)(0),K=(0,l.eU)(null),W=(0,l.eU)(0),Q=(0,l.eU)(0),J=(0,l.eU)({isProcessing:!1,queue:{}}),Z=(0,l.eU)({byArtworkId:{},isLoading:!1,loadingByArtworkId:{}}),Y=(0,l.eU)([]),X=(0,l.eU)(""),ee=(0,l.eU)(null),et=(0,l.eU)(!1),er=(0,l.eU)(null),en=(0,l.eU)(!1),eo=(0,l.eU)("12x12"),ea=(0,l.eU)(null),ei=(0,l.eU)(null),es=(0,l.eU)(null),el=(0,l.eU)(null),ec=(0,l.eU)(null),eu=(0,l.eU)(null)},628629(e,t,r){"use strict";r.d(t,{Ay:()=>eo,Pj:()=>useStore,fe:()=>getAddressChangeLocationSettled,gb:()=>getAddressChangeSeq,sE:()=>getAddressChangeSettled,tv:()=>en});var n,o,i=r(293534),l=r(152793),c=r(275857),u=r(592303),d=r.n(u),p=r(629405),f=r(277889),_=r(797466),h=r(610906),m=r(586519),g=r(48906
17),b=r(299410),y=r(53198),v=r(472162),w=r(130746),j=r(433769),k=r(946296),x=r(467265),S=r(864188),O=r(203097),P=r(137105),A=r(88051),C=r(801921),I=r(35926),E=r(232656),N=r(3592),D=r(48979),T=r(916743),M=r(952062),R=r(445591),F=r(445101);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _to_primitive(e,t){if("object"!==_type_of(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==_type_of(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _to_property_key(e){var t=_to_primitive(e,"string");return"symbol"===_type_of(t)?t:String(t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var getCurrentRelativePath=function(){if("u"<typeof window)return"/";var e=window.location,t=e.pathname,r=e.search,n=e.hash;return"".concat(void 0===t?"/":t).concat(void 0===r?"":r).concat(void 0===n?"":n)},L=!1;function secondaryCartPageFenceLost(e){return!L&&!!(0,A.WK)()&&!!(0,A.xX)()&&!!e&&(null==e?void 0:e.two_page_cart)===!1}var B=[500,1500,4500],z=B.length,U=0,H=null,q=0,V=0,G=0,K=null,W=0,Q=Promise.resolve(),clearPendingRetryTimer=function(){null!==H&&(clearTimeout(H),H=null)},scheduleDeliveryRetryOn500=function(e){if(null===H&&!(U>=z)){var t;H=setTimeout(function(){H=null,U+=1,Promise.resolve(e("shipping/getAllDeliveryDates",null,{root:!0})).then(function(){clearPendingRetryTimer(),U=0},function(t){500===(t&&(void 0===t?"undefined":_type_of(t))==="object"?t.status:void 0)&&U<z?scheduleDeliveryRetryOn500(e):resetDeliveryRetryStateOn500()})},null!=(t=B[U])?t:0)}},resetDeliveryRetryStateOn500=function(){clearPendingRetryTimer(),U=0},getAddressChangeSeq=function(){return W},J=Promise.resolve(),Z=Promise.resolve(),getAddressChangeLocationSettled=function(){return Z},dispatchTrackedLocationRefresh=function(e){Z=Promise.resolve(e("getCurrentLocation")).then(function(){return J},function(){return J}).then(function(){},function(){})},getAddressChangeSettled=function(){return Q},waitForAddressChangeQueueSettled=function(){var e=getAddressChangeSettled();return e.then(function(){return getAddressChangeSettled()===e?void 0:waitForAddressChangeQueueSettled()})},dispatchTrackedLocationRefreshAfterAddressChange=function(e){Z=waitForAddressChangeQueueSettled().then(function(){return Promise.resolve(e("getCurrentLocation")).then(function(){return J},function(){return J})}).then(function(){},function(){})},Y=new Map,removeItemQueueKey=function(e){return"".concat(e.line_item_id,"_").concat(e.quantity||0)},deferQueuedRemoval=function(e){return new Promise(function(t,r){var n,o=removeItemQueueKey(e),i=null!=(n=Y.get(o))?n:[];i.push({resolve:t,reject:r}),Y.set(o,i)})},takeQueuedRemovalSettlers=function(e){return e.flatMap(function(e){var t,r=removeItemQueueKey(e),n=null!=(t=Y.get(r))?t:[];return Y.delete(r),n})},X=(0,F.O)(),ee=0;function sendLineItemQuantity(e,t){var r,n=e.dispatch,o=e.commit;n("prepareToAjax");var i=(null==(r=performance)?void 0:r.now())||0;return Promise.resolve(f.api.vueCart.updateLineItem(t)).then(function(e){(0,O.HW)();var t,r=((null==(t=performance)?void 0:t.now())||0)-i;return o("shipping/setChangeDeliveryDateMixpanelData",{earliestTimeToGetDate:r,cartTimeToGetDate:r}),e}).finally(function(){o("shipping/setDeliveryLoadingStatus",!1)})}var et=(0,l.S)((_define_property(o={jotaiStore:C.Zs,state:{cartConfig:C.MN,cartHeader:C.xV,accountAddresses:C.Pp,experiments:C.Sh,itemsOutOfStock:C.hT,couponCode:C.TW,orderGroups:C.gE,subOrdersSummary:C.fx,subOrdersHasJiffyMade:C.Eh,notifications:C.Qe,summary:C.KJ,zipcode:C.Ki,storeCredit:C.Mq,specificStoreCredits:C.TB,location:C.JT,locationAddresses:C.d9,matchingProduct:C.OU,browseCustomShirtsLineItemId:C.Yn,modalState:C.Eu,platform:C.dp,usp:C.UG,dtf:C.Mb,dtfPricing:C.kZ,assignmentDuration:C.pA,preCutConfig:C.zh,reviewsData:C.Br,variantsData:C.yd,storeCreditsByBusinessLines:C.Zr,isEligibleForBogoPromotion:C.Gd,bogoMaxFreeQuantity:C.U$,promotionResolution:C.$X,printFirstPurchaseDeliveryCompositionId:C.Dl,expectedTransfersStoreCredit:C.oP,fullyPayingWithStoreCredits:C.L5,cartSubtotalAfterStoreCredits:C.ze,storeCreditAppliedOnCart:C.yp,deliveryLoadingCounter:C.QJ,removeItemQueue:C.K8,lineItemQuantitySaves:C.AV,llmRedrawRequests:C.Sy,baseOrders:C.y2,cartUrl:C.f1,updatedAt:C.aC,productSuggestions:C.eG,damCrossSell:C.Aw,showTransfersStoreCreditBanner:C.ro,maxFreeDimensionLabel:C.yg,transfersCartSubtotal:C.U9,transfersStoreCreditTiers:C.Pe,transfersCreditQuote:C.j2,jiffyCredit:C.Lq,transfersLoyaltyEarnSunset:C._z,orderId:C.Vr},stateKey:"cartState"},"mutations",(_define_property(n={updateCartState:function(e,t){var r=t.cartData,n=t.isInitialization,o=_to_consumable_array(Object.keys(D.A.state())).concat(_to_consumable_array(Object.keys(M.Ay.state())),_to_consumable_array(Object.keys(N.A.state())),["transfersCredit","jiffyCredit"]),i=_to_consumable_array(Object.keys(T.A.state()));if(void 0!==n&&n)e.cartState=(0,_.D9)(e.cartState,(0,b.Tm)(r),o),e.cartState.cartConfig=d()(e.cartState.cartConfig,i);else{var l,c,u=d()((0,b.Tm)(r),o);e.cartState=_object_spread_props(_object_spread({},e.cartState,u),{cartConfig:_object_spread({},e.cartState.cartConfig,d()(null!=(l=u.cartConfig)?l:{},i)),summary:_object_spread({},e.cartState.summary,null!=(c=u.summary)?c:{})})}},setTransfersCreditQuote:function(e,t){e.cartState.transfersCreditQuote=null!=t?t:null},setJiffyCredit:function(e,t){e.cartState.jiffyCredit=null!=t?t:null},pushNotification:function(e,t){e.cartState.notifications=_to_consumable_array(e.cartState.notifications).concat([t])},saveConfigCitySelected:function(e,t){e.cartState.cartConfig.citySelected=t},removeNotification:function(e,t){e.cartState.notifications=e.cartState.notifications.filter(function(e){return e.id!==t})},setCheckoutLoadingStatus:function(e,t){e.cartState.cartConfig.checkoutLoading=t},setInventoryLoadingStatus:function(e,t){e.cartState.cartConfig.inventoryLoading=t},setCouponLoadingStatus:function(e,t){e.cartState.cartConfig.couponLoading=t},setRemovingItem:function(e,t){e.cartState.cartConfig.removingItem=t},setSystemError:function(e){var t,r,n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"System error. Please try again later.",c="string"==typeof l?l:null!=(t=null!=(r=null==(o=l.response)?void 0:o.error)?r:null==(i=l.response)?void 0:i.message)?t:l.message,u="string"==typeof l||l.reportable,d="string"==typeof l||null==(n=l.statusLess)||n;e.cartState.cartConfig.checkoutLoading=!1,e.cartState.cartConfig.couponLoading=!1,c&&(e.cartState.notifications=[{type:"error",text:c}],u&&!(d&&(0,h.wD)(c))&&(0,m.notifyError)("React Cart System Error: ".concat(c.slice(0,150)),{fingerprint:"react-cart-server-error",params:{error_message:c,cart_order_number:e.cartState.cartConfig.orderNumber,cart_total_items:e.cartState.summary.totalItems,cart_total:e.cartState.summary.total,user_id:e.cartState.cartHeader.clearButtonInformation.userId,is_mcu_cart:e.cartState.cartConfig.isMcuCart,store_code:e.cartState.cartConfig.storeCode,stack_trace:Error().stack}}))},setCurrentNotification:function(e,t){e.cartState.notifications=[t]},getCurrentLocationSuccess:function(e,t){e.cartState.location=t},setLocationStateUnresolved:function(e){"boolean"!=typeof e.cartState.location.stateValid&&(e.cartState.location=_object_spread_props(_object_spread({},e.cartState.location),{stateResolutionFailed:!0}))},changeAddressSuccess:function(e,t){e.cartState.accountAddresses.shipAddressId=t},updateAccountAddressesFromCart:function(e,t){t&&(e.cartState.accountAddresses=(0,b.Tm)(t))},setLocationLoadingStatus:function(e,t){e.cartState.cartConfig.locationLoading=t},setRefreshLoading:function(e,t){e.cartState.cartConfig.refreshLoading=t},setIsCrafterOnboarded:function(e,t){e.cartState.cartConfig.isCrafterOnboarded=t}
1,setOrderNumber:function(e,t){e.cartState.cartConfig.orderNumber=t},setGuestZipcode:function(e,t){e.cartState.cartConfig.guestZipcode=t},setVariantsData:function(e,t){e.cartState.variantsData=t},setProductData:function(e,t){e.cartState.productData=t},toggleZipcodeModalVisibility:function(e,t){e.cartState.modalState.shownZipcodeModal=!e.cartState.modalState.shownZipcodeModal,t?e.cartState.modalState.callOriginId=t:!e.cartState.modalState.shownZipcodeModal&&e.cartState.location.cityDefault&&delete e.cartState.modalState.callOriginId},toggleCheckoutModalVisibility:function(e,t){e.cartState.modalState.showStickyCheckout=void 0===t?!e.cartState.modalState.showStickyCheckout:t},updateCouponDiscount:function(e,t){e.cartState.couponCode.couponDiscount=t},updateStoreCreditUsageState:function(e,t){e.cartState.storeCredit.isUsed=t},updateSpecificStoreCreditUsageState:function(e,t){var r,n=t.businessLine,o=t.isUsed;(r=e.cartState.specificStoreCredits)[n]||(r[n]={}),e.cartState.specificStoreCredits[n].isUsed=o},setAssignmentDuration:function(e,t){e.cartState.assignmentDuration=t},setAddedArtworkSize:function(e,t){e.cartState.addedArtworkSize=t},updateArtworkValues:function(e,t){},setLineItemQuantitySaves:function(e,t){e.cartState.lineItemQuantitySaves=t},setRemoveItemProcessing:function(e,t){e.cartState.removeItemQueue.isProcessing=t},addToRemoveItemQueue:function(e,t){e.cartState.removeItemQueue.queue[removeItemQueueKey(t)]=t},clearRemoveItemQueue:function(e){e.cartState.removeItemQueue.queue={}},removeFromQueue:function(e,t){delete e.cartState.removeItemQueue.queue[removeItemQueueKey(t)]}},"setLlmRedrawLoading",function(e,t){var r=t.artworkId,n=t.isLoading;if("boolean"==typeof r)e.cartState.llmRedrawRequests.isLoading=r;else if(n)e.cartState.llmRedrawRequests.loadingByArtworkId=_object_spread_props(_object_spread({},e.cartState.llmRedrawRequests.loadingByArtworkId),_define_property({},r,!0));else{var o=e.cartState.llmRedrawRequests.loadingByArtworkId,i=(o[r],_object_without_properties(o,[_to_property_key(r)]));e.cartState.llmRedrawRequests.loadingByArtworkId=i}}),_define_property(n,"setLlmRedrawRequest",function(e,t){var r=t.artworkId,n=t.data,o=_object_spread({},e.cartState.llmRedrawRequests.byArtworkId[r]||{},n);e.cartState.llmRedrawRequests.byArtworkId=_object_spread_props(_object_spread({},e.cartState.llmRedrawRequests.byArtworkId),_define_property({},r,o))}),_define_property(n,"clearLlmRedrawRequest",function(e,t){var r=e.cartState.llmRedrawRequests.byArtworkId,n=(r[t],_object_without_properties(r,[_to_property_key(t)]));e.cartState.llmRedrawRequests.byArtworkId=n}),_define_property(n,"updateLlmRedrawRequestState",function(e,t){var r=t.artworkId,n=t.currentState,o=e.cartState.llmRedrawRequests.byArtworkId[r];o&&(e.cartState.llmRedrawRequests.byArtworkId=_object_spread_props(_object_spread({},e.cartState.llmRedrawRequests.byArtworkId),_define_property({},r,_object_spread_props(_object_spread({},o),{currentState:n}))))}),_define_property(n,"setLlmRedrawQuestions",function(e,t){var r=t.artworkId,n=t.questions,o=e.cartState.llmRedrawRequests.byArtworkId[r];o&&(e.cartState.llmRedrawRequests.byArtworkId=_object_spread_props(_object_spread({},e.cartState.llmRedrawRequests.byArtworkId),_define_property({},r,_object_spread_props(_object_spread({},o),{questions:n}))))}),_define_property(n,"updateLineItemEnhancementNote",function(e,t){var r=t.artworkId,n=t.enhancementNote,o=e.cartState.orderGroups.groups;o&&Object.values(o).forEach(function(e){Object.values(e.lineItems).forEach(function(e){e.artworkId===r&&(e.artworkNote=n),e.madeArtworkNotes&&Array.isArray(e.madeArtworkNotes)&&e.madeArtworkNotes.forEach(function(e){e.artworkId===r&&(e.artworkNote=n,e.artworkNoteHtml=void 0)})})})}),_define_property(n,"setMatchingProduct",function(e,t){e.cartState.matchingProduct=t}),_define_property(n,"setBrowseCustomShirtsLineItemId",function(e,t){e.cartState.browseCustomShirtsLineItemId=t}),n)),_define_property(o,"getters",{isPrintOnlyCart:function(e){return e.cartState.cartConfig.isPrintOnlyCart},csrfToken:function(e){return e.cartState.cartConfig.csrfToken},fgWithNonFastestOption:function(e){return e.cartState.cartConfig.fgWithNonFastestOption},createAccountURL:function(e){return"/signup?redirect_to=".concat(encodeURIComponent(getCurrentRelativePath()))}
1,signInURL:function(e){return"/login?redirect_to=".concat(encodeURIComponent(getCurrentRelativePath()))},currentLocationLoading:function(e){return e.cartState.cartConfig.locationLoading},storeCode:function(e){return e.cartState.cartConfig.storeCode},isUs:function(e){return"us"===e.cartState.cartConfig.storeCode},storeCurrency:function(e,t){return t.isUs?"$":"CA$"},accountPresent:function(e){return e.cartState.cartConfig.isAccountPresent},procolorConsumerOptoutEnabled:function(e){return!0===e.cartState.cartConfig.procolorConsumerOptoutEnabled},procolorOptoutLoggedIn:function(e){return!0===e.cartState.cartConfig.procolorOptoutLoggedIn},procolorToggleOffered:function(e){return!0===e.cartState.cartConfig.procolorToggleOffered},procolorAutoUpgradeDisabled:function(e){return!0===e.cartState.cartConfig.procolorAutoUpgradeDisabled},blankReturnsBadge:function(e){return!0===e.cartState.cartConfig.blankReturnsBadge},cartBulkDiscount:function(e){return parseFloat(e.cartState.summary.bulkDiscount)},automaticPromotionDiscount:function(e){return parseFloat(String(e.cartState.summary.automaticPromotionDiscount||0))},initCitySelected:function(e){return e.cartState.cartConfig.citySelected},isMcuCart:function(e){return e.cartState.cartConfig.isMcuCart},isTwoPageCart:function(e){return(0,A._x)((0,A.xX)())},checkoutLoading:function(e){return e.cartState.cartConfig.checkoutLoading},inventoryLoading:function(e){return e.cartState.cartConfig.inventoryLoading},j1Cart:function(e){return e.cartState.cartConfig.j1Cart},couponLoading:function(e){return e.cartState.cartConfig.couponLoading},refreshLoading:function(e){return e.cartState.cartConfig.refreshLoading}
1,removingItem:function(e){return e.cartState.cartConfig.removingItem},assignmentDuration:function(e){return e.cartState.assignmentDuration},dtfPromotionBlockVisible:function(e){return!k.I.isExists("__JIFFY__DTF_CTA_CART_CLOSED__")},dtfCouponApplied:function(e){return e.cartState.cartConfig.dtfCouponApplied},madeShippingRule:function(e){return e.cartState.cartConfig.madeShippingRule},dtfShippingRule:function(e){return e.cartState.cartConfig.dtfShippingRule},imageServiceShippingRule:function(e){return e.cartState.cartConfig.imageServiceShippingRule},spangleShippingRule:function(e){return e.cartState.cartConfig.spangleShippingRule},dtfPricing:function(e){return function(t){return e.cartState.dtfPricing[t]}},enableSmartRedrawNotes:function(){return!1},showCouponBoxOnBogo:function(e){var t;return(null==(t=e.cartState.cartConfig)?void 0:t.showCouponBoxOnBogo)===!0},madeSamplesV1:function(e){var t;return(null==(t=e.cartState.cartConfig)?void 0:t.madeSamplesV1)===!0},showStickyApplePayButton:function(e){var t;return(null==(t=e.cartState.cartConfig)?void 0:t.showStickyApplePayButton)===!0},isRichUIForSavedCarts:function(e){return!e.cartState.platform.isMobile},isIncorrectAddress:function(e,t){return!!e.cartState.cartConfig.isIncorrectAddress||!!t.accountPresent&&!t.addressPresent&&!t.citySelected||!t.accountPresent&&!t.citySelected||!!t["shipping/invalidDeliveryState"]},orderNumber:function(e){return e.cartState.cartConfig.orderNumber},noCoverageReason:function(e){var t;return null!=(t=e.cartState.cartConfig.noCoverageReason)?t:null},userId:function(e){return e.cartState.cartHeader.clearButtonInformation.userId},isEmpty:function(e){return 0===e.cartState.summary.totalItems},modalState:function(e){return e.cartState.modalState},experiments:function(e){return e.cartState.experiments},matchingProduct:function(e){return e.cartState.matchingProduct},browseCustomShirtsLineItemId:function(e){return e.cartState.browseCustomShirtsLineItemId},addressesUrl:function(e){return e.cartState.accountAddresses.addressesUrl},shipAddressId:function(e){return e.cartState.accountAddresses.shipAddressId},addresses:function(e){return e.cartState.accountAddresses.addresses},addressPresent:function(e){var t;return!!(null==(t=e.cartState.accountAddresses.addresses)?void 0:t.length)},completeAddressesPresent:function(e){return e.cartState.accountAddresses.hasCompleteAddresses},addressSelected:function(e,t){var r=t.addresses||[],n=t.shipAddressId;return r.find(function(e){return e.id===n})},couponCode:function(e){return e.cartState.couponCode},hasCouponApplied:function(e){return parseFloat(e.cartState.summary.couponDiscount)>0||parseFloat(String(e.cartState.couponCode.couponDiscount))>0||e.cartState.couponCode.appliedCouponCode||e.cartState.couponCode.freeShipping},location:function(e){return e.cartState.location},locationAddresses:function(e){return e.cartState.locationAddresses},locationLoaded:function(e){return Object.keys(e.cartState.location).length>0},citySelected:function(e){return e.cartState.location.citySelected||e.cartState.location.cityDefault},cityDefault:function(e){return e.cartState.location.cityDefault},orderGroups:function(e){return e.cartState.orderGroups},isStoreCreditVisible:function(e){return e.cartState.storeCredit.isVisible&&parseFloat(e.cartState.storeCredit.amount)>0},storeCredit:function(e){return e.cartState.storeCredit},isSpecificStoreCreditVisible:function(e,t){return function(r){var n,o;return"all"===r?t.isStoreCreditVisible:(null==(n=e.cartState.specificStoreCredits[r])?void 0:n.isVisible)&&parseFloat((null==(o=e.cartState.specificStoreCredits[r])?void 0:o.amount)||"0.0")>0}},specificStoreCredits:function(e){return e.cartState.specificStoreCredits},useSpecificStoreCredits:function(e,t){return Object.fromEntries(Object.entries(t.specificStoreCredits).map(function(e){var t=_sliced_to_array(e,2);return[t[0],t[1].isUsed]}))},expectedTransfersStoreCredit:function(e){return e.cartState.expectedTransfersStoreCredit},fullyPayingWithStoreCredits:function(e){return e.cartState.fullyPayingWithStoreCredits},transfersCartSubtotal:function(e){return e.cartState.transfersCartSubtotal},transfersStoreCreditTiers:function(e){return e.cartState.transfersStoreCreditTiers},transfersCreditQuote:function(e){var t;return null!=(t=e.cartState.transfersCreditQuote)?t:null},jiffyCredit:function(e){var t;return null!=(t=e.cartState.jiffyCredit)?t:null},jiffyCreditAppliedCents:function(e){var t,r;return null!=(t=null==(r=e.cartState.jiffyCredit)?void 0:r.appliedCents)?t:0},expectedTransfersCreditCents:function(e){var t;return(0,w.lX)(null!=(t=e.cartState.transfersCreditQuote)?t:null).expectedCents},appliedTransfersCreditCents:function(e){var t;return(0,w.lX)(null!=(t=e.cartState.transfersCreditQuote)?t:null).appliedCents},transfersLoyaltyEarnSunset:function(e){return!0===e.cartState.transfersLoyaltyEarnSunset},maxFreeDimensionLabel:function(e){return e.cartState.maxFreeDimensionLabel||"12x12"},isPrintFirstPurchaseWinner:function(e){var t,r;return(null==(r=e.cartState)||null==(t=r.promotionResolution)?void 0:t.winner)==="print_first_purchase"},printFirstPurchaseDeliveryCompositionId:function(e){var t,r;return null!=(t=null==(r=e.cartState)?void 0:r.printFirstPurchaseDeliveryCompositionId)?t:null},cartSummary:function(e){return e.cartState.summary},subOrderSummary:function(e){return function(t){return e.cartState.subOrdersSummary[t]}},productsSubtotal:function(e){return parseFloat(e.cartState.summary.productsSubtotal)},productsMarkedUpTotal:function(e){return parseFloat(e.cartState.summary.productsMarkedUpTotal)},productMarkedUp:function(e){return!0===e.cartState.summary.productMarkedUp},deliveryTotal:function(e,t){return t["shipping/deliveryTotal"]},surchargeTotal:function(e,t){return t["shipping/surchargeTotal"]},cartTotal:function(e,t){return parseFloat(e.cartState.summary.total)+t.shippingTotal+t.taxTotal+t.processingFee},netTotal:function(e,t){var r,n=t.storeCredit,o=n.amount,i=n.isUsed,l=t.cartTotal;return Object.values(t.specificStoreCredits).some(function(e){var t=e.isUsed,r=e.amount;
1return t&&(l-=parseFloat(r||"0")),0===l}),l>0&&i&&(l-=parseFloat(o)),Math.max(l-=Number(null!=(r=t.jiffyCreditAppliedCents)?r:0)/100,0)},cartSubtotalAfterStoreCredits:function(e,t){return Math.max(parseFloat(String(e.cartState.cartSubtotalAfterStoreCredits||0))-(t["shipping/automaticPromotionShippingDiscount"]||0),0)},storeCreditAppliedOnCart:function(e){var t=e.cartState.storeCreditAppliedOnCart;if(null==t||""===t)return null;var r=parseFloat(String(t));return Number.isFinite(r)?r:null},taxTotal:function(e){return parseFloat(e.cartState.summary.taxTotal)},processingFee:function(e,t){var r=parseFloat(e.cartState.summary.processingFeeAmount)||0;return parseFloat(e.cartState.summary.total)+t.shippingTotal>=parseFloat(e.cartState.summary.processingFeeThreshold)?0:r},shippingTotal:function(e,t){return t["shipping/shippingTotal"]},currencyCode:function(e){return e.cartState.summary.currencyCode},countryCode:function(e){return e.cartState.summary.countryCode},itemsOutOfStock:function(e){return e.cartState.itemsOutOfStock},hasOutOfStock:function(e){return Object.keys(e.cartState.itemsOutOfStock).length>0},hasMinQuantityViolation:function(e,t){return(t.allLineItems||[]).some(function(e){return e.minQuantity>1&&e.quantity>0&&e.quantity<e.minQuantity})},itemsTotalOutOfStock:function(e){return Object.values(e.cartState.itemsOutOfStock).reduce(function(e,t){return e+t.missing},0)},isParent:function(e){return(e.cartState.baseOrders||[]).length>0},childCartsCount:function(e){return(e.cartState.baseOrders||[]).length},childCartsText:function(e){return(0,p.td)((e.cartState.baseOrders||[]).length,"Cart")},hasJiffyMade:function(e){return e.cartState.subOrdersHasJiffyMade},allLineItems:function(e){var t=e.cartState.orderGroups.groups;if(!t)return[];var r=[];return Object.values(t).forEach(function(e){Object.values(e.lineItems).forEach(function(e){(0,c.ow)(e)&&r.push(e)})}),r},cartBusinessLines:function(e,t){var r=new Set;return t.allLineItems.forEach(function(e){"Blanks"===e.businessLine&&r.add("Blanks"),"DTF"===e.businessLine&&r.add("Transfers")}),Array.from(r)},allItemsAreMadeOrder:function(e,t){var r=t.allLineItems;if(0===r.length)return!1;var n=!1,o=!0,i=!0,l=!1,c=void 0;try{for(var u,d=r[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var p=u.value.businessLine;if("Print"===p)n=!0;else if("AI"!==p){o=!1;break}}}catch(e){l=!0,c=e}finally{try{i||null==d.return||d.return()}finally{if(l)throw c}}return n&&o},deliveryNotification:function(e,t){return t["shipping/deliveryNotification"]},zipcodeState:function(e){return e.cartState.zipcode},isCartDisabled:function(e,t){return t.isIncorrectAddress||t.hasOutOfStock||t.hasMinQuantityViolation||!!t["shipping/deliveryUnavailable"]},showNewCheckoutError:function(e){return e.cartState.showNewCheckoutError},showProductSuggestions:function(e){return e.cartState.productSuggestions},guestZipcode:function(e){return e.cartState.cartConfig.guestZipcode},appPlatform:function(e){return e.cartState.platform.appPlatform},host:function(e){return e.cartState.platform.host},env:function(e){return e.cartState.platform.env},isApp:function(e){return e.cartState.platform.isApp},isMobile:function(e){return e.cartState.platform.isMobile},uspData:function(e){return e.cartState.usp},isAndroidApp:function(e){return"android"===e.cartState.platform.appPlatform},showModal:function(e){return e.cartState.dtf.showModal},isRetrying:function(e){return e.cartState.dtf.isRetrying},actionCableConnected:function(e){return e.cartState.dtf.actionCableConnected},preCutConfig:function(e){return e.cartState.preCutConfig},reviewsData:function(e){return e.cartState.reviewsData},variantsData:function(e){return e.cartState.variantsData},productData:function(e){return e.cartState.productData},storeCreditsByBusinessLines:function(e){return e.cartState.storeCreditsByBusinessLines},showTransfersStoreCreditBanner:function(e){return e.cartState.showTransfersStoreCreditBanner},addedArtworkSize:function(e){return e.cartState.addedArtworkSize},lineItemQuantitySavePending:function(e){var t;return(null!=(t=e.cartState.lineItemQuantitySaves)?t:0)>0},removeItemQueueProcessing:function(e){return e.cartState.removeItemQueue.isProcessing},removeItemQueue:function(e){return e.cartState.removeItemQueue.queue},hasQueuedRemovals:function(e){return Object.keys(e.cartState.removeItemQueue.queue).length>0},isItemBeingRemoved:function(e){return function(t){return e.cartState.cartConfig.removingItem===t||Object.keys(e.cartState.removeItemQueue.queue).some(function(e){return e.startsWith("".concat(t,"_"))})}},llmRedrawRequestsLoading:function(e){return e.cartState.llmRedrawRequests.isLoading},llmRedrawRequestLoadingByArtworkId:function(e){return function(t){return e.cartState.llmRedrawRequests.loadingByArtworkId[t]||!1}},llmRedrawRequestByArtworkId:function(e){return function(t){return e.cartState.llmRedrawRequests.byArtworkId[t]||null}},llmRedrawRequestState:function(e){return function(t){var r=e.cartState.llmRedrawRequests.byArtworkId[t];return(null==r?void 0:r.currentState)||"initial"}},llmRedrawRequestQuestions:function(e){return function(t){var r=e.cartState.llmRedrawRequests.byArtworkId[t];return(null==r?void 0:r.questions)||[]}},llmRedrawRequestId:function(e){return function(t){var r=e.cartState.llmRedrawRequests.byArtworkId[t];return(null==r?void 0:r.llmRedrawRequestId)||null}}}),_define_property(o,"actions",{initializeStore:function(e,t){return _async_to_generator(function(){var r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:return r=e.commit,n=e.dispatch,o=t,r("shipping/setDeliveryLoadingStatus",!1),n("setCartResponse",_object_spread_props(_object_spread({},o),{skipLoadingUpdate:!0,isInitialization:!0})),n("applyTransfersCreditResponse",o),[4,n("conditionallyFetchInitialDeliveryDates",t)];case 1:return i.sent(),[2]}})})()},conditionallyFetchInitialDeliveryDates:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u,d;return _ts_generator(this,function(p){switch(p.label){case 0:if(n=e.dispatch,c=(null==(l=null==(i=(o=t).cart_config)?void 0:i.current_location)?void 0:l.city_selected)||(null==l?void 0:l.city_default),!((null!=(r=null==(d=null==(u=o.account_addresses)?void 0:u.addresses)?void 0:d.length)?r:0)>0||c))return[3,2];return[4,n("shipping/getInitialDeliveryDates")];case 1:p.sent(),p.label=2;case 2:return[2]}})})()},prepareToAjax:function(e){var t=e.commit;t("shipping/setInitialDeliveryDateMixpanelData",{earliestTimeToGetDate:0,cartTimeToGetDate:0}),t("shipping/setChangeDeliveryDateMixpanelData",{earliestTimeToGetDate:0,cartTimeToGetDate:0}),t("setCouponLoadingStatus",!0),t("shipping/setDeliveryLoadingStatus",!0),(0,M.PC)()},setCartResponse:function(e,t){var r=e.dispatch,n=e.commit,o=e.state;if(t&&(ee+=1),!t){n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1);return}var i=t.skipLoadingUpdate,l=t.isInitialization,c=void 0!==l&&l,u=_object_without_properties(t,["skipLoadingUpdate","isInitialization"]);c||(0,I.A)(o.cartState.notifications,(0,b.Tm)(u.notifications)),void 0!==i&&i||(n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1)),r("replaceCartState",_object_spread_props(_object_spread({},u),{isInitialization:c})),secondaryCartPageFenceLost(u.cart_config)&&(L=!0,window.location.assign((0,A.QD)(o.cartState.cartConfig.storeCode)))},applyTransfersCreditResponse:function(e,t){var r=e.commit;if(!t||(void 0===t?"undefined":_type_of(t))!=="object"||204===t.status){r("setTransfersCreditQuote",null),r("setJiffyCredit",null);return}r("setTransfersCreditQuote",(0,y.eH)(t)),r("setJiffyCredit",(0,v.N)(t))},replaceCartState:function(e,t){var r=e.commit,n=t.isInitialization,o=_object_without_properties(t,["isInitialization"]);r("updateCartState",{cartData:o,isInitialization:void 0!==n&&n}),r("payments/init",o),r("shipping/init",o),r("savedCarts/init",o)},removeLineItem:function(e,t){var r=e.dispatch,n=e.commit;return e.getters.removeItemQueueProcessing?(n("addToRemoveItemQueue",t),deferQueuedRemoval(t)):(n("setRemovingItem",t.line_item_id),n("setRemoveItemProcessing",!0),r("processRemoveItems",[t]).finally(function(){return n("setRemovingItem",null),r("processRemoveItemQueue")}))},removeLineItems:function(e,t){var r,n,o=e.dispatch,i=e.commit;return e.getters.removeItemQueueProcessing?Promise.all(t.map(function(e){return i("addToRemoveItemQueue",e),deferQueuedRemoval(e)})):(i("setRemovingItem",null!=(r=null==(n=t[0])?void 0:n.line_item_id)?r:null),i("setRemoveItemProcessing",!0),o("processRemoveItems",t).finally(function(){return i("setRemovingItem",null),o("processRemoveItemQueue")}))},processRemoveItems:function(e,t){var r=e.commit,n=e.dispatch;n("prepareToAjax");var o={line_items_attributes:t.reduce(function(e,t,r){return _object_spread_props(_object_spread({},e),_define_property({},r,{id:t.line_item_id,quantity:0}))},{})};return new Promise(function(e,t){f.api.vueCart.updateLineItems(o).then(function(t){(0,O.HW)();var r=t.order_groups,o=null==r?void 0:r.groups;if(Object.keys(null!=o?o:{}).length){n("setCartResponse",t),n("applyTransfersCreditResponse",t),n("savedCarts/loadSavedCarts"),e(t);return}(0,R.v)()}).catch(function(e){r("shipping/setDeliveryLoadingStatus",!1),n("setSystemError",e),t(e)})})},processRemoveItemQueue:function(e){return _async_to_generator(function(){var t,r,n,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:if(t=e.dispatch,r=e.commit,!(n=e.getters).hasQueuedRemovals||0===(o=Object.values(n.removeItemQueue)).length)return r("setRemoveItemProcessing",!1),[2];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,t("processRemoveItems",o)];case 2:return i=c.sent(),o.forEach(function(e){r("removeFromQueue",e)}
1),takeQueuedRemovalSettlers(o).forEach(function(e){return(0,e.resolve)(i)}),[3,4];case 3:return l=c.sent(),o.forEach(function(e){r("removeFromQueue",e)}),takeQueuedRemovalSettlers(o).forEach(function(e){return(0,e.reject)(l)}),[3,4];case 4:return t("processRemoveItemQueue"),[2]}})})()},clearOosItems:function(e){var t=e.getters,r=e.dispatch,n=t.itemsOutOfStock,o={line_items_attributes:Object.keys(n).reduce(function(e,t,r){var o,i;return _object_spread_props(_object_spread({},e),_define_property({},r,{id:t,quantity:null!=(o=null==(i=n[t])?void 0:i.onhand)?o:0}))},{})};return r("prepareToAjax"),new Promise(function(e,t){f.api.vueCart.updateLineItems(o).then(function(t){(0,O.HW)(),r("setCartResponse",t),r("applyTransfersCreditResponse",t),e()}).catch(function(e){r("setSystemError",e),t(e)})})},updateLineItemQuantity:function(e,t){var r=e.dispatch,n=e.commit;return X.enqueue(t,{send:function(t){return sendLineItemQuantity(e,t)},apply:function(e){var t=e.order_groups,n=null==t?void 0:t.groups;return Object.keys(null!=n?n:{}).length?(r("setCartResponse",e),r("applyTransfersCreditResponse",e),r("savedCarts/loadSavedCarts"),!0):((0,R.v)(),!1)},fail:function(e){r("setSystemError",e)},count:function(e){return n("setLineItemQuantitySaves",e)},generation:function(){return ee}})},addToCart:function(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(n){return(r=e.dispatch)("prepareToAjax"),[2,new Promise(function(e,n){f.api.cart.madeAdd(t).then(function(t){r("refreshCartState"),e(t)}).catch(function(e){r("setSystemError",e),n(e),(0,h.PH)(e)&&(0,m.notifyError)("Failed to add to cart",{params:{error:JSON.stringify(e),formData:JSON.stringify(t)}})})})]})})()},updateUseStoreCredits:function(e,t){return _async_to_generator(function(){var r,n,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:r=e.commit,n=e.dispatch,r("updateStoreCreditUsageState",t),r("setCheckoutLoadingStatus",!0),r("setInventoryLoadingStatus",!0),(0,M.PC)(),l.label=1;case 1:return l.trys.push([1,3,4,5]),[4,f.api.vueCart.setUseStoreCredits({use_store_credits:t})];case 2:return o=l.sent(),n("replaceCartState",o),n("applyTransfersCreditResponse",o),[3,5];case 3:return i=l.sent(),(0,h.PH)(i)&&(0,m.notifyError)("Failed to update store credits usage state",{params:{error:JSON.stringify(i),use_store_credits:t}}),[3,5];case 4:return r("setCheckoutLoadingStatus",!1),r("setInventoryLoadingStatus",!1),[7];case 5:return[2]}})})()},updateUseSpecificStoreCredits:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u;return _ts_generator(this,function(d){switch(d.label){case 0:if(r=e.commit,n=e.dispatch,o=t.businessLine,i=t.isUsed,!o)return[2];r("updateSpecificStoreCreditUsageState",{businessLine:o,isUsed:i}),r("setCheckoutLoadingStatus",!0),r("setInventoryLoadingStatus",!0),(0,M.PC)(),l=o.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toLowerCase(),d.label=1;case 1:return d.trys.push([1,3,4,5]),[4,f.api.vueCart.setUseStoreCredits({business_line:l,use_store_credits:i})];case 2:return c=d.sent(),n("replaceCartState",c),n("applyTransfersCreditResponse",c),[3,5];case 3:return u=d.sent(),(0,h.PH)(u)&&(0,m.notifyError)("Failed to update store credits usage state",{params:{error:JSON.stringify(u),business_line:o,use_store_credits:i}}),[3,5];case 4:return r("setCheckoutLoadingStatus",!1),r("setInventoryLoadingStatus",!1),[7];case 5:return[2]}})})()},getLocation:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u;return _ts_generator(this,function(d){switch(d.label){case 0:r=e.state,n=e.dispatch,d.label=1;case 1:return d.trys.push([1,3,,4]),o={order_number:r.cartState.cartConfig.orderNumber,embroidery_test_order:!1,zipcode:t,log_not_existing_zipcode:!0},(0,M.PC)(),[4,f.api.locations.create(o)];case 2:if((i=d.sent()).error)throw new h.j6(i.message);return i.cities&&(l=_sliced_to_array(i.cities,1)[0],n("replaceCartState",{notifications:[],locationAddresses:i.cities,location:{city:l.name,stateCode:l.state_code,zipcode:i.zipcode,citySelected:!0}}),n("putLocation",l),(0,j.track)("location_updated",{location:"".concat(l.name,", ").concat(l.state_code,", ").concat(i.zipcode)}
1)),i.session&&(null==(c=window.JiffyDeliverTo)||c.updateZipCodeInHeader(i.session)),[2,i];case 3:return u=d.sent(),n("setSystemError",u),[2,null];case 4:return[2]}})})()},fetchVariantsData:function(e,t){var r=e.commit;return new Promise(function(e,n){var o;f.api.vueCart.getCartVariants({id:t.compositionId,count:(null==(o=t.printSizes)?void 0:o.length)||1}).then(function(t){var o=t.success,i=t.variants;o?(r("setVariantsData",i),e(i)):n(Error("Error fetching variants data. Please try again."))}).catch(function(e){n(Error("Error fetching variants data. Please try again."))})})},fetchMatchingItems:function(e,t){return new Promise(function(e,r){f.api.cart.matchingVariants({lineItemId:t}).then(function(t){e((0,b.Tm)(t))}).catch(function(e){r(Error("Error fetching matching items. Please try again."))})})},fetchProductData:function(e,t){var r=e.commit;return new Promise(function(e,n){f.api.printOnDemand.getProduct({catalog_number:t.productStyle}).then(function(t){r("setProductData",(0,b.Tm)(t)),e(t)}).catch(function(e){n(Error("Error fetching product data. Please try again."))})})},updateVariantQuantities:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u,d,p,_;return _ts_generator(this,function(g){switch(g.label){case 0:r=e.commit,n=e.dispatch,o=e.getters,i="Error updating variant quantities. Please try again.",n("prepareToAjax"),l=function(e){var n=e.errorMessage,i=e.errorStatus,l=e.errorType,c=e.originalError;if(!i){r("setCouponLoadingStatus",!1),r("shipping/setDeliveryLoadingStatus",!1);return}var u={error_message:n,error_status:i,error_type:l,order_number:o.orderNumber,payload:t};(0,h.PH)(c)&&(0,m.notifyError)("Failed to update variant quantities",{params:u}),(0,j.track)("cart_edit_size_update_error",u)},g.label=1;case 1:return g.trys.push([1,3,,4]),[4,f.api.vueCart.updateVariantQuantities(t)];case 2:return[2,g.sent()];case 3:u=c=g.sent();try{d=JSON.parse(u.message)}catch(e){d={error:u.message}}throw p=d.error||i,_=d.mixpanel_data,l({errorMessage:p,errorStatus:(null==_?void 0:_.code)||u.status,errorType:null==_?void 0:_.type,originalError:c}),Error(p);case 4:return[2]}})})()},putLocation:function(e,t){var r=e.state,n=e.commit,o=e.dispatch,i=W+=1,l=r.cartState.location,c={zipcode:l.zipcode,city_name:{name:t.name,state_code:t.stateCode}},runUpdate=function(){return _async_to_generator(function(){var e,t,r,u;return _ts_generator(this,function(d){switch(d.label){case 0:if(i!==W)return[2];d.label=1;case 1:return d.trys.push([1,3,,5]),n("setLocationLoadingStatus",!0),t=new AbortController,r=setTimeout(function(){return t.abort()},2e4),[4,f.api.locations.update({id:l.zipcode},c,{signal:t.signal}).finally(function(){return clearTimeout(r)})];case 2:if(d.sent(),i!==W)return[2];return o("getCurrentLocation"),null==(e=window.JiffyDeliverTo)||e.updateZipCodeInHeader(l),[3,5];case 3:if(u=d.sent(),i!==W)return[2];return[4,o("getCurrentLocation",{suppressSystemError:!0})];case 4:if(d.sent(),i!==W)return[2];return o("setSystemError",u),[3,5];case 5:return[2]}})})()},u=Q.then(runUpdate,runUpdate);return Q=u.then(function(){},function(){}),u},getCurrentLocation:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u,d,p,_,h,m,g;return _ts_generator(this,function(y){switch(y.label){case 0:r=e.commit,n=e.dispatch,i=void 0!==(o=(null!=t?t:{}).suppressSystemError)&&o,q+=1,l=q,c=W,u=function(e,t){V=e,r("getCurrentLocationSuccess",t),(t.citySelected||t.cityDefault)&&(J=Promise.resolve(n("shipping/getAllDeliveryDates",{getAddressChangeSeq:getAddressChangeSeq,getAddressChangeSettled:getAddressChangeSettled},{root:!0})),r("setGuestZipcode",t.zipcode),(0,j.registerMixpanel)({zipcode:t.zipcode}))},y.label=1;case 1:return y.trys.push([1,3,4,5]),r("setLocationLoadingStatus",!0),d=new Date().getTime(),p=new AbortController,_=setTimeout(function(){return p.abort()},2e4),[4,f.api.locations.getCurrentLocation({cb:d},void 0,{signal:p.signal}).finally(function(){return clearTimeout(_)})];case 2:return h=y.sent(),m=(0,b.Tm)(h),l===q?c===W?(u(l,m),K=null):dispatchTrackedLocationRefreshAfterAddressChange(n):G===q&&l>V?c===W?u(l,m):dispatchTrackedLocationRefreshAfterAddressChange(n):(!K||l>K.seq)&&(K={seq:l,location:m,addressChangeSeq:c}),[3,5];case 3:if(g=y.sent(),l!==q)return[2];if(G=l,K&&K.seq>V){if(K.addressChangeSeq===c&&c===W)return u(K.seq,K.location),K=null,[2];K=null,dispatchTrackedLocationRefreshAfterAddressChange(n)}else c===W&&r("setLocationStateUnresolved");return i||c!==W||n("setSystemError",g),[3,5];case 4:return l===q&&r("setLocationLoadingStatus",!1),[7];case 5:return[2]}})})()},changeAddress:function(e,t){var r=e.dispatch,n=e.commit,o=e.state,i=t.id;r("prepareToAjax");var l=W+=1,runChange=function(){return l!==W?(n("shipping/setDeliveryLoadingStatus",!1),Promise.resolve(!1)):new Promise(function(t,c){f.api.vueCart.setShipAddress({ship_address_id:i}).then(function(e){if(l!==W){n("shipping/setDeliveryLoadingStatus",!1),t(!1);return}n("changeAddressSuccess",i),r("setCartResponse",e),r("applyTransfersCreditResponse",e),dispatchTrackedLocationRefresh(r);var c,u=(o.cartState.accountAddresses.addresses||[]).find(function(e){return e.id===i});u&&(null==(c=window.JiffyDeliverTo)||c.updateUserAddressInHeader(u.id),(0,j.registerMixpanel)({zipcode:u.zipcode})),t(!0)}
1).catch(function(o){if(l!==W){n("shipping/setDeliveryLoadingStatus",!1),t(!1);return}n("shipping/setDeliveryLoadingStatus",!1),Promise.resolve(r("refreshCartState",{suppressSystemError:!0,ifAddressChangeSeq:l})).then(function(){var t,n=e.state.cartState.accountAddresses.shipAddressId;null!=n&&(null==(t=window.JiffyDeliverTo)||t.updateUserAddressInHeader(n)),l===W&&dispatchTrackedLocationRefresh(r),r("setSystemError",o),c(o)},function(){l===W&&dispatchTrackedLocationRefresh(r),r("setSystemError",o),c(o)})})})},c=Q.then(runChange,runChange);return Q=c.then(function(){},function(){}),c},updatePreCut:function(e,t){var r=e.commit,n=e.dispatch;n("prepareToAjax");var o=(0,M.NS)();return new Promise(function(e,i){f.api.vueCart.preCut(t).then(function(t){if(t.success)if((0,O.HW)(),o===(0,M.NS)()){t.success;var i=_object_without_properties(t,["success"]);n("setCartResponse",i),n("applyTransfersCreditResponse",i),n("shipping/getAllDeliveryDates")}else r("shipping/setDeliveryLoadingStatus",!1),Promise.resolve(n("refreshCartState")).then(function(){return n("shipping/getAllDeliveryDates")},function(){return n("shipping/getAllDeliveryDates")});else r("shipping/setDeliveryLoadingStatus",!1);e(t)}).catch(function(e){r("shipping/setDeliveryLoadingStatus",!1),n("setSystemError",e),i(e)})})},updateProColorOptOut:function(e,t){var r=e.commit,n=e.dispatch;return n("prepareToAjax"),new Promise(function(e,o){f.api.vueCart.procolorOptOut(t).then(function(t){t.success&&((0,g.xy)(),Promise.resolve(n("refreshCartState")).then(function(){return n("shipping/getAllDeliveryDates")},function(){return n("shipping/getAllDeliveryDates")})),e(t)}).catch(function(e){n("setSystemError",e),o(e)}).finally(function(){r("shipping/setDeliveryLoadingStatus",!1)})})},updateArtworkSize:function(e,t){var r=e.commit,n=e.dispatch;return n("prepareToAjax"),new Promise(function(e,o){f.api.vueCart.updateDtfSize(t).then(function(t){t.success?(n("refreshCartState"),e(t)):o(Error(t.error||"Failed to update dimensions"))}).catch(function(e){var t;o(Error((null==(t=e.response)?void 0:t.error)||e.message||"Failed to update dimensions"))}).finally(function(){r("shipping/setDeliveryLoadingStatus",!1),r("setCouponLoadingStatus",!1)})})},addArtworkSize:function(e,t){var r=e.commit,n=e.dispatch;return n("prepareToAjax"),new Promise(function(e,o){f.api.vueCart.addDtfSize(t).then(function(t){if(t.success){var i,l;n("refreshCartState"),r("setAddedArtworkSize",null!=(i=null==(l=t.new_line_item_ids)?void 0:l[0])?i:null),e(t)}else o(Error(t.error||"Failed to add size"))}).catch(function(e){var t;o(Error((null==(t=e.response)?void 0:t.error)||e.message||"Failed to add size"))}).finally(function(){r("shipping/setDeliveryLoadingStatus",!1),r("setCouponLoadingStatus",!1)})})},setCoupon:function(e,t){var r=e.dispatch;return r("prepareToAjax"),new Promise(function(e,n){f.api.vueCart.setCouponCode({coupon_code:t}).then(function(t){r("setCartResponse",t),r("applyTransfersCreditResponse",t),e()}).catch(function(e){r("setSystemError",e),n(e)})})},removeCoupon:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.dispatch;return r("prepareToAjax"),new Promise(function(e,n){f.api.vueCart.removeCouponCode({reason:t}).then(function(t){r("setCartResponse",t),r("applyTransfersCreditResponse",t),e()}).catch(function(e){r("setSystemError",e),n(e)})})},refreshCartState:function(e,t){var r,n=e.commit,o=e.dispatch,i=null!=t?t:{},l=i.ifAddressChangeSeq,c=i.suppressSystemError,u=void 0!==c&&c,d=i.isRetryAttempt;void 0!==d&&d?(n("setCouponLoadingStatus",!0),n("shipping/setDeliveryLoadingStatus",!0)):o("prepareToAjax"),n("setRefreshLoading",!0),n("setCheckoutLoadingStatus",!1);var p=(0,M.NS)(),_=(0,M.sV)(),h=new Date().getTime(),m=(null==(r=performance)?void 0:r.now())||0;return new Promise(function(e,t){f.api.vueCart.getCartState({cb:h}).then(function(r){if(void 0!==l&&l!==W){n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1),e();return}if(p!==(0,M.NS)())return(n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1),(0,M.sV)()===_)?Promise.resolve(o("refreshCartState",{ifAddressChangeSeq:l,suppressSystemError:u,isRetryAttempt:!0})).then(function(){return e()},function(e){return t(e)}):void e();if((0,M.sV)()!==_){if(void 0===l){n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1),e();return}n("updateAccountAddressesFromCart",r.account_addresses),n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1),e();return}(0,O.HW)();var i,c=((null==(i=performance)?void 0:i.now())||0)-m;n("shipping/setChangeDeliveryDateMixpanelData",{earliestTimeToGetDate:c,cartTimeToGetDate:c});var d=r.order_groups,f=null==d?void 0:d.groups;if(Object.keys(null!=f?f:{}).length){o("setCartResponse",r),o("applyTransfersCreditResponse",r),e();return}(0,R.v)()}).catch(function(e){n("setCouponLoadingStatus",!1),n("shipping/setDeliveryLoadingStatus",!1),u||o("setSystemError",e),t(e)}).finally(function(){n("setRefreshLoading",!1)})})},checkCartItems:function(e){var t=e.commit,r=e.getters,n=e.state;function lineItemsChanged(e,t){if(0===Object.keys(e).length)return!0;var r=Object.values(t).flatMap(function(e){return e.lineItems?Object.values(e.lineItems):[]}).reduce(function(e,t){e[t.id]=t.quantity;var r,n,o=null!=(r=null==(n=t.assemblyGroupedItems)?void 0:n.sizeAndQuantity)?r:[];return o.length&&o.forEach(function(t){e[t.lineItemId]=t.quantity}),e},{});return Object.keys(e).some(function(t){return r[t]!==e[t]})}return f.api.vueCart.currentItems().then(function(e){lineItemsChanged(e.items,n.cartState.orderGroups.groups)&&((0,P.d)()||((0,I.e)(),(0,j.track)("multitab_browsing",{order_number:r.orderNumber,item_count:n.cartState.summary.totalItems}),t("pushNotification",{type:"warning",text:"Your cart items are changed. Updating your cart..."}),(0,R.v)()))})},hardRefresh:function(e){var t=e.commit;(0,e.dispatch)("prepareToAjax"),t("setRefreshLoading",!0),(0,R.v)()},setEnhancementPreferences:function(e,t){return _async_to_generator(function(){var e,r,n,o,i,l,c,u,d,p,_,g;return _ts_generator(this,function(b){switch(b.label){case 0:e=t.id,r=t.requestNote,n=t.dtfPrintId,o=t.dtfPrintIds,i=t.callback,l=t.event,b.label=1;case 1:return b.trys.push([1,4,,5]),i("saving"),c={dtf_artwork:{enhancement_request_note:r,enhance_image:!0}}
1,[4,f.api.dtf.updateArtworkRedrawData({id:e},c)];case 2:return b.sent(),u={dtf_print:{enhancement_request_note:r,enhance_image:!0}},[4,Promise.allSettled((d=null!=o?o:[n]).map(function(e){return f.api.dtfPrint.updateRedrawData({id:e},u)}))];case 3:return(p=b.sent().filter(function(e){return"rejected"===e.status})).length>0&&(0,m.notifyError)("Artwork enhancement setting save from cart failed",{params:{failed_count:p.length,total_count:d.length}}),p.length<d.length&&(0,x.Py)("designer_notes_cart",{artwork_id:e,note:r,button_pressed:l}),i("view",0===p.length),[3,5];case 4:return _=b.sent(),(0,h.PH)(_)&&(g=_instanceof(_,Error)?_.message:String(_),(0,m.notifyError)("Artwork enhancement setting save from cart failed",{params:{error_message:g}})),i("view",!1),[3,5];case 5:return[2]}})})()},createLlmRedrawRequest:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u,d,p,_,h,m,g,b,y,v,w,j;return _ts_generator(this,function(k){switch(k.label){case 0:r=e.commit,n=e.dispatch,o=t.artworkId,i=t.initialPrompt,l=t.dtfPrintId,r("setLlmRedrawLoading",{artworkId:o,isLoading:!0}),c=Date.now(),u=800,k.label=1;case 1:return k.trys.push([1,3,4,7]),h={llm_redraw_request:{dtf_artwork_id:o,initial_prompt:i}},l&&(h.dtf_print_id=l),[4,f.api.llmRedrawRequests.create(h)];case 2:return g=(m=k.sent()).id||(null==(d=m.data)?void 0:d.id)||(null==(p=m.llm_redraw_request)?void 0:p.id)||m.llm_redraw_request_id,b=m.clarifying_questions||(null==(_=m.data)?void 0:_.clarifying_questions)||[],r("setLlmRedrawRequest",{artworkId:o,data:{llmRedrawRequestId:g,initialPrompt:i,questions:b.map(function(e){return{title:e.question||e.text||e.title,options:e.options||[],answer:null}}),currentState:b.length>0?"questions":"final"}}),[2,{llmRedrawRequestId:g,clarifyingQuestions:b}];case 3:throw v=_instanceof(y=k.sent(),Error)?y.message:String(y),n("setSystemError",v||"Failed to process your instructions"),y;case 4:if(w=Date.now()-c,!((j=u-w)>0))return[3,6];return[4,new Promise(function(e){setTimeout(e,j)})];case 5:k.sent(),k.label=6;case 6:return r("setLlmRedrawLoading",{artworkId:o,isLoading:!1}),[7];case 7:return[2]}})})()},updateLlmRedrawRequest:function(e,t){var r=e.commit,n=e.dispatch,o=t.artworkId,i=t.llmRedrawRequestId,l=t.followUpData,c=t.dtfPrintId;r("setLlmRedrawLoading",{artworkId:o,isLoading:!0});var u=Date.now(),d={llm_redraw_request:{follow_up_questions_and_responses:l}};return c&&(d.dtf_print_id=c),f.api.llmRedrawRequests.update({id:i},d).then(function(){r("updateLlmRedrawRequestState",{artworkId:o,currentState:"final"})}).catch(function(e){throw n("setSystemError",(_instanceof(e,Error)?e.message:String(e))||"Failed to save your answers"),e}).finally(function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:if(!((e=800-(Date.now()-u))>0))return[3,2];return[4,new Promise(function(t){setTimeout(t,e)})];case 1:t.sent(),t.label=2;case 2:return r("setLlmRedrawLoading",{artworkId:o,isLoading:!1}),[2]}})})()})},updateLlmRedrawQuestionAnswer:function(e,t){var r,n=e.commit,o=e.state,i=t.artworkId,l=t.questionIndex,c=t.answer,u=_to_consumable_array((null==(r=o.cartState.llmRedrawRequests.byArtworkId[i])?void 0:r.questions)||[]);u[l]&&(u[l].answer=c,n("setLlmRedrawQuestions",{artworkId:i,questions:u}))},resetLlmRedrawRequest:function(e,t){(0,e.commit)("clearLlmRedrawRequest",t)},fetchMatchingProduct:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:r=e.commit,n=e.state,o=t,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,f.api.vueCart.fetchMatchingProduct({catalog_number:o.catalogId,composition_id:o.compositionId,line_item_id:n.cartState.browseCustomShirtsLineItemId})];case 2:return i=u.sent(),l=(0,b.Tm)(i),r("setMatchingProduct",l),[2,l];case 3:throw console.error("Error fetching matching product:",c=u.sent()),c;case 4:return[2]}})})()},handleBrowseCustomShirts:function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){return(0,e.commit)("setBrowseCustomShirtsLineItemId",t),[2,t]})})()},initializeLlmRedrawRequest:function(e,t){var r=e.commit,n=t.artworkId,o=t.enhancementNote,i=t.llmRedrawRequestId;r("setLlmRedrawRequest",o?{artworkId:n,data:{llmRedrawRequestId:i||null,initialPrompt:o,questions:[],currentState:"final"}}:{artworkId:n,data:{llmRedrawRequestId:null,initialPrompt:"",questions:[],currentState:"initial"}})},setSystemError:function(e,t){var r,n,o=e.commit,i=e.dispatch,l=(0,h.PH)(t),c=!_instanceof(t,Error)||"number"!=typeof t.status;_instanceof(t,Error)?(r=t.message,n=t.response,500===t.status&&scheduleDeliveryRetryOn500(i)):r=t,o("setSystemError",{message:r,reportable:l,response:n,statusLess:c})}}),_define_property(o,"plugins",E.A),_define_property(o,"modules",{dtfBogo:N.A,savedCarts:T.A,shipping:M.Ay,payments:D.A}),o));S.EventBus.on(S.Events.SAVED_CARTS_LOADED,function(e,t){et.dispatch("savedCarts/updateFromEventBus",t)});var er=(0,i.createContext)(et),en=er.Provider,useStore=function(){return(0,i.useContext)(er).useStore()};let eo=et},88051(e,t,r){"use strict";r.d(t,{KT:()=>deliveryOptionsPath,Ln:()=>o,QD:()=>cartPath,Sz:()=>setCartPage,Uh:()=>l,WK:()=>isSecondaryCartPage,_x:()=>isTwoPageCartActive,cZ:()=>c,dT:()=>setTwoPageCartEligible,mp:()=>isPaymentPage,q9:()=>paymentPath,xX:()=>getTwoPageCartEligible,y3:()=>isDeliveryOptionsPage});var n="cart",o="delivery_options",i="payment",l="Delivery",c="Payment",u="/cart/delivery-options",d="/cart/payment",p=n;function setCartPage(e,t){if(e===o||e===i){p=e;return}if(e){p=n;return}p=(null==t?void 0:t.endsWith(d))?i:(null==t?void 0:t.endsWith(u))?o:n}function isDeliveryOptionsPage(){return p===o}function isPaymentPage(){return p===i}function isSecondaryCartPage(){return isDeliveryOptionsPage()||isPaymentPage()}var f=!1;function setTwoPageCartEligible(e){f=!!e}function getTwoPageCartEligible(){return f}function isTwoPageCartActive(e){return!!e}function storePrefix(e){return"ca"===e?"/ca":""}function cartPath(e){return"".concat(storePrefix(e)).concat("/cart")}function deliveryOptionsPath(e){return"".concat(storePrefix(e)).concat(u)}function paymentPath(e){return"".concat(storePrefix(e)).concat(d)}},57473(e,t,r){"use strict";r.d(t,{A:()=>CheckBox});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function CheckBox(e){var t=e.style,r=void 0===t?"default":t,i=e.label,l=void 0===i?"":i,c=e.disable,u=void 0!==c&&c,d=e.children,p=_object_without_properties(e,["style","label","disable","children"]);function dynamicClasses(){return(0,o.cn)("gray"===r&&"check-box--gray","reverse-gray"===r&&"check-box--reverse-gray","app-gray"===r&&"check-box--app-gray")}return(0,n.jsxs)("label",_object_spread_props(_object_spread({},p),{className:(0,o.cn)("check-box scope-ecd8145a",dynamicClasses(),p.className),"data-testid":"check-box",children:[d,(0,n.jsx)("span",{className:(0,o.cn)("check-box__slider scope-ecd8145a",u&&"check-box__slider--disabled")}),l?(0,n.jsx)("span",{className:(0,o.cn)("check-box__label scope-ecd8145a",u&&"check-box__label--disabled"),children:l}):null]}))}},544273(e,t,r){"use strict";r.d(t,{A:()=>ArtworkEnhancementFeedback});var n=r(483134),o=r(293534),i=r(433769),l=r(538896),c=r(723433),u=r(913774),d=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkEnhancementFeedback(e){var t=e.artwork,r=e.pageType,p=_object_without_properties(e,["artwork","pageType"]),f=l.dtfStore,_=_sliced_to_array((0,o.useState)(t.enhancementSatisfied),2),h=_[0],m=_[1],g=_sliced_to_array((0,o.useState)(!1),2),b=g[0],y=g[1],v=_sliced_to_array((0,o.useState)(!1),2),w=v[0],j=v[1];function handleThumbsUp(){markFeedbackSubmitted(!0,!0),triggerTracking("dtf_satisfaction_positive_clicked",{artworkId:t.id,pageType:r})}function handleThumbsDown(){t.enhancementRatingSubmitted||(triggerTracking("dtf_satisfaction_negative_clicked",{artworkId:t.id,pageType:r}),j(!0))}function handleFeedbackModalSubmit(e){markFeedbackSubmitted(!0,!1),triggerTracking("dtf_satisfaction_feedback",{artworkId:t.id,message:e,pageType:r}),j(!1)}function handleFeedbackModalClose(){j(!1),m(null)}function triggerTracking(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){return(0,i.track)(e,t),[2]})})()}function markFeedbackSubmitted(e,r){f.updateArtworkValuesById({id:t.id,enhancementFeedbackSubmitted:e,enhancementRatingSubmitted:!0,enhancementSatisfied:r}),m(r),y(!!(r||e))}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},p),{className:(0,d.cn)("artwork-feedback scope-3f92dd41",p.className),children:[b||t.enhancementFeedbackSubmitted&&t.enhancementRatingSubmitted?(0,n.jsxs)("div",{className:"artwork-feedback__thankyou scope-3f92dd41",children:[(0,n.jsx)(c.A,{class:"scope-3f92dd41",icon:"check-circle-primary",width:"24",height:"24","data-testid":"use-svg"}),(0,n.jsx)("span",{className:"scope-3f92dd41",children:"Thank y
1ou for your feedback!"})]}):w?null:(0,n.jsxs)("div",{className:"artwork-feedback__header scope-3f92dd41",children:[(0,n.jsx)("div",{className:"artwork-feedback__question scope-3f92dd41",children:"Happy with your image?"}),(0,n.jsxs)("div",{className:"artwork-feedback__actions scope-3f92dd41",children:[(0,n.jsx)("button",{className:"artwork-feedback__thumb artwork-feedback__thumb-positive scope-3f92dd41",type:"button","aria-label":"Satisfied",disabled:t.enhancementRatingSubmitted,onClick:function(e){e.preventDefault(),handleThumbsUp(e)},"data-testid":"artwork-feedback-thumb",children:(0,n.jsx)("span",{className:"artwork-feedback__thumb-positive-icon-container scope-3f92dd41",children:(0,n.jsx)(c.A,{class:"scope-3f92dd41",icon:"thumbs-up-green",width:"24",height:"24","data-testid":"use-svg-1"})})}),(0,n.jsx)("button",{className:(0,d.cn)("scope-3f92dd41","artwork-feedback__thumb artwork-feedback__thumb-negative",!1===h&&"artwork-feedback__thumb-negative--active"),type:"button","aria-label":"Not satisfied",onClick:function(e){e.preventDefault(),handleThumbsDown(e)},"data-testid":"artwork-enhancement-feedback-button",children:(0,n.jsx)("span",{className:"artwork-feedback__thumb-negative-icon-container scope-3f92dd41",children:(0,n.jsx)(c.A,{class:"artwork-feedback__thumb-negative-icon scope-3f92dd41",icon:"thumbs-down",width:"24",height:"24","data-testid":"artwork-feedback-thumb-negative-icon"})})})]})]}),w?(0,n.jsx)(u.A,{class:"scope-3f92dd41",onSubmit:handleFeedbackModalSubmit,onClose:handleFeedbackModalClose,"data-testid":"artwork-feedback-modal"}):null]}))}},913774(e,t,r){"use strict";r.d(t,{A:()=>ArtworkFeedbackModal});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var u=[{value:"Background Removal",label:"Background Removal"},{value:"Image Blurriness",label:"Image Blurriness"}];function ArtworkFeedbackModal(e){var t=e.onSubmit,r=e.onClose,d=_object_without_properties(e,["onSubmit","onClose"]),p=(0,o.useRef)(null),f=_sliced_to_array((0,o.useState)(null),2),_=f[0],h=f[1],m=_sliced_to_array((0,o.useState)(!1),2),g=m[0],b=m[1];function options(){return u}function handleClose(){$(document).off("keydown.feedbackModal"),$(p.current).modal("hide"),b(!0),h(null),r()}function handleSubmit(){_&&(t(_),$(p.current).modal("hide"),b(!0),h(null))}function onShow(){var e=$(p.current);e.modal("show").on("hidden.bs.modal",function(){e.off("hidden.bs.modal"),g||r()}),$(document).on("keydown.feedbackModal",function(e){"Escape"===e.key&&handleClose()})}return(0,o.useEffect)(function(){onShow()},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},d),{className:(0,i.cn)("modal artwork-feedback-modal scope-03adaafb",d.className),ref:p,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",{className:"artwork-feedback-modal__modal-box modal-dialog scope-03adaafb",children:[(0,n.jsxs)("div",{className:"artwork-feedback-modal__modal-header scope-03adaafb",children:[(0,n.jsxs)("div",{className:"artwork-feedback-modal__header-content scope-03adaafb",children:[(0,n.jsx)("h2",{className:"artwork-feedback-modal__modal-title scope-03adaafb",children:"Let's make it right!"}),(0,n.jsxs)("h3",{className:"artwork-feedback-modal__modal-subtitle scope-03adaafb",children:[" ","Tell us what didn't go as expected so we can fix it."," "]})]}),(0,n.jsx)("button",{className:"artwork-feedback-modal__modal-button-close scope-03adaafb",type:"button",onClick:handleClose,"data-testid":"artwork-feedback-modal-modal-button-close",children:(0,n.jsx)(l.A,{className:"artwork-feedback-modal__close-icon scope-03adaafb",icon:"modal-close-big","data-testid":"artwork-feedback-modal-close-icon"})})]}),(0,n.jsx)("div",{className:"artwork-feedback-modal__modal-body scope-03adaafb",children:(0,n.jsxs)("fieldset",{className:"artwork-feedback-modal__fieldset scope-03adaafb","aria-labelledby":"artwork-feedback-legend","data-testid":"artwork-feedback-modal-fieldset",children:[(0,n.jsxs)("legend",{className:"artwork-feedback-modal__legend scope-03adaafb",id:"artwork-feedback-legend","data-testid":"artwork-feedback-modal-legend",children:[" ","Please choose primary issue:"," "]}),(0,n.jsx)("div",{className:"artwork-feedback-modal__options-container scope-03adaafb",children:(0,n.jsx)("div",{className:"artwork-feedback-modal__options scope-03adaafb",children:(0,c.p)(options(),function(e){return(0,n.jsxs)("label",{className:"artwork-feedback-modal__option scope-03adaafb","data-testid":"artwork-feedback-modal-option",children:[(0,n.jsx)("input",{className:"artwork-feedback-modal__radio scope-03adaafb",type:"radio",checked:_===e.value,onInput:function(e){h(e.target.value)},value:e.value,name:"artwork-feedback","data-testid":"artwork-feedback-modal-radio"}),(0,n.jsx)("span",{className:"artwork-feedback-modal__option-label scope-03adaafb",children:e.label})]},e.value)})})})]})}),(0,n.jsx)("div",{className:"artwork-feedback-modal__modal-footer scope-03adaafb",children:(0,n.jsxs)("div",{className:"artwork-feedback-modal__actions scope-03adaafb",children:[(0,n.jsxs)("button",{className:"artwork-feedback-modal__cancel scope-03adaafb",type:"button",onClick:handleClose,"data-testid":"artwork-feedback-modal-cancel",children:[" ","Cancel"," "]}),(0,n.jsxs)("button",{className:"artwork-feedback-modal__submit scope-03adaafb",type:"button",disabled:!_,onClick:handleSubmit,"data-testid":"artwork-feedback-modal-submit",children:[" ","Send Feedback"," "]})]})})]})}))}},202529(e,t,r){"use strict";r.d(t,{A:()=>Artwork});var n=r(483134),o=r(293534),i=r(700198),l=r(556671),c=r(986889),u=r(544273),d=r(723433),p=r(52554),f=r(112281),_=r(683164),h=r(956288),m=r(474266),g=r(952406),b=r(819170),y=r(970021),v=r(834497),w=r(153035),j=r(138024),k=r(340382),x=r(996821),S=r(817200),O=r(538896),P=r(2605),A=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var C=[{label:"Background",icon:"tools-background",value:"background"},{label:"Border",icon:"tools-border",value:"border"}];function Artwork(e){var t=e.artwork,r=void 0===t?null:t,I=e.index,E=e.currentStore,N=void 0===E?null:E,D=e.isMultiUpload,T=void 0!==D&&D,M=e.showFullScreenButton,R=e.defaultActiveConfigSection,F=e.showFreeTransfersBadge,L=_object_without_properties(e,["artwork","index","currentStore","isMultiUpload","showFullScreenButton","defaultActiveConfigSection","showFreeTransfersBadge"]),B=(0,O.useDtfStore)(),z=_sliced_to_array((0,o.useState)(null),2),U=(z[0],z[1]),H=_sliced_to_array((0,o.useState)(null),2),q=(H[0],H[1]),V=_sliced_to_array((0,o.useState)(null),2),G=(V[0],V[1]),K=_sliced_to_array((0,o.useState)(void 0===R?"jiffy-print-perfect":R),2),W=K[0],Q=K[1],J=(0,o.useRef)(null),Z=(0,o.useRef)(null),Y=(0,o.useRef)(null);function printAsIs(){return B.printAsIs}function pdpType(){return B.pdpType}function sizeErrorTypes(){return B.sizeErrorTypes}function sticker(){return B.sticker}function minStickerQuantity(){return B.minStickerQuantity}function isPuff(){return B.isPuff}function isSpangle(){return B.isSpangle}function isSticker(){return B.isSticker}function experiments(){return B.experiments}function dripBuilderIsTheFlow(){return(0,P.CI)(B)}function hideBorderPresets(){return dripBuilderIsTheFlow()||(0,P.XA)(r)}function hideSizeInputs(){return dripBuilderIsTheFlow()&&!hasArtwork()}function showRedrawUI(){return B.showRedrawUI}function showMultiSize(){return B.showMultiSize}function isStandardArtwork(){return B.isStandardArtwork}function enableAbAiMonetization(){return B.enableAbAiMonetization}function reorderEnabled(){return B.reorderEnabled}function paidExpertEditAddonEnabled(){return B.paidExpertEditAddonEnabled}function lastConfirmedConfigSection(){return B.lastConfirmedConfigSection}function metadata(){return null==r?void 0:r.metadata}function withError(){var e,t;return(null==(t=metadata())||null==(e=t.errors)?void 0:e.length)>0||(null==r?void 0:r.errorMessage)||(null==r?void 0:r.uploadError)||(null==r?void 0:r.retryFailed)}function isMultiSizeError(){return null==r?void 0:r.isMultiSizeError}function hasArtwork(){return r&&!r.isSimulated&&!r.uploadError}function hasErrorMessage(){return r&&!r.isSimulated&&withError()&&!isMultiSizeError()}
1function isMinQuantityInvalid(){return(sticker()||isPuff()||isSpangle())&&(null==r?void 0:r.quantity)&&(null==r?void 0:r.quantity)<minStickerQuantity()}function isGenericErrorVisible(){return withError()||isMinQuantityInvalid()}function headerIcon(){return isGenericErrorVisible()?"strong-info":"check-circle-bold"}function warningMessage(){var e,t;return null==r||null==(t=r.metadata)||null==(e=t.warnings)?void 0:e.human}function showReuploadBox(){var e;return!sizeErrorTypes().includes(null==(e=r.errorType)?void 0:e.toString())&&withError()}function isArtworkUploaded(){var e=parseInt(null==r?void 0:r.id,10);return!Number.isNaN(e)&&"number"==typeof e&&!(null==r?void 0:r.isLoading)}function disableCustomSizeInput(){return isStandardArtwork()&&!(null==r?void 0:r.enhancementCompleted)}function showRedrawNote(){return!isStandardArtwork()&&showRedrawUI()}function displayEnhancementFeedback(){return enableAbAiMonetization()&&r.id&&r.enhancementCompleted&&"full_enhancements"===r.enhancementTier}function addFilesToQueue(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.addFilesToQueue.apply(B,_to_consumable_array(t))}function updateArtworkValuesById(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.updateArtworkValuesById.apply(B,_to_consumable_array(t))}function getArtworksPricing(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.getArtworksPricing.apply(B,_to_consumable_array(t))}function handleDesignServiceClick(){r.hasExpertEditAddon||(updateArtworkValuesById({id:r.id,hasExpertEditAddon:!0,enhancementNote:""}),getArtworksPricing()),queueMicrotask(function(){var e,t=null==(e=J.current)?void 0:e.querySelector(".js-custom-notes-textarea");t?(t.focus(),t.scrollIntoView({behavior:"smooth",block:"center"})):Y.current&&Y.current.focusTextarea()})}function onDimensionsChange(e){var t=e.height,r=e.width;q(t),U(r)}function onQtyChange(e){G(e)}function handleFileChange(e){var t=e.target.files;t.length&&(addFilesToQueue({files:t,isDropEvent:!1,artworkIndex:I}),Z.current.value="")}function handleSetActiveConfigSection(e){Q(e)}return(0,o.useEffect)(function(){var e=lastConfirmedConfigSection();e&&String(e.artworkId)===String(null==r?void 0:r.id)&&Q(e.section)},[null==r?void 0:r.id]),(0,n.jsxs)("div",_object_spread_props(_object_spread({ref:J},L),{"data-testid":"transfers-artwork-info",className:(0,A.cn)("artwork scope-f5593a09",isGenericErrorVisible()&&"artwork--with-error",null==L?void 0:L.className),children:[(0,n.jsx)("input",{ref:Z,type:"file",style:{display:"none"},onChange:handleFileChange}),r?(0,n.jsxs)("div",{className:(0,A.cn)("artwork__header scope-f5593a09",isGenericErrorVisible()&&"artwork__header--with-error"),children:[(0,n.jsx)("div",{className:"artwork__header-icon-wrapper scope-f5593a09",children:metadata()||isGenericErrorVisible()?(0,n.jsx)(d.A,{className:"artwork__header-icon scope-f5593a09",icon:headerIcon(),"data-testid":"artwork-header-icon"}):null}),(0,n.jsx)("span",{className:"artwork__header-text scope-f5593a09",children:(0,P.PB)(r,B.isDieCutSticker)})]}):null,(0,n.jsxs)("div",{className:"artwork__content scope-f5593a09",children:[(0,n.jsx)(y.A,{className:"artwork__sizes scope-f5593a09",isMultiUpload:T,artwork:r,index:I,"data-testid":"artwork-sizes"}),(0,n.jsxs)("div",{className:"scope-f5593a09",children:[(0,n.jsx)(p.A,{className:"artwork__image scope-f5593a09",index:I,artwork:r,isMultiUpload:T,activeConfigSection:W,showFullScreenButton:void 0!==M&&M,"data-testid":"artwork-image"}),isStandardArtwork()&&!hasErrorMessage()&&hasArtwork()?(0,n.jsxs)("div",{className:"artwork__quality-config scope-f5593a09",children:[displayEnhancementFeedback()&&paidExpertEditAddonEnabled()&&!T?(0,n.jsx)(f.A,{className:"scope-f5593a09",onDesignServiceClicked:handleDesignServiceClick,"data-testid":"design-service-promo"}):null,displayEnhancementFeedback()&&!T?(0,n.jsx)(u.A,{className:"scope-f5593a09",artwork:r,pageType:pdpType(),"data-testid":"artwork-enhancement-feedback"}):null,enableAbAiMonetization()?(0,n.jsx)(h.A,{className:"scope-f5593a09",index:I,artwork:r,reorderEnabled:reorderEnabled(),activeConfigSection:W,paidExpertEditAddonEnabled:paidExpertEditAddonEnabled(),isMultiUpload:T,onSetActiveConfigSection:handleSetA
1ctiveConfigSection,"data-testid":"artwork-quality-config-panel-ab-ai-monetization"}):(0,n.jsx)(_.A,{className:"scope-f5593a09",index:I,artwork:r,activeConfigSection:W,isMultiUpload:T,onSetActiveConfigSection:handleSetActiveConfigSection,"data-testid":"artwork-quality-config-panel"})]}):null]}),(0,n.jsxs)("div",{className:(0,A.cn)("artwork__info scope-f5593a09",showMultiSize()&&"artwork__info--multi-size-presets"),children:[isArtworkUploaded()&&isSticker()&&experiments().stickers_style_options&&!(0,P.yJ)(B,r)?(0,n.jsx)(i.A,{className:"artwork__tabs scope-f5593a09",tabs:hideBorderPresets()?C.filter(function(e){return"border"!==e.value}):C,artwork:r,slots:{default:function(e){var t=e.tab;return(0,n.jsx)(n.Fragment,{children:"background"===t?(0,n.jsx)(c.A,{className:"artwork__section scope-f5593a09",artwork:r,"data-testid":"artwork-section"}):"border"===t?(0,n.jsx)(l.A,{className:"artwork__section scope-f5593a09",artwork:r,"data-testid":"artwork-section-1"}):null})}},"data-testid":"artwork-tabs"}):null,(0,n.jsx)(y.A,{className:"artwork__sizes artwork__sizes--desktop scope-f5593a09",artwork:r,isMultiUpload:T,index:I,"data-testid":"artwork-sizes-1"}),!withError()&&warningMessage()?(0,n.jsx)(j.A,{className:"scope-f5593a09","data-testid":"artwork-notification",children:(0,n.jsx)("b",{className:"scope-f5593a09",children:warningMessage()})}):null,hasErrorMessage()?(0,n.jsx)(w.A,{className:"scope-f5593a09",artwork:r,currentStore:N,index:I,"data-testid":"artwork-error"}):null,showRedrawNote()?(0,n.jsx)(x.A,{ref:Y,index:I,enhancementNote:r.enhancementNote,isMultiUpload:T}):null,showReuploadBox()?dripBuilderIsTheFlow()?null:(0,n.jsx)(k.A,{className:"scope-f5593a09",index:I,"data-testid":"reupload-box"}):(0,n.jsxs)("div",{className:"scope-f5593a09",children:[showMultiSize()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h3",{className:"artwork__multi-size-title scope-f5593a09",children:"Set Design Size"}),(0,n.jsx)(g.A,{className:"scope-f5593a09",artwork:r,index:I,disabled:r.isFile||disableCustomSizeInput(),readonly:printAsIs()&&!!metadata(),isMultiUpload:T,showFreeTransfersBadge:void 0!==F&&F,"data-testid":"artwork-multi-dimensions"}),(0,n.jsx)(S.A,{className:"scope-f5593a09",index:I,isMultiUpload:T,"data-testid":"multi-size-total"})]}):(0,n.jsxs)(n.Fragment,{children:[hideSizeInputs()?null:(0,n.jsx)(m.A,{className:"scope-f5593a09",artwork:r,index:I,disabled:r.isFile||disableCustomSizeInput(),readonly:printAsIs()&&!!metadata(),currentStore:N,isMultiUpload:T,onOnChange:onDimensionsChange,"data-testid":"artwork-dimensions"}),(0,n.jsx)(b.A,{className:"artwork__qty scope-f5593a09",artwork:r,index:I,disabled:r.isFile,readonly:printAsIs()&&!!metadata(),isMultiUpload:T,onChange:onQtyChange,"data-testid":"artwork-qty"})]}),isArtworkUploaded()&&!isStandardArtwork()?(0,n.jsx)(v.A,{className:"artwork__trim-info scope-f5593a09",id:r.id,artwork:r,canRemoveBg:r.canRemoveBg,removeBackground:r.removeBackground,toggleBackgroun
1dError:r.toggleBackgroundError,reverse:!0,"data-testid":"artwork-trim-info"}):null]})]})]})]}))}},18339(e,t,r){"use strict";r.d(t,{A:()=>ArtworkAlert});var n=r(483134),o=r(538896),i=r(723433),l=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkAlert(e){var t=e.children,r=_object_without_properties(e,["children"]),c=(0,o.useDtfStore)();function showNewGangSheetErrorMessage(){return c.showNewGangSheetErrorMessage}return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,l.cn)("artwork-alert scope-dc7770ac",null==r?void 0:r.className),children:(0,n.jsxs)("div",{className:(0,l.cn)("scope-dc7770ac",showNewGangSheetErrorMessage()?"artwork-alert__new-container":"artwork-alert__container"),children:[showNewGangSheetErrorMessage()?null:(0,n.jsx)("div",{className:"artwork-alert__icon scope-dc7770ac",children:(0,n.jsx)(i.A,{className:"artwork-alert__warning scope-dc7770ac",icon:"warning","data-testid":"artwork-alert-warning"})}),(0,n.jsx)("div",{className:"artwork-alert__message scope-dc7770ac",children:t})]})}))}},474266(e,t,r){"use strict";r.d(t,{A:()=>ArtworkDimensions});var n=r(483134),o=r(293534),i=r(997252),l=r(467265),c=r(382409),u=r(745063),d=r(68977),p=r(724005),f=r.n(p),_=r(723433),h=r(556726),m=r(739161),g=r(127391),b=r(740355),y=r(338908),v=r(538896),w=r(298210);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkDimensions(e){var t,r,p,j,k,x,S=e.artwork,O=void 0===S?null:S,P=e.index,A=void 0===P?0:P,C=e.disabled,I=void 0!==C&&C,E=e.readonly,N=void 0!==E&&E,D=e.widthDefault,T=void 0===D?null:D,M=(e.currentStore,e.isMultiUpload),R=void 0!==M&&M,F=e.stepNumber,L=e.stepCompleted,B=e.stepTotal,z=_object_without_properties(e,["artwork","index","disabled","readonly","widthDefault","currentStore","isMultiUpload","stepNumber","stepCompleted","stepTotal"]),U=(0,y.s)().n,H=_
1sliced_to_array((0,o.useState)(null),2),q=H[0],V=H[1],G=_sliced_to_array((0,o.useState)(null),2),K=G[0],W=G[1],Q=_sliced_to_array((0,o.useState)(null),2),J=Q[0],Z=Q[1],Y=_sliced_to_array((0,o.useState)(null),2),X=Y[0],ee=Y[1],et=_sliced_to_array((0,o.useState)(!0),2),er=et[0],en=et[1],eo=_sliced_to_array((0,o.useState)(!0),2),ea=eo[0],ei=eo[1],es=_sliced_to_array((0,o.useState)({width:null,height:null}),2),el=es[0],ec=es[1],eu=_sliced_to_array((0,o.useState)(!1),2),ed=eu[0],ep=eu[1],ef=v.useDtfStore.useValue,e_={artworks:ef("artworks"),businessLine:ef("businessLine"),dtfMaxHeight:ef("dtfMaxHeight"),dtfMaxWidth:ef("dtfMaxWidth"),printAsIsMaxHeight:ef("printAsIsMaxHeight"),dtfMinHeight:ef("dtfMinHeight"),dtfMinWidth:ef("dtfMinWidth"),errorTypes:ef("errorTypes"),isProColor:ef("isProColor"),isPuff:ef("isPuff"),isSpangle:ef("isSpangle"),isStandardArtwork:ef("isStandardArtwork"),pdpType:ef("pdpType"),preCut:ef("preCut"),printAsIs:ef("printAsIs"),showModal:ef("showModal"),showStepsUI:ef("showStepsUI"),simulation:ef("simulation"),sticker:ef("sticker"),variantId:ef("variantId"),downscaleOriginalImage:ef("downscaleOriginalImage"),getArtworksPricing:ef("getArtworksPricing"),reindexArtworks:ef("reindexArtworks"),setValidationErrorMessage:ef("setValidationErrorMessage"),updateArtworkValues:ef("updateArtworkValues"),updatePdpDates:ef("updatePdpDates"),updatePreviewDpi:ef("updatePreviewDpi")},eh=(0,g.o3)(),em=(0,o.useRef)(O),eg=(0,o.useRef)(null);function variantId(){return e_.variantId}function simulation(){return e_.simulation}function printAsIs(){return e_.printAsIs}function isPuff(){return e_.isPuff}function pdpType(){return e_.pdpType}function showModal(){return e_.showModal}function dtfMaxWidth(){return e_.dtfMaxWidth}function dtfMaxHeight(){return e_.dtfMaxHeight}function printAsIsMaxHeight(){var e;return null!=(e=e_.printAsIsMaxHeight)?e:w.Je}function dtfMinWidth(){return e_.dtfMinWidth}function dtfMinHeight(){return e_.dtfMinHeight}function errorTypes(){return e_.errorTypes}function isSpangle(){return e_.isSpangle}function sticker(){return e_.sticker}function businessLine(){return e_.businessLine}function showStepsUI(){return e_.showStepsUI}function isStandardArtwork(){return e_.isStandardArtwork}function isProColor(){return e_.isProColor}function artworks(){return e_.artworks}function spangleSizeEdited(){return eh.spangleSizeEdited}function isInitialSpangle(){return eh.isInitialSpangle}function validationError(){return null==O?void 0:O.errorMessage}function validationErrorType(){return null==O?void 0:O.errorType}function lockHeight(){return printAsIs()&&!showModal()&&!!metadata()}function readonlyHeight(){return showModal()&&printAsIs()?N:!!lockHeight()&&N}function minDpi(){var e;return printAsIs()?w.FK:(null==(e=metadata())?void 0:e.upscalingEnabled)?Number(metadata().qualityUpscaleDpi):w.Jh}function pricing(){return(null==O?void 0:O.isFile)?simulation():(null==O?void 0:O.pricing)||simulation()}function priceInch(){var e;return(null==(e=pricing())?void 0:e.pricePerInch)?Number(pricing().pricePerInch).toFixed(4):null}function totalPrice(){var e;return(null==(e=pricing())?void 0:e.transferPrice)?Number(pricing().transferPrice).toFixed(2)||"":null}function widthId(){return"artwork[".concat(A,"][variants][").concat(variantId(),"][width]")}function heightId(){return"artwork[".concat(A,"][variants][").concat(variantId(),"][height]")}function metadata(){var e=O||{},t=e.removeBackground,r=e.metadata,n=e.withBgMetadata;return n&&0!==Object.keys(n).length?t?r:n:r}function width(){var e;return(null==O||null==(e=O.previewMetadata)?void 0:e.widthInch)||(null==O?void 0:O.width)||T}function height(){var e=null==O?void 0:O.height;return printAsIs()&&metadata()?O.lengthFoot:e}function heightLabel(){var e=printAsIs()?"":"(inches)",t=printAsIs()?"Length (feet)":"Height";return showBorderUI()?t:"".concat(t," ").concat(e)}function showPaddingNote(){return!isSpangle()&&!printAsIs()&&!isPuff()}function paddingNote(){return sticker()?"Padding for easy peeling is added for free":"Extra border added automatically — makes cutting to shape fast and clean"}function heightName(){return printAsIs()?"length":"height"}function minWidthSetting(){return printAsIs()?w.Ai:dtfMinWidth()}function isWidthAndHeightValid(){return""!==width()&&Number(width())>=minWidth()&&""!==height()&&Number(height())>=minHeight()}function fitsGangSheet(){var e,t;return""!==width()&&""!==height()&&Math.min(width(),height())<=(null==(e=metadata())?void 0:e.maxSheetWidth)&&Math.max(width(),height())<=(null==(t=metadata())?void 0:t.maxSheetHeight)}function imageMetadataInfo(){return metadata()?{aspect_ratio:metadata().aspectRatio,resolution_width:metadata().width,resolution_height:metadata().height,width:width(),height:height(),max_width:metadata().maxWidth,max_height:metadata().maxHeight,max_sheet_width:metadata().maxSheetWidth,max_sheet_height:metadata().maxSheetHeight,min_dpi:minDpi(),file_name:O.name,file_size:O.fileSize,file_type:O.fileType}:null}function isUpscaleThresholdExceeded(){if(isSpangle())return!1;var e=O.originalWidth,t=O.originalHeight,r=O.width,n=O.height;if(!e||!t||!r||!n)return!1;var o=parseFloat(r),i=parseFloat(n);return Math.min((o/e).toFixed(2),(i/t).toFixed(2))>w.E8}function minSizeForProduct(){if(null===width()||void 0===width()||""===width()||null===height()||void 0===height()||""===height())return!0;var e=Number(width()),t=Number(height());return!!(Number.isNaN(e)||Number.isNaN(t))||(isSpangle()?e>=dtfMinWidth()&&t>=dtfMinHeight():sticker()?e>=w.aW&&t>=w.aW:isPuff()?e>=w.Yu.width&&t>=w.Yu.height:e>=dtfMinWidth()&&t>=dtfMinHeight())}function label(){return isPuff()||sticker()?"Select size":isSpangle()?"Design size":null}
1function isInvalid(){return showBorderUI()&&validationError()&&(!ea||!er)}function showBorderUI(){return showStepsUI()&&!R}function editType(){return ed?"Size Adjustment":(null==O?void 0:O.enhanceImage)?"Jiffy Print Perfect":"Print as uploaded"}function minWidth(){return isPuff()?w.Yu.width:w.aW}function minHeight(){return isPuff()?w.Yu.height:w.aW}function minDimensions(){return isPuff()?{width:w.Yu.width,height:w.Yu.height}:{width:minWidthSetting(),height:dtfMinHeight()}}function updateArtworkValues(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.updateArtworkValues.apply(e_,_to_consumable_array(t))}function setValidationErrorMessage(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.setValidationErrorMessage.apply(e_,_to_consumable_array(t))}function setSpangleMode(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eh.setSpangleMode.apply(eh,_to_consumable_array(t))}function getArtworksPricing(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.getArtworksPricing.apply(e_,_to_consumable_array(t))}function updatePdpDates(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.updatePdpDates.apply(e_,_to_consumable_array(t))}function updatePreviewDpi(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.updatePreviewDpi.apply(e_,_to_consumable_array(t))}function downscaleOriginalImage(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return e_.downscaleOriginalImage.apply(e_,_to_consumable_array(t))}function handleInput(e,t){var r=t.target.value;printAsIs()&&"height"===e&&r>w.Yg&&(r=w.Yg),autoFillInputs(e,r)}function handleInputClick(e){e.target.focus()}function handleFocusIn(){Z(q),ee(K)}function handleWidthInput(e){handleInput("width",e)}function handleHeightInput(e){handleInput("height",e)}function autoFillInputs(e,t){if(O){var r=O.width,n=O.height,o={width:r,height:n};if(Number(t)>w.Yg&&(t=w.Yg),"width"===e){var i,l=(0,b.vf)({value:t,field:"height",metadataAspectRatio:null==(i=metadata())?void 0:i.aspectRatio,naturalWidth:r,naturalHeight:n});o={width:t,height:null!=l?l:n,widthEdited:!0}}if("height"===e){var c,u=(0,b.vf)({value:t,field:"width",metadataAspectRatio:null==(c=metadata())?void 0:c.aspectRatio,naturalWidth:r,naturalHeight:n});o={width:null!=u?u:r,height:t}}V(o.width),W(o.height),updateArtworkValues(_object_spread({index:O.originalIndex},o)),updatePreviewDpi({artworkId:O.id}),downscaleOriginalImage({artworkId:O.id})}}function sendValidationWarning(e){if(e){var t,r,n=null==O||null==(r=O.metadata)||null==(t=r.warnings)?void 0:t.keys[0];printAsIs()&&n&&sendWarningEvent("image_validation_warning",n)}}function validateValues(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(setValidationError(e),!metadata()){en(isWidthAndHeightValid()),ei(isWidthAndHeightValid());return}sendValidationWarning(e);var t=metadata().aspectRatio>1?metadata().maxSheetHeight:metadata().maxSheetWidth,r=metadata().aspectRatio>1?metadata().maxSheetWidth:metadata().maxSheetHeight;ei(fitsGangSheet()?isWidthAndHeightValid():""!==width()&&width()<=t),en(fitsGangSheet()?isWidthAndHeightValid():""!==height()&&height()<=r)}function setValidationError(e){(!printAsIs()||(null==O?void 0:O.isSimulated))&&(invalidWidthValidation(e)||invalidHeightValidation(e)||negativeValuesValidation(e)||minPrintSizeValidation(e)||maxPrintSizeValidation(e)||maxPrintSizePrintAsIsValidation()||upscaleThresholdExceeded(e)||setValidationErrorMessage({index:A,message:null,type:null}))}
1function invalidWidthValidation(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return""===width()&&(validationErrorType()!==errorTypes().INVALID_WIDTH&&e&&sendValidationEvent("image_validation_error","invalid_width",{}),setValidationErrorMessage({index:A,message:"Please enter a valid width.",type:errorTypes().INVALID_WIDTH}),!0)}function invalidHeightValidation(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return""===height()&&(validationErrorType()!==errorTypes().INVALID_HEIGHT&&e&&sendValidationEvent("image_validation_error","invalid_height",{}),setValidationErrorMessage({index:A,message:"Please enter a valid ".concat(heightName(),"."),type:errorTypes().INVALID_HEIGHT}),!0)}function negativeValuesValidation(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!(width()>=0&&height()>=0)&&(validationErrorType()!==errorTypes().NEGATIVE_VALUES&&e&&sendValidationEvent("image_validation_error","negative_values",{width:width(),height:height()}),setValidationErrorMessage({index:A,message:"Negative values are not permitted.",type:errorTypes().NEGATIVE_VALUES}),!0)}function minPrintSizeValidation(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(minSizeForProduct())return!1;validationErrorType()!==errorTypes().MIN_PRINT_SIZE&&e&&(isSpangle()&&!isInitialSpangle()&&setSpangleMode(g.EO.editSize),sendValidationEvent("image_validation_error","min_print_size",{}));var t=printAsIs()?"'":'"';return setValidationErrorMessage({index:A,message:"The minimum print size is ".concat(minDimensions().width,'" x ').concat(minDimensions().height).concat(t),type:errorTypes().MIN_PRINT_SIZE}),!0}function maxPrintSizeValidation(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(printAsIs()||fitsGangSheet())return!1;var t=dtfMaxWidth(),r=dtfMaxHeight();if(metadata()&&metadata().maxSheetHeight&&metadata().maxSheetWidth&&(t=metadata().aspectRatio>1?metadata().maxSheetHeight:metadata().maxSheetWidth,r=metadata().aspectRatio>1?metadata().maxSheetWidth:metadata().maxSheetHeight),Number(width())<=t&&Number(height())<=r||sticker()&&Number(el.width)<=t&&Number(el.height)<=r)return!1;validationErrorType()!==errorTypes().MAX_PRINT_SIZE&&e&&(isSpangle()&&!isInitialSpangle()&&setSpangleMode(g.EO.editSize),sendValidationEvent("image_validation_error","max_print_size",{}));var n="The maximum print size is ".concat(t,'" x ').concat(r,'"');return setValidationErrorMessage({index:A,type:errorTypes().MAX_PRINT_SIZE,message:n}),!0}function upscaleThresholdExceeded(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!printAsIs()&&!!isUpscaleThresholdExceeded()&&(validationErrorType()!==errorTypes().UPSCALE_THRESHOLD_EXCEEDED&&e&&sendValidationEvent("image_validation_error","upscale_threshold_exceeded",{}),setValidationErrorMessage({index:A,message:"upscale_threshold_exceeded",type:errorTypes().UPSCALE_THRESHOLD_EXCEEDED}),!0)}function maxPrintSizePrintAsIsValidation(){return!!(printAsIs()&&height()>printAsIsMaxHeight())&&(setValidationErrorMessage({index:A,message:"The maximum print size is ".concat(w.Ai,'" x ').concat(printAsIsMaxHeight(),"'"),type:null}),!0)}function sendValidationEvent(e,t,r){var n=_object_spread_props(_object_spread({},r),{has_image:!(null==O?void 0:O.isFile)&&!(null==O?void 0:O.isSimulated),pdp_type:pdpType(),business_line:businessLine(),page:"pdp"});(null==O?void 0:O.isFile)||(n=_object_spread({},n,imageMetadataInfo())),(0,l.Py)(e,_object_spread({type:t},n)),eg.current!==t&&(eg.current=t,(0,c.xm)({legacyEvent:e,errorContext:{error_type:t,business_line:businessLine(),page:"pdp",upload_uuid:null==O?void 0:O.uploadUuid}})),(0,u.eA)({error_message:t,business_line:businessLine(),location:"pdp",pre_cut_transfers:e_.preCut})}function sendWarningEvent(e,t){var r=_object_spread_props(_object_spread({},imageMetadataInfo()),{has_image:!(null==O?void 0:O.isFile)&&!(null==O?void 0:O.isSimulated),pdp_type:pdpType(),business_line:businessLine(),page:"pdp"});(0,l.Py)(e,_object_spread({type:t},r))}function updateArtworksPricingAndTrackSizeChange(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(n){var o;return r={product_line:(o={sticker:sticker(),isProColor:isProColor(),isSpangle:isSpangle()}).sticker?"sticker":o.isProColor?"pro color":o.isSpangle?"spangle":"dtf",business_line:businessLine(),artwork:O,edit_type:editType(),artworks_count:artworks().length,location:"pdp",old_price:e,new_price:t,pre_cut_transfers:e_.preCut},ep(!1),(0,u.il)(r),e_.reindexArtworks(),[2]})})()}function trackSizeChanges(){if(q!==J||K!==X){var e=q*K,t=J*X,r=0===t?0:Math.round(Math.abs(e-t)/t*100);(0,l.Py)("size_modified",{width:q,height:K,previous_width:null!=J?J:width(),previous_height:null!=X?X:height(),size_change:0===e&&0===t?"none":e>t?"larger":"smaller",business_line:businessLine(),size_percent_change:r,has_image:!simulation(),page:"pdp",pdp_type:pdpType()})}}
1function onBlur(){var e={width:width(),height:height()};!f()(e,el)&&(validateValues(!0),isWidthAndHeightValid()&&(ec(e),getArtworksPricing(),updatePdpDates(),trackSizeChanges(),ep(!0)))}return(0,o.useEffect)(function(){var e=printAsIs()?w.nk:w.LP;ec({width:e.width,height:e.height})},[]),(0,o.useEffect)(function(){if(O){var e,t=em.current;if((em.current=O,!O.isFile&&!O.isSimulated)&&(null==(e=O.metadata)||!e.errors||O.isValid)){if(O.originalIndex&&O.originalIndex!==A){updateArtworkValues({index:O.originalIndex,originalIndex:A}),getArtworksPricing();return}var r="".concat(O.width).concat(O.height),n="".concat(null==t?void 0:t.width).concat(null==t?void 0:t.height),o=isSpangle()&&spangleSizeEdited()&&r!==n,i=isStandardArtwork()&&O.enhanceImage!==(null==t?void 0:t.enhanceImage);if((null==t?void 0:t.isLoading)&&!O.isLoading||(null==t?void 0:t.removeBackground)!==O.removeBackground||o||i){if(sticker()){var l=O.originalWidth!==O.width,c=(0,d.b)(O.width,O.height,l);ec(c),updateArtworkValues(_object_spread({index:O.originalIndex},c)),getArtworksPricing()}else ec({width:O.width,height:O.height});validateValues(!0)}O.pricing&&(null==t?void 0:t.pricing)&&!f()(O.pricing.unitPrice,t.pricing.unitPrice)&&updateArtworksPricingAndTrackSizeChange(t.pricing.unitPrice,O.pricing.unitPrice)}}},[null==O?void 0:O.isLoading,null==O?void 0:O.removeBackground,null==O?void 0:O.enhanceImage,null==O?void 0:O.originalIndex,null==O?void 0:O.width,null==O?void 0:O.height,null==O?void 0:O.originalWidth,null==O?void 0:O.isFile,null==O?void 0:O.isSimulated,null==O?void 0:O.isValid,null==O||null==(k=O.metadata)?void 0:k.errors,null==O||null==(x=O.pricing)?void 0:x.unitPrice]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},z),{className:(0,i.cn)("artwork-dimensions scope-6b9e2e48",null==z?void 0:z.className,{"artwork-dimensions--with-border":showBorderUI(),"artwork-dimensions--with-border-invalid":isInvalid()}),children:[label()&&!showBorderUI()?(0,n.jsx)("div",{className:"artwork-dimensions__label scope-6b9e2e48",children:label()}):null,showBorderUI()?(0,n.jsx)(h.A,{className:"scope-6b9e2e48",stepNumber:null!=F?F:isPuff()?3:2,content:m.p.size,completed:void 0!==L&&L,total:B,"data-testid":"step-number"}):null,(0,n.jsxs)("div",{className:"artwork-dimensions__form-number-row scope-6b9e2e48","data-testid":"artwork-dimensions-form-row",children:[(0,n.jsxs)("div",{className:"artwork-dimensions__form-number-group scope-6b9e2e48",children:[(0,n.jsxs)("label",{className:(0,i.cn)("artwork-dimensions__number-label scope-6b9e2e48",{"artwork-dimensions__number-label--gang":printAsIs()}),htmlFor:widthId(),"data-testid":"artwork-dimensions-number-label",children:[" ","Width ",showBorderUI()?null:(0,n.jsx)(n.Fragment,{children:" (inches)"})]}),(0,n.jsx)("div",{className:(0,i.cn)("artwork-dimensions__number-control scope-6b9e2e48",{"artwork-dimensions__number-control--gang-lock":printAsIs()&&!showModal()&&!!width()}),"data-testid":isPuff()?"transfers-puff-width-input":void 0,children:(0,n.jsx)("input",{className:(0,i.cn)("artwork-dimensions__number-field js-dtf-width-input scope-6b9e2e48",{"artwork-dimensions__number-field--invalid":validationError()&&!ea}),id:widthId(),value:width(),max:null!=(t=dtfMaxWidth())?t:void 0,min:null!=(r=minWidthSetting())?r:void 0,name:widthId(),step:".01",type:"number","data-hj-allow":!0,disabled:I,readOnly:N||!!T,onClick:handleInputClick,onChange:handleWidthInput,onFocus:handleFocusIn,onBlur:onBlur,"data-testid":"artwork-dimensions-number-field"})})]}),(0,n.jsx)(_.A,{className:(0,i.cn)("artwork-dimensions__multiplier scope-6b9e2e48",{"artwork-dimensions__multiplier--gang":printAsIs()}),icon:"cross","data-testid":"artwork-dimensions-multiplier"}),(0,n.jsxs)("div",{className:"artwork-dimensions__form-number-group scope-6b9e2e48",children:[(0,n.jsx)("label",{className:(0,i.cn)("artwork-dimensions__number-label scope-6b9e2e48",{"artwork-dimensions__number-label--gang":printAsIs()}),htmlFor:heightId(),"data-testid":"artwork-dimensions-number-label-1",children:heightLabel()}),(0,n.jsx)("div",{className:(0,i.cn)("artwork-dimensions__number-control scope-6b9e2e48",{"artwork-dimensions__number-control--gang-lock":lockHeight()}
1),"data-testid":isPuff()?"transfers-puff-height-input":void 0,children:(0,n.jsx)("input",{className:(0,i.cn)("artwork-dimensions__number-field js-dtf-height-input scope-6b9e2e48",{"artwork-dimensions__number-field--invalid":validationError()&&!er}),id:heightId(),value:height(),max:printAsIs()?printAsIsMaxHeight():null!=(p=dtfMaxHeight())?p:void 0,min:printAsIs()?void 0:null!=(j=dtfMinHeight())?j:void 0,name:heightId(),step:".01",type:"number","data-hj-allow":!0,disabled:I,readOnly:readonlyHeight(),onClick:handleInputClick,onChange:handleHeightInput,onFocus:handleFocusIn,onBlur:onBlur,"data-testid":"artwork-dimensions-number-field-1"})})]}),(0,n.jsx)(_.A,{className:"artwork-dimensions__multiplier scope-6b9e2e48",icon:"cross","data-testid":"artwork-dimensions-multiplier-1"}),(0,n.jsxs)("div",{className:"artwork-dimensions__form-number-group artwork-dimensions__form-number-group--price scope-6b9e2e48",children:[printAsIs()?(0,n.jsxs)("div",{className:"artwork-dimensions__number-label artwork-dimensions__number-label--gang scope-6b9e2e48",children:[" ","Linear foot ",(0,n.jsx)("br",{className:"scope-6b9e2e48"})," price"," "]}):(0,n.jsxs)("div",{className:(0,i.cn)("artwork-dimensions__number-label scope-6b9e2e48",{"artwork-dimensions__number-label--light":showBorderUI()}),children:[" ","Price / in\xb2"," "]}),(0,n.jsx)("div",{className:"artwork-dimensions__static-input scope-6b9e2e48",children:U(priceInch(),"currencyDetailed")})]}),(0,n.jsx)("div",{className:"artwork-dimensions__equal-sign scope-6b9e2e48",children:"="}),(0,n.jsxs)("div",{className:"artwork-dimensions__form-number-group artwork-dimensions__form-number-group--price scope-6b9e2e48",children:[printAsIs()?(0,n.jsxs)("div",{className:"artwork-dimensions__number-label artwork-dimensions__number-label--gang scope-6b9e2e48",children:[" ","Price ",(0,n.jsx)("br",{className:"scope-6b9e2e48"})," per Gang Sheet"," "]}):(0,n.jsxs)("div",{className:(0,i.cn)("artwork-dimensions__number-label scope-6b9e2e48",{"artwork-dimensions__number-label--light":showBorderUI()}),children:[" ","Total price"," "]}),(0,n.jsx)("div",{className:"artwork-dimensions__static-input scope-6b9e2e48",children:U(totalPrice(),"currency")})]})]}),showPaddingNote()?(0,n.jsx)("div",{className:"artwork-dimensions__free-note scope-6b9e2e48",children:paddingNote()}):null]}))}},153035(e,t,r){"use strict";r.d(t,{A:()=>ArtworkError});var n=r(483134),o=r(293534),i=r(18339),l=r(467265),c=r(147141),u=r(727566),d=r(723433),p=r(538896),f=r(302683),_=r(2605),h=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkError(e){var t=e.artwork,r=void 0===t?null:t,m=(e.currentStore,e.index),g=void 0===m?null:m,b=_object_without_properties(e,["artwork","currentStore","index"]),y=(0,p.useDtfStore)(),v=(0,o.useRef)(null),w=_sliced_to_array((0,o.useState)(!1),2),j=w[0],k=w[1],x=(0,o.useRef)(!1),S=(0,o.useRef)(!0);function showNewGangSheetErrorMessage(){return y.showNewGangSheetErrorMessage}function dpiInstructionsUrl(){return y.dpiInstructionsUrl}function gangSheetArtworkProductLink(){return y.gangSheetArtworkProductLink}function showStepsUI(){return y.showStepsUI}function validationError(){return null==r?void 0:r.errorMessage}function heightError(){return"gang_sheet_height_error"===validationError()}function widthError(){return"gang_sheet_width_error"===validationError()}function dimensionErrorMessage(){return(null==r?void 0:r.retryFailed)?"Image upload failed":validationError()||(null==r?void 0:r.uploadError)}function upscaleThresholdError(){return"upscale_threshold_exceeded"===validationError()}function errorDimension(){return heightError()?"7200px tall (24″ at 300 DPI)":"6600px wide (22″ at 300 DPI)"}function errorDimensionReadable(){return heightError()?"24″ tall (7200px at 300 DPI)":"22″ wide (6600px at 300 DPI)"}function errorCopy(){return(0,f.O9)(null==r?void 0:r.uploadErrorCode)}function isUploadError(){return!!((null==r?void 0:r.retryFailed)||(null==r?void 0:r.uploadError)||(null==r?void 0:r.uploadErrorCode))}function setShowGangSheetBuilder(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return y.setShowGangSheetBuilder.apply(y,_to_consumable_array(t))}function addFilesToQueue(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return y.addFilesToQueue.apply(y,_to_consumable_array(t))}function handleDtfTransferBySize(){(0,l.Py)("try_dtf_transfer_by_size_clicked",{artwork_id:null==r?void 0:r.id,error_message:dimensionErrorMessage()}),(0,c.SE)(gangSheetArtworkProductLink())}function handleGangSheetBuilder(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:if(x.current)return[2];x.current=!0,k(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,y.ensureGangSheetBuilder()];case 2:if(e=t.sent(),!S.current)return[2];if(!e)return(0,l.Py)("gangsheet_builder_load_failed",{}),[2];return setShowGangSheetBuilder(!0),(0,l.Py)("gangsheet_builder_opened",{}),[3,4];case 3:return x.current=!1,k(!1),[7];case 4:return[2]}})})()}function triggerInPlaceRetry(){var e;null==(e=v.current)||e.click()}function handleRetryFileChange(e){var t=e.target.files;t&&t.length&&(addFilesToQueue({files:t,isDropEvent:!1,artworkIndex:g}),e.target.value="")}return(0,o.useEffect)(function(){return S.current=!0,function(){S.current=!1}},[]),(0,o.useEffect)(function(){if(null==r?void 0:r.id){var e,t=isUploadError(),n=widthError()||heightError()||upscaleThresholdError();if(t)return void(0,l.Py)("upload_error_displayed",{error_message:dimensionErrorMessage(),error_code:null!=(e=null==r?void 0:r.uploadErrorCode)?e:null,artwork_id:null==r?void 0:r.id});(0,l.Py)(n?"file_validation_error_displayed":"processing_error_displayed",{error_message:dimensionErrorMessage(),artwork_id:null==r?void 0:r.id})}},[null==r?void 0:r.id,null==r?void 0:r.retryFailed,null==r?void 0:r.uploadError,null==r?void 0:r.uploadErrorCode,null==r?void 0:r.errorMessage]),(0,n.jsx)(i.A,_object_spread_props(_object_spread({},b),{className:(0,h.cn)("artwork-error scope-edae991e",null==b?void 0:b.className,{"artwork-error--compact":showStepsUI()}),"data-testid":"artwork-error",children:(widthError()||heightError())&&showNewGangSheetErrorMessage()?(0,n.jsx)("div",{className:"scope-edae991e",children:(0,n.jsxs)("div",{className:"artwork-error__readable-container scope-edae991e",children:[(0,n.jsxs)("div",{className:"scope-edae991e flex",children:[(0,n.jsx)("div",{className:"artwork-error__readable-icon scope-edae991e",children:(0,n.jsx)(d.A,{className:"artwork-error__warning scope-edae991e",icon:"warning-hexagon","data-testid":"artwork-error-warning"})}),(0,n.jsxs)("div",{className:"scope-edae991e content-center",children:[" ","Upload a ",errorDimensionReadable(),", or try our"," ",(0,n.jsxs)("a",{className:"artwork-dimensions__link-to-dtf-artwork artwork-error__link scope-edae991e",role:"button",tabIndex:0,"aria-busy":j,"aria-disabled":j,onClick:function(e){e.stopPropagation(),handleGangSheetBuilder()}
1,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),handleGangSheetBuilder())},"data-testid":"artwork-dimensions-link-to-dtf-artwork",children:[" ","Gang Sheet Builder"," "]})," ","for easy design layout."," "]})]}),(0,n.jsxs)("div",{className:"scope-edae991e",children:[(0,n.jsx)("div",{className:"artwork-error__readable-text scope-edae991e",children:"Uploaded a single design?"}),(0,n.jsxs)("button",{className:"artwork-error__button-try-dtf-transfer-by-size scope-edae991e",type:"button",onClick:function(e){e.stopPropagation(),handleDtfTransferBySize()},"data-testid":"artwork-error-button-try-dtf-transfer-by-size",children:[" ","Try DTF Transfers by Size"," "]})]})]})}):widthError()||heightError()?(0,n.jsxs)("div",{className:"scope-edae991e",children:[(0,n.jsxs)("b",{className:"scope-edae991e",children:["The artwork must be ",errorDimension(),"."]}),(0,n.jsx)("br",{className:"scope-edae991e"})," Please take a look at our"," ",(0,n.jsxs)("a",{className:"artwork-dimensions__link-to-dtf-artwork scope-edae991e",href:dpiInstructionsUrl(),"data-testid":"artwork-dimensions-link-to-dtf-artwork-1",children:[" ","Artwork DPI guide"," "]})," ","for more info."," "]}):upscaleThresholdError()?(0,n.jsxs)("div",{className:"scope-edae991e",children:[" ","The uploaded image will not print clearly at this size. Reduce your image size, or click"," ",(0,n.jsxs)("a",{className:"artwork-dimensions__error-message-link scope-edae991e",href:dpiInstructionsUrl(),target:"_blank","data-testid":"artwork-dimensions-error-message-link",rel:"noreferrer",children:[" ","here"," "]})," ","to learn how you can fix this."," "]}):isUploadError()?(0,n.jsxs)("div",{className:"scope-edae991e",children:[(0,_.CI)(y)?null:(0,n.jsx)("input",{ref:v,className:"artwork-error__retry-input scope-edae991e hidden",type:"file",accept:(0,u.it)(),onChange:handleRetryFileChange,"data-testid":"artwork-error-retry-input"}),errorCopy().title?(0,n.jsx)("div",{className:"artwork-error__title scope-edae991e",children:(0,n.jsx)("b",{className:"scope-edae991e",children:errorCopy().title})}):null,(0,n.jsx)("p",{className:"artwork-error__generic-error-message scope-edae991e","data-testid":"transfers-upload-error",children:errorCopy().message}),(0,_.CI)(y)?null:(0,n.jsx)("button",{type:"button",className:"artwork-error__retry-cta scope-edae991e",onClick:function(e){e.stopPropagation(),triggerInPlaceRetry()},"data-testid":"artwork-error-retry-cta",children:errorCopy().cta}),errorCopy().learnMore?(0,n.jsx)("a",{className:"artwork-error__learn-more scope-edae991e",href:errorCopy().learnMore.href,"data-testid":"artwork-error-learn-more",children:errorCopy().learnMore.label}):null]}):(0,n.jsx)("div",{className:"scope-edae991e",children:(0,n.jsx)("p",{className:"artwork-error__generic-error-message scope-edae991e","data-testid":"transfers-upload-error",children:dimensionErrorMessage()})})}))}},21126(e,t,r){"use strict";r.d(t,{A:()=>ArtworkFullScreen});var n=r(483134),o=r(293534),i=r(997252),l=r(147141),c=r(5786),u=r(723433),d=r(52554),p=r(795207),f=r(609743),_=r(538896),h=r(444636);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ArtworkFullScreen(e){var t=e.artwork,r=void 0===t?{}:t,m=e.activeConfigSection,g=e.withMade,b=void 0!==g&&g,y=e.shouldDisableSlider,v=e.sliderBeforeImage,w=e.isRedesign,j=(0,_.useDtfStore)(),k=_sliced_to_array((0,o.useState)(!1),2),x=k[0],S=k[1];function isStandardArtwork(){return j.isStandardArtwork}function enabledButton(){return isStandardArtwork()&&!(null==r?void 0:r.isLoading)&&(null==r?void 0:r.url)}function showFullScreenButton(){return(enabledButton()||b)&&(0,l.CN)()}function showDesktopModal(){return isStandardArtwork()&&x&&r&&!(0,l.CN)()}function showMobileModal(){return x&&r&&(0,l.CN)()}function wrapperClass(){return"js-modal-magnify-wrapper-".concat((null==r?void 0:r.id)||"x")}function artworkSrc(){return(0,h.BU)(r)}function toggleComparisonModal(){S(!x)}return(0,n.jsxs)(n.Fragment,{children:[showFullScreenButton()?(0,n.jsxs)("button",{className:(0,i.cn)("artwork-full-screen__button scope-ef81b391",{"artwork-full-screen__button--with-made":b}),disabled:!enabledButton(),type:"button",onClick:toggleComparisonModal,"data-testid":"artwork-full-screen-button",children:[(0,n.jsx)(u.A,{className:"artwork-full-screen__button-icon scope-ef81b391",icon:"full-screen","data-testid":"artwork-full-screen-button-icon"}),(0,n.jsx)("span",{className:"scope-ef81b391",children:"Full Screen"})]}):null,showDesktopModal()?(0,n.jsxs)(c.A,{className:"scope-ef81b391",onClose:toggleComparisonModal,"data-testid":"common-modal",children:[(0,n.jsx)(p.A,{className:"scope-ef81b391",modelValue:j.backgroundType,onUpdateModelValue:function(e){j.setBackgroundType(e)},"data-testid":"background-toggle"}),(0,n.jsx)("div",{className:"artwork-full-screen__artwork-image scope-ef81b391",children:(0,n.jsx)(d.A,{className:"scope-ef81b391",artwork:r,fitToContainer:!0,activeConfigSection:m,isRedesign:void 0!==w&&w,"data-testid":"artwork-image"},r.id)})]}):null,showMobileModal()?(0,n.jsx)(f.A,{className:"scope-ef81b391",src:void 0!==y&&y?void 0===v?"":v:artworkSrc(),wrapperClass:wrapperClass(),onClose:toggleComparisonModal,"data-testid":"mobile-image-modal"}):null]})}},852566(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryArtworksToggle});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkHistoryArtworksToggle(e){var t=e.disabled,r=e.type,i=e.onUpdateType,l=_object_without_properties(e,["disabled","type","onUpdateType"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},l),{className:(0,o.cn)("artwork-history-artworks-toggle scope-06330f48",l.className),children:[(0,n.jsxs)("button",{className:(0,o.cn)("artwork-history-artworks-toggle__button scope-06330f48",{"artwork-history-artworks-toggle__button--active":"uploaded"===r}),type:"button",disabled:t,onClick:function(){i("uploaded")},"data-testid":"artwork-history-artworks-toggle-button",children:[" ","Uploaded"," "]}),(0,n.jsxs)("button",{className:(0,o.cn)("artwork-history-artworks-toggle__button scope-06330f48",{"artwork-history-artworks-toggle__button--active":"purchased"===r}),type:"button",disabled:t,onClick:function(){i("purchased")},"data-testid":"artwork-history-artworks-toggle-button-1",children:[" ","Purchased"," "]})]}))}},895488(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(338908),i=r(723433),l=r(298210),c=r(538896),u=r(301767),d=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){var t=e.artwork,r=e.isSelected,p=void 0!==r&&r,f=e.isShownTier,_=e.isShownCheckbox,h=void 0!==_&&_,m=e.index,g=e.onSelectLibrary,b=e.onDownloadArtwork,y=_object_without_properties(e,["artwork","isSelected","isShownTier","isShownCheckbox","index","onSelectLibrary","onDownloadArtwork"]);(0,o.s)().t;var v=(0,c.useDtfStore)();function printAsIs(){return t.useFootLength}function date(){return t.purchasedDate?"Purchased on ".concat(t.purchasedDate):"Uploaded on ".concat(t.uploadedOn)}function isStandardArtwork(){return v.isStandardArtwork}function sizeText(e){var t=e.metadata,r=t.widthInch,n=t.heightInch,o=printAsIs()?(n/l.OL).toFixed(0):n,i=printAsIs()?"'":'"';return"".concat(r,'" x ').concat(o).concat(i)}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},y),{className:(0,d.cn)("artwork-history-grid-item scope-864ba11a"),children:[(0,n.jsxs)("button",{className:(0,d.cn)("artwork-history-grid-item__artwork-image-container scope-864ba11a",h&&"artwork-history-grid-item__artwork-image-container--clickable"),type:"button",disabled:!h,"aria-label":"Select design ".concat(t.name),"aria-pressed":h?p:void 0,onClick:function(){h&&g(t,m)},"data-testid":"artwork-history-grid-item-artwork-image-container",children:[(0,n.jsx)("img",{className:(0,d.cn)("artwork-history-grid-item__artwork-image scope-864ba11a"),src:t.previewUrl,alt:"Artwork - ".concat(t.name)}),void 0!==f&&f&&t.enhancementTier?(0,n.jsx)(u.A,{className:(0,d.cn)("artwork-history-grid-item__enhancement-tier scope-864ba11a"),tier:t.enhancementTier,"data-testid":"artwork-history-grid-item-enhancement-tier"}):null]}),(0,n.jsx)("button",{className:(0,d.cn)("artwork-history-grid-item__download scope-864ba11a"),type:"button","aria-label":"Download ".concat(t.name),onClick:function(){b(t.downloadUrl,t.name)},"data-testid":"artwork-history-grid-item-download",children:(0,n.jsx)(i.A,{className:(0,d.cn)("artwork-history-grid-item__download-icon scope-864ba11a"),icon:"download-line","data-testid":"artwork-history-grid-item-download-icon"})}),h?(0,n.jsx)("button",{className:(0,d.cn)("artwork-history-grid-item__checkbox scope-864ba11a",p&&"artwork-history-grid-item__checkbox--selected",isStandardArtwork()&&"artwork-history-grid-item__checkbox--standard-artwork"),type:"button","aria-label":"Select design ".concat(t.name),"aria-pressed":p,onClick:function(){h&&g(t,m)},"data-testid":"artwork-history-grid-item-checkbox",children:(0,n.jsx)(i.A,{className:(0,d.cn)("artwork-history-grid-item__checkbox-icon scope-864ba11a"),icon:"check","data-testid":"artwork-history-grid-item-checkbox-icon"})}):null,(0,n.jsx)("div",{className:(0,d.cn)("artwork-history-grid-item__info-name scope-864ba11a"),title:t.name,children:t.name}),(0,n.jsxs)("div",{className:(0,d.cn)("artwork-history-grid-item__info-text scope-864ba11a"),children:[" ","Size: ",sizeText(t)]}),(0,n.jsx)("div",{className:(0,d.cn)("artwork-history-grid-item__info-text artwork-history-grid-item__info-text-date scope-864ba11a"),children:date()})]}))}},178998(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryModal});var n=r(483134),o=r(293534),i=r(338908),l=r(52382),c=r.n(l),u=r(997252),d=r(629405),p=r(147141),f=r(628148),_=r(350933),h=r(467265),m=r(433769),g=r(723433),b=r(834120),y=r(390619),v=r(895488),w=r(4411),j=r(444636),k=r(538896),x=r(127391),S=r(852566),O
1=r(343744),P=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkHistoryModal(e){var t=e.index,r=void 0===t?0:t,l=e.singleSelectionMode,A=void 0!==l&&l,C=e.reorderEnabled,I=void 0!==C&&C,E=e.isMade,N=e.onBuyAgain,D=_object_without_properties(e,["index","singleSelectionMode","reorderEnabled","isMade","onBuyAgain"]),T=(0,i.s)().t,M=(0,k.useDtfStore)(),R=(0,x.o3)(),F=_sliced_to_array((0,o.useState)(!1),2),L=F[0],B=F[1],z=_sliced_to_array((0,o.useState)(!1),2),U=z[0],H=z[1],q=_sliced_to_array((0,o.useState)("desc"),2),V=q[0],G=q[1],K=_sliced_to_array((0,o.useState)("uploaded"),2),W=K[0],Q=K[1],J=_sliced_to_array((0,o.useState)(M.stickerQrScanned?"false":"true"),2),Z=J[0];J[1];var Y=_sliced_to_array((0,o.useState)(""),2),X=Y[0],ee=Y[1],et=_sliced_to_array((0,o.useState)([]),2),er=et[0],en=et[1],eo=_sliced_to_array((0,o.useState)(!1),2),ea=eo[0],ei=eo[1],es=_sliced_to_array((0,o.useState)(!1),2),el=es[0],ec=es[1],eu=_sliced_to_array((0,o.useState)("uploaded"),2),ed=eu[0],ep=eu[1],ef=_sliced_to_array((0,o.useState)(!1),2),e_=ef[0],eh=ef[1],em=_sliced_to_array((0,o.useState)(function(){return(0,p.Fr)()}),1)[0],eg=(0,o.useRef)(null),eb=(0,o.useRef)(null),ey=(0,o.useRef)(!1),ev=(0,o.useRef)(!1),ew=(0,o.useRef)(!1),ej=(0,o.useRef)(X),ek=(0,o.useRef)(0),ex=(0,o.useRef)(0),eS=(0,o.useRef)(0),eO=(0,o.useRef)(null);eO.current=function(){sendArtworkHistoryEvent("previous_purchase_search_triggered",{search_query:X}
1),setArtworkHistoryPagination({page:1}),clearSelection(),loadArtworkHistory()};var eP=(0,o.useRef)(c()(function(){return eO.current()},600)).current;function artworkHistory(){return M.artworkHistory}function hasNoArtworks(){return artworkHistory().length<1}function isShowingRequestedTab(){return ed===W}function isShowingPurchasedReorders(){return I&&"purchased"===ed}function artworkHistoryPagination(){return M.artworkHistoryPagination}function catalogNumber(){return M.catalogNumber}function isPuff(){return M.isPuff}function isSpangle(){return M.isSpangle}function isStickerSample(){return M.isStickerSample}function artworks(){return M.artworks}function isGoldFoil(){return M.isGoldFoil}function puffMaxImageCount(){return M.puffMaxImageCount}function printAsIs(){return M.printAsIs}function businessLine(){return M.businessLine}function spanglesMaxImageCount(){return R.spanglesMaxImageCount}function defineOriginalWidth(e){var t,r,n;return e.enhanceImage?e.removeBackground?null==(r=e.enhancedMetadata)?void 0:r.widthInch:null==(n=e.withBgMetadata)?void 0:n.widthInch:null==(t=e.originalMetadata)?void 0:t.widthInch}function defineOriginalHeight(e){var t,r,n;return e.enhanceImage?e.removeBackground?null==(r=e.enhancedMetadata)?void 0:r.heightInch:null==(n=e.withBgMetadata)?void 0:n.heightInch:null==(t=e.originalMetadata)?void 0:t.heightInch}function getPreviewUrl(e,t){if(isGoldFoil()&&"true"===Z)return t.goldFoilImage;var r=getDownloadUrl(e,t);return(0,f.A)(r,{w:"150",q:"70",dpr:"2"})}function getDownloadUrl(e,t){return"false"===Z?e.imageUrl:isSpangle()&&t.spangledImageUrl?t.spangledImageUrl:M.sticker&&t.cuttingUrl?t.cutlineUrl:t.imageUrl||e.imageUrl}function getSpangledState(e){return isSpangle()&&e.spangled&&"true"===Z}function formattedArtworks(){return artworkHistory().map(function(e){var t,r,n,o,i,l=e.id,c=e.fileName,u=e.originalMime,d=e.enhancementTier,p=e.uploadedOn,f=e.purchasedDate,_=e.ordered,h=void 0===_?{}:_,m=e.original,g=void 0===m?{}:m,b=e.useFootLength,y=e.dtfPrintId,v=e.pinningSessionId;return{id:void 0===l?null:l,dtfPrintId:y,name:void 0===c?"":c,uploadedOn:void 0===p?"":p,purchasedDate:void 0===f?"":f,originalMime:void 0===u?"":u,enhancementTier:void 0===d?"":d,url:h.imageUrl,previewUrl:getPreviewUrl(g,h),downloadUrl:getDownloadUrl(g,h),spangled:getSpangledState(h),spangledImageUrl:null==h?void 0:h.spangledImageUrl,cutlineUrl:null==h?void 0:h.cutlineUrl,originalImageUrl:g.imageUrl,originalMimeType:g.mimeType,processTimeStamp:Date.now(),goildFoilPreviewAttached:isGoldFoil()&&"true"===Z,manualEditUrl:h.manualEditUrl||null,manualEditNoTrimUrl:h.manualEditNoTrimUrl||null,editImageManual:h.editImageManual||!1,pinningSessionId:v||null,enhancedNoBgUrl:h.noBgUrl,enhancedWithBgUrl:h.withBgUrl,enhancementCompleted:!0,originalDpi:h.dpi,enhancedDpi:h.dpi,sliderPreviewUrl:h.noBgNoTrimUrl,canRemoveBg:h.canRemoveBg||!1,useFootLength:b||!1,metadata:_object_spread_props(_object_spread({},h.metadata),{dpi:h.dpi,width:h.widthPx,height:h.heightPx,widthInch:h.width,heightInch:h.height,maxSheetHeight:h.maxSheetHeight,maxSheetWidth:h.maxSheetWidth,aspectRatio:(null==h?void 0:h.enhanceImage)?(parseFloat(null==h||null==(t=h.enhancedMetadata)?void 0:t.width)/parseFloat(null==h||null==(r=h.enhancedMetadata)?void 0:r.height)).toPrecision(6):(parseFloat(null==h||null==(n=h.originalMetadata)?void 0:n.width)/parseFloat(null==h||null==(o=h.originalMetadata)?void 0:o.height)).toPrecision(6),lengthFoot:h.lengthFoot,removeBackground:h.removeBackground}),originalMetadata:null==h?void 0:h.originalMetadata,enhancedMetadata:null==h?void 0:h.enhancedMetadata,withBgMetadata:null==h?void 0:h.withBgMetadata,enhanceImage:null==h?void 0:h.enhanceImage,previewMetadata:printAsIs()?{heightInch:h.height}:{},enhancedOriginalDpi:null==h?void 0:h.enhancedOriginalDpi,originalWidth:defineOriginalWidth(h),originalHeight:defineOriginalHeight(h),sizeBasedDpi:(null==h?void 0:h.enhanceImage)?null==h?void 0:h.enhancedOriginalDpi:null==h||null==(i=h.originalMetadata)?void 0:i.dpi}})}function isMaxNumberOfArtworksSelected(){return isPuff()&&er.length===puffMaxImageCount()||isSpangle()&&er.length===spanglesMaxImageCount()||isStickerSample()&&er.length>=1}function selectedArtworkCountMessage(){return isMaxNumberOfArtworksSelected()?"Maximum ".concat(T("image",er.length)," can be selected."):"".concat(er.length," Selected")}function buttonText(){return isSpangle()&&"false"===Z?"Spangle It":isShowingPurchasedReorders()?"Add to Cart":"Select ".concat((0,d.td)(er.length,"De
1sign","s",!0))}function withError(){return(0,j.lx)(artworks()[0])}function isPdp(){return"non-pdp"!==M.pdpType}function setShowArtworkHistoryModal(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.setShowArtworkHistoryModal.apply(M,_to_consumable_array(t))}function setArtworkHistory(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.setArtworkHistory.apply(M,_to_consumable_array(t))}function setArtworkHistoryPagination(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.setArtworkHistoryPagination.apply(M,_to_consumable_array(t))}function removeArtwork(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.removeArtwork.apply(M,_to_consumable_array(t))}function setSpangleVariations(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return R.setSpangleVariations.apply(R,_to_consumable_array(t))}function getArtworkHistory(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.getArtworkHistory.apply(M,_to_consumable_array(t))}function submitPrintReorder(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.submitPrintReorder.apply(M,_to_consumable_array(t))}function buyArtworksAgain(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.buyArtworksAgain.apply(M,_to_consumable_array(t))}function downloadAndTriggerArtworkUploadFlow(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return M.downloadAndTriggerArtworkUploadFlow.apply(M,_to_consumable_array(t))}function clearSelection(){en([])}function retryLoadArtworkHistory(){loadArtworkHistory()}function clearLoading(){ei(!1),eh(!1)}function sendArtworkHistoryEvent(e,t){(0,h.Py)(e,_object_spread({page:"pdp",business_line:businessLine(),pdp_type:M.pdpType,catalog_number:catalogNumber()},t))}function showModal(){$(eg.current).modal("show").on("hidden.bs.modal",function(){onClose(),document.body.classList.remove("dtf-artwork-history-open")}),document.body.classList.add("dtf-artwork-history-open")}function onClose(e){e&&sendArtworkHistoryEvent("previous_purchase_modal_closed",{source:e}),setShowArtworkHistoryModal(!1),setArtworkHistory([]),setArtworkHistoryPagination({page:1}),$(eg.current).modal("hide")}function loadArtworkHistory(){return _async_to_generator(function(){var e,t,r,n,o=arguments;return _ts_generator(this,function(i){switch(i.label){case 0:return e=o.length>0&&void 0!==o[0]?o[0]:{},ei(!0),ec(!1),ek.current+=1,t=ek.current,r=_object_spread({artworksType:W,search:X,sortOrder:V,artworkIds:[],currentType:Z,apiType:"list"},e),[4,getArtworkHistory(_object_spread_props(_object_spread({},r),{shouldCommit:function(){return t===ek.current}}))];case 1:if(n=i.sent(),ex.current=Math.max(ex.current,t),clearLoading(),t!==ek.current)return[2,n];return(null==n?void 0:n.aborted)||ec(!(null==n?void 0:n.ok)),(null==n?void 0:n.ok)&&(ed!==r.artworksType&&clearSelection(),ep(r.artworksType)),[2,n]}})}).apply(this,arguments)}function fetchSelectedArtworks(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return ei(!0),eS.current+=1,e=eS.current,t=function(){return e===eS.current},[4,getArtworkHistory(_object_spread_props(_object_spread({},{search:X,sortOrder:V,artworkIds:er.map(function(e){return e.id}),currentType:Z,apiType:"purchased"}),{shouldCommit:t}))];case 1:if(r.sent(),!t())return[2,!1];return clearLoading(),[2,!0]}})})()}function onShow(){return _async_to_generator(function(){return _ts_generator(this,function(e){return showModal(),setArtworkHistoryPagination({perPage:em?20:36}),loadArtworkHistory(),[2]})})()}function updateArtworksType(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return Q(e),setArtworkHistoryPagination({page:1}),clearSelection(),[4,loadArtworkHistory({artworksType:e})];case 1:return t.sent(),[2]}})})()}function checkArtworkSelection(e,t){var r=e.id,n=e.metadata,o="".concat(n.widthInch).concat(n.heightInch),i="".concat(t.metadata.widthInch).concat(t.metadata.heightInch);return r===t.id&&o===i}function isArtworkSelected(e){return er.some(function(t){return checkArtworkSelection(t,e)})}function selectArtwork(e,t){A?en([formattedArtworks()[t]]):isArtworkSelected(e)?en(function(t){return t.filter(function(t){return!checkArtworkSelection(t,e)})}):en(function(e){return _to_consumable_array(e).concat([formattedArtworks()[t]])})}function scroll(e){var t=e.target,r=artworkHistoryPagination(),n=r.page,o=r.totalPages;!(Math.ceil(t.scrollTop)>=t.scrollHeight-t.offsetHeight)||n>=o||!isShowingRequestedTab()||el||ex.current<ek.current||(eh(!0),setArt
1workHistoryPagination({page:n+1}),loadArtworkHistory(),sendArtworkHistoryEvent("previous_purchase_lazy_loaded",{page_number:n+1}))}function onToggleSearch(){em&&B(function(e){return!e})}function toggleSelect(){"none"===window.getComputedStyle(eb.current).display&&G(function(e){return"asc"===e?"desc":"asc"})}function buyPrintReorder(){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return H(!0),[4,submitPrintReorder(er)];case 1:return e.sent(),onClose("buy_again_button"),H(!1),[2]}})})()}function buyAgain(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return setArtworkHistoryPagination({page:1}),[4,fetchSelectedArtworks()];case 1:if(!t.sent())return[2];return en(e=formattedArtworks()),withError()&&removeArtwork(artworks()[0].id),isSpangle()&&setSpangleVariations([]),M.sticker?downloadAndTriggerArtworkUploadFlow(e):isPdp()?buyArtworksAgain(e,r):N&&N(e),sendArtworkHistoryEvent("previous_purchase_buy_again_clicked",{artworks_ids:e.map(function(e){return e.id}),artworks_count:e.length}),onClose("buy_again_button"),[2]}})})()}function download(e,t){fetch(e).then(function(e){return e.blob()}).then(function(r){var n=document.createElement("a");n.href=URL.createObjectURL(r),n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),sendArtworkHistoryEvent("previous_purchase_image_downloaded",{file_name:t,image_url:e,file_size:r.size,file_type:r.type})})}function onSubmit(){isShowingPurchasedReorders()?buyPrintReorder():buyAgain()}return(0,o.useEffect)(function(){return onShow(),function(){ek.current+=1,$(eg.current).off("hidden.bs.modal").modal("hide"),setShowArtworkHistoryModal(!1)}},[]),(0,o.useEffect)(function(){return function(){eS.current+=1}},[]),(0,o.useEffect)(function(){if(!ey.current){ey.current=!0;return}setArtworkHistoryPagination({page:1}),clearSelection(),loadArtworkHistory()},[V]),(0,o.useEffect)(function(){if(!ev.current){ev.current=!0;return}setArtworkHistoryPagination({page:1}),setArtworkHistory([]),clearSelection(),loadArtworkHistory(),(0,m.track)("modal_with_previous_uploads_tab_selected",{current_type:Z})},[Z]),(0,o.useEffect)(function(){if(!ew.current){ew.current=!0,ej.current=X;return}var e=ej.current;!X&&e&&ei(!0),ej.current=X},[X]),(0,n.jsx)("div",_object_spread_props(_object_spread({},D),{className:(0,u.cn)("modal artwork-history scope-d5799a77",D.className),id:"artwork-history",ref:eg,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",{className:"artwork-history__modal-box modal-dialog scope-d5799a77",children:[(0,n.jsxs)("div",{className:"artwork-history__modal-header scope-d5799a77",role:"heading","aria-label":"Your previous purchases",tabIndex:"0","data-testid":"artwork-history-modal-header",children:[(0,n.jsx)("span",{className:"artwork-history__title scope-d5799a77",children:" My Library "}),(0,n.jsx)("button",{className:"artwork-history__modal-button-close scope-d5799a77",type:"button","aria-label":"Close",onClick:function(){onClose("close_button")},"data-testid":"artwork-history-modal-button-close",children:(0,n.jsx)(g.A,{className:"scope-d5799a77",icon:"modal-close-big","data-testid":"use-svg"})})]}),(0,n.jsxs)("div",{className:"artwork-history__modal-body scope-d5799a77",children:[(0,n.jsxs)("div",{className:"artwork-history__subheader scope-d5799a77",children:[L?null:(0,n.jsxs)("div",{className:"artwork-history__dropdown scope-d5799a77",onClick:toggleSelect,"data-testid":"artwork-history-dropdown",children:[(0,n.jsx)("span",{className:"artwork-history__field-adornment scope-d5799a77",children:(0,n.jsx)(g.A,{className:"artwork-history__field-adornment-icon scope-d5799a77",icon:"arrow-".concat("asc"===V?"up":"down"),"data-testid":"artwork-history-field-adornment-icon"})}),(0,n.jsxs)("select",{className:"artwork-history__dropdown-select scope-d5799a77",ref:eb,value:V,onChange:function(e){G(e.target.value)},"data-testid":"artwork-history-dropdown-select",children:[(0,n.jsx)("option",{className:"scope-d5799a77",value:"desc","data-testid":"artwork-history-modal-option",children:"Newest First"}),(0,n.jsx)("option",{className:"scope-d5799a77",value:"asc","data-testid":"artwork-history-modal-option-1",children:"Oldest First"})]})]}),I&&!L?(0,n.jsx)(S.A,{className:"artwork-history__toggle scope-
1d5799a77",disabled:ea,type:W,onUpdateType:updateArtworksType,"data-testid":"artwork-history-toggle"}):null,(0,n.jsxs)("div",{className:(0,u.cn)("artwork-history__input scope-d5799a77",L&&"artwork-history__input--full-width"),children:[L||!em?(0,n.jsx)("input",{className:"artwork-history__input-field scope-d5799a77",value:X,onInput:function(e){ee(e.target.value),eP(e)},placeholder:"Search image names",type:"text","data-testid":"artwork-history-input-field"}):null,(0,n.jsx)("button",{className:"artwork-history__field-adornment scope-d5799a77",type:"button","aria-label":"Toggle search","aria-expanded":L,disabled:!em,onClick:onToggleSearch,"data-testid":"artwork-history-field-adornment",children:(0,n.jsx)(g.A,{className:"artwork-history__field-adornment-icon scope-d5799a77",icon:"search","data-testid":"artwork-history-field-adornment-icon-1"})})]}),L?(0,n.jsx)("button",{className:"artwork-history__modal-button-close scope-d5799a77",type:"button","aria-label":"Close search",onClick:onToggleSearch,"data-testid":"artwork-history-modal-button-close-1",children:(0,n.jsx)(g.A,{className:"scope-d5799a77",icon:"modal-close-big","data-testid":"use-svg-1"})}):null]}),el&&hasNoArtworks()?(0,n.jsx)(y.A,{className:"scope-d5799a77",onRetry:retryLoadArtworkHistory,"data-testid":"artwork-history-modal-error-state"}):hasNoArtworks()?(0,n.jsx)(b.A,{className:"scope-d5799a77",isUploadedState:I&&"uploaded"===W,isLoading:ea,isMade:void 0!==E&&E,"data-testid":"artwork-history-modal-empty-state"}):(0,n.jsxs)("div",{className:"artwork-history__artworks-wrapper scope-d5799a77",onScroll:scroll,"data-testid":"artwork-history-artworks-wrapper",children:[el?(0,n.jsx)(y.A,{className:"artwork-history__artworks-notification scope-d5799a77",compact:!0,onRetry:retryLoadArtworkHistory,"data-testid":"artwork-history-modal-error-state"}):null,isShowingPurchasedReorders()?(0,n.jsx)(O.A,{className:"artwork-history__artworks-notification scope-d5799a77","data-testid":"artwork-history-artworks-notification",children:"You won't be charged for design services when reordering a design at the same size."}):null,(0,n.jsxs)("div",{className:"artwork-history__grid scope-d5799a77",children:[(0,P.p)(formattedArtworks(),function(e,t){return(0,n.jsx)(v.A,{className:"scope-d5799a77",artwork:e,isSelected:isArtworkSelected(e),index:t,isShownTier:isShowingPurchasedReorders(),isShownCheckbox:!isMaxNumberOfArtworksSelected()||isArtworkSelected(e),onDownloadArtwork:download,onSelectLibrary:selectArtwork,"data-testid":"artwork-history-grid-item"},t)}),(0,n.jsx)("div",{className:(0,u.cn)("artwork-history__loading scope-d5799a77",e_&&"artwork-history__loading--visible"),children:(0,n.jsx)(_.A,{className:(0,u.cn)("scope-d5799a77","artwork-history__loading-icon"),"data-testid":"artwork-history-loading-icon"})})]})]})]}),er.length>0?(0,n.jsx)(w.A,{className:"scope-d5799a77",count:selectedArtworkCountMessage(),ctaText:buttonText(),isLoadingCta:U,onClose:onClose,onCtaAction:onSubmit,"data-testid":"artwork-history-modal-footer"}):null]})}))}},834120(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryModalEmptyState});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkHistoryModalEmptyState(e){var t=e.isLoading,r=e.isUploadedState,l=void 0!==r&&r,c=e.isMade,u=void 0!==c&&c;function emptyStateText(){return t?"Loading...":u?"No designs found.":l?"Previous transfers uploads will show here.":"Previous transfers purchases will show here."}function icon(){return l?"upload-cloud":"rebrand-carts"}var d=_object_without_properties(e,["isLoading","isUploadedState","isMade"])||{},p=d.className,f=_object_without_properties(d,["className"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,o.cn)("artwork-history-empty-state scope-82aa78a2",p)},f),{children:[(0,n.jsx)(i.A,{className:"artwork-history-empty-state__icon scope-82aa78a2",icon:icon(),"data-testid":"artwork-history-empty-state-icon"}),(0,n.jsx)("span",{className:"scope-82aa78a2",children:emptyStateText()})]}))}ArtworkHistoryModalEmptyState.displayName="ArtworkHistoryModalEmptyState"},390619(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryModalErrorState});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkHistoryModalErrorState(e){var t=e.compact,r=e.onRetry,l=_object_without_properties(e,["compact","onRetry"])||{},c=l.className,u=_object_without_properties(l,["className"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,o.cn)("artwork-history-error-state scope-6a4f27c1",void 0!==t&&t&&"artwork-history-error-state--compact",c),role:"alert"},u),{children:[(0,n.jsx)(i.A,{className:"artwork-history-error-state__icon scope-6a4f27c1",icon:"info-circle-bold","data-testid":"artwork-history-error-state-icon"}),(0,n.jsx)("span",{className:"artwork-history-error-state__message scope-6a4f27c1",children:"We couldn't load your designs. This is a temporary problem on our end — your designs are safe."}),(0,n.jsx)("button",{className:"artwork-history-error-state__retry scope-6a4f27c1",type:"button",onClick:r,"data-testid":"artwork-history-error-state-retry",children:"Try again"})]}))}ArtworkHistoryModalErrorState.displayName="ArtworkHistoryModalErrorState"},4411(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryModalFooter});var n=r(483134),o=r(997252),i=r(350933),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkHistoryModalFooter(e){var t=e.count,r=e.isLoadingCta,c=e.ctaText,u=e.onClose,d=e.onCtaAction,p=_object_without_properties(e,["count","isLoadingCta","ctaText","onClose","onCtaAction"]),f=(0,l.useDtfStore)();function isStandardArtwork(){return f.isStandardArtwork}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},p),{className:(0,o.cn)("artwork-history-footer scope-18004666",p.className),children:[(0,n.jsx)("span",{className:"artwork-history-footer__c
1ount scope-18004666",children:t}),(0,n.jsxs)("div",{className:"artwork-history-footer__button-container scope-18004666",children:[(0,n.jsxs)("button",{className:(0,o.cn)("artwork-history-footer__button artwork-history-footer__button--secondary scope-18004666",{"artwork-history-footer__button--standard-artwork":isStandardArtwork()}),type:"button",onClick:u,"data-testid":"artwork-history-footer-button",children:[" ","Cancel"," "]}),(0,n.jsxs)("button",{className:(0,o.cn)("artwork-history-footer__button artwork-history-footer__button--primary scope-18004666",{"artwork-history-footer__button--loading":r,"artwork-history-footer__button--standard-artwork":isStandardArtwork()}),type:"button",disabled:r,onClick:d,"data-testid":"artwork-history-footer-button-1",children:[c," ",r?(0,n.jsx)(i.A,{className:"artwork-history-footer__loader scope-18004666","data-testid":"artwork-history-footer-loader"}):null]})]})]}))}},343744(e,t,r){"use strict";r.d(t,{A:()=>ArtworkHistoryNotification});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkHistoryNotification(e){var t=e.children,r=_object_without_properties(e,["children"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("artwork-history-notification scope-f601efaf",r.className),children:[(0,n.jsx)(i.A,{className:"artwork-history-notification__icon scope-f601efaf",icon:"info-circle-bold","data-testid":"artwork-history-notification-icon"}),(0,n.jsx)("div",{className:"artwork-history-notification__message scope-f601efaf",children:t})]}))}},52554(e,t,r){"use strict";r.d(t,{A:()=>ArtworkImage});var n=r(483134),o=r(293534),i=r(997252),l=r(147141),c=r(467265),u=r(375599),d=r(927997),p=r(629499),f=r(723433),_=r(923057),h=r(21126),m=r(795207),g=r(298210),b=r(785147),y=r(833540),v=r(609743),w=r(2605),j=r(24849),k=r(259703),x=r(895461),S=r(679863),O=r(465318),P=r(227013),A=r(387624),C=r(748849),I=r(943703),E=r(110051),N=r(127391),D=r(538896),T=r(444636),M=r(238675),R=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var F="dtf:loupe-hint-dismissed";function ArtworkImage(e){var t,r=e.artwork,L=void 0===r?null:r,B=e.withMade,z=void 0!==B&&B,U=e.index,H=void 0===U?0:U,q=e.isMultiUpload,V=void 0!==q&&q,G=e.fitToContainer,K=void 0!==G&&G,W=e.activeConfigSection,Q=void 0===W?null:W,J=e.showFullScreenButton,Z=e.isRedesign,Y=void 0!==Z&&Z,X=e.overrideBackgroundType,ee=e.onRemove,et=void 0===ee?null:ee,er=e.onClick,en=e.className,eo=_object_without_properties(e,["artwork","withMade","index","isMultiUpload","fitToContainer","activeConfigSection","showFullScreenButton","isRedesign","overrideBackgroundType","onRemove","onClick","className"]),ea=_sliced_to_array((0,o.useState)(!1),2),ei=ea[0],es=ea[1],el=_sliced_to_array((0,o.useState)(!1),2),ec=el[0],eu=el[1],ed=_sliced_to_array((0,o.useState)(null),2),ep=ed[0],ef=ed[1],e_=_sliced_to_array((0,o.useState)(!1),2),eh=e_[0],em=e_[1],eg=(0,o.useRef)(null),eb=_sliced_to_array((0,o.useState)(null),2),ey=eb[0],ev=eb[1],ew=_sliced_to_array((0,o.useState)(!1),2),ej=ew[0],ek=ew[1],ex=_sliced_to_array((0,o.useState)(50),2),eS=ex[0],eO=ex[1],eP=_sliced_to_array((0,o.useState)(function(){return(0,d.lt)("gen/spangle-sparkle.gif",{auto:"format"})}),1)[0],eA=g.Yo,eC=_sliced_to_array((0,o.useState)(0),2),eI=eC[0],eE=eC[1],eN=_sliced_to_array((0,o.useState)(0),2),eD=eN[0],eT=eN[1],eM=_sliced_to_array((0,o.useState)(0),2),eR=eM[0],eF=eM[1],eL=_sliced_to_array((0,o.useState)(null),2),eB=eL[0],ez=eL[1],eU=_sliced_to_array((0,o.useState)(0),2),eH=eU[0],eV=eU[1],eG=(0,D.useDtfStore)(),eK=(0,N.o3)(),eW=(0,o.useRef)(null),eQ=(0,o.useRef)(null),e$=(0,o.useRef)(null),eJ=(0,o.useRef)(null),eZ=(0,o.useRef)(null);function pdpType(){return eG.pdpType}function printAsIs(){return eG.printAsIs}function userType(){return eG.userType}function showModal(){return eG.showModal}function sizeErrorTypes(){return eG.sizeErrorTypes}function catalogNumber(){return eG.catalogNumber}function productId(){return eG.productId}function showArtworkHistoryModal(){return eG.showArtworkHistoryModal}function businessLine(){return eG.businessLine}function isSpangle(){return eG.isSpangle}function isProColor(){return eG.isProColor}function isCmykSoftProofActive(){return eG.isCmykSoftProofActive}function isPuff(){return eG.isPuff}function isSticker(){return eG.isSticker}function stickerPromoPrice(){var e;return null!=(e=eG.stickerPromoPrice)?e:null}function isStickerSample(){return eG.isStickerSample}function isUVDTFSticker(){return eG.isUVDTFSticker}function pickFromUploadsOrDesigns(){return eG.pickFromUploadsOrDesigns}
1function artworkBackground(){return eG.artworkBackground}function backgroundType(){return eG.backgroundType}function isMobileStore(){return eG.isMobile}function sticker(){return eG.sticker}function canvaDtfEnabled(){return eG.canvaDtfEnabled}function isStandardArtwork(){return eG.isStandardArtwork}function enableAbAiMonetization(){return eG.enableAbAiMonetization}function showGangSheetBuilderFeature(){return eG.showGangSheetBuilderFeature}function gangSheetWidth225Exposed(){return eG.gangSheetWidth225Exposed}function previewCanvasSize(){return eG.previewCanvasSize}function mobileFooterCTAEnabled(){return eG.mobileFooterCTAEnabled}function isStandardDTFProduct(){return eG.isStandardDTFProduct}function isGoldFoil(){return eG.isGoldFoil}function spangleSizeEditing(){return eK.spangleSizeEditing}function isSelectedVersionLoading(){return eK.isSelectedVersionLoading}function selectedVersion(){return eK.selectedVersion}function originalArtworkUrl(){return eK.originalArtworkUrl}function allAPIsCompleted(){return eK.allAPIsCompleted}function isLoading(){var e;return!!isPuff()&&(null==(e=eG.puff)?void 0:e.isLoading)}function puffImage(){var e;return isPuff()?null==(e=eG.puff)?void 0:e.image:null}function imageSrc(){return L?function(){if(L.manualEditUrl)return L.manualEditUrl;if(puffImage())return puffImage();if(L.spangled&&L.spangledImageUrl)return L.spangledImageUrl;if(L.isFile&&L.file){var e;return(null==(e=L.file)?void 0:e.type)==="application/pdf"?null:isCmykSoftProofActive()&&L.cmykOriginalImageUrl?L.cmykOriginalImageUrl:URL.createObjectURL(L.file)}if(isStandardArtwork())return(null==L?void 0:L.enhancementTier)==="print_original"?isCmykSoftProofActive()&&(null==L?void 0:L.cmykOriginalImageUrl)||(null==L?void 0:L.originalImageUrl):(null==L?void 0:L.enhancementCompleted)?(null==L?void 0:L.removeBackground)?null==L?void 0:L.enhancedNoBgUrl:null==L?void 0:L.enhancedWithBgUrl:null==L?void 0:L.originalImageUrl;return isCmykSoftProofActive()?(null==L?void 0:L.cmykOriginalImageUrl)||(null==L?void 0:L.url)||(null==L?void 0:L.originalImageUrl):(null==L?void 0:L.url)||(null==L?void 0:L.originalImageUrl)}()||(null==L?void 0:L.url):null}function previewImageSrc(){return(null==L?void 0:L.manualEditUrl)?L.manualEditUrl:shouldDisableSlider()&&!puffImage()?sliderBeforeImage():imageSrc()}function enhancingAfterImageSrc(){return isStandardArtwork()&&artworkEnhancementProcessing()&&!(null==L?void 0:L.manualEditUrl)&&!shouldDisableSlider()&&(null==L?void 0:L.originalImageUrl)?L.originalImageUrl:previewImageSrc()}function enhancedImageIntrinsic(){if(!isStandardArtwork()||!(null==L?void 0:L.enhancementCompleted)||(null==L?void 0:L.manualEditUrl)||(null==L?void 0:L.enhancementTier)==="print_original"||(null==L?void 0:L.enhancementTier)==="custom")return{};var e=(null==L?void 0:L.removeBackground)?null==L?void 0:L.enhancedMetadata:null==L?void 0:L.withBgMetadata,t=null==L?void 0:L.metadata,r=(null==e?void 0:e.width)||(null==t?void 0:t.width),n=(null==e?void 0:e.height)||(null==t?void 0:t.height);return r&&n?{width:r,height:n}:{}}function computeOriginalEnhancingRatio(){var e,t,dimsOf=function(e){return(null==e?void 0:e.width)&&(null==e?void 0:e.height)?"".concat(e.height," / ").concat(e.width):(null==e?void 0:e.widthInch)&&(null==e?void 0:e.heightInch)?"".concat(e.heightInch," / ").concat(e.widthInch):null},r=!!(null==L?void 0:L.enhancementCompleted)&&!(null==L?void 0:L.awaitingFinalDimensions);return dimsOf(null!=(e=null==L?void 0:L.originalMetadata)?e:{})||(r?null:dimsOf(null!=(t=metadata())?t:{}))}function enhancingBoxAspectRatio(){if(!ep)return"1 / 1";var e=_sliced_to_array(ep.split(" / "),2),t=e[0],r=e[1];return"".concat(r," / ").concat(t)}function previewImageAlt(){var e=(null==L?void 0:L.filename)||(null==L?void 0:L.name);return e?"Preview of ".concat(e):"Preview of your uploaded design"}function showImagePreview(){var e,t=z?L:L&&!L.isSimulated;return sizeErrorTypes().includes(null==(e=L.errorType)?void 0:e.toString())&&!L.uploadError||showModal()?t:t&&!withError()&&!L.retryFailed}function fillAvailable(){return!L.isFile&&ei}function isUserSignedIn(){return"signed_in"===userType()}function metadata(){var e=L||{}
1,t=e.removeBackground,r=e.metadata,n=e.withBgMetadata;return n?t?r:n:r}function arrowWidth(){if((null==L?void 0:L.lastEditedSizeId)&&(null==L?void 0:L.sizesAndQuantities)){var e,t,r,n,o,i,l,c,u,d=L.sizesAndQuantities.find(function(e){return e.id===L.lastEditedSizeId&&e.quantity>0});if(d)return d.width}var p=null==L||null==(e=L.sizesAndQuantities)?void 0:e.filter(function(e){return e.quantity>0});if((null==p?void 0:p.length)>0)return p[0].width;if(isStandardArtwork())return(0,T.Y_)(L)?L.removeBackground?(null==(c=L.enhancedMetadata)?void 0:c.widthInch)||(null==(u=metadata())?void 0:u.widthInch)||L.width:(null==(i=L.withBgMetadata)?void 0:i.widthInch)||(null==(l=metadata())?void 0:l.widthInch)||L.width:(null==L||null==(n=L.originalMetadata)?void 0:n.widthInch)||(null==(o=metadata())?void 0:o.widthInch)||L.width;return(null==(t=previewMetadata())?void 0:t.widthInch)?previewMetadata().widthInch:isSet()?L.width:null==(r=metadata())?void 0:r.widthInch}function arrowHeight(){if((null==L?void 0:L.lastEditedSizeId)&&(null==L?void 0:L.sizesAndQuantities)){var e,t,r,n,o,i,l,c,u,d=L.sizesAndQuantities.find(function(e){return e.id===L.lastEditedSizeId&&e.quantity>0});if(d)return d.height}var p=null==L||null==(e=L.sizesAndQuantities)?void 0:e.filter(function(e){return e.quantity>0});if((null==p?void 0:p.length)>0)return p[0].height;if(isStandardArtwork())return(0,T.Y_)(L)?L.removeBackground?(null==(c=L.enhancedMetadata)?void 0:c.heightInch)||(null==(u=metadata())?void 0:u.heightInch)||L.height:(null==(i=L.withBgMetadata)?void 0:i.heightInch)||(null==(l=metadata())?void 0:l.heightInch)||L.height:(null==L||null==(n=L.originalMetadata)?void 0:n.heightInch)||(null==(o=metadata())?void 0:o.heightInch)||L.height;var f=null==(t=previewMetadata())?void 0:t.heightInch;return f?Math.ceil(f/12):isSet()?L.height:(null==(r=metadata())?void 0:r.heightInch)||(null==L?void 0:L.height)}function isSet(){return(null==L?void 0:L.height)>0&&(null==L?void 0:L.width)>0}function previewMetadata(){return L.previewMetadata}function isPreviewMatadataPresent(){return"object"!==_type_of(previewMetadata())||0===Object.keys(previewMetadata()).length}function heightUnit(){return printAsIs()?"′":""}function imageMaxHeight(){var e,t,r=null!=(e=null==(t=eQ.current)?void 0:t.$el)?e:eQ.current;return r?pxToNumber(window.getComputedStyle(r).getPropertyValue("max-height")):0}function previewWrapperPadding(){var e=eJ.current;return pxToNumber(window.getComputedStyle(e).getPropertyValue("padding-left"))}function canvasWidth(){if(isPreviewMatadataPresent()||!(null==(t=eQ.current)||null==(e=t.$el)?void 0:e.nodeType))return null;var e,t,r=eJ.current;return previewMetadata().gangSheetRatio<1?imageMaxHeight()*previewMetadata().gangSheetRatio+3:r.clientWidth-previewWrapperPadding()}function canvasHeight(){var e,t;return!isPreviewMatadataPresent()&&(null==(t=eQ.current)||null==(e=t.$el)?void 0:e.nodeType)?previewMetadata().gangSheetRatio<1?imageMaxHeight():canvasWidth()/previewMetadata().gangSheetRatio:null}function canvasWidthPx(){return canvasWidth()?"".concat(canvasWidth(),"px"):"auto"}function canvasHeightPx(){return ey?"".concat(ey,"px"):null==canvasHeight()?null:"".concat(canvasHeight(),"px")}function imageWidth(){var e;return isPreviewMatadataPresent()||(null==(e=previewMetadata())?void 0:e.cropImage)?"unset":"".concat(canvasWidth()*previewMetadata().widthToGangSheetWidthRatio,"px")}function imagePreviewHeight(){return null==canvasHeight()?null:"".concat(canvasHeight()*previewMetadata().heightToGangSheetHeightRatio,"px")}function imageAlignment(){return isPreviewMatadataPresent()?"center":"unset"}function imagePreviewMaxWidth(){var e;return(null==(e=previewMetadata())?void 0:e.cropImage)?"unset":"100%"}function withError(){var e,t;return(null==(t=metadata())||null==(e=t.errors)?void 0:e.length)>0||L.errorMessage||L.uploadError}function hasGangSheetErrorFn(){return(0,T.zc)(L)}function pauseSpinner(){var e;return L.uploadError&&(null==(e=L.file)?void 0:e.type)==="application/pdf"}function getUniqueArtworkId(){return"".concat(H,"-").concat(L.id,"-").concat(V?"multi":"single")}function getImageZoomId(){return"js-magnify-wrapper-".concat(getUniqueArtworkId())}function isTappable(){return(0,l.CN)()||(0,l.Fr)()}function zoomText(){return isTappable()?"":"Hover Image to Zoom"}function getZoomTextId(){return"js-zoom-text-".concat(getUniqueArtworkId())}function isArtworkLoading(){return L.isLoading}function isArtworkImageWrapperLoading(){return isArtworkLoading()||usesStandardPreviewExperience()&&!L.enhancementCompleted}function imageCompareAfterLabel(){var e="Jiffy Print Perfect";return enableAbAiMonetization()&&(e="PrintPerfect"),e}function showSpanglesLoader(){return isSpangle()&&(spangleSizeEditing()||isSelectedVersionLoading()||isArtworkLoading())}function showSpanglesComparison(){return selectedVersion()&&selectedVersion().spangleCsv&&!selectedVersion().isLoading&&!selectedVersion().error&&!isArtworkLoading()}
1function showImageComparison(){return!!ei&&(null==L?!!void 0:!!L.success)&&(isSpangle()?showSpanglesComparison():!isSticker()&&isStandardArtwork()?!isCmykSoftProofActive():isProColor())}function magnifierPosition(){return V?"right":"left"}function sliderText(){return(null==L?void 0:L.isLoading)?{}:isProColor()?{before:"CMYK",after:"ProColor"}:isSpangle()?{before:"Original",after:"Spangle"}:{}}function printOriginalPreviewImage(){return isCmykSoftProofActive()?(null==L?void 0:L.cmykOriginalImageUrl)||(null==L?void 0:L.originalImageUrl):isGoldFoil()&&(null==L?void 0:L.goldFoilOriginalUrl)||(null==L?void 0:L.originalImageUrl)}function isArtworkTrimmedWithBackground(){var e;return!(null==L?void 0:L.canRemoveBg)&&(null==L||null==(e=L.metadata)?void 0:e.trimmed)}function sliderBeforeImage(){return"print-as-uploaded"===Q&&(null==L?void 0:L.originalMime)==="image/svg+xml"?null==L?void 0:L.originalImageUrl:isProColor()&&!isArtworkLoading()?(null==L?void 0:L.cmykOriginalImageUrl)||eB||(null==L?void 0:L.originalImageUrl):(null==L?void 0:L.enhancementTier)==="custom"?(null==L?void 0:L.originalMime)==="image/svg+xml"&&(null==L?void 0:L.trimmedWithBgUrl)||(null==L?void 0:L.originalImageUrl):(null==L?void 0:L.enhancementTier)==="print_original"?printOriginalPreviewImage():showSpanglesComparison()?originalArtworkUrl():!isSticker()&&isStandardArtwork()?(null==L?void 0:L.enhancementCompleted)&&isArtworkTrimmedWithBackground()&&(null==L?void 0:L.trimmedWithBgUrl)?null==L?void 0:L.trimmedWithBgUrl:(null==L?void 0:L.originalImageUrl)||imageSrc():imageSrc()}function isTransparent(){return"transparent"===artworkBackground()}function showZoomButton(){return showMagnifier()&&!annotateEnabled()&&isMobileStore()}function showMagnifier(){return!isProColor()&&(isStandardArtwork()?isCmykSoftProofActive()?ei:ei&&!isArtworkLoading()&&!!(null==L?void 0:L.enhancementCompleted)&&!artworkEnhancementProcessing()&&(null==L?void 0:L.enhancementTier)!=="print_original":isSpangle()?ei&&allAPIsCompleted():ei)}var eY=!isTappable()&&showMagnifier()&&isStandardArtwork()&&!isCmykSoftProofActive();function dismissLoupeHint(){em(!1),null!==eg.current&&(window.clearTimeout(eg.current),eg.current=null);try{window.sessionStorage.setItem(F,"1")}catch(e){}}function messageArray(){return isSticker()?(0,g.wP)(eA.stickers,stickerPromoPrice()):eA.transfers}function currentMessage(){var e=messageArray();return e[eI%e.length]}function pdpImageWidth(){return showImageComparison()?"auto":"650px"}function showFullWidthArtwork(){return!K&&(!!usesStandardPreviewExperience()||isSpangle()&&!sticker()&&!V)}function showUploadCloudArea(){return sticker()||"UVDTF01"===catalogNumber()}function showImageProof(){return!sticker()&&!showUploadCloudArea()}function shouldShowTShirtBackground(){return showImageProof()&&pdpType()!==g.bk}function uploadAreaStyles(){return(0,i.cn)("artwork-image__dropzone",cloudAndCanvaEnabled()&&"artwork-image__dropzone--canva-enabled",showUploadCloudArea()&&"artwork-image__dropzone--cloud",shouldShowTShirtBackground()&&"artwork-image__dropzone--t-shirt",showGangSheetBuilderFeature()&&"artwork-image__dropzone--gang-sheet",isStandardArtwork()&&"artwork-image__dropzone--standard-artwork")}function uploadAreaTitle(){return showGangSheetBuilderFeature()?"Drag your gang sheet file here":showUploadCloudArea()||showImageProof()?"Drag your design here":"Get started by dragging your design"}function dripOnlyAreaTitle(){return"Design your sticker online"}function uploadAreaPreviousAction(){return showUploadCloudArea()||showImageProof()?"My Design Library":pickFromUploadsOrDesigns()?"Pick from previous uploads or saved designs":"Purchase from your previous uploads"}function showDropzoneSubtitle(){return!isSpangle()&&!isPuff()&&!showUploadCloudArea()&&!isStickerSample()&&!showImageProof()}function annotateEnabled(){return L.annotateEnabled}function annotatedPoints(){return L.annotatedPoints}function usesStandardPreviewExperience(){return isStandardArtwork()||isProColor()}function enhancementPipelineProcessing(){var e=isProColor()&&!L.imageAttached,t=usesStandardPreviewExperience()&&!!L.awaitingFinalDimensions;return usesStandardPreviewExperience()&&!isArtworkLoading()&&(!L.enhancementCompleted||t||e)}function awaitingEnhancedImageDecode(){return usesStandardPreviewExperience()&&!!L.enhancementCompleted&&!L.awaitingFinalDimensions&&!(isProColor()&&!L.imageAttached)&&!shouldDisableSlider()&&!L.manualEditUrl&&!ec}function artworkEnhancementProcessing(){return enhancementPipelineProcessing()||usesStandardPreviewExperience()&&!isArtworkLoading()&&awaitingEnhancedImageDecode()}function artworkMetadata(){return L.metadata}function shouldSkipShowArrowShaftCalculation(){var e;
1return!ei||!(null==L?void 0:L.removeBackground)||!(null==(e=artworkMetadata())?void 0:e.trimCoordinate)||(null==L?void 0:L.enhancementTier)==="print_original"||(null==L?void 0:L.enhancementTier)==="custom"||artworkEnhancementProcessing()||(null==L?void 0:L.enhancementCompleted)&&imageSrc()===(null==L?void 0:L.enhancedNoBgUrl)}function arrowShaftHorizontalLeftPadding(){if(shouldSkipShowArrowShaftCalculation()||!(null==(e=eQ.current)?void 0:e.imageIntrinsicWidth)||!(null==(r=eQ.current)||null==(t=r.$refs)?void 0:t.imageElement))return 0;var e,t,r,n=Math.min(artworkMetadata().trimCoordinate.topLeft[0],artworkMetadata().trimCoordinate.bottomLeft[0]),o=eQ.current.$refs.imageElement.getBoundingClientRect().width*n/eQ.current.imageIntrinsicWidth;return"".concat(o,"px")}function arrowShaftHorizontalWidth(){if(shouldSkipShowArrowShaftCalculation()||!(null==(e=eQ.current)?void 0:e.imageIntrinsicWidth))return"100%";var e,t=Math.max(artworkMetadata().trimCoordinate.topRight[0],artworkMetadata().trimCoordinate.bottomRight[0]),r=eQ.current.$refs.imageElement.getBoundingClientRect().width*t/eQ.current.imageIntrinsicWidth;return"calc(".concat(r,"px - ").concat(arrowShaftHorizontalLeftPadding(),")")}function arrowShaftVerticalTopPadding(){if(shouldSkipShowArrowShaftCalculation()||!(null==(e=eQ.current)?void 0:e.imageIntrinsicHeight))return 0;var e,t=Math.min(Math.abs(artworkMetadata().trimCoordinate.topLeft[1]),Math.abs(artworkMetadata().trimCoordinate.topRight[1])),r=eQ.current.$refs.imageElement.getBoundingClientRect().height*t/eQ.current.imageIntrinsicHeight;return"".concat(r,"px")}function arrowShaftVerticalHeight(){if(shouldSkipShowArrowShaftCalculation()||!(null==(e=eQ.current)?void 0:e.imageIntrinsicHeight))return"100%";var e,t=Math.max(Math.abs(artworkMetadata().trimCoordinate.bottomLeft[1]),Math.abs(artworkMetadata().trimCoordinate.bottomRight[1])),r=eQ.current.$refs.imageElement.getBoundingClientRect().height*t/eQ.current.imageIntrinsicHeight;return"calc(".concat(r,"px - ").concat(arrowShaftVerticalTopPadding(),")")}function uploadButtonTitle(){return showGangSheetBuilderFeature()?"Upload your gang sheet":g.wL}function uploadFromCanvaEnabled(){return canvaDtfEnabled()&&isUserSignedIn()}function gangSheetAndCanvaEnabled(){return showGangSheetBuilderFeature()&&uploadFromCanvaEnabled()}function cloudAndCanvaEnabled(){return showUploadCloudArea()&&uploadFromCanvaEnabled()}function shouldDisableSlider(){return"print_original"===L.enhancementTier||"custom"===L.enhancementTier}function artworkUploaded(){var e=parseInt(null==L?void 0:L.id,10);return!Number.isNaN(e)&&"number"==typeof e&&!(null==L?void 0:L.isLoading)}function showCancelButton(){var e=artworkUploaded()&&enhancementPipelineProcessing();return!withError()&&V&&(isArtworkLoading()||e)}function shouldShowLabels(){return catalogNumber()===g.aS||!V&&!z}function shouldShowEnhancementBadge(){return!!(null==L?void 0:L.enhancementCompleted)&&(null==L?void 0:L.enhancementTier)==="full_enhancements"&&!!(null==L?void 0:L.enhancedDpi)&&shouldShowLabels()}function showChecklist(){var e,t,r;return(null!=(e=null==L||null==(r=L.appliedTransformations)?void 0:r.length)?e:0)+ +((null!=(t=null==L?void 0:L.enhancedDpi)?t:0)>=M.de)>=M.fR}function dynamicTShirtHeight(){var e;if(!showImageProof())return gangSheetAndCanvaEnabled()?"330px":showGangSheetBuilderFeature()?"280px":"380px";return(e=gangSheetAndCanvaEnabled()?{fallback:360,minimum:350}:showGangSheetBuilderFeature()?{fallback:320,minimum:300}:{fallback:400,minimum:380},eH)?"".concat(Math.max(eH+120,e.minimum),"px"):"".concat(e.fallback,"px")}function smartTShirtPositioning(){return!showImageProof()||showGangSheetBuilderFeature()?{top:"50%",left:"50%"}:{top:"".concat(55,"%"),left:"50%"}}function shouldShowDropzone(){return!mobileFooterCTAEnabled()||isSticker()||"UVDTF01"===catalogNumber()}function arrowShaftHorizontalCompactTop(){return"-11px"}function backgroundTypeModelGet(){return backgroundType()}function setBackgroundTypeModel(e){eG.setBackgroundType(e)}function setShowArtworkHistoryModal(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.setShowArtworkHistoryModal.apply(eG,_to_consumable_array(t))}function updateArtworkValuesById(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.updateArtworkValuesById.apply(eG,_to_consumable_array(t))}function setRemovalFile(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.setRemovalFile.apply(eG,_to_consumable_array(t))}function updatePreviewDpi(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.updatePreviewDpi.apply(eG,_to_consumable_array(t))}function downscaleOriginalImage(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.downscaleOriginalImage.apply(eG,_to_consumable_array(t))}function handleCancelProcess(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eG.handleCancelProcess.apply(eG,_to_consumable_array(t))}function onCanvasLoaded(){downscaleOriginalImage({artworkId:L.id})}function trackAddFileAreaClick(){(0,c.Py)("transfer_choose_file_clicked",{page:"pdp",pdp_type:pdpType(),catalog_number:catalogNumber(),business_line:businessLine()}),(0,u.A)("DesignStarted",{event_id:"DS-".concat(crypto.randomUUID()),product_id:productId()})}function onDropzoneClick(){trackAddFileAreaClick(),er({replaceArtwork:!0})}function onImageLoad(){var e,t,r=!L.isFile;es(r),r&&((0,c.Py)("artwork_preview_rendered",{artwork_id:L.id}),null==(t=document.querySelector(".".concat(getZoomTextId())))||null==(e=t.classList)||e.remove("hidden"),(isSticker()||isStickerSample()||isUVDTFSticker())&&requestAnimationFrame(function(){var e=null==(r=eQ.current)||null==(t=r.$refs)?void 0:t.imageElement;
1if(e&&e.naturalWidth&&e.naturalHeight){var t,r,n,o=e.naturalWidth/e.naturalHeight;ev(Math.min(((null==(n=eJ.current)?void 0:n.clientWidth)||628)/o,348))}}))}function onImageError(){(0,c.Py)("artwork_preview_load_failed",{artwork_id:L.id})}function pxToNumber(e){return Number(e.replace("px",""))}function onArtworkHistoryClick(){setShowArtworkHistoryModal(!showArtworkHistoryModal()),(0,c.Py)("previous_purchase_link_clicked",{page:"pdp",pdp_type:pdpType()})}function onRemoveArtwork(){et?et():setRemovalFile(L.id)}function toggleComparisonModal(){ek(function(e){return!e})}function randomMessage(){eE(Math.floor(Math.random()*messageArray().length))}function annotateImage(e){if(L.annotateEnabled){var t=e$.current,r=eQ.current,n=r.originalWidth,o=r.originalHeight,i=t.getBoundingClientRect(),l=i.width/i.height,c=0,u=0;n/o>l?u=(c=i.width)/n*o:c=(u=i.height)/o*n;var d=(i.width-c)/2,p=(i.height-u)/2,f=e.clientX,_=e.clientY;if("touchstart"===e.type){var h=e.touches[0];f=h.clientX,_=h.clientY}var m=f-i.x-d,g=_-i.y-p,b=_to_consumable_array(L.annotatedPoints);m<0||m>c||g<0||g>
1u||(eT(d),eF(p),b.push({x:m,y:g,mode:L.annotateMode}),updateArtworkValuesById({id:L.id,annotatedPoints:b,annotatedCanvasWidth:c,annotatedCanvasHeight:u}))}}function measureDropzoneHeight(){queueMicrotask(function(){setTimeout(function(){if(eZ.current&&showImageProof()){var e=eZ.current.getBoundingClientRect().height;e>50&&eV(e)}},50)})}function remeasureHeight(){queueMicrotask(function(){measureDropzoneHeight(),setTimeout(function(){return measureDropzoneHeight()},100)})}function handleResize(){clearTimeout(eW.current),eW.current=setTimeout(function(){measureDropzoneHeight()},150)}function onUploadImageClick(){trackAddFileAreaClick(),er({replaceArtwork:!0})}return(0,o.useEffect)(function(){if(eY){var e=!1;try{e="1"===window.sessionStorage.getItem(F)}catch(t){e=!1}if(!e)return em(!0),eg.current=window.setTimeout(function(){eg.current=null,em(!1);try{window.sessionStorage.setItem(F,"1")}catch(e){}},3e3),function(){null!==eg.current&&(window.clearTimeout(eg.current),eg.current=null)}}},[eY]),(0,o.useEffect)(function(){es(!L.isFile),ev(null),ez(L.downscaledOriginalImage)},[L]),(0,o.useLayoutEffect)(function(){eu(!1),ef(null)},[null!=(t=L.processTimeStamp)?t:L.id]),(0,o.useLayoutEffect)(function(){if(null===ep){var e=computeOriginalEnhancingRatio();e&&ef(e)}},[L.originalMetadata,L.metadata,L.withBgMetadata,L.removeBackground,L.enhancementCompleted,L.awaitingFinalDimensions,ep]),(0,o.useEffect)(function(){if(!ec&&!(!usesStandardPreviewExperience()||!L.enhancementCompleted||L.awaitingFinalDimensions||isProColor()&&!L.imageAttached||shouldDisableSlider())&&!L.manualEditUrl){var e=previewImageSrc();if(!e)return void eu(!0);var t=!1,finish=function(){t||(t=!0,eu(!0))},r=new Image;r.onload=finish,r.onerror=finish,r.src=e,r.complete&&finish();var n=window.setTimeout(finish,8e3);return function(){t=!0,r.onload=null,r.onerror=null,window.clearTimeout(n)}}},[ec,L.enhancementCompleted,L.awaitingFinalDimensions,L.imageAttached,L.enhancementTier,L.manualEditUrl,L.removeBackground,L.enhancedNoBgUrl,L.enhancedWithBgUrl]),(0,o.useEffect)(function(){!isArtworkLoading()&&L.enhancementCompleted&&previewCanvasSize().width>0&&previewCanvasSize().height>0&&(updatePreviewDpi({artworkId:L.id}),downscaleOriginalImage({artworkId:L.id}))},[JSON.stringify(previewCanvasSize())]),(0,o.useEffect)(function(){remeasureHeight()},[isUserSignedIn()]),(0,o.useEffect)(function(){remeasureHeight()},[uploadFromCanvaEnabled()]),(0,o.useEffect)(function(){remeasureHeight()},[showGangSheetBuilderFeature()]),(0,o.useEffect)(function(){eO(50*!isSpangle());var e=setInterval(randomMessage,1e4);return remeasureHeight(),window.addEventListener("resize",handleResize),function(){clearInterval(e),window.removeEventListener("resize",handleResize)}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,i.cn)("artwork-image scope-297dd82d",z&&"artwork-image--with-made",shouldShowTShirtBackground()&&!showImagePreview()&&"artwork-image__t-shirt",shouldShowTShirtBackground()&&!showImagePreview()&&showGangSheetBuilderFeature()&&"artwork-image__t-shirt--gang-sheet-upload",gangSheetAndCanvaEnabled()&&"artwork-image__t-shirt--gang-sheet-upload-with-canva-enabled",en)},eo),{style:{"--297dd82d-dynamicTShirtHeight":dynamicTShirtHeight(),"--297dd82d-smartTShirtPositioning-top":smartTShirtPositioning().top,"--297dd82d-smartTShirtPositioning-left":smartTShirtPositioning().left,"--297dd82d-imagePreviewMaxWidth":imagePreviewMaxWidth(),"--297dd82d-imageWidth":imageWidth(),"--297dd82d-imagePreviewHeight":imagePreviewHeight(),"--297dd82d-pdpImageWidth":pdpImageWidth(),"--297dd82d-artworkBackground":artworkBackground(),"--297dd82d-canvasWidthPx":canvasWidthPx(),"--297dd82d-canvasHeightPx":canvasHeightPx(),"--297dd82d-enhancingAspectRatio":enhancingBoxAspectRatio(),"--297dd82d-imageAlignment":imageAlignment(),"--297dd82d-arrowShaftHorizontalCompactTop":arrowShaftHorizontalCompactTop(),"--297dd82d-arrowShaftHorizontalLeftPadding":arrowShaftHorizontalLeftPadding(),"--297dd82d-arrowShaftHorizontalWidth":arrowShaftHorizontalWidth(),"--297dd82d-arrowShaftVerticalTopPadding":arrowShaftVerticalTopPadding(),"--297dd82d-arrowShaftVerticalHeight":arrowShaftVerticalHeight()},children:[showImagePreview()?(0,n.jsx)("div",{"data-testid":"artwork-image-preview",className:(0,i.cn)("artwork-image__preview scope-297dd82d",!imageSrc()&&"artwork-image__preview--empty",withError()&&"artwork-image__preview--with-error",!L.width&&"artwork-image__preview--without-width",showFullWidthArtwork()&&"artwork-image__preview--full-height",K&&"artwork-image__preview--fit-to-container",artworkEnhancementProcessing()&&"artwork-image__preview--enhancing"),children:(0,n.jsxs)(n.Fragment,{children:[!z||z&&imageSrc()?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__preview-wrapper scope-297dd82d",!L.height&&"artwork-image__preview-wrapper--without-height",showFullWidthArtwork()&&L.height&&"artwork-image__preview-wrapper--max-width",ey&&"artwork-image__preview-wrapper--sticker-loaded",!!(null==L?void 0:L.enhancementCompleted)&&"artwork-image__preview-wrapper--loaded"),ref:eJ,children:[L.width?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__arrow-shaft artwork-image__arrow-shaft--horizontal scope-297dd82d",!!showFullWidthArtwork()&&"artwork-image__arrow-shaft--horizontal-compact",!!isStandardArtwork()&&"artwork-image__arrow-shaft--standard-artwork"),children:[(0,n.jsxs)("div",{className:"artwork-image__dimension scope-297dd82d",children:[arrowWidth(),'"']}),(0,n.jsx)("div",{className:"artwork-image__arrow artwork-image__arrow--left scope-297dd82d"}),(0,n.jsx)("div",{className:"artwork-image__arrow artwork-image__arrow--right scope-297dd82d"})]}):null,!isStandardDTFProduct()||isArtworkLoading()||artworkEnhancementProcessing()?null:(0,n.jsxs)("div",{className:(0,i.cn)("artwork-info__actions artwork-info__actions--experiment scope-297dd82d","checkered"===backgroundType()&&"artwork-info__actions--bg-checkered","green"===backgroundType()&&"artwork-info__actions--bg-green"),children:[hasGangSheetErrorFn()?null:(0,n.jsx)(m.A,{className:"scope-297dd82d",modelValue:backgroundTypeModelGet(),onUp
1dateModelValue:function(e){setBackgroundTypeModel(e)},"data-testid":"background-toggle"}),shouldShowEnhancementBadge()?(0,n.jsx)("div",{className:"artwork-image__post-enhancement-status scope-297dd82d","data-testid":"artwork-image-post-enhancement-status",children:showChecklist()?(0,n.jsx)("div",{className:"artwork-image__enhancement-badge scope-297dd82d","data-testid":"artwork-image-enhancement-badge",children:(0,n.jsx)(M.ne,{artwork:{id:L.id,enhancedDpi:L.enhancedDpi,catalogNumber:catalogNumber(),appliedTransformations:L.appliedTransformations}})}):(0,n.jsxs)("div",{className:"artwork-image__enhancement-badge scope-297dd82d","data-testid":"artwork-image-enhancement-badge","aria-label":"Image passes PrintPerfect quality check at ".concat(L.enhancedDpi," DPI, print-ready"),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"✓"})," ",L.enhancedDpi," DPI \xb7 Print-ready \xb7 Enhanced by PrintPerfect"]})}):null,(0,n.jsx)("button",{className:"artwork-info__remove-button artwork-info__remove-button--experiment scope-297dd82d",type:"button",onClick:onRemoveArtwork,"data-testid":"transfers-remove-artwork-button",children:(0,n.jsx)(f.A,{className:"artwork-info__trash-icon scope-297dd82d",icon:"trash","data-testid":"artwork-info-trash-icon"})})]}),(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__preview-image scope-297dd82d",fillAvailable()&&"artwork-image__preview-image--loaded",isTransparent()&&"artwork-image__preview-image--transparent-background",showFullWidthArtwork()&&"artwork-image__preview-image--full-width",isStandardArtwork()&&"artwork-image__preview-image--standard-artwork",artworkEnhancementProcessing()&&"artwork-image__preview-image--enhancing",artworkEnhancementProcessing()&&Y&&"artwork-image__preview-image--enhancing-centred-loader"),children:[L.processingImage?(0,n.jsx)("div",{className:"artwork-image__loader scope-297dd82d",children:(0,n.jsx)(_.A,{className:"artwork-image__loader-spinner scope-297dd82d",theme:"white","data-testid":"artwork-image-loader-spinner"})}):null,usesStandardPreviewExperience()?(0,n.jsx)(n.Fragment,{children:isArtworkLoading()&&!spangleSizeEditing()?(0,n.jsx)("div",{className:(0,i.cn)("artwork-image__loading-wrapper scope-297dd82d",Y&&withError()&&"artwork-image__loading-wrapper--errored"),children:(0,n.jsxs)("div",{className:"artwork-image__loading-box-content scope-297dd82d",children:[(0,n.jsx)(f.A,{className:"artwork-image__loading-box-content-icon scope-297dd82d mx-auto",icon:"cloud-upload-2","data-testid":"artwork-image-loading-box-content-icon"}),isArtworkLoading()?(0,n.jsx)(k.A,{className:"scope-297dd82d",artwork:L,index:H,"data-testid":"dtf-progress-bar"}):null]})}):null}):(0,n.jsx)(n.Fragment,{children:isArtworkLoading()&&!spangleSizeEditing()?(0,n.jsx)("div",{className:"artwork-image__sparkle-gif-container scope-297dd82d",children:(0,n.jsx)("img",{className:"artwork-image__sparkle-gif scope-297dd82d",src:eP,alt:"","aria-hidden":"true"})}):null}),showSpanglesLoader()?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__preview-overlay-loader scope-297dd82d",spangleSizeEditing()&&"artwork-image__preview-overlay-loader--editing-size"),children:[spangleSizeEditing()?(0,n.jsx)(f.A,{className:"artwork-image__preview-overlay-loader-icon scope-297dd82d",icon:"pencil","data-testid":"artwork-image-preview-overlay-loader-icon"}):null,spangleSizeEditing()?(0,n.jsx)("span",{className:"artwork-image__loader-text scope-297dd82d",children:"Please finish editing the size."}):(0,n.jsx)(P.A,{className:"artwork-image__loader-text scope-297dd82d",message:"Making spangle magic! Your design is being created.","data-testid":"artwork-image-loader-text"}),spangleSizeEditing()?null:(0,n.jsxs)("div",{className:"artwork-image__loader-actions scope-297dd82d",children:[(null==L?void 0:L.processTimeStamp)?(0,n.jsx)(E.A,{},L.processTimeStamp):null,(0,n.jsxs)("button",{className:"artwork-image__cancel scope-297dd82d",type:"button",onClick:function(){handleCancelProcess(L)},"data-testid":"artwork-image-cancel",children:[" ","Cancel"," "]})]})]}):null,!showImageProof()&&!isStandardArtwork()&&isArtworkLoading()?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__preview-overlay-loader artwork-image__preview-overlay-loader--tips-wrapper scope-297dd82d",showModal()&&"artwork-image__preview-overlay-loader--tips-wrapper-modal"),children:[(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__preview-overlay-loader-jiffy-tips scope-297dd82d",showModal()&&"artwork-image__preview-overlay-loader-jiffy-tips--modal"),children:[(0,n.jsx)(f.A,{className:"artwork-image__preview-overlay-loader-tips-icon scope-297dd82d",icon:"lightbulb-info","data-testid":"artwork-image-preview-overlay-loader-tips-icon"}),(0,n.jsx)("span",{className:"scope-297dd82d",children:"JIFFY TIPS"})]}),(0,n.jsx)("span",{className:(0,i.cn)("artwork-image__loader-text scope-297dd82d",showModal()&&"artwork-image__loader-text--modal"),children:currentMessage()})]}):null,(0,n.jsx)("div",{className:(0,i.cn)("image-compare__loupe-microcopy-wrapper scope-297dd82d"),children:eY?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__loupe-microcopy scope-297dd82d"),"data-testid":"image-compare-loupe-microcopy",children:"Zoom to check print quality"}):null}),(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__image-wrapper image-magnifier scope-297dd82d",getImageZoomId(),isArtworkImageWrapperLoading()&&"artwork-image__image-wrapper--loading",eY&&"image-compare--magnifier"),ref:e$,onClick:annotateImage,onTouchStart:annotateImage,onMouseOver:eY&&eh?dismissLoupeHint:void 0,"data-testid":"artwork-image-image-wrapper",children:[eY&&eh?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__loupe-hint scope-297dd82d"),"aria-hidden":"true","data-testid":"image-compare-loupe-hint",children:"\uD83D\uDD0D Hover to inspect edge quality"}):null,L.height?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__arrow-shaft artwork-image__arrow-shaft--vertical scope-297dd82d",!!showFullWidthArtwork()&&"artwork-image__arrow-shaft--vertical-compact",!!isStandardArtwork()&&"artwork-image__arrow-shaft--standard-artwork",!!isStandardDTFProduct()&&"artwork-image__arrow-shaft--experiment"),children:[(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__dimension scope-297dd82d",showFullWidthArtwork()&&"artwork-image__dimension--vertical"),children:[arrowHeight(),heightUnit()]}),(0,n.jsx)("div",{className:"artwork-image__arrow artwork-image__arrow--top scope-297dd82d"}),(0,n.jsx)("div",{className:"artwork-image__arrow artwork-image__arrow--bottom scope-297dd82d"})]}):null,isLoading()?(0,n.jsx)("div",{className:"artwork-image__loader scope-297dd82d",children:(0,n.jsx)(_.A,{className:"artwork-image__loader-indicator scope-297dd82d",theme:"white","data-testid":"artwork-image-loader-indicator"})}):null,!artworkEnhancementProcessing()&&(!isArtworkLoading()||isCmykSoftProofActive())&&!(isProColor()&&showImageComparison())?(0,n.jsx)(j.A,{className:(0,i.cn)("scope-297dd82d","artwork-image__image",showFullWidthArtwork()&&"artwork-image__image--full-width",K&&"artwork-image__image--fit-to-container",isStandardArtwork()&&"artwork-image__image--standard-artwork",isStandardDTFProduct()&&"artwork-image__image--experiment"),ref:eQ,"data-testid":"artwork-image-single-image-zoom",src:previewImageSrc(),alt:previewImageAlt(),wrapperClass:getImageZoomId(),isModal:V,position:magnifierPosition(),isArtwork:!(isProColor()||isSpangle()||isSticker()),isFullWidth:showFullWidthArtwork(),imageBackgroun
1d:artworkBackground(),overrideBackgroundType:void 0===X?void 0:X,forceLoaded:!!(null==L?void 0:L.enhancementCompleted),intrinsicWidth:enhancedImageIntrinsic().width,intrinsicHeight:enhancedImageIntrinsic().height,onLoad:onImageLoad,onError:onImageError,onCanvasLoaded:onCanvasLoaded}):(0,n.jsx)(b.A,{className:(0,i.cn)("scope-297dd82d","artwork-image__image js-magnify-image",showFullWidthArtwork()&&"artwork-image__image--full-width",K&&"artwork-image__image--fit-to-container",isStandardArtwork()&&"artwork-image__image--standard-artwork"),ref:eQ,beforeImage:sliderBeforeImage(),afterImage:enhancingAfterImageSrc(),magnifierPosition:magnifierPosition(),beforeText:sliderText().before,afterText:sliderText().after,showMagnifier:!isTappable()&&showMagnifier(),sliderPosition:eS,imageBackground:artworkBackground(),isFullWidth:showFullWidthArtwork(),isModal:V,enhancementProcessing:artworkEnhancementProcessing(),enhancingAspectRatio:enhancingBoxAspectRatio(),isArtwork:!0,alt:previewImageAlt(),selectedLabel:"jiffy-print-perfect"===Q?"after":"before",enhancementTier:L.enhancementTier,onLoad:onImageLoad,onError:onImageError,onCanvasLoaded:onCanvasLoaded,slots:{beforeText:function(){return(0,n.jsxs)(n.Fragment,{children:[" ",sliderText().before||"Before"," ",shouldShowLabels()?(0,n.jsxs)("span",{className:"artwork-image__comparison-slider-label scope-297dd82d",children:[" ","(",Math.round(L.sizeBasedDpi)," DPI)"," "]}):null]})},afterText:function(){return(0,n.jsxs)(n.Fragment,{children:[sliderText().after||imageCompareAfterLabel()," ",shouldShowLabels()?(0,n.jsxs)("span",{className:"artwork-image__comparison-slider-label scope-297dd82d",children:[" ","(",L.enhancedDpi||Math.round(L.sizeBasedDpi)," ","DPI)"," "]}):null]})}},"data-testid":"image-compare"}),(0,R.p)(annotatedPoints(),function(e,t){return(0,n.jsx)("div",{className:(0,i.cn)("scope-297dd82d","artwork-image__".concat(e.mode)),style:{left:"".concat((e.x+eD-5).toString(),"px"),top:"".concat((e.y+eR-5).toString(),"px")}},t)}),artworkEnhancementProcessing()&&Y?(0,n.jsx)(C.sZ,{className:"scope-297dd82d",isComplete:!enhancementPipelineProcessing()}):null]}),showZoomButton()?(0,n.jsx)("button",{className:(0,i.cn)("artwork-image__zoom-button scope-297dd82d",showImageProof()&&"artwork-image__zoom-button--t-shirt"),type:"button",onClick:toggleComparisonModal,"data-testid":"artwork-image-zoom-button",children:(0,n.jsx)(f.A,{className:"artwork-image__zoom-icon scope-297dd82d",icon:"search","data-testid":"artwork-image-zoom-icon"})}):null,artworkEnhancementProcessing()&&!Y?(0,n.jsx)(y.A,{className:"artwork-image__enhancement-loader scope-297dd82d",enhancementTier:L.enhancementTier,isProColor:isProColor(),"data-testid":"image-compare-loading-content"}):null]}),showMagnifier()?(0,n.jsx)("span",{className:(0,i.cn)("scope-297dd82d","artwork-image__zoom-text hidden ".concat(getZoomTextId())),children:zoomText()}):null]}):(0,n.jsx)(_.A,{className:"artwork-image__spinner scope-297dd82d",paused:pauseSpinner(),"data-testid":"artwork-image-spinner"}),ej?(0,n.jsx)(v.A,{className:"scope-297dd82d","data-testid":"artwork-image-mobile-image-modal",src:previewImageSrc(),alt:previewImageAlt(),wrapperClass:"zoom-image-modal",onClose:toggleComparisonModal}):null]})}):(0,w.CI)(eG)?(0,n.jsxs)("div",{className:(0,i.cn)("scope-297dd82d",uploadAreaStyles()),"data-testid":"artwork-image-drip-only-area",children:[(0,n.jsx)("div",{className:"artwork-image__info hidden-xs scope-297dd82d",children:(0,n.jsx)("p",{className:"artwork-image__title scope-297dd82d",children:dripOnlyAreaTitle()})}),(0,n.jsx)("div",{className:"artwork-image__action-buttons scope-297dd82d",children:(0,n.jsx)(S.A,{className:"scope-297dd82d","data-testid":"sticker-drip-builder-container"})})]}):shouldShowDropzone()?(0,n.jsxs)("div",{className:(0,i.cn)("scope-297dd82d",uploadAreaStyles()),ref:eZ,onClick:onDropzoneClick,"data-testid":"artwork-image-div",children:[(0,n.jsx)("button",{type:"button",className:"scope-297dd82d artwork-image__upload-trigger sr-only",onKeyDown:function(e){"Enter"===e.key&&e.repeat&&e.preventDefault()},onClick:function(e){e.stopPropagation(),onDropzoneClick()},"data-testid":"artwork-image-upload-button",children:"".concat(uploadAreaTitle(),", ").concat(uploadButtonTitle())}),showUploadCloudArea()?(0,n.jsxs)("div",{className:(0,i.cn)("artwork-image__cloud scope-297dd82d",uploadFromCanvaEnabled()&&"artwork-image__cloud--canva-enabled"),children:[(0,n.jsx)(f.A,{className:"artwork-image__cloud-box scope-297dd82d",icon:"upload-cloud-box","data-testid":"artwork-image-cloud-box"}),(0,n.jsx)(f.A,{className:"artwork-image__cloud-border scope-297dd82d",icon:"upload-cloud-border","data-testid":"artwork-image-cloud-border"})]}
1):null,showGangSheetBuilderFeature()?(0,n.jsxs)("div",{className:"artwork-image__gang-sheet-note scope-297dd82d",children:[(0,n.jsx)(f.A,{className:"artwork-image__gang-sheet-note-icon scope-297dd82d",icon:"lightbulb-info","data-testid":"artwork-image-gang-sheet-note-icon"}),(0,n.jsxs)("span",{className:"scope-297dd82d",children:[" ","Gang sheet width must be"," ",(0,n.jsx)("b",{className:"scope-297dd82d",children:gangSheetWidth225Exposed()?'22" (6600px) or 22.5" (6750px)':'22" (6600px)'})," ","with ",(0,n.jsx)("b",{className:"scope-297dd82d",children:"300 DPI"}),"."," ",(0,n.jsxs)("a",{className:"scope-297dd82d",href:"https://www.jiffy.com/artwork-dpi-instructions",onClick:function(e){e.stopPropagation()},"data-testid":"artwork-image-a",children:[" ","View Image Guidelines"," "]})]})]}):null,(0,n.jsxs)("div",{className:"artwork-image__info hidden-xs scope-297dd82d",children:[isSpangle()&&!showImageProof()?(0,n.jsx)(I.A,{className:"scope-297dd82d","data-testid":"spangle-notice"}):null,isPuff()&&!showImageProof()?(0,n.jsx)(A.A,{className:"scope-297dd82d","data-testid":"puff-notice"}):showUploadCloudArea()?null:(0,n.jsx)(f.A,{className:(0,i.cn)("artwork-image__icon scope-297dd82d",isStandardArtwork()&&"artwork-image__icon--standard-artwork"),icon:"cloud-upload","data-testid":"artwork-image-icon"}),(0,n.jsx)("p",{className:"artwork-image__title scope-297dd82d",children:uploadAreaTitle()}),showDropzoneSubtitle()?(0,n.jsxs)("p",{className:"artwork-image__subtitle scope-297dd82d",children:[" ","Multiple designs? Drag or select all your files together."," "]}):null,(0,n.jsx)("p",{className:(0,i.cn)("artwork-image__divider scope-297dd82d",isStandardArtwork()&&"artwork-image__divider--standard-artwork")})]}),isSpangle()&&!showImageProof()?(0,n.jsx)("div",{className:"artwork-image__spangle-mobile-notice visible-xs scope-297dd82d",children:(0,n.jsx)(I.A,{className:"scope-297dd82d","data-testid":"spangle-notice-1"})}):null,isPuff()&&!showImageProof()?(0,n.jsx)("div",{className:"artwork-image__spangle-mobile-notice visible-xs scope-297dd82d",children:(0,n.jsx)(A.A,{className:"scope-297dd82d","data-testid":"puff-notice-1"})}):null,(0,n.jsxs)("div",{className:"artwork-image__action-buttons scope-297dd82d",children:[showGangSheetBuilderFeature()?(0,n.jsx)(x.A,{className:"scope-297dd82d","data-testid":"gang-sheet-builder-container"}):null,(0,n.jsx)("div",{className:(0,i.cn)("artwork-image__action scope-297dd82d",isStandardArtwork()&&"artwork-image__action--standard-artwork"),children:showUploadCloudArea()||showImageProof()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"artwork-image__action-title scope-297dd82d",children:uploadButtonTitle()}),(0,n.jsx)("span",{className:"artwork-image__action-title--mobile scope-297dd82d",children:uploadButtonTitle()})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"hidden-xs scope-297dd82d",children:uploadButtonTitle()}),(0,n.jsxs)("span",{className:"artwork-image__action-container scope-297dd82d",children:[(0,n.jsx)(f.A,{className:(0,i.cn)("artwork-image__icon scope-297dd82d",isStandardArtwork()&&"artwork-image__icon--standard-artwork"),icon:"cloud-upload","data-testid":"artwork-image-icon-1"})," ",uploadButtonTitle()]})]})})]}),mobileFooterCTAEnabled()?null:(0,n.jsx)(n.Fragment,{children:isUserSignedIn()?(0,n.jsx)("a",{className:(0,i.cn)("artwork-image__dropzone-button artwork-image__dropzone-button--purchase scope-297dd82d",isStandardArtwork()&&"artwork-image__dropzone-button--standard-artwork"),href:"#",onClick:function(e){e.preventDefault(),e.stopPropagation(),onArtworkHistoryClick()},"data-testid":"artwork-image-dropzone-button",children:uploadAreaPreviousAction()}):(0,n.jsxs)("span",{className:"artwork-image__sign-in scope-297dd82d",children:[(0,n.jsxs)("a",{className:(0,i.cn)("artwork-image__link scope-297dd82d",isStandardArtwork()&&"artwork-image__link--standard-artwork"),href:"/login",onClick:function(e){e.stopPropagation()},"data-testid":"artwork-image-link",children:[" ","Log in"," "]})," ","to see purchased designs."," "]})}),uploadFromCanvaEnabled()?(0,n.jsx)("div",{className:(0,i.cn)("artwork-image__dropzone-button artwork-image__dropzone-button--purchase artwork-image__dropzone-button--canva scope-297dd82d",isStandardArtwork()&&"artwork-image__dropzone-button--standard-artwork"),onClick:function(e){e.stopPropagation()},"data-testid":"artwork-image-dropzone-button-1",children:(0,n.jsx)(p.A,{className:"scope-297dd82d",fileLanding:"#product-details-dtf-file-input",n
1amespace:"dtf","data-testid":"canva-button"})}):null]}):null,!usesStandardPreviewExperience()&&isArtworkLoading()?(0,n.jsx)(k.A,{className:"scope-297dd82d",artwork:L,index:H,"data-testid":"dtf-progress-bar-1"}):null,showImagePreview()&&void 0!==J&&J?(0,n.jsx)(h.A,{className:"scope-297dd82d",withMade:z,artwork:L,activeConfigSection:Q,shouldDisableSlider:shouldDisableSlider(),sliderBeforeImage:sliderBeforeImage(),isRedesign:Y,"data-testid":"artwork-full-screen"}):null,showCancelButton()?(0,n.jsxs)("button",{className:(0,i.cn)("scope-297dd82d","artwork-image__cancel","artwork-image__cancel--dtf",isStandardArtwork()?"artwork-image__cancel--dtf-v2":""),type:"button",onClick:function(){handleCancelProcess(L)},"data-testid":"artwork-image-button",children:[(0,n.jsx)(f.A,{className:"artwork-image__cancel-icon scope-297dd82d",icon:"modal-close","data-testid":"artwork-image-cancel-icon"})," ","Cancel"," "]}):null]})),!mobileFooterCTAEnabled()||showImagePreview()||(0,w.CI)(eG)?null:(0,n.jsx)(O.A,{className:"scope-297dd82d",isUserSignedIn:isUserSignedIn(),canvaDtfEnabled:canvaDtfEnabled(),fileLanding:"#product-details-dtf-file-input",namespace:"dtf",onUploadImageClick:onUploadImageClick,onArtworkHistoryClick:onArtworkHistoryClick,"data-testid":"mobile-footer-cta"})]})}},970021(e,t,r){"use strict";r.d(t,{A:()=>ArtworkInfo});var n=r(483134),o=r(997252),i=r(723433),l=r(795207),c=r(127391),u=r(538896),d=r(444636);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ArtworkInfo(e){var t=e.artwork,r=void 0===t?null:t,p=(e.index,e.showFileInfo),f=e.isMultiUpload,_=void 0!==f&&f,h=_object_without_properties(e,["artwork","index","showFileInfo","isMultiUpload"]),m=(0,u.useDtfStore)(),g=(0,c.o3)(),b=m.backgroundType;function showModal(){return m.showModal}function sizeErrorTypes(){return m.sizeErrorTypes}function isSpangle(){return m.isSpangle}function showStepsUI(){return m.showStepsUI}function showRedrawUI(){return m.showRedrawUI}function isStandardArtwork(){return m.isStandardArtwork}function isStandardDTFProduct(){return m.isStandardDTFProduct}function allAPIsCompleted(){return g.allAPIsCompleted}function metadata(){var e=r||{}
1,t=e.removeBackground,n=e.metadata,o=e.withBgMetadata;return o&&0!==Object.keys(o).length?t?n:o:n}function withError(){var e,t;return(null==(t=metadata())||null==(e=t.errors)?void 0:e.length)>0||(null==r?void 0:r.errorMessage)||(null==r?void 0:r.uploadError)||(null==r?void 0:r.retryFailed)}function hasGangSheetErrorComputed(){return(0,d.zc)(r)}function showRemoveButton(){var e,t=sizeErrorTypes().includes(null==r||null==(e=r.errorType)?void 0:e.toString())||showModal()||!withError();return isStandardArtwork()?t&&(null==r?void 0:r.enhancementCompleted):isSpangle()?t&&allAPIsCompleted():t}function svgIcon(){var e=showSteps()?"empty-image-circle":"check-bold";return withError()?"cross":e}function showArtworkInfo(){return showModal()||(metadata()||(null==r?void 0:r.isLoading))&&!(null==r?void 0:r.uploadError)&&!(null==r?void 0:r.retryFailed)}function largeBottomMargin(){return showSteps()&&!(null==r?void 0:r.isLoading)}function isTrimmedSize(){var e,t,n,o=null==r?void 0:r.originalMetadata,i=!!(null==o?void 0:o.widthInch)&&!!(null==o?void 0:o.heightInch),l=null==r||null==(t=r.metadata)?void 0:t.trimmed,c=!(null==r?void 0:r.enhanceImage)||!l;return(!isStandardArtwork()||!!(0,d.Y_)(r)||!i||!c)&&!!(null!=(e=null==(n=metadata())?void 0:n.trimmed)?e:l)}function trimmedText(){return isTrimmedSize()?"Trimmed size":"Original size"}function enhancedWidthInch(){var e,t,n,o,i,l,c;return isStandardArtwork()?(0,d.Y_)(r)?(null==r?void 0:r.removeBackground)?(null==r||null==(t=r.enhancedMetadata)?void 0:t.widthInch)||(null==(n=metadata())?void 0:n.widthInch):(null==r||null==(o=r.withBgMetadata)?void 0:o.widthInch)||(null==(i=metadata())?void 0:i.widthInch):(null==r||null==(l=r.originalMetadata)?void 0:l.widthInch)||(null==(c=metadata())?void 0:c.widthInch):(null==(e=metadata())?void 0:e.widthInch)||(null==r?void 0:r.width)}function enhancedHeightInch(){var e,t,n,o,i,l,c;return isStandardArtwork()?(0,d.Y_)(r)?(null==r?void 0:r.removeBackground)?(null==r||null==(t=r.enhancedMetadata)?void 0:t.heightInch)||(null==(n=metadata())?void 0:n.heightInch):(null==r||null==(o=r.withBgMetadata)?void 0:o.heightInch)||(null==(i=metadata())?void 0:i.heightInch):(null==r||null==(l=r.originalMetadata)?void 0:l.heightInch)||(null==(c=metadata())?void 0:c.heightInch):(null==(e=metadata())?void 0:e.heightInch)||(null==r?void 0:r.height)}function enhancedWidthPixel(){var e,t,n,o,i,l,c;return isStandardArtwork()?(0,d.Y_)(r)?(null==r?void 0:r.removeBackground)?(null==r||null==(t=r.enhancedMetadata)?void 0:t.width)||(null==(n=metadata())?void 0:n.width):(null==r||null==(o=r.withBgMetadata)?void 0:o.width)||(null==(i=metadata())?void 0:i.width):(null==r||null==(l=r.originalMetadata)?void 0:l.width)||(null==(c=metadata())?void 0:c.width):null==(e=metadata())?void 0:e.width}function enhancedHeightPixel(){var e,t,n,o,i,l,c;return isStandardArtwork()?(0,d.Y_)(r)?(null==r?void 0:r.removeBackground)?(null==r||null==(t=r.enhancedMetadata)?void 0:t.height)||(null==(n=metadata())?void 0:n.height):(null==r||null==(o=r.withBgMetadata)?void 0:o.height)||(null==(i=metadata())?void 0:i.height):(null==r||null==(l=r.originalMetadata)?void 0:l.height)||(null==(c=metadata())?void 0:c.height):null==(e=metadata())?void 0:e.height}function dimensionText(){return"".concat(enhancedWidthInch(),'" x ').concat(enhancedHeightInch(),'"')}function pixelDimensionText(){return"(".concat(enhancedWidthPixel(),"px x ").concat(enhancedHeightPixel(),"px)")}function showSteps(){return showStepsUI()&&!_}function setRemovalFile(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return m.setRemovalFile.apply(m,_to_consumable_array(t))}function setBackgroundType(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return m.setBackgroundType.apply(m,_to_consumable_array(t))}function handleBackgroundTypeModelChange(e){setBackgroundType(e)}function onRemove(){setRemovalFile(null==r?void 0:r.id)}return(0,n.jsx)(n.Fragment,{children:showArtworkInfo()?(0,n.jsx)("div",_object_spread_props(_object_spread({},h),{className:(0,o.cn)("artwork-info scope-ab916ad0",null==h?void 0:h.className,{"artwork-info--large-bottom-margin":largeBottomMargin()&&
1!(_&&showRedrawUI()),"artwork-info--standard-artwork":isStandardArtwork(),"artwork-info--no-margin":null==r?void 0:r.isLoading}),children:!metadata()||(null==r?void 0:r.isLoading)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,o.cn)("artwork-info__file-info-row scope-ab916ad0",{"artwork-info__file-info-row--with-error":withError()}),children:void 0===p||p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{className:(0,o.cn)("artwork-info__file-info-icon scope-ab916ad0",{"artwork-info__file-info-icon--large":showSteps()}),icon:svgIcon(),"data-testid":"artwork-info-file-info-icon"}),showSteps()?(0,n.jsxs)("div",{className:"scope-ab916ad0",children:[null==r?void 0:r.name," ",(0,n.jsx)("br",{className:"scope-ab916ad0"}),(0,n.jsxs)("b",{className:"scope-ab916ad0",children:[trimmedText()," ",dimensionText(),", ",pixelDimensionText()]})]}):(0,n.jsxs)("div",{className:"scope-ab916ad0",children:[(0,n.jsxs)("b",{className:"scope-ab916ad0",children:[trimmedText()," ",dimensionText()]}),(0,n.jsx)("br",{className:"scope-ab916ad0"})," ",pixelDimensionText()]})]}):null}),isStandardDTFProduct()?null:(0,n.jsxs)("div",{className:"artwork-info__actions scope-ab916ad0",children:[hasGangSheetErrorComputed()?null:(0,n.jsx)(l.A,{className:"scope-ab916ad0",modelValue:b,onUpdateModelValue:handleBackgroundTypeModelChange,"data-testid":"background-toggle"}),showRemoveButton()?(0,n.jsxs)("button",{className:"artwork-info__remove-button scope-ab916ad0",type:"button",onClick:onRemove,"data-testid":"transfers-remove-artwork-button",children:[(0,n.jsx)(i.A,{className:"artwork-info__trash-icon scope-ab916ad0",icon:"trash","data-testid":"artwork-info-trash-icon"})," ","Remove"," "]}):null]})]})})):null})}},952406(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(467265),i=r(382409),l=r(52382),c=r.n(l),u=r(724005),d=r.n(u),p=r(723433),f=r(745063),_=r(293534),h=r(478594),m=r(815169),g=r(261335),b=r(948184),y=r(753611),v=r(798145),w=r(474276),j=r(298210),k=r(46692),x=r(444636),S=r(740355),O=r(338908),P=r(538896),A=r(958469),C=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}let __rspack_default_export=function(e){var t,r,l,u,I,E=e.artwork,N=void 0===E?null:E,D=e.index,T=void 0===D?0:D,M=e.disabled,R=void 0!==M&&M,F=e.readonly,L=void 0!==F&&F,B=e.isMultiUpload,z=void 0!==B&&B,U=e.showFreeTransfersBadge,H=e.className,q=_object_without_properties(e,["artwork","index","disabled","readonly","isMultiUpload","showFreeTransfersBadge","className"]),V=(0,O.s)().n,G=(0,P.useDtfStore)();function getStoreArtwork(){var e,t;return(null==(e=G.artworks)?void 0:e.find(function(e){return(null==e?void 0:e.id)===(null==N?void 0:N.id)}))||(null==(t=G.artworks)?void 0:t[T])||N}var K=getStoreArtwork(),W=_sliced_to_array((0,_.useState)([{width:G.printAsIs?j.nk.width:j.LP.width,height:G.printAsIs?j.nk.height:j.LP.height}]),2),Q=W[0],J=W[1],Z=_sliced_to_array((0,_.useState)({}),2),Y=Z[0],X=Z[1],ee=_sliced_to_array((0,_.useState)(null),2),et=ee[0],er=ee[1],en=_sliced_to_array((0,_.useState)(!1),2),eo=en[0],ea=en[1],ei=_sliced_to_array((0,_.useState)({changed:!1,isBgRemoved:!1}),2),es=ei[0],el=ei[1],ec=(0,_.useRef)(es);ec.current=es;var eu=(0,_.useRef)(null),ed=(0,_.useRef)(K),ep=(0,_.useRef)(null);function artworkUrl(){return(null==K?void 0:K.manualEditUrl)||(null==K?void 0:K.url)}function isPricingLoading(){return G.isPricingLoading}function printAsIs(){return G.printAsIs}function showMultiSize(){return G.showMultiSize}function isStandardArtwork(){return G.isStandardArtwork}function sticker(){return G.sticker}function proColor(){return G.isProColor}function variantId(){return G.variantId}function gangPadlock(){return printAsIs()&&!G.showModal}function lockHeight(){return gangPadlock()&&!!metadata()}function editType(){return eo?"Size Adjustment":(null==K?void 0:K.enhanceImage)?"Jiffy Print Perfect":"Print as uploaded"}function isArtworkLoading(){return(null==K?void 0:K.isLoading)||isStandardArtwork()&&!(null==K?void 0:K.enhancementCompleted)}function isArtworkUploaded(){var e=parseInt(null==K?void 0:K.id,10);return!Number.isNaN(e)&&(isStandardArtwork()?!(null==K?void 0:K.isLoading)&&(null==K?void 0:K.enhancementCompleted):"number"==typeof e&&!(null==K?void 0:K.isLoading))}function showPricing(){return 0===T||isArtworkUploaded()}var ef=(0,_.useRef)((0,x.r9)());function defaultCustomSize(){var e=0===T?G.simulation:G.initialValues;return[{width:e.width,height:e.height,quantity:e.quantity,preset:"custom",id:ef.current,isAutoSeed:!(null==K?void 0:K.isSizesEdited)}]}var e_=(null==K?void 0:K.isSimulated)||!((null==K||null==(t=K.sizesAndQuantities)?void 0:t.length)>0)?defaultCustomSize():K.sizesAndQuantities;function sizesGroupedByPreset(){var e=(0,S.qD)(e_),t=String(null==K?void 0:K.id);if(Object.values(e).forEach(function(e){var r=0,n=!1;
1e.items.forEach(function(e){var o="".concat(e.width,"x").concat(e.height),i=G.getBogoAdjustedPrice(t,e.id,o);i?(r+=i.discountedTotalPrice,n=!0):e.unitPrice&&(r+=Number(e.unitPrice)*e.quantity)}),n&&(e.price=r)}),e.custom){var r=e.custom;return _object_spread_props(_object_spread({},_object_without_properties(e,["custom"])),{custom:r})}return e}function selectedPresets(){return Object.keys(sizesGroupedByPreset())}function errorGroupedByPreset(){return Object.values(Y).reduce(function(e,t){return _object_spread_props(_object_spread({},e),_define_property({},t.preset,_to_consumable_array(e[t.preset]||[]).concat([t])))},{})}function readonlyHeight(){return G.showModal&&G.printAsIs?L:!!lockHeight()&&L}function widthId(){return"artwork[".concat(T,"][variants][").concat(G.variantId,"][width]")}function heightId(){return"artwork[".concat(T,"][variants][").concat(G.variantId,"][height]")}function metadata(){var e=K||{},t=e.metadata,r=e.withBgMetadata,n=(K||{}).removeBackground;return r&&0!==Object.keys(r).length?n?t:r:t}function minDpi(){var e;return G.printAsIs?j.FK:(null==(e=metadata())?void 0:e.upscalingEnabled)?Number(metadata().qualityUpscaleDpi):j.Jh}function heightLabel(){return G.printAsIs?"Length (Feet)":"Height (Inch)"}function minWidthSetting(){return G.printAsIs?j.Ai:G.dtfMinWidth}function imageMetadataInfo(){return(0,S.ZW)({metadata:metadata(),sizesAndQuantities:e_,minDpi:minDpi(),artwork:K})}function sizePresets(){return(null==K?void 0:K.width)&&(null==K?void 0:K.height)?Object.entries(j.Dn).map(function(e){var t=_sliced_to_array(e,2),r=t[0];return{id:r,isValid:t[1].every(function(e){var t,r=e.width,n=e.height;if(!(null==(t=metadata())?void 0:t.aspectRatio))return!1;var o=(0,x.ir)(r,n,metadata().aspectRatio);return Number(o.width)>=1&&Number(o.height)>=1}),title:(0,x.Sr)(r)}}).filter(function(e){return e.isValid}):[]}function allowedPresets(){return sizePresets().map(function(e){return e.id})}function blankItemsCount(){return G.blankItemsCount}function transfersInCartCount(){return G.transfersInCartCount}function selectedQuantityTotal(){return e_.reduce(function(e,t){return e+(parseInt(t.quantity,10)||0)},0)}function totalTransfersCount(){return(z?G.totalQuantity:selectedQuantityTotal())+(transfersInCartCount()||0)}function remainingFreeTransfers(){return Math.max(0,blankItemsCount()-totalTransfersCount())}function freeTransfersBadgeMessage(){return"".concat(remainingFreeTransfers()," of ").concat(blankItemsCount()," Transfers 50% OFF Left")}var eh=(0,_.useRef)(c()(function(){G.getArtworksPricing(),G.updatePdpDates()},2500));function getNewPricingAndDates(){G.setIsPricingLoading(!0),G.invalidatePricingRequest(),eh.current()}function updateSizesAndQuantities(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _async_to_generator(function(){var r;return _ts_generator(this,function(n){switch(n.label){case 0:r=getStoreArtwork(),G.updateArtworkValues(_object_spread({index:r.originalIndex,isSizesEdited:t},{sizesAndQuantities:e})),G.invalidatePricingRequest(),G.updatePreviewDpi({artworkId:r.id}),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,G.downscaleOriginalImage({artworkId:r.id})];case 2:return n.sent(),[3,4];case 3:return getNewPricingAndDates(),[7];case 4:return[2]}})})()}function calculateCustomDimensions(e){var t,r,n=e_[e_.length-1],o=(0,S.vf)({value:e.width,field:"height",metadataAspectRatio:null==(r=metadata())?void 0:r.aspectRatio,naturalWidth:null==K?void 0:K.width,naturalHeight:null==K?void 0:K.height});return{width:e.width,height:null!=(t=null!=o?o:null==n?void 0:n.height)?t:e.height}}function calculatePresetDimensions(e){var t,r=e.size,n=e.preset,o=j.Dn[n].find(function(e){return r===(0,S.fJ)(e)});return o&&(null==(t=metadata())?void 0:t.aspectRatio)?(0,x.ir)(o.width,o.height,metadata().aspectRatio):null}function sendValidationEvent(e,t,r){var n=_object_spread_props(_object_spread({},r),{has_image:!(null==K?void 0:K.isFile)&&!(null==K?void 0:K.isSimulated),pdp_type:G.pdpType,business_line:G.businessLine,page:"pdp"});(null==K?void 0:K.isFile)||(n=_object_spread({},n,imageMetadataInfo())),(0,o.Py)(e,_object_spread({type:t},n)),eu.current!==t&&(eu.current=t,(0,i.xm)({legacyEvent:e,errorContext:{error_type:t,business_line:G.businessLine,page:"pdp",upload_uuid:null==K?void 0:K.uploadUuid}}))}function buildValidationConfig(){var e;return{minWidth:minWidthSetting(),minHeight:G.dtfMinHeight,maxWidth:G.dtfMaxWidth,maxHeight:G.dtfMaxHeight,printAsIsMaxHeight:null!=(e=G.printAsIsMaxHeight)?e:j.Je,isPrintAsIs:printAsIs(),metadata:metadata(),originalDimensions:{originalWidth:null==K?void 0:K.width,originalHeight:null==K?void 0:K.height},onValidation:sendValidationEvent}}function sendValidationWarningEvent(){var e,t,r=null==K||null==(t=K.metadata)||null==(e=t.warnings)?void 0:e.keys[0];if(printAsIs()&&r){var n=_object_spread_props(_object_spread({},imageMetadataInfo()),{has_image:!(null==K?void 0:K.isFile)&&!(null==K?void 0:K.isSimulated),pdp_type:G.pdpType,business_line:G.businessLine,page:"pdp"});(0,o.Py)("image_validation_warning",_object_spread({type:r},n))}}function setValidationErrorMessageToArtwork(){var e=Object.values(Y),t=e[0];G.setValidationErrorMessage({index:K.originalIndex,isMultiSizeError:e.length>0,message:(null==t?void 0:t.message)||null,type:(null==t?void 0:t.type)||null})}var em=(0,h.A)(buildValidationConfig());function validateValues(){(!printAsIs()||(null==K?void 0:K.isSimulated))&&(X({}),X(Object.fromEntries(e_.filter(function(e){return Number(e.quantity)>0}).map(function(e){var t=em.validateDimensions(e);return t?[e.id,t]:null}
1).filter(Boolean))),setValidationErrorMessageToArtwork(),sendValidationWarningEvent())}function recalculateSizes(){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,updateSizesAndQuantities(e_.filter(function(e){return allowedPresets().includes(e.preset)}).map(function(e){var t="custom"===e.preset?calculateCustomDimensions(e):calculatePresetDimensions(e);return _object_spread({},e,t)}))];case 1:return e.sent(),validateValues(),[2]}})})()}function toggleSizeGuide(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;er(e)}function getCorrectDimensionsFromMetadata(){return isStandardArtwork()&&"DTF001"===G.catalogNumber&&(null==K?void 0:K.id)?(0,k.Fw)(K,{printAsIs:G.printAsIs}):{width:null==K?void 0:K.width,height:null==K?void 0:K.height}}function updateDimensionsFromMetadata(){return _async_to_generator(function(){var e,t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:if(!isStandardArtwork()||"DTF001"!==G.catalogNumber||!(null==K?void 0:K.id)||(t=(e=getCorrectDimensionsFromMetadata()).width,r=e.height,!t||!r))return[2];return n=(0,k.q8)(t,minWidthSetting(),G.dtfMaxWidth),o=(0,k.q8)(r,G.dtfMinHeight,G.dtfMaxHeight),[4,updateSizesAndQuantities(e_.map(function(e){if("custom"===e.preset)return!0!==e.isAutoSeed?e:_object_spread_props(_object_spread({},e),{width:n,height:o});if("custom"!==e.preset&&!0===e.isAutoSeed)return e;var t=calculatePresetDimensions({size:e.size,preset:e.preset});return _object_spread({},e,t)}),!1)];case 1:return i.sent(),[2]}})})()}function handlePresetSelect(e){var t=e.preset,r=e.sizes,n=t in sizesGroupedByPreset(),o={design_size_selection:t,artwork_id:K.id,design_dimensions:j.Dn[t]};if(n)updateSizesAndQuantities(e_.filter(function(e){return e.preset!==t}),!0),(0,f.Cm)("Removed",o);else{var i="custom"===t?[{preset:"custom",width:getCorrectDimensionsFromMetadata().width,quantity:1,height:getCorrectDimensionsFromMetadata().height,id:(0,x.r9)()}]:r.map(function(e){var r,n;return _object_spread_props(_object_spread({},(null==(n=metadata())?void 0:n.aspectRatio)?(0,x.ir)(e.width,e.height,metadata().aspectRatio):{width:e.width,height:e.height}),{quantity:null!=(r=e.quantity)?r:0,size:(0,S.fJ)(e),id:(0,x.r9)(),preset:t})});updateSizesAndQuantities(_to_consumable_array("custom"!==t?e_.filter(function(e){return!0!==e.isAutoSeed}):e_).concat(_to_consumable_array(i)),!0),(0,f.Cm)("Selected",o)}}function updateArtworksPricingAndTrackSizeChange(e,t){if(!isArtworkLoading()){var r={product_line:sticker()?"sticker":proColor()?"pro color":"dtf",business_line:G.businessLine,artwork:K,edit_type:editType(),artworks_count:G.artworks.length,location:"pdp",old_price:e,new_price:t};es.changed&&(r.remove_background_toggle_switch=es.isBgRemoved?"switched_on":"switched_off",el({changed:!1,isBgRemoved:!1})),ea(!1),(0,f.il)(r)}}function totalPrice(e){var t=e_.find(function(t){return t.id===e}),r=(null==t?void 0:t.unitPrice)?t:G.simulation,n=String(null==K?void 0:K.id),o="".concat(t.width,"x").concat(t.height),i=G.getBogoAdjustedPrice(n,e,o);return i?i.discountedTotalPrice.toFixed(2):(r.unitPrice*t.quantity).toFixed(2)}function isFieldInValid(e){return Y[e]&&Y[e].message&&!Y[e].isFieldValid}function addSize(){var e=getCorrectDimensionsFromMetadata(),t={preset:"custom",id:(0,x.r9)(),quantity:1,width:e.width,height:e.height};updateSizesAndQuantities(_to_consumable_array(e_).concat([t]),!0),(0,o.Py)("multi_size_artwork",{pdp_type:G.pdpType,business_line:G.businessLine,page:"pdp",action:"add_size",size_count:e_.length}),(0,f.Cm)("Size Added",{design_size_selection:"custom",artwork_id:K.id,design_dimensions:[{width:t.width,height:t.height}],quantity:1})}function removeSize(e){var t=e.target.dataset.sizeIndex,r=e_[Number(t)];updateSizesAndQuantities(e_.filter(function(e,r){return r!==Number(t)}),!0),(0,o.Py)("multi_size_artwork",{pdp_type:G.pdpType,business_line:G.businessLine,page:"pdp",action:"remove_size",size_count:e_.length}),(0,f.Cm)("Size Removed",{design_size_selection:"custom",artwork_id:K.id,design_dimensions:[{width:r.width,height:r.height}],quantity:r.quantity})}function trackSizeChanges(e,t,r){if(!isArtworkLoading()&&((null==e?void 0:e.width)!==(null==t?void 0:t.width)||(null==e?void 0:e.he
1ight)!==(null==t?void 0:t.height))){var n=e.width*e.height,i=t.width*t.height,l=0===i?0:Math.round(Math.abs(n-i)/i*100);(0,o.Py)("size_modified",{width:e.width,height:e.height,previous_width:t.width,previous_height:t.height,size_change:0===n&&0===i?"none":n>i?"larger":"smaller",business_line:G.businessLine,size_percent_change:l,has_image:!G.simulation,page:"pdp",pdp_type:G.pdpType}),(0,f.Cm)("Size Edited",{design_size_selection:"custom",artwork_id:K.id,design_dimensions:[{width:e.width,height:e.height}],quantity:r})}}function onBlur(e){var t=e.target.dataset.sizeIndex,r=e_[t],n={width:r.width,height:r.height};!d()(n,Q[t])&&(validateValues(),(0,S.XI)(r)&&(trackSizeChanges(n,Q[t],r.quantity),J(function(e){var r=_to_consumable_array(e);return r[t]=n,r}),getNewPricingAndDates(),ea(!0)))}function buildRudderstackTrackProperties(e,t,r){var n,o=e_[e].preset,i=j.Dn[o];return{design_size_selection:o,artwork_id:K.id,design_dimensions:i,blanks_size:null==(n=t.size)?void 0:n.trim(),quantity:r}}function updateQuantity(e,t){var r;updateSizesAndQuantities(((null==(r=getStoreArtwork())?void 0:r.sizesAndQuantities)||e_).map(function(r,n){if(t===n){var i=e.length>0?Math.max(1,Number(e)):e,l=Number(r.quantity)||0,c=buildRudderstackTrackProperties(t,r,i);return(0,f.xd)(c),(0,o.Py)("dtf_artwork_quantity_change",{artwork_id:K.id,size_index:t,preset:r.preset,previous_quantity:l,quantity:i,business_line:G.businessLine,pdp_type:G.pdpType,is_multi_upload:z,design_dimensions:c.design_dimensions,blanks_size:c.blanks_size}),_object_spread_props(_object_spread({},r),{quantity:i,isAutoSeed:!1})}return r}),!0),0===t&&G.setSimulation({quantity:e}),getNewPricingAndDates()}function autoFillInputs(e,t,r){if(K&&e_[r]){var n=Number(t)>j.Yg?j.Yg:t,o={width:e_[r].width,height:e_[r].height};if(J(function(e){var t=_to_consumable_array(e);return t[r]=_object_spread({},o),t}),"width"===e){var i,l,c=(0,S.vf)({value:n,field:"height",metadataAspectRatio:null==(i=metadata())?void 0:i.aspectRatio,naturalWidth:null==K?void 0:K.width,naturalHeight:null==K?void 0:K.height});o={width:n,height:null!=c?c:null==(l=e_[r])?void 0:l.height},G.setSimulation({widthEdited:!0})}if("height"===e){var u,d,p=(0,S.vf)({value:n,field:"width",metadataAspectRatio:null==(u=metadata())?void 0:u.aspectRatio,naturalWidth:null==K?void 0:K.width,naturalHeight:null==K?void 0:K.height});o={width:null!=p?p:null==(d=e_[r])?void 0:d.width,height:n}}var f=e_.map(function(e,t){return t===r?_object_spread_props(_object_spread({},e,o),{isAutoSeed:!1}):e});0===r&&G.setSimulation(_object_spread({},o));var _=e_[r].id;updateSizesAndQuantities(f,!0),G.updateArtworkValues({index:K.originalIndex,lastEditedSizeId:_})}}function handleValueInput(e){var t=e.value,r=e.dataset,n=r.sizeIndex,o=r.field;"quantity"===o?updateQuantity(t,Number(n)):(X({}),autoFillInputs(o,t,Number(n)),Number(t)>j.Yg&&validateValues())}function handleInputClick(e){e.target.focus()}function handleQuantityUpdate(e){var t=e.value,r=e.index;handleValueInput({value:Number(t)>j.Rw?j.Rw:t,dataset:{sizeIndex:r,field:"quantity"}})}function getSizesFingerprint(e){return e.map(function(e){return"".concat(e.id,":").concat(e.quantity)}).join(",")}return(0,_.useEffect)(function(){var e,t;!K||K.isFile||K.isSimulated||(null==(e=K.metadata)||!e.errors||K.isValid)&&((null==(t=ed.current)?void 0:t.removeBackground)!==K.removeBackground&&el({changed:!0,isBgRemoved:K.removeBackground}),ed.current=K)},[K]),(0,_.useEffect)(function(){null!=K&&K.isFile||null!=K&&K.isSimulated||(getSizesFingerprint((null==K?void 0:K.sizesAndQuantities)||[]),validateValues())},[null==K?void 0:K.sizesAndQuantities]),(0,_.useEffect)(function(){var e=c()(function(e){if(!e.isFile&&!e.isSimulated&&(null==(t=e.metadata)||!t.errors||e.isValid)){var t,r,n,o=ed.current,i=(null==o||null==(r=o.sizesAndQuantities)?void 0:r.map(function(e){return e.unitPrice}))||[],l=(null==(n=e.sizesAndQuantities)?void 0:n.map(function(e){return e.unitPrice}))||[],c=ec.current.changed;isPricingLoading()||i.length!==l.length||d()(i,l)&&!c||i.forEach(function(e,t){(e&&e!==l[t]||c)&&updateArtworksPricingAndTrackSizeChange(e,l[t])});var u=e.enhancementTier!==(null==o?void 0:o.enhancementTier);((null==o?void 0:o.isLoading)&&!e.isLoading||c||u)&&validateValues()}},300);return e(K),function(){e.cancel()}},[K]),(0,_.useLayoutEffect)(function(){var e=metadata();e&&ep.current&&e.aspectRatio!==ep.current.aspectRatio&&recalculateSizes(),ep.current=e},[null==(r=metadata())?void 0:r.aspectRatio]),(0,_.useLayoutEffect)(function(){(null==K?void 0:K.isFile)||(null==K?void 0:K.isSimulated)||(null==K?void 0:K.isLoading)||null==K||!K.id||updateDimensionsFromMetadata()},[null==K?void 0:K.enhanceImage,null==K?void 0:K.enhancementTier,null==K?void 0:K.removeBackgroun
1d,null==K?void 0:K.isLoading,null==K?void 0:K.id,null==K||null==(l=K.originalMetadata)?void 0:l.widthInch,null==K||null==(u=K.withBgMetadata)?void 0:u.widthInch,null==K||null==(I=K.enhancedMetadata)?void 0:I.widthInch]),(0,_.useLayoutEffect)(function(){(null==K?void 0:K.isFile)||(null==K?void 0:K.isSimulated)||(null==K?void 0:K.isLoading)||null==K||!K.id?recalculateSizes():updateDimensionsFromMetadata()},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,C.cn)("artwork-multi-dimensions scope-61b2986e",z&&"artwork-multi-dimensions--multi-upload",H)},q),{children:[isArtworkUploaded()&&showMultiSize()?(0,n.jsx)(b.A,{className:"scope-61b2986e",sizePresets:sizePresets(),selectedPresets:selectedPresets(),disabled:!isArtworkUploaded(),artworkUrl:artworkUrl(),isMultiUpload:z,index:T,onSelect:handlePresetSelect,"data-testid":"preset-selector"}):null,void 0!==U&&U?(0,n.jsx)("div",{className:"artwork-multi-dimensions__free-transfers-badge-wrapper scope-61b2986e",children:(0,n.jsx)(w.A,{className:"artwork-multi-dimensions__free-transfers-badge scope-61b2986e",message:freeTransfersBadgeMessage(),"data-testid":"artwork-multi-dimensions-free-transfers-badge"})}):null,(0,A.p)(Object.values(sizesGroupedByPreset()),function(e){return(0,n.jsx)(_.Fragment,{children:"custom"===e.preset?(0,n.jsx)(y.A,{className:"scope-61b2986e",count:e.count,price:e.price,title:"Custom Size",showTitle:isArtworkUploaded(),showDeleteButton:selectedPresets().length>1,onDelete:handlePresetSelect,slots:{footer:function(){return(0,n.jsx)(n.Fragment,{children:isArtworkUploaded()?(0,n.jsxs)("button",{className:(0,C.cn)("artwork-multi-dimensions__add-button scope-61b2986e",{"artwork-multi-dimensions__add-button--standard-artwork":isStandardArtwork()}),type:"button",onClick:addSize,"data-testid":"artwork-multi-dimensions-add-button",children:[" ","Add another size"," "]}):null})}},"data-testid":"multi-size-group",children:(0,A.p)(e.items,function(e,t){var r,o,i,l,c,u,d;return(0,n.jsxs)("div",{className:(0,C.cn)("artwork-multi-dimensions__form-number-row scope-61b2986e",{"artwork-multi-dimensions__form-number-row--first":0===t}),children:[(0,n.jsxs)("div",{className:"artwork-multi-dimensions__form-number-row-content scope-61b2986e",children:[(0,n.jsxs)("div",{className:(0,C.cn)("artwork-multi-dimensions__control scope-61b2986e",{"artwork-multi-dimensions__control--gang-lock":gangPadlock()&&!!(null==K?void 0:K.width)}),children:[0===t?(0,n.jsxs)("label",{className:"artwork-multi-dimensions__label scope-61b2986e",htmlFor:widthId(),"data-testid":"artwork-multi-dimensions-label",children:[" ","Width (Inch)"," "]}):null,(0,n.jsx)("input",{className:(0,C.cn)("artwork-multi-dimensions__field artwork-multi-dimensions__field--number js-dtf-width-input scope-61b2986e",{"artwork-multi-dimensions__field--invalid":isFieldInValid(e.id)}),id:widthId(),"aria-label":"Width (Inch)",value:null!=(r=e.width)?r:"",max:null!=(o=G.dtfMaxWidth)?o:void 0,min:null!=(i=minWidthSetting())?i:void 0,name:widthId(),step:".01",type:"number","data-hj-allow":!0,"data-size-index":e.index,"data-field":"width",disabled:R,readOnly:L,onClick:handleInputClick,onInput:function(e){return handleValueInput(e.target)},onBlur:onBlur,"data-testid":"artwork-multi-dimensions-field"})]}),(0,n.jsx)(p.A,{className:"artwork-multi-dimensions__multiplier scope-61b2986e",icon:"cross","data-testid":"artwork-multi-dimensions-multiplier"}),(0,n.jsxs)("div",{className:(0,C.cn)("artwork-multi-dimensions__control scope-61b2986e",{"artwork-multi-dimensions__control--gang-lock":lockHeight()}),children:[0===t?(0,n.jsx)("label",{className:"artwork-multi-dimensions__label scope-61b2986e",htmlFor:heightId(),"data-testid":"artwork-multi-dimensions-label-1",children:heightLabel()}):null,(0,n.jsx)("input",{className:(0,C.cn)("artwork-multi-dimensions__field artwork-multi-dimensions__field--number js-dtf-height-input scope-61b2986e",{"artwork-multi-dimensions__field--invalid":isFieldInValid(e.id)}),id:heightId(),"aria-label":heightLabel(),value:null!=(l=e.height)?l:"",max:G.printAsIs?null!=(c=G.printAsIsMaxHeight)?c:j.Je:null!=(u=G.dtfMaxHeight)?u:void 0,min:G.printAsIs?void 0:null!=(d=G.dtfMinHeight)?d:void 0,name:heightId(),step:".01",type:"number","data-hj-allow":!0,"data-size-index":e.index,"data-field":"height",disabled:R,readOnly:readonlyHeight(),onClick:handleInputClick,onInput:function(e){return handleValueInput(e.target)},onBlur:onBlur,"data-testid":"artwork-multi-dimensions-field-1"})]}),(0,n.jsxs)("div",{className:"artwork-multi-dimensions__control artwork-multi-dimensions__control--quantity scope-61b2986e",children:[0===t?(0,n.jsxs)("label",{className:"artwork-multi-dimensions__label scope-61b2986e","data-testid":"artwork-multi-dimensions-label-2",children:[" ","Quantity"," "]}):null,(0,n.jsx)(m.A,{className:"scope-61b2986e",quantity:e.quantity,index:t,disabled:R,isMultiUpload:z,variantId:variantId(),onChange:handleQuantityUpdate,"data-testid":"quantity-input"}),showPricing()?(0,n.jsx)("div",{className:(0,C.cn)("artwork-multi-dimensions__price scope-61b2986e",{"artwork-multi-dimensions__price--loading":isPricingLoading()||0===e.quantity}),children:V(totalPrice(e.id),"currency")}):null]}),e_.length>1?(0,n.jsx)("button",{className:"artwork-multi-dimensions__remove-button scope-61b2986e",type:"button","aria-label":"Remove size","data-size-index":e.index,onClick:removeSize,"data-testid":"artwork-multi-dimensions-remove-button",children:(0,n.jsx)(p.A,{className:"artwork-multi-dimensions__remove-button-icon scope-61b2986e",icon:"trash","data-testid":"artwork-multi-dimensions-remove-button-icon"})}):null]}),Y[e.id]?(0,n.jsx)("div",{className:"artwork-multi-dimensions__error-message scope-61b2986e","data-testid":"artwork-multi-dimensions-error-message-".concat(e.id),children:Y[e.id].message}):null]},t)})}):(0,n.jsx)(y.A,{className:"scope-61b2986e",isPreset:!0,count:e.count,price:e.price,title:e.preset,showDeleteButton:selectedPresets().length>1,onDelete:handlePresetSelect,onOpenSizeGuide:toggleSizeGuide,"data-testid":"multi-size-group-1",children:(0,n.jsx)(g.A,{className:"scope-61b2986e",preset:e.preset,sizes:e.items,artworkId:String(null==K?void 0:K.id),errors:errorGroupedByPreset()[e.preset],onChange:handleQuantityUpdate,"data-testid":"custom-size-selector"})})},e.preset)}),printAsIs()||R?null:(0,n.jsxs)("div",{className:"artwork-multi-dimensions__free-note scope-61b2986e",children:[" ","Extra border added automatically — makes cutting to shape fast and clean"," "]})]})),et?(0,n.jsx)(v.A,{className:"scope-61b2986e",preset:et,onClose:toggleSizeGuide,"data-testid":"size-guide"}):null]})}},261335(e,t,r){"use strict";r.d(t,{A:()=>CustomSizeSelector});var n=r(483134),o=r(338908),i=r(815169),l=r(594909),c=r(298210),u=r(444636),d=r(538896),p=r(997252),f=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function CustomSizeSelector(e){var t=e.sizes,r=void 0===t?[]:t,_=e.preset,h=void 0===_?"custom":_,m=e.artworkId,g=void 0===m?"":m,b=e.onChange,y=_object_without_properties(e,["sizes","preset","artworkId","onChange"]),v=(0,o.s)().n,w=(0,d.useDtfStore)();function isPricingLoading(){return w.isPricingLoading}function variantId(){return w.variantId}function getBogoAdjustedPrice(){return w.getBogoAdjustedPrice}function sizeOptions(){return(0,u.Ju)(c.Dn[h],r)}function itemTitle(e){if("full-front"===h){var t,r,n,o;if((null==e||null==(r=e.sizeRange)||null==(t=r.toLowerCase)?void 0:t.call(r))==="newborn")return"Newborn";if((null==e||null==(o=e.category)||null==(n=o.toLowerCase)?void 0:n.call(o))==="infant")return"Infant"}var i=e.sizeRange?"(".concat(e.sizeRange,")"):"";return"".concat(e.category," ").concat(i)}function itemSubtitle(e){return"".concat(e.width,'" x ').concat(e.height,'"')}function getPrice(e){var t="".concat(e.width,"x").concat(e.height),r=getBogoAdjustedPrice()(g,e.id,t);return r?v(r.discountedTotalPrice,"currency"):v(e.unitPrice*e.quantity,"currency")}function handleQuantityUpdate(e,t){null==b||b({index:e,value:t})}return(0,n.jsx)("div",_object_spread_props(_object_spread({},y),{className:(0,p.cn)("custom-size-selector scope-8ec33e17",null==y?void 0:y.className),children:(0,n.jsx)(l.A,{className:"scope-8ec33e17","data-testid":"horizontal-scroller",children:(0,f.p)(sizeOptions(),function(e,t){var r,o,l,c;return(0,n.jsxs)("div",{className:(0,p.cn)("custom-size-selector__item scope-8ec33e17",{"custom-size-selector__item--unselected":0===e.quantity}),"data-testid":"custom-size-selector-item-".concat(null!=(r=null!=(o=e.id)?o:e.index)?r:t),children:[(0,n.jsx)("div",{className:"custom-size-selector__item-title scope-8ec33e17","data-testid":"custom-size-selector-item-title-".concat(null!=(l=null!=(c=e.id)?c:e.index)?l:t),children:itemTitle(e)}),(0,n.jsx)("div",{className:"custom-size-selector__item-subtitle scope-8ec33e17",children:itemSubtitle(e)}),(0,n.jsx)(i.A,{className:"scope-8ec33e17",isCustomSize:!0,minQuantity:0,quantity:e.quantity,variantId:variantId(),onChange:function(t){return handleQuantityUpdate(e.index,t.value)},"data-testid":"quantity-input"}),(0,n.jsx)("div",{className:(0,p.cn)("custom-size-selector__item-price scope-8ec33e17",{"custom-size-selector__item-price--loading":isPricingLoading(),"custom-size-selector__item-price--visible":e.quantity>0}),children:getPrice(e)})]},t)})})}))}},303988(e,t,r){"use strict";r.d(t,{A:()=>MatchingShirtModal});var n=r(483134),o=r(293534),i=r(5786),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function MatchingShirtModal(e){_object_destructuring_empty(e);var t,r=_extends({},e),c=(0,l.useDtfStore)(),u=(0,o.useRef)(null),d=null!=(t=c.matchingShirtOptions)?t:[];function handleClose(){c.setShowMatchingShirtModal(!1)}function closeModal(){var e;null==(e=u.current)||e.close()}return(0,n.jsx)(i.A,_object_spread_props(_object_spread({},r),{ref:u,bottomAligned:!0,title:"Add a matching shirt",onClose:handleClose,"data-testid":"matching-shirt-modal",children:(0,n.jsxs)("div",{className:"matching-shirt-modal",children:[(0,n.jsx)("p",{className:"matching-shirt-modal__subtitle","data-testid":"matching-shirt-modal-subtitle",children:"Keep your design — pick a blank shirt to print on. Opens in a new tab so you won't lose your work."}),d.length>0?(0,n.jsx)("ul",{className:"matching-shirt-modal__list","data-testid":"matching-shirt-modal-list",children:d.map(function(e){return(0,n.jsx)("li",{className:"matching-shirt-modal__item","data-testid":"matching-shirt-modal-item",children:(0,n.jsxs)("a",{className:"matching-shirt-modal__link",href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:closeModal,"aria-label":"".concat(e.name," (opens in new tab)"),"data-testid":"matching-shirt-modal-option",children:[(0,n.jsx)("span",{className:"matching-shirt-modal__name",children:e.name}),(0,n.jsx)("span",{className:"matching-shirt-modal__arrow","aria-hidden":"true",children:"→"})]})},e.url)})}):(0,n.jsx)("p",{className:"matching-shirt-modal__empty","data-testid":"matching-shirt-modal-empty",children:"No matching shirts available right now."})]})}))}},949343(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(147141),l=r(467265),c=r(375599),u=r(257889),d=r(5786),p=r(37617),f=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.index;_object_without_properties(e,["index"]);var r=_sliced_to_array((0,o.useState)(!1),2),_=r[0],h=r[1],m=(0,o.useRef)(null),g=(0,o.useRef)(null),b=!(0,i.IV)(),y=(0,f.useDtfStore)();function artwork(){return y.artworks[t]}function openMockupModal(){(0,l.Py)("preset_mockup_modal_opened",{artwork_id:artwork().id}),(0,c.A)("MockupViewed",{event_id:"MV-".concat(crypto.randomUUID()),product_id:y.productId}),b&&h(!0)}function closeMockupModal(){var e;null==(e=m.current)||e.close(),h(!1)}function closeMockupTooltip(){var e;null==(e=g.current)||e.hideTooltip()}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{ref:g,disabled:b,trigger:"click",customPosition:{top:"-60%",left:"100%",transform:"translateX(-100%)"},slots:{target:function(){return(0,n.jsxs)("button",{className:"mockup-button__mockups-link",type:"button",onClick:openMockupModal,"data-testid":"mockup-button-mockups-link",children:[" ","View Larger Mockups"," "]})},content:function(){return(0,n.jsx)(p.A,{artworkUrl:artwork().manualEditUrl||artwork().url,index:t,size:"large",onClose:closeMockupTooltip,"data-testid":"mockup-display"})}},"data-testid":"tooltip"}),b&&_?(0,n.jsx)(d.A,{ref:m,compact:!0,hideCloseButton:!0,bottomAligned:!0,"data-testid":"common-modal",children:(0,n.jsx)(p.A,{isMobile:!0,artworkUrl:artwork().manualEditUrl||artwork().url,size:"medium",onClose:closeMockupModal,"data-testid":"mockup-display-1"})}):null]})}},37617(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(997252),i=r(723433),l=r(845627),c=r(298210),u=r(562301),d=r(444636),p=r(538896),f=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){e.isMobile;var t=e.artworkUrl,r=void 0===t?void 0:t,_=e.size,h=void 0===_?"small":_,m=e.index,g=void 0===m?0:m,b=e.onClose,y=_object_without_properties(e,["isMobile","artworkUrl","size","index","onClose"]),v=(0,p.useDtfStore)();function selectedColor(){return v.presetMockupColor[g]}var w=Object.keys(c.Dn).filter(function(e){return"custom"!==e});function close(){null==b||b()}function presetTitle(e){return(0,d.Sr)(e)}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},y),{className:(0,o.cn)("mockup-display",y.className),children:[(0,n.jsxs)("div",{className:"mockup-display__header",children:[(0,n.jsx)("div",{className:"mockup-display__header-title",children:"Jiffy Size Guide"}),(0,n.jsx)("button",{className:"mockup-display__close-button",type:"button","aria-label":"Close",onClick:close,"data-testid":"mockup-display-close-button",children:(0,n.jsx)(i.A,{className:"mockup-display__close-button-icon",icon:"menu-close","data-testid":"mockup-display-close-button-icon"})})]}),(0,n.jsxs)("div",{className:"mockup-display__content",children:[(0,n.jsx)("div",{className:"mockup-display__presets-grid",children:(0,f.p)(w,function(e){return(0,n.jsxs)("div",{className:"mockup-display__presets-grid-item",children:[(0,n.jsx)(u.A,{artworkUrl:r,preset:e,selectedColor:selectedColor(),size:h,"data-testid":"shirt-mockup"}),(0,n.jsx)("p",{children:presetTitle(e)}
1)]},e)})}),(0,n.jsx)(l.A,{isMockupModal:!0,index:g,"data-testid":"preset-mockup-color-picker"})]})]}))}},753611(e,t,r){"use strict";r.d(t,{A:()=>MultiSizeGroup});var n=r(483134),o=r(338908),i=r(997252),l=r(723433),c=r(467265),u=r(444636),d=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function MultiSizeGroup(e){var t,r=e.title,p=void 0===r?"":r,f=e.isPreset,_=void 0!==f&&f,h=e.count,m=e.price,g=void 0===m?0:m,b=e.showTitle,y=void 0===b||b,v=e.showDeleteButton,w=e.onDelete,j=e.onOpenSizeGuide,k=e.children,x=e.slots,S=_object_without_properties(e,["title","isPreset","count","price","showTitle","showDeleteButton","onDelete","onOpenSizeGuide","children","slots"]),O=(0,o.s)(),P=O.t,A=O.n,C=(0,d.useDtfStore)();function showMultiSize(){return C.showMultiSize}function isPricingLoading(){return C.isPricingLoading}function formattedTitle(){return(0,u.Sr)(p)}function presetName(){return _?p:"custom"}function hasPrice(){return null!=g&&""!==g}function handleDelete(){null==w||w({preset:presetName()})}function openSizeGuide(){(0,c.Py)("our_sizing_guide_pressed",{placement:presetName()}),null==j||j(presetName())}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},S),{className:(0,i.cn)("multi-size-group scope-cf354b75",null==S?void 0:S.className,{"multi-size-group--simple":!showMultiSize()||!y}),children:[p&&showMultiSize()&&y?(0,n.jsx)("div",{className:"multi-size-group__group-title scope-cf354b75",children:formattedTitle()}):null,showMultiSize()&&y&&(void 0===v||v)?(0,n.jsx)("button",{className:"multi-size-group__delete-button scope-cf354b75",type:"button",onClick:handleDelete,"data-testid":"multi-size-group-delete-button",children:(0,n.jsx)(l.A,{className:"multi-size-group__delete-button-icon scope-cf354b75",icon:"modal-close-big","data-testid":"multi-size-group-delete-button-icon"})}):null,k,showMultiSize()&&y?(0,n.jsxs)("div",{className:"multi-size-group__footer scope-cf354b75",children:[(0,n.jsxs)("div",{className:"multi-size-group__footer-text scope-cf354b75",children:[(0,n.jsxs)("span",{className:"multi-size-group__footer-text-bold scope-cf354b75",children:[P("transfer",void 0===h?0:h),hasPrice()?":":""]}),hasPrice()?(0,n.jsx)("span",{className:(0,i.cn)("multi-size-group__footer-text-price scope-cf354b75",{"multi-size-group__footer-text-price--loading":isPricingLoading()}),children:A(g,"currency")}):null]}),_?(0,n.jsxs)("button",{className:"multi-size-group__footer-link scope-cf354b75",type:"button",onClick:openSizeGuide,"data-testid":"multi-size-group-footer-link",children:[" ","Our Sizing Guide"," "]}):null]}):null,null==x||null==(t=x.footer)?void 0:t.call(x)]}))}},750570(e,t,r){"use strict";r.d(t,{A:()=>MultiSizeStep});var n=r(483134),o=r(293534),i=r(952406),l=r(7756),c=r(739161),u=r(788088),d=r(580099),p=r(405033),f=r(538896),_=r(467265),h=r(433769),m=r(586519);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}var g="dtf_done_fork_arm_seen";function MultiSizeStep(e){var t,r=e.artwork,b=e.index,y=e.disabled,v=e.readonly,w=e.withPreCut,j=e.showMultiUploadBox,k=void 0!==j&&j,x=(e.showFileDialog,e.showFreeTransfersBadge),S=e.onShowFileDialog,O=e.stepNumber,P=e.completed,A=e.total,C=_object_without_properties(e,["artwork","index","disabled","readonly","withPreCut","showMultiUploadBox","showFileDialog","showFreeTransfersBadge","onShowFileDialog","stepNumber","completed","total"]),I=(0,f.useDtfStore)(),E=(null==I||null==(t=I.experiments)?void 0:t.ab_dtf_done_fork)===1,N=E?"variant":"control",D=null==I?void 0:I.pdpType,T=null==I?void 0:I.businessLine;function handleShowFileDialog(e){null==S||S(e)}return(0,o.useEffect)(function(){if(k)try{if(window.sessionStorage.getItem(g))return;(0,h.registerMixpanel)({dtf_done_fork_arm:N}),(0,_.Py)("transfer_done_fork_shown",{page:"pdp",pdp_type:D,business_line:T,dtf_done_fork_arm:N}),window.sessionStorage.setItem(g,"1")}catch(t){var e;(0,m.notifyError)("[MN-4850] entry telemetry failed",{params:{error:null!=(e=null==t?void 0:t.message)?e:String(t),arm:N}})}},[k,N]),(0,n.jsxs)(l.A,_object_spread_props(_object_spread({},C),{stepNumber:void 0===O?2:O,headerText:c.p.size,completed:void 0!==P&&P,total:A,"data-testid":"step-wrapper",children:[(0,n.jsx)(i.A,{artwork:void 0===r?null:r,index:void 0===b?0:b,disabled:void 0!==y&&y,readonly:void 0!==v&&v,showFreeTransfersBadge:void 0!==x&&x,"data-testid":"artwork-multi-dimensions"}),void 0!==w&&w?(0,n.jsx)(u.A,{"data-testid":"pre-cut"}):null,k?E?(0,n.jsx)(p.A,{onAddAnother:handleShowFileDialog,"data-testid":"done-or-add-fork"}):(0,n.jsx)(d.A,{onUpload:handleShowFileDialog,"data-testid":"upload-box"}):null]}))}},817200(e,t,r){"use strict";r.d(t,{A:()=>MultiSizeTotal});var n=r(483134),o=r(997252),i=r(338908),l=r(538896),c=r(598774);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function MultiSizeTotal(e){var t=e.index,r=void 0===t?0:t,u=e.isMultiUpload,d=void 0!==u&&u,p=e.localBasket,f=_object_without_properties(e,["index","isMultiUpload","localBasket"]),_=(0,i.s)(),h=_.t,m=_.n,g=(0,l.useDtfStore)();function artworks(){return g.artworks}
1function simulation(){return g.simulation}function isPricingLoading(){return g.isPricingLoading}function enableAbAiMonetization(){return g.enableAbAiMonetization}function getBogoAdjustedPrice(){return g.getBogoAdjustedPrice}function artwork(){return artworks()[r]}function isArtworkUploaded(){var e,t,r=parseInt(null==(e=artwork())?void 0:e.id,10);return!Number.isNaN(r)&&"number"==typeof r&&!(null==(t=artwork())?void 0:t.isLoading)}function showPricing(){return 0===r||isArtworkUploaded()}function sizesAndQuantities(){var e;return(null==(e=artwork())?void 0:e.sizesAndQuantities)||[]}function sizesCount(){return sizesAndQuantities().length}function quantity(){return sizesAndQuantities().reduce(function(e,t){return e+Number(t.quantity)},0)}function pricing(){var e;return(null==(e=artwork())?void 0:e.isFile)||!sizesAndQuantities().some(function(e){return Number(e.quantity)>0})?simulation():sizesAndQuantities()||simulation()}function retailTotal(){return getPrice("retailPrice")}function total(){return getPrice("unitPrice")}function discount(){var e=parseFloat(retailTotal()),t=parseFloat(total());return e&&t?Math.ceil((e-t)/e*100).toFixed(0):0}function getPrice(e){if(Array.isArray(pricing())){var t,r,n=String(null!=(t=null==(r=artwork())?void 0:r.id)?t:"");return pricing().reduce(function(t,r){if("unitPrice"===e&&n){var o="".concat(r.width,"x").concat(r.height),i=getBogoAdjustedPrice()(n,r.id,o);if(i)return t+i.discountedTotalPrice}return t+Number(r[e]||0)*r.quantity},0).toFixed(2)}return pricing()[e]?Number(pricing()[e]).toFixed(2)*pricing().quantity:null}return(0,n.jsx)(n.Fragment,{children:!d&&enableAbAiMonetization()?(0,n.jsx)(c.A,_object_spread_props(_object_spread({},f),{index:r,localBasket:void 0===p?null:p,"data-testid":"multi-size-total-summary"})):pricing()?(0,n.jsxs)("div",_object_spread_props(_object_spread({},f),{className:(0,o.cn)("multi-size-total",null==f?void 0:f.className,{"multi-size-total--multi-upload":d}),children:[(0,n.jsxs)("div",{className:"multi-size-total__container",children:[(0,n.jsx)("div",{className:"multi-size-total__label multi-size-total__label--total",children:"Total"}),sizesCount()>0?(0,n.jsxs)("div",{className:"multi-size-total__label multi-size-total__label--sizes",children:[" ","for ",h("transfer",quantity())]}):null]}),sizesCount()>0&&total()&&showPricing()?(0,n.jsxs)("div",{className:(0,o.cn)("multi-size-total__container multi-size-total__container--horizontal",{"multi-size-total__container--loading":isPricingLoading()||0===total()}),children:[(0,n.jsx)("div",{className:"multi-size-total__label",children:m(total(),"currency")}),retailTotal()&&discount()>0?(0,n.jsx)("div",{className:"multi-size-total__label multi-size-total__label--strike-of",children:m(retailTotal(),"currency")}):null,discount()>0?(0,n.jsxs)("div",{className:"multi-size-total__label multi-size-total__label--discounted",children:[discount(),"% off"," "]}):null]}):null]})):null})}},598774(e,t,r){"use strict";r.d(t,{A:()=>MultiSizeTotalSummary});var n=r(483134),o=r(997252),i=r(338908),l=r(538896),c=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function MultiSizeTotalSummary(e){var t=e.index,r=e.localBasket,u=void 0===r?null:r,d=_object_without_properties(e,["index","localBasket"]),p=(0,l.useDtfStore)(),f=(0,i.s)(),_=f.t,h=f.n;function artworks(){return p.artworks}
1function summary(){return p.summary}function simulation(){return p.simulation}function isPricingLoading(){return p.isPricingLoading}function artwork(){return artworks()[t]}function isArtworkUploaded(){var e,t,r,n=parseInt(null!=(e=null==(t=artwork())?void 0:t.id.toString())?e:"",10);return!Number.isNaN(n)&&"number"==typeof n&&!(null==(r=artwork())?void 0:r.isLoading)}function showPricing(){return 0===t||isArtworkUploaded()}function sizesAndQuantities(){var e,t;return null!=(e=null==(t=artwork())?void 0:t.sizesAndQuantities)?e:[]}function sizesCount(){return sizesAndQuantities().length}function quantity(){return sizesAndQuantities().reduce(function(e,t){return e+(Number(t.quantity)||0)},0)}function pricing(){var e;return(null==(e=artwork())?void 0:e.isFile)||!sizesAndQuantities().some(function(e){return Number(e.quantity)>0})?simulation():sizesAndQuantities()||simulation()}function enableAbAiMonetization(){return p.enableAbAiMonetization}function getBogoAdjustedPrice(){return p.getBogoAdjustedPrice}function isBogoApplicable(){return p.isBogoApplicable}function getPrice(e){if(Array.isArray(pricing())){var t,r,n=String(null!=(t=null==(r=artwork())?void 0:r.id)?t:"");return pricing().reduce(function(t,r){if("unitPrice"===e&&n){var o="".concat(r.width,"x").concat(r.height),i=getBogoAdjustedPrice()(n,r.id,o);if(i)return t+i.discountedTotalPrice}return t+Number(r[e]||0)*r.quantity},0).toFixed(2)}var o=pricing()[e];return o?Number(Number(o).toFixed(2))*pricing().quantity:null}function originalTotal(){if(!Array.isArray(pricing())){var e,t,r,n=null==(t=pricing())?void 0:t.unitPrice,o=null!=(e=null==(r=pricing())?void 0:r.quantity)?e:0;return n&&0!==o?Number(Number(n).toFixed(2))*o:null}return pricing().reduce(function(e,t){return e+Number(t.unitPrice||0)*t.quantity},0).toFixed(2)}function bogoInfo(){if(!isBogoApplicable()||!Array.isArray(pricing()))return{freeQty:0,discount:0};var e,t,r=String(null!=(e=null==(t=artwork())?void 0:t.id)?e:""),n=0,o=0;return pricing().forEach(function(e){var t="".concat(e.width,"x").concat(e.height),i=getBogoAdjustedPrice()(r,e.id,t);if(i&&i.freeQty>0){n+=i.freeQty;var l=Number(e.unitPrice||0)*e.quantity;o+=l-i.discountedTotalPrice}}),{freeQty:n,discount:o}}function retailTotal(){return getPrice("retailPrice")}function total(){return getPrice("unitPrice")}function discount(){var e,t,r,n,o=parseFloat(null!=(e=null==(r=retailTotal())?void 0:r.toString())?e:""),i=parseFloat(null!=(t=null==(n=total())?void 0:n.toString())?t:"");return o&&i?Number(Math.ceil((o-i)/o*100).toFixed(0)):0}function enhancements(){return summary().enhancements?Object.values(summary().enhancements):[]}function orderSubtotal(){return Number(summary().orderSubtotal)}function transfersSubtotal(){return Number(bogoInfo().freeQty>0?total():orderSubtotal())}function basketAmount(){return u&&Number.isFinite(u.cartTotal)&&u.cartTotal>0&&Number.isFinite(transfersSubtotal())?u.cartTotal:null}function subtotalShown(){return null!==basketAmount()?Math.round((basketAmount()+transfersSubtotal()+Number.EPSILON)*100)/100:bogoInfo().freeQty>0?total():orderSubtotal()}function artworksReady(){var e,t,r;return(null==(e=artwork())?void 0:e.isSimulated)||!(null==(t=artwork())?void 0:t.isLoading)&&(null==(r=artwork())?void 0:r.enhancementCompleted)}return(0,n.jsx)(n.Fragment,{children:pricing()?(0,n.jsxs)("div",_object_spread_props(_object_spread({},d),{className:(0,o.cn)("multi-size-total-summary scope-3cac75a9",null==d?void 0:d.className,{"multi-size-total-summary--loading":!enableAbAiMonetization()&&(isPricingLoading()||0===total())}),children:[(0,n.jsx)("h3",{className:"multi-size-total-summary__caption scope-3cac75a9",children:"Total"}),enableAbAiMonetization()&&(isPricingLoading()||!artworksReady()||0===total())?(0,n.jsxs)("div",{className:"multi-size-total-summary__skeleton scope-3cac75a9",children:[(0,n.jsx)("div",{className:"multi-size-total-summary__skeleton-block scope-3cac75a9"}),(0,n.jsx)("div",{className:"multi-size-total-summary__skeleton-block scope-3cac75a9"}),(0,n.jsx)("div",{className:"multi-size-total-summary__skeleton-block scope-3cac75a9"})]}):(0,n.jsxs)("div",{className:"multi-size-total-summary__grid scope-3cac75a9",children:[sizesCount()>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsxs)("span",{className:"multi-size-total-summary__label scope-3cac75a9",children:[(0,n.jsx)("span",{className:"multi-size-total-summary__info scope-3cac75a9",children:"for"})," ",_("transfer",quantity())]})}),showPricing()?(0,n.jsxs)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:[(0,n.jsx)("span",{className:"multi-size-total-summary__price scope-3cac75a9",children:h(bogoInfo().freeQty>0?originalTotal():total(),"currency")}),retailTotal()&&discount()>
10&&0===bogoInfo().freeQty?(0,n.jsx)("span",{className:"multi-size-total-summary__old-price scope-3cac75a9",children:h(retailTotal(),"currency")}):null,discount()>0&&0===bogoInfo().freeQty?(0,n.jsxs)("span",{className:"multi-size-total-summary__discount scope-3cac75a9",children:[discount(),"% off"," "]}):null]}):null,bogoInfo().freeQty>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsxs)("span",{className:"multi-size-total-summary__label multi-size-total-summary__label--bogo scope-3cac75a9",children:[bogoInfo().freeQty," ",1===bogoInfo().freeQty?"Transfer":"Transfers"," ","50% OFF"]})}),(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9 -ml-[6.5px]",children:(0,n.jsxs)("span",{className:"multi-size-total-summary__price multi-size-total-summary__price--bogo scope-3cac75a9",children:[" ","-",h(bogoInfo().discount,"currency")]})})]}):null]}):null,(0,c.p)(enhancements(),function(e){return(0,n.jsx)(n.Fragment,{children:Number(e.totalPrice)>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsxs)("span",{className:"multi-size-total-summary__label scope-3cac75a9",children:[(0,n.jsx)("span",{className:"multi-size-total-summary__info scope-3cac75a9",children:"for"})," ",e.quantity," ",e.serviceName]})}),(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsx)("span",{className:"multi-size-total-summary__price scope-3cac75a9",children:h(e.totalPrice,"currency")})})]}):null})}),null!==basketAmount()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9","data-testid":"multi-size-total-summary-local-basket",children:(0,n.jsx)("span",{className:"multi-size-total-summary__label scope-3cac75a9",children:"Jiffy Local items in your cart"})}),(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsx)("span",{className:"multi-size-total-summary__price scope-3cac75a9",children:h(basketAmount(),"currency")})})]}):null,orderSubtotal()||bogoInfo().freeQty>0||null!==basketAmount()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:(0,n.jsx)("span",{className:"multi-size-total-summary__label scope-3cac75a9",children:"Subtotal"})}),(0,n.jsxs)("div",{className:"multi-size-total-summary__item scope-3cac75a9",children:[(0,n.jsx)("span",{className:"multi-size-total-summary__price scope-3cac75a9",children:h(subtotalShown(),"currency")}),bogoInfo().discount>0?(0,n.jsxs)("span",{className:"multi-size-total-summary__savings scope-3cac75a9",children:[" ","You save ",h(bogoInfo().discount,"currency"),"!"," "]}):null]})]}):null]})]})):null})}},845627(e,t,r){"use strict";r.d(t,{A:()=>PresetMockupColorPicker});var n=r(483134),o=r(147141),i=r(997252),l=r(379658),c=r(745063),u=r(538896),d=r(298210),p=r(949343);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PresetMockupColorPicker(e){var t=e.index,r=void 0===t?0:t,f=e.isMockupModal,_=void 0!==f&&f,h=e.isRedesign,m=void 0!==h&&h,g=e.browseLabel,b=void 0===g?"Browse shirts":g,y=_object_without_properties(e,["index","isMockupModal","isRedesign","browseLabel"]),v=(0,u.useDtfStore)(),w=(0,o.tp)(),j=(0,o.v1)();function presetMockupColor(){return v.presetMockupColor[r]||"#E1E1E1"}function colorPickerSize(){return w?"large":j?"medium":"small"}var k=m&&!w&&!j,x=m&&!k;function colors(){return _?d.n5:w?d.n5.slice(0,5):j?d.n5.slice(0,6):d.n5.filter(function(e){return!e.isModalColor})}function handleColorChange(e){v.setPresetMockupColor({index:r,color:e});var t,n=(null==(t=d.n5.find(function(t){return t.value===e}))?void 0:t.name)||"custom";(0,c.Hj)({color:n,hexcode:e})}function renderInfo(){var e;return m?(0,n.jsxs)("p",{className:"preset-mockup-color-picker__info",children:["T-shirt not included"," \xb7 ",(0,n.jsx)("a",{href:"/?category=T-Shirt&style=Short+Sleeve","data-testid":"preset-mockup-color-picker-a",children:b})]}):(0,n.jsxs)("p",{className:"preset-mockup-color-picker__info",children:[" ","T-shirt not included. Need one?"," ",!_&&v.matchingShirtUpsellEnabled&&(null==(e=v.matchingShirtOptions)?void 0:e.length)>0?(0,n.jsx)("button",{type:"button",onClick:function(){return v.setShowMatchingShirtModal(!0)},"data-testid":"preset-mockup-color-picker-add-matching-shirt",children:"Add a matching shirt"}):(0,n.jsx)("a",{href:"/?category=T-Shirt&style=Short+Sleeve","data-testid":"preset-mockup-color-picker-a",children:"Browse our selection!"})]})}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},y),{className:(0,i.cn)("preset-mockup-color-picker",null==y?void 0:y.className,_&&"preset-mockup-color-picker--mockup-modal",k&&"preset-mockup-color-picker--dtf-redesign",x&&"preset-mockup-color-picker--dtf-redesign-mobile"),children:[!_&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"preset-mockup-color-picker__label",children:"Preview on:"}),(0,n.jsx)("p",{className:"preset-mockup-color-picker__helper",children:"Transfers are printed in full color; pick a shirt color to preview how it'll look."})]}),(0,n.jsxs)("div",{className:"preset-mockup-color-picker__picker",children:[_?(0,n.jsx)("span",{className:"preset-mockup-color-picker__label",children:" Preview background "}):null,k?(0,n.jsx)("span",{className:"preset-mockup-color-picker__row-label","data-testid":"preset-mockup-color-picker-row-label",children:"Preview on:"}):null,(0,n.jsx)(l.A,{value:presetMockupColor(),size:colorPickerSize(),colors:colors(),modalPosition:"bottom-right",onCh
1ange:handleColorChange,"data-testid":"color-picker"}),_||m?null:(0,n.jsx)(p.A,{index:r,"data-testid":"mockup-button"}),k?renderInfo():null]}),k?null:renderInfo()]}))}},948184(e,t,r){"use strict";r.d(t,{A:()=>PresetSelector});var n=r(483134),o=r(467265),i=r(845627),l=r(298210),c=r(594909),u=r(562301),d=r(538896),p=r(958469),f=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PresetSelector(e){var t=e.sizePresets,r=void 0===t?[]:t,_=e.selectedPresets,h=void 0===_?["custom"]:_,m=e.disabled,g=void 0!==m&&m,b=e.index,y=void 0===b?0:b,v=e.onSelect,w=(e.artworkUrl,_object_without_properties(e,["sizePresets","selectedPresets","disabled","index","onSelect","artworkUrl"])),j=(0,d.useDtfStore)();function artworks(){return j.artworks}function isStandardArtwork(){return j.isStandardArtwork}function presetMockupColor(){return j.presetMockupColor}function artworkUrl(){return artworks()[y].manualEditUrl||artworks()[y].url}function hasInvalidPresets(){return r.length<Object.keys(l.Dn).length}function selectedColor(){return presetMockupColor()[y]}function isSelected(e){return h.includes(e)}function isLastPreset(e){return 1===h.length&&h[0]===e}function submitEvent(e){var t=isSelected(e)?"deselected":"selected";(0,o.Py)("common_size_pressed",{sizeName:e,action:t})}function handleSelect(e){if(!g){var t=e.target.dataset,r=t.preset,n=t.isValid;if(!isLastPreset(r)&&"true"===n){submitEvent(r),null==v||v({preset:r,sizes:l.Dn[r]});var o=e.target.closest(".preset-selector__items");o&&(o.scrollLeft=e.target.offsetLeft)}}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},w),{className:(0,f.cn)("preset-selector preset-selector--mockup scope-4c191745",w.className),onClick:handleSelect,"data-testid":"preset-selector-mockup",children:[(0,n.jsx)(c.A,{className:"preset-selector__items scope-4c191745","data-testid":"preset-selector-items",children:(0,p.p)(r,function(e){return(0,n.jsxs)("div",{className:(0,f.cn)("preset-selector__item scope-4c191745",isSelected(e.id)&&"preset-selector__item--selected",!e.isValid&&"preset-selector__item--invalid",isStandardArtwork()&&"preset-selector__item--standard-artwork"),role:"button",tabIndex:0,"data-preset":e.id,"data-is-valid":e.isValid,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),handleSelect(e))},children:[(0,n.jsx)(u.A,{className:"scope-4c191745",artworkUrl:artworkUrl(),preset:e.id,selectedColor:selectedColor(),"data-testid":"shirt-mockup"}),(0,n.jsx)("div",{className:"preset-selector__title scope-4c191745",children:e.title})]},e.id)})}),hasInvalidPresets()?(0,n.jsxs)("div",{className:"preset-selector__error-info scope-4c191745",children:[" ","*Some sizes are unavailable. Minimum size is 1 inch."," "]}):null,(0,n.jsx)(i.A,{className:"scope-4c191745",index:y,"data-testid":"preset-mockup-color-picker"})]}))}},815169(e,t,r){"use strict";r.d(t,{A:()=>QuantityInput});var n=r(483134),o=r(293534),i=r(52382),l=r.n(i),c=r(997252),u=r(723433),d=r(298210);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function QuantityInput(e){var t=e.quantity,r=void 0===t?0:t,i=e.index,p=void 0===i?0:i,f=e.disabled,_=void 0!==f&&f,h=e.isMultiUpload,m=e.minQuantity,g=void 0===m?1:m,b=e.isCustomSize,y=e.variantId,v=e.onChange,w=_object_without_properties(e,["quantity","index","disabled","isMultiUpload","minQuantity","isCustomSize","variantId","onChange"]),j=_sliced_to_array((0,o.useState)(Number(r)),2),k=j[0],x=j[1],S=(0,o.useRef)(),O=(0,o.useRef)(v);O.current=v;var P=(0,o.useRef)(p);P.current=p;var A=(0,o.useRef)(g);function maxQuantityValue(){return d.Rw}function validateQuantity(e){return Math.min(Math.max(A.current,e),d.Rw)}function updateQuantityFromButtons(e){var t=validateQuantity(e);x(t),null==v||v({value:t,index:p})}function updateQuantity(e){S.current(e)}return A.current=g,(0,o.useEffect)(function(){return S.current=l()(function(e){var t,r=validateQuantity(e);x(r),null==(t=O.current)||t.call(O,{value:r,index:P.current})},500),function(){var e,t;null==(t=S.current)||null==(e=t.cancel)||e.call(t)}},[]),(0,o.useEffect)(function(){x(Number(r))},[r]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},w),{className:(0,c.cn)("quantity-input scope-237ef949",null==w?void 0:w.className,{"quantity-input--multi-upload":void 0!==h&&h,"quantity-input--disabled":_,"quantity-input--custom-size":void 0!==b&&b}),children:[(0,n.jsx)("button",{className:"quantity-input__button quantity-input__button--left scope-237ef949",disabled:_||Number(k)<=g,type:"button","aria-label":"Decrease quantity",onClick:function(){updateQuantityFromButtons(Number(k)-1)},"data-testid":"quantity-input-button",children:(0,n.jsx)(u.A,{className:"quantity-input__button-icon scope-237ef949",icon:"minus","data-testid":"quantity-input-button-icon"})}),(0,n.jsx)("input",{className:(0,c.cn)("quantity-input__input js-quantity-form-input scope-237ef949",{"quantity-input__input--grayed-out":0===Number(k)}),value:k,"aria-label":"Quantity",onInput:function(e){var t=e.target.value;x(t),updateQuantity(t)}
1,type:"number","data-variant-id":void 0===y?"":y,disabled:_,min:g,step:"1","data-testid":"quantity-input-input"}),(0,n.jsx)("button",{className:"quantity-input__button quantity-input__button--right scope-237ef949",disabled:_||Number(k)>=maxQuantityValue(),type:"button","aria-label":"Increase quantity",onClick:function(){updateQuantityFromButtons(Number(k)+1)},"data-testid":"quantity-input-button-1",children:(0,n.jsx)(u.A,{className:"quantity-input__button-icon scope-237ef949",icon:"plus","data-testid":"quantity-input-button-icon-1"})})]}))}},562301(e,t,r){"use strict";r.d(t,{A:()=>ShirtMockup});var n=r(483134),o=r(927997),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ShirtMockup(e){var t=e.artworkUrl,r=void 0===t?(0,o.lt)("gen/size-mockup/placeholder.png",{h:100,dpr:2}):t,l=e.selectedColor,c=e.preset,u=void 0===c?"full-front":c,d=e.size,p=void 0===d?"small":d,f=_object_without_properties(e,["artworkUrl","selectedColor","preset","size"]),_={"full-front":{bounds:{x:40,y:40,width:35,height:48}},"full-back":{bounds:{x:43,y:39,width:35,height:57}},"left-chest":{bounds:{x:49,y:30,width:20,height:20}},sleeve:{bounds:{x:25,y:33,width:15,height:14}}
1,"back-collar":{bounds:{x:43,y:20,width:20,height:20}}};function isBack(){return"full-back"===u||"back-collar"===u}function isSleeve(){return"sleeve"===u}function isCustom(){return"custom"===u}function multiplier(){return"large"===p?2.2:"medium"===p?1.88:1}function imgSrc(){var e="front";return isBack()&&(e="back"),isSleeve()&&(e="side"),(0,o.lt)("gen/size-mockup/".concat(e,".png"),{h:100,dpr:2})}function presetBounds(){var e;return null==(e=_[u])?void 0:e.bounds}function boundsStyle(){var e=presetBounds();if(!e)return{};var t=e.x-e.width/2,r=e.y-e.height/2;return{top:"".concat(r*multiplier(),"px"),left:"".concat(t*multiplier(),"px"),width:"".concat(e.width*multiplier(),"px"),height:"".concat(e.height*multiplier(),"px")}}return(0,n.jsx)("div",_object_spread_props(_object_spread({},f),{className:(0,i.cn)("shirt-mockup scope-ee8f89f7",null==f?void 0:f.className,"shirt-mockup--".concat(p)),children:(0,n.jsxs)("div",{className:"shirt-mockup__item scope-ee8f89f7",style:{backgroundColor:void 0===l?"#E1E1E1":l},children:[(0,n.jsx)("img",{className:"shirt-mockup__item-image scope-ee8f89f7",src:imgSrc(),alt:"Shirt Design",draggable:!1}),(0,n.jsx)("div",{className:"shirt-mockup__bounds-box scope-ee8f89f7",style:boundsStyle(),children:r&&!isCustom()?(0,n.jsx)("img",{className:"shirt-mockup__artwork scope-ee8f89f7",src:r,alt:"Artwork",draggable:!1}):null})]})}))}},798145(e,t,r){"use strict";r.d(t,{A:()=>SizeGuide});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(5786),u=r(298210),d=r(444636),p=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function SizeGuide(e){var t=e.preset,r=e.onClose,f=_object_without_properties(e,["preset","onClose"]),_=(0,o.useRef)(null);function title(){return(0,d.Sr)(t)}function presetList(){return u.Dn[t]}function presetsGrouped(){var e=new Map;return presetList().forEach(function(t){var r=t.category,n=t.sizeRange,o=t.width,i=t.height,l={sizeRange:n||null,sizeString:"".concat(o,'" x ').concat(i,'"')};e.has(r)||e.set(r,{category:r,sizes:[]}),e.get(r).sizes.push(l)}),Array.from(e.values())}function getImageUrl(e){return"https://jiffy.imgix.net/gen/preset-sizes/".concat(t,"/").concat(e,".png?ixlib=rb-0.3.5&h=400&dpr=2&q=60")}function onClose(){null==r||r()}function closeModal(){var e;null==(e=_.current)||e.close()}return(0,n.jsx)(c.A,_object_spread_props(_object_spread({},f),{className:"scope-873b6660",ref:_,compact:!0,hideCloseButton:!0,bottomAligned:!0,onClose:onClose,"data-testid":"common-modal",children:(0,n.jsxs)("div",{className:"size-guide scope-873b6660",children:[(0,n.jsxs)("div",{className:"size-guide__header scope-873b6660",children:[(0,n.jsx)("div",{className:"size-guide__title-text scope-873b6660",children:title()}),(0,n.jsx)("button",{className:"size-guide__close-button scope-873b6660",type:"button",onClick:closeModal,"data-testid":"size-guide-close-button",children:(0,n.jsx)(l.A,{className:"size-guide__close-button-icon scope-873b6660",icon:"menu-close","data-testid":"size-guide-close-button-icon"})})]}),(0,n.jsx)("div",{className:"size-guide__content scope-873b6660",children:(0,p.p)(presetsGrouped(),function(e,t){return(0,n.jsxs)("div",{className:"size-guide__item scope-873b6660",children:[(0,n.jsx)("img",{className:"size-guide__item-image scope-873b6660",src:getImageUrl(e.category),alt:"Size Guide"}),(0,n.jsx)("div",{className:"size-guide__item-title scope-873b6660",children:e.category}),(0,n.jsx)("div",{className:(0,i.cn)("size-guide__item-sizes scope-873b6660",{"size-guide__item-sizes--single":1===e.sizes.length}),children:(0,p.p)(e.sizes,function(e,t){return(0,n.jsxs)("div",{className:"size-guide__item-size scope-873b6660",children:[e.sizeRange?(0,n.jsx)("strong",{className:"scope-873b6660",children:e.sizeRange}):null,(0,n.jsx)("span",{className:"scope-873b6660",children:e.sizeString})]},t)})})]},t)})})]})}))}},740355(e,t,r){"use strict";r.d(t,{XI:()=>isWidthAndHeightValid,ZW:()=>getImageMetadataInfo,fJ:()=>getRangeString,qD:()=>groupByPreset,vf:()=>getProportionalEdge});var n=r(298210);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var getRangeString=function(e){return"".concat(e.category," ").concat(e.sizeRange?e.sizeRange:"")},isWidthAndHeightValid=function(e){var t=e.width,r=e.height;return""!==t&&Number(t)>=n.aW&&""!==r&&Number(r)>=n.aW},groupByPreset=function(e){return e.reduce(function(e,t,r){var n,o,i,l,c=t.preset,u=Number(t.quantity)||0;return _object_spread_props(_object_spread({},e),_define_property({},c,{items:_to_consumable_array((null==(n=e[c])?void 0:n.items)||[]).concat([_object_spread_props(_object_spread({},t),{index:r})]),count:((null==(o=e[c])?void 0:o.count)||0)+u,price:t.unitPrice?((null==(i=e[c])?void 0:i.price)||0)+Number(t.unitPrice)*u:(null==(l=e[c])?void 0:l.price)||0,preset:c}))},{})},getImageMetadataInfo=function(e){var t=e.metadata,r=e.sizesAndQuantities,n=e.minDpi,o=e.artwork;return t?{aspect_ratio:t.aspectRatio,resolution_width:t.width,resolution_height:t.height,size_and_quantities:r,max_width:t.maxWidth,max_height:t.maxHeight,max_sheet_width:t.maxSheetWidth,max_sheet_height:t.maxSheetHeight,min_dpi:n,file_name:o.name,file_size:o.fileSize,file_type:o.fileType}:null},toUsableRatio=function(e){if(null==e||""===e)return null;var t="string"==typeof e?Number(e):e;return"number"==typeof t&&Number.isFinite(t)&&t>0?t:null},resolveAspectRatio=function(e){var t=e.metadataAspectRatio,r=e.naturalWidth,n=e.naturalHeight,o=toUsableRatio(t);if(null!==o)return o;var i=toUsableRatio(r),l=toUsableRatio(n);return null!==i&&null!==l?toUsableRatio(i/l):null},getProportionalEdge=function(e){var t=e.value,r=e.field,n=resolveAspectRatio({metadataAspectRatio:e.metadataAspectRatio,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight});return null===n?null:(Math.round(t*("height"===r?1/n:n)*100)/100).toFixed(2)}},138024(e,t,r){"use strict";r.d(t,{A:()=>ArtworkNotification});var n=r(483134),o=r(997252),i=r(723433),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtworkNotification(e){var t=e.type,r=void 0===t?"warning":t,c=e.children,u=_object_without_properties(e,["type","children"]),d=(0,l.useDtfStore)();function showStepsUI(){return d.showStepsUI}return(0,n.jsx)("div",_object_spread_props(_object_spread({},u),{className:(0,o.cn)("artwork-notification scope-e6849d73",null==u?void 0:u.className,"artwork-notification--".concat(r),{"artwork-notification--steps-ui":showStepsUI()}),children:(0,n.jsxs)("div",{className:"artwork-notification__container scope-e6849d73",children:[(0,n.jsx)("div",{className:"artwork-notification__icon scope-e6849d73",children:(0,n.jsx)(i.A,{className:(0,o.cn)("artwork-notification__svg scope-e6849d73","artwork-notification__svg--".concat(r)),icon:"alert-circle","data-testid":"artwork-notification-svg"})}),(0,n.jsx)("div",{className:"artwork-notification__message scope-e6849d73",children:c})]})}))}},683164(e,t,r){"use strict";r.d(t,{A:()=>ArtworkQualityConfigPanel});var n=r(483134),o=r(745063),i=r(52382),l=r.n(i),c=r(293534),u=r(723433),d=r(996821),p=r(538896),f=r(834497),_=r(997252);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkQualityConfigPanel(e){var t=e.artwork,r=void 0===t?null:t,i=e.index,h=e.activeConfigSection,m=void 0===h?null:h,g=e.onSetActiveConfigSection,b=e.redrawNoteIdPrefix,y=_object_without_properties(e,["artwork","index","activeConfigSection","onSetActiveConfigSection","redrawNoteIdPrefix"]),v=(0,p.useDtfStore)();function isStandardArtwork(){return v.isStandardArtwork}function isPrintAsUploadedDisabled(){return isStandardArtwork()&&((null==r?void 0:r.isLoading)||!(null==r?void 0:r.enhancementCompleted))}function showRedrawNote(){return v.showRedrawUI}var w=(0,c.useRef)(l()(function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,v.updateEnableEnhancement({artworkId:e,enableEnhancement:t})];case 1:return r.sent(),[2]}})})()},100));function setActiveConfigSection(e){if(!("print-as-uploaded"===e&&isPrintAsUploadedDisabled())){if(null==r?void 0:r.pinningSessionId)return void v.setPendingPinningInvalidation({type:"enableEnhancement",artworkId:r.id,value:"jiffy-print-perfect"===e,section:e});if(g(e),null==r?void 0:r.id){var t="jiffy-print-perfect"===e;w.current(r.id,t)}var n={};"print-as-uploaded"===e?(n.enhancementTier=null,n.editType="Print as uploaded"):"jiffy-print-perfect"===e&&(n.enhancementTier="PrintPerfect",n.editType="Jiffy Print Perfect"),(0,o.il)({product_line:v.sticker?"sticker":v.isProColor?"pro color":"dtf",artwork:_object_spread_props(_object_spread({},r),{enhancementTier:n.enhancementTier}),edit_type:n.editType,artworks_count:v.artworks.length,location:"pdp",pre_cut_transfers:v.preCut})}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},y),{className:(0,_.cn)("artwork-quality-config-panel scope-f6116a9e",y.className),children:[(0,n.jsxs)("div",{className:(0,_.cn)("artwork-quality-config-panel__section scope-f6116a9e",(!(null==r?void 0:r.id)||"jiffy-print-perfect"===m)&&"artwork-quality-config-panel__section--active"),children:[(0,n.jsxs)("button",{className:"artwork-quality-config-panel__caption scope-f6116a9e",onClick:function(e){e.preventDefault(),e.stopPropagation(),setA
1ctiveConfigSection("jiffy-print-perfect")},"data-testid":"artwork-quality-config-panel-caption",children:[(0,n.jsx)(u.A,{className:"artwork-quality-config-panel__caption-icon scope-f6116a9e",icon:"checkmark-circled","data-testid":"artwork-quality-config-panel-caption-icon"}),(0,n.jsx)("span",{className:"scope-f6116a9e",children:"Jiffy Print Perfect"})]}),(0,n.jsxs)("div",{className:"artwork-quality-config-panel__body scope-f6116a9e",children:[(0,n.jsx)(f.A,{className:"scope-f6116a9e",id:r.id,artwork:r,background:r.background,canRemoveBg:r.canRemoveBg||!r.enhancementCompleted,removeBackground:r.removeBackground,toggleBackgroundError:r.toggleBackgroundError,activeConfigSection:m,"data-testid":"trim-info"}),showRedrawNote()?(0,n.jsx)(d.A,{enhancementNote:r.enhancementNote,index:void 0===i?0:i,idPrefix:void 0===b?void 0:b}):null]})]}),(0,n.jsx)("div",{className:(0,_.cn)("artwork-quality-config-panel__section scope-f6116a9e",(null==r?void 0:r.id)&&"print-as-uploaded"===m&&"artwork-quality-config-panel__section--active",isPrintAsUploadedDisabled()&&"artwork-quality-config-panel__section--disabled"),children:(0,n.jsxs)("button",{className:"artwork-quality-config-panel__caption scope-f6116a9e",onClick:function(e){e.preventDefault(),e.stopPropagation(),setActiveConfigSection("print-as-uploaded")},"data-testid":"artwork-quality-config-panel-caption-1",children:[(0,n.jsx)(u.A,{className:"artwork-quality-config-panel__caption-icon scope-f6116a9e",icon:"checkmark-circled","data-testid":"artwork-quality-config-panel-caption-icon-1"}),(0,n.jsx)("span",{className:"scope-f6116a9e",children:"Print as uploaded"})]})})]}))}},956288(e,t,r){"use strict";r.d(t,{A:()=>ArtworkQualityConfigPanel});var n=r(483134),o=r(52382),i=r.n(o),l=r(293534),c=r(745063),u=r(538896),d=r(658715),p=r(561444),f=r(340558),_=r(882268),h=r(839510);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function ArtworkQualityConfigPanel(e){var t=e.index,r=e.artwork,o=e.reorderEnabled,m=e.paidExpertEditAddonEnabled,g=(e.activeConfigSection,e.isMultiUpload),b=e.redrawNoteIdPrefix;e.onSetActiveConfigSection;var y=(0,u.useDtfStore)(),v=(0,l.useRef)(r);v.current=r;var w=(0,l.useRef)(i()(function(e){return _async_to_generator(function(){var t,r;return _ts_generator(this,function(n){switch(n.label){case 0:if(!(null==(t=v.current)?void 0:t.id))return[2];return r="print_original"!==e,[4,y.updateEnableEnhancement({artworkId:t.id,enableEnhancement:r,enhancementTier:e})];case 1:return n.sent(),y.updateArtworkValuesById({id:t.id,hasExpertEditAddon:t.hasExpertEditAddon}),[2]}})})()},100)).current;function executeTabChange(e){r.enhancementCompleted?w(e):y.updateArtworkValuesById({id:r.id,enhancementTier:e,pricing:y.cachedArtworkPrices[e]||{},hasExpertEditAddon:r.hasExpertEditAddon}),(0,c.il)({product_line:y.sticker?"sticker":y.isProColor?"pro color":"dtf",artwork:_object_spread_props(_object_spread({},r),{enhancementTier:e}),edit_type:"print_original"===e?"Print as uploaded":"Jiffy Print Perfect",artworks_count:y.artworks.length,location:"pdp",pre_cut_transfers:y.preCut})}function setActiveConfigSection(e){r.pinningSessionId?y.setPendingPinningInvalidation({type:"enhancementTier",artworkId:r.id,value:e}):executeTabChange(e)}function setPrintPerfectSection(){setActiveConfigSection("full_enhancements")}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(d.t,{className:"artwork-quality-config-panel",slots:{buttons:function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.K,{active:"print_original"===r.enhancementTier,icon:void 0,onClick:function(){setActiveConfigSection("print_original")},"data-testid":"tab-button",children:"Print As Is"}),(0,n.jsx)(d.K,{active:"full_enhancements"===r.enhancementTier,icon:"stars-corners",onClick:function(){setActiveConfigSection("full_enhancements")},"data-testid":"tab-button-1",children:"PrintPerfect"}),null]})}},"data-testid":"artwork-quality-config-panel",children:["print_original"===r.enhancementTier?(0,n.jsx)(_.A,{artwork:r,onPrintPerfectClick:setPrintPerfectSection,"data-testid":"print-as-is"},r.enhancementTier):null,"full_enhancements"===r.enhancementTier?(0,n.jsx)(h.A,{artwork:r,reorderEnabled:o,paidExpertEditAddonEnabled:m,index:t,"data-testid":"print-perfect"},r.enhancementTier):null,m||"custom"!==r.enhancementTier?null:(0,n.jsx)(p.A,{artwork:r,index:t,reorderEnabled:o,"data-testid":"custom"},r.enhancementTier)]}),"full_enhancements"===r.enhancementTier||"print_original"===r.enhancementTier?(0,n.jsx)(f.A,{artwork:r,paidExpertEditAddonEnabled:!!m,index:t,isMultiUpload:!!g,redrawNoteIdPrefix:void 0===b?void 0:b,"data-testid":"design-services"}):null]})}},561444(e,t,r){"use strict";r.d(t,{A:()=>Custom});var n=r(483134),o=r(538896),i=r(997252),l=r(245358),c=r(298789),u=r(791871),d=r(996821),p=r(551041),f=r(651839);function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function Custom(e){var t=e.artwork,r=e.reorderEnabled,_=e.index;_object_without_properties(e,["artwork","reorderEnabled","index"]);var h=(0,o.useDtfStore)();function showRedrawNote(){return h.showRedrawUI}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:(0,i.cn)("custom__headline scope-c603d1c4",r&&"custom__headline--large-padding"),slots:{title:function(){return(0,n.jsxs)("div",{className:"custom__title scope-c603d1c4",children:[" ","Custom edits, done for you."," ",(0,n.jsx)(p.A,{className:"scope-c603d1c4",artwork:t,reorderEnabled:r,showRetailPrice:!1,"data-testid":"price-label"})]})},subtitle:function(){return(0,n.jsxs)("div",{className:"custom__subtitle scope-c603d1c4",children:[" ","Tell us what you want! Our expert team will adju
1st your design and make sure it's just right for printing."," "]})}},"data-testid":"custom-headline"}),(0,n.jsx)(c.A,{className:"custom__list-section scope-c603d1c4","data-testid":"custom-list-section",children:(0,n.jsxs)(u.B,{className:"scope-c603d1c4",long:!0,"data-testid":"list",children:[(0,n.jsx)(u.c,{className:"scope-c603d1c4",showMonetization:!0,"data-testid":"list-item",children:"Same-day turnaround on eligible orders"}),(0,n.jsx)(u.c,{className:"scope-c603d1c4",showMonetization:!0,"data-testid":"list-item-1",children:"Precise color changes"}),(0,n.jsx)(u.c,{className:"scope-c603d1c4",showMonetization:!0,"data-testid":"list-item-2",children:"Custom background removal"}),(0,n.jsx)(u.c,{className:"scope-c603d1c4",showMonetization:!0,"data-testid":"list-item-3",children:"Fine-tuned adjustments"}),(0,n.jsxs)(u.c,{className:"scope-c603d1c4",kind:"highlight","data-testid":"list-item-4",children:[(0,n.jsxs)("a",{className:"scope-c603d1c4",href:"/jiffy-transfers-FAQs#design-quality-guarantee",target:"_blank","data-testid":"custom-a",children:[" ","PrintPerfect Guarantee"," "]}),"included"]})]})}),showRedrawNote()?(0,n.jsx)(d.A,{index:_,enhancementNote:t.enhancementNote,disabled:!t.enhancementCompleted}):null,(0,n.jsx)(c.A,{className:"custom__comparison scope-c603d1c4","data-testid":"custom-comparison",children:(0,n.jsx)(f.A,{className:"scope-c603d1c4","data-testid":"custom-comparison-1"})})]})}},651839(e,t,r){"use strict";r.d(t,{A:()=>CustomComparison});var n=r(483134),o=r(927997),i=r(997252),l=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function CustomComparison(e){_object_destructuring_empty(e);var t=_extends({},e);function computedImageUrl(e){return(0,o.lt)("gen/expert_edit_illustration_1/".concat(e,".png"))}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("custom-comparison scope-441a917e",t.className),children:[(0,n.jsx)("h2",{className:"custom-comparison__header scope-441a917e",children:"Illustrative Example"}),(0,n.jsx)("div",{className:"custom-comparison__body scope-441a917e",children:(0,l.p)([{title:"Original",imageName:"original"},{title:"Sharpened",imageName:"sharpened"},{title:"Background Removed",imageName:"background_removed"},{title:"Color Changes",imageName:"color_changes"},{title:"Elements Removed",imageName:"elements_removed"},{title:"Text Changes",imageName:"text_changes"}],function(e){return(0,n.jsxs)("div",{className:"custom-comparison__item scope-441a917e",children:[(0,n.jsx)("h3",{className:"custom-comparison__item-title scope-441a917e",children:e.title}),(0,n.jsx)("div",{className:(0,i.cn)("custom-comparison__item-image-wrapper scope-441a917e","custom-comparison__item-image-wrapper--".concat(e.imageName)),children:(0,n.jsx)("img",{className:"custom-comparison__item-image scope-441a917e",alt:"Illustration for ".concat(e.title),src:computedImageUrl(e.imageName)})})]},e.title)})})]}))}},340558(e,t,r){"use strict";r.d(t,{A:()=>DesignServices});var n=r(483134),o=r(293534),i=r(997252),l=r(338908),c=r(147141),u=r(5786),d=r(723433),p=r(467265),f=r(538896),_=r(298789),h=r(996821),m=r(980423),g=r(152712);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DesignServices(e){var t=e.artwork,r=(e.paidExpertEditAddonEnabled,e.index),b=e.isMultiUpload,y=e.redrawNoteIdPrefix,v=(0,f.useDtfStore)(),w=(0,l.s)(),j=w.numberFormatter,k=w.n,x=_sliced_to_array((0,o.useState)(t.hasExpertEditAddon||!1),2),S=x[0],O=x[1],P=_sliced_to_array((0,o.useState)(!1),2),A=P[0],C=P[1],I=_sliced_to_array((0,o.useState)(!(0,c.IV)()),1)[0],E=(0,o.useRef)(null);function isStandardDTFProduct(){return v.isStandardDTFProduct}function showRedrawUI(){return!!v.enableRedraw&&(!!isStandardDTFProduct()||S)}function isLoading(){var e;return null==(null==(e=t.pricing)?void 0:e.expertEditAddonTierPrice)}function isFree(){return!isLoading()&&t.pricing.expertEditAddonTierPrice<=0}function expertEditAddonTierPrice(){return isLoading()?"":isFree()?"FREE":k(t.pricing.expertEditAddonTierPrice,"currency",j)}function openRedrawModal(){C(!0)}function closeRedrawModal(){E.current&&E.current.close(),C(!1)}function onExpertEditAddonToggle(e){if(t.isSimulated?v.setSimulation({hasExpertEditAddon:e}):v.updateArtworkValuesById({id:t.id,hasExpertEditAddon:e,enhancementNote:""}),v.getArtworksPricing(),v.showDesignServicesDeliveryBuffer){var r;(!e||e&&(null==(r=t.enhancementNote)?void 0:r.trim()))&&v.updatePdpDates()}(0,p.Py)("expert_edit_addon_toggled",{artwork_id:t.id,product_id:v.productId,enabled:e,business_line:v.businessLine,catalog_number:v.catalogNumber,active_config_section:t.enhancementTier})}return((0,o.useEffect)(function(){O(t.hasExpertEditAddon||!1)},[t.hasExpertEditAddon]),isStandardDTFProduct()&&!v.enableRedraw)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(_.A,{className:"design-services scope-fb032041","data-testid":"design-services",children:[(0,n.jsxs)("div",{className:"design-services__header scope-fb032041",children:[isStandardDTFProduct()?null:(0,n.jsxs)("label",{className:"design-services__checkbox scope-fb032041",id:"jiffy-design-services-addon-label","data-testid":"design-services-checkbox",children:[(0,n.jsx)("input",{className:"design-services__input scope-fb032041 sr-only",checked:S,disabled:!v.enableRedraw,onChange:function(e){var t=e.target.checked;O(t),onExpertEditAddonToggle(t)},type:"checkbox","data-testid":"print-perfect-design-services-checkbox"}),(0,n.jsx)("div",{className:"design-services__checkbox-box scope-fb032041",children:S?(0,n.jsx)(d.A,{className:"design-services__checkbox-icon scope-fb032041",icon:"check","data-testid":"design-services-checkbox-icon"}):null}),(0,n.jsxs)("div",{className:"design-services__label scope-fb032041",children:[(0,n.jsxs)("div",{className:"design-services__label-text scope-fb032041",children:[" ","Jiffy Design Services"," ",(0,n.jsx)("span",{className:"design-services__badge scope-fb032041",children:"Add-On"})]}),(0,n.jsx)("div",{className:"design-services__help scope-fb032041",children:"Use our professional designers to edit your image"})]})]}),isStandardDTFProduct()?null:(0,n.jsxs)("div",{className:"design-services__actions scope-fb032041",children:[(0,n.jsx)("div",{className:(0,i.cn)("design-services__price scope-fb032041",isFree()&&"design-services__price--free"),children:expertEditAddonTierPrice()}),(0,n.jsxs)("button",{className:"design-services__learn-more scope-fb032041",type:"button",onClick:openRedrawModal,"data-testid":"design-services-learn-more",children:[" ","Learn More"," "]})]})]}),showRedrawUI()?(0,n.jsx)("div",{className:"design-services__notes js-
1print-perfect-redraw-notes-addon scope-fb032041","data-id":t.id,children:(0,n.jsx)(h.A,_object_spread({index:r,idPrefix:void 0===y?void 0:y,enhancementNote:t.enhancementNote},isStandardDTFProduct()?{onLearnMore:openRedrawModal}:{}))}):null,b?null:(0,n.jsx)(g.A,{className:"scope-fb032041","data-testid":"design-services-subscribe"})]}),A?(0,n.jsx)(u.A,{className:"scope-fb032041",ref:E,compact:!0,hideCloseButton:!1,bottomAligned:I,onClose:closeRedrawModal,"data-testid":"common-modal",children:(0,n.jsx)(m.A,{className:"scope-fb032041",isMobile:I,onClose:closeRedrawModal,"data-testid":"redraw-information"})}):null]})}},152712(e,t,r){"use strict";r.d(t,{A:()=>DesignServicesSubscribe});var n=r(483134),o=r(293534),i=r(723433),l=r(444636),c=r(250817),u=r(538896),d=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function DesignServicesSubscribe(e){e.requestSatisfied;var t=_object_without_properties(e,["requestSatisfied"]),r=(0,u.useDtfStore)(),p=_sliced_to_array((0,o.useState)(""),2),f=p[0],_=p[1],h=_sliced_to_array((0,o.useState)(r.smsTransactionalPhone),2),m=h[0],g=h[1],b=_sliced_to_array((0,o.useState)(r.smsTransactionalSubscribeButtonText),2),y=b[0],v=b[1],w=(0,o.useRef)(void 0),j=(0,o.useRef)(m);function showDesignServicesDeliveryBuffer(){return r.showDesignServicesDeliveryBuffer}function isSmsTransactionalSubscribed(){var e;return null==(e=r.messagingConsents)?void 0:e.smsTransactional}function isSmsTransactionalSubscriptionPdpEnabled(){return r.smsTransactionalSubscriptionPdpEnabled}function formatPhoneNumber(e){var t=e.replace(/\D/g,"");11===t.length&&"1"===t[0]&&(t=t.slice(1));return t.length<=3?t:t.length<=6?"(".concat(t.slice(0,3),") ").concat(t.slice(3)):"(".concat(t.slice(0,3),") ").concat(t.slice(3,6),"-").concat(t.slice(6,10))}function calculateNewCursorPosition(e,t){if(0===t)return 0;for(var r,n=0,o=0,i=0;i<e.length;i+=1)if((null==(r=e[i])?void 0:r.match(/\d/))&&(o+=1)===t){n=i+1;break}return o<t&&(n=e.length),n}function restorePreviousValue(e,t,r){e.value=t,e.setSelectionRange(r,r),g(t)}function salvageDigits(e,t){var r=formatPhoneNumber("1"===t[0]?t.slice(0,11):t.slice(0,10));e.value=r,e.setSelectionRange(r.length,r.length),e.dataset.formattedValue=r,e.dataset.cursorPosition=r.length.toString(),g(r)}function handleInvalidLength(e,t,r){if(t){var n=parseInt(e.dataset.cursorPosition||t.length.toString(),10);restorePreviousValue(e,t,n)}else r.length>=11&&salvageDigits(e,r)}function handleEmptyValue(e){g(""),e.dataset.formattedValue="",e.dataset.cursorPosition="0","Subscribe"!==y&&v("Subscribe")}function applyFormattedValue(e,t,r){var n=calculateNewCursorPosition(t,r.strippedLeading1&&r.oldDigitsBeforeCursor>0?r.oldDigitsBeforeCursor-1:r.oldDigitsBeforeCursor);e.value=t,e.setSelectionRange(n,n),e.dataset.formattedValue=t,e.dataset.cursorPosition=n.toString(),g(t),"Subscribe"!==y&&v("Subscribe")}function isSubscribePhoneValid(){return(0,c.Q7)(m)&&!f}function validateSubscribePhone(e){var t=e.trim();return t?(0,c.Q7)(t)?(_(""),!0):(_("Please enter a valid 10-digit phone number"),!1):(_(""),!1)}function getConsentParams(){return{spree_user:{preferences:{consent:{sms_transactional:!0}}}}}function handleSubscribeClick(){return _async_to_generator(function(){var e,t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:if(!validateSubscribePhone(m))return[2];if(!(e=(0,l.PL)().order_number))return _("Unable to subscribe right now. Please refresh the page."),[2];r=(t=document.querySelector('meta[name="csrf-token"]'))?t.content:"",i.label=1;case 1:return i.trys.push([1,4,,5]),[4,fetch("/api/orders/".concat(e,"/update_redraw_phone"),{method:"PUT",headers:_object_spread({"Content-Type":"application/json"},r?{"X-CSRF-Token":r}:{}),body:JSON.stringify(_object_spread({phone:m,force_phone_update:!0,consent_source:"transfer-pdp"},getConsentParams()))})];case 2:return[4,(n=i.sent()).json()];case 3:return o=i.sent(),n.ok&&o&&o.success?(_(""),v("Submitted")):o&&o.error?_(o.error):_("Failed to save phone number"),[3,5];case 4:return i.sent(),_("An error occurred. Please try again."),[3,5];case 5:return[2]}})})()}function handleSubscribeInput(e){_("");var t=e.target,r=t.selectionStart||0,n=t.value,o=n.replace(/\D/g,""),i=o.length<=10||11===o.length&&"1"===o[0],l=t.dataset.formattedValue||"";if(!i)return void handleInvalidLength(t,l,o);if(!n)return void handleEmptyValue(t);var c=n.slice(0,r).replace(/\D/g,"").length;applyFormattedValue(t,formatPhoneNumber(n),{oldDigitsBeforeCursor:c,strippedLeading1:11===o.length&&"1"===o[0]}),void 0!==w.current&&clearTimeout(w.current),w.current=window.setTimeout(function(){validateSubscribePhone(j.current)},1e3)}return j.current=m,(0,o.useEffect)(function(){r.setSmsTransactionalPhone(m)},[m]),(0,o.useEffect)(function(){r.setSmsTransactionalSubscribeButtonText(y)},[y]),(0,o.useEffect)(function(){return function(){void 0!==w.current&&clearTimeout(w.current)}},[]),(0,n.jsx)(n.Fragment,{children:!isSmsTransactionalSubscribed()&&isSmsTransactionalSubscriptionPdpEnabled()&&!r.allArtworksAiApproved?(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,d.cn)("design-services__subscribe scope-c46a7105",t.className),children:[(0,n.jsxs)("div",{className:"design-services__subscribe-label scope-c46a7105",children:[" ","Get notified when your edits are ready"," "]}),(0,n.jsxs)("div",{className:"design-services__subscribe-fields scope-c46a7105",children:[(0,n.jsx)("input",{className:"design-services__subscribe-input scope-c46a7105",value:m,type:"tel",placeholder:"(xxx) xxx-xxxx","data-testid":"design-services-subscribe-phone-input",disabled:"Submitted"===y,onChange:function(e){handleSubscribeInput(e)}}),(0,n.jsx)("button",{className:(0,d.cn)("design-services__subscribe-button scope-c46a7105",{"design-services__subscribe-button--submitted":"Submitted"===y}),type:"button","data-testid":"design-services-subscribe-button",disabled:!isSubscribePhoneValid(),onClick:handleSubscribeClick,children:(0,n.jsxs)("span",{className:"design-services__subscribe-button-text scope-c46a7105",children:[y," ","Submitted"!==y?(0,n.jsxs)("span",{className:"design-services__subscribe-button-asterisk scope-c46a7105",children:[" ","*"," "]}):null]})})]}),f?(0,n.jsx)("div",{className:"design-services__subscribe-error scope-c46a7105","data-testid":"design-services-subscribe-error",children:f}):null,(0,n.jsx)("div",{className:(0,d.cn)("design-services__subscribe-note scope-c46a7105",{"design-services__subscribe-note--submitted":"Submitted"===y}),children:"Submitted"===y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"design-services__subscribe-note-icon scope-c46a7105",children:(0,n.jsx)(i.A,{className:"design-services__subscribe-note-icon-svg scope-c46a7105",icon:"check-circle","data-testid":"design-services-subscribe-note-icon-svg"})}),(0,n.jsxs)("span",{className:"design-services__subscribe-note-text scope-c46a7105",children:[" ","Be on the lookout for a SMS notification from Jiffy with your redrawn image"," "]})]}):(0,n.jsx)(n.Fragment,{children:showDesignServicesDeliveryBuffer()?(0,n.jsxs)(n.Fragment,{children:[" ","*Edits add 1 day to delivery. Enter your mobile number to receive transactional SMS updates. Message and data rates may apply."," "]}):(0,n.jsxs)(n.Fragment,{children:[" ","*Enter your mobile number to receive transactional SMS updates. Message and data rates may apply."," "]})})})]})):null})}},882268(e,t,r){"use strict";r.d(t,{A:()=>PrintAsIs});var n=r(483134),o=r(245358),i=r(298789),l=r(791871);function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PrintAsIs(e){return e.onPrintPerfectClick,e.artwork,_object_without_properties(e,["onPrintPerfectClick","artwork"]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"scope-a26b99
102",slots:{title:function(){return(0,n.jsx)(n.Fragment,{children:"For Pros who know."})},subtitle:function(){return(0,n.jsxs)(n.Fragment,{children:[" ","You don't need our help. We print exactly as you send it, without any cutting edge, industry-leading print enhancements."," "]})}},"data-testid":"print-as-is-headline"}),(0,n.jsx)(i.A,{className:"print-as-is__section scope-a26b9902","data-testid":"print-as-is-section",children:(0,n.jsxs)(l.B,{className:"scope-a26b9902","data-testid":"list",children:[(0,n.jsxs)(l.c,{className:"scope-a26b9902",kind:"warning","data-testid":"list-item",children:["No",(0,n.jsxs)("a",{className:"scope-a26b9902",href:"/jiffy-transfers-FAQs#transfer-quality-guarantee",target:"_blank","data-testid":"print-as-is-a",children:[" ","PrintPerfect Guarantee"," "]})]}),(0,n.jsx)(l.c,{className:"scope-a26b9902",kind:"warning","data-testid":"list-item-1",children:"No safety net"}),(0,n.jsx)(l.c,{className:"scope-a26b9902",kind:"warning","data-testid":"list-item-2",children:"Quality depends on uploaded design"})]})})]})}},839510(e,t,r){"use strict";r.d(t,{A:()=>PrintPerfect});var n=r(483134),o=r(538896),i=r(997252),l=r(245358),c=r(298789),u=r(834497);function PrintPerfect(e){var t=e.artwork;e.reorderEnabled,e.paidExpertEditAddonEnabled,e.index;var r=(0,o.useDtfStore)();function isStandardDTFProduct(){return r.isStandardDTFProduct}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.A,{className:"print-perfect__headline scope-53dc0233",slots:{title:function(){return(0,n.jsx)(n.Fragment,{children:"PrintPerfect"})},subtitle:function(){return(0,n.jsx)(n.Fragment,{children:"Backgroun
1d removal, upscaling, sharpening edges."})}},"data-testid":"print-perfect-headline",children:(0,n.jsxs)("span",{className:(0,i.cn)("scope-53dc0233","print-perfect__free-text",{"print-perfect__free-text--experiment":isStandardDTFProduct()}),"data-testid":"print-perfect-free-text",children:[" ","FREE"," "]})}),t.canRemoveBg||t.id&&!t.enhancementCompleted?(0,n.jsx)(c.A,{className:"print-perfect__controls-section print-perfect__addon-container scope-53dc0233","data-testid":"print-perfect-controls-section",children:t.isSimulated||!t.canRemoveBg&&t.enhancementCompleted?null:(0,n.jsx)(u.A,{className:"scope-53dc0233",id:t.id,artwork:t,activeConfigSection:"jiffy-print-perfect",canRemoveBg:t.canRemoveBg||!t.enhancementCompleted,removeBackground:t.removeBackground,toggleBackgroundError:t.toggleBackgroundError||"","data-testid":"trim-info"})}):null]})}},200108(e,t,r){"use strict";r.d(t,{A:()=>CustomNotes});var n=r(483134),o=r(293534),i=r(997252),l=r(338908),c=r(277889),u=r(419250),d=r(640554),p=r(690690),f=r(733334),_=r(723433),h=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function StatusIndicator(e){var t=e.status,r=e.onRetry;return(0,n.jsx)("span",{className:"custom-notes__status scope-db2f53a3",role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"custom-notes-status",children:"saving"===t?(0,n.jsxs)("span",{className:"custom-notes__saving-status scope-db2f53a3",children:[(0,n.jsx)(_.A,{className:"custom-notes__saving-icon scope-db2f53a3",icon:"rotate","data-testid":"custom-notes-saving-icon"})," ","Saving..."," "]}):"saved"===t?(0,n.jsxs)("span",{className:"custom-notes__saving-status custom-notes__saving-status--saved scope-db2f53a3",children:[(0,n.jsx)(_.A,{className:"custom-notes__saved-icon scope-db2f53a3",icon:"check","data-testid":"custom-notes-saved-icon"})," ","Saved"," "]}):"error"===t?(0,n.jsxs)("span",{className:"custom-notes__saving-status custom-notes__saving-status--error scope-
1db2f53a3",children:[" ","Couldn't save."," ",(0,n.jsxs)("button",{className:"custom-notes__retry-button scope-db2f53a3",type:"button",onClick:r,"data-testid":"custom-notes-retry-button",children:[" ","Retry"," "]})]}):null})}function CustomNotes(e){var t,r,m=e.disabled,g=e.onLearnMore,b=e.index,y=e.modelValue,v=e.onInput,w=e.onUpdateModelValue,j=_object_without_properties(e,["disabled","onLearnMore","index","modelValue","onInput","onUpdateModelValue"]),k=(0,l.s)().n,x=(0,h.useDtfStore)(),S=!!(null==(r=window.jiffy)||null==(t=r.flip)?void 0:t.artistEditsSlaDisclosure),O=_sliced_to_array((0,o.useState)(null!=y?y:""),2),P=O[0],A=O[1],C=_sliced_to_array((0,o.useState)("idle"),2),I=C[0],E=C[1],N=(0,o.useRef)(null);(0,f.V)(N);var D=(0,o.useRef)(null),T=(0,o.useRef)(null),M=(0,o.useRef)(0),R=(0,o.useRef)(P);function isStandardDTFProduct(){return x.isStandardDTFProduct}function placeholderText(){return isStandardDTFProduct()?"i.e. Make the font black, remove the red background, and smooth out edges.":'Example: "Change the color of the font to black. Remove the background from the top half of the image."'}function artwork(){return void 0===b?null:x.artworks[b]}function shouldShowPrice(){var e;return!!(null==(e=artwork())?void 0:e.pricing)&&Number(artwork().pricing.expertEditAddonTierPrice)>0}function formattedPrice(){var e;return(null==(e=artwork())?void 0:e.pricing)?k(artwork().pricing.expertEditAddonTierPrice,"currency"):""}function autoResize(e){var t=e.target;t&&isStandardDTFProduct()&&(t.style.height="auto",t.style.height="".concat(t.scrollHeight,"px"))}function clearFadeTimeout(){null!==T.current&&(clearTimeout(T.current),T.current=null)}function clearPendingTimeouts(){null!==D.current&&(clearTimeout(D.current),D.current=null),clearFadeTimeout()}function handleSavingIndicator(){E("saving"),clearPendingTimeouts(),M.current+=1,D.current=window.setTimeout(saveRedrawNote,1e3)}function saveRedrawNote(){if(!(null==(e=artwork())?void 0:e.id))return void E("idle");M.current+=1;var e,t=M.current,r=R.current.trim();c.api.dtf.updateArtworkRedrawData({id:artwork().id},{dtf_artwork:{enhancement_request_note:r}}).then(function(){t===M.current&&(clearFadeTimeout(),E("saved"),T.current=window.setTimeout(function(){E("idle"),T.current=null},2e3))}).catch(function(){t===M.current&&(clearFadeTimeout(),E("error"))})}function handleRetry(){clearPendingTimeouts(),E("saving"),saveRedrawNote()}function handleTextareaChange(e){var t=e.target.value;A(t),w&&w(t),autoResize(e),v&&v(e),handleSavingIndicator()}return R.current=P,(0,o.useEffect)(function(){A(null!=y?y:"")},[y]),(0,o.useEffect)(function(){isStandardDTFProduct()&&N.current&&(N.current.style.height="auto",N.current.style.height="".concat(N.current.scrollHeight,"px"))},[P]),(0,o.useEffect)(function(){return function(){return clearPendingTimeouts()}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},j),{className:(0,i.cn)("custom-notes scope-db2f53a3",j.className),children:(0,n.jsxs)("label",{className:"custom-notes__label scope-db2f53a3","data-testid":"custom-notes-label",children:[(0,n.jsx)("span",{className:"custom-notes__label-text scope-db2f53a3",children:isStandardDTFProduct()?(0,n.jsxs)("span",{className:"custom-notes__label-with-badge scope-db2f53a3",children:[(0,n.jsxs)("span",{className:"custom-notes__label-text-with-icon scope-db2f53a3",children:[" ","Need artist edits?"," ",g?(0,n.jsx)("button",{className:"custom-notes__learn-more-icon scope-db2f53a3",type:"button",onClick:g,"data-testid":"custom-notes-learn-more-icon",children:(0,n.jsx)(_.A,{className:"custom-notes__question-icon scope-db2f53a3",icon:"question-circle","data-testid":"custom-notes-question-icon"})}):null]}),(0,n.jsx)(StatusIndicator,{status:I,onRetry:handleRetry}),shouldShowPrice()?(0,n.jsx)("span",{className:"custom-notes__price-badge scope-db2f53a3",children:formattedPrice()}):(0,n.jsx)("span",{className:"custom-notes__free-badge scope-db2f53a3",children:"Free"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"custom-notes__label-required scope-db2f53a3",children:"*"}),(0,n.jsx)("span",{className:"scope-db2f53a3",children:"Instructions for our designers"}),(0,n.jsx)(StatusIndicator,{status:I,onRetry:handleRetry})]})}),isStandardDTFProduct()&&S?(0,n.jsx)(d.M,{className:"mt-1 space-y-0.5 text-xs font-medium leading-tight text-gray-600"}):null,isStandardDTFProduct()?(0,n.jsx)("div",{className:"custom-notes__textarea-wrapper scope-db2f53a3",children:(0,n.jsx)("textarea",{className:"custom-notes__textarea custom-notes__textarea--experiment js-custom-notes-textarea scope-db2f53a3",ref:N,value:P,onChange:handleTextareaChange,"data-redraw-text-area-identifier":p.yv,disabled:m,maxLength:u.G,placeholder:placeholderText(),"data-testid":"custom-notes-textarea"})}
1):(0,n.jsx)("textarea",{className:"custom-notes__textarea js-custom-notes-textarea scope-db2f53a3",ref:N,value:P,onChange:handleTextareaChange,"data-redraw-text-area-identifier":p.yv,disabled:m,maxLength:u.G,placeholder:placeholderText(),"data-testid":"custom-notes-textarea-1"})]})}))}},245358(e,t,r){"use strict";r.d(t,{A:()=>Headline});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function Headline(e){var t,r,i,l=e.largeGap,c=e.children,u=e.slots,d=_object_without_properties(e,["largeGap","children","slots"]),p=null!=(t=d["data-testid"])?t:"headline";return(0,n.jsxs)("div",_object_spread_props(_object_spread({},d),{className:(0,o.cn)("scope-20b5d5db",d.className,"headline",{"headline--large-gap":l}),children:[c,(0,n.jsxs)("div",{className:"headline__captions scope-20b5d5db",children:[(0,n.jsx)("div",{className:"headline__title scope-20b5d5db","data-testid":"".concat(p,"-title"),children:null==u||null==(r=u.title)?void 0:r.call(u)}),(0,n.jsx)("div",{className:"headline__subtitle scope-20b5d5db","data-testid":"".concat(p,"-subtitle"),children:null==u||null==(i=u.subtitle)?void 0:i.call(u)})]})]}))}},707979(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){var t=e.long,r=e.children,i=_object_without_properties(e,["long","children"]);return(0,n.jsx)("ul",_object_spread_props(_object_spread({},i),{className:(0,o.cn)("list scope-005cf356",i.className,{"list--long":t}),children:r}))}},711362(e,t,r){"use strict";r.d(t,{A:()=>ListItem});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ListItem(e){var t=e.kind,r=e.showMonetization,l=e.children,c=_object_without_properties(e,["kind","showMonetization","children"]);function icon(){return"highlight"===t?"check-curvy-small":"warning"===t?"warning-hexagon":"denied"===t?"cross-filled":"check"}function classList(){return"highlight"===t?"list-item--highlight":"warning"===t?"list-item--warning":"denied"===t?"list-item--denied":""}return(0,n.jsxs)("li",_object_spread_props(_object_spread({},c),{className:(0,o.cn)("scope-eae00b23 list-item",classList(),c.className),"data-testid":"list-item",children:[(0,n.jsx)(i.A,{className:(0,o.cn)("list-item__icon scope-eae00b23",{"enable-ab-monetization-ui-v2":r}),icon:icon(),"data-testid":"list-item-icon"}),(0,n.jsx)("span",{className:"scope-eae00b23",children:l})]}))}},791871(e,t,r){"use strict";r.d(t,{B:()=>n.A,c:()=>o.A});var n=r(707979),o=r(711362)},551041(e,t,r){"use strict";r.d(t,{A:()=>PriceLabel});var n=r(483134),o=r(338908),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PriceLabel(e){var t=e.artwork,r=e.reorderEnabled,l=e.showRetailPrice,c=_object_without_properties(e,["artwork","reorderEnabled","showRetailPrice"]),u=(0,o.s)().n;function isLoading(){var e;return!Number(null==(e=t.pricing)?void 0:e.enhancementTierRetailPrice)}function oldPrice(){return isLoading()?0:u(t.pricing.enhancementTierRetailPrice,"currency")}function newPrice(){return isLoading()?0:u(t.pricing.enhancementTierPrice,"currency")}function shouldShowPrice(){var e;return!isLoading()&&Number(null==(e=t.pricing)?void 0:e.enhancementTierPrice)>0}return(0,n.jsx)(n.Fragment,{children:shouldShowPrice()?(0,n.jsxs)("span",_object_spread_props(_object_spread({},c),{className:(0,i.cn)("scope-5d14fee4","price-label",{"price-label--loading":isLoading(),"price-label--reorder":r},c.className),children:[(0,n.jsxs)("span",{className:"price-label__prices scope-5d14fee4",children:[(0,n.jsx)("span",{className:"price-label__new-price scope-5d14fee4",children:newPrice()})," ",l?(0,n.jsx)("span",{className:"price-label__old-price scope-5d14fee4",children:oldPrice()}):null]}),(0,n.jsx)("span",{className:"price-label__info scope-5d14fee4",children:"Per Design Size"}),r?(0,n.jsx)("span",{className:"price-label__reorder scope-5d14fee4",children:"+ Unlimited Reorders!"}):null]})):null})}},323506(e,t,r){"use strict";r.d(t,{A:()=>
1RemoveBackground});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function RemoveBackground(e){var t=e.value,r=e.disabled,i=e.onChange,l=_object_without_properties(e,["value","disabled","onChange"]),c=l.className,u=_object_without_properties(l,["className"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({className:(0,o.cn)("scope-25a8c6e5","remove-background",c)},u),{children:(0,n.jsxs)("label",{className:"remove-background__container scope-25a8c6e5","data-testid":"remove-background-container",children:[(0,n.jsxs)("div",{className:"remove-background__switch scope-25a8c6e5",children:[(0,n.jsx)("input",{className:"remove-background__input scope-25a8c6e5",type:"checkbox",checked:t,disabled:r,readOnly:!0,onClick:function(e){e.preventDefault(),i(!t)},"data-testid":"remove-background-input"}),(0,n.jsx)("span",{className:"remove-background__slider scope-25a8c6e5"})]}),(0,n.jsx)("div",{className:"remove-background__label scope-25a8c6e5",children:(0,n.jsx)("span",{className:"scope-25a8c6e5",children:"Remove Backgroun
1d"})})]})}))}},298789(e,t,r){"use strict";r.d(t,{A:()=>Section});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function Section(e){var t=e.children,r=_object_without_properties(e,["children"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("scope-07d524f7",r.className,"section"),children:t}))}},740854(e,t,r){"use strict";r.d(t,{A:()=>TabButton});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function TabButton(e){var t=e.active,r=e.icon,l=e.onClick,c=e.children,u=_object_without_properties(e,["active","icon","onClick","children"]);return(0,n.jsxs)("button",_object_spread_props(_object_spread({},u),{className:(0,o.cn)("tab-button scope-6eba7857",{"tab-button--active":t},u.className),type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),l(e)},"data-testid":"tab-button",children:[r?(0,n.jsx)(i.A,{className:"tab-button__icon scope-6eba7857",icon:r,"data-testid":"tab-button-icon"}):null,c]}))}},249791(e,t,r){"use strict";r.d(t,{A:()=>Tabs});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function Tabs(e){var t,r=e.slots,i=void 0===r?{}:r,l=e.children,c=_object_without_properties(e,["slots","children"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},c),{className:(0,o.cn)("scope-513905da tabs",c.className),children:[(0,n.jsx)("div",{className:"tabs__buttons scope-513905da","data-testid":"tabs-buttons",children:null==(t=i.buttons)?void 0:t.call(i)}),(0,n.jsx)("div",{className:"tabs__body scope-513905da","data-testid":"tabs-body",children:l})]}))}},658715(e,t,r){"use strict";r.d(t,{K:()=>n.A,t:()=>o.A});var n=r(740854),o=r(249791)},819170(e,t,r){"use strict";r.d(t,{A:()=>ArtworkQuantity});var n=r(483134),o=r(724005),i=r.n(o),l=r(293534),c=r(605656),u=r(997252),d=r(18339),p=r(723433),f=r(61466),_=r(556726),h=r(739161),m=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ArtworkQuantity(e){var t=e.index,r=void 0===t?0:t,o=e.artwork,g=void 0===o?null:o,b=e.disabled,y=e.showFreeShipping,v=void 0!==y&&y,w=e.isMultiUpload,j=void 0!==w&&w,k=e.stepNumber,x=e.stepCompleted,S=e.stepTotal,O=_object_without_properties(e,["index","artwork","disabled","showFreeShipping","isMultiUpload","stepNumber","stepCompleted","stepTotal"]),P=(0,c.A)(),A=m.useDtfStore.useValue,C={outOfStock:A("outOfStock"),printAsIs:A("printAsIs"),simulation:A("simulation"),sticker:A("sticker"),isPuff:A("isPuff"),isSpangle:A("isSpangle"),isJerseyNumbers:A("isJerseyNumbers"),isLetters:A("isLetters"),isMobile:A("isMobile"),letterNumberArtwork:A("letterNumberArtwork"),minStickerQuantity:A("minStickerQuantity"),showStepsUI:A("showStepsUI"),variantId:A("variantId"),getArtworksPricing:A("getArtworksPricing"),submitForm:A("submitForm"),updateArtworkValues:A("updateArtworkValues"),updatePdpDates:A("updatePdpDates")},I=_sliced_to_array((0,l.useState)(null),2),E=I[0],N=I[1],D=_sliced_to_array((0,l.useState)({quantity:null}),2),T=D[0],M=D[1];function outOfStock(){return C.outOfStock}function printAsIs(){return C.printAsIs}function simulation(){return C.simulation}function sticker(){return C.sticker}function isSpangle(){return C.isSpangle}function variantId(){return C.variantId}function minStickerQuantity(){return C.minStickerQuantity}function isMobile(){return C.isMobile}function isJerseyNumbers(){return C.isJerseyNumbers}function isLetters(){return C.isLetters}function letterNumberArtwork(){return C.letterNumberArtwork}function showStepsUI(){return C.showStepsUI}function quantity(){return isMobile()?(null==g?void 0:g.quantity)||0:null==g?void 0:g.quantity}function pricing(){return isJerseyNumbers()||isLetters()?letterNumberArtwork():(null==g?void 0:g.isFile)?simulation():(null==g?void 0:g.pricing)||simulation()}function percentage(){var e,t;return(null==(e=pricing())?void 0:e.percentage)?Number(null==(t=pricing())?void 0:t.percentage).toFixed(0):null}function retailPrice(){var e;return(null==(e=pricing())?void 0:e.retailPrice)?Number(pricing().retailPrice).toFixed(2):null}function unitPrice(){var e;return(null==(e=pricing())?void 0:e.unitPrice)?Number(pricing().unitPrice).toFixed(2):null}function id(){return"artwork[".concat(r,"][variants][").concat(variantId(),"][quantity]")}function retailTotal(){return(retailPrice()*quantity()).toFixed(2)}function total(){var e=unitPrice()*quantity();return e>0?e.toFixed(2):null}function isMinQuantityInvalid(){return!!(sticker()||C.isPuff||isSpangle())&&quantity()&&quantity()<minStickerQuantity()}function showShippingProgress(){return!!((isJerseyNumbers()||isLetters())&&quantity())&&!!v||!printAsIs()&&quantity()&&v&&g&&!g.isSimulated&&!g.isLoading}function showBorderUI(){return showStepsUI()&&!j}function updateArtworkValues(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.updateArtworkValues.apply(C,_to_consumable_array(t))}function getArtworksPricing(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.getArtworksPricing.apply(C,_to_consumable_array(t))}function submitForm(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.submitForm.apply(C,_to_consumable_array(t))}function updatePdpDates(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return C.updatePdpDates.apply(C,_to_consumable_array(t))}function allowNumbersOnly(e){var t=e.target.value.replace(/[^0-9]/g,"").replace(/^0/,"");e.target.value=t,updateArtworkValues({index:g.originalIndex,quantity:t})}function handleInput(e){allowNumbersOnly(e),debouncedHandleInputBlur()}function debouncedHandleInputBlur(){clearTimeout(E),N(setTimeout(function(){handleInputBlur()},1e3))}function handleInputBlur(){var e={quantity:quantity()};i()(e,T)||(M(e),getArtworksPricing(),updatePdpDates())}function formatCurrency(e){return null===e?null:P.formatNumber(parseFloat(e),{style:"currency",currency:"USD"})}return(0,l.useEffect)(function(){updatePdpDates()},[showShippingProgress()]),(0,l.useEffect)(function(){return function(){E&&clearTimeout(E)}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},O),{className:(0,u.cn)("artwork-quantity scope-45146366",null==O?void 0:O.className,{"artwork-quantity--with-border":showBorder
1UI(),"artwork-quantity--with-border--invalid":showBorderUI()&&isMinQuantityInvalid()}),children:[printAsIs()||isJerseyNumbers()||isLetters()||showBorderUI()?null:(0,n.jsx)("div",{className:"artwork-quantity__title scope-45146366",children:" Quantity "}),showBorderUI()?(0,n.jsx)(_.A,{className:"scope-45146366",stepNumber:null!=k?k:C.isPuff?4:3,content:h.p.addQuantity,completed:void 0!==x&&x,total:S,"data-testid":"step-number"}):null,(0,n.jsxs)("div",{className:(0,u.cn)("artwork-quantity__row scope-45146366",{"artwork-quantity__row--gang":printAsIs(),"artwork-quantity__row--error":isMinQuantityInvalid()}),children:[(isJerseyNumbers()||isLetters())&&quantity()?(0,n.jsxs)("div",{className:"artwork-quantity__value scope-45146366",children:[(0,n.jsx)("div",{className:"artwork-quantity__label scope-45146366",children:"Quantity"}),(0,n.jsx)("div",{className:"artwork-quantity__jersey-numbers-total scope-45146366",children:quantity()})]}):null,(0,n.jsxs)("div",{className:(0,u.cn)("artwork-quantity__prices scope-45146366",{hidden:printAsIs()||isJerseyNumbers()||isLetters()}),"aria-live":"polite","aria-atomic":"true","data-testid":"artwork-quantity-prices",children:[isJerseyNumbers()||isLetters()?(0,n.jsx)("div",{className:"artwork-quantity__label scope-45146366",children:" Unit Price "}):(null!=retailPrice()||null!=unitPrice())&&(0,n.jsx)("span",{className:"scope-45146366 sr-only",children:"Price per unit"}),(0,n.jsx)("div",{className:"artwork-quantity__retail-price scope-45146366",children:null!=retailPrice()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"scope-45146366 sr-only",children:"was "}),formatCurrency(retailPrice())]})}),(0,n.jsx)("div",{className:"artwork-quantity__actual-price scope-45146366",children:null!=unitPrice()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"scope-45146366 sr-only",children:"now "}),formatCurrency(unitPrice())]})})]}),isJerseyNumbers()||isLetters()?null:(0,n.jsxs)("div",{className:"artwork-quantity__input-wrapper scope-45146366",children:[printAsIs()?(0,n.jsx)("div",{className:"artwork-quantity__title-wrapper scope-45146366",children:(0,n.jsx)("label",{className:"artwork-quantity__title scope-45146366",htmlFor:id(),"data-testid":"artwork-quantity-title",children:"Quantity"})}):null,(0,n.jsx)("input",{className:(0,u.cn)("scope-45146366",{"artwork-quantity__input js-quantity-form-input":!0,"artwork-quantity__input--invalid":isMinQuantityInvalid()}),id:id(),"aria-label":"Quantity",maxLength:"4",type:"tel",name:id(),autoComplete:"off","data-hj-allow":!0,"data-variant-id":variantId(),value:quantity(),disabled:void 0!==b&&b,onInput:handleInput,onBlur:handleInputBlur,onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),submitForm(e))},"data-testid":"artwork-quantity-input"}),outOfStock()?(0,n.jsx)(p.A,{className:"artwork-quantity__icon-cross scope-45146366",icon:"cross",width:"12",height:"12","data-testid":"artwork-quantity-icon-cross"}):null]}),outOfStock()?(0,n.jsx)("span",{className:"artwork-quantity__out-of-stock-notice scope-45146366",children:"Out of stock"}):null,printAsIs()?(0,n.jsxs)("div",{className:"artwork-quantity__total-section scope-45146366",children:[quantity()>0&&total()?(0,n.jsx)("div",{className:"artwork-quantity__total scope-45146366",children:(0,n.jsxs)("div",{className:"artwork-quantity__total-wrapper scope-45146366",children:[retailTotal()!==total()?(0,n.jsx)("div",{className:"artwork-quantity__total-old scope-45146366",children:formatCurrency(retailTotal())}):null,(0,n.jsxs)("div",{className:"artwork-quantity__total-price scope-45146366",children:[(0,n.jsx)("span",{className:"artwork-quantity__total-inline-title scope-45146366",children:"Total:"})," ",formatCurrency(total())]})]})}):null,quantity()>0&&percentage()>0?(0,n.jsxs)("div",{className:"artwork-quantity__off scope-45146366",children:[percentage(),"% off "]}):null]}):null,!printAsIs()&&quantity()>0&&total()?(0,n.jsxs)("div",{className:(0,u.cn)("scope-45146366",{"artwork-quantity__total":!0,"artwork-quantity__total--mobile":isMobile()}),children:[(0,n.jsxs)("div",{className:(0,u.cn)("scope-45146366",{"artwork-quantity__total-title":!isJerseyNumbers()&&!isLetters(),"artwork-quantity__label":isJerseyNumbers()||isLetters()}),children:[" ","Total"," "]}),(0,n.jsxs)("div",{className:"artwork-quantity__total-wrapper scope-45146366",children:[retailTotal()!==total()?(0,n.jsx)("div",{className:"artwork-quantity__total-old scope-45146366",children:formatCurrency(retailTotal())}):null,(0,n.jsx)("div",{className:"artwork-quantity__total-price scope-45146366",children:formatCurrency(total())})]})]}):null,!printAsIs()&&quantity()>0&&percentage()>0?(0,n.jsxs)("div",{className:"artwork-quantity__off scope-45146366",children:[percentage(),"% off "]}
1):null,isMinQuantityInvalid()?(0,n.jsxs)(d.A,{className:"artwork-quantity__error scope-45146366","data-testid":"artwork-quantity-error",children:["Minimum quantity of ",minStickerQuantity()," per design"]}):null,showShippingProgress()?(0,n.jsx)(f.A,{className:"scope-45146366","data-testid":"artwork-shipping-progress"}):null]})]}))}},61466(e,t,r){"use strict";r.d(t,{A:()=>ArtworkShippingProgress});var n=r(483134),o=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ArtworkShippingProgress(e){_object_destructuring_empty(e);var t=_extends({},e);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:"artwork-shipping-progress js-pdp-shipping-progress-bar-wrapper scope-cb614c47",children:[(0,n.jsxs)("div",{className:"artwork-shipping-progress__bar-tile artwork-shipping-progress__bar-tile--complete js-pdp-shipping-progress-bar-complete scope-cb614c47 hidden",children:[(0,n.jsx)("div",{className:"artwork-shipping-progress__bar-icon-wrap scope-cb614c47",children:(0,n.jsx)(o.A,{className:"artwork-shipping-progress__shipping-progress-bar-icon-complete scope-cb614c47",icon:"free-shipping-truck",width:"60",height:"30","data-testid":"artwork-shipping-progress-shipping-progress-bar-icon-complete"})}),(0,n.jsx)("span",{className:"artwork-shipping-progress__bar-text-complete scope-cb614c47",children:"Free Shipping!"})]}),(0,n.jsxs)("div",{className:"artwork-shipping-progress__bar-tile artwork-shipping-progress__bar-tile--shortfall js-pdp-shipping-progress-bar-shortfall scope-cb614c47 hidden",children:[(0,n.jsx)("div",{className:"artwork-shipping-progress__shipping-progress-bar-icon-wrap scope-cb614c47",children:(0,n.jsx)(o.A,{className:"artwork-shipping-progress__bar-icon-delivery scope-cb614c47",icon:"fast-delivery",width:"34",height:"34","data-testid":"artwork-shipping-progress-bar-icon-delivery"})}),(0,n.jsxs)("span",{className:"artwork-shipping-progress__bar-text scope-cb614c47",children:[(0,n.jsx)("span",{className:"artwork-shipping-progress__bar-total js-pdp-shipping-progress-bar-amount scope-cb614c47"})," ","from free shipping"," "]}),(0,n.jsxs)("div",{className:"progress-bar artwork-shipping-progress__shipping-progress-bar js-pdp-shipping-progress-bar scope-cb614c47","data-currency-sign":"$",children:[(0,n.jsxs)("span",{className:"scope-cb614c47",children:["$","0"]}),(0,n.jsx)("div",{className:"progress-bar__line-wrap scope-cb614c47",children:(0,n.jsx)("div",{className:"progress-bar__line js-pdp-shipping-progress-bar-line scope-cb614c47"})}),(0,n.jsx)("span",{className:"js-pdp-shipping-progress-bar-threshold scope-cb614c47"})]})]})]}))}},217262(e,t,r){"use strict";r.d(t,{A:()=>BogoInfo});var n=r(483134),o=r(293534),i=r(433769),l=r(927997);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function BogoInfo(e){var t=e.reason,r=e.isGuest,c=e.maxFreeDimensionLabel,u=void 0===c?'12"x12"':c,d=_object_without_properties(e,["reason","isGuest","maxFreeDimensionLabel"]),p=(0,o.useRef)(null);function trackSignupClick(){(0,i.track)("click_discount_signup_link",{current_page:"DTF001"})}function headerTitle(){return"Get your blanks from us, and get your transfers 50% off."}function blanksImageUrl(){return(0,l.lt)("gen/bogo-transfers/blanks-g300.jpg",{w:190,fit:"clip",q:80})}function transfersImageUrl(){return(0,l.lt)("gen/bogo-transfers/colored-sticker-full.png",{w:324,f
1it:"clip",q:80})}return(0,o.useEffect)(function(){var e=null;return p.current&&(e=(0,i.createPromoViewObserver)(p.current,"transfers_pdp",{promoShown:"bogo banner"})),function(){null==e||e.disconnect()}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({ref:p},d),{className:"mb-3.5 overflow-hidden rounded bg-gray-100","data-testid":"bogo-info",children:[(0,n.jsx)("div",{className:"bg-[#3D65F5] px-2 py-3.5 lg:px-3.5","data-testid":"bogo-info-header",children:(0,n.jsx)("h3",{className:"font-inter m-0 text-xs font-bold leading-[1.15] text-white lg:text-base","data-testid":"bogo-info-header-title",children:headerTitle()})}),(0,n.jsx)("div",{className:"rounded-b border-[1.5px] bg-gray-100 p-2 lg:p-3","data-testid":"bogo-info-content",children:(0,n.jsxs)("div",{className:"rounded bg-white p-2 pt-3.5 lg:p-1",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-1.5 lg:flex-row-reverse lg:items-start lg:gap-2 xl:gap-4","data-testid":"bogo-info-product-section",children:[(0,n.jsxs)("div",{className:"relative flex flex-shrink-0 items-center justify-center gap-7 lg:gap-1.5","data-testid":"bogo-info-cards",children:[(0,n.jsxs)("figure",{className:"m-0! flex! relative h-[126px] w-[104px] flex-col items-center rounded border-[1.5px] border-gray-100 bg-white pt-0.5 text-center lg:h-[150px] lg:w-[124px] lg:border-[3px] lg:pt-1 xl:h-[163px] xl:w-[134px] xl:pt-0.5","data-testid":"bogo-info-blanks-card",children:[(0,n.jsx)("img",{className:"h-[96px] w-auto object-contain lg:h-[108px] xl:h-[118px]",src:blanksImageUrl(),alt:"Blank t-shirt",loading:"lazy","data-testid":"bogo-info-blanks-image"}),(0,n.jsxs)("figcaption",{className:"absolute bottom-0.5 left-0 right-0 text-[9px] font-bold leading-[2] text-gray-700 lg:bottom-1 lg:text-[13px] xl:text-sm","data-testid":"bogo-info-blanks-caption",children:[" ","Buy Blanks"," "]})]}),(0,n.jsxs)("div",{className:"z-10 -mx-[23px] flex h-[30px] w-[30px] flex-shrink-0 items-center justify-center rounded-full bg-gray-900 text-xl font-bold text-white lg:h-[38px] lg:w-[38px] lg:text-2xl xl:h-[42px] xl:w-[42px] xl:text-[28px]","data-testid":"bogo-info-plus-sign",children:[" ","+"," "]}),(0,n.jsxs)("figure",{className:"m-0! flex! relative h-[126px] w-[104px] flex-col items-center rounded border-[1.5px] border-white bg-[#B5DEFF]/50 pt-1.5 text-center lg:h-[150px] lg:w-[124px] lg:border-[3px] lg:pt-2 xl:h-[163px] xl:w-[134px] xl:pt-2.5","data-testid":"bogo-info-transfers-card",children:[(0,n.jsx)("img",{className:"h-[92px] w-auto object-contain lg:h-[104px] xl:h-[112px]",src:transfersImageUrl(),alt:"Transfer design mockup",loading:"lazy","data-testid":"bogo-info-transfers-image"}),(0,n.jsxs)("figcaption",{className:"absolute bottom-0.5 left-0 right-0 text-[9px] font-bold leading-[2] text-gray-700 lg:bottom-1 lg:text-[13px] xl:text-sm","data-testid":"bogo-info-transfers-caption",children:[" ","Get Transfers 50% OFF"," "]})]})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col justify-start text-center lg:pl-2 lg:pt-2.5 lg:text-left xl:pl-3 xl:pt-2","data-testid":"bogo-info-description",children:[(0,n.jsxs)("h4",{className:"m-0 mb-1 text-base font-bold leading-6 text-gray-700 lg:text-sm lg:leading-relaxed xl:mb-0 xl:text-lg","data-testid":"bogo-info-how-it-works-title",children:[" ","How it works"," "]}),(0,n.jsxs)("p",{className:"mb-2.5! lg:mb-7! xl:mb-6! px-6 text-[13px] leading-[1.4] text-gray-700 lg:px-0 lg:text-sm lg:leading-[1.86] xl:text-base xl:leading-relaxed","data-testid":"bogo-info-how-it-works-text",children:[" ","For every blank you add, get a"," ","any size"===u?(0,n.jsx)(n.Fragment,{children:" standard transfer of any size "}):(0,n.jsxs)(n.Fragment,{children:[" standard transfer ",u," or smaller "]}),(0,n.jsx)("strong",{children:"50% OFF!"})]})]})]}),void 0!==r&&r?(0,n.jsxs)("p",{className:"mb-0! mt-2! lg:mb-1! text-center text-xs leading-relaxed text-gray-600","data-testid":"bogo-info-disclaimer",children:[" ","*First-purchase offer, limit one per household."," ",(0,n.jsxs)("a",{className:"underline",href:"/signup","data-testid":"bogo-info-signup-link",onClick:trackSignupClick,children:[" ","Create an account"," "]})," ","to redeem at checkout."," "]}):null]})})]}))}},379658(e,t,r){"use strict";r.d(t,{A:()=>ColorPicker});var n=r(483134),o=r(293534),i=r(490770),l=r(723433),c=r(997252),u=r(444636),d=r(467265),p=r(958469),f=r(404773);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ColorPicker(e){var t,r=e.colors,_=e.value,h=e.showColorLabel,m=void 0!==h&&h,g=e.variant,b=void 0===g?null:g,y=e.size,v=void 0===y?"large":y,w=e.modalPosition,j=void 0===w?void 0:w,k=e.renderModal,x=void 0===k?void 0:k,S=e.onChange,O=e.slots,P=_object_without_properties(e,["colors","value","showColorLabel","variant","size","modalPosition","renderModal","onChange","slots"]),A=(0,o.useRef)(null),C=(0,f.nx)(A,x),I=C.modalRef,E=C.modalNode,N=C.attachModal;(0,f.kS)(E,x);var D=_sliced_to_array((0,o.useState)(_||r[0]),2),T=D[0],M=D[1],R=_sliced_to_array((0,o.useState)(!1),2),F=R[0],L=R[1],B=_sliced_to_array((0,o.useState)(null),2),z=B[0],U=B[1];function isInline(){return"inline"===b}function prepareColors(){return r.map(function(e){return(void 0===e?"undefined":_type_of(e))==="object"?e:{value:e,name:e}})}function colorValues(){return prepareColors().map(function(e){return e.value})}function selectedColorValue(){return"string"==typeof T?T:(null==T?void 0:T.hex)||null}function isCustom(){return null!==selectedColorValue()&&!colorValues().includes(selectedColorValue())}function disableApply(){return!(null==T?void 0:T.hex)}function handleClose(){isInline()||L(!1)}function trackColorSelection(e,t){if(e&&z!==e){var r=prepareColors().find(function(t){return t.value===e});(0,d.Py)("dtf_image_placement_color_selected",{trigger:t,variant:b||null,size:v,show_color_label:m,color_value:e,color_name:(null==r?void 0:r.name)||null,is_custom_color:!colorValues().includes(e)}),U(e)}}function handleSelect(e){isInline()?M("string"==typeof e?{hex:e}:e):(null==S||S(e),trackColorSelection(e,"swatch"),handleClose())}function handleOpen(){isInline()||L(!0)}function handleApply(){handleSelect(T.hex)}function isCustomSelected(e){return isCustom()&&selectedColorValue()===e}(0,o.useEffect)(function(){null!=_&&M(_)},[_]);var H="string"==typeof T?T:null==T?void 0:T.hex;return(0,o.useEffect)(function(){isInline()&&(null==S||S(H),trackColorSelection(H,"inline_picker"))},[H]),(0,f.CM)(A,I,handleClose),(0,n.jsxs)("div",_object_spread_props(_object_spread({ref:A}
1,P),{className:(0,c.cn)(null==P?void 0:P.className,{"color-picker":!0,"color-picker--inline":isInline(),"color-picker--with-names":m}),children:[(0,n.jsxs)("div",{className:"color-picker__items",children:[(0,p.p)(prepareColors(),function(e){return(0,n.jsxs)("button",{className:(0,c.cn)("color-picker__item color-picker__item--".concat(v),e.value===selectedColorValue()&&"color-picker__item--selected"),type:"button",style:{backgroundColor:e.value},onClick:function(t){t.preventDefault(),handleSelect(e.value)},"data-testid":"color-picker-button",children:[m?(0,n.jsx)("div",{className:"color-picker__color-name",children:e.name}):null,e.value===selectedColorValue()?(0,n.jsx)(l.A,{className:"color-picker__checkbox",icon:"checkbox",style:(0,u.OB)(e.value),"data-testid":"color-picker-checkbox"}):null]},e.value)}),(0,n.jsxs)("button",{className:(0,c.cn)("color-picker__item color-picker__item--custom color-picker__item--".concat(v),isCustomSelected(_)&&"color-picker__item--selected"),type:"button",onClick:function(e){e.preventDefault(),handleOpen()},"data-testid":"color-picker-button-1",children:[(0,n.jsx)(l.A,{className:"color-picker__icon",icon:"custom-color","data-testid":"color-picker-icon"}),isCustomSelected(_)?(0,n.jsx)(l.A,{className:"color-picker__checkbox",icon:"checkbox","data-testid":"color-picker-checkbox-1"}):null]})]}),isInline()?(0,n.jsx)(i.xk,{className:"color-picker__selector",color:"string"==typeof T?T:null==T?void 0:T.hex,onChange:function(e){M(e)},disableAlpha:!0,"data-testid":"color-picker-selector"}):F?renderModalSubtree(x,(0,n.jsxs)("div",{ref:N,tabIndex:x?-1:void 0,className:(0,c.cn)("color-picker__modal",x&&"color-picker__modal--anchored",j&&"color-picker__modal--".concat(j)),children:[(0,n.jsx)("div",{className:"color-picker__backdrop",onClick:function(e){e.preventDefault(),handleClose()},"data-testid":"color-picker-backdrop"}),(0,n.jsxs)("div",{className:"color-picker__content",children:[(0,n.jsxs)("div",{className:"color-picker__header",children:[" ","Select custom color"," ",(0,n.jsx)(l.A,{className:"color-picker__close",icon:"menu-close",onClick:function(e){e.preventDefault(),handleClose()},"data-testid":"color-picker-close"})]}),null==O||null==(t=O["picker-preview"])?void 0:t.call(O,{color:T}),(0,n.jsx)(i.xk,{className:"color-picker__selector",color:"string"==typeof T?T:null==T?void 0:T.hex,onChange:function(e){M(e)},disableAlpha:!0,"data-testid":"color-picker-selector-1"}),(0,n.jsxs)("div",{className:"color-picker__actions",children:[(0,n.jsxs)("button",{className:"color-picker__cancel",type:"button",onClick:function(e){e.preventDefault(),handleClose()},"data-testid":"color-picker-cancel",children:[" ","Cancel"," "]}),(0,n.jsxs)("button",{className:(0,c.cn)("color-picker__apply",disableApply()&&"color-picker__apply--disabled"),type:"button",disabled:disableApply(),onClick:function(e){e.preventDefault(),handleApply()},"data-testid":"color-picker-button-2",children:[" ","Apply color"," "]})]})]})]})):null]}))}function renderModalSubtree(e,t){return e?e(t):t}},372725(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(723433),l=r(821771),c=r(538896),u=r(997252),d=r(927937),p=r(747905),f=r(423260),_=r(34995),h=r(809646);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var useSlotShowsWindow=function(e,t){var r=_sliced_to_array((0,o.useState)(!1),2),n=r[0],i=r[1];return(0,o.useEffect)(function(){var r=e.current;if(t&&r){var sync=function(){return i(r.childElementCount>0)};sync();var n=new MutationObserver(sync);return n.observe(r,{childList:!0}),function(){return n.disconnect()}}},[e,t]),n};function UpsellTierRow(e){var t=e.jiffyFirstSlot;return(0,n.jsxs)("div",{className:"product-details-delivery-date-simple-transfers__delivery product-details-delivery-date-simple-transfers__delivery--upsell js-pdp-upsell-tier-row hidden",children:[(0,n.jsx)("span",{className:"product-details-delivery-date-simple-transfers__j1-position--upsell","data-j1-tier-position":"upsell","data-testid":"transfers-pdp-j1-position-upsell",children:null==t?void 0:t()}),(0,n.jsxs)("span",{className:"product-details-delivery-date-simple-transfers__delivery-date-label product-details-delivery-date-simple-transfers__delivery-date-label--upsell",children:["Or get it by"," ",(0,n.jsx)("b",{className:"js-pdp-upsell-tier-date product-details-delivery-date-simple-transfers__upsell-date"}),(0,n.jsx)("span",{className:"js-pdp-upsell-tier-note"})]})]})}let __rspack_default_export=function(e){var t,r,m,g=e.hideAddressLine,b=(e.isSameDay,e.compact),y=void 0!==b&&b,v=e.slots,w=e.id,j=e.jiffyFirstSlot,k=_object_without_properties(e,["hideAddressLine","isSameDay","compact","slots","id","jiffyFirstSlot"]),x=(0,c.useDtfStore)();function isDtfSheet(){return x.isDtfSheet}function productSlug(){return x.productSlug}(0,o.useEffect)(function(){j&&((0,p.BM)(),(0,f.B)())},[j]);var S=_sliced_to_array((0,o.useState)(!1),2),O=S[0],P=S[1],A=_sliced_to_array((0,o.useState)(null),2),C=A[0],I=A[1];(0,o.useEffect)(function(){return(0,h.vS)(I)},[]),(0,o.useEffect)(function(){(0,f.B)()},[O,C]);var E=x.catalogNumber,N="string"==typeof E?E.toUpperCase():null,D=null!==N&&_.o.includes(N),T=D||null!==N&&_.B.includes(N),M=(0,o.useRef)(null),R=useSlotShowsWindow(M,D),F=D?R:(0,h.Zo)(C);return(0,o.useEffect)(function(){if(!T)return void P(!1);var e=!0,resolve=function(){try{(0,d.Cp)().then(function(t){e&&P(!0===t)}).catch(function(){e&&P(!1)})}catch(t){e&&P(!1)}};resolve();var t=(0,d.ZV)(function(t,r){e&&(P((null==t?void 0:t.dallas)===!0),r&&resolve())});return function(){e=!1,t()}},[T]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},k),{className:(0,u.cn)("product-details-delivery-date-simple-transfers",null==k?void 0:k.className,y&&"product-details-delivery-date-simple-transfers--compact"),id:void 0===w?"js-product-details-delivery-dates-simple-container":w,"data-product-id":productSlug(),"data-selected-color":"Transfer","data-is-dtf":isDtfSheet(),"data-enabled-shipping-enhancement-services":!1,"data-assignable":"true",children:[(0,n.jsxs)("div",{className:"product-details-delivery-date-simple-transfers__loading js-product-details-delivery-dates-simple-spinner",children:[(0,n.jsxs)("span",{className:"product-details-delivery-date-simple-transfers__loading-text",children:[" ","Getting Earliest Delivery Date"," "]}
1),null==v||null==(t=v.dates)?void 0:t.call(v)]}),(0,n.jsxs)("div",{className:"product-details-delivery-date-simple-transfers__wrapper js-product-details-delivery-dates-simple-wrapper hidden",children:[(0,n.jsxs)("div",{className:"product-details-delivery-date-simple-transfers__body",children:[O&&F&&(0,n.jsx)("div",{className:"product-details-delivery-date-simple-transfers__same-day-eyebrow js-jiffy-local-badge","data-testid":"transfers-pdp-same-day-eyebrow",role:"button",tabIndex:0,"aria-describedby":"jiffy-local-popup-content","aria-label":"Jiffy Local",children:(0,n.jsx)(l.g,{programme:"local",size:"pdp",surface:"on-dark",decorative:!0,className:"product-details-delivery-date-simple-transfers__same-day-mark"})}),(0,n.jsx)("div",{"data-j1-tier-position":"headline","data-testid":"transfers-pdp-j1-position-headline",children:null==j?void 0:j()}),T&&(0,n.jsx)("div",{ref:M,className:"product-details-delivery-date-simple-transfers__same-day-slot js-pdp-same-day-window","data-testid":"transfers-pdp-same-day-slot"}),(0,n.jsxs)("div",{className:"product-details-delivery-date-simple-transfers__delivery js-product-details-delivery-dates-simple-shipment",children:[y?(0,n.jsx)(i.A,{className:"product-details-delivery-date-simple-transfers__delivery-icon product-details-delivery-date-simple-transfers__delivery-icon--lightning",icon:"lightning-1","data-testid":"product-details-delivery-date-simple-transfers-delivery-icon"}):(0,n.jsx)(i.A,{className:"product-details-delivery-date-simple-transfers__delivery-icon product-details-delivery-date-simple-transfers__delivery-icon--box",icon:"box-jiffy-check","data-testid":"product-details-delivery-date-simple-transfers-delivery-icon-1"}),(0,n.jsxs)("span",{className:"product-details-delivery-date-simple-transfers__delivery-date-label",children:[" ","Get it by"," ",(0,n.jsx)("span",{className:"js-product-details-delivery-dates-simple-direct-value js-pdp-headline-tier-date product-details-delivery-date-simple-transfers__delivery-date-value"})]}),y?(0,n.jsx)(i.A,{className:"product-details-delivery-date-simple-transfers__delivery-icon product-details-delivery-date-simple-transfers__delivery-icon--lightning-end",icon:"lightning-1","data-testid":"product-details-delivery-date-simple-transfers-delivery-icon-2"}):null]}),(0,n.jsxs)("div",_object_spread_props(_object_spread({className:"product-details-delivery-date-simple-transfers__cutoff js-product-details-delivery-dates-simple-cutoff-wrapper"},"u">typeof window&&(null==(m=window.jiffy)||null==(r=m.flip)?void 0:r.deliveryCountdownPdp)?{"data-cutoff-react-mount":""}:{}),{children:[" ","Order by"," ",(0,n.jsxs)("b",{className:"js-product-details-delivery-dates-cutoff product-details-delivery-date-simple-transfers__cutoff-date",children:[" ","..."," "]}),(0,n.jsx)("span",{className:"js-expedite-shipping-note"})]})),(0,n.jsx)(UpsellTierRow,{jiffyFirstSlot:j})]}),void 0!==g&&g?null:(0,n.jsxs)("button",{className:"product-details-delivery-date-simple-transfers__change-location-button js-deliver-to-toggle-modal",type:"button","data-mixpanel-context":"product_detail","data-testid":"product-details-delivery-date-simple-transfers-change-location-button",children:[(0,n.jsx)(i.A,{className:"product-details-delivery-date-simple-transfers__change-location-button-icon",icon:"marker-pin","data-testid":"product-details-delivery-date-simple-transfers-change-location-button-icon"}),(0,n.jsxs)("span",{className:"product-details-delivery-date-simple-transfers__deliver-to-message js-deliver-to-pdp-addr",children:[" ","Select Your Address"," "]})]})]})]}))}},112281(e,t,r){"use strict";r.d(t,{A:()=>DesignServicePromo});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function DesignServicePromo(e){var t=e.onDesignServiceClicked,r=_object_without_properties(e,["onDesignServiceClicked"]);function handleDesignServiceClick(e){null==t||t()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("design-service-promo scope-812a63cf",r.className),children:(0,n.jsxs)("span",{className:"design-service-promo__text scope-812a63cf",children:[" ","Need edits? Use our ",(0,n.jsx)("strong",{className:"scope-812a63cf",children:"FREE"})," ",(0,n.jsx)("a",{className:"design-service-promo__link scope-812a63cf",href:"#",onClick:function(e){e.preventDefault(),handleDesignServiceClick(e)},"data-testid":"design-service-promo-link",children:(0,n.jsx)("strong",{className:"scope-812a63cf",children:"design service!"})})]})}))}},957656(e,t,r){"use strict";r.d(t,{A:()=>DesignTagCreationPanel});var n=r(483134),o=r(997252),i=r(723433),l=r(927997),c=r(888043);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function DesignTagCreationPanel(e){_object_destructuring_empty(e);var t=_extends({},e);function backgroundImageStyle(){var e=(0,l.lt)("gen/neck-label-start-design-zone.png",{ixlib:"rb-0.3.5",w:550,dpr:2});return{backgroundImage:'url("'.concat(e,'")'),backgroundSize:"cover"}}function trackNeckLabelStartDesign(){(0,c.Mk)({location:"pdp"})}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("relative flex h-96 items-center justify-center rounded-lg border border-gray-300 bg-gray-200 bg-center bg-no-repeat"),style:backgroundImageStyle(),children:(0,n.jsx)("div",{className:(0,o.cn)("neck-label-builder mx-auto max-w-sm rounded-lg bg-blue-50/80 p-2"),children:(0,n.jsxs)("div",{className:(0,o.cn)("rounded-lg border-2 border-dashed border-blue-300 p-4"),children:[(0,n.jsx)("div",{className:(0,o.cn)("mb-2"),children:(0,n.jsx)("a",{className:(0,o.cn)("inline-block w-full cursor-pointer rounded-lg !bg-[#2563eb] px-4 py-3 text-center text-white !no-underline transition-colors duration-200 ease-in-out hover:!bg-[#1d4ed8] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"),href:"/design-tag","data-testid":"build-your-neck-label-button",onClick:trackNeckLabelStartDesign,children:(0,n.jsx)("span",{className:(0,o.cn)("text-base font-semibold text-white"),children:"Build Your Neck Label"})})}),(0,n.jsxs)("div",{className:(0,o.cn)("mb-2 flex items-center justify-center"),children:[(0,n.jsx)("div",{className:(0,o.cn)("h-px flex-1 bg-blue-400")}),(0,n.jsx)("div",{className:(0,o.cn)("px-4 text-base font-bold text-gray-900"),children:"2XL"}),(0,n.jsx)("div",{className:(0,o.cn)("h-px flex-1 bg-blue-400")})]}),(0,n.jsxs)("div",{className:(0,o.cn)("mb-2 space-y-1 text-center text-gray-800"),children:[(0,n.jsx)("div",{className:(0,o.cn)("m-0 text-xs font-semibold"),children:"70% COTTON"}),(0,n.jsx)("div",{className:(0,o.cn)("m-0 text-xs font-semibold"),children:"30% POLYESTER"})]}),(0,n.jsx)("span",{className:(0,o.cn)("my-3 flex h-px bg-blue-400")}),(0,n.jsxs)("div",{className:(0,o.cn)("flex items-center justify-center space-x-3"),children:[(0,n.jsx)("div",{className:(0,o.cn)("h-8 w-8"),children:(0,n.jsx)(i.A,{className:(0,o.cn)("h-full w-full text-gray-700"),icon:"do-not-iron",type:"neck_labels","data-testid":"h-full"})}),(0,n.jsx)("div",{className:(0,o.cn)("h-8 w-8"),children:(0,n.jsx)(i.A,{className:(0,o.cn)("h-full w-full text-gray-700"),icon:"do-not-wash",type:"neck_labels","data-testid":"h-full-1"})}),(0,n.jsx)("div",{className:(0,o.cn)("h-8 w-8"),children:(0,n.jsx)(i.A,{className:(0,o.cn)("h-full w-full text-gray-700"),icon:"chlorine-bleach",type:"neck_labels","data-testid":"h-full-2"})}),(0,n.jsx)("div",{className:(0,o.cn)("h-8 w-8"),children:(0,n.jsx)(i.A,{className:(0,o.cn)("h-full w-full text-gray-700"),icon:"do-not-bleach",type:"neck_labels","data-testid":"h-full-3"})})]})]})})}))}},405033(e,t,r){"use strict";r.d(t,{A:()=>DoneOrAddFork});var n=r(483134),o=r(997252),i=r(467265),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function DoneOrAddFork(e){var t=e.onAddAnother,r=e.className,c=_object_without_properties(e,["onAddAnother","className"]),u=(0,l.useDtfStore)();function pdpType(){return u.pdpType}function businessLine(){return u.businessLine}function eventPayload(){return{page:"pdp",pdp_type:pdpType(),business_line:businessLine()}}function onPrimary(){(0,i.Py)("transfer_done_fork_primary_clicked",eventPayload());
1var e=document.getElementById("dtf-add-to-cart-anchor");if(e){var t=e.querySelector(".dtf-add-to-cart__button");(null!=t?t:e).focus({preventScroll:!0}),e.scrollIntoView({behavior:"smooth",block:"center"})}}function onSecondary(){(0,i.Py)("transfer_done_fork_secondary_clicked",eventPayload()),(0,i.Py)("transfer_choose_file_clicked",eventPayload()),null==t||t()}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},c),{className:(0,o.cn)("dtf-fork scope-dec23a3a",r),children:[(0,n.jsx)("button",{type:"button",className:"dtf-fork__primary button button--primary button--lg scope-dec23a3a","aria-label":"Done with my designs — scroll to review and add to cart",onClick:onPrimary,"data-testid":"dtf-fork-primary",children:"Done — review order →"}),(0,n.jsx)("button",{type:"button",className:"dtf-fork__secondary button button--outline button--lg scope-dec23a3a","aria-label":"Add another design — opens file picker",onClick:onSecondary,"data-testid":"dtf-fork-secondary",children:"+ Add another design"})]}))}},854440(e,t,r){"use strict";r.d(t,{A:()=>DropZone});var n=r(483134),o=r(293534),i=r(997252),l=r(467265),c=r(538896),u=r(127391),d=r(2605);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DropZone(e){_object_destructuring_empty(e);var t=_extends({},e),r=c.useDtfStore.store,p=u.o3.store,f=_sliced_to_array((0,o.useState)(!1),2),_=f[0],h=f[1],m=(0,o.useRef)(null);function artworks(){return r.artworks}
1function isSpangle(){return r.isSpangle}function isPuff(){return r.isPuff}function isStickerSample(){return r.isStickerSample}function spanglesMaxImageCount(){return p.spanglesMaxImageCount}function replaceArtwork(){return r.replaceArtwork}function addFilesToQueue(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.addFilesToQueue.apply(r,_to_consumable_array(t))}function removeAllErrorArtworks(){return r.removeAllErrorArtworks()}function setReplaceArtwork(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setReplaceArtwork.apply(r,_to_consumable_array(t))}return(0,o.useEffect)(function(){function handleDrop(e){if(e.preventDefault(),h(!1),!(0,d.CI)(r)){var t=e.dataTransfer.files,n=artworks().filter(function(e){return!e.isSimulated}),o=null;(0,l.Py)("file_drop_detected",{file_count:t.length}),t.length>10||isSpangle()&&t.length>spanglesMaxImageCount()||(isPuff()||isStickerSample())&&(n.length>0||t.length>1)||(t.length<=1&&replaceArtwork()?o=0:removeAllErrorArtworks(),addFilesToQueue({files:t,isDropEvent:!0,artworkIndex:o}),setReplaceArtwork(!1))}}function hideDropzone(e){e.preventDefault(),h(!1)}function showDropzone(e){e.preventDefault(),(0,d.CI)(r)||h(!0)}return window.addEventListener("dragenter",showDropzone),window.addEventListener("dragover",showDropzone),window.addEventListener("drop",handleDrop),window.addEventListener("dragleave",hideDropzone),function(){window.removeEventListener("dragenter",showDropzone),window.removeEventListener("dragover",showDropzone),window.removeEventListener("drop",handleDrop),window.removeEventListener("dragleave",hideDropzone)}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("dropzone scope-b4d4a469",!_&&"hidden",null==t?void 0:t.className),ref:m,children:(0,n.jsxs)("div",{className:"dropzone__inner scope-b4d4a469",children:[" ","Drag and Drop ",(0,n.jsx)("br",{className:"scope-b4d4a469"})," Your Files Anywhere"," "]})}))}},932131(e,t,r){"use strict";r.d(t,{A:()=>DtfAddToCart});var n=r(483134),o=r(293534),i=r(997252),l=r(467265),c=r(153035),u=r(960783),d=r(739161),p=r(538896),f=r(127391);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var _="missing-step-target--pulse";function scrollToAnchor(e){if(!("u"<typeof document)){var t=document.querySelector(e);if(_instanceof(t,HTMLElement)){var r=t.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-72),behavior:"smooth"}),t.classList.remove(_),window.requestAnimationFrame(function(){t.classList.add(_),window.setTimeout(function(){return t.classList.remove(_)},1500)})}}}function DtfAddToCart(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,p.useDtfStore)(),_=(0,f.o3)(),h=(0,d.L)(),m=(0,o.useRef)(!1);function isReadyForOrder(){return r.isReadyForOrder}function isSpangle(){return r.isSpangle}function removeBgLoading(){return r.removeBgLoading}function spangleSizeEditing(){return _.spangleSizeEditing}function spanglesLoading(){return _.spanglesLoading}function spangleSizeEdited(){return _.spangleSizeEdited}function invalidSpangleSelected(){return _.invalidSpangleSelected}function allAPIsCompleted(){return _.allAPIsCompleted}function backgroundProcessesLoading(){return removeBgLoading()}function disableOrderButton(){return!!backgroundProcessesLoading()||!!r.isSubmitting||!!r.hasArtworkEnhancementTimedOut||(isSpangle()?!isReadyForOrder()||spangleSizeEditing()||spanglesLoading()||!allAPIsCompleted()||!spangleSizeEdited()||invalidSpangleSelected():!isReadyForOrder())}function spangleErrorObject(){return{errorMessage:"Please finish editing the size of the artwork before adding it to cart."}}function submitForm(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.submitForm.apply(r,_to_consumable_array(t))}function onMousedown(){m.current=!1,submitForm(),m.current=!0}function onClick(){if(m.current){m.current=!1;return}submitForm()}var g=(0,o.useRef)(disableOrderButton());return(0,o.useEffect)(function(){var e=disableOrderButton();g.current&&!e&&(0,l.Py)("add_to_cart_button_enabled",{}),e&&(m.current=!1),g.current=e},[disableOrderButton()]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("dtf-add-to-cart scope-c944b75f",null==t?void 0:t.className),children:[h.missingStep?(0,n.jsx)(u.A,{step:h.missingStep,onJump:scrollToAnchor}):null,(0,n.jsxs)("div",{className:"dtf-add-to-cart__submit-wrap scope-c944b75f","data-testid":"product-details-dtf-sheet-add-to-cart",children:[(0,n.jsx)("span",{role:"status","aria-live":"polite",className:"scope-c944b75f sr-only","data-testid":"dtf-add-to-cart-status",children:r.isSubmitting?"Adding to cart...":""}),(0,n.jsx)("button",{className:(0,i.cn)("dtf-add-to-cart__button scope-c944b75f",{"is-submitting":r.isSubmitting}),type:"button",disabled:disableOrderButton(),"data-testid":"dtf-add-to-cart-button","aria-busy":!!r.isSubmitting||void 0,onMouseDown:function(e){0===e.button&&onMousedown()},onClick:onClick,children:r.isSubmitting?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"dtf-add-to-cart__spinner scope-c944b75f","data-testid":"dtf-add-to-cart-spinner","aria-hidden":"true"})," ","Adding..."," "]}):(0,n.jsx)(n.Fragment,{children:" Add To Cart "})})]}),spangleSizeEditing()?(0,n.jsx)(c.A,{className:"scope-c944b75f",artwork:spangleErrorObject(),"data-testid":"artwork-error"}):null]}))}},27037(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(650574),l=r(723433);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){e.children;var t,r,c,u,d,p=e.slots,f=e.onClose,_=e.onSubmit,h=e.closeOnSubmit,m=void 0===h||h,g=e.pending,b=void 0!==g&&g,y=e.staticBackdrop,v=void 0!==y&&y,w=_object_without_properties(e,["children","slots","onClose","onSubmit","closeOnSubmit","pending","staticBackdrop"]),j=_sliced_to_array((0,o.useState)(!1),2),k=(j[0],j[1]),x=(0,o.useRef)(!1),S=(0,o.useRef)(null),O=(0,o.useRef)(f);O.current=f;var P=(0,o.useRef)(b);function hasSubmit(){return null==p?void 0:p.button}function handleClose(){b||(x.current=!0,k(!0),$(S.current).modal("hide"),null==f||f())}function handleSubmit(){b||(m&&(x.current=!0,k(!0),$(S.current).modal("hide")),null==_||_())}
1function handleShow(){var e=$(S.current);(v?e.modal({backdrop:"static",keyboard:!1}):e.modal("show")).on("hidden.bs.modal",function(){if(!P.current&&(e.off("hidden.bs.modal"),!x.current)){var t;null==(t=O.current)||t.call(O)}})}return P.current=b,(0,o.useEffect)(function(){return handleShow(),(0,i.Ay)(!0),function(){var e,t=$(S.current);t.off("hide.bs.modal hidden.bs.modal"),t.modal("dispose"),null==(e=document.querySelector(".modal-backdrop:last-of-type"))||e.remove(),document.querySelector(".modal.show")||document.body.classList.remove("modal-open")}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},w),{className:"modal dtf-confirmation-modal scope-cfd4d835",ref:S,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",{className:"dtf-confirmation-modal__modal-box modal-dialog scope-cfd4d835",children:[(0,n.jsxs)("div",{className:"dtf-confirmation-modal__modal-header scope-cfd4d835",role:"heading","aria-label":"Confirm action",tabIndex:"0","data-testid":"dtf-confirmation-modal-modal-header",children:[(0,n.jsx)("h3",{className:"dtf-confirmation-modal__modal-title scope-cfd4d835",children:null==p||null==(r=p.header)?void 0:r.call(p)}),(0,n.jsx)("button",{className:"dtf-confirmation-modal__modal-button-close scope-cfd4d835",type:"button",onClick:handleClose,disabled:b,"data-testid":"dtf-confirmation-modal-modal-button-close",children:(0,n.jsx)(l.A,{className:"scope-cfd4d835",icon:"modal-close-big","data-testid":"use-svg"})})]}),(0,n.jsxs)("div",{className:"dtf-confirmation-modal__modal-body scope-cfd4d835",children:[(0,n.jsx)("div",{className:"dtf-confirmation-modal__text scope-cfd4d835",children:null==p||null==(c=p.text)?void 0:c.call(p)}),(0,n.jsxs)("div",{className:"dtf-confirmation-modal__actions scope-cfd4d835",children:[hasSubmit()?(0,n.jsx)("button",{className:"dtf-confirmation-modal__submit scope-cfd4d835",type:"button",onClick:handleSubmit,disabled:b,"data-testid":"dtf-confirmation-modal-submit",children:null==p||null==(u=p.button)?void 0:u.call(p)}):null,(0,n.jsx)("button",{className:"dtf-confirmation-modal__cancel scope-cfd4d835",type:"button",onClick:handleClose,disabled:b,"data-testid":"dtf-confirmation-modal-cancel",children:null!=(t=null==p||null==(d=p.cancel)?void 0:d.call(p))?t:(0,n.jsx)(n.Fragment,{children:"Cancel"})})]})]})]})}))}},913261(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(147141),i=r(27037);let __rspack_default_export=function(e){var t=e.onClose;function handleClose(){null==t||t()}function handleContactSupport(){(0,o.SE)("/contact")}return(0,n.jsx)(i.A,{className:"dtf-enhancement-timeout-modal",onClose:handleClose,onSubmit:handleContactSupport,slots:{header:function(){return(0,n.jsx)("span",{"data-testid":"dtf-enhancement-timeout-modal",children:"We couldn't finish enhancing this image"})},text:function(){return(0,n.jsx)("p",{children:"Please try uploading again, or contact support."})},button:function(){return(0,n.jsx)("span",{"data-testid":"dtf-enhancement-timeout-contact-support",children:"Contact support"})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"Close"})}}})}},259703(e,t,r){"use strict";r.d(t,{A:()=>DtfProgressBar});var n=r(483134),o=r(293534),i=r(997252),l=r(338908),c=r(723433),u=r(705472),d=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DtfProgressBar(e){var t=e.artwork,r=void 0===t?null:t,p=e.index,f=void 0===p?null:p,_=e.onClickRemove,h=_object_without_properties(e,["artwork","index","onClickRemove"]),m=(0,l.s)().t,g=(0,d.useDtfStore)(),b=_sliced_to_array((0,o.useState)(0),2);b[0],b[1];var y=_sliced_to_array((0,o.useState)(!0),2),v=(y[0],y[1]),w=_sliced_to_array((0,o.useState)((null==r?void 0:r.currentProgress)||0),2),j=w[0],k=w[1],x=_sliced_to_array((0,o.useState)(""),2),S=x[0],O=x[1],P=_sliced_to_array((0,o.useState)(""),2),A=P[0],C=P[1],I=(0,o.useRef)(null),E=(0,o.useRef)(j),N=(0,o.useRef)(function(){}),D=(0,o.useRef)(function(){}),T=(0,o.useRef)(function(){});function showModal(){return g.showModal}function actionCableConnected(){return g.actionCableConnected}function isSpangle(){return g.isSpangle}function isStandardArtwork(){return g.isStandardArtwork}function isStuck(){var e,t=null!=(e=g.enhancementStuckAt60s)?e:{};return!!((null==r?void 0:r.id)&&t[String(r.id)])}function progressError(){return null==r?void 0:r.uploadError}function progress(){return null==r?void 0:r.progress}function progressMapIndex(){return+!!isSpangle()}function fileSize(){var e;return Math.floor(1e-6*((null==r||null==(e=r.file)?void 0:e.size)||0)||0)}function remainingTime(){var e=+!!isSpangle();return 1>Math.ceil(fileSize()/10)?1+e:Math.min(Math.ceil(fileSize()/10),15)+e}function progressState(){return progressError()?"error":navigator.onLine&&actionCableConnected()?"online":"offline"}function isOnline(){return"online"===progressState()&&!(null==r?void 0:r.retryFailed)&&actionCableConnected()}function showErrorState(){return progressError()||(null==r?void 0:r.retryFailed)}function removeArtworkByIndex(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.removeArtworkByIndex.apply(g,_to_consumable_array(t))}function setIsRetrying(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.setIsRetrying.apply(g,_to_consumable_array(t))}function updateArtworkValues(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.updateArtworkValues.apply(g,_to_consumable_array(t))}function setProgressPercentage(){var e=progressError()?"100%":"".concat(E.current.toFixed(2),"%");O(e),C(e)}function deleteArtwork(){null===f?null==_||_():removeArtworkByIndex(f)}function handleOnlineStatusChange(){var e=navigator.onLine;isOnline()?e&&(v(!0),setIsRetrying(!1)):v(!1)}function cleanupAndSaveState(){I.current&&clearTimeout(I.current),updateArtworkValues({index:f,currentProgress:E.current})}function incrementProgress(){var e=E.current,t=progress();if(e>=t)return void updateArtworkValues({index:null==r?void 0:r.originalIndex,currentProgress:e});var n=Object.keys(u.i),o=n.find(function(t){return u.i[t].percentage[progressMapIndex()]>e}),i=u.i[o],l=i.interval[progressMapIndex()]||i.interval[0],c=i.rate,d=n.find(function(e){return u.i[e].percentage[progressMapIndex()]===t}),p=u.i[d];k(parseFloat((e+c).toFixed(2))),n.indexOf(d)>n.indexOf(o)&&(l=i.catchUpInterval,p.skipCatchUp&&k(p.percentage[progressMapIndex()])
1),setProgressPercentage(),I.current=setTimeout(function(){return D.current()},l)}return(0,o.useEffect)(function(){E.current=j},[j]),(0,o.useEffect)(function(){N.current=handleOnlineStatusChange,D.current=incrementProgress,T.current=cleanupAndSaveState}),(0,o.useEffect)(function(){var onOnlineStatusChange=function(){return N.current()};return k((null==r?void 0:r.currentProgress)||0),window.addEventListener("online",onOnlineStatusChange),window.addEventListener("offline",onOnlineStatusChange),D.current(),function(){window.removeEventListener("online",onOnlineStatusChange),window.removeEventListener("offline",onOnlineStatusChange),T.current()}},[]),(0,o.useEffect)(function(){I.current&&(clearTimeout(I.current),I.current=null),D.current()},[null==r?void 0:r.progress]),(0,o.useEffect)(function(){setProgressPercentage()},[null==r?void 0:r.uploadError,g.actionCableConnected]),(0,o.useEffect)(function(){setProgressPercentage()},[null==r?void 0:r.retryFailed,g.actionCableConnected]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},h),{className:(0,i.cn)("dtf-progress-bar scope-eec1bfa0",null==h?void 0:h.className,isStuck()&&"dtf-progress-bar--stuck"),"data-state":isStuck()?"amber":"green","data-testid":"dtf-progress-bar",style:{"--eec1bfa0-currentProgressPercentage":S},children:[showErrorState()?null:(0,n.jsxs)("div",{className:(0,i.cn)("scope-eec1bfa0",{"dtf-progress-bar__line-wrap":!isStandardArtwork(),"dtf-progress-bar__line-wrap-ab-comparison":isStandardArtwork()}),children:[isStandardArtwork()?null:(0,n.jsx)("div",{className:"dtf-progress-bar__line scope-eec1bfa0",style:{width:S}}),isStandardArtwork()?(0,n.jsx)("div",{className:"dtf-progress-bar__line-ab-comparison scope-eec1bfa0"}):null]}),(0,n.jsxs)("div",{className:(0,i.cn)("scope-eec1bfa0",{"dtf-progress-bar__wrapper":!isStandardArtwork(),"dtf-progress-bar__wrapper-ab-comparison":isStandardArtwork()}),children:[showErrorState()&&showModal()?(0,n.jsxs)("button",{className:"dtf-progress-bar__remove-button scope-eec1bfa0",type:"button",onClick:deleteArtwork,"data-testid":"dtf-progress-bar-remove-button",children:[(0,n.jsx)(c.A,{className:"dtf-progress-bar__trash-icon scope-eec1bfa0",icon:"trash","data-testid":"dtf-progress-bar-trash-icon"})," ","Remove"," "]}):null,showErrorState()?null:(0,n.jsxs)("div",{className:"dtf-progress-bar__value scope-eec1bfa0",children:[A," ",(0,n.jsxs)("span",{className:"dtf-progress-bar__remaining-time scope-eec1bfa0",children:[" ","(Less than ",m("minute",remainingTime())," left)"," "]})]})]})]}))}},781758(e,t,r){"use strict";r.d(t,{A:()=>DtfSpangleVersions});var n=r(483134),o=r(923057),i=r(723433),l=r(538896),c=r(127391),u=r(997252),d=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DtfSpangleVersions(e){var t=e.className,r=_object_without_properties(e,["className"]),p=(0,l.useDtfStore)(),f=(0,c.o3)();function artworkBackground(){return p.artworkBackground}function selectedAlgorithm(){return f.selectedAlgorithm}function spangleVariations(){return f.spangleVariations}function isTransparent(){return"transparent"===artworkBackground()}function validVersions(){return spangleVariations().filter(function(e){return!e.error})}function selectVersion(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return f.selectVersion.apply(f,_to_consumable_array(t))}function versionLoaderText(e){return e.error?"Error loading pattern":"Version in progress..."}return(0,n.jsx)(n.Fragment,{children:validVersions().length?(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,u.cn)("spangle-versions scope-225a879f",t),style:{"--225a879f-artworkBackground":artworkBackground()},children:[(0,n.jsx)("div",{className:"spangle-versions__header scope-225a879f",children:"Select fill"}),(0,n.jsx)("div",{className:"spangle-versions__versions-container scope-225a879f",children:(0,d.p)(validVersions(),function(e,t){return(0,n.jsx)("button",{type:"button",className:(0,u.cn)("spangle-versions__version scope-225a879f",validVersions().length>2&&"spangle-versions__version--small",selectedAlgorithm()===e.algorithm&&"spangle-versions__version--selected",(e.isLoading||e.error)&&"spangle-versions__version--placeholder"),"aria-pressed":selectedAlgorithm()===e.algorithm,onClick:function(){selectVersion({version:e})},"data-testid":"spangle-versions-version",children:e.isLoading||e.error?(0,n.jsxs)(n.Fragment,{children:[e.isLoading?(0,n.jsx)(o.A,{className:"spangle-versions__version-loader scope-225a879f","data-testid":"spangle-versions-version-loader"}):e.error?(0,n.jsx)(i.A,{className:"spangle-versions__version-error scope-225a879f",icon:"strong-info","data-testid":"spangle-versions-version-error"}):null,(0,n.jsx)("div",{className:"spangle-versions__version-text scope-225a879f",children:versionLoaderText(e)})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"spangle-versions__version-text scope-225a879f",children:["Pattern ",t+1]}),(0,n.jsx)("div",{className:(0,u.cn)("spangle-versions__version-background scope-225a879f",isTransparent()&&"spangle-versions__version-background-transparent"),children:(0,n.jsx)("img",{className:"spangle-versions__version-image scope-225a879f",src:e.imageUrl,alt:"Spangle Pattern : ".concat(t+1)})}),(0,n.jsx)("div",{className:"spangle-versions__version-preview-text scope-225a879f",children:"Preview"})]})},e.algorithm)})})]})):null})}},279317(e,t,r){"use strict";r.d(t,{A:()=>DtfSpanglesActions});var n=r(483134),o=r(467265),i=r(40401),l=r(723433),c=r(538896),u=r(127391),d=r(293534),p=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DtfSpanglesActions(e){var t=e.isArtworkInvalid,r=void 0!==t&&t,f=_object_without_properties(e,["isArtworkInvalid"]),_=(0,c.useDtfStore)(),h=(0,u.o3)(),m=_sliced_to_array((0,d.useState)(-1),2),g=m[0],b=m[1];function artworks(){return _.artworks}function removeBgLoading(){return _.removeBgLoading}function lastSpangledDimensions(){return h.lastSpangledDimensions}function spanglesLoading(){return h.spanglesLoading}function spangleSizeEdited(){return h.spangleSizeEdited}function spangleSizeEditing(){return h.spangleSizeEditing}function originalArtworkUrl(){return h.originalArtworkUrl}function allAPIsCompleted(){return h.allAPIsCompleted}
1function invalidSpangleSelected(){return h.invalidSpangleSelected}function isSpangleItButtonDisabled(){var e=lastSpangledDimensions(),t=e.width,n=e.height,o=artworks()[0],i=o.width,l=o.height,c=parseFloat(t)===parseFloat(i)&&parseFloat(n)===parseFloat(l);return!allAPIsCompleted()||r||removeBgLoading()||spangleSizeEditing()&&c}function isCancelDisabled(){return(spanglesLoading()||!allAPIsCompleted())&&!_.hasAnyArtworkStuck}function showEditSizeButton(){return spangleSizeEdited()&&!invalidSpangleSelected()}function showSpangleItButton(){return!spangleSizeEdited()||spanglesLoading()||invalidSpangleSelected()}function spangleItButtonLabel(){return allAPIsCompleted()&&!spanglesLoading()?"Spangle It!":"Loading..."}function getSpangleVariations(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.getSpangleVariations.apply(h,_to_consumable_array(t))}function setSpangleMode(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return h.setSpangleMode.apply(h,_to_consumable_array(t))}function updateArtworkValues(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return _.updateArtworkValues.apply(_,_to_consumable_array(t))}function logResizeCounter(){var e=invalidSpangleSelected()?g:g+1;b(e),(0,o.Py)("spangle_button_clicked",{artwork_url:originalArtworkUrl(),resize_counter:e,business_line:i.o6.SPANGLE})}function spangleIt(){var e=Date.now();logResizeCounter(),artworks()[0].spangled&&updateArtworkValues({index:0,spangled:!1,spangledImageUrl:null}),updateArtworkValues({index:0,processTimeStamp:e,isLoading:!0,progress:100,currentProgress:0}),getSpangleVariations({isRetry:invalidSpangleSelected(),processTimeStamp:e})}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},f),{className:(0,p.cn)("spangle-actions scope-f7214a82"),children:[showEditSizeButton()?(0,n.jsxs)("button",{className:(0,p.cn)("spangle-actions__button spangle-actions__button--secondary scope-f7214a82"),disabled:spanglesLoading()||!allAPIsCompleted(),type:"button",onClick:function(){setSpangleMode("edit-size")},"data-testid":"spangle-actions-button",children:[" ","Edit Size"," "]}):null,spangleSizeEditing()?(0,n.jsxs)("button",{className:(0,p.cn)("spangle-actions__button spangle-actions__button--text scope-f7214a82"),disabled:isCancelDisabled(),type:"button",onClick:function(){setSpangleMode("size-edited")},"data-testid":"dtf-spangle-cancel-button",children:[" ","Cancel"," "]}):null,showSpangleItButton()?(0,n.jsxs)("button",{className:(0,p.cn)("spangle-actions__button spangle-actions__button--primary scope-f7214a82"),disabled:isSpangleItButtonDisabled(),type:"button",onClick:spangleIt,"data-testid":"spangle-actions-button-2",children:[(0,n.jsx)(l.A,{className:(0,p.cn)("spangle-actions__spangle-icon scope-f7214a82"),icon:"spangle-wand","data-testid":"spangle-actions-spangle-icon"})," ",spangleItButtonLabel()]}):null]}))}},925122(e,t,r){"use strict";r.d(t,{A:()=>DtfSpanglesColorSelector});var n=r(483134),o=r(109111),i=r(538896),l=r(127391),c=r(958469),u=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DtfSpanglesColorSelector(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,i.useDtfStore)(),d=(0,l.o3)();function spangleColors(){return r.spangleColors}function selectedVersion(){return d.selectedVersion}function allAPIsCompleted(){return d.allAPIsCompleted}function disabled(){var e,t;return!selectedVersion()||(null==(e=selectedVersion())?void 0:e.isLoading)||(null==(t=selectedVersion())?void 0:t.error)||!allAPIsCompleted()}function colorOptions(){return spangleColors().map(function(e){return{value:"[".concat(e.rgbCode,"]"),label:e.name,prefix:e.imageUrl,labelSuffix:e.spangleCode}})}function colorValues(){return!disabled()&&selectedVersion()&&selectedVersion().spanglePagesInfo?Object.values(selectedVersion().spanglePagesInfo).filter(function(e){return(void 0===e?"undefined":_type_of(e))==="object"}):[]}function changeColor(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return d.changeColor.apply(d,_to_consumable_array(t))}function getColorValue(e){var t=e.color;return colorOptions().find(function(e){return e.value===JSON.stringify(t)})}function selectColor(e,t){var r=colorValues();r[e]=_object_spread_props(_object_spread({},r[e]),{color:JSON.parse(t)}),changeColor({colorValues:r.reduce(function(e,t,r){return _object_spread_props(_object_spread({},e),_define_property({},"tray_".concat(r),t))},{})})}var p=colorValues();return(0,n.jsx)(n.Fragment,{children:p.length>0?(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,u.cn)("spangle-color-selector scope-e57dfa67"),children:[(0,n.jsx)("div",{className:(0,u.cn)("spangle-color-selector__header scope-e57dfa67"),children:"Select spangles colors"}),(0,n.jsx)("div",{className:(0,u.cn)("spangle-color-selector__color-container scope-e57dfa67"),children:(0,c.p)(p,function(e,t){return(0,n.jsxs)("div",{className:(0,u.cn)("spangle-color-selector__color scope-e57dfa67"),children:[(0,n.jsxs)("span",{className:(0,u.cn)("spangle-color-selector__color-number scope-e57dfa67"),children:["Color #",t+1]}),(0,n.jsx)(o.A,{className:(0,u.cn)("scope-e57dfa67"),disabled:disabled(),value:getColorValue(e),options:colorOptions(),placeholder:"Select a color",onChange:function(e){selectColor(t,e)},"data-testid":"select"})]},e.value)})})]})):null})}},184174(e,t,r){"use strict";r.d(t,{A:()=>GangSheetBuilder});var n=r(483134),o=r(293534),i=r(997252),l=r(736602),c=r(741235),u=r(586519),d=r(298210),p=r(727754),f=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var _=(d.eO.length+1)*p.jb+d.eO.reduce(function(e,t){return e+t},0)+d.RP;function GangSheetBuilder(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,f.useDtfStore)(),d=(0,o.useRef)(r);function gangSheetBuilder(){return r.gangSheetBuilder}function gangSheetBuilderShopId(){return r.gangSheetBuilderShopId}function gangSheetBuilderSizes(){return r.gangSheetBuilderSizes}function builderPayload(){var e={container:"gs-builder",mode:l.KV?"production":"development",shop_id:gangSheetBuilderShopId(),size_id:3,sizes:gangSheetBuilderSizes(),settings:{nameAndNumber:{enabled:!0}}},t=(0,c.v8)("gangsheet_builder_customer_id");return t&&(e.customer={id:t}),e}function setGeneratedGangSheets(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setGeneratedGangSheets.apply(r,_to_consumable_array(t))}function addFilesToQueue(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.addFilesToQueue.apply(r,_to_consumable_array(t))}
1function submitForm(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.submitForm.apply(r,_to_consumable_array(t))}function isReadyForOrder(){return!!r.isReadyForOrder}function queuedArtworkRows(e){var t=e.filter(Boolean),n=r.artworksState;return t.length&&Array.isArray(n)?t.map(function(e){return n.find(function(t){return(null==t?void 0:t.file)===e})}):null}function isQueuedArtworkStillPresent(e){var t=queuedArtworkRows(e);return null===t||t.every(Boolean)}function showDownloadFailedModal(){var e=globalThis.$;if("function"==typeof e){var t=e("#adding-failure");null==t||t.modal("show"),null==t||t.find("#adding-failure-error").text("Items were not added. Please try again.")}}function hasQueuedUploadFailed(e){var t=queuedArtworkRows(e);return null!==t&&t.some(function(e){return(null==e?void 0:e.uploadError)||(null==e?void 0:e.retryFailed)})}function waitUntilReadyForOrder(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:t=Date.now()+_,r.label=1;case 1:if(!(!isReadyForOrder()&&!hasQueuedUploadFailed(e)&&Date.now()<t))return[3,3];return[4,new Promise(function(e){setTimeout(e,500)})];case 2:return r.sent(),[3,1];case 3:return[2]}})})()}function handleDesignCreated(e){processGangSheet(e.data),d.current.gangSheetBuilder.close(),d.current.setShowGangSheetBuilder(!1)}function handleClosed(){d.current.setShowGangSheetBuilder(!1)}function showBuilder(){return gangSheetBuilder().open(builderPayload()).on("design:created",handleDesignCreated).on("closed",handleClosed)}function processGangSheet(e){return _async_to_generator(function(){var t,r,n;return _ts_generator(this,function(o){switch(o.label){case 0:return setGeneratedGangSheets(t=e.designs),[4,Promise.all(t.map(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,downloadGangSheetPreview(e)];case 1:if(t=r.sent())return[2,new File([t],"".concat(e.id,".png"),{type:"image/png"})];return[2,null]}})})()}))];case 1:if((n=(r=o.sent()).filter(function(e){return null!==e})).length<r.length&&(0,u.notifyError)(Error("Gang sheet builder: thumbnail download failed"),{params:{source:"gang_sheet_builder.thumbnail_download_failed",failed_count:r.length-n.length,total_count:r.length}}),!n.length)return showDownloadFailedModal(),[2];return[4,addFilesToQueue({files:n,artworkIndex:null,existingArtworkId:null,uploadSource:"gang_sheet_builder"})];case 2:return o.sent(),[4,waitUntilReadyForOrder(n)];case 3:if(o.sent(),!isQueuedArtworkStillPresent(n))return[2];return submitForm(),[2]}})})()}function downloadGangSheetPreview(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:t=null,r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(e.thumbnail_url)];case 2:return[4,r.sent().blob()];case 3:return t=r.sent(),[3,5];case 4:return r.sent(),[3,5];case 5:return[2,t]}})})()}return d.current=r,(0,o.useEffect)(function(){var e=showBuilder();return function(){var t,r;null==e||null==(t=e.off)||t.call(e,"design:created",handleDesignCreated),null==e||null==(r=e.off)||r.call(e,"closed",handleClosed)}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("modal gang-sheet-builder-modal",t.className),id:"gang-sheet-builder-modal-body","data-testid":"modal"}))}},895461(e,t,r){"use strict";r.d(t,{A:()=>GangSheetBuilderContainer});var n=r(483134),o=r(293534),i=r(467265),l=r(997252),c=r(184174),u=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function GangSheetBuilderContainer(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,u.useDtfStore)(),d=t.className,p=_object_without_properties(t,["className"]),f=_sliced_to_array((0,o.useState)(!1),2),_=f[0],h=f[1],m=(0,o.useRef)(!1),g=(0,o.useRef)(!0);function showGangSheetBuilderFeature(){return r.showGangSheetBuilderFeature}function showGangSheetBuilder(){return r.showGangSheetBuilder}function setShowGangSheetBuilder(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setShowGangSheetBuilder.apply(r,_to_consumable_array(t))}function handleGangSheetBuilder(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:if(m.current)return[2];m.current=!0,h(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,r.ensureGangSheetBuilder()];case 2:if(e=t.sent(),!g.current)return[2];if(!e)return(0,i.Py)("gangsheet_builder_load_failed",{}),[2];return setShowGangSheetBuilder(!0),(0,i.Py)("gangsheet_builder_opened",{}),[3,4];case 3:return m.current=!1,h(!1),[7];case 4:return[2]}})})()}return(0,o.useEffect)(function(){return g.current=!0,function(){g.current=!1}},[]),(0,n.jsx)(n.Fragment,{children:showGangSheetBuilderFeature()?(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,l.cn)("gang-sheet-builder
1-builder-container",d)},p),{children:[showGangSheetBuilder()?(0,n.jsx)(c.A,{"data-testid":"gang-sheet-builder"}):null,(0,n.jsx)("span",{className:"gang-sheet-builder-builder-container__new-icon",children:"\uD83D\uDD25 NEW!"}),(0,n.jsxs)("button",{className:"gang-sheet-builder-builder-container__button",type:"button",disabled:_,"aria-busy":_,onClick:function(e){e.stopPropagation(),handleGangSheetBuilder()},"data-testid":"gang-sheet-builder-builder-container-button",children:[" ","Build a Gang Sheet"," "]})]})):null})}},60018(e,t,r){"use strict";r.d(t,{A:()=>GangSheetBuilderButton});var n=r(483134),o=r(293534),i=r(997252),l=r(467265),c=r(736602),u=r(741235),d=r(277889),p=r(586519),f=r(538896),_=r(757774),h=r(322023),m=r(955341),g=r(701368),b=r(82080);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function addingFailureModal(){var e=globalThis.$;return"function"!=typeof e?null:e("#adding-failure")}function GangSheetBuilderButton(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,f.useDtfStore)(),y=(0,o.useRef)(r);y.current=r;var v=_sliced_to_array((0,o.useState)(!1),2),w=v[0],j=v[1],k=(0,o.useRef)(!1),x=(0,o.useRef)(!0),S=(0,o.useRef)(null),O=(0,o.useRef)(null),P=_sliced_to_array((0,o.useState)(null),2),A=P[0],C=P[1],I=_sliced_to_array((0,o.useState)(!1),2),E=I[0],N=I[1],D=_sliced_to_array((0,o.useState)(!1),2),T=D[0],M=D[1],R=(0,o.useRef)(!1);function gangSheetBuilderSettings(){return r.gangSheetBuilderSettings}function gangSheetBuilderShopId(){return r.gangSheetBuilderShopId}function gangSheetBuilderVariants(){return r.gangSheetBuilderVariants}function gangSheetBuilderSizes(){return r.gangSheetBuilderSizes}function gangSheetBulkPrice(){return r.gangSheetBulkPrice}function preloadedDesignId(){return r.preloadedDesignId}function catalogNumber(){return r.catalogNumber}function gangSheetBuilderSizesAndVariants(){var e=[],t=1;return Object.entries(gangSheetBuilderVariants()).forEach(function(r){var n=_sliced_to_array(r,2),o=n[0],i=n[1];
1gangSheetBuilderSizes().forEach(function(r){e.push(_object_spread_props(_object_spread({},r),{title:"".concat(o," - ").concat(r.height/12," Feet"),metadata:{variantId:i.variant_id},id:t})),t+=1})}),e}function selectedSize(){return gangSheetBuilderSizesAndVariants().find(function(e){return e.height===gangSheetBuilderSettings().height&&e.metadata.variantId===gangSheetBuilderSettings().variantId})}function builderPayload(){var e=selectedSize();if(!e)return null;var t={container:"gs-builder",mode:c.KV?"production":"development",shop_id:gangSheetBuilderShopId(),size_id:e.id,sizes:gangSheetBuilderSizesAndVariants(),settings:{nameAndNumber:{enabled:!0}}},r=(0,u.v8)("gangsheet_builder_customer_id");return r&&(t.customer={id:r}),t}function showSizeUnavailableError(){var e=addingFailureModal();null==e||e.modal("show"),null==e||e.find("#adding-failure-error").text("This design's size is no longer available. Please pick a size below to continue."),(0,l.Py)("gangsheet_builder_size_unavailable",{height:gangSheetBuilderSettings().height,variant:gangSheetBuilderSettings().variantId})}function setLoadedArtwork(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setLoadedArtwork.apply(r,_to_consumable_array(t))}function setPreloadedDesignId(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setPreloadedDesignId.apply(r,_to_consumable_array(t))}function submitForm(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.submitForm.apply(r,_to_consumable_array(t))}function ensureGangSheetBuilder(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:if(k.current)return[2,null];k.current=!0,j(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,r.ensureGangSheetBuilder()];case 2:return(e=t.sent())||(0,l.Py)("gangsheet_builder_load_failed",{}),[2,e];case 3:return k.current=!1,j(!1),[7];case 4:return[2]}})})()}function showBuilder(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return O.current=gangSheetBuilderSettings().variantId,[4,ensureGangSheetBuilder()];case 1:if(!(e=r.sent())||!x.current)return[2];if(!(t=builderPayload()))return showSizeUnavailableError(),[2];return(0,l.Py)("gangsheet_builder_opened",{size:Math.ceil(gangSheetBuilderSettings().height/12),variant:gangSheetBuilderSettings().variantId}),S.current=e.open(t).on("design:created",function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,addToCartGangSheet(e.data.designs)];case 1:return t.sent(),[3,3];case 2:return handleAddToCartFailure(t.sent()),[3,3];case 3:return[2]}})})()}).on("closed",function(){}),[2]}})})()}function handleDesignUpdated(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),(t=e.data.designs).forEach(function(e){var t=e.size;null===t||(void 0===t?"undefined":_type_of(t))!=="object"||t.metadata||(t.metadata={variantId:O.current})}),[4,addToCartGangSheet(t)];case 1:return r.sent(),[3,3];case 2:return handleAddToCartFailure(r.sent()),[3,3];case 3:return[2]}})})()}function editGangSheet(){return _async_to_generator(function(){var e,t,r;return _ts_generator(this,function(n){switch(n.label){case 0:return e=preloadedDesignId(),O.current=gangSheetBuilderSettings().variantId,[4,ensureGangSheetBuilder()];case 1:if(!(t=n.sent())||!x.current)return[2];if(!(r=builderPayload()))return showSizeUnavailableError(),[2];return S.current=t.open(_object_spread_props(_object_spread({},r),{shop_id:gangSheetBuilderShopId(),design_id:e})).on("design:updated",handleDesignUpdated),[2]}})})()}function handleMaterialConfirm(){return _async_to_generator(function(){var e,t,r;return _ts_generator(this,function(n){switch(n.label){case 0:if(R.current)return[2];R.current=!0,e=A.designs,M(!1),N(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,addToCartGangSheet(e,!0)];case 2:return n.sent(),C(null),[3,5];case 3:return t=n.sent(),(0,p.notifyError)(_instanceof(t,Error)?t:Error(String(t)),{params:{source:"gang_sheet_builder.confirmed_material_retry",status:null!=(r=null==t?void 0:t.status)?r:null,variant:O.current}}),M(!0),[3,5];case 4:return N(!1),R.current=!1,[7];case 5:return[2]}})})()}function handleMaterialCancel(){R.current||(M(!1),(0,l.Py)("gangsheet_material_mix_declined",{variant:O.current,sheet_count:A.sheets.reduce(function(e,t){return e+t.sheetCount},0)}),C(null))}function handleAddToCartFailure(e){null==(n=y.current.gangSheetBuilder)||null==(r=n.close)||r.call(n);var t,r,n,o=(null==e?void 0:e.gangSheetPersisted)===!0,i=(0,_.fj)(e),c=o?"We couldn't confirm your gang sheet was added. Please check your cart before adding it again.":null!=(t=(0,h.F)(i))?t:"Items were not added. Please try again.",u=ad
1dingFailureModal();null==u||u.modal("show"),null==u||u.find("#adding-failure-error").text(c),o||(0,l.Py)("add_to_cart_error",{error:c});var d=null==e?void 0:e.status;(0,m.H)(e,o)&&(0,p.notifyError)(_instanceof(e,Error)?e:Error(String(e)),{params:{source:o?"gang_sheet_builder.add_to_cart.after_persist":"gang_sheet_builder.add_to_cart",status:null!=d?d:null,variant:O.current}})}function addToCartGangSheet(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _async_to_generator(function(){var r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,d.api.dtf.addToCartGangSheet(_object_spread({gang_sheet_data:e,catalog_number:catalogNumber(),builder_seed_variant_id:O.current},t?{confirm_material_mix:!0}:{}),{silent:!0})];case 1:return r=i.sent(),[3,3];case 2:if(n=i.sent(),!(o=t?null:(0,b.vP)(n)))throw n;return C({designs:e,sheets:(0,b.yR)(o,e,{variants:gangSheetBuilderVariants(),bulkPrices:gangSheetBulkPrice()})}),[2];case 3:try{applyPricingAndSubmit(r)}catch(e){throw e.gangSheetPersisted=!0,e}return[2]}})})()}function applyPricingAndSubmit(e){y.current.gangSheetBuilder.close(),e.artworks.forEach(function(e,t){var r,n=null==(r=gangSheetBulkPrice()[e.variant_id])?void 0:r.bulk_price,o=null==n?void 0:n.find(function(t){return t.height===e.height*e.quantity}),i=Object.values(gangSheetBuilderVariants()).find(function(t){return t.variant_id===e.variant_id});o||(o=n[n.length-1]),e.pricing={unitPrice:o.size_price*Math.ceil(e.height/12)},e.catalogNumber=i.catalog_number,e.fromGangSheetBuilder=!0,setLoadedArtwork({artwork:e,index:t})}),submitForm()}return(0,o.useEffect)(function(){return x.current=!0,preloadedDesignId()&&(editGangSheet(),setPreloadedDesignId(null)),function(){var e,t;x.current=!1,null==(t=S.current)||null==(e=t.off)||e.call(t,"design:updated",handleDesignUpdated)}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("gang-sheet-builder-button",t.className),children:[(0,n.jsxs)("button",{className:"gang-sheet-builder-button__button",type:"button",disabled:w,"aria-busy":w,onClick:function(e){e.stopPropagation(),showBuilder()},"data-testid":"gang-sheet-builder-button-button",children:[" ","Build Your Gang Sheet"," "]}),A?(0,n.jsx)(g.A,{sheets:A.sheets,selectedMaterial:(0,b.o6)(gangSheetBuilderVariants(),O.current),pending:E,failed:T,onConfirm:handleMaterialConfirm,onCancel:handleMaterialCancel}):null]}))}},444599(e,t,r){"use strict";r.d(t,{A:()=>GangSheetBuilderPdpContainer});var n=r(483134),o=r(997252),i=r(884691),l=r(894867),c=r(60018),u=r(897102);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function GangSheetBuilderPdpContainer(e){var t=e.currentStore,r=_object_without_properties(e,["currentStore"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({}
1,r),{className:(0,o.cn)("gang-sheet-builder-container"),children:[(0,n.jsx)(i.A,{"data-testid":"sizes"}),(0,n.jsx)(l.A,{"data-testid":"variants"}),(0,n.jsx)(c.A,{"data-testid":"gang-sheet-builder-button"}),(0,n.jsx)(u.A,{currentStore:t,"data-testid":"upload-gang-sheet"})]}))}},701368(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(338908),i=r(27037);let __rspack_default_export=function(e){var t=e.sheets,r=e.selectedMaterial,l=e.pending,c=void 0!==l&&l,u=e.failed,d=void 0!==u&&u,p=e.onConfirm,f=e.onCancel,_=(0,o.s)().n;function money(e){return _(e.toFixed(2),"currency")}function confirmLabel(){return c?"Adding…":d?"Try again":"Add to cart anyway"}function sheetKey(e,t){return"".concat(t,"-").concat(e.material,"-").concat(e.width,"-").concat(e.height,"-").concat(e.sheetCount)}function sheetLine(e){var t=1===e.sheetCount?"sheet":"sheets",r="".concat(e.width," in \xd7 ").concat(Math.ceil(e.height/12)," ft"),n="".concat(e.sheetCount," ").concat(t," of ").concat(e.material," (").concat(r,")");return null===e.totalPrice?n:null===e.unitPrice?"".concat(n," — ").concat(money(e.totalPrice)," total"):"".concat(n," — ").concat(money(e.unitPrice)," per sheet, ").concat(money(e.totalPrice)," total")}return(0,n.jsx)(i.A,{onClose:f,onSubmit:p,closeOnSubmit:!1,staticBackdrop:!0,pending:c,slots:{header:function(){return(0,n.jsx)("span",{"data-testid":"gang-sheet-material-confirmation-modal",children:"Check the material on part of your gang sheet"})},text:function(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Your gang sheet includes sheets in a material you did not choose. Adding it to your cart charges you for that material."}),(0,n.jsx)("ul",{"data-testid":"gang-sheet-material-confirmation-sheets",children:t.map(function(e,t){return(0,n.jsx)("li",{"data-testid":"gang-sheet-material-confirmation-sheet",children:sheetLine(e)},sheetKey(e,t))})}),r?(0,n.jsx)("p",{children:"You chose ".concat(r,".")}):null,d?(0,n.jsx)("p",{"data-testid":"gang-sheet-material-confirmation-error",children:"We couldn't add your gang sheet to the cart. Your design is still here — try again."}):null]})},button:function(){return(0,n.jsx)("span",{"data-testid":"gang-sheet-material-confirmation-confirm",children:confirmLabel()})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"Go back and change it"})}}})}},884691(e,t,r){"use strict";r.d(t,{A:()=>Sizes});var n=r(483134),o=r(293534),i=r(338908),l=r(781301),c=r(538896),u=r(958469),d=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Sizes(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,i.s)().n,p=(0,c.useDtfStore)();function gangSheetBuilderSettings(){return p.gangSheetBuilderSettings}function gangSheetBuilderSizes(){return p.gangSheetBuilderSizes}function gangSheetBulkPrice(){return p.gangSheetBulkPrice}function sizes(){var e,t=null==(e=gangSheetBulkPrice()[gangSheetBuilderSettings().variantId])?void 0:e.bulk_price,r=[];return gangSheetBuilderSizes().forEac
1h(function(e){var n=Math.ceil(e.height/12),o=null==t?void 0:t.find(function(t){return t.height===e.height});r.push({label:"".concat(n," Feet"),value:e.height,price:o?(o.size_price*n).toFixed(2):null,discount:null==o?void 0:o.percent_off})}),r}function updateGangSheetBuilderSettings(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return p.updateGangSheetBuilderSettings.apply(p,_to_consumable_array(t))}function fetchBulkPrice(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return p.fetchBulkPrice.apply(p,_to_consumable_array(t))}function handleTileSelected(e){updateGangSheetBuilderSettings({height:e})}function fetchPrice(){fetchBulkPrice()}return(0,o.useEffect)(function(){fetchPrice()},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,d.cn)("gang-sheet-builder-sizes"),children:[(0,n.jsxs)("span",{className:(0,d.cn)("gang-sheet-builder-sizes__title"),children:[" ","Select size (all sizes are 22 inches wide)"," "]}),(0,n.jsx)("div",{className:(0,d.cn)("gang-sheet-builder-sizes__tiles"),children:(0,u.p)(sizes(),function(e){return(0,n.jsxs)("div",{className:(0,d.cn)("gang-sheet-builder-sizes__tile"),children:[(0,n.jsx)(l.A,{value:e,isSelected:gangSheetBuilderSettings().height===e.value,onTileSelected:handleTileSelected,"data-testid":"tile"},e.value),(0,n.jsxs)("div",{className:(0,d.cn)("gang-sheet-builder-sizes__price"),children:[(0,n.jsx)("div",{className:(0,d.cn)("gang-sheet-builder-sizes__price-value"),children:r(e.price,"currency")}),e.discount>0?(0,n.jsxs)("div",{className:(0,d.cn)("gang-sheet-builder-sizes__price-discount"),children:[e.discount,"% off"," "]}):null]})]},e.value)})})]}))}},781301(e,t,r){"use strict";r.d(t,{A:()=>Tile});var n=r(483134),o=r(997252),i=r(378406),l=r(44613),c=r(821771);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function Tile(e){var t=e.value,r=e.isSelected,u=void 0!==r&&r,d=e.hasJiffyFirstBadge,p=e.onTileSelected,f=_object_without_properties(e,["value","isSelected","hasJiffyFirstBadge","onTileSelected"]),_=(0,l.s)();function handleClick(e){p(e)}return(0,n.jsx)("div",_object_spread_props(_object_spread({},f),{className:(0,o.cn)("gang-sheet-builder-pdp-tile",f.className),children:(0,n.jsxs)("button",{className:(0,o.cn)("gang-sheet-builder-pdp-tile__button",{"gang-sheet-builder-pdp-tile__button--selected":u}),type:"button","aria-pressed":u,onClick:function(){handleClick(t.value)},"data-testid":"tile-div",children:[t.label,void 0!==d&&d?(0,n.jsx)("span",{className:(0,o.cn)("j1-badge j1-badge--no-hand gang-sheet-builder
1-pdp-tile__j1-badge",_&&"j1-badge--handoff"),"data-testid":"gang-sheet-builder-tile-j1-badge",children:_?(0,n.jsx)(c.g,{programme:"1st","data-testid":"j1-badge-handoff"}):(0,n.jsx)(i.A,{className:"j1-badge__icon",role:"img","aria-label":"Icon for Jiffy 1st"})}):null]})}))}},897102(e,t,r){"use strict";r.d(t,{A:()=>UploadGangSheet});var n=r(483134),o=r(538896),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function UploadGangSheet(e){var t=e.currentStore,r=_object_without_properties(e,["currentStore"]),l=(0,o.useDtfStore)();function gangSheetBuilderSettings(){return l.gangSheetBuilderSettings}function gangSheetBuilderVariants(){return l.gangSheetBuilderVariants}function variantUrl(){var e=Object.values(gangSheetBuilderVariants()).find(function(e){return e.variant_id===gangSheetBuilderSettings().variantId});return"ca"===t?"/".concat(t,"/").concat(e.product_slug,".html"):"/".concat(e.product_slug,".html")}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("gang-sheet-builder-upload",r.className),children:["Have a print-ready file?"," ",(0,n.jsx)("a",{className:"gang-sheet-builder-upload__link",href:variantUrl(),"data-testid":"gang-sheet-builder-upload-link",children:"Upload Your Gang Sheet"})]}))}},894867(e,t,r){"use strict";r.d(t,{A:()=>Variants});var n=r(483134),o=r(293534),i=r(147141),l=r(747905),c=r(781301),u=r(977966),d=r(538896),p=r(958469),f=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Variants(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,d.useDtfStore)();function gangSheetBuilderVariants(){return r.gangSheetBuilderVariants}function gangSheetBuilderSettings(){return r.gangSheetBuilderSettings}function updateGangSheetBuilderSettings(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.updateGangSheetBuilderSettings.apply(r,_to_consumable_array(t))}function setProductSlug(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setProductSlug.apply(r,_to_consumable_array(t))}function setVariantId(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setVariantId.apply(r,_to_consumable_array(t))}function updatePdpDates(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.updatePdpDates.apply(r,_to_consumable_array(t))}function updateBulkTable(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.updateBulkTable.apply(r,_to_consumable_array(t))}function updateCarouselImage(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.updateCarouselImage.apply(r,_to_consumable_array(t))}function handleTileSelected(e){var t=Object.values(gangSheetBuilderVariants()).find(function(t){return t.variant_id===e});gangSheetBuilderSettings().variantId!==e&&(0,l.uF)(null),setVariantId(e),updateGangSheetBuilderSettings({variantId:e}),setProductSlug(t.product_slug),updatePdpDates(),updateBulkTable(),updateCarouselImage({variantId:e}),(0,i.dF)("v",t.catalog_number,{redirect:!1,replace:!1})}function isSelected(e){return gangSheetBuilderSettings().variantId===e}var _=(0,u.i)(Object.values(gangSheetBuilderVariants()||{}).map(function(e){return e.variant_id})),h=(0,o.useRef)(gangSheetBuilderSettings);return h.current=gangSheetBuilderSettings,(0,o.useEffect)(function(){updateCarouselImage({variantId:h.current().variantId})},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,f.cn)("gang-sheet-builder-variants"),children:[(0,n.jsx)("span",{className:(0,f.cn)("gang-sheet-builder-variants__title"),children:"Select variant"}),(0,n.jsx)("div",{className:(0,f.cn)("gang-sheet-builder-variants__tiles"),children:(0,p.p)(gangSheetBuilderVariants(),function(e,t){return(0,n.jsx)(c.A,{value:{label:t,value:e.variant_id},isSelected:isSelected(e.variant_id),hasJiffyFirstBadge:_.has(String(e.variant_id)),onTileSelected:handleTileSelected,"data-testid":"tile"},e.variant_id)})})]}))}},82080(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}r.d(t,{o6:()=>materialLabel,vP:()=>materialConfirmationSheets,yR:()=>buildConfirmationSheets});var materialConfirmationSheets=function(e){var t=null!=e?e:{},r=t.status,n=t.response;if(409!==r||!n||(void 0===n?"undefined":_type_of(n))!=="object"||Array.isArray(n)||"gang_sheet_material_confirmation_required"!==n.code)return null;var o=n.offending_sheets;return Array.isArray(o)&&0!==o.length?o:null},sameId=function(e,t){return null!=e&&null!=t&&String(e)===String(t)},materialLabel=function(e,t){var r,n=Object.entries(null!=e?e:{}).find(function(e){var r=_sliced_to_array(e,2)[1];return sameId(null==r?void 0:r.variant_id,t)});return null!=(r=null==n?void 0:n[0])?r:null},cartUnitPrice=function(e,t,r){var n;return(null==e?void 0:e.length)?(null!=(n=e.find(function(e){return e.height===t*r}))?n:e[e.length-1]).size_price*Math.ceil(t/12):null},matchesSheet=function(e,t){var r,n,o,i;return sameId(null==e||null==(n=e.size)||null==(r=n.metadata)?void 0:r.variantId,t.variant_id)&&Number(null==e||null==(o=e.size)?void 0:o.width)===Number(t.width)&&Number(null==e||null==(i=e.size)?void 0:i.height)===Number(t.height)},entryQuantity=function(e){var t=Number(null==e?void 0:e.quantity);return Number.isFinite(t)&&t>0?Math.trunc(t):1},n={unitPrice:null,totalPrice:null},priceSheet=function(e,t,r){var o,i=null==(o=(null!=r?r:{})[e.variant_id])?void 0:o.bulk_price,l=(Array.isArray(t)?t:[]).filter(function(t){return matchesSheet(t,e)}).map(function(t){var r=entryQuantity(t);return{quantity:r,unitPrice:cartUnitPrice(i,e.height,r)}}),c=l.reduce(function(e,t){return e+t.quantity},0);if(0===l.length||c!==e.sheet_count||l.some(function(e){return null===e.unitPrice}))return n;var u=l[0].unitPrice,d=l.reduce(function(e,t){return e+t.unitPrice*t.quantity},0);return{unitPrice:l.every(function(e){return e.unitPrice===u})?u:null,totalPrice:d}},buildConfirmationSheets=function(e,t,r){return e.map(function(e){var n;return _object_spread({material:null!=(n=materialLabel(r.variants,e.variant_id))?n:"a material you did not choose",width:e.width,height:e.height,sheetCount:e.sheet_count},priceSheet(e,t,r.bulkPrices))})}},977966(e,t,r){"use strict";r.d(t,{i:()=>useFilmJiffyFirst});var n=r(293534),o=r(277889),i=r(280857),l=r(471242),c=r(184667),u=r(355698);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var d=new Set;function useFilmJiffyFirst(e){var t=e.map(String).sort().join(","),r=_sliced_to_array((0,n.useState)(d),2),p=r[0],f=r[1];return(0,n.useEffect)(function(){var e=t?t.split(","):[];if(f(d),0!==e.length&&(0,c.Ye)()){var r=!0,n=0,askFilms=function(){return _async_to_generator(function(){var t,i;return _ts_generator(this,function(l){switch(l.label){case 0:n+=1,t=n,i=d,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,o.api.product.fetchETA({business_line:"transfers"},{variants_hash:JSON.stringify(Object.fromEntries(e.map(function(e){return[e,1]})))})];case 2:var c;return i=new Set((c=l.sent(),(null==c?void 0:c.success)!==!0?[]:e.filter(function(e){var t,r;return(null==(r=c.estimates)||null==(t=r[e])?void 0:t.jiffy_first)===!0}))),[3,4];case 3:return l.sent(),i=d,[3,4];case 4:return r&&t===n&&f(i),[2]}})})()},withdrawAndAskAgain=function(){f(d),askFilms()},handleZipcodeChange=function(e,t,r){(0,u.q2)(t,r)||withdrawAndAskAgain()},handlePageShow=function(e){e.persisted&&withdrawAndAskAgain()};return i.A.on(l.A.ZIPCODE_UPDATED,handleZipcodeChange),i.A.on(l.A.SESSION_ZIPCODE_CHANGED,handleZipcodeChange),window.addEventListener("pageshow",handlePageShow),askFilms(),function(){r=!1,i.A.removeEventListener(l.A.ZIPCODE_UPDATED,handleZipcodeChange),i.A.removeEventListener(l.A.SESSION_ZIPCODE_CHANGED,handleZipcodeChange),window.removeEventListener("pageshow",handlePageShow)}}},[t]),p}},746592(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(147141),l=r(741235),c=r(927997),u=r(723433),d=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.currentStore,r=void 0===t?null:t,p=_object_without_properties(e,["currentStore"]),f=_sliced_to_array((0,o.useState)((0,i.Fr)()),1)[0],_=(0,o.useRef)(!1),h=(0,o.useRef)(null);function gangSheetDesktopImage(){return(0,c.lt)("gen/gangsheet-modal-image.png")}function gangSheetMobileBigImage(){return(0,c.lt)("gen/gang-sheet-info-image-mobile-big.png")}function closeModal(){$(h.current).modal("hide"),_.current=!0,(0,l.pR)("gang-sheet-info-modal-shown",!0)}function showModal(){var e=$(h.current);e.modal("show").on("hidden.bs.modal",function(){e.off("hidden.bs.modal"),_.current||closeModal()})}function jiffyTransferLink(){var e="/dtf-transfers";return"ca"===r?"/ca".concat(e):e}function redirectToGangSheetUrl(){var e="/jiffytransfers-DTFGANG001.html";(0,i.SE)("ca"===r?"/ca".concat(e):e),closeModal()}function redirectToDtfUrl(){var e="/jiffytransfers-DTF001.html";(0,i.SE)("ca"===r?"/ca".concat(e):e),closeModal()}return(0,o.useEffect)(function(){return showModal(),function(){var e=$
1(h.current);e.modal("hide"),e.off("hidden.bs.modal")}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},p),{className:"modal gang-sheet-info-modal scope-ae85cf8b",ref:h,role:"dialog","data-testid":"modal",children:(0,n.jsx)("div",{className:"gang-sheet-info-modal__modal-box modal-dialog scope-ae85cf8b",children:(0,n.jsxs)("div",{className:"gang-sheet-info-modal__modal-body scope-ae85cf8b",children:[(0,n.jsx)("button",{className:"gang-sheet-info-modal__modal-button-close scope-ae85cf8b",type:"button",onClick:closeModal,"data-testid":"gang-sheet-info-modal-modal-button-close",children:(0,n.jsx)(u.A,{className:"scope-ae85cf8b",icon:"modal-close-big","data-testid":"use-svg"})}),(0,n.jsxs)("div",{className:"gang-sheet-info-modal__image-box scope-ae85cf8b",children:[(0,n.jsx)("div",{className:"gang-sheet-info-modal__image-bg scope-ae85cf8b"}),f?null:(0,n.jsx)("img",{className:"gang-sheet-info-modal__image scope-ae85cf8b",src:gangSheetDesktopImage(),alt:"Sample image 1"}),null,f&&1?(0,n.jsx)("img",{className:"gang-sheet-info-modal__image scope-ae85cf8b",src:gangSheetMobileBigImage(),alt:"Sample image 1"}):null]}),(0,n.jsxs)("div",{className:(0,d.cn)("gang-sheet-info-modal__info scope-ae85cf8b",f&&"gang-sheet-info-modal__info--wide-margin"),children:[(0,n.jsx)(u.A,{className:"gang-sheet-info-modal__logo scope-ae85cf8b",icon:"jiffy-transfers-inline","data-testid":"gang-sheet-info-modal-logo"}),(0,n.jsxs)("div",{className:"gang-sheet-info-modal__title gang-sheet-info-modal__title--wide-margin scope-ae85cf8b",children:[(0,n.jsx)("p",{className:"gang-sheet-info-modal__title-text scope-ae85cf8b",children:"JiffyTransfers supports"}),(0,n.jsx)("p",{className:"gang-sheet-info-modal__title-text scope-ae85cf8b",children:"Gang Sheet printing!"})]}),(0,n.jsxs)("button",{className:"gang-sheet-info-modal__button gang-sheet-info-modal__button--white scope-ae85cf8b",type:"button",onClick:redirectToGangSheetUrl,"data-testid":"gang-sheet-info-modal-button",children:[" ","Upload a Gang Sheet"," "]}),(0,n.jsx)("span",{className:"gang-sheet-info-modal__small-text scope-ae85cf8b",children:"or"}),(0,n.jsxs)("button",{className:"gang-sheet-info-modal__button gang-sheet-info-modal__button--pink scope-ae85cf8b",type:"button",onClick:redirectToDtfUrl,"data-testid":"gang-sheet-info-modal-button-1",children:[" ","Upload single images"," "]}),(0,n.jsxs)("div",{className:"gang-sheet-info-modal__info-text gang-sheet-info-modal__info-text--wide-margin scope-ae85cf8b",children:[" ","What is"," ",(0,n.jsxs)("a",{className:"gang-sheet-info-modal__info-link scope-ae85cf8b",href:jiffyTransferLink(),onClick:closeModal,"data-testid":"gang-sheet-info-modal-info-link",children:[" ","Jiffy Transfers?"," "]})]})]})]})})}))}},627194(e,t,r){"use strict";r.d(t,{S:()=>ImagingPromise});var n=r(483134);function ImagingPromise(e){var t,r=e.payload,o=e.className;return(null==r||null==(t=r.bullets)?void 0:t.length)&&r.learnMoreHref?(0,n.jsxs)("div",{className:"imaging-promise ".concat(null!=o?o:""),"data-testid":"imaging-promise",children:[r.heading?(0,n.jsx)("p",{className:"imaging-promise__heading","data-testid":"imaging-promise-heading",children:r.heading}):null,(0,n.jsx)("ul",{className:"imaging-promise__list",children:r.bullets.map(function(e,t){return(0,n.jsx)("li",{className:"imaging-promise__item","data-testid":"imaging-promise-bullet-".concat(t),children:e},e)})}),(0,n.jsx)("a",{className:"imaging-promise__learn-more",href:r.learnMoreHref,"aria-label":r.learnMoreAriaLabel,"data-testid":"imaging-promise-learn-more",children:r.learnMoreLabel})]}):null}},566623(e,t,r){"use strict";r.d(t,{A:()=>Color});var n=r(483134),o=r(997252),i=r(379658),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Color(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,l.useDtfStore)();function letterNumberArtwork(){return r.letterNumberArtwork}function pickerStyle(){return(0,o.cn)("jersey-numbers-color__picker",{"jersey-numbers-color__picker--solid":"solid"===letterNumberArtwork().style})}function handleSelect(e){r.updateArtworkValues({index:0,color:e})}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("jersey-numbers-color",t.className),children:(0,n.jsx)(i.A,{value:letterNumberArtwork().color,colors:[{name:"Black",value:"#000000"},{name:"White",value:"#FFFFFF"},{name:"Navy",value:"#03283A"},{name:"Red",value:"#D50132"},{name:"Gold",value:"#FCA311"},{name:"Green",value:"#016B3F"},{name:"Purple",value:"#514689"},{name:"Royal",value:"#082D99"},{name:"Gray",value:"#82878D"},{name:"Columbia",value:"#6887B7"},{name:"Orange",value:"#F14329"},{name:"Vegas Gold",value:"#ABA275"},{name:"Yellow",value:"#F8DC02"}],showColorLabel:!0,onChange:handleSelect,slots:{"picker-preview":function(e){var t=e.color;return(0,n.jsxs)("div",{className:pickerStyle(),style:{color:(null==t?void 0:t.hex)||t||letterNumberArtwork().color},children:[" ","12345",(0,n.jsx)("br",{}),"67890"," "]})}},"data-testid":"color-picker"})}))}},878149(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(595109),l=r(18339),c=r(538896),u=r(958469),d=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.className,r=_object_without_properties(e,["className"]),p=_sliced_to_array((0,o.useState)(null),2),f=p[0],_=p[1],h=_sliced_to_array((0,o.useState)(!1),2),m=h[0],g=h[1],b=(0,o.useRef)(null),y=[{label:"4 Inches",value:4},{label:"6 Inches",value:6},{label:"8 Inches",value:8},{label:"10 Inches",value:10}],v=(0,c.useDtfStore)();function letterNumberArtwork(){return v.letterNumberArtwork}function isSelected(e){return letterNumberArtwork().height===e.value&&!m}function loadFromConfig(){return v.loadFromConfig}function dtfMinHeight(){return v.dtfMinHeight}function dtfMaxHeight(){return v.dtfMaxHeight}function isValidCustomSize(){return Number(letterNumberArtwork().height)>=dtfMinHeight()&&Number(letterNumberArtwork().height)<=dtfMaxHeight()}function updateHeight(e){var t=(0,i.b)(_object_spread_props(_object_spread({},letterNumberArtwork()),{height:e})),r=Number(e)>=dtfMinHeight()&&Number(e)<=dtfMaxHeight();v.updateArtworkValues({index:0,isValid:r,height:e,sizes:t}),r&&Object.keys(t).length&&v.getArtworksPricing(),v.updateJerseyNumberPdpDates()}function handleSelect(e){g(!1),_(null),updateHeight(e.value)}function handleCustomSelect(){v.updateArtworkValues({index:0,isValid:!1}),g(!0)}function handleCustomInputChange(e,t){clearTimeout(b.current);var r=e.target.value.match(/(\d+(\.\d*)?)/),n=(r=r?r[0]:"0").split(".");n[1]&&n[1].length>2&&(r=Number([n[0],n[1].slice(0,2)].join("."))),e.target.value=r,b.current=setTimeout(function(){t(r)},1e3)}var w=letterNumberArtwork().height,j=(0,o.useRef)(w);return(0,o.useEffect)(function(){j.current&&null===w&&(_(null),g(!1)),j.current=w},[w]),(0,o.useEffect)(function(){var e=y.find(function(e){return e.value===letterNumberArtwork().height});loadFromConfig()||e||(g(!0),_(letterNumberArtwork().height));var t=isValidCustomSize();v.updateArtworkValues({index:0,isValid:t})},[]),(0,o.useEffect)(function(){return function(){clearTimeout(b.current)}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,d.cn)("jersey-numbers-height",t),children:[(0,n.jsxs)("div",{className:"jersey-numbers-height__sizes",children:[(0,u.p)(y,function(e){return(0,n.jsx)("button",{type:"button",className:(0,d.cn)("jersey-numbers-height__size",isSelected(e)&&"jersey-numbers-height__size--selected"),"aria-pressed":isSelected(e),onClick:function(){handleSelect(e)},"data-testid":"height-div",children:e.label},e.value)}),(0,n.jsxs)("button",{type:"button",className:(0,d.cn)("jersey-numbers-height__size",m&&"jersey-numbers-height__size--selected"),"aria-pressed":m,onClick:function(){handleCustomSelect()},"data-testid":"height-div-1",children:[" ","Custom size"," "]})]}),m?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"jersey-numbers-height__label",children:"Height (inches)"}),(0,n.jsx)("input",{className:"jersey-numbers-height__input",value:f,onInput:function(e){_(e.target.value),handleCustomInputChange(e,updateHeight)},maxLength:"4",type:"tel","data-testid":"jersey-numbers-height-input"}),f&&!isValidCustomSize()?(0,n.jsxs)(l.A,{className:"jersey-numbers-height__error","data-testid":"jersey-numbers-height-error",children:["Please enter a valid height between ",dtfMinHeight()," and ",dtfMaxHeight()," inches"]}):null]}):null]}))}},86560(e,t,r){"use strict";r.d(t,{A:()=>JerseyNumbers});var n=r(483134),o=r(293534),i=r(414909),l=r(376978),c=r(878149),u=r(566623),d=r(367714),p=r(869999),f=r(695603);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function JerseyNumbers(){var e=_sliced_to_array((0,o.useState)(!1),2),t=e[0],r=e[1];function toggleSizeChartModal(){r(!t)}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"jersey-numbers",children:[(0,n.jsx)(i.A,{step:1,label:"Select Style",initiallyOpen:!0,"data-testid":"letter-numbers-step",children:(0,n.jsx)(l.A,{"data-testid":"styles"})}),(0,n.jsx)(i.A,{step:2,label:"Select Height",slots:{action:function(){return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("button",{type:"button",className:"jersey-numbers__size-guide-link",onClick:function(e){e.stopPropagation(),toggleSizeChartModal()},"data-testid":"jersey-numbers-size-guide-link",children:"Size Guide"})})}},"data-testid":"letter-numbers-step-1",children:(0,n.jsx)(c.A,{"data-testid":"height"})}),(0,n.jsx)(i.A,{step:3,label:"Select Color","data-testid":"letter-numbers-step-2",children:(0,n.jsx)(u.A,{"data-testid":"color"})}),(0,n.jsx)(i.A,{step:4,label:"Preview","data-testid":"letter-numbers-step-3",children:(0,n.jsx)(d.A,{"data-testid":"preview"})}),(0,n.jsx)(i.A,{step:5,label:"Select Quantity","data-testid":"letter-numbers-step-4",children:(0,n.jsx)(p.A,{"data-testid":"quantity"})})]}),t?(0,n.jsx)(f.A,{onClose:toggleSizeChartModal,"data-testid":"size-chart-modal"}):null]})}},367714(e,t,r){"use strict";r.d(t,{A:()=>Preview});var n=r(483134),o=r(293534),i=r(379658),l=r(538896),c=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Preview(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,l.useDtfStore)(),u=_sliced_to_array((0,o.useState)(!1),2),d=u[0],p=u[1],f=_sliced_to_array((0,o.useState)(void 0),2),_=f[0],h=f[1];function letterNumberArtwork(){return r.letterNumberArtwork}function currentColor(){return letterNumberArtwork().color||"#FFFFFF"}function previewStyle(){return(0,c.cn)("jersey-numbers-preview__numbers","jersey-numbers-preview__numbers--".concat(letterNumberArtwork().style))}function handleSelect(e){p(!0),h(e)}return(0,o.useEffect)(function(){d||h("#FFFFFF"===currentColor()?"#000000":"#FFFFF0")},[d,currentColor()]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,c.cn)("jersey-numbers-preview",t.className),children:[(0,n.jsx)("div",{className:"jersey-numbers-preview__box",style:{backgroundColor:_},children:(0,n.jsxs)("span",{className:previewStyle(),style:{color:currentColor()},children:[(0,n.jsx)("span",{children:"12345"}),(0,n.jsx)("div",{className:"jersey-numbers-preview__sep"}),(0,n.jsx)("span",{children:"67890"})]})}),(0,n.jsx)("p",{className:"jersey-numbers-preview__label",children:"Change Background Color"}),(0,n.jsx)(i.A,{value:_,colors:["#000000","#FFFFF0","#4169E1","#DC143C","#228B22","#671EA1","#708090","#FFD700","#191970","#800020"],onChange:handleSelect,"data-testid":"color-picker"}),(0,n.jsx)("p",{className:"jersey-numbers-preview__info-text",children:"Preview Only: Background Color Won't Be Printed"})]}))}},869999(e,t,r){"use strict";r.d(t,{A:()=>JerseyNumbersQuantity});var n=r(483134),o=r(52382),i=r.n(o),l=r(293534),c=r(997252),u=r(595109),d=r(538896),p=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function JerseyNumbersQuantity(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,d.useDtfStore)();function letterNumberArtwork(){return r.letterNumberArtwork}var o=(0,l.useRef)(i()(function(){letterNumberArtwork().quantity&&r.getArtworksPricing()},500));function handleChange(e,t){var n=t.target.value.replace(/[^0-9]/g,"").replace(/^0/,"");Number(n)>0&&(n=Math.min(Number(n),999)),t.target.value=n;var i=Object.entries(_object_spread_props(_object_spread({},letterNumberArtwork().quantities),_define_property({},e,n))).reduce(function(e,t){var r=_sliced_to_array(t,2),n=r[0],o=r[1];return o&&(e[n]=o),e},{}),l=Object.values(i).reduce(function(e,t){return e+Number(t)},0),c=letterNumberArtwork().style||"none",d=(0,u.b)(_object_spread_props(_object_spread({},letterNumberArtwork()),{quantities:i,style:c})),p=Object.values(d).reduce(function(e,t){return e+t.width},0).toFixed(2);r.updateArtworkValues({index:0,quantities:i,quantity:l,sizes:d,width:p}),o.current()}function handleBlur(){r.updatePdpDates()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,c.cn)("jersey-numbers-quantity",t.className),children:(0,p.p)(10,function(e){return(0,n.jsxs)("div",{className:"jersey-numbers-quantity__field",children:[(0,n.jsxs)("label",{className:"jersey-numbers-quantity__label",htmlFor:"input-".concat(e),"data-testid":"jersey-numbers-quantity-label",children:["#",e-1]}),(0,n.jsx)("input",{className:"jersey-numbers-quantity__input",id:"input-".concat(e),value:letterNumberArtwork().quantities[e-1],maxLength:3,type:"tel",onInput:function(t){handleChange(e-1,t)},onBlur:handleBlur,"data-testid":"jersey-numbers-quantity-input"})]},e)})}))}},376978(e,t,r){"use strict";r.d(t,{A:()=>JerseyNumbersStyle});var n=r(483134),o=r(997252),i=r(595109),l=r(538896),c=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function JerseyNumbersStyle(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,l.useDtfStore)();function letterNumberArtwork(){return r.letterNumberArtwork}function handleSelect(e){var t=e.value,n=(0,i.b)(_object_spread_props(_object_spread({},letterNumberArtwork()),{style:t}));r.updateArtworkValues({index:0,style:t,sizes:n}),Object.keys(n).length&&r.getArtworksPricing(),r.updateJerseyNumberPdpDates()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("jersey-numbers-style",t.className),children:(0,c.p)([{label:"Solid Numbers",value:"solid"},{label:"Outline Numbers",value:"outline"},{label:"Promesh",value:"promesh"},{label:"Soccer League",value:"soccer-league"},{label:"Octin Sports",value:"octin-sports"},{label:"Rueckwarzsalto",value:"rueckwarzsalto"},{label:"Varsity Team",value:"varsity-team"}],function(e){return(0,n.jsxs)("button",{type:"button",className:(0,o.cn)({"jersey-numbers-style__item":!0,"jersey-numbers-style__item--selected":e.value===letterNumberArtwork().style}),"aria-pressed":e.value===letterNumberArtwork().style,onClick:function(){handleSelect(e)},"data-testid":"styles-div",children:[(0,n.jsxs)("div",{className:(0,o.cn)(_define_property({"jersey-numbers-style__text":!0},"jersey-numbers-style__text--".concat(e.value),!0)),children:[" ","12345",(0,n.jsx)("br",{}),"67890"," "]}),(0,n.jsx)("span",{className:"jersey-numbers-style__label",children:e.label})]},e.value)})}
1))}},595109(e,t,r){"use strict";function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r.d(t,{b:()=>calculateSizes});var n={solid:{0:.654394693200663,1:.288557213930348,2:.654394693200663,3:.654394693200663,4:.735323383084577,5:.654394693200663,6:.654394693200663,7:.654394693200663,8:.654394693200663,9:.654394693200663},outline:{0:.654394693200663,1:.288557213930348,2:.654394693200663,3:.654394693200663,4:.734991708126036,5:.654394693200663,6:.654394693200663,7:.654394693200663,8:.654394693200663,9:.654394693200663},promesh:{0:.42,1:.25,2:.42,3:.42,4:.5233333333333333,5:.42,6:.42,7:.42,8:.42,9:.42},emilio:{0:.654394693200663,1:.288557213930348,2:.654394693200663,3:.654394693200663,4:.734991708126036,5:.654394693200663,6:.654394693200663,7:.654394693200663,8:.654394693200663,9:.654394693200663},squaresbold:{0:.912037037037037,1:.628571428571428,2:.912037037037037,3:.912037037037037,4:.952380952380952,5:.912037037037037,6:.912037037037037,7:.912037037037037,8:.912037037037037,9:.912037037037037},beantown:{0:.818181818181818,1:.459595959595959,2:.818181818181818,3:.818181818181818,4:.848484848484848,5:.818181818181818,6:.818181818181818,7:.818181818181818,8:.818181818181818,9:.818181818181818},octinsports:{0:.657142857142857,1:.366666666666666,2:.657142857142857,3:.657142857142857,4:.657142857142857,5:.657142857142857,6:.657142857142857,7:.657142857142857,8:.657142857142857,9:.657142857142857},rueckwarzsalto:{0:.471615720524017,1:.247787610619469,2:.471615720524017,3:.471615720524017,4:.5,5:.471615720524017,6:.471615720524017,7:.471615720524017,8:.471615720524017,9:.471615720524017},facon:{0:.90497737556561,1:.627906976744186,2:.90497737556561,3:.90497737556561,4:.866666666666666,5:.90497737556561,6:.90497737556561,7:.90497737556561,8:.90497737556561,9:.90497737556561},varsityteam:{0:.642857142857142,1:.361904761904761,2:.642857142857142,3:.642857142857142,4:.642857142857142,5:.642857142857142,6:.642857142857142,7:.642857142857142,8:.642857142857142,9:.642857142857142},soccerleague:{0:.653846153846153,1:.447115384615384,2:.653846153846153,3:.653846153846153,4:.620192307692307,5:.653846153846153,6:.653846153846153,7:.653846153846153,8:.653846153846153,9:.653846153846153},niconne:{0:.946564885496183,1:.552,2:.775193798449612,3:.946564885496183,4:.8515625,5:.887218045112781,6:.946564885496183,7:.745901639344262,8:.946564885496183,9:.946564885496183}},o=Object.keys(n);function calculateSizes(e){var t=e.style,r=e.height,i=e.quantities,l="none"===t?o[0]:t.replace(/-/g,""),c=n[l];c||console.warn("Unknown jersey style: ".concat(l,", falling back to default"));var u=null!=c?c:n[o[0]];return Object.keys(i).reduce(function(e,t){return t?_object_spread_props(_object_spread({},e),_define_property({},t,{height:r,width:u[Number(t)]*r})):e},{})}},414909(e,t,r){"use strict";r.d(t,{A:()=>LetterNumbersStep});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function LetterNumbersStep(e){var t,r=e.label,u=e.step,d=e.initiallyOpen,p=void 0!==d&&d,f=e.children,_=e.slots,h=_object_without_properties(e,["label","step","initiallyOpen","children","slots"]),m=(0,c.useDtfStore)(),g=_sliced_to_array((0,o.useState)(p),2),b=g[0],y=g[1];function isLetters(){return m.isLetters}function letterHeightAndMaxLength(){var e=m.letterNumberArtwork||{},t=e.height,r=e.maxLength;return!!(t&&r)}function loadFromConfig(){return m.loadFromConfig}function handleToggle(){y(!b)}var v=m.letterNumberArtwork,w=null==v?void 0:v.style,j=null==v?void 0:v.font,k=null==v?void 0:v.height,x=null==v?void 0:v.color;null==v||v.maxLength;var S=letterHeightAndMaxLength(),O=(0,o.useRef)(void 0);(0,o.useEffect)(function(){var e=O.current;[2].includes(u)&&(!e&&w&&y(!0),e&&null===w&&!p&&y(!1)),O.current=w},[w]);var P=(0,o.useRef)(void 0);(0,o.useEffect)(function(){if(isLetters()){var e=P.current;[3].includes(u)&&(!e&&j&&y(!0),e&&null===j&&!p&&y(!1)),P.current=j}},[j,isLetters()]);var A=(0,o.useRef)(void 0);(0,o.useEffect)(function(){if(isLetters()){var e=A.current;[4].includes(u)&&!e&&S&&y(!0),A.current=S}},[S,isLetters()]),(0,o.useEffect)(function(){isLetters()&&[4].includes(u)&&(null==v?void 0:v.height)===null&&(null==v?void 0:v.maxLength)===null&&(null==v?void 0:v.color)===null&&y(!1)},[JSON.stringify(v)]);var C=(0,o.useRef)(void 0);(0,o.useEffect)(function(){if(isLetters()){var e=C.current;[5].includes(u)&&(!e&&x&&y(!0),e&&null===x&&!p&&y(!1)),C.current=x}},[x,isLetters()]);var I=(0,o.useRef)(void 0);(0,o.useEffect)(function(){if(!isLetters()){var e=I.current;[3].includes(u)&&(!e&&k&&y(!0),e&&null===k&&!p&&y(!1)),I.current=k}},[k,isLetters()]);var E=(0,o.useRef)(void 0);return(0,o.useEffect)(function(){if(!isLetters()){var e=E.current;[4,5].includes(u)&&(!e&&x&&y(!0),e&&null===x&&!p&&y(!1)),E.current=x}},[x,isLetters()]),(0,o.useEffect)(function(){loadFromConfig()||y(!0)},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},h),{className:(0,i.cn)("letter-numbers-step",h.className),children:[(0,n.jsxs)("div",{className:"letter-numbers-step__title",role:"button",tabIndex:0,"aria-expanded":b,onClick:handleToggle,onKeyDown:function(e){e.target===e.currentTarget&&("Enter"===e.key||" "===e.key)&&
1(e.preventDefault(),handleToggle())},"data-testid":"letter-numbers-step-title",children:[(0,n.jsxs)("div",{className:"letter-numbers-step__label",children:[" ","Step ",u,": ",(0,n.jsx)("span",{className:"letter-numbers-step__name",children:r}),b?null==_||null==(t=_.action)?void 0:t.call(_):null]}),(0,n.jsx)(l.A,{className:(0,i.cn)("letter-numbers-step__icon",b&&"letter-numbers-step__icon--opened"),icon:"chevron-down","data-testid":"use-svg"})]}),(0,n.jsx)("div",{className:"letter-numbers-step__content",style:{display:b?void 0:"none"},children:f})]}))}},56419(e,t,r){"use strict";r.d(t,{A:()=>AddLetters});var n=r(483134),o=r(293534),i=r(997252),l=r(776323),c=r(723433),u=r(538896),d=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function AddLetters(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,u.useDtfStore)(),p=_sliced_to_array((0,o.useState)([{value:""}]),2),f=p[0],_=p[1],h=_sliced_to_array((0,o.useState)(null),2),m=(h[0],h[1]),g=(0,o.useRef)(null),b=(0,o.useRef)(f);b.current=f;var y=(0,o.useRef)(null),v=(0,o.useRef)(f.length);function letterNumberArtwork(){return r.letterNumberArtwork}function letterPreviewMessages(){return r.letterPreviewMessages}function inputStyles(e,t){return(0,i.cn)("add-letters__input",letterNumberArtwork().textIndex===e&&!!t.value&&"add-letters__input--selected")}function setArtworkDefaultValues(){r.updateArtworkValues({index:0,textIndex:0,texts:[]}),r.generateLettersPreview()}function handleChange(e,t){var n=t.target.value;m(e),n||r.setLetterPreviewMessage({textIndex:e,message:null});var o=b.current.map(function(e){return e.value}
1),i=o.filter(Boolean).length;r.updateArtworkValues({index:0,textIndex:e,texts:o,quantity:i}),n&&r.generateLettersPreview()}function triggerChange(e,t){clearTimeout(g.current),g.current=setTimeout(function(){t.target.value&&r.setLetterPreviewLoading(!0),handleChange(e,t)},500)}function handleInput(e,t){var r=t.target.value.trim();if(""!==r){var n=_to_consumable_array(f);n[e].value=r,_(n)}}function removeTextBox(e){if(1===f.length){_([{value:""}]),r.clearLetterPreviewMessages(),setArtworkDefaultValues();return}r.removeLetterPreviewMessage(e);var t=f.filter(function(t,r){return r!==e});_(t);var n=e,o=letterNumberArtwork().textIndex,i=t.map(function(e){return e.value});if(n<o&&(n=o-1),!i[n]){var l=_to_consumable_array(i).reverse();n=i.length-1-l.findIndex(Boolean)}1!==t.length||t[0].value||(i=[]);var c=i.filter(Boolean).length;r.updateArtworkValues({index:0,textIndex:n,texts:i,quantity:c}),r.generateLettersPreview()}function handleFocus(e){var t=f[e];m(e),t.value&&(r.updateArtworkValues({index:0,textIndex:e}),r.generateLettersPreview())}function addTextBox(){var e=f.length-1;if(f[e].value){var t=_to_consumable_array(f).concat([{value:""}]);_(t);var n=t.map(function(e){return e.value});r.updateArtworkValues({index:0,textIndex:e,texts:n}),r.generateLettersPreview({useDebounce:!1})}}function handleBlur(e){m(e);var t=f.map(function(e){return e.value}),n=t.filter(Boolean).length;r.updateArtworkValues({index:0,texts:t,quantity:n})}return(0,o.useEffect)(function(){var e=letterNumberArtwork().style;y.current&&null===e&&(_([{value:""}]),r.clearLetterPreviewMessages()),y.current=e},[JSON.stringify(letterNumberArtwork().style)]),(0,o.useEffect)(function(){var e=v.current,t=f.length;if(v.current=t,t>e){var r=t-1;queueMicrotask(function(){var e=document.getElementById("textbox-".concat(r));e&&e.focus()})}},[f.length]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("add-letters",t.className),children:[(0,n.jsxs)("div",{className:"add-letters__content",children:[(0,d.p)(f,function(e,t){return(0,n.jsxs)("div",{className:"add-letters__name-wrapper",children:[(0,n.jsxs)("div",{className:"add-letters__input-row",children:[(0,n.jsx)("div",{className:"add-letters__input-wrapper",children:(0,n.jsx)("input",{className:(0,i.cn)(inputStyles(t,e)),id:"textbox-".concat(t),value:e.value,onInput:function(e){var r=_to_consumable_array(f);r[t].value=e.target.value.trim(),_(r),handleInput(t,e)},type:"text",onFocus:function(){handleFocus(t)},onBlur:function(){handleBlur(t)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),addTextBox(e))},onKeyUp:function(e){triggerChange(t,e)},"data-testid":"add-letters-input"})}),(0,n.jsx)("button",{className:"add-letters__button add-letters__button--remove",type:"button",onClick:function(){removeTextBox(t)},"data-testid":"add-letters-button",children:(0,n.jsx)(c.A,{className:"add-letters__remove-icon",icon:"modal-close","data-testid":"add-letters-remove-icon"})})]}),letterPreviewMessages()[t]?(0,n.jsx)("div",{className:"add-letters__error",children:letterPreviewMessages()[t]}):null]},t)}),(0,n.jsx)("div",{className:"add-letters__new-name",children:(0,n.jsxs)("button",{className:"add-letters__button",type:"button",onClick:addTextBox,"data-testid":"add-letters-button-1",children:[" ","+ Add another name"," "]})})]}),(0,n.jsx)("div",{className:"add-letters__content",children:(0,n.jsx)(l.A,{"data-testid":"preview"})})]}))}},331410(e,t,r){"use strict";r.d(t,{A:()=>Color});var n=r(483134),o=r(997252),i=r(379658),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Color(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,l.useDtfStore)();function letterNumberArtwork(){return r.letterNumberArtwork}function handleSelect(e){r.updateArtworkValues({index:0,color:e}),r.generateLettersPreview()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("color",t.className),children:(0,n.jsx)(i.A,{value:letterNumberArtwork().color,colors:[{name:"Black",value:"#000000"},{name:"White",value:"#FFFFFF"},{name:"Navy",value:"#03283A"},{name:"Red",value:"#D50132"},{name:"Gold",value:"#FCA311"},{name:"Green",value:"#016B3F"},{name:"Purple",value:"#514689"},{name:"Royal",value:"#082D99"},{name:"Gray",value:"#82878D"},{name:"Columbia",value:"#6887B7"},{name:"Orange",value:"#F14329"},{name:"Vegas Gold",value:"#ABA275"},{name:"Yellow",value:"#F8DC02"}],showColorLabel:!0,onChange:handleSelect,"data-testid":"color-picker"})}))}},945808(e,t,r){"use strict";r.d(t,{A:()=>Letters});var n=r(483134),o=r(997252),i=r(414909),l=r(51043),c=r(41813),u=r(59097),d=r(331410),p=r(56419);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Letters(e){return(0,n.jsxs)("div",_object_spread_props(_object_spread({},e),{className:(0,o.cn)("letters",e.className),children:[(0,n.jsx)(i.A,{step:1,label:"Select Style",initiallyOpen:!0,"data-testid":"letter-numbers-step",children:(0,n.jsx)(c.A,{"data-testid":"styles"})}),(0,n.jsx)(i.A,{step:2,label:"Select Font","data-testid":"letter-numbers-step-1",children:(0,n.jsx)(l.A,{fonts:[{label:"Promesh",value:"promesh"},{label:"Emilio",value:"emilio"},{label:"Niconne",value:"niconne"},{label:"Squares",value:"squares-bold"},{label:"Beantown",value:"beantown"},{label:"Octin Sports",value:"octin-sports"},{label:"Soccer League",value:"soccer-league"},{label:"Rueckwarzsalto",value:"rueckwarzsalto"},{label:"Facon",value:"facon"},{label:"Varsity Team",value:"varsity-team"}],"data-testid":"letters-font"})}),(0,n.jsx)(i.A,{step:3,label:"Select Size","data-testid":"letter-numbers-step-2",children:(0,n.jsx)(u.A,{"data-testid":"sizes"})}),(0,n.jsx)(i.A,{step:4,label:"Select Color","data-testid":"letter-numbers-step-3",children:(0,n.jsx)(d.A,{"data-testid":"color"})}),(0,n.jsx)(i.A,{step:5,label:"Add Name/Word","data-testid":"letter-numbers-step-4",children:(0,n.jsx)(p.A,{"data-testid":"add-letters"})})]}))}},51043(e,t,r){"use strict";r.d(t,{A:()=>LettersFont});var n=r(483134),o=r(997252),i=r(538896),l=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function LettersFont(e){var t=e.fonts,r=_object_without_properties(e,["fonts"]),c=(0,i.useDtfStore)();function letterNumberArtwork(){return c.letterNumberArtwork}function handleSelect(e){var t=e.value;c.updateArtworkValues({index:0,font:t}),c.updateAllLetterPreviews()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("letters-font",r.className),children:(0,l.p)(t,function(e){return(0,n.jsxs)("button",{type:"button",className:(0,o.cn)("letters-font__item",letterNumberArtwork().font===e.value&&"letters-font__item--selected"),"aria-pressed":letterNumberArtwork().font===e.value,onClick:function(){handleSelect(e)},"data-testid":"letters-font-div",children:[(0,n.jsxs)("div",{className:(0,o.cn)("letters-font__text","letters-font__text--".concat(e.value)),children:[" ","ABCD"," "]}),(0,n.jsx)("span",{className:"letters-font__label",children:e.label})]},e.value)})}))}},776323(e,t,r){"use strict";r.d(t,{A:()=>Preview});var n=r(483134),o=r(293534),i=r(997252),l=r(923057),c=r(379658),u=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Preview(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.className,r=_object_without_properties(e,["className"]),d=["#000000","#FFFFF0","#4169E1","#DC143C","#228B22","#671EA1","#708090","#FFD700","#CC5500","#191970","#800020"],p="straight",f=_sliced_to_array((0,o.useState)(!1),2),_=f[0],h=f[1],m=(0,u.useDtfStore)(),g=_sliced_to_array((0,o.useState)(d[1]),2),b=g[0],y=g[1],v=_sliced_to_array((0,o.useState)("preview__box--".concat(m.letterNumberArtwork.style||p)),2),w=v[0],j=v[1];function letterNumberArtwork(){return m.letterNumberArtwork}function imagePreview(){var e=letterNumberArtwork(),t=e.style,r=e.url;return t?r:"https://jiffy.imgix.net/gen/letters-pdp/".concat(p,"-2.png")}function letterPreviewLoading(){return m.letterPreviewLoading}function dtfMaxHeight(){return m.dtfMaxHeight}function imageScale(){var e=letterNumberArtwork(),t=e.sizes,r=e.style,n=(null==t?void 0:t[letterNumberArtwork().textIndex])||(null==t?void 0:t[void 0]);if("vertical"===r||!n)return"scale(1)";var o=n.height/dtfMaxHeight();return o>1&&(o=1),"scale(1, ".concat(o,")")}var k=letterNumberArtwork().color||"#000000";function handleSelect(e){h(!0),y(e)}function handleImageLoad(){m.setLetterPreviewLoading(!1),j("preview__box--".concat(letterNumberArtwork().style||p))}return(0,o.useEffect)(function(){_||y("#FFFFFF"===k?"#000000":"#FFFFF0")},[_,k]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("preview",t),style:{"--1975d184-imageScale":imageScale()},children:[(0,n.jsxs)("div",{className:(0,i.cn)("preview__box",w),style:{backgroundColor:b},children:[imagePreview()?(0,n.jsx)("img",{className:"preview__image",src:imagePreview(),alt:"preview",onLoad:handleImageLoad}):null,letterPreviewLoading()?(0,n.jsx)(l.A,{className:"preview__spinner","data-testid":"preview-spinner"}):null]}),(0,n.jsx)("p",{className:"preview__label",children:"Change Background Color"}),(0,n.jsx)(c.A,{value:b,colors:d,onChange:handleSelect,"data-testid":"color-picker"}),(0,n.jsx)("p",{className:"preview__preview-notice",children:"Preview Only: Background Color Won't Be Printed"})]}))}},59097(e,t,r){"use strict";r.d(t,{A:()=>Sizes});var n=r(483134),o=r(293534),i=r(18339),l=r(538896),c=r(997252),u=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Sizes(e){_object_destructuring_empty(e);var t=_extends({},e),r=[{label:"2 Inches",value:2},{label:"2.5 Inches",value:2.5},{label:"3 Inches",value:3}],d=r.map(function(e){return e.value}),p=[{label:"9 Inches",value:9},{label:"11 Inches",value:11},{label:"14 Inches",value:14}],f=p.map(function(e){return e.value}),_=(0,o.useRef)(null),h=_sliced_to_array((0,o.useState)(null),2),m=h[0],g=h[1],b=_sliced_to_array((0,o.useState)(null),2),y=b[0],v=b[1],w=(0,o.useRef)(m);w.current=m;var j=(0,o.useRef)(y);j.current=y;var k=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,l.useDtfStore)();function letterNumberArtwork(){return S.letterNumberArtwork}function isHeightSelected(e){return letterNumberArtwork().height===e.value&&!letterNumberArtwork().showCustomHeight}function isMaxLengthSelected(e){return letterNumberArtwork().maxLength===e.value&&!letterNumberArtwork().showCustomMaxLength}function showCustomHeight(){return letterNumberArtwork().showCustomHeight}function showCustomMaxLength(){return letterNumberArtwork().showCustomMaxLength}function dtfMinHeight(){return S.dtfMinHeight}function dtfMaxHeight(){return S.dtfMaxHeight}function dtfMinWidth(){return S.dtfMinWidth}function dtfMaxWidth(){return S.dtfMaxWidth}function isValidLetterHeight(){var e,t=null==(e=letterNumberArtwork())?void 0:e.height,r=null!=t?t:w.current;return null!=r&&r>=dtfMinHeight()&&r<=dtfMaxHeight()}function isValidLetterMaxLength(){var e,t=null==(e=letterNumberArtwork())?void 0:e.maxLength,r=null!=t?t:j.current;return null!=r&&r>=dtfMinWidth()&&r<=dtfMaxWidth()}function updateHeight(e){var t=e.value;t>dtfMaxHeight()&&(t=dtfMaxHeight());var r=t>=dtfMinHeight()&&t<=dtfMaxHeight()&&isValidLetterMaxLength();S.updateArtworkValues({index:0,isValid:r,height:t}),r&&S.updateAllLetterPreviews()}function updateMaxLength(e){var t=e.value;t>dtfMaxWidth()&&(t=dtfMaxWidth());var r=isValidLetterHeight()&&t>=dtfMinWidth()&&t<=dtfMaxWidth();S.updateArtworkValues({index:0,isValid:r,maxLength:t}),r&&S.updateAllLetterPreviews()}function handleHeightSet(e){g(e.value),S.updateArtworkValues({index:0,showCustomHeight:!1}),updateHeight(e)}function handleMaxLengthSet(e){v(e.value),S.updateArtworkValues({index:0,showCustomMaxLength:!1}),updateMaxLength(e)}function handleCustomHeight(){S.updateArtworkValues({index:0,isValid:!1,showCustomHeight:!0,height:null})}function handleCustomMaxLength(){S.updateArtworkValues({index:0,isValid:!1,showCustomMaxLength:!0,maxLength:null})}function handleCustomInputChange(e,t){clearTimeout(_.current);var r=e.target.value.match(/(\d+(\.\d*)?)/),n=(r=r?r[0]:"0").split(".");n[1]&&n[1].length>2&&(r=Number([n[0],n[1].slice(0,2)].join("."))),_.current=setTimeout(function(){t({value:Number(r)})},1e3)}return(0,o.useEffect)(function(){var e=letterNumberArtwork().height;k.current&&null===e&&g(null),k.current=e},[S.letterNumberArtwork.height]),(0,o.useEffect)(function(){var e=letterNumberArtwork().maxLength;x.current&&null===e&&v(null),x.current=e},[S.letterNumberArtwork.maxLength]),(0,o.useEffect)(function(){var e=letterNumberArtwork(),t=e.height,r=e.maxLength;if(t&&r){var n=Number(t),o=Number(r),i=Number(dtfMinHeight()),l=Number(dtfMaxHeight()),c=Number(dtfMinWidth()),u=Number(dtfMaxWidth()),p=!1,_=!1;d.includes(t)||(p=!0),f.includes(r)||(_=!0),S.updateArtworkValues({index:0,isValid:n>=i&&n<=l&&o>=c&&o<=u,showCustomHeight:p,showCustomMaxLength:_})}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,c.cn)("sizes",t.className),children:[(0,n.jsx)("h3",{children:"Letter Height"}),(0,n.jsxs)("div",{className:"sizes__height",children:[(0,u.p)(r,function(e){return(0,n.jsx)("button",{type:"button",className:(0,
1c.cn)({sizes__size:!0,"sizes__size--selected":isHeightSelected(e)}),"aria-pressed":isHeightSelected(e),onClick:function(){handleHeightSet(e)},"data-testid":"sizes-div",children:e.label},e.value)}),(0,n.jsxs)("button",{type:"button",className:(0,c.cn)({sizes__size:!0,"sizes__size--selected":showCustomHeight()}),"aria-pressed":showCustomHeight(),onClick:function(){handleCustomHeight()},"data-testid":"sizes-div-1",children:[" ","Custom"," "]})]}),showCustomHeight()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"sizes__label",children:"Height (inches)"}),(0,n.jsx)("input",{className:"sizes__input",value:null!=m?m:"",onInput:function(e){g(e.target.value),handleCustomInputChange(e,updateHeight)},maxLength:"6",type:"number","data-testid":"sizes-input"}),m&&!isValidLetterHeight()?(0,n.jsxs)(i.A,{className:"sizes__error","data-testid":"sizes-error",children:["Please enter a valid height between ",dtfMinHeight()," and ",dtfMaxHeight()," inches"]}):null]}):null,(0,n.jsx)("h3",{children:"Maximum Length"}),(0,n.jsxs)("div",{className:"sizes__max-lengths",children:[(0,u.p)(p,function(e){return(0,n.jsx)("button",{type:"button",className:(0,c.cn)({sizes__size:!0,"sizes__size--selected":isMaxLengthSelected(e)}),"aria-pressed":isMaxLengthSelected(e),onClick:function(){handleMaxLengthSet(e)},"data-testid":"sizes-div-2",children:e.label},e.value)}),(0,n.jsxs)("button",{type:"button",className:(0,c.cn)({sizes__size:!0,"sizes__size--selected":showCustomMaxLength()}),"aria-pressed":showCustomMaxLength(),onClick:function(){handleCustomMaxLength()},"data-testid":"sizes-div-3",children:[" ","Custom"," "]})]}),showCustomMaxLength()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"sizes__label",children:"Length (inches)"}),(0,n.jsx)("input",{className:"sizes__input",value:null!=y?y:"",onInput:function(e){v(e.target.value),handleCustomInputChange(e,updateMaxLength)},maxLength:"6",type:"number","data-testid":"sizes-input-1"}),y&&!isValidLetterMaxLength()?(0,n.jsxs)(i.A,{className:"sizes__error","data-testid":"sizes-error-1",children:["Please enter a valid max length between ",dtfMinWidth()," and ",dtfMaxWidth()," inches"]}):null]}):null]}))}},41813(e,t,r){"use strict";r.d(t,{A:()=>Styles});var n=r(483134),o=r(538896),i=r(997252),l=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Styles(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,o.useDtfStore)();function letterNumberArtwork(){return r.letterNumberArtwork}function handleSelect(e){var t=e.value;r.updateArtworkValues({index:0,style:t}),r.updateAllLetterPreviews()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("styles",t.className),children:(0,l.p)([{label:"Straight",value:"straight"},{label:"Vertical",value:"vertical"}],function(e){return(0,n.jsxs)("button",{type:"button",className:(0,i.cn)("styles__item",e.value===letterNumberArtwork().style&&"styles__item--selected"),"aria-pressed":e.value===letterNumberArtwork().style,onClick:function(){handleSelect(e)},"data-testid":"styles-div",children:[(0,n.jsx)("div",{className:(0,i.cn)("styles__text-preview","styles__text-preview--".concat(e.value)),children:(0,n.jsx)("img",{className:(0,i.cn)("styles__image","styles__image--".concat(e.value)),src:"https://jiffy.imgix.net/gen/letters-pdp/".concat(e.value,".png"),alt:e.label})}),(0,n.jsx)("div",{className:"styles__label",children:e.label})]},e.value)})}
1))}},465318(e,t,r){"use strict";r.d(t,{A:()=>MobileStickyCtaDtf});var n=r(483134),o=r(467265),i=r(745063),l=r(723433),c=r(629499);function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function MobileStickyCtaDtf(e){var t=e.isUserSignedIn,r=void 0!==t&&t,u=e.canvaDtfEnabled,d=e.fileLanding,p=e.namespace,f=e.onUploadImageClick,_=e.onArtworkHistoryClick;function shouldShowCanvaButton(){return u&&r}function trackStickyCtaInteraction(e){var t={button_type:e,user_authenticated:r,page_type:"pdp",device_type:"mobile"};(0,o.Py)("sticky_cta_interaction",t),(0,i.u4)("Mobile CTA Button Clicked",t)}function handleUploadImageClick(){trackStickyCtaInteraction("upload_image"),null==f||f()}function handleArtworkHistoryClick(){trackStickyCtaInteraction("design_library"),null==_||_()}function handleLoginSignupClick(){trackStickyCtaInteraction("login_signup")}function handleCanvaClick(){trackStickyCtaInteraction("canva")}return _object_without_properties(e,["isUserSignedIn","canvaDtfEnabled","fileLanding","namespace","onUploadImageClick","onArtworkHistoryClick"]),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 z-50 border-t border-gray-200 bg-white px-2 py-2.5",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("button",{className:"h-11 flex-1 rounded-md bg-gray-900 px-4 text-sm !font-semibold !text-white",type:"button","data-testid":"mobile-upload-image-btn",onClick:handleUploadImageClick,children:[" ","Upload Image"," "]}),r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{className:"h-11 flex-1 rounded-md border border-black bg-white px-4 text-sm !font-semibold !text-black",type:"button","data-testid":"mobile-design-library-btn",onClick:handleArtworkHistoryClick,children:[" ","Design Library"," "]}),shouldShowCanvaButton()?(0,n.jsx)("div",{className:"flex h-11 flex-1 items-center justify-center rounded-md border border-black bg-white px-4 text-sm !font-semibold !text-black","data-testid":"mobile-canva-btn",children:(0,n.jsx)(c.A,{fileLanding:d,namespace:p,onClick:handleCanvaClick,"data-testid":"canva-button"})}):null]}):(0,n.jsxs)("a",{className:"flex h-11 flex-1 items-center justify-center rounded-md border border-black bg-white px-4 text-sm !font-semibold !text-black no-underline",href:"/login","data-testid":"mobile-login-btn",onClick:handleLoginSignupClick,children:[" ","Log In / Sign Up"," "]})]}),!r&&u?(0,n.jsx)("div",{className:"mt-2 text-center",children:(0,n.jsxs)("span",{className:"flex items-center justify-center gap-1 text-sm font-normal !text-black",children:[" ","Log in to access your"," ",(0,n.jsx)("div",{className:"brightness-0 saturate-100 filter","data-testid":"brightness-0",children:(0,n.jsx)(l.A,{icon:"canva",width:46,height:15,"data-testid":"use-svg"})})," ","workspace."," "]})}):null]})})}},980423(e,t,r){"use strict";r.d(t,{A:()=>RedrawInformation});var n=r(483134),o=r(997252),i=r(927997),l=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function RedrawInformation(e){var t=e.isMobile,r=void 0!==t&&t,c=e.onClose,u=_object_without_properties(e,["isMobile","onClose"]);function beforeImageUrl(){return(0,i.lt)("gen/redraw-info/before-v2.png",{ixlib:"rb-0.3.5",h:275,dpr:2,q:60})}function afterImageUrl(){return(0,i.lt)("gen/redraw-info/after-v2.png",{ixlib:"rb-0.3.5",h:275,dpr:2,q:60})}function close(){null==c||c()}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},u),{className:(0,o.cn)("redraw-information scope-549ee6b2",u.className),children:[r?(0,n.jsxs)("div",{className:"redraw-information__header scope-549ee6b2",children:[(0,n.jsx)("div",{className:"redraw-information__header-title scope-549ee6b2",children:"How it works"}),(0,n.jsx)("button",{className:"redraw-information__close-button scope-549ee6b2",type:"button","aria-label":"Close",onClick:close,"data-testid":"redraw-information-close-button",children:(0,n.jsx)(l.A,{className:"redraw-information__close-button-icon scope-549ee6b2",icon:"menu-close","data-testid":"redraw-information-close-button-icon"})})]}):null,(0,n.jsxs)("div",{className:"redraw-information__item redraw-information__item--before scope-549ee6b2",children:[(0,n.jsx)("div",{className:"redraw-information__item-header scope-549ee6b2",children:"Original Upload"}),(0,n.jsx)("img",{className:"redraw-information__image scope-549ee6b2",src:beforeImageUrl(),alt:"Original artwork before designer redraw"}),(0,n.jsxs)("div",{className:"redraw-information__content scope-549ee6b2",children:[(0,n.jsx)("strong",{className:"scope-549ee6b2",children:"Sample message to designer:"}),(0,n.jsx)("br",{className:"scope-549ee6b2"}),' Please remove the pink background, change the ribbon color to blue, remove freckles. Change "It\'s a girl!" to Emma.'," "]})]}),(0,n.jsx)("div",{className:"redraw-information__arrow scope-549ee6b2",children:(0,n.jsx)(l.A,{className:"redraw-information__arrow-icon scope-549ee6b2",icon:"arrow-right-long","data-testid":"redraw-information-arrow-icon"})}),(0,n.jsxs)("div",{className:"redraw-information__item redraw-information__item--with-list scope-549ee6b2",children:[(0,n.jsx)("div",{className:"redraw-information__item-header scope-549ee6b2",children:"Designer Perfected"}),(0,n.jsx)("img",{className:"redraw-information__image scope-549ee6b2",src:afterImageUrl(),alt:"Designer-perfected artwork after redraw"}),(0,n.jsx)("div",{className:"redraw-information__content scope-549ee6b2",children:(0,n.jsxs)("div",{className:"redraw-information__list scope-549ee6b2",children:[(0,n.jsxs)("div",{className:"redraw-information__list-item scope-549ee6b2",children:[(0,n.jsx)("span",{className:"redraw-information__list-item-number scope-549ee6b2",children:"1"})," Ribbon color changed"," "]}),(0,n.jsxs)("div",{className:"redraw-information__list-item scope-549ee6b2",children:[(0,n.jsx)("span",{className:"redraw-information__list-item-number scope-549ee6b2",children:"2"})," ","Freckles removed"," "]}),(0,n.jsxs)("div",{className:"redraw-information__list-item scope-549ee6b2",children:[(0,n.jsx)("span",{className:"redraw-information__list-item-number scope-549ee6b2",children:"3"})," ","Background removed"," "]}),(0,n.jsxs)("div",{className:"redraw-information__list-item scope-549ee6b2",children:[(0,n.jsx)("span",{className:"redraw-information__list-item-number scope-549ee6b2",children:"4"})," Text changed"," "]})]})})]}),r?null:(0,n.jsx)("button",{className:"redraw-information__close-button scope-549ee6b2",type:"button",onClick:close,"data-testid":"redraw-information-close-button-1",children:(0,n.jsx)(l.A,{className:"redraw-information__close-button-icon scope-549ee6b2",icon:"menu-close","data-testid":"redraw-information-close-button-icon-1"})})]}))}},782457(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(997252),l=r(650574),c=r(723433),u=r(890579),d=r(923057),p=r(202529),f=r(8425),_=r(580099),h=r(932131),m=r(372725),g=r(788088),b=r(152712),y=r(627194),v=r(538896),w=r(2605
1),j=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t,r,k=e.moveBellow,x=e.currentStore,S=void 0===x?null:x,O=e.imagingPromise,P=e.activeConfigSection,A=void 0===P?"jiffy-print-perfect":P,C=e.onUpload,I=e.slots,E=_object_without_properties(e,["moveBellow","currentStore","imagingPromise","activeConfigSection","onUpload","slots"]),N=_sliced_to_array((0,o.useState)(!0),2),D=N[0];N[1];var T=_sliced_to_array((0,o.useState)(!1),2),M=T[0],R=T[1],F=(0,o.useRef)(null),L=(0,o.useRef)(null),B=(0,v.useDtfStore)();function showModal(){return B.showModal}function artworks(){return B.artworks}function dripBuilderIsTheFlow(){return(0,w.CI)(B)}function files(){return B.files}function loadedArtworks(){return B.loadedArtworks}function withPreCut(){return B.withPreCut}function isSticker(){return B.isSticker}function isSpangle(){return B.isSpangle}function storeCreditInfo(){return B.storeCreditInfo}function blankItemsCount(){return B.blankItemsCount}function isBogoApplicable(){return B.isBogoApplicable}function isNewToTransfers(){return B.isNewToTransfers}function uploadedCount(){return loadedArtworks().length+1}function pendingFiles(){return files().filter(function(e){return!e.uploadError})}function filesUploadedMessage(){return pendingFiles().length===files().length?"All files successfully uploaded":"Files have been uploaded"}function artworkUploaded(){return loadedArtworks().length>0}function showStoreCredit(){return!B.isGuest&&artworkUploaded()&&!isSticker()&&!isSpangle()&&Number(store
1CreditInfo().orderSubtotal)>0}function showFreeTransfersBadge(){return!(!isBogoApplicable()||!artworks().every(function(e){return!e.isLoading&&!e.isFile})||0>=blankItemsCount())&&(!!B.isGuest||null!==isNewToTransfers()&&void 0!==isNewToTransfers()&&!0===isNewToTransfers())}function getModal(){return L.current}function getDeliveryDateTarget(){var e=getModal();return null==e?void 0:e.querySelector(".js-product-details-delivery-dates-simple-direct-value")}function getDeliveryDateText(){var e=getDeliveryDateTarget();return e?e.textContent.trim().toLowerCase():""}function updateIsSameDay(){R(getDeliveryDateText().includes("today"))}function setupDeliveryDateObserver(){var e=getDeliveryDateTarget();if(e){updateIsSameDay();var t=new MutationObserver(function(){return updateIsSameDay()});t.observe(e,{childList:!0,subtree:!0}),F.current=t}}function setShowDiscardModal(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.setShowDiscardModal.apply(B,_to_consumable_array(t))}function updatePdpDates(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return B.updatePdpDates.apply(B,_to_consumable_array(t))}
1function onShow(){var e=$(getModal());e.modal("show").on("hide.bs.modal",function(t){showModal()&&D&&t.target.id===e[0].id&&(t.preventDefault(),onClose())}).on("hidden.bs.modal",function(){e.off("hidden.bs.modal"),document.body.classList.remove("dtf-modal-open")}),document.body.classList.add("dtf-modal-open")}function onClose(){setShowDiscardModal()}function onDone(){B.closeModalKeepingArtwork()}function handleUpload(){null==C||C()}(0,o.useEffect)(function(){return onShow(),setupDeliveryDateObserver(),queueMicrotask(function(){window.JiffyDeliverTo.reloadToggle()}),(0,l.Ay)(!0),updatePdpDates(),function(){null==(e=F.current)||e.disconnect();var e,t,r=$(getModal());r.off("hide.bs.modal hidden.bs.modal"),r.modal("dispose"),null==(t=document.querySelector(".modal-backdrop:last-of-type"))||t.remove(),document.querySelector(".modal.show")||document.body.classList.remove("modal-open","dtf-modal-open")}},[]);var z=E.className,U=_object_without_properties(E,["className"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({},U),{className:(0,i.cn)("modal multi-artwork-modal scope-fd566941",void 0!==k&&k&&"multi-artwork-modal--bellow",z),id:"multi-artwork-modal",ref:L,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",{className:"multi-artwork-modal__modal-box modal-dialog scope-fd566941",children:[(0,n.jsxs)("div",{className:"multi-artwork-modal__modal-header scope-fd566941",role:"heading","aria-label":"Your files",tabIndex:"0","data-testid":"multi-artwork-modal-modal-header",children:[(0,n.jsx)("h3",{className:"multi-artwork-modal__modal-title scope-fd566941",children:pendingFiles().length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:"multi-artwork-modal__top-icon scope-fd566941",size:"small","data-testid":"multi-artwork-modal-top-icon"})," ","Uploading ",uploadedCount()," of ",artworks().length," files"," "]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"scope-fd566941",children:(0,n.jsx)(c.A,{className:"multi-artwork-modal__top-icon scope-fd566941",icon:"check-circle","data-testid":"multi-artwork-modal-top-icon-1"})})," ",filesUploadedMessage()]})}),(0,n.jsx)("button",{className:"multi-artwork-modal__modal-button-close scope-fd566941",type:"button",onClick:onClose,"data-testid":"multi-artwork-modal-modal-button-close",children:(0,n.jsx)(c.A,{className:"scope-fd566941",icon:"modal-close-big","data-testid":"use-svg"})})]}),(0,n.jsxs)("div",{className:"multi-artwork-modal__modal-body scope-fd566941",children:[(0,n.jsxs)("div",{className:"multi-artwork-modal__artworks scope-fd566941",children:[(0,j.p)(artworks(),function(e,t){return(0,n.jsx)(p.A,{className:"scope-fd566941",defaultActiveConfigSection:0===t?A:void 0,artwork:e,index:t,isLoading:e.isLoading,currentStore:S,isMultiUpload:!0,showFreeTransfersBadge:showFreeTransfersBadge(),showFullScreenButton:!0,"data-testid":"artwork"},t+String(e.id))}),files().length||dripBuilderIsTheFlow()?null:(0,n.jsx)(_.A,{className:"scope-fd566941",onUpload:handleUpload,"data-testid":"upload-box"})]}),(0,n.jsxs)("div",{className:"multi-artwork-modal__summary scope-fd566941",children:[(0,n.jsx)("div",{className:"multi-artwork-modal__delivery-date scope-fd566941",children:(0,n.jsx)(m.A,{className:"scope-fd566941",isSameDay:M,"data-testid":"delivery-date"})}),null==I||null==(t=I["free-shipping"])?void 0:t.call(I),withPreCut()?(0,n.jsx)(g.A,{className:"scope-fd566941",isModal:!0,"data-testid":"pre-cut"}):null,(0,n.jsx)(b.A,{className:"scope-fd566941","data-testid":"design-services-subscribe"}),(0,n.jsx)(f.A,{className:"scope-fd566941","data-testid":"summary"}),showStoreCredit()?(0,n.jsx)(u.A,{className:"scope-fd566941",storeCreditInfo:storeCreditInfo(),"data-testid":"transfers-store-credit"}):null,null==I||null==(r=I["saved-carts"])?void 0:r.call(I),(0,n.jsx)(y.S,{payload:void 0===O?null:O}),(0,n.jsx)(h.A,{className:"scope-fd566941","data-testid":"dtf-add-to-cart"}),(0,n.jsx)("button",{className:"multi-artwork-modal__done button button--outline button--lg scope-fd566941",type:"button",onClick:onDone,"data-testid":"multi-artwork-modal-done",children:"Done"})]})]})]})}))}},575554(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(538896),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}let __rspack_default_export=function(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,o.useDtfStore)();function isFavorite(){return r.isFavorite}function productSlug(){return r.productSlug}function transfersBusinessLineId(){var e;return(null==(e=window.BUSINESS_LINES)?void 0:e.TRANSFERS)||null}return(0,n.jsxs)("span",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("product-details-quantity-form-row__notify-block js-notify-block scope-13df6e03",{"product-details-quantity-form-row__notify-block--monitored":isFavorite()},t.className),"data-color":"Transfer","data-product-id":productSlug(),"data-business-line-id":transfersBusinessLineId(),children:[(0,n.jsxs)("button",{className:"product-details-quantity-form-row__monitored-for-restock js-product-details-notify-on-restock-unsubscribe scope-13df6e03",type:"button","data-testid":"product-details-quantity-form-row-monitored-for-restock",children:[" ","Monitored For Restock"," "]}),(0,n.jsxs)("button",{className:"product-details-quantity-form-row__monitored-for-restock-mobile js-product-details-notify-on-restock-unsubscribe scope-13df6e03",type:"button","data-testid":"product-details-quantity-form-row-monitored-for-restock-mobile",children:[" ","Notify on Restock"," "]}),(0,n.jsxs)("button",{className:"product-details-quantity-form-row__notify-on-restock js-product-details-notify-on-restock-modal-open scope-13df6e03",type:"button","data-testid":"product-details-quantity-form-row-notify-on-restock",children:[" ","Notify on Restock"," "]})]}))}},715784(e,t,r){"use strict";r.d(t,{A:()=>AreasOfInterestOverlay});var n=r(483134),o=r(293534),i=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function AreasOfInterestOverlay(e){var t=e.areasOfInterest,r=e.naturalWidth,l=e.naturalHeight,c=e.isVisible,u=void 0===c||c,d=e.pinId,p=e.segmentationMaskUrl,f=void 0===p?void 0:p;function isBoundingBox2D(e){return null!=e&&"bbox2d"in e&&Array.isArray(e.bbox2d)}function isMaskObject(e){return null!=e&&"maskUrl"in e}function isBoundingBox(){return(null==t?void 0:t.type)==="bounding_box"}function isMask(){return(null==t?void 0:t.type)==="mask"}function svgMaskId(){return"aoi-mask-".concat(d)}function transformedBoxes(){return isBoundingBox()&&r&&l?t.objects.filter(isBoundingBox2D).map(function(e){var t=_sliced_to_array(e.bbox2d,4),n=t[0],o=t[1];return{x:n/r*100,y:o/l*100,width:(t[2]-n)/r*100,height:(t[3]-o)/l*100}}):[]}function effectiveMaskUrl(){if(f)return f;var e,r,n=null==t||null==(r=t.objects)?void 0:r.find(isMaskObject);return null!=(e=null==n?void 0:n.maskUrl)?e:null}_object_without_properties(e,["areasOfInterest","naturalWidth","naturalHeight","isVisible","pinId","segmentationMaskUrl"]);var _=(0,o.useRef)(null),h=_sliced_to_array((0,o.useState)(null),2),m=h[0],g=h[1],b=(0,o.useRef)(m);b.current=m;var y=(0,o.useRef)(null);function applyMaskTransparencyFilter(e){for(var t=e.data,r=t.length,n=0;n<r;n+=4){var o=t[n],i=t[n+1],l=t[n+2];o>=200&&i>=200&&l>=200?t[n+3]=0:t[n+3]=178}}function drawMask(){var e=_.current;if(e&&m){var t=Math.round(e.clientWidth),r=Math.round(e.clientHeight);if(t&&r){e.width=t,e.height=r;var n=e.getContext("2d");if(n){n.drawImage(m,0,0,t,r);try{var o=n.getImageData(0,0,t,r);applyMaskTransparencyFilter(o),n.putImageData(o,0,0)}catch(e){}}}}}function loadMaskImage(e){if(!e)return void g(null);var t=new Image;t.crossOrigin="anonymous",t.onload=function(){g(t)},t.onerror=function(){g(null)},t.src=e}return(0,o.useEffect)(function(){loadMaskImage(effectiveMaskUrl())},[f,t]),(0,o.useEffect)(function(){var e=_.current;if(e){y.current&&(y.current.disconnect(),y.current=null);var t=null;return y.current=new ResizeObserver(function(){null!==t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame(function(){b.current&&drawMask()})}),y.current.observe(e),m&&drawMask(),function(){null!==t&&window.cancelAnimationFrame(t),y.current&&(y.current.disconnect(),y.current=null)}}},[m]),(0,n.jsxs)(n.Fragment,{children:[u&&isBoundingBox()&&transformedBoxes().length>0?(0,n.jsxs)("svg",{className:"pointer-events-none absolute inset-0 h-full w-full","data-testid":"areas-of-interest-overlay",preserveAspectRatio:"none",children:[(0,n.jsx)("defs",{children:(0,n.jsxs)("mask",{id:svgMaskId(),children:[(0,n.jsx)("rect",{width:"100%",height:"100%",fill:"white"}),(0,i.p)(transformedBoxes(),function(e,t){return(0,n.jsx)("rect",{x:"".concat(e.x,"%"),y:"".concat(e.y,"%"),width:"".concat(e.width,"%"),height:"".concat(e.height,"%"),fill:"black"},t)})]})}),(0,n.jsx)("rect",{width:"100%",height:"100%",fill:"rgba(0, 0, 0, 0.7)",mask:"url(#".concat(svgMaskId(),")")})]}):null,u&&isMask()&&effectiveMaskUrl()?(0,n.jsx)("canvas",{className:"pointer-events-none absolute inset-0 h-full w-full",ref:_,"data-testid":"areas-of-interest-mask-overlay"}):null]})}AreasOfInterestOverlay.displayName="AreasOfInterestOverlay"},85198(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(483134),o=r(293534),i=r(997252),l=r(723433);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let c=(0,o.forwardRef)(function(e,t){var r=_to_array([e,t]),c=r[0],u=r.slice(1),d=c.title,p=c.onHowItWorksClick,f=c.onHowItWorksMouseenter,_=c.onHowItWorksMouseleave,h=_object_without_properties(c,["title","onHowItWorksClick","onHowItWorksMouseenter","onHowItWorksMouseleave"]),m=_sliced_to_array(u,1)[0],g=(0,o.useRef)(null);return(0,o.useImperativeHandle)(m,function(){return{get howItWorksButtonRef(){return g.current}}}),(0,n.jsxs)("div",_object_spread_props(_object_spread({},h),{className:(0,i.cn)("flex items-center gap-1.5",h.className),children:[(0,n.jsx)(l.A,{className:"h-6 w-6 shrink-0",icon:"sparkles-gradient","data-testid":"h-6"}),(0,n.jsx)("h3",{className:"text-sm !font-medium leading-6 text-neutral-950",children:d}),(0,n.jsxs)("span",{className:"rounded-full border border-white bg-green-700 px-1.5 py-0.5 text-xs font-medium text-white",children:[" ","Free"," "]}),(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsxs)("button",{className:"cursor-pointer border-0 bg-transparent p-0 text-xs !text-blue-700 underline",ref:g,type:"button","data-testid":"how-it-works-button",onClick:function(){null==p||p()},onMouseEnter:function(){null==f||f()},onMouseLeave:function(){null==_||_()},children:[" ","How it works"," "]})})]}))})},188775(e,t,r){"use strict";r.d(t,{A:()=>ArtistEditsInformation});var n=r(483134),o=r(101497),i=r(841284),l=r(315902),c=r(927997),u=r(723433),d=r(958469),p=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ArtistEditsInformation(e){var t=e.isMobile,r=e.onClose,f=_object_without_properties(e,["isMobile","onClose"]),_=(0,c.lt)("2/gen/user-retention-modal-pin-before.png",{w:275,h:275}),h=(0,c.lt)("2/gen/user-retention-modal-pin-after.png",{w:275,h:275});return(0,n.jsxs)("div",_object_spread_props(_object_spread({},f),{className:(0,p.cn)("font-inter space-y-4",f.className),"data-testid":"artist-edits-info",children:[(0,n.jsxs)("div",{className:"relative",children:[void 0!==t&&t?(0,n.jsx)("button",{className:"absolute right-0 top-0 cursor-pointer border-0 bg-transparent p-0",type:"button","data-testid":"artist-edits-info-close-button",onClick:function(){null==r||r()},children:(0,n.jsx)(u.A,{className:"h-5 w-5",icon:"menu-close","data-testid":"h-5"})}):null,(0,n.jsx)("h2",{className:"text-base font-bold leading-6",children:"AI Edits — How it works"}),(0,n.jsxs)("p",{className:"text-xs leading-[130%] text-gray-600",children:[" ","AI analyzes your edit request and decides if it can complete automatically or requires our"," ",(0,n.jsx)("strong",{children:"Free"})," professional edit service, which happens after checkout."," "]})]}),(0,n.jsxs)("div",{className:"relative flex rounded-xl border-[3px] border-gray-200 p-1.5",children:[(0,n.jsx)("div",{className:"absolute left-1/2 top-1/3 z-10 -translate-x-1/2",children:(0,n.jsx)("div",{className:"flex size-8 items-center justify-center rounded-full bg-black shadow-md",children:(0,n.jsx)(u.A,{className:"h-5 w-5 text-white",icon:"arrow-right-long","data-testid":"h-5-1"})})}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 px-0 py-2",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,n.jsx)("p",{className:"!mb-0 h-6 text-center text-xs font-medium leading-6",children:"Original Upload"}),(0,n.jsx)("img",{className:"w-full max-w-[180px] object-cover",src:_,alt:"Before AI edits"})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-center text-xs font-bold leading-4 text-gray-800",children:"Sample message:"}),(0,d.p)(['Add the text "#1 Fan" in white color onto the blue flag.',"Change the color of the dog's t-shirt from blue to red."],function(e,t){return(0,n.jsxs)("div",{className:"flex items-start gap-2","data-testid":"sample-message-".concat(t),children:[(0,n.jsx)("div",{className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-bold text-white",children:t+1}),(0,n.jsx)("span",{className:"text-[11px] font-medium leading-4 text-gray-600",children:e})]},e)})]})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 rounded-lg bg-purple-100 px-0 py-2",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex h-6 items-center gap-2",children:[(0,n.jsx)(l.A,{className:"h-6 w-6 shrink-0","data-testid":"h-6"}),(0,n.jsx)("p",{className:"!mb-0 text-xs font-bold leading-4",children:"AI Edited"}),(0,n.jsxs)("span",{className:"rounded-full bg-green-700 px-1.5 py-0.5 text-xs font-medium text-white","data-testid":"artist-edits-free-badge",children:[" ","Free"," "]})]}),(0,n.jsx)("img",{className:"w-full max-w-[180px] object-cover mix-blend-multiply",src:h,alt:"After AI edits"})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("p",{className:"text-center text-xs font-bold leading-4 text-gray-800",children:"AI Edits:"}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)("div",{className:"flex flex-col gap-2",children:(0,d.p)(["Text Added","Color Changed"],function(e){return(0,n.jsxs)("div",{className:"flex items-center gap-2","data-testid":"artist-edit-".concat(e),children:[(0,n.jsx)(o.A,{className:"size-5 shrink-0 text-green-700","data-testid":"size-5"}),(0,n.jsx)("span",{className:"text-[11px] font-bold leading-4 text-gray-800",children:e})]},e)})})})]})]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("p",{className:"text-lg font-bold",children:"What else do you get?"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:(0,d.p)(["Option to send to human artist","Backgroun
1d removal","Add text, change color","Direct print, fast delivery"],function(e){return(0,n.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,n.jsx)(i.A,{className:"size-4 shrink-0 text-green-700","data-testid":"size-4"}),(0,n.jsx)("span",{className:"whitespace-nowrap text-[11px] font-medium leading-6 text-gray-900",children:e})]},e)})})]})]}))}},148143(e,t,r){"use strict";r.d(t,{A:()=>FontPreviewOption});var n=r(483134),o=r(533837),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function FontPreviewOption(e){var t=e.textValue,r=e.fontFamily,l=e.color,c=e.optionLabel,u=e.optionValue,d=e.isSelected,p=void 0!==d&&d,f=e.isDisabled,_=void 0!==f&&f,h=e.previewType,m=e.compact,g=void 0!==m&&m,b=e.onSelect,y=_object_without_properties(e,["textValue","fontFamily","color","optionLabel","optionValue","isSelected","isDisabled","previewType","compact","onSelect"]);function fontToLoad(){return"font"===h?u:r}function displayColor(){return"color"===h?u:l}function displayFont(){return"font"===h?u:r}function secondaryLabel(){return"color"===h?"".concat(c," (").concat(u,")"):c}function handleClick(){_||null==b||b()}return(0,o.E)(fontToLoad()),(0,n.jsxs)("button",_object_spread_props(_object_spread({},y),{type:"button",className:(0,i.cn)("flex cursor-pointer flex-col items-center justify-center border","m-0 appearance-none bg-transparent [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",g?"w-[140px] rounded-sm p-2":"w-[180px] rounded-lg p-3",p?"border-blue-500 bg-blue-50 hover:bg-blue-100":"border-gray-300 bg-white hover:bg-gray-50",_&&"cursor-not-allowed opacity-50"),"aria-pressed":p,disabled:_,"data-testid":"pin-clarify-preview-".concat(c),onClick:handleClick,children:[(0,n.jsx)("span",{className:(0,i.cn)("max-w-full truncate text-center font-bold",g?"px-1 text-sm":"px-2 text-lg"),style:{fontFamily:"'".concat(displayFont(),"', sans-serif"),color:displayColor()},children:t}),(0,n.jsx)("span",{className:(0,i.cn)("max-w-full truncate text-center text-gray-500",g?"mt-0.5 px-1 text-[10px]":"mt-1 px-2 text-xs"),children:secondaryLabel()})]}))}FontPreviewOption.displayName="FontPreviewOption"},299783(e,t,r){"use strict";r.d(t,{A:()=>PinApprovalCard});var n=r(483134),o=r(841284),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinApprovalCard(e){var t=e.isApproving,r=e.isRejecting,l=void 0!==r&&r,c=e.disabled,u=void 0!==c&&c,d=e.compact,p=void 0!==d&&d,f=e.onApprove,_=e.onReject,h=_object_without_properties(e,["isApproving","isRejecting","disabled","compact","onApprove","onReject"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},h),{className:(0,i.cn)("rounded-[10px] bg-[#F6EDFF]",p?"p-2":"p-3",h.className),"data-testid":"pinning-image-approval",children:[(0,n.jsx)("p",{className:"m-0 text-[10px] font-bold uppercase tracking-wide text-[#9225FF]",children:"AI Preview Ready"}),(0,n.jsxs)("p",{className:(0,i.cn)("m-0 mt-1 font-semibold text-gray-900",p?"text-xs":"text-sm"),children:[" ","Does this look right?"," "]}),(0,n.jsxs)("p",{className:(0,i.cn)("m-0 mt-0.5 text-gray-900",p?"text-xs":"text-sm"),children:[" ","Toggle the image above to compare."," "]}),(0,n.jsxs)("div",{className:(0,i.cn)("flex gap-2",p?"mt-2":"mt-3"),children:[(0,n.jsx)("button",{className:(0,i.cn)("rounded-lg border border-gray-300 bg-white px-3.5 py-2 text-xs font-medium text-gray-900 [font-family:inherit] hover:bg-gray-50 disabled:pointer-events-none disabled:opacity-25",p?"flex-1":""),type:"button",disabled:u,"data-testid":"pinning-reject-image",onClick:function(){_()},children:l?"Sending…":"No, send to Human Artist"}),(0,n.jsxs)("button",{className:(0,i.cn)("flex items-center justify-center gap-1 rounded-lg border border-[#00834F] bg-[#00834F] px-3.5 py-2 text-xs font-medium !text-white [font-family:inherit] hover:bg-[#006B40] disabled:pointer-events-none disabled:opacity-25",p?"flex-1":""),type:"button",disabled:u,"data-testid":"pinning-approve-image",onClick:function(){f()},children:[(0,n.jsx)(o.A,{className:"h-4 w-4","data-testid":"h-4"})," ",void 0!==t&&t&&!l?"Saving…":"Yes, Save"]})]})]}))}},121159(e,t,r){"use strict";r.d(t,{A:()=>PinClarifications});var n=r(483134),o=r(293534),i=r(997252),l=r(148143),c=r(852609),u=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinClarifications(e){var t=e.clarifications,r=e.responses,d=e.isDisabled,p=void 0!==d&&d,f=e.textInfo,_=void 0===f?void 0:f,h=e.selectedFont,m=void 0===h?void 0:h,g=e.selectedColor,b=void 0===g?void 0:g,y=e.unansweredAbove,v=void 0===y?0:y,w=e.unansweredBelow,j=void 0===w?0:w,k=e.compact,x=void 0!==k&&k,S=e.onSelectOption,O=e.onToggleCustomInput,P=e.onCustomInputChange,A=e.onSubmit,C=e.onScroll,I=e.onScrollToUnanswered,E=_object_without_properties(e,["clarifications","responses","isDisabled","textInfo","selectedFont","selectedColor","unansweredAbove","unansweredBelow","compact","onSelectOption","onToggleCustomInput","onCustomInputChange","onSubmit","onScroll","onScrollToUnanswered"]),N={selected:null,custom:"",isTypingCustom:!1},D=(0,o.useRef)(null),T=(0,o.useRef)(null);function answeredCount(){return t.filter(function(e){var t,n=r[e.question];return!!n&&(n.isTypingCustom?!!(null==(t=n.custom)?void 0:t.trim()):!!n.selected)}).length}function effectiveFont(){return m||(null==_?void 0:_.fontFamily)||"inherit"}function effectiveColor(){return b||(null==_?void 0:_.color)||"#000000"}function getResponse(e){var t;return null!=(t=r[e])?t:N}function isFontPreview(e){return"font_selection"===e.type||"font_color"===e.type}function getTextValue(e){return(null==_?void 0:_.value)||e.label||"Sample"}function getDisplayText(e,t){var r="font_color"===e.type;return("color_shade"===e.type||r)&&t.value?"".concat(t.label," (").concat(t.value,")"):t.label}var M=(0,o.useCallback)(function(e){e&&e!==T.current&&(T.current=e,queueMicrotask(function(){return e.focus()}))},[]);function handleOptionSelect(e,t){var r=getResponse(e),n=!r.isTypingCustom&&r.selected===t;null==S||S(e,n?null:t)}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},E),{className:(0,i.cn)("rounded-lg border border-gray-200 bg-gray-50",x?"mb-2 p-1.5":"mb-4 p-3"),children:[(0,n.jsxs)("div",{className:(0,i.cn)("flex items-center justify-between text-gray-500",x?"mb-1 text-[10px]":"mb-2 text-xs"),children:[(0,n.jsxs)("span",{children:[t.length," question",t.length>1?"s":""," to answer"]}),(0,n.jsxs)("span",{children:[answeredCount()," of ",t.length," answered"]})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:(0,i.cn)("flex flex-col overflow-y-auto pr-1",x?"gap-2":"gap-4"),ref:D,style:{maxHeight:"".concat(280,"px")},onScroll:function(){null==C||C()},"data-testid":"flex",children:(0,u.p)(t,function(e){return(0,n.jsxs)("div",{className:(0,i.cn)("flex flex-col",x?"gap-1.5":"gap-2"),"data-clarification-label":e.label||e.question,children:[(0,n.jsx)("div",{className:"text-sm text-gray-800",dangerouslySetInnerHTML:{__html:(0,c.J)(e.question)}}),(0,n.jsx)("div",{className:(0,i.cn)("flex flex-wrap",x?"gap-1.5":"gap-2"),children:(0,u.p)(e.options,function(t){return(0,n.jsx)(n.Fragment,{children:isFontPreview(e)?(0,n.jsx)(l.A,{textValue:getTextValue(e),fontFamily:"font_selection"===e.type?t.value||t.label:effectiveFont(),color:"font_color"===e.type?t.value||t.label:effectiveColor(),optionLabel:t.label,optionValue:t.value||t.label,isSelected:!getResponse(e.question).isTypingCustom&&getResponse(e.question).selected===getDisplayText(e,t),isDisabled:p,previewType:"font_selection"===e.type?"font":"color",compact:x,onSelect:function(){handleOptionSelect(e.question,getDisplayText(e,t))},"data-testid":"font-preview-option"}):(0,n.jsx)("button",{type:"button",className:(0,i.cn)("cursor-pointer border font-medium","m-0 appearance-none [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",x?"rounded-sm px-2.5 py-1 text-xs":"rounded-lg px-4 py-2 text-sm",getResponse(e.question).isTypingCustom||getResponse(e.question).selected!==getDisplayText(e,t)?"border-gray-300 bg-white text-gray-700 hover:bg-gray-50":"border-blue-500 bg-blue-50 text-blue-700 hover:bg-blue-100",p&&"cursor-not-allowed opacity-50"),"aria-pressed":!getResponse(e.question).isTypingCustom&&getResponse(e.question).selected===getDisplayText(e,t),disabled:p,"data-testid":"pin-clarify-".concat(t.label),onClick:function(){handleOptionSelect(e.question,getDisplayText(e,t))},children:(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,c.J)(getDisplayText(e,t))}})})})})}),getResponse(e.question).isTypingCustom?(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{className:"mp-unmask flex-1 rounded-md border border-gray-300 px-2.5 py-1.5 outline-none focus:border-blue-500 disabled:opacity-50",ref:M,type:"text",value:getResponse(e.question).custom,placeholder:"Type your answer...",style:{fontSize:"16px"},disabled:p,"data-testid":"pin-clarify-custom-input-".concat(e.type),onInput:function(t){null==P||P(e.question,t.target.value)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p||null==A||A())}}),(0,n.jsxs)("button",{className:"cursor-pointer border-none bg-transparent text-[13px] text-gray-500 hover:text-gray-700 disabled:opacity-50",type:"button",disabled:p,"data-testid":"pin-clarify-cancel-custom-".concat(e.type),onClick:function(){null==O||O(e.question)},children:[" ","Cancel"," "]})]}):(0,n.jsxs)("button",{type:"button",className:(0,i.cn)("cursor-pointer self-start border border-dashed border-gray-300 text-blue-600 hover:border-blue-400 hover:bg-blue-50 hover:text-blue-700","m-0 appearance-none bg-transparent [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",x?"rounded-sm px-2.5 py-1 text-xs":"rounded-lg px-4 py-2 text-sm",p&&"cursor-not-allowed opacity-50"),disabled:p,"data-testid":"pin-clarify-type-own-".concat(e.type),onClick:function(){null==O||O(e.question)},children:[" ","+ Type my own"," "]})]},e.question)})}),v>0?(0,n.jsxs)("button",{type:"button",className:(0,i.cn)("absolute left-1/2 top-[-4px] z-10 -translate-x-1/2 cursor-pointer rounded-full bg-blue-500 font-medium text-white shadow-md hover:bg-blue-600","m-0 appearance-none border-none [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",x?"px-2 py-0.5 text-[10px]":"px-3 py-1 text-xs"),"aria-label":"Scroll to ".concat(v," unanswered above"),onClick:function(){null==I||I("above")},"data-testid":"absolute",children:[" ","↑ ",v," unanswered above"," "]}):null,j>0?(0,n.jsxs)("button",{type:"button",className:(0,i.cn)("absolute bottom-[-4px] left-1/2 z-10 -translate-x-1/2 cursor-pointer rounded-full bg-blue-500 font-medium text-white shadow-md hover:bg-blue-600","m-0 appearance-none border-none [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",x?"px-2 py-0.5 text-[10px]":"px-3 py-1 text-xs"),"aria-label":"Scroll to ".concat(j," unanswered below"),onClick:function(){null==I||I("below")},"data-testid":"absolute-1",children:[j," unanswered below ↓"," "]}):null]})]}))}},900006(e,t,r){"use strict";r.d(t,{A:()=>PinComposer});var n=r(483134),o=r(293534),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinComposer(e){var t=e.modelValue,r=void 0===t?"":t,l=e.canSubmit,c=void 0!==l&&l,u=e.isProcessing,d=void 0!==u&&u,p=e.isRemoving,f=void 0!==p&&p,_=e.compact,h=void 0!==_&&_,m=e.onUpdateModelValue,g=e.onSubmit,b=e.onCancel,y=e.onNewline,v=e.onTextareaRef,w=_object_without_properties(e,["modelValue","canSubmit","isProcessing","isRemoving","compact","onUpdateModelValue","onSubmit","onCancel","onNewline","onTextareaRef"]),j=(0,o.useRef)(null),k=(0,o.useCallback)(function(e){null==v||v(e),e&&e!==j.current&&(j.current=e,setTimeout(function(){return e.focus()},0))},[v]);function handleKeyDown(e){if("Enter"===e.key){if(e.metaKey||e.ctrlKey){e.preventDefault();var t=e.target,n=t.selectionStart,o=t.selectionEnd,i="".concat(r.slice(0,n),"\n").concat(r.slice(o));null==m||m(i),null==y||y(n+1);return}e.preventDefault(),!d&&c&&(null==g||g())}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},w),{children:[(0,n.jsx)("div",{className:(0,i.cn)("flex",h?"gap-1.5":"gap-2"),children:(0,n.jsx)("textarea",{className:(0,i.cn)("mp-unmask flex-1 resize-none rounded-md border border-gray-300 outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",h?"min-h-[36px] px-2 py-1":"min-h-[44px] px-3 py-2"),ref:k,value:r,placeholder:"Add your instructions here...",disabled:d,style:{fontSize:"16px"},"data-testid":"pinning-composer",onChange:function(e){null==m||m(e.target.value)},onKeyDown:handleKeyDown})}),(0,n.jsxs)("div",{className:(0,i.cn)("flex justify-end",h?"mt-1 gap-1.5":"mt-2 gap-2"),children:[(0,n.jsx)("button",{className:(0,i.cn)("cursor-pointer border-none bg-transparent font-medium text-gray-500 hover:text-gray-700",h?"!text-[11px]":"text-xs"),type:"button",disabled:f,"data-testid":"pin-composer-cancel",onClick:function(){null==b||b()},children:f?"Removing...":"Cancel"}),(0,n.jsxs)("button",{className:(0,i.cn)("cursor-pointer rounded-[4px] border-none bg-[#414192] font-bold !text-white hover:bg-[#06065a] disabled:cursor-not-allowed disabled:opacity-50",h?"px-2.5 py-0.5 !text-[11px]":"px-4 py-1.5 text-xs"),type:"button",disabled:d||!c,"data-testid":"pinning-send",onClick:function(){null==g||g()},children:[" ","Submit"," "]})]})]}))}PinComposer.displayName="PinComposer"},588297(e,t,r){"use strict";r.d(t,{A:()=>PinEscalationCard});var n=r(483134),o=r(841284),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinEscalationCard(e){var t=e.isConfirming,r=void 0!==t&&t,l=e.isCancelling,c=void 0!==l&&l,u=e.compact,d=void 0!==u&&u,p=e.onConfirm,f=e.onCancel,_=_object_without_properties(e,["isConfirming","isCancelling","compact","onConfirm","onCancel"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},_),{className:(0,i.cn)("rounded-lg border-[1.5px] border-gray-200 bg-gray-100",d?"p-2":"p-3",_.className),"data-testid":"pinning-escalation-card",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("p",{className:"m-0 text-[10px] font-bold uppercase tracking-wide text-gray-900",children:[" ","Professional edit required"," "]}),(0,n.jsxs)("span",{className:"rounded-full bg-[#00834F] px-1.5 py-0.5 text-xs font-medium text-white",children:[" ","Free"," "]})]}),(0,n.jsxs)("p",{className:(0,i.cn)("m-0 mt-1 text-gray-900",d?"text-xs":"text-sm"),children:[" ","Our artists will handle this after checkout."," "]}),(0,n.jsxs)("div",{className:(0,i.cn)("flex gap-2",d?"mt-2":"mt-3"),children:[(0,n.jsx)("button",{className:(0,i.cn)("rounded-lg border border-gray-300 bg-white px-3.5 py-2 text-xs font-medium text-gray-900 [font-family:inherit] hover:bg-gray-50 disabled:pointer-events-none disabled:opacity-25",d&&"flex-1"),type:"button",disabled:r||c,"data-testid":"pinning-escalation-cancel",onClick:function(){f()},children:c?"Cancelling…":"No, discard request"}),(0,n.jsxs)("button",{className:(0,i.cn)("flex items-center justify-center gap-1 rounded-lg border border-[#00834F] bg-[#00834F] px-3.5 py-2 text-xs font-medium !text-white [font-family:inherit] hover:bg-[#006B40] disabled:pointer-events-none disabled:opacity-25",d&&"flex-1"),type:"button",disabled:r||c,"data-testid":"pinning-escalation-confirm",onClick:function(){p()},children:[(0,n.jsx)(o.A,{className:"h-4 w-4","data-testid":"h-4"})," ",r?"Sending…":"Yes, Send to Artist"]})]})]}))}},929688(e,t,r){"use strict";r.d(t,{A:()=>PinMessages});var n=r(483134),o=r(723433),i=r(852609),l=r(958469),c=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinMessages(e){var t=e.messages,r=void 0===t?[]:t,u=e.isProcessing,d=void 0!==u&&u,p=e.thinkingText,f=e.compact,_=void 0!==f&&f,h=_object_without_properties(e,["messages","isProcessing","thinkingText","compact"]),m=(0,i.W)().renderMarkdown;return(0,n.jsx)(n.Fragment,{children:r.length>0||d?(0,n.jsxs)("div",_object_spread_props(_object_spread({}
1,h),{className:(0,c.cn)("scope-99187ea7","flex flex-col",_?"gap-2":"gap-4"),children:[(0,l.p)(r,function(e){return(0,n.jsxs)("div",{className:(0,c.cn)("scope-99187ea7","flex flex-col text-sm",_?"gap-0.5":"gap-1"),children:[(0,n.jsx)("span",{className:(0,c.cn)("scope-99187ea7","font-bold uppercase",_?"text-[9px]":"text-[10px]","user"===e.role?"text-gray-400":"text-blue-700"),children:"user"===e.role?"ME":"REDRAW ASSISTANT"}),"ai"===e.role?(0,n.jsx)("div",{className:"pin-messages-markdown scope-99187ea7 text-gray-800",dangerouslySetInnerHTML:{__html:m(e.content)}}):(0,n.jsx)("div",{className:"scope-99187ea7 whitespace-pre-wrap text-gray-800",dangerouslySetInnerHTML:{__html:(0,i.J)(e.content,{escapeFirst:!0})}})]},e.id)}),d?(0,n.jsxs)("div",{className:(0,c.cn)("scope-99187ea7","flex flex-col text-sm",_?"gap-0.5":"gap-1"),children:[(0,n.jsxs)("span",{className:(0,c.cn)("scope-99187ea7","font-bold uppercase text-blue-700",_?"text-[9px]":"text-[10px]"),children:[" ","REDRAW ASSISTANT"," "]}),(0,n.jsxs)("div",{className:(0,c.cn)("scope-99187ea7","flex items-center",_?"gap-1.5 text-xs":"gap-2 text-sm"),children:[(0,n.jsx)(o.A,{className:(0,c.cn)("scope-99187ea7","shrink-0 animate-spin text-blue-600",_?"h-3.5 w-3.5":"h-4 w-4"),icon:"loader","data-testid":"use-svg"}),(0,n.jsx)("span",{className:(0,c.cn)("scope-99187ea7","text-gray-500",_?"text-xs":"text-sm"),children:(void 0===p?void 0:p)||"Thinking..."})]})]}):null]})):null})}},776409(e,t,r){"use strict";r.d(t,{A:()=>PinningActionBar});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinningActionBar(e){var t=e.isCancelDisabled,r=e.variant,i=e.onCancel,l=e.onEscapeHatchClick,c=_object_without_properties(e,["isCancelDisabled","variant","onCancel","onEscapeHatchClick"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},c),{className:(0,o.cn)("flex items-center justify-between bg-white p-2 shadow-[0_-2px_10px_rgba(0,0,0,0.05)]",c.className,"absolute"===(void 0===r?"absolute":r)?"absolute bottom-0 left-0 right-0 z-10":"shrink-0"),"data-testid":"pinning-artboard-actions",children:[(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsxs)("button",{className:"text-gray-400! hover:text-gray-500! [font-family:inherit]! text-sm! curs
1or-pointer border-none bg-transparent p-0 font-normal hover:underline",type:"button","data-testid":"escape-hatch-button",onClick:function(){null==l||l()},children:[" ","Use classic edit form"," "]})}),(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-2.5",children:(0,n.jsxs)("button",{className:"flex shrink-0 cursor-pointer items-center gap-1.5 rounded-[8px] border border-[#414192] bg-white px-3.5 py-2 text-base font-semibold [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",style:{color:"#414192"},disabled:void 0!==t&&t,"data-testid":"pinning-cancel",onClick:function(){null==i||i()},children:[(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-testid":"pinning-action-bar-svg",children:[(0,n.jsx)("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),(0,n.jsx)("polyline",{points:"16 17 21 12 16 7"}),(0,n.jsx)("line",{x1:"21",x2:"9",y1:"12",y2:"12"})]})," ","Exit"," "]})})]}))}},548335(e,t,r){"use strict";r.d(t,{A:()=>PinningArtboard});var n=r(483134),o=r(293534),i=r(997252),l=r(538896),c=r(715784),u=r(930082),d=r(872274),p=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function PinningArtboard(e){var t=e.imageUrl,r=e.generatedImageUrl,f=void 0===r?"":r,_=e.pins,h=void 0===_?[]:_,m=e.activePinId,g=void 0===m?null:m,b=e.hoveredPinId,y=void 0===b?null:b,v=e.showPins,w=e.isShowingEditPreview,j=void 0!==w&&w,k=e.canAddPin,x=void 0===k||k,S=e.zoom,O=void 0===S?1:S,P=e.showTooltip,A=e.tooltipMessage,C=e.isDesktop,I=e.isFeedbackVisible,E=e.sessionId,N=void 0===E?"":E,D=e.artworkId,T=void 0===D?"":D,M=e.onAddPin,R=e.onPinClick,F=e.onPinHover,L=e.onPinUnhover,B=e.onTooltipDismiss,z=e.onImageLoaded,U=_object_without_properties(e,["imageUrl","generatedImageUrl","pins","activePinId","hoveredPinId","showPins","isShowingEditPreview","canAddPin","zoom","showTooltip","tooltipMessage","isDesktop","isFeedbackVisible","sessionId","artworkId","onAddPin","onPinClick","onPinHover","onPinUnhover","onTooltipDismiss","onImageLoaded"]),H=(0,l.useDtfStore)(),q=(0,o.useRef)(null),V=(0,o.useRef)(null),G=(0,o.useRef)(null),K=_sliced_to_array((0,o.useState)(!1),2),W=K[0],Q=K[1],J=(0,o.useRef)(!1),Z=(0,o.useRef)(O);Z.current=O;var Y=_sliced_to_array((0,o.useState)({width:0,height:0,left:0,top:0}),2),X=Y[0],ee=Y[1],et=_sliced_to_array((0,o.useState)(0),2),er=et[0],en=et[1],eo=_sliced_to_array((0,o.useState)(0),2),ea=eo[0],ei=eo[1],es=_sliced_to_array((0,o.useState)("after"),2),el=es[0],ec=es[1];function setBeforeAfterView(e){if(ec(e),N&&T){var t={artworkId:T,sessionId:N,generatedImageUrl:f};"before"===e?(0,d.s5)(t):(0,d.hb)(t)}}function displayImageUrl(){return j&&"after"===el&&f?f:t}function sortedPins(){return h.map(function(e,t){return _object_spread_props(_object_spread({},e),{originalIndex:t})}).sort(function(e,t){return e.id===g?1:t.id===g?-1:0})}function backgroundClass(){return"green"===H.backgroundType?"pinning-artboard--green":"pinning-artboard--checkered"}function isHoveringCompletedPin(){if(!y)return!1;var e=h.find(function(e){return e.id===y});return(null==e?void 0:e.state)==="ready"||(null==e?void 0:e.state)==="unsupported"}function pinsWithAreasOfInterest(){return h.filter(function(e){return e.areasOfInterest&&e.areasOfInterest.objects&&e.areasOfInterest.objects.length>0})}function isOverlayVisible(e){return"ready"===e.state||"unsupported"===e.state?y===e.id:!1!==e.highlightAreasEnabled&&!isHoveringCompletedPin()}function updateImageRect(){var e=V.current,t=q.current;if(e&&t&&J.current){var r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),o=Z.current>0?Z.current:1,i=n.width/o,l=n.height/o,c=n.width-i,u=n.height-l;ee({width:i,height:l,left:n.left-r.left+c/2,top:n.top-r.top+u/2})}}function onImageLoad(){var e=V.current;
1e&&(en(e.naturalWidth),ei(e.naturalHeight)),J.current=!0,Q(!0),updateImageRect(),j&&"after"===el&&(null==z||z())}function handleContainerClick(e){if(!x||!W)return;var t=q.current;if(!t)return;var r=t.getBoundingClientRect(),n=O>0?O:1,o=X.width,i=X.height;if(o<=0||i<=0)return;var l=o*n,c=i*n;if(!(l<=0)&&!(c<=0)){var u=X.left-(l-o)/2,d=X.top-(c-i)/2,p=(e.clientX-r.left-u)/l,f=(e.clientY-r.top-d)/c;if(!(p<0)&&!(p>1)&&!(f<0)&&!(f>1)&&!(er<=0)&&!(ea<=0)){var _=Math.min(Math.max(Math.round(p*er),0),Math.max(er-1,0)),h=Math.min(Math.max(Math.round(f*ea),0),Math.max(ea-1,0));null==M||M({x:_,y:h})}}}(0,o.useEffect)(function(){j&&ec("after")},[j]),(0,o.useEffect)(function(){var e=null;return q.current&&(G.current=new ResizeObserver(function(){null!==e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(function(){return updateImageRect()})}),G.current.observe(q.current)),function(){null!==e&&window.cancelAnimationFrame(e),G.current&&(G.current.disconnect(),G.current=null)}},[]);var eu=void 0!==C&&C?"60px 16px ".concat(void 0!==I&&I?"140px":""):"10px";return(0,n.jsxs)("div",_object_spread_props(_object_spread({},U),{className:(0,i.cn)("scope-abbec8e3 relative flex h-full w-full cursor-crosshair items-center justify-center overflow-hidden",backgroundClass()),ref:q,style:{padding:eu},"data-testid":"pinning-artboard-container",onClick:handleContainerClick,children:[(0,n.jsx)("img",{className:"scope-abbec8e3 pointer-events-none block max-h-full max-w-full select-none object-contain",ref:V,src:displayImageUrl(),alt:"Artwork",draggable:"false","data-testid":"pinning-artboard-image",style:{transform:"scale(".concat(O,")"),transformOrigin:"center center"},onLoad:onImageLoad}),j?(0,n.jsxs)("div",{className:"absolute left-1/2 top-3 z-20 flex -translate-x-1/2 overflow-hidden rounded-full bg-white p-1 shadow-md","data-testid":"before-after-toggle",onClick:function(e){return e.stopPropagation()},children:[(0,n.jsx)("button",{type:"button","data-testid":"before-after-toggle-before",className:(0,i.cn)("rounded-full px-4 py-1 text-sm font-medium transition-colors","before"===el?"bg-gray-900 !text-white":"text-gray-600 hover:text-gray-900"),onClick:function(){return setBeforeAfterView("before")},children:"Before"}),(0,n.jsx)("button",{type:"button","data-testid":"before-after-toggle-after",className:(0,i.cn)("rounded-full px-4 py-1 text-sm font-medium transition-colors","after"===el?"bg-gray-900 !text-white":"text-gray-600 hover:text-gray-900"),onClick:function(){return setBeforeAfterView("after")},children:"After"})]}):null,X.width>0?(0,n.jsx)("div",{className:"scope-abbec8e3 pointer-events-none absolute",style:{width:"".concat(X.width,"px"),height:"".concat(X.height,"px"),left:"".concat(X.left,"px"),top:"".concat(X.top,"px"),transform:"scale(".concat(O,")"),transformOrigin:"center center"},children:j?null:(0,n.jsxs)(n.Fragment,{children:[(0,p.p)(pinsWithAreasOfInterest(),function(e){return(0,n.jsx)(c.A,{className:"scope-abbec8e3",areasOfInterest:e.areasOfInterest,naturalWidth:er,naturalHeight:ea,isVisible:isOverlayVisible(e),pinId:e.id,segmentationMaskUrl:e.segmentationMaskUrl,"data-testid":"areas-of-interest-overlay"},"aoi-".concat(e.id))}),void 0===v||v?(0,n.jsx)(n.Fragment,{children:(0,p.p)(sortedPins(),function(e){return(0,n.jsx)("button",{type:"button",className:(0,i.cn)("scope-abbec8e3","pointer-events-auto absolute z-[5] flex h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-pointer select-none items-center justify-center rounded-full border-[1.5px] border-white text-[11px] font-bold leading-none text-white transition-opacity duration-150","appearance-none p-0 [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-offset-2","shadow-[0_1px_4px_rgba(0,0,0,0.25)]",e.id===g&&"z-10",g&&e.id!==g&&"opacity-40","processing"===e.state&&"animate-pulse"),style:{left:"".concat(e.coordinates.x/er*100,"%"),top:"".concat(e.coordinates.y/ea*100,"%"),backgroundColor:u.Bo[e.originalIndex%u.Bo.length]},"aria-pressed":e.id===g,"aria-label":"Pin ".concat(e.originalIndex+1),"data-testid":"pinning-artboard-pin-".concat(e.originalIndex+1),onClick:function(t){t.stopPropagation(),null==R||R(e.id)},onMouseEnter:function(){null==F||F(e.id)},onMouseLeave:function(){null==L||L()},children:e.originalIndex+1},e.id)})}):null]})}):null,void 0!==P&&P?(0,n.jsxs)("div",{className:"scope-abbec8e3 absolute left-1/2 top-[40%] z-[15] -translate-x-1/2 -translate-y-full","data-testid":"pinning-artboard-tooltip",onClick:function(e){e.stopPropagation()},children:[(0,n.jsxs)("div",{className:"scope-abbec8e3 relative flex max-w-[260px] items-center gap-2 rounded-lg border border-blue-600 bg-blue-600 px-4 py-2.5 text-center text-sm text-white shadow-[0_4px_12px_rgba(0,0,0,0.2)]",children:[(0,n.jsx)("span",{className:"scope-abbec8e3",children:void 0===A?"":A}),(0,n.jsxs)("button",{className:"scope-abbec8e3 cursor-pointer border-none bg-transparent p-0 text-lg leading-none text-white opacity-80 hover:opacity-100",type:"button",onClick:function(e){e.stopPropagation(),null==B||B()},"data-testid":"cursor-pointer",children:[" ","\xd7"," "]})]}),(0,n.jsx)("div",{className:"scope-abbec8e3 flex justify-center",children:(0,n.jsx)("div",{className:"scope-abbec8e3 h-0 w-0 border-x-[8px] border-t-[8px] border-x-trans
1parent border-t-blue-600"})})]}):null]}))}},507863(e,t,r){"use strict";r.d(t,{A:()=>PinningDisclaimer});var n=r(483134),o=r(929405),i=r(895986),l=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinningDisclaimer(e){var t=e.compact,r=void 0!==t&&t,c=e.onDismiss,u=_object_without_properties(e,["compact","onDismiss"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},u),{className:(0,l.cn)("mb-2 flex items-center gap-2 rounded-lg bg-purple-200 px-3 py-2",u.className),"data-testid":"pinning-disclaimer",children:[(0,n.jsx)(o.A,{className:(0,l.cn)("shrink-0 text-gray-900",r?"size-5":"size-6"),"data-testid":"shrink-0"}),(0,n.jsxs)("span",{className:"m-0 flex-1 text-sm leading-relaxed text-gray-900",children:[" ","AI edits your design. If it can't, a free professional artist will."," "]}),(0,n.jsx)("button",{className:"shrink-0 cursor-pointer rounded border-none bg-transparent text-gray-700 hover:text-gray-900",type:"button","aria-label":"Dismiss disclaimer","data-testid":"pinning-disclaimer-dismiss",onClick:function(){null==c||c()},children:(0,n.jsx)(i.A,{className:(0,l.cn)("text-gray-700 hover:text-gray-900",r?"size-5":"size-6"),"data-testid":"text-gray-700"})})]}))}},303751(e,t,r){"use strict";r.d(t,{A:()=>PinningFeedback});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PinningFeedback(e){var t=e.positive,r=void 0===t?null:t,l=e.message,c=e.isOpen,u=void 0!==c&&c,d=e.status,p=void 0===d?"idle":d,f=e.isDesktop,_=void 0!==f&&f,h=e.onSelectPositive,m=e.onSelectNegative,g=e.onCancel,b=e.onSubmit,y=e.onUpdateMessage,v=_object_without_properties(e,["positive","message","isOpen","status","isDesktop","onSelectPositive","onSelectNegative","onCancel","onSubmit","onUpdateMessage"]);function isSending(){return"sending"===p}function shouldShowForm(){return u&&"success"!==p}return(0,n.jsx)("div",_object_spread_props(_object_spread({},v),{className:(0,o.cn)("px-2 pb-2",_&&"absolute bottom-14 right-4 z-20 p-0",null==v?void 0:v.className),"data-testid":"pinning-feedback",children:(0,n.jsx)("div",{className:(0,o.cn)("rounded-lg border border-gray-200 bg-white p-3 shadow-sm",_?"w-[280px]":"w-full"),children:"success"===p?(0,n.jsxs)("div",{className:"flex min-h-[36px] items-center text-xs text-green-700",children:[" ","Thanks for the feedback."," "]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsx)("div",{className:"text-xs font-medium text-gray-700",children:"How is your session going?"}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)("button",{className:(0,o.cn)("cursor-pointer rounded-full border border-gray-200 bg-transparent p-1.5 transition-all hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",!0===r&&"border-green-200 bg-green-50 hover:bg-green-100"),type:"button",disabled:isSending(),"aria-pressed":!0===r,"data-testid":"pinning-feedback-thumbs-up",onClick:function(){null==h||h()},children:(0,n.jsx)(i.A,{className:(0,o.cn)(_?"h-5 w-5":"h-4 w-4",!0===r?"text-green-600":"text-gray-500"),icon:"thumbs-up","data-testid":"use-svg"})}),(0,n.jsx)("button",{className:(0,o.cn)("cursor-pointer rounded-full border border-gray-200 bg-transparent p-1.5 transition-all hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50",!1===r&&"border-red-200 bg-red-50 hover:bg-red-100"),type:"button",disabled:isSending(),"aria-pressed":!1===r,"data-testid":"pinning-feedback-thumbs-down",onClick:function(){null==m||m()},children:(0,n.jsx)(i.A,{className:(0,o.cn)("rotate-180",_?"h-5 w-5":"h-4 w-4",!1===r?"text-red-600":"text-gray-500"),icon:"thumbs-up","data-testid":"rotate-180"})})]})]}),shouldShowForm()?(0,n.jsxs)("div",{className:"mt-3 flex flex-col gap-2",children:[(0,n.jsx)("textarea",{className:"mp-unmask font-inherit w-full resize-none rounded-md border border-gray-300 p-2 outline-none focus:border-blue-500 disabled:opacity-50",value:void 0===l?"":l,placeholder:"Optional details",rows:3,style:{fontSize:"16px"},disabled:isSending(),"data-testid":"pinning-feedback-message",onInput:function(e){null==y||y(e.target.value)}}),(0,n.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,n.jsxs)("button",{className:"cursor-pointer rounded-md border border-gray-300 bg-transparent px-3 py-1 text-[13px] text-gray-700 hover:bg-gray-50 disabled:opacity-50",type:"button",disabled:isSending(),onClick:function(){null==g||g()},"data-testid":"cursor-pointer",children:[" ","Cancel"," "]}),(0,n.jsx)("button",{className:"cursor-pointer rounded-[4px] border-none bg-[#414192] px-3 py-1 text-[13px] font-bold !text-white hover:bg-[#06065a] disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:isSending()||null===r,onClick:function(){null==b||b()},"data-testid":"cursor-pointer-1",children:isSending()?"Submitting...":"Submit"})]})]}):null]})})}))}PinningFeedback.displayName="PinningFeedback"},47001(e,t,r){"use strict";r.d(t,{A:()=>PinningHeader});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(188775),u=r(636003);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function PinningHeader(e){var t=e.isDesktop,r=void 0!==t&&t,d=_object_without_properties(e,["isDesktop"]),p=(0,o.useRef)(null),f=_sliced_to_array((0,o.useState)(!1),2),_=f[0],h=f[1],m=_sliced_to_array((0,o.useState)(!1),2),g=m[0],b=m[1],y=_sliced_to_array((0,o.useState)({}),2),v=y[0],w=y[1],j=(0,o.useRef)(null),k=(0,o.useRef)(null),x=(0,o.useRef)(null);function showDesktopPopover(){clearTimeout(k.current);var e=p.current;if(e){var t=e.getBoundingClientRect(),r=t.left-580-8;r<8&&(r=t.right+8),r=Math.max(8,Math.min(r,window.innerWidth-580-8)),w({left:"".concat(r,"px"),top:"0px",visibility:"hidden"}),x.current={rect:t,left:r,margin:8},b(!0);return}b(!0)}function hideDesktopPopover(){k.current=setTimeout(function(){b(!1)},150)}function openHowItWorksModal(){r?showDesktopPopover():h(!0)}function closeHowItWorks(){h(!1)}return(0,o.useEffect)(function(){return function(){return clearTimeout(k.current)}},[]),(0,o.useEffect)(function(){if(g&&x.current){var e=j.current;
1if(e){var t=x.current,r=t.rect,n=t.left,o=t.margin;x.current=null;var i=e.offsetHeight,l=Math.max(o,Math.min(r.top+r.height/2-i/2,window.innerHeight-i-o));w({left:"".concat(n,"px"),top:"".concat(l,"px")})}}},[g]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},d),{className:(0,i.cn)("flex w-full shrink-0 flex-col bg-white p-4",!r&&"shadow-sm",d.className),"data-testid":"pinning-header",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"m-0 text-lg font-semibold text-gray-800",children:"Get Free AI Edits"}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(l.A,{className:"h-4 w-4 text-gray-500",icon:"info-circle-bold","data-testid":"h-4"}),(0,n.jsxs)("button",{className:"cursor-pointer border-0 bg-transparent p-0 text-sm !text-blue-700 underline",ref:p,type:"button","data-testid":"how-it-works-button",onClick:openHowItWorksModal,onMouseEnter:function(){r&&showDesktopPopover()},onMouseLeave:function(){r&&hideDesktopPopover()},children:[" ","How it works"," "]})]})]}),(0,n.jsx)(u.Y,{to:"body","data-testid":"teleport",children:r&&g?(0,n.jsx)("div",{className:"fixed z-[2147483001] max-h-[90vh] w-[580px] overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 text-sm shadow-lg",ref:j,style:v,onMouseEnter:function(){showDesktopPopover()},onMouseLeave:function(){hideDesktopPopover()},"data-testid":"fixed",children:(0,n.jsx)(c.A,{"data-testid":"artist-edits-information"})}):null}),(0,n.jsx)(u.Y,{to:"body","data-testid":"teleport-1",children:!r&&_?(0,n.jsxs)("div",{className:"fixed inset-0 z-[2147483001] flex items-center justify-center px-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/60",onClick:closeHowItWorks,"data-testid":"absolute"}),(0,n.jsx)("div",{className:"relative max-h-[95dvh] w-full overflow-y-auto rounded-lg bg-white px-2.5 py-4 pb-[max(1rem,env(safe-area-inset-bottom))]",children:(0,n.jsx)(c.A,{isMobile:!0,onClose:closeHowItWorks,"data-testid":"artist-edits-information-1"})})]}):null})]}))}},1114(e,t,r){"use strict";r.d(t,{A:()=>PinningPanel});var n=r(483134),o=r(293534),i=r(401377),l=r(463144),c=r(723433),u=r(299783),d=r(121159),p=r(900006),f=r(588297),_=r(929688),h=r(507863),m=r(930082),g=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function PinningPanel(e){var t,r,b,y,v=e.isDesktop,w=void 0!==v&&v,j=e.panel,k=e.pendingInitialMessage,x=void 0===k?null:k,S=(e.isMultiUpload,e.isCompletingSession),O=void 0!==S&&S,P=e.onApprovePreview,A=e.onRejectPreview,C=e.onEscalationConfirm,I=e.onEscalationCancel,E=_object_without_properties(e,["isDesktop","panel","pendingInitialMessage","isMultiUpload","isCompletingSession","onApprovePreview","onRejectPreview","onEscalationConfirm","onEscalationCancel"]),N=_sliced_to_array((0,o.useState)(!1),2),D=N[0],T=N[1],M=(0,o.useRef)(null),R=(0,o.useRef)(null),F=(0,o.useRef)(null);function pendingMessages(){return x?[{id:"pending-initial",role:"user",content:x,timestamp:Date.now()}]:[]}function activePinIndex(){return j.activePin()?j.pins.findIndex(function(e){return e.id===j.activePin().id}):-1}function isActiveChat(){return j.activePin()&&"ready"!==j.activePin().state&&"unsupported"!==j.activePin().state}function isCompletedPin(e){return"ready"===e.state||"unsupported"===e.state}function shouldShowEscalation(e){return"ready"===e.state&&!(j.previewApproval&&j.previewApproval.pinId===e.id)}function goBackToList(){j.setMobileView("list"),j.setActivePinId(null)}function handlePinListClick(e){j.trackPinSelected(e.id,j.activePinId,e.state),j.setActivePinId(e.id),j.setMobileView("detail")}function handleDesktopPinClick(e){j.activePin()&&"ready"!==j.activePin().state&&"unsupported"!==j.activePin().state||(e.id!==j.activePinId&&j.trackPinSelected(e.id,j.activePinId,e.state),j.setActivePinId(e.id===j.activePinId?null:e.id))}function handleDeleteClick(e){isCompletedPin(e)?j.openDeletePinModal(e.id):j.handleDeletePin(e.id)}return(0,o.useEffect)(function(){j.activePinId&&F.current&&F.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[j.activePinId,null==(r=j.activePin())||null==(t=r.messages)?void 0:t.length,null==(b=j.activePin())?void 0:b.state]),(0,o.useEffect)(function(){j.activePinId&&T(!0)},[j.activePinId]),(0,n.jsx)("div",_object_spread_props(_object_spread({},E),{className:(0,g.cn)("flex h-full flex-col overflow-hidden",w&&"w-full max-w-[700px]"),children:w?(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",ref:M,children:[D?null:(0,n.jsx)(h.A,{onDismiss:function(){T(!0)},"data-testid":"pinning-disclaimer-2"}),0===j.pins.length?(0,n.jsx)(n.Fragment,{children:x?(0,n.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-blue-200 bg-blue-50/30 p-4",children:[(0,n.jsx)("div",{className:"flex items-center justify-between",children:(0,n.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[(0,n.jsx)("span",{style:{color:m.Bo["0"]},children:"Pin 1"}),":"," ",(0,n.jsx)("span",{className:"font-normal text-gray-500",children:"What would you like to do?"})]})}),(0,n.jsx)(_.A,{messages:pendingMessages(),"data-testid":"pin-messages-2"}),(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-blue-200 bg-blue-50 px-3 py-2",children:[(0,n.jsx)(l.A,{className:"h-5 w-5 shrink-0 -rotate-45 text-blue-500","data-testid":"h-5"}),(0,n.jsxs)("span",{className:"text-sm text-blue-700",children:[" ","Please click on the image where you would like the edit to be made"," "]})]})]}):(0,n.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center text-gray-500",children:[(0,n.jsx)(l.A,{className:"mb-4 h-16 w-16 -rotate-45 text-gray-300","data-testid":"mb-4"}),(0,n.jsxs)("p",{className:"m-0 max-w-[280px] text-sm leading-relaxed",children:[" ","No instructions added yet. Click anywhere on the image to drop a pin and add instructions for our artists."," "]})]})}):(0,n.jsx)("div",{className:"flex flex-col gap-4 pb-4",children:j.pins.map(function(e,t){var r;return(0,n.jsxs)("div",{className:(0,g.cn)("flex flex-col gap-3 rounded-lg border bg-white p-4 transition-colors",e.id===j.activePinId?"border-blue-200 bg-blue-50/30":"border-gray-200"),"data-pin-id":e.id,onMouseEnter:function(){isCompletedPin(e)&&(j.setHoveredPinId(e.id),j.setHoveredPinSource("panel"))},onMouseLeave:function(){isCompletedPin(e)&&(j.setHoveredPinId(null),j.setHoveredPinSource(null))},"data-testid":"flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("button",{type:"button",className:"flex cursor-pointer appearance-none items-center gap-2 border-none bg-transparent p-0 text-left font-medium [font-family:inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2","aria-pressed":e.id===j.activePinId,onClick:function(){handleDesktopPinClick(e)},"data-testid":"flex-2",children:(0,n.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[(0,n.jsxs)("span",{style:{color:m.Bo[t%m.Bo.length]},children:[" ","Pin ",t+1]}),":"," ",(0,n.jsx)("span",{className:"font-normal text-gray-500",children:"What would you like to do?"})]})}),(0,n.jsx)("div",{className:"flex items-center gap-2",children:(0,n.jsx)("button",{className:"flex cursor-pointer items-center rounded border-none bg-transparent p-1 text-gray-400 hover:bg-red-50 hover:text-red-500 disabled:cursor-not-allowed disabled:opacity-50",type:"button","data-testid":"pin-delete-".concat(e.id),disabled:j.removingPinIds.has(e.id),onClick:function(){handleDeleteClick(e)},children:j.removingPinIds.has(e.id)?(0,n.jsx)(c.A,{className:"h-4 w-4 animate-spin",icon:"loader","data-testid":"h-4-5"}):(0,n.jsx)(c.A,{className:"h-4 w-4",icon:"trash","data-testid":"h-4-6"})})})]}),e.messages.length>0?(0,n.jsx)("div",{className:"flex flex-col gap-4",children:(0,n.jsx)(_.A,{messages:e.messages,isProcessing:"processing"===e.state,thinkingText:e.thinkingText,"data-testid":"pin-messages-3"})}):null,e.id===j.activePinId&&j.previewApproval&&j.previewApproval.pinId===e.id?(0,n.jsx)(u.A,{isApproving:j.isApproving,isRejecting:j.isRejecting,disabled:j.isApproving||j.isRejecting||j.previewApproval&&!j.isPreviewImageLoaded,onApprove:function(){return null==P?void 0:P()},onReject:function(){return null==A?void 0:A()},"data-testid":"pin-approval-card-1"}):null,e.id===j.activePinId&&shouldShowEscalation(e)?(0,n.jsx)(f.A,{isConfirming:O,isCancelling:j.remov
1ingPinIds.has(e.id),onConfirm:function(){return null==C?void 0:C()},onCancel:function(){return null==I?void 0:I(e.id)},"data-testid":"pin-escalation-card-1"}):null,e.id!==j.activePinId||isCompletedPin(e)||j.previewApproval&&j.previewApproval.pinId===e.id?null:(0,n.jsxs)("div",{className:(0,g.cn)("scroll-mb-4",e.messages.length>0&&"mt-2"),ref:F,children:["needs_clarification"===e.state&&j.pendingPillClarifications().length>0?(0,n.jsx)(d.A,{clarifications:j.pendingPillClarifications(),responses:j.clarificationResponses,isDisabled:"processing"===e.state,textInfo:null==(r=j.lastAiMessageWithClarifications())?void 0:r.textInfo,selectedFont:j.selectedFontValue(),selectedColor:j.selectedColorValue(),unansweredAbove:j.unansweredAbove,unansweredBelow:j.unansweredBelow,onSelectOption:function(e,t){return j.handleSelectClarificationOption(e,t)},onToggleCustomInput:function(e){return j.handleToggleCustomInput(e)},onCustomInputChange:function(e,t){return j.handleCustomInputChange(e,t)},onSubmit:function(){j.handleSubmit()},onScroll:function(){j.calculateUnansweredPositions()},onScrollToUnanswered:function(e){return j.scrollToFirstUnanswered(e)},"data-testid":"pin-clarifications-1"}):null,(0,n.jsx)(p.A,{modelValue:j.composerText,canSubmit:j.hasAnyClarificationResponse()||j.isComposerTextValid(j.composerText),isProcessing:"processing"===e.state,isRemoving:j.removingPinIds.has(e.id),onUpdateModelValue:function(e){j.setComposerText(e)},onSubmit:function(){j.handleSubmit()},onCancel:function(){handleDeleteClick(e)},onNewline:function(e){j.setPendingCursorPosition(e)},onTextareaRef:function(e){j.textareaRef.current=e},"data-testid":"pin-composer-1"})]})]},e.id)})})]}):(0,n.jsxs)("div",{className:"flex h-full flex-col overflow-hidden bg-white",children:[D?null:(0,n.jsx)("div",{className:"shrink-0 px-2 pt-2",children:(0,n.jsx)(h.A,{compact:!0,onDismiss:function(){T(!0)},"data-testid":"pinning-disclaimer"})}),(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:0===j.pins.length?(0,n.jsx)(n.Fragment,{children:x?(0,n.jsxs)("div",{className:"flex flex-col overflow-hidden rounded-lg border border-blue-200 bg-blue-50/30",children:[(0,n.jsx)("div",{className:"flex shrink-0 items-center border-b border-blue-200 px-2 py-1.5",children:(0,n.jsxs)("span",{className:"text-xs font-semibold text-gray-900",children:[(0,n.jsx)("span",{style:{color:m.Bo["0"]},children:"Pin 1"}),":"," ",(0,n.jsx)("span",{className:"font-normal text-gray-500",children:"What would you like to do?"})]})}),(0,n.jsx)("div",{className:"px-2 py-1.5",children:(0,n.jsx)(_.A,{messages:pendingMessages(),compact:!0,"data-testid":"pin-messages"})}),(0,n.jsx)("div",{className:"shrink-0 border-t border-blue-200 p-2",children:(0,n.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-blue-200 bg-blue-50 px-2 py-1.5",children:[(0,n.jsx)(l.A,{className:"h-4 w-4 shrink-0 -rotate-45 text-blue-500","data-testid":"h-4"}),(0,n.jsxs)("span",{className:"text-xs text-blue-700",children:[" ","Please tap on the image where you would like the edit to be made"," "]})]})})]}):(0,n.jsxs)("div",{className:"flex h-full flex-col items-center justify-center py-4 text-center text-gray-500",children:[(0,n.jsx)(l.A,{className:"mb-3 h-12 w-12 -rotate-45 text-gray-300","data-testid":"mb-3"}),(0,n.jsxs)("p",{className:"m-0 max-w-[280px] text-sm leading-relaxed",children:[" ","No instructions added yet. Click anywhere on the image to drop a pin and add instructions for our artists."," "]})]})}):"detail"===j.mobileView&&j.activePin()?(0,n.jsxs)("div",{className:(0,g.cn)("flex flex-col overflow-hidden rounded-lg border border-blue-200 bg-blue-50/30",isActiveChat()&&"h-full"),children:[(0,n.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-blue-200 px-2 py-1.5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1 font-medium",children:[isCompletedPin(j.activePin())?(0,n.jsx)("button",{className:"flex cursor-pointer rounded border-none bg-transparent p-0.5 text-gray-700 hover:bg-gray-100",type:"button","data-testid":"pin-back-button",onClick:goBackToList,children:(0,n.jsx)(c.A,{className:"h-3.5 w-3.5",icon:"arrow-left","data-testid":"h-3.5"})}):null,(0,n.jsxs)("span",{className:"text-sm font-semibold text-gray-900",children:[(0,n.jsxs)("span",{style:{color:m.Bo[activePinIndex()%m.Bo.length]},children:[" ","Pin ",activePinIndex()+1]}),":"," ",(0,n.jsx)("span",{className:"font-normal text-gray-500",children:"What would you like to do?"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[isActiveChat()?(0,n.jsx)("button",{className:"flex cursor-pointer items-center rounded border-none bg-transparent p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",type:"button","data-testid":"pin-panel-expand-toggle","aria-label":j.isPanelExpanded?"Collapse panel":"Expand panel",onClick:function(){j.setIsPanelExpanded(!j.isPanelExpanded)},children:(0,n.jsx)(i.A,{className:(0,g.cn)("h-4 w-4 transition-transform",j.isPanelExpanded&&"rotate-180"),"data-testid":"h-4-2"})}):null,(0,n.jsx)("button",{className:"flex cursor-pointer items-center rounded border-none bg-transparent p-1 text-gray-400 hover:bg-red-50 hover:text-red-500 disabled:cursor-not-allowed disabled:opacity-50",type:"button","data-testid":"pin-delete-".concat(j.activePin().id),"aria-label":"Delete pin ".concat(j.activePin().id),disabled:j.removingPinIds.has(j.activePin().id),onClick:function(){handleDeleteClick(j.activePin())},children:j.removingPinIds.has(j.activePin().id)?(0,n.jsx)(c.A,{className:"h-3.5 w-3.5 animate-spin",icon:"loader","data-testid":"h-3.5-1"}):(0,n.jsx)(c.A,{className:"h-3.5 w-3.5",icon:"trash","data-testid":"h-3.5-2"})})]})]}),(0,n.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",ref:R,children:[j.activePin().messages.length>0?(0,n.jsx)("div",{className:"px-2 py-1.5",children:(0,n.jsx)(_.A,{messages:j.activePin().messages,isProcessing:"processing"===j.activePin().state,thinkingText:j.activePin().thinkingText,compact:!0,"data-testid":"pin-messages-1"})}
1):null,"needs_clarification"===j.activePin().state&&j.pendingPillClarifications().length>0?(0,n.jsx)("div",{className:"px-2 pb-2",children:(0,n.jsx)(d.A,{clarifications:j.pendingPillClarifications(),responses:j.clarificationResponses,isDisabled:!1,textInfo:null==(y=j.lastAiMessageWithClarifications())?void 0:y.textInfo,selectedFont:j.selectedFontValue(),selectedColor:j.selectedColorValue(),unansweredAbove:j.unansweredAbove,unansweredBelow:j.unansweredBelow,compact:!0,onSelectOption:function(e,t){return j.handleSelectClarificationOption(e,t)},onToggleCustomInput:function(e){return j.handleToggleCustomInput(e)},onCustomInputChange:function(e,t){return j.handleCustomInputChange(e,t)},onSubmit:function(){j.handleSubmit()},onScroll:function(){j.calculateUnansweredPositions()},onScrollToUnanswered:function(e){return j.scrollToFirstUnanswered(e)},"data-testid":"pin-clarifications"})}):null]}),j.previewApproval&&j.previewApproval.pinId===j.activePin().id?(0,n.jsx)("div",{className:"shrink-0 border-t border-blue-200 p-2",children:(0,n.jsx)(u.A,{isApproving:j.isApproving,isRejecting:j.isRejecting,disabled:j.isApproving||j.isRejecting||j.previewApproval&&!j.isPreviewImageLoaded,compact:!0,onApprove:function(){return null==P?void 0:P()},onReject:function(){return null==A?void 0:A()},"data-testid":"pin-approval-card"})}
1):null,shouldShowEscalation(j.activePin())?(0,n.jsx)("div",{className:"shrink-0 border-t border-blue-200 p-2",children:(0,n.jsx)(f.A,{isConfirming:O,isCancelling:j.removingPinIds.has(j.activePin().id),compact:!0,onConfirm:function(){return null==C?void 0:C()},onCancel:function(){return null==I?void 0:I(j.activePin().id)},"data-testid":"pin-escalation-card"})}):null,isCompletedPin(j.activePin())||j.previewApproval&&j.previewApproval.pinId===j.activePin().id?null:(0,n.jsx)("div",{className:"shrink-0 border-t border-blue-200 p-2",children:(0,n.jsx)(p.A,{modelValue:j.composerText,canSubmit:j.hasAnyClarificationResponse()||j.isComposerTextValid(j.composerText),isProcessing:"processing"===j.activePin().state,isRemoving:j.removingPinIds.has(j.activePin().id),compact:!0,onUpdateModelValue:function(e){j.setComposerText(e)},onSubmit:function(){j.handleSubmit()},onCancel:function(){j.handleDeletePin(j.activePin().id)},onNewline:function(e){j.setPendingCursorPosition(e)},onTextareaRef:function(e){j.textareaRef.current=e},"data-testid":"pin-composer"})})]}):(0,n.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto",children:j.pins.map(function(e,t){return(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2 rounded-lg border border-gray-200 bg-white p-2.5 transition-colors hover:bg-gray-50","data-testid":"flex",children:[(0,n.jsxs)("button",{type:"button",className:"block min-w-0 flex-1 cursor-pointer border-none bg-transparent p-0 text-left",onClick:function(){handlePinListClick(e)},"data-testid":"pin-open-list-".concat(e.id),children:[(0,n.jsxs)("span",{className:"text-xs font-semibold",style:{color:m.Bo[t%m.Bo.length]},children:[" ","Pin ",t+1]}),e.instruction&&"ready"===e.state?(0,n.jsx)("span",{className:"mt-1 block truncate text-sm text-gray-700",children:e.instruction}):(0,n.jsx)("span",{className:"mt-1 block text-sm text-gray-500",children:isCompletedPin(e)?"Completed":"What would you like to do?"})]}),(0,n.jsx)("div",{className:"flex items-center gap-1",children:(0,n.jsx)("button",{className:"flex cursor-pointer items-center rounded border-none bg-transparent p-1 text-gray-400 hover:bg-red-50 hover:text-red-500 disabled:cursor-not-allowed disabled:opacity-50",type:"button","data-testid":"pin-delete-list-".concat(e.id),disabled:j.removingPinIds.has(e.id),onClick:function(t){t.stopPropagation(),handleDeleteClick(e)},children:j.removingPinIds.has(e.id)?(0,n.jsx)(c.A,{className:"h-4 w-4 animate-spin",icon:"loader","data-testid":"h-4-3"}):(0,n.jsx)(c.A,{className:"h-4 w-4",icon:"trash","data-testid":"h-4-4"})})})]},e.id)})})})]})}))}PinningPanel.displayName="PinningPanel"},122894(e,t,r){"use strict";r.d(t,{A:()=>PinningSessionEntry});var n=r(483134),o=r(147141),i=r(723433),l=r(52382),c=r.n(l),u=r(293534),d=r(997252),p=r(636003),f=r(125072),_=r(538896),h=r(85198),m=r(188775),g=r(852609),b=r(872274);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function PinningSessionEntry(e){var t=e.index,r=e.artwork,l=e.tooltipIdPrefix,y=_object_without_properties(e,["index","artwork","tooltipIdPrefix"]),v=(0,g.W)().renderMarkdown,w=(0,_.useDtfStore)(),j="guest_user"===(0,f.W)(),k="".concat(void 0===l?"guest-launch-tooltip":l,"-").concat(t),x=(0,o.IV)(),S=_sliced_to_array((0,u.useState)(!1),2),O=S[0],P=S[1],A=_sliced_to_array((0,u.useState)(""),2),C=A[0],I=A[1],E=_sliced_to_array((0,u.useState)(!1),2),N=E[0],D=E[1],T=_sliced_to_array((0,u.useState)(!1),2),M=T[0],R=T[1],F=_sliced_to_array((0,u.useState)(!1),2),L=F[0],B=F[1],z=_sliced_to_array((0,u.useState)({}),2),U=z[0],H=z[1],q=(0,u.useRef)(""),V=(0,u.useRef)(r);V.current=r;var G=(0,u.useRef)(null),K=(0,u.useRef)(null),W=(0,u.useRef)(null),Q=(0,u.useRef)(null),J=(0,u.useRef)(null),Z=(0,u.useRef)(null);function isLoading(){return w.pinningSessionLoading}function isEnhancementInProgress(){return null==r||!r.id||!!r.isSimulated||!!r.isLoading||w.isStandardArtwork&&!r.enhancementCompleted}function isApprovedSession(){return"approved"===r.pinningSessionState}function getHowItWorksButton(){var e,t,r;return null!=(e=null!=(t=K.current)?t:null==(r=W.current)?void 0:r.howItWorksButtonRef)?e:null}function showDesktopPopover(){clearTimeout(J.current);var e=getHowItWorksButton();if(e){var t=e.getBoundingClientRect(),r=t.left-580-8;r<8&&(r=t.right+8),r=Math.max(8,Math.min(r,window.innerWidth-580-8)),H({left:"".concat(r,"px"),top:"0px",visibility:"hidden"}),Z.current={rect:t,left:r,margin:8},B(!0);return}B(!0)}function hideDesktopPopover(){J.current=setTimeout(function(){B(!1)},150)}function openHowItWorksModal(){x||R(!0)}function closeHowItWorks(){R(!1)}function handleContainerClick(e){if(!e.target.closest("button, input, label, a")){var t=Array.from(e.currentTarget.querySelectorAll("button, input, label, a")),r=!0,n=!1,o=void 0;try{for(var i,l,c=t[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var u=l.value.getBoundingClientRect();if(e.clientX>=u.left&&e.clientX<=u.right&&e.clientY>
1=u.top&&e.clientY<=u.bottom)return}}catch(e){n=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(n)throw o}}null==(i=G.current)||i.focus()}}(0,u.useEffect)(function(){if(L&&Z.current){var e=Q.current;if(e){var t=Z.current,r=t.rect,n=t.left,o=t.margin;Z.current=null;var i=e.offsetHeight,l=Math.max(o,Math.min(r.top+r.height/2-i/2,window.innerHeight-i-o));H({left:"".concat(n,"px"),top:"".concat(l,"px")})}}},[L]);var Y=(0,u.useMemo)(function(){return c()(function(){var e;(null==(e=V.current)?void 0:e.id)&&(0,b.jy)({artworkId:V.current.id,inputValue:q.current,userType:(0,f.W)()})},500)},[]);function handleSubmitMessage(){return _async_to_generator(function(){var e,r;return _ts_generator(this,function(n){switch(n.label){case 0:if(!(e=C.trim())||isLoading()||isEnhancementInProgress()||j)return[2];return r=(0,f.W)(),[4,w.openPinningSession(t,e,r)];case 1:return n.sent(),w.showPinningModal&&(I(""),q.current=""),[2]}})})()}function handleKeyDown(e){"Enter"!==e.key||e.shiftKey||e.metaKey||e.ctrlKey||(e.preventDefault(),handleSubmitMessage())}function handleRemove(){D(!0),w.clearPinningSession(t)}function confirmCancel(){handleRemove(),P(!1)}return(0,u.useEffect)(function(){return function(){Y.cancel()}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},y),{className:(0,d.cn)("scope-07d4245e w-full",y.className),"data-testid":"pinning-session-entry",children:[r.pinningSessionId?(0,n.jsxs)("div",{className:(0,d.cn)("scope-07d4245e","flex flex-col gap-3 rounded-lg p-2 md:p-3","approved"===r.pinningSessionState?"bg-[#AD47FF]/20":"bg-[#E1E4FD]"),"data-testid":"completed-session-indicator",children:["approved"===r.pinningSessionState?(0,n.jsxs)("div",{className:"scope-07d4245e flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"scope-07d4245e h-8 w-8 shrink-0",icon:"sparkles-gradient","data-testid":"h-8"}),(0,n.jsxs)("div",{className:"scope-07d4245e",children:[(0,n.jsx)("p",{className:"scope-07d4245e text-[15px] font-medium leading-6 text-[#0a0a0a]",children:"AI Edit Applied"}),(0,n.jsxs)("p",{className:"scope-07d4245e text-[11px] font-medium leading-[18px] text-gray-900",children:[" ","Your design has been updated by AI."," "]})]})]}):(0,n.jsxs)("div",{className:"scope-07d4245e flex items-center gap-2",children:[(0,n.jsx)(i.A,{className:"scope-07d4245e h-8 w-8 shrink-0",icon:"sparkles-gradient","data-testid":"h-8-1"}),(0,n.jsxs)("div",{className:"scope-07d4245e flex-1",children:[(0,n.jsxs)("div",{className:"scope-07d4245e flex justify-between gap-1.5",children:[(0,n.jsxs)("div",{className:"scope-07d4245e flex items-center gap-1.5",children:[(0,n.jsx)("p",{className:"scope-07d4245e text-[15px] font-medium leading-6 text-[#0a0a0a]",children:"Your Artist Edits"}),(0,n.jsxs)("span",{className:"scope-07d4245e rounded-full border border-white bg-[#00834f] px-1.5 py-0.5 text-xs font-medium text-white",children:[" ","Free"," "]})]}),(0,n.jsxs)("button",{className:"scope-07d4245e cursor-pointer border-0 bg-transparent p-0 text-xs !text-blue-700 underline",ref:K,type:"button","data-testid":"how-it-works-button",onClick:openHowItWorksModal,onMouseEnter:function(){x&&showDesktopPopover()},onMouseLeave:function(){x&&hideDesktopPopover()},children:[" ","How it works"," "]})]}),(0,n.jsxs)("p",{className:"scope-07d4245e text-[11px] font-medium leading-[18px] text-gray-900",children:[" ","Human artists will handle your edit after checkout."," "]})]})]}),r.pinningSummary?(0,n.jsx)("div",{className:"scope-07d4245e rounded-lg bg-white/70 p-3 text-xs font-medium text-gray-900","data-testid":"markdown-content",children:(0,n.jsx)("div",{className:"markdown-rendered scope-07d4245e text-inherit",dangerouslySetInnerHTML:{__html:v(r.pinningSummary)}})}):null,(0,n.jsx)("div",{className:"scope-07d4245e flex gap-2 self-end",children:(0,n.jsx)("button",{className:"scope-07d4245e shrink-0 cursor-pointer rounded-[8px] border-[1.5px] border-[#1e2939] bg-white px-3.5 py-2 text-sm font-medium text-gray-900 [font-family:inherit] hover:bg-gray-50 disabled:pointer-events-none disabled:opacity-25",type:"button",disabled:N,"data-testid":"cancel-design-request-button",onClick:function(){P(!0)},children:"approved"===r.pinningSessionState?"Undo AI Edit":"Cancel Request"})})]}):(0,n.jsxs)("div",{className:(0,d.cn)("scope-07d4245e",isEnhancementInProgress()&&"cursor-not-allowed opacity-60"),children:[(0,n.jsx)("div",{className:"scope-07d4245e rounded-t-lg bg-[#AD47FF]/20 px-2 pb-4 pt-[3px] md:px-3",children:(0,n.jsx)(h.A,{className:"scope-07d4245e",ref:W,title:"Edit with AI",onHowItWorksClick:openHowItWorksModal,onHowItWorksMouseenter:function(){x&&showDesktopPopover()},onHowItWorksMouseleave:function(){x&&hideDesktopPopover()},"data-testid":"artist-edits-header"})}),(0,n.jsxs)("div",{className:"gradient-border-purple-blue scope-07d4245e relative z-10 -mt-3 flex cursor-text flex-col gap-2 rounded-lg border-[1.5px] border-transparent px-2 py-1.5 md:px-3 md:py-2",onClick:handleContainerClick,"data-testid":"gradient-border-purple-blue",children:[(0,n.jsx)("textarea",{className:"mp-unmask border-0! outline-none! scope-07d4245e min-h-0 resize-none p-0 text-base placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-60 md:text-sm",ref:G,value:C,onChange:function(e){I(e.target.value),q.current=e.target.value,Y(e)},"data-testid":"request-designer-edit-input",placeholder:"Tell us what you'd like changed.",rows:"2",disabled:isLoading()||isEnhancementInProgress(),onKeyDown:handleKeyDown}),(0,n.jsxs)("div",{className:"scope-07d4245e group relative flex cursor-pointer justify-end","data-testid":"flex",children:[j&&(0,n.jsx)("div",{role:"tooltip",id:k,className:"pointer-events-none absolute bottom-full right-0 mb-1 whitespace-nowrap rounded bg-gray-900 px-2 py-1 text-xs text-white opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100",children:"Sign in to edit with AI"}),(0,n.jsx)("button",{className:(0,d.cn)("scope-07d4245e","bg-gradient-purple-blue h-8 min-w-12 cursor-pointer rounded-lg border-0 px-2 !text-xs !font-semibold leading-4 !text-white [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",!C.trim()&&!isLoading()&&"opacity-50",j&&"cursor-not-allowed opacity-50"),type:"button","data-testid":"request-designer-edit-submit",disabled:isLoading()||isEnhancementInProgress(),"aria-disabled":isLoading()||isEnhancementInProgress()||j,"aria-describedby":j?k:void 0,onClick:handleSubmitMessage,children:isLoading()?"Launching…":"Launch"})]})]}),j&&(0,n.jsxs)("p",{className:"scope-07d4245e mt-0.5 text-right text-xs text-gray-400","data-testid":"guest-signin-hint",children:[(0,n.jsx)("a",{href:"/login",className:"underline hover:text-gray-600",children:"Sign in"})," ","to edit with AI"]})]}),(0,n.jsx)(p.Y,{className:"scope-07d4245e",to:"body","data-testid":"teleport",children:x&&L?(0,n.jsx)("div",{className:"scope-07d4245e fixed z-[10000] max-h-[90vh] w-[580px] overflow-y-auto rounded-lg border border-gray-200 bg-white p-4 text-sm shadow-lg",ref:Q,style:U,onMouseEnter:function(){showDesktopPopover()},onMouseLeave:function(){hideDesktopPopover()},"data-testid":"fixed",children:(0,n.jsx)(m.A,{className:"scope-07d4245e","data-testid":"artist-edits-information"})}):null}),(0,n.jsx)(p.Y,{className:"scope-07d4245e",to:"body","data-testid":"teleport-1",children:!x&&M?(0,n.jsxs)("div",{className:"scope-07d4245e fixed inset-0 z-[10000] flex items-center justify-center",children:[(0,n.jsx)("div",{className:"scope-07d4245e absolute inset-0 bg-black/60","data-testid":"how-it-works-backdrop",onClick:closeHowItWorks}),(0,n.jsx)("div",{className:"scope-07d4245e relative max-h-[95dvh] w-full max-w-[360px] overflow-y-auto rounded-lg bg-white px-[15px] py-[15px] pb-[max(15px,env(safe-area-inset-bottom))]",children:(0,n.jsx)(m.A,{className:"scope-07d4245e",isMobile:!0,onClose:closeHowItWorks,"data-testid":"artist-edits-information-1"})})]}):null}),O?(0,n.jsx)("div",{className:"scope-07d4245e fixed inset-0 z-[10001] flex items-center justify-center bg-black/50","data-testid":"cancel-confirm-modal",onClick:function(){P(!1)},children:(0,n.jsxs)("div",{className:"scope-07d4245e w-full max-w-sm rounded-lg bg-white p-0 shadow-xl",onClick:function(e){e.stopPropagation()},"data-testid":"w-full",children:[(0,n.jsx)("div",{className:"scope-07d4245e border-b border-gray-200 px-6 py-4",children:(0,n.jsx)("h3",{className:"scope-07d4245e m-0 text-base font-semibold text-gray-700",children:isApprovedSession()?"Undo AI Edit?":"Cancel Artist Request?"})}),(0,n.jsxs)("div",{className:"scope-07d4245e px-6 pb-6 pt-4 text-center",children:[(0,n.jsx)("p",{className:"scope-07d4245e m-0 mb-4 text-base font-medium text-gray-700",children:isApprovedSession()?"This will revert your design to the un-edited image. This can’t be undone.":"Your edit request will be removed and won’t be sent to our artists. You can always request it again."}),(0,n.jsxs)("div",{className:"scope-07d4245e flex flex-col gap-2",children:[(0,n.jsx)("button",{className:"scope-07d4245e w-full cursor-pointer rounded-[8px] border border-red-600 bg-white px-3.5 py-2 text-base font-semibold [font-family:inherit]",type:"button","data-testid":"cancel-confirm-button",style:{color:"#dc2626"},onClick:confirmCancel,children:isApprovedSession()?"Yes, revert to original":"Yes, cancel request"}),(0,n.jsx)("button",{className:"scope-07d4245e w-full cursor-pointer rounded-[8px] border border-[#414192] bg-[#414192] px-3.5 py-2 text-base font-semibold !text-white [font-family:inherit]",type:"button","data-testid":"cancel-keep-button",onClick:function(){P(!1)},children:isApprovedSession()?"Keep AI edit":"Keep request"})]})]})]})}):null]}))}},859913(e,t,r){"use strict";r.d(t,{A:()=>PinningSessionModal});var n=r(483134),o=r(293534),i=r(73925),l=r(586519),c=r(299410),u=r(723433),d=r(57473),p=r(538896),f=r(589008),_=r(990265),h=r(930082),m=r(854868),g=r(152467),b=r(776409),y=r(548335),v=r(303751),w=r(47001),j=r(1114),k=r(935785),x=r(558231),S=r(872274);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function PinningSessionModal(e){var t,r,O,P,A=e.artworkIndex,C=e.artworkImageUrl,I=e.artworkId,E=e.sessionId,N=_object_without_properties(e,["artworkIndex","artworkImageUrl","artworkId","sessionId"]),D="transfers-pinning-tooltip-dismissed",T=(0,p.useDtfStore)(),M=(0,o.useRef)(null),R=_sliced_to_array((0,o.useState)(!1),2),F=R[0],L=R[1],B=_sliced_to_array((0,o.useState)(!1),2),z=B[0],U=B[1],H=_sliced_to_array((0,o.useState)(null),2),q=H[0],V=H[1],G=_sliced_to_array((0,o.useState)("true"===localStorage.getItem(D)),2),K=G[0],W=G[1],Q=T.pendingInitialMessage,J=_sliced_to_array((0,o.useState)(Q),1)[0],Z=_sliced_to_array((0,o.useState)(K||J?null:"initial"),2),Y=Z[0],X=Z[1],ee=_sliced_to_array((0,o.useState)(1),2),et=ee[0],er=ee[1],en=_sliced_to_array((0,o.useState)(!1),2),eo=en[0],ea=en[1],ei=_sliced_to_array((0,o.useState)(""),2),es=ei[0],el=ei[1],ec=(0,g.g)(),eu=(0,h.BK)(E,String(I),_object_spread({toast:ec},J?{pendingInitialMessage:J}:{})),ed=(0,_.c)(E,eu.pins,eu.lastEditedPinId,{toast:ec}),ep=(0,f.H)(eu,{onConfirm:function(){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:U(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,(0,m.B_)(E)];case 2:case 3:return e.sent(),[3,5];case 4:return clearPinningSessionFromStore(),T.setPinBasedRedrawEscaped(!0),U(!1),hideBootstrapModal(),[7];case 5:return[2]}})})()}});function shouldHydrateExistingSession(){var e=T.artworks[A];return(null==e?void 0:e.pinningSessionId)===E}function newPins(){return eu.pins.filter(function(e){return e.isNew})}function newPinIds(){return newPins().map(function(e){return e.id})}function hasNewPins(){return newPins().length>0}function isNewSessionCancel(){return"newSession"===q}function isStaffUser(){return!0===T.isStaff}function editingPinNumber(){return eu.editingPin()?eu.pins.findIndex(function(e){return e.id===eu.editingPin().id})+1:0}function showTooltip(){return null!==Y&&!eo}
1function tooltipMessage(){return"initial"===Y?"Click anywhere on the image to drop a pin and add instructions for our artists.":"Click anywhere on the image to add another pin"}var ef=eu.hasCompletedPin(),e_=eu.canAddNewPin(),eh=eu.hasUnfinishedPin();(0,o.useEffect)(function(){if(K||J){null!==Y&&X(null);return}if(eu.pins.length>0&&"initial"===Y||eh)return void X(null);if(!ef||!e_){"add-next"===Y&&X(null);return}X("add-next")},[eu.pins.length,ef,e_,eh]);var em=null!=(t=null==(r=eu.editingPin())?void 0:r.id)?t:null;function applyModalStackingOrder(){M.current&&(M.current.style.zIndex=String(2147483e3));var e=document.querySelector(".modal-backdrop:last-of-type");_instanceof(e,HTMLElement)&&(e.style.zIndex=String(0x7ffffd6e))}function showBootstrapModal(){var e=$(M.current);e.modal({backdrop:"static",keyboard:!1}).modal("show").on("shown.bs.modal",function(){applyModalStackingOrder()}).on("hidden.bs.modal",function(){e.off("shown.bs.modal"),e.off("hidden.bs.modal"),T.closePinningSession()})}function hideBootstrapModal(){$(M.current).modal("hide")}function attemptPreviewRetry(e){return _async_to_generator(function(){var t,r;return _ts_generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,m.b0)(E)];case 1:return(t=n.sent()).previewReady&&t.generatedImageUrl&&(r=e.pinId||e.id||"",eu.setIsPreviewImageLoaded(!1),eu.setPreviewApproval(_object_spread({pinId:r,generatedImageUrl:String(t.generatedImageUrl)},e.instruction?{instruction:e.instruction}:{})),eu.setActivePinId(r)),[3,3];case 2:return n.sent(),[3,3];case 3:return[2]}})})()}function hydrateExistingSession(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:if(!shouldHydrateExistingSession())return[2];ea(!0),u.label=1;case 1:return u.trys.push([1,6,7,8]),[4,(0,m.hF)(E)];case 2:if(t=(e=u.sent()).pins,r=e.generatedImageUrl,eu.hydratePins(t),X(null),!r)return[3,3];return o=(null==(n=t.find(function(e){return"ready"===e.state||"ready"===e.status}))?void 0:n.pinId)||(null==n?void 0:n.id)||"",eu.setIsPreviewImageLoaded(!1),eu.setPreviewApproval(_object_spread({pinId:o,generatedImageUrl:r},(null==n?void 0:n.instruction)?{instruction:n.instruction}:{})),eu.setActivePinId(o),[3,5];case 3:if(i=t.find(function(e){return"ready"===e.state||"ready"===e.status}),c=null==(l=T.artworks[A])?void 0:l.pinningSessionState,!(i&&("active"===c||"generating_preview"===c)))return[3,5];return[4,attemptPreviewRetry(i)];case 4:u.sent(),u.label=5;case 5:return[3,8];case 6:return u.sent(),ec.error({title:"Failed to load pins",description:"Something went wrong. Please try again."}),[3,8];case 7:return ea(!1),[7];case 8:return[2]}})})()}function dismissTooltip(){"add-next"===Y&&(W(!0),localStorage.setItem(D,"true")),X(null)}function clearPinningSessionFromStore(){T.updateArtworkValuesById({id:I,pinningSessionId:null,pinningSummary:null,pinningSessionState:null})}function handleStayOnCancelModal(){"editSession"===q?(0,S.rO)({sessionId:E,newPinsCount:newPinIds().length}):"newSession"===q&&(0,S.mV)({artworkId:I,sessionId:E,pinsCount:eu.pins.length}),V(null)}function handleAddPin(e){eu.canRepositionActivePin()?eu.repositionActivePin(e):("add-next"!==Y||K||(W(!0),localStorage.setItem(D,"true")),eu.addPin(e))}function handlePinClick(e){var t=eu.activePin();if(!t||"ready"===t.state||"unsupported"===t.state){if(e!==eu.activePinId){var r=eu.pins.find(function(t){return t.id===e});r&&eu.trackPinSelected(e,eu.activePinId,r.state)}eu.setActivePinId(e===eu.activePinId?null:e)}}function handleCancel(){if(!I||!E)return void hideBootstrapModal();if(eu.hasExistingPin()&&hasNewPins())return void V("editSession");if(eu.hasExistingPin()&&!hasNewPins()){(0,S.jo)({artworkId:I,sessionId:E,pinsCount:eu.pins.length,readyPinsCount:eu.readyPinsCount()}),hideBootstrapModal();return}eu.pins.length>0?V("newSession"):(U(!0),(0,m.B_)(E).then(function(){(0,S.jo)({artworkId:I,sessionId:E,pinsCount:eu.pins.length,readyPinsCount:eu.readyPinsCount()}),hideBootstrapModal()}).catch(function(){ec.error({title:"Failed to cancel session",description:"Something went wrong. Please try again."}),hideBootstrapModal()}).finally(function(){clearPinningSessionFromStore(),U(!1)}))}function confirmCancel(){return _async_to_generator(function(){var e,t,r,n;return _ts_generator(this,function(o){switch(o.label){case 0:if("editSession"!==q)return[3,6];if(U(!0),e=newPins().filter(function(e){return"draft"===e.state&&0===e.messages.length}).map(function(e){return e.id}),t=newPinIds().filter(function(t){return!e.includes(t)}),e.length>0&&eu.setPins(eu.pins.filter(function(t){return!e.includes(t.id)})),0===t.length)return V(null),U(!1),hideBootstrapModal(),[2];(0,S.iA)({sessionId:E,newPinsCount:t.length}),o.label=1;case 1:return o.trys.push([1,3,4,5]),[4,(0,m.cS)(E,t)];case 2:return o.sent(),V(null),hideBootstrapModal(),[3,5];case 3:return r=o.sent(),(0,S.lb)({sessionId:E,newPinsCount:t.length,errorMessage:(null==r?void 0:r.message)||"Unknown error"}),ec.error({title:"Failed to remove new pins",description:"Something went wrong. Please try again."}),[3,5];case 4:return U(!1),[7];case 5:return[2];case 6:U(!0),o.label=7;
1case 7:if(o.trys.push([7,11,12,13]),!((n=eu.pins.filter(function(e){return"ready"===e.state||"unsupported"===e.state}).map(function(e){return e.id})).length>0))return[3,9];return[4,(0,m.cS)(E,n)];case 8:o.sent(),o.label=9;case 9:return[4,(0,m.B_)(E)];case 10:return o.sent(),(0,S.jo)({artworkId:I,sessionId:E,pinsCount:eu.pins.length,readyPinsCount:eu.readyPinsCount()}),[3,13];case 11:return o.sent(),[3,13];case 12:return clearPinningSessionFromStore(),U(!1),V(null),hideBootstrapModal(),[7];case 13:return[2]}})})()}function handleEscalationConfirm(){return _async_to_generator(function(){var e,t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:if(eu.hasAiAssistanceOngoing())return[2];L(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,m.C5)(E)];case 2:r=i.sent(),T.completePinningSession({artworkIndex:A,sessionId:E,summary:null!=(e=r.summary)?e:null,state:null!=(t=r.state)?t:"completed"});try{(0,S.e)({artworkId:I,sessionId:E,pinsCount:eu.pins.length,readyPinsCount:eu.readyPinsCount(),summary:String(null!=(n=r.summary)?n:"")})}catch(e){(0,l.notifyError)(e,{context:{sessionId:E}})}return hideBootstrapModal(),[3,5];case 3:return o=i.sent(),(0,S.gL)({artworkId:I,sessionId:E,errorMessage:(null==o?void 0:o.message)||"Unknown error"}),ec.error({title:"Failed to complete session",description:"Something went wrong. Please try again."}),[3,5];case 4:return L(!1),[7];case 5:return[2]}})})()}function handleEscalationCancel(e){eu.handleDeletePin(e)}function savePreviewAsManualEdit(e){return _async_to_generator(function(){var t,r,n,o;return _ts_generator(this,function(l){switch(l.label){case 0:return[4,fetch(e)];case 1:if(!(t=l.sent()).ok)throw Error("Image fetch failed: ".concat(t.status));return[4,t.blob()];case 2:return r=l.sent(),(n=new FormData).append("image",r),n.append("manual_edit","true"),n.append("remove_background","false"),n.append("start_new_edit","false"),n.append("ai_edited","true"),[4,i.default.dtf.completeRefineSession({dtf_artwork_id:I},n,{raw:!0,useAxiosForRequest:!0,headers:{"Content-Type":void 0}})];case 3:return o=c.Tm.apply(void 0,[l.sent()]),T.updateArtworkValuesById({id:I,manualEditUrl:o.manualEditUrl||null,manualEditNoTrimUrl:o.manualEditNoTrimUrl||null,editImageManual:!0}),[2]}})})()}function handleApprovePreview(){return _async_to_generator(function(){var e,t,r,n,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:return[4,eu.handleApprovePreview()];case 1:if(!(o=l.sent()))return[2];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,savePreviewAsManualEdit(null==(i=eu.previewApproval)?void 0:i.generatedImageUrl)];case 3:return l.sent(),[3,5];case 4:return l.sent(),eu.setIsApproving(!1),ec.error({title:"Failed to save image",description:"Something went wrong. Please try again."}),[2];case 5:return T.completePinningSession({artworkIndex:A,sessionId:E,summary:null!=(e=o.summary)?e:null,state:null!=(t=o.state)?t:"approved"}),(0,S.vn)({artworkId:I,sessionId:E,pinId:null!=(r=null==(n=eu.previewApproval)?void 0:n.pinId)?r:""}),hideBootstrapModal(),[2]}})})()}function handleRejectPreview(){return _async_to_generator(function(){var e,t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,eu.handleRejectPreview()];case 1:if(!(o=i.sent()))return[2];return T.completePinningSession({artworkIndex:A,sessionId:E,summary:null!=(e=o.summary)?e:null,state:null!=(t=o.state)?t:"completed"}),(0,S.d9)({artworkId:I,sessionId:E,pinId:null!=(r=null==(n=eu.previewApproval)?void 0:n.pinId)?r:""}),hideBootstrapModal(),[2]}})})()}return(0,o.useEffect)(function(){eu.editingPin()&&el(eu.editingPin().instruction||"")},[em]),(0,o.useEffect)(function(){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return showBootstrapModal(),[4,hydrateExistingSession()];case 1:return e.sent(),(0,S.Zu)(_object_spread({artworkId:I,sessionId:E,hasExistingPins:shouldHydrateExistingSession()},J?{initialMessage:J}:{})),[2]}})})(),function(){T.pendingInitialMessage=null,ed.resetFeedback(),ec.clearAll(),$(M.current).modal("hide")}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},N),{className:"modal pinning-session-modal scope-79eb8679",ref:M,role:"dialog","data-testid":"pinning-session-modal",children:[(0,n.jsxs)("div",{className:"pinning-session-modal__dialog modal-dialog scope-79eb8679",children:[eo?(0,n.jsx)("div",{className:"scope-79eb8679 absolute inset-0 z-50 flex items-center justify-center bg-white/70","data-testid":"artboard-loading-overlay",children:(0,n.jsxs)("div",{className:"scope-79eb8679 flex flex-col items-center gap-2",children:[(0,n.jsx)(u.A,{className:"scope-79eb8679 h-8 w-8 animate-spin text-blue-700",icon:"loader","data-testid":"h-8"}),(0,n.jsx)("span",{className:"scope-79eb8679 text-sm font-medium text-gray-700",children:"Loading pins..."})]})}):null,eu.isDesktop?(0,n.jsxs)("div",{className:"scope-79eb8679 flex h-full flex-1 gap-3 overflow-hidden",children:[(0,n.jsxs)("div",{className:"scope-79eb8679 flex w-2/5 min-w-[400px] max-w-[700px] flex-col overflow-hidden border border-gray-200 bg-white shadow",children:[(0,n.jsx)(w.A,{className:"scope-79eb8679",isDesktop:!0,"data-testid":"pinning-header-desktop"}),(0,n.jsx)(j.A,{className:"scope-79eb8679",isDesktop:!0,isCompletingSession:F,panel:eu,pendingInitialMessage:J,onApprovePreview:handleApprovePreview,onRejectPreview:handleRejectPreview,onEscalationConfirm:handleEscalationConfirm,onEscalationCancel:handleEscalationCancel,"data-testid":"pinning-panel-1"})]}),(0,n.jsxs)("div",{className:"scope-79eb8679 relative flex-1 overflow-hidden",children:[(0,n.jsx)(y.A,{className:"scope-79eb8679",isDesktop:!0,isFeedbackVisible:isStaffUser(),imageUrl:C,generatedImageUrl:(null==(P=eu.previewApproval)?void 0:P.generatedImageUrl)||"",pins:eu.pins,activePinId:eu.activePinId,hoveredPinId:eu.hoveredPinId,showPins:eu.showPins,isShowingEditPreview:!!eu.previewApproval,canAddPin:!eu.previewApproval&&(eu.canAddNewPin()||eu.canRepositionActivePin()),zoom:et,showTooltip:!eu.previewApproval&&showTooltip(),tooltipMessage:tooltipMessage(),sessionId:E,artworkId:String(I),onAddPin:handleAddPin,onPinCl
1ick:handlePinClick,onPinHover:function(e){eu.setHoveredPinId(e),eu.setHoveredPinSource("artboard")},onPinUnhover:function(){eu.setHoveredPinId(null),eu.setHoveredPinSource(null)},onTooltipDismiss:dismissTooltip,onImageLoaded:function(){eu.setIsPreviewImageLoaded(!0)},"data-testid":"pinning-artboard-1"}),(0,n.jsxs)("div",{className:"scope-79eb8679 absolute right-2 top-2 z-10 flex items-center gap-2",children:[eu.previewApproval?null:(0,n.jsx)("div",{className:"scope-79eb8679 flex h-10 items-center rounded-lg bg-white px-3 shadow-md",children:(0,n.jsx)(d.A,{className:"scope-79eb8679",label:"Show pins",style:"gray","data-testid":"show-pins-toggle",children:(0,n.jsx)("input",{className:"scope-79eb8679",type:"checkbox",checked:eu.showPins,onChange:function(e){eu.setShowPins(e.target.checked)},"data-testid":"pinning-session-modal-input-1"})})}),(0,n.jsx)(x.A,{className:"scope-79eb8679",zoom:et,isDesktop:!0,onUpdateZoom:function(e){return er(e)},"data-testid":"pinning-zoom-1"})]}),isStaffUser()?(0,n.jsx)(v.A,{className:"scope-79eb8679",positive:ed.positive,message:ed.message,isOpen:ed.isOpen,status:ed.status,isDesktop:!0,onSelectPositive:ed.handleSelectPositive,onSelectNegative:ed.handleSelectNegative,onCancel:ed.handleCancel,onSubmit:ed.handleSubmit,onUpdateMessage:function(e){ed.setMessage(e)},"data-testid":"pinning-feedback-1"}):null,(0,n.jsx)(b.A,{className:"scope-79eb8679",isCancelDisabled:F||z||eu.isApproving,onCancel:handleCancel,onEscapeHatchClick:ep.handleEscapeHatchClick,"data-testid":"pinning-action-bar-1"})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(w.A,{className:"scope-79eb8679",isDesktop:!1,"data-testid":"pinning-header"}),(0,n.jsxs)("div",{className:"scope-79eb8679 flex min-h-0 flex-1 flex-col-reverse",children:[(0,n.jsx)("div",{className:"scope-79eb8679 mx-2 mb-1 shrink-0 overflow-hidden rounded-xl bg-white shadow-[0_4px_12px_rgba(0,0,0,0.1)] transition-all duration-300 ease-out ".concat(eu.isPanelExpanded?"mt-1 max-h-screen min-h-0 flex-1":"max-h-[40vh]"),children:(0,n.jsx)(j.A,{className:"scope-79eb8679",isDesktop:!1,isCompletingSession:F,panel:eu,pendingInitialMessage:J,onApprovePreview:handleApprovePreview,onRejectPreview:handleRejectPreview,onEscalationConfirm:handleEscalationConfirm,onEscalationCancel:handleEscalationCancel,"data-testid":"pinning-panel"})}),(0,n.jsx)("div",{className:"scope-79eb8679 relative flex-1 overflow-hidden transition-all duration-300 ease-out ".concat(eu.isPanelExpanded?"max-h-0":"max-h-screen"),children:(0,n.jsx)(y.A,{className:"scope-79eb8679",imageUrl:C,generatedImageUrl:(null==(O=eu.previewApproval)?void 0:O.generatedImageUrl)||"",pins:eu.pins,activePinId:eu.activePinId,hoveredPinId:eu.hoveredPinId,showPins:eu.showPins,isShowingEditPreview:!!eu.previewApproval,canAddPin:!eu.previewApproval&&(eu.canAddNewPin()||eu.canRepositionActivePin()),zoom:et,showTooltip:!eu.previewApproval&&showTooltip(),tooltipMessage:tooltipMessage(),sessionId:E,artworkId:String(I),onAddPin:handleAddPin,onPinClick:handlePinClick,onPinHover:function(e){eu.setHoveredPinId(e),eu.setHoveredPinSource("artboard")},onPinUnhover:function(){eu.setHoveredPinId(null),eu.setHoveredPinSource(null)},onTooltipDismiss:dismissTooltip,onImageLoaded:function(){eu.setIsPreviewImageLoaded(!0)},"data-testid":"pinning-artboard"})})]}),(0,n.jsxs)("div",{className:"scope-79eb8679 flex shrink-0 items-center justify-center gap-3 py-1",children:[(0,n.jsx)("div",{className:"scope-79eb8679 flex h-10 items-center rounded-lg bg-white px-3 shadow-md",children:(0,n.jsx)(d.A,{className:"scope-79eb8679",label:"Show pins",style:"gray","data-testid":"show-pins-toggle",children:(0,n.jsx)("input",{className:"scope-79eb8679",type:"checkbox",checked:eu.showPins,onChange:function(e){eu.setShowPins(e.target.checked)},"data-testid":"pinning-session-modal-input"})})}),(0,n.jsx)(x.A,{className:"scope-79eb8679",zoom:et,isDesktop:!1,onUpdateZoom:function(e){return er(e)},"data-testid":"pinning-zoom"})]}),isStaffUser()?(0,n.jsx)(v.A,{className:"scope-79eb8679",positive:ed.positive,message:ed.message,isOpen:ed.isOpen,status:ed.status,isDesktop:!1,onSelectPositive:ed.handleSelectPositive,onSelectNegative:ed.handleSelectNegative,onCancel:ed.handleCancel,onSubmit:ed.handleSubmit,onUpdateMessage:function(e){ed.setMessage(e)},"data-testid":"pinning-feedback"}):null,(0,n.jsx)(b.A,{className:"scope-79eb8679",variant:"static",isCancelDisabled:F||z||eu.isApproving,onCancel:handleCancel,onEscapeHatchClick:ep.handleEscapeHatchClick,"data-testid":"pinning-action-bar"})]})]}),null!==q?(0,n.jsx)("div",{className:"scope-79eb8679 fixed inset-0 z-[10001] flex items-center justify-center bg-black/50",onClick:function(){return!z&&handleStayOnCancelModal()},"data-testid":"fixed",children:(0,n.jsxs)("div",{className:"scope-79eb8679 w-full max-w-sm rounded-lg bg-white p-0 shadow-xl",onClick:function(e){e.stopPropagation()},"data-testid":"w-full",children:[(0,n.jsxs)("div",{className:"scope-79eb8679 px-6 py-4 ".concat(isNewSessionCancel()?"flex items-center justify-between":"border-b border-gray-200"),children:[(0,n.jsx)("h3",{className:"scope-79eb8679 m-0 text-base font-semibold text-gray-700",children:isNewSessionCancel()?"Leave without saving?":"Remove new pins?"}),isNewSessionCancel()?(0,n.jsx)("button",{type:"button",className:"scope-79eb8679 cursor-pointer border-0 bg-transparent p-0 text-gray-400 hover:text-gray-600 disabled:cursor-not-allowed disabled:opacity-25","data-testid":"pinning-cancel-modal-close","aria-label":"Close",disabled:z,onClick:handleStayOnCancelModal,children:(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,n.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}):null]}),(0,n.jsxs)("div",{className:"scope-79eb8679 ".concat(isNewSessionCancel()?"px-6 pb-6 pt-2":"px-6 pb-6 pt-4 text-center"),children:[(0,n.jsx)("p",{className:"scope-79eb8679 m-0 mb-4 text-base text-gray-700 ".concat(isNewSessionCancel()?"":"font-medium"),children:isNewSessionCancel()?"Your edit request will be lost.":"This will remove ".concat(newPinIds().length," pin").concat(1===newPinIds().length?"":"s",", are you sure?")}),(0,n.jsxs)("div",{className:"scope-79eb8679 ".concat(isNewSessionCancel()?"grid grid-cols-2 gap-3":"flex flex-col gap-2"),children:[(0,n.jsx)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border [font-family:inherit] disabled:pointer-events-none disabled:opacity-25 ".concat(isNewSessionCancel()?"border-red-500 bg-white px-3.5 py-2.5 text-base font-semibold text-red-500":"border-[#414192] bg-[#414192] px-3.5 py-2 text-base font-semibold !text-white"),type:"button",disabled:z,"data-testid":"pinning-confirm-cancel",onClick:confirmCancel,children:z?(0,n.jsx)(n.Fragment,{children:isNewSessionCancel()?"Exiting...":"Removing pins..."}):(0,n.jsx)(n.Fragment,{children:isNewSessionCancel()?"Yes, exit":"Remove pin".concat(1===newPinIds().length?"":"s","?")})}),(0,n.jsx)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border [font-family:inherit] disabled:pointer-events-none disabled:opacity-25 ".concat(isNewSessionCancel()?"border-[#414192] bg-[#414192] px-3.5 py-2.5 text-base font-semibold !text-white":"border-[#414192] bg-white px-3.5 py-2 text-base font-semibold"),type:"button",style:isNewSessionCancel()?void 0:{color:"#414192"},disabled:z,onClick:handleStayOnCancelModal,"data-testid":"w-full-1",children:isNewSessionCancel()?"Keep editing":"Stay on page"})]})]})]})}):null,eu.pendingDeletePinId?(0,n.jsx)("div",{className:"scope-79eb8679 fixed inset-0 z-[10001] flex items-center justify-center bg-black/50",onClick:eu.closeDeletePinModal,"data-testid":"fixed-1",children:(0,n.jsxs)("div",{className:"scope-79eb8679 w-full max-w-sm rounded-lg bg-white p-0 shadow-xl",onClick:function(e){e.stopPropagation()},"data-testid":"w-full-2",children:[(0,n.jsx)("div",{className:"scope-79eb8679 border-b border-gray-200 px-6 py-4",children:(0,n.jsx)("h3",{className:"scope-79eb8679 m-0 text-base font-semibold text-gray-700",children:"Delete pin?"})}),(0,n.jsxs)("div",{className:"scope-79eb8679 px-6 pb-6 pt-4 text-center",children:[(0,n.jsxs)("p",{className:"scope-79eb8679 m-0 mb-4 text-base font-medium text-gray-700",children:[" ","Are you sure you want to delete the pin?"," "]}),(0,n.jsxs)("div",{className:"scope-79eb8679 flex flex-col gap-2",children:[(0,n.jsxs)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#c90505] bg-[#c90505] px-3.5 py-2 text-base font-semibold !text-white [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",onClick:eu.confirmDeletePin,"data-testid":"w-full-3",children:[" ","Delete"," "]}),(0,n.jsxs)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#414192] bg-white px-3.5 py-2 text-base font-semibold [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",style:{color:"#414192"},onClick:eu.closeDeletePinModal,"data-testid":"w-full-4",children:[" ","Cancel"," "]})]})]})]})}):null,eu.editingPinId?(0,n.jsx)("div",{className:"scope-79eb8679 fixed inset-0 z-[10001] flex items-center justify-center bg-black/50",onClick:eu.closeEditPinModal,"data-testid":"fixed-2",children:(0,n.jsxs)("div",{className:"scope-79eb8679 w-full max-w-sm rounded-lg bg-white p-0 shadow-xl",onClick:function(e){e.stopPropagation()},"data-testid":"w-full-5",children:[(0,n.jsx)("div",{className:"scope-79eb8679 border-b border-gray-200 px-6 py-4",children:(0,n.jsxs)("h3",{className:"scope-79eb8679 m-0 text-base font-semibold text-gray-700",children:[" ","Edit Pin ",editingPinNumber()," Instructions"," "]})}),(0,n.jsxs)("div",{className:"scope-79eb8679 px-6 pb-6 pt-4 text-center",children:[(0,n.jsx)("textarea",{className:"mp-unmask font-inherit scope-79eb8679 mb-4 w-full resize-none rounded-lg border border-gray-300 p-2.5 outline-none focus:border-blue-600 focus:ring-1 focus:ring-blue-600",value:es,onChange:function(e){el(e.target.value)},style:{fontSize:"16px"},rows:"4","data-testid":"edit-pin-instruction-textarea"}),(0,n.jsxs)("div",{className:"scope-79eb8679 flex flex-col gap-2",children:[(0,n.jsx)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#414192] bg-[#414192] px-3.5 py-2 text-base font-semibold !text-white [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",disabled:eu.isUpdatingPinInstruction,onClick:function(){eu.handleUpdatePinInstruction(es)},"data-testid":"w-full-6",children:eu.isUpdatingPinInstruction?"Saving...":"Save"}),(0,n.jsxs)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#414192] bg-white px-3.5 py-2 text-base font-semibold [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",style:{color:"#414192"},onClick:eu.closeEditPinModal,"data-testid":"w-full-7",children:[" ","Cancel"," "]})]})]})]})}):null,ep.escapeHatchModalOpen?(0,n.jsx)("div",{className:"scope-79eb8679 fixed inset-0 z-[10001] flex items-center justify-center bg-black/50",onClick:ep.handleEscapeHatchDismiss,"data-testid":"fixed-4",children:(0,n.jsxs)("div",{className:"scope-79eb8679 w-full max-w-sm rounded-lg bg-white p-0 shadow-xl",onClick:function(e){e.stopPropagation()},"data-testid":"w-full-10",children:[(0,n.jsx)("div",{className:"scope-79eb8679 border-b border-gray-200 px-6 py-4",children:(0,n.jsxs)("h3",{className:"scope-79eb8679 m-0 text-base font-semibold text-gray-700",children:[" ","Use classic edit form?"," "]})}),(0,n.jsxs)("div",{className:"scope-79eb8679 px-6 pb-6 pt-4 text-center",children:[(0,n.jsxs)("p",{className:"scope-79eb8679 m-0 mb-4 text-base font-medium text-gray-700",children:[" ","This will close the pin editor and let you describe your edits in a text form. Your placed pins will not be saved. Continue?"," "]}),(0,n.jsxs)("div",{className:"scope-79eb8679 flex flex-col gap-2",children:[(0,n.jsx)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#414192] bg-[#414192] px-3.5 py-2 text-base font-semibold !text-white [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",disabled:z,"data-testid":"escape-hatch-confirm",onClick:ep.handleEscapeHatchConfirm,children:z?"
1Switching...":"Continue"}),(0,n.jsxs)("button",{className:"scope-79eb8679 w-full cursor-pointer rounded-[8px] border border-[#414192] bg-white px-3.5 py-2 text-base font-semibold [font-family:inherit] disabled:pointer-events-none disabled:opacity-25",type:"button",style:{color:"#414192"},"data-testid":"escape-hatch-dismiss",onClick:ep.handleEscapeHatchDismiss,children:[" ","Stay here"," "]})]})]})]})}):null,(0,n.jsx)(k.A,{className:"scope-79eb8679",toasts:ec.toasts,onDismiss:ec.dismiss,"data-testid":"pinning-toast"})]}))}},935785(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(636003),i=r(102006),l=r(958469),c=r(723433),u=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){var t=e.toasts,r=e.onDismiss,d=_object_without_properties(e,["toasts","onDismiss"]);return(0,n.jsx)(o.Y,_object_spread_props(_object_spread({},d),{className:(0,u.cn)("scope-ec47d4b5",d.className),to:"body","data-testid":"teleport",children:(0,n.jsx)("div",{className:"scope-ec47d4b5 pointer-events-none fixed bottom-0 right-0 z-[2147483100] flex w-full max-w-[420px] flex-col gap-2 p-4","data-testid":"pinning-toast-region",children:(0,n.jsx)(i.V,{className:"scope-ec47d4b5",name:"pinning-toast","data-testid":"transition-group",children:(0,l.p)(t,function(e){return(0,n.jsxs)("div",{className:(0,u.cn)("scope-ec47d4b5 pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-md border border-slate-700 bg-slate-800 p-4 pr-10 text-white shadow-lg",e.removing&&"translate-x-4 opacity-0"),"data-testid":"pinning-toast-item",children:["error"===e.variant?(0,n.jsx)(c.A,{className:"scope-ec47d4b5 mt-0.5 h-5 w-5 shrink-0 text-red-400",icon:"alert-circle","data-testid":"mt-0.5"}):"success"===e.variant?(0,n.jsx)(c.A,{className:"scope-ec47d4b5 mt-0.5 h-5 w-5 shrink-0 text-green-400",icon:"check-circle","data-testid":"mt-0.5-1"}):"warning"===e.variant?(0,n.jsx)(c.A,{className:"scope-ec47d4b5 mt-0.5 h-5 w-5 shrink-0 text-yellow-400",icon:"alert-triangle","data-testid":"mt-0.5-2"}):(0,n.jsx)(c.A,{className:"scope-ec47d4b5 mt-0.5 h-5 w-5 shrink-0 text-blue-400",icon:"info-circle-thin","data-testid":"mt-0.5-3"}),(0,n.jsxs)("div",{className:"scope-ec47d4b5 flex-1",children:[(0,n.jsx)("div",{className:"scope-ec47d4b5 font-medium text-white",children:e.title}),e.description?(0,n.jsx)("div",{className:"scope-ec47d4b5 mt-0.5 text-sm text-gray-300",children:e.description}):null]}),(0,n.jsx)("button",{className:"scope-ec47d4b5 absolute right-2 top-2 cursor-pointer rounded-full border-none bg-transparent p-1 text-white hover:bg-slate-700",type:"button","aria-label":"Close toast","data-testid":"pinning-toast-close",onClick:function(){null==r||r(e.id)},children:(0,n.jsx)(c.A,{className:"scope-ec47d4b5 h-4 w-4",icon:"cross","data-testid":"h-4"})})]},e.id)})})})}))}},558231(e,t,r){"use strict";r.d(t,{A:()=>PinningZoom});var n=r(483134),o=r(723433);function PinningZoom(e){var t=e.zoom,r=e.maxZoom,i=void 0===r?10:r,l=e.isDesktop,c=e.onUpdateZoom;function zoomPercentage(){return Math.round(100*t)}function handleZoomIn(){var e=Math.min(t+.25,i);null==c||c(e)}function handleZoomOut(){var e=Math.max(t-.25,1);null==c||c(e)}return(0,n.jsx)(n.Fragment,{children:void 0!==l&&l?(0,n.jsxs)("div",{className:"flex h-10 items-center gap-1 rounded-md border border-gray-200 bg-white p-1 shadow-sm","data-testid":"pinning-zoom-control
1s",children:[(0,n.jsx)("button",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-none bg-transparent hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!(t>1),"aria-label":"Zoom out","data-testid":"pinning-zoom-out-button",onClick:handleZoomOut,children:(0,n.jsx)(o.A,{className:"h-4 w-4",icon:"minus","data-testid":"h-4"})}),(0,n.jsxs)("div",{className:"flex h-8 w-14 select-none items-center justify-center rounded-md border border-gray-200 bg-white text-sm font-medium text-gray-700",role:"status","aria-label":"Zoom percentage","data-testid":"flex",children:[zoomPercentage(),"%"," "]}),(0,n.jsx)("button",{className:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border-none bg-transparent hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!(t<i),"aria-label":"Zoom in","data-testid":"pinning-zoom-in-button",onClick:handleZoomIn,children:(0,n.jsx)(o.A,{className:"h-4 w-4",icon:"plus","data-testid":"h-4-1"})})]}):(0,n.jsxs)("div",{className:"flex h-10 items-center rounded-lg bg-white shadow-md","data-testid":"pinning-zoom-controls",children:[(0,n.jsx)("button",{className:"flex h-10 w-10 cursor-pointer items-center justify-center rounded-l-lg border-none bg-transparent p-1.5 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!(t>1),"data-testid":"pinning-zoom-out-button",onClick:handleZoomOut,children:(0,n.jsx)(o.A,{className:"h-5 w-5",icon:"zoom-out-o","data-testid":"h-5"})}),(0,n.jsx)("div",{className:"h-8 w-px bg-gray-100"}),(0,n.jsx)("button",{className:"flex h-10 w-10 cursor-pointer items-center justify-center rounded-r-lg border-none bg-transparent p-1.5 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!(t<i),"data-testid":"pinning-zoom-in-button",onClick:handleZoomIn,children:(0,n.jsx)(o.A,{className:"h-5 w-5",icon:"zoom-in-o","data-testid":"h-5-1"})})]})})}PinningZoom.displayName="PinningZoom"},589008(e,t,r){"use strict";r.d(t,{H:()=>useEscapeHatch});var n=r(293534),o=r(872274);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useEscapeHatch(e,t){var r=t.onConfirm,i=_sliced_to_array((0,n.useState)(!1),2),l=i[0],c=i[1];function buildEventPayload(){var t,r,n;return{triggerType:"transfers",pinCount:e.pins.length,messageCount:null!=(t=null==(n=e.activePin())||null==(r=n.messages)?void 0:r.length)?t:0}}return{escapeHatchModalOpen:l,handleEscapeHatchClick:function(){(0,o.Z2)(buildEventPayload()),c(!0)},handleEscapeHatchConfirm:function(){(0,o.BQ)(buildEventPayload()),c(!1),r()},handleEscapeHatchDismiss:function(){(0,o.j3)(buildEventPayload()),c(!1)}}}},533837(e,t,r){"use strict";r.d(t,{E:()=>useGoogleFont});var n=r(293534),o=new Set;function useGoogleFont(e){(0,n.useEffect)(function(){!e||o.has(e)||(o.add(e),r.e("8388").then(r.t.bind(r,363393,23)).then(function(t){t.load({google:{families:[e]}})}))},[e])}},852609(e,t,r){"use strict";r.d(t,{J:()=>injectHexColorPreviews,W:()=>useMarkdownRenderer});
1var n=r(731807),o=r.n(n),i=r(835324),l=/#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{8})\b/g,c=new(o()).Converter({simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,strikethrough:!0,tables:!0,tasklists:!0,openLinksInNewWindow:!0});function injectHexColorPreviews(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t.escapeFirst?(0,i.ZD)(e):e).replace(l,function(e){return'<span class="inline-flex items-baseline gap-[1px]"><span class="inline-block h-3 w-3 rounded border border-gray-300" style="background-color: '.concat(e,'" title="').concat(e,'"></span><span>').concat(e,"</span></span>")});return(0,i.B2)(r)}function useMarkdownRenderer(){return{renderMarkdown:function(e){return injectHexColorPreviews(c.makeHtml(e))}}}},990265(e,t,r){"use strict";r.d(t,{c:()=>usePinningFeedback});var n=r(293534),o=r(854868);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function usePinningFeedback(e,t,r){var i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).toast,l=_sliced_to_array((0,n.useState)(null),2),c=l[0],u=l[1],d=_sliced_to_array((0,n.useState)(""),2),p=d[0],f=d[1],_=_sliced_to_array((0,n.useState)(!1),2),h=_[0],m=_[1],g=_sliced_to_array((0,n.useState)("idle"),2),b=g[0],y=g[1];function lastEditedPin(){var e;return r&&null!=(e=null==t?void 0:t.find(function(e){return e.id===r}))?e:null}function resetFeedback(){u(null),f(""),m(!1),y("idle")}function handleSelectPositive(){u(!0),m(!0),y("idle")}function handleSelectNegative(){u(!1),m(!0),y("idle")}function handleCancel(){resetFeedback()}function handleSubmit(){return _async_to_generator(function(){var t,r,n,l;return _ts_generator(this,function(u){switch(u.label){case 0:if(null===c)return[2];if(!e)return null==i||i.error({title:"Unable to submit feedback",description:"Missing session information."}),[2];y("sending"),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,(0,o.Wz)(e,{positive:c,message:p.trim()||null,currentPin:null!=(t=null==(n=lastEditedPin())?void 0:n.id)?t:null,currentPinState:null!=(r=null==(l=lastEditedPin())?void 0:l.state)?r:null})];case 2:return u.sent(),y("success"),[3,4];case 3:return u.sent(),y("error"),null==i||i.error({title:"Feedback failed",description:"Something went wrong. Please try again."}),[3,4];case 4:return[2]}})})()}return(0,n.useEffect)(function(){if("success"===b){var e=setTimeout(function(){resetFeedback()},1500);return function(){clearTimeout(e)}}},[b]),{positive:c,setPositive:u,message:p,setMessage:f,isOpen:h,setIsOpen:m,status:b,setStatus:y,handleSelectPositive:handleSelectPositive,handleSelectNegative:handleSelectNegative,handleCancel:handleCancel,handleSubmit:handleSubmit,resetFeedback:resetFeedback}}},930082(e,t,r){"use strict";r.d(t,{BK:()=>usePinningPanel,Bo:()=>u});var n=r(293534),o=r(147141),i=r(596002),l=r(872274),c=r(854868);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var u=["#3B82F6","#8B5CF6","#EC4899","#F59E0B","#14B8A6"];function getClarificationAnswer(e){if(!e)return null;if(e.isTypingCustom){var t;return(null==(t=e.custom)?void 0:t.trim())||null}return e.selected||null}function usePinningPanel(e,t){var r,d,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},f=p.toast,_=p.pendingInitialMessage,h=_sliced_to_array((0,n.use
1State)(!!(0,o.IV)()),2),m=h[0];h[1];var g=_sliced_to_array((0,n.useState)([]),2),b=g[0],y=g[1],v=_sliced_to_array((0,n.useState)(null),2),w=v[0],j=v[1],k=_sliced_to_array((0,n.useState)(null),2),x=k[0],S=k[1],O=_sliced_to_array((0,n.useState)(null),2),P=O[0],A=O[1],C=_sliced_to_array((0,n.useState)(""),2),I=C[0],E=C[1],N=_sliced_to_array((0,n.useState)(new Set),2),D=N[0],T=N[1],M=_sliced_to_array((0,n.useState)(null),2),R=M[0],F=M[1],L=_sliced_to_array((0,n.useState)({}),2),B=L[0],z=L[1],U=_sliced_to_array((0,n.useState)("list"),2),H=U[0],q=U[1],V=_sliced_to_array((0,n.useState)(!1),2),G=V[0],K=V[1],W=_sliced_to_array((0,n.useState)(null),2),Q=W[0],J=W[1],Z=_sliced_to_array((0,n.useState)(!1),2),Y=Z[0],X=Z[1],ee=_sliced_to_array((0,n.useState)(null),2),et=ee[0],er=ee[1],en=_sliced_to_array((0,n.useState)(0),2),eo=en[0],ea=en[1],ei=_sliced_to_array((0,n.useState)(0),2),es=ei[0],el=ei[1],ec=_sliced_to_array((0,n.useState)(!0),2),eu=ec[0],ed=ec[1],ep=_sliced_to_array((0,n.useState)(null),2),ef=ep[0],e_=ep[1],eh=_sliced_to_array((0,n.useState)(!1),2),em=eh[0],eg=eh[1],eb=_sliced_to_array((0,n.useState)(!1),2),ey=eb[0],ev=eb[1],ew=_sliced_to_array((0,n.useState)(!1),2),ej=ew[0],ek=ew[1],ex=(0,n.useRef)(null),eS=_sliced_to_array((0,n.useState)(null),2),eO=eS[0],eP=eS[1],eA=(0,n.useRef)(null),eC=(0,n.useRef)(null),eI=(0,n.useRef)(null),eE=(0,n.useRef)(b);eE.current=b;var eN=(0,n.useRef)(D);eN.current=D;var eD=(0,n.useRef)(null),eT=(0,n.useRef)(null),eM=(0,n.useRef)(null),eR=(0,n.useRef)(null),eF=(0,n.useRef)(null);function activePin(){var e;return null!=(e=b.find(function(e){return e.id===w}))?e:null}function editingPin(){var e;return null!=(e=b.find(function(e){return e.id===Q}))?e:null}function hasCompletedPin(){return b.some(function(e){return"ready"===e.state||"unsupported"===e.state})}function readyPinsCount(){return b.filter(function(e){return"ready"===e.state}).length}function hasExistingPin(){return b.some(function(e){return!e.isNew})}function hasAiAssistanceOngoing(){return b.some(function(e){return"processing"===e.state||"needs_clarification"===e.state})}function hasUnfinishedPin(){return b.some(function(e){return"draft"===e.state||"processing"===e.state||"needs_clarification"===e.state})}function canAddNewPin(){var e=activePin();return b.length<1&&(!e||"ready"===e.state||"unsupported"===e.state)}function canRepositionActivePin(){var e=activePin();if(!e)return!1;var t=e.state,r=e.messages;return"draft"===t&&0===r.length}function lastAiMessageWithClarifications(){var e=activePin();if(!e)return null;for(var t=e.messages,r=t.length-1;r>=0;r-=1){var n=t[r];if((null==n?void 0:n.role)==="ai"&&n.clarifications&&n.clarifications.length>0)return n}return null}function pendingPillClarifications(){var e,t;return(null!=(e=null==(t=lastAiMessageWithClarifications())?void 0:t.clarifications)?e:[]).filter(function(e){return"asking"===e.status&&e.options.length>0})}function fontClarification(){return pendingPillClarifications().find(function(e){return"font_selection"===e.type})}function colorClarification(){return pendingPillClarifications().find(function(e){return"font_color"===e.type})}function selectedFontValue(){var e=fontClarification();if(e){var t=B[e.question];if(null==t?void 0:t.isTypingCustom)return t.custom||void 0;if(null==t?void 0:t.selected){var r=e.options.find(function(e){return e.label===t.selected});return(null==r?void 0:r.value)||t.selected}}}function selectedColorValue(){var e=colorClarification();if(e){var t=B[e.question];if(null==t?void 0:t.isTypingCustom)return t.custom||void 0;if(null==t?void 0:t.selected){var r=e.options.find(function(e){return e.label===t.selected});return(null==r?void 0:r.value)||t.selected}}}function hasAnyClarificationResponse(){return pendingPillClarifications().some(function(e){return getClarificationAnswer(B[e.question])})}function updatePin(e,t){y(function(r){return r.map(function(r){return r.id===e?t(r):r})})}function deletePin(e){y(function(t){return t.filter(function(t){return t.id!==e})}),j(function(t){return t===e?null:t}),e_(function(t){return(null==t?void 0:t.pinId)===e?null:t})}function clearRemovingPin(e){T(function(t){var r=new Set(t);return r.delete(e),r})}function isComposerTextValid(e){return e.trim().length>=1}function repositionActivePin(e){canRepositionActivePin()&&updatePin(w,function(t){return _object_spread_props(_object_spread({},t),{coordinates:e})})}function addPin(r){if(!canAddNewPin())return null;var n={id:(0,i.l)(),coordinates:r,state:"draft",messages:[],isNew:!0};return y(function(e){return _to_consumable_array(e).concat([n])}),j(n.id),m||(q("detail"),K(!0)),e&&t&&(0,l.bv)({artworkId:t,sessionId:e,pinId:n.id}),n}function handleDeletePin(r){var n,o,i,u,d=b.find(function(e){return e.id===r});if((null==d?void 0:d.state)==="processing"&&(null==(i=eF.current)||i.abort()),!e)return void deletePin(r);if(!((null!=(n=null==d||null==(o=d.messages)?void 0:o.length)?n:0)>0||(null==d?void 0:d.state)!=="draft")){t&&(0,l.IJ)({artworkId:t,sessionId:e,pinId:r,pinState:null!=(u=null==d?void 0:d.state)?u:"draft",hadMessages:!1}),deletePin(r),m||q("list");return}D.has(r)||(T(function(e){return new Set(e).add(r)}),(0,c.yI)(e,r).then(function(){if(t){var n,o,i;(0,l.IJ)({artworkId:t,sessionId:e,pinId:r,pinState:null!=(n=null==d?void 0:d.state)?n:"draft",hadMessages:(null!=(o=null==d||null==(i=d.messages)?void 0:i.length)?o:0)>0})}deletePin(r),clearRemovingPin(r),m||q("list")}).catch(function(){t&&(0,l.JY)({artworkId:t,sessionId:e,pinId:r}),clearRemovingPin(r),null==f||f.error({title:"Failed to remove pin",description:"Something went wrong. Please try again."})}))}function openDeletePinModal(e){F(e)}function closeDeletePinModal(){F(null)}function confirmDeletePin(){R&&(handleDeletePin(R),F(null))}function openEditPinModal(e){J(e)}function closeEditPinModal(){J(null)}function handleUpdatePinInstruction(t){Q&&e&&(X(!0),(0,c.vz)(e,Q,t).then(function(){updatePin(Q,function(e){return _object_spread_props(_object_spread({},e),{instruction:t})}),J(null)}
1).catch(function(){null==f||f.error({title:"Failed to update pin",description:"Something went wrong. Please try again."})}).finally(function(){X(!1)}))}function handleSelectClarificationOption(r,n){var o,i,c=_object_spread_props(_object_spread({},B),_define_property({},r,{selected:n,custom:null!=(o=null==(i=B[r])?void 0:i.custom)?o:"",isTypingCustom:!1}));z(c);var u=activePin();if(e&&t&&u){var d=u.messages.filter(function(e){return"user"===e.role}).length,p=u.messages.filter(function(e){return"ai"===e.role}).length;(0,l.a5)({artworkId:t,sessionId:e,pinId:u.id,optionValue:n||"",turnIndex:d+1,userMessagesCount:d,aiMessagesCount:p,optionType:"suggested"})}if(null!==n){var f=pendingPillClarifications().find(function(e){return e.question===r});if((null==f?void 0:f.type)==="finalize_confirmation")return void handleSubmit(c)}null===n||getClarificationAnswer(B[r])||setTimeout(function(){var e=pendingPillClarifications().findIndex(function(e){return e.question===r}),t=_to_consumable_array(pendingPillClarifications().slice(e+1)).concat(_to_consumable_array(pendingPillClarifications().slice(0,e))).find(function(e){return!getClarificationAnswer(c[e.question])});if(t&&eA.current){var n=t.label||t.question,o=eA.current.querySelector('[data-clarification-label="'.concat(CSS.escape(n),'"]'));o&&o.scrollIntoView({behavior:"smooth",block:"start"})}},100)}function handleToggleCustomInput(r){z(function(e){var t,n,o,i,l;return _object_spread_props(_object_spread({},e),_define_property({},r,{selected:null!=(t=null==(o=e[r])?void 0:o.selected)?t:null,custom:null!=(n=null==(i=e[r])?void 0:i.custom)?n:"",isTypingCustom:!(null==(l=e[r])?void 0:l.isTypingCustom)}))});var n=activePin();if(e&&t&&n){var o=n.messages.filter(function(e){return"user"===e.role}).length,i=n.messages.filter(function(e){return"ai"===e.role}).length;(0,l.a5)({artworkId:t,sessionId:e,pinId:n.id,optionValue:"",turnIndex:o+1,userMessagesCount:o,aiMessagesCount:i,optionType:"custom"})}}function handleCustomInputChange(e,t){z(function(r){var n,o;return _object_spread_props(_object_spread({},r),_define_property({},e,{selected:null!=(n=null==(o=r[e])?void 0:o.selected)?n:null,custom:t,isTypingCustom:!0}))})}function trackPinSelected(r,n,o){e&&t&&(0,l.ab)({artworkId:t,sessionId:e,pinId:r,previousPinId:null!=n?n:null,pinState:o})}function calculateUnansweredPositions(){var e=eA.current;if(e){var t=e.getBoundingClientRect(),r=0,n=0;pendingPillClarifications().forEach(function(o){if(!getClarificationAnswer(B[o.question])){var i=o.label||o.question,l=e.querySelector('[data-clarification-label="'.concat(CSS.escape(i),'"]'));if(l){var c=l.getBoundingClientRect();c.bottom<t.top?r+=1:c.top>t.bottom&&(n+=1)}}}),ea(r),el(n)}}function scrollToFirstUnanswered(e){var t=eA.current;if(t){var r=t.getBoundingClientRect(),n=!0,o=!1,i=void 0;try{for(var l,c=pendingPillClarifications()[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var u=l.value;if(!getClarificationAnswer(B[u.question])){var d=u.label||u.question,p=t.querySelector('[data-clarification-label="'.concat(CSS.escape(d),'"]'));if(p){var f=p.getBoundingClientRect();if("above"===e?f.bottom<r.top:f.top>r.bottom){p.scrollIntoView({behavior:"smooth",block:"start"});break}}}}}catch(e){o=!0,i=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw i}}}}function formatClarificationResponses(e){var t=null!=e?e:B,r=[],n=[],o=!0,i=!1,l=void 0;try{for(var c,u=pendingPillClarifications()[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){var d,p,f=c.value,_=getClarificationAnswer(t[f.question]),h=null!=(d=null==(p=t[f.question])?void 0:p.isTypingCustom)&&d;if(_){var m=f.label||f.question;r.push('"'.concat(m,'": ').concat(_)),n.push({question:f.question,value:_,option_type:h?"custom":"suggested"})}}}catch(e){i=!0,l=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}return{clarificationText:r.join("\n"),clarifications:n}}function dispatchPinMessage(e){var t,r=e.sessionId,n=e.artworkId,o=e.pinId,u=e.coordinates,d=e.message,p=e.isFirstMessage;null==(t=eF.current)||t.abort(),eF.current=new AbortController;var _=eE.current.filter(function(e){return e.id!==o}).map(function(e){var t;return{pinId:e.id,coordinates:e.coordinates,state:e.state,instruction:null!=(t=e.instruction)?t:""}});
1(0,c.t5)({sessionId:r,pinId:o,coordinates:u,userMessage:d,isFirstMessage:p,priorPins:_},{onAcknowledgment:function(e){updatePin(o,function(t){t.thinkingText;var r=_object_without_properties(t,["thinkingText"]);return e.message?_object_spread_props(_object_spread({},r),{thinkingText:e.message}):_object_spread({},r)})},onResult:function(e){var t,c,u,d=["ready","preview_ready","needs_clarification","unsupported"].includes(e.status)?e.status:"ready",p="ready"===e.status&&!e.generatedImageUrl,f=d;p?f="processing":"preview_ready"===d&&(f="ready");var _=null!=(t=e.clarifications)?t:[],h=e.message||"Done.",m=_.filter(function(e){return"asking"===e.status&&e.options.length>0}),g="needs_clarification"===f&&m.length>0;updatePin(o,function(t){t.thinkingText;var r,n=_object_spread_props(_object_spread({},_object_without_properties(t,["thinkingText"])),{state:f,messages:_to_consumable_array(t.messages).concat([_object_spread({id:(0,i.l)(),role:"ai",content:h,timestamp:Date.now()},g?_object_spread({clarifications:_},e.text?{textInfo:e.text}:{}):{})])});return e.instruction&&(n.instruction=e.instruction),e.aoiResult&&(n.areasOfInterest=e.aoiResult,n.highlightAreasEnabled=null==(r=t.highlightAreasEnabled)||r),n}),g&&z({}),eD.current=null,eT.current=null,eM.current=null,eR.current=null;var b=eE.current.find(function(e){return e.id===o}),y={artworkId:n,sessionId:r,pinId:o,userMessagesCount:(null!=(c=null==b?void 0:b.messages)?c:[]).filter(function(e){return"user"===e.role}).length,aiMessagesCount:(null!=(u=null==b?void 0:b.messages)?u:[]).filter(function(e){return"ai"===e.role}).length+1};if(r&&n&&("ready"===f||p?(0,l.Eq)(y):"unsupported"===f?(0,l.a9)(y):"needs_clarification"===f&&(0,l.CO)(_object_spread_props(_object_spread({},y),{optionsCount:m.reduce(function(e,t){return e+t.options.length},0),questionType:m.map(function(e){return e.type}).filter(function(e){return!!e}).join(",")})),"preview_ready"===e.status&&e.generatedImageUrl)){ek(!1);var v={pinId:o,generatedImageUrl:e.generatedImageUrl};e.instruction&&(v.instruction=e.instruction),e_(v),K(!1),(0,l.i6)({artworkId:n,sessionId:r,generatedImageUrl:e.generatedImageUrl,pinId:o})}},onStreamEnd:function(){y(function(e){var t=e.find(function(e){return e.id===o});return(null==t?void 0:t.state)==="processing"?(r&&n&&(0,l.hn)({artworkId:n,sessionId:r,pinId:o}),e.map(function(e){return e.id===o?_object_spread_props(_object_spread({},e),{state:"ready"}):e})):e})},onError:function(){var e,t,i,c=eE.current.find(function(e){return e.id===o}),u=(null!=(e=null==c?void 0:c.messages)?e:[]).filter(function(e){return"user"===e.role}).length,d=(null!=(t=null==c?void 0:c.messages)?t:[]).filter(function(e){return"ai"===e.role}).length;r&&n&&(0,l.Bb)({artworkId:n,sessionId:r,pinId:o,errorType:"processing_error",userMessagesCount:u,aiMessagesCount:d});var p=null!=(i=eT.current)?i:"draft",_=eM.current;updatePin(o,function(e){return e.thinkingText,_object_spread_props(_object_spread({},_object_without_properties(e,["thinkingText"])),{state:p,messages:null!=_?_:e.messages.slice(0,-1)})}),eD.current&&(z(eD.current),eD.current=null),null!==eR.current&&(E(eR.current),eR.current=null),eT.current=null,eM.current=null,null==f||f.error({title:"Something went wrong",description:"Please try again."})}},{isPinActive:function(e){return eE.current.some(function(t){return t.id===e})&&!eN.current.has(e)},signal:eF.current.signal})}function handleSubmit(r){var n=activePin();if(n&&"processing"!==n.state){var o=formatClarificationResponses(r),c=o.clarificationText,u=o.clarifications,d=[c,I.trim()].filter(Boolean).join("\n");if(d){var p=n.id,f=(0,i.l)(),_=0===n.messages.filter(function(e){return"user"===e.role}).length,h=n.messages.filter(function(e){return"user"===e.role}).length+1,m=n.messages.filter(function(e){return"user"===e.role}).length,g=n.messages.filter(function(e){return"ai"===e.role}).length;e&&t&&(0,l.Dk)({artworkId:t,sessionId:e,pinId:p,isFirstMessage:_,turnIndex:h,userMessagesCount:m,aiMessagesCount:g,clarifications:u}),eD.current=_object_spread({},null!=r?r:B),eT.current=n.state,eM.current=_to_consumable_array(n.messages),eR.current=I,updatePin(p,function(e){return e.thinkingText,_object_spread_props(_object_spread({},_object_without_properties(e,["thinkingText"])),{state:"processing",messages:_to_consumable_array(e.messages.map(function(e){return e.clarifications,_object_without_properties(e,["clarifications"])})).concat([{id:f,role:"user",content:d,timestamp:Date.now()}])})}),E(""),z({}),er(p),e&&dispatchPinMessage({sessionId:e,artworkId:t,pinId:p,coordinates:n.coordinates,message:d,isFirstMessage:_})}}}(0,n.useEffect)(function(){"list"===H&&(K(!1),S(null),A(null))},[H]),(0,n.useEffect)(function(){var e;eC.current&&(null==(e=activePin())?void 0:e.messages.length)&&setTimeout(function(){eC.current&&(eC.current.scrollTop=eC.current.scrollHeight)},0)},[null==(r=activePin())?void 0:r.messages.length]),(0,n.useEffect)(function(){var e=activePin();((null==e?void 0:e.state)==="ready"||(null==e?void 0:e.state)==="unsupported")&&K(!1)},[null==(d=activePin())?void 0:d.state]),(0,n.useEffect)(function(){E(""),z({})},[w]),(0,n.useEffect)(function(){null!==eO&&ex.current&&setTimeout(function(){ex.current&&null!==eO&&(ex.current.selectionStart=eO,ex.current.selectionEnd=eO,ex.current.scrollTop=ex.current.scrollHeight),eP(null)},0)},[I,eO]),(0,n.useEffect)(function(){pendingPillClarifications().length>0&&calculateUnansweredPositions()},[pendingPillClarifications().length,B]),(0,n.useEffect)(function(){if(0!==b.length){var e=b.find(function(e){return"ready"!==e.state&&"unsupported"!==e.state});e&&(m?w||(j(e.id),setTimeout(function(){var t,r=null==(t=eI.current)?void 0:t.querySelector('[data-pin-id="'.concat(e.id,'"]'));null==r||r.scrollIntoView({behavior:"smooth",block:"center"})},100)):"list"===H&&(j(e.id),q("detail"),K(!0)))}},[b,H,w,m]),(0,n.useEffect)(function(){m||0!==b.length||q("list")},[b.length,m]),(0,n.useEffect)(function(){var e=activePin();!m&&"detail"===H&&e&&("ready"===e.state||"unsupported"===e.state)&&(S(e.id),A("panel"))},[H,activePin(),m]),(0,n.useEffect)(function(){if(!m&&w){var e=b.find(function(e){return e.id===w});(null==e?void 0:e.isNew)&&(null==e?void 0:e.state)==="draft"&&(null==e?void 0:e.messages.length)===0&&(q("detail"),K(!0))}},[w,b,m]);var eL=(0,n.useRef)(!1);function hydratePins(e){y(e.map(function(e){var t=(Array.isArray(e.messages)?e.messages:[]).filter(function(e){return"ai_ack"!==e.role}).map(function(e){return _object_spread({id:e.id||"",role:e.role||"user",content:e.content||"",timestamp:e.timestamp||Date.now()}
1,e.options?{options:e.options}:{},e.questionType?{questionType:e.questionType}:{},e.clarifications?{clarifications:e.clarifications}:{},e.textInfo?{textInfo:e.textInfo}:{})});0===t.length&&e.message&&t.push({id:"msg-".concat(e.pinId),role:"ai",content:e.message,timestamp:Date.now()});var r=e.status||e.state||"draft",n=e.instruction||e.summary||void 0,o={id:e.pinId||e.id||"",coordinates:e.coordinates||{x:0,y:0},state:r,messages:t,isNew:!1};return n&&(o.instruction=n),e.areaOfInterest&&(o.areasOfInterest=e.areaOfInterest),e.segmentationMaskUrl&&(o.segmentationMaskUrl=e.segmentationMaskUrl),o})),j(null)}function handleApprovePreview(){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:if(!ef||!e||em||ey)return[2,null];eg(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,c.Zy)(e)];case 2:return[2,r.sent()];case 3:return r.sent(),eg(!1),null==f||null==(t=f.error)||t.call(f,{title:"Failed to approve",description:"Please try again."}),[2,null];case 4:return[2]}})})()}function handleRejectPreview(){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:if(!ef||!e||ey||em)return[2,null];ev(!0),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,(0,c.nx)(e)];case 2:return[2,r.sent()];case 3:return r.sent(),ev(!1),null==f||null==(t=f.error)||t.call(f,{title:"Failed to reject",description:"Please try again."}),[2,null];case 4:return[2]}})})()}return(0,n.useEffect)(function(){if(_&&!eL.current&&0!==b.length&&w){var r=b.find(function(e){return e.id===w});if(r&&"draft"===r.state&&!(r.messages.length>0)&&e){eL.current=!0;var n=r.id,o=(0,i.l)();eT.current=r.state,eM.current=_to_consumable_array(r.messages),eR.current=_,updatePin(n,function(e){return e.thinkingText,_object_spread_props(_object_spread({},_object_without_properties(e,["thinkingText"])),{state:"processing",messages:[{id:o,role:"user",content:_,timestamp:Date.now()}]})}),er(n),t&&e&&(0,l.Dk)({artworkId:t,sessionId:e,pinId:n,isFirstMessage:!0,turnIndex:1,userMessagesCount:1,aiMessagesCount:0,clarifications:[]}),dispatchPinMessage({sessionId:e,artworkId:t,pinId:n,coordinates:r.coordinates,message:_,isFirstMessage:!0})}}},[b,w,e,t,_]),(0,n.useEffect)(function(){return function(){var e;null==(e=eF.current)||e.abort(),y([]),j(null),er(null)}},[]),{PIN_COLORS:u,MAX_PINS:1,isDesktop:m,pins:b,setPins:y,activePinId:w,setActivePinId:j,hoveredPinId:x,setHoveredPinId:S,hoveredPinSource:P,setHoveredPinSource:A,composerText:I,setComposerText:E,removingPinIds:D,pendingDeletePinId:R,clarificationResponses:B,mobileView:H,setMobileView:q,isPanelExpanded:G,setIsPanelExpanded:K,editingPinId:Q,isUpdatingPinInstruction:Y,lastEditedPinId:et,unansweredAbove:eo,unansweredBelow:es,showPins:eu,setShowPins:ed,previewApproval:ef,setPreviewApproval:e_,isApproving:em,setIsApproving:eg,isRejecting:ey,isPreviewImageLoaded:ej,setIsPreviewImageLoaded:ek,textareaRef:ex,pendingCursorPosition:eO,setPendingCursorPosition:eP,clarificationScrollRef:eA,messagesScrollRef:eC,pinsContainerRef:eI,activePin:activePin,editingPin:editingPin,hasCompletedPin:hasCompletedPin,readyPinsCount:readyPinsCount,hasExistingPin:hasExistingPin,hasAiAssistanceOngoing:hasAiAssistanceOngoing,hasUnfinishedPin:hasUnfinishedPin,canAddNewPin:canAddNewPin,canRepositionActivePin:canRepositionActivePin,lastAiMessageWithClarifications:lastAiMessageWithClarifications,pendingPillClarifications:pendingPillClarifications,fontClarification:fontClarification,colorClarification:colorClarification,selectedFontValue:selectedFontValue,selectedColorValue:selectedColorValue,hasAnyClarificationResponse:hasAnyClarificationResponse,addPin:addPin,repositionActivePin:repositionActivePin,handleDeletePin:handleDeletePin,openDeletePinModal:openDeletePinModal,closeDeletePinModal:closeDeletePinModal,confirmDeletePin:confirmDeletePin,openEditPinModal:openEditPinModal,closeEditPinModal:closeEditPinModal,handleUpdatePinInstruction:handleUpdatePinInstruction,handleSelectClarificationOption:handleSelectClarificationOption,handleToggleCustomInput:handleToggleCustomInput,handleCustomInputChange:handleCustomInputChange,handleSubmit:handleSubmit,isComposerTextValid:isComposerTextValid,trackPinSelected:trackPinSelected,calculateUnansweredPositions:calculateUnansweredPositions,scrollToFirstUnanswered:scrollToFirstUnanswered,hydratePins:hydratePins,handleApprovePreview:handleApprovePreview,handleRejectPreview:handleRejectPreview}}},854868(e,t,r){"use strict";r.d(t,{B_:()=>cancelSession,C5:()=>completeSession,Wz:()=>submitFeedback,Zy:()=>approvePin,b0:()=>retryPreview,cS:()=>bulkDeletePins,hF:()=>fetchPins,jw:()=>createSession,nx:()=>rejectPin,t5:()=>submitPinMessage,vz:()=>updatePinInstruction,yI:()=>removePin});var n=r(73925),o=r(299410);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _ts_values(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
1if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function parseSseEventChunk(e){var t=e.split(/\r?\n/).map(function(e){return e.trimEnd()}).filter(function(e){return e.length>0&&!e.startsWith(":")});if(0===t.length)return null;var r=[],n=!0,o=!1,i=void 0;try{for(var l,c,u=t[Symbol.iterator]();!(n=(c=u.next()).done);n=!0){var d=c.value;if(d.startsWith("event:")){l=d.slice(6).trim();continue}d.startsWith("data:")&&r.push(d.slice(5).trimStart())}}catch(e){o=!0,i=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}var p=r.join("\n");if(!p)return null;try{return{event:l,data:JSON.parse(p)}}catch(e){return{event:l,data:p}}}function attemptPinMessage(e,t){return _async_to_generator(function(e,t){var r,n,i,l,c,u,d,p,f,_,h,m,g,b,y,v,w,j,k,x=arguments;return _ts_generator(this,function(S){switch(S.label){case 0:return r=(x.length>2&&void 0!==x[2]?x[2]:{}).signal,[4,fetch("/api/pin_sessions/".concat(e.sessionId,"/message"),{method:"POST",headers:{"Content-Type":"application/json"},signal:null!=r?r:null,body:JSON.stringify({pin_id:e.pinId,coordinates:e.coordinates,user_message:e.userMessage,is_first_message:e.isFirstMessage,prior_pins:e.priorPins.map(function(e){var t,r;return{pin_id:e.pinId,coordinates:e.coordinates,state:e.state,instruction:"string"==typeof e.instruction?e.instruction:null!=(t=null==(r=e.instruction)?void 0:r.instruction)?t:""}})})})];case 1:if(!(n=S.sent()).ok)throw i=Error("Failed to submit pin message (".concat(n.status,")")),n.status>=400&&n.status<500&&(i.name="ClientError"),i;if(!n.body)throw Error("Missing streaming response body");l=n.body.getReader(),c=new TextDecoder,u="",S.label=2;case 2:return[4,l.read()];case 3:if(f=(p=S.sent()).value,p.done)return[3,4];u+=c.decode(f,{stream:!0}),u=null!=(d=(_=u.split(/\r?\n\r?\n/)).pop())?d:"",h=!0,m=!1,g=void 0;try{for(b=_[Symbol.iterator]();!(h=(y=b.next()).done);h=!0)if(v=y.value,w=parseSseEventChunk(v)){if("acknowledgment"===w.event)t.onAcknowledgment((0,o.Tm)(w.data));else if("result"===w.event){if(j=(0,o.Tm)(w.data),t.onResult(j),"ready"!==j.status)return[2,!1]}else if("error"===w.event)throw k=(0,o.Tm)(w.data),Error((null==k?void 0:k.error)||"Server error")}}catch(e){m=!0,g=e}finally{try{h||null==b.return||b.return()}finally{if(m)throw g}}return[3,2];case 4:return[2,!0]}})}).apply(this,arguments)}function submitPinMessage(e,t){return _async_to_generator(function(e,t){var r,n,o,i,l,c,u,d=arguments;return _ts_generator(this,function(p){switch(p.label){case 0:r=function(r){var n,c;return _ts_generator(this,function(u){switch(u.label){case 0:if((null==i?void 0:i.aborted)||"function"==typeof o&&!o(e.pinId))return[2,{v:void 0}];u.label=1;case 1:return u.trys.push([1,3,,6]),[4,attemptPinMessage(e,t,i?{signal:i}:{})];case 2:return u.sent()&&(null==(n=t.onStreamEnd)||n.call(t)),[2,{v:void 0}];case 3:if(c=u.sent(),null==i?void 0:i.aborted)return[2,{v:void 0}];if("ClientError"===(l=_instanceof(c,Error)?c:Error("Unknown error")).name)return t.onError(l),[2,{v:void 0}];if(!(r<3))return[3,5];return[4,new Promise(function(e){setTimeout(e,1e3*r)})];case 4:u.sent(),u.label=5;case 5:return[3,6];case 6:return[2]}})},o=(n=d.length>2&&void 0!==d[2]?d[2]:{}).isPinActive,i=n.signal,l=Error("Unknown error"),c=1,p.label=1;case 1:if(!(c<=3))return[3,4];return[5,_ts_values(r(c))];case 2:if("object"===_type_of(u=p.sent()))return[2,u.v];p.label=3;case 3:return c+=1,[3,1];case 4:return t.onError(l),[2]}})}).apply(this,arguments)}function createSession(e){return _async_to_generator(function(e){var t,r,i,l=arguments;return _ts_generator(this,function(c){switch(c.label){case 0:return t=(l.length>1&&void 0!==l[1]?l[1]:{}).previewImageName,r={artworkId:e},t&&(r.previewImageName=t),[4,n.default.designLab.pinning.createSession((0,o.p8)(r))];case 1:return i=c.sent(),[2,(0,o.Tm)(i)]}})}).apply(this,arguments)}function fetchPins(e){return _async_to_generator(function(){var t,r;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,n.default.designLab.pinning.getPins({id:e})];case 1:return[2,{pins:(Array.isArray((r=i.sent()).pins)?r.pins:[]).map(function(e){return(0,o.Tm)(e)}),generatedImageUrl:null!=(t=r.generated_image_url)?t:null}]}})})()}function completeSession(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.completeSession((0,o.p8)({id:e}))];case 1:return t=r.sent(),[2,(0,o.Tm)(t)]}})})()}function cancelSession(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.cancelSession((0,o.p8)({id:e}))];case 1:return t=r.sent(),[2,(0,o.Tm)(t)]}})})()}function removePin(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,n.default.designLab.pinning.removePin({id:e,pinId:t})]})})()}function updatePinInstruction(e,t,r){return _async_to_generator(function(){var i;return _ts_generator(this,function(l){switch(l.label){case 0:return[4,n.default.designLab.pinning.updatePinInstruction({id:e,pinId:t},(0,o.p8)({instruction:r}))];case 1:return i=l.sent(),[2,(0,o.Tm)(i)]}})})()}function bulkDeletePins(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.bulkDeletePins({id:e},(0,o.p8)({pinIds:t}))];case 1:return r.sent(),[2]}})})()}function submitFeedback(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.createFeedback({id:e},(0,o.p8)({feedback:t}))];case 1:return r.sent(),[2]}})})()}function approvePin(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.approvePin({id:e})];case 1:return t=r.sent(),[2,(0,o.Tm)(t)]}})})()}function rejectPin(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.rejectPin({id:e})];case 1:return t=r.sent(),[2,(0,o.Tm)(t)]}})})()}function retryPreview(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,n.default.designLab.pinning.retryPreview({id:e})];case 1:return t=r.sent(),[2,(0,o.Tm)(t)]}})})()}},152467(e,t,r){"use strict";r.d(t,{g:()=>usePinningToast});var n=r(293534),o=r(596002);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var i=[],l=new Set;function emitChange(){l.forEach(function(e){return e()})}function subscribe(e){return l.add(e),function(){return l.delete(e)}}function getSnapshot(){return i}function addToast(e){var t=e.title,r=e.description,n=e.variant,l=e.duration,c=void 0===l?5e3:l,u=(0,o.l)(),d={id:u,title:t,variant:void 0===n?"default":n,removing:!1};return r&&(d.description=r),i=_to_consumable_array(i.slice(-4)).concat([d]),emitChange(),c>0&&setTimeout(function(){return dismissToast(u)},c),u}function dismissToast(e){i=i.map(function(t){return t.id===e?_object_spread_props(_object_spread({},t),{removing:!0}):t}),emitChange(),setTimeout(function(){i=i.filter(function(t){return t.id!==e}),emitChange()},300)}function clearAll(){i=[],emitChange()}function usePinningToast(){return{toasts:(0,n.useSyncExternalStore)(subscribe,getSnapshot),dismiss:dismissToast,clearAll:clearAll,toast:function(e){return addToast(e)},success:function(e){return addToast(_object_spread_props(_object_spread({},e),{variant:"success"}))},error:function(e){return addToast(_object_spread_props(_object_spread({},e),{variant:"error"}))},warning:function(e){return addToast(_object_spread_props(_object_spread({},e),{variant:"warning"}))},info:function(e){return addToast(_object_spread_props(_object_spread({},e),{variant:"info"}))}}}},872274(e,t,r){"use strict";r.d(t,{AJ:()=>trackTransfersPinningInstructionsRemoved,BQ:()=>trackPinSessionEscapeHatchConfirmed,Bb:()=>trackTransfersPinError,CO:()=>trackTransfersPinNeedsClarification,Dk:()=>trackTransfersPinMessageSubmitted,Eq:()=>trackTransfersPinReady,IJ:()=>trackTransfersPinDeleted,JY:()=>trackTransfersPinDeleteFailed,VV:()=>trackTransfersPinsCtaClicked,Z2:()=>trackPinSessionEscapeHatchClicked,Zu:()=>trackTransfersPinningModeEntered,a5:()=>trackTransfersPinClarificationClicked,a9:()=>trackTransfersPinUnsupported,ab:()=>trackTransfersPinSelected,bv:()=>trackTransfersPinCreated,d9:()=>trackPinSessionsGenDiscarded,e:()=>trackTransfersPinningSessionCompleted,gL:()=>trackTransfersPinningSessionCompletionFailed,hb:()=>trackPinSessionsGenPreviewAfterClicked,hn:()=>trackTransfersArtistEditEscalationShown,i6:()=>trackPinSessionGeneratedImageShown,iA:()=>trackPinsSessionEditCancelModalConfirmed,j3:()=>trackPinSessionEscapeHatchDismissed,jo:()=>trackPinsSessionCancelled,jy:()=>trackTransfersPinningSessionEntryInput,lS:()=>trackPinsSessionSummaryEditClicked,lb:()=>trackPinsSessionEditCancelFailed,mV:()=>trackPinsSessionCancellationAborted,rO:()=>trackPinsSessionEditCancelModalStayed,s5:()=>trackPinSessionsGenPreviewBeforeClicked,vn:()=>trackPinSessionsGenConfirmed});var n=r(299410),o=r(467265);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var buildPayload=function(e){return(0,n.p8)(_object_spread({timestamp:Date.now()},e))},trackTransfersPinsCtaClicked=function(e){var t=e.artworkId,r=e.sessionId,n=e.userType;(0,o.Py)("transfers_pins_cta_clicked",buildPayload(_object_spread({artworkId:t},r&&{sessionId:r},n&&{userType:n})))},trackPinsSessionSummaryEditClicked=function(e){var t=e.artworkId,r=e.sessionId;(0,o.Py)("pins_session_summary_edit_clicked",buildPayload({artworkId:t,sessionId:r}))},trackTransfersPinningInstructionsRemoved=function(e){var t=e.artworkId,r=e.sessionId;(0,o.Py)("transfers_pinning_instructions_removed",buildPayload({artworkId:t,sessionId:r}))},trackTransfersPinningModeEntered=function(e){var t=e.artworkId,r=e.sessionId,n=e.hasExistingPins,i=e.initialMessage;(0,o.Py)("transfers_pinning_mode_entered",buildPayload(_object_spread({artworkId:t,sessionId:r,hasExistingPins:n},i&&{initialMessage:i})))},trackPinsSessionCancelled=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinsCount,i=e.readyPinsCount;(0,o.Py)("pins_session_cancelled",buildPayload({artworkId:t,sessionId:r,pinsCount:n,readyPinsCount:i}))},trackPinsSessionCancellationAborted=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinsCount;(0,o.Py)("pins_session_cancellation_aborted",buildPayload({artworkId:t,sessionId:r,pinsCount:n}))},trackPinsSessionEditCancelModalConfirmed=function(e){var t=e.sessionId,r=e.newPinsCount;(0,o.Py)("pins_session_edit_cancel_modal_confirmed",buildPayload({sessionId:t,newPinsCount:r}))},trackPinsSessionEditCancelModalStayed=function(e){var t=e.sessionId,r=e.newPinsCount;(0,o.Py)("pins_session_edit_cancel_modal_stayed",buildPayload({sessionId:t,newPinsCount:r}))},trackPinsSessionEditCancelFailed=function(e){var t=e.sessionId,r=e.newPinsCount,n=e.errorMessage;(0,o.Py)("pins_session_edit_cancel_failed",buildPayload({sessionId:t,newPinsCount:r,errorMessage:n}))},trackTransfersPinningSessionCompleted=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinsCount,i=e.readyPinsCount,l=e.summary;(0,o.Py)("transfers_pinning_session_completed",buildPayload({artworkId:t,sessionId:r,pinsCount:n,readyPinsCount:i,summary:l}))},trackTransfersPinningSessionCompletionFailed=function(e){var t=e.artworkId,r=e.sessionId,n=e.errorMessage;(0,o.Py)("transfers_pinning_session_completion_failed",buildPayload({artworkId:t,sessionId:r,errorMessage:n}))},trackTransfersPinCreated=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId;(0,o.Py)("transfers_pin_created",buildPayload({artworkId:t,sessionId:r,pinId:n}))},trackTransfersPinMessageSubmitted=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.isFirstMessage,l=e.turnIndex,c=e.userMessagesCount,u=e.aiMessagesCount,d=e.clarifications;(0,o.Py)("transfers_pin_message_submitted",buildPayload({artworkId:t,sessionId:r,pinId:n,isFirstMessage:i,turnIndex:l,userMessagesCount:c,aiMessagesCount:u,clarifications:d}))},trackTransfersPinClarificationClicked=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.optionValue,l=e.turnIndex,c=e.userMessagesCount,u=e.aiMessagesCount,d=e.optionType;(0,o.Py)("transfers_pin_clarification_clicked",buildPayload({artworkId:t,sessionId:r,pinId:n,optionValue:i,turnIndex:l,userMessagesCount:c,aiMessagesCount:u,optionType:d}
1))},trackTransfersPinReady=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.userMessagesCount,l=e.aiMessagesCount;(0,o.Py)("transfers_pin_ready",buildPayload({artworkId:t,sessionId:r,pinId:n,userMessagesCount:i,aiMessagesCount:l}))},trackTransfersPinUnsupported=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.userMessagesCount,l=e.aiMessagesCount;(0,o.Py)("transfers_pin_unsupported",buildPayload({artworkId:t,sessionId:r,pinId:n,userMessagesCount:i,aiMessagesCount:l}))},trackTransfersPinNeedsClarification=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.optionsCount,l=e.questionType,c=e.userMessagesCount,u=e.aiMessagesCount;(0,o.Py)("transfers_pin_needs_clarification",buildPayload(_object_spread_props(_object_spread({artworkId:t,sessionId:r,pinId:n,optionsCount:i},l&&{questionType:l}),{userMessagesCount:c,aiMessagesCount:u})))},trackTransfersPinError=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.errorType,l=e.userMessagesCount,c=e.aiMessagesCount;(0,o.Py)("transfers_pin_error",buildPayload({artworkId:t,sessionId:r,pinId:n,errorType:i,userMessagesCount:l,aiMessagesCount:c}))},trackTransfersPinSelected=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.previousPinId,l=e.pinState;(0,o.Py)("transfers_pin_selected",buildPayload(_object_spread_props(_object_spread({artworkId:t,sessionId:r,pinId:n},i&&{previousPinId:i}),{pinState:l})))},trackTransfersPinDeleted=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId,i=e.pinState,l=e.hadMessages;(0,o.Py)("transfers_pin_deleted",buildPayload({artworkId:t,sessionId:r,pinId:n,pinState:i,hadMessages:l}))},trackTransfersPinDeleteFailed=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId;(0,o.Py)("transfers_pin_delete_failed",buildPayload({artworkId:t,sessionId:r,pinId:n}))},trackPinSessionEscapeHatchClicked=function(e){var t=e.triggerType,r=e.pinCount,n=e.messageCount;(0,o.Py)("pin_session_escape_hatch_clicked",buildPayload({triggerType:t,pinCount:r,messageCount:n}))},trackPinSessionEscapeHatchConfirmed=function(e){var t=e.triggerType,r=e.pinCount,n=e.messageCount;(0,o.Py)("pin_session_escape_hatch_confirmed",buildPayload({triggerType:t,pinCount:r,messageCount:n}))},trackPinSessionEscapeHatchDismissed=function(e){var t=e.triggerType,r=e.pinCount,n=e.messageCount;(0,o.Py)("pin_session_escape_hatch_dismissed",buildPayload({triggerType:t,pinCount:r,messageCount:n}))},trackTransfersPinningSessionEntryInput=function(e){var t=e.artworkId,r=e.inputValue,n=e.userType;(0,o.Py)("pinning_session_entry_input",buildPayload(_object_spread({artworkId:t,placement:null,input:r},n&&{userType:n})))},trackPinSessionsGenPreviewBeforeClicked=function(e){var t=e.artworkId,r=e.sessionId,n=e.generatedImageUrl;(0,o.Py)("pin_sessions_gen_preview_before_clicked",buildPayload({artworkId:t,sessionId:r,generatedImageUrl:n}))},trackPinSessionsGenPreviewAfterClicked=function(e){var t=e.artworkId,r=e.sessionId,n=e.generatedImageUrl;(0,o.Py)("pin_sessions_gen_preview_after_clicked",buildPayload({artworkId:t,sessionId:r,generatedImageUrl:n}))},trackPinSessionsGenConfirmed=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId;(0,o.Py)("pin_sessions_gen_confirmed",buildPayload({artworkId:t,sessionId:r,pinId:n}))},trackPinSessionsGenDiscarded=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId;(0,o.Py)("pin_sessions_gen_discarded",buildPayload({artworkId:t,sessionId:r,pinId:n}))},trackPinSessionGeneratedImageShown=function(e){var t=e.artworkId,r=e.sessionId,n=e.generatedImageUrl,i=e.pinId;(0,o.Py)("pin_session_generated_image_shown",buildPayload({artworkId:t,sessionId:r,generatedImageUrl:n,pinId:i}))},trackTransfersArtistEditEscalationShown=function(e){var t=e.artworkId,r=e.sessionId,n=e.pinId;(0,o.Py)("transfers_artist_edit_escalation_shown",buildPayload({artworkId:t,sessionId:r,pinId:n}))}},788088(e,t,r){"use strict";r.d(t,{A:()=>PreCut});var n=r(483134),o=r(997252),i=r(723433),l=r(703601),c=r(467265),u=r(662878),d=r(482797),p=r(745063),f=r(338908),_=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function PreCut(e){var t=e.isModal,r=_object_without_properties(e,["isModal"]),h=(0,f.s)(),m=h.t,g=h.n,b=(0,_.useDtfStore)();function preCutPrice(){return b.preCutPrice}function preCut(){return b.preCut}function preCutUpsellThreshold(){return b.preCutUpsellThreshold}function enablePreCut(){return b.enablePreCut}function totalQuantity(){return b.totalQuantity}function preCutDuration(){return b.preCutDuration}function productCartQuantity(){return b.productCartQuantity}function dtfCategory(){return b.dtfCategory}function showMultiSize(){return b.showMultiSize}function isStandardArtwork(){return b.isStandardArtwork}function artworks(){return b.artworks}function isSpangle(){return b.isSpangle}function sticker(){return b.sticker}function businessLine(){return b.businessLine}function isProColor(){return b.isProColor}function totalSeconds(){return 60*Math.ceil(preCutDuration()*(productCartQuantity()+totalQuantity())/60)}function showPreCutUpsell(){var e=!!totalQuantity();return preCutUpsellThreshold()?totalSeconds()/60>=preCutUpsellThreshold()&&e:e}function totalQuantityText(){return m("item",productCartQuantity()+totalQuantity())}function preCutSavedTimeText(){return(0,u.G)(1e3*totalSeconds()+(0,d.s)().getTime())}function updatePreCut(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return b.updatePreCut.apply(b,_to_consumable_array(t))}function submitPreCutEvent(){var e,t=preCut()?"disable":"enable";(0,c.Py)("pre_cut_toggle",{pre_cut:t,is_upsell:!0,page:"pdp"}),(0,p.il)({product_line:(e={sticker:sticker(),isProColor:isProColor(),isSpangle:isSpangle()}).sticker?"sticker":e.isProColor?"pro color":e.isSpangle?"spangle":"dtf",artwork:artworks()[0],edit_type:"enable"===t?"precut transfer selected":"precut transfer removed",artworks_count:artworks().length,location:"pdp",pre_cut_transfers:preCut(),business_line:businessLine()})}function togglePreCut(){submitPreCutEvent(),updatePreCut(!preCut())}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("pre-cut scope-52b1b65c",null==r?void 0:r.className,{"pre-cut--mau":void 0!==t&&t,"pre-cut--multi-size":showMultiSize()}),children:[showPreCutUpsell()?(0,n.jsxs)("div",{className:"pre-cut__upsell scope-52b1b65c",children:[(0,n.jsxs)("span",{className:"pre-cut__upsell-title scope-52b1b65c",children:["Save ",preCutSavedTimeText()]}),(0,n.jsx)("br",{className:"scope-52b1b65c"})," By letting us precut your"," ",(0,n.jsx)("span",{className:"pre-cut__upsell-quantity scope-52b1b65c",children:totalQuantityText()}),productCartQuantity()?(0,n.jsxs)("span",{className:"pre-cut__upsell-cart-quantity scope-52b1b65c",children:[", including"," ",(0,n.jsx)("span",{className:"pre-cut__upsell-quantity scope-52b1b65c",children:productCartQuantity()})," ","from your cart"]}):null,". "]}):(0,n.jsx)("div",{className:"pre-cut__title scope-52b1b65c",children:"Want to save time?"}),(0,n.jsxs)("div",{className:"pre-cut__checkbox-wrapper scope-52b1b65c",children:[(0,n.jsxs)("label",{className:(0,o.cn)("pre-cut__label scope-52b1b65c",{"pre-cut__label--standard-artwork":isStandardArtwork()}),"data-testid":"pre-cut-label",children:[(0,n.jsx)("span",{className:"scope-52b1b65c sr-only",children:"Pre-cut"}),(0,n.jsx)("input",{className:"pre-cut__input js-pre-cut-checkbox scope-52b1b65c",type:"checkbox",checked:preCut(),disabled:!enablePreCut(),onChange:togglePreCut,"data-testid":"pre-cut-input"}),(0,n.jsx)("span",{className:"pre-cut__icon-wrapper scope-52b1b65c"}),preCut()?(0,n.jsx)(i.A,{className:"pre-cut__icon pre-cut__icon--full scope-52b1b65c",icon:"check","data-testid":"pre-cut-icon"}):null]}),(0,n.jsxs)("div",{className:(0,o.cn)("scope-52b1b65c",{"pre-cut__text":!0,"pre-cut__text--bold":preCut()}),children:[" ","Pre-cut transfers (",g(preCutPrice(),"currency")," each)"," "]}),(0,n.jsx)(l.A,{className:"pre-cut__info scope-52b1b65c","data-testid":"pre-cut-info"})]}),(0,n.jsxs)("div",{className:"pre-cut__upsell-note scope-52b1b65c",children:[" ","This applies to all ",dtfCategory()," orders"," "]})]}))}},238675(e,t,r){"use strict";r.d(t,{de:()=>c,fR:()=>u,ne:()=>PrintPerfectChecklist});var n=r(483134),o=r(293534),i=r(208374),l=r(433769);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var c=300,u=2,buildItems=function(e){var t,r=null!=(t=e.appliedTransformations)?t:[],n=e.enhancedDpi;if(n&&n>=c){var o=Math.round(n);return _to_consumable_array(r).concat([{key:"print_ready",label:"".concat(o," DPI print-ready"),detail:null,meta:{dpi:o}}])}return r};function PrintPerfectChecklist(e){var t=e.artwork,r=e.businessLine,c=void 0===r?"dtf":r,d=e.className,p=(0,o.useMemo)(function(){return buildItems(t)},[t]),f=(0,o.useRef)(new Set);return((0,o.useEffect)(function(){p.length<u||f.current.has(t.id)||(f.current.add(t.id),(0,l.track)("printperfect_result_viewed",{artwork_id:t.id,catalog_number:t.catalogNumber,business_line:c,item_count:p.length,items:p.map(function(e){return{key:e.key,meta:e.meta}})}))},[t.id,t.catalogNumber,c,p]),p.length<u)?null:(0,n.jsx)("ul",{className:"printperfect-checklist flex flex-col gap-1 text-xs leading-snug ".concat(null!=d?d:""),"data-testid":"printperfect-checklist","aria-label":"What PrintPerfect did to your artwork","aria-live":"polite",children:p.map(function(e,t){return(0,n.jsxs)("li",{className:"printperfect-checklist__item flex items-start gap-1.5",style:{"--pp-stagger-delay":"".concat(80*t,"ms")},"data-testid":"printperfect-checklist-item-".concat(e.key),children:[(0,n.jsx)(i.A,{className:"mt-0.5 shrink-0 stroke-green-600",size:14,"aria-hidden":"true"}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:"font-medium",children:e.label}),e.detail?(0,n.jsxs)("span",{className:"ml-1 text-gray-300",children:["(",e.detail,")"]}):null]})]},e.key)})})}},894732(e,t,r){"use strict";r.d(t,{A:()=>ProColorUpsell});var n=r(483134),o=r(293534),i=r(492624),l=r(997252),c=r(433769),u=r(723433),d=r(741235),p=r(130457),f=r(538896),_=r(886408);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ProColorUpsell(e){var t=e.artwork,r=void 0===t?null:t,h=_object_without_properties(e,["artwork"]),m=(0,f.useDtfStore)(),g=(0,i.md)(_.aW,{store:_.Zs});function isStandardArtwork(){return m.isStandardArtwork}function artworkId(){return Number(r.id)||void 0}function eventPayload(){return JSON.stringify({artwork_id:artworkId()})}function linkUrl(){var e=new URL("/jiffytransfers-DTFPC1.html?ac=Transfer",window.location.origin);if(artworkId()){var t={};t[r.id]=r.url,e.searchParams.append("artwork_urls",JSON.stringify(t)),e.searchParams.append("pre_cut",r.data.pre_cut),r.metadata&&(e.searchParams.append("artwork_height",r.height),e.searchParams.append("artwork_width",r.width),e.searchParams.append("process_artwork",!1))}return e.pathname+e.search}function updateUploadedArtworkIds(){artworkId()&&(0,d.o)("uploaded_artwork_ids",JSON.stringify([artworkId()]))}var b="show_upsell"===g&&isStandardArtwork();return((0,o.useEffect)(function(){b&&(0,p.u)(".js-pro-color-upsell","[data-mixpanel-event][data-mixpanel-listen]")},[b]),(0,o.useEffect)(function(){b&&(0,c.track)("procolor_upsell_shown",{dtf_artwork_id:artworkId(),verdict:g})},[b,artworkId()]),b)?(0,n.jsxs)("div",_object_spread_props(_object_spread({},h),{"data-testid":"pro-color-upsell-prominent",className:(0,l.cn)("js-pro-color-upsell my-3 flex items-center gap-4 roun
1ded-lg border-2 border-[#6b3aa0] bg-[#f6f0fb] p-4 text-black",h.className),children:[(0,n.jsx)(u.A,{className:"shrink-0",icon:"pro-color-wheel",width:"64",height:"64"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"m-0 mb-1 text-base font-semibold",children:"This looks like a photo. Get richer color with ProColor."}),(0,n.jsx)("p",{className:"m-0 mb-3 text-sm leading-[1.4]",children:"ProColor prints over 16 million colors — better skin tones, smoother gradients, and richer photo reproduction. Standard DTF prints up to ~8 inks."}),(0,n.jsx)("a",{className:"inline-block rounded bg-[#6b3aa0] px-4 py-2 font-semibold text-white no-underline hover:bg-[#06065a] hover:text-white hover:no-underline",href:linkUrl(),"data-mixpanel-listen":"click","data-mixpanel-event":"pro_color_upsell_cta_click","data-mixpanel-data":eventPayload(),onClick:updateUploadedArtworkIds,"data-testid":"pro-color-upsell-prominent-action",children:"Preview on ProColor"})]})]})):null}},227013(e,t,r){"use strict";r.d(t,{A:()=>ProcessingProgress});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ProcessingProgress(e){var t=e.message,r=_object_without_properties(e,["message"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("processing-progress scope-d7e87e75",r.className),children:void 0===t?"Uploading file":t}))}},643444(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(605656),l=r(997252),c=r(189155),u=r(586519),d=r(741235),p=r(75798),f=r(86087),_=r(650574),h=r(217262),m=r(948631),g=r(86560),b=r(945808),y=r(894732),v=r(8676),w=r(709509),j=r(973042),k=r(444636),x=r(277889),S=r(864188),O=r(723433),P=r(851e3),A=r(690690),C=r(474266),I=r(153035),E=r(178998),N=r(52554),D=r(970021),T=r(750570),M=r(817200),R=r(138024),F=r(913261),L=r(683164),B=r(956288),z=r(819170),U=r(298210),H=r(474276),q=r(7756),V=r(739161),G=r(890579),K=r(209132),W=r(127038),Q=r(229574),J=r(921828),Z=r(372725),Y=r(957656),X=r(854440),ee=r(932131),et=r(27037),er=r(279317),en=r(925122),eo=r(781758),ea=r(444599),ei=r(746592),es=r(627194),el=r(303988),ec=r(782457),eu=r(923726),ed=r(575554),ep=r(859913),ef=r(788088),e_=r(996821),eh=r(127391),em=r(688264),eg=r(368126),eb=r(538896),ey=r(2605),ev=r(834497),ew=r(580099);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var ej=(0,o.lazy)(function(){return r.e("6151").then(r.bind(r,931034))}),hasArtworksWithPinningSession=function(e){return e.length>0&&e.some(function(e){return!!(null==e?void 0:e.pinningSessionId)})};let __rspack_default_export=function(e){var t=e.locale,r=void 0===t?"en-US":t,ek=e.currentStore,ex=void 0===ek?null:ek,eS=e.imagingPromise,eO=void 0===eS?null:eS,eP=(e.ref,e.children,e.slots),eA=void 0===eP?{}:eP,eC=e.dtfPdpRedesign,eI=void 0!==eC&&eC,eE=e.dtfPdpRedesignCatalogNumbers,eN=void 0===eE?[]:eE,eD=e.className,eT=_object_without_properties(e,["locale","currentStore","imagingPromise","ref","children","slots","dtfPdpRedesign","dtfPdpRedesignCatalogNumbers","className"]);(0,i.A)().formatMessage;var eM=(0,eb.useDtfStore)(),eR=(0,eh.o3)(),eF=(0,V.L)(),eL=!showRedesign()&&!neckLabel()&&!isGangSheetBuilder()&&!outOfStock()&&!showModal();(0,K.E)(eL);var eB=eL&&catalogNumber()===U.aS&&!!eM.sameDayBlanksGate,ez=(0,W._)("bogo"===promotionWinner()),eU=eL&&catalogNumber()===U.aS&&!!showMultiSize()&&"function"==typeof eA["free-shipping"],eH=(0,J.d)({surface:e
1U,gated:eB,active:!!showShippingProgress(),readWorkspace:function(){var e,t,r;return{workspaceCount:null!=(e=null==(t=eM.artworksState)?void 0:t.length)?e:0,orderSubtotal:null==(r=eM.summary)?void 0:r.orderSubtotal}}}),eV="local"===eH.status&&null!==eH.offer&&Number.isFinite(eH.offer.cartTotal)&&eH.offer.cartTotal>0&&eH.pageSubtotal>0?{cartTotal:eH.offer.cartTotal}:null,eG=_sliced_to_array((0,o.useState)(U.P$.NONE),2),eK=eG[0],eW=eG[1],eQ=_sliced_to_array((0,o.useState)(!1),2),e$=eQ[0],eJ=eQ[1];_sliced_to_array((0,o.useState)(10),1)[0];var eZ=_sliced_to_array((0,o.useState)(!1),2);eZ[0],eZ[1];var eY=_sliced_to_array((0,o.useState)("jiffy-print-perfect"),2),eX=eY[0],e0=eY[1],e1=_sliced_to_array((0,o.useState)(null),2),e2=(e1[0],e1[1]),e3=_sliced_to_array((0,o.useState)(!1),2),e4=e3[0],e5=e3[1],e9=_sliced_to_array((0,o.useState)(0),2),e8=e9[0],e6=e9[1],e7=(0,o.useRef)(null),te=(0,o.useRef)(null),tt=(0,o.useRef)(null),tr=(0,o.useRef)(null),tn=(0,o.useRef)(!1),to=(0,o.useRef)(!1);function artworks(){return eM.artworks}function files(){return eM.files}function fileToRemove(){return eM.fileToRemove}function showDiscardModal(){return eM.showDiscardModal}function showFilesError(){return eM.showFilesError}function discardScope(){return eM.discardScope}function showNetworkError(){return eM.showNetworkError}function modalArtworks(){return eM.modalArtworks}function outOfStock(){return eM.outOfStock}function hidePdpRestockNotify(){return eM.hidePdpRestockNotify}function printAsIs(){return eM.printAsIs}function showModal(){return eM.showModal}function showMatchingShirtModal(){return eM.showMatchingShirtModal}function withPreCut(){return eM.withPreCut}function showArtworkHistoryModal(){return eM.showArtworkHistoryModal}function isMobile(){return eM.isMobile}function showGangSheetFreeShipping(){return!!(gangSheetPdp()&&eA["free-shipping"])}function catalogNumber(){return eM.catalogNumber}function showRedesign(){return!!eI&&eN.includes(catalogNumber())&&"usa"===ex}function isSticker(){return eM.isSticker}function isDieCutSticker(){return eM.isDieCutSticker}function hideSizeInputs(){return(0,ey.CI)(eM)&&!artworkUploaded()}function isStickerSample(){return eM.isStickerSample}function isSpangle(){return eM.isSpangle}function isPuff(){return eM.isPuff}function isLetters(){return eM.isLetters}function isFirstArtworkMinQuantityInvalid(){return eM.isFirstArtworkMinQuantityInvalid}function variantId(){return eM.variantId}function experiments(){return eM.experiments}function isJerseyNumbers(){return eM.isJerseyNumbers}function isGuest(){return eM.isGuest}function showStepsUI(){return eM.showStepsUI}function showRedrawUI(){return eM.showRedrawUI}function showMultiSize(){return eM.showMultiSize}function isStandardArtwork(){return eM.isStandardArtwork}function enableAbAiMonetization(){return eM.enableAbAiMonetization}function storeCreditInfo(){return eM.storeCreditInfo}function isGangSheetBuilder(){return eM.isGangSheetBuilder}function reorderEnabled(){return eM.reorderEnabled}function paidExpertEditAddonEnabled(){return eM.paidExpertEditAddonEnabled}function neckLabel(){return eM.neckLabel}function blankItemsCount(){return eM.blankItemsCount}function isBogoApplicable(){return eM.isBogoApplicable}function isNewToTransfers(){return eM.isNewToTransfers}function transferPdpBackButtonDetection(){return eM.transferPdpBackButtonDetection}function isPinBasedRedrawEnabled(){return eM.isPinBasedRedrawEnabled}function bogoEligibility(){return eM.bogoEligibility}function bogoMaxDimensionLabel(){return eM.bogoMaxDimensionLabel}function promotionResolution(){return eM.promotionResolution}function showPinningModal(){return eM.showPinningModal}function pinningArtworkIndex(){return eM.pinningArtworkIndex}function pinningModalSessionId(){return eM.pinningModalSessionId}function pendingPinningInvalidation(){return eM.pendingPinningInvalidation}function lastConfirmedConfigSection(){return eM.lastConfirmedConfigSection}function selectedAlgorithm(){return eR.selectedAlgorithm}function spangleVariations(){return eR.spangleVariations}function spangleMode(){return eR.spangleMode}function lastSpangledDimensions(){return eR.lastSpangledDimensions}function spangleSizeEdited(){return eR.spangleSizeEdited}function spanglesLoading(){return eR.spanglesLoading}function spanglesMaxImageCount(){return eR.spanglesMaxImageCount}
1function invalidSpangleSelected(){return eR.invalidSpangleSelected}function allAPIsCompleted(){return eR.allAPIsCompleted}function allAPIsFailed(){return eR.allAPIsFailed}function isSpangleReordering(){return eR.isSpangleReordering}function originalArtworkUrl(){return eR.originalArtworkUrl}function pinningArtwork(){var e;return null===pinningArtworkIndex()?null:null!=(e=artworks()[pinningArtworkIndex()])?e:null}function pinningArtworkImageUrl(){if(!pinningArtwork())return"";var e=pinningArtwork();return e.manualEditUrl?e.manualEditUrl:"print_original"===e.enhancementTier?e.originalImageUrl||e.url||"":isStandardArtwork()?e.removeBackground&&e.canRemoveBg?e.enhancedNoBgUrl||e.sliderPreviewUrl||e.enhancedWithBgUrl||e.originalImageUrl||e.url||"":e.enhancedWithBgUrl||e.originalImageUrl||e.url||"":e.url||e.originalImageUrl||""}function pinningArtworkId(){return pinningArtwork()?String(pinningArtwork().id||""):""}function isExternalUploadInProgress(){var e=firstArtwork();return e.id&&e.isFile&&!e.enhancementCompleted}function shouldShowArtworkQualityConfigPanel(){return!!hasArtwork()&&isStandardArtwork()&&!printAsIs()&&(!firstArtwork().isFile||isExternalUploadInProgress())&&!firstArtwork().isSimulated&&!enableAbAiMonetization()}function shouldShowArtworkQualityConfigPanelAbAiMonetization(){return(!withError()||!!isMultiSizeError())&&!!hasArtwork()&&isStandardArtwork()&&!printAsIs()&&(!firstArtwork().isFile||isExternalUploadInProgress())&&!firstArtwork().isSimulated&&enableAbAiMonetization()}function firstArtwork(){return artworks()[0]}function isArtworkLoading(){var e;return null==(e=firstArtwork())?void 0:e.isLoading}function artworkUploaded(){var e,t=parseInt(null==(e=firstArtwork())?void 0:e.id,10);return!Number.isNaN(t)&&"number"==typeof t&&!isArtworkLoading()}function warningMessage(){var e,t,r;return null==(r=firstArtwork())||null==(t=r.metadata)||null==(e=t.warnings)?void 0:e.human}function stuckArtworks(){var e,t,r=null!=(e=eM.enhancementStuckAt60s)?e:{};return(null!=(t=eM.artworks)?t:[]).filter(function(e){return(null==e?void 0:e.id)&&r[String(e.id)]})}function firstTimedOutArtwork(){var e,t,r,n=null!=(e=eM.enhancementTimedOut)?e:{};return null!=(r=(null!=(t=eM.artworks)?t:[]).find(function(e){return(null==e?void 0:e.id)&&n[String(e.id)]}))?r:null}function retryStuckEnhancement(e){var t=null==e?void 0:e.id;if(t){eM.clearEnhancementStuck(t),eM.clearEnhancementTimedOut(t);try{eM.schedulePollingFallback(t,{initialDelay:0})}catch(e){eM.setEnhancementStuck(t),(0,u.notifyError)(_instanceof(e,Error)?e:Error(String(e)),{params:{artwork_id:t,source:"product_details_dtf.retry_stuck_enhancement"}})}}}function uploadDifferentArtwork(e){var t=null==e?void 0:e.originalIndex;null!=t&&eM.removeArtworkByIndex(t)}function onCloseTimeoutModal(e){var t=null==e?void 0:e.id;t&&eM.clearEnhancementTimedOut(t)}function defaultWidthValue(){return printAsIs()?"22":""}function printAsIsReadOnly(){var e,t;return printAsIs()&&!!(null==(e=firstArtwork())?void 0:e.width)&&!!(null==(t=firstArtwork())?void 0:t.height)}function showSpanglesActions(){return isSpangle()&&artworkUploaded()&&!isArtworkLoading()}function showMultiUploadBox(){return!files().length&&!firstArtwork().isSimulated&&!isSpangle()&&!isPuff()&&!isStickerSample()}function showGangSheetInfoModal(){return!isGuest()&&gangSheetPdp()&&"true"!==(0,d.v8)("gang-sheet-info-modal-shown")}function gangSheetPdp(){return eM.pdpType===U.bk}function supportedFileTypes(){return(0,c.jw)(printAsIs())}function isMultiSizeError(){var e;return null==(e=firstArtwork())?void 0:e.isMultiSizeError}function hasArtwork(){return firstArtwork()&&!firstArtwork().isSimulated&&!firstArtwork().uploadError}function withError(){return(0,k.lx)(firstArtwork())}function isGenericErrorVisible(){return!!firstArtwork()&&!firstArtwork().isSimulated&&(withError()||isFirstArtworkMinQuantityInvalid())}function headerIcon(){return isGenericErrorVisible()?"strong-info":"check-circle-bold"}function disableSizeChange(){return isStandardArtwork()?outOfStock()||isArtworkLoading()||!firstArtwork().enhancementCompleted:isSpangle()?allAPIsFailed()?isArtworkLoading():outOfStock()||spangleSizeEdited()||spanglesLoading()||isArtworkLoading()||invalidSpangleSelected()||!allAPIsCompleted():outOfStock()||isArtworkLoading()}function showArtworkFileInfo(){return!isSpangle()}function isDtfUsaStore(){return catalogNumber()===U.aS&&"usa"===ex}function promotionWinner(){var e,t;return null!=(e=null==(t=promotionResolution())?void 0:t.winner)?e:"none"}function showPromotionBanner(){return"none"!==promotionWinner()&&(isStandardArtwork()||isDieCutSticker())}function showProColorUpsell(){var e,t=(null!=(e=experiments().ab_procolor_free_upgrade)?e:0)===1;return isDtfUsaStore()&&!t}function rootStyles(){return(0,l.cn)("product-details-dtf",isJerseyNumbers()&&"product-details-dtf--jersey-numbers")}function showFullWidthArtwork(){return!eM.sticker}function showRedrawNote(){return eM.pdpType!==U.bk&&showRedrawUI()}function showShippingProgress(){return firstArtwork()&&!firstArtwork().isSimulated&&!isArtworkLoading()}function showStoreCredit(){return!isGuest()&&artworkUploaded()&&!isSticker()&&!isSpangle()&&Number(store
1CreditInfo().orderSubtotal)>0}function artworkEnhancementProcessing(){return isStandardArtwork()&&!isArtworkLoading()&&!firstArtwork().enhancementCompleted}function showCancelButton(){var e=artworkUploaded()&&artworkEnhancementProcessing();return!withError()&&!isSpangle()&&(isArtworkLoading()||e)}function showFreeTransfersBadge(){if(!isBogoApplicable())return!1;var e=artworkUploaded()&&artworkEnhancementProcessing();return!!(!isArtworkLoading()&&!e)&&!!artworkUploaded()&&(!0===e4||"true"===e4)&&(!!isGuest()||null!==isNewToTransfers()&&void 0!==isNewToTransfers()&&!0===isNewToTransfers())}function freeTransfersBadgeMessage(){return"You have ".concat(blankItemsCount()," Transfers at 50% OFF!")}function hasPinningSessionArtworks(){return hasArtworksWithPinningSession(artworks())}function shouldStartBackButtonDetection(){return"DTF001"===catalogNumber()&&!((0,A.CL)()||isPinBasedRedrawEnabled()&&(showPinningModal()||hasPinningSessionArtworks()))&&hasUploadedAndEnhancedArtworks()}function hasUploadedAndEnhancedArtworks(){return artworks().some(function(e){return isUploadedAndEnhanced(e)})}function handleOpenRetentionModal(e){var t;!(0,A.CL)()&&(!isPinBasedRedrawEnabled()||!showPinningModal()&&!hasArtworksWithPinningSession(artworks()))&&(t=artworks()).length>0&&t.some(function(e){return e&&!e.isSimulated&&!e.isFile&&!e.uploadError&&!e.isLoading&&e.id&&"number"==typeof parseInt(e.id,10)&&!Number.isNaN(parseInt(e.id,10))&&!0===e.enhancementCompleted})&&(eJ(!0),eW(e),(0,A.wz)())}(0,o.useEffect)(function(){eM.setLocale(r)},[r,eM]);var ta=(0,m.c)({onBackButtonClick:function(){return handleOpenRetentionModal(U.P$.BACK_BUTTON)}}).triggerUserBackButtonClickMonitoring;function showFileDialog(e){var t;null==(t=e7.current)||t.open(e)}function onRemoveArtwork(){eM.removeArtworkWithActivity(fileToRemove()),eM.getArtworksPricing(),eM.updatePdpDates(),eR.resetSpangles(),eM.resetPuff()}function onDiscard(){var e=discardScope().preservesPreModalArtwork;eM.hideDiscardModal(),eM.dropMultiArtwork(),eM.updatePdpDates(),e||(eR.resetSpangles(),eM.resetPuff())}function resetFileErrors(){eM.resetFilesError()}function checkFreeTransfersBadgeConditions(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:if(r.trys.push([0,6,,7]),!isGuest())return[3,1];return eM.setIsNewToTransfers(!0),[3,4];case 1:return r.trys.push([1,3,,4]),[4,x.api.dtf.isNewToDtfForBogo()];case 2:return t="string"==typeof(e=r.sent())?"true"===e.trim().toLowerCase():!!e,eM.setIsNewToTransfers(t),[3,4];case 3:return console.warn("Failed to check if user is new to transfers:",r.sent()),eM.setIsNewToTransfers(!1),[3,4];case 4:return e2(isNewToTransfers()),[4,checkCartForBlanks()];case 5:return r.sent(),[3,7];case 6:return console.warn("Failed to check free transfers badge conditions:",r.sent()),[3,7];case 7:return[2]}})})()}function checkCartForBlanks(){return _async_to_generator(function(){var e,t,r,n;return _ts_generator(this,function(o){switch(o.label){case 0:e=eM.sameDayBlanksAddedLines,o.label=1;case 1:return o.trys.push([1,4,,5]),[4,x.api.vueCart.currentItems()];case 2:if(0===Object.keys(o.sent().items||{}).length)return updateCartCounts(0,0,0),dropStaleSameDayBlanksAdded(0,e),[2];return[4,x.api.vueCart.getCartState({cb:Date.now()})];case 3:if(!(null==(t=o.sent())?void 0:t.order_groups))return updateCartCounts(0,0,0),[2];return n=(r=countItemsInGroups(t.order_groups.groups||{})).blanks,updateCartCounts(n,r.transfers,r.blanksOutsideLocal),dropStaleSameDayBlanksAdded(n,e),[3,5];case 4:return console.warn("Failed to check cart for blanks:",o.sent()),updateCartCounts(0,0,0),[3,5];case 5:return[2]}})})()}function dropStaleSameDayBlanksAdded(e,t){var r=eM.sameDayBlanksAddedLines;(null==r?void 0:r.length)&&r===t&&r.reduce(function(e,t){return e+t.sizes.reduce(function(e,t){return e+t.quantity},0)},0)>e&&(eM.sameDayBlanksAddedLines=[])}function updateCartCounts(e,t,r){eM.setBlankItemsCount(e),eM.setTransfersInCartCount(t),e5(e>0),e6(r)}function countItemsInGroups(e){var t=new Set;return Object.values(e).reduce(function(e,r){var n=Object.values((null==r?void 0:r.line_items)||(null==r?void 0:r.lineItems)||{}),o=(null==r?void 0:r.jiffy_local)===!0||(null==r?void 0:r.jiffyLocal)===!0?0:n.reduce(function(e,t){var r,n,o,i;return"blanks"!==getLineItemType(t)?e:e+(parseInt(null!=(r=null!=(n=null==t||null==(o=t.jiffy_local_split)?void 0:o.units_in_group)?n:null==t||null==(i=t.jiffyLocal
1Split)?void 0:i.unitsInGroup)?r:null==t?void 0:t.quantity,10)||0)},0),i=countItemsInLineItems(n.filter(function(e){return(null==e?void 0:e.id)==null||!t.has(e.id)&&(t.add(e.id),!0)}));return{blanks:e.blanks+i.blanks,transfers:e.transfers+i.transfers,blanksOutsideLocal:e.blanksOutsideLocal+o}},{blanks:0,transfers:0,blanksOutsideLocal:0})}function countItemsInLineItems(e){return Object.values(e).reduce(function(e,t){if(!t)return e;var r=parseInt(t.quantity,10)||0,n=getLineItemType(t);if("blanks"===n)return _object_spread_props(_object_spread({},e),{blanks:e.blanks+r});if("transfers"===n){var o,i,l=t.productStyle||t.product_style;if(((null==(o=t.product)?void 0:o.catalog_number)||t.catalog_number||(null==(i=t.product)?void 0:i.product_style)||l)===U.aS||l===U.aS)return _object_spread_props(_object_spread({},e),{transfers:e.transfers+r})}return e},{blanks:0,transfers:0})}function getLineItemType(e){var t,r=String(e.business_line||"").toLowerCase(),n=String((null==(t=e.product)?void 0:t.business_line)||"").toLowerCase();return"blanks"===r||"blanks"===n?"blanks":"transfers"===r||"transfers"===n?"transfers":null}function setupCartListeners(){te.current=function(){checkCartForBlanks()},tt.current=function(){checkCartForBlanks()},S.EventBus.on(S.Events.ITEMS_ADDED_TO_CART,te.current),S.EventBus.on(S.Events.CART_QUANTITY_UPDATED,tt.current)}function setupInventoryListener(){eM.syncInventoryFromWindow(),tr.current=function(){eM.syncInventoryFromWindow()},S.EventBus.on(S.Events.PRODUCT_INVENTORY_LOADED,tr.current)}function cleanupInventoryListener(){tr.current&&S.EventBus.removeEventListener(S.Events.PRODUCT_INVENTORY_LOADED,tr.current)}function cleanupCartListeners(){te.current&&S.EventBus.removeEventListener(S.Events.ITEMS_ADDED_TO_CART,te.current),tt.current&&S.EventBus.removeEventListener(S.Events.CART_QUANTITY_UPDATED,tt.current)}function isUploadedAndEnhanced(e){return e&&!e.isSimulated&&!e.isFile&&!e.uploadError&&!e.isLoading&&e.id&&"number"==typeof parseInt(e.id,10)&&!Number.isNaN(parseInt(e.id,10))&&!0===e.enhancementCompleted}if((0,o.useEffect)(function(){var e=lastConfirmedConfigSection();(null==e?void 0:e.section)&&e0(e.section)},[JSON.stringify(lastConfirmedConfigSection())]),(0,o.useEffect)(function(){!tn.current||showStepsUI()||(0,k._z)(isGenericErrorVisible())},[isGenericErrorVisible(),showStepsUI()]),(0,o.useEffect)(function(){if(tn.current){if(isStandardArtwork()){var e;if(e0((null==(e=firstArtwork())?void 0:e.enhanceImage)?"jiffy-print-perfect":"print-as-uploaded"),artworkUploaded()){var t=new URL(window.location);t.searchParams.delete("artwork_urls"),t.searchParams.delete("file_content_type"),window.history.replaceState({},"",t.toString())}}if(isSpangle()&&artworkUploaded()){var r,n=isSpangleReordering()?originalArtworkUrl():null==(r=firstArtwork())?void 0:r.url;eR.setOriginalArtworkUrl(n)}artworkUploaded()&&checkCartForBlanks()}},[artworkUploaded()]),(0,o.useEffect)(function(){eH.offer&&checkCartForBlanks()},[eH.offer]),(0,o.useEffect)(function(){!tn.current||!showRedesign()&&shouldStartBackButtonDetection()&&transferPdpBackButtonDetection()&&ta()},[shouldStartBackButtonDetection(),transferPdpBackButtonDetection()]),(0,o.useEffect)(function(){spangleMode()===eh.EO.sizeEdited&&eM.updateArtworkValues(_object_spread({index:0},lastSpangledDimensions()))},[spangleMode()]),(0,o.useEffect)(function(){var e=spangleVariations().find(function(e){return e.algorithm===selectedAlgorithm()});eR.selectVersion({version:e})},[JSON.stringify(spangleVariations())]),(0,o.useEffect)(function(){var e=eI?document.querySelector(f.A.local.DTF_REDESIGN_CONTAINER):null;if(eI){if(outOfStock()){e&&(e.style.display="none");return}e&&e.style.removeProperty("display")}if(!to.current&&(document.getElementById(f.A.local.CONTAINER)||document.getElementById(f.A.made.CONTAINER))){to.current=!0;var t=(0,p.A)();isGangSheetBuilder()&&Promise.resolve(t).then(function(){return eM.updatePdpDates()})}},[outOfStock()]),(0,o.useEffect)(function(){var e;return setupInventoryListener(),(0,_.Ay)(!0),eM.initDefaultValues(),queueMicrotask(function(){window.JiffyDeliverTo.reloadToggle()}
1),null==(e=document.querySelector(".js-dtf-product"))||e.classList.remove("vue-product-details-dtf--mounting"),checkFreeTransfersBadgeConditions(),setupCartListeners(),tn.current=!0,function(){cleanupCartListeners(),cleanupInventoryListener()}},[]),(0,o.useEffect)(function(){return function(){eM.cleanupPolling()}},[]),showRedesign()){var ti,ts,tl,tc,tu,td,tp,tf,t_,th,tm=firstTimedOutArtwork();eA["saved-carts"];var tg=_object_without_properties(eA,["saved-carts"]),tb=showModal()?tg:eA;return(0,n.jsx)(eg.k,{slots:tb,imagingPromise:eO,overlays:(0,n.jsxs)(n.Fragment,{children:[showModal()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.A,{ref:e7,accept:supportedFileTypes(),multiple:(!isSpangle()||spanglesMaxImageCount()>1)&&!isPuff()&&!isStickerSample()}),(0,n.jsx)(eu.U,{moveBellow:!!fileToRemove()||showDiscardModal()||showFilesError()||showNetworkError()||showPinningModal()||!!pendingPinningInvalidation()||!!tm},null==(th=firstArtwork())?void 0:th.id)]}):null,showArtworkHistoryModal()?(0,n.jsx)(E.A,{className:"scope-d0072188",reorderEnabled:reorderEnabled(),"data-testid":"artwork-history-modal"}):null,fileToRemove()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.resetRemovalFile,onSubmit:onRemoveArtwork,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Remove File"})},text:function(){return(0,n.jsx)(n.Fragment,{children:"This file will be removed. Do you confirm?"})},button:function(){return(0,n.jsx)(n.Fragment,{children:"Remove File"})}},"data-testid":"dtf-confirmation-modal-remove-file"}):null,showDiscardModal()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.hideDiscardModal,onSubmit:onDiscard,slots:{header:function(){return discardScope().preservesPreModalArtwork?(0,n.jsx)(n.Fragment,{children:"Discard added artwork"}):(0,n.jsx)(n.Fragment,{children:"Discard Changes"})},text:function(){var e=discardScope(),t=e.discardCount;return e.preservesPreModalArtwork?(0,n.jsxs)(n.Fragment,{children:[" ",1===t?"The 1 artwork you added here will be discarded.":"The ".concat(t," artworks you added here will be discarded."),(0,n.jsx)("br",{className:"scope-d0072188"}),"Your original design and its settings will be kept."," "]}):(0,n.jsxs)(n.Fragment,{children:[" ","All the changes and artworks will be discarded.",(0,n.jsx)("br",{className:"scope-d0072188"}),"Are you sure you want to proceed?"," "]})},button:function(){return discardScope().preservesPreModalArtwork?(0,n.jsx)(n.Fragment,{children:"Discard added artwork"}):(0,n.jsx)(n.Fragment,{children:"Discard Changes"})}},"data-testid":"dtf-confirmation-modal-discard"}):null,showFilesError()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:resetFileErrors,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Warning"})},text:function(){return(0,n.jsx)(n.Fragment,{children:" You can only upload up to 10 files simultaneously. "})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"OK"})}},"data-testid":"dtf-confirmation-modal-files-error"}):null,tm?(0,n.jsx)(F.A,{onClose:function(){return onCloseTimeoutModal(tm)}},"timeout-".concat(tm.id)):null,showNetworkError()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.hideNetworkError,slots:{header:function(){return(0,n.jsx)("span",{"data-testid":"dtf-network-error-modal",children:"Unable to connect to server"})},text:function(){return(0,n.jsx)(n.Fragment,{children:"Please check your internet connection and try again."})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"OK"})}},"data-testid":"dtf-confirmation-modal-network-error"}):null,showPinningModal()&&pinningArtwork()&&pinningModalSessionId()?(0,n.jsx)(ep.A,{className:"scope-d0072188",artworkIndex:pinningArtworkIndex(),artworkImageUrl:pinningArtworkImageUrl(),artworkId:pinningArtworkId(),sessionId:pinningModalSessionId(),"data-testid":"pinning-session-modal"}):null,pendingPinningInvalidation()?(0,n.jsx)(et.A,{className:"scope-d0072188",onSubmit:eM.confirmPinningInvalidation,onClose:eM.cancelPinningInvalidation,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Remove Design Request?"})},text:function(){return(0,n.jsxs)(n.Fragment,{children:[" ","This change will remove your design request, are you sure you want to proceed?"," "]})},button:function(){return(0,n.jsx)(n.Fragment,{children:"Yes, Remove"})}
1,cancel:function(){return(0,n.jsx)(n.Fragment,{children:"Keep Request"})}},"data-testid":"dtf-confirmation-modal-pinning-invalidation"}):null]})})}var ty=firstTimedOutArtwork();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,l.cn)("scope-d0072188",rootStyles(),eD)},eT),{"data-dtf-stock-state":outOfStock()?"out-of-stock":"in-stock",children:[isJerseyNumbers()?(0,n.jsx)(g.A,{className:"product-details-dtf__jersey-numbers scope-d0072188","data-testid":"product-details-dtf-jersey-numbers"}):null,isLetters()?(0,n.jsx)(b.A,{className:"product-details-dtf__letters scope-d0072188","data-testid":"product-details-dtf-letters"}):null,stuckArtworks().map(function(e){return(0,n.jsx)(R.A,{className:"scope-d0072188",type:"warning","data-testid":"dtf-enhancement-stuck-toast",children:(0,n.jsxs)("div",{className:"scope-d0072188",children:[(0,n.jsx)("div",{style:{marginBottom:"8px"},children:(0,n.jsx)("b",{children:"Your enhancement is taking longer than usual."})}),(0,n.jsxs)("div",{style:{display:"flex",gap:"8px",flexWrap:"wrap"},children:[(0,n.jsx)("button",{type:"button",className:"product-details-dtf__stuck-action product-details-dtf__stuck-action--primary","data-testid":"dtf-enhancement-stuck-retry",onClick:function(){return retryStuckEnhancement(e)},children:"Retry"}),(0,n.jsx)("button",{type:"button",className:"product-details-dtf__stuck-action product-details-dtf__stuck-action--secondary","data-testid":"dtf-enhancement-stuck-upload-different",onClick:function(){return uploadDifferentArtwork(e)},children:"Upload a different file"})]})]})},"stuck-".concat(e.id))}),ty?(0,n.jsx)(F.A,{onClose:function(){return onCloseTimeoutModal(ty)}},"timeout-".concat(ty.id)):null,!firstArtwork()||firstArtwork().isSimulated||showStepsUI()?null:(0,n.jsxs)("div",{className:(0,l.cn)("product-details-dtf__file-name scope-d0072188",{"product-details-dtf__file-name--with-error":isGenericErrorVisible(),"product-details-dtf__file-name--full-width":showFullWidthArtwork()}),children:[firstArtwork().metadata||isGenericErrorVisible()?(0,n.jsx)(O.A,{className:(0,l.cn)("product-details-dtf__header-icon scope-d0072188",{"product-details-dtf__header-icon--with-error":isGenericErrorVisible()}),icon:headerIcon(),"data-testid":"product-details-dtf-header-icon"}):null,(0,n.jsx)("span",{className:"product-details-dtf__header-text scope-d0072188",children:(0,ey.PB)(firstArtwork(),isDieCutSticker())})]}),!outOfStock()&&!isMobile()&&(!eI&&eA.dates||showGangSheetFreeShipping())?(0,n.jsxs)("div",{className:"product-details-dtf__dates-container hidden-xs scope-d0072188",children:[gangSheetPdp()?null==(ti=eA["free-shipping"])?void 0:ti.call(eA):null,eI?null:(0,n.jsx)(Z.A,{className:"scope-d0072188","data-testid":"delivery-date",jiffyFirstSlot:eA["transfers-j1"]})]}):null,isGangSheetBuilder()?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ea.A,{className:"scope-d0072188",currentStore:ex,"data-testid":"gang-sheet-builder-pdp-container"}),null==(ts=eA["saved-carts"])?void 0:ts.call(eA)]}):null,isJerseyNumbers()||isLetters()||isGangSheetBuilder()?null:(0,n.jsxs)(n.Fragment,{children:[showPromotionBanner()?(0,n.jsx)(n.Fragment,{children:"bogo"!==promotionWinner()?(0,n.jsx)("div",{className:(0,l.cn)("product-details-dtf__promotion-banner scope-d0072188","product-details-dtf__promotion-banner--winner-".concat(promotionWinner())),children:null==(tl=eA["promotion-banner"])?void 0:tl.call(eA)}):"bogo"!==promotionWinner()||ez?null:(0,n.jsx)(h.A,{className:"scope-d0072188",reason:null==(tc=bogoEligibility())?void 0:tc.reason,isGuest:isGuest(),maxFreeDimensionLabel:bogoMaxDimensionLabel(),"data-testid":"bogo-info"})}):null,!outOfStock()&&neckLabel()?(0,n.jsx)(Y.A,{className:"scope-d0072188","data-testid":"design-tag-creation-panel"}):null,outOfStock()||neckLabel()?null:(0,n.jsxs)(q.A,{className:"product-details-dtf__step-1 scope-d0072188",hasError:showStepsUI()&&isGenericErrorVisible(),borderless:!showStepsUI(),stepNumber:1,headerText:V.p.upload,completed:eF.completed.upload,total:eF.total||void 0,slots:{"header-badge":function(){return(0,n.jsx)(n.Fragment,{children:showFreeTransfersBadge()?(0,n.jsx)(H.A,{className:"product-details-dtf__free-transfers-badge scope-
1d0072188",message:freeTransfersBadgeMessage(),"data-testid":"product-details-dtf-free-transfers-badge"}):null})},"step-number-content":function(){return showCancelButton()?(0,n.jsxs)("button",{className:"product-details-dtf__cancel scope-d0072188",type:"button",onClick:function(){eM.handleCancelProcess(firstArtwork())},"data-testid":"product-details-dtf-cancel",children:[(0,n.jsx)(O.A,{className:"product-details-dtf__cancel-icon scope-d0072188",icon:"modal-close","data-testid":"product-details-dtf-cancel-icon"})," ","Cancel"," "]}):null}},"data-testid":"product-details-dtf-step-1",children:[(0,n.jsx)(D.A,{className:"scope-d0072188",artwork:firstArtwork(),showFileInfo:showArtworkFileInfo(),index:0,"data-testid":"artwork-info"}),(0,n.jsx)(N.A,{className:"scope-d0072188",artwork:firstArtwork(),activeConfigSection:eX,showFullScreenButton:!0,onClick:showFileDialog,"data-testid":"artwork-image"}),showProColorUpsell()?(0,n.jsx)(y.A,{className:"product-details-dtf__pro-color-upsell scope-d0072188",artwork:firstArtwork(),"data-testid":"product-details-dtf-pro-color-upsell"}):null,isStandardArtwork()||firstArtwork().isFile||firstArtwork().isSimulated?null:(0,n.jsx)(ev.A,{className:"scope-d0072188",id:firstArtwork().id,artwork:firstArtwork(),background:firstArtwork().background,canRemoveBg:firstArtwork().canRemoveBg,removeBackground:firstArtwork().removeBackground,toggleBackgroun
1dError:firstArtwork().toggleBackgroundError,"data-testid":"trim-info"}),shouldShowArtworkQualityConfigPanel()?(0,n.jsx)(L.A,{className:"scope-d0072188",artwork:firstArtwork(),activeConfigSection:eX,onSetActiveConfigSection:e0,"data-testid":"artwork-quality-config-panel"},firstArtwork().id):null,shouldShowArtworkQualityConfigPanelAbAiMonetization()?(0,n.jsx)(B.A,{className:"scope-d0072188",index:0,artwork:firstArtwork(),reorderEnabled:reorderEnabled(),activeConfigSection:eX,paidExpertEditAddonEnabled:paidExpertEditAddonEnabled(),onSetActiveConfigSection:e0,"data-testid":"artwork-quality-config-panel-ab-ai-monetization"}):null,isPuff()&&!showStepsUI()?(0,n.jsx)(v.A,{className:"scope-d0072188",label:V.p.puff,"data-testid":"puff-color-selector"}):null,eM.sticker&&artworkUploaded()&&experiments().stickers_style_options&&!(0,ey.yJ)(eM,firstArtwork())?(0,n.jsx)(w.A,{className:"product-details-dtf__section scope-d0072188",artwork:firstArtwork(),"data-testid":"product-details-dtf-section"}):null,isStandardArtwork()?null:(0,n.jsx)(n.Fragment,{children:showRedrawNote()?(0,n.jsx)(e_.A,{enhancementNote:firstArtwork().enhancementNote}):null}),withError()&&!isMultiSizeError()?(0,n.jsx)(I.A,{className:"scope-d0072188",artwork:firstArtwork(),currentStore:ex,index:0,"data-testid":"artwork-error"}):null,!withError()&&warningMessage()?(0,n.jsx)(R.A,{className:"scope-d0072188","data-testid":"artwork-notification",children:(0,n.jsx)("b",{className:"scope-d0072188",children:warningMessage()})}):null]}),isPuff()&&showStepsUI()?(0,n.jsx)(v.A,{className:"scope-d0072188",label:V.p.puff,stepCompleted:!!eF.completed.puff,stepTotal:eF.total||void 0,"data-testid":"puff-color-selector-1"}):null,showModal()||neckLabel()?null:(0,n.jsx)(n.Fragment,{children:showMultiSize()?(0,n.jsx)(T.A,{className:"scope-d0072188",artwork:firstArtwork(),disabled:disableSizeChange(),readonly:printAsIsReadOnly(),withPreCut:withPreCut(),showMultiUploadBox:showMultiUploadBox(),isArtworkUploaded:artworkUploaded(),showFreeTransfersBadge:showFreeTransfersBadge(),onShowFileDialog:showFileDialog,stepNumber:eF.sizeStepNumber,completed:eF.completed.size,total:eF.total||void 0,"data-testid":"multi-size-step"}):isStickerSample()||showMultiSize()||hideSizeInputs()?null:(0,n.jsx)(C.A,{className:(0,l.cn)("scope-d0072188",{"product-details-dtf__dimensions--near-quantity":!showStepsUI()&&printAsIs()&&modalArtworks().length<=1}),artwork:firstArtwork(),disabled:disableSizeChange(),widthDefault:defaultWidthValue(),readonly:printAsIsReadOnly(),currentStore:ex,stepNumber:eF.sizeStepNumber,stepCompleted:eF.completed.size,stepTotal:eF.total||void 0,"data-testid":"artwork-dimensions"})}),showSpanglesActions()?(0,n.jsx)(er.A,{className:"scope-d0072188",isArtworkInvalid:withError(),"data-testid":"dtf-spangles-actions"}):null,showSpanglesActions()&&allAPIsCompleted()&&!isSpangleReordering()?(0,n.jsx)(eo.A,{className:"scope-d0072188","data-testid":"dtf-spangle-versions"}):null,showSpanglesActions()&&allAPIsCompleted()||isSpangleReordering()?(0,n.jsx)(en.A,{className:"scope-d0072188","data-testid":"dtf-spangles-color-selector"}):null]}),isStickerSample()?(0,n.jsx)("input",{className:"artwork-quantity__input js-quantity-form-input scope-d0072188",type:"hidden","data-variant-id":variantId(),value:10,"data-testid":"artwork-quantity-input"}):showMultiSize()||isGangSheetBuilder()||neckLabel()?null:(0,n.jsx)(z.A,{className:"scope-d0072188",artwork:firstArtwork(),showFreeShipping:!0,disabled:outOfStock(),stepNumber:eF.finalStepNumber,stepCompleted:eF.completed.final,stepTotal:eF.total||void 0,"data-testid":"artwork-quantity"}),neckLabel()?null:(0,n.jsxs)(n.Fragment,{children:[!withPreCut()||showMultiSize()||neckLabel()?null:(0,n.jsx)(ef.A,{className:"scope-d0072188","data-testid":"pre-cut"}),outOfStock()&&!hidePdpRestockNotify()?(0,n.jsx)(ed.A,{className:"scope-d0072188","data-testid":"notify-on-restock"}):null,outOfStock()||neckLabel()?null:(0,n.jsx)(X.A,{className:"scope-d0072188","data-testid":"drop-zone"})]}),(0,n.jsx)(j.A,{ref:e7,accept:supportedFileTypes(),multiple:(!isSpangle()||spanglesMaxImageCount()>1)&&!isPuff()&&!isStickerSample()}
1),showModal()?(0,n.jsx)(ec.A,{className:"scope-d0072188",moveBellow:!!fileToRemove()||showDiscardModal()||showFilesError()||showNetworkError()||e$||showPinningModal(),currentStore:ex,imagingPromise:eO,activeConfigSection:eX,onUpload:showFileDialog,slots:{"saved-carts":function(){var e;return(0,n.jsx)(n.Fragment,{children:null==(e=eA["saved-carts-modal"])?void 0:e.call(eA)})},"free-shipping":function(){var e;return(0,n.jsx)(n.Fragment,{children:null==(e=eA["free-shipping"])?void 0:e.call(eA)})}},"data-testid":"multi-artwork-modal"},firstArtwork().id):null,showMatchingShirtModal()?(0,n.jsx)(el.A,{className:"scope-d0072188","data-testid":"matching-shirt-modal"}):null,showPinningModal()&&pinningArtwork()&&pinningModalSessionId()?(0,n.jsx)(ep.A,{className:"scope-d0072188",artworkIndex:pinningArtworkIndex(),artworkImageUrl:pinningArtworkImageUrl(),artworkId:pinningArtworkId(),sessionId:pinningModalSessionId(),"data-testid":"pinning-session-modal"}):null,pendingPinningInvalidation()?(0,n.jsx)(et.A,{className:"scope-d0072188",onSubmit:eM.confirmPinningInvalidation,onClose:eM.cancelPinningInvalidation,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Remove Design Request?"})},text:function(){return(0,n.jsxs)(n.Fragment,{children:[" ","This change will remove your design request, are you sure you want to proceed?"," "]})},button:function(){return(0,n.jsx)(n.Fragment,{children:"Yes, Remove"})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"Keep Request"})}},"data-testid":"dtf-confirmation-modal"}):null,showArtworkHistoryModal()?(0,n.jsx)(E.A,{className:"scope-d0072188",reorderEnabled:reorderEnabled(),"data-testid":"artwork-history-modal"}):null,!outOfStock()&&(!eI||showGangSheetFreeShipping())?(0,n.jsxs)("div",{className:"product-details-dtf__dates-container visible-xs scope-d0072188",children:[gangSheetPdp()?null==(tu=eA["free-shipping"])?void 0:tu.call(eA):null,eI?null:(0,n.jsx)(Z.A,{className:"scope-d0072188","data-testid":"delivery-date-1",jiffyFirstSlot:eA["transfers-j1"]})]}):null,isStickerSample()?(0,n.jsx)(em.A,{className:"scope-d0072188","data-testid":"sticker-sample-banner"}):null,!showMultiUploadBox()||showMultiSize()||(0,ey.CI)(eM)?null:(0,n.jsx)("div",{className:"product-details-dtf__upload scope-d0072188",children:(0,n.jsx)(ew.A,{className:"scope-d0072188",onUpload:showFileDialog,"data-testid":"upload-box"})}),isGangSheetBuilder()?null:(0,n.jsx)(n.Fragment,{children:showMultiSize()?(0,n.jsxs)(q.A,{className:"scope-d0072188",stepNumber:eF.finalStepNumber,headerText:V.p.reviewAndAtc,completed:eF.completed.final,total:eF.total||void 0,"data-testid":"step-wrapper",children:[(0,n.jsx)(M.A,{className:"scope-d0072188",localBasket:eV,"data-testid":"multi-size-total"}),eB&&!eV&&Number(blankItemsCount())>0?(0,n.jsxs)("p",{className:"product-details-dtf__blanks-in-cart scope-d0072188","data-testid":"dtf-blanks-in-cart",children:["Your cart has ",Number(blankItemsCount())," ",1===Number(blankItemsCount())?"blank":"blanks",", not included in this total"]}):eB&&eV&&e8>0?(0,n.jsxs)("p",{className:"product-details-dtf__blanks-in-cart scope-d0072188","data-testid":"dtf-blanks-in-cart",children:["Your cart has ",e8," more"," ",1===e8?"blank":"blanks",", not included in this total"]}):null,(0,n.jsxs)("div",{className:"js-product-details-delivery-date-pdp-container scope-d0072188 hidden",children:[(0,n.jsx)(Z.A,{className:"scope-d0072188",hideAddressLine:!0,compact:!0,isSameDay:!0,"data-testid":"delivery-date-2"}),eH.managed&&"legacy"!==eH.status?null:(0,n.jsx)("span",{className:"product-details-dtf__or scope-d0072188","data-testid":"product-details-dtf-or",children:"Or"})]}),showShippingProgress()?null==(td=eA["free-shipping"])?void 0:td.call(eA):null,showShippingProgress()&&eH.managed&&"legacy"!==eH.status?(0,n.jsx)(Q.A,{offer:"local"===eH.status?eH.offer:null,pageSubtotal:eH.pageSubtotal}):null,showStoreCredit()?(0,n.jsx)("div",{className:"product-details-dtf__store-credit scope-d0072188",children:(0,n.jsx)(G.A,{className:"scope-d0072188",storeCreditInfo:storeCreditInfo(),"data-testid":"transfers-store-credit"})}):null,null==(tp=eA["saved-carts"])?void 0:tp.call(eA),artworkUploaded()&&!showModal()?(0,n.jsx)(es.S,{payload:eO}):null,showModal()?null:(0,n.jsx)("div",{id:"dtf-add-to-cart-anchor",className:"scope-d0072
1188",tabIndex:-1,children:(0,n.jsx)(ee.A,{className:"scope-d0072188","data-testid":"dtf-add-to-cart"})}),null==(tf=eA.favorite)?void 0:tf.call(eA)]}):(0,n.jsxs)("div",{className:"scope-d0072188",children:[showStoreCredit()?(0,n.jsx)(G.A,{className:"scope-d0072188",storeCreditInfo:storeCreditInfo(),"data-testid":"transfers-store-credit-1"}):null,null==(t_=eA["saved-carts"])?void 0:t_.call(eA),artworkUploaded()&&!showModal()?(0,n.jsx)(es.S,{payload:eO}):null,showModal()||neckLabel()?null:(0,n.jsx)(ee.A,{className:"scope-d0072188","data-testid":"dtf-add-to-cart-1"})]})}),eB?(0,n.jsx)(o.Suspense,{fallback:null,children:(0,n.jsx)(ej,{})}):null,fileToRemove()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.resetRemovalFile,onSubmit:onRemoveArtwork,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Remove File"})},text:function(){return(0,n.jsx)(n.Fragment,{children:"This file will be removed. Do you confirm?"})},button:function(){return(0,n.jsx)(n.Fragment,{children:"Remove File"})}},"data-testid":"dtf-confirmation-modal-1"}):null,showDiscardModal()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.hideDiscardModal,onSubmit:onDiscard,slots:{header:function(){return discardScope().preservesPreModalArtwork?(0,n.jsx)(n.Fragment,{children:"Discard added artwork"}):(0,n.jsx)(n.Fragment,{children:"Discard Changes"})},text:function(){var e=discardScope(),t=e.discardCount;return e.preservesPreModalArtwork?(0,n.jsxs)(n.Fragment,{children:[" ",1===t?"The 1 artwork you added here will be discarded.":"The ".concat(t," artworks you added here will be discarded."),(0,n.jsx)("br",{className:"scope-d0072188"}),"Your original design and its settings will be kept."," "]}):(0,n.jsxs)(n.Fragment,{children:[" ","All the changes and artworks will be discarded.",(0,n.jsx)("br",{className:"scope-d0072188"}),"Are you sure you want to proceed?"," "]})},button:function(){return discardScope().preservesPreModalArtwork?(0,n.jsx)(n.Fragment,{children:"Discard added artwork"}):(0,n.jsx)(n.Fragment,{children:"Discard Changes"})}},"data-testid":"dtf-confirmation-modal-2"}):null,showFilesError()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:resetFileErrors,slots:{header:function(){return(0,n.jsx)(n.Fragment,{children:"Warning"})},text:function(){return(0,n.jsx)(n.Fragment,{children:" You can only upload up to 10 files simultaneously. "})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"OK"})}},"data-testid":"dtf-confirmation-modal-3"}):null,showNetworkError()?(0,n.jsx)(et.A,{className:"scope-d0072188",onClose:eM.hideNetworkError,slots:{header:function(){return(0,n.jsx)("span",{"data-testid":"dtf-network-error-modal",children:"Unable to connect to server"})},text:function(){return(0,n.jsx)(n.Fragment,{children:"Please check your internet connection and try again."})},cancel:function(){return(0,n.jsx)(n.Fragment,{children:"OK"})}},"data-testid":"dtf-confirmation-modal-network-error"}):null,showGangSheetInfoModal()?(0,n.jsx)(ei.A,{className:"scope-d0072188",currentStore:ex,"data-testid":"gang-sheet-info-modal"}):null]})),(0,n.jsx)(P.A,{className:"scope-d0072188",isOpen:e$,onUpdateIsOpen:function(e){eJ(e)},isMultiArtworkModalOpen:showModal(),isPinBasedRedrawEnabled:isPinBasedRedrawEnabled(),triggerPoint:eK,"data-testid":"dtf-transfer-user-retention-modal"})]})}},73916(e,t,r){"use strict";r.d(t,{w:()=>o});var n=r(483134);function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}var o=function(e){function ProductDetailsDtfErrorBoundary(e){var t;return _class_call_check(this,ProductDetailsDtfErrorBoundary),(t=_call_super(this,ProductDetailsDtfErrorBoundary,[e])).state={hasError:!1,error:null},t}return _inherits(ProductDetailsDtfErrorBoundary,e),_create_class(ProductDetailsDtfErrorBoundary,[{key:"render",value:function(){return this.state.hasError?(0,n.jsx)("div",{className:"flex h-full items-center justify-center p-8","data-testid":"product-details-dtf-error-boundary-fallback",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold text-red-600",children:"Something went wrong"}),(0,n.jsx)("p",{className:"mt-2 text-gray-600",children:"Please reload the page to continue."}),(0,n.jsx)("button",{"data-testid":"product-details-dtf-error-boundary-reload",type:"button",onClick:function(){return window.location.reload()},className:"mt-4 rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700",children:"Reload Page"})]})}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}]),ProductDetailsDtfErrorBoundary}(r(293534).Component)},8676(e,t,r){"use strict";r.d(t,{A:()=>PuffColorSelector});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(556726),u=r(538896),d=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function PuffColorSelector(e){var t,r,p=e.label,f=e.stepNumber,_=e.stepCompleted,h=e.stepTotal,m=_object_without_properties(e,["label","stepNumber","stepCompleted","stepTotal"]),g=[{label:"white",value:"#FFFFFF"},{label:"black",value:"#000000"},{label:"red",value:"#D50132"},{label:"orange",value:"#FA4617"},{label:"gold",value:"#FEB414"},{label:"yellow",value:"#FFDD04"},{label:"green",value:"#007A00"},{label:"blue",value:"#1261A9"},{label:"purple",value:"#432F92"},{label:"teal",value:"#008080"},{label:"mint",value:"#B6E4E4"},{label:"lavender",value:"#C7B1EA"},{label:"coral",value:"#FDA398"},{label:"pink",value:"#EE529C"},{label:"denim",value:"#1C5C82"},{label:"brown",value:"#4D3525"}],b=(0,u.useDtfStore)();function artwork(){var e;return null==(e=b.artworks)?void 0:e[0]}function showBorderUI(){return b.showStepsUI}function handleSelect(e){b.changePuffColor({color:e})}var y=null==(t=artwork())?void 0:t.url,v=null==(r=artwork())?void 0:r.enhancementTier;(0,o.useEffect)(function(){var e=artwork();if(e&&!e.isFile){var t=e.color||g[0].value;handleSelect(e.url?t:null)}},[y]),(0,o.useEffect)(function(){var e=artwork();if(e){var t=e.color;t&&handleSelect(t)}},[v]);var w=artwork(),j=showBorderUI();return(0,n.jsxs)("div",_object_spread_props(_object_spread({},m),{className:(0,i.cn)("puff-color-selector",{"puff-color-selector--with-border":j}),children:[p?(0,n.jsx)(n.Fragment,{children:j?(0,n.jsx)(c.A,{stepNumber:void 0===f?2:f,content:p,completed:void 0!==_&&_,total:h,"data-testid":"step-number"}):(0,n.jsx)("div",{className:"puff-color-selector__label",children:p})}):null,(0,n.jsx)("div",{className:"puff-color-selector__items",children:(0,d.p)(g,function(e){return(0,n.jsxs)("button",{type:"button",className:(0,i.cn)("puff-color-selector__item",{"puff-color-selector__item--selected":(null==w?void 0:w.color)===e.value}),"aria-pressed":(null==w?void 0:w.color)===e.value,onClick:function(){handleSelect(e.value)},"data-testid":"puff-color-selector-div",children:[(0,n.jsx)("div",{className:"puff-color-selector__color",style:{backgroundColor:e.value},children:(null==w?void 0:w.color)===e.value?(0,n.jsx)(l.A,{className:(0,i.cn)("puff-color-selector__checkbox","puff-color-selector__checkbox--".concat(e.label)),icon:"checkbox",width:"40",height:"40","data-testid":"puff-color-selector-checkbox"}):null})," ",e.label]},e.label)})})]}))}},387624(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}let __rspack_default_export=function(e){_object_destructuring_empty(e);var t=_extends({},e);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("puff-notice scope-cb8cd9f3",t.className),children:[(0,n.jsx)("div",{className:"puff-notice__bulb-icon-wrapper scope-cb8cd9f3",children:(0,n.jsx)(i.A,{className:"puff-notice__bulb-icon scope-cb8cd9f3",icon:"bulb","data-testid":"puff-notice-bulb-icon"})}),(0,n.jsxs)("div",{className:"puff-notice__notice-wrapper scope-cb8cd9f3",children:[" ","Elevate Your Designs with Puff: ",(0,n.jsx)("br",{className:"puff-notice__br scope-cb8cd9f3"}),(0,n.jsx)("a",{className:"scope-cb8cd9f3",href:"#image-design-tips",onClick:function(e){e.stopPropagation()},"data-testid":"puff-notice-a",children:"Tips to Get Started"})]})]}))}},996821(e,t,r){"use strict";r.d(t,{A:()=>w});var n=r(483134),o=r(293534),i=r(419250),l=r(147141),c=r(733334),u=r(467265),d=r(997252),p=r(5786),f=r(257889),_=r(864188),h=r(52382),m=r.n(h),g=r(200108),b=r(980423),y=r(122894),v=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function RedrawNotes(e){var t=e.ref,r=e.index,h=void 0===r?0:r,w=e.enhancementNote,j=void 0===w?void 0:w,k=e.isMultiUpload,x=void 0!==k&&k,S=e.disabled,O=void 0!==S&&S,P=e.onLearnMore,A=e.idPrefix,C=void 0===A?void 0:A,I="".concat(null!=C?C:"redraw-note","-").concat(h),E=_sliced_to_array((0,o.useState)(""),2),N=E[0],D=E[1],T=_sliced_to_array((0,o.useState)(!1),2),M=T[0],R=T[1],F=!(0,l.IV)(),L=(0,o.useRef)(null),B=_sliced_to_array((0,o.useState)(""),2),z=B[0],U=B[1],H=(0,o.useRef)(null),q=(0,o.useRef)(null),V=(0,o.useRef)(null);(0,c.V)(H);var G=(0,v.useDtfStore)();function showPinningSessionEntry(){var e=G.artworks[h];return e&&(G.isPinBasedRedrawEnabled||"pinningSessionId"in e&&e.pinningSessionId)}var K=(0,o.useRef)(m()(function(){G.updatePdpDates()},500)).current,W=(0,o.useRef)(m()(function(e){(0,u.Py)("dtf_need_artist_edits_note_changed",{page:"pdp",artwork_index:h,note_value:e,note_length:e.length})},500)).current;function saveNote(e){var t,r=(null!=(t=e.target.value)?t:"").trim();if(G.updateArtworkValues({index:h,enhancementNote:r}),r!==z&&W(r),G.showDesignServicesDeliveryBuffer){var n=!!r;(n||z&&!n)&&K()}U(r),L.current&&clearTimeout(L.current),L.current=setTimeout(function(){G.getArtworksPricing()},500)}function openRedrawInformationModal(){(0,u.Py)("redraw_information_modal_opened",{page:"pdp"}),F&&R(!0)}function closeRedrawInformationModal(){var e;null==(e=V.current)||e.close(),R(!1)}function closeRedrawInformationTooltip(){var e;null==(e=q.current)||e.hideTooltip()}function focusTextarea(){H.current&&(H.current.focus(),(0,l.IV)()&&H.current.scrollIntoView({behavior:"smooth",block:"center"}))}return(0,o.useImperativeHandle)(t,function(){return{focusTextarea:focusTextarea}}),(0,o.useEffect)(function(){D(null!=j?j:""),U(null!=j?j:"");var handleItemsAdded=function(){D("")};return _.EventBus.on(_.Events.ITEMS_ADDED_TO_CART,handleItemsAdded),function(){_.EventBus.removeEventListener(_.Events.ITEMS_ADDED_TO_CART,handleItemsAdded),K&&K.cancel(),W&&(W.flush(),W.cancel()),L.current&&clearTimeout(L.current)}},[j]),(0,n.jsxs)(n.Fragment,{children:[showPinningSessionEntry()?(0,n.jsx)(y.A,{className:(0,d.cn)("scope-aee006ff",{"pt-5":!G.isStandardArtwork,"mb-5":x}),index:h,artwork:G.artworks[h],tooltipIdPrefix:C?"".concat(C,"-guest-launch-tooltip"):void 0,"data-testid":"pinning-session-entry"}):G.isStandardArtwork&&G.enableAbAiMonetization?(0,n.jsx)(g.A,{className:"scope-aee006ff",modelValue:N,onUpdateModelValue:function(e){D(e)},disabled:O,onLearnMore:void 0===P?null:P,index:h,onInput:saveNote,"data-testid":"custom-notes"}):(0,n.jsxs)("div",{className:(0,d.cn)("redraw-notes scope-aee006ff",{"redraw-notes--multi-upload":x,"redraw-notes--standard-artwork":G.isStandardArtwork}),children:[(0,n.jsxs)("label",{className:"redraw-notes__label scope-aee006ff",htmlFor:I,"data-testid":"redraw-notes-label",children:[(0,n.jsxs)("span",{className:"redraw-notes__label-text scope-aee006ff",children:[(0,n.jsxs)("span",{className:"scope-aee006ff",children:[(0,n.jsx)("strong",{className:"scope-aee006ff",children:"Free"})," optional design editing included"]}),(0,n.jsxs)("span",{className:"scope-aee006ff",children:["(a ",(0,n.jsx)("strong",{className:"scope-aee006ff",children:"$10"})," value)!"]})]}),(0,n.jsx)(f.A,{className:"scope-aee006ff",ref:q,disabled:F,trigger:"click",position:"bottom-right",slots:{target:function(){return(0,n.jsxs)("button",{className:(0,d.cn)("redraw-notes__how-it-works scope-aee006ff",{"redraw-notes__how-it-works--standard-artwork":G.isStandardArtwork}),type:"button",onClick:openRedrawInformationModal,"data-testid":"redraw-notes-how-it-works",children:[" ","How it works"," "]})},content:function(){return(0,n.jsx)(b.A,{className:"scope-aee006ff",isMobile:!1,onClose:closeRedrawInformationTooltip,"data-testid":"redraw-information"})}},"data-testid":"tooltip"})]}),(0,n.jsx)("textarea",{className:"redraw-notes__textarea scope-aee006ff",id:I,ref:H,value:N,disabled:O,onChange:function(e){D(e.target.value),saveNote(e)},maxLength:i.G,placeholder:"e.g. Keep the white inside of the text. Change the letters of the logo to orange.","data-testid":"redraw-notes-textarea"}),G.showDesignServicesDeliveryBuffer?(0,n.jsxs)("label",{className:"redraw-notes__note redraw-notes__note--delivery scope-aee006ff","data-testid":"redraw-notes-note",children:[" ","Design Services add 1 day to delivery."," "]}):null]}),F&&M?(0,n.jsx)(p.A,{className:"scope-aee006ff",ref:V,compact:!0,hideCloseButton:!0,bottomAligned:!0,onClose:closeRedrawInformationModal,"data-testid":"common-modal",children:(0,n.jsx)(b.A,{className:"scope-aee006ff",isMobile:!0,onClose:closeRedrawInformationModal,"data-testid":"redraw-information-1"})}):null]})}RedrawNotes.displayName="RedrawNotes";let w=RedrawNotes},340382(e,t,r){"use strict";r.d(t,{A:()=>ReuploadBox});var n=r(483134),o=r(293534),i=r(997252),l=r(467265),c=r(727566),u=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ReuploadBox(e){var t=e.index,r=_object_without_properties(e,["index"]),d=u.useDtfStore.useValue,p=d("printAsIs"),f=d("pdpType"),_=d("addFilesToQueue"),h=(0,o.useRef)(null),m=_sliced_to_array((0,o.useState)((0,c.it)()),1)[0];function reuploadTitle(){return p?"Re-upload a gang sheet in the correct size":"Re-upload valid artwork"}function reuploadButton(){return p?"Re-upload a gang sheet":"Choose file"}function trackAddFileAreaClick(){(0,l.Py)("replace_artwork_file_clicked",{page:"pdp",pdp_type:f})}function uploadClick(){trackAddFileAreaClick(),h.current.click()}function handleFileChange(e){var r=e.target.files;r.length&&(_({files:r,isDropEvent:!1,artworkIndex:t}),h.current.value="")}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("reupload-box scope-0f997915",r.className),children:[(0,n.jsx)("input",{className:"reupload-box__file scope-0f997915 hidden",ref:h,type:"file",accept:m,onChange:handleFileChange,"data-testid":"reupload-box-file"}),(0,n.jsx)("div",{className:"reupload-box__title scope-0f997915",children:reuploadTitle()}),(0,n.jsx)("button",{className:"reupload-box__upload-wrapper scope-0f997915",type:"button",onClick:uploadClick,"data-testid":"reupload-box-upload-wrapper",children:(0,n.jsx)("span",{className:"reupload-box__input-label scope-0f997915",children:reuploadButton()})})]}))}},943703(e,t,r){"use strict";r.d(t,{A:()=>SpangleNotice});var n=r(483134),o=r(997252),i=r(723433);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function SpangleNotice(e){_object_destructuring_empty(e);var t=_extends({},e);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("spangle-notice scope-586cb7dc",t.className),children:[(0,n.jsx)("div",{className:"spangle-notice__bulb-icon-wrapper scope-586cb7dc",children:(0,n.jsx)(i.A,{className:"spangle-notice__bulb-icon scope-586cb7dc",icon:"bulb","data-testid":"spangle-notice-bulb-icon"})}),(0,n.jsxs)("div",{className:"spangle-notice__notice-wrapper scope-586cb7dc",children:[" ","Upload bold designs with clear colors. ",(0,n.jsx)("br",{className:"spangle-notice__br scope-586cb7dc"}),(0,n.jsx)("a",{className:"scope-586cb7dc",href:"#image-upload-tips",onClick:function(e){e.stopPropagation()},"data-testid":"spangle-notice-a",children:"View Full Instructions"})]})]}))}},110051(e,t,r){"use strict";r.d(t,{A:()=>SpangleProcessingTimer});var n=r(483134),o=r(293534);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function formatElapsed(e){var t=Math.floor(e/60);return"".concat(t,":").concat(String(e%60).padStart(2,"0"))}function SpangleProcessingTimer(){var e=_sliced_to_array((0,o.useState)(0),2),t=e[0],r=e[1];return(0,o.useEffect)(function(){var e=Date.now(),t=setInterval(function(){r(Math.floor((Date.now()-e)/1e3))},1e3);return function(){return clearInterval(t)}},[]),(0,n.jsx)("span",{className:"artwork-image__elapsed-time scope-297dd82d","data-testid":"artwork-image-elapsed-time","aria-hidden":"true",children:formatElapsed(t)})}},946648(e,t,r){"use strict";r.d(t,{A:()=>StickerDripBuilder});var n=r(483134),o=r(293534),i=r(997252),l=r(736602),c=r(586519),u=r(298210),d=r(727754),p=r(884853),f=r(538896),_=r(2605);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var h="Items were not added. Please try again.",m="We could not save your sticker design. Please try again.",g=(u.eO.length+1)*d.jb+u.eO.reduce(function(e,t){return e+t},0)+u.RP;function StickerDripBuilder(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,f.useDtfStore)(),u=(0,o.useRef)(r);u.current=r;var d=(0,o.useRef)(new Set);function stickerBuilder(){return r.gangSheetBuilder}function builderShopId(){return r.gangSheetBuilderShopId}function stickerPricePerSquareInch(){return(0,_.xu)(r)}function stickerQuantity(){var e,t,n,o;return null!=(e=null!=(t=r.minStickerQuantity)?t:null==(n=r.initialValues)?void 0:n.quantity)?e:null==(o=r.simulation)?void 0:o.quantity}function builderPayload(){var e=stickerQuantity(),t=stickerPricePerSquareInch();return{container:"gs-builder",mode:(0,l.KV)()?"production":"development",shop_id:builderShopId(),artboard:"sticker",sizes:[{id:1,width:3,height:3}],quantity:e,settings:_object_spread_props(_object_spread({stickerMaxWidth:12,stickerMaxHeight:12},null===t?{}:{pricing:{stickerType:"flat",price:t}}),{setMinimumQuantity:!0,minimumQuantity:e})}}function addFilesToQueue(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.addFilesToQueue.apply(r,_to_consumable_array(t))}
1function submitForm(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.submitForm.apply(r,_to_consumable_array(t))}function isReadyForOrder(){return!!r.isReadyForOrder}function queuedArtworkRows(e){var t=e.filter(Boolean),n=r.artworksState;return t.length&&Array.isArray(n)?t.map(function(e){return n.find(function(t){return(null==t?void 0:t.file)===e})}):null}function isQueuedArtworkStillPresent(e){var t=queuedArtworkRows(e);return null===t||t.every(Boolean)}function hasQueuedUploadFailed(e){var t=queuedArtworkRows(e);return null!==t&&t.some(function(e){return(null==e?void 0:e.uploadError)||(null==e?void 0:e.retryFailed)})}function showFailureModal(e){(0,p.g)(e)}function waitUntilReadyForOrder(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:t=Date.now()+g,r.label=1;case 1:if(!(!isReadyForOrder()&&!hasQueuedUploadFailed(e)&&Date.now()<t))return[3,3];return[4,new Promise(function(e){setTimeout(e,500)})];case 2:return r.sent(),[3,1];case 3:return[2]}})})()}function downloadDesignPreview(e){return _async_to_generator(function(){var t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:t=new AbortController,r=setTimeout(function(){return t.abort()},3e4),i.label=1;case 1:return i.trys.push([1,4,5,6]),[4,fetch(e.thumbnail_url,{signal:t.signal})];case 2:if(!(n=i.sent()).ok)throw Error("thumbnail fetch failed: ".concat(n.status));return[4,n.blob()];case 3:return[2,i.sent()];case 4:return o=i.sent(),(0,c.notifyError)(o,{params:{source:"sticker_drip_builder.thumbnail_download_failed",design_id:null==e?void 0:e.id}}),[2,null];case 5:return clearTimeout(r),[7];case 6:return[2]}})})()}function processSticker(e){return _async_to_generator(function(){var t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:if(!(t=Array.isArray(null==e?void 0:e.designs)?e.designs:[]).length)return reportUnusableDesigns("design event carried no designs"),[2];return(r=null==e?void 0:e.sticker)&&(void 0===r?"undefined":_type_of(r))==="object"||(0,c.notifyError)(Error("Sticker Drip builder: design event carried no sticker block"),{params:{source:"sticker_drip_builder.missing_sticker_block",design_count:t.length,event_keys:Object.keys(null!=e?e:{}).join(",")}}),u.current.recordGeneratedStickerDesigns(t.map(function(e){return _object_spread_props(_object_spread({},e),{sticker:r})})),[4,Promise.all(t.map(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,downloadDesignPreview(e)];case 1:return[2,(t=r.sent())?new File([t],"".concat(e.id,".png"),{type:"image/png"}):null]}})})()}))];case 1:if((o=(n=i.sent()).filter(function(e){return null!==e})).length<n.length&&((0,c.notifyError)(Error("Sticker Drip builder: thumbnail download failed"),{params:{source:"sticker_drip_builder.thumbnail_download_failed",failed_count:n.length-o.length,total_count:n.length}}),o.length&&showFailureModal("Only ".concat(o.length," of ").concat(n.length," designs could be added. ")+"Please try the others again.")),!o.length)return showFailureModal(h),[2];return[4,addFilesToQueue({files:o,artworkIndex:null,existingArtworkId:null,uploadSource:"sticker_drip_builder"})];case 2:return i.sent(),[4,waitUntilReadyForOrder(o)];case 3:if(i.sent(),!isQueuedArtworkStillPresent(o))return[2];if(hasQueuedUploadFailed(o)||!isReadyForOrder())return(0,c.notifyError)(Error("Sticker Drip builder: artwork never became order-ready"),{params:{source:"sticker_drip_builder.not_ready"}}),showFailureModal(h),[2];return submitForm(),[2]}})})()}function closeBuilder(){var e,t;null==(t=u.current.gangSheetBuilder)||null==(e=t.close)||e.call(t),u.current.setShowStickerDripBuilder(!1)}function reportUnusableDesigns(e){(0,c.notifyError)(Error("Sticker Drip builder: ".concat(e)),{params:{source:"sticker_drip_builder.unusable_designs",reason:e}}),showFailureModal(h)}function handleDesignCreated(e){var t,r=null==e||null==(t=e.data)?void 0:t.designs,n=Array.isArray(r)?r:[];if(!Array.isArray(r)||!n.length){reportUnusableDesigns(Array.isArray(r)?"design event carried no designs":"designs was not an array"),closeBuilder();return}if(n.some(function(e){return(null==e?void 0:e.id)===void 0||(null==e?void 0:e.id)===null||""===String(e.id).trim()}
1)){reportUnusableDesigns("design event carried a design with no id"),closeBuilder();return}var o=_to_consumable_array(new Set(n.map(function(e){return String(e.id)}))).filter(function(e){return!d.current.has(e)});if(!o.length)return void closeBuilder();o.forEach(function(e){return d.current.add(e)});var i=new Set(o);processSticker(null==(e=_object_spread_props(_object_spread({},e),{data:_object_spread_props(_object_spread({},e.data),{designs:n.filter(function(e){var t=String(e.id);return!!i.has(t)&&(i.delete(t),!0)})})}))?void 0:e.data).catch(function(e){(0,c.notifyError)(e,{params:{source:"sticker_drip_builder.process_failed"}}),showFailureModal(h)}),closeBuilder()}function handleDesignUpdated(e){handleDesignCreated(e)}function handleClosed(){u.current.setShowStickerDripBuilder(!1)}function handleError(e){var t,r;closeBuilder(),showFailureModal(m);try{t="string"==typeof(null==e?void 0:e.data)?e.data:JSON.stringify(null!=(r=null==e?void 0:e.data)?r:null)}catch(r){t=String(null==e?void 0:e.data)}(0,c.notifyError)(Error("Sticker Drip builder reported an error"),{params:{source:"sticker_drip_builder.vendor_error",detail:t}})}return(0,o.useEffect)(function(){var e,t,r,n,o,i=stickerBuilder();if(!i){(0,c.notifyError)(Error("Sticker Drip builder: SDK missing at mount"),{params:{source:"sticker_drip_builder.sdk_missing"}}),showFailureModal(m),u.current.setShowStickerDripBuilder(!1);return}try{e=null==(o=i.open(builderPayload()))||null==(n=o.on("design:created",handleDesignCreated))||null==(r=n.on("design:updated",handleDesignUpdated))||null==(t=r.on("closed",handleClosed))?void 0:t.on("error",handleError)}catch(e){(0,c.notifyError)(e,{params:{source:"sticker_drip_builder.open_threw"}}),closeBuilder(),showFailureModal(m);return}if(!e){(0,c.notifyError)(Error("Sticker Drip builder: open() returned no emitter"),{params:{source:"sticker_drip_builder.open_returned_nothing"}}),closeBuilder(),showFailureModal(m);return}return function(){var t,r,n,o;null==e||null==(t=e.off)||t.call(e,"design:created",handleDesignCreated),null==e||null==(r=e.off)||r.call(e,"design:updated",handleDesignUpdated),null==e||null==(n=e.off)||n.call(e,"closed",handleClosed),null==e||null==(o=e.off)||o.call(e,"error",handleError)}},[]),(0,n.jsx)("div",_object_spread_props(_object_spread({},t),{className:(0,i.cn)("modal sticker-drip-builder-modal",t.className),id:"sticker-drip-builder-modal-body","data-testid":"sticker-drip-builder-modal"}))}},679863(e,t,r){"use strict";r.d(t,{A:()=>StickerDripBuilderContainer});var n=r(483134),o=r(293534),i=r(467265),l=r(586519),c=r(997252),u=r(946648),d=r(884853),p=r(538896),f=r(2605);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var _="We could not open the sticker designer. Please try again.";function StickerDripBuilderContainer(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,p.useDtfStore)(),h=t.className,m=_object_without_properties(t,["className"]),g=_sliced_to_array((0,o.useState)(!1),2),b=g[0],y=g[1],v=(0,o.useRef)(!1),w=(0,o.useRef)(!0);function pricingReady(){return null!==(0,f.xu)(r)}function showStickerDripBuilder(){return r.showStickerDripBuilder}function setShowStickerDripBuilder(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.setShowStickerDripBuilder.apply(r,_to_consumable_array(t))}function handleOpenBuilder(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:if(v.current)return[2];v.current=!0,y(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,r.ensureGangSheetBuilder()];case 2:if(e=t.sent(),!w.current)return[2];if(!e)return(0,i.Py)("sticker_drip_builder_load_failed",{}),(0,d.g)(_),[2];return setShowStickerDripBuilder(!0),(0,i.Py)("sticker_drip_builder_opened",{}),[3,4];case 3:return v.current=!1,y(!1),[7];case 4:return[2]}})})()}return(0,o.useEffect)(function(){return w.current=!0,function(){w.current=!1}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({className:(0,
1c.cn)("sticker-drip-builder-container",h)},m),{children:[showStickerDripBuilder()?(0,n.jsx)(u.A,{"data-testid":"sticker-drip-builder"}):null,(0,n.jsx)("button",{className:"sticker-drip-builder-container__button",type:"button",disabled:b||!pricingReady(),"aria-busy":b||!pricingReady(),onClick:function(e){e.stopPropagation(),handleOpenBuilder().catch(function(e){(0,l.notifyError)(e,{params:{source:"sticker_drip_builder.open_failed"}}),(0,i.Py)("sticker_drip_builder_load_failed",{}),(0,d.g)(_)})},"data-testid":"sticker-drip-builder-container-button",children:"Design Your Sticker"})]}))}},688264(e,t,r){"use strict";r.d(t,{A:()=>StickerSampleBanner});var n=r(483134),o=r(997252),i=r(723433),l=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StickerSampleBanner(e){var t=e.className,r=_object_without_properties(e,["className"]),c=(0,l.useDtfStore)();function isGuest(){return c.isGuest}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("sticker-sample-banner scope-acdf386d",isGuest()&&"sticker-sample-banner--guest",t),children:[(0,n.jsxs)("div",{className:"sticker-sample-banner__text scope-acdf386d",children:[(0,n.jsx)("div",{className:"sticker-sample-banner__headline scope-acdf386d",children:(0,n.jsxs)("strong",{className:"scope-acdf386d",children:[" ","10 Custom Stickers for"," ",(0,n.jsx)("span",{className:"sticker-sample-banner__discounted-price scope-acdf386d",children:"$8.00"})]})}),(0,n.jsx)("div",{className:"scope-acdf386d",children:(0,n.jsx)("strong",{className:"scope-acdf386d",children:'Pre-set 9 square inches (3" by 3")'})})]}),(0,n.jsxs)("div",{className:"sticker-sample-banner__shipping scope-acdf386d",children:[(0,n.jsx)(i.A,{className:"sticker-sample-banner__shipping-icon scope-acdf386d",icon:"free-shipping-truck",width:"60",height:"60","data-testid":"sticker-sample-banner-shipping-icon"}),(0,n.jsx)("div",{className:"sticker-sample-banner__shipping-text scope-acdf386d",children:(0,n.jsxs)("strong",{className:"scope-acdf386d",children:["FREE SHIPPING",(0,n.jsx)("br",{className:"scope-acdf386d"}),"ON YOUR 1ST ORDER!"]})})]})]}))}},700198(e,t,r){"use strict";r.d(t,{A:()=>StickersTabs});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function StickersTabs(e){var t,r=e.tabs,u=e.artwork,d=e.slots,p=_object_without_properties(e,["tabs","artwork","slots"]),f=_sliced_to_array((0,o.useState)(r[0].value),2),_=f[0],h=f[1];function handleClick(e){u.processingImage||h(e.value)}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},p),{className:(0,i.cn)("stickers-tabs",p.className),children:[(0,n.jsx)("div",{className:"stickers-tabs__items",children:(0,c.p)(r,function(e){return(0,n.jsxs)("button",{className:(0,i.cn)("stickers-tabs__item",{"stickers-tabs__item--active":e.value===_}),type:"button",onClick:function(t){t.preventDefault(),handleClick(e)},"data-testid":"stickers-tabs-item",children:[(0,n.jsx)(l.A,{className:"stickers-tabs__icon",icon:e.icon,width:"24",height:"24","data-testid":"stickers-tabs-icon"})," ",e.label]},e.value)})}),null==d||null==(t=d.default)?void 0:t.call(d,{tab:_})]}))}},709509(e,t,r){"use strict";r.d(t,{A:()=>StickersTools});var n=r(483134),o=r(997252),i=r(407913),l=r(986889),c=r(556671);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StickersTools(e){var t=e.artwork,r=_object_without_properties(e,["artwork"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("stickers-tools",r.className),children:(0,n.jsx)(i.A,{artwork:t,slots:{default:function(e){var r=e.tab;return(0,n.jsx)(n.Fragment,{children:"background"===r?(0,n.jsx)(l.A,{artwork:t,"data-testid":"stickers-tools-background"}):"border"===r?(0,n.jsx)(c.A,{artwork:t,"data-testid":"stickers-tools-border"}):null})}},"data-testid":"stickers-tools-tabs"})}))}},986889(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(997252),i=r(966294),l=r(467265),c=r(538896),u=r(676606);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){var t=e.artwork,r=_object_without_properties(e,["artwork"]),d=(0,c.useDtfStore)(),p=(0,u.R)();function selectedBgColor(){return t.bgColor}function handleChange(e){d.updateArtworkValuesById({id:t.id,bgColor:e});var r={background_color:e,page:"PDP",business_line:"Stickers",artwork_id:t.id,is_bg_removed:t.removeBackground};(0,l.Py)("user_applied_background_color_to_sticker",r),t.isFile||t.isSimulated||p.generateStickerImage({artwork:t,bgColor:e})}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("stickers-tools-background",r.className),children:[(0,n.jsx)("h3",{className:"stickers-tools-background__title",children:"Select Backgroun
1d Color"}),(0,n.jsx)(i.A,{value:selectedBgColor(),onChange:handleChange,"data-testid":"stickers-tools-color-picker"})]}))}},556671(e,t,r){"use strict";r.d(t,{A:()=>StickersToolsBorder});var n=r(483134),o=r(997252),i=r(718337),l=r(467265),c=r(538896),u=r(676606);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StickersToolsBorder(e){var t=e.artwork,r=_object_without_properties(e,["artwork"]),d=(0,c.useDtfStore)(),p=(0,u.R)();function selectedBorderThickness(){return null==t?void 0:t.paddingSize}function handleBorderThicknessChange(e){if(d.updateArtworkValuesById({id:t.id,paddingSize:e}),!t.isFile&&!t.isSimulated){var r={page:"PDP",business_line:"Stickers",artwork_id:t.id,border_size:e,is_bg_removed:t.removeBackground};(0,l.Py)("sticker_select_border_size",r),p.generateStickerImage({artwork:t,paddingSize:e})}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("stickers-tools-border",r.className),children:[(0,n.jsx)("h3",{className:"stickers-tools-border__title",children:"Select Border Thickness"}),(0,n.jsx)(i.A,{value:selectedBorderThickness(),items:[{label:"Small",value:"small",icon:"https://jiffy.imgix.net/gen/sticker-shapes/border-small.png"},{label:"Medium",value:"medium",icon:"https://jiffy.imgix.net/gen/sticker-shapes/border-medium.png"},{label:"Large",value:"large",icon:"https://jiffy.imgix.net/gen/sticker-shapes/border-large.png"}],onChange:handleBorderThicknessChange,"data-testid":"stickers-tools-items"})]}))}},966294(e,t,r){"use strict";r.d(t,{A:()=>ColorPickerWrapper});var n=r(483134),o=r(379658);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function ColorPickerWrapper(e){var t=e.value,r=e.onChange,i=_object_without_properties(e,["value","onChange"]);function handleChange(e){r(e)}return(0,n.jsx)(o.A,_object_spread_props(_object_spread({},i),{value:t,colors:["#FFFFFF","#000000","#D50132","#FA4617","#FEB414","#1261A9","#432F92","#008080","#B6E4E4","#C7B1EA","#FDA398"],variant:"inline",onChange:handleChange,"data-testid":"color-picker"}))}},718337(e,t,r){"use strict";r.d(t,{A:()=>StickersToolsItems});var n=r(483134),o=r(958469),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StickersToolsItems(e){var t=e.value,r=e.items,l=e.onChange,c=_object_without_properties(e,["value","items","onChange"]);function handleChange(e){null==l||l(e)}return(0,n.jsx)("div",_object_spread_props(_object_spread({},c),{className:(0,i.cn)("stickers-tools-items"),children:(0,o.p)(void 0===r?[]:r,function(e){return(0,n.jsxs)("button",{className:(0,i.cn)("stickers-tools-items__item",{"stickers-tools-items__item--selected":e.value===t}),type:"button","aria-pressed":e.value===t,onClick:function(){handleChange(e.value)},"data-testid":"stickers-tools-items-div",children:[(0,n.jsx)("img",{className:(0,i.cn)("stickers-tools-items__icon","stickers-tools-items__icon--".concat(e.value)),src:e.icon,width:58,height:58,alt:e.label||""})," ",e.label]},e.value)})}))}},407913(e,t,r){"use strict";r.d(t,{A:()=>StickersToolsTabs});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(467265),u=r(958469),d=r(538896),p=r(2605);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function StickersToolsTabs(e){var t,r=e.artwork,f=e.slots,_=_object_without_properties(e,["artwork","slots"]),h=(0,d.useDtfStore)(),m=[{label:"Background",icon:"tools-background",value:"background"}].concat(_to_consumable_array((0,p.CI)(h)||(0,p.XA)(r)?[]:[{label:"Border",value:"border"}])),g=_sliced_to_array((0,o.useState)(m[0].value),2),b=g[0],y=g[1];function handleClick(e){if(!r.processingImage){y(e.value);var t={tab:e.value,page:"PDP",business_line:"Stickers",artwork_id:r.id,is_bg_removed:r.removeBackground};(0,c.Py)("sticker_tool_tab_change",t)}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},_),{className:(0,i.cn)("stickers-tools-tabs",_.className),children:[(0,n.jsx)("div",{className:"stickers-tools-tabs__items",children:(0,u.p)(m,function(e){return(0,n.jsxs)("button",{className:(0,i.cn)({"stickers-tools-tabs__item":!0,"stickers-tools-tabs__item--active":e.value===b}),type:"button",onClick:function(t){t.preventDefault(),handleClick(e)},"data-testid":"stickers-tools-tabs-button",children:[e.icon?(0,n.jsx)(l.A,{className:"stickers-tools-tabs__icon",icon:e.icon,width:"24",height:"24","data-testid":"stickers-tools-tabs-icon"}):(0,n.jsx)("span",{className:(0,i.cn)(["stickers-tools-tabs__icon","stickers-tools-tabs__icon--".concat(e.value)])})," ",e.label]},e.value)})}),null==f||null==(t=f.default)?void 0:t.call(f,{tab:b})]}))}},8425(e,t,r){"use strict";r.d(t,{A:()=>Summary});var n=r(483134),o=r(997252),i=r(338908),l=r(538896),c=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Summary(e){_object_destructuring_empty(e);var t=_extends({},e),r=(0,i.s)().n,u=(0,l.useDtfStore)();function orderTotal(){return Number(u.summary.orderTotal)}function bulkDiscount(){return Number(u.summary.bulkDiscount)}function orderSubtotal(){return Number(u.summary.orderSubtotal)}function uploadedCount(){return u.artworks.filter(function(e){return!e.uploadError}).length}function enhancements(){return Object.values(u.summary.enhancements||[])}function artworksReady(){return u.artworks.filter(function(e){return!e.uploadError}).every(function(e){return!e.isLoading&&e.enhancementCompleted})}function hasAnyPlacements(){return u.artworks.some(function(e){return(e.sizesAndQuantities||[]).length>0})}function showSkeleton(){return!!enableAbAiMonetization()&&(!!u.isPricingLoading||!artworksReady()&&hasAnyPlacements())}function enableAbAiMonetization(){return u.enableAbAiMonetization}function isBogoApplicable(){return u.isBogoApplicable}function getBogoAdjustedPrice(){return u.getBogoAdjustedPrice}function bogoInfo(){if(!isBogoApplicable())return{freeQty:0,discount:0};var e=0,t=0;return u.artworks.forEach(function(r){var n,o,i=String(null!=(n=r.id)?n:"");(null!=(o=r.sizesAndQuantities)?o:[]).forEach(function(r){var n="".concat(r.width,"x").concat(r.height),o=getBogoAdjustedPrice()(i,r.id,n);if(o&&o.freeQty>0){e+=o.freeQty;var l=Number(r.unitPrice||0)*r.quantity;t+=l-o.discountedTotalPrice}})}),{freeQty:e,discount:t}}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},t),{className:(0,o.cn)("summary scope-f43cfb41",t.className),children:[(0,n.jsx)("h3",{className:"summary__title scope-f43cfb41",children:"Summary"}),(0,n.jsx)("div",{className:"summary__wrapper scope-f43cfb41",children:showSkeleton()?(0,n.jsxs)("div",{className:"summary__skeleton scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__skeleton-block scope-f43cfb41"}),(0,n.jsx)("div",{className:"summary__skeleton-block scope-f43cfb41"}),(0,n.jsx)("div",{className:"summary__skeleton-block scope-f43cfb41"}),(0,n.jsx)("div",{className:"summary__skeleton-block scope-f43cfb41"}),(0,n.jsx)("div",{className:"summary__skeleton-block summary__skeleton-block--last scope-f43cfb41"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"summary__row scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__label scope-f43cfb41",children:"Designs uploaded:"}),(0,n.jsx)("div",{className:"summary__value scope-f43cfb41",children:uploadedCount()})]}),orderTotal()?(0,n.jsxs)("div",{className:"summary__row scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__label scope-f43cfb41",children:"Order total:"}),(0,n.jsx)("div",{className:"summary__value scope-f43cfb41",children:r(orderTotal(),"currency")})]}):null,(0,c.p)(enhancements(),function(e){return(0,n.jsx)("div",{className:"summary__row scope-f43cfb41",children:Number(e.totalPrice)>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"summary__label scope-f43cfb41",children:[e.quantity," ",e.serviceName,":"," "]}),(0,n.jsx)("div",{className:"summary__value scope-f43cfb41",children:r(e.totalPrice,"currency")})]}):null},e.serviceName)}),bulkDiscount()?(0,n.jsxs)("div",{className:"summary__row summary__row--bulk scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__label scope-f43cfb41",children:"Bulk discount:"}),(0,n.jsxs)("div",{className:"summary__value scope-f43cfb41",children:["-",r(bulkDiscount(),"currency")]})]}):null,bogoInfo().freeQty>0?(0,n.jsxs)("div",{className:"summary__row summary__row--bogo scope-f43cfb41",children:[(0,n.jsxs)("div",{className:"summary__label scope-f43cfb41",children:[bogoInfo().freeQty," ",1===bogoInfo().freeQty?"Transfer":"Transfers"," 50% OF
1F:"," "]}),(0,n.jsxs)("div",{className:"summary__value scope-f43cfb41",children:["-",r(bogoInfo().discount,"currency")]})]}):null,orderSubtotal()||bogoInfo().freeQty>0?(0,n.jsxs)("div",{className:"summary__row summary__row--subtotal scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__label scope-f43cfb41",children:"Subtotal"}),(0,n.jsx)("div",{className:"summary__value scope-f43cfb41",children:r(bogoInfo().freeQty>0?orderSubtotal()-bogoInfo().discount:orderSubtotal(),"currency")})]}):null,bogoInfo().discount>0?(0,n.jsxs)("div",{className:"summary__row summary__row--savings scope-f43cfb41",children:[(0,n.jsx)("div",{className:"summary__label scope-f43cfb41"}),(0,n.jsxs)("div",{className:"summary__value summary__savings scope-f43cfb41",children:[" ","You save ",r(bogoInfo().discount+bulkDiscount(),"currency"),"!"," "]})]}):null]})})]}))}},834497(e,t,r){"use strict";r.d(t,{A:()=>TrimInfo});var n=r(483134),o=r(171473),i=r(467265),l=r(723433),c=r(57473);r(277889);var u=r(52382),d=r.n(u),p=r(293534),f=r(997252),_=r(323506),h=r(127391),m=r(676606),g=r(538896),b=r(444636);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function TrimInfo(e){var t=e.toggleBackgroundError,r=void 0===t?null:t,u=e.removeBackground,y=void 0===u||u,v=(e.defaultRemoveBackground,e.canRemoveBg),w=void 0!==v&&v,j=e.id,k=(e.paddingSize,e.artwork),x=void 0===k?null:k,S=e.activeConfigSection,O=void 0===S?null:S,P=_object_without_properties(e,["toggleBackgroundError","removeBackground","defaultRemoveBackground","canRemoveBg","id","paddingSize","artwork","activeConfigSection"]),A=_sliced_to_array((0,p.useState)(!0),2),C=(A[0],A[1]),I=_sliced_to_array((0,p.useState)(!1),2),E=I[0],N=I[1],D=(0,p.useRef)(E),T=_sliced_to_array((0,p.useState)("keep"),2),M=T[0];T[1];var R=(0,g.useDtfStore)(),F=(0,m.R)(),L=(0,h.o3)();function sticker(){return R.sticker}function allowForceBgRemove(){return R.allowForceBgRemove}function productId(){return R.productId}function isStandardArtwork(){return R.isStandardArtwork}function enableAbAiMonetization(){return R.enableAbAiMonetization}function artworks(){return R.artworks}function businessLine(){return R.businessLine}function enableBackgroundRemovalToggle(){return!isStandardArtwork()||(null==x?void 0:x.enhancementCompleted)}function hasGangSheetErrorLocal(){return(0,b.zc)(x)}function updateArtworkStyle(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return R.updateArtworkStyle.apply(R,_to_consumable_array(t))}function sendUpdateArtworkStyle(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return R.sendUpdateArtworkStyle.apply(R,_to_consumable_array(t))}function updateArtworkValuesById(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return R.updateArtworkValuesById.apply(R,_to_consumable_array(t))}function setPendingPinningInvalidation(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return R.setPendingPinningInvalidation.apply(R,_to_consumable_array(t))}function generateStickerImage(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return F.generateStickerImage.apply(F,_to_consumable_array(t))}function resetSpangles(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return L.resetSpangles.apply(L,_to_consumable_array(t))}var B=(0,p.useRef)(null),z=(0,p.useRef)(sendUpdateArtworkStyle);function handleRemoveBackgroundChange(e){var t="boolean"!=typeof e,r=t?!y:e;if(null==x?void 0:x.pinningSessionId){(null==e?void 0:e.target)&&(e.target.checked=y),setPendingPinningInvalidation({type:"removeBackground",artworkId:x.id,value:r});return}setTimeout(function(){executeRemoveBackgroundChange(r,t)},0)}function executeRemoveBackgroundChange(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(e);var n=(0,o.E)(artworks(),j),l=artworks()[n];(!isStandardArtwork()||(null==l?void 0:l.enhancementCompleted))&&((0,i.Py)("remove_background_toggled",{artwork_id:x.id,product_id:productId(),previous_state:y,new_state:e,active_config_section:O,business_line:businessLine(),is_manually_toggled:r}),resetSpangles(),updateArtworkStyle({id:j,isBgRemoved:e}),sticker()&&generateStickerImage({artwork:x,removeBackground:e}),null==(t=B.current)||t.call(B,e))}function handleManualBgRemoval(e){N(e.target.checked),handleRemoveBackgroundChange(e),(0,i.Py)("manual_bg_removal_toggle",{artwork:x})}function handleAnnotateModeChange(){updateArtworkValuesById({id:j,annotateMode:M})}return(0,p.useEffect)(function(){D.current=E},[E]),(0,p.useEffect)(function(){z.current=sendUpdateArtworkStyle}),(0,p.useEffect)(function(){return B.current=d()(function(e){var t=(null==x?void 0:x.paddingSize)||"no_padding";z.current({id:j,isBgRemoved:e,padding_size:t,forceBgRemoval:D.current})},3e3),function(){var e;return null==(e=B.current)?void 0:e.cancel()}},[j,x]),(0,p.useEffect)(function(){handleAnnotateModeChange()},[M]),(0,p.useEffect)(function(){"jiffy-print-perfect"!==O||y||handleRemoveBackgroundChange(!0)},[O]),(0,p.useEffect)(function(){enableAbAiMonetization()&&"jiffy-print-perfect"===O&&!y&&handleRemoveBackgroundChange(!0)},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},P),{className:(0,f.cn)("trim-info scope-d9968961",P.className),children:[isStandardArtwork()?(0,n.jsx)(n.Fragment,{children:enableAbAiMonetization()&&w&&
1!hasGangSheetErrorLocal()?(0,n.jsx)(_.A,{className:(0,f.cn)("scope-d9968961",{"trim-info__remove-toggle--disabled":!enableBackgroundRemovalToggle()}),value:y,disabled:!enableBackgroundRemovalToggle(),onChange:handleRemoveBackgroundChange,"data-testid":"remove-background"}):w&&!hasGangSheetErrorLocal()?(0,n.jsxs)("button",{className:(0,f.cn)("trim-info__remove-toggle scope-d9968961",{"trim-info__remove-toggle--selected":y,"trim-info__remove-toggle--disabled":!enableBackgroundRemovalToggle()}),type:"button",onClick:handleRemoveBackgroundChange,"data-testid":"trim-info-remove-toggle",children:[(0,n.jsx)(l.A,{className:"trim-info__remove-toggle-icon scope-d9968961",icon:"check","data-testid":"trim-info-remove-toggle-icon"}),(0,n.jsx)("span",{className:"trim-info__remove-toggle-label scope-d9968961",children:"Remove Background"})]}):null}):isStandardArtwork()?allowForceBgRemove()?(0,n.jsx)(c.A,{className:"scope-d9968961",label:"Remove Background",style:"gray",disabled:!enableBackgroundRemovalToggle(),"data-testid":"check-box-1",children:(0,n.jsx)("input",{className:"scope-d9968961",type:"checkbox",checked:E,disabled:!enableBackgroundRemovalToggle(),onChange:handleManualBgRemoval,"data-testid":"trim-info-input-1"})}):null:(0,n.jsx)(n.Fragment,{children:w&&!hasGangSheetErrorLocal()?(0,n.jsx)(c.A,{className:"scope-d9968961",label:"Remove Backgroun
1d",style:"gray",disable:!enableBackgroundRemovalToggle(),"data-testid":"check-box",children:(0,n.jsx)("input",{className:"scope-d9968961",type:"checkbox",checked:y,disabled:!enableBackgroundRemovalToggle(),onChange:handleRemoveBackgroundChange,"data-testid":"trim-info-input"})}):null}),r?(0,n.jsxs)("div",{className:"trim-info__wrapper trim-info__wrapper--error scope-d9968961",children:[(0,n.jsx)(l.A,{className:"trim-info__icon scope-d9968961",icon:"warning","data-testid":"trim-info-icon"}),(0,n.jsx)("span",{className:"scope-d9968961",children:r})]}):null]}))}},580099(e,t,r){"use strict";r.d(t,{A:()=>UploadBox});var n=r(483134),o=r(997252),i=r(467265),l=r(375599),c=r(895461),u=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function UploadBox(e){var t=e.onUpload,r=_object_without_properties(e,["onUpload"]),d=u.useDtfStore.useValue,p=d("pdpType"),f=d("printAsIs"),_=d("dtfTypeDropText"),h=d("businessLine"),m=d("showMultiSize"),g=d("isStandardArtwork"),b=d("showGangSheetBuilderFeature"),y=d("userType"),v=d("productId"),w=d("showModal"),j=d("showArtworkHistoryModal"),k=d("setShowArtworkHistoryModal");function trackAddFileAreaClick(){(0,i.Py)("transfer_choose_file_clicked",{page:"pdp",pdp_type:p,business_line:h}),(0,l.A)("DesignStarted",{event_id:"DS-".concat(crypto.randomUUID()),product_id:v})}function handleUpload(){trackAddFileAreaClick(),null==t||t()}function onArtworkHistoryClick(){k(!j),(0,i.Py)("previous_purchase_link_clicked",{page:"pdp",pdp_type:p})}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("upload-box scope-e4c73329",null==r?void 0:r.className,m&&"upload-box--multi-size"),children:[(0,n.jsx)("div",{className:"upload-box__title scope-e4c73329",children:"More files to upload?"}),(0,n.jsxs)("div",{className:(0,o.cn)("upload-box__wrapper scope-e4c73329",g&&"upload-box__wrapper--standard-artwork"),onClick:handleUpload,"data-testid":"upload-box-wrapper",children:[(0,n.jsx)("span",{className:"upload-box__label-title hidden-xs scope-e4c73329",children:_}),f?(0,n.jsx)("span",{className:"upload-box__label-title visible-xs scope-e4c73329",children:_}):(0,n.jsxs)("span",{className:"upload-box__label-title visible-xs scope-e4c73329",children:[" ","Tap anywhere to choose your images"," "]}),(0,n.jsxs)("div",{className:"upload-box__action-buttons scope-e4c73329",children:[b?(0,n.jsx)(c.A,{className:"scope-e4c73329","data-testid":"gang-sheet-builder-container"}):null,(0,n.jsxs)("span",{className:(0,o.cn)("upload-box__action scope-e4c73329",g&&"upload-box__action--standard-artwork"),children:[" ","Choose files"," "]})]}),"signed_in"!==y||w?null:(0,n.jsxs)("a",{className:"upload-box__dropzone-button scope-e4c73329",href:"#",onClick:function(e){e.preventDefault(),e.stopPropagation(),onArtworkHistoryClick()},"data-testid":"upload-box-dropzone-button",children:[" ","My Design Library"," "]})]})]}))}},973042(e,t,r){"use strict";r.d(t,{A:()=>UploadFileInput});var n=r(483134),o=r(293534),i=r(538896),l=r(127391);function UploadFileInput(e){var t=e.multiple,r=e.accept,c=e.ref,u=i.useDtfStore.store,d=l.o3.store,p=(0,o.useRef)(null);function handleFileChange(e){d.resetSpangles(),u.resetPuff();var t=e.target.files,r=null;if(t&&t.length){if(t.length>10){u.showFilesError=!0;return}t.length<=1&&u.replaceArtwork?r=0:u.removeAllErrorArtworks();var n=e.target.getAttribute("data-upload-source");u.addFilesToQueue({files:Array.from(t),isDropEvent:!1,artworkIndex:r,uploadSource:n}),p.current&&(p.current.value=""),u.setReplaceArtwork(!1)}}return(0,o.useImperativeHandle)(c,function(){return{open:function(e){var t;u.setReplaceArtwork(!!(null==e?void 0:e.replaceArtwork)),null==(t=p.current)||t.click()}}}),(0,n.jsx)("input",{className:"product-details-dtf__file scope-
1d0072188 hidden",id:"product-details-dtf-file-input",ref:p,type:"file","data-testid":"product-details-dtf-file-input",accept:r,multiple:t,onChange:handleFileChange})}},322023(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}r.d(t,{F:()=>extractAddToCartErrorMessage});var extractAddToCartErrorMessage=function(e){if(e&&(void 0===e?"undefined":_type_of(e))==="object"){var t=e.error_message;if("string"==typeof t&&t)return t;var r=Object.entries(e).find(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];return"success"!==r&&"string"==typeof n&&n});return null==r?void 0:r[1]}}},955341(e,t,r){"use strict";r.d(t,{H:()=>shouldReportConsumedAddFailure});var n=r(868282),o=new Set(["AbortError","CanceledError"]),isAbortOrCancel=function(e){if(!e)return!1;if("string"==typeof e.name&&o.has(e.name)||"ERR_CANCELED"===e.code||"aborted"===e.networkSubType||"aborted"===(0,n.Fh)(e))return!0;var t=e.cause;return!!(t&&("string"==typeof t.name&&o.has(t.name)||"ERR_CANCELED"===t.code||"aborted"===(0,n.Fh)(t)))||!1},shouldReportConsumedAddFailure=function(e,t){if(t)return!0;var r=null==e?void 0:e.status;return!("number"==typeof r&&r>=400&&r<500||isAbortOrCancel(e))&&(!!(!r&&(0,n.JE)(e))||(0,n._n)(e))}},795207(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(483134),i=r(293534),l=r(433769),c=r(927997),u=r(997252),d=r(723433),p=r(538896),f=r(298210);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var _="bg-black text-white hover:bg-black",h="bg-transparent hover:bg-gray-100",m=(_define_property(n={},f.xj.GREEN,"green screen"),_define_property(n,f.xj.CHECKERED,"chessboard"),n);let __rspack_default_export=function(e){var t=e.modelValue,r=void 0===t?"checkered":t,n=(e.onLearnMore,e.forceShow),g=void 0!==n&&n,b=e.onUpdateModelValue,y=e.className,v=_object_without_properties(e,["modelValue","onLearnMore","forceShow","onUpdateModelValue","className"]),w=(0,p.useDtfStore)(),j=_sliced_to_array((0,i.useState)(!1),2),k=j[0],x=j[1];function transparencyGifUrl(){return(0,c.lt)("gen/pdp/jiffy-transparancy-anim.gif",{auto:"format"})}function isStandardDTFProduct(){return w.isStandardDTFProduct}function shouldShowToggle(){return g||"DTF001"===w.catalogNumber}function toggleTooltip(){x(!k)}function closeTooltip(){x(!1)}function handleBackgroundChange(e){(0,l.track)("image_preview_switcher_clicked",{page_type:"transfers_pdp",mode:m[e]||"chessboard",timestamp:Date.now()}),b(e)}return(0,o.jsx)(o.Fragment,{children:shouldShowToggle()?(0,o.jsxs)("div",_object_spread_props(_object_spread({},v),{className:(0,u.cn)("scope-76e50200 relative",y),children:[(0,o.jsxs)("div",{className:"scope-76e50200 top-[-18px] flex gap-px rounded-md border border-gray-300 bg-white p-0.5",children:[(0,o.jsx)("button",{className:(0,u.cn)("scope-76e50200 flex cursor-pointer items-center justify-center rounded border-0 p-1.5 transition-all duration-150 ease-in-out",r===f.xj.CHECKERED?_:h),type:"button",title:"Checkered background",onClick:function(){handleBackgroundChange(f.xj.CHECKERED)},"data-testid":"flex",children:(0,o.jsxs)("svg",{className:(0,u.cn)("scope-76e50200 h-4 w-4",r===f.xj.CHECKERED&&"text-white"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-testid":"h-4",children:[(0,o.jsx)("rect",{className:"scope-76e50200",width:"18",height:"18",x:"3",y:"3",rx:"2"}),(0,o.jsx)("path",{className:"scope-76e50200",d:"M3 9h18"}),(0,o.jsx)("path",{className:"scope-76e50200",d:"M3 15h18"}),(0,o.jsx)("path",{className:"scope-76e50200",d:"M9 3v18"}),(0,o.jsx)("path",{className:"scope-76e50200",d:"M15 3v18"})]})}),(0,o.jsx)("button",{className:(0,u.cn)("scope-76e50200 flex cursor-pointer items-center justify-center rounded border-0 p-1.5 transition-all duration-150 ease-in-out",r===f.xj.GREEN?_:h),type:"button",title:"Green screen background",onClick:function(){handleBackgroundChange(f.xj.GREEN)},"data-testid":"flex-1",children:(0,o.jsx)("svg",{className:(0,u.cn)("scope-76e50200 h-4 w-4",r===f.xj.GREEN&&"text-white"),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-testid":"h-4-1",children:(0,o.jsx)("rect",{className:"scope-76e50200",width:"18",height:"18",x:"3",y:"3",rx:"2"})})}),isStandardDTFProduct()?(0,o.jsx)("button",{className:(0,u.cn)("background-toggle__learn-more-icon scope-76e50200 flex cursor-pointer items-center justify-center rounded border-0 bg-transparent p-1.5 transition-all duration-150 ease-in-out hover:bg-gray-100",k&&"bg-gray-100"),type:"button",title:"Learn more about backgrounds",onClick:toggleTooltip,"data-testid":"background-toggle-learn-more-icon",children:(0,o.jsx)(d.A,{className:"scope-76e50200 h-4 w-4 text-gray-700",icon:"question-circle","data-testid":"h-4-2"})}):null]}),k?(0,o.jsx)("div",{className:"background-toggle__tooltip scope-76e50200",children:(0,o.jsxs)("div",{className:"background-toggle__tooltip-content scope-76e50200",children:[(0,o.jsx)("button",{className:"background-toggle__tooltip-close scope-76e50200",type:"button",onClick:closeTooltip,"data-testid":"background-toggle-tooltip-close",children:(0,o.jsx)(d.A,{className:"scope-76e50200 h-4 w-4",icon:"modal-close","data-testid":"h-4-3"})}),(0,o.jsx)("h3",{className:"background-toggle__tooltip-title scope-76e50200",children:"Transparency check"}),(0,o.jsxs)("p",{className:"background-toggle__tooltip-text scope-76e50200",children:[" ","Toggle backgrounds to check transparency and edges. The checkered pattern reveals any see-through areas, while solid green shows edge quality."," "]}),(0,o.jsx)("img",{className:"background-toggle__tooltip-image scope-76e50200",src:transparencyGifUrl(),alt:"Transparency check example"})]})}):null]})):null})}},851e3(e,t,r){"use strict";r.d(t,{A:()=>DtfTransferUserRetentionModal});var n=r(483134),o=r(293534),i=r(147141),l=r(723433),c=r(690690),u=r(433769),d=r(298210),p=r(958469);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function DtfTransferUserRetentionModal(e){var t=e.isOpen,r=void 0!==t&&t,f=e.isMultiArtworkModalOpen,_=void 0!==f&&f,h=e.isPinBasedRedrawEnabled,m=void 0!==h&&h,g=e.triggerPoint,b=e.onUpdateIsOpen,y=_object_without_properties(e,["isOpen","isMultiArtworkModalOpen","isPinBasedRedrawEnabled","triggerPoint","onUpdateIsOpen"]),v=(0,o.useRef)(null),w=(0,o.useRef)(r);function requestEditsButtonText(){return(0,i.tp)()?"Use Free Artist Edit":m?"Get Free Artist Edits":"Request Artist Edits for Free"}function beforeImageUrl(){return m?d.z_.PIN_BEFORE_IMAGE_URL:d.z_.LEGACY_BEFORE_IMAGE_URL}function afterImageUrl(){return m?d.z_.PIN_AFTER_IMAGE_URL:d.z_.LEGACY_AFTER_IMAGE_URL}function closeModalAndProcessAction(){b(!1),(0,u.track)("retention_modal_ignored",{reason:g,source:"DTF0001"}),g===d.P$.BACK_BUTTON&&window.history.go(-1)}
1function onShow(){var e=$(v.current);e.modal("show").on("hide.bs.modal",function(){w.current&&closeModalAndProcessAction()}).on("hidden.bs.modal",function(){e.off("hide.bs.modal hidden.bs.modal"),document.body.classList.remove("dtf-user-retention-modal-open")}),document.body.classList.add("dtf-user-retention-modal-open")}function onHide(){$(v.current).modal("hide"),document.body.classList.remove("dtf-user-retention-modal-open")}function handleRequestEditsButtonClick(e){e.preventDefault(),e.stopPropagation(),b(!1),(0,c.g5)(+!!_),(0,u.track)("retention_modal_recaptured",{reason:g,source:"DTF0001"})}function handleContinueButtonClick(){closeModalAndProcessAction()}return(0,o.useEffect)(function(){w.current=r},[r]),(0,o.useEffect)(function(){r?onShow():onHide()},[r]),(0,o.useEffect)(function(){g!==d.P$.NONE&&(0,u.track)("retention_modal_load",{reason:g,source:"DTF0001"})},[g]),(0,n.jsx)("div",_object_spread_props(_object_spread({},y),{className:"modal user-retention-modal scope-9aa3f230",id:"user-retention-modal",ref:v,role:"dialog","data-testid":"modal",children:(0,n.jsxs)("div",{className:"user-retention-modal__modal-box modal-dialog scope-9aa3f230",children:[(0,n.jsxs)("div",{className:"user-retention-modal__modal-header scope-9aa3f230",role:"heading",tabIndex:"0","data-testid":"user-retention-modal-modal-header",children:[(0,n.jsxs)("h3",{className:"user-retention-modal__modal-title scope-9aa3f230",children:[" ","Design not perfect? We can help!"," "]}),(0,n.jsx)("button",{className:"user-retention-modal__modal-button-close scope-9aa3f230",type:"button","data-testid":"close-user-retention-modal-button",onClick:closeModalAndProcessAction,children:(0,n.jsx)(l.A,{className:"scope-9aa3f230",icon:"modal-close-big","data-testid":"use-svg"})})]}),(0,n.jsxs)("div",{className:"user-retention-modal__modal-body scope-9aa3f230",children:[(0,n.jsxs)("div",{className:"user-retention-modal__info-container scope-9aa3f230",children:[(0,n.jsxs)("div",{className:"user-retention-modal__info-container-before scope-9aa3f230",children:[(0,n.jsxs)("h5",{className:"user-retention-modal__info-container-bold-text scope-9aa3f230",children:[" ","Original Upload"," "]}),(0,n.jsx)("img",{className:"user-retention-modal__image scope-9aa3f230",src:beforeImageUrl(),alt:"Before"}),(0,n.jsxs)("div",{className:"user-retention-modal__info-container-before-text scope-9aa3f230",children:[(0,n.jsx)("h5",{className:"user-retention-modal__info-container-bold-text scope-9aa3f230",children:m?"Sample message to artist:":"Sample message to designer:"}),m?(0,n.jsxs)("ol",{className:"user-retention-modal__info-container-description user-retention-modal__info-container-ordered-list scope-9aa3f230",children:[(0,n.jsxs)("li",{className:"scope-9aa3f230","data-testid":"user-retention-modal-sample-message-1",children:[" ",'Add the text "#1 Fan" in white color onto the blue flag.'," "]}),(0,n.jsxs)("li",{className:"scope-9aa3f230","data-testid":"user-retention-modal-sample-message-2",children:[" ","Change the color of the dog's t-shirt from blue to red."," "]})]}):(0,n.jsxs)("p",{className:"user-retention-modal__info-container-description scope-9aa3f230",children:[" ",'Please remove the pink background, change the ribbon color to blue, remove freckles. Change "It\'s a girl!" to Emma.'," "]})]})]}),(0,n.jsx)("div",{className:"user-retention-modal__info-container-arrow-button scope-9aa3f230",children:(0,n.jsx)(l.A,{className:"user-retention-modal__info-container-arrow-button-icon scope-9aa3f230",icon:"arrow-right-long","data-testid":"user-retention-modal-info-container-arrow-button-icon"})}),(0,n.jsxs)("div",{className:"user-retention-modal__info-container-after scope-9aa3f230",children:[(0,n.jsx)("h5",{className:"user-retention-modal__info-container-bold-text scope-9aa3f230",children:m?"Artist Edited":"Designer Perfected"}),(0,n.jsx)("img",{className:"user-retention-modal__image scope-9aa3f230",src:afterImageUrl(),alt:"After"}),m?null:(0,n.jsx)("div",{className:"user-retention-modal__info-container-changes-list scope-9aa3f230",children:(0,p.p)(d.Ox,function(e,t){return(0,n.jsxs)("div",{className:"user-retention-modal__info-container-changes-list-item scope-9aa3f230",children:[(0,n.jsx)("span",{className:"user-retention-modal__info-container-change-number scope-9aa3f230",children:t+1}),(0,n.jsx)("h5",{className:"user-retention-modal__info-container-bold-text scope-9aa3f230",children:e})]},e)})})]})]}),(0,n.jsxs)("div",{className:"user-retention-modal__action-btns-container scope-9aa3f230",children:[(0,n.jsx)("button",{className:"user-retention-modal__action-btn scope-9aa3f230",type:"button","data-testid":"request-artist-edits-for-free",onClick:function(e){handleRequestEditsButtonClick(e)},children:requestEditsButtonText()}),(0,n.jsxs)("button",{className:"user-retention-modal__action-btn user-retention-modal__action-btn--secondary scope-9aa3f230",type:"button","data-testid":"continue-button",onClick:handleContinueButtonClick,children:[" ","Continue"," "]})]})]})]})}))}},301767(e,t,r){"use strict";r.d(t,{A:()=>EnhancementTierLabel});var n=r(483134),o=r(723433),i=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function EnhancementTierLabel(e){var t=e.tier,r=_object_without_properties(e,["tier"]);function icon(){return"print_original"===t?"printer":"custom"===t?"stars-4":"full_enhancements"===t?"stars":"basic"===t?"star-4":""}function label(){return"print_original"===t?"Print As Is":"custom"===t?"Expert Edit":"full_enhancements"===t?"PrintPerfect":"basic"===t?"Basic":""}return(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("enhancement-tier-label scope-067b0cec",r.className),children:[(0,n.jsx)(o.A,{className:"enhancement-tier-label__icon scope-067b0cec",icon:icon(),"data-testid":"enhancement-tier-label-icon"})," ",label()]}))}},474276(e,t,r){"use strict";r.d(t,{A:()=>FreeTransfersBadge});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function FreeTransfersBadge(e){var t=e.message,r=_object_without_properties(e,["message"]);return(0,n.jsx)("div",_object_spread_props(_object_spread({},r),{className:(0,o.cn)("free-transfers-badge scope-946bcc06",r.className),"data-testid":"free-transfers-badge",children:void 0===t?"You have 12 Transfers at 50% OFF!":t}))}},594909(e,t,r){"use strict";r.d(t,{A:()=>HorizontalScroller});var n=r(483134),o=r(293534),i=r(723433),l=r(538896),c=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function HorizontalScroller(e){var t=e.children,r=_object_without_properties(e,["children"]),u=(0,l.useDtfStore)(),d=(0,o.useRef)(null),p=_sliced_to_array((0,o.useState)({canScrollLeft:!1,canScrollRight:!1}),2),f=p[0],_=p[1];function isStandardArtwork(){return u.isStandardArtwork}function canScrollLeft(){return f.canScrollLeft}function canScrollRight(){return f.canScrollRight}function checkScrollState(){if(d.current){var e=d.current,t=e.scrollLeft,r=e.scrollWidth;_({canScrollLeft:t-30>0,canScrollRight:t+e.clientWidth+30<r})}}function scroll(e){var t=d.current;if(t){var r=Array.from(t.children);if(0===r.length)return void t.scrollBy({left:("left"===e?-1:1)*t.clientWidth,behavior:"smooth"});var n=t.getBoundingClientRect();if("right"===e){var o=r.find(function(e){return e.getBoundingClientRect().right>n.right+5});if(!o)return;o.scrollIntoView({behavior:"smooth",inline:"start",block:"nearest"})}else{var i=_to_consumable_array(r).reverse().find(function(e){return e.getBoundingClientRect().left<n.left-5});if(!i)return;i.scrollIntoView({behavior:"smooth",inline:"end",block:"nearest"})}}}return(0,o.useEffect)(function(){return queueMicrotask(function(){checkScrollState()}),window.addEventListener("resize",checkScrollState),function(){window.removeEventListener("resize",checkScrollState)}},[]),(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,c.cn)("horizontal-scroller scope-fecf2a37",r.className),children:[canScrollLeft()?(0,n.jsx)("button",{className:"horizontal-scroller__scroll-arrow horizontal-scroller__scroll-arrow--left scope-fecf2a37",type:"button",onClick:function(){scroll("left")},"data-testid":"horizontal-scroller-scroll-arrow",children:(0,n.jsx)(i.A,{className:(0,
1c.cn)("horizontal-scroller__scroll-arrow-icon scope-fecf2a37",{"horizontal-scroller__scroll-arrow-icon--standard-artwork":isStandardArtwork()}),icon:"arrow-left","data-testid":"horizontal-scroller-scroll-arrow-icon"})}):null,(0,n.jsx)("div",{className:"horizontal-scroller__scroller scope-fecf2a37",ref:d,onScroll:checkScrollState,"data-testid":"horizontal-scroller-scroller",children:t}),canScrollRight()?(0,n.jsx)("button",{className:"horizontal-scroller__scroll-arrow horizontal-scroller__scroll-arrow--right scope-fecf2a37",type:"button",onClick:function(){scroll("right")},"data-testid":"horizontal-scroller-scroll-arrow-1",children:(0,n.jsx)(i.A,{className:(0,c.cn)("horizontal-scroller__scroll-arrow-icon scope-fecf2a37",{"horizontal-scroller__scroll-arrow-icon--standard-artwork":isStandardArtwork()}),icon:"arrow-right","data-testid":"horizontal-scroller-scroll-arrow-icon-1"})}):null]}))}},785147(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(997252),l=r(147141),c=r(700118),u=r(723433),d=r(538896),p=r(864832);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t,r,f,_,h=e.ref,m=e.beforeImage,g=void 0===m?"":m,b=e.afterImage,y=void 0===b?"":b,v=e.alt,w=void 0===v?"Preview Image":v,j=e.beforeText,k=void 0===j?void 0:j,x=e.afterText,S=void 0===x?void 0:x,O=e.isInline,P=void 0!==O&&O,A=e.isFullWidth,C=void 0!==A&&A,I=e.isArtwork,E=void 0!==I&&I,N=e.showMagnifier,D=void 0!==N&&N,T=e.magnifierPosition,M=void 0===T?"left":T,R=e.sliderPosition,F=void 0===R?50:R,L=e.imageBackground,B=void 0===L?"transparent":L,z=e.enhancementProcessing,U=void 0!==z&&z,H=e.enhancingAspectRatio,q=e.selectedLabel,V=void 0===q?null:q,G=(e.enhancementTier,e.isModal),K=e.onCanvasLoaded,W=e.onLoad,Q=e.slots,J=_object_without_properties(e,["ref","beforeImage","afterImage","alt","beforeText","afterText","isInline","isFullWidth","isArtwork","showMagnifier","magnifierPosition","sliderPosition","imageBackground","enhancementProcessing","enhancingAspectRatio","selectedLabel","enhancementTier","isModal","onCanvasLoaded","onLoad","slots"]),Z=_sliced_to_array((0,o.useState)({xPerc:50,yPerc:50}),2),Y=Z[0],X=Z[1],ee=_sliced_to_array((0,o.useState)(!1),2),et=ee[0],er=ee[1],en=_sliced_to_array((0,o.useState)(!1),2),eo=en[0],ea=en[1],ei=(0,o.useRef)(null),es=_sliced_to_array((0,o.useState)("unset"),2),el=es[0],ec=es[1],eu=_sliced_to_array((0,o.useState)("unset"),2),ed=eu[0],ep=eu[1],ef=_sliced_to_array((0,o.useState)(!0),2),e_=ef[0],eh=ef[1],em=_sliced_to_array((0,o.useState)(!1),2),eg=em[0],eb=em[1],ey=_sliced_to_array((0,o.useState)(0),2),ev=ey[0],ew=ey[1],ej=_sliced_to_array((0,o.useState)(0),2),ek=ej[0],ex=ej[1],eS=_sliced_to_array((0,o.useState)(0),2),eO=eS[0],eP=eS[1],eA=_sliced_to_array((0,o.useState)(0),2),eC=eA[0],eI=eA[1],eE=(0,d.useDtfStore)(),eN=(0,o.useRef)(null),eD=(0,o.useRef)(null);function isSticker(){return eE.isSticker}function isStickerSample(){return eE.isStickerSample}function isStandardArtwork(){return eE.isStandardArtwork}function isProColor(){return!!eE.isProColor}function backgroundType(){return eE.backgroundType}function positionPercentageX(){return"".concat(Y.xPerc,"%")}function positionPercentageY(){return"".concat(Y.yPerc,"%")}function beforeImageCSS(){return"url(".concat(g,")")}function afterImageCSS(){return"url(".concat(y,")")}function sliderVerticalPosition(){return"90%"}function imageMaxHeightComputed(){return E?"unset":"80vh"}function isTappable(){return(0,l.CN)()||(0,l.Fr)()}function isTransparent(){return"transparent"===B}function computedImageBackground(){return backgroundType()===c.w6.GREEN?c.lm.GREEN_BACKGROUND:B}function transparentBackgroundClasses(){return(0,i.cn)(isTransparent()&&isCheckeredBackground()&&"image-compare__transparent-background",isStandardArtwork()&&isCheckeredBackground()&&"image-compare__transparent-background--standard-artwork")}function isImageSame(){return!U&&g===y}function hideSlider(){return isSticker()||isStickerSample()||e_||isImageSame()||!eg||U}function showFullWidthArtwork(){return!!C||!E&&hideSlider()&&isTappable()}function isCheckeredBackground(){return backgroundType()===c.w6.CHECKERED}function setPreviewCanvasSize(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return eE.setPreviewCanvasSize.apply(eE,_to_consumable_array(t))}function onBeforeImageLoad(e){var t=e.target;ew(t.naturalWidth),ex(t.naturalHeight),eh(!t.complete),t.complete&&(ec(t.naturalWidth),!E&&t.naturalHeight<1e3&&ep("80vh"))}function onAfterImageLoad(e){var t=e.target;requestAnimationFrame(function(){requestAnimationFrame(function(){return initializeImage(t)})}),null==W||W(e)}function initializeImage(e){if(U||(eP(e.naturalHeight),eI(e.naturalWidth)),eN.current){var t=eN.current.getBoundingClientRect();setPreviewCanvasSize({width:t.width,height:t.height}),eb(!0),K&&K()}}function constrain(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;return Math.min(Math.max(e,t),r)}function dismissLoupeHint(){ea(!1),null!==ei.current&&(window.clearTimeout(ei.current),ei.current=null),(0,p.fL)()}function mouseOver(){er(!0),eo&&dismissLoupeHint()}function mouseOut(){er(!1)}function getCoordinates(e){if("touchmove"===e.type){var t,r,n=null!=(t=e.originalEvent)?t:e,o=n.touches,i=n.changedTouches,l=null!=(r=o[0])?r:i[0];return{clientX:l.clientX,clientY:l.clientY}}return{clientX:e.clientX,clientY:e.clientY}}function mouseMove(e){e_||requestAnimationFrame(function(){var t=getCoordinates(e),r=t.clientX,n=t.clientY,o=e.target.getBoundingClientRect(),i=o.left,l=o.width,c=o.top,u=o.height;X({xPerc:constrain((r-i)/l*100),yPerc:(n-c)/u*100})})}return(0,o.useImperativeHandle)(h,function(){return{get nodeType(){var e;return null==(e=eN.current)?void 0:e.nodeType},get imageIntrinsicWidth(){return eC},get imageIntrinsicHeight(){return eO},get originalWidth(){return ev},get originalHeight(){return ek},get $refs(){return{imageElement:eD.current}},get $el(){return eN.current}}},[eC,eO,ev,ek]),(0,o.useEffect)(function(){X(function(e){return _object_spread_props(_object_spread({},e),{xPerc:F})})}
1,[F]),(0,o.useEffect)(function(){if(D&&(0,p.tp)())return(0,p.fL)(),ea(!0),ei.current=window.setTimeout(function(){ei.current=null,ea(!1)},3e3),function(){null!==ei.current&&(window.clearTimeout(ei.current),ei.current=null)}},[D]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,i.cn)("image-compare__loupe-microcopy-wrapper scope-302dbf5a"),children:D?(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__loupe-microcopy scope-302dbf5a"),"data-testid":"image-compare-loupe-microcopy",children:["Zoom to check print quality",(0,n.jsxs)("span",{className:"sr-only","data-testid":"image-compare-loupe-microcopy-sr",children:[" ","This preview supports hover-to-zoom for inspecting edge quality on desktop. Use the Full Screen button on mobile."]})]}):null}),(0,n.jsxs)("div",{className:(0,i.cn)("image-compare scope-302dbf5a",{"image-compare--magnifier":D,"image-compare--enhancing":U}),ref:eN,style:{"--302dbf5a-imageMaxHeight":imageMaxHeightComputed(),"--302dbf5a-enhancingAspectRatio":void 0===H?"1 / 1":H,"--302dbf5a-imageMaxWidth":el,"--302dbf5a-imageHeight":ed,"--302dbf5a-positionPercentageX":positionPercentageX(),"--302dbf5a-computedImageBackground":computedImageBackground(),"--302dbf5a-sliderVerticalPosition":sliderVerticalPosition(),"--302dbf5a-positionPercentageY":positionPercentageY(),"--302dbf5a-beforeImageCSS":beforeImageCSS(),"--302dbf5a-afterImageCSS":afterImageCSS()},onMouseOver:mouseOver,onMouseMove:mouseMove,onTouchMove:mouseMove,onMouseOut:mouseOut,"data-testid":"image-compare",children:[D&&eo?(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__loupe-hint scope-302dbf5a"),"aria-hidden":"true","data-testid":"image-compare-loupe-hint",children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDD0D"})," Hover to inspect edge quality"]}):null,(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__image-container scope-302dbf5a"),children:[(k||(null==Q?void 0:Q.beforeText))&&!P?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__label image-compare__label--before scope-302dbf5a",{"image-compare__label--floating":!P,"image-compare__label--selected":"before"===V}),children:null!=(t=null==Q||null==(f=Q.beforeText)?void 0:f.call(Q))?t:(0,n.jsx)(n.Fragment,{children:k})}):null,(S||(null==Q?void 0:Q.afterText))&&!P?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__label image-compare__label--after scope-302dbf5a",{"image-compare__label--floating":!P,hidden:hideSlider(),"image-compare__label--selected":"after"===V}),children:null!=(r=null==Q||null==(_=Q.afterText)?void 0:_.call(Q))?r:(0,n.jsx)(n.Fragment,{children:S})}):null,(0,n.jsx)("div",{className:(0,i.cn)("image-compare__image-before scope-302dbf5a",_object_spread({hidden:hideSlider()},transparentBackgroundClasses())),children:(0,n.jsx)("img",{className:(0,i.cn)("image-compare__slider-image image-compare__slider-image--before scope-302dbf5a"),src:g,alt:"".concat(w," (before)"),onLoad:onBeforeImageLoad})}),(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__image-after scope-302dbf5a",transparentBackgroundClasses()),children:[(0,n.jsx)("img",_object_spread_props(_object_spread({className:(0,i.cn)("image-compare__slider-image image-compare__slider-image--after scope-302dbf5a",{"image-compare__slider-image--inline":P,"image-compare__slider-image--placeholder":E&&!eg,"image-compare__slider-image--placeholder-modal":E&&!eg&&void 0!==G&&G,"image-compare__slider-image--artwork":E,"image-compare__slider-image--full-width":showFullWidthArtwork()}),ref:eD,src:y,alt:"".concat(w," (after)")},J),{onLoad:onAfterImageLoad})),(isStandardArtwork()||isProColor())&&U?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__enhancement-processing scope-302dbf5a")}):null]})]}),(0,n.jsx)("input",{className:(0,i.cn)("image-compare__slider scope-302dbf5a",{"image-compare__slider--disabled":hideSlider()}),value:Y.xPerc,onChange:function(e){X(function(t){return _object_spread_props(_object_spread({},t),{xPerc:e.target.value})})},type:"range",min:"0",max:"100","aria-label":"Percentage of before photo shown","data-testid":"image-compare-slider"}),(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__slider-lines scope-302dbf5a",{hidden:hideSlider()}),children:[(0,n.jsx)("div",{className:(0,i.cn)("image-compare__slider-line image-compare__slider-line--top scope-302dbf5a"),"aria-hidden":"true","data-testid":"image-compare-slider-line"}),(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__slider-button scope-302dbf5a"),"aria-hidden":"true","data-testid":"image-compare-slider-button",children:[(0,n.jsx)(u.A,{className:(0,i.cn)("image-compare__slider-button-icon scope-302dbf5a"),icon:"arrow-left","data-testid":"image-compare-slider-button-icon"}),(0,n.jsx)(u.A,{className:(0,i.cn)("image-compare__slider-button-icon scope-302dbf5a"),icon:"arrow-right","data-testid":"image-compare-slider-button-icon-1"})]}),(0,n.jsx)("div",{className:(0,i.cn)("image-compare__slider-line image-compare__slider-line--bottom scope-302dbf5a"),"aria-hidden":"true","data-testid":"image-compare-slider-line-1"})]})]}),D&&P?(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__label-container scope-302dbf5a",{hidden:hideSlider()}),children:[k?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__label image-compare__label--before scope-302dbf5a"),children:k}):null,S?(0,n.jsx)("div",{className:(0,i.cn)("image-compare__label image-compare__label--after scope-302dbf5a"),children:S}):null]}):null,D&&(et||P)?(0,n.jsxs)("div",{className:(0,i.cn)("image-compare__magnifier-container scope-302dbf5a",{"image-compare__magnifier-container--inline":P,"image-compare__magnifier-container--right":"right"===M,"image-compare__magnifier-container--left":"left"===M,"image-compare__magnifier-container--trans
1parent":isTransparent()&&isCheckeredBackground(),hidden:hideSlider()}),children:[(0,n.jsx)("div",{className:(0,i.cn)("image-compare__magnifier-item image-compare__magnifier-item--before scope-302dbf5a")}),(0,n.jsx)("div",{className:(0,i.cn)("image-compare__magnifier-item image-compare__magnifier-item--after scope-302dbf5a")})]}):null]})}},833540(e,t,r){"use strict";r.d(t,{A:()=>ImageCompareLoadingContent});var n=r(483134),o=r(293534),i=r(723433),l=r(713803),c=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ImageCompareLoadingContent(e){var t=e.enhancementTier,r=e.isProColor,u=_object_without_properties(e,["enhancementTier","isProColor"]),d=_sliced_to_array((0,o.useState)(0),2),p=d[0],f=d[1],_=(0,o.useRef)(null);function contents(){return"full_enhancements"===t?{caption:r?"Perfecting your design with ProColor":"Perfecting your design with PrintPerfect",highlights:["Enhancing resolution","Boosting vibrancy","Refining edges","Cropping unwanted areas","Removing background perfectly"]}:{caption:"Processing...",highlights:[]}}(0,o.useEffect)(function(){f(0)},[t]),(0,o.useEffect)(function(){if(0!==contents().highlights.length)return _.current=setInterval(function(){f(function(e){return(e+1)%contents().highlights.length})},3e3),function(){_.current&&clearInterval(_.current)}},[]);var h=contents(),m=h.highlights.length>0,g=u.className,b=_object_without_properties(u,["className"]),y=(0,c.cn)("scope-7e963798 flex w-full flex-col gap-1.5 px-2 text-left",g);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},b),{className:y,role:"status","aria-live":"polite","aria-label":h.caption,children:[(0,n.jsx)("div",{className:"scope-7e963798 h-1.5 w-full overflow-hidden rounded-full bg-pink-100",children:(0,n.jsx)("div",{className:"scope-7e963798 progress-bar-fill h-full w-1/4 rounded-full bg-pink-500"})}),(0,n.jsxs)("div",{className:"scope-7e963798 flex flex-col gap-1 text-gray-700",children:[(0,n.jsxs)("div",{className:"scope-7e963798 flex items-center gap-2 text-[17px] font-bold leading-[19px]",children:[(0,n.jsx)(i.A,{className:"scope-7e963798 size-[18px] shrink-0 text-pink-500",icon:"stars-corners","data-testid":"sparkle-icon","aria-hidden":"true"}),(0,n.jsx)("span",{className:"scope-7e963798",children:h.caption})]}),m?(0,n.jsx)(l.e,{className:"scope-7e963798",name:"fade",mode:"out-in","data-testid":"transition",children:(0,n.jsx)("span",{className:"scope-7e963798 pl-[26px] text-sm leading-tight",children:h.highlights[p]},p)}):null]})]}))}},960783(e,t,r){"use strict";r.d(t,{A:()=>MissingStepPrompt});var n=r(483134);function MissingStepPrompt(e){var t,r=e.step,o=e.onJump;if(!r)return null;var i=null!=(t=r.prompt)?t:"Complete ".concat(r.label);function handleClick(){o(r.anchor)}return(0,n.jsxs)("div",{className:"missing-step-prompt","data-testid":"missing-step-prompt",role:"status","aria-label":i,children:[(0,n.jsx)("span",{className:"missing-step-prompt__icon","aria-hidden":"true",children:"!"}),(0,n.jsx)("button",{type:"button",className:"missing-step-prompt__target","data-testid":"missing-step-prompt-button","aria-label":"Jump to ".concat(r.label),onClick:handleClick,children:i})]})}},609743(e,t,r){"use strict";r.d(t,{A:()=>MobileImageModal});var n=r(483134),o=r(700118),i=r(538896),l=r(997252),c=r(239075);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function MobileImageModal(e){var t=e.src,r=e.alt,u=e.wrapperClass,d=e.imageBackground,p=void 0===d?"transparent":d,f=e.onClose,_=_object_without_properties(e,["src","alt","wrapperClass","imageBackground","onClose"]),h=(0,i.useDtfStore)();function backgroundType(){return h.backgroundType}function computedImageBackground(){return backgroundType()===o.w6.GREEN?o.lm.GREEN_BACKGROUND:p}function backgroundClasses(){return(0,l.cn)("transparent"===p&&backgroundType()===o.w6.CHECKERED&&"transparent-bg",backgroundType()===o.w6.GREEN&&"green-bg")}function handleClose(e){null==e||e.stopPropagation(),null==f||f()}return(0,n.jsx)("div",_object_spread_props(_object_spread({},_),{className:"scope-63df75ae fixed inset-0 z-[9999] flex items-center justify-center bg-black/70 p-5",style:{"--63df75ae-computedImageBackground":computedImageBackground()},onClick:handleClose,"data-testid":"fixed",children:(0,n.jsxs)("div",{className:(0,l.cn)("scope-63df75ae relative flex max-h-[80vh] max-w-[90vw] touch-none items-center justify-center",backgroundClasses()),style:{backgroundColor:computedImageBackground()},children:[(0,n.jsx)("div",{className:"scope-63df75ae absolute right-3 top-3 z-[10000]",children:(0,n.jsx)("button",{className:"scope-63df75ae pointer-events-auto relative z-[10001] flex h-9 w-9 items-center justify-center rounded-full border-none bg-gray-800/40 text-white transition-all hover:bg-gray-800/60",type:"button",onClick:handleClose,"data-testid":"pointer-events-auto",children:(0,n.jsx)("svg",{className:"scope-63df75ae h-4 w-4 text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","data-testid":"h-4",children:(0,n.jsx)("path",{className:"scope-63df75ae",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})}),(0,n.jsx)("div",{className:(0,l.cn)("scope-63df75ae","flex h-full w-full items-center justify-center overflow-hidden rounded-lg",u,backgroundClasses()),style:{backgroundColor:computedImageBackground()},children:(0,n.jsx)(c.A,{className:"scope-63df75ae","data-testid":"mobile-image-modal-zoom-image",src:t,alt:void 0===r?"Preview Image":r})})]})}))}},109111(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(958469);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.options,r=void 0===t?[]:t,u=e.placeholder,d=void 0===u?"Select an option":u,p=e.value,f=void 0===p?null:p,_=e.disabled,h=void 0!==_&&_,m=e.onChange,g=void 0===m?function(){}:m,b=_object_without_properties(e,["options","placeholder","value","disabled","onChange"]),y=_sliced_to_array((0,o.useState)(!1),2),v=y[0],w=y[1];function displayValue(){return f?f.label:d}function labelPrefix(){return null==f?void 0:f.prefix}function disableOpen(){return h||0===r.length}function isCurrentValue(e){return e.value===(null==f?void 0:f.value)}function toggle(){disableOpen()||w(!v)}function select(e){g(e.value),toggle()}function handleFocusOut(e){e.currentTarget.contains(e.relatedTarget)||w(!1)}return(0,n.jsx)("div",_object_spread_props(_object_spread({},b),{className:"select scope-de2e26f7",tabIndex:0,onBlur:handleFocusOut,onKeyDown:function(e){("Enter"===e.key||" "===e.key)&&(e.preventDefault(),toggle())},"data-testid":"select",children:(0,n.jsxs)("div",{className:(0,i.cn)("select__selector scope-de2e26f7",h&&"select__selector--disabled"),onClick:function(){return toggle()},"data-testid":"select-selector",children:[labelPrefix()?(0,n.jsx)("img",{className:"select__prefix scope-de2e26f7",src:labelPrefix(),alt:"","data-testid":"select-prefix"}):null,(0,n.jsx)("div",{className:(0,i.cn)("select__text scope-de2e26f7",!f&&"select__text--placeholder"),"data-testid":"select-text",children:displayValue()}),(0,n.jsx)(l.A,{className:(0,i.cn)("select__arrow scope-de2e26f7",v&&"select__arrow--expanded"),icon:"arrow-right","data-testid":"select-arrow"}),(0,n.jsx)("div",{className:(0,i.cn)("select__menu scope-de2e26f7",!v&&"hidden"),"data-testid":"select-menu",children:(0,n.jsx)("ul",{className:"select__list scope-de2e26f7",role:"listbox","data-testid":"select-list",children:(0,c.p)(r,function(e){return(0,n.jsxs)("li",{className:(0,i.cn)("select__list-item scope-de2e26f7",isCurrentValue(e)&&"select__list-item--current"),role:"option","aria-selected":isCurrentValue(e),tabIndex:0,onClick:function(t){t.stopPropagation(),select(e)},onKeyDown:function(t){("Enter"===t.key||" "===t.key)&&(t.preventDefault(),t.stopPropagation(),select(e))},"data-testid":"select-list-item",children:[e.prefix?(0,n.jsx)("img",{className:"select__prefix scope-de2e26f7",src:e.prefix,alt:"","data-testid":"select-prefix-1"}):null,e.label]},e.value)})})})]})}))}},24849(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(147141),l=r(700118),c=r(367134),u=r(538896),d=r(298210),p=r(997252);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.ref,r=e.src,f=e.alt,_=e.wrapperClass,h=e.isModal,m=void 0!==h&&h,g=e.position,b=void 0===g?"left":g,y=e.isArtwork,v=void 0!==y&&y,w=e.isFullWidth,j=e.isInline,k=e.imageBackground,x=void 0===k?"transparent":k,S=e.overrideBackgroundType,O=void 0===S?void 0:S,P=e.forceLoaded,A=void 0!==P&&P,C=e.intrinsicWidth,I=void 0===C?void 0:C,E=e.intrinsicHeight,N=void 0===E?void 0:E,D=e.onLoad,T=e.onError,M=e.onCanvasLoaded,R=_object_without_properties(e,["ref","src","alt","wrapperClass","isModal","position","isArtwork","isFullWidth","isInline","imageBackground","overrideBackgroundType","forceLoaded","intrinsicWidth","intrinsicHeight","onLoad","onError","onCanvasLoaded"]),F=_sliced_to_array((0,o.useState)("unset"),2),L=(F[0],F[1]),B=_sliced_to_array((0,o.useState)(null),2),z=B[0],U=B[1],H=_sliced_to_array((0,o.useState)(0),2),q=H[0],V=H[1],G=_sliced_to_array((0,o.useState)(0),2),K=G[0],W=G[1],Q=(0,u.useDtfStore)(),J=(0,o.useRef)(null),Z=(0,o.useRef)(null);function isSticker(){return Q.isSticker}function isStickerSample(){return Q.isStickerSample}function isUVDTFSticker(){return"UVDTF01"===Q.catalogNumber}function isStandardArtwork(){return Q.isStandardArtwork}function backgroundType(){return Q.backgroundType}function effectiveBackgroundType(){return void 0!==O?O:backgroundType()}function isTappable(){return(0,i.CN)()||(0,i.Fr)()}function isTransparent(){return"transparent"===x}function computedImageBackground(){return effectiveBackgroundType()===l.w6.GREEN?l.lm.GREEN_BACKGROUND:x}function transparentBackgroundClasses(){return(0,p.cn)(isTransparent
1()&&effectiveBackgroundType()===l.w6.CHECKERED&&"single-image-zoom__image-wrapper--transparent-background",isStandardArtwork()&&effectiveBackgroundType()===l.w6.CHECKERED&&"single-image-zoom__image-wrapper--standard-artwork",(isSticker()||isStickerSample()||isUVDTFSticker())&&"single-image-zoom__image-wrapper--sticker",(q>0||A)&&"single-image-zoom__image-wrapper--loaded")}function imageMaxHeight(){return isSticker()||isStickerSample()?d.R9.STICKER_MAX_HEIGHT:v?"unset":d.R9.DEFAULT_IMAGE_HEIGHT}function constants(){return d.R9}function setPreviewCanvasSize(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return Q.setPreviewCanvasSize.apply(Q,_to_consumable_array(t))}function initializeImage(e){if(e&&(V(e.naturalHeight),W(e.naturalWidth)),J.current){var t=J.current.getBoundingClientRect();if(setPreviewCanvasSize({width:t.width,height:t.height}),!isTappable()&&!z){var r=new c.A(_,{isModal:m,position:b,useFixedPositioning:!0});r.initializeMagnifier(),U(r)}M&&M()}}function handleImageLoad(e){var t=e.target;!v&&t&&t.naturalHeight<d.R9.NATURAL_HEIGHT_THRESHOLD&&L(d.R9.DEFAULT_IMAGE_HEIGHT),requestAnimationFrame(function(){requestAnimationFrame(function(){initializeImage(t)})}),D&&D(e)}(0,o.useImperativeHandle)(t,function(){return{get nodeType(){var e;return null==(e=J.current)?void 0:e.nodeType},get imageIntrinsicWidth(){return K},get imageIntrinsicHeight(){return q},get originalWidth(){return K},get originalHeight(){return q},get $refs(){return{imageElement:Z.current}},get $el(){return J.current}}},[K,q]),(0,o.useEffect)(function(){return function(){z&&U(null)}},[z]);var Y=transparentBackgroundClasses();return(0,n.jsxs)("div",_object_spread_props(_object_spread({},R),{className:(0,p.cn)("scope-83924df3","single-image-zoom","image-magnifier",_,R.className),ref:J,style:_object_spread({"--83924df3-computedImageBackground":computedImageBackground(),"--83924df3-imageMaxHeight":imageMaxHeight(),"--83924df3-constants-INLINE_MAX_HEIGHT":constants().INLINE_MAX_HEIGHT},R.style),children:[(0,n.jsx)("div",{className:(0,p.cn)("single-image-zoom__image-container scope-83924df3",(isSticker()||isStickerSample()||isUVDTFSticker())&&"single-image-zoom__image-container--sticker",(q>0||A)&&"single-image-zoom__image-container--loaded"),children:(0,n.jsx)("div",{className:(0,p.cn)("single-image-zoom__image-wrapper scope-83924df3",Y),children:(0,n.jsx)("img",_object_spread_props(_object_spread({className:(0,p.cn)("single-image-zoom__image js-magnify-image scope-83924df3",{"single-image-zoom__image--inline":void 0!==j&&j,"single-image-zoom__image--artwork":v,"single-image-zoom__image--full-width":void 0!==w&&w},R.className),ref:Z,src:r,alt:void 0===f?"Preview Image":f},I&&N?{width:I,height:N}:{}),{onLoad:handleImageLoad,onError:T}))})}),(0,n.jsx)("div",{className:"image-magnifier__preview js-magnify-preview scope-83924df3","data-background-color":computedImageBackground()}),(0,n.jsx)("div",{className:"image-magnifier__lens js-magnify-lens scope-83924df3"})]}))}},695603(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(723433),l=r(5786),c=r(958469),u=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}let __rspack_default_export=function(e){var t=e.hideCloseButton,r=e.onClose,d=_object_without_properties(e,["hideCloseButton","onClose"]),p=(0,o.useRef)(null),f=[{id:"youth",name:"Youth Sizes"},{id:"adult",name:"Adult Sizes"},{id:"adult-jersey",name:"Adult Jersey Sizes"}];function closeModal(){var e;null==(e=p.current)||e.close()}function handleModalClose(){null==r||r()}return(0,n.jsx)(l.A,_object_spread_props(_object_spread({},d),{ref:p,compact:!0,hideCloseButton:!0,bottomAligned:!0,onClose:handleModalClose,"data-testid":"common-modal",children:(0,n.jsxs)("div",{className:"size-chart-modal",children:[(0,n.jsxs)("div",{className:"size-chart-modal__header-container",children:[(0,n.jsx)("div",{className:"size-chart-modal__header",children:"Numbers Size Guide"}),void 0!==t&&t?null:(0,n.jsx)("button",{className:"size-chart-modal__modal-button-close",type:"button",onClick:closeModal,"data-testid":"size-chart-modal-modal-button-close",children:(0,n.jsx)(i.A,{className:"size-chart-modal__modal-button-close-icon",icon:"menu-close","data-testid":"size-chart-modal-modal-button-close-icon"})})]}),(0,n.jsxs)("div",{className:"size-chart-modal__content",children:[(0,n.jsxs)("div",{className:(0,u.cn)("size-chart-modal__size-container","size-chart-modal__size-container--label"),children:[(0,n.jsx)("h2",{className:"size-chart-modal__size"}),(0,c.p)(f,function(e){return(0,n.jsx)("div",{className:(0,u.cn)("size-chart-modal__product","size-chart-modal__product--".concat(e.id)),children:(0,n.jsx)("div",{className:"size-chart-modal__product-name",s:!0,children:e.name})},e)})]}),(0,c.p)([{size:'10"',recommended:"adult-jersey"},{size:'8"',recommended:"adult"},{size:'6"',recommended:"youth"},{size:'4"',recommended:null}],function(e,t){return(0,n.jsxs)("div",{className:(0,u.cn)("size-chart-modal__size-container","size-chart-modal__size-container--".concat(e.size.slice(0,-1))),children:[(0,n.jsx)("h2",{className:"size-chart-modal__size size-chart-modal__size--pill",children:e.size}),(0,c.p)(f,function(r){return(0,n.jsxs)("div",{className:(0,u.cn)("size-chart-modal__product","size-chart-modal__product--".concat(r.id)),children:[(0,n.jsx)("div",{className:(0,u.cn)("size-chart-modal__product-name",{hidden:t>0,"size-chart-modal__product-name--inline":0===t}),children:r.name}),(0,n.jsx)("div",{className:(0,u.cn)("size-chart-modal__image","size-chart-modal__image--".concat(e.size.slice(0,-1)))}),e.recommended===r.id?(0,n.jsx)("div",{className:"size-chart-modal__image-tag",children:" RECOMMENDED "}):null]},r)})]},e.size)})]})]})}))}},556726(e,t,r){"use strict";r.d(t,{A:()=>StepNumber});var n=r(483134),o=r(997252);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StepNumber(e){var t=e.content,r=e.stepNumber,i=e.showTopBorder,l=e.compact,c=e.completed,u=void 0!==c&&c,d=e.total,p=e.children,f=_object_without_properties(e,["content","stepNumber","showTopBorder","compact","completed","total","children"]),_="number"==typeof d&&d>0;return(0,n.jsxs)("div",_object_spread_props(_object_spread({},f),{className:(0,o.cn)("step-number scope-81d5256b",{"step-number--with-line":void 0!==i&&i,"step-number--compact":void 0!==l&&l,"step-number--completed":u},f.className),children:[(0,n.jsxs)("div",{className:"step-number__content scope-81d5256b",children:[" ","Step ",void 0===r?1:r,_?(0,n.jsxs)(n.Fragment,{children:[" of ",d]}):null,":"," ",(0,n.jsx)("span",{className:"step-number__content--light scope-81d5256b",children:t})]}),u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"step-number__check scope-81d5256b","data-testid":"step-number-check","aria-hidden":"true",children:(0,n.jsx)("svg",{viewBox:"0 0 12 12",focusable:"false",children:(0,n.jsx)("polyline",{points:"2.5,6.5 5,9 9.5,3.5"})})}),(0,n.jsx)("span",{className:"sr-only",children:", completed"})]}):null,p]}))}},7756(e,t,r){"use strict";r.d(t,{A:()=>StepWrapper});var n=r(483134),o=r(997252),i=r(556726);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function StepWrapper(e){var t,r,l=e.stepNumber,c=e.headerText,u=e.withGap,d=e.hasError,p=e.borderless,f=void 0!==p&&p,_=e.completed,h=void 0!==_&&_,m=e.total,g=e.children,b=e.slots,y=_object_without_properties(e,["stepNumber","headerText","withGap","hasError","borderless","completed","total","children","slots"]);y.isArtworkUploaded;var v=_object_without_properties(y,["isArtworkUploaded"]);return(0,n.jsxs)("div",_object_spread_props(_object_spread({},v),{className:(0,o.cn)("step-wrapper",{"step-wrapper--with-gap":void 0!==u&&u,"step-wrapper--with-error":void 0!==d&&d,"step-wrapper--borderless":f,"step-wrapper--completed":h},v.className),children:[(0,n.jsxs)("div",{className:"step-wrapper__header",children:[(0,n.jsxs)("div",{className:"step-wrapper__header-left",children:[f?null:(0,n.jsx)(i.A,{stepNumber:void 0===l?1:l,content:c,completed:h,total:m,"data-testid":"step-number"}),null==b||null==(t=b["header-badge"])?void 0:t.call(b)]}),null==b||null==(r=b["step-number-content"])?void 0:r.call(b)]}),g]}))}},890579(e,t,r){"use strict";r.d(t,{A:()=>TransfersStoreCredit});var n=r(483134),o=r(293534),i=r(997252),l=r(723433),c=r(467265),u=r(927997),d=r(369171),p=r(257889),f=r(834057),_=r(338908);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function TransfersStoreCredit(e){var t=e.storeCreditInfo,r=_object_without_properties(e,["storeCreditInfo"]),h=(0,_.s)().n,m=(0,o.useRef)(null),g=(0,f.A)(),b=g.creditAmount,y=g.currentExpectedCredits,v=g.tiers,w=g.currentTier,j=g.totalCartAmount,k=g.orderSubtotal,x=g.expectedCredits,S=g.earnSunset,O=g.jiffyCreditLive;(0,g.updateStoreCreditInfo)(t);var P=(null==S?void 0:S.value)!==!0&&(null==O?void 0:O.value)!==!0&&j.value>0;function toggleTooltip(){var e;(0,c.Py)("transfer_store_credit_info_icon_clicked",{credits:y.value,order_subtotal:k,expected_credits:x,current_tier:null==(e=w.value)?void 0:e.range,credit_amount:b.value})}var A=(0,u.lt)("gen/loyalty-badge.png");return P?(0,n.jsxs)("div",_object_spread_props(_object_spread({},r),{className:(0,i.cn)("transfers-store-credit scope-0fc8e48f",null==r?void 0:r.className),ref:m,children:[(0,n.jsx)("img",{className:(0,i.cn)("transfers-store-credit__icon scope-0fc8e48f"),alt:"Loyalty Badge",src:A}),(0,n.jsxs)("div",{className:(0,i.cn)("transfers-store-credit__content scope-0fc8e48f"),children:[(0,n.jsxs)("div",{className:(0,i.cn)("transfers-store-credit__text scope-0fc8e48f"),children:[y.value>0?(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:" You'll earn "}),(0,n.jsx)("strong",{children:h(y.value,"currency")}),(0,n.jsx)("span",{children:" credit on Transfers! "})]},3):(0,n.jsx)("span",{children:(0,n.jsx)("span",{children:"Earn credits on Transfers!"})},4),(0,n.jsx)(p.A,{className:(0,i.cn)("scope-0fc8e48f"),trigger:"click",position:"bottom-right",onShow:toggleTooltip,slots:{target:function(){return(0,n.jsx)(l.A,{className:(0,i.cn)("transfers-store-credit__info-icon scope-0fc8e48f"),icon:"info-circle-bold","data-testid":"transfers-store-credit-info-icon"})},content:function(){return(0,n.jsx)(d.A,{className:(0,i.cn)("scope-0fc8e48f"),currentTier:w.value,tiers:v.value,totalAmount:j.value,isTooltip:!0,"data-testid":"store-credit-tiers"})}},"data-testid":"tooltip"})]}),b.value>0?(0,n.jsxs)("div",{className:(0,i.cn)("transfers-store-credit__store-credit scope-0fc8e48f"),children:[(0,n.jsx)("span",{className:(0,i.cn)("transfers-store-credit__store-credit-label scope-0fc8e48f"),children:"Transfers Credit Balance:"}),(0,n.jsx)("span",{className:(0,i.cn)("transfers-store-credit__store-credit-amount scope-0fc8e48f"),children:h(b.value,"currency")})]}):null]})]})):null}TransfersStoreCredit.displayName="TransfersStoreCredit"},239075(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(190500),l=r.n(i);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}let __rspack_default_export=function(e){var t=e.src,r=e.alt,i=e.onLoad,c=_object_without_properties(e,["src","alt","onLoad"]),u=_sliced_to_array((0,o.useState)(!1),2),d=(u[0],u[1]),p=_sliced_to_array((0,o.useState)(1),1)[0],f=_sliced_to_array((0,o.useState)(3),2),_=(f[0],f[1]),h=(0,o.useRef)(null),m=(0,o.useRef)(null);function calculateMaxZoom(){if(!h.current)return 3;var e=h.current,t=e.parentElement;if(!t)return 3;var r=t.getBoundingClientRect();if(0===r.width||0===r.height)return 3;var n=e.naturalWidth,o=e.naturalHeight;return 0===n||0===o?3:Math.max(n/3/r.width,o/3/r.height,1)}function handleLoad(){d(!0);var e=calculateMaxZoom();if(_(e),m.current){try{m.current.dispose()}catch(e){console.error("Error disposing panzoom for zoom update")}try{m.current=l()(h.current,{maxZoom:e,minZoom:p,bounds:!0,boundsPadding:0})}catch(e){console.error("Error reinitializing panzoom with updated zoom")}}null==i||i()}return(0,o.useEffect)(function(){var e=h.current;if(e){try{if(e.complete&&0!==e.naturalHeight){var t=calculateMaxZoom();_(t),m.current=l()(e,{maxZoom:t,minZoom:p,bounds:!0,boundsPadding:0})}else m.current=l()(e,{maxZoom:3,minZoom:p,bounds:!0,boundsPadding:0})}catch(e){console.error("Error initializing panzoom")}return function(){try{m.current&&"function"==typeof m.current.dispose&&m.current.dispose()}catch(e){console.error("Error disposing panzoom")}}}},[p]),(0,n.jsx)("img",_object_spread_props(_object_spread({},c),{className:"zoom-pan-image scope-064a2ddc",ref:h,src:t,alt:void 0===r?"Preview Image":r,draggable:"false",style:{touchAction:"none",transformOrigin:"0 0"},onLoad:handleLoad}))}},884853(e,t,r){"use strict";function showAddingFailureModal(e){var t=globalThis.$;if("function"==typeof t){var r=t("#adding-failure");null==r||r.modal("show"),null==r||r.find("#adding-failure-error").text(e)}}r.d(t,{g:()=>showAddingFailureModal})},302683(e,t,r){"use strict";r.d(t,{O9:()=>resolveErrorCopy});var n=r(727566),o={title:"",message:"Image upload failed",cta:"Choose file"},i={image_corrupted:{title:"Your image file appears damaged.",message:"Try re-saving the file from your design tool and uploading again. If you exported from AI (Midjourney, DALL-E), try re-downloading.",cta:"Upload a different file",learnMore:{href:"/help/image-format-requirements",label:"Read image format requirements"}},incorrect_header:{title:"The file extension doesn't match the actual format.",message:"Your file is named .png but isn't really a PNG. Rename it or re-export to the correct format.",cta:"Upload a different file"}
1,empty_image:{title:"The file you uploaded is empty.",message:"Try selecting the file again — it may have been a zero-byte file.",cta:"Choose another file"},invalid_extension:{title:"We don't accept this file type.",message:"We accept PNG, JPG, WEBP, and PDF files.",cta:"Upload a different file"},invalid_gang_sheet_extension:{title:"Gang sheet orders require a PNG.",message:"Please re-export your artwork as PNG and upload again.",cta:"Upload a PNG"},multiple_pdf_page:{title:"Your PDF has multiple pages.",message:"Please upload a single-page PDF, or convert to PNG first.",cta:"Upload a different file"},image_too_small:{title:"This image is too small to print well.",message:"The largest dimension must be at least ".concat(n.jO,"px. Upload a larger version, or export it again at a higher resolution."),cta:"Upload a larger file"},rate_limited:{title:"Too many upload attempts.",message:"We're receiving a lot of requests from your network right now. Please wait about a minute, then try uploading again.",cta:"Try again"}};function resolveErrorCopy(e){var t;return e&&null!=(t=i[e])?t:o}},46692(e,t,r){"use strict";r.d(t,{Fw:()=>resolveArtworkInches,T0:()=>resolveSeedDimensions,mZ:()=>reseedAutoSeedRows,q8:()=>clampToBounds});var n=r(298210);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function resolveInchMetadata(e){var t=e||{},r=t.metadata,n=t.withBgMetadata,o=t.removeBackground;return n&&0!==Object.keys(n).length?o?null!=r?r:null:n:null!=r?r:null}function resolveArtworkInches(e){var t,r,n,o,i,l,c,u,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=e||{},f=p.enhanceImage,_=p.enhancementTier,h=p.removeBackground,m=p.enhancedMetadata,g=resolveInchMetadata(e);return d.printAsIs||"print_original"===_?(t=(null==e||null==(n=e.originalMetadata)?void 0:n.widthInch)||(null==g?void 0:g.widthInch),r=(null==e||null==(o=e.originalMetadata)?void 0:o.heightInch)||(null==g?void 0:g.heightInch)):f&&"custom"!==_?h?(t=(null==m?void 0:m.widthInch)||(null==g?void 0:g.widthInch),r=(null==m?void 0:m.heightInch)||(null==g?void 0:g.heightInch)):(t=(null==e||null==(i=e.withBgMetadata)?void 0:i.widthInch)||(null==g?void 0:g.widthInch),r=(null==e||null==(l=e.withBgMetadata)?void 0:l.heightInch)||(null==g?void 0:g.heightInch)):(t=(null==e||null==(c=e.originalMetadata)?void 0:c.widthInch)||(null==g?void 0:g.widthInch),r=(null==e||null==(u=e.originalMetadata)?void 0:u.heightInch)||(null==g?void 0:g.heightInch)),{width:t||(null==e?void 0:e.width),height:r||(null==e?void 0:e.height)}}function clampToBounds(e,t,r){var n=e;return"number"==typeof t&&Number.isFinite(t)&&(n=Math.max(n,t)),"number"==typeof r&&Number.isFinite(r)&&(n=Math.min(n,r)),n}function resolveMinWidth(e){return e.printAsIs?n.Ai:e.minWidth}function reseedAutoSeedRows(e,t){var r=!1,n=e.map(function(e){return"custom"!==e.preset||!0!==e.isAutoSeed||Number(e.width)===t.width&&Number(e.height)===t.height?e:(r=!0,_object_spread_props(_object_spread({},e),{width:t.width,height:t.height}))});return r?n:null}function resolveSeedDimensions(e,t){var r=resolveArtworkInches(e,{printAsIs:t.printAsIs}),n=r.width,o=r.height;return n&&o?{width:clampToBounds(Number(n),resolveMinWidth(t),t.maxWidth),height:clampToBounds(Number(o),t.minHeight,t.maxHeight)}:null}},478594(e,t,r){"use strict";r.d(t,{A:()=>useArtworkValidation});var n=r(293534),o=r(740355),i=r(425679);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var noop=function(){};function useArtworkValidation(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.minWidth,r=void 0===t?0:t,l=e.minHeight,c=void 0===l?0:l,u=e.maxWidth,d=void 0===u?100:u,p=e.maxHeight,f=void 0===p?100:p,_=e.printAsIsMaxHeight,h=void 0===_?100:_,m=e.isPrintAsIs,g=void 0!==m&&m,b=e.metadata,y=void 0===b?null:b,v=e.originalDimensions,w=e.onValidation,j=void 0===w?noop:w,k=_sliced_to_array((0,n.useState)({}),2),x=k[0],S=k[1],O=_sliced_to_array((0,n.useState)(null),2),P=O[0],A=O[1];function validationErrorType(e){var t;return null==(t=x[e])?void 0:t.type}function handleValidationError(e,t,r){return validationErrorType(e)!==t&&(null==P?void 0:P.hasImage)&&j("image_validation_error",t,{}),{message:r,type:t}}function widthConstraint(){return(null==y?void 0:y.aspectRatio)&&y.aspectRatio>1?y.maxSheetHeight:null==y?void 0:y.maxSheetWidth}function heightConstraint(){return(null==y?void 0:y.aspectRatio)&&y.aspectRatio>1?y.maxSheetWidth:null==y?void 0:y.maxSheetHeight}function fitsGangSheet(e){var t,r,n=e.width,o=e.height;return!!y&&""!==n&&""!==o&&Math.min(Number(n),Number(o))<=(null!=(t=y.maxSheetWidth)?t:1/0)&&Math.max(Number(n),Number(o))<=(null!=(r=y.maxSheetHeight)?r:1/0)}
1function invalidWidthValidation(e,t){return""===e.width&&(t[e.id]=handleValidationError(e.id,i.A.INVALID_WIDTH,"Please enter a valid width."),!0)}function invalidHeightValidation(e,t){return""===e.height&&(t[e.id]=handleValidationError(e.id,i.A.INVALID_HEIGHT,"Please enter a valid ".concat(g?"length":"height",".")),!0)}function negativeValuesValidation(e,t){return!!(0>Number(e.width)||0>Number(e.height))&&(t[e.id]=handleValidationError(e.id,i.A.NEGATIVE_VALUES,"Negative values are not permitted."),!0)}function minPrintSizeValidation(e,t){return!(Number(e.width)>=r&&Number(e.height)>=c)&&(t[e.id]=handleValidationError(e.id,i.A.MIN_PRINT_SIZE,"The minimum print size is ".concat(r,'" x ').concat(c).concat(g?"'":'"')),!0)}function maxPrintSizeValidation(e,t){return!(g||fitsGangSheet(e)||Number(e.width)<=d&&Number(e.height)<=f)&&(t[e.id]=handleValidationError(e.id,i.A.MAX_PRINT_SIZE,"The maximum print size is ".concat(d,'" x ').concat(f,'"')),!0)}function maxPrintSizePrintAsIsValidation(e,t){return!!(g&&Number(e.height)>h)&&(t[e.id]=handleValidationError(e.id,i.A.MAX_PRINT_SIZE_PRINT_AS_IS,"The maximum print size is ".concat(r,'" x ').concat(h,"'")),!0)}function willFitGangSheet(e,t){if(!y)return!1;var r,n,i=fitsGangSheet(e)?(0,o.XI)(e):""!==e.width&&Number(e.width)<=(null!=(r=widthConstraint())?r:1/0),l=fitsGangSheet(e)?(0,o.XI)(e):""!==e.height&&Number(e.height)<=(null!=(n=heightConstraint())?n:1/0);return(!i||!l)&&(t[e.id]=t[e.id]?_object_spread_props(_object_spread({},t[e.id]),{isFieldValid:i&&l}):{isFieldValid:i&&l},!0)}function resetErrors(){S({})}function validateDimensions(e){var t={},r=[invalidWidthValidation,invalidHeightValidation,negativeValuesValidation];return(e.isAutoSeed?r:_to_consumable_array(r).concat(_to_consumable_array([maxPrintSizePrintAsIsValidation,minPrintSizeValidation,maxPrintSizeValidation]))).some(function(r){return r(e,t)})||e.isAutoSeed||willFitGangSheet(e,t),A(e),S(t),t[e.id]}return{errors:x,currentItem:P,originalArtworkDimensions:_sliced_to_array((0,n.useState)(void 0===v?{}:v),1)[0],validateDimensions:validateDimensions,resetErrors:resetErrors}}},948631(e,t,r){"use strict";r.d(t,{c:()=>useUserBackButtonClickDetector});var n=r(293534),o={guard:!0,reason:"back-button-detection"};function useUserBackButtonClickDetector(e){var t=e.onBackButtonClick,r=(0,n.useRef)(!1),i=(0,n.useRef)(!1),l=(0,n.useRef)(t),c=(0,n.useRef)(null);l.current=t;var u=(0,n.useCallback)(function(){try{window.history.length>1&&window.history.pushState(o,"",window.location.href)}catch(e){}},[]),d=(0,n.useCallback)(function(){if(!r.current){var e;null==(e=l.current)||e.call(l),r.current=!0}},[]);c.current=d;var p=(0,n.useCallback)(function(){i.current||(i.current=!0,u(),window.addEventListener("popstate",d))},[u,d]),f=(0,n.useCallback)(function(){i.current||p()},[p]);return(0,n.useEffect)(function(){return function(){i.current=!1,c.current&&window.removeEventListener("popstate",c.current)}},[]),{triggerUserBackButtonClickMonitoring:f}}},690690(e,t,r){"use strict";r.d(t,{CL:()=>isDtfUserRetentionModalShown,g5:()=>scrollToTextAreaAndHighlight,wz:()=>setDtfUserRetentionModalShown,yv:()=>o});var n=r(298210),o="custom-notes-textarea",setDtfUserRetentionModalShown=function(){sessionStorage.setItem(n.j0,"true")},isDtfUserRetentionModalShown=function(){return"true"===sessionStorage.getItem(n.j0)},scrollToTextAreaAndHighlight=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=document.querySelectorAll('[data-redraw-text-area-identifier="'.concat(o,'"]'))[e];t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),t.classList.add("custom-notes__textarea--highlighted"))}},718822(e,t,r){"use strict";function _assert_this_initialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _construct(e,t,r){return(_construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o}).apply(null,arguments)}function _get_prototype_of(e){return(_get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _is_native_function(e){return -1!==Function.toString.call(e).indexOf("[native code]")}function _possible_constructor_return(e,t){return t&&("object"===_type_of(t)||"function"==typeof t)?t:_assert_this_initialized(e)}function _set_prototype_of(e,t){return(_set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return(_wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(Wrapper,e)})(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}r.d(t,{T:()=>n});var n=function(e){function EmptyResponseBodyError(e){var t;return _class_call_check(this,EmptyResponseBodyError),(t=_call_super(this,EmptyResponseBodyError,["Artwork upload resolved with ".concat(e," body instead of an artwork object")])).name="EmptyResponseBodyError",t}return _inherits(EmptyResponseBodyError,e),EmptyResponseBodyError}(_wrap_native_super(Error))},67707(e,t,r){"use strict";r.d(t,{O:()=>isEdgeRateLimited});var isEdgeRateLimited=function(e){var t,r,n=null==e||null==(t=e.response)?void 0:t.status;if(429===n)return!0;
1if(403!==n)return!1;var o=null==e||null==(r=e.response)?void 0:r.data;return"string"==typeof o&&/request blocked/i.test(o)}},221609(e,t,r){"use strict";r.d(t,{G:()=>isTransientServerError});var n=r(718822);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=[404,502,503,504],i=[/timeout exceeded/i,/timeout of \d+ms exceeded/i,/ETIMEDOUT/i,/network timeout/i,/request timeout/i],isTransientServerError=function(e){if(_instanceof(e,n.T))return!0;var t,r=null==e||null==(t=e.response)?void 0:t.status;if(r&&o.includes(r)||"ECONNABORTED"===(null==e?void 0:e.code))return!0;var l=null==e?void 0:e.name,c=(null==e?void 0:e.message)||"";return!!("TypeError"===l&&/Load failed|Failed to fetch/i.test(c)||i.some(function(e){return e.test(c)}))}},864832(e,t,r){"use strict";r.d(t,{fL:()=>markLoupeHintSeen,tp:()=>loupeHintShouldShow});var n="dtf:loupe-hint-seen-at";function loupeHintShouldShow(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();try{var t=window.localStorage.getItem(n);if(null===t)return!0;var r=Number(t);if(!Number.isFinite(r)||r>e)return!0;return e-r>=2592e6}catch(e){return!0}}function markLoupeHintSeen(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();try{window.localStorage.setItem(n,String(e))}catch(e){}}},335264(e,t,r){"use strict";r.d(t,{oC:()=>resolvePlacementTier,xy:()=>normaliseSizeRange});var n=r(298210),o=r(740355),i=["adult","youth","toddler","infant"],l={adult:"XS - XXL+",youth:"XS - XL",toddler:"2T - 6T",infant:"Newborn - 24M"},c=n.Dn;function normaliseSizeRange(e){var t=i.includes(e.category)?e.category:null;return e.sizeRange?{category:t,sizeRange:e.sizeRange,isSizeRangeInferred:!1}:{category:t,sizeRange:null===t?null:l[t],isSizeRangeInferred:null!==t}}var u={category:null,sizeRange:null};function resolvePlacementTier(e,t){if(null==t)return u;var r,n=(null!=(r=c[e])?r:[]).find(function(e){return(0,o.fJ)(e)===t});if(!n)return u;var i=normaliseSizeRange(n);return{category:i.category,sizeRange:i.sizeRange}}},686902(e,t,r){"use strict";r.d(t,{f:()=>isPollingEligible});var n=r(298210),isPollingEligible=function(e,t){return e===n.aS||!!t&&null!==e&&n.OF.includes(e)}},58306(e,t,r){"use strict";r.d(t,{Ay:()=>buildDefaultPlacementSeed,Gq:()=>resolveCustomSeedDimensions,Kf:()=>resolveSeedAfterEnhancement,ju:()=>asFiniteNumber,lu:()=>buildProColorUploadSeed});var n=r(444636);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function buildDefaultPlacementSeed(e){var t=e.fallbackValues,r=e.id;return[{preset:"custom",width:Number(t.width),height:t.height,quantity:t.quantity,isAutoSeed:!0,id:r}]}function asFiniteNumber(e){if(null!=e){var t="number"==typeof e?e:Number(e);return Number.isFinite(t)?t:void 0}}function resolveCustomSeedDimensions(e){var t,r,n,o,i=asFiniteNumber(null==(n=e.bgRemovedMetadata)?void 0:n.width_inch),l=asFiniteNumber(null==(o=e.bgRemovedMetadata)?void 0:o.height_inch),c=null!=(t=null!=i?i:asFiniteNumber(e.fallback.width))?t:1,u=null!=(r=null!=l?l:asFiniteNumber(e.fallback.height))?r:1;return{width:clampInches(c,e.bounds.minWidth,e.bounds.maxWidth),height:clampInches(u,e.boun
1ds.minHeight,e.bounds.maxHeight)}}function clampInches(e,t,r){var n=e;return"number"==typeof t&&Number.isFinite(t)&&(n=Math.max(n,t)),"number"==typeof r&&Number.isFinite(r)&&(n=Math.min(n,r)),n}function buildProColorUploadSeed(e){var t,r,o,i,l,c,u=e.rawMetadata||{},d=null!=(t=null!=(r=null!=(o=asFiniteNumber(u.width_inch))?o:asFiniteNumber(u.widthInch))?r:asFiniteNumber(e.fallbackDimensions.width))?t:1,p=null!=(i=null!=(l=null!=(c=asFiniteNumber(u.height_inch))?c:asFiniteNumber(u.heightInch))?l:asFiniteNumber(e.fallbackDimensions.height))?i:1,f=asFiniteNumber(u.dpi);return _object_spread_props(_object_spread({id:e.artworkId,width:d,height:p,isLoading:!1,isFile:!1},void 0!==f&&{originalDpi:f,sizeBasedDpi:f}),{sizesAndQuantities:[{preset:"custom",width:d,height:p,quantity:e.defaultQuantity||1,isAutoSeed:!0,id:(0,n.r9)()}]})}function resolveSeedAfterEnhancement(e,t){return 0===e.length?t():e}},2605(e,t,r){"use strict";function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function isDripStickerArtwork(e){var t,r=null==e?void 0:e.metadata;return!!r&&(void 0===r?"undefined":_type_of(r))==="object"&&(null!=(t=r.builderArtboard)?t:r.builder_artboard)==="sticker"}function stickerFlatPricingRate(e){var t=null==e?void 0:e.simulation,r=Number(null==t?void 0:t.pricePerInch);return Number.isFinite(r)&&r>0?r:null}function stickerDripBuilderEntryActive(e){var t=(null==e?void 0:e.experiments)||{},r=Number(t.ab_stickers_drip_builder);return!!(null==e?void 0:e.isDieCutSticker)&&!!(null==e?void 0:e.gangSheetBuilderShopId)&&!!t.stickers_drip_builder&&Number.isFinite(r)&&r>=1}function stickerArtworkDisplayName(e,t){return isDripStickerArtwork(e)&&t?"Custom Sticker":null==e?void 0:e.name}function dripStickerToolsSuppressed(e,t){return stickerDripBuilderEntryActive(e)||isDripStickerArtwork(t)&&!!(null==e?void 0:e.isDieCutSticker)}r.d(t,{CI:()=>stickerDripBuilderEntryActive,PB:()=>stickerArtworkDisplayName,XA:()=>isDripStickerArtwork,xu:()=>stickerFlatPricingRate,yJ:()=>dripStickerToolsSuppressed})},739161(e,t,r){"use strict";r.d(t,{L:()=>useStepProgress,p:()=>i});var n=r(538896);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var o={total:0,sizeStepNumber:2,finalStepNumber:3,completed:{upload:!1,size:!1,final:!1},missingStep:null};function hasPositiveNumber(e){return Number(e)>0}function hasValidSelectedSize(e){return!!Array.isArray(e)&&e.some(function(e){return hasPositiveNumber(null==e?void 0:e.width)&&hasPositiveNumber(null==e?void 0:e.height)&&hasPositiveNumber(null==e?void 0:e.quantity)})}function hasMinimumQuantityInvalid(e,t){return hasPositiveNumber(e)&&Number(e)<Number(t)}var i={upload:"Upload Your Design(s)",puff:"Select Puff Color",size:"Set Design Size",reviewAndAtc:"Review and Add to Cart",addQuantity:"Add Quantity"};function useStepProgress(){var e=(0,n.useDtfStore)(),t=!!e.isPuff;if(!e.showStepsUI)return _object_spread_props(_object_spread({},o),{sizeStepNumber:t?3:2,finalStepNumber:t?4:3});var r=!!e.showMultiSize,l=(Array.isArray(e.artworks)?e.artworks:[])[0],c=!!e.isEnhancementLoading,u=!!e.hasArtworkEnhancementTimedOut,d=!!e.isSubmitting,p=!!e.isReadyForOrder,f=!!e.removeBgLoading,_=Number(e.minStickerQuantity||10),h=!!l&&!l.isSimulated&&!!l.url&&!l.uploadError,m=h&&!c&&!u&&!0===l.enhancementCompleted,g=h&&(c||!0!==l.enhancementCompleted),b=t?!!(null==l?void 0:l.color):void 0,y=!1;if(h){var v,w,j,k,x=hasValidSelectedSize(null==l?void 0:l.sizesAndQuantities),S=(null==l?void 0:l.widthEdited)?null==l?void 0:l.width:null!=(v=null!=(w=null==l||null==(j=l.previewMetadata)?void 0:j.widthInch)?w:null==l||null==(k=l.previewMetadata)?void 0:k.width_inch)?v:null==l?void 0:l.width;y=r?x:hasPositiveNumber(S)||x}var O=t?4:3,P=t?3:2,A=null;
1if(m)if(t&&!b)A={label:"Step 2: ".concat(i.puff),anchor:".puff-color-selector"};else if(y){if(!p){var C=r?i.reviewAndAtc:i.addQuantity,I=t&&hasMinimumQuantityInvalid(null==l?void 0:l.quantity,_)?"Minimum quantity of ".concat(_," per design"):void 0;A=_object_spread({label:"Step ".concat(O,": ").concat(C),anchor:".artwork-quantity"},I?{prompt:I}:{})}}else A={label:"Step ".concat(P,": ").concat(i.size),anchor:r?".artwork-multi-dimensions":".artwork-dimensions"};else A=_object_spread({label:"Step 1: ".concat(i.upload),anchor:".product-details-dtf__step-1"},g?{prompt:"Perfecting your design with PrintPerfect"}:{});return(u||d||f||p)&&(A=null),{total:O,sizeStepNumber:P,finalStepNumber:O,completed:_object_spread_props(_object_spread({upload:m},t?{puff:!!b}:{}),{size:y,final:p}),missingStep:A}}},757774(e,t,r){"use strict";r.d(t,{fj:()=>resolveAddToCartErrorBody,xj:()=>scheduleProcessingRetry});var n=r(508551);function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var asRecord=function(e){return null!==e&&(void 0===e?"undefined":_type_of(e))==="object"?e:null},resolveAddToCartErrorBody=function(e){var t=asRecord(null==e?void 0:e.response);if(t)return t;var r=null==e?void 0:e.message;return"string"==typeof r?(0,n.tryParse)(r):null},isArtworkProcessingRetryable=function(e){var t=asRecord(e);return(null==t?void 0:t.error)==="artwork_processing"&&(null==t?void 0:t.retryable)===!0},artworkProcessingRetryDelayMs=function(e){var t,r=null==(t=asRecord(e))?void 0:t.retry_after_ms;return"number"==typeof r&&r>0?r:1500},scheduleProcessingRetry=function(e,t,r){return!!isArtworkProcessingRetryable(e)&&!(t>=4)&&(r(artworkProcessingRetryDelayMs(e)),!0)}},954733(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(277889);r(751117);var o=r(171473),i=r(48859),l=r(467265),c=r(594446),u=r(745063),d=r(40401),p=r(705472),f=r(586519),_=r(355698),h=r(482797),m=r(298210),g=r(425679),b=r(127391),y=r(444636),v=r(58306),w=r(886408);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var j=new Set(["validate_artwork","process_artwork","process_lightweight_artwork"]),k=new Set(["process_artwork_progress","process_lightweight_artwork_progress"]),isJiffyFirstProcessingTerminal=function(e){var t;return"process_artwork"===e.action||"process_lightweight_artwork"===e.action||"validate_artwork"===e.action&&(null==(t=e.result)?void 0:t.success)===!1},reportProcolorRoutable=function(e,t,r){"boolean"==typeof r.procolor_routable&&(null==t?void 0:t.id)!=null&&e.noteArtworkProcolorRoutable(t.id,r.procolor_routable)},seedAutoCustomSize=function(e,t){var r=(0,v.Gq)({bgRemovedMetadata:null==t?void 0:t.with_bg_metadata,fallback:{width:e.initialValues.width,height:e.initialValues.height},bounds:{minWidth:(0,v.ju)(e.dtfMinWidth),maxWidth:(0,v.ju)(e.dtfMaxWidth),minHeight:(0,v.ju)(e.dtfMinHeight),maxHeight:(0,v.ju)(e.dtfMaxHeight)}}),n=r.width,o=r.height;return(0,v.Ay)({fallbackValues:{width:n,height:o,quantity:e.initialValues.quantity},id:(0,y.r9)()})},x=p.i,setProgress=function(e,t){var r,n,o=x[e.action];if(o){var i=+!!t.isSpangle,l=o.label,c=o.percentage,u=l[i]||l[0],d=c[i]||c[0];t.updateArtworkValuesById({id:(null==(r=e.result)?void 0:r.artwork_id)||(null==(n=e.data)?void 0:n.artwork_id),progress:d,progressMessage:u})}},setLastEvent=function(e,t){var r,n,o,i,l;(null==(r=e.result)?void 0:r.success)===!0&&t.updateArtworkValuesById({id:(null==(n=e.result)?void 0:n.artwork_id)||(null==(o=e.data)?void 0:o.artwork_id),lastWebSocketEvent:e.action,lastWebSocketEventData:{result:(null==(i=e.result)?void 0:i.process_data)||e.data,data:(null==(l=e.result)?void 0:l.data)||e.data}})},handleValidateArtworkProgress=function(e,t){t.setValidateArtworkStartTime(e,(0,h.s)().getTime());var r=setInterval(function(){var r;Math.floor(((0,h.s)().getTime()-(null!=(r=t.validateArtworkStartTime[e])?r:0))/1e3)>60&&(t.clearValidateArtworkStartEventInterval(e),(0,l.Py)("image_upload_enhancements_stuck",{dtf_channel_uuid:t.dtfChannelUuid,artwork_id:e}),t.setEnhancementStuck(e))},1e3);t.setValidateArtworkStartEventIntervalID(e,r)},getArtwork=function(e,t){var r=e.result;return t.artworks.find(function(e){var t;return Number("string"==typeof e.id?(e.id.match(/^\d+/)||[])[0]:e.id)===Number(null==r?void 0:r.artwork_id)||null!=e.originalIndex&&e.originalIndex.toString()===String(null==r||null==(t=r.data)?void 0:t.file_original_index)})},markEnhancementCompleted=function(e,t,r,o,i){var d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},p=d.awaitingFinalDimensions,f=void 0!==p&&p;return _async_to_generator(function(){var d,p,_,h,m,g,b,w,j,k,x,S,O;return _ts_generator(this,function(P){return t&&r&&(d=t.imageProcessingCompletedEventSent,(e.isStandardArtwork||e.isProColor)&&(_=e.showMultiSize,h=r.metadata,m=[],_&&(t.isSizesEdited?m=(0,y.xr)(t.sizesAndQuantities,null==h?void 0:h.aspect_ratio):(g=t.sizesAndQuantities||[],m=(0,v.Kf)(g,function(){return seedAutoCustomSize(e,r)}))),b={id:t.id,originalImageUrl:r.original_image_url,enhancedWithBgUrl:r.with_bg_url,enhancedNoBgUrl:r.no_bg_url,enhancedDpi:null==(p=r.metadata)?void 0:p.dpi,enhancedOriginalDpi:r.original_dpi,originalDpi:300,sliderPreviewUrl:r.no_bg_no_trim_url,originalMime:r.original_mime,enhancementCompleted:!0,awaitingFinalDimensions:f,appliedTransformations:r.applied_transformations,sizesAndQuantities:m},r.with_bg_imgix_url&&(b.enhancedWithBgUrl=r.with_bg_imgix_url),r.no_bg_imgix_url&&(b.enhancedNoBgUrl=r.no_bg_imgix_url),b.sliderPreviewUrl=r.no_bg_no_trim_url||r.no_bg_imgix_url,r.original_image_imgix_url&&(b.originalImageUrl=r.original_image_imgix_url),e.updateArtworkValuesById(b),e.isGoldFoil&&e.generateGoldFoilImages({artworkId:t.id}),(0,l.Py)("dtf_image_print_perfect_toggle",{business_line:e.businessLine,artwork_id:o.artwork_id,enhance_image:!0,selected_by:"jiffy",metadata:r.metadata})),e.artworks.length>=1&&!e.artworks.some(function(e){return e.isLoading})&&e.getArtworksPricing(),d||((0,l.Py)("image_processing_completed",{payload:{process_data:r,stream_name:"dtf_channel_".concat(e.dtfChannelUuid),action_type:i.action,worker_enhancement:i.worker_enhancement},business_line:e.businessLine,artwork_id:o.artwork_id,trigger_event:i.action}),(0,c.q)(_object_spread_props(_object_spread({},o),{id:o.artwork_id}),{multiArtwork:e.artworks.length>1}),x=r.no_bg_imgix_url||r.with_bg_imgix_url||r.no_bg_url||r.with_bg_url,S=r.original_image_imgix_url||r.original_image_url,(0,u.Zm)(_object_spread(_object_spread_props(_object_spread({},null!=o.artwork_id&&{artwork_id:String(o.artwork_id)}),{dpi:null==(j=r.metadata)?void 0:j.dpi,location:null==(k=r.metadata)?void 0:k.uploaded_on,file_name:r.filename,file_type:r.filetype,file_size:r.filesize,business_line:e.businessLine,artworks_count:e.artworks.length,pre_cut_transfers:e.preCut}),x&&{enhanced_image_url:x},S&&{original_image_url:S})),null!=o.artwork_id&&n.api.dtf.acknowledgeArtwork({id:o.artwork_id},void 0,{silent:!0}
1).catch(function(){}),null!=(O=null!=(w=o.artwork_id)?w:t.id)&&(e.updateArtworkValuesById({id:O,imageProcessingCompletedEventSent:!0}),e.updatePrintReadyInfoState(O)))),[2]})})()};function __rspack_default_export(e){var t=b.DE,r={uuid:e.dtfChannelUuid,channel:"DtfChannel"};return window.App.cable.subscriptions.create(r,{received:function(r){return _async_to_generator(function(){var c,p,h,m,S,O,P,A,C,I,E,N,D,T,M,R,F,L,B,z,U,H,q,V,G,K,W,Q,J,Z,Y,X,ee,et,er,en,eo,ea,ei,es,el,ec,eu,ed,ep,ef,e_,eh,em,eg,eb,ey,ev,ew,ej,ek,ex,eS,eO,eP,eA,eC,eI,eE,eN,eD,eT,eM,eR,eF,eL,eB,ez,eU,eH,eV,eG,eK,eW,eQ,e$,eJ,eZ,eY,eX,e0,e1,e2,e3,e4,e5,e9,e8,e6,e7,te,tt,tr,tn,to,ta,ti,ts,tl;return _ts_generator(this,function(tc){switch(tc.label){case 0:c=this,tc.label=1;case 1:if(tc.trys.push([1,7,,8]),e.actionCableConnected||e.setActionCableConnected(!0),m=r.result,(S=getArtwork(r,e))||!e.isSpangle||"spangle"!==r.action||(S=null==(O=e.artworks)?void 0:O[0]),(null==m||null==(p=m.data)?void 0:p.process_time_stamp)&&(null==S?void 0:S.processTimeStamp)&&String(S.processTimeStamp)!==String(m.data.process_time_stamp))return isJiffyFirstProcessingTerminal(r)&&e.endStaleJiffyFirstArtworkProcessing(null==m?void 0:m.artwork_id),[2];if("continue_dtf_artwork_process_started"===r.action&&j.has(String(null==m?void 0:m.next_step))?e.beginJiffyFirstArtworkProcessing(null==m?void 0:m.artwork_id,{renewsRestamp:!0}):("validate_artwork_progress"===r.action||k.has(r.action)&&(null==m?void 0:m.completed)!==!0)&&e.beginJiffyFirstArtworkProcessing(null==m?void 0:m.artwork_id),void 0!==x[r.action]&&(e.setIsRetrying(!1),setProgress(r,e),setLastEvent(r,e)),e.isSpangle&&(null==(h=e.artworks)?void 0:h[0])&&(e.artworks[0].spangled=!0),"process_dtf_artwork_started"===r.action&&(w.Zs.set(w.aW,"unknown"),e.beginJiffyFirstArtworkProcessing(null==m?void 0:m.artwork_id)),P="process_dtf_artwork_started"===r.action?"image_upload_enhancements_started":"image_upload_".concat(r.action,"_triggered"),(0,l.Py)(P,{payload:{process_data:m,stream_name:"dtf_channel_".concat(e.dtfChannelUuid),action_type:r.action,worker_enhancement:r.worker_enhancement},business_line:e.businessLine,artwork_id:m.artwork_id,file_type:null==m?void 0:m.file_type}),"spangle"===r.action)return e.isSpangle&&0===t.spangleVariations.length&&t.prepareVariations({isRetry:!1}),m.success?((0,l.Py)("spangle_api_call_completed",{algorithm:m.algorithm,duration:(null!=(C=m.duration)?C:0)/1e3,artwork_url:m.original_artwork_url,pages_info:m.pages_info,business_line:d.o6.SPANGLE}),A={algorithm:null!=(I=m.algorithm)?I:"",imageUrl:m.design_url,spangleCsv:m.spangle_csv,spanglePagesInfo:m.pages_info,positionsJson:m.positions_json,originalImageUrl:m.original_image_url,error:!1,isLoading:!1},t.setOriginalArtworkUrl(null!=(E=m.original_image_url)?E:"")):(A={error:!0,algorithm:null!=(N=m.algorithm)?N:"",isLoading:!1},(0,f.notifyError)("DTF spangle variations error",{params:{error_message:m.error,algorithm:m.algorithm,pages_info:m.pages_info}})),t.completedSpangleData.length===m.algorithms_size&&t.resetCompletedSpangleData(),t.addCompletedSpangleData(A),t.completedSpangleData.length===m.algorithms_size&&(t.showSpangleResult(),t.setSpangleMode(b.EO.sizeEdited)),[2];if("spangle_update"===r.action)return e.updateArtworkValues({index:0,spangledImageUrl:m.design_url}),[2];if("upload_artwork"===r.action&&(null==m?void 0:m.success)===!1&&"handled"===e.routeAsyncFailure({result:m}))return[2];if("upload_artwork"===r.action&&(null==m?void 0:m.success)!==!1){if(null==m?void 0:m.success_payload)return e.seedArtworkFromAsyncBroadcast({result:m}).then(function(t){var n;
1t&&((null==(n=r.data)?void 0:n.backend_triggered_enhancement)||c.perform("process_dtf_artwork",_object_spread_props(_object_spread({},r.data),{experiments:e.experiments})))}).catch(function(e){(0,f.notifyError)("dtf-channel: seedArtworkFromAsyncBroadcast rejected",{params:{error:String(e)}})}),[2];return(null==(D=r.data)?void 0:D.backend_triggered_enhancement)||this.perform("process_dtf_artwork",_object_spread_props(_object_spread({},r.data),{experiments:e.experiments})),[2]}if("validate_artwork"===r.action){if(m.success)return(null==S?void 0:S.id)!=null&&handleValidateArtworkProgress(S.id,e),[2];(null==S?void 0:S.id)!=null&&(e.clearValidateArtworkStartEventInterval(S.id),e.handleWebSocketEnhancementComplete(S.id)),e.endJiffyFirstArtworkProcessing(null!=(T=m.artwork_id)?T:null==S?void 0:S.id),null!=(R=null!=(M=m.artwork_id)?M:null==S?void 0:S.id)&&e.updatePrintReadyInfoState(R),(S||{}).imageProcessingCompletedEventSent||((0,l.Py)("image_processing_completed",{payload:{process_data:m,stream_name:"dtf_channel_".concat(e.dtfChannelUuid),action_type:r.action,worker_enhancement:r.worker_enhancement},business_line:e.businessLine,artwork_id:m.artwork_id,trigger_event:r.action}),(0,u.Zm)(_object_spread_props(_object_spread({},null!=m.artwork_id&&{artwork_id:String(m.artwork_id)}),{dpi:null==(L=m.artwork)||null==(F=L.metadata)?void 0:F.dpi,location:null==(z=m.artwork)||null==(B=z.metadata)?void 0:B.uploaded_on,file_name:null==(U=m.artwork)?void 0:U.filename,file_type:null==(H=m.artwork)?void 0:H.filetype,file_size:null==(q=m.artwork)?void 0:q.filesize,artworks_count:e.artworks.length,business_line:e.businessLine,pre_cut_transfers:e.preCut,enhanced_image_url:(null==(V=m.artwork)?void 0:V.no_bg_imgix_url)||(null==(G=m.artwork)?void 0:G.with_bg_imgix_url),original_image_url:null==(K=m.artwork)?void 0:K.original_image_imgix_url})),e.updateArtworkValuesById({id:m.artwork_id,imageProcessingCompletedEventSent:!0}))}if("process_artwork"===r.action){if((null==S?void 0:S.id)!=null&&e.clearValidateArtworkStartEventInterval(S.id),m.success)return!0===e.isProColor&&(null==S?void 0:S.id)!=null&&(!0===m.image_attached&&e.updateArtworkValuesById({id:S.id,imageAttached:!0}),e.startProColorImageAttachPoll(S.id)),(null==S?void 0:S.id)!=null&&m.process_data&&"cmyk_original_image_url"in m.process_data&&(ee=m.process_data.cmyk_original_image_url,e.updateArtworkValuesById({id:S.id,cmykOriginalImageUrl:"string"==typeof ee&&ee?ee:null})),reportProcolorRoutable(e,S,m),e.endJiffyFirstArtworkProcessing(null!=(X=m.artwork_id)?X:null==S?void 0:S.id),[2];(null==S?void 0:S.id)!=null&&e.handleWebSocketEnhancementComplete(S.id),e.endJiffyFirstArtworkProcessing(null!=(W=m.artwork_id)?W:null==S?void 0:S.id),e.getArtworksPricing(),(null==S?void 0:S.id)!=null&&(null!=(Q=null==(Y=m.artwork)||null==(Z=Y.metadata)||null==(J=Z.errors)?void 0:J.length)?Q:0)>0&&e.setGangsheetValidationError({index:(0,o.E)(e.artworks,S.id),artwork:m.artwork,type:g.A.INVALID_GANG_SHEET})}if("process_lightweight_artwork"===r.action&&e.endJiffyFirstArtworkProcessing(null!=(et=m.artwork_id)?et:null==S?void 0:S.id),"extract_bg_metadata"!==r.action)return[3,4];if(!m.success||!S)return[2];if(reportProcolorRoutable(e,S,m),!(er=m.process_data))return[3,3];return[4,markEnhancementCompleted(e,S,er,m,r,{awaitingFinalDimensions:!e.isProColor})];case 2:tc.sent(),tc.label=3;case 3:return[2];case 4:if("spangle_algorithm_list"===r.action&&m.success)return[2];if("fetch_price"===r.action&&m.success){if(en=m.response,(0,i.As)(!0),e.isSpangle&&t.spanglesLoading)return[2];return e.showMultiSize&&(eo={},Object.keys(en.artworks).forEach(function(e){eo[e]=[en.artworks[e]]}),en=_object_spread_props(_object_spread({},en),{artworks:eo})),e.setArtworkPricing({response:en,isMultiSize:e.showMultiSize}),[2]}if("fetch_delivery_date"===r.action){if(es=null==(ei=m.data)?void 0:ei.zipcode,el=(0,_.Mv)(),ec="string"==typeof es&&"string"==typeof el&&es!==el,m.success&&!ec&&(0,i.As)(!1),!S)return[2];return eu=S.imageProcessingCompletedEventSent,ed=S.id,ep=!m.success&&"string"!=typeof es,ec||ep||(0,i.NA)(null!=(ea=m.result)?ea:{}),e.isSpangle?t.setOriginalArtworkUrl(null!=(ef=null==(e_=m.artwork)?void 0:e_.url)?ef:""):e.isGoldFoil?e.convertImageToHexColor({artwork:m.artwork}):((null==(eh=m.artwork)?void 0:eh.id)!=null&&(eb=e.artworks.findIndex(function(e){return e===S}),e.setLoadedArtwork(_object_spread_props(_object_spread({},eb>=0?{index:eb}:{}),{artwork:m.artwork})),ed=null!=(em=eb>=0?null==(eg=e.artworks[eb])?void 0:eg.id:void 0)?em:S.id),(null==S?void 0:S.id)!=null&&(ew=Number((null==(ev=m.artwork)||null==(ey=ev.metadata)?void 0:ey.white_pixels_ratio)||0),e.setPresetMockupColor({index:(0,o.E)(e.artworks,S.id),color:ew>50?"#000000":"#E1E1E1"})),(e.isSticker||e.isStickerSample)&&(eS=null!=(ej=null!=(ek=null==(ex=m.artwork)?void 0:ex.id)?ek:m.artwork_id)?ej:null==S?void 0:S.id,e.artworks.forEach(function(t){if(t.id){var r=null!=eS&&String(t.id)===String(eS);e.seedStickerAfterEnhancement(t,{markComplete:r})}}),null!=eS&&e.handleWebSocketEnhancementComplete(eS))),m.success&&(e.isStandardArtwork||e.isProColor)&&(eR=e.showMultiSize,eF=null==(eO=r.result.artwork)?void 0:eO.metadata,eL=[],eR&&(S.isSizesEdited?eL=(0,y.xr)(S.sizesAndQuantities,null==eF?void 0:eF.aspect_ratio):(eB=S.sizesAndQuantities||[],eL=(0,v.Kf)(eB,function(){return seedAutoCustomSize(e,r.result.artwork)}))),e.updateArtworkValuesById({id:ed,originalImageUrl:null==(eP=r.result.artwork)?void 0:eP.original_image_url,enhancedWithBgUrl:null==(eA=r.result.artwork)?void 0:eA.with_bg_url,enhancedNoBgUrl:null==(eC=r.result.artwork)?void 0:eC.no_bg_url,enhancedDpi:null==(eE=r.result.artwork)||null==(eI=eE.metadata)?void 0:eI.dpi,enhancedOriginalDpi:null==(eN=r.result.artwork)?void 0:eN.original_dpi,originalDpi:300,sliderPreviewUrl:null==(eD=r.result.artwork)?void 0:eD.no_bg_no_trim_url,originalMime:null==(eT=r.result.artwork)?void 0:eT.original_mime,enhancementCompleted:!0,awaitingFinalDimensions:!1,sizesAndQuantities:eL}),e.handleWebSocketEnhancementComplete(ed),e.clearValidateArtworkStartEventInterval(ed),e.isGoldFoil&&e.generateGoldFoilImages({artworkId:S.id}),(0,l.Py)("dtf_image_print_perfect_toggle",{business_line:e.businessLine,artwork_id:S.id,enhance_image:!0,selected_by:"jiffy",metadata:null==(eM=r.result.artwork)?void 0:eM.metadata})),e.artworks.length>=1&&!e.artworks.some(function(e){return e.isLoading})&&e.getArtworksPricing(),eu||((0,l.Py)("image_processing_completed",{payload:{process_data:m,stream_name:"dtf_channel_".concat(e.dtfChannelUuid),action_type:r.action,worker_enhancement:r.worker_enhancement},business_line:e.businessLine,artwork_id:m.artwork_id}),e1=(null==(eU=m.artwork)?void 0:eU.no_bg_imgix_url)||(null==(eH=m.artwork)?void 0:eH.with_bg_imgix_url)||(null==(eV=m.artwork)?void 0:eV.no_bg_url)||(null==(eG=m.artwork)?void 0:eG.with_bg_url),e2=(null==(eK=m.artwork)?void 0:eK.original_image_imgix_url)||(null==(eW=m.artwork)?void 0:eW.original_image_url),(0,u.Zm)(_object_spread(_object_spread_props(_object_spread({},null!=m.artwork_id&&{artwork_id:String(m.artwork_id)}),{dpi:null==(e$=m.artwork)||null==(eQ=e$.metadata)?void 0:eQ.dpi,location:null==(eZ=m.artwork)||null==(eJ=eZ.metadata)?void 0:eJ.uploaded_on,file_name:null==(eY=m.artwork)?void 0:eY.filename,file_type:null==(eX=m.artwork)?void 0:eX.filetype,file_size:null==(e0=m.artwork)?void 0:e0.filesize,business_line:e.businessLine,artworks_count:e.artworks.length,pre_cut_transfers:e.preCut}),e1&&{enhanced_image_url:e1},e2&&{original_image_url:e2})),null!=m.artwork_id&&n.api.dtf.acknowledgeArtwork({id:m.artwork_id},void 0,{silent:!0}
1).catch(function(){}),null!=(e3=null!=(ez=m.artwork_id)?ez:null==S?void 0:S.id)&&(e.updateArtworkValuesById({id:e3,imageProcessingCompletedEventSent:!0}),e.updatePrintReadyInfoState(e3))),[2]}if(!((null==m?void 0:m.artwork)&&S))return[3,6];return[4,markEnhancementCompleted(e,S,m.artwork,m,r)];case 5:tc.sent(),tc.label=6;case 6:if("spangle_image"===r.action)return t.setLastSpangledDimensions({width:null!=(e4=null==(e6=m.artwork)||null==(e8=e6.metadata)?void 0:e8.width_inch)?e4:null,height:null!=(e5=null==(te=m.artwork)||null==(e7=te.metadata)?void 0:e7.height_inch)?e5:null}),e.setLoadedArtwork({artwork:m.artwork}),t.setOriginalArtworkUrl(null!=(e9=null==(tt=m.artwork)?void 0:tt.url)?e9:""),e.getArtworksPricing(),[2];if("tags_ready"===r.action)return("show_upsell"===(tr=null==m?void 0:m.upsell_verdict)||"skip"===tr||"unknown"===tr)&&w.Zs.set(w.aW,tr),[2];return m.success||(to=m.artwork,null!=(ta=null!=(tn=null==S?void 0:S.id)?tn:m.artwork_id)&&e.handleProcessError({file:{originalIndex:(0,o.E)(e.artworks,ta),name:null==to?void 0:to.name,type:null==to?void 0:to.filetype,size:null==to?void 0:to.filesize,width:null==to||null==(ti=to.metadata)?void 0:ti.width,height:null==to||null==(ts=to.metadata)?void 0:ts.height},errorResponse:m})),[3,8];case 7:return console.error("[DtfChannel] received error:",tl=tc.sent()),(0,f.notifyError)("DtfChannel received handler error",{params:{error:String(tl)}}),[3,8];case 8:return[2]}})}).call(this)},connected:function(){var r=this,n=e.actionCableOptions,o=n.artworkIds,i=n.artworkWidth,l=n.artworkHeight,c=n.processArtwork,u=n.urlPreCut,d=n.fileContentType,p=n.artworkPaddingSize,f=n.artworkBgColor,_=n.artworkColor,m=n.artworkShape;o&&e.preloadArtworks({artworkIds:o,artworkWidth:i,artworkHeight:l,processArtwork:c,urlPreCut:u,fileContentType:d,artworkPaddingSize:p,artworkBgColor:f,artworkColor:_,artworkShape:m}),e.actionCableConnected||(e.cleanupPolling(),e.setActionCableConnected(!0),e.setIsRetrying(!0),e.isSpangle&&t.resetCompletedSpangleData(),e.artworks.forEach(function(t){var n=t.lastWebSocketEventData,o=null==n?void 0:n.data,i=null==n?void 0:n.result,l=null!=o&&(void 0===o?"undefined":_type_of(o))==="object"&&Object.keys(o).length>0&&null!=i&&(void 0===i?"undefined":_type_of(i))==="object"&&Object.keys(i).length>0;if(t.lastWebSocketEvent&&n&&Object.keys(n).length>0&&l){var c=(0,h.s)().getTime();r.perform("continue_dtf_artwork_process",{last_process:t.lastWebSocketEvent,last_process_data:n.result,data:_object_spread_props(_object_spread({},n.data),{processTimeStamp:c,experiments:e.experiments})}),e.updateArtworkValuesById({id:t.id,lastWebSocketEvent:null,lastWebSocketEventData:{},processTimeStamp:c}
1),e.markJiffyFirstArtworkRestamped(t.id),e.isJiffyFirstArtworkProcessing(t.id)&&e.schedulePollingFallback(t.id)}else t.enhancementCompleted||t.lastWebSocketEvent&&l||e.schedulePollingFallback(t.id)}))},disconnected:function(){e.setActionCableConnected(!1),e.artworks.forEach(function(t){t.isLoading&&!t.enhancementCompleted&&e.schedulePollingFallback(t.id,{initialDelay:m.C9})})},spangle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.perform("spangle",e)}})}},612141(e,t,r){"use strict";r.d(t,{Ml:()=>trackAddToCart,mj:()=>trackPDPPageVisit});var n=r(433769),o=r(586519),i=r(774280),l=r(768564);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var c={get $dtfContainer(){return document.querySelector("#vue-product-details-dtf")},get $productContainer(){return document.querySelector("#product-page-container")},get $formEventId(){return document.querySelector(l.A.selectors.formEventId)}},getAppConfig=function(){var e,t=c.$dtfContainer;if(!(null==t||null==(e=t.dataset)?void 0:e.appConfig))return void console.error("DTF container or app config not found");try{var r=JSON.parse(t.dataset.appConfig);return{product:r.product,variant:r.variant,fbData:JSON.parse(r.fb_data||"{}")}}catch(e){console.error("Failed to parse app config:",e);return}},getProductName=function(e){return"".concat(e.brand," ").concat(e.catalog_number)},buildFbContent=function(e,t,r){return{content_ids:[r],content_name:getProductName(e),content_category:e.adwords_category,content_type:"product",user_data:t}},buildEcommerceData=function(e,t){return{currency:t.currency,value:Number(e.retail_price)||0,items:[{item_id:t.sku,item_name:getProductName(e),item_brand:e.brand,item_category:e.adwords_category,price:e.retail_price}]}},generateEventId=function(e,t){return"".concat(e,"-").concat(t,"-").concat(Date.now())},trackPDPPageVisit=function(){var e,t=getAppConfig();if(t){var r=t.product,l=t.variant,c=t.fbData;try{(0,n.track)("product_viewed",{brand:r.brand,product:"".concat(r.brand," ").concat(r.catalog_number),product_category:r.adwords_category,main_product_category:r.main_product_category,business_line:r.business_line,spree_composition_id:l.composition_id})}catch(e){(0,o.notifyError)(_instanceof(e,Error)?e:Error(String(e)),{context:{source:"dtf-ga-tracker.trackPDPPageVisit",event:"product_viewed",catalog_number:r.catalog_number,business_line:r.business_line}})}var u=(null==(e=c.external_id)?void 0:e[0])||(0,i.k)(),d={event:"PDPPageVisit",items:[{product_id:l.sku}],msAdProductIds:[l.sku],viewItemValue:r.retail_price,pageViewEventId:generateEventId("PV",u),viewContentEventId:generateEventId("VC",u),fbContent:buildFbContent(r,c,l.sku),itemsViewed:[{name:getProductName(r),id:l.sku,brand:r.brand,price:r.retail_price,google_business_vertical:"retail"}],ecommerce:buildEcommerceData(r,l)};(0,n.sendDataLayer)(d)}},trackAddToCart=function(e,t){var r,o,i,l=getAppConfig();if(l){var u=l.product,d=l.variant,p=l.fbData,f=null==(r=c.$formEventId)?void 0:r.value,_=null==(i=c.$productContainer)||null==(o=i.dataset)?void 0:o.orderEmail,h={event:"AddToCart",itemsAdded:{id:d.sku,name:getProductName(u),brand:u.brand,price:u.retail_price,currency:d.currency,sku:d.sku,quantity:e},email:_,addToCartEventId:f,addToCartValue:t,fbContent:buildFbContent(u,p,d.sku),ecommerce:buildEcommerceData(u,d)};(0,n.sendDataLayer)(h)}}},189924(e,t,r){"use strict";r.d(t,{l:()=>o,z:()=>buildDtfAddBlockedProperties});var n=r(681236);function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var o="dtf_add_blocked_by_order_state",buildDtfAddBlockedProperties=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gang_builder_pdp";if(!e||(void 0===e?"undefined":_type_of(e))!=="object"||!1!==e.success||"order_state_invalid"!==e.error)return null;var r=e.order_state;return{order_state:"string"==typeof r?r:null,source:t,page_url:"u">typeof window?window.location.href:"",user_id:(0,n.F6)()}}},112352(e,t,r){"use strict";r.d(t,{Y:()=>loadGangSheetBuilder});var existingBuilder=function(){var e;return null!=(e=window.gs_builder)?e:null},n=null;function loadGangSheetBuilder(){var e=existingBuilder();return e?Promise.resolve(e):(n||(n=new Promise(function(e){var t=document.createElement("script"),r=!1,settle=function(i){r||(r=!0,window.clearTimeout(o),t.onload=null,t.onerror=null,i||(n=null,t.remove()),e(i))},o=window.setTimeout(function(){return settle(null)},15e3);t.src="https://app.buildagangsheet.com/assets/v1/scripts/gs-builder.min.js",t.async=!0,t.onload=function(){return settle(existingBuilder())},t.onerror=function(){return settle(null)},document.head.appendChild(t)})),n)}},229574(e,t,r){"use strict";r.d(t,{A:()=>LocalDeliveryProgress});var n=r(483134),o=r(293534),i=r(650503),l=r(678373),c=r(20525);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function warnNotAdjacent(){}function LocalDeliveryProgress(e){var t=e.offer,r=e.pageSubtotal,u=(0,o.useRef)(null),d=t?(0,c.IQ)(t,r):null;return(0,o.useEffect)(function(){var e,t=null==(e=u.current)?void 0:e.previousElementSibling;if(_instanceof(t,HTMLElement)){var r=null,hide=function(){if(r||!t.querySelector(".js-pdp-shipping-progress-bar-wrapper"))return!1;var e=t.hidden;return t.hidden=!0,r=function(){t.isConnected&&(t.hidden=e)},!0},n=null;
1return hide()||(warnNotAdjacent(),(n=new MutationObserver(function(){hide()&&(null==n||n.disconnect())})).observe(t,{childList:!0,subtree:!0})),function(){null==n||n.disconnect(),null==r||r()}}},[]),(0,n.jsx)("div",{ref:u,className:"product-details-dtf__local-delivery","data-testid":"dtf-local-delivery",children:d?(0,n.jsxs)("div",{className:"free-shipping-progress__progress-bar","data-testid":"dtf-local-delivery-bar",children:[(0,n.jsx)("div",{className:"free-shipping-progress__progress-bar-header",children:d.complete?(0,n.jsxs)("div",{className:"free-shipping-progress__progress-bar-title","data-testid":"dtf-local-delivery-complete",children:[(0,n.jsx)("div",{className:"free-shipping-progress__progress-bar-icon-wrap",children:(0,n.jsx)(i.A,{className:"free-shipping-progress__progress-bar-icon-complete",width:44,height:32})}),(0,n.jsx)("span",{className:"free-shipping-progress__progress-bar-text-complete",children:d.text})]}):(0,n.jsxs)("div",{className:"free-shipping-progress__progress-bar-title","data-testid":"dtf-local-delivery-shortfall",children:[(0,n.jsx)("div",{className:"free-shipping-progress__progress-bar-icon-wrap",children:(0,n.jsx)(l.A,{className:"free-shipping-progress__progress-bar-icon-delivery",width:32,height:32})}),(0,n.jsxs)("span",{className:"free-shipping-progress__progress-bar-text",children:[(0,n.jsx)("span",{className:"free-shipping-progress__progress-bar-total",children:(0,c.nT)(d.shortfall)})," ",d.text]})]})}),(0,n.jsxs)("div",{className:"progress-bar free-shipping-progress__progress-bar-component",role:"progressbar","aria-valuemin":0,"aria-valuemax":d.mark,"aria-valuenow":Math.min(d.total,d.mark),"aria-label":d.ariaLabel,"data-testid":"dtf-local-delivery-progress",children:[(0,n.jsx)("span",{children:"$0"}),(0,n.jsx)("div",{className:"progress-bar__line-wrap",children:(0,n.jsx)("div",{className:d.complete?"progress-bar__line progress-bar__line--complete":"progress-bar__line",style:{width:"".concat(d.percent,"%")}})}),(0,n.jsx)("span",{children:(0,c.Wx)(d.mark)})]})]}):null})}},20525(e,t,r){"use strict";r.d(t,{IQ:()=>projectLocalBar,Wx:()=>markLabel,mx:()=>pageSubtotalForBar,nT:()=>formatDollars,sK:()=>resolveLocalLaneOffer});var n=r(283952),o=r(482797);function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var round2=function(e){return Math.round((e+Number.EPSILON)*100)/100};function resolveLocalLaneOffer(e,t){var r=t.zipcode,i=t.now,l=void 0===i?(0,o.s)().getTime():i;if(void 0===e||null===e||(void 0===e?"undefined":_type_of(e))!=="object"||Array.isArray(e))return{kind:"unknown"};var c=(0,n.Ik)(e),u=(0,n.Ik)(c.local_popup_cart);if(!r||u.zipcode!==r)return{kind:"unknown"};var d=(0,n.gi)(c,r);if(!d.ok)return"no_local_group"===d.reason?{kind:"legacy"}:{kind:"unknown"};var p=(0,n.Vp)(c,d.selection.option,l);if(!p.ok)return{kind:"unknown"};var f=p.priced,_=f.lane,h=f.free,m=f.total,g=f.barMark,b=f.bar,y=f.smallOrderFee,v=f.expiresAt;return{kind:"local",lane:_,free:h,cartTotal:m,mark:g,bar:b,smallOrderFee:y,sameDayPrice:(0,n.TG)((0,n.Ik)(c.joint_shipping).same_day_price),expiresAt:v}}function projectLocalBar(e,t){if(null===e.bar||null===e.mark)return null;var r,n=Number.isFinite(t)?Math.max(0,t):0,o=round2(e.cartTotal+n),i=o>=e.mark,l=i?0:round2(e.mark-o),c="fastest"===e.lane?"Next Day":"Same Day";return r="fee"===e.bar?i?"No small-order fee":null===e.sameDayPrice?"until the ".concat(formatDollars(e.smallOrderFee)," small-order fee drops"):"until delivery in hours, for only ".concat(formatDollars(e.sameDayPrice)):i?"FREE ".concat(c," delivery"):"until FREE ".concat(c," delivery"),{bar:e.bar,complete:i,total:o,mark:e.mark,shortfall:l,percent:Math.min(100,o/e.mark*100),text:r,ariaLabel:"fee"===e.bar?"Local small-order fee progress":"Local ".concat(c," free delivery progress")}}function pageSubtotalForBar(e){var t=e.orderSubtotal;if(0===e.workspaceCount)return 0;var r=Number(t);return!Number.isFinite(r)||r<=0?0:r}function formatDollars(e){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(e)}function markLabel(e){return Number.isInteger(e)?"$".concat(e):formatDollars(e)}},921828(e,t,r){"use strict";r.d(t,{d:()=>useLocalDeliveryOffer});var n=r(293534),o=r(927937),i=r(482797),l=r(277889),c=r(864188),u=r(20525);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var clearTimer=function(e){null!==e.current&&clearTimeout(e.current),e.current=null};function useLocalDeliveryOffer(e){var t=e.surface,r=e.gated,d=e.active,p=e.readWorkspace,f=_sliced_to_array((0,n.useState)("resolving"),2),_=f[0],h=f[1],m=_sliced_to_array((0,n.useState)(null),2),g=m[0],b=m[1],y=_sliced_to_array((0,n.useState)(!1),2),v=y[0],w=y[1],j=_sliced_to_array((0,n.useState)(0),2),k=j[0],x=j[1],S=_sliced_to_array((0,n.useState)(0),2),O=S[0],P=S[1],A=(0,n.useRef)(0),C=(0,n.useRef)(null),I=(0,n.useRef)(null),E=(0,n.useRef)(null),N=(0,n.useRef)(null),D=(0,n.useRef)(!1),T=(0,n.useRef)(!1),M=(0,n.useRef)(!1),R=(0,n.useRef)(!1),F=(0,n.useRef)(null),L=(0,n.useRef)(null),B=(0,n.useRef)(!1),z=(0,n.useRef)(!1),U=(0,n.useRef)(!1),H=(0,n.useRef)(!0),q=(0,n.useRef)(function(){}),V=t&&(r||v);T.current=V&&r&&d;var G=(0,n.useCallback)(function(){clearTimer(C),clearTimer(I)},[]),K=(0,n.useCallback)(function(){G(),F.current=null,b(null),h("resolving")},[G]),refresh=function(){return P(function(e){return e+1})},armExpiry=function(e,t){var arm=function(){var r=e-(0,i.s)().getTime();if(r>0x7fffffff){C.current=setTimeout(arm,0x7fffffff);return}C.current=setTimeout(function(){H.current&&t===A.current&&(F.current=null,b(null),h("unknown"),"visible"===document.visibilityState?I.current=setTimeout(refresh,Math.floor(30001*Math.random())):M.current=!0)},Math.max(0,r))};arm()};q.current=function(){if(T.current){if(z.current){U.current=!0;return}z.current=!0,B.current=!0,M.current=!1,R.current=!1,A.current+=1;var e=A.current,t=document.documentElement.dataset.zipcode||"",r=!1,isCurrent=function(){return H.current&&e===A.current&&t===(document.documentElement.dataset.zipcode||"")};N.current=setTimeout(function(){r=!0,isCurrent()&&(A.current+=1,F.current=null,b(null),h("unknown"),R.current=!0),N.current=null},15e3),l.api.vueCart.localPopupDelivery({cb:(0,i.s)().getTime()}).then(function(n){if(!r&&isCurrent()){var o=(0,u.sK)(n,{zipcode:t});"local"===o.kind?(F.current=o,b(o),h("local"),armExpiry(o.expiresAt,e)):(F.current=null,b(null),h(o.kind),"unknown"===o.kind&&(R.current=!0))}}).catch(function(){!r&&isCurrent()&&(F.current=null,b(null),h("unknown"),R.current=!0)}).finally(function(){r||clearTimer(N),z.current=!1,H.current&&U.current&&T.current&&(U.current=!1,refresh())})}},(0,n.useLayoutEffect)(function(){D.current=V},[V]),(0,n.useLayoutEffect)(function(){if(!V){A.current+=1,U.current=!1,G(),F.current=null,b(null);return}if(!r||!d){A.current+=1,U.current=!1,K();return}K(),q.current()},[d,r,V,O,G,K]),(0,n.useEffect)(function(){return H.current=!0,function(){H.current=!1,A.current+=1,U.current=!1,G(),clearTimer(E),clearTimer(N)}},[G]),(0,n.useEffect)(function(){if(t){var debounceRefresh=function(){D.current&&(clearTimer(E),E.current=setTimeout(refresh,250))},onAdded=function(){return debounceRefresh()},onQuantity=function(e,t){(null==t?void 0:t.initialHydration)!==!0&&debounceRefresh()},e=(0,o.ZV)(function(e,t){if(!t){B.current=!1,w(D.current),A.current+=1,G(),F.current=null,b(null),h("resolving");return}L.current=!0===e.dallas&&!0===e.blanks,x(function(e){return e+1})});return c.EventBus.on(c.Events.ITEMS_ADDED_TO_CART,onAdded),c.EventBus.on(c.Events.CART_QUANTITY_UPDATED,onQuantity),function(){clearTimer(E),c.EventBus.removeEventListener(c.Events.ITEMS_ADDED_TO_CART,onAdded),c.EventBus.removeEventListener(c.Events.CART_QUANTITY_UPDATED,onQuantity),e(),L.current=null,B.current=!1,w(!1)}}},[t,G]),(0,n.useEffect)(function(){if(null!==L.current&&r===L.current){var e=L.current;L.current=null,w(!1),e&&!B.current&&refresh()}},[r,k]),(0,n.useEffect)(function(){if(V){var onVisibilityChange=function(){if("visible"!==document.visibilityState){null!==I.current&&(clearTimer(I),M.current=!0);return}var e=F.current&&F.current.expiresAt<=(0,i.s)().getTime();(M.current||R.current||e)&&(M.current=!1,R.current=!1,G(),refresh())};return document.addEventListener("visibilitychange",onVisibilityChange),function(){return document.removeEventListener("visibilitychange",onVisibilityChange)}}},[V,G]);var W=_;return V?v&&!r&&(W="resolving"):W="off",{managed:V,status:W,offer:g,pageSubtotal:(0,u.mx)(p())}}},368126(e,t,r){"use strict";r.d(t,{k:()=>RedesignRoot});var n=r(483134),o=r(38706),i=r(651026),l=r(712790),c=r(512323),u=r(730769),d=r
1(982196),p=r(362459),f=r(823126);function RedesignRoot(e){var t=e.overlays,r=void 0===t?null:t,_=e.slots,h=e.imagingPromise,m=(0,f.a)();return(0,u.g)(m),(0,n.jsx)(o.B,{payload:void 0===h?null:h,children:(0,n.jsx)(c.Yo,{slots:void 0===_?{}:_,children:(0,n.jsx)("div",{className:"dtf-redesign-root","data-testid":"dtf-redesign-root","data-page-state":m,children:"uploaded"===m?(0,n.jsxs)(i.F,{children:[(0,n.jsx)(p.G,{}),r]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.p,{}),(0,n.jsx)(l.z,{children:r})]})})})})}},545609(e,t,r){"use strict";r.d(t,{s:()=>EnhancementLoaderCard});var n=r(483134),o=r(997252),i=r(240896),l=r(980792),c=r(560695);function EnhancementLoaderCard(e){var t=e.className,r=e.isComplete,u=(0,c.p)(r),d=u.accent,p=u.rest,f=u.percentage,_=u.secondsRemaining,h=u.showCountdown;return(0,n.jsx)("div",{className:(0,o.cn)(i.B6,t),"data-testid":"".concat(i.Os,"-layer"),children:(0,n.jsxs)("div",{className:i.Q1,role:"status","aria-live":"polite","data-testid":i.Os,children:[(0,n.jsx)("div",{className:i.b2,children:(0,n.jsx)(l.G,{})}),(0,n.jsxs)("div",{className:i.Kz,children:[(0,n.jsxs)("div",{className:i.il,"data-testid":"".concat(i.Os,"-caption"),children:[(0,n.jsx)("span",{className:i.v8,children:d}),(0,n.jsx)("span",{children:p})]}),(0,n.jsx)("div",{className:i.NQ,"aria-hidden":"true","data-testid":"".concat(i.Os,"-progress"),children:(0,n.jsx)("div",{className:i.Fg,style:{width:"".concat(f,"%")},"data-testid":"".concat(i.Os,"-progress-fill")})}),(0,n.jsx)("div",{className:i.X2,"aria-hidden":"true","data-testid":"".concat(i.Os,"-countdown"),children:h?"Time remaining: ".concat(_,"s"):null})]})]})})}},980792(e,t,r){"use strict";r.d(t,{G:()=>GenLogoAnimation});var n=r(483134),o=r(997252),i=r(270312),l=r(240896);function GenLogoAnimation(e){var t=e.className;return(0,n.jsxs)("div",{className:(0,o.cn)("dtf-gen-logo",l.dB,t),"aria-hidden":"true","data-testid":"".concat(l.Os,"-logo"),children:[(0,n.jsx)("div",{className:"dtf-gen-logo__ghost","data-testid":"".concat(l.Os,"-logo-ghost"),children:(0,n.jsx)(i.A,{className:l.Pz})}),(0,n.jsx)("div",{className:"dtf-gen-logo__sharp","data-testid":"".concat(l.Os,"-logo-sharp"),children:(0,n.jsx)(i.A,{className:l.Pz})}),(0,n.jsx)("div",{className:"dtf-gen-logo__beam","data-testid":"".concat(l.Os,"-logo-beam")})]})}},240896(e,t,r){"use strict";r.d(t,{B6:()=>l,Fg:()=>g,Kl:()=>o,Kz:()=>f,NQ:()=>m,Os:()=>y,Pz:()=>p,Q1:()=>c,X2:()=>b,_h:()=>n,b2:()=>u,d2:()=>i,dB:()=>d,il:()=>_,v8:()=>h});var n=7500,o=45,i=1e3,l="pointer-events-none absolute inset-0 z-5 grid place-items-center overflow-hidden p-2",c="pointer-events-auto flex max-h-full w-[283px] max-w-full flex-col overflow-hidden rounded-[12px] border border-gray-200 bg-white shadow-[0_4px_6px_-2px_rgba(18,25,38,0.03),0_12px_16px_-4px_rgba(18,25,38,0.08)]",u="flex h-[180px] min-h-[96px] shrink items-center justify-center overflow-hidden",d="w-[185px] shrink-0",p="w-[85.2%]",f="flex shrink-0 flex-col gap-1 px-[22px] pb-4",_="text-center text-[12px] font-semibold leading-[20px] text-gray-900",h="bg-[linear-gradient(104deg,#ad46ff_6.2%,#155dfc_100%)] bg-clip-text text-transparent",m="h-[6px] w-full overflow-hidden rounded-full bg-gray-300",g="h-full rounded-full bg-blue-700 transition-[width] duration-400 ease-out motion-reduce:transition-none",b="min-h-4 text-center text-[12px] font-normal leading-4 text-gray-500",y="dtf-enhancement-loader-card"},748849(e,t,r){"use strict";r.d(t,{sZ:()=>n.s});var n=r(545609);r(980792)},560695(e,t,r){"use strict";r.d(t,{p:()=>useEnhancementSequence});var n=r(293534),o=r(413861),i=r(240896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var l=o.k0.length-1,c=o.XI-1;function useEnhancementSequence(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=_sliced_to_array((0,n.useState)(0),2),r=t[0],u=t[1],d=_sliced_to_array((0,n.useState)(i.Kl),2),p=d[0],f=d[1];(0,n.useEffect)(function(){var e=setInterval(function(){u(function(e){return Math.min(e+1,l)})},i._h);return function(){clearInterval(e)}},[]),(0,n.useEffect)(function(){if(!e&&!(p<=0)){var t=setInterval(function(){f(function(e){return Math.max(e-1,0)})},i.d2);return function(){clearInterval(t)}}},[e,p]);var _=e?c:r,h=e?c:r;return{index:_,accent:e?o.o6:o.nL,rest:e?o.uj:" ".concat(o.k0[r],"..."),percentage:(h+1)/o.XI*100,secondsRemaining:p,showCountdown:!e&&p>0}}},795451(e,t,r){"use strict";r.d(t,{E:()=>Badge});var n=r(483134),o=r(997252),i=r(898227);function Badge(e){var t=e.badgeId,r=e.children,l=e.className;return(0,n.jsx)("span",{className:(0,o.cn)(i.dh,l),"data-testid":"".concat(t,"-badge"),children:r})}},256185(e,t,r){"use strict";r(483134),r(795451)},92763(e,t,r){"use strict";r(483134),r(795451)},898227(e,t,r){"use strict";r.d(t,{dh:()=>n});var n="inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-semibold whitespace-nowrap"},611210(e,t,r){"use strict";r.d(t,{Ex:()=>n.E});var n=r(795451);r(256185),r(92763)},699749(e,t,r){"use strict";r.d(t,{Z:()=>Card});var n=r(483134),o=r(997252),i=r(375800),l=r(374836);function Card(e){var t=e.cardId,r=e.children,c=e.className;return(0,n.jsx)(i.d,{value:{cardId:t},children:(0,n.jsx)("div",{className:(0,o.cn)(l.Ix,c),"data-testid":"".concat(t,"-card"),children:r})})}},351297(e,t,r){"use strict";r.d(t,{b:()=>CardBody});var n=r(483134),o=r(997252),i=r(375800),l=r(374836);function CardBody(e){var t=e.children,r=e.className,c=(0,i.f)().cardId;return(0,n.jsx)("div",{className:(0,o.cn)(l.p$,r),"data-testid":"".concat(c,"-card-body"),children:t})}},375800(e,t,r){"use strict";r.d(t,{d:()=>i,f:()=>useCardContext});var n=r(293534),o=(0,n.createContext)(null),i=o.Provider;function useCardContext(){var e=(0,n.use)(o);if(!e)throw Error("Card parts must be rendered inside a <Card> or <Panel>.");return e}},996176(e,t,r){"use strict";r(483134),r(375800)},91490(e,t,r){"use strict";r.d(t,{a:()=>CardHeader});var n=r(483134),o=r(997252),i=r(375800),l=r(374836);function CardHeader(e){var t=e.children,r=e.className,c=(0,i.f)().cardId;return(0,n.jsx)("div",{className:(0,o.cn)(l.qh,r),"data-testid":"".concat(c,"-card-header"),children:t})}},351749(e,t,r){"use strict";r(483134),r(375800)},374836(e,t,r){"use strict";r.d(t,{Ix:()=>n,p$:()=>i,qh:()=>o});var n="relative rounded-md border border-gray-200 bg-white shadow-sm",o="flex items-center justify-between gap-3 px-4 pt-4 pb-3 [&>h2]:pt-0!",i="px-4 pb-4 first:pt-4"},600837(e,t,r){"use strict";
1r.d(t,{Zp:()=>n.Z,aR:()=>o.a,bw:()=>i.b});var n=r(699749);r(351749);var o=r(91490),i=r(351297);r(996176)},629751(e,t,r){"use strict";r.d(t,{$F:()=>m,Ah:()=>l,Aj:()=>_,Dy:()=>p,JB:()=>f,SK:()=>h,SO:()=>c,WN:()=>i,bO:()=>g,dT:()=>n,gT:()=>o,z:()=>d});var n="w-64 shrink-0",o=3,i="600px 0px",l="Nothing to show here yet.",c="View all",u="size-10 shrink-0 max-md:hidden min-[1364px]:absolute min-[1364px]:top-1/2 min-[1364px]:-translate-y-1/2",d="".concat(u," min-[1364px]:left-[-68px]"),p="".concat(u," min-[1364px]:right-[-68px]"),f="relative flex items-center gap-2",_="-mx-1 px-1",h="gap-3 md:gap-6",m="mt-4 flex w-full items-center justify-center gap-2 rounded-lg border border-[#1e2949] px-6 py-4 text-base font-medium leading-6",g="focus-visible:outline-2! focus-visible:outline-offset-2 focus-visible:outline-blue-600!"},424505(e,t,r){"use strict";r.d(t,{v:()=>Chip});var n=r(483134),o=r(997252),i=r(971444),l=r(991204);function Chip(e){var t=e.chipId,r=e.label,c=e.removeLabel,u=e.children,d=e.className;return(0,n.jsx)(i.v,{value:{chipId:t,label:r,removeLabel:c},children:(0,n.jsx)("span",{className:(0,o.cn)(l.Qq,d),"data-testid":"".concat(t,"-chip"),children:u})})}},971444(e,t,r){"use strict";r.d(t,{h:()=>useChipContext,v:()=>i});var n=r(293534),o=(0,n.createContext)(null),i=o.Provider;function useChipContext(){var e=(0,n.use)(o);if(!e)throw Error("Chip parts must be rendered inside a <Chip>.");return e}},559971(e,t,r){"use strict";r.d(t,{R:()=>ChipLabel});var n=r(483134),o=r(997252),i=r(971444),l=r(991204);function ChipLabel(e){var t=e.children,r=e.className,c=(0,i.h)(),u=c.chipId,d=c.label;return(0,n.jsx)("span",{className:(0,o.cn)(l.hu,r),"data-testid":"".concat(u,"-chip-label"),children:null!=t?t:d})}},637221(e,t,r){"use strict";r.d(t,{D:()=>ChipRemoveButton});var n=r(483134),o=r(972173),i=r(997252),l=r(971444),c=r(991204);function ChipRemoveButton(e){var t=e.onRemove,r=e.className,u=(0,l.h)(),d=u.chipId,p=u.label,f=u.removeLabel;return(0,n.jsx)("button",{type:"button","aria-label":null!=f?f:"Remove ".concat(p),className:(0,i.cn)(c.k_,r),"data-testid":"".concat(d,"-chip-remove"),onClick:t,children:(0,n.jsx)(o.A,{"aria-hidden":"true",size:c.I$})})}},991204(e,t,r){"use strict";r.d(t,{I$:()=>l,Qq:()=>n,hu:()=>o,k_:()=>i});var n="inline-flex h-8 items-center gap-[7.64px] rounded-full bg-[#1d4ed8] pr-1.5 pl-[13px] text-[12px] font-semibold text-white",o="leading-none",i="inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-[rgba(255,255,255,0.4)] bg-[rgba(255,255,255,0.2)] text-white! transition-colors hover:bg-[rgba(255,255,255,0.35)] focus-visible:outline-2! focus-visible:outline-offset-2 focus-visible:outline-white!",l=11},605141(e,t,r){"use strict";r.d(t,{Do:()=>i.D,RN:()=>o.R,vu:()=>n.v});var n=r(424505),o=r(559971),i=r(637221)},640533(e,t,r){"use strict";r.d(t,{_:()=>DropzoneAcceptedTypes});var n=r(483134),o=r(293534),i=r(997252),l=r(164458),c=r(474801);function DropzoneAcceptedTypes(e){var t=e.className,r=(0,l.I)(),u=r.dropzoneId,d=r.acceptedTypesId,p=r.acceptedTypesSentence,f=r.registerAcceptedTypesHint;return(0,o.useEffect)(function(){return f(d),function(){return f(void 0)}},[d,f]),(0,n.jsx)("p",{id:d,className:(0,i.cn)(c.rs,t),"data-testid":"".concat(u,"-accepted-types"),children:p})}},186937(e,t,r){"use strict";r.d(t,{u:()=>DropzoneBrowseButton});var n=r(483134),o=r(997252),i=r(164458),l=r(474801);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEac
1h(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function DropzoneBrowseButton(e){var t=e.children,r=e.className,c=(0,i.I)(),u=c.dropzoneId,d=c.openPicker,p=c.describedById,f=c.disabled;return(0,n.jsx)("button",_object_spread_props(_object_spread({type:"button",className:(0,o.cn)(l.Xe,"disabled:cursor-not-allowed disabled:bg-blue-600/40 disabled:hover:bg-blue-600/40",r),"data-testid":"".concat(u,"-browse-button"),disabled:f},p?{"aria-describedby":p}:{}),{onKeyDown:function(e){"Enter"===e.key&&e.repeat&&e.preventDefault()},onClick:function(e){e.stopPropagation(),d()},children:t}))}},164458(e,t,r){"use strict";r.d(t,{G:()=>i,I:()=>useDropzoneContext});var n=r(293534),o=(0,n.createContext)(null),i=o.Provider;function useDropzoneContext(){var e=(0,n.use)(o);if(!e)throw Error("Dropzone subcomponents must be rendered inside a <DropzoneProvider>. Compose a variant (HeroDropzone / MoreFilesDropzone / MobileDropzone) or wrap them yourself.");return e}},85066(e,t,r){"use strict";r.d(t,{l:()=>DropzoneErrors});var n=r(483134),o=r(997252),i=r(164458),l=r(474801);function DropzoneErrors(e){var t=e.className,r=(0,i.I)(),c=r.dropzoneId,u=r.rejections,d=r.rejectionBatchId;return(0,n.jsx)("div",{className:(0,o.cn)("mt-2",t),"data-testid":"".concat(c,"-errors"),role:"status","aria-live":"polite",children:u.map(function(e,t){return(0,n.jsx)("p",{className:l.QE,children:"".concat(e.fileName,": ").concat(e.reason)},"".concat(d,"-").concat(t))})})}},931489(e,t,r){"use strict";r.d(t,{K:()=>DropzoneFileInput});var n=r(483134),o=r(164458);function DropzoneFileInput(){var e=(0,o.I)(),t=e.dropzoneId,r=e.inputId,i=e.inputRef,l=e.acceptAttribute,c=e.multiple,u=e.handleFiles,d=e.disabled;return(0,n.jsx)("input",{ref:i,type:"file",id:r,className:"hidden","data-testid":"".concat(t,"-file-input"),accept:l,multiple:c,disabled:d,onChange:function(e){var t,r=e.target.getAttribute("data-upload-source");u(Array.from(null!=(t=e.target.files)?t:[]),"browse",r),i.current&&(i.current.value="")}})}},428964(e,t,r){"use strict";r.d(t,{R:()=>DropzoneProvider});var n=r(483134),o=r(293534),i=r(26867),l=r(474801),c=r(164458),u=r(701378);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function DropzoneProvider(e){var t=e.dropzoneId,r=e.onFilesAccepted,d=e.onFilesRejected,p=e.printAsIs,f=void 0!==p&&p,_=e.multiple,h=void 0===_||_,m=e.maxFiles,g=void 0===m?l.$c:m,b=e.perFileValidation,y=void 0===b||b,v=e.disabled,w=void 0!==v&&v,j=e.children,k=(0,o.useRef)(null),x=_sliced_to_array((0,o.useState)(0),2),S=x[0],O=x[1],P=_sliced_to_array((0,o.useState)([]),2),A=P[0],C=P[1],I=_sliced_to_array((0,o.useState)(0),2),E=I[0],N=I[1],D=_sliced_to_array((0,o.useState)(void 0),2),T=D[0],M=D[1],R=(0,o.useId)(),F=S>0&&!w,L=(0,o.useCallback)(function(){var e;w||null==(e=k.current)||e.click()},[w]),B=(0,o.useCallback)(function(e,t,n){if(!w&&0!==e.length){var o=h?g:1,i=(0,u.k)(e,{printAsIs:f,maxFiles:o,perFile:y}),l=i.accepted,c=i.refused;C(c),N(function(e){return e+1}),c.length>0&&(null==d||d(c,t)),l.length>0&&r(l,t,null!=n?n:null)}},[w,g,h,r,d,y,f]),z=(0,o.useCallback)(function(e){return M(e)},[]),U=(0,o.useCallback)(function(){return O(function(e){return w?e:e+1})},[w]),H=(0,o.useCallback)(function(){return O(function(e){return Math.max(0,e-1)})},[]);(0,o.useEffect)(function(){if(0!==S){var reset=function(){return O(0)};return window.addEventListener("dragend",reset),window.addEventListener("drop",reset),function(){window.removeEventListener("dragend",reset),window.removeEventListener("drop",reset)}}},[S]);var q=(0,o.useCallback)(function(e){O(0),B(e,"drop")},[B]),V=(0,o.useMemo)(function(){return{dropzoneId:t,inputId:"".concat(t,"-file-input-").concat(R),acceptedTypesId:"".concat(t,"-accepted-types-").concat(R),describedById:T,registerAcceptedTypesHint:z,isDragOver:F,disabled:w,rejections:A,rejectionBatchId:E,acceptAttribute:(0,i.hZ)(f),acceptedTypesSentence:(0,i.KA)(f),multiple:h,inputRef:k,openPicker:L,handleFiles:B,onDragEnter:U,onDragLeave:H,onDrop:q}},[t,R,T,z,F,w,A,E,f,h,L,B,U,H,q]);return(0,n.jsx)(c.G,{value:V,children:j})}},294318(e,t,r){"use strict";r.d(t,{n:()=>DropzoneSurface});var n=r(483134),o=r(997252),i=r(164458),l=r(474801);function DropzoneSurface(e){var t=e.children,r=e.className,c=(0,i.I)(),u=c.dropzoneId,d=c.isDragOver,p=c.disabled,f=c.openPicker,_=c.onDragEnter,h=c.onDragLeave,m=c.onDrop;return(0,n.jsx)("div",{className:(0,o.cn)(l.HW,!p&&l._x,d&&l.bV,r),"data-testid":"".concat(u,"-surface"),"data-drag-over":d?"true":"false","aria-disabled":p?"true":void 0,"data-disabled":p?"true":"false",onClick:function(e){var t=e.target;(null==t?void 0:t.closest(l.Px))||p||f()},onDragEnter:function(e){e.preventDefault(),e.stopPropagation(),_()},onDragOver:function(e){e.preventDefault(),e.stopPropagation()},onDragLeave:function(e){e.preventDefault(),e.stopPropagation(),h()},onDrop:function(e){var t,r;e.preventDefault(),e.stopPropagation(),m(Array.from(null!=(t=null==(r=e.dataTransfer)?void 0:r.files)?t:[]))},children:t})}},521063(e,t,r){"use strict";r(483134),r(640533),r(186937),r(85066),r(931489),r(428964),r(294318)},485333(e,t,r){"use strict";r(483134),r(640533),r(186937),r(85066),r(931489),r(428964),r(294318)}
1,224865(e,t,r){"use strict";r(483134),r(640533),r(186937),r(85066),r(931489),r(428964),r(294318)},26867(e,t,r){"use strict";r.d(t,{KA:()=>acceptedTypesSentence,hZ:()=>acceptAttribute,xW:()=>maxFileSizeBytes,ys:()=>maxFileSizeLabel});var n=r(727566),o=r(474801),primaryExtensionLabel=function(e){var t;return null==(t=e[0])?void 0:t.replace(".","").toUpperCase()};function acceptedTypeLabels(e){return e?["PNG"]:Object.values(n.EH).map(primaryExtensionLabel).filter(function(e){return!!e})}function acceptAttribute(e){return e?"image/png":(0,n.it)()}function maxFileSizeLabel(e){var t=e?o.l$:o.u3;return"".concat(t/1048576," MB")}function maxFileSizeBytes(e){return e?o.l$:o.u3}function acceptedTypesSentence(e){return"".concat(acceptedTypeLabels(e).join(", ")," \xb7 up to ").concat(maxFileSizeLabel(e))}},474801(e,t,r){"use strict";r.d(t,{$c:()=>i,HW:()=>d,Px:()=>u,QE:()=>m,Xe:()=>_,_x:()=>p,bV:()=>f,gi:()=>o,l$:()=>c,rC:()=>n,rs:()=>h,u3:()=>l});var n="dtf-upload-hero",o="dtf-upload-more-files",i=10,l=0x2800000,c=524288e3,u="button, a[href], input, select, textarea, label, [role='button'], [role='link'], [contenteditable='true']",d="relative flex flex-col items-center justify-center gap-3 rounded-xl border-2 border-dashed border-gray-300 bg-white p-6 text-center transition-colors duration-150",p="hover:border-blue-400 hover:bg-blue-50/40",f="border-blue-500 bg-blue-50",_="inline-flex items-center justify-center gap-2 rounded-lg bg-blue-600 px-5 py-2.5 text-base! font-semibold! text-white! transition-colors hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-700 focus-visible:ring-offset-2",h="text-sm text-gray-600",m="text-sm font-medium text-red-700"},156660(e,t,r){"use strict";r.d(t,{I2:()=>d.I,K6:()=>u.K,QE:()=>p.QE,R3:()=>n.R,_s:()=>l._,gi:()=>p.gi,lc:()=>c.l,nD:()=>o.n,rC:()=>p.rC,uq:()=>i.u}),r(521063),r(224865),r(485333);var n=r(428964),o=r(294318),i=r(186937),l=r(640533),c=r(85066),u=r(931489),d=r(164458);r(701378),r(26867);var p=r(474801)},701378(e,t,r){"use strict";r.d(t,{k:()=>validateFiles});var n=r(189155),o=r(26867),i=n.VX;function validateFiles(e,t){var r=t.printAsIs,n=t.maxFiles,l=t.perFile;if(e.length>n)return{accepted:[],refused:[{fileName:"".concat(e.length," files"),reason:"You can upload up to ".concat(n," file").concat(1===n?"":"s"," at a time.")}]};if(!(void 0===l||l))return{accepted:e,refused:[]};var c=[],u=[],d=(0,o.xW)(r);return e.forEach(function(e){var t=i(e,r);t.valid?e.size>d?u.push({fileName:e.name,reason:"File is too large. Maximum allowed size is ".concat((0,o.ys)(r),".")}):0===e.size?u.push({fileName:e.name,reason:"The selected file appears to be empty. Please select a different file."}):c.push(e):u.push({fileName:e.name,reason:t.message})}),{accepted:c,refused:u}}},498083(e,t,r){"use strict";function toCssLength(e){return"number"==typeof e?"".concat(e,"px"):e}function reservedBoxStyle(e){return{minHeight:toCssLength(e.minHeight)}}r.d(t,{VT:()=>reservedBoxStyle})},163906(e,t,r){"use strict";r.d(t,{C:()=>PendingFigure});var n=r(483134),o=r(997252);function PendingFigure(e){var t=e.className,r=e["data-testid"];return(0,n.jsx)("span",{"aria-hidden":"true","data-testid":r,className:(0,o.cn)("inline-block animate-pulse rounded-[3px] bg-[#e5e7eb] align-middle","motion-reduce:animate-none",t)})}},407433(e,t,r){"use strict";r.d(t,{C:()=>n.C});var n=r(163906)},903968(e,t,r){"use strict";r.d(t,{r:()=>RailCard});var n=r(483134),o=r(997252),i=r(821657),l=r(207449);function RailCard(e){var t=e.railId,r=e.title,c=e.headingLevel,u=e.children,d=e.className;return(0,n.jsx)(i.n,{value:{railId:t,title:r,headingLevel:void 0===c?2:c},children:(0,n.jsx)("section",{"aria-label":r,className:(0,o.cn)(l.jM,d),"data-testid":"".concat(t,"-rail-card"),children:u})})}},821657(e,t,r){"use strict";r.d(t,{L:()=>useRailCardContext,n:()=>i});var n=r(293534),o=(0,n.createContext)(null),i=o.Provider;function useRailCardContext(){var e=(0,n.use)(o);if(!e)throw Error("RailCard parts must be rendered inside a <RailCard>.");return e}},752997(e,t,r){"use strict";r.d(t,{Q:()=>RailCardFooter});var n=r(483134),o=r(997252),i=r(821657),l=r(207449);function RailCardFooter(e){var t=e.children,r=e.className,c=(0,i.L)().railId;return(0,n.jsx)("div",{className:(0,o.cn)(l.xg,r),"data-testid":"".concat(c,"-rail-footer"),children:t})}},901623(e,t,r){"use strict";r.d(t,{w:()=>RailCardHeader});var n=r(483134),o=r(997252),i=r(821657),l=r(207449);function RailCardHeader(e){var t=e.children,r=e.className,c=(0,i.L)(),u=c.railId,d=c.title,p=c.headingLevel;return(0,n.jsxs)("div",{className:(0,o.cn)(l.fq,r),"data-testid":"".concat(u,"-rail-header"),children:[(0,n.jsx)("h".concat(p),{className:l.iL,"data-testid":"".concat(u,"-rail-title"),children:d}),t]})}},684024(e,t,r){"use strict";r.d(t,{d:()=>RailCardScrollArea});var n=r(483134),o=r(997252),i=r(821657),l=r(207449);function RailCardScrollArea(e){var t=e.children,r=e.className,c=(0,i.L)(),u=c.railId,d=c.title;return(0,n.jsx)("div",{tabIndex:0,role:"group","aria-label":d,className:(0,o.cn)(l.bw,r),"data-testid":"".concat(u,"-scroll-area"),children:t})}},207449(e,t,r){"use strict";r.d(t,{bw:()=>l,fq:()=>o,iL:()=>i,jM:()=>n,xg:()=>c});var n="flex h-full flex-col overflow-hidden rounded-md border border-[#e1e1e5] bg-white shadow-[0px_25px_30px_rgba(0,0,0,0.05)]",o="flex shrink-0 items-center justify-between gap-3 px-4 py-3",i="pt-0! text-[17px]! font-bold leading-[19px] text-[#4b5565]",l="min-h-0 flex-1 overflow-y-auto px-4 py-3 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-600",c="shrink-0 px-4 py-3"},318588(e,t,r){"use strict";r.d(t,{QX:()=>l.Q,d7:()=>i.d,rq:()=>n.r,wm:()=>o.w});var n=r(903968),o=r(901623),i=r(684024),l=r(752997)},446489(e,t,r){"use strict";r.d(t,{l:()=>StepCompleteMark});var n=r(483134),o=r(997252),i=r(162666);function StepCompleteMark(e){var t=e.stepId,r=e.stepLabel,l=e.className;return(0,n.jsxs)("span",{className:(0,o.cn)(i.eo,i._2,l),"data-testid":"".concat(t,"-complete"),children:[(0,n.jsx)("svg",{className:i.lR,viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:(0,n.jsx)("polyline",{points:"2.5,6.5 5,9 9.5,3.5"})}),(0,n.jsx)("span",{className:"sr-only",children:"".concat(r," completed")})]})}},162666(e,t,r){"use strict";r.d(t,{_2:()=>o,eo:()=>n,lR:()=>i});var n="inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-white",o="bg-[#03a44d]",i="h-3 w-3"},305359(e,t,r){"use strict";r.d(t,{l:()=>n.l});var n=r(446489)},732814(e,t,r){"use strict";r.d(t,{a:()=>StepHeader});var n=r(483134),o=r(997252),i=r(925116);function StepHeader(e){var t=e.stepId,r=e.current,l=e.total,c=e.headingLevel,u=e.children,d=e.className;return(0,n.jsxs)("h".concat(void 0===c?2:c),{className:(0,o.cn)(i.Us,d),"data-testid":"".concat(t,"-step-header"),children:[(0,n.jsx)("span",{className:i.c7,"data-testid":"".concat(t,"-step-position"),children:"Step ".concat(r," of ").concat(l,":")}),(0,n.jsx)("span",{className:i.DV,"data-testid":"".concat(t,"-step-title"),children:u})]})}},925116(e,t,r){"use strict";r.d(t,{DV:()=>i,Us:()=>n,c7:()=>o});var n="flex flex-wrap items-baseline gap-x-1 gap-y-1 pt-0! text-[17px]! font-bold leading-[19px]",o="shrink-0 text-[#1d4ed8]",i="text-[#4b5565]"},568717(e,t,r){"use strict";r.d(t,{a:()=>n.a});var n=r(732814)},654595(e,t,r){"use strict";r.d(t,{C:()=>Stepper});var n=r(483134),o=r(293534),i=r(72285),l=r(987205),c=r(997252),u=r(913507),d=r(711045);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function Stepper(e){var t=e.stepperId,r=e.label,p=e.value,f=e.min,_=e.max,h=e.step,m=void 0===h?1:h,g=e.onChange,b=e.className,y=(0,o.useId)(),v=_sliced_to_array((0,o.useState)(function(){return String(p)}),2),w=v[0],j=v[1],k=_sliced_to_array((0,o.useState)(p),2),x=k[0],S=k[1];p!==x&&(S(p),j(String(p)));var O=p<=f,P=p>=_,commit=function(e){var t=(0,u.E0)(e,f,_);j(String(t)),t!==p&&g(t)},nudge=function(e){-1===e&&O||1===e&&P||commit((0,u.yw)(p+e*m,f,m))};return(0,n.jsxs)("div",{className:(0,c.cn)(d.zX,b),"data-testid":"".concat(t,"-stepper"),children:[(0,n.jsx)("button",{type:"button","aria-disabled":O,"aria-label":"Decrease ".concat(r),className:d.mq,"data-testid":"".concat(t,"-stepper-decrement"),onClick:function(){return nudge(-1)},children:(0,n.jsx)(i.A,{"aria-hidden":"true",size:d.Cn})}),(0,n.jsx)("label",{className:"sr-only",htmlFor:y,"data-testid":"".concat(t,"-stepper-label"),children:r}),(0,n.jsx)("input",{id:y,type:"number",inputMode:"decimal",min:f,max:_,step:m,value:w,className:d.GD,"data-testid":"".concat(t,"-stepper-input"),onChange:function(e){var t=e.target.value;j(t);var r=(0,u.LK)(t);if(null!==r){var n=(0,u.E0)((0,u.Qq)(r,f,m),f,_);r===n&&r!==p&&g(r)}},onBlur:function(){var e=(0,u.LK)(w);null===e?j(String(p)):commit((0,u.Qq)(e,f,m))}}),(0,n.jsx)("button",{type:"button","aria-disabled":P,"aria-label":"Increase ".concat(r),className:d.mq,"data-testid":"".concat(t,"-stepper-increment"),onClick:function(){return nudge(1)},children:(0,n.jsx)(l.A,{"aria-hidden":"true",size:d.Cn})})]})}},913507(e,t,r){"use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function clampToRange(e,t,r){return Math.min(Math.max(e,t),r)}function parseDraft(e){var t=e.trim();if(""===t)return null;var r=Number(t);return Number.isFinite(r)?r:null}function roundToStep(e,t,r){var n=Math.max(decimalPlaces(t),decimalPlaces(r));return 0===n?e:Number(e.toFixed(n))}function snapToStep(e,t,r){return r<=0?e:Number((t+Math.round((e-t)/r)*r).toFixed(Math.max(decimalPlaces(t),decimalPlaces(r))))}function decimalPlaces(e){var t=_sliced_to_array(String(Math.abs(e)).split("e-"),2),r=t[0],n=t[1],o=_sliced_to_array((void 0===r?"":r).split("."),2)[1];return(void 0===o?"":o).length+Number(void 0===n?"0":n)}r.d(t,{E0:()=>clampToRange,LK:()=>parseDraft,Qq:()=>snapToStep,yw:()=>roundToStep})},711045(e,t,r){"use strict";r.d(t,{Cn:()=>l,GD:()=>i,mq:()=>o,zX:()=>n});var n="inline-flex h-9 items-center rounded-md border border-[#e1e1e5] bg-white",o="inline-flex aspect-square h-full shrink-0 cursor-pointer items-center justify-center border-0 bg-transparent text-gray-900! transition-opacity hover:opacity-70 aria-disabled:cursor-default aria-disabled:opacity-30 aria-disabled:hover:opacity-30 focus-visible:outline-2! focus-visible:-outline-offset-2 focus-visible:outline-blue-600!",i="min-w-0 grow basis-14 border-none! bg-transparent py-2 text-center text-sm font-bold! text-gray-900! [appearance:textfield] focu
1s-visible:outline-2! focus-visible:-outline-offset-2 focus-visible:outline-blue-600! [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",l=14},610376(e,t,r){"use strict";r.d(t,{C1:()=>n.C,E0:()=>o.E0});var n=r(654595),o=r(913507)},257428(e,t,r){"use strict";r.d(t,{o:()=>Tab});var n=r(483134),o=r(997252),i=r(979820),l=r(238230),c=r(822227),u=r(726705);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function Tab(e){var t=e.value,r=e.children,d=e.className,p=(0,i.f2)(),f=p.tabsId,_=p.value,h=p.onChange,m=t===_;return(0,n.jsx)("button",_object_spread_props(_object_spread({type:"button",role:"tab",id:(0,u.H)(f,t),"aria-selected":m,tabIndex:m?0:-1,"data-value":t,"data-testid":"".concat(f,"-tab-").concat(t),className:(0,o.cn)(l.Z9,m&&l.nG,d),onClick:function(){return h(t)},onKeyDown:function(e){(0,c.$)(e,{groupSelector:"[role='tablist']",itemSelector:"[role='tab']",orientation:"horizontal"},h)}},m?{"aria-controls":(0,u.p)(f,t)}:{}),{children:r}))}},339144(e,t,r){"use strict";r.d(t,{w:()=>TabList});var n=r(483134),o=r(997252),i=r(979820),l=r(238230);function TabList(e){var t=e.children,r=e.className,c=(0,i.f2)(),u=c.tabsId,d=c.label;return(0,n.jsx)("div",{role:"tablist","aria-label":d,className:(0,o.cn)(l.KP,r),"data-testid":"".concat(u,"-tablist"),children:t})}},513092(e,t,r){"use strict";r.d(t,{K:()=>TabPanel});var n=r(483134),o=r(997252),i=r(979820),l=r(238230),c=r(726705);function TabPanel(e){var t=e.value,r=e.children,u=e.className,d=(0,i.f2)(),p=d.tabsId;return t!==d.value?null:(0,n.jsx)("div",{role:"tabpanel",id:(0,c.p)(p,t),"aria-labelledby":(0,c.H)(p,t),tabIndex:0,className:(0,o.cn)(l.Iw,u),"data-testid":"".concat(p,"-panel-").concat(t),children:r})}},635665(e,t,r){"use strict";r.d(t,{t:()=>Tabs});var n=r(483134),o=r(997252),i=r(979820);function Tabs(e){var t=e.tabsId,r=e.label,l=e.value,c=e.onChange,u=e.children,d=e.className;return(0,n.jsx)(i.hY,{value:{tabsId:t,label:r,value:l,onChange:c},children:(0,n.jsx)("div",{className:(0,o.cn)(d),"data-testid":"".concat(t,"-tabs"),children:u})})}},979820(e,t,r){"use strict";r.d(t,{f2:()=>useTabsContext,hY:()=>l});var n=r(293534),o=(0,n.createContext)(null),i=(0,n.createContext)(null),l=o.Provider;function useTabsContext(){var e=(0,n.use)(o);if(!e)throw Error("Tab parts must be rendered inside a <Tabs>.");return e}i.Provider},735973(e,t,r){"use strict";r(483134),r(979820)},777758(e,t,r){"use strict";r(483134),r(979820),r(822227)},238230(e,t,r){"use strict";r.d(t,{Iw:()=>l,KP:()=>n,Z9:()=>o,nG:()=>i});var n="flex w-full items-stretch gap-[2px]",o="inline-flex flex-1 cursor-pointer items-center justify-center gap-2 rounded-t-md border-0 bg-[#f2f4f7] px-2 py-[10px] text-[12px]! font-bold! leading-[17.14px]! text-[#121926]! transition-colors hover:bg-[#e6e9ef] focus-visible:outline-2! focus-visible:-outline-offset-2 focus-visible:outline-blue-600!",i="bg-[#1d4ed8] text-white! hover:bg-[#1d4ed8]",l="focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-600"},726705(e,t,r){"use strict";r.d(t,{H:()=>tabId,p:()=>tabPanelId});var idToken=function(e){return encodeURIComponent(e)},tabId=function(e,t){return"".concat(e,"-tab-").concat(idToken(t))},tabPanelId=function(e,t){return"".concat(e,"-panel-").concat(idToken(t))}},871339(e,t,r){"use strict";r.d(t,{Kp:()=>l.K,oz:()=>i.o,tU:()=>n.t,wb:()=>o.w});var n=r(635665),o=r(339144),i=r(257428),l=r(513092);r(735973),r(777758),r(462706)},462706(e,t,r){"use strict";function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}r.d(t,{T:()=>resolveRovingTarget});var NEXT=function(e,t){return(t+1)%e},PREVIOUS=function(e,t){return(t-1+e)%e},n={ArrowRight:NEXT,ArrowLeft:PREVIOUS,Home:function(){return 0},End:function(e){return e-1}},o=_object_spread_props(_object_spread({},n),{ArrowDown:NEXT,ArrowUp:PREVIOUS});function resolveRovingTarget(e,t){var r=t.currentIndex,i=t.count,l=t.orientation;if(0===i)return null;var c=("horizontal"===(void 0===l?"both":l)?n:o)[e];return c?c(i,r):null}},822227(e,t,r){"use strict";r.d(t,{$:()=>handleRovingKeyDown});var n=r(462706);function handleRovingKeyDown(e,t,r){var o,i=e.currentTarget.closest(t.groupSelector);if(!i)return;var l=Array.from(i.querySelectorAll(t.itemSelector)),c=l.indexOf(e.currentTarget);if(-1!==c){var u=(0,n.T)(e.key,{currentIndex:c,count:l.length,orientation:null!=(o=t.orientation)?o:"both"});if(null!==u){var d=l[u],p=null==d?void 0:d.dataset.value;d&&void 0!==p&&(e.preventDefault(),d.focus(),r(p))}}}},651026(e,t,r){"use strict";r.d(t,{F:()=>InfoRowPortal});var n=r(293534),o=r(207214),i=r(590114);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var l="dtf-redesign-row";function InfoRowPortal(e){var t=e.children,r=_sliced_to_array((0,n.useState)(null),2),c=r[0],u=r[1];return(0,n.useLayoutEffect)(function(){var e=document.querySelector(i.Kj);if(e){var t=document.createElement("div");return t.className=l,t.setAttribute("data-testid",l),e.appendChild(t),u(t),function(){t.remove(),u(null)}}},[]),c?(0,o.createPortal)(t,c):null}},712790(e,t,r){"use strict";r.d(t,{z:()=>OverlayPortal});var n=r(293534),o=r(207214);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var i="dtf-redesign-overlays";function OverlayPortal(e){var t=e.children,r=_sliced_to_array((0,n.useState)(null),2),l=r[0],c=r[1];return(0,n.useLayoutEffect)(function(){var e=document.createElement("div");return e.className=i,e.setAttribute("data-testid",i),document.body.appendChild(e),c(e),function(){e.remove(),c(null)}},[]),l?(0,o.createPortal)(t,l):null}},38706(e,t,r){"use strict";r.d(t,{B:()=>ImagingPromiseProvider,d:()=>useImagingPromise});var n=r(483134),o=r(293534),i=(0,o.createContext)(null);function ImagingPromiseProvider(e){var t=e.payload,r=e.children;return(0,n.jsx)(i.Provider,{value:t,children:r})}function useImagingPromise(){return(0,o.useContext)(i)}},671227(e,t,r){"use strict";r.d(t,{I:()=>u});var n=r(497512),o=r(48859),i=r(119978),l=r(650574),c=r(832721),u={"promotion-banner":n.initAllBanners,favorite:function(){(0,i.A)()},"saved-carts":function(){(0,l.Ay)(!0),(0,c.N)()},"saved-carts-modal":function(e){(0,l.Mm)(e),(0,c.N)()},"free-shipping":o.Zp}},512323(e,t,r){"use strict";r.d(t,{Eu:()=>RedesignSlot,Yo:()=>RedesignSlotsProvider});var n=r(483134),o=r(293534),i=r(671227);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var l=(0,o.createContext)({});function RedesignSlotsProvider(e){var t=e.slots,r=e.children;return(0,n.jsx)(l.Provider,{value:t,children:r})}function useRedesignSlot(e){return(0,o.useContext)(l)[e]}var c=new Set;function RedesignSlot(e){var t=e.name,r=e.className,l=useRedesignSlot(t),u=_sliced_to_array((0,o.useState)(!1),2),d=u[0],p=u[1],f=(0,o.useRef)(null);return((0,o.useEffect)(function(){if(!(!l||c.has(t)))return c.add(t),p(!0),function(){c.delete(t),p(!1)}},[l,t]),(0,o.useEffect)(function(){if(d){var e=requestAnimationFrame(function(){var e;return null==(e=i.I[t])?void 0:e.call(i.I,f.current)});return function(){return cancelAnimationFrame(e)}}},[d,t]),d&&l)?(0,n.jsx)("div",{ref:f,className:r,"data-testid":"dtf-redesign-slot-".concat(t),"data-slot":t,children:l()}):null}},564720(e,t,r){"use strict";r.d(t,{X:()=>useAdoptedNode});var n=r(293534);function useAdoptedNode(e,t){(0,n.useLayoutEffect)(function(){var r=t.current,n=document.querySelector(e);if(r&&n){var o=n.parentNode;if(o){var i=document.createComment("dtf-redesign adopted ".concat(e));return o.insertBefore(i,n),r.appendChild(n),function(){var e;null==(e=i.parentNode)||e.replaceChild(n,i)}}}},[e,t])}},730769(e,t,r){"use strict";r.d(t,{g:()=>usePublishedPageState});var n=r(293534),o=r(590114);function usePublishedPageState(e){(0,n.useLayoutEffect)(function(){var t=[document.documentElement,document.querySelector(o.Kj)];return t.forEach(function(t){return null==t?void 0:t.setAttribute(o.V3,e)}),function(){return t.forEach(function(e){return null==e?void 0:e.removeAttribute(o.V3)})}},[e])}},808562(e,t,r){"use strict";r.d(t,{G:()=>measureStickyHeaderOffset,b:()=>useStickyHeaderOffset});var n=r(293534),o=r(590114);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useStickyHeaderOffset(){var e=_sliced_to_array((0,n.useState)(o.Ww),2),t=e[0],r=e[1];return(0,n.useEffect)(function(){var e,t,measure=function(){return r(measureStickyHeaderOffset()+o.Ww)};measure(),window.addEventListener("resize",measure);var n=null==(e=(t=window).matchMedia)?void 0:e.call(t,o.sz);return null==n||n.addEventListener("change",measure),function(){window.removeEventListener("resize",measure),null==n||n.removeEventListener("change",measure)}},[]),t}function measureStickyHeaderOffset(){return o.Xy.reduce(function(e,t){var r=document.querySelector(t);if(!r)return e;var n=window.getComputedStyle(r).position;return"fixed"!==n&&"sticky"!==n?e:Math.max(e,r.getBoundingClientRect().height)},0)}},377423(e,t,r){"use strict";r.d(t,{U:()=>useStickyRailHeight});var n=r(293534),o=r(590114);function useStickyRailHeight(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:resolveWorkspaceRails;(0,n.useEffect)(function(){var t=e.current;if(t){var n=r(t);if(n.length){var publish=function(e){e.style.setProperty(o.rk,"".concat(e.getBoundingClientRect().height,"px"))};if(n.forEach(publish),"u">typeof ResizeObserver){var i=new ResizeObserver(function(e){e.forEach(function(e){return publish(e.target)})});return n.forEach(function(e){return i.observe(e)}),function(){return i.disconnect()}}}}},[e,t,r])}function resolveWorkspaceRails(e){return Array.from(e.querySelectorAll(o.HX))}},48639(e,t,r){"use strict";r.d(t,{U:()=>useStickyUploadColumn});var n=r(293534),o=r(808562),i=r(377423),l=r(590114);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useStickyUploadColumn(e){var t=(0,o.b)();(0,i.U)(e,"empty",resolveUploadColumn),(0,n.useEffect)(function(){var r=e.current;if(r){var n=resolveUploadColumn(r)[0];n&&n.style.setProperty(l.ir,"".concat(t,"px"))}},[e,t]),(0,n.useEffect)(function(){var t,r=e.current;if(r){var n=resolveUploadColumn(r)[0],o=null==(t=r.closest(l.Kj))?void 0:t.querySelector(l.FU);if(n&&o){var publish=function(){n.style.setProperty(l.HA,"".concat(trailingMarginOf(o),"px"))};if(publish(),"u">typeof ResizeObserver){var i=new ResizeObserver(publish);return i.observe(o),function(){return i.disconnect()}}}}},[e])}function trailingMarginOf(e){var t,r=Array.from(e.children).filter(function(e){return e.getBoundingClientRect().height>0});if(!r.length)return 0;var n=parseFloat(getComputedStyle(e).paddingBottom)||0,o=(t=Math).max.apply(t,_to_consumable_array(r.map(function(e){return e.getBoundingClientRect().bottom})));return Math.max(0,Math.round(100*(e.getBoundingClientRect().bottom-n-o))
1/100)}function resolveUploadColumn(e){var t=e.closest(l.B6);return t?[t]:[]}},574821(e,t,r){"use strict";r.d(t,{_:()=>useWorkspaceBreakpoint});var n=r(293534),o=r(590114);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useWorkspaceBreakpoint(){var e=_sliced_to_array((0,n.useState)(function(){return matchesThreeColumn()?"three-column":"single-column"}),2),t=e[0],r=e[1];return(0,n.useEffect)(function(){var e,t,n=null==(e=(t=window).matchMedia)?void 0:e.call(t,o.sz);if(n){var sync=function(){return r(n.matches?"three-column":"single-column")};return sync(),n.addEventListener("change",sync),function(){return n.removeEventListener("change",sync)}}},[]),t}function matchesThreeColumn(){return!("u"<typeof window)&&"function"==typeof window.matchMedia&&window.matchMedia(o.sz).matches}},590114(e,t,r){"use strict";r.d(t,{B6:()=>d,Dn:()=>i,FU:()=>_,HA:()=>h,HX:()=>u,Kj:()=>o,V3:()=>m,Ww:()=>c,Xy:()=>l,ir:()=>f,rk:()=>p,sz:()=>n});var n="(min-width: ".concat(992,"px)"),o=".product-details__info-row",i="#js-product-details-delivery-dates-simple-container",l=[".js-masthead",".masthead-menu-sticky","[data-testid='masthead']"],c=16,u=".dtf-workspace__region--left-rail, .dtf-workspace__region--right-rail",d=".product-details-info-right",p="--dtf-rail-height",f="--dtf-workspace-sticky-top",_=".js-info-left",h="--dtf-empty-column-trailing",m="data-dtf-pdp-state"},726072(e,t,r){"use strict";r.d(t,{W:()=>MobileDesignSheet});var n=r(483134),o=r(293534),i=r(156660),l=r(888973),c=r(586831),u=r(514686),d=r(554720),p=r(185431);function MobileDesignSheet(e){var t=e.onClose,r=e.restoreFocusRef,f=(0,i.I2)().disabled,_=(0,l.n)().trackUploadEntryClick,h=(0,o.useRef)(null),m=(0,o.useRef)(null);(0,p.t)({dialogRef:h,initialFocusRef:m,restoreFocusRef:r,onClose:t});var g=(0,d.H)({disabled:f,trackUploadEntryClick:_,onClose:t});return(0,n.jsxs)("div",{ref:h,className:u.K4,role:"dialog","aria-modal":"true","aria-labelledby":u.ir,"data-testid":u.Hr,children:[(0,n.jsx)("button",{type:"button",onClick:t,className:u.x,"data-testid":u.Q6,tabIndex:-1,children:(0,n.jsx)("span",{className:"sr-only",children:"Close"})}),(0,n.jsxs)("div",{className:u.N2,"data-testid":u.yd,children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,n.jsx)("h2",{id:u.ir,className:u.tu,"data-testid":u.c0,children:u.uR}),(0,n.jsxs)("button",{type:"button",ref:m,onClick:t,className:u.rI,"data-testid":u.AH,children:[(0,n.jsx)("span",{"aria-hidden":"true",children:"\xd7"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]}),(0,n.jsx)("div",{className:u.KB,onClickCapture:g,"data-testid":u.sF,children:(0,n.jsx)(c.G,{canvaReplica:!0})})]})]})}},514686(e,t,r){"use strict";r.d(t,{AH:()=>d,Hr:()=>l,K4:()=>n,KB:()=>b,N2:()=>o,Q6:()=>u,c0:()=>p,ir:()=>_,rI:()=>g,sF:()=>f,tu:()=>m,uR:()=>h,x:()=>i,yd:()=>c});var n="dtf-mobile-design-sheet",o="".concat(n,"__panel"),i="".concat(n,"__backdrop"),l="dtf-mobile-design-sheet",c="dtf-mobile-design-sheet-panel",u="dtf-mobile-design-sheet-backdrop",d="dtf-mobile-design-sheet-close",p="dtf-mobile-design-sheet-title",f="dtf-mobile-design-sheet-entries",_="dtf-mobile-design-sheet-title",h="Choose a design from",m="mb-0! text-[17px]! font-bold! leading-[19px]! text-[#4b5565]!",g="flex size-11 shrink-0 items-center justify-center rounded-full bg-transparent text-[20px]! font-normal! leading-none! text-[#4b5565]! hover:bg-[#f1f5f9] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d4ed8] focus-visible:ring-offset-2",b="w-full rounded-[4px] border border-dashed border-[#c6ccfc] bg-[#e4efff] p-3"},554720(e,t,r){"use strict";function createEntryActivationHandler(e){var t=e.disabled,r=e.trackUploadEntryClick,n=e.onClose;return function(e){var o=e.target;(null==o?void 0:o.closest("button, a"))&&(o.closest('[data-upload-intent="false"]')||t||r(),window.setTimeout(n,0))}}r.d(t,{H:()=>createEntryActivationHandler})},599763(e,t,r){"use strict";r.d(t,{We:()=>n.W});var n=r(726072);r(514686)},185431(e,t,r){"use strict";r.d(t,{t:()=>useDialogDismissal});var n=r(293534);function useDialogDismissal(e){var t=e.dialogRef,r=e.initialFocusRef,o=e.restoreFocusRef,i=e.onClose;(0,n.useEffect)(function(){var e,t=document.activeElement;return null==(e=r.current)||e.focus(),function(){var e,r,n=null!=(e=null==o?void 0:o.current)?e:t;null==n||null==(r=n.focus)||r.call(n)}},[]),(0,n.useEffect)(function(){var onKeyDown=function(e){if("Escape"===e.key)return void i();if("Tab"!==e.key)return;var r,n=null==(r=t.current)?void 0:r.querySelectorAll("button, [href], input, [tabindex]");if(n){var o=Array.from(n).filter(function(e){return e.tabIndex>=0});if(0!==o.length){var l=o[0],c=o[o.length-1];l&&c&&(e.shiftKey&&document.activeElement===l?(e.preventDefault(),c.focus()):e.shiftKey||document.activeElement!==c||(e.preventDefault(),l.focus()))}}};return document.addEventListener("keydown",onKeyDown),function(){return document.removeEventListener("keydown",onKeyDown)}},[t,i])}},162962(e,t,r){"use strict";r.d(t,{q:()=>MobileStickyCta});var n=r(483134),o=r(293534),i=r(207214),l=r(894980),c=r(467265),u=r(745063),d=r(599763),p=r(649463),f=r(647134),_=r(761650);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function MobileStickyCta(){var e=(0,o.useRef)(null),t=_sliced_to_array((0,o.useState)(null),2),r=t[0],h=t[1],m=_sliced_to_array((0,o.useState)(!0),2),g=m[0],b=m[1],y=_sliced_to_array((0,o.useState)(!1),2),v=y[0],w=y[1];(0,p.tB)(),(0,o.useLayoutEffect)(function(){var e=document.createElement("div");return e.className=f.Pf,document.body.appendChild(e),h(e),function(){e.remove(),h(null)}},[]),(0,o.useEffect)(function(){var e=document.querySelector(f.lD);if(e&&"function"==typeof IntersectionObserver){var t=e.getBoundingClientRect();b(t.bottom>0&&t.top<window.innerHeight);var r=new IntersectionObserver(function(e){var t=e[e.length-1];t&&(b(t.isIntersecting),t.isIntersecting&&w(!1))},{threshold:0});return r.observe(e),function(){return r.disconnect()}}},[]);var j=(0,o.useCallback)(function(){return w(!1)},[]);return((0,_.y)(j),r)?(0,i.createPortal)((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:g?f.gv:"".concat(f.gv," ").concat(f.xi),"data-testid":f.tw,children:(0,n.jsxs)("button",{type:"button",ref:e,className:f.PI,"data-testid":f.Ml,onClick:function(){var e={button_type:"choose_a_design",page_type:"pdp",device_type:"mobile"};(0,c.Py)("sticky_cta_interaction",e),(0,u.u4)("Mobile CTA Button Clicked",e),w(!0)},"aria-haspopup":"dialog","aria-expanded":v,children:["Choose a Design",(0,n.jsx)(l.A,{className:"h-[14px] w-[17px] shrink-0","aria-hidden":"true",focusable:"false"})]})}),v?(0,n.jsx)(d.We,{onClose:j,restoreFocusRef:e}):null]}),r):null}},649463(e,t,r){"use strict";r.d(t,{tB:()=>useBottomObstruction});var n=r(293534),o=r(647134);function measureBottomObstruction(){var e=window.innerHeight;return e?Array.from(document.querySelectorAll(o.vZ)).reduce(function(t,r){var n=window.getComputedStyle(r),i=n.position,l=n.display,c=n.visibility;if("fixed"!==i&&"sticky"!==i||"none"===l||"hidden"===c)return t;var u=r.getBoundingClientRect();if(u.height<=0)return t;var d=Math.max(0,e-u.top);return d>e*o.j6?t:Math.max(t,d)},0):0}function publishBottomObstruction(){document.documentElement.style.setProperty(o.d0,"".concat(measureBottomObstruction(),"px"))}function observeBottomObstruction(){var e=0,schedule=function(){e||(e=window.requestAnimationFrame(function(){e=0,publishBottomObstruction()}))};publishBottomObstruction();var t=new MutationObserver(schedule);return t.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]}),window.addEventListener("resize",schedule),window.addEventListener("orientationchange",schedule),function(){e&&window.cancelAnimationFrame(e),t.disconnect(),window.removeEventListener("resize",schedule),window.removeEventListener("orientationchange",schedule),document.documentElement.style.removeProperty(o.d0)}}function useBottomObstruction(){(0,n.useEffect)(function(){return observeBottomObstruction()},[])}},647134(e,t,r){"use strict";r.d(t,{Km:()=>h,Ml:()=>c,PI:()=>u,Pf:()=>i,d0:()=>p,gv:()=>n,j6:()=>_,lD:()=>d,tw:()=>l,vZ:()=>f,xi:()=>o});var n="dtf-mobile-sticky-cta",o="".concat(n,"--visible"),i="dtf-mobile-sticky-cta-host",l="dtf-mobile-sticky-cta",c="dtf-mobile-sticky-cta-button",u="flex h-11 w-full items-center justify-center gap-2 rounded-md bg-[#1d4ed8] text-[14px]! font-bold! leading-[20px]! text-white! focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d4ed8] focus-visible:ring-offset-2",d='[data-testid="upload-hero"]',p="--jiffy-bottom-obstruction",f="#iubenda-cs-banner .iubenda-cs-container, #iubenda-cs-banner",_=.4,h=992},429491(e,t,r){"use strict";r.d(t,{qv:()=>n.q});var n=r(162962);r(649463)},761650(e,t,r){"use strict";r.d(t,{y:()=>useCloseAboveBreakpoint});var n=r(293534),o=r(647134);function useCloseAboveBreakpoint(e){(0,n.useEffect)(function(){if("function"==typeof window.matchMedia){var t=window.matchMedia("(min-width: ".concat(o.Km,"px)")),handle=function(t){t.matches&&e()};return handle(t),t.addEventListener("change",handle),function(){return t.removeEventListener("change",handle)}}},[e])}},442468(e,t,r){"use strict";r.d(t,{W:()=>MoreFilesInvite});var n=r(483134),o=r(293534),i=r(156660),l=r(692179),c=r(197124);function MoreFilesInvite(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.showDesignLibrary,r=(0,l.J)(),u=r.isSignedIn,d=r.open,p=(0,o.useCallback)(function(e){e.stopPropagation(),d()},[d]);return(0,n.jsxs)("div",{className:c.gH,"data-testid":"".concat(i.gi,"-dashes"),children:[(0,n.jsx)("p",{className:c.zS,"data-testid":"".concat(i.gi,"-invite"),children:"Drop your images here"}),(0,n.jsx)(i.uq,{className:c._x,children:"Choose files"}),u&&(void 0===t||t)?(0,n.jsx)("button",{type:"button",className:c.XC,onClick:p,"data-upload-intent":"false","data-testid":"".concat(i.gi,"-design-library"),children:"My Design Library"}):null,(0,n.jsx)(i._s,{className:"sr-only"})]})}},326076(e,t,r){"use strict";r.d(t,{_:()=>MoreFilesUpload});
1var n=r(483134),o=r(293534),i=r(586519),l=r(156660),c=r(765219),u=r(888973),d=r(197124),p=r(442468);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var f='[data-testid="'.concat(l.gi,'-surface"]');function MoreFilesUpload(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.showDesignLibrary,r=(0,c.v)().addFiles,_=(0,u.n)(),h=_.trackUploadEntryClick,m=_.trackFileDropDetected,g=(0,o.useCallback)(function(e){var t=e.target;(null==t?void 0:t.closest(f))&&(t.closest('[data-upload-intent="false"]')||h())},[h]),b=(0,o.useCallback)(function(e){var t,r,n,o=null!=(t=null==(n=e.dataTransfer)||null==(r=n.files)?void 0:r.length)?t:0;0!==o&&m(o)},[m]),y=(0,o.useCallback)(function(e,t,n){r(e,{uploadSource:n,isDropEvent:"drop"===t}).catch(function(t){(0,i.notifyError)(_instanceof(t,Error)?t:Error(String(t)),{context:{component:"MoreFilesUpload",fileCount:e.length}})})},[r]);return(0,n.jsx)(l.R3,{dropzoneId:l.gi,onFilesAccepted:y,children:(0,n.jsxs)("div",{className:d.Q1,"data-testid":"".concat(l.gi,"-root"),onClickCapture:g,onDropCapture:b,children:[(0,n.jsx)("p",{className:d.U6,"data-testid":"".concat(l.gi,"-title"),children:"More files to upload?"}),(0,n.jsx)(l.nD,{className:d.Zr,children:(0,n.jsx)(p.W,{showDesignLibrary:void 0===t||t})}),(0,n.jsx)(l.lc,{className:"empty:mt-0"}),(0,n.jsx)(l.K6,{})]})})}},197124(e,t,r){"use strict";r.d(t,{Q1:()=>n,U6:()=>o,XC:()=>d,Zr:()=>i,_x:()=>u,gH:()=>l,zS:()=>c});var n="w-full rounded-[8px] border border-solid border-[#e1e1e5] bg-white px-6 pt-[18px] pb-5 shadow-[0px_25px_30px_rgba(0,0,0,0.05)]",o="mb-3 text-center text-[16px] font-bold leading-[22.86px] text-[#333]",i="group min-h-[174px] w-full flex-col gap-0 rounded-[4px] border-0 bg-[#f2f3fe] p-2 text-center data-[drag-over=true]:bg-[#e4e7fd]",l="flex min-h-[158px] w-full flex-col items-center justify-center gap-0 rounded-[4px] border border-dashed border-[#1d4ed8] px-4 group-data-[drag-over=true]:border-solid",c="mb-0! text-[16px] font-bold leading-[20px] text-[#333]",u="mt-3! h-10 w-[190px] rounded-[8px] bg-[#1d4ed8] px-0 py-0 text-[16px]! font-bold! leading-[24px]! text-white! hover:bg-[#1a45c0]",d="mt-[11px]! inline-flex items-center justify-center border-0 bg-transparent p-0 underline text-[14px]! font-bold! leading-[20px]! text-[#1d4ed8]! hover:text-[#1a45c0]! focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d4ed8] focus-visible:ring-offset-2 focus-visible:ring-offset-[#f2f3fe]"},519033(e,t,r){"use strict";r.d(t,{Y:()=>ArtworkModalCard});var n=r(483134),o=r(153035),i=r(340382),l=r(600837),c=r(662452),u=r(501117),d=r(429703),p=r(223157);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function ArtworkModalCard(e){var t=e.mount,r=e.preview,f=(0,p.O)(t.originalIndex),_=t.hasErrorMessage?_object_spread_props(_object_spread({},t),{qualityPanel:"none"}):t;return(0,n.jsx)(l.Zp,{cardId:"dtf-modal-artwork-".concat(r.previewIndex),className:"dtf-modal-artwork-card",children:(0,n.jsxs)(l.bw,{className:"dtf-modal-artwork-card__body",children:[(0,n.jsxs)("div",{className:"dtf-modal-artwork-card__preview",children:[(0,n.jsx)(c.n,{mount:_,isMultiUpload:!0,onRemove:null==t.artworkId?f:void 0,redrawNoteIdPrefix:d.gz}),t.hasErrorMessage?(0,n.jsx)(o.A,{artwork:t.artwork,index:t.index,"data-testid":"dtf-modal-artwork-error"}):null,t.showReuploadBox?(0,n.jsx)(i.A,{index:t.index,"data-testid":"dtf-modal-reupload-box"}):null]}),(0,n.jsx)("div",{className:"dtf-modal-artwork-card__placements",children:null==t.artworkId||t.showReuploadBox?null:(0,n.jsx)(u.l,{preview:r,heading:null,tabsIdPrefix:d.Zm})})]})})}},687717(e,t,r){"use strict";r.d(t,{c:()=>ModalRail});var n=r(483134),o=r(372725),i=r(152712),l=r(512323),c=r(342686),u=r(429703);function ModalRail(e){var t=e.session,r=e.isSameDay;return(0,n.jsxs)("div",{className:"dtf-modal__rail",children:[(0,n.jsx)("div",{className:"dtf-modal__delivery",children:(0,n.jsx)(o.A,{id:u.nn,isSameDay:r,"data-testid":"dtf-modal-delivery-date"})}),(0,n.jsx)(l.Eu,{name:"free-shipping"}),(0,n.jsx)(c.T,{savedCartsSlot:"saved-carts-modal",favoriteSlot:null,paymentBadgesSlot:"payment-badges-modal",atcReasonId:u.Yl}),(0,n.jsx)(i.A,{"data-testid":"dtf-modal-design-services"}),(0,n.jsx)("button",{className:"dtf-modal__done button button--outline button--lg",type:"button",onClick:t.keepArtworkAndClose,"data-testid":"dtf-modal-done",children:"Done"})]})}},409795(e,t,r){"use strict";r.d(t,{U:()=>
1MultiArtworkModalRedesign});var n=r(483134),o=r(723433),i=r(923057),l=r(326076),c=r(607344),u=r(294070),d=r(647383),p=r(478099),f=r(519033),_=r(429703),h=r(687717),m=r(685914);function MultiArtworkModalRedesign(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.moveBellow,r=(0,u.u)(),g=(0,c.C)(),b=(0,m.F)({isOpen:!0,onRequestClose:r.requestDiscard,onMounted:r.updatePdpDates}),y=b.modalRef,v=b.isSameDay;return(0,n.jsx)("div",{className:["modal","dtf-modal",void 0!==t&&t?"dtf-modal--bellow":""].filter(Boolean).join(" "),id:_.wU,ref:y,role:"dialog","data-testid":"dtf-redesign-multi-artwork-modal",children:(0,n.jsxs)("div",{className:"dtf-modal__modal-box modal-dialog",children:[(0,n.jsxs)("div",{className:"dtf-modal__modal-header",role:"heading","aria-label":"Your files",tabIndex:0,children:[(0,n.jsx)("h3",{className:"dtf-modal__modal-title",children:r.isUploading?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{className:"dtf-modal__top-icon",size:"small"})," Uploading ".concat(r.uploadedCount," of ").concat(r.totalCount," files ")]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.A,{className:"dtf-modal__top-icon",icon:"check-circle"})," ".concat(r.uploadMessage)]})}),(0,n.jsx)("button",{className:"dtf-modal__modal-button-close",type:"button","aria-label":"Close",onClick:r.requestDiscard,"data-testid":"dtf-modal-close",children:(0,n.jsx)(o.A,{icon:"modal-close-big"})})]}),(0,n.jsxs)("div",{className:"dtf-modal__modal-body",children:[(0,n.jsxs)("div",{className:"dtf-modal__centre",children:[g.map(function(e){var t;return(0,n.jsx)(f.Y,{mount:e.mount,preview:e.preview},null!=(t=e.preview.artworkId)?t:"row-".concat(e.preview.previewIndex))}),(0,n.jsx)(p.x,{}),(0,n.jsx)(d.R,{}),r.isUploading?null:(0,n.jsx)(l._,{showDesignLibrary:!1})]}),(0,n.jsx)(h.c,{session:r,isSameDay:v})]})]})})}},429703(e,t,r){"use strict";r.d(t,{Yl:()=>i,Zm:()=>o,gz:()=>l,nn:()=>c,wU:()=>n});var n="dtf-redesign-multi-artwork-modal",o="dtf-modal-placements",i="dtf-modal-review-rail-atc-reason",l="dtf-modal-redraw-note",c="dtf-modal-delivery-dates-container"},923726(e,t,r){"use strict";r.d(t,{U:()=>n.U});var n=r(409795)},685914(e,t,r){"use strict";r.d(t,{F:()=>useModalSession});var n=r(293534);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function jquery(){var e;return null!=(e=window.jQuery)?e:null}function reloadDeliverToToggle(){var e,t=window.JiffyDeliverTo;null==t||null==(e=t.reloadToggle)||e.call(t)}function useModalSession(e){var t=e.isOpen,r=e.onRequestClose,o=e.onMounted,i=(0,n.useRef)(null),l=_sliced_to_array((0,n.useState)(!1),2),c=l[0],u=l[1],d=(0,n.useRef)({isOpen:t,onRequestClose:r,onMounted:o});return d.current={isOpen:t,onRequestClose:r,onMounted:o},(0,n.useEffect)(function(){var e,t=i.current,r=jquery();if(t&&r){var n=r(t);n.modal("show").on("hide.bs.modal",function(e){d.current.isOpen&&e.target.id===n[0].id&&(e.preventDefault(),d.current.onRequestClose())}).on("hidden.bs.modal",function(){n.off("hidden.bs.modal"),document.body.classList.remove("dtf-modal-open")}),document.body.classList.add("dtf-modal-open");var o=document.querySelectorAll(".modal-backdrop"),l=null!=(e=o[o.length-1])?e:null,c=t.querySelector(".js-product-details-delivery-dates-simple-direct-value"),readSameDay=function(){var e;return u(!!(null==c||null==(e=c.textContent)?void 0:e.trim().toLowerCase().includes("today")))},p=null;return c&&(readSameDay(),(p=new MutationObserver(readSameDay)).observe(c,{childList:!0,subtree:!0})),queueMicrotask(reloadDeliverToToggle),d.current.onMounted(),function(){null==p||p.disconnect();try{var e=r(i.current);e.off("hide.bs.modal hidden.bs.modal"),e.modal("dispose")}catch(e){}null==l||l.remove(),document.body.classList.remove("dtf-modal-open"),document.querySelector(".modal.in, .modal.show")||document.body.classList.remove("modal-open")}}},[]),{modalRef:i,isSameDay:c}}},223157(e,t,r){"use strict";r.d(t,{O:()=>useRemoveIdlessRow});var n=r(293534),o=r(765219);function useRemoveIdlessRow(e){var t=(0,o.v)().removeArtwork;return(0,n.useCallback)(function(){t({id:null,index:e})},[t,e])}},785126(e,t,r){"use strict";r.d(t,{I:()=>LeftRail});var n=r(483134),o=r(5770),i=r(243784);function LeftRail(){return(0,n.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"dtf-left-rail",children:[(0,n.jsx)(i.u,{}),(0,n.jsx)(o.pE,{})]})}},298792(e,t,r){"use strict";r.d(t,{p:()=>PricingRail});var n=r(483134),o=r(293534),i=r(318588),l=r(564720),c=r(637363);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function PricingRail(){var e=(0,o.useRef)(null),t=_sliced_to_array((0,o.useState)(function(){return null!==document.querySelector(c.Kt)||null!==document.querySelector(c.Sb)}),1)[0];return((0,l.X)(c.Kt,e),(0,l.X)(c.F$,e),t)?(0,n.jsx)(i.rq,{railId:c.md,title:c.f8,className:c.Zm,children:(0,n.jsx)("div",{ref:e,"data-testid":"".concat(c.md,"-rail-body")})}):null}},637363(e,t,r){"use strict";r.d(t,{F$:()=>i,Kt:()=>o,Sb:()=>l,Zm:()=>u,f8:()=>d,md:()=>c});var n=".js-info-left",o="".concat(n," article.product-details-savings--blue"),i="".concat(n," .product-details-bulk-discount--blue"),l="".concat(i," .js-pdp-bulk-discount-summary-table"),c="dtf-pricing",u="dtf-pricing-rail",d="Pricing and bulk discounts"},5770(e,t,r){"use strict";r.d(t,{pE:()=>n.p});var n=r(298792)},496801(e,t,r){"use strict";r.d(t,{K:()=>SizeGuideColors});var n=r(483134),o=r(745063),i=r(379658),l=r(298210),c=r(712790),u=r(37829),d=r(954309);function SizeGuideColors(e){var t=e.previewIndex,r=e.previewColor,c=(0,u.p)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:d.TR,children:d.aN}),(0,n.jsx)(i.A,{className:d.pT,colors:p,value:r,size:"small",onChange:function(e){var r;c(t,e),(0,o.Hj)({color:(null==(r=l.n5.find(function(t){return t.value===e}))?void 0:r.name)||"custom",hexcode:e})},renderModal:CUSTOM_COLOUR_PANEL_HOST,"data-testid":"dtf-size-guide-colors"}),(0,n.jsxs)("p",{className:d.xF,children:["T-shirt not included"," \xb7 ",(0,n.jsx)("a",{href:d._F,"data-testid":"dtf-size-guide-browse",children:d.D4})]})]})}var p=l.n5.filter(function(e){return!e.isModalColor}),CUSTOM_COLOUR_PANEL_HOST=function(e){return(0,n.jsx)(c.z,{children:e})}},335709(e,t,r){"use strict";r.d(t,{u:()=>SizeGuideRail});var n=r(483134),o=r(318588),i=r(711897),l=r(496801),c=r(133446),u=r(954309);function SizeGuideRail(){var e=(0,i.M)();if(!e)return null;var t=e.preview,r=e.placements;return(0,n.jsxs)(o.rq,{railId:u.e_,title:u.Q,className:u.zn,children:[(0,n.jsx)("h2",{className:u.DB,children:u.Q}),(0,n.jsx)("p",{className:u.xB,children:u.Se}),(0,n.jsx)(c.Z,{placements:r,previewIndex:t.previewIndex,artworkId:t.artworkId,artworkUrl:t.artworkUrl,previewColor:t.previewColor}),(0,n.jsx)(l.K,{previewIndex:t.previewIndex,previewColor:t.previewColor})]})}},133446(e,t,r){"use strict";r.d(t,{Z:()=>SizeGuideThumbnails});var n=r(483134),o=r(562301),i=r(859807),l=r(522516);function SizeGuideThumbnails(e){var t=e.placements,r=e.previewIndex,c=e.artworkId,u=e.artworkUrl,d=e.previewColor;return(0,n.jsx)("div",{className:l.tp,"data-testid":"dtf-size-guide-thumbnails",children:t.map(function(e){return(0,n.jsxs)("button",{type:"button",className:l.pv,onClick:function(){return(0,i.cP)({previewIndex:r,artworkId:c},e.id,{scroll:!0})},"data-testid":"dtf-size-guide-thumb-".concat(e.id),children:[(0,n.jsx)("span",{"aria-hidden":"true",className:l.Ix,children:(0,n.jsx)("span",{className:l.rz,children:(0,n.jsx)(o.A,{artworkUrl:null!=u?u:void 0,preset:e.id,selectedColor:d,"data-testid":"dtf-size-guide-mockup-".concat(e.id)})})}),(0,n.jsx)("span",{className:l._v,children:e.label})]},e.id)})})}},954309(e,t,r){"use strict";r.d(t,{D4:()=>m,DB:()=>u,Q:()=>i,Se:()=>l,TR:()=>p,_F:()=>h,aN:()=>c,e_:()=>o,pT:()=>f,xB:()=>d,xF:()=>_,zn:()=>n});var n="dtf-size-guide-rail__card p-4",o="dtf-size-guide",i="JIFFY SIZE GUIDE",l="Click any size to select it.",c="Change your preview items to any color below:",u="pt-0! text-center text-[16px]! font-bold leading-[18px] text-[#1d4ed8]",d="mt-[2px]! mb-0! text-center text-[14px] leading-[17px] text-[#4a5565]",p="mt-[11.32px]! mb-0! text-[12px] leading-[16.8px] text-[#111827]",f="dtf-size-guide-rail__swatches mt-[8.37px]",_="dtf-size-guide-rail__info mt-[10.94px]! mb-0! text-[12px] leading-[14px] text-[#6a7282]",h="/?category=T-Shirt&style=Short+Sleeve",m="Browse shirts from $2.62"},243784(e,t,r){"use strict";r.d(t,{u:()=>n.u});var n=r(335709)},711897(e,t,r){"use strict";r.d(t,{M:()=>useSizeGuideCardContent,x:()=>useSizeGuideOwnsPreviewOn});var n=r(293534),o=r(574821),i=r(950001),l=r(611087);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useSizeGuideCardContent(){var e=(0,i.p)();return(0,n.useMemo)(function(){var t=_sliced_to_array(e,1)[0];if(1!==e.length||!t)return null;var r=(0,l.ue)(t.aspectRatio).filter(function(e){return e.id!==l.Is});return 0===r.length?null:{preview:t,placements:r}},[e])}function useSizeGuideOwnsPreviewOn(){var e=useSizeGuideCardContent();return"three-column"===(0,o._)()&&null!==e}},522516(e,t,r){"use strict";r.d(t,{Ix:()=>i,_v:()=>c,pv:()=>o,rz:()=>l,tp:()=>n});var n="mt-2 grid grid-cols-3",o="flex h-[122.28px] flex-col items-center justify-start gap-0 rounded-[6.889px] border-2 border-transparent bg-transparent px-0 pt-[10.06px] pb-[4.8px] hover:border-[#1d4ed8] hover:bg-[#f2f3fe]",i="pointer-events-none flex h-[86.11px] items-center justify-center overflow-hidden",l="scale-[0.8611]",c="mt-auto w-full shrink-0 truncate px-1 text-center text-[12.06px] font-bold leading-[13.86px] text-[#4b5565]"},747757(e,t,r){"use strict";r.d(t,{S:()=>RailPriceRow});var n=r(483134),o=r(407433),i=r(144445);function RailPriceRow(e){var t=e.label,r=e.price,l=e.strikePrice,c=e.saving,u=e.rowId,d=e.pending;return void 0!==d&&d?(0,n.jsxs)("div",{className:i.r9,"data-testid":"review-rail-row-".concat(u),children:[(0,n.jsx)(o.C,{className:"h-[14px] w-[104px]","data-testid":"review-rail-pending-label-".concat(u)}),(0,n.jsx)(o.C,{className:"h-[23px] w-[76px]","data-testid":"review-rail-pending-price-".concat(u)})]}):(0,n.jsxs)("div",{className:i.r9,"data-testid":"review-rail-row-".concat(u),children:[(0,n.jsx)("span",{className:i.KC,children:t}),(0,n.jsxs)("span",{className:i.TK,children:[l?(0,n.jsxs)("span",{className:i.az,"data-testid":"review-rail-strike-".concat(u),children:[(0,n.jsx)("span",{className:"sr-only",children:"was "}),l]}):null,(0,n.jsxs)("span",{className:i.J5,"data-testid":"review-rail-price-".concat(u),children:[l?(0,n.jsx)("span",{className:"sr-only",children:"now "}):null,r]}),c?(0,n.jsxs)("span",{className:i.Um,"data-testid":"review-rail-saving-".concat(u),children:["saving ",c]}):null]})]})}},446080(e,t,r){"use strict";r.d(t,{T:()=>ReviewRail});var n=r(483134),o=r(739161),i=r(627194),l=r(318588),c=r(38706),u=r(512323),d=r(574821),p=r(886950),f=r(443705),_=r(657810),h=r(810533),m=r(932215);function ReviewRail(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.savedCartsSlot,r=e.favoriteSlot,g=void 0===r?"favorite":r,b=e.paymentBadgesSlot,y=e.atcReasonId,v=(0,d._)(),w=(0,c.d)();return(0,n.jsxs)(l.rq,{railId:"review",title:o.p.reviewAndAtc,className:"dtf-review-rail",children:[(0,n.jsx)(l.wm,{}),(0,n.jsx)("div",{className:m.EF,children:(0,n.jsx)(f.W,{})}),(0,n.jsxs)(l.d7,{className:"pt-0",children:[(0,n.jsx)(h.m,{}),(0,n.jsx)(u.Eu,{name:void 0===t?"saved-carts":t})]}),(0,n.jsxs)(l.QX,{children:[(0,n.jsx)(i.S,{payload:w}),(0,n.jsx)(p.J,{reasonId:void 0===y?"review-rail-atc-reason":y}),g?(0,n.jsx)(u.Eu,{name:g}):null,(0,n.jsx)(_.l,{}),"three-column"===v?(0,n.jsx)(u.Eu,{name:void 0===b?"payment-badges":b}):null]})]})}},886950(e,t,r){"use strict";r.d(t,{J:()=>ReviewRailAddToCart});var n=r(483134),o=r(118995),i=r(932215),l={out_of_stock:"This product is out of stock.",unsupported_product_family:"This product cannot be added to cart from here.",background_processing:"Waiting for your image edits to finish.",submitting:"",enhancement_timed_out:"Your image could not be processed. Please upload it again.",uploading:"Waiting for your upload to finish.",not_ready:"Finish setting your design size and quantity first."};function ReviewRailAddToCart(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.reasonId,r=void 0===t?"review-rail-atc-reason":t,c=(0,o.A)(),u=c.submit,d=c.isDisabled,p=c.disabledReason,f="submitting"===p,_=p?l[p]:"";return(0,n.jsxs)("div",{"data-testid":"review-rail-add-to-cart",children:[(0,n.jsx)("button",{type:"button",className:i.Sr,disabled:d,"aria-busy":f||void 0,"aria-describedby":_?r:void 0,"data-testid":"review-rail-add-to-cart-button",onClick:function(){return u()},children:f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"size-4 shrink-0 animate-spin rounded-full border-2 border-current border-t-transparent motion-reduce:animate-none motion-reduce:border-t-current","aria-hidden":"true"}),"Adding…"]}):"Add To Cart"}),_?(0,n.jsx)("span",{id:r,className:"sr-only",children:_}):null]})}},443705(e,t,r){"use strict";r.d(t,{W:()=>ReviewRailPreCut});var n=r(483134),o=r(788088),i=r(882879),l=r(932215);function ReviewRailPreCut(){return(0,i.V)().withPreCut?(0,n.jsx)("div",{className:l.fx,"data-testid":"review-rail-pre-cut",children:(0,n.jsx)(o.A,{})}):null}},657810(e,t,r){"use strict";r.d(t,{l:()=>ReviewRailStoreCredit});var n=r(483134),o=r(369171),i=r(834057),l=r(723709);function ReviewRailStoreCredit(){var e=(0,l.O)(),t=e.info,r=e.isEligible,c=(0,i.A)(),u=c.tiers,d=c.currentTier,p=c.totalCartAmount,f=c.currentExpectedCredits,_=c.earnSunset,h=c.jiffyCreditLive;if((0,c.updateStoreCreditInfo)(t),(null==_?void 0:_.value)===!0||(null==h?void 0:h.value)===!0||!r||p.value<=0)return null;var m=null!=d.value&&p.value>=d.value.min?f.value:0;return(0,n.jsx)("div",{className:"dtf-review-rail__store-credit","data-testid":"review-rail-store-credit",children:(0,n.jsx)(o.A,{tiers:u.value,currentTier:d.value,totalAmount:p.value,expectedCredits:m,"data-testid":"review-rail-store-credit-tiers"})})}},810533(e,t,r){"use strict";r.d(t,{m:()=>ReviewRailTotals});var n=r(483134),o=r(338908),i=r(555828),l=r(882879),c=r(747757),u=r(932215),d=r(987836),p=r(502919),f=r(173680);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function ReviewRailTotals(){var e,t=(0,o.s)(),r=t.t,_=t.n,h=(0,l.V)(),m=(0,l.P)(),g=(0,i.qG)(),b=(0,f.u)(h,m.discount),y=null!=(e=b.saving)?e:0,v="for ".concat(r("transfer",h.totalQuantity)),w=_(b.total,"currency"),j=h.isPricingPending,k=h.isPricingStale,x=(0,d.p)(g,m.adjustedPriceFor),S=j||k||x.some(function(e){return e.pending}),O=(0,p.U)("Order total ".concat(w," ").concat(v),h.isPricingSettled&&!j&&!k);return(0,n.jsxs)("div",{className:u.Yl,"data-testid":"review-rail-totals","aria-busy":S||void 0,children:[(0,n.jsx)("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only","data-testid":"review-rail-total-status",children:O}),j?null:x.map(function(e){var t;return(0,n.jsx)(c.S,{rowId:e.key,label:"for ".concat(e.quantity," ").concat(e.label),price:_(e.payable,"currency"),strikePrice:e.saving>0?_(null!=(t=e.retail)?t:0,"currency"):void 0,saving:e.saving>0?_(e.saving,"currency"):void 0,pending:e.pending||k},e.key)}),j?null:enhancementRows(h.enhancements).map(function(e){return(0,n.jsx)(c.S,{rowId:e.key,label:"for ".concat(e.quantity," ").concat(e.serviceName),price:_(e.totalPrice,"currency"),pending:k},e.key)}),(0,n.jsx)("h3",{className:u.mV,"data-testid":"review-rail-total-caption",children:"Total"}),(0,n.jsx)(c.S,{rowId:"total",label:v,price:w,pending:j||k,strikePrice:b.struck?_(b.struck,"currency"):void 0,saving:y>0?_(y,"currency"):void 0})]})}function enhancementRows(e){return Object.entries(e).filter(function(e){return Number(_sliced_to_array(e,2)[1].totalPrice)>0}).sort(function(e,t){var r=_sliced_to_array(e,1)[0],n=_sliced_to_array(t,1)[0];return r.localeCompare(n)}).map(function(e){var t=_sliced_to_array(e,2);return _object_spread({key:t[0]},t[1])})}},932215(e,t,r){"use strict";r.d(t,{EF:()=>l,Sr:()=>i,Yl:()=>n,fx:()=>c,mV:()=>o,qj:()=>u});var n="mt-[16px]",o="mt-[10px] text-[17px] font-bold leading-[19px] text-[#333]",i="flex h-[52px] w-full items-center justify-center gap-2 rounded-[3px] border-0 bg-[#c90505] text-[24px]! font-bold! uppercase! leading-none! text-white! hover:bg-[#ed0a0a] disabled:pointer-events-none disabled:opacity-40 focus-visible:outline-2! focus-visible:outline-offset-2! focus-visible:outline-[#c90505]!",l="shrink-0 px-4 pt-3",c="rounded-md bg-[#f8fafc] [&>*]:m-0! [&>*]:rounded-none! [&>*]:border-0! [&>*]:bg-none! [&>*]:bg-transparent! [&>*]:px-[15px]! [&>*]:py-[9px]!",u=600},342686(e,t,r){"use strict";r.d(t,{T:()=>n.T});var n=r(446080)},987836(e,t,r){"use strict";r.d(t,{p:()=>placementRows});var n=r(444636),o=r(612436);function isRowPriced(e,t){return!!t(e.artworkId,e)||Number(e.unitPrice||0)>0}function placementRows(e,t){var r=[],i=new Map;return e.forEach(function(e){var t;i.has(e.preset)||(r.push(e.preset),i.set(e.preset,[])),null==(t=i.get(e.preset))||t.push(e)}),r.map(function(e){var r,l=null!=(r=i.get(e))?r:[],c=l.reduce(function(e,r){return e+(0,o.X)(r,t)},0),u=l.every(function(e){return null!==(0,o.y)(e)})?l.reduce(function(e,t){var r;return e+(null!=(r=(0,o.y)(t))?r:0)},0):null;return{key:"placement-".concat(e),label:(0,n.Sr)(e),quantity:l.reduce(function(e,t){return e+(Number(t.quantity)||0)},0),payable:c,retail:u,saving:null!==u&&u>c?u-c:0,pending:l.some(function(e){return!isRowPriced(e,t)})}}).filter(function(e){return e.quantity>0})}},144445(e,t,r){"use strict";r.d(t,{J5:()=>c,KC:()=>o,TK:()=>i,Um:()=>u,az:()=>l,r9:()=>n});var n="flex items-baseline justify-between gap-2",o="text-[14px] leading-[20px] whitespace-nowrap text-[#6a7282]",i="flex items-baseline gap-2 whitespace-nowrap",l="text-[14px] leading-[16
1px] text-[#99a1af] line-through",c="text-[20px] font-normal leading-[23px] tabular-nums text-[#101828]",u="text-[12px] font-bold leading-[15.4px] text-[#00834f]"},832721(e,t,r){"use strict";r.d(t,{N:()=>installSavedCartsAnchoring});var n=["top","left","bottom","right","width","min-width"],o=!1,i=!1;function installSavedCartsAnchoring(){!o&&"u">typeof window&&"u">typeof document&&(o=!0,document.addEventListener("click",syncAll),document.addEventListener("keydown",syncAll),window.addEventListener("scroll",schedule,!0),window.addEventListener("resize",schedule),schedule())}function schedule(){i||(i=!0,window.requestAnimationFrame(function(){i=!1,syncAll()}))}function syncAll(){document.querySelectorAll("".concat(".dtf-review-rail"," ").concat(".js-qty-form-saved-carts-wrapper")).forEach(syncOne)}function syncOne(e){var t=e.querySelector(".js-qty-form-saved-carts-select");if(t){var r=e.querySelector(".js-qty-form-saved-carts-input"),n=!t.classList.contains("hidden");if(!r||!n||!isAnchoredWidth())return void clear(t);anchor(t,r)}}function isAnchoredWidth(){return"function"!=typeof window.matchMedia?window.innerWidth>=768:window.matchMedia("(min-width: ".concat(768,"px)")).matches}function anchor(e,t){var r=t.getBoundingClientRect();e.style.setProperty("width","".concat(r.width,"px")),e.style.setProperty("min-width","0"),e.style.setProperty("bottom","auto"),e.style.setProperty("right","auto");var n=e.offsetHeight,o=window.innerHeight-r.bottom-4-8,i=r.top-4-8,l=n>o&&i>o?Math.max(8,r.top-4-n):r.bottom+4,c=Math.max(8,Math.min(r.left,window.innerWidth-r.width-8));e.style.setProperty("top","".concat(l,"px")),e.style.setProperty("left","".concat(c,"px"))}function clear(e){n.forEach(function(t){return e.style.removeProperty(t)})}},502919(e,t,r){"use strict";r.d(t,{U:()=>useSettledTotalAnnouncement});var n=r(293534),o=r(932215);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useSettledTotalAnnouncement(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.qj,i=_sliced_to_array((0,n.useState)(""),2),l=i[0],c=i[1];return(0,n.useEffect)(function(){if(t){var n=window.setTimeout(function(){return c(e)},r);return function(){return window.clearTimeout(n)}}},[e,t,r]),l}},801460(e,t,r){"use strict";r.d(t,{f:()=>StepOneCard});var n=r(483134),o=r(600837),i=r(305359),l=r(568717),c=r(529539),u=r(39405),d=r(662452),p=r(429846);function StepOneCard(){var e=(0,c.j)();return e.artwork?(0,n.jsxs)(o.Zp,{cardId:u.xw,className:"dtf-step-one-card",children:[(0,n.jsxs)(o.aR,{children:[(0,n.jsx)(l.a,{stepId:u.xw,current:u.cO,total:u.J,children:u.Dh}),e.isComplete?(0,n.jsx)(i.l,{stepId:u.xw,stepLabel:"Step ".concat(u.cO)}):null]}),(0,n.jsxs)(o.bw,{children:[(0,n.jsx)(p.T,{}),(0,n.jsx)(d.n,{mount:e})]})]}):null}},662452(e,t,r){"use strict";r.d(t,{n:()=>StepOnePreview});var n=r(483134),o=r(293534),i=r(967113),l=r(52554),c=r(970021),u=r(683164),d=r(956288),p=r(39405);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var f=c.A;function StepOnePreview(e){var t=e.mount,r=e.isMultiUpload,c=void 0!==r&&r,_=e.onRemove,h=e.redrawNoteIdPrefix,m=void 0===h?void 0:h,g=t.artwork,b=t.index,y=t.showFileInfo,v=t.qualityPanel,w=t.confirmedConfigSection,j=_sliced_to_array((0,o.useState)(p.XZ),2),k=j[0],x=j[1];return((0,i.Q)(w,x),g)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f,{artwork:g,showFileInfo:y,index:b,"data-testid":"dtf-step-one-artwork-info"}),(0,n.jsx)(l.A,{artwork:g,activeConfigSection:k,showFullScreenButton:!0,index:b,isMultiUpload:c,isRedesign:!0,onRemove:void 0===_?void 0:_,"data-testid":"dtf-step-one-artwork-image"}),"monetization"===v?(0,n.jsx)(d.A,{index:b,artwork:g,reorderEnabled:t.reorderEnabled,paidExpertEditAddonEnabled:t.paidExpertEditAddonEnabled,isMultiUpload:c,redrawNoteIdPrefix:m,activeConfigSection:k,onSetActiveConfigSection:x,"data-testid":"dtf-step-one-quality-panel"}):null,"legacy"===v?(0,n.jsx)(u.A,{artwork:g,index:b,redrawNoteIdPrefix:m,activeConfigSection:k,onSetActiveConfigSection:x,"data-testid":"dtf-step-one-quality-panel"}):null]}):null}},429846(e,t,r){"use strict";r.d(t,{T:()=>StepOneStuckWarning});var n=r(483134),o=r(138024),i=r(865578),l=r(629751),c="min-h-9 flex-1 rounded px-3 py-1.5 text-[13px] font-semibold ".concat(l.bO);function StepOneStuckWarning(){var e=(0,i.w)(),t=e.isStuck,r=e.retry,l=e.replace;return t?(0,n.jsx)(o.A,{type:"warning","data-testid":"dtf-redesign-stuck-warning",children:(0,n.jsxs)("div",{role:"alert",children:[(0,n.jsx)("div",{className:"mb-2",children:(0,n.jsx)("b",{children:"Your enhancement is taking longer than usual."})}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,n.jsx)("button",{type:"button",className:"border-0 bg-[#e5484d] text-white hover:bg-[#c62a2f] ".concat(c),"data-testid":"dtf-redesign-stuck-retry",onClick:r,children:"Retry"}),(0,n.jsx)("button",{type:"button",className:"border border-gray-200 bg-white text-[#414192] hover:bg-gray-50 ".concat(c),"data-testid":"dtf-redesign-stuck-upload-different",onClick:l,children:"Upload a different file"})]})]})}):null}},39405(e,t,r){"use strict";r.d(t,{Dh:()=>o,J:()=>l,XZ:()=>c,cO:()=>i,xw:()=>n});var n="dtf-step-one",o="Upload Your Design(s)",i=1,l=2,c="jiffy-print-perfect"},653968(e,t,r){"use strict";r.d(t,{f:()=>n.f});var n=r(801460)},967113(e,t,r){"use strict";r.d(t,{Q:()=>useConfirmedConfigSection});var n=r(293534);function useConfirmedConfigSection(e,t){(0,n.useEffect)(function(){e&&t(e)},[e,t])}},756642(e,t,r){"use strict";r.d(t,{Be:()=>hasArtworkError,Pw:()=>willBeClearedByCleanup,WM:()=>useArtworkFamily,aE:()=>isArtworkProcessing,tn:()=>isTerminallyFailed});var n=r(293534),o=r(758292),i=r(444636);function useArtworkFamily(){var e=!!(0,o.a)("isStandardArtwork"),t=!!(0,o.a)("isProColor");return(0,n.useMemo)(function(){return{isStandardArtwork:e,isProColor:t}},[e,t])}function isTerminallyFailed(e){return!!(e.uploadError||e.retryFailed)}function willBeClearedByCleanup(e){return!!(0,i.lx)(e)}function activeMetadata(e){var t=e.withBgMetadata,r=e.metadata;return t?e.removeBackground?r:t:r}function hasArtworkError(e){var t,r=null==(t=activeMetadata(e))?void 0:t.errors;return!!(Array.isArray(r)&&r.length>0||e.errorMessage||e.uploadError||e.retryFailed)}function isArtworkProcessing(e,t){return!isTerminallyFailed(e)&&(!!e.isLoading||(!!t.isStandardArtwork||!!t.isProColor)&&(!e.enhancementCompleted||t.isProColor&&!e.imageAttached||!!e.awaitingFinalDimensions))}},184737(e,t,r){"use strict";function seedSimulationFromRowEdits(e,t,r){var n=r.editedField,o=r.setSimulation,i={};"width"===n&&(i.widthEdited=!0);var l=e[0],c=t[0];(null==l?void 0:l.id)&&l.id===(null==c?void 0:c.id)&&(l.quantity!==c.quantity&&(i.quantity=l.quantity),l.width!==c.width&&(i.width=l.width),l.height!==c.height&&(i.height=l.height)),Object.keys(i).length>0&&o(i)}function lastDimensionEditedId(e,t){var r=null;return e.forEach(function(e){if(e.id){var n=t.find(function(t){return t.id===e.id});n&&(e.width!==n.width||e.height!==n.height)&&(r=e.id)}}),r}function rowChanged(e,t){var changedOptional=function(e,t){return void 0!==e&&e!==t};return e.width!==t.width||e.height!==t.height||e.quantity!==t.quantity||changedOptional(e.preset,t.preset)||changedOptional(e.size,t.size)}function resolveIsSizesEdited(e,t,r){return"boolean"==typeof e?e:t.length!==r.length||!!t.some(function(e){var t=r.find(function(t){return t.id===e.id});return!t||rowChanged(e,t)})||void 0}r.d(t,{C7:()=>resolveIsSizesEdited,XB:()=>rowChanged,bs:()=>lastDimensionEditedId,w6:()=>seedSimulationFromRowEdits})},393578(e,t,r){"use strict";r.d(t,{A7:()=>buildStepOneMount,Uz:()=>o});var n=r(756642),o={artwork:null,index:0,artworkId:null,originalIndex:0,showFileInfo:!1,isComplete:!1,qualityPanel:"none",confirmedConfigSection:null,reorderEnabled:!1,paidExpertEditAddonEnabled:!1,hasErrorMessage:!1,showReuploadBox:!1};function buildStepOneMount(e,t,r){if(!e)return o;var i,l,c=(0,n.Be)(e),u=c&&!e.isMultiSizeError;return{artwork:e,index:t,artworkId:null!=(i=e.id)?i:null,originalIndex:Number(null!=(l=e.originalIndex)?l:t),show
1FileInfo:!r.isSpangle,isComplete:!(0,n.aE)(e,r.family)&&!c,qualityPanel:qualityPanelFor({artwork:e,isStandardArtwork:r.family.isStandardArtwork,printAsIs:r.printAsIs,enableAbAiMonetization:r.enableAbAiMonetization,blockedByError:u}),confirmedConfigSection:confirmedConfigSectionFor(e,r),reorderEnabled:r.reorderEnabled,paidExpertEditAddonEnabled:r.paidExpertEditAddonEnabled,hasErrorMessage:u,showReuploadBox:c&&!r.sizeErrorTypes.includes(String(e.errorType))}}function confirmedConfigSectionFor(e,t){var r=t.lastConfirmedConfigSection;return r&&null!=e.id&&null!=r.artworkId&&String(r.artworkId)===String(e.id)&&"string"==typeof r.section?r.section:null}function qualityPanelFor(e){var t=e.artwork,r=e.isStandardArtwork,n=e.printAsIs,o=e.enableAbAiMonetization,i=e.blockedByError,l=!!(t.id&&t.isFile&&!t.enhancementCompleted);return!r||n||t.isFile&&!l?"none":o?i?"none":"monetization":"legacy"}},564656(e,t,r){"use strict";r.d(t,{e:()=>setFilesError});var n=r(538896).useDtfStore.store;function setFilesError(e){n.showFilesError=e}},777803(e,t,r){"use strict";r.d(t,{D:()=>useStepOneMountDeps});var n=r(293534),o=r(758292);function useStepOneMountDeps(e){var t=(0,o.a)("isSpangle"),r=(0,o.a)("printAsIs"),i=(0,o.a)("enableAbAiMonetization"),l=(0,o.a)("reorderEnabled"),c=(0,o.a)("paidExpertEditAddonEnabled"),u=(0,o.a)("lastConfirmedConfigSection"),d=(0,o.a)("sizeErrorTypes");return(0,n.useMemo)(function(){return{family:e,isSpangle:!!t,printAsIs:!!r,enableAbAiMonetization:!!i,reorderEnabled:!!l,paidExpertEditAddonEnabled:!!c,lastConfirmedConfigSection:null!=u?u:null,sizeErrorTypes:Array.isArray(d)?d.map(String):[]}},[e,t,r,i,l,c,u,d])}},758292(e,t,r){"use strict";r.d(t,{a:()=>n});var n=r(538896).useDtfStore.useValue},442607(e,t,r){"use strict";r.d(t,{D:()=>useUploadedArtworks});var n=r(293534),o=r(758292);function useUploadedArtworks(){var e=(0,o.a)("artworks");return(0,n.useMemo)(function(){return(null!=e?e:[]).filter(function(e){return!e.isSimulated})},[e])}},373026(e,t,r){"use strict";r.d(t,{$J:()=>sizePercentChange,KL:()=>o,S8:()=>sizeChange,Vf:()=>catalogueDimensions,aP:()=>presencePayload,qc:()=>i});var n=r(298210),o="pdp",i="custom";function catalogueDimensions(e){return n.Dn[e]}function presencePayload(e){var t=e.artworkId,r=e.preset;return{design_size_selection:r,artwork_id:t,design_dimensions:catalogueDimensions(r)}}function sizeChange(e,t){var r=t.width*t.height,n=e.width*e.height;return 0===r&&0===n?"none":r>n?"larger":"smaller"}function sizePercentChange(e,t){var r=t.width*t.height,n=e.width*e.height;return 0===n?0:Math.round(Math.abs(r-n)/n*100)}},765219(e,t,r){"use strict";r.d(t,{v:()=>useArtworkActions});var n=r(293534),o=r(758292),i=r(442607),l=r(756642),c=r(564656);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function useArtworkActions(){var e=(0,o.a)("addFilesToQueue"),t=(0,o.a)("isPuff"),r=(0,o.a)("isStickerSample"),u=(0,i.D)(),d=(0,o.a)("removeAllErrorArtworks"),p=(0,o.a)("setReplaceArtwork"),f=(0,o.a)("replaceArtwork"),_=(0,o.a)("removeArtworkWithActivity"),h=(0,o.a)("removeArtworkByIndex"),m=(0,o.a)("getArtworksPricing"),g=(0,o.a)("updatePdpDates"),b=(0,o.a)("resetPuff"),y=(0,n.useCallback)(function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.uploadSource,_=void 0===i?null:i,h=o.targetIndex,m=void 0===h?null:h,g=o.isDropEvent,y=void 0!==g&&g;return _async_to_generator(function(){var o,i,h;return _ts_generator(this,function(g){switch(g.label){case 0:if(!n.length)return[2];if("number"!=typeof m&&b(),n.length>10)return(0,c.e)(!0),[2];if("number"!=typeof m)return[3,2];if(1!==n.length)return[2];return[4,e({files:Array.from(n),artworkIndex:m,uploadSource:_,isDropEvent:y})];case 1:return g.sent(),[2];case 2:if(o=n.length<=1&&f,i=u.filter(function(e){return!(0,l.Pw)(e)}
1),(t||r)&&!o&&(i.length>0||n.length>1))return[2];return h=null,o?h=0:d(),[4,e({files:Array.from(n),artworkIndex:h,uploadSource:_,isDropEvent:y})];case 3:return g.sent(),p(!1),[2]}})})()},[e,d,p,f,b,t,r,u]),v=(0,n.useCallback)(function(e){var t=e.id,r=e.index;null==t?h(r):(_(t),m(),g(),b())},[_,h,m,g,b]);return(0,n.useMemo)(function(){return{addFiles:y,removeArtwork:v}},[y,v])}},607344(e,t,r){"use strict";r.d(t,{C:()=>useArtworkMounts});var n=r(293534),o=r(756642),i=r(393578),l=r(777803),c=r(442607),u=r(950001);function useArtworkMounts(){var e=(0,c.D)(),t=(0,u.p)(),r=(0,o.WM)(),d=(0,l.D)(r);return(0,n.useMemo)(function(){var r=new Map(t.filter(function(e){return null!=e.artworkId}).map(function(e){return[e.artworkId,e]}));return e.flatMap(function(e,n){var o=null!=e.id?r.get(e.id):t[n];return o?[{mount:(0,i.A7)(e,n,d),preview:o}]:[]})},[e,t,d])}},746809(e,t,r){"use strict";r.d(t,{j:()=>useArtworkUploadStatus});var n=r(293534),o=r(442607),i=r(758292),l=r(756642);function useArtworkUploadStatus(){var e=(0,o.D)(),t=(0,l.WM)(),r=(0,i.a)("hasAnyArtworkStuck"),c=(0,i.a)("hasArtworkEnhancementTimedOut"),u=(0,i.a)("isRetrying"),d=(0,i.a)("allRetryFailed");return(0,n.useMemo)(function(){return{isUploading:e.some(function(e){return(0,l.aE)(e,t)}),hasStuck:!!r,hasTimedOut:!!c,isRetrying:!!u,allRetryFailed:!!d}},[e,t,r,c,u,d])}},520023(e,t,r){"use strict";r.d(t,{Z:()=>useAutoSeedDimensionSync});var n=r(293534),o=r(758292),i=r(442607),l=r(756642),c=r(950001),u=r(555828),d=r(46692),p=r(298210);function useAutoSeedDimensionSync(){var e=(0,i.D)(),t=(0,l.WM)().isStandardArtwork,r=(0,o.a)("catalogNumber"),f=!!(0,o.a)("printAsIs"),_=(0,c.n)(),h=(0,u.a)();(0,n.useEffect)(function(){t&&r===p.aS&&e.forEach(function(e){if(!e.isFile&&!e.isSimulated&&!e.isLoading&&e.id){var t,r=(0,d.T0)(e,{minWidth:_.minWidth,maxWidth:_.maxWidth,minHeight:_.minHeight,maxHeight:_.maxHeight,printAsIs:f});if(r){var n=null!=(t=e.sizesAndQuantities)?t:[],o=(0,d.mZ)(n,r);o&&h({artworkId:e.id,sizesAndQuantities:o,isSizesEdited:!1})}}})},[e,t,r,f,_,h])}},356221(e,t,r){"use strict";r.d(t,{P:()=>useBogoSummary});var n=r(293534),o=r(442607),i=r(758292);function useBogoSummary(){var e=(0,i.a)("isBogoApplicable"),t=(0,i.a)("bogoFreeQtyAvailable"),r=(0,i.a)("getBogoAdjustedPrice"),l=(0,o.D)();return(0,n.useMemo)(function(){var adjustedPriceFor=function(e,t){var n;return r(String(null!=e?e:""),null!=(n=t.id)?n:"","".concat(t.width,"x").concat(t.height))},n=0,o=0;return e&&l.forEach(function(e){var t;(null!=(t=e.sizesAndQuantities)?t:[]).forEach(function(t){var r=adjustedPriceFor(e.id,t);r&&!(r.freeQty<=0)&&(n+=r.freeQty,o+=Number(t.unitPrice||0)*t.quantity-r.discountedTotalPrice)})}),{isApplicable:!!e,freeQty:n,discount:o,freeQtyAvailable:null!=t?t:0,adjustedPriceFor:adjustedPriceFor}},[e,t,r,l])}},167893(e,t,r){"use strict";r.d(t,{x:()=>useCanvaEntry});var n=r(758292);function useCanvaEntry(){var e=(0,n.a)("canvaDtfEnabled"),t=(0,n.a)("userType");return{isEnabled:!!e&&"signed_in"===t}}},258669(e,t,r){"use strict";r.d(t,{P:()=>useCanvaSettingsReady});var n=r(492624),o=r(332467);function useCanvaSettingsReady(){var e=(0,n.md)(o.FU,{store:o.Zs});return!!e&&"authorized"in e}},118995(e,t,r){"use strict";r.d(t,{A:()=>useAddToCart});var n=r(293534),o=r(746809),i=r(758292);function useAddToCart(){var e=(0,i.a)("submitForm"),t=(0,i.a)("isReadyForOrder"),r=(0,i.a)("outOfStock"),l=(0,i.a)("isSpangle"),c=(0,i.a)("removeBgLoading"),u=(0,i.a)("isSubmitting"),d=(0,i.a)("hasArtworkEnhancementTimedOut"),p=(0,o.j)().isUploading,f=!!t,_=!!r,h=null;return _?h="out_of_stock":l?h="unsupported_product_family":c?h="background_processing":u?h="submitting":d?h="enhancement_timed_out":p?h="uploading":f||(h="not_ready"),(0,n.useMemo)(function(){return{submit:e,isReadyForOrder:f,isDisabled:null!==h,disabledReason:h,outOfStock:_}},[e,f,h,_])}},692179(e,t,r){"use strict";r.d(t,{J:()=>useDesignLibrary});var n=r(293534),o=r(467265),i=r(758292);function useDesignLibrary(){var e=(0,i.a)("userType"),t=(0,i.a)("pdpType"),r=(0,i.a)("setShowArtworkHistoryModal"),l="signed_in"===e,c=(0,n.useCallback)(function(){r(!0),(0,o.Py)("previous_purchase_link_clicked",{page:"pdp",pdp_type:t})},[r,t]);return(0,n.useMemo)(function(){return{isSignedIn:l,open:c}},[l,c])}},294070(e,t,r){"use strict";r.d(t,{u:()=>useModalSessionState});var n=r(293534),o=r(758292),i=r(756642);function useModalSessionState(){var e=(0,o.a)("artworks"),t=(0,o.a)("files"),r=(0,o.a)("loadedArtworks"),l=(0,o.a)("withPreCut"),c=(0,o.a)("setShowDiscardModal"),u=(0,o.a)("closeModalKeepingArtwork"),d=(0,o.a)("updatePdpDates");return(0,n.useMemo)(function(){var n=null!=t?t:[],o=null!=e?e:[],p=null!=r?r:[],f=n.filter(function(e){return!(0,i.tn)(e)});return{uploadMessage:f.length===n.length?"All files successfully uploaded":"Files have been uploaded",isUploading:f.length>0,uploadedCount:p.length+1,totalCount:o.length,withPreCut:!!l,requestDiscard:function(){return c()},keepArtworkAndClose:function(){return u()},updatePdpDates:function(){return d()}}},[e,t,r,l,c,u,d])}},666347(e,t,r){"use strict";r.d(t,{Z:()=>usePageStateArtworks});var n=r(293534),o=r(442607);function usePageStateArtworks(){var e=(0,o.D)();return(0,n.useMemo)(function(){return e.map(function(e){return{id:e.id,isLoading:!!e.isLoading,isFile:!!e.isFile,isSimulated:!!e.isSimulated}})},[e])}},859807(e,t,r){"use strict";r.d(t,{B2:()=>placementSelectionKey,H_:()=>usePlacementScrollRequest,TY:()=>useRequestedPlacement,cP:()=>selectPlacement});var n=r(293534);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function placementSelectionKey(e){var t=e.previewIndex,r=e.artworkId;return null===r?"index:".concat(t):"artwork:".concat(r)}var o={requested:{},scrollRequest:{}},i=new Set;function subscribe(e){return i.add(e),function(){i.delete(e)}}function emit(){i.forEach(function(e){return e()})}function selectPlacement(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=placementSelectionKey(e),l=null!=(r=o.scrollRequest[i])?r:0;o={requested:_object_spread_props(_object_spread({},o.requested),_define_property({},i,t)),scrollRequest:n.scroll?_object_spread_props(_object_spread({},o.scrollRequest),_define_property({},i,l+1)):o.scrollRequest},emit()}function useRequestedPlacement(e){var t=placementSelectionKey(e);return(0,n.useSyncExternalStore)(subscribe,function(){var e;return null!=(e=o.requested[t])?e:null},function(){return null})}function usePlacementScrollRequest(e){var t=placementSelectionKey(e);return(0,n.useSyncExternalStore)(subscribe,function(){var e;return null!=(e=o.scrollRequest[t])?e:0},function(){return 0})}},555828(e,t,r){"use strict";r.d(t,{a:()=>useUpdatePlacement,qG:()=>usePlacements});var n=r(293534),o=r(52382),i=r.n(o),l=r(442607),c=r(758292),u=r(184737),d=r(335264);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function usePlacements(){var e=(0,l.D)();return(0,n.useMemo)(function(){return e.flatMap(function(e){var t;return(null!=(t=e.sizesAndQuantities)?t:[]).map(function(t){return _object_spread_props(_object_spread({id:t.id,artworkId:e.id,width:t.width,height:t.height,quantity:t.quantity,preset:t.preset,size:t.size},(0,d.oC)(t.preset,t.size)),{unitPrice:t.unitPrice,unitPriceTotal:t.unitPriceTotal,retailPrice:t.retailPrice})})})},[e])}function useUpdatePlacement(){var e=(0,l.D)(),t=(0,c.a)("updateArtworkValuesById"),r=(0,c.a)("updatePreviewDpi"),o=(0,c.a)("downscaleOriginalImage"),d=(0,c.a)("setIsPricingLoading"),p=(0,c.a)("invalidatePricingRequest"),f=(0,c.a)("setSimulation"),_=(0,c.a)("getArtworksPricing"),h=(0,c.a)("updatePdpDates"),m=(0,n.useRef)(i()(function(){_(),h()},2500));return(0,n.useCallback)(function(n){var i=n.artworkId,l=n.sizesAndQuantities,c=n.isSizesEdited,_=n.editedField;return _async_to_generator(function(){var n,h,g,b,y,v,w;return _ts_generator(this,function(j){switch(j.label){case 0:g=null!=(n=null==(h=e.f
1ind(function(e){return String(e.id)===String(i)}))?void 0:h.sizesAndQuantities)?n:[],b=(0,u.C7)(c,l,g),y=l.map(function(e){var t=e.id?g.find(function(t){return t.id===e.id}):void 0;if(!t)return e;var r=(0,u.XB)(e,t)&&!1!==b;return _object_spread({},t,e,r?{isAutoSeed:!1}:{})}),(v=!1!==b)&&(0,u.w6)(y,g,{editedField:_,setSimulation:f}),w=v?(0,u.bs)(y,g):null,t(_object_spread({id:i,sizesAndQuantities:y},"boolean"==typeof b?{isSizesEdited:b}:{},w?{lastEditedSizeId:w}:{})),d(!0),p(),r({artworkId:i}),j.label=1;case 1:return j.trys.push([1,,3,4]),[4,o({artworkId:i})];case 2:return j.sent(),[3,4];case 3:return m.current(),[7];case 4:return[2]}})})()},[e,t,r,o,d,p,f])}},37829(e,t,r){"use strict";r.d(t,{p:()=>useSetPreviewColor});var n=r(293534),o=r(758292);function useSetPreviewColor(){var e=(0,o.a)("setPresetMockupColor");return(0,n.useCallback)(function(t,r){e({index:t,color:r})},[e])}},950001(e,t,r){"use strict";r.d(t,{n:()=>useSizeLimits,p:()=>useArtworkPreviews});var n=r(293534),o=r(298210),i=r(758292),l=r(442607);function useArtworkPreviews(){var e=(0,l.D)(),t=(0,i.a)("presetMockupColor");return(0,n.useMemo)(function(){return e.map(function(e,r){var n;return{previewIndex:r,artworkId:e.id,name:e.filename||e.name||null,artworkUrl:e.manualEditUrl||e.url||null,previewColor:null!=(n=(null==t?void 0:t[r])||c)?n:c,aspectRatio:artworkAspectRatio(e)}})},[e,t])}var c="#E1E1E1";function useSizeLimits(){var e=(0,i.a)("printAsIs"),t=(0,i.a)("dtfMinWidth"),r=(0,i.a)("dtfMaxWidth"),l=(0,i.a)("dtfMinHeight"),c=(0,i.a)("dtfMaxHeight"),p=(0,i.a)("printAsIsMaxHeight");return(0,n.useMemo)(function(){var n=!!e;return{minWidth:n?o.Ai:numberOr(t,o.aW),maxWidth:numberOr(r,d),minHeight:n?o.aW:numberOr(l,o.aW),maxHeight:n?numberOr(p,o.Je):numberOr(c,d),step:u,maxQuantity:o.Rw,isPrintAsIs:n}},[e,t,r,l,c,p])}var u=.01,d=1e3;function numberOr(e,t){var r=Number(e);return Number.isFinite(r)&&r>0?r:t}function artworkAspectRatio(e){var t=e.withBgMetadata,r=e.metadata,n=!t||0===Object.keys(t).length||e.removeBackground?r:t,o=usableRatio(null==n?void 0:n.aspectRatio);if(null!==o)return o;var i=usableRatio(e.width),l=usableRatio(e.height);return null!==i&&null!==l?usableRatio(i/l):null}function usableRatio(e){if(null==e||""===e)return null;var t=Number(e);return Number.isFinite(t)&&t>0?t:null}},882879(e,t,r){"use strict";r.d(t,{P:()=>c.P,V:()=>usePricingTotals});var n=r(293534),o=r(442607),i=r(758292),l=r(756642),c=r(356221);function usePricingTotals(){var e=(0,i.a)("totalQuantity"),t=(0,i.a)("summary"),r=(0,i.a)("isPricingLoading"),c=(0,i.a)("withPreCut"),u=(0,i.a)("preCutPrice"),d=(0,i.a)("hasArtworkEnhancementTimedOut"),p=(0,o.D)(),f=(0,l.WM)(),_=f.isStandardArtwork||f.isProColor,h=(0,n.useMemo)(function(){if(r)return!1;var e=p.filter(function(e){return!(0,l.tn)(e)}).every(function(e){return!e.isLoading&&(!_||e.enhancementCompleted)}),t=p.some(function(e){var t;return(null!=(t=e.sizesAndQuantities)?t:[]).length>0});return e||!t},[r,p,_]),m=(0,n.useMemo)(function(){if(d)return!1;var r=p.some(function(e){return(0,l.aE)(e,f)}),n=e>0&&!(Number(null==t?void 0:t.orderTotal)>0);return r||n},[d,p,f,e,t]),g=(null!=e?e:0)>0?t:void 0;return(0,n.useMemo)(function(){var t,n;return{totalQuantity:null!=e?e:0,orderTotal:null!=(t=null==g?void 0:g.orderTotal)?t:"0.0",orderSubtotal:null==g?void 0:g.orderSubtotal,bulkDiscount:null==g?void 0:g.bulkDiscount,isPricingLoading:!!r,isPricingSettled:h,isPricingPending:m,isPricingStale:!!r&&(null!=e?e:0)>0,withPreCut:!!c,preCutPrice:Number(u||0),enhancements:null!=(n=null==g?void 0:g.enhancements)?n:{}}},[e,g,r,h,m,c,u])}},529539(e,t,r){"use strict";r.d(t,{j:()=>useStepOneMount});var n=r(293534),o=r(756642),i=r(393578),l=r(777803),c=r(442607);function useStepOneMount(){var e=(0,c.D)(),t=(0,o.WM)(),r=(0,l.D)(t);return(0,n.useMemo)(function(){var t,n=null!=(t=e[0])?t:null;return n?(0,i.A7)(n,0,r):i.Uz},[e,r])}},642084(e,t,r){"use strict";r.d(t,{s:()=>useStepTwoAnalytics});var n=r(293534),o=r(467265),i=r(745063),l=r(758292),c=r(373026);function useStepTwoAnalytics(){var e=(0,l.a)("pdpType"),t=(0,l.a)("businessLine"),r=(0,l.a)("simulation"),u=(0,n.useCallback)(function(e){(0,i.Cm)("Selected",(0,c.aP)(e))},[]),d=(0,n.useCallback)(function(e){(0,i.Cm)("Removed",(0,c.aP)(e))},[]),p=(0,n.useCallback)(function(r){var n=r.artworkId,l=r.sizeCount,u=r.width,d=r.height;(0,o.Py)("multi_size_artwork",{pdp_type:e,business_line:t,page:c.KL,action:"add_size",size_count:l}),(0,i.Cm)("Size Added",{design_size_selection:c.qc,artwork_id:n,design_dimensions:[{width:u,height:d}],quantity:1})},[e,t]),f=(0,n.useCallback)(function(r){var n=r.artworkId,l=r.sizeCount,u=r.width,d=r.height,p=r.quantity;(0,o.Py)("multi_size_artwork",{pdp_type:e,business_line:t,page:c.KL,action:"remove_size",size_count:l}),(0,i.Cm)("Size Removed",{design_size_selection:c.qc,artwork_id:n,design_dimensions:[{width:u,height:d}],quantity:p})},[e,t]),_=(0,n.useCallback)(function(n){var l=n.artworkId,u=n.previous,d=n.next,p=n.quantity;(u.width!==d.width||u.height!==d.height)&&((0,o.Py)("size_modified",{width:d.width,height:d.height,previous_width:u.width,previous_height:u.height,size_change:(0,c.S8)(u,d),business_line:t,size_percent_change:(0,c.$J)(u,d),has_image:!r,page:c.KL,pdp_type:e}),(0,i.Cm)("Size Edited",{design_size_selection:c.qc,artwork_id:l,design_dimensions:[{width:d.width,height:d.height}],quantity:p}))},[t,e,r]),h=(0,n.useCallback)(function(r){var n=r.artworkId,l=r.preset,u=r.sizeIndex,d=r.previousQuantity,p=r.quantity,f=r.blanksSize,_=(0,c.Vf)(l);(0,i.xd)({design_size_selection:l,artwork_id:n,design_dimensions:_,blanks_size:f,quantity:p}),(0,o.Py)("dtf_artwork_quantity_change",{artwork_id:n,size_index:u,preset:l,previous_quantity:d,quantity:p,business_line:t,pdp_type:e,is_multi_upload:!1,design_dimensions:_,blanks_size:f})},[t,e]);return(0,n.useMemo)(function(){return{trackPlacementSelected:u,trackPlacementRemoved:d,trackCustomSizeAdded:p,trackCustomSizeRemoved:f,trackSizeEdited:_,trackQuantityChanged:h}},[u,d,p,f,_,h])}},723709(e,t,r){"use strict";r.d(t,{O:()=>useStoreCredit});var n=r(293534),o=r(758292);function useStoreCredit(){var e=(0,o.a)("storeCreditInfo"),t=(0,o.a)("isGuest"),r=(0,o.a)("isSticker"),i=(0,o.a)("isSpangle");return(0,n.useMemo)(function(){var n;return{info:e,isEligible:!t&&!r&&!i&&Number(null!=(n=null==e?void 0:e.orderSubtotal)?n:0)>0}},[e,t,r,i])}},865578(e,t,r){"use strict";r.d(t,{w:()=>useStuckEnhancement});var n=r(293534),o=r(586519),i=r(746809),l=r(765219),c=r(442607),u=r(758292),d=r
1(756642);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function useStuckEnhancement(){var e=(0,i.j)().hasStuck,t=(0,c.D)(),r=(0,d.WM)(),p=(0,l.v)().removeArtwork,f=(0,u.a)("enhancementStuckAt60s"),_=(0,u.a)("clearEnhancementStuck"),h=(0,u.a)("clearEnhancementTimedOut"),m=(0,u.a)("schedulePollingFallback"),g=(0,u.a)("setEnhancementStuck"),b=(0,n.useMemo)(function(){if(!e)return[];var n=null!=f?f:{};return t.filter(function(e){return n[String(e.id)]&&(0,d.aE)(e,r)}).map(function(e){var t;return{id:e.id,index:Number(null!=(t=e.originalIndex)?t:0)}})},[e,f,t,r]),y=(0,n.useCallback)(function(){b.forEach(function(e){var t=e.id;if(null!=t){_(t),h(t);try{m(t,{initialDelay:0})}catch(e){g(t),(0,o.notifyError)(_instanceof(e,Error)?e:Error(String(e)),{params:{artwork_id:t,source:"redesign.retry_stuck_enhancement"}})}}})},[b,_,h,m,g]),v=(0,n.useCallback)(function(){b.forEach(function(e){return p({id:e.id,index:e.index})})},[b,p]);return(0,n.useMemo)(function(){return{isStuck:b.length>0,retry:y,replace:v}},[b.length,y,v])}},888973(e,t,r){"use strict";r.d(t,{n:()=>useUploadAnalytics});var n=r(293534),o=r(375599),i=r(467265),l=r(758292);function useUploadAnalytics(){var e=(0,l.a)("pdpType"),t=(0,l.a)("catalogNumber"),r=(0,l.a)("businessLine"),c=(0,l.a)("productId"),u=(0,n.useCallback)(function(){(0,i.Py)("transfer_choose_file_clicked",{page:"pdp",pdp_type:e,catalog_number:t,business_line:r}),(0,o.A)("DesignStarted",{event_id:"DS-".concat(crypto.randomUUID()),product_id:c})},[e,t,r,c]),d=(0,n.useCallback)(function(e){(0,i.Py)("file_drop_detected",{file_count:e})},[]);return(0,n.useMemo)(function(){return{trackUploadEntryClick:u,trackFileDropDetected:d}},[u,d])}},372350(e,t,r){"use strict";r.d(t,{W:()=>useUploadFailures});var n=r(293534),o=r(442607);function failureMessage(e){var t=e.uploadError;return"string"==typeof t&&t.length>0?t:e.retryFailed?"Image upload failed":null}function useUploadFailures(){var e=(0,o.D)();return(0,n.useMemo)(function(){return e.flatMap(function(e,t){var r,n=failureMessage(e);return null===n?[]:[{key:String(t),fileName:null!=(r=e.name)?r:null,message:n}]})},[e])}},886262(e,t,r){"use strict";r.d(t,{o:()=>useUploadProgress});var n=r(293534),o=r(756642),i=r(442607);function useUploadProgress(){var e=(0,i.D)();return(0,n.useMemo)(function(){var t,r=e.find(function(e){return!!e.isLoading&&!(0,o.Be)(e)});if(!r)return l;var n=r.progressMessage;return{artwork:r,index:Number(null!=(t=r.originalIndex)?t:0),message:"string"==typeof n&&n.length>0?n:null}},[e])}var l={artwork:null,index:0,message:null}},982196(e,t,r){"use strict";r.d(t,{p:()=>EmptyState});var n=r(483134),o=r(293534),i=r(48639),l=r(344071),c=r(645759),u=r(44801),d={"upload-hero":l.O};function EmptyState(){var e=(0,o.useRef)(null);return(0,i.U)(e),(0,n.jsx)("div",{className:"dtf-redesign dtf-redesign--empty","data-testid":"dtf-redesign-empty-state",ref:e,children:u.a.map(function(e){if(e.serverRendered)return null;var t=d[e.regionId];return t?(0,n.jsx)(t,{},e.regionId):(0,n.jsx)(c.A,{regionId:e.regionId,filledBy:e.filledBy,reserved:e.reserved},e.regionId)})})}},645759(e,t,r){"use strict";r.d(t,{A:()=>PlaceholderRegion});var n=r(483134),o=r(997252),i=r(498083);function PlaceholderRegion(e){var t=e.regionId,r=e.filledBy,l=e.reserved,c=e.className;return(0,n.jsx)("div",{className:(0,o.cn)("dtf-redesign-region",c),style:(0,i.VT)(l),"data-testid":"dtf-redesign-region-".concat(t),"data-filled-by":r,"aria-hidden":"true"})}},362459(e,t,r){"use strict";r.d(t,{G:()=>UploadedState});var n=r(483134),o=r(293534),i=r(342686),l=r(326076),c=r(564720),u=r(808562),d=r(377423),p=r(574821),f=r(590114),_=r(785126),h=r(653968),m=r(568559),g=r(645759),b=r(930037),y={"left-rail":_.I,"step-one":h.f,"step-two":m.H,"more-files":l._,"review-rail":i.T};function UploadedState(){var e=(0,p._)(),t=(0,u.b)(),r=(0,o.useRef)(null),i=(0,o.useRef)(null);(0,c.X)(f.Dn,r),(0,d.U)(i,e);var l="three-column"===e?"desktop":"mobile",_=b.Z.filter(function(e){return"both"===e.renderAt||e.renderAt===l});return(0,n.jsxs)("div",{ref:i,className:"dtf-workspace dtf-redesign dtf-redesign--uploaded","data-testid":"dtf-redesign-uploaded-state","data-layout":e,"data-tracks":"three-column"===e?3:1,style:{"--dtf-workspace-sticky-top":"".concat(t,"px")},children:[renderLane(_,"full-width"),renderLane(_,"left-rail"),(0,n.jsx)("div",{className:"dtf-workspace__centre","data-testid":"dtf-workspace-centre",children:renderLane(_,"centre")}),(0,n.jsx)("div",{ref:r,className:"dtf-workspace__delivery","data-testid":"dtf-workspace-delivery-host"}),renderLane(_,"right-rail")]})}function renderLane(e,t){return e.filter(function(e){return e.lane===t}).map(renderRegion)}function renderRegion(e){var t="dtf-workspace__region--".concat(e.lane),r=y[e.regi
1onId];return r?(0,n.jsx)("div",{className:t,"data-testid":"dtf-redesign-region-".concat(e.regionId),"data-filled-by":e.filledBy,children:(0,n.jsx)(r,{})},e.regionId):(0,n.jsx)(g.A,{regionId:e.regionId,filledBy:e.filledBy,reserved:e.reserved,className:"dtf-workspace__region ".concat(t)},e.regionId)}},44801(e,t,r){"use strict";r.d(t,{a:()=>n});var n=[{regionId:"gallery",filledBy:"MN-13158",reserved:{minHeight:620},serverRendered:!0},{regionId:"title-and-badges",filledBy:"MN-13158",reserved:{minHeight:220},serverRendered:!0},{regionId:"delivery",filledBy:"MN-13158",reserved:{minHeight:120},serverRendered:!0},{regionId:"upload-hero",filledBy:"MN-13159",reserved:r(591740).w},{regionId:"pricing-tables",filledBy:"MN-13164",reserved:{minHeight:360},serverRendered:!0},{regionId:"procolor-promo",filledBy:"MN-13160",reserved:{minHeight:480},serverRendered:!0},{regionId:"instructional-content",filledBy:"MN-13161",reserved:{minHeight:900},serverRendered:!0},{regionId:"blanks-cross-sell",filledBy:"MN-13162",reserved:{minHeight:414,aspectRatio:"3 / 4",placeholderCount:4},serverRendered:!0},{regionId:"transfers-cross-sell",filledBy:"MN-13163",reserved:{minHeight:414,aspectRatio:"3 / 4",placeholderCount:4},serverRendered:!0},{regionId:"ugc-grid",filledBy:"MN-13163",reserved:{minHeight:520,aspectRatio:"1 / 1",placeholderCount:6},serverRendered:!0}]},930037(e,t,r){"use strict";r.d(t,{Z:()=>n});var n=[{regionId:"left-rail",lane:"left-rail",filledBy:"MN-13164",renderAt:"desktop",reserved:{minHeight:476}},{regionId:"step-one",lane:"centre",filledBy:"MN-13167",renderAt:"both",reserved:{minHeight:941}},{regionId:"step-two",lane:"centre",filledBy:"MN-13171",renderAt:"both",reserved:{minHeight:805}},{regionId:"more-files",lane:"centre",filledBy:"MN-13176",renderAt:"both",reserved:{minHeight:460}},{regionId:"review-rail",lane:"right-rail",filledBy:"MN-13165",renderAt:"both",reserved:{minHeight:689}}]},501117(e,t,r){"use strict";r.d(t,{l:()=>ArtworkPlacements});var n=r(483134),o=r(293534),i=r(871339),l=r(859807),c=r(739600),u=r(493104),d=r(859774),p=r(611087),f=r(170112),_=r(830287);function ArtworkPlacements(e){var t,r,h,m,g,b=e.preview,y=e.heading,v=e.tabsIdPrefix,w=e.showPreviewOn,j=(0,p.ue)(b.aspectRatio),k=(0,f.o)(b.artworkId),x=(0,o.useRef)(null),S=null!=(t=null!=(r=(0,l.TY)(b))?r:null==(m=j[0])?void 0:m.id)?t:"";(0,_.N)(x,b);var O=j.some(function(e){return e.id===S})?S:null!=(h=null==(g=j[0])?void 0:g.id)?h:"";return 0===j.length?null:(0,n.jsxs)("section",{ref:x,className:"flex flex-col gap-4","data-testid":"dtf-step-two-artwork-".concat(b.previewIndex),children:[y?(0,n.jsx)("h3",{className:"pt-0! text-[14px]! font-semibold text-[#4b5565]",children:y}):null,void 0===w||w?(0,n.jsx)(d.m,{previewIndex:b.previewIndex}):null,(0,n.jsxs)(i.tU,{tabsId:"".concat(void 0===v?"dtf-step-two-placements":v,"-").concat(b.previewIndex),label:"Placement",value:O,onChange:function(e){return(0,l.cP)(b,e)},className:"flex flex-col gap-4",children:[(0,n.jsx)(u.q,{placements:j,selected:O,artworkUrl:b.artworkUrl,previewColor:b.previewColor,quantityFor:k.quantityFor}),(0,p.Lz)(j)?(0,n.jsx)("p",{className:"text-[12px] text-[#697586]","data-testid":"dtf-step-two-invalid-note",children:p.Op}):null,j.map(function(e){return(0,n.jsx)(i.Kp,{value:e.id,children:(0,n.jsx)(c.Q,{placement:e,preview:b,api:k})},e.id)})]})]})}},221833(e,t,r){"use strict";r.d(t,{t:()=>CustomSizePanel});var n=r(483134),o=r(882879),i=r(950001),l=r(75963),c=r(978179),u=r(611087),d=r(612436);function CustomSizePanel(e){var t=e.preview,r=e.api,p=(0,i.n)(),f=(0,o.P)(),_=(0,o.V)(),h=_.isPricingPending,m=_.isPricingStale,g=r.rows.filter(function(e){return e.preset===u.Is});return(0,n.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"dtf-step-two-custom-panel",children:[g.map(function(e,o){var i;return(0,n.jsx)(l.p,{row:e,position:o+1,limits:p,aspectRatio:t.aspectRatio,payable:(0,d.X)(e,f.adjustedPriceFor),retail:(0,d.y)(e),pending:h||m,canRemove:g.length>1,onDimension:function(t,n){return r.patchRow(e.id,t,n)},onQuantity:function(t){return r.patchRow(e.id,{quantity:t})},onRemove:function(){return r.removeRow(e.id)}},null!=(i=e.id)?i:o)}),(0,n.jsx)("button",{type:"button",className:c._t,"data-testid":"dtf-step-two-add-size",onClick:r.addCustomRow,children:"+ Add another custom size"})]})}},75963(e,t,r){"use strict";r.d(t,{p:()=>CustomSizeRow});var n=r(483134),o=r(250456),i=r(610376),l=r(978179),c=r(274957),u=r(924175),d=r(839544);function CustomSizeRow(e){var t,r=e.row,p=e.position,f=e.limits,_=e.aspectRatio,h=e.payable,m=e.retail,g=e.pending,b=e.canRemove,y=e.onDimension,v=e.onQuantity,w=e.onRemove,j="dtf-step-two-custom-".concat(null!=(t=r.id)?t:p),k=Number(r.width)||f.minWidth,x=Number(r.height)||f.minHeight,S=f.isPrintAsIs?"Length (ft)":"Height (in)",editDimension=function(e,t){return y((0,u.j)({current:{width:k,height:x},value:e,edited:t,aspectRatio:_,limits:f}),t)};return(0,n.jsxs)("div",{className:l.M,"data-testid":j,children:[(0,n.jsxs)("div",{className:c.J,children:[(0,n.jsx)("span",{className:l.vw,"aria-hidden":"true",children:"Width (in)"}),(0,n.jsx)(i.C1,{stepperId:"".concat(j,"-width"),label:"Width (in), size ".concat(p),value:k,min:f.minWidth,max:f.maxWidth,step:f.step,className:l.W_,onChange:function(e){return editDimension(e,"width")}})]}),(0,n.jsx)("span",{className:l.rY,"aria-hidden":"true",children:"\xd7"}),(0,n.jsxs)("div",{className:c.J,children:[(0,n.jsx)("span",{className:l.vw,"aria-hidden":"true",children:S}),(0,n.jsx)(i.C1,{stepperId:"".concat(j,"-height"),label:"".concat(S,", size ").concat(p),value:x,min:f.minHeight,max:f.maxHeight,step:f.step,className:l.W_,onChange:function(e){return editDimension(e,"height")}})]}),(0,n.jsxs)("div",{className:c.I,children:[(0,n.jsx)("span",{className:l.vw,"aria-hidden":"true",children:"Qty"}),(0,n.jsx)(i.C1,{stepperId:"".concat(j,"-qty"),label:"Qty, size ".concat(p),value:r.quantity,min:1,max:f.maxQuantity,step:1,className:l.df,onChange:v})]}),(0,n.jsx)(d._,{priceId:j,payable:h,retail:m,pending:g}),b?(0,n.jsx)("button",{type:"button","aria-label":"Remove size ".concat(p),className:l.om,"data-testid":"".concat(j,"-remove"),onClick:w,children:(0,n.jsx)(o.A,{"aria-hidden":"true",size:16})}):null]})}},591301(e,t,r){"use strict";r.d(t,{N:()=>FreeBorderNote});var n=r(483134),o=r(950001),i=r(292064);function FreeBorderNote(){return(0,o.n)().isPrintAsIs?null:(0,n.jsx)("p",{className:i.SU,"data-testid":"dtf-step-two-free-border",children:"Extra border added automatically — makes cutting to shape fast and clean"})}},839544(e,t,r){"use strict";r.d(t,{_:()=>LinePrice});var n=r(483134),o=r(338908),i=r(407433),l=r(978179);function LinePrice(e){var t=e.payable,r=e.retail,c=e.priceId,u=e.pending,d=(0,o.s)().n;return void 0!==u&&u?(0,n.jsx)("div",{className:l.XC,"data-testid":"".concat(c,"-price"),"aria-busy":"true",children:(0,n.jsx)(i.C,{className:"h-[16px] w-[52px]","data-testid":"".concat(c,"-price-pending")})}):(0,n.jsxs)("div",{className:l.XC,"data-testid":"".concat(c,"-price"),children:[null!==r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:l.we,"aria-hidden":"true","data-testid":"".concat(c,"-price-struck"),children:d(r,"currency")}),(0,n.jsx)("span",{className:"sr-only",children:"Was ".concat(d(r,"currency"),", now")})]}):null,(0,n.jsx)("span",{className:l.gG,"aria-live":"polite","data-testid":"".concat(c,"-price-total"),children:d(t,"currency")})]})}},647383(e,t,r){"use strict";r.d(t,{C:()=>HeaderTotal,R:()=>OrderTotalRow});var n=r(483134),o=r(338908),i=r(407433),l=r(882879),c=r(173680),u=r(292064);function OrderTotalRow(){var e=(0,l.V)(),t=(0,l.P)(),r=(0,c.u)(e,t.discount),o=e.isPricingPending||e.isPricingStale;return(0,n.jsxs)("div",{className:u.tV,"data-testid":"dtf-step-two-order-total","aria-busy":o||void 0,children:[(0,n.jsxs)("div",{className:u.uJ,children:[(0,n.jsx)("span",{className:u.Ir,children:"Order Total"})," ",(0,n.jsx)("span",{className:u.P5,children:o?(0,n.jsx)(i.C,{className:"h-[13px] w-[72px]","data-testid":"dtf-step-two-order-total-pending-count"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:u.t8,children:"\xb7 "}),r.transfers]})})]}),(0,n.jsx)(TotalFigures,{struck:r.struck,total:r.total,saving:r.saving,pending:o,totalClassName:u.fC,testId:"dtf-step-two-order-total"})]})}function HeaderTotal(){var e=(0,o.s)().n,t=(0,l.V)(),r=(0,l.P)(),d=(0,c.u)(t,r.discount),p=t.isPricingPending||t.isPricingStale;return(0,n.jsxs)("div",{className:u.eP,"data-testid":"dtf-step-two-header-total","aria-busy":p||void 0,children:[(0,n.jsx)("span",{className:u.hV,children:"Total"}),(0,n.jsx)(TotalFigures,{struck:d.struck,total:d.total,saving:null,pending:p,totalClassName:u.FP,testId:"dtf-step-two-header-total"}),(0,n.jsxs)("span",{className:u.P5,children:[p?(0,n.jsx)(i.C,{className:"h-[13px] w-[64px]","data-testid":"dtf-step-two-header-total-pending-count"}):d.transfers,p||null===d.saving?null:(0,n.jsxs)(n.Fragment,{children:[" \xb7 ",(0,n.jsx)("span",{className:u.LA,children:"saving ".concat(e(d.saving,"currency"))})]})]})]})}function TotalFigures(e){var t=e.struck,r=e.total,l=e.saving,c=e.pending,d=e.totalClassName,p=e.testId,f=(0,o.s)().n;return c?(0,n.jsx)("div",{className:u.Os,children:(0,n.jsx)(i.C,{className:"h-[20px] w-[80px]","data-testid":"".concat(p,"-pending")})}):(0,n.jsxs)("div",{className:u.Os,children:[null!==t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:u.$f,"aria-hidden":"true","data-testid":"".concat(p,"-struck"),children:f(t,"currency")}),(0,n.jsx)("span",{className:"sr-only",children:"Was ".concat(f(t,"currency"),", now")})]}):null,(0,n.jsx)("span",{className:d,"aria-live":"polite","data-testid":"".concat(p,"-payable"),children:f(r,"currency")}),null!==l?(0,n.jsx)("span",{className:"".concat(u.LA," ").concat(u.uK),"data-testid":"".concat(p,"-saving"),children:"saving ".concat(f(l,"currency"))}):null]})}},478099(e,t,r){"use strict";r.d(t,{x:()=>PlacementChips});var n=r(483134),o=r(338908),i=r(586519),l=r(444636),c=r(605141),u=r(407433),d=r(555828),p=r(882879),f=r(642084),_=r(612436),h=r(292064);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function PlacementChips(){var e=(0,o.s)().n,t=(0,d.qG)(),r=(0,d.a)(),l=(0,p.P)(),_=(0,f.s)().trackPlacementRemoved,m=(0,p.V)(),g=m.isPricingPending,b=m.isPricingStale,y=g||b,v=chipGroups(t,l.adjustedPriceFor);if(0===v.length)return null;var remove=function(e){null!==e.artworkId&&(r({artworkId:e.artworkId,sizesAndQuantities:t.filter(function(t){return String(t.artworkId)===String(e.artworkId)}).filter(function(t){return t.preset!==e.placementId}).map(writableRow)}).catch(function(e){(0,i.notifyError)("[MN-13174] placement removal failed",{params:{message:String(e)}})}),_({artworkId:e.artworkId,preset:e.placementId}))};return(0,n.jsxs)("div",{"data-testid":"dtf-step-two-chips","aria-busy":y||void 0,children:[(0,n.jsx)("h3",{className:h.o8,children:"Your placements"}),(0,n.jsx)("div",{className:h.Gm,children:v.map(function(t){return(0,n.jsxs)(c.vu,{chipId:"dtf-step-two-chip-".concat(t.key),label:"".concat(t.label,", ").concat(1===t.quantity?"1 transfer":"".concat(t.quantity," transfers")),removeLabel:"Remove ".concat(t.label," placement"),children:[(0,n.jsxs)(c.RN,{children:["".concat(t.label," \xb7 ").concat(t.quantity," \xb7 "),y?(0,n.jsx)(u.C,{className:"h-[11px] w-[38px]","data-testid":"dtf-step-two-chip-".concat(t.key,"-pending-price")}):e(t.total,"currency")]}),(0,n.jsx)(c.Do,{onRemove:function(){return remove(t)}})]},t.key)})})]})}function chipGroups(e,t){var r=[],n=new Map;return e.forEach(function(e){var t,o="".concat(e.artworkId,"-").concat(e.preset);
1n.has(o)||(r.push(o),n.set(o,[])),null==(t=n.get(o))||t.push(e)}),r.map(function(e){var r,o,i,c,u,d,p,f=null!=(r=n.get(e))?r:[];return{key:e,artworkId:null!=(o=null==(u=f[0])?void 0:u.artworkId)?o:null,placementId:null!=(i=null==(d=f[0])?void 0:d.preset)?i:"",label:(0,l.Sr)(null!=(c=null==(p=f[0])?void 0:p.preset)?c:""),quantity:f.reduce(function(e,t){return e+(Number(t.quantity)||0)},0),total:f.reduce(function(e,r){return e+(0,_.X)(r,t)},0)}})}function writableRow(e){return _object_spread(_object_spread_props(_object_spread({},e.id?{id:e.id}:{}),{width:e.width,height:e.height,quantity:e.quantity,preset:e.preset}),e.size?{size:e.size}:{})}},739600(e,t,r){"use strict";r.d(t,{Q:()=>PlacementPanel});var n=r(483134),o=r(221833),i=r(611087),l=r(132641);function PlacementPanel(e){var t=e.placement,r=e.preview,c=e.api;return t.id===i.Is?(0,n.jsx)(o.t,{preview:r,api:c}):(0,n.jsx)(l.t,{placementId:t.id,placementLabel:t.label,preview:r,api:c})}},493104(e,t,r){"use strict";r.d(t,{q:()=>PlacementTabs});var n=r(483134),o=r(293534),i=r(562301),l=r(611210),c=r(871339),u=r(11650),d=r(233579),p=r(50695);function PlacementTabs(e){var t=e.placements,r=e.selected,f=e.artworkUrl,_=e.previewColor,h=e.quantityFor,m=(0,o.useRef)(null);return(0,p.f)(m,r,{selectedQuantity:h(r),placementsKey:t.map(function(e){return e.id}).join()}),(0,n.jsxs)("div",{ref:m,children:[(0,n.jsx)(c.wb,{className:u.VV,children:t.map(function(e){var t=e.id===r,o=h(e.id);return(0,n.jsxs)(c.oz,{value:e.id,className:t?"".concat(u.j0," ").concat(u.D8):u.j0,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none min-h-0 overflow-hidden",children:(0,n.jsx)(i.A,{artworkUrl:null!=f?f:void 0,preset:e.id,selectedColor:_,"data-testid":"dtf-step-two-mockup-".concat(e.id)})}),(0,n.jsx)("span",{className:u.yv,children:e.label}),o>0?(0,n.jsxs)(l.Ex,{badgeId:"dtf-step-two-count-".concat(e.id),className:d.Hu,children:[(0,n.jsx)("span",{"aria-hidden":"true",children:o}),(0,n.jsx)("span",{className:"sr-only",children:1===o?"1 transfer added":"".concat(o," transfers added")})]}):null,t?(0,n.jsx)("span",{className:u.Vs,"aria-hidden":"true"}):null]},e.id)})}),(0,n.jsx)("div",{className:u.q4,"aria-hidden":"true"})]})}},132641(e,t,r){"use strict";r.d(t,{t:()=>PresetSizePanel});var n=r(483134),o=r(997252),i=r(610376),l=r(950001),c=r(233579),u=r(611087);function PresetSizePanel(e){var t=e.placementId,r=e.placementLabel,d=e.preview,p=e.api,f=(0,l.n)(),_=(0,u.eR)(t,d.aspectRatio);return(0,n.jsx)("div",{className:c.wx,"data-testid":"dtf-step-two-sizes-".concat(t),children:_.map(function(e){var l,u=p.rowForSize(t,e.sizeKey),d=null!=(l=null==u?void 0:u.quantity)?l:0,_="dtf-step-two-size-".concat(t,"-").concat(e.sizeKey.trim().replace(/\s+/g,"-"));return(0,n.jsxs)("div",{className:(0,o.cn)(c.Gx,0===d&&c.MD),"data-testid":_,children:[(0,n.jsx)("span",{className:c.PM,children:e.title}),(0,n.jsx)("span",{className:c.RK,"aria-hidden":"true",children:"".concat(e.width.toFixed(2),'" x ').concat(e.height.toFixed(2),'"')}),(0,n.jsx)(i.C1,{stepperId:_,label:"".concat(r,", ").concat(e.title,", ").concat(e.width.toFixed(2)," by ").concat(e.height.toFixed(2)," inches"),value:d,min:0,max:f.maxQuantity,step:1,className:c.iY,onChange:function(r){return p.setSizeQuantity(t,e,r)}})]},e.sizeKey)})})}},859774(e,t,r){"use strict";r.d(t,{m:()=>PreviewOnPanel});var n=r(483134),o=r(147141),i=r(845627),l=r(954309),c=r(561246);function PreviewOnPanel(e){var t=e.previewIndex,r=!(0,o.tp)()&&!(0,o.v1)();return(0,n.jsx)("div",{className:r?c.Iw:c.oE,"data-testid":"dtf-step-two-preview-panel",children:(0,n.jsx)(i.A,{index:t,isRedesign:!0,browseLabel:r?void 0:l.D4})})}},568559(e,t,r){"use strict";r.d(t,{H:()=>StepTwoCard});var n=r(483134),o=r(600837),i=r(305359),l=r(711897),c=r(520023),u=r(950001),d=r(501117),p=r(647383),f=r(478099),_=r(591301),h=r(561246),m=r(816586),g=r(741297);function StepTwoCard(){var e=(0,u.p)(),t=(0,l.x)();return(0,c.Z)(),(0,n.jsx)("div",{className:"dtf-redesign-region",children:e.length>0?(0,n.jsx)(StepTwoBody,{previews:e,showPreviewOn:!t}):null})}function StepTwoBody(e){var t=e.previews,r=e.showPreviewOn,l=(0,g.ze)(t);return(0,n.jsxs)(o.Zp,{cardId:m.fm,className:h.kA,children:[(0,n.jsxs)(o.aR,{className:h.bP,children:[(0,n.jsxs)("div",{className:m.WP,children:[(0,n.jsxs)("h2",{className:h.od,children:[(0,n.jsx)("span",{className:h.fL,children:"Step 2 of 2:"}),(0,n.jsx)("span",{className:h.eg,children:"Where should it print?"})]}),(0,n.jsx)("p",{className:h.k$,children:"Pick a placement, then choose how many."})]}),(0,n.jsx)(p.C,{}),l?(0,n.jsx)(i.l,{stepId:m.fm,stepLabel:"Step 2",className:m.LU}):null]}),(0,n.jsxs)(o.bw,{className:"flex flex-col gap-6",children:[t.map(function(e){return(0,n.jsx)(d.l,{preview:e,heading:t.length>1?e.name:null,showPreviewOn:r},e.previewIndex)}),(0,n.jsx)(f.x,{}),(0,n.jsx)(_.N,{}),(0,n.jsx)(p.R,{})]})]})}},924175(e,t,r){"use strict";r.d(t,{j:()=>lockedPair});var n=r(740355),o=r(610376);function lockedPair(e){var t=e.current,r=e.value,n=e.edited,i=e.aspectRatio,l=e.limits,pair=function(e,t){return"width"===n?{width:e,height:t}:{width:t,height:e}};if(null===i)return pair(r,"width"===n?t.height:t.width);var c=proportional(r,n,i),u="width"===n?(0,o.E0)(c,l.minHeight,l.maxHeight):(0,o.E0)(c,l.minWidth,l.maxWidth);if(u===c)return pair(r,u);var d=proportional(u,"width"===n?"height":"width",i);return pair("width"===n?(0,o.E0)(d,l.minWidth,l.maxWidth):(0,o.E0)(d,l.minHeight,l.maxHeight),u)}function proportional(e,t,r){return Number((0,n.vf)({value:e,field:"width"===t?"height":"width",metadataAspectRatio:r,naturalWi
1dth:null,naturalHeight:null}))}},561246(e,t,r){"use strict";r.d(t,{Iw:()=>p,bP:()=>o,eg:()=>c,fL:()=>l,k$:()=>u,kA:()=>n,oE:()=>d,od:()=>i});var n="w-full",o="flex-col items-start gap-3 min-[992px]:flex-row",i="mb-0! pt-0! flex flex-wrap items-baseline gap-x-1 text-[17px]! font-bold leading-[19px]",l="text-[#1d4ed8]",c="text-[#4b5565]",u="mt-[5px] text-[13px] leading-[15.5px] text-[#697586]",d="rounded-lg border border-[#e1e1e5] bg-[#f9fafb] p-3",p="rounded-lg border border-[#e1e1e5] bg-[#f9fafb] px-[15px] py-3"},978179(e,t,r){"use strict";r.d(t,{M:()=>n,W_:()=>i,XC:()=>u,_t:()=>_,df:()=>l,gG:()=>p,om:()=>f,rY:()=>c,vw:()=>o,we:()=>d});var n="flex flex-wrap items-end gap-x-[5px] gap-y-[5px] min-[992px]:gap-x-[10px] min-[992px]:gap-y-3",o="mb-[4px] block text-[11px] font-semibold tracking-[0.04em] text-[#697586] uppercase",i="h-10 w-full px-px [&>button]:w-[26px] min-[992px]:h-9 min-[992px]:w-[130px] min-[992px]:[&>button]:w-auto",l="h-10 w-full px-px [&>button]:w-[26px] min-[992px]:h-9 min-[992px]:w-[114px] min-[992px]:[&>button]:w-auto",c="self-end pb-[10px] text-[16px] leading-[19.5px] text-[#697586] min-[992px]:pb-[7px]",u="order-last ml-auto flex basis-full flex-row items-baseline justify-end gap-[6px] leading-tight min-[992px]:order-none min-[992px]:basis-auto min-[992px]:flex-col min-[992px]:items-end min-[992px]:justify-start min-[992px]:gap-0",d="text-[12px] text-[#9aa4b2] line-through",p="text-[15px] font-bold text-[#121926]",f="inline-flex size-6 mb-2! min-[992px]:size-9 min-[992px]:mb-0! shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-[#697586]! transition-colors hover:bg-[#f8fafc] hover:text-[#e02424]! focus-visible:outline-2! focus-visible:-outline-offset-2 focus-visible:outline-blue-600!",_="mt-3 flex h-[37px] w-full cursor-pointer items-center justify-center rounded-md border border-[#c6ccfc] bg-[#f2f3fe] px-4 text-[13px]! font-semibold! text-[#1d4ed8]! transition-colors hover:bg-[#e8eafd] focus-visible:outline-2! focus-visible:-outline-offset-2 focus-visible:outline-blue-600!"},274957(e,t,r){"use strict";r.d(t,{I:()=>o,J:()=>n});var n="min-w-0 grow-[92] basis-0 min-[992px]:grow-0 min-[992px]:basis-auto",o="min-w-0 grow-[76] basis-0 min-[992px]:grow-0 min-[992px]:basis-auto"},173680(e,t,r){"use strict";function orderTotalFigures(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=Number(e.orderTotal),i=Number(null!=(t=e.orderSubtotal)?t:NaN),l=Number.isFinite(o)&&Number.isFinite(i)&&o>i,c=Math.round((o-i)*100)/100;return{total:null!=(r=e.orderSubtotal)?r:e.orderTotal,struck:l?e.orderTotal:null,saving:l?c:n>0?n:null,transfers:1===e.totalQuantity?"1 transfer":"".concat(e.totalQuantity," transfers")}}r.d(t,{u:()=>orderTotalFigures})},11650(e,t,r){"use strict";r.d(t,{D8:()=>i,VV:()=>n,Vs:()=>l,j0:()=>o,q4:()=>c,yv:()=>u});var n="items-end gap-[10px] overflow-x-auto pt-[10px] pb-[13px] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",o="relative h-[142px] w-[120px] flex-none flex-col justify-start gap-0 rounded-md border border-[#e5e7eb] bg-white px-0 pt-[14px] pb-[7.9px] hover:bg-[#f8fafc]",i="border-2 border-[#1d4ed8] bg-white text-[#1d4ed8]! hover:bg-white",l="absolute -bottom-[15px] left-0 h-[3px] w-full rounded-full bg-[#1d4ed8]",c="h-px w-full bg-[#e5e7eb]",u="mt-auto w-full shrink-0 truncate px-1 text-center text-[13px] font-semibold leading-[16.1px]"},611087(e,t,r){"use strict";r.d(t,{Is:()=>c,Lz:()=>hasWithdrawnPlacements,Op:()=>u,eR:()=>recommendedSizes,ue:()=>availablePlacements});var n=r(298210),o=r(740355),i=r(444636),l=r(335264);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}var c="custom";function availablePlacements(e){return null===e?[]:Object.entries(n.Dn).filter(function(t){return _sliced_to_array(t,2)[1].every(function(t){var r=t.width,n=t.height,o=(0,i.ir)(r,n,e);return Number(o.width)>=d&&Number(o.height)>=d})}).map(function(e){var t=_sliced_to_array(e,1)[0];return{id:t,label:(0,i.Sr)(t)}})}var u="*Some sizes are unavailable. Minimum size is 1 inch.",d=1;function hasWithdrawnPlacements(e){return e.length>0&&e.length<Object.keys(n.Dn).length}function recommendedSizes(e,t){var r;return null===t?[]:(null!=(r=n.Dn[e])?r:[]).map(function(r){var n=(0,i.ir)(r.width,r.height,t);return _object_spread_props(_object_spread({sizeKey:(0,o.fJ)(r),title:placementSizeTitle(e,r)},(0,l.xy)(r)),{width:Number(n.width),height:Number(n.height)})})}function placementSizeTitle(e,t){if("full-front"===e){var r;if((null==(r=t.sizeRange)?void 0:r.toLowerCase())==="newborn")return"Newborn";if("infant"===t.category.toLowerCase())return"Infant"}var n=t.sizeRange?" (".concat(t.sizeRange,")"):"";return"".concat((0,i.Sr)(t.category)).concat(n)}},233579(e,t,r){"use strict";r.d(t,{Gx:()=>o,Hu:()=>d,MD:()=>i,PM:()=>l,RK:()=>c,iY:()=>u,wx:()=>n,z3:()=>p});var n="grid grid-cols-[repeat(auto-fill,minmax(128px,1fr))] gap-2",o="flex min-h-[109px] flex-col items-center justify-between gap-1 rounded-md border border-[#e5e7eb] bg-white px-2 py-[10px] text-center",i="",l="text-[12px] font-semibold text-[#121926]",c="text-[11px] leading-[14px] text-[#697586]",u="h-7 w-[98px] px-px",d="pointer-events-none absolute -top-[9px] -right-[9px] size-7 justify-center rounded-full bg-[#1d4ed8] px-0 text-[13px] font-bold text-white",p=9},612436(e,t,r){"use strict";function rowPayable(e,t){var r=t(e.artworkId,e);return r?r.discountedTotalPrice:Number(e.unitPrice||0)*e.quantity}function rowRetail(e){var t=Number(e.retailPrice||0);return t>0?t*e.quantity:null}r.d(t,{X:()=>rowPayable,y:()=>rowRetail})},816586(e,t,r){"use strict";r.d(t,{LU:()=>i,WP:()=>o,fm:()=>n});var n="dtf-step-two",o="mr-auto pr-7 min-[992px]:pr-0",i="absolute right-4 top-4 min-[992px]:static min-[992px]:mt-0.5"},292064(e,t,r){"use strict";r.d(t,{$f:()=>h,FP:()=>v,Gm:()=>o,Ir:()=>d,LA:()=>g,Os:()=>f,P5:()=>p,SU:()=>i,eP:()=>b,fC:()=>m,hV:()=>y,o8:()=>n,t8:()=>u,tV:()=>l,uJ:()=>c,uK:()=>_});var n="mb-2 text-[14px] font-semibold text-[#121926]",o="flex flex-wrap gap-2",i="my-4 text-center text-[13px] leading-[15.5px] text-[#4b5565]",l="flex items-start justify-between gap-x-4 rounded-md bg-[#f2f3fe] px-3 py-[6px] min-[992px]:flex-wrap min-[992px]:items-center min-[992px]:gap-y-1 min-[992px]:px-4 min-[992px]:py-[10px]",c="flex flex-col min-[992px]:block",u="hidden min-[992px]:inline!",d="text-[12px] font-bold tracking-[0.04em] text-[#4b5565] uppercase",p="text-[13px] text-[#4b5565]",f="flex flex-wrap items-baseline justify-end gap-x-[5px] gap-y-0 min-[992px]:flex-nowrap min-[992px]:justify-start min-[992px]:gap-x-2",_="basis-full text-right min-[992px]:basis-auto min-[992px]:text-left",h="text-[13px] text-[#9aa4b2] line-through",m="text-[18px] font-bold text-[#121926]",g="text-[13px] font-semibold text-green-700",b="hidden shrink-0 flex-col items-start min-[992px]:flex! min-[992px]:items-end",y="text-[11px] font-bold tracking-[0.06em] text-[#697586] uppercase",v="text-[24px] font-bold leading-[29.5px] text-[#121926]"},50695(e,t,r){"use strict";r.d(t,{f:()=>useKeepSelectedTabInView});var n=r(293534);function useKeepSelectedTabInView(e,t,r){var o=r.selectedQuantity,i=r.placementsKey;(0,n.useEffect)(function(){var t,r=null==(t=e.current)?void 0:t.querySelector('[role="tablist"]'),n=null==r?void 0:r.querySelector('[aria-selected="true"]');if(r&&n){var apply=function(){var e=scrollCorrection({left:r.getBoundingClientRect().left+r.clientLeft,width:r.clientWidth},n.getBoundingClientRect());0!==e&&(r.scrollLeft+=e)};apply();var o=new ResizeObserver(apply);return o.observe(r),function(){return o.disconnect()}}},[e,t,o,i])}var o=r(233579).z3;
1function scrollCorrection(e,t){var r=t.left-e.left,n=t.right+o-(e.left+e.width);return r<0?r:n>0?n:0}},544137(e,t,r){"use strict";r.d(t,{V:()=>usePlacementRowAnalytics});var n=r(293534),o=r(642084),i=r(611087);function usePlacementRowAnalytics(e,t){var r=(0,o.s)();return(0,n.useMemo)(function(){return{customRowAdded:function(n){t.some(function(e){return e.preset===i.Is})||r.trackPlacementSelected({artworkId:e,preset:i.Is}),r.trackCustomSizeAdded({artworkId:e,sizeCount:t.length,width:n.width,height:n.height})},customRowRemoved:function(n){r.trackCustomSizeRemoved({artworkId:e,sizeCount:t.length,width:n.width,height:n.height,quantity:n.quantity}),t.some(function(e){return e.preset===n.preset&&e.id!==n.id})||r.trackPlacementRemoved({artworkId:e,preset:n.preset})},rowPatched:function(n,o,i){var l,c,u;i?r.trackSizeEdited({artworkId:e,previous:{width:Number(n.width),height:Number(n.height)},next:{width:Number(null!=(c=o.width)?c:n.width),height:Number(null!=(u=o.height)?u:n.height)},quantity:n.quantity}):void 0!==o.quantity&&r.trackQuantityChanged({artworkId:e,preset:n.preset,sizeIndex:t.indexOf(n),previousQuantity:Number(n.quantity)||0,quantity:o.quantity,blanksSize:null==(l=n.size)?void 0:l.trim()})},sizeQuantitySet:function(n){var o,i=n.placementId,l=n.sizeKey,c=n.existing,u=n.quantity,d=n.appendIndex,p=t.filter(function(e){return e.preset===i&&e.id!==(null==c?void 0:c.id)}),f={artworkId:e,preset:i,sizeIndex:c?t.indexOf(c):d,previousQuantity:Number(null==c?void 0:c.quantity)||0,blanksSize:(null!=(o=null==c?void 0:c.size)?o:l).trim(),quantity:u};if(u<=0){r.trackQuantityChanged(f),0===p.length&&r.trackPlacementRemoved({artworkId:e,preset:i});return}c||0!==p.length||r.trackPlacementSelected({artworkId:e,preset:i}),r.trackQuantityChanged(f)}}},[r,e,t])}},170112(e,t,r){"use strict";r.d(t,{o:()=>usePlacementRows});var n=r(293534),o=r(586519),i=r(444636),l=r(555828),c=r(882879),u=r(611087),d=r(612436),p=r(544137);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function usePlacementRows(e){var t=(0,l.qG)(),r=(0,l.a)(),f=(0,c.P)(),_=(0,n.useMemo)(function(){return t.filter(function(t){return String(t.artworkId)===String(e)})},[t,e]),h=(0,p.V)(e,_),m=(0,n.useCallback)(function(t,n){null!==e&&r(_object_spread({artworkId:e,sizesAndQuantities:t},n?{editedField:n}:{})).catch(function(t){(0,o.notifyError)("[MN-13171] placement write failed",{params:{artworkId:String(e),message:String(t)}})})},[e,r]),g=(0,n.useCallback)(function(){return _.map(function(e){return _object_spread(_object_spread_props(_object_spread({},e.id?{id:e.id}:{}),{width:e.width,height:e.height,quantity:e.quantity,preset:e.preset}),e.size?{size:e.size}:{})})},[_]),b=(0,n.useCallback)(function(e,t,r){var n=_.find(function(t){return t.id===e});m(g().map(function(r){return r.id===e?_object_spread({},r,t):r}),r),n&&h.rowPatched(n,t,r)},[_,h,g,m]),y=(0,n.useCallback)(function(e){return _.filter(function(t){return t.preset===e}).reduce(function(e,t){return e+(Number(t.quantity)||0)},0)},[_]),v=(0,n.useCallback)(function(e){var t=_.filter(function(t){return t.preset===e});return 0===t.length?null:t.reduce(function(e,t){return e+(0,d.X)(t,f.adjustedPriceFor)},0)},[_,f]),w=(0,n.useCallback)(function(e,t){return _.find(function(r){return r.preset===e&&r.size===t})},[_]),j=(0,n.useCallback)(function(){var e,t,r,n=null!=(e=_to_consumable_array(_).reverse().find(function(e){return e.preset===u.Is}))?e:_[0],o={id:(0,i.r9)(),preset:u.Is,width:null!=(t=null==n?void 0:n.width)?t:1,height:null!=(r=null==n?void 0:n.height)?r:1,quantity:1};m(_to_consumable_array(g()).concat([o])),h.customRowAdded(o)},[_,h,g,m]),k=(0,n.useCallback)(function(e){if(e){var t=_.find(function(t){return t.id===e});m(g().filter(function(t){return t.id!==e})),t&&h.customRowRemoved(t)}},[_,h,g,m]),x=(0,n.useCallback)(function(e,t,r){var n,o=w(e,t.sizeKey),l=g().filter(function(e){return e.id!==(null==o?void 0:o.id)});r>0?m(_to_consumable_array(l).concat([{id:null!=(n=null==o?void 0:o.id)?n:(0,i.r9)(),preset:e,size:t.sizeKey,width:t.width,height:t.height,quantity:r}])):m(l),h.sizeQuantitySet({placementId:e,sizeKey:t.sizeKey,existing:o,quantity:r,appendIndex:l.length})},[h,w,g,m]);return{rows:_,quantityFor:y,totalFor:v,rowForSize:w,write:m,patchRow:b,addCustomRow:j,removeRow:k,setSizeQuantity:x}}},830287(e,t,r){"use strict";r.d(t,{N:()=>useScrollToSelectedPanel});var n=r(293534),o=r(808562),i=r(859807);function useScrollToSelectedPanel(e,t){var r=(0,i.B2)(t),o=(0,i.H_)(t),c=(0,n.useRef)(null);(0,n.useEffect)(function(){if((null==(n=c.current)?void 0:n.key)!==r){c.current={key:r,request:o};return}var t,n,i=c.current.request;if(c.current={key:r,request:o},!(o<=i)){var u=e.current,d=null==u?void 0:u.querySelector('[role="tabpanel"]');u&&d&&scrollToStep(null!=(t=u.closest(l))?t:u)}},[r,o,e])}var l='[data-testid="dtf-redesign-region-step-two"]';function scrollToStep(e){var t=e.getBoundingClientRect().top+window.scrollY-(0,o.G)();window.scrollTo({top:Math.max(0,t),behavior:scrollBehavior()})}function scrollBehavior(){var e,t;return(null==(e=(t=window).matchMedia)?void 0:e.call(t,"(prefers-reduced-motion: reduce)").matches)?"auto":"smooth"}},741297(e,t,r){"use strict";r.d(t,{ze:()=>useStepTwoComplete});var n=r(555828);function everyArtworkHasSelectedSize(e,t){return 0!==e.length&&e.every(function(e){return t.some(function(t){return sameArtwork(t.artworkId,e.artworkId)&&isQualifying(t)})})}function sameArtwork(e,t){return null!==e&&null!==t&&String(e)===String(t)}function isQualifying(e){return isPositive(e.width)&&isPositive(e.height)&&isPositive(e.quantity)}function isPositive(e){return Number(e)>0}function useStepTwoComplete(e){return everyArtworkHasSelectedSize(e,(0,n.qG)())}},344071(e,t,r){"use strict";r.d(t,{O:()=>UploadHero});var n=r(483134),o=r(348810),i=r(498083),l=r(591740),c=r(497630);function UploadHero(){return(0,n.jsx)("div",{className:"dtf-redesign-region",style:(0,i.VT)(l.w
1),"data-testid":"dtf-redesign-region-upload-hero",children:(0,n.jsxs)("section",{className:"rounded-[8px] border border-solid border-[#e1e1e5] bg-white pb-[15px] shadow-[0_25px_30px_rgba(0,0,0,0.05)]","aria-labelledby":"dtf-upload-hero-heading","data-testid":"upload-hero",children:[(0,n.jsxs)("h2",{id:"dtf-upload-hero-heading",className:"mb-0! flex h-[49px] items-center px-[15px] text-[17px] font-bold leading-[19px]",children:[(0,n.jsx)("span",{className:"text-[#1d4ed8]",children:"Step 1 of 2:"}),(0,n.jsx)("span",{className:"ml-1 text-[#4b5565]",children:"Upload Your Design(s)"})]}),(0,n.jsxs)("div",{className:"relative ml-[18px] mr-[15px] h-[400px] bg-[#e4efff] min-[992px]:mx-[15px] min-[992px]:h-[420px] min-[992px]:border min-[992px]:border-solid min-[992px]:border-[#c6ccfc]",children:[(0,n.jsx)("div",{className:"absolute inset-0 overflow-hidden","aria-hidden":"true",children:(0,n.jsx)(o.A,{className:"block! absolute bottom-[-15.03%] left-[-25.32%] right-[-25.42%] top-[3.25%] h-auto w-auto min-[992px]:bottom-[-31.69%] min-[992px]:left-[7.13%] min-[992px]:right-[7.12%] min-[992px]:top-[2.47%]","aria-hidden":"true",focusable:"false","data-testid":"upload-hero-tshirt"})}),(0,n.jsx)(c.D,{})]})]})})}},729012(e,t,r){"use strict";r.d(t,{V:()=>UploadHeroBox});var n=r(483134),o=r(997252),i=r(219909),l=r(156660),c=r(888973),u=r(886262),d=r(385862),p=r(591740),f=r(639844),_=r(530378);function UploadHeroBox(){var e=(0,l.I2)(),t=e.isDragOver,r=e.disabled,h=(0,c.n)(),m=h.trackUploadEntryClick,g=h.trackFileDropDetected,b=(0,u.o)().artwork;return(0,n.jsxs)("div",{className:"absolute left-1/2 top-[95px] w-[229px] -translate-x-1/2 min-[992px]:top-[100px] min-[992px]:w-[274px]","data-testid":"upload-hero-box",children:[(0,n.jsx)("div",{onClickCapture:function(e){var t=e.target;(null==t?void 0:t.closest('[data-upload-intent="false"]'))||r||m()},onDropCapture:function(e){var t,r,n,o=null!=(t=null==(n=e.dataTransfer)||null==(r=n.files)?void 0:r.length)?t:0;0!==o&&g(o)},children:(0,n.jsx)(l.nD,{className:(0,o.cn)("group gap-0 rounded-[4px] border-0 bg-[#e4efff] p-2",!r&&"hover:bg-[#dbe9ff]",t&&"bg-[#c9defd]"),children:(0,n.jsxs)("div",{className:(0,o.cn)("flex w-full flex-col items-center rounded-[4px] border border-dashed","border-[#1d4ed8] px-[7px] pb-[6px] pt-[7px] min-[992px]:px-[18px] min-[992px]:pb-[19px]",p.o,"justify-center",t&&"border-solid"),"data-testid":"upload-hero-card",children:[(0,n.jsx)(i.A,{className:"block! size-8 min-[992px]:size-10","aria-hidden":"true",focusable:"false","data-testid":"upload-hero-cloud-icon"}),b?(0,n.jsx)(_.l,{}):(0,n.jsx)(f.f,{}),(0,n.jsx)(l._s,{className:"sr-only"})]})})}),(0,n.jsx)(d.D,{}),(0,n.jsx)(l.K6,{})]})}},497630(e,t,r){"use strict";r.d(t,{D:()=>UploadHeroDropzone});var n=r(483134),o=r(293534),i=r(586519),l=r(156660),c=r(429491),u=r(765219),d=r(886262),p=r(729012);function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function UploadHeroDropzone(){var e=(0,u.v)().addFiles,t=(0,d.o)().artwork,r=(0,o.useCallback)(function(t,r,n){e(t,{uploadSource:n,isDropEvent:"drop"===r}).catch(function(e){(0,i.notifyError)(_instanceof(e,Error)?e:Error(String(e)),{context:{component:"UploadHeroDropzone",fileCount:t.length}})})},[e]);return(0,n.jsxs)(l.R3,{dropzoneId:l.rC,onFilesAccepted:r,perFileValidation:!1,disabled:!!t,children:[(0,n.jsx)(p.V,{}),(0,n.jsx)(c.qv,{})]})}},586831(e,t,r){"use strict";r.d(t,{G:()=>UploadHeroEntries});var n=r(483134),o=r(997252),i=r(629499),l=r(156660),c=r(167893),u=r(258669),d=r(692179),p=r(32355),f=r(187762);function UploadHeroEntries(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.canvaReplica,r=void 0!==t&&t,_=(0,d.J)(),h=_.isSignedIn,m=_.open,g=(0,c.x)().isEnabled,b=(0,l.I2)(),y=b.inputId,v=b.disabled,w=(0,u.P)(),j=g&&!(r&&(v||!w));return(0,n.jsxs)("div",{className:"mt-2 flex w-full flex-col gap-[9px] min-[992px]:mt-[10px]",children:[(0,n.jsx)(l.uq,{className:(0,o.cn)(p.h1,p.nr),children:"Upload from Device"}),h?(0,n.jsx)("button",{type:"button",className:(0,o.cn)(p.h1,p.xU),onClick:function(e){e.stopPropagation(),m()},"data-upload-intent":"false","data-testid":"upload-hero-design-library",children:"My Design Library"}):(0,n.jsx)(f.J,{}),j?(0,n.jsx)("div",{className:(0,o.cn)(p.k8,p.dm),onClick:function(e){e.stopPropagation()},"data-upload-intent":"false","data-testid":"upload-hero-canva",children:(0,n.jsx)(i.A,{fileLanding:"#".concat(y),namespace:"dtf",replica:r,"data-testid":"canva-button"})}):null]})}},385862(e,t,r){"use strict";r.d(t,{D:()=>UploadHeroErrors});var n=r(483134),o=r(156660),i=r(372350);function UploadHeroErrors(){var e=(0,i.W)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.lc,{className:"px-2 text-center"}),e.length>0?(0,n.jsx)("div",{className:"mt-2 px-2 text-center","data-testid":"upload-hero-upload-errors",role:"status","aria-live":"polite",children:e.map(function(e){return(0,n.jsx)("p",{className:o.QE,children:e.fileName?"".concat(e.fileName,": ").concat(e.message):e.message},e.key)})}):null]})}},639844(e,t,r){"use strict";r.d(t,{f:()=>UploadHeroInvite});
1var n=r(483134),o=r(586831);function UploadHeroInvite(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"mb-0! mt-[6px]! min-[992px]:mt-[7.77px]! text-[16px] font-bold leading-[21px] text-[#121926] min-[992px]:text-[18px]",children:"Upload your artwork"}),(0,n.jsx)("p",{className:"mb-0! mt-[2px]! min-[992px]:mt-[4.23px]! max-w-[193px] text-center text-[12px] leading-[17.04px] text-[#4b5565] min-[992px]:max-w-[221px] min-[992px]:text-[14px]",children:"Drag and drop your file, or choose where you'd like to import it from."}),(0,n.jsx)(o.G,{})]})}},187762(e,t,r){"use strict";r.d(t,{J:()=>UploadHeroLoginPrompt});var n=r(483134);function UploadHeroLoginPrompt(){return(0,n.jsxs)("p",{className:"mb-0! text-center text-[13px] leading-[18.57px] text-[#4b5565]","data-testid":"upload-hero-login-prompt",children:[(0,n.jsx)("a",{href:"/login",className:"text-[#1d4ed8]! no-underline! hover:underline! font-bold",onClick:function(e){e.stopPropagation()},"data-upload-intent":"false","data-testid":"upload-hero-login-link",children:"Log in"})," ","to see purchased designs."]})}},530378(e,t,r){"use strict";r.d(t,{l:()=>UploadHeroProgress});var n=r(483134),o=r(259703),i=r(227013),l=r(886262);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var c=o.A,u=i.A;function UploadHeroProgress(){var e=(0,l.o)(),t=e.artwork,r=e.index,o=e.message;return t?(0,n.jsxs)("div",{className:"mt-4 flex min-h-[96px] w-full flex-col items-center justify-center gap-1","data-testid":"upload-hero-progress","aria-busy":"true",children:[(0,n.jsx)(u,_object_spread_props(_object_spread({},o?{message:o}:{}),{className:"relative text-[13px] font-bold leading-[18px] text-[#121926] [&::after]:absolute [&::after]:bottom-0 [&::after]:left-full [&::after]:text-left",role:"status","aria-live":"polite","data-testid":"upload-hero-progress-message"})),(0,n.jsx)("div",{className:"w-full","aria-hidden":"true",children:(0,n.jsx)(c,{artwork:t,index:r,className:"text-[#4b5565]"})})]}):null}},32355(e,t,r){"use strict";r.d(t,{dm:()=>c,h1:()=>o,k8:()=>n,nr:()=>i,xU:()=>l});var n="inline-flex h-10 w-full items-center justify-center rounded-[8px]",o="".concat(n," ").concat("focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d4ed8] focus-visible:ring-offset-2 focus-visible:ring-offset-[#e4efff]"),i="bg-[#1d4ed8] text-[14px]! font-bold! leading-[21px]! text-white! transition-colors hover:bg-[#1a45c0]",l="border border-solid border-[#1d4ed8] bg-transparent text-[13px]! font-bold! leading-[18.57px]! text-[#1d4ed8]! transition-colors hover:bg-[#d7e7ff]",c="border border-solid border-[#1d4ed8] bg-transparent"},591740(e,t,r){"use strict";r.d(t,{o:()=>o,w:()=>n});var n={minHeight:486},o="min-h-[257px] min-[992px]:min-h-[284px]"},823126(e,t,r){"use strict";r.d(t,{a:()=>usePdpPageState});var n=r(666347);function derivePdpPageState(e){var t;return(null!=(t=e.artworks)?t:[]).some(function(e){return!!e&&!e.isSimulated&&!e.isFile&&!e.isLoading&&!Number.isNaN(parseInt(String(e.id),10))})?"uploaded":"empty"}function usePdpPageState(){return derivePdpPageState({artworks:(0,n.Z)()})}},209132(e,t,r){"use strict";r.d(t,{E:()=>useSameDayBlanksGate});var n=r(293534),o=r(927937),i=r(538896);
1function applyVerdict(e){i.dtfStore.sameDayBlanksGate=!!(e.dallas&&e.blanks)}function useSameDayBlanksGate(e){(0,n.useLayoutEffect)(function(){if(e){var t=(0,o.ny)(document);t&&applyVerdict(t);var r=!1;(0,o.KG)().then(function(e){r||applyVerdict(e)});var n=(0,o.ZV)(function(e,t){applyVerdict(t?e:{dallas:!1,blanks:!1})});return function(){r=!0,n(),applyVerdict({dallas:!1,blanks:!1})}}},[e])}},34995(e,t,r){"use strict";r.d(t,{B:()=>n,o:()=>o});var n=["DTF001","DTFGANG001","DTFLN1","DTFLN2"],o=["DTFPC1","GANGDTFPC1"]},181775(e,t,r){"use strict";r.d(t,{EO:()=>o,FP:()=>u,JM:()=>g,ML:()=>d,VJ:()=>l,Z0:()=>f,Zs:()=>i,a7:()=>c,kQ:()=>h,l8:()=>m,oS:()=>p,sG:()=>_});var n=r(802436),o={spangleIt:"spangle-it",editSize:"edit-size",sizeEdited:"size-edited",spanglesLoading:"spangles-loading"},i=(0,n.y$)(),l=(0,n.eU)({width:null,height:null}),c=(0,n.eU)([]),u=(0,n.eU)(o.spangleIt),d=(0,n.eU)(null),p=(0,n.eU)(""),f=(0,n.eU)(1),_=(0,n.eU)(!0),h=(0,n.eU)(!1),m=(0,n.eU)(!1),g=(0,n.eU)([])},127391(e,t,r){"use strict";r.d(t,{DE:()=>p,EO:()=>l.EO,o3:()=>d});var n=r(277889),o=r(586519),i=r(631116),l=r(181775),c=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var u={isLoading:!0},d=(0,i.z)({jotaiStore:l.Zs,state:{lastSpangledDimensions:l.VJ,spangleVariations:l.a7,spangleMode:l.FP,selectedAlgorithm:l.ML,originalArtworkUrl:l.oS,spanglesMaxImageCount:l.Z0,allAPIsCompletedState:l.sG,invali
1dSpangleSelected:l.kQ,isSpangleReordering:l.l8,completedSpangleData:l.JM},getters:{spangleIt:function(){return this.spangleMode===l.EO.spangleIt},spangleSizeEditing:function(){return this.spangleMode===l.EO.editSize},spangleSizeEdited:function(){return this.spangleMode===l.EO.sizeEdited},spanglesLoading:function(){return this.spangleMode===l.EO.spanglesLoading},isInitialSpangle:function(){return 0===this.spangleVariations.length},allAPIsCompleted:function(){return this.spangleVariations.every(function(e){return!e.isLoading})},allAPIsFailed:function(){return this.spangleVariations.every(function(e){return!e.isLoading&&e.error})},isSelectedVersionLoading:function(){var e=this,t=this.spangleVariations.find(function(t){return t.algorithm===e.selectedAlgorithm});return null==t?void 0:t.isLoading},selectedVersion:function(){var e=this;return this.spangleVariations.find(function(t){return t.algorithm===e.selectedAlgorithm})},isFirstSpangle:function(){return 0===this.spangleVariations.length}},actions:{setSpangleMode:function(e){this.spangleMode=e},setSpangleVariations:function(e){this.spangleVariations=e},setLastSpangledDimensions:function(e){this.lastSpangledDimensions=_object_spread({},e)},setSelectedAlgorithm:function(e){this.selectedAlgorithm=e},setOriginalArtworkUrl:function(e){this.originalArtworkUrl=e},setInvalidSpangleSelected:function(e){this.invalidSpangleSelected=e},setIsSpangleReordering:function(e){this.isSpangleReordering=e},resetSpangles:function(){this.$reset()},addCompletedSpangleData:function(e){this.completedSpangleData=_to_consumable_array(this.completedSpangleData).concat([e])},resetCompletedSpangleData:function(){this.completedSpangleData=[]},selectVersion:function(e){var t=e.version;if(t){var r=c.dtfStore;if(this.setSelectedAlgorithm(t.algorithm),!t.isLoading){this.setInvalidSpangleSelected(t.error);var n=t.error?this.originalArtworkUrl:t.imageUrl;r.updateArtworkValues({index:0,spangleCsv:t.spangleCsv,spanglePagesInfo:t.spanglePagesInfo,spanglePositionsJson:t.positionsJson,spangledImageUrl:n})}}},prepareVariations:function(e){var t=e.isRetry,r=this.spangleVariations,n=this.selectedAlgorithm,o=this.allAPIsFailed,i=this.isFirstSpangle,l=this.isSpangleReordering,d=c.dtfStore.spangleAlgorithms,p=[];if(t)p=r.map(function(e){return e.algorithm===n||o?_object_spread_props(_object_spread({},u),{algorithm:e.algorithm,spanglePagesInfo:e.spanglePagesInfo}):e});else{var f=i||l;p=(f?d:r).map(function(e){return _object_spread_props(_object_spread({},f?u:e),{algorithm:f?e:e.algorithm,spanglePagesInfo:f?null:e.spanglePagesInfo,isLoading:!0})})}p.length>0&&(!n||l)&&this.setSelectedAlgorithm(p[0].algorithm),this.setSpangleVariations(p)},updateSpangleVersion:function(e){var t=e.spangle,r=this.spangleVariations.map(function(e){return e.algorithm===t.algorithm?_object_spread_props(_object_spread({},e,t),{isLoading:!1}):e});this.setSpangleVariations(r)},changeColor:function(e){var t=this,r=e.colorValues,i=this.spangleVariations.filter(function(e){var t=e.isLoading,n=e.error,o=e.spanglePagesInfo,i=o?Object.values(o).filter(function(e){return(void 0===e?"undefined":_type_of(e))==="object"}).length:0,l=Object.keys(r).length;return!t&&!n&&l===i});0!==i.length&&i.map(function(e){var i=e.spanglePagesInfo,l=i.total_beads_count,u=i.time_taken;return n.api.dtf.updateSpangleColor({positions_json:e.positionsJson,pages_info:_object_spread_props(_object_spread({},r),{total_beads_count:l,time_taken:u})}).then(function(r){var n=c.dtfStore,o=r.design_url||r.design_base64,i=!!o,l=i?o:e.imageUrl;t.updateSpangleVersion({spangle:_object_spread_props(_object_spread(_object_spread_props(_object_spread({},e),{imageUrl:l}),r.pages_info?{spanglePagesInfo:r.pages_info}:{},r.positions_json?{positionsJson:r.positions_json}:{}),{error:!l})}),e.algorithm===t.selectedAlgorithm&&i&&n.updateArtworkValues(_object_spread({index:0,spangled:!0,spangledImageUrl:l},r.pages_info?{spanglePagesInfo:r.pages_info}:{},r.positions_json?{spanglePositionsJson:r.positions_json}:{}))}).catch(function(t){(0,o.notifyError)("DTF spangle color change error",{params:{error_message:t.message,algorithm:e.algorithm,pages_info:r}})})})},getVariation:function(e){var t=e.algorithm,r=e.spanglePagesInfo,n=e.id,o=e.algorithmsSize,i=e.algorithmToAnimate,l=e.processTimeStamp,u=c.dtfStore.artworks;c.dtfStore.cable.spangle({id:n,version_identifier:t,pages_info:r,algorithms_size:o,algorithm_to_animate:i,process_time_stamp:l,width:u[0].width,height:u[0].height})},getSpangleVariations:function(e){var t=this,r=e.isRetry,n=e.processTimeStamp;this.resetCompletedSpangleData();var o=c.dtfStore.artworks;if(c.dtfStore.spangleAlgorithms.length){var i=o[0].id;this.prepareVariations({isRetry:r}),this.setSpangleMode(l.EO.spanglesLoading),this.setInvalidSpangleSelected(!1),this.setIsSpangleReordering(!1);var u=this.spangleVariations.filter(function(e){return e.isLoading});u.map(function(e){var r=e.algorithm,o=e.spanglePagesInfo;return t.getVariation({algorithm:r,spanglePagesInfo:o,id:i,algorithmsSize:u.length,algorithmToAnimate:u[0].algorithm,processTimeStamp:n})})}},showSpangleResult:function(){var e,t,r=this,n=c.dtfStore.artworks,o=c.dtfStore.updateArtworkValues;this.setLastSpangledDimensions({width:null==(e=n[0])?void 0:e.width,height:null==(t=n[0])?void 0:t.height}),this.completedSpangleData.forEach(function(e){r.updateSpangleVersion({spangle:e})});var i=this.spangleVariations.find(function(e){return!e.error});this.selectVersion({version:i}),o({index:0,isLoading:!1})},cancelSpangleProcess:function(e){var t=e.artwork,r=this.spangleVariations,n=this.lastSpangledDimensions,o=c.dtfStore.updateArtworkValuesById,i=r.map(function(e){return _object_spread_props(_object_spread({},e),{isLoading:!1})});this.setSpangleVariations(i),o({id:t.id,width:parseFloat(n.width),height:parseFloat(n.height)}),this.setSpangleMode(l.EO.sizeEdited),this.resetCompletedSpangleData()}
1,cancelArtworkProcess:function(e){return _async_to_generator(function(e){var t,r;return _ts_generator(this,function(i){switch(i.label){case 0:t=e.artwork,i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,n.api.dtf.cancelArtworkProcess({id:t.id})];case 2:return i.sent(),[3,5];case 3:return r=i.sent(),(0,o.notifyError)("DTF cancel artwork process error",{params:{error_message:r.message,artwork_id:t.id}}),[3,5];case 4:return this.setSpangleMode(l.EO.sizeEdited),this.resetCompletedSpangleData(),[7];case 5:return[2]}})}).apply(this,arguments)}}}),p=d.store},676606(e,t,r){"use strict";r.d(t,{R:()=>useStickersStore});var n=r(277889),o=r(350672),i=r(586519),l=r(444636),c=r(2605),u=r(538896);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var d="sticker-images-cache",p=new Set;function retry(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,perform=function(t,r){return _async_to_generator(function(){var n;return _ts_generator(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,e()];case 1:return[2,i.sent()];case 2:if(n=i.sent(),t<=0)throw n;return[4,(0,o.yy)(r)];case 3:return i.sent(),[2,perform(t-1,2*r)];case 4:return[2]}})})()};return perform(t,r)}function manageCacheSize(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,caches.open(d)];case 1:return[4,(e=r.sent()).keys()];case 2:if(!((t=r.sent()).length>240&&t[0]))return[3,5];return[4,e.delete(t[0])];case 3:return r.sent(),[4,manageCacheSize()];case 4:r.sent(),r.label=5;case 5:return[2]}})})()}var f=["with_bg","no_bg"];function extractUrlsByBgStyleAndPadding(e){var t={};return Object.entries(e).forEach(function(e){var r=_sliced_to_array(e,2),n=r[0],o=r[1];
1f.includes(n)&&Object.entries(o).forEach(function(e){var r=_sliced_to_array(e,2),o=r[0],i=r[1];i&&(t["".concat(n,"-").concat(o)]=i)})}),t}function cacheCutlineImages(e,t){return _async_to_generator(function(){var r,n,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:return r=e.artwork,n=e.shape,[4,caches.open(d)];case 1:return o=l.sent(),i="".concat(r.id,"-").concat(n),[4,Promise.all(Object.entries(extractUrlsByBgStyleAndPadding(t)).map(function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,fetch(n)];case 1:if(!(e=t.sent()).ok)return[3,3];return[4,o.put("".concat(i,"-").concat(r),e.clone())];case 2:t.sent(),t.label=3;case 3:return[2]}})})()}))];case 2:return l.sent(),[4,manageCacheSize()];case 3:return l.sent(),[2]}})})()}function getCachedCutlineImage(e,t,r){return _async_to_generator(function(){var n,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:return n=e.id,o=e.removeBackground?"no_bg":"with_bg",i="".concat(n,"-").concat(t,"-").concat(o,"-").concat(r),[4,caches.open(d)];case 1:return[4,c.sent().match(i)];case 2:if(l=c.sent())return[2,l];throw Error("Image not found in cache for: ".concat(i))}})})()}var _=null;function createStickersStore(){var e=!1,t={},setStickerCutlines=function(e){var r=e.artwork,n=e.shape,o=e.cutlines,i=r.id;t[i]||(t[i]={}),t[i][n]=o},setIsLoading=function(t){e=t},fetchCutlineUrl=function(e){var r=e.artwork,o=e.shape,i=e.paddingSize,l=e.removeBackground,c=e.useCache,u=void 0===c||c;return _async_to_generator(function(){var e,c,d,p,f,_,h;return _ts_generator(this,function(m){switch(m.label){case 0:if(p=l?"no_bg":"with_bg",f=null==(e=t[r.id])?void 0:e[o],_=function(e){var t;return"with_bg"===p?null==e||null==(t=e.with_bg_ratios)?void 0:t[i]:void 0},!(u&&f&&(null==(c=f[p])?void 0:c[i])))return[3,4];m.label=1;case 1:return m.trys.push([1,3,,4]),[4,getCachedCutlineImage(r,o,i)];case 2:return m.sent(),[2,{url:f[p][i],ratio:_(f)}];case 3:return m.sent(),[3,4];case 4:if(r.shape!==o&&f)return[2,{url:null,ratio:void 0}];return[4,retry(function(){return n.api.dtf.stickerCutlines({id:r.id})})];case 5:return[4,cacheCutlineImages({artwork:r,shape:o},h=m.sent())];case 6:return m.sent(),setStickerCutlines({artwork:r,shape:o,cutlines:h}),[2,{url:null==h||null==(d=h[p])?void 0:d[i],ratio:_(h)}]}})})()};return{isLoading:e,cutlines:t,setStickerCutlines:setStickerCutlines,setIsLoading:setIsLoading,fetchCutlineUrl:fetchCutlineUrl,generateStickerImage:function(e){var t=e.artwork,r=e.shape,n=void 0===r?t.shape:r,o=e.paddingSize,d=void 0===o?t.paddingSize:o,f=e.bgColor,_=void 0===f?t.bgColor:f,h=e.removeBackground,m=void 0===h?t.removeBackground:h,g=e.useCache,b=void 0===g||g;return _async_to_generator(function(){var e,r,o,f,h,g,y,v,w,j,k,x,S;return _ts_generator(this,function(O){switch(O.label){case 0:e=t.id,O.label=1;case 1:if(O.trys.push([1,,6,7]),setIsLoading(!0),u.dtfStore.toggleLoading(["removeBg",!0]),u.dtfStore.updateArtworkValuesById({id:t.id,url:t.url,processingImage:!0}),o=(r=_sliced_to_array(m?[t.stickerCutlineNoBgUrl,t.originalNoBgUrl||t.enhancedNoBgUrl]:[t.stickerCutlineWithBgUrl,t.originalImageUrl],2))[0],!(f=r[1]))return(0,i.notifyError)("DTF sticker composite skipped: missing base layer",{params:{artwork_id:String(t.id),remove_background:m},fingerprint:"dtf-sticker-composite-missing-base-layer"}),[2,"skipped_missing_base_layer"];if(!(h=(0,c.XA)(t)&&!!u.dtfStore.isDieCutSticker))return[3,2];return w={url:void 0,ratio:void 0},[3,4];case 2:return[4,fetchCutlineUrl({artwork:t,shape:n,paddingSize:d,removeBackground:m,useCache:b})];case 3:w=O.sent(),O.label=4;case 4:return y=(g=w).url,v=g.ratio,j=h?void 0:y||o,h||j||p.has(String(t.id))||(p.add(String(t.id)),(0,i.notifyError)("DTF sticker composite degraded: missing cutline layer",{params:{artwork_id:String(t.id),shape:n,padding_size:d,remove_background:m},fingerprint:"dtf-sticker-composite-missing-cutline-layer"})),k=j?[j,f]:[f],x=!m&&j?v:void 0,[4,(0,l.nV)(_object_spread({urls:k,bgColor:_},x?{cutlineRatio:x}:{}))];case 5:return S=O.sent(),u.dtfStore.updateArtworkValuesById({id:e,url:S,stickerPreview:{url:S,sourceArtworkId:e}}),[2,j||h?"composited":"composited_without_cutline"];case 6:return setIsLoading(!1),u.dtfStore.toggleLoading(["removeBg",!1]),u.dtfStore.updateArtworkValuesById({id:e,processingImage:!1}),[7];case 7:return[2]}})})()}}}function useStickersStore(){return _||(_=createStickersStore()),_}},886408(e,t,r){"use strict";r.d(t,{$O:()=>eM,$X:()=>eb,$r:()=>e6,A4:()=>ej,AJ:()=>ta,AW:()=>v,Af:()=>tu,B3:()=>tf,B6:()=>tx,B8:()=>er,BO:()=>L,BS:()=>tB,Cc:()=>eZ,Ci:()=>tE,D$:()=>x,D_:()=>Y,Dm:()=>V,EG:()=>H,EL:()=>tG,El:()=>tj,Ep:()=>eL,Ez:()=>W,F1:()=>tN,F5:()=>w,G_:()=>eE,Gd:()=>P,Ge:()=>e3,H2:()=>eo,H8:()=>tU,Hw:()=>tz,I:()=>ee,IC:()=>t_,JI:()=>ei,Jz:()=>O,K1:()=>e5,KJ:()=>J,KK:()=>ty,Kl:()=>G,Kn:()=>U,Ko:()=>eO,Kp:()=>S,Lc:()=>tv,NN:()=>tS,Nf:()=>eN,Ni:()=>tp,O6:()=>eX,Pp:()=>tk,QB:()=>eG,QN:()=>tM,QS:()=>ev,QT:()=>tt,Q_:()=>ew,R:()=>eY,RR:()=>eF,RZ:()=>eP,Re:()=>T,SC:()=>m,Sh:()=>ep,Su:()=>eW,T:()=>e7,T6:()=>td,TP:()=>B,To:()=>eI,U0:()=>ef,U4:()=>_,US:()=>ea,VA:()=>tb,W$:()=>ek,WB:()=>eu,WC:()=>tw,WF:()=>ed,Wj:()=>tn,XH:()=>tO,XP:()=>eB,Xr:()=>I,Xw:()=>tq,Y3:()=>e8,YU:()=>tK,ZR:()=>eQ,ZZ:()=>ez,Zs:()=>d,_2:()=>j,_E:()=>R,_n:()=>h,aW:()=>tW,bH:()=>to,bY:()=>tV,cF:()=>g,cf:()=>tP,e7:()=>eJ,eA:()=>Q,eK:()=>eC,el:()=>ex,fH:()=>tH,fb:()=>b,gD:()=>e4,gY:()=>eD,gm:()=>D,h_:()=>tg,hl:()=>e9,iC:()=>p,iM:()=>K,iR:()=>eK,j$:()=>ey,jw:()=>q,k2:()=>M,ke:()=>en,lE:()=>tD,m5:()=>eR,m8:()=>eh,m9:()=>e$,mM:()=>Z,nF:()=>tF,nX:()=>et,o0:()=>eA,oV:()=>k,oo:()=>e1,pE:()=>th,pM:()=>y,p_:()=>tl,pf:()=>e_,pr:()=>tA,pt:()=>N,q0:()=>tI,q8:()=>em,qS:()=>es,qy:()=>z,r6:()=>ts,rN:()=>tR,rU:()=>F,sA:()=>tC,sv:()=>f,tt:()=>X,uV:()=>E,uj:()=>ec,vE:()=>eV,vM:()=>A,vO:()=>tT,vn:()=>te,vs:()=>tL,wR:()=>tr,x6:()=>eg,xL:()=>C,xi:()=>eU,xt:()=>tc,y9:()=>eS,yQ:()=>e2,yY:()=>eT,ye:()=>ti,yv:()=>tm,yy:()=>e0,zK:()=>eH,zO:()=>el});var n,o,i=r(802436),l=r(298210),c=r(425679);function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}
1))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var u=(n=_object_spread({},l.uo),o=(o={widthEdited:!1,isSimulated:!0,id:"simulation",style:null,height:null,color:null,quantity:1,quantities:{},sizes:{},prices:{},enhancementNote:"",enhancementFeedbackSubmitted:!1,enhancementRatingSubmitted:!1,enhancementSatisfied:null,sizesAndQuantities:[],enhancementTier:"full_enhancements"},o),Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),d=(0,i.y$)(),p=(0,i.eU)(!1),f=(0,i.eU)(!1),_=(0,i.eU)(null),h=(0,i.eU)(null),m=(0,i.eU)(null),g=(0,i.eU)(null),b=(0,i.eU)(!1),y=(0,i.eU)(!1),v=(0,i.eU)(null),w=(0,i.eU)(null),j=(0,i.eU)(null),k=(0,i.eU)(null),x=(0,i.eU)(null),S=(0,i.eU)(null),O=(0,i.eU)(!1),P=(0,i.eU)(""),A=(0,i.eU)(!1),C=(0,i.eU)([]),I=(0,i.eU)(null),E=(0,i.eU)(null),N=(0,i.eU)(!1),D=(0,i.eU)(null),T=(0,i.eU)(null),M=(0,i.eU)({}),R=(0,i.eU)(null),F=(0,i.eU)([]),L=(0,i.eU)(!1),B=(0,i.eU)(!1),z=(0,i.eU)(!1),U=(0,i.eU)(0),H=(0,i.eU)(!1),q=(0,i.eU)(null),V=(0,i.eU)(0),G=(0,i.eU)(!0),K=(0,i.eU)([]),W=(0,i.eU)([]),Q=(0,i.eU)({page:1}),J=(0,i.eU)({orderTotal:"0.0",productCartQuantity:0}),Z=(0,i.eU)({applicable:!1}),Y=(0,i.eU)(_object_spread({},u)),X=(0,i.eU)(null),ee=(0,i.eU)(!1),et=(0,i.eU)(null),er=(0,i.eU)(null),en=(0,i.eU)(null),eo=(0,i.eU)(!1),ea=(0,i.eU)(!1),ei=(0,i.eU)(!1),es=(0,i.eU)(!1),el=(0,i.eU)(c.A),ec=(0,i.eU)(!1),eu=(0,i.eU)(!1),ed=(0,i.eU)("en-US"),ep=(0,i.eU)({}),ef=(0,i.eU)(10),e_=(0,i.eU)("guest_user"),eh=(0,i.eU)(!1),em=(0,i.eU)({visible:!1,reason:null}),eg=(0,i.eU)('12"x12"'),eb=(0,i.eU)({winner:"none"}),ey=(0,i.eU)(!1),ev=(0,i.eU)({spangleAlgorithms:[],isSpangle:!1,spangleColors:[]}),ew=(0,i.eU)([c.A.INVALID_WIDTH.toString(),c.A.INVALID_HEIGHT.toString(),c.A.NEGATIVE_VALUES.toString(),c.A.MIN_PRINT_SIZE.toString(),c.A.MAX_PRINT_SIZE.toString(),c.A.UPSCALE_THRESHOLD_EXCEEDED.toString()]),ej=(0,i.eU)(!1),ek=(0,i.eU)(!1),ex=(0,i.eU)(null),eS=(0,i.eU)(!1),eO=(0,i.eU)(!1),eP=(0,i.eU)({}),eA=(0,i.eU)(!1),eC=(0,i.eU)(!1),eI=(0,i.eU)(null),eE=(0,i.eU)(null),eN=(0,i.eU)(!1),eD=(0,i.eU)(!1),eT=(0,i.eU)([]),eM=(0,i.eU)(_object_spread({},l.JH)),eR=(0,i.eU)(!1),eF=(0,i.eU)(!1),eL=(0,i.eU)(!1),eB=(0,i.eU)(!1),ez=(0,i.eU)(!1),eU=(0,i.eU)(null),eH=(0,i.eU)(!1),eV=(0,i.eU)(!1),eG=(0,i.eU)({show:!1,expanded:!1}),eK=(0,i.eU)({removeBg:!1}),eW=(0,i.eU)(!1),eQ=(0,i.eU)(!1),e$=(0,i.eU)({}),eJ=(0,i.eU)("transparent"),eZ=(0,i.eU)("checkered"),eY=(0,i.eU)(!1),eX=(0,i.eU)(!1),e0=(0,i.eU)(!1),e1=(0,i.eU)(!1),e2=(0,i.eU)(!1),e3=(0,i.eU)(!1),e4=(0,i.eU)(!1),e5=(0,i.eU)(!1),e9=(0,i.eU)(!1),e8=(0,i.eU)(""),e6=(0,i.eU)(1),e7=(0,i.eU)({width:0,height:0}),te=(0,i.eU)(null),tt=(0,i.eU)(!1),tr=(0,i.eU)([]),tn=(0,i.eU)(!1),to=(0,i.eU)([]),ta=(0,i.eU)(null),ti=(0,i.eU)(!1),ts=(0,i.eU)(!1),tl=(0,i.eU)(!1),tc=(0,i.eU)([]),tu=(0,i.eU)({}),td=(0,i.eU)([]),tp=(0,i.eU)(!1),tf=(0,i.eU)({}),t_=(0,i.eU)({}),th=(0,i.eU)(["#E1E1E1"]),tm=(0,i.eU)({}),tg=(0,i.eU)(null),tb=(0,i.eU)(null),ty=(0,i.eU)(!1),tv=(0,i.eU)({}),tw=(0,i.eU)({}),tj=(0,i.eU)({}),tk=(0,i.eU)({}),tx=(0,i.eU)(!1),tS=(0,i.eU)([]),tO=(0,i.eU)(!1),tP=(0,i.eU)(!1),tA=(0,i.eU)(!1),tC=(0,i.eU)(!1),tI=(0,i.eU)(!1),tE=(0,i.eU)(""),tN=(0,i.eU)("Subscribe"),tD=(0,i.eU)({smsTransactional:!0}),tT=(0,i.eU)(0),tM=(0,i.eU)(0),tR=(0,i.eU)(null),tF=(0,i.eU)(!1),tL=(0,i.eU)(!1),tB=(0,i.eU)([]),tz=(0,i.eU)(!1),tU=(0,i.eU)(null),tH=(0,i.eU)(null),tq=(0,i.eU)(!1),tV=(0,i.eU)(null),tG=(0,i.eU)(null),tK=(0,i.eU)(null);(0,i.eU)(null);var tW=(0,i.eU)("unknown")},538896(e,t,r){"use strict";r.r(t),r.d(t,{__resetJiffyFirstInputsForTests:()=>__resetJiffyFirstInputsForTests,default:()=>eR,dtfPdpScopedAtomsEnabled:()=>dtfPdpScopedAtomsEnabled,dtfStore:()=>eM,useDtfStore:()=>eT});var n=r(886408),o=r(322023),i=r(112352),l=r(15288),c=r(757774),u=r(189924),d=r
1(727566),p=r(189155),f=r(727754),_=r(352264),h=r(147141),m=r(865169),g=r(741235),b=r(928281),y=r(299410),v=r(171473),w=r(375599),j=r(564066),k=r(361867),x=r(66434),S=r(586519),O=r(508551),P=r(927997),A=r(562124),C=r(467265),I=r(594446),E=r(382409),N=r(306439),D=r(329459),T=r(705472),M=r(501038),R=r(260607),F=r(745063),L=r(68977),B=r(70811),z=r(2605),U=r(596002),H=r(375138),q=r(48859),V=r(489067),G=r(302552),K=r(433769),W=r(277889),Q=r(864188),J=r(52382),Z=r.n(J),Y=r(631116),X=r(826992),ee=r(444636),et=r(298210),er=r(718822),en=r(686902),eo=r(221609),ea=r(67707),ei=r(58306),es=r(954733),el=r(612141),ec=r(425679),eu=r(854868),ed=r(872274),ep=r(127391),ef=r(676606),e_=r(472837);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_destructuring_empty(e){if(null==e)throw TypeError("Cannot destructure "+e);return e}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,i={};if("u">typeof Reflect&&Reflect.ownKeys){for(o=0,r=Reflect.ownKeys(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}if(i=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n=r[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},i=Object.getOwnPropertyNames(e);for(n=0;n<i.length;n++)r=i[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function _ts_values(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var recordFromUnknown=function(e){return null!==e&&(void 0===e?"undefined":_type_of(e))==="object"?e:null},stickerArtboardDimensions=function(e){var t,r=recordFromUnknown(e),n=recordFromUnknown(null!=(t=null==r?void 0:r.generatedStickerDesignData)?t:null==r?void 0:r.generated_sticker_design_data),o=recordFromUnknown(null==n?void 0:n.sticker);if(!o)return null;var i=Number(o.width),l=Number(o.height);return!Number.isFinite(i)||i<=0||!Number.isFinite(l)||l<=0?null:{width:i,height:l}},stringFromUnknown=function(e){return"string"==typeof e?e:null},numberFromUnknown=function(e){return"number"==typeof e?e:null},eh=new Set,em=new Map,eg=!1,setJiffyFirstUploadWasPending=function(e){eg=e,(0,q.$q)(e)},eb=new Map,procolorRoutableOf=function(e){var t,r=null!=e?e:{},n=null!=(t=r.procolor_routable)?t:r.procolorRoutable;return"boolean"==typeof n?n:void 0},ey=!1,ev=new WeakSet,ew=new WeakSet,ej=new WeakSet,ek=new Map,ex=new Set,eS=new Set,eO=new Set,jiffyFirstArtworkKey=function(e){var t,r,n=String(e);return null!=(t=null==(r=/^\d+/.exec(n))?void 0:r[0])?t:n},eP=!1,eA=0,asFileKey=function(e){return(void 0===e?"undefined":_type_of(e))==="object"&&null!==e?e:null},isUploadingRow=function(e){var t=null!=e?e:{};return!0===t.isFile&&null!==asFileKey(t.file)},forgetJiffyFirstAwaitingFile=function(e){var t=asFileKey(e);t&&!em.has(t)&&ev.delete(t)},failJiffyFirstAwaitingFile=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.aboutThisUpload;if(void 0===r||r){var n=asFileKey(e);n&&em.has(n)&&ej.add(n),forgetJiffyFirstAwaitingFile(e)}},__resetJiffyFirstInputsForTests=function(){setJiffyFirstUploadWasPending(!1),eb.clear(),ey=!1,ev=new WeakSet,ew=new WeakSet,ej=new WeakSet,eP=!1,ek.forEach(function(e){return clearTimeout(e.deadline)}),ek.clear(),ex=new Set,eS=new Set,eO=new Set},getStructuredErrorContext=function(e){var t=recordFromUnknown(e),r=recordFromUnknown(null==t?void 0:t.response),n=null==t?void 0:t.constructor,o="function"==typeof n?stringFromUnknown(n.name):null;return{errorMessage:stringFromUnknown(null==t?void 0:t.message)||stringFromUnknown(null==t?void 0:t.error)||String(e),errorType:stringFromUnknown(null==t?void 0:t.name)||o||(void 0===e?"undefined":_type_of(e)),httpStatus:numberFromUnknown(null==r?void 0:r.status)||numberFromUnknown(null==t?void 0:t.status),responseData:r&&Object.prototype.hasOwnProperty.call(r,"data")?r.data:null==t?void 0:t.response}},classifyEnhancementSaveFailure=function(e){var t=e.httpStatus,r=e.responseData;if(422===t){var n=recordFromUnknown(r),o=stringFromUnknown(null==n?void 0:n.error),i=stringFromUnknown(null==n?void 0:n.exception);return(i?i.includes("InvalidAuthenticityToken"):"unprocessable_entity"===o)?{message:"Artwork enhancement save from PDP — CSRF/session persisted after retry",tag:"enhancement-settings-pdp-csrf-persistent",bucket:"csrf-persistent"}:{message:"Artwork enhancement save from PDP — backend error",tag:"enhancement-settings-pdp-backend-error",bucket:"backend-error"}}return null===t?{message:"Artwork enhancement save from PDP — network failure",tag:"enhancement-settings-pdp-network",bucket:"network-failure"}:t>=500&&t<600?{message:"Artwork enhancement save from PDP — server error",tag:"enhancement-settings-pdp-server-error",bucket:"server-error"}:{message:"Artwork enhancement save from PDP — unexpected",tag:"enhancement-settings-pdp-unexpected",bucket:"unexpected"}},eC=_object_spread_props(_object_spread({},et.uo),{widthEdited:!1,isSimulated:!0,id:"simulation",style:null,height:null,color:null,quantity:1,quantities:{},sizes:{},prices:{},enhancementNote:"",enhancementFeedbackSubmitted:!1,enhancementRatingSubmitted:!1,enhancementSatisfied:null,sizesAndQuantities:[],enhancementTier:"full_enhancements"}),eI={showModal:!1,showArtworkHistoryModal:!1,variantId:null,productId:null,catalogNumber:null,printAsIs:!1,neckLabel:!1,dtfMaxWidth:null,dtfMaxHeight:null,printAsIsMaxHeight:null,dtfMinWidth:null,dtfMinHeight:null,pdpType:null,preCut:!1,productSlug:"",showCTA:!1,favorites:[],sticker:null,currentStore:null,allowForceBgRemove:!1,canvaReviewer:null,printingServiceName:null,cachedArtworkPrices:{},dtfCategory:null,spangles:[],canvaDtfEnabledState:!1,showMultiSizeArtwork:!1,enablePreCut:!1,preCutPrice:0,preCutEnabled:!1,preCutDuration:null,preCutUpsellThreshold:0,loadFromConfig:!0,artworksState:[],lastSubmittedPdpDatesPayload:null,artworkHistory:[],artworkHistoryPagination:{page:1},summary:{orderTotal:"0.0",productCartQuantity:0},bogoPromotionData:{applicable:!1},simulation:_object_spread({},eC),fileToRemove:null,showDiscardModal:!1,discarded:null,fetchController:null,useDefaultValues:!1,show
1FilesError:!1,showNetworkError:!1,replaceArtwork:!1,errorTypes:ec.A,isRetrying:!1,allRetryFailed:!1,locale:"en-US",experiments:{},minStickerQuantity:10,userType:"guest_user",isStaff:!1,bogoEligibility:{visible:!1,reason:null},bogoMaxDimensionLabel:'12"x12"',promotionResolution:{winner:"none"},transferPdpBackButtonDetection:!1,spangleConfig:{spangleAlgorithms:[],isSpangle:!1,spangleColors:[]},sizeErrorTypes:[ec.A.INVALID_WIDTH.toString(),ec.A.INVALID_HEIGHT.toString(),ec.A.NEGATIVE_VALUES.toString(),ec.A.MIN_PRINT_SIZE.toString(),ec.A.MAX_PRINT_SIZE.toString(),ec.A.UPSCALE_THRESHOLD_EXCEEDED.toString()],isMobile:!1,enableMobileFooterCTA:!1,dtfChannelUuid:null,isEnhancementLoading:!1,isSubmitting:!1,actionCableOptions:{},actionCableConnected:!1,stickerQrScanned:!1,cable:null,businessLine:null,isPuff:!1,sameDayBlanksGate:!1,sameDayBlanksAddedLines:[],puff:_object_spread({},et.JH),isProColor:!1,cmykSoftProofEnabled:!1,dtfPollingFallbackAllCatalogs:!1,isSticker:!1,isDieCutSticker:!1,isStickerSample:!1,isJiffyMade:!1,printReadyInfoConfig:{show:!1,expanded:!1},loading:{removeBg:!1},isJerseyNumbers:!1,isLetters:!1,letterPreviewMessages:{},artworkBackground:"transparent",backgroundType:"checkered",stickersStyleOptions:!1,letterPreviewLoading:!1,isGoldFoil:!1,forcePdpTransfersRedraw:!1,pinBasedRedrawEnabled:!1,pinBasedRedrawEscaped:!1,enableRedraw:!1,isPricingLoading:!1,zipTransitionPending:!1,enhancementNote:"",puffMaxImageCount:1,previewCanvasSize:{width:0,height:0},gangSheetBuilder:null,showGangSheetBuilder:!1,showStickerDripBuilder:!1,generatedStickerDesigns:[],generatedGangSheets:[],gangSheetBuilderShopId:null,showGangSheetBuilderFeature:!1,gangSheetWidth225Exposed:!1,isGangSheetBuilder:!1,gangSheetBuilderVariants:[],gangSheetBuilderSettings:{},gangSheetBuilderSizes:[],isDtfSheet:!1,gangSheetBulkPrice:{},storeCreditInfo:{},presetMockupColor:["#E1E1E1"],gangSheetBuilderCarousels:{},updatePricingAbortSignal:null,preloadedDesignId:null,reorderEnabled:!1,validateArtworkStartTime:{},validateArtworkStartEventIntervalID:{},paidExpertEditAddonEnabled:!1,gangSheetCatalogNumbers:[],customerReviewOnRedraws:!1,customerReviewOnTransferRedraws:!1,pinSessionRecording:!1,pinSessionForceMixpanelRecording:!1,klaviyoSmsTransactionalSubscribed:!1,smsTransactionalSubscriptionPdpEnabled:!1,hidePdpRestockNotify:!1,smsTransactionalPhone:"",smsTransactionalSubscribeButtonText:"Subscribe",messagingConsents:{smsTransactional:!0},blankItemsCount:0,transfersInCartCount:0,isNewToTransfers:null,matchingShirtUpsellEnabled:!1,showMatchingShirtModal:!1,matchingShirtOptions:[],showPinningModal:!1,pinningArtworkIndex:null,pinningModalSessionId:null,pinningSessionLoading:!1,pendingInitialMessage:null,pendingPinningInvalidation:null,lastConfirmedConfigSection:null},eE=0,eN={id:null,file:null,name:null,isFile:!0,metadata:null,borneoMetadata:null,isLoading:!0,removeBackground:!1,width:null,height:null,quantity:null,pricing:{},isValid:!0,projectId:null,uploadError:null,uploadErrorCode:null,toggleBackgroun
1dError:null,originalWidth:null,originalHeight:null,progress:0,retryFailed:!1,currentProgress:0,lastWebSocketEvent:null,lastWebSocketEventData:{},spangled:!1,spangledImageUrl:null,cutlineUrl:null,imageProcessingCompletedEventSent:!1,color:null,paddingSize:"no_padding",bgColor:null,data:{},printReadyInfo:{},processTimeStamp:null,annotateEnabled:!1,annotateMode:"keep",annotatedPoints:[],annotatedCanvasWidth:null,annotatedCanvasHeight:null,annotatedXOffset:0,annotatedYOffset:0,revisionImageUrls:[],revisionPosition:0,sizesAndQuantities:[],enhancedNoBgUrl:null,enhancedWithBgUrl:null,cmykOriginalImageUrl:null,enhancementCompleted:!1,awaitingFinalDimensions:!1,stickerCompletionSeeded:!1,stickerPreview:null,pendingSeedCtx:void 0,imageAttached:!1,enhancementFeedbackSubmitted:!1,enhancementRatingSubmitted:!1,originalDpi:0,sizeBasedDpi:0,enhancedDpi:0,sliderPreviewUrl:null,downscaledOriginalImage:null,catalogNumber:null,fromGangSheetBuilder:!1,enhancementTier:"full_enhancements"},eD=(0,G.A)();function mapSizeAndQuantity(e){return{width:e.width,height:e.height,quantity:e.quantity,preset:e.preset,size:e.size}}function artworkIdentity(e){var t,r;return null!=(t=null!=(r=null==e?void 0:e.file)?r:null==e?void 0:e.id)?t:null}function partitionArtworkForDiscard(e,t){var r=t?new Set(t.artworks.map(function(e){return artworkIdentity(e)}).filter(function(e){return null!=e})):null,n=r?e.filter(function(e){return r.has(artworkIdentity(e))}):[],o=new Set(n);return{kept:n,discarded:e.filter(function(e){return!o.has(e)})}}function getArtworkPreviewImageName(e){if(e.manualEditUrl)return"manual_edit_image";var t=e.enhancementTier;return"print_original"===t?"original_image":"full_enhancements"===t?e.removeBackground&&e.canRemoveBg?"image_no_background":"image_with_background":void 0}function deriveArtworkHistoryFingerprint(e,t){return 403===e?/cloudfront|request blocked/i.test(t)?"cloudfront_403":/^"?Forbidden(?:\\n|\n)?"?$/i.test(t.trim())?"rack_attack_allow2ban":"http_403":429===e?/application request limit/i.test(t)?"rack_attack_throttle":"http_429":void 0!==e?"http_".concat(e):"network"}function transformArtworkToFormData(e,t){var r=(e.sizesAndQuantities||[]).filter(function(e){return Number(e.quantity)>0}),n=["custom","full_enhancements"].includes(e.enhancementTier)&&e.llmRedrawRequestId?e.llmRedrawRequestId:null,o=e.url||e.originalNoBgUrl;return _object_spread(_object_spread_props(_object_spread({artwork_id:e.id,width:e.width,height:e.height,quantity:t.showMultiSize?1:Number(e.quantity),from_dam:e.fromDam,variant_id:e.variantId||t.variantId,metadata:e.metadata,borneo_metadata:e.borneoMetadata,project_id:e.projectId,spangled_image_url:e.spangledImageUrl,spangled:e.spangled,spangle_csv:e.spangleCsv,spangle_pages_info:e.spanglePagesInfo,spangle_positions_json:e.spanglePositionsJson,color:e.color,padding_size:e.paddingSize,preview_url:o},e.stickerPreview&&e.stickerPreview.url===o?{preview_source_artwork_id:e.stickerPreview.sourceArtworkId}:{}),{bg_color:(0,z.XA)(e)&&t.isDieCutSticker?B.J.bgColor:e.bgColor,shape:e.shape,remove_background:e.removeBackground,enhancement_request_note:e.enhancementNote,llm_redraw_request_id:n,enhancement_tier:e.enhancementTier,enhance_image:e.enhanceImage,from_gang_sheet_builder:e.fromGangSheetBuilder,catalog_number:e.catalogNumber,sizes_and_quantities:r.map(mapSizeAndQuantity),messaging_consents:t.messagingConsents||{smsTransactional:!0}}),e.pinningSessionId&&{pinning_session_id:e.pinningSessionId},e.editImageManual&&{edit_image_manual:!0})}function dtfPdpScopedAtomsEnabled(){var e,t;return!!("u">typeof window&&(null==(t=window.jiffy)||null==(e=t.flip)?void 0:e.dtfPdpScopedAtoms))}var filmVariantsHash=function(e){var t=e.variantId;return t?_define_property({},t,1):{}},pendingSeedFileOriginalIndexMatches=function(e,t){var r=e.pendingSeedCtx;return(null==r?void 0:r.fileOriginalIndex)!=null&&String(r.fileOriginalIndex)===String(t)},eT=(0,Y.z)({jotaiStore:n.Zs,scopedReads:dtfPdpScopedAtomsEnabled,state:{showModal:n.iC,showArtworkHistoryModal:n.sv,variantId:n.U4,inventory:n._n,productId:n.SC,catalogNumber:n.cF,printAsIs:n.fb,neckLabel:n.pM,dtfMaxWidth:n.AW,dtfMaxHeight:n.F5,printAsIsMaxHeight:n._2,dtfMinWidth:n.oV,dtfMinHeight:n.D$,pdpType:n.Kp,preCut:n.Jz,productSlug:n.Gd,showCTA:n.vM,favorites:n.xL,sticker:n.Xr,currentStore:n.uV,allowForceBgRemove:n.pt,canvaReviewer:n.gm,printingServiceName:n.Re,cachedArtworkPrices:n.k2,dtfCategory:n._E,spangles:n.rU,canvaDtfEnabledState:n.BO,showMultiSizeArtwork:n.TP,enablePreCut:n.qy,preCutPrice:n.Kn,preCutEnabled:n.EG,preCutDuration:n.jw,preCutUpsellThreshold:n.Dm,loadFromConfig:n.Kl,artworksState:n.iM,artworkHistory:n.Ez,artworkHistoryPagination:n.eA,summary:n.KJ,bogoPromotionData:n.mM,simulation:n.D_,fileToRemove:n.tt,showDiscardModal:n.I,preModalState:n.nX,discarded:n.B8,fetchController:n.ke,useDefaultValues:n.H2,showFilesError:n.US,showNetworkError:n.JI,replaceArtwork:n.qS,errorTypes:n.zO,isRetrying:n.uj,allRetryFailed:n.WB,locale:n.WF,experiments:n.Sh,minStickerQuantity:n.U0,userType:n.pf,isStaff:n.m8,bogoEligibility:n.q8,bogoMaxDimensionLabel:n.x6,promotionResolution:n.$X,transferPdpBackButtonDetection:n.j$,spangleConfig:n.QS,sizeErrorTypes:n.Q_,isMobile:n.A4,enableMobileFooterCTA:n.W$,dtfChannelUuid:n.el,isEnhancementLoading:n.y9,isSubmitting:n.Ko,actionCableOptions:n.RZ,actionCableConnected:n.o0,stickerQrScanned:n.eK,cable:n.To,businessLine:n.G_,isPuff:n.Nf,sameDayBlanksGate:n.gY,sameDayBlanksAddedLines:n.yY,puff:n.$O,isProColor:n.m5,cmykSoftProofEnabled:n.RR,dtfPollingFallbackAllCatalogs:n.Ep,isSticker:n.XP,isDieCutSticker:n.ZZ,stickerPromoPrice:n.xi,isStickerSample:n.zK,isJiffyMade:n.vE,printReadyInfoConfig:n.QB,loading:n.iR,isJerseyNumbers:n.Su,isLetters:n.ZR,letterPreviewMessages:n.m9,artworkBackgroun
1d:n.e7,backgroundType:n.Cc,stickersStyleOptions:n.R,letterPreviewLoading:n.O6,isGoldFoil:n.yy,forcePdpTransfersRedraw:n.oo,pinBasedRedrawEnabled:n.yQ,pinBasedRedrawEscaped:n.Ge,enableRedraw:n.gD,isPricingLoading:n.K1,zipTransitionPending:n.hl,enhancementNote:n.Y3,puffMaxImageCount:n.$r,previewCanvasSize:n.T,gangSheetBuilder:n.vn,showGangSheetBuilder:n.QT,showStickerDripBuilder:n.Wj,generatedStickerDesigns:n.bH,generatedGangSheets:n.wR,gangSheetBuilderShopId:n.AJ,showGangSheetBuilderFeature:n.ye,gangSheetWidth225Exposed:n.r6,isGangSheetBuilder:n.p_,gangSheetBuilderVariants:n.xt,gangSheetBuilderSettings:n.Af,gangSheetBuilderSizes:n.T6,isDtfSheet:n.Ni,gangSheetBulkPrice:n.B3,storeCreditInfo:n.IC,presetMockupColor:n.pE,gangSheetBuilderCarousels:n.yv,updatePricingAbortSignal:n.h_,preloadedDesignId:n.VA,reorderEnabled:n.KK,validateArtworkStartTime:n.Lc,validateArtworkStartEventIntervalID:n.WC,enhancementStuckAt60s:n.El,enhancementTimedOut:n.Pp,paidExpertEditAddonEnabled:n.B6,gangSheetCatalogNumbers:n.NN,customerReviewOnRedraws:n.XH,customerReviewOnTransferRedraws:n.cf,klaviyoSmsTransactionalSubscribed:n.pr,smsTransactionalSubscriptionPdpEnabled:n.sA,hidePdpRestockNotify:n.q0,smsTransactionalPhone:n.Ci,smsTransactionalSubscribeButtonText:n.F1,messagingConsents:n.lE,blankItemsCount:n.vO,transfersInCartCount:n.QN,isNewToTransfers:n.rN,matchingShirtUpsellEnabled:n.nF,showMatchingShirtModal:n.vs,matchingShirtOptions:n.BS,showPinningModal:n.Hw,pinningArtworkIndex:n.H8,pinningModalSessionId:n.fH,pinningSessionLoading:n.Xw,pendingInitialMessage:n.bY,pendingPinningInvalidation:n.EL,lastConfirmedConfigSection:n.YU},getters:{showSampleAddToCart:function(){return"true"===new URLSearchParams(window.location.search).get("spt")&&this.catalogNumber===et.aS&&this.simulation.unitPrice>0},isGuest:function(){return"guest_user"===this.userType},getBogoAdjustedPrice:function(){var e=this;return function(t,r,n){if(!(null==(o=e.bogoPromotionData)?void 0:o.applicable)||!(null==(i=e.bogoPromotionData)?void 0:i.artworks))return null;var o,i,l=e.bogoPromotionData.artworks[t];if(!l)return null;var c=l[r.replace(/[^a-zA-Z0-9]+(.)/g,function(e,t){return t.toUpperCase()})];if(!c)return null;var u=_sliced_to_array(n.split("x"),2),d=u[0],p=u[1];return c["".concat(parseFloat(d).toFixed(2),"x").concat(parseFloat(p).toFixed(2))]||null}},bogoFreeQtyAvailable:function(){var e;return(null==(e=this.bogoPromotionData)?void 0:e.freeQtyAvailable)||0},isBogoApplicable:function(){var e;return(null==(e=this.bogoPromotionData)?void 0:e.applicable)||!1},artworks:function(){return this.artworksState.length?this.artworksState:[this.simulation]},modalArtworks:function(){return this.artworks},discardScope:function(){var e=partitionArtworkForDiscard(this.artworksState,this.preModalState),t=e.kept,r=e.discarded;return{keptCount:t.length,discardCount:r.length,preservesPreModalArtwork:t.length>0}},isFavorite:function(){return this.favorites.includes(this.productId)},withPreCut:function(){return this.preCutEnabled&&this.preCutPrice>0},files:function(){return this.artworks.filter(function(e){return e.isFile})},loadedArtworks:function(){return this.artworks.filter(function(e){return!e.isFile})},allArtworksAiApproved:function(){var e=this.loadedArtworks;if(0===e.length)return!1;var t=e.filter(function(e){var t;return e.pinningSessionId||(null==(t=e.enhancementNote)?void 0:t.trim())});return 0!==t.length&&t.every(function(e){return"approved"===e.pinningSessionState})},canvaDtfEnabled:function(){return this.canvaDtfEnabledState&&this.catalogNumber===et.aS},mobileFooterCTAEnabled:function(){return this.isMobile&&this.enableMobileFooterCTA},jerseyFormArtworks:function(){var e=this.letterNumberArtwork;return[{style:e.style,height:e.height,width:e.width,color:e.color,quantities:e.quantities,quantity:e.quantity,metadata:{}}]},letterFormArtworks:function(){var e=this.letterNumberArtwork,t=e.texts.filter(Boolean);return[{texts:t,font:e.font,style:e.style,height:e.height,width:e.width,color:e.color,quantity:t.length,max_length:e.maxLength,metadata:{}}]},formArtworks:function(){var e=this;return this.isJerseyNumbers?this.jerseyFormArtworks:this.isLetters?this.letterFormArtworks:this.artworksState.map(function(t){return transformArtworkToFormData(t,e)})},letterNumberArtworks:function(){var e=this,t=this.letterNumberArtwork,r=t.quantities,n=_object_without_properties(t,["quantities"]),o=(0,ee.Qq)();return this.isJerseyNumbers?Object.keys(r).map(function(t){var i,l,c;return _object_spread_props(_object_spread({},n),{id:t,url:o,pricing:{unitPrice:null==(i=n.prices[t])?void 0:i.unitPrice},number:t,height:null==(l=n.sizes[t])?void 0:l.height,width:null==(c=n.sizes[t])?void 0:c.width,quantity:r[t],preCut:e.preCut})}
1):n.texts.filter(Boolean).map(function(t,r){var i,l,c;return _object_spread_props(_object_spread({},n),{id:r+1,url:o,pricing:{unitPrice:null==(i=n.prices[r+1])?void 0:i.unitPrice},text:t,height:null==(l=n.sizes[r])?void 0:l.height,width:null==(c=n.sizes[r])?void 0:c.width,quantity:1,preCut:e.preCut})})},csmData:function(){var e=this,t=(this.isJerseyNumbers||this.isLetters?this.letterNumberArtworks:this.artworksState).map(function(t){var r="".concat(t.width,'" x ').concat(t.height,'"');e.isJerseyNumbers?r="Height ".concat(t.height,'"'):e.isLetters?r="".concat(Number(t.width).toFixed(2),'" x ').concat(Number(t.height).toFixed(2),'"'):e.printAsIs&&(r="".concat(t.width,'" x ').concat(t.lengthFoot,"'"));var n="en-CA"===e.locale?"C$":"$",o=e.sticker?"Jiffy Stickers":e.spangleConfig.isSpangle?"Jiffy Spangles":e.isPuff?"Puff Transfers":e.isJerseyNumbers?"Numbers (#".concat(t.number,")"):e.isLetters?'Custom Names ("'.concat(t.text.toUpperCase(),'")'):"Jiffy Transfers";return{id:t.id,dieCutProductId:t.dieCutProductId,dieCutVariantId:t.dieCutVariantId,catalogNumber:o,productId:e.productId,variantId:e.variantId,color:"",image:t.url,size:r,quantity:t.quantity,cutlineUrl:t.cutlineUrl,price:"".concat(n).concat(Number(t.pricing.unitPrice).toFixed(2)),preCut:e.preCut,preCutPrice:e.preCutPrice}},[]);if(this.summary.enhancements){var r="en-CA"===this.locale?"C$":"$",n=this.isStandardDTFProduct;Object.values(this.summary.enhancements).forEach(function(e){("Print As Is Notes"!==e.serviceName||n)&&t.push({catalogNumber:e.serviceName,priceTotal:"".concat(r).concat(Number(e.totalPrice).toFixed(2)),quantity:e.quantity,isEnhancement:!0})})}return t},csmDataMultiSize:function(){var e=this,t=[],r="en-CA"===this.locale?"C$":"$";if(this.artworksState.forEach(function(n){var o=n.id,i=n.sizesAndQuantities,l=n.url;i.filter(function(e){return Number(e.quantity)>0}).forEach(function(n){var i=String(o),c="".concat(n.width,"x").concat(n.height),u=!e.isGuest&&n.id?e.getBogoAdjustedPrice(i,n.id,c):null,d={id:o,catalogNumber:"Jiffy Transfers",productId:e.productId,variantId:e.variantId,color:"",image:l,size:"".concat(n.width,'" x ').concat(n.height).concat(e.printAsIs?"'":'"'),quantity:n.quantity,price:"".concat(r).concat(Number(n.unitPrice).toFixed(2)),preCut:e.preCut,preCutPrice:e.preCutPrice};u&&(d.priceTotal="".concat(r).concat(u.discountedTotalPrice.toFixed(2))),t.push(d)})}),this.summary.enhancements){var n=this.isStandardDTFProduct;Object.values(this.summary.enhancements).forEach(function(e){("Print As Is Notes"!==e.serviceName||n)&&t.push({catalogNumber:e.serviceName,priceTotal:"".concat(r).concat(Number(e.totalPrice).toFixed(2)),quantity:e.quantity})})}return t},totalQuantity:function(){return this.isJerseyNumbers||this.isLetters?this.letterNumberArtwork.quantity:this.showMultiSize?this.artworksState.reduce(function(e,t){return e+t.sizesAndQuantities.reduce(function(e,t){return e+Number(t.quantity)},0)},0):this.artworksState.reduce(function(e,t){return e+Number(t.quantity)},0)},outOfStock:function(){if(this.isGangSheetBuilder)return!1;var e,t=null==(e=this.inventory)?void 0:e[this.variantId];return null==t||0===t},dtfTypeDropText:function(){return this.printAsIs?"Drop your gang sheets here":"Drop your images here"},isLetterReadyForOrder:function(){var e=this.letterNumberArtwork,t=e.style,r=e.font,n=e.height,o=e.maxLength,i=e.color,l=e.sizes,c=_object_without_properties(e,["style","font","height","maxLength","color","sizes"]),u=c.texts.filter(Boolean),d=u.length,p=u.every(function(e,t){var r=l[t];return r&&void 0!==r.width&&void 0!==r.height});return t&&r&&n&&o&&i&&d&&c.isValid&&p},hasArtworkEnhancementTimedOut:function(){return Object.values(this.enhancementTimedOut).some(Boolean)},hasAnyArtworkStuck:function(){return Object.values(this.enhancementStuckAt60s).some(Boolean)},isReadyForOrder:function(){if(this.isJerseyNumbers){var e=this.letterNumberArtwork,t=e.quantity,r=e.quantities,n=e.height,o=_object_without_properties(e,["quantity","quantities","height"]);return t&&n&&o.isValid&&Object.keys(r).every(function(e){var t;return null==(t=o.prices[e])?void 0:t.unitPrice})}return this.isLetters?this.isLetterReadyForOrder:!!this.artworksState.length&&this.artworksState.every(this.isArtworkValid)&&!this.isPricingLoading&&!this.zipTransitionPending},dpiInstructionsUrl:function(){return"en-CA"===this.locale?"/ca/artwork-dpi-instructions":"/artwork-dpi-instructions"},gangSheetArtworkProductLink:function(){var e;return e="DTFGANG001"===this.catalogNumber?"/jiffytransfers-DTF001.html":"UVDTFGANG"===this.catalogNumber?"/jiffytransfers-UVDTF01.html":"GANGDTFPC1"===this.catalogNumber?"/jiffytransfers-DTFPC1.html":"GANGDTFG01"===this.catalogNumber?"/jiffytransfers-DTFG01.html":"/jiffytransfers-UVDTF01.html","en-CA"===this.locale?"/ca".concat(e):e},spangleAlgorithms:function(){return this.spangleConfig.spangleAlgorithms},isSpangle:function(){return this.spangleConfig.isSpangle},spangleColors:function(){return this.spangleConfig.spangleColors}
1,isFirstArtworkMinQuantityInvalid:function(){var e,t=null==(e=this.artworksState[0])?void 0:e.quantity;return(this.sticker||this.isPuff||this.isSpangle)&&t&&t<this.minStickerQuantity},removeBgLoading:function(){return this.loading.removeBg},isUVDTFSticker:function(){return"UVDTF01"===this.catalogNumber},letterNumberArtwork:function(){if(this.isJerseyNumbers||this.isLetters){var e=_sliced_to_array(this.artworks,1)[0],t=this.summary,r=e.quantity?Number(t.orderTotal||0)/e.quantity:0,n=e.quantity?Number(t.orderSubtotal||0)/e.quantity:0;return _object_spread_props(_object_spread({},e),{retailPrice:r,unitPrice:n,percentage:r?100*(1-n/r):0})}return null},isValidJerseyArtwork:function(){var e=this.letterNumberArtwork,t=e.isValid,r=e.height,n=e.sizes,o=e.quantities;return t&&r&&Object.keys(n).length&&Object.keys(o).length},isLetterPreviewReady:function(){var e=this.letterNumberArtwork,t=e.style,r=e.font,n=e.height,o=e.maxLength,i=e.color,l=e.texts,c=e.textIndex,u=(l||[]).filter(Boolean).length;return t&&r&&n&&o&&i&&u&&null!==c},pickFromUploadsOrDesigns:function(){return!this.isSpangle&&!this.printAsIs},initialValues:function(){return this.printAsIs?et.nk:this.sticker?B.J:this.isPuff?et.JH:this.isSpangle?et.oy:this.isJerseyNumbers?et.$f:et.LP},showMultiSize:function(){return this.showMultiSizeArtwork},showStepsUI:function(){return!this.isJerseyNumbers&&!this.isLetters&&!this.spangleConfig.isSpangle&&!this.sticker&&!this.isStickerSample},isGangSheetProduct:function(){return this.catalogNumber&&this.gangSheetCatalogNumbers.includes(this.catalogNumber)},showRedrawUI:function(){return!!this.enableRedraw&&!!this.forcePdpTransfersRedraw&&!this.isGangSheetProduct&&!this.isLetters&&!this.isJerseyNumbers&&!this.sticker&&!this.spangleConfig.isSpangle&&!this.isGoldFoil&&!this.isPuff},showNewGangSheetErrorMessage:function(){return!this.showModal},isCustomerReviewOnRedrawsEnabled:function(){return this.customerReviewOnRedraws&&this.customerReviewOnTransferRedraws},isStandardArtwork:function(){return!this.printAsIs&&!this.isProColor&&!this.isSticker&&!this.isStickerSample&&!this.spangleConfig.isSpangle&&!this.isLetters&&!this.isJerseyNumbers&&!this.isUVDTFSticker},isCmykSoftProofActive:function(){return this.cmykSoftProofEnabled&&(this.isStandardArtwork||"DTFGANG001"===this.catalogNumber)},isBackendTriggeredEnhancementEligible:function(){return et.ys.includes(this.catalogNumber)},enableAbAiMonetization:function(){return this.catalogNumber===et.aS},isStandardDTFProduct:function(){return this.catalogNumber===et.aS},isPinBasedRedrawEnabled:function(){return!!this.pinBasedRedrawEnabled&&!this.pinBasedRedrawEscaped},showDesignServicesDeliveryBuffer:function(){return!this.isJiffyMade&&1===this.experiments.transfers_design_services_delivery_buffer},isArtworkValid:function(){var e=this;return function(t){var r,n=e.sticker||e.isPuff||e.isSpangle?(null!=(r=t.quantity)?r:0)>=e.minStickerQuantity:t.quantity,o=e.showMultiSize?t.sizesAndQuantities.filter(function(e){return Number(e.quantity)>0}):t.sizesAndQuantities,i=e.showMultiSize?o.length>0&&o.every(function(e){return Number(e.quantity)>0}):n,l=!e.isPuff||!!t.color,c=e.isProColor&&!t.imageAttached,u=(e.isStandardArtwork||e.isProColor)&&!t.isLoading&&(!t.enhancementCompleted||c||t.awaitingFinalDimensions),d=e.getCustomNoteValid(t),p=e.getCustomRedrawStateValid(t),f=e.sticker&&!!t.processingImage;return t.isValid&&!t.uploadError&&!t.isLoading&&i&&l&&!u&&!f&&d&&p}},getCustomNoteValid:function(){var e=this;return function(t){var r=t.enhancementNote;return"custom"===t.enhancementTier?r&&r.trim().length>0:"full_enhancements"!==t.enhancementTier||!e.paidExpertEditAddonEnabled||!t.hasExpertEditAddon||r&&r.trim().length>0}},getCustomRedrawStateValid:function(){return function(e){if("custom"!==e.enhancementTier)return!0;var t=e.enhancementNote;return t&&t.trim().length>0}}},actions:{addFiles:function(e,t){var r=this;this.lastSubmittedPdpDatesPayload=null;var n=this.simulation,o=n.widthEdited,i=n.width,l=n.height,c=n.enhancementNote,u=this.spangleConfig.isSpangle,d=o&&!u,p=eE+=1,f=this.printAsIs?et.nk:u?et.oy:et.LP,_=_to_consumable_array(e).map(function(e,t){var n,o={width:f.width,height:f.height,previewMetadata:f.previewMetadata},u=r.isSticker||r.isPuff||r.isSpangle,_=0!==t||u?r.initialValues.quantity:null==(n=r.simulation)?void 0:n.quantity;return _object_spread(_object_spread_props(_object_spread({},eN),{file:e,enhancementNote:c,uploadBatchId:p,enhanceImage:!0,isFile:!0,name:e.name,quantity:_}),d&&0===t?{width:i,height:l}:o)});if(this.simulation=_object_spread_props(_object_spread({},this.simulation),{enhancementNote:""}),this.isJiffyMade){var h=_to_consumable_array(this.artworksState);h.splice.apply(h,[t,_.length].concat(_to_consumable_array(_))),this.artworksState=h}else this.artworksState=_to_consumable_array(this.artworksState).concat(_to_consumable_array(_))},setFileLoading:function(e){this.artworksState=_to_consumable_array(this.artworksState),this.artworksState[e]=_object_spread_props(_object_spread({},this.artworksState[e]),{originalIndex:e,isLoading:!0})},setSimulation:function(e){this.simulation=_object_spread({},this.simulation,e)},setBlankItemsCount:function(e){this.blankItemsCount=e},setTransfersInCartCount:function(e){this.transfersInCartCount=e},syncInventoryFromWindow:function(){var e;this.inventory=null!=(e=window.inventory)?e:null},setIsNewToTransfers:function(e){this.isNewToTransfers=e},setLoadedArtwork:function(e){var t=e.index,r=e.isBuyAgain,n=e.artwork,o=(0,y.Tm)(n),i=(o.enhancementCompleted,_object_without_properties(o,["enhancementCompleted"])),l=i.metadata,c=i.sizesAndQuantities,u=t,d=stickerArtboardDimensions(l),p=null!=d?d:{width:l.widthInch,height:l.heightInch},f=this.showMultiSizeArtwork?(0,ee.Nu)({aspectRatio:l.aspectRatio}):p;if(null==u&&(u=this.artworksState.findIndex(function(e){return String(e.id)===String(n.id)}),null==n.id||u<0))return void(0,S.notifyError)("DTF setLoadedArtwork dropped: payload id not in store",{params:{artwork_id:String(n.id),payload_keys:Object.keys(n).sort().join(","),row_ids:this.artworksState.map(function(e){return String(e.id)}).join(","),has_url:String(Object.prototype.hasOwnProperty.call(n,"url"))},fingerprint:"dtf-set-loaded-artwork-id-miss"});var _=(this.artworks[u]||{}).isSizesEdited,h=this.simulation,m=h.widthEdited,g=h.width,b=this.spangleConfig.isSpangle;m&&!b&&0===u&&(f=(0,ee.ky)(l.aspectRatio,g,this.sticker)),c=this.showMultiSizeArtwork?_?(0,ee.xr)(this.artworks[u].sizesAndQuantities,l.aspectRatio,this.sticker):r?c:[]:[];var v=_to_consumable_array(this.artworksState),w=isUploadingRow(v[u]);v[u]=_object_spread_props(_object_spread(_object_spread_props(_object_spread({}
1,v[u],i),{isLoading:!1,isFile:!1,isSimulated:!1,removeBackground:l.removeBackground,originalWidth:l.widthInch,originalHeight:l.heightInch,lengthFoot:l.lengthFoot,lastWebSocketEvent:null,lastWebSocketEventData:{}}),f),{sizesAndQuantities:c}),this.artworksState=v,forgetJiffyFirstAwaitingFile(v[u].file),this.settleJiffyFirstUploadPending({registered:w})},setCachedArtworkPrices:function(e){this.cachedArtworkPrices=Object.keys(e).reduce(function(t,r){return t[r]=(0,y.Tm)(e[r]),t},{})},setFailedUploadArtwork:function(e){var t=e.index,r=e.artworkId,n=e.uploadError,o=e.uploadErrorCode,i=e.failureOf,l=t;if(l||(l=(0,v.E)(this.artworksState,r)),this.artworksState[l]){var c=_to_consumable_array(this.artworksState);c[l]=_object_spread_props(_object_spread({},c[l]),{uploadError:n,uploadErrorCode:void 0===o?null:o}),this.artworksState=c;var u=c[l],d=!i||(null==i.artworkId||String(u.id)===String(i.artworkId))&&(null==i.file||u.file===i.file);failJiffyFirstAwaitingFile(u.file,{aboutThisUpload:d}),this.settleJiffyFirstUploadPending()}},setArtworkPricing:function(e){var t=this,r=e.index,n=e.isMultiSize,o=_object_without_properties(e,["index","isMultiSize"]).response,i=(0,y.Tm)(o),l=i.bulkDiscount,c=i.orderSubtotal,u=i.orderTotal,d=i.productCartQuantity,p=i.artworks,f=i.enhancements,_=i.bogoPromotionData;if(_&&(this.bogoPromotionData=_),this.isJerseyNumbers||this.isLetters){this.simulation=_object_spread_props(_object_spread({},this.simulation),{prices:p}),this.summary={bulkDiscount:l,orderSubtotal:c,orderTotal:u};return}if(p.simulation&&!this.isJiffyMade){this.simulation=_object_spread_props(_object_spread({},this.simulation,n?p.simulation[0]:p.simulation),{id:"simulation",sizesAndQuantities:n?(0,ee.Ju)(this.simulation.sizesAndQuantities,p.simulation):[]}),this.summary=eI.summary,this.isPricingLoading=!1;return}var h=Object.keys(p),m=_to_consumable_array(this.artworksState);h.forEach(function(e){var o=(0,v.E)(t.artworksState,e);-1===o&&(o=r),t.artworksState[o]&&(m[o]=_object_spread_props(_object_spread({},t.artworksState[o]),{pricing:n?p[e][0]:p[e],sizesAndQuantities:n?(0,ee.hv)(t.artworksState[o].sizesAndQuantities,p[e],"id"):[]}))}),this.artworksState=m,this.summary={bulkDiscount:l,orderSubtotal:c,orderTotal:u,productCartQuantity:d,enhancements:f},this.isPricingLoading=!1,setTimeout(function(){return q.uR.reloadDeliveryEstimatesWithoutFetch({pdpSubtotal:c})},0)},setSimulationPricing:function(e){var t=e.artworks,r=e.isMultiSize,n=_object_spread({},this.simulation.sizesAndQuantities[0],t.simulation);this.simulation=_object_spread_props(_object_spread({},this.simulation,(0,y.Tm)(t.simulation)),{sizesAndQuantities:r?[n]:[]}),this.isPricingLoading=!1},updateArtworkValues:function(e){var t=e.index,r=_object_without_properties(e,["index"]),n={},o={},i=!0,l=!1,c=void 0;try{for(var u,d=Object.entries(r)[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var p=_sliced_to_array(u.value,2),f=p[0],_=p[1];"function"==typeof _?o[f]=_:n[f]=_}}catch(e){l=!0,c=e}finally{try{i||null==d.return||d.return()}finally{if(l)throw c}}if(!this.artworksState.length){if(this.simulation=_object_spread({},this.simulation,n),Object.keys(o).length){var h={},m=!0,g=!1,b=void 0;try{for(var y,v=Object.entries(o)[Symbol.iterator]();!(m=(y=v.next()).done);m=!0){var w=_sliced_to_array(y.value,2),j=w[0],k=w[1];h[j]=k()}}catch(e){g=!0,b=e}finally{try{m||null==v.return||v.return()}finally{if(g)throw b}}this.simulation=_object_spread({},this.simulation,h)}return}var x=_to_consumable_array(this.artworksState),S=x.findIndex(function(e){return String(t)===String(e.originalIndex)});if(this.isJiffyMade&&-1===S&&(S=t),x[S]=_object_spread({},x[S],n),Object.keys(o).length){var O={},P=!0,A=!1,C=void 0;try{for(var I,E=Object.entries(o)[Symbol.iterator]();!(P=(I=E.next()).done);P=!0){var N=_sliced_to_array(I.value,2),D=N[0],T=N[1];O[D]=T()}}catch(e){A=!0,C=e}finally{try{P||null==E.return||E.return()}finally{if(A)throw C}}x[S]=_object_spread({},x[S],O)}this.artworksState=x},writeArtworkValuesAtLocatedIndex:function(e){var t=e.index,r=_object_without_properties(e,["index"]);if(this.artworksState.length&&this.artworksState[t]){var n={},o={},i=!0,l=!1,c=void 0;try{for(var u,d=Object.entries(r)[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var p=_sliced_to_array(u.value,2),f=p[0],_=p[1];"function"==typeof _?o[f]=_:n[f]=_}}catch(e){l=!0,c=e}finally{try{i||null==d.return||d.return()}finally{if(l)throw c}}var h=_to_consumable_array(this.artworksState);if(h[t]=_object_spread({},h[t],n),Object.keys(o).length){var m={},g=!0,b=!1,y=void 0;try{for(var v,w=Object.entries(o)[Symbol.iterator]();!(g=(v=w.next()).done);g=!0){var j=_sliced_to_array(v.value,2),k=j[0],x=j[1];m[k]=x()}}catch(e){b=!0,y=e}finally{try{g||null==w.return||w.return()}finally{if(b)throw y}}h[t]=_object_spread({},h[t],m)}this.artworksState=h}},updateArtworkValuesById:function(e){var t=e.id,r=_object_without_properties(e,["id"]);if(this.artworksState.length){var n=_to_consumable_array(this.artworksState),o=(0,v.E)(n,t);if(n[o]&&String(n[o].id)===String(t)){var i=(0,y.Tm)(r,et.Mz);n[o]=_object_spread({},n[o],i),r.metadata&&!i.width&&(n[o].width=i.metadata.widthInch,n[o].height=i.metadata.heightInch),Object.prototype.hasOwnProperty.call(r,"removeBackgroun
1d")&&(n[o].metadata.removeBackground=r.removeBackground),this.artworksState=n}}},setRemovalFile:function(e){this.fileToRemove=e},setPreCut:function(e){this.preCut=e},setPreCutPrice:function(e){this.preCutPrice=e},setPreCutEnabled:function(e){this.preCutEnabled=e},setPreCutDuration:function(e){this.preCutDuration=e},setLoadFromConfig:function(e){this.loadFromConfig=e},setEnablePreCut:function(){this.enablePreCut=!0},resetRemovalFile:function(){this.fileToRemove=null},reindexArtworks:function(){this.artworksState=this.artworksState.map(function(e,t){return _object_spread_props(_object_spread({},e),{originalIndex:t})})},removeArtwork:function(e){e&&(e_.A.stopPolling(Number(e)),this.clearValidateArtworkStartEventInterval(e),this.clearEnhancementStuck(e),this.clearEnhancementTimedOut(e));var t=this.artworksState.find(function(t){return t.id===e});this.cancelPinningSessionForArtwork(t,{errorMessage:"Failed to cancel pinning session on artwork removal"}),this.artworksState=this.artworksState.filter(function(t){return t.id!==e}),this.reindexArtworks(),this.fileToRemove=null,this.sticker&&(this.simulation=_object_spread_props(_object_spread({},this.simulation),{width:null,height:null})),this.spangles=_object_spread_props(_object_spread({},this.spangles),{completedSpangleData:[]}),this.artworksState.length||(this.showModal=!1),this.settleJiffyFirstUploadPending({deferReask:!0})},clearWorkspace:function(){this.invalidatePricingRequest(),this.cleanupPolling(),this.artworksState=[],this.summary=eI.summary,this.simulation=_object_spread({},eC),this.settleJiffyFirstUploadPending({deferReask:!0}),this.setIsPricingLoading(!1)},openModal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.showModal||(this.preModalState=(null==e?void 0:e.artworks.length)?e:null),this.showModal=!0},hideModal:function(){this.showModal=!1},closeModalKeepingArtwork:function(){this.showModal=!1,this.preModalState=null},setShowCTA:function(e){this.showCTA=e},setAllowForceBgRemove:function(e){this.allowForceBgRemove=e},setCanvaDtfEnabled:function(e){this.canvaDtfEnabledState=e},setEnableMobileFooterCTA:function(e){this.enableMobileFooterCTA=e},setCanvaReviewer:function(e){this.canvaReviewer=e},setVariantId:function(e){this.variantId=e},setProductId:function(e){this.productId=e},setProductSlug:function(e){this.productSlug=e},setFavorites:function(e){this.favorites=e},setPdpType:function(e){this.pdpType=e},setCatalogNumber:function(e){this.catalogNumber=e},setMessagingConsents:function(e){this.messagingConsents=e},setPrintAsIs:function(e){this.printAsIs=e},setNeckLabel:function(e){this.neckLabel=e},setSticker:function(e){this.sticker=e},setStickerQrScanned:function(e){this.stickerQrScanned=e},setDtfMaxWidth:function(e){this.dtfMaxWidth=e},setDtfMaxHeight:function(e){this.dtfMaxHeight=e},setPrintAsIsMaxHeight:function(e){this.printAsIsMaxHeight=e},setDtfMinWidth:function(e){this.dtfMinWidth=e},setDtfMinHeight:function(e){this.dtfMinHeight=e},setIsRetrying:function(e){this.isRetrying=e},setRetryFailed:function(e){this.artworksState=this.artworksState.map(function(t){return t.id?t:_object_spread_props(_object_spread({},t),{retryFailed:e})})},setIsLoading:function(e){this.artworksState=this.artworksState.map(function(t){return t.id?t:_object_spread_props(_object_spread({},t),{isLoading:e})})},setShowDiscardModal:function(){this.showDiscardModal=!0},hideDiscardModal:function(){this.showDiscardModal=!1},setShowNetworkError:function(){this.showNetworkError=!0},hideNetworkError:function(){this.showNetworkError=!1},cancelPinningSessionForArtwork:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.errorMessage,n=void 0===r?"Failed to cancel pinning session":r;if(null==e?void 0:e.pinningSessionId){var o=e.id,i=e.pinningSessionId;(0,eu.B_)(i).then(function(){(0,ed.AJ)({artworkId:o,sessionId:i})}).catch(function(e){(0,S.notifyError)(n,{context:{artworkId:o,sessionId:i,error:e}})})}},dropMultiArtwork:function(){var e,t=this;this.showModal=!1,this.summary=eI.summary;var r=this.preModalState,n=partitionArtworkForDiscard(this.artworksState,r),o=n.kept,i=n.discarded;if(i.forEach(function(e){t.cancelPinningSessionForArtwork(e,{errorMessage:"Failed to cancel pinning session on artwork discard"})}),this.artworksState=o,this.preModalState=null,this.settleJiffyFirstUploadPending({deferReask:!0}),o.length){this.simulation=_object_spread({}
1,r.simulation),i.forEach(function(e){e.id&&(e_.A.stopPolling(Number(e.id)),t.clearValidateArtworkStartEventInterval(e.id),t.clearEnhancementStuck(e.id),t.clearEnhancementTimedOut(e.id))}),this.getArtworksPricing();return}var l=this.printAsIs?et.nk:et.LP;this.simulation=_object_spread({},eC,l),this.cleanupPolling(),i.filter(function(e){return e.isFile||e.isLoading}).length&&(this.discarded=new Date,null==(e=this.fetchController)||e.abort(),this.fetchController=null)},removeArtworkByIndex:function(e){var t=this.artworksState.find(function(t){return t.originalIndex===e});(null==t?void 0:t.id)&&(e_.A.stopPolling(t.id),this.clearValidateArtworkStartEventInterval(t.id),this.clearEnhancementStuck(t.id),this.clearEnhancementTimedOut(t.id)),this.artworksState=this.artworksState.filter(function(t){return t.originalIndex!==e}),this.reindexArtworks(),this.artworksState.length||(this.showModal=!1),this.settleJiffyFirstUploadPending({deferReask:!0})},removeAllErrorArtworks:function(){var e=this.artworksState.filter(function(e){return(0,ee.lx)(e)}),t=!0,r=!1,n=void 0;try{for(var o,i=e[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var l=o.value;l.id&&(e_.A.stopPolling(l.id),this.clearValidateArtworkStartEventInterval(l.id))}}catch(e){r=!0,n=e}finally{try{t||null==i.return||i.return()}finally{if(r)throw n}}this.artworksState=this.artworksState.filter(function(e){return!(0,ee.lx)(e)}),this.reindexArtworks(),this.artworksState.length||(this.showModal=!1),this.settleJiffyFirstUploadPending({deferReask:!0})},setEmptyArtwork:function(e){this.artworksState=_to_consumable_array(this.artworksState).concat([_object_spread_props(_object_spread({},eN),{id:e,isLoading:!0,isFile:!1,originalIndex:this.artworksState.length})])},setDiscarded:function(e){this.discarded=e},setFetchController:function(e){this.fetchController=e},setUseDefaultValues:function(e){this.useDefaultValues=e},setValidationErrorMessage:function(e){var t=e.index,r=e.message,n=e.isMultiSizeError,o=e.type,i={errorMessage:r,isMultiSizeError:n,isValid:!o||!Object.values(ec.A).some(function(e){return e.description===o.description})};if(void 0!==o&&(i.errorType=o),!this.artworksState.length){this.simulation=_object_spread({},this.simulation,i);return}var l=_to_consumable_array(this.artworksState);l[t]&&(l[t]=_object_spread({},l[t],i),this.artworksState=l,this.artworksState=_to_consumable_array(this.artworksState))},setLocale:function(e){this.locale=e},setReplaceArtwork:function(e){this.replaceArtwork=e},resetFilesError:function(){this.showFilesError=!1},setShowArtworkHistoryModal:function(e){this.showArtworkHistoryModal=e},setArtworkHistory:function(e){this.artworkHistory=e},setArtworkHistoryPagination:function(e){this.artworkHistoryPagination=_object_spread({},this.artworkHistoryPagination,e)},setUserType:function(e){this.userType=e},setIsStaff:function(e){this.isStaff=e},setBogoEligibility:function(e){this.bogoEligibility=e},setBogoMaxDimensionLabel:function(e){this.bogoMaxDimensionLabel=e},setPromotionResolution:function(e){this.promotionResolution=e},setIsMobile:function(e){this.isMobile=e},setPrintingServiceName:function(e){this.printingServiceName=e},setDtfChannelUuid:function(e){this.dtfChannelUuid=e},setActionCableOptions:function(e){this.actionCableOptions=e},setActionCableConnected:function(e){this.actionCableConnected=e},handlePollingEnhancementComplete:function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:if(-1===this.artworks.findIndex(function(t){return Number(t.id)===Number(e.id)}))return[2];return this.clearValidateArtworkStartEventInterval(e.id),void 0!==(t=procolorRoutableOf(e))&&this.noteArtworkProcolorRoutable(e.id,t),this.endJiffyFirstArtworkProcessing(e.id),this.updateEnhancedArtwork(e),(this.isSticker||this.isStickerSample)&&this.seedStickerAfterEnhancement(e),this.updatePrintReadyInfoState(e.id),this.updatePreviewDpi({artworkId:e.id}),[4,this.downscaleOriginalImage({artworkId:e.id}).catch(function(e){console.warn("[DTF] downscaleOriginalImage failed, continuing:",e)})];case 1:return r.sent(),this.isGoldFoil&&(this.generateGoldFoilImages({artworkId:e.id}),this.convertImageToHexColor({artwork:e})),this.artworks.some(function(e){return e.isLoading})||this.getArtworksPricing(),this.dispatchTrackingEvents(e),[2]}})}).call(this)},dispatchTrackingEvents:function(e){var t,r,n=this.artworks.find(function(t){return Number(t.id)===Number(e.id)});null!=n&&n.imageProcessingCompletedEventSent||((0,C.Py)("image_processing_completed",{payload:{process_data:e,stream_name:"dtf_channel_".concat(this.dtfChannelUuid),action_type:"enhancement_complete",worker_enhancement:!0},business_line:"transfers",artwork_id:e.id,completion_source:"polling_fallback"}),(0,F.Zm)({artwork_id:e.id,dpi:null==(t=e.metadata)?void 0:t.dpi,location:null==(r=e.metadata)?void 0:r.uploaded_on,file_name:e.filename,file_type:e.filetype,file_size:e.filesize,business_line:this.businessLine,artworks_count:this.artworks.length,pre_cut_transfers:this.preCut}),(0,I.q)(e,{multiArtwork:this.artworks.length>1}),this.updateArtworkValuesById({id:e.id,imageProcessingCompletedEventSent:!0}),W.api.dtf.acknowledgeArtwork({id:e.id},void 0,{silent:!0}
1).catch(function(){}))},setMockupColorForArtwork:function(e){var t,r=Number((null==(t=e.metadata)?void 0:t.white_pixels_ratio)||0),n=this.artworks.findIndex(function(t){return t.id===e.id});-1!==n&&this.setPresetMockupColor({index:n,color:r>50?"#000000":"#E1E1E1"})},getEnhancedArtworkImageUrls:function(e){if(e.manualEditUrl)return{imageUrl:e.manualEditUrl,enhancedImageUrl:e.manualEditUrl,url:e.manualEditUrl,sliderPreviewUrl:e.manualEditNoTrimUrl||e.manualEditUrl,previewUrl:e.manualEditUrl,displayUrl:e.manualEditUrl,trimmedWithBgUrl:e.manualEditUrl,trimmedNoBgUrl:e.manualEditUrl,trimmedImageUrl:e.manualEditUrl};var t,r=e.removeBackground||(null==(t=e.metadata)?void 0:t.remove_background)?e.noBgUrl||e.imageUrl:e.withBgUrl||e.imageUrl;return{imageUrl:r,enhancedImageUrl:e.noBgUrl||e.imageUrl,url:r,sliderPreviewUrl:e.noBgNoTrimUrl||e.noBgUrl,previewUrl:r,displayUrl:r,trimmedWithBgUrl:e.withBgUrl,trimmedNoBgUrl:e.noBgUrl,trimmedImageUrl:r}},getEnhancedArtworkDimensions:function(e){var t,r,n,o,i,l,c,u,d=e.removeBackground||(null==(o=e.metadata)?void 0:o.remove_background)?e.enhancedMetadata||e.metadata:e.withBgMetadata||e.metadata,p=(null==d?void 0:d.width_inch)||(null==d?void 0:d.widthInch),f=(null==d?void 0:d.height_inch)||(null==d?void 0:d.heightInch),_=null!=(t=stickerArtboardDimensions(d))?t:stickerArtboardDimensions(e.metadata);return{width:null!=(r=null==_?void 0:_.width)?r:p,height:null!=(n=null==_?void 0:_.height)?n:f,originalWidth:(null==(i=e.originalMetadata)?void 0:i.width_inch)||(null==(l=e.originalMetadata)?void 0:l.widthInch),originalHeight:(null==(c=e.originalMetadata)?void 0:c.height_inch)||(null==(u=e.originalMetadata)?void 0:u.heightInch)}},getEnhancedArtworkSizes:function(e,t){var r=this.artworks.find(function(t){return t.id===e.id});return(null==r?void 0:r.sizesAndQuantities)||[]},updateEnhancedArtwork:function(e){this.setLoadedArtwork({artwork:e}),this.setMockupColorForArtwork(e);var t,r,n,o,i=this.getEnhancedArtworkDimensions(e),l=this.getEnhancedArtworkImageUrls(e),c=this.getEnhancedArtworkSizes(e,i);this.updateArtworkValuesById(_object_spread_props(_object_spread({id:e.id,enhancementCompleted:!0,enhancedNoBgUrl:e.noBgUrl,enhancedWithBgUrl:e.withBgUrl},l,i),{metadata:e.metadata,enhancedMetadata:e.enhancedMetadata,originalMetadata:e.originalMetadata,withBgMetadata:e.withBgMetadata,canRemoveBg:e.canRemoveBg,removeBackground:e.removeBackground||(null==(t=e.metadata)?void 0:t.remove_background),originalImageUrl:e.originalImageUrl,originalMime:null==(r=e.metadata)?void 0:r.mime_type,enhancedDpi:null==(n=e.metadata)?void 0:n.dpi,originalDpi:(null==(o=e.originalMetadata)?void 0:o.dpi)||300,enhanceImage:!0,lastWebSocketEvent:"enhancement_complete_via_polling",lastWebSocketEventData:{source:"polling_fallback",data:e},isLoading:!1,progress:100,progressMessage:"Complete",awaitingFinalDimensions:!1,sizesAndQuantities:c}))},seedStickerAfterEnhancement:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.markComplete,o=void 0===n||n,i=null==e?void 0:e.id;if(null!=i){var l=this.artworks.find(function(e){return Number(e.id)===Number(i)})||e,c=l.shape||B.J.shape,u="no_padding"===l.paddingSize?B.J.paddingSize:l.paddingSize,d=l.bgColor||B.J.bgColor;this.updateArtworkValuesById(_object_spread({id:i,shape:c,bgColor:d,paddingSize:u},o&&{stickerCompletionSeeded:!0,enhancementCompleted:!0}));var p=(0,v.E)(this.artworks,i),f=this.artworks[p];f&&String(f.id)===String(i)&&(0,ef.R)().generateStickerImage({artwork:_object_spread_props(_object_spread({},f),{originalNoBgUrl:f.originalNoBgUrl||f.enhancedNoBgUrl}),shape:c,bgColor:d,paddingSize:u}).then(function(e){("skipped_missing_base_layer"===e||"composited_without_cutline"===e)&&o&&t.updateArtworkValuesById({id:i,stickerCompletionSeeded:!1})}).catch(function(e){(0,S.notifyError)("DTF sticker composite (seedStickerAfterEnhancement) failed",{params:{error:_instanceof(e,Error)?e.message:String(e),artwork_id:String(i),source:"seed_sticker_after_enhancement"}}),o&&t.updateArtworkValuesById({id:i,stickerCompletionSeeded:!1})})}},handleWebSocketEnhancementComplete:function(e){null!=e&&(e_.A.stopPolling(Number(e)),this.clearEnhancementStuck(e),this.clearEnhancementTimedOut(e))},cleanupPolling:function(){e_.A.stopAllPolling(),this.enhancementStuckAt60s={},this.enhancementTimedOut={}},schedulePollingFallback:function(e){var t=this,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).initialDelay;
1if((e=Number(e))&&(0,en.f)(this.catalogNumber,this.dtfPollingFallbackAllCatalogs)&&this.artworks.some(function(t){return t.id&&Number(t.id)===Number(e)})){if(e_.A.isPolling(e))if(void 0===r)return;else e_.A.stopPolling(e);e_.A.startPolling(e,function(e){t.handlePollingEnhancementComplete(e).catch(function(e){console.error("[DTF] handlePollingEnhancementComplete error:",e),(0,S.notifyError)("DTF polling enhancement complete handler error",{params:{error:String(e)}})})},_object_spread({catalogNumber:this.catalogNumber,dtfChannelUuid:this.dtfChannelUuid,checkArtworkExists:function(e){return t.artworks.some(function(t){return t.id&&Number(t.id)===Number(e)})},onTimeout:function(e){t.setEnhancementTimedOut(Number(e))}},void 0!==r&&{initialDelay:r}))}},startProColorImageAttachPoll:function(e){var t,r=this,n=String(e);if(!(null==e||""===n||eh.has(n))){eh.add(n);var o=Date.now(),verifyProColorImageAttached=function(){return _async_to_generator(function(){var r,i,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:if(!this.artworks.some(function(t){return Number(t.id)===Number(e)}))return eh.delete(n),[2];r=!1,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,(0,W.api.dtf.getArtworkHistory)({artwork_ids:[e],catalog_number:this.catalogNumber,dtf_channel_uuid:this.dtfChannelUuid},{silent:!0})];case 2:return r=!!(null==(l=((null==(i=u.sent())?void 0:i.artworks)||[]).find(function(t){return Number(t.id)===Number(e)}))?void 0:l.image_attached),"string"==typeof(c=null==l?void 0:l.cmyk_original_image_url)&&c&&(t=c),[3,4];case 3:return u.sent(),[3,4];case 4:if(r||Date.now()-o>=9e4)return this.updateArtworkValuesById(_object_spread({id:e,enhancementCompleted:!0,imageAttached:!0,awaitingFinalDimensions:!1},t&&{cmykOriginalImageUrl:t})),eh.delete(n),[2];return setTimeout(verifyProColorImageAttached,1e4),[2]}})}).call(r)};setTimeout(verifyProColorImageAttached,1e4)}},setSpangleAlgorithms:function(e){this.spangleConfig=_object_spread_props(_object_spread({},this.spangleConfig),{spangleAlgorithms:e})},setIsSpangle:function(e){this.spangleConfig=_object_spread_props(_object_spread({},this.spangleConfig),{isSpangle:e})},setSpangleColors:function(e){this.spangleConfig=_object_spread_props(_object_spread({},this.spangleConfig),{spangleColors:e})},setCable:function(e){this.cable=e},setBusinessLine:function(e){this.businessLine=e},setIsPuff:function(e){this.isPuff=e},setIsProColor:function(e){this.isProColor=e},setCmykSoftProofEnabled:function(e){this.cmykSoftProofEnabled=e},setDtfPollingFallbackAllCatalogs:function(e){this.dtfPollingFallbackAllCatalogs=e},setIsSticker:function(e){this.isSticker=e},setIsDieCutSticker:function(e){this.isDieCutSticker=e},setStickerPromoPrice:function(e){this.stickerPromoPrice=e},setIsJiffyMade:function(e){this.isJiffyMade=e},setIsStickerSample:function(e){this.isStickerSample=e},setMinStickerQuantity:function(e){this.minStickerQuantity=e},setIsLetters:function(e){this.isLetters=e},toggleLoading:function(e){var t=_sliced_to_array(e,2),r=t[0],n=t[1];this.loading=_object_spread_props(_object_spread({},this.loading),_define_property({},r,n))},setExperiments:function(e){this.experiments=e},setDtfCategory:function(e){this.dtfCategory=e},setPreCutUpsellThreshold:function(e){this.preCutUpsellThreshold=Number(e)},setPuff:function(e){this.puff=_object_spread({},this.puff,e)},resetPuff:function(){this.puff=_object_spread({},et.JH)},setIsJerseyNumbers:function(e){this.isJerseyNumbers=e},setPrintReadyInfoShow:function(e){this.printReadyInfoConfig=_object_spread_props(_object_spread({},this.printReadyInfoConfig),{show:e})},setPrintReadyInfoExpandable:function(e){this.printReadyInfoConfig=_object_spread_props(_object_spread({},this.printReadyInfoConfig),{expanded:e})}
1,setArtworkBackground:function(e){this.artworkBackground=e},setBackgroundType:function(e){this.backgroundType=e},setPreviewCanvasSize:function(e){var t=e.width,r=e.height,n=this.previewCanvasSize;n&&n.width===t&&n.height===r||(this.previewCanvasSize={width:t,height:r})},setLetterPreviewMessage:function(e){var t=e.textIndex,r=e.message;this.letterPreviewMessages=_object_spread_props(_object_spread({},this.letterPreviewMessages),_define_property({},t,r))},clearLetterPreviewMessages:function(){this.letterPreviewMessages={}},removeLetterPreviewMessage:function(e){var t=_object_spread({},this.letterPreviewMessages);delete t[e],this.letterPreviewMessages=Object.entries(t).reduce(function(e,t,r){var n=_sliced_to_array(t,2)[1];return e[r]=n,e},{})},setLetterPreviewLoading:function(e){this.letterPreviewLoading=e},setIsGoldFoil:function(e){this.isGoldFoil=e},setForcePdpTransfersRedraw:function(e){this.forcePdpTransfersRedraw=e},setPinBasedRedrawEnabled:function(e){this.pinBasedRedrawEnabled=e},setPinBasedRedrawEscaped:function(e){this.pinBasedRedrawEscaped=e},setEnableRedraw:function(e){this.enableRedraw=e},clearGatedRedrawFields:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.skipDateRefresh,r=this.artworksState.filter(function(e){return e.hasExpertEditAddon||e.enhancementNote}).map(function(e){return{key:artworkIdentity(e),hasExpertEditAddon:e.hasExpertEditAddon,enhancementNote:e.enhancementNote}}),n=0===this.artworksState.length&&!!(this.simulation.hasExpertEditAddon||this.simulation.enhancementNote),o=n?{hasExpertEditAddon:this.simulation.hasExpertEditAddon,enhancementNote:this.simulation.enhancementNote}:null;return this.artworksState=this.artworksState.map(function(e){return e.hasExpertEditAddon||e.enhancementNote?_object_spread_props(_object_spread({},e),{hasExpertEditAddon:!1,enhancementNote:""}):e}),n&&(this.simulation=_object_spread_props(_object_spread({},this.simulation),{hasExpertEditAddon:!1,enhancementNote:""})),(r.length>0||n)&&(this.getArtworksPricing(),this.showDesignServicesDeliveryBuffer&&!(void 0!==t&&t)&&this.updatePdpDates()),r.length>0||o?{artworkFields:r,simulationFields:o}:null},restoreGatedRedrawFields:function(e){if(e){var t=e.artworkFields,r=e.simulationFields;if(t.length>0){var n=new Map(t.filter(function(e){return null!=e.key}).map(function(e){return[e.key,e]}));this.artworksState=this.artworksState.map(function(e){var t=artworkIdentity(e),r=null==t?void 0:n.get(t);return!r||e.hasExpertEditAddon||e.enhancementNote?e:_object_spread_props(_object_spread({},e),{hasExpertEditAddon:r.hasExpertEditAddon,enhancementNote:r.enhancementNote})})}if(r&&this.artworksState.length>0){var o=this.artworksState.findIndex(function(e){return!e.hasExpertEditAddon&&!e.enhancementNote});if(-1!==o){var i=this.artworksState[o].uploadBatchId;this.artworksState=this.artworksState.map(function(e,t){var n=null!=i&&e.uploadBatchId===i&&!e.hasExpertEditAddon&&!e.enhancementNote;return t===o||n?_object_spread_props(_object_spread({},e),{hasExpertEditAddon:r.hasExpertEditAddon,enhancementNote:r.enhancementNote}):e})}}else!r||this.simulation.hasExpertEditAddon||this.simulation.enhancementNote||(this.simulation=_object_spread_props(_object_spread({},this.simulation),{hasExpertEditAddon:r.hasExpertEditAddon,enhancementNote:r.enhancementNote}));(t.length>0||r)&&(this.getArtworksPricing(),this.showDesignServicesDeliveryBuffer&&this.updatePdpDates())}},setIsPricingLoading:function(e){this.isPricingLoading=e},setZipTransitionPending:function(e){this.zipTransitionPending=e},invalidatePricingRequest:function(){var e;null==(e=this.updatePricingAbortSignal)||e.abort(),this.updatePricingAbortSignal=null},setShowMultiSize:function(e){this.showMultiSizeArtwork=e},setGangSheetBuilder:function(e){this.gangSheetBuilder=e},ensureGangSheetBuilder:function(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:if(this.gangSheetBuilder)return[3,2];return t=(e=this).setGangSheetBuilder,[4,(0,i.Y)()];case 1:t.apply(e,[r.sent()]),r.label=2;case 2:return[2,this.gangSheetBuilder]}})}).call(this)},setShowGangSheetBuilder:function(e){this.showGangSheetBuilder=e},setShowStickerDripBuilder:function(e){this.showStickerDripBuilder=e},setGeneratedStickerDesigns:function(e){this.generatedStickerDesigns=e},recordGeneratedStickerDesigns:function(e){var t=Array.isArray(e)?e:[];if(t.length){var r=_to_consumable_array(this.generatedStickerDesigns);t.forEach(function(e){var t,n,o=(n=String(null==(t=recordFromUnknown(e))?void 0:t.id),r.findIndex(function(e){var t;return String(null==(t=recordFromUnknown(e))?void 0:t.id)===n}));-1===o?r.push(e):r[o]=e}),this.generatedStickerDesigns=r}},setGeneratedGangSheets:function(e){this.generatedGangSheets=e},setGangSheetBuilderShopId:function(e){this.gangSheetBuilderShopId=e},setShowGangSheetBuilderFeature:function(e){this.showGangSheetBuilderFeature=e},setGangSheetWidth225Exposed:function(e){this.gangSheetWidth225Exposed=e},setIsGangSheetBuilder:function(e){this.isGangSheetBuilder=e},setGangSheetBuilderVariants:function(e){this.gangSheetBuilderVariants=e},updateGangSheetBuilderSettings:function(e){this.gangSheetBuilderSettings=_object_spread({},this.gangSheetBuilderSettings,e)},setReorderEnabled:function(e){this.reorderEnabled=e},setIsDtfSheet:function(e){this.isDtfSheet=e},setGangSheetBulkPrice:function(e){this.gangSheetBulkPrice=_object_spread({},this.gangSheetBulkPrice,e)},setGangSheetBuilderSizes:function(e){this.gangSheetBuilderSizes=e},setStoreCreditInfo:function(e){this.storeCreditInfo=e},setPresetMockupColor:function(e){var t=e.index,r=e.color,n=_to_consumable_array(this.presetMockupColor);n[t]=r,this.presetMockupColor=n},removePresetMockupColor:function(e){var t=_to_consumable_array(this.presetMockupColor);t.splice(e,1),this.presetMockupColor=t},setGangSheetBuilderCarousels:function(e){this.gangSheetBuilderCarousels=e},setPreloadedDesignId:function(e){this.preloadedDesignId=e},setValidateArtworkStartTime:function(e,t){this.validateArtworkStartTime=_object_spread_props(_object_spread({},this.validateArtworkStartTime),_define_property({},e,t))},setValidateArtworkStartEventIntervalID:function(e,t){var r=_object_spread({},this.validateArtworkStartEventIntervalID);r[e]=t,this.validateArtworkStartEventIntervalID=r},setPaidExpertEditAddonEnabled:function(e){this.paidExpertEditAddonEnabled=e},setMatchingShirtUpsellEnabled:function(e){this.matchingShirtUpsellEnabled=e},setShowMatchingShirtModal:function(e){this.showMatchingShirtModal=e},setMatchingShirtOptions:function(e){this.matchingShirtOptions=e},setKlaviyoSmsTransactionalSubscribed:function(e){this.klaviyoSmsTransactionalSubscribed=e},setSmsTransactionalSubscriptionPdpEnabled:function(e){this.smsTransactionalSubscriptionPdpEnabled=e},setHidePdpRestockNotify:function(e){this.hidePdpRestockNotify=e},setSmsTransactionalPhone:function(e){this.smsTransactionalPhone=e},setSmsTransactionalSubscribeButtonText:function(e){this.smsTransactionalSubscribeButtonText=e},setGangSheetCatalogNumbers:function(e){this.gangSheetCatalogNumbers=e},setCustomerReviewOnRedraws:function(e){this.customerReviewOnRedraws=e},setCustomerReviewOnTransferRedraws:function(e){this.customerReviewOnTransferRedraws=e},setPinSessionRecording:function(e){this.pinSessionRecording=e},setPinSessionForceMixpanelRecording:function(e){this.pinSessionForceMixpanelRecording=e},setTransferPdpBackButtonDetection:function(e){this.transferPdpBackButtonDetection=e},openPinningSession:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return _async_to_generator(function(){var n,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:if(!(n=this.artworks[e]))return[2];(0,ed.VV)(_object_spread({artworkId:n.id},r?{userType:r}:{})),(0,X.p)({enabled:this.pinSessionRecording,forceMixpanelRecording:this.pinSessionForceMixpanelRecording}),this.pinningArtworkIndex=e,this.pinningSessionLoading=!0,l.label=1;case 1:return l.trys.push([1,3,4,5]),o=getArtworkPreviewImageName(n),[4,(0,eu.jw)(String(n.id),{previewImageName:o})];case 2:return i=l.sent(),this.pinningModalSessionId=i.sessionId,this.pendingInitialMessage=t,this.showPinningModal=!0,[3,5];case 3:return l.sent(),this.pinningArtworkIndex=null,this.pinningModalSessionId=null,this.pendingInitialMessage=null,[3,5];case 4:return this.pinningSessionLoading=!1,[7];case 5:return[2]}})}).call(this)},editPinningSession:function(e){var t=this.artworks[e];(null==t?void 0:t.pinningSessionId)&&((0,ed.lS)({artworkId:t.id,sessionId:t.pinningSessionId}),this.pinningArtworkIndex=e,this.pinningModalSessionId=t.pinningSessionId,this.showPinningModal=!0)},closePinningSession:function(){this.showPinningModal=!1,this.pinningArtworkIndex=null,this.pinningModalSessionId=null,this.pendingInitialMessage=null},completePinningSession:function(e){var t=e.artworkIndex,r=e.sessionId,n=e.summary,o=e.state,i=this.artworks[t];i&&this.updateArtworkValuesById({id:i.id,pinningSessionId:r,pinningSummary:n,pinningSessionState:null!=o?o:"completed"})},clearPinningSession:function(e){var t=this.artworks[e];t&&this.clearPinningSessionFromArtwork(t)},clearPinningSessionFromArtwork:function(e){this.cancelPinningSessionForArtwork(e),e.manualEditUrl&&this.clearManualEdit(e),this.updateArtworkValuesById({id:e.id,pinningSessionId:null,pinningSummary:null,pinningSessionState:null})},clearManualEdit:function(e){if(this.updateArtworkValuesById({id:e.id,manualEditUrl:null,manualEditNoTrimUrl:null}),e.id){var t=new FormData;t.append("manual_edit","false"),t.append("remove_background",String(e.removeBackgroun
1d||!1)),t.append("start_new_edit","false"),W.api.dtf.completeRefineSession({dtf_artwork_id:e.id},t,{raw:!0,useAxiosForRequest:!0,headers:{"Content-Type":void 0}}).catch(function(t){(0,S.notifyError)("Failed to clear manual edit",{context:{artworkId:e.id,error:t}})})}},setPendingPinningInvalidation:function(e){this.pendingPinningInvalidation=e},confirmPinningInvalidation:function(){var e=this.pendingPinningInvalidation;if(e){var t=this.artworks.find(function(t){return String(t.id)===String(e.artworkId)});if(t&&this.clearPinningSessionFromArtwork(t),"enhancementTier"===e.type&&t){var r=e.value;t.enhancementCompleted?this.updateEnableEnhancement({artworkId:t.id,enableEnhancement:"print_original"!==r,enhancementTier:r}):this.updateArtworkValuesById({id:t.id,enhancementTier:r,pricing:this.cachedArtworkPrices[r]||{},hasExpertEditAddon:t.hasExpertEditAddon})}else if("enableEnhancement"===e.type&&t)this.updateEnableEnhancement({artworkId:t.id,enableEnhancement:e.value}),e.section&&(this.lastConfirmedConfigSection={artworkId:t.id,section:e.section});else if("removeBackground"===e.type&&t){this.updateArtworkStyle({id:t.id,isBgRemoved:e.value});var n=t.paddingSize||"no_padding";this.sendUpdateArtworkStyle({id:t.id,isBgRemoved:e.value,padding_size:n,forceBgRemoval:!1})}this.pendingPinningInvalidation=null}},cancelPinningInvalidation:function(){this.pendingPinningInvalidation=null},clearValidateArtworkStartEventInterval:function(e){this.validateArtworkStartTime=_object_spread_props(_object_spread({},this.validateArtworkStartTime),_define_property({},e,null)),clearInterval(this.validateArtworkStartEventIntervalID[e]);var t=_object_spread({},this.validateArtworkStartEventIntervalID);t[e]=null,this.validateArtworkStartEventIntervalID=t},setEnhancementStuck:function(e){this.endJiffyFirstArtworkProcessing(e,{provisional:!0});var t=this.enhancementStuckAt60s,r=String(e);t[r]||(this.enhancementStuckAt60s=_object_spread_props(_object_spread({},t),_define_property({},r,!0)))},clearEnhancementStuck:function(e){var t=this.enhancementStuckAt60s;if(String(e)in t){var r=_object_spread({},t);delete r[String(e)],this.enhancementStuckAt60s=r}},setEnhancementTimedOut:function(e){this.endJiffyFirstArtworkProcessing(e,{provisional:!0});var t=this.enhancementTimedOut;t[String(e)]||(this.enhancementTimedOut=_object_spread_props(_object_spread({},t),_define_property({},String(e),!0)),(0,C.Py)("enhancement_timeout_visible_to_user",{dtf_channel_uuid:this.dtfChannelUuid,artwork_id:e}))},clearEnhancementTimedOut:function(e){var t=this.enhancementTimedOut;if(String(e)in t){var r=_object_spread({},t);delete r[String(e)],this.enhancementTimedOut=r}},addSampleToCart:function(){return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){return e=(0,ee.PL)(),delete e.search_id,t=_object_spread_props(_object_spread({},e),{sample_pack:!0,artworks:[{artwork_id:0,width:1,height:1,quantity:1,variant_id:this.variantId,sample_pack:!0}]}),W.api.dtf.addToCart(t).then(function(e){window.location=(0,m.Q)()}),[2]})}).call(this)},addFilesToQueue:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,y,v,w,j,k,x,S,O,P,A,I,E;return _ts_generator(this,function(N){switch(N.label){case 0:t=this,r=e.files,o=void 0===(n=e.artworkIndex)?null:n,i=e.existingArtworkId,c=void 0===(l=e.uploadSource)?null:l,d=void 0!==(u=e.isDropEvent)&&u,c||(c="".concat(this.catalogNumber,"_PDP")),p=this.showModal?null:{artworks:_to_consumable_array(this.artworksState),simulation:_object_spread({},this.simulation)},(0,C.Py)("image_upload_count",{business_line:this.businessLine,image_count:r.length}),(null===o||this.artworks[0].isSimulated)&&this.addFiles(r,null!=o?o:this.artworks.length),null!==o&&(_=(f=this.simulation).widthEdited,h=f.width,m=f.height,g=_&&!this.isSpangle&&0===o,b={width:this.initialValues.width,height:this.initialValues.height},g&&(b={width:this.printAsIs?this.initialValues.width:h,height:m}),y=this.isSticker||this.isPuff||this.isSpangle,v=0!==o||y?this.initialValues.quantity:this.simulation.quantity,this.setIsRetrying(!1),this.updateArtworkValues(_object_spread_props(_object_spread({index:o},eN,this.initialValues,b),{quantity:v,file:r[0],isFile:!0,name:r[0].name,errorMessage:null}))),this.modalArtworks.length>1&&this.openModal(p),w=new Date,j=this.artworks.reduce(function(e,t,r){return t.isFile?_to_consumable_array(e).concat([_object_spread_props(_object_spread({},t),{originalIndex:r,uploadedTimeStamp:w})]):e},[]),this.reindexArtworks(),k=!0,x=!1,S=void 0,N.label=1;case 1:N.trys.push([1,6,7,8]),P=function(){var e,r,n,l,u,p,f;return _ts_generator(this,function(_){switch(_.label){case 0:if(e=I.value,"number"==typeof o&&o!==e.originalIndex||!e.file)return[2,"continue"];
1if(l=em.has(e.file),!O.isGuest)return[3,3];_.label=1;case 1:if(!(em.size>0))return[3,3];return[4,Promise.all(Array.from(em.values()))];case 2:return _.sent(),l=l||em.has(e.file),[3,1];case 3:if(l||(u=e.originalIndex,(null==(r=O.artworks[u])?void 0:r.file)!==e.file&&(u=O.artworks.findIndex(function(t){return t.file===e.file})),-1===u||(null==(n=O.artworks[u])?void 0:n.retryFailed)))return[2,"continue"];if(!(!O.discarded||e.uploadedTimeStamp>O.discarded)||(O.setFileLoading(u),p=function(){},setJiffyFirstUploadWasPending(!0),em.set(e.file,new Promise(function(e){p=e})),f=O.uploadArtwork({file:_object_spread_props(_object_spread({},e),{originalIndex:u}),isDropEvent:d,artworkIndex:o,existingArtworkId:i,uploadSource:c||"".concat(O.catalogNumber,"_PDP")}).finally(function(){em.delete(e.file),p(),t.settleJiffyFirstUploadPending()}),!O.isGuest))return[3,5];return[4,f];case 4:_.sent(),_.label=5;case 5:return[2]}})},A=j[Symbol.iterator](),N.label=2;case 2:if(k=(I=A.next()).done)return[3,5];return O=this,[5,_ts_values(P())];case 3:N.sent(),N.label=4;case 4:return k=!0,[3,2];case 5:return[3,8];case 6:return E=N.sent(),x=!0,S=E,[3,8];case 7:try{k||null==A.return||A.return()}finally{if(x)throw S}return[7];case 8:return[2]}})}).apply(this,arguments)},isStaleSeedTarget:function(e){var t=e.file,r=String(t.originalIndex),n=this.artworks.find(function(e){return String(e.originalIndex)===r});return!!(this.discarded&&t.uploadedTimeStamp<this.discarded||t.file!==(null==n?void 0:n.file)||(null==n?void 0:n.retryFailed))},seedArtworkFromAsyncBroadcast:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h;return _ts_generator(this,function(m){return(n=null==(t=e.result)?void 0:t.success_payload)?(i=(o=(null==t?void 0:t.data)||{}).process_time_stamp,l=o.file_original_index,c=this.artworksState,-1===(u=(null==t?void 0:t.artwork_id)==null?-1:c.findIndex(function(e){return String(e.id)===String(t.artwork_id)}))&&null!=i&&(p=_sliced_to_array(d=c.map(function(e,t){return{row:e,i:t}}).filter(function(e){return String(e.row.processTimeStamp)===String(i)}),1)[0],1===d.length&&p?u=p.i:d.length>1&&null!=l&&(_=_sliced_to_array(f=d.filter(function(e){return pendingSeedFileOriginalIndexMatches(e.row,l)}),1)[0],1===f.length&&_&&(u=_.i))),-1===u||!(h=null==(r=c[u])?void 0:r.pendingSeedCtx)||this.isStaleSeedTarget({file:h.file}))?[2,!1]:(void 0===n?"undefined":_type_of(n))!=="object"?(this.failAsyncUploadTerminally({index:u,uploadError:et.Vt,uploadErrorCode:"async_seed_failed"}),[2,!1]):(this.writeArtworkValuesAtLocatedIndex({index:u,pendingSeedCtx:void 0}),this.seedArtworkFromCreatePayload({payload:n,ctx:h}).catch(function(e){(0,S.notifyError)(_instanceof(e,Error)?e:String(e),{context:{source:"seedArtworkFromAsyncBroadcast"}})}),[2,!0]):[2,!1]})}).apply(this,arguments)},installAsyncAck:function(e){var t,r,n=e.ack,o=e.processTimeStamp,i=e.fileOriginalIndex,l=this.artworksState.map(function(e,t){return{row:e,i:t}}).filter(function(e){return String(e.row.processTimeStamp)===String(o)}),c=1===l.length&&null!=(t=null==(r=l[0])?void 0:r.i)?t:-1;if(-1===c&&l.length>1&&null!=i){var u=l.filter(function(e){return pendingSeedFileOriginalIndexMatches(e.row,i)}),d=_sliced_to_array(u,1)[0];1===u.length&&d&&(c=d.i)}return(this.armAsyncSeedDeadline({processTimeStamp:o,fileOriginalIndex:i}),-1===c)?-1:(this.writeArtworkValuesAtLocatedIndex({index:c,id:n.artwork_id}),c)},armAsyncSeedDeadline:function(e){var t=this,r=e.processTimeStamp,n=e.fileOriginalIndex;setTimeout(function(){var e=t.artworksState,o=e.map(function(e,t){return{row:e,i:t}}).filter(function(e){return String(e.row.processTimeStamp)===String(r)}),i=_sliced_to_array(o,1)[0],l=1===o.length&&i?i.i:-1;if(-1===l&&o.length>1&&null!=n){var c=o.filter(function(e){return pendingSeedFileOriginalIndexMatches(e.row,n)}),u=_sliced_to_array(c,1)[0];1===c.length&&u&&(l=u.i)}if(-1!==l){var d=e[l];(null==d?void 0:d.pendingSeedCtx)&&(d.metadata||d.enhancementCompleted&&!d.awaitingFinalDimensions||t.failAsyncUploadTerminally({index:l,uploadError:et.Vt,uploadErrorCode:"async_preprocess_timeout"}))}},et.RP)},failAsyncUploadTerminally:function(e){var t,r=e.index,n=e.uploadError,o=e.uploadErrorCode;this.writeArtworkValuesAtLocatedIndex({index:r,uploadError:n,uploadErrorCode:o,retryFailed:!0,pendingSeedCtx:void 0}),failJiffyFirstAwaitingFile(null==(t=this.artworksState[r])?void 0:t.file),this.settleJiffyFirstUploadPending()},routeAsyncFailure:function(e){var t,r,n,o,i,l,c=e.result,u=(null==c?void 0:c.data)||{},d=u.process_time_stamp;if(null==d)return"passthrough";var p=this.artworksState,f=p.map(function(e,t){return{row:e,i:t}}
1).filter(function(e){return String(e.row.processTimeStamp)===String(d)}),_=1===f.length&&null!=(t=null==(l=f[0])?void 0:l.i)?t:-1;if(-1===_&&f.length>1&&null!=u.file_original_index){var h=f.filter(function(e){return pendingSeedFileOriginalIndexMatches(e.row,u.file_original_index)}),m=_sliced_to_array(h,1)[0];1===h.length&&m&&(_=m.i)}if(-1===_)return"handled";var g=p[_],b=c.error_code||"async_preprocess_failed";if(((null==g?void 0:g.metadata)||(null==g?void 0:g.enhancementCompleted)&&!(null==g?void 0:g.awaitingFinalDimensions))&&"pre_process_artwork_retries_exhausted"!==b)return"handled";var y=c.error||et.Vt;this.failAsyncUploadTerminally({index:_,uploadError:y,uploadErrorCode:b});var v={pageValue:"pdp",businessLine:this.businessLine},w=null!=(r=null==g?void 0:g.file)?r:{};return(0,A.IY)(v,{originalIndex:null==g?void 0:g.originalIndex,name:w.name,type:w.type,size:w.size},{response:{data:c}}),(0,j.R)({message:null!=(n=c.error)?n:null,type:null!=(o=c.error_type)?o:null,status:null!=(i=c.status)?i:null})||(0,S.notifyError)("Upload artwork error",{params:{error:c.error,error_response:c,uploadError:y}}),"handled"},seedArtworkFromCreatePayload:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,j,k,x,S,O,P,A,I,E,N,D;return _ts_generator(this,function(T){switch(T.label){case 0:if(t=e.payload,r=e.ctx,i=t,l=r.file,c=r.currentArtworkIndex,u=r.generatedGangSheetData,d=r.generatedStickerDesignData,p=r.uploadStartTime,f=r.uploadUuid,_=r.catalogNumber,h=r.retryCount,this.isStaleSeedTarget({file:l}))return[2,!0];if(!i||(void 0===i?"undefined":_type_of(i))!=="object")throw new er.T(null===i?"null":void 0===i?"undefined":_type_of(i));if(this.isRetrying&&this.setIsRetrying(!1),g=(m=this.simulation).widthEdited,b=m.width,v=m.height,w={width:this.initialValues.width,height:this.initialValues.height},g&&!this.isSpangle&&0===c&&(w.width=this.printAsIs?this.initialValues.width:b,w.height=v),j=this.isSticker||this.isPuff||this.isSpangle,k=0!==c||j?this.initialValues.quantity:this.simulation.quantity,x=this.printAsIs?_object_spread({},et.nk.previewMetadata):{},u&&(k=u.quantity,x.heightInch=u.size.height),d&&(w.width=d.sticker.width,w.height=d.sticker.height,Number.isInteger(S=Number(d.sticker.quantity))&&S>=k&&(k=S)),i.uploadUuid=f,this.updateArtworkValues(_object_spread_props(_object_spread({},i,this.initialValues,w),{index:c,lastWebSocketEvent:"upload_artwork",lastWebSocketEventData:{data:i.data},pricing:this.cachedArtworkPrices[eN.enhancementTier]||{},quantity:k,previewMetadata:x,fromGangSheetBuilder:this.generatedGangSheets.length>0,catalogNumber:_})),h>0&&((0,C.Py)("image_upload_retries_success",{}),(0,F.qw)({status:"success",file_name:l.file.file_name,file_type:l.file.type,file_size:l.file.size,location:"pdp",dpi:300,pre_cut_transfers:this.preCut})),this.trackImageUploadCompleted({file:l.file,uploadStartTime:p,artwork:i,uploadUuid:f,success:!0}),!this.isStandardArtwork)return[3,2];return A=_object_spread_props(_object_spread({},(0,y.Tm)(i)),{index:c,quantity:this.simulation.quantity}),this.updateArtworkValues(_object_spread_props(_object_spread({},A),{originalDpi:null==(O=i.metadata)?void 0:O.dpi,sizeBasedDpi:null==(P=i.metadata)?void 0:P.dpi,enhancedDpi:300})),this.schedulePollingFallback(i.id),this.setLoadedArtwork({artwork:i}),this.updatePreviewDpi({artworkId:i.id}),[4,this.downscaleOriginalImage({artworkId:i.id})];case 1:return T.sent(),[3,3];case 2:this.isProColor&&this.showMultiSize&&(I=isUploadingRow(this.artworksState[this.findJiffyFirstRowIndexByFile(l.file)]),this.updateArtworkValuesById((0,ei.lu)({artworkId:i.id,rawMetadata:i.metadata,fallbackDimensions:w,defaultQuantity:k})),forgetJiffyFirstAwaitingFile(l.file),this.settleJiffyFirstUploadPending({registered:I}),this.startProColorImageAttachPoll(i.id)),T.label=3;case 3:return E=(null==(o=i.metadata)||null==(n=o.errors)?void 0:n.length)>0,this.printAsIs&&!E&&this.schedulePollingFallback(i.id),N=Number(i.id),D=this.artworks.some(function(e){return null!=e.id&&Number(e.id)===N&&e.stickerCompletionSeeded}),(this.isSticker||this.isStickerSample)&&!D&&this.schedulePollingFallback(i.id),E&&this.setGangsheetValidationError({index:c,artwork:i,type:ec.A.INVALID_GANG_SHEET}),[2,!1]}})}).apply(this,arguments)},uploadArtwork:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,_,h,m,g,b,y,v,w,j,x,S,O,P,I,N;return _ts_generator(this,function(D){switch(D.label){case 0:return t=this,r=e.file,n=e.isDropEvent,o=e.artworkIndex,i=e.existingArtworkId,l=e.uploadSource,c=this,u=c.printAsIs,d=c.pdpType,_=c.preCut,h=c.businessLine,m=c.catalogNumber,[4,(0,p.N$)(r.file,u)];case 1:if(b=(g=D.sent()).valid,y=g.message,v=g.errorType,w=g.file,!b)return this.setFailedU
1ploadArtwork({index:r.originalIndex,uploadError:y,failureOf:{file:r.file}}),"unsupported_type"===v&&(0,p.sO)(r.file,{page:"pdp",pdp_type:d,business_line:h},y),[2];return j=this.trackImageUploadStart(r,n),x=et.eO.length,S=this.dtfChannelUuid,O=0,P=o||r.originalIndex,I=function(){var e;(null==(e=t.artworks[P])||!e.retryFailed)&&navigator.onLine&&t.isRetrying&&t.setIsRetrying(!1)},window.addEventListener("online",I),window.addEventListener("offline",I),[4,(N=function(){return _async_to_generator(function(){var e,t,n,o,c,u,d,p,h,g,b,y,v,D,M,R,L,B,z,U,H,V,G,K,Q,J,Z,Y,X,ee,er,en,ei,es,el,ec,eu,ed,ep,ef,e_,eh,em,eg;return _ts_generator(this,function(eb){switch(eb.label){case 0:e=this,o=(n=new AbortController).signal,c=this.productId,u=new FormData,d=Date.now(),this.setFetchController(n),u.append("upload_source",l),u.append("file",w),u.append("product_id",c),u.append("file_original_index",r.originalIndex),S&&(u.append("dtf_channel_uuid",S),this.actionCableConnected&&u.append("preprocess_protocol",et.ZN)),u.append("pre_cut",_),u.append("process_time_stamp",d),u.append("experiments",JSON.stringify(this.experiments||{})),i&&u.append("existing_artwork_id",i),(p=this.generatedGangSheets.length>0&&this.generatedGangSheets.find(function(e){return e.id===r.file.name.split(".")[0]}))&&u.append("generated_gang_sheet_data",JSON.stringify(p)),h=String(r.file.name).replace(/\.png$/,""),(g=this.generatedStickerDesigns.length>0&&this.generatedStickerDesigns.find(function(e){return String(e.id)===h}))&&u.append("generated_sticker_design_data",JSON.stringify(g)),b=performance.now(),y={file:r,currentArtworkIndex:P,fileOriginalIndex:r.originalIndex,generatedGangSheetData:p,generatedStickerDesignData:g,uploadStartTime:b,uploadUuid:j,catalogNumber:m,retryCount:O},v=String(r.originalIndex),M=!(D=this.artworks.find(function(e){return String(e.originalIndex)===v}))||D.file===r.file,this.updateArtworkValues(M?{index:P,progress:0,processTimeStamp:d,pendingSeedCtx:y}:{index:P,progress:0}),R=null,L=!1,B=(0,f.pK)(null==w?void 0:w.size),(0,q.fJ)(),setJiffyFirstUploadWasPending(!0),(z=asFileKey(r.file))&&(ev.add(z),ew.delete(z),ej.delete(z)),U=function(){return null!==z&&ej.has(z)},H=!1,V=function(){H=!0,z&&(ew.add(z),ev.delete(z)),e.settleJiffyFirstUploadPending()},eb.label=1;case 1:return eb.trys.push([1,6,7,8]),[4,W.api.dtf.uploadArtwork(u,{raw:!0,useAxiosForRequest:!0,silent:!0,headers:{"Content-Type":void 0},signal:o,timeout:B,onUploadProgress:function(t){1===t.progress?e.updateArtworkValues({index:P,progress:T.i.upload_artwork.percentage["0"],progressMessage:"Processing file"}):L||(L=!0,e.updateArtworkValues({index:P,progress:T.i.upload_artwork.percentage["0"]})),e.setIsRetrying(!1)}})];case 2:var ey;if(!((ey=R=eb.sent())&&(void 0===ey?"undefined":_type_of(ey))==="object"&&"processing"===ey.status&&null!=ey.artwork_id))return[3,3];return -1===(G=M?this.installAsyncAck({ack:R,processTimeStamp:d,fileOriginalIndex:r.originalIndex}):-1)||G!==this.findJiffyFirstRowIndexByFile(r.file)||this.isJiffyFirstUploadOver(r)?V():H=!0,[3,5];case 3:return[4,this.seedArtworkFromCreatePayload({payload:R,ctx:y})];case 4:eb.sent()||U()?V():H=!0,eb.label=5;case 5:return[3,8];case 6:if("AbortError"===(K=eb.sent()).name||"CanceledError"===K.name)return V(),[2];if(Z=["backend_file_validation","backend_processing_error"].includes(null==(J=(null==K||null==(Q=K.response)?void 0:Q.data)||K)?void 0:J.error_type),!(0,eo.G)(K)&&(J.error&&!J.success||navigator.onLine&&"Network Error"!==K.message))return Z?(X=J.error,this.trackImageUploadCompleted({file:r.file,response:J,uploadStartTime:b,artwork:R||J,uploadUuid:j,success:!1})):(X="Upload error",(0,k.W)({error_message:K.message,error:J.error,handledError:Z,uploadError:X,errorResponse:J,status:null==K||null==(ee=K.response)?void 0:ee.status})),er={pageValue:"pdp",businessLine:this.businessLine},(0,A.IY)(er,r.file,K),en=null!=(Y=null==J?void 0:J.error_code)?Y:(0,ea.O)(K)?"rate_limited":null,-1!==(ei=this.findJiffyFirstRowIndexByFile(r.file))&&this.writeArtworkValuesAtLocatedIndex({index:ei,uploadError:X,uploadErrorCode:en}),V(),[2];return O<x?(this.setIsRetrying(!0),es=et.eO[O],O+=1,(0,C.Py)("image_upload_retry",{}),t=es,H=!0):((0,C.Py)("image_upload_retries_failed",{}),ec=(0,A.bC)(K),eu=_object_spread_props(_object_spread({},(0,A.Kr)("pdp",r.file,K)),{upload_uuid:j,business_line:this.businessLine,page:"pdp",log_id:ec}),(0,C.Py)("image_upload_network_error",eu),(0,E.xm)({legacyEvent:"image_upload_network_error",errorContext:eu,file:r.file,pageInfo:{pageValue:"pdp",businessLine:this.businessLine}}),(0,F.qw)({status:"failed",file_name:eu.file_name,file_type:eu.file_type,file_size:eu.file_size,dpi:eu.d
1pi,location:eu.page,business_line:eu.business_line,pre_cut_transfers:this.preCut}),-1!==(ed=this.findJiffyFirstRowIndexByFile(r.file))&&this.writeArtworkValuesAtLocatedIndex({index:ed,retryFailed:!0,isLoading:!0}),V(),null==(el=this.fetchController)||el.abort(),this.setFetchController(null)),[3,8];case 7:return H||V(),window.removeEventListener("online",I),window.removeEventListener("offline",I),[7];case 8:if(void 0===t)return[3,11];return ef=t,[4,new Promise(function(e){setTimeout(e,ef)})];case 9:if(eb.sent(),e_=this.artworksState,eh=r.file,(null==(ep=e_[em=P])?void 0:ep.file)!==eh&&(em=e_.findIndex(function(e){return e.file===eh})),eg=e_[em],-1===em||!(null==eg?void 0:eg.pendingSeedCtx)&&!(null==eg?void 0:eg.retryFailed))return(-1===em||(null==eg?void 0:eg.id)==null||U())&&V(),[2];return[4,N()];case 10:eb.sent(),eb.label=11;case 11:return[2]}})}).call(t)})()];case 2:return D.sent(),[2]}})}).apply(this,arguments)},downloadAndTriggerArtworkUploadFlow:function(e){var t=this;e.forEach(function(e,r){fetch((0,P.Rr)(e.originalImageUrl)).then(function(e){if(!e.ok)throw Error("Design Library fetch ".concat(e.status));return e.blob()}).then(function(n){var o=(0,d.bx)(n.type,e.originalMimeType),i=new File([n],(0,d.pL)(e.name,o),{type:o});t.addFilesToQueue({files:[i],artworkIndex:r,existingArtworkId:e.id})}).catch(function(r){(0,S.notifyError)("Design Library import failed",{params:{artwork_id:e.id,original_image_url:e.originalImageUrl,error:_instanceof(r,Error)?r.message:String(r)}});var n=t.artworksState.findIndex(function(t){return String(t.id)===String(e.id)});n>=0?t.setFailedUploadArtwork({index:n,artworkId:e.id,uploadError:"Upload error"}):t.artworksState=_to_consumable_array(t.artworksState).concat([_object_spread_props(_object_spread({},eN),{id:e.id,name:e.name,isLoading:!1,uploadError:"Upload error",originalIndex:t.artworksState.length})])})})},handleProcessError:function(e){var t=e.file,r=e.errorResponse;if(r.error&&!r.success){if(["backend_file_validation","backend_processing_error"].includes(r.error_type))i=r.error;else{var n,o,i="Processing error";(0,j.R)({message:null!=(o=r.message)?o:r.error,type:r.error_type,status:r.status})||(0,S.notifyError)("Upload artwork error",{params:{error_message:r.message,error:r.error,error_response:r,uploadError:i}})}var l={pageValue:"pdp",businessLine:this.businessLine};(0,A.IY)(l,t,{response:{data:r}}),this.setFailedUploadArtwork({index:t.originalIndex,uploadError:i,uploadErrorCode:null!=(n=null==r?void 0:r.error_code)?n:null})}},updateArtworkContent:function(e){return _async_to_generator(function(e){var t;return _ts_generator(this,function(r){return t=e.data,this.getArtworksPricing(),this.updatePdpDates(),this.updateArtworkValuesById(t),[2]})}).apply(this,arguments)},getSimulationPricing:function(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c,u=arguments;return _ts_generator(this,function(d){switch(d.label){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:{},t=this,r=t.productId,n=t.preCut,o=t.showMultiSize,i={artwork_id:"simulation",width:Number(e.width)||1,height:Number(e.height)||1,enhancement_tier:this.simulation.enhancementTier||"full_enhancements"},[4,W.api.dtf.dtfPricing({product:r},_object_spread({artworks:[i],pre_cut:n},this.isJiffyMade?{request_source:"jiffy_made"}:{}))];case 1:return l=d.sent(),c=(0,y.Tm)({order_subtotal:l.order_subtotal,user_store_credits:l.user_specific_store_credits,expected_credits:l.expected_transfers_store_credit,transfers_cart_subtotal:l.transfers_cart_subtotal,tiers:l.transfers_store_credit_tiers,earn_sunset:l.transfers_loyalty_earn_sunset,jiffy_credit_live:l.jiffy_credit_live}),this.setStoreCreditInfo(c),Q.EventBus.publish(Q.Events.PRICING_UPDATED,c),this.setSimulationPricing({artworks:l.artworks,isMultiSize:o}),[2]}})}).apply(this,arguments)},getArtworksPricing:function(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,j;return _ts_generator(this,function(k){switch(k.label){case 0:if(e=this,n=this,o=n.artworks,i=n.productId,l=n.preCut,c=n.isJerseyNumbers,u=n.isLetters,d=n.showMultiSize,p=o,f=[],d?p.forEach(function(t){return t.sizesAndQuantities.filter(function(e){return Number(e.quantity)>0}
1).forEach(function(r){var n={artwork_id:"".concat(t.id,"--").concat(r.id),width:Number(r.width)||1,height:Number(r.height)||1,quantity:Number(r.quantity),enhancement_tier:t.enhancementTier||"full_enhancements",has_expert_edit_addon:t.hasExpertEditAddon||!1};e.isStandardDTFProduct&&!e.isJiffyMade&&(n.enhancement_request_note=t.enhancementNote||""),f.push(n)})}):f=this.isJiffyMade?p.filter(function(e){return!e.isSimulated}).map(function(e){return{artwork_id:e.id,width:Number(e.width)||1,height:Number(e.height)||1,quantity:Number(e.quantity),enhancement_tier:e.enhancementTier||"full_enhancements",has_expert_edit_addon:e.hasExpertEditAddon||!1}}):(c||u?this.letterNumberArtworks:p).map(function(t){var r={artwork_id:t.id||"simulation",width:Number(t.width)||1,height:Number(t.height)||1,quantity:Number(t.quantity),enhancement_tier:t.enhancementTier||"full_enhancements",has_expert_edit_addon:t.hasExpertEditAddon||!1};return e.isStandardDTFProduct&&!e.isJiffyMade&&(r.enhancement_request_note=t.enhancementNote||""),r}),!f.length)return[2];this.setIsPricingLoading(!0),null==(t=this.updatePricingAbortSignal)||t.abort(),this.updatePricingAbortSignal=new AbortController,h=this.updatePricingAbortSignal.signal,k.label=1;case 1:return k.trys.push([1,3,,4]),[4,(0,R.gf)(function(){return W.api.dtf.dtfPricing({product:i},_object_spread({artworks:f,pre_cut:l},e.isJiffyMade?{request_source:"jiffy_made"}:{}),{useAxiosForRequest:!0,signal:h})})];case 2:return _=k.sent(),[3,4];case 3:if(m=k.sent(),v=(null==(g=this.updatePricingAbortSignal)?void 0:g.signal)===h,!(0,M._n)(m)||(w=(null==m||null==(b=m.response)?void 0:b.status)||(null==m?void 0:m.status))&&[401,403,422].includes(w))return v&&this.setIsPricingLoading(!1),[2];return v&&this.setIsPricingLoading(!1),(0,S.notifyError)("Error fetching artworks pricing",{params:{error_message:m.message,product_id:i,pre_cut:l,is_jiffy_made:this.isJiffyMade,artworks:f,show_multi_size:d}}),[2];case 4:if((null==(r=this.updatePricingAbortSignal)?void 0:r.signal)!==h)return[2];return d&&(_=_object_spread_props(_object_spread({},_),{artworks:(0,ee.WU)(_.artworks,"--")})),j=(0,y.Tm)({order_subtotal:_.order_subtotal,user_store_credits:_.user_specific_store_credits,expected_credits:_.expected_transfers_store_credit,transfers_cart_subtotal:_.transfers_cart_subtotal,tiers:_.transfers_store_credit_tiers,earn_sunset:_.transfers_loyalty_earn_sunset,jiffy_credit_live:_.jiffy_credit_live}),this.setStoreCreditInfo(j),this.setArtworkPricing({response:_,isMultiSize:d}),Q.EventBus.publish(Q.Events.PRICING_UPDATED,j),[2]}})}).call(this)},initDefaultValues:function(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,j,k,x=arguments;return _ts_generator(this,function(S){switch(S.label){case 0:if(e=this,r=void 0!==(t=(x.length>0&&void 0!==x[0]?x[0]:{}).skipDeliveryDateLoading)&&t,this.subscribeJiffyFirstProcolorOptOut(),n=this,o=n.initialValues,i=n.isJerseyNumbers,l=n.isLetters,c=n.variantId,u=n.catalogNumber,!(d=n.loadFromConfig)&&!i&&!l)return[2];S.label=1;case 1:return S.trys.push([1,3,,4]),[4,W.api.dtf.getInitConfig({catalog_number:u})];case 2:if(f=S.sent(),!(p=(0,y.Tm)(f)).success)throw Error(p.error);return[3,4];case 3:return _=S.sent(),this.handleInitError(_,"fetch_init_config"),[2];case 4:h=p.applyDefaultValues,m=p.preCut,g=p.dtfChannelUuid,b=p.messagingConsents,S.label=5;case 5:if(S.trys.push([5,9,,10]),v=_object_spread_props(_object_spread({},o),{variant_id:c,artwork_id:"simulation"}),!d&&(i||l))return l&&this.generateLettersPreview(!0),(0,q.VZ)([v],m,{refreshDtf:function(){return e.updatePdpDates()},readDtfConfig:function(){return e.readJiffyFirstPdpDatesConfig()}}),[2];if(this.isEnhancementLoading||(this.setDtfChannelUuid(g),w=(0,es.A)(this),this.setCable(w)),b&&this.setMessagingConsents(b),!h)return[3,7];return this.setPreCut(m),this.setEnablePreCut(),r||this.isGangSheetBuilder||(0,q.VZ)([v],m,{refreshDtf:function(){return e.updatePdpDates()},readDtfConfig:function(){return e.readJiffyFirstPdpDatesConfig()}}),(j=structuredClone(o)).enhancementTier=this.simulation.enhancementTier,[4,this.get
1SimulationPricing(j)];case 6:return S.sent(),(i||l)&&(j.height=null),this.updateArtworkValues(j),[3,8];case 7:this.updatePdpDates(),S.label=8;case 8:return this.setUseDefaultValues(h),[3,10];case 9:return k=S.sent(),this.handleInitError(k,"process_init_config"),[3,10];case 10:return[2]}})}).apply(this,arguments)},handleInitError:function(e,t){if("Unable to connect to server"===e.message)return void this.setShowNetworkError();if((0,x.Ay)(e)){var r,n,o={};Object.getOwnPropertyNames(e).forEach(function(t){o[t]=e[t]}),(0,S.notifyError)("Could not get dtf init meta",{params:_object_spread_props(_object_spread({},o),{operation:t,catalog_number:this.catalogNumber,load_from_config:this.loadFromConfig,url:null==(n=window)||null==(r=n.location)?void 0:r.href})})}},updatePreCut:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return this.setPreCut(e),this.getArtworksPricing(),this.updatePdpDates(),[2]})}).call(this)},trackArtworkAddToCart:function(e){return _async_to_generator(function(){var t,r,n,o,i,l,c,u,d,p,f,h,m,g,b,y,v;return _ts_generator(this,function(w){switch(w.label){case 0:return n=this,o=n.formArtworks,i=n.variantId,l=n.catalogNumber,c=n.businessLine,u=n.isStandardArtwork,d=this.artworks.find(function(t){return t.id===e.artwork_id}),[4,(0,_.Ay)(i)];case 1:return p=w.sent(),f=e.metadata,h=e.borneo_metadata,m={brand:p.product.brand,product_category:p.product.adwords_category,product:p.product.name,spree_composition_id:p.compositionId,composition:p.color,fulfillment_group:p.fulfillmentGroup||"",sku:p.sku,quantity:e.quantity,buy_it_again:(0,ee.U0)(),favorite:p.favorite,softness_score:p.softnessScore,dtf_width:e.width,dtf_height:e.height,dtf_area:e.width*e.height,from_dam:e.from_dam,multi_artwork:o.length>1,dtf_image_souce:f.imageSource,business_line:c,pre_cut:this.preCut,background_removed:f.removeBackground,background_color:e.bg_color,border_size:e.padding_size,shape:e.shape,redraw_requested:e.enhancement_request_note||(null==d?void 0:d.pinningSummary),multi_size:(null==(t=e.sizes_and_quantities)?void 0:t.length)>1,enhancement_tier:e.enhancement_tier,catalog_number:p.product.catalog_number},u&&(m.enhance_image=e.enhanceImage),["SPNG-HGR001","SPNG-GLS001","SPNG-RNB001"].includes(l)&&(m.dtf_spangles_algorithm=ep.DE.selectedAlgorithm,m.artwork_url=ep.DE.originalArtworkUrl),this.isPuff&&(m.color=e.color),"borneo"===f.imageSource&&(m.dtf_borneo_fonts_count=(null==(g=h.fonts.fonts)?void 0:g.length)||0,m.dtf_borneo_font_details=h.fonts.font_details,m.dtf_borneo_non_unique_fonts=(y=(null==(b=h.fonts)?void 0:b.font_details).reduce(function(e,t){var r;return t.font_family&&e.fontFamilies.push(t.font_family),(null==(r=t.text_effect)?void 0:r.name)&&e.textEffects.push(t.text_effect.name),e},{fontFamilies:[],textEffects:[]})).fontFamilies,m.dtf_borneo_fonts=_to_consumable_array(new Set(y.fontFamilies)),m.dtf_borneo_non_unique_effects=y.textEffects,m.dtf_borneo_effects=_to_consumable_array(new Set(y.textEffects)),m.dtf_borneo_images_count=h.images.total_images,m.dtf_borneo_texts_count=h.fonts.total_texts,m.dtf_borneo_shapes_count=h.elements.total_shapes,m.dtf_borneo_enhancements=h.enhancements,m.dtf_borneo_project_id=e.project_id),(this.isJerseyNumbers||this.isLetters)&&(v={style:e.style,height:e.height,color:e.color},this.isLetters&&(v.font=e.font,v.texts=e.texts.filter(Boolean),v.max_length=e.maxLength),this.isJerseyNumbers&&Object.keys(e.quantities).length&&Object.keys(e.quantities).forEach(function(t){v["number_".concat(t)]=e.quantities[t]}),m.item_details=v),e.from_gang_sheet_builder&&(m.gang_sheet_builder_variant=e.catalog_number),this.showMultiSize&&(null==(r=e.sizes_and_quantities)?void 0:r.length)>1?((0,C.Py)("multiple_sizes_added",{number_of_sizes:e.sizes_and_quantities.length,brand:p.product.brand,product_category:p.product.adwords_category,product:p.product.name,spree_composition_id:p.compositionId,composition:p.color}),e.sizes_and_quantities.forEach(function(e){(0,C.Py)("product_added",_object_spread_props(_object_spread({},m),{dtf_width:e.width,dtf_height:e.height,dtf_area:e.width*e.height,quantity:e.quantity,predefined_placement:e.preset,placement_size:e.size}))})):(m.predefined_placement="custom",(0,C.Py)("product_added",m)),[2]}})}).call(this)},buildReorderDtfData:function(e,t){var r=this,n="en-CA"===this.locale?"C$":"$";return e.map(function(e){var o=e.id,i=e.dtfPrintId,l=e.url,c=e.metadata;return{id:o,catalogNumber:"Jiffy Transfers",productId:r.productId,variantId:r.variantId,color:"",image:l,quantity:t[i].quantity,size:"".concat(c.widthInch,'" x ').concat(c.heightInch).concat(r.printAsIs?"'":'"'),price:"".concat(n).concat(Number(t[i].price).toFixed(2)),preCut:!1,preCutPrice:0}})},submitPrintReorder:function(e){return _async_to_generator(function(){var t,r,n,o,i,l,c,u,d,p;return _ts_generator(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,W.api.dtf.addToCartPrint({variant_id:this.variantId,quantity:1,dtf_print_ids:e.map(function(e){return e.dtfPrintId}),source_page:"design_library"})];case 1:return n=f.sent(),o=this.buildReorderDtfData(e,n.artwork_prices),(0,H.NQ)(e.length),this.lastSubmittedPdpDatesPayload={filledArtworks:e.map(function(e){var t,r=e.id,o=e.dtfPrintId,i=e.metadata;return{artwork_id:r,quantity:null==(t=n.artwork_prices[o])?void 0:t.quantity,width:i.widthInch,height:i.heightInch}}),preCut:!1,designServicesEnabled:!1,pdpSubtotal:null==(t=this.summary)?void 0:t.orderSubtotal,variantsHash:_define_property({},String(this.variantId),o.reduce(function(e,t){return e+Number(t.quantity||0)},0))},Q.EventBus.publish(Q.Events.MOBILE_GRID_SUBMIT,{dtfData:o}),Q.EventBus.publish(Q.Events.ITEMS_ADDED_TO_CART,_object_spread_props(_object_spread({},n),{is_dtf:!0,popup_added_variants:this.lastSubmittedPdpDatesPayload.variantsHash})),q.uR.reloadDeliveryEstimatesWithoutFetch({pdpSubtotal:null==(r=this.summary)?void 0:r.orderSubtotal}),[3,3];case 2:if(i=f.sent(),(0,b.aE)(i))return(0,h.SE)("/login"),[2];return c=(l=getStructuredErrorContext(i)).errorMessage,u=l.errorType,d=l.httpStatus,p=l.responseData,(0,j.R)({message:c,type:u,status:d})||(0,S.notifyError)("Error adding to cart",{params:{error_message:c,error_type:u,error_status:d,response_data:p}}),[3,3];case 3:return[2]}})}).call(this)},submitForm:function(){var e=this;if(!this.isSubmitting){var t=(0,ee.PL)(),r=(0,ee.oU)(this.formArtworks);(0,C.Py)("dtf_add_to_cart_clicked",_object_spread_props(_object_spread({},t,r),{variant_id:this.variantId,quantity:this.totalQuantity,artwork_count:Object.values(this.formArtworks).length,pre_cut:this.preCut,multi_size:this.showMultiSize}));var n=this.formArtworks,i=this.preCut,l=this.isReadyForOrder,d=Object.values(n),p=!1;if(d.find(function(e){return!e.quantity}),p=this.showMultiSize?d.find(function(e){var t;return null==(t=e.sizes_and_quantities)?void 0:t.find(function(e){return!e.quantity})}):d.find(function(e){return!e.quantity}),l){if(!d.length||p)return void eD.show({hasFormErrors:!0});var f=_object_spread_props(_object_spread({},t),{artworks:n,pre_cut:i});D.A.mq.publish("feedback",{type:"vibration"}),this.isSubmitting=!0;var _=_define_property({},String(this.variantId),Number(this.totalQuantity)),submitAddToCart=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=!1;W.api.dtf.addToCart(_object_spread_props(_object_spread({},f),{dtf_retry_attempt:t})).then(function(t){if(t.success){(0,H.NQ)(e.totalQuantity),Q.EventBus.publish(Q.Events.ITEMS_ADDED_TO_CART,_object_spread_props(_object_spread({},t),{is_dtf:!0,popup_added_variants:_}));try{(0,C.Py)("add_to_cart_success_displayed",{quantity:e.totalQuantity,cart_total:t.cart_total})}catch(e){}n.forEach(function(t){return _async_to_generator(function(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,this.trackArtworkAddToCart(t)];case 1:return[2,e.sent()]}})}).call(e)}),(0,el.Ml)(e.totalQuantity,t.cart_total);try{(0,w.A)("DesignCompleted",{event_id:"DC-".concat((0,U.l)()),product_id:e.productId})}catch(e){}e.lastSubmittedPdpDatesPayload=e.buildCurrentPdpDatesPayload(),e.clearWorkspace(),e.resetPuff();return}throw Error("Add To Cart response is not successful")}).catch(function(e){if($("#continue-shopping-modal").modal("hide"),(0,b.aE)(e))return void(0,h.SE)("/login");var n,i=(0,c.fj)(e);
1if(!(r=(0,c.xj)(i,t,function(e){return setTimeout(function(){return submitAddToCart(t+1)},e)}))){var l=null!=(n=(0,o.F)(i))?n:"Items were not added. Please try again.";$("#adding-failure").modal("show"),$("#adding-failure").find("#adding-failure-error").text(l);var d=(0,u.z)(i);d&&(0,C.Py)(u.l,d),(void 0===i?"undefined":_type_of(i))!=="object"&&(0,S.notifyError)("Add to cart error",{params:{error_message:e.message}}),(0,C.Py)("add_to_cart_error",{error:e.message})}}).finally(function(){r||(e.isSubmitting=!1)})};this.showModal&&this.hideModal(),Q.EventBus.publish(Q.Events.MOBILE_GRID_SUBMIT,{dtfData:this.showMultiSize?this.csmDataMultiSize:this.csmData}),submitAddToCart()}}},buildCurrentPdpDatesPayload:function(){var e,t=this.formArtworks,r=this.preCut,n=this.isJerseyNumbers,o=this.isLetters,i=this.showMultiSize,l=this.artworks,c=[];i?t.forEach(function(e){e.sizes_and_quantities.filter(function(e){return!!e.quantity}).forEach(function(t,r){c.push(_object_spread({artwork_id:"".concat(e.artwork_id,"-").concat(r),dtf_artwork_id:e.artwork_id},t))})}):c=n||o?this.letterNumberArtworks:t.filter(function(e){return!!e.quantity});var u=l.some(function(e){var t;return e.hasExpertEditAddon&&(null==(t=e.enhancementNote)?void 0:t.trim())});return{filledArtworks:c,preCut:r,designServicesEnabled:u,pdpSubtotal:null==(e=this.summary)?void 0:e.orderSubtotal,variantsHash:this.isGangSheetBuilder?filmVariantsHash(this.gangSheetBuilderSettings):(0,q.cw)()}},updatePdpDates:function(){var e=this;eA+=1;var t=this.buildCurrentPdpDatesPayload(),r=t.filledArtworks,n=t.preCut,o=t.designServicesEnabled,i=t.pdpSubtotal,l=t.variantsHash;return(0,q.VZ)(r,n,_object_spread_props(_object_spread({designServicesEnabled:o},this.isGangSheetBuilder?{variantsHash:l}:{}),{refreshDtf:function(){return e.updatePdpDates()},readDtfConfig:function(){return e.readJiffyFirstPdpDatesConfig()},pdpSubtotal:i}))},refreshPdpDatesForCutoffWatch:function(){var e=this;if(this.artworksState.length||!this.lastSubmittedPdpDatesPayload)return this.updatePdpDates();var t=this.lastSubmittedPdpDatesPayload,r=t.filledArtworks,n=t.preCut,o=t.designServicesEnabled,i=t.pdpSubtotal,l=t.variantsHash;return(0,q.VZ)(r,n,{designServicesEnabled:o,pdpSubtotal:i,variantsHash:l,refreshDtf:function(){return e.updatePdpDates()},readDtfConfig:function(){return e.artworksState.length||e.lastSubmittedPdpDatesPayload!==t?e.readJiffyFirstPdpDatesConfig():_object_spread_props(_object_spread({},t),{uploadPending:e.readJiffyFirstUploadPending()})}})},readJiffyFirstPdpDatesConfig:function(){return _object_spread_props(_object_spread({},this.buildCurrentPdpDatesPayload()),{uploadPending:this.readJiffyFirstUploadPending()})},readJiffyFirstUploadPending:function(){var e=this.hasPendingUpload();return e&&setJiffyFirstUploadWasPending(!0),e},hasPendingUpload:function(){return this.artworksState.some(function(e){if(null!=e.id&&(null==(t=ek.get(jiff
1yFirstArtworkKey(e.id)))?void 0:t.withdrawn)===!0)return!0;var t,r=asFileKey(e.file);return!0===e.isFile&&null!==r&&!ew.has(r)&&(!e.retryFailed&&!e.uploadError||ev.has(r))})},findJiffyFirstRowIndexByFile:function(e){var t=this.artworksState,r=t.findIndex(function(t){return t.file===e&&isUploadingRow(t)});return -1!==r?r:t.findIndex(function(t){return t.file===e})},isJiffyFirstUploadOver:function(e){var t=this.artworksState[this.findJiffyFirstRowIndexByFile(e.file)];return!!(!t||t.retryFailed||this.discarded&&e.uploadedTimeStamp<this.discarded)},settleJiffyFirstUploadPending:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.deferReask,r=e.registered,n=void 0!==r&&r;if(this.armJiffyFirstProcessingOnPage(),n&&!eg)return this.hasPendingUpload()?void this.reaskForJiffyFirstInputChange():((0,q.fJ)(),(0,q.Qc)(),void this.scheduleJiffyFirstReask({afterRender:!0}));if(n&&(eP=!0),!(!eg||this.hasPendingUpload())){setJiffyFirstUploadWasPending(!1),ek.forEach(function(e,t){e.withdrawn&&(clearTimeout(e.deadline),ek.delete(t),eS.delete(t),eO.delete(t))}),(0,q.fJ)({withdraw:!1});var o=(0,q.Qc)()||eP;eP=!1,o&&(void 0!==t&&t?this.scheduleJiffyFirstReask():n?this.scheduleJiffyFirstReask({afterRender:!0}):this.updatePdpDates())}},scheduleJiffyFirstReask:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.afterRender,n=eA,reaskUnlessAsked=function(){eA===n&&e.updatePdpDates()};void 0!==r&&r?setTimeout(reaskUnlessAsked,0):queueMicrotask(reaskUnlessAsked)},beginJiffyFirstArtworkProcessing:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.renewsRestamp;if(null!=e){var o=jiffyFirstArtworkKey(e),i=ek.get(o);i&&clearTimeout(i.deadline);var l=setTimeout(function(){return t.endJiffyFirstArtworkProcessing(o,{provisional:!0})},et.KF);i?i.deadline=l:(i={deadline:l,withdrawn:!1},ek.set(o,i)),ex.delete(o),void 0!==n&&n&&eS.has(o)&&eO.add(o),this.armJiffyFirstProcessingOnPage()}}
1,markJiffyFirstArtworkRestamped:function(e){if(null!=e){var t=jiffyFirstArtworkKey(e);eS.add(t),eO.delete(t)}},endStaleJiffyFirstArtworkProcessing:function(e){null==e||eO.has(jiffyFirstArtworkKey(e))||this.endJiffyFirstArtworkProcessing(e,{provisional:!0})},armJiffyFirstProcessingOnPage:function(){var e=this,t=!1;ek.forEach(function(r,n){!r.withdrawn&&e.isJiffyFirstArtworkOnPage(n)&&(r.withdrawn=!0,t=!0)}),t&&((0,q.fJ)(),setJiffyFirstUploadWasPending(!0))},endJiffyFirstArtworkProcessing:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.provisional,n=void 0!==r&&r;if(null!=e){var o=jiffyFirstArtworkKey(e);eS.delete(o),eO.delete(o);var i=ek.get(o);if(!i){!n&&ex.delete(o)&&this.isJiffyFirstArtworkOnPage(o)&&this.reaskForJiffyFirstInputChange();return}if(clearTimeout(i.deadline),ek.delete(o),i.withdrawn){var l=this.isJiffyFirstArtworkOnPage(o);n&&l&&ex.add(o),eg&&l&&(eP=!0),this.settleJiffyFirstUploadPending()}}},isJiffyFirstArtworkOnPage:function(e){return this.artworksState.some(function(t){return null!=t.id&&jiffyFirstArtworkKey(t.id)===e})},isJiffyFirstArtworkProcessing:function(e){return null!=e&&ek.has(jiffyFirstArtworkKey(e))},noteArtworkProcolorRoutable:function(e,t){var r=String(e),n=eb.get(r);if(void 0===n){var o,i=this.artworksState.find(function(e){return String(e.id)===r});if((null==i?void 0:i.isFile)===!0)return void eb.set(r,t);n=null!=(o=procolorRoutableOf(i))&&o}eb.set(r,t),n!==t&&(ex.delete(jiffyFirstArtworkKey(e)),this.reaskForJiffyFirstInputChange())},reaskForJiffyFirstInputChange:function(){if((0,q.fJ)(),this.hasPendingUpload()){setJiffyFirstUploadWasPending(!0),eP=!0;return}(0,q.Qc)(),this.updatePdpDates()},observeFetchedArtworkProcolorRoutable:function(e,t){var r=procolorRoutableOf(t);if(void 0!==r){var n=String(e),o=this.artworksState.find(function(e){return String(e.id)===n});if(!eb.has(n)&&void 0===procolorRoutableOf(o))return void eb.set(n,r);this.noteArtworkProcolorRoutable(e,r)}},subscribeJiffyFirstProcolorOptOut:function(){var e=this;ey||(ey=!0,(0,V.F3)(function(){return e.reaskForJiffyFirstInputChange()}))},clearLastSubmittedPdpDatesPayload:function(){this.lastSubmittedPdpDatesPayload=null},updateArtworkStyle:function(e){var t=e.id,r=e.isBgRemoved;this.toggleLoading(["removeBg",!0]);try{var n,o,i=this.artworks,l=this.isSpangle,c=i.find(function(e){return String(t)===String(e.id)});if(!c)return void(0,S.notifyError)("updateArtworkStyle: artwork not found",{context:{id:t}});var u=r?c.metadata:c.withBgMetadata,d=r?c.noBgUrl:c.withBgUrl,p=u.widthInch,f=u.heightInch;c.enhanceImage&&(p=(null==(n=c.withBgMetadata)?void 0:n.originalWidthInch)||p,f=(null==(o=c.withBgMetadata)?void 0:o.originalHeightInch)||f),this.updateArtworkValuesById({id:t,isLoading:!1,removeBackground:r,width:u.widthInch,height:u.heightInch,originalWidth:p,originalHeight:f,errorMessage:null,toggleBackgroun
1dError:null,originalDpi:300,url:d}),l&&ep.DE.setOriginalArtworkUrl(d)}finally{this.toggleLoading(["removeBg",!1])}},sendUpdateArtworkStyle:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,j,k,x;return _ts_generator(this,function(S){switch(S.label){case 0:t=e.id,r=e.isBgRemoved,o=void 0!==(n=e.updateMetadataCache)&&n,l=void 0===(i=e.shape)?null:i,u=void 0!==(c=e.forceBgRemoval)&&c,S.label=1;case 1:return S.trys.push([1,3,4,5]),d=this.artworks.find(function(e){return String(e.id)===String(t)})||{},this.toggleLoading(["removeBg",!0]),this.updateArtworkValuesById({id:t,processingImage:!0}),p=this.isSticker||this.isStickerSample,[4,W.api.dtf.updateArtworkStyle({id:t},{remove:r,catalog_number:this.catalogNumber,enhancement_tier:d.enhancementTier,options:{padding_size:d.paddingSize,shape:d.shape,force_bg_removal:u}},{raw:!0,useAxiosForRequest:!0,headers:{"Content-Type":void 0}})];case 2:return f=S.sent(),_={},p?(m=(h=(0,y.Tm)(f)).metadata,g=h.stickerCutlineWithBgUrl,b=h.stickerCutlineNoBgUrl,v=h.stickerCutlineWithBgRatio,_={metadata:m,stickerCutlineWithBgUrl:g,stickerCutlineNoBgUrl:b,stickerCutlineWithBgRatio:v,noBgUrl:h.noBgUrl,withBgUrl:h.withBgUrl},o&&l&&(w=this.isStickerSample?{width:m.widthInch,height:m.heightInch}:(0,L.b)(m.widthInch,m.heightInch),_=_object_spread({},_,w))):(_.url=f.remove_background?f.url:f.with_bg_url,_.withBgMetadata=f.with_bg_metadata),this.updateArtworkValuesById(_object_spread({id:t,processingImage:!1},_)),this.getArtworksPricing(),this.updatePdpDates(),[3,5];case 3:return x=(null==(j=S.sent())||null==(k=j.response)?void 0:k.data)||{error:"Something went wrong. Please, try again!"},this.artworks.some(function(e){return String(e.id)===String(t)})&&this.updateArtworkStyle({id:t,isBgRemoved:!r}
1),this.updateArtworkValuesById({id:t,toggleBackgroundError:x.error,processingImage:!1}),[3,5];case 4:return this.toggleLoading(["removeBg",!1]),this.updateArtworkValuesById({id:t,processingImage:!1}),[7];case 5:return[2]}})}).apply(this,arguments)},buyArtworksAgainFromOrder:function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,W.api.dtf.getArtworksFromOrder({order_number:e})];case 1:return t=r.sent(),this.downloadAndTriggerArtworkUploadFlow(t.map(function(e){return{id:e.id,name:e.name,originalImageUrl:e.url,originalMimeType:e.filetype}})),[2]}})}).call(this)},buySpangleAgain:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_;return _ts_generator(this,function(h){switch(h.label){case 0:return t=e.spangledArtwork,r=this,n=r.catalogNumber,o=r.dtfChannelUuid,i=ep.o3.store,l=t.spangled?"min":"all",[4,W.api.dtf.getArtwork({id:t.id},{catalog_number:n,dtf_channel_uuid:o,spangle_duplicate_action:l,upload_source:"transfers"})];case 1:return c=h.sent(),u=(0,y.Tm)(_object_spread_props(_object_spread({},t,c),{success:!0})),t.spangled?this.setLoadedArtwork({artwork:u,index:0}):(this.setEmptyArtwork(null),this.updateArtworkValues(_object_spread_props(_object_spread({index:0},u),{isLoading:!0,isFile:!1,removeBackground:u.metadata.removeBackground,width:u.metadata.widthInch,height:u.metadata.heightInch,originalWidth:u.metadata.widthInch,originalHeight:u.metadata.heightInch,lengthFoot:u.metadata.lengthFoot}))),t.spangled&&(i.setIsSpangleReordering(!0),d={algorithm:"reorder",imageUrl:t.spangledImageUrl||c.url,spangleCsv:c.spangle_csv,spanglePagesInfo:c.metadata.spangle_pages_info,positionsJson:c.spangle_positions_json,isLoading:!1,error:!1},i.setSpangleVariations([_object_spread({},d)]),i.selectVersion({version:_object_spread({},d)})),i.setOriginalArtworkUrl(c.url),p=t.width,f=t.height,"all"===l&&(p=c.metadata.width_inch,f=c.metadata.height_inch),i.setLastSpangledDimensions({width:p,height:f}),_=t.spangled?ep.EO.sizeEdited:ep.EO.spangleIt,i.setSpangleMode(_),[2]}})}).apply(this,arguments)},generateSpangleImage:function(e){var t=e.artwork;ep.o3.store.prepareVariations({isRetry:!1}),this.updateArtworkValuesById({id:t.id,progress:100}),W.api.dtf.generateSpangleImage({id:t.id},{product_id:this.productId,dtf_channel_uuid:this.dtfChannelUuid,width_inch:t.width,height_inch:t.height,process_time_stamp:t.processTimeStamp})},buyArtworksAgain:function(e,t){return _async_to_generator(function(){var r,n,o,i,l,c,u;return _ts_generator(this,function(d){switch(d.label){case 0:if(r=this,n=this,i="simulation"===(o=n.artworks)[0].id?0:o.length,this.isJiffyMade&&(i=t),l=e.map(function(e){return _object_spread_props(_object_spread({},eN),{id:r.isJiffyMade?"".concat(e.id,"-").concat(i):e.id,name:e.name,url:e.url,metadata:e.metadata,width:e.metadata.widthInch,height:e.metadata.heightInch,lengthFoot:e.metadata.lengthFoot,quantity:r.initialValues.quantity,originalMime:e.originalMime,progress:100,curProgress:100,isFile:!1,success:!0,isLoading:!0,pricing:r.cachedArtworkPrices[eN.enhancementTier]||{},enhancementCompleted:e.enhancementCompleted,enhanceImage:e.enhanceImage,enhancedNoBgUrl:e.enhancedNoBgUrl,enhancedWithBgUrl:e.enhancedWithBgUrl,originalImageUrl:e.originalImageUrl,sliderPreviewUrl:e.sliderPreviewUrl,spangled:e.spangled,spangledImageUrl:e.spangledImageUrl,cutlineUrl:e.cutlineUrl,cmykOriginalImageUrl:e.cmykOriginalImageUrl,goildFoilPreviewAttached:e.goildFoilPreviewAttached,originalMetadata:e.originalMetadata,enhancedMetadata:e.enhancedMetadata,withBgMetadata:e.withBgMetadata,previewMetadata:e.previewMetadata,originalDpi:e.originalDpi,enhancedDpi:e.enhancedDpi,enhancedOriginalDpi:e.enhancedOriginalDpi,originalWidth:e.originalWidth,originalHeight:e.originalHeight,sizeBasedDpi:e.sizeBasedDpi,canRemoveBg:e.canRemoveBg,processTimeStamp:e.processTimeStamp,manualEditUrl:e.manualEditUrl||null,manualEditNoTrimUrl:e.manualEditNoTrimUrl||null,editImageManual:e.editImageManual||!1,pinningSessionId:e.pinningSessionId||null})}),!this.isSpangle)return[3,2];return[4,this.buySpangleAgain({spangledArtwork:l[0]})];case 1:return d.sent(),[3,4];case 2:return c=i,[4,Promise.all(l.map(function(e){return _async_to_generator(function(){var r,n,i,l,u,d,p,f,_,h,m,g,b,v,w;return _ts_generator(this,function(j){switch(j.label){case 0:if(r=this.artworks.findIndex(function(t){return String(e.id)===String(t.id)}),this.isJiffyMade&&(r=t),!(-1!==r&&!this.isJiffyMade))return[3,4];j.label=1;case 1:return j.trys.push([1,3,,4]),[4,W.api.dtf.duplicateArtwork({id:e.id},{catalog_number:this.catalogNumber})];case 2:return n=y.Tm.apply(void 0,[j.sent()]),e=_object_spread_props(_object_spread({},e),{id:n.id,name:n.fileName}),r=-1,[3,4];case 3:return i=j.sent(),(0,S.notifyError)(i,{context:{source:"duplicateArtwork",artworkId:e.id}}),[3,4];case 4:if(d=null==(u=null==(l=o[r])?void 0:l.sizesAndQuantities)?void 0:u.findIndex(function(t){return"".concat(t.width).concat(t.height)==="".concat(e.width).concat(e.height)&&"custom"===t.preset}),!(this.isGoldFoil&&!e.goildFoilPreviewAttached&&e.url))return[3,6];
1return[4,(0,ee.ig)(e.url,et.cZ)];case 5:p=j.sent(),e.url=p,j.label=6;case 6:return f=e.width,_=e.height,e.enhanceImage||(f=null==(h=e.originalMetadata)?void 0:h.widthInch,_=null==(m=e.originalMetadata)?void 0:m.heightInch),g=_object_spread_props(_object_spread({},e),{metadata:_object_spread_props(_object_spread({},e.metadata),{widthInch:f,heightInch:_})}),this.showMultiSize?(b=[],v={width:e.width,height:e.height,quantity:e.quantity,preset:"custom",id:(0,ee.r9)()},l?(b=null==l?void 0:l.sizesAndQuantities.map(function(e,t){return _object_spread_props(_object_spread({},e),{quantity:d===t?e.quantity+1:e.quantity})}),l&&-1===d&&b.push(v)):b=[v],g.sizesAndQuantities=b):l&&(g.quantity=l.quantity+1),w=l?r:c,c=l?c:c+1,g.originalIndex=w,this.setLoadedArtwork({artwork:g,isBuyAgain:!0,index:this.isJiffyMade?t:w}),g.enhancementCompleted&&this.updateArtworkValuesById({id:g.id,enhancementCompleted:!0}),[2]}})}).call(r)}))];case 3:d.sent(),this.gangSheetCatalogNumbers.length>0&&this.gangSheetCatalogNumbers.includes(this.catalogNumber)&&l.forEach(function(e){var t=e.metadata||{},n=(0,ee.Ay)(t);if(n.length>0){var o=r.artworks.findIndex(function(t){return String(e.id)===String(t.id)});-1!==o&&r.setGangsheetValidationError({index:o,artwork:{id:e.id,metadata:_object_spread_props(_object_spread({},t),{errors:n})},type:ec.A.INVALID_GANG_SHEET})}}),d.label=4;case 4:return this.artworks.length>1&&this.openModal(),this.isSpangle&&(u=this.artworks[0])&&u.isLoading&&this.generateSpangleImage({artwork:u}),this.getArtworksPricing(),this.updatePdpDates(),[2]}})}).call(this)},loadArtworkAndSetPaddingImage:function(e){return _async_to_generator(function(e){var t,r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:return t=e.id,r=e.paddingSize,[4,W.api.dtf.getArtwork({id:t},{catalog_number:this.catalogNumber,dtf_channel_uuid:this.dtfChannelUuid,process_artwork:"false",file_content_type:null,padding_size:r})];case 1:return o=i.sent(),this.observeFetchedArtworkProcolorRoutable(null!=(n=o.id)?n:t,o),this.updateArtworkValuesById(_object_spread({},o)),[2]}})}).apply(this,arguments)},preloadArtworks:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,b;return _ts_generator(this,function(w){switch(w.label){case 0:return t=this,r=e.artworkIds,n=e.artworkWidth,o=e.artworkHeight,i=e.processArtwork,l=e.urlPreCut,c=e.fileContentType,u=e.artworkPaddingSize,d=e.artworkBgColor,p=e.artworkColor,f=e.artworkShape,(0,g.Yj)("uploaded_artwork_ids"),h="true"===(_=new URLSearchParams(window.location.search)).get("enhancements_started"),m=_.has("dtf_channel_uuid"),h&&m||this.cleanupUrlParameters(),r.length>1&&this.openModal(),"boolean"==typeof(b=(0,O.tryParse)(l))&&(this.setLoadFromConfig(!1),this.setPreCut(b),this.setEnablePreCut()),[4,Promise.all(r.map(function(e){return _async_to_generator(function(){var t,r,l,_,h,m,g,b,w,j,k,x,S,O,P,A,I,E,N,D;return _ts_generator(this,function(T){switch(T.label){case 0:if(t=this,i||this.updateArtworkValuesById({id:e,progress:100}),this.updateArtworkValuesById({id:e,quantity:this.isSticker||this.isPuff||this.isSpangle?this.initialValues.quantity:this.simulation.quantity}),l=(0,v.E)(this.artworks,e),!e)return[3,2];return[4,_async_to_generator(function(){var t,r,n,o,d,p,f,_,h,m;return _ts_generator(this,function(g){switch(g.label){case 0:r=function(r){return _ts_generator(this,function(n){switch(n.label){case 0:return[4,W.api.dtf.getArtwork({id:e},t.sanitizeObject(_))];case 1:if((o=n.sent())&&(!p||o.cutline_url))return[2,{v:o}];return r===f-1&&t.setFailedUploadArtwork({index:0,uploadError:"Processing error, try reloading page",failureOf:{artworkId:e}}),[4,new Promise(function(e){return setTimeout(e,d[r])})];case 2:return n.sent(),[2]}})},d=[3e5,7e5,9e5,11e5,13e5],p=this.isSticker||this.isStickerSample,f=5,_={catalog_number:this.catalogNumber,dtf_channel_uuid:this.dtfChannelUuid,process_artwork:i,file_content_type:c,process_time_stamp:(null==(n=this.artworks[l])?void 0:n.processTimeStamp)||Date.now(),padding_size:u},h=0,g.label=1;case 1:if(!(h<f))return[3,4];return t=this,[5,_ts_values(r(h))];case 2:if("object"===_type_of(m=g.sent()))return[2,m.v];g.label=3;case 3:return h+=1,[3,1];case 4:return[2,o]}})}).call(t)];case 1:_=T.sent(),T.label=2;case 2:if(!_||_.metadata.process_cancelled)return this.removeArtwork(e),this.setSimulation(_object_spread({},eC,this.initialValues)),[2];if(!(this.isGoldFoil&&_.url))return[3,4];
1return h=_.url,[4,(0,ee.ig)(_.url,et.cZ)];case 3:m=T.sent(),_.url=m,_.goldFoilOriginalUrl=h,T.label=4;case 4:if(this.observeFetchedArtworkProcolorRoutable(null!=(r=_.id)?r:e,_),!(this.isSpangle&&!i))return[3,6];return[4,this.buyArtworksAgain([_object_spread({},_)])];case 5:return T.sent(),[3,7];case 6:this.updateArtworkValuesById(_object_spread({},_)),T.label=7;case 7:if(!_.metadata)return[3,10];if(_.metadata.errors&&(g=this.artworks.length-1,this.setGangsheetValidationError({index:g,artwork:_,type:ec.A.INVALID_GANG_SHEET})),(0,C.Py)("external_image_loaded",{source:_.metadata.uploaded_on,business_line:this.businessLine}),!("true"!==_.process_artwork&&!this.isStandardArtwork))return[3,8];return b=_object_spread(_object_spread_props(_object_spread({},_),{width:n,height:o,lengthFoot:_.metadata.length_foot,isLoading:!1,isFile:!1,removeBackground:_.metadata.remove_background}),this.isProColor&&{enhancementCompleted:!0,imageAttached:!0}),this.printAsIs&&(w={heightInch:_.metadata.height_inch},b=_object_spread_props(_object_spread({},b),{previewMetadata:w,isValid:!0})),this.isSticker||this.isStickerSample?b=_object_spread_props(_object_spread({},b),{paddingSize:u,bgColor:d,shape:f}):this.isPuff&&(b=_object_spread_props(_object_spread({},b),{color:p})),this.updateArtworkValuesById(b),[3,10];case 8:if(!this.isStandardArtwork)return[3,10];return j="true"===_.process_artwork,x=(k=(0,y.Tm)(_)).originalMetadata,S=k.metadata,O=k.enhanceImage,P=k.enhancedMetadata,A=k.withBgMetadata,I=x,!j&&O&&(I=k.removeBackground?P||S:A),(j||!O)&&(n=null==x?void 0:x.widthInch,o=null==x?void 0:x.heightInch),E=_object_spread_props(_object_spread({},k),{id:_.id,enhanceImage:!!j||O,width:n,height:o,originalWidth:null==I?void 0:I.widthInch,originalHeight:null==I?void 0:I.heightInch,originalDpi:!j&&O?null==k?void 0:k.enhancedOriginalDpi:null==x?void 0:x.dpi,sizeBasedDpi:!j&&O?null==k?void 0:k.enhancedOriginalDpi:null==x?void 0:x.dpi,metadata:_object_spread_props(_object_spread({},_.metadata),{widthInch:n,heightInch:o,aspectRatio:(parseFloat(I.width)/parseFloat(I.height)).toPrecision(6)}),lengthFoot:_.metadata.length_foot,isLoading:!1,isFile:!1,enhancementCompleted:!j,removeBackground:_.metadata.remove_background,originalImageUrl:_.original_image_url,enhancedNoBgUrl:_.no_bg_url,enhancedWithBgUrl:_.with_bg_url,sliderPreviewUrl:_.no_bg_no_trim_url,enhancedDpi:300,enhancedOriginalDpi:null==k?void 0:k.enhancedOriginalDpi}),this.updateArtworkValuesById(E),N=(0,v.E)(this.artworks,_.id),D=this.artworks[N],!j&&O&&this.updatePreviewDpi({artworkId:D.id}),j&&this.schedulePollingFallback(_.id),[4,this.downscaleOriginalImage({artworkId:D.id})];case 9:T.sent(),T.label=10;case 10:return[2]}})}).call(t)}))];case 1:return w.sent(),this.getArtworksPricing(),this.updatePdpDates(),[2]}})}).apply(this,arguments)},setGangsheetValidationError:function(e){var t=e.index,r=e.artwork,n=e.type,o=r.metadata,i=r.id;(0,C.Py)("invalid_gang_sheet",_object_spread({artwork_id:i},o)),this.setValidationErrorMessage({index:t,message:o.errors[0],type:n})},removeArtworkWithActivity:function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m=this.pdpType,g=this.artworks,b=this.businessLine,y=g.findIndex(function(t){return t.id===e});if(-1!==y){var v=this.artworks[y];this.removePresetMockupColor(y);var w={file_name:v.name,file_type:v.filetype,file_size:v.filesize,width:null==(t=v.metadata)?void 0:t.width,height:null==(r=v.metadata)?void 0:r.height,page:(null==(n=v.metadata)?void 0:n.uploadedOn)||"pdp",pdp_type:m,business_line:b,dpi:(null==(o=v.metadata)?void 0:o.upscalingEnabled)?Number(null==(i=v.metadata)?void 0:i.qualityUpscaleDpi):200,resolution_width:(null==(c=v.metadata)||null==(l=c.trimInfo)?void 0:l.originalWidthPx)||(null==(u=v.metadata)?void 0:u.width),resolution_height:(null==(p=v.metadata)||null==(d=p.trimInfo)?void 0:d.originalHeightPx)||(null==(f=v.metadata)?void 0:f.height)};(0,C.Py)("image_removed",w),(0,F.bd)({business_line:b,file_name:w.file_name,file_type:w.file_type,file_size:w.file_size,location:w.page,dpi:null==(_=v.metadata)?void 0:_.dpi,artworks_count:null==(h=this.artworks)?void 0:h.length,pre_cut_transfers:this.preCut}),this.removeArtwork(e),this.setSimulation(_object_spread({},eC,this.initialValues))}},trackImageUploadStart:function(e,t){var r=this.pdpType,n=this.artworks,o=this.businessLine,i=this.preCut,l=this.catalogNumber,c=(0,U.l)();return(0,N.j)(e.file,c),(0,C.Py)("image_upload_started",{page:"pdp",pdp_type:r,type:t?"drop":"browse",file_name:e.file.name,file_type:e.file.type,file_size:e.file.size,dpi:300,project_id:null,multi_artwork:(null==n?void 0:n.length)>1,artworks_count:null==n?void 0:n.length,business_line:o,catalog_number:l,upload_uuid:c}),(0,F.bE)({catalog_number:l,location:"pdp",file_name:e.file.name,file_type:e.file.type,file_size:e.file.size,dpi:300,business_line:o,artworks_count:null==n?void 0:n.length,pre_cut_transfers:i,upload_uuid:c}),c},trackImageUploadCompleted:function(e){e.index;var t=_object_without_properties(e,["index"]),r=t.artwork,n=t.file,o=t.response,i=t.uploadStartTime,l=t.uploadUuid,c=t.success,u=this.pdpType,d=this.artworks,p=this.businessLine,f=this.preCut;r&&(void 0===r?"undefined":_type_of(r))==="object"&&l&&(r.uploadUuid=l),(0,C.oY)({multiArtwork:(null==d?void 0:d.length)>1,artworksCount:null==d?void 0:d.length,catalogNumber:this.catalogNumber,dpi:300,uploadedOn:"pdp",preCutTransfers:f,uploadStartTime:i,file:n,artwork:r,pdpType:u,response:o,businessLine:p,uploadUuid:l,success:c}),(0,K.sendDataLayer)({genericEvent:!0,event:"ImageUploadCompleted",filetype:null==r?void 0:r.filetype,filesize:null==r?void 0:r.filesize})},getArtworkHistory:function(e){return _async_to_generator(function(){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,k,x,O,P,A,C;return _ts_generator(this,function(I){switch(I.label){case 0:t=e.search,r=e.sortOrder,n=e.artworkIds,o=e.currentType,i=e.apiType,l=e.artworksType,c=e.shouldCommit,I.label=1;case 1:if(I.trys.push([1,8,,9]),u=this,d=u.artworkHistory,p=u.dtfChannelUuid,f=u.catalogNumber,h={per_page:(_=u.artworkHistoryPagination).perPage,page:_.page,tab:l,sort:"created_at_".concat(r),artwork_ids:n,search:t,dtf_channel_uuid:p,catalog_number:f},"list"!==i)return[3,3];return[4,W.api.dtf.getArtworkHistories(h)];case 2:return m=I.sent(),[3,5];case 3:return[4,W.api.dtf.getArtworkHistory(h)];case 4:m=I.sent(),I.label=5;case 5:if(_object_destructuring_empty(m=(0,y.Tm)(m)),g=_extends({},m),b=m.artworks,!(this.isGoldFoil&&"true"===o))return[3,7];return[4,Promise.all(b.map(function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,(0,ee.
1ig)(e.ordered.imageUrl,et.cZ)];case 1:return t=r.sent(),e.ordered.goldFoilImage=t,e.ordered.imageUrl=t,[2,e]}})})()}))];case 6:b=I.sent(),I.label=7;case 7:if(v=1===g.page?b:_to_consumable_array(d).concat(_to_consumable_array(b)),"function"==typeof c&&!c())return[2,{ok:!0,stale:!0}];return this.setArtworkHistoryPagination(g),this.setArtworkHistory(v),[2,{ok:!0}];case 8:if((null==(O=I.sent())?void 0:O.name)==="AbortError"||(null==O?void 0:O.name)==="CanceledError")return[2,{ok:!1,aborted:!0}];if(P=null==O?void 0:O.status,(0,j.R)({message:null!=(w=null==O?void 0:O.message)?w:null,type:null!=(k=null==O?void 0:O.name)?k:null,status:422===P?null:null!=P?P:null}))return[2,{ok:!1}];return C=deriveArtworkHistoryFingerprint(P,A="string"==typeof(null==O?void 0:O.response)?O.response.slice(0,500):JSON.stringify(null!=(x=null==O?void 0:O.response)?x:null).slice(0,500)),(0,S.notifyError)("DTF previous purchase modal error",{params:{error_message:null==O?void 0:O.message,status:P,response_body:A,error_name:null==O?void 0:O.name,fingerprint_label:C}}),[2,{ok:!1}];case 9:return[2]}})}).call(this)},changePuffColor:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:if(t=e.color,n=void 0===(r=e.index)?0:r,o=_sliced_to_array(this.artworks,1)[0],this.updateArtworkValues({index:n,color:t}),i=o.url,this.isStandardArtwork&&(i="print_original"===o.enhancementTier?o.originalImageUrl:o.removeBackground?o.sliderPreviewUrl:o.enhancedWithBgUrl),!i)return[2];c.label=1;case 1:return c.trys.push([1,3,4,5]),this.setPuff({isLoading:!0}),[4,(0,ee.ig)(i,t)];case 2:return l=c.sent(),this.setPuff({image:l}),[3,5];case 3:return c.sent(),this.setPuff({image:null}),[3,5];case 4:return this.setPuff({isLoading:!1}),[7];case 5:return[2]}})}).apply(this,arguments)},convertImageToHexColor:function(e){return _async_to_generator(function(e){var t,r;return _ts_generator(this,function(n){switch(n.label){case 0:if(!(t=e.artwork).url)return[3,2];return[4,(0,ee.ig)(t.url,et.cZ)];case 1:r=n.sent(),t.url=r,n.label=2;case 2:return this.setLoadedArtwork({artwork:t}),[2]}})}).apply(this,arguments)},generateGoldFoilImages:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d;return _ts_generator(this,function(p){switch(p.label){case 0:return t=e.artworkId,r=(0,v.E)(this.artworks,t),n=this.artworks[r],[4,Promise.all([(o=function(e){return e?(0,ee.ig)(e,et.cZ):Promise.resolve(e)})(n.enhancedWithBgUrl),o(n.enhancedNoBgUrl),o(n.sliderPreviewUrl),o(n.originalImageUrl)])];case 1:return l=(i=_sliced_to_array.apply(void 0,[p.sent(),4]))[0],c=i[1],u=i[2],d=i[3],this.updateArtworkValuesById({id:t,enhancedWithBgUrl:l,enhancedNoBgUrl:c,sliderPreviewUrl:u,goldFoilOriginalUrl:d,enhancementCompleted:!0}),[2]}})}).apply(this,arguments)},updatePrintReadyInfoState:function(e){var t=this.pdpType,r=this.isSpangle,n=this.artworks.find(function(t){return String(t.id)===String(e)}),o="gang_sheets"!==t&&!r&&(null==n?void 0:n.metadata)&&!n.metadata.canRemoveBg&&!n.metadata.upscaleInfo;this.updateArtworkValuesById({id:e,printReadyInfo:{show:o,expanded:!1}})},updateJerseyNumberPdpDates:Z()(function(){this.isValidJerseyArtwork&&this.updatePdpDates()},800),downloadLettersPreview:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return _async_to_generator(function(){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,y,v,w,j,k;return _ts_generator(this,function(x){switch(x.label){case 0:n=null!=(t=null==(r=this.letterNumberArtwork)?void 0:r.textIndex)?t:0,x.label=1;case 1:if(x.trys.push([1,3,4,5]),i=(o=this.letterNumberArtwork).style,l=o.font,c=o.height,u=o.maxLength,d=o.color,p=o.texts,n=f=o.textIndex,_="ABCD",p.length&&(_=p[f]),h=f,m={font:l,color:d,style:i,letter_height_inch:c,text:_,max_length_inch:u},e&&(g=Object.fromEntries(Object.entries(m).filter(function(e){var t=_sliced_to_array(e,2);return null!==(t[0],t[1])})),m=_object_spread({},et.xx,g)),!m.text||null!=m.max_length_inch&&0>=Number(m.max_length_inch))return[2];return this.setLetterPreviewLoading(!0),[4,W.api.dtf.generateLettersPreview({letter_configs:m})];case 2:if(null==(b=x.sent())||(void 0===b?"undefined":_type_of(b))!=="object")throw Error("Empty letters preview response");if(y=this.letterNumberArtwork.textIndex,this.artworks[0].texts[f]===_&&this.setLetterPreviewMessage({textIndex:f,message:b.validation_message}),h!==y)return[2];
1return(v=this.letterNumberArtwork.sizes)[f]={width:b.width,height:b.height},w=b.url,this.updateArtworkValues({index:0,url:w,sizes:v}),this.isLetterReadyForOrder&&(this.getArtworksPricing(),this.updatePdpDates()),[3,5];case 3:if(j=x.sent(),this.updateArtworkValues({index:0,url:null}),(null==(k=j)?void 0:k.name)==="AbortError"||(null==k?void 0:k.name)==="CanceledError")return[2];return this.setLetterPreviewMessage({textIndex:n,message:et.Rf}),(0,S.notifyError)("DTF letters preview generation failed",{params:{error_message:null==k?void 0:k.message,status:null==k?void 0:k.status,catalog_number:this.catalogNumber}}),[3,5];case 4:return this.setLetterPreviewLoading(!1),[7];case 5:return[2]}})}).call(this)},debouncedGenerateLettersPreview:Z()(function(){this.isLetterPreviewReady?this.downloadLettersPreview():this.downloadLettersPreview(!0)},800,{leading:!0}),generateLettersPreview:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];e?this.debouncedGenerateLettersPreview():this.isLetterPreviewReady?this.downloadLettersPreview():this.downloadLettersPreview(!0)},updateAllLetterPreviews:Z()(function(){this.isLetterReadyForOrder?(this.setLetterPreviewLoading(!0),this.updateLettersPreviews()):this.isLetterPreviewReady||this.downloadLettersPreview(!0)},800,{leading:!0}),updateLettersPreviews:function(){return _async_to_generator(function(){var e,t,r,n,o,i,l,c;return _ts_generator(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,4,5]),r={artworks:this.formArtworks},[4,W.api.dtf.generateLettersSizes(r)];case 1:return n={sizes:u.sent().reduce(function(e,t,r){return e[r]=t,e},{})},null!==(o=this.letterNumberArtwork.textIndex)&&(n.url=n.sizes[o].url),this.updateArtworkValues(_object_spread({index:0},n)),this.setLetterPreviewMessage({textIndex:null!=(e=null==(t=this.letterNumberArtwork)?void 0:t.textIndex)?e:0,message:""}),[4,this.getArtworksPricing()];case 2:return u.sent(),this.updatePdpDates(),[3,5];case 3:if((null==(c=u.sent())?void 0:c.name)==="AbortError"||(null==c?void 0:c.name)==="CanceledError")return[2];return this.setLetterPreviewMessage({textIndex:null!=(i=null==(l=this.letterNumberArtwork)?void 0:l.textIndex)?i:0,message:et.Rf}),(0,S.notifyError)("Error generating letters preview",{params:{error_message:null==c?void 0:c.message,status:null==c?void 0:c.status,catalog_number:this.catalogNumber}}),[3,5];case 4:return this.setLetterPreviewLoading(!1),[7];case 5:return[2]}})}).call(this)},buyAsStickerById:function(e){return _async_to_generator(function(e){var t,r,n,o,i;return _ts_generator(this,function(l){switch(l.label){case 0:return t=e.artworkIds,r=this,n=r.catalogNumber,o=r.dtfChannelUuid,[4,Promise.all(t.map(function(e){return W.api.dtf.getArtwork({id:e},{catalog_number:n,dtf_channel_uuid:o})}))];case 1:return i=l.sent(),this.downloadAndTriggerArtworkUploadFlow(i.map(function(e){return{id:e.id,name:e.name,originalImageUrl:e.url,originalMimeType:e.filetype}})),[2]}})}).apply(this,arguments)},updateEnableEnhancement:function(e){return _async_to_generator(function(e){var t,r,n,o,i,l,c,u,d,p,f,_,h,m,g,b,v,w,k,x,O,P,A,I,E,N,D,T,M,R,F;return _ts_generator(this,function(L){switch(L.label){case 0:t=e.artworkId,r=e.enableEnhancement,o=null!=(n=e.enhancementTier)?n:r?"full_enhancements":"print_original",L.label=1;case 1:return L.trys.push([1,4,,5]),c=(l=this.artworks.find(function(e){return String(e.id)===String(t)})).metadata,u=l.originalMetadata,d=l.metadata,p=l.enhancedMetadata,f=l.withBgMetadata,_=r?d:u,h=u,r&&"custom"!==o&&(h=l.removeBackground||"full_enhancements"===o?p||d:f),(null==(i=l.pricing)?void 0:i.enhancementTier)&&(this.cachedArtworkPrices=_object_spread_props(_object_spread({},this.cachedArtworkPrices),_define_property({},l.pricing.enhancementTier,l.pricing))),m={id:t,enhanceImage:r,enhancementTier:o,width:null==h?void 0:h.widthInch,height:null==h?void 0:h.heightInch,originalWidth:null==h?void 0:h.widthInch,originalHeight:null==h?void 0:h.heightInch,originalDpi:r?null==l?void 0:l.enhancedOriginalDpi:null==u?void 0:u.dpi,sizeBasedDpi:r?null:null==u?void 0:u.dpi,pricing:this.cachedArtworkPrices[o]||{},metadata:_object_spread_props(_object_spread({},c),{aspectRatio:(parseFloat(null==h?void 0:h.width)/parseFloat(null==h?void 0:h.height)).toPrecision(6)})},this.updateArtworkValuesById(m),r&&this.updatePreviewDpi({artworkId:t}),[4,this.downscaleOriginalImage({artworkId:t})];case 2:return L.sent(),g={catalog_number:this.catalogNumber,dtf_artwork:{enhance_image:r}}
1,[4,W.api.dtf.updateArtworkRedrawData({id:t},g)];case 3:return(null==(b=L.sent())?void 0:b.original_metadata)&&(w=(v=(0,y.Tm)(b)).originalMetadata,k=this.artworks.find(function(e){return String(e.id)===String(t)}),w&&(null==k?void 0:k.enhanceImage)===v.enhanceImage&&(this.updateArtworkValuesById({id:t,originalMetadata:w}),v.enhanceImage||(_=w,this.updateArtworkValuesById({id:t,width:w.widthInch,height:w.heightInch,originalWidth:w.widthInch,originalHeight:w.heightInch,originalDpi:w.dpi,sizeBasedDpi:w.dpi,metadata:_object_spread_props(_object_spread({},c),{aspectRatio:(Number(w.width)/Number(w.height)).toPrecision(6)})})))),this.getArtworksPricing(),this.updatePdpDates(),(0,C.Py)("dtf_image_print_perfect_toggle",{business_line:this.businessLine,artwork_id:t,enhance_image:r,selected_by:"customer",metadata:_}),(0,C.Py)("dtf_enhancement_tier_change",{business_line:this.businessLine,name:o,artwork_id:t,enhance_image:r,metadata:_}),[3,5];case 4:return P=(O=getStructuredErrorContext(x=L.sent())).errorMessage,A=O.errorType,I=O.httpStatus,E=O.responseData,N=(null==x?void 0:x.stack)||"No stack trace available",D=null!==I?{response:{status:I,data:E}}:{},(0,j.R)({message:P,type:A,status:422===I?null:I})||(M=(T=classifyEnhancementSaveFailure({httpStatus:I,responseData:E})).message,R=T.tag,F=T.bucket,(0,S.notifyError)(M,{tags:R,params:{bucket:F,error_message:P,error_type:A,stack_trace:N,error_details:D,enhance_image:r,artwork_id:t,enhancement_tier:o}})),[3,5];case 5:return[2]}})}).apply(this,arguments)},updatePreviewDpi:function(e){var t=e.artworkId;if(this.isStandardArtwork){var r=(0,v.E)(this.artworks,t),n=this.artworks[r];if((null==n?void 0:n.originalMime)==="image/svg+xml")return void this.updateArtworkValuesById({id:t,originalDpi:300,sizeBasedDpi:300});var o=n.width,i=n.height;if(n.sizesAndQuantities.length>0){var l=n.sizesAndQuantities.filter(function(e){return e.quantity>0}).reduce(function(e,t){var r=parseFloat(e.width);return parseFloat(t.width)>r?t:e},n.sizesAndQuantities.find(function(e){return e.quantity>0})||n.sizesAndQuantities[0]);o=l.width,i=l.height}var c=n.originalDpi;(n.originalWidth!==o||n.originalHeight!==i)&&(c=n.originalDpi/(o/n.originalWidth)),Number.isNaN(n.sizeBasedDpi)||Number.isNaN(c)||n.sizeBasedDpi===c||this.updateArtworkValuesById({id:t,sizeBasedDpi:c})}},downscaleOriginalImage:function(e){return _async_to_generator(function(e){var t,r,n,o,i,c,u,d,p,f,_,h,m,g,b,y,w,j,x,S,O,P,A,C,I,E,N,D,T,M,R,F,L,B,z;return _ts_generator(this,function(U){switch(U.label){case 0:if(t=this,r=e.artworkId,!this.isStandardArtwork||(i=(0,v.E)(this.artworks,r),(null==(c=this.artworks[i])||null==(n=c.metadata)?void 0:n.mimeType)==="image/pdf"||(null==c?void 0:c.originalImageUrl)===null||(null==c?void 0:c.originalImageUrl)===void 0||(null==c?void 0:c.filetype)==="image/svg+xml"||(null==c?void 0:c.originalMime)==="image/svg+xml"||!(null==c||null==(o=c.originalImageUrl)?void 0:o.startsWith("http"))))return[2];return u=c.originalImageUrl,[4,this.downloadBlob(u)];case 1:if(d=U.sent(),p=function(){var e;return(null==(e=t.artworks[(0,v.E)(t.artworks,r)])?void 0:e.originalImageUrl)===u},f=300,_=Number.isFinite(c.sizeBasedDpi)?c.sizeBasedDpi:f,!(0,l.hd)())return[3,7];U.label=2;case 2:if(U.trys.push([2,6,,7]),!(_>=f))return[3,4];return[4,(0,l.p0)(d)];case 3:return U.sent(),p()&&this.updateArtworkValuesById({id:r,downscaledOriginalImage:u}),[2];case 4:if(!(h=this.previewCanvasSize.width)||0===h)return[2];return[4,(0,l.dj)({blob:d,previewCanvasWidth:h,targetDpi:_,originalDpi:f})];case 5:if(m=U.sent().dataUrl,!p())return[2];return"data:,"!==m?this.updateArtworkValuesById({id:r,downscaledOriginalImage:m}):(0,k.W)({error_message:"Worker downscale produced an empty result",error:"Canvas rendering error",handledError:"",uploadError:"Image has invalid dimensions"}),[2];case 6:return U.sent(),[3,7];case 7:return[4,this.decodeImageBlob(d)];case 8:if(!(g=U.sent()).width||!g.height||0===g.width||0===g.height)return(0,k.W)({error_message:"Invalid image dimensions: ".concat(g.width,"x").concat(g.height),error:"Canvas rendering error",uploadError:"Image has invali
1d dimensions",errorResponse:{imageUrl:c.originalImageUrl,width:g.width,height:g.height}}),[2];if((b=Number.isFinite(c.sizeBasedDpi)?c.sizeBasedDpi:300)>=300)return p()&&this.updateArtworkValuesById({id:r,downscaledOriginalImage:u}),[2];if(y=g.width/g.height,!(w=this.previewCanvasSize.width)||0===w)return[2];if(!Number.isFinite(y)||0===y)return(0,k.W)({error_message:"Invalid aspect ratio: aspectRatio=".concat(y),error:"Canvas rendering error",uploadError:"Invalid aspect ratio",errorResponse:{aspectRatio:y,imageWidth:g.width,imageHeight:g.height}}),[2];j=w/y;try{if(x={artworkId:r,previewCanvasWidth:w,previewCanvasHeight:j,aspectRatio:y,targetDpi:b,originalDpi:300,previewCanvasSize:this.previewCanvasSize,catalogNumber:this.catalogNumber,sizeBasedDpi:c.sizeBasedDpi},O=(S=document.createElement("canvas")).getContext("2d"),x.qualityRatio=P=Math.max(.1,b/300),C=(A=document.createElement("canvas")).getContext("2d"),I=Math.max(1,Math.round(w*P)),E=Math.max(1,Math.round(j*P)),x.intermediateWidth=I,x.intermediateHeight=E,A.width=I,A.height=E,0===A.width||0===A.height)throw(N=Error("Intermediate canvas has invalid dimensions: ".concat(A.width,"x").concat(A.height))).debug=_object_spread_props(_object_spread({},x),{throwAt:"intermediate_canvas_zero_dimension",assignedWidth:A.width,assignedHeight:A.height}),N;if(C.imageSmoothingEnabled=!0,C.imageSmoothingQuality="low",C.drawImage(g,0,0,I,E),D=Math.max(1,w),T=Math.max(1,j),x.resultWidth=D,x.resultHeight=T,S.width=D,S.height=T,0===S.width||0===S.height)throw(M=Error("Result canvas has invalid dimensions: ".concat(S.width,"x").concat(S.height))).debug=_object_spread_props(_object_spread({},x),{throwAt:"result_canvas_zero_dimension",assignedWidth:S.width,assignedHeight:S.height}),M;O.imageSmoothingEnabled=!0,O.imageSmoothingQuality="high",O.drawImage(A,0,0,D,T),R=S.toDataURL("image/png"),"data:,"!==R&&p()&&this.updateArtworkValuesById({id:r,downscaledOriginalImage:R})}catch(e){z=null==e?void 0:e.debug,(0,k.W)({error_message:e.message,error:"Canvas rendering error",uploadError:"Failed to downscale image",errorResponse:{imageUrl:c.originalImageUrl,imageWidth:g.width,imageHeight:g.height,previewCanvasWidth:w,previewCanvasHeight:j,aspectRatio:y,targetDpi:b,originalDpi:300,qualityRatio:null==z?void 0:z.qualityRatio,intermediateWidth:null==z?void 0:z.intermediateWidth,intermediateHeight:null==z?void 0:z.intermediateHeight,resultWidth:null==z?void 0:z.resultWidth,resultHeight:null==z?void 0:z.resultHeight,assignedWidth:null==z?void 0:z.assignedWidth,assignedHeight:null==z?void 0:z.assignedHeight,throwAt:null==z?void 0:z.throwAt,previewCanvasSize:null!=(F=null==z?void 0:z.previewCanvasSize)?F:this.previewCanvasSize,catalogNumber:null!=(L=null==z?void 0:z.catalogNumber)?L:this.catalogNumber,artworkId:null!=(B=null==z?void 0:z.artworkId)?B:r}})}return[2]}})}).apply(this,arguments)},downloadBlob:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return _async_to_generator(function(){var r,n,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:r=function(r){var i,l,c,u,d,p;return _ts_generator(this,function(f){switch(f.label){case 0:return f.trys.push([0,3,,5]),[4,fetch(e)];case 1:if(!(i=f.sent()).ok)throw(l=Error("Failed to fetch image: HTTP ".concat(i.status," ").concat(i.statusText," for ").concat(e))).status=i.status,l;return c={},[4,i.blob()];case 2:return[2,(c.v=f.sent(),c)];case 3:if(d=(null==(u=f.sent())?void 0:u.status)&&o.includes(u.status),r===t||!d)throw u;return p=n[Math.min(r,n.length-1)],[4,new Promise(function(e){setTimeout(e,p)})];case 4:return f.sent(),[3,5];case 5:return[2]}})},n=[250,500,1e3,2e3,4e3],o=[408,429,500,502,503,504],i=0,c.label=1;case 1:if(!(i<=t))return[3,4];return[5,_ts_values(r(i))];case 2:if("object"===_type_of(l=c.sent()))return[2,l.v];c.label=3;case 3:return i+=1,[3,1];case 4:throw Error("Failed to fetch image after retries: ".concat(e))}})})()},decodeImageBlob:function(e){return _async_to_generator(function(){var t,r;return _ts_generator(this,function(n){switch(n.label){case 0:return t=URL.createObjectURL(e),r=new Image,[4,new Promise(function(e,n){r.onload=function(){URL.revokeObjectURL(t),e()},r.onerror=function(e){URL.revokeObjectURL(t);var r=Error("Failed to decode image");r.event=e,n(r)},r.src=t})];case 1:return n.sent(),[2,r]}})})()},fetchBulkPrice:function(){var e=this;
1Object.entries(this.gangSheetBuilderVariants).forEach(function(t){var r=_sliced_to_array(t,2),n=(r[0],r[1]);return _async_to_generator(function(){var e,t;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,W.api.dtf.fetchBulkPrice({variant_id:n.variant_id})];case 1:return e=r.sent(),(t={})[n.variant_id]=e,this.setGangSheetBulkPrice(t),this.updateBulkTable(),[2]}})}).call(e)})},updateBulkTable:function(){this.gangSheetBulkPrice[this.gangSheetBuilderSettings.variantId]&&Q.EventBus.publish(Q.Events.BULK_TABLE_UPDATE,{htmlTable:this.gangSheetBulkPrice[this.gangSheetBuilderSettings.variantId].table})},updateCarouselImage:function(e){var t=e.variantId;Q.EventBus.publish(Q.Events.SELECTED_VARIANT_CHANGED,{carouselData:this.gangSheetBuilderCarousels[t]})},sanitizeObject:function(e){return Object.fromEntries(Object.entries(e).filter(function(e){var t=_sliced_to_array(e,2);return null!=(t[0],t[1])}))},cancelArtworkProcess:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return e.id&&W.api.dtf.cancelArtworkProcess({id:e.id}),[2]})})()},sendCancelEvent:function(e){var t,r=e.lastWebSocketEvent,n=e.id;t=null!==r?"fetch_delivery_date"===r?"spangle_api":"upload_artwork"===r?"image_upload":"image_processing":this.isSpangle?"spangle_api":"image_upload",(0,C.Py)("transfers_cancel_button_clicked",{action:t,catalog_number:this.catalogNumber,business_line:this.businessLine,artwork_id:n})},handleCancelProcess:function(e){var t=ep.o3.store;this.updateArtworkValues({index:e.originalIndex,processTimeStamp:Date.now()}),this.sendCancelEvent(e),this.cancelArtworkProcess(e),this.clearValidateArtworkStartEventInterval(e.id),e.id&&e_.A.stopPolling(Number(e.id)),!e.isLoading&&t.spangleVariations.some(function(e){return null!==e.spanglePagesInfo})?t.cancelSpangleProcess({artwork:e}):e.id?this.removeArtwork(e.id):this.removeArtworkByIndex(e.originalIndex),this.endJiffyFirstArtworkProcessing(e.id),this.getArtworksPricing()},defineOriginalWidth:function(e){var t,r,n;return e.enhanceImage?e.removeBackground?null==(r=e.enhancedMetadata)?void 0:r.widthInch:null==(n=e.withBgMetadata)?void 0:n.widthInch:null==(t=e.originalMetadata)?void 0:t.widthInch},defineOriginalHeight:function(e){var t,r,n;return e.enhanceImage?e.removeBackground?null==(r=e.enhancedMetadata)?void 0:r.heightInch:null==(n=e.withBgMetadata)?void 0:n.heightInch:null==(t=e.originalMetadata)?void 0:t.heightInch},loadEnhancementArtwork:function(e){return _async_to_generator(function(e){var t,n,o,i,l,c,u,d,p,f,_,h,m,g,b,y;return _ts_generator(this,function(v){switch(v.label){case 0:if(t=this,n=e.enhancementsStarted,o=e.dtfChannelUuid,i=e.rawArtworkUrls,l=e.artworkWidth,c=e.artworkHeight,!n||!o||!i)return[2];this.isEnhancementLoading=!0,v.label=1;case 1:return v.trys.push([1,8,9,10]),[4,Promise.resolve().then(r.bind(r,508551))];case 2:if(!(null==(p=(0,v.sent().parseArtworkUrls)(i))||null==(u=p.artworkIds)?void 0:u.length))return[2];return f=p.artworkIds,_=p.lastArtworkId,this.initializeLoadingState(_),[4,this.fetchArtworkDetails(f,o)];case 3:if(!(null==(h=v.sent())||null==(d=h.artworks)?void 0:d.length))return[2];if((g=(m=h.artworks.map(function(e){var r,n=e.id,o=e.fileName,i=e.originalMime,l=e.enhancementTier,c=e.uploadedOn,u=e.purchasedDate,d=e.ordered,p=void 0===d?{}:d,f=e.original,_=void 0===f?{}:f,h=e.useFootLength,m=e.dtfPrintId,g=e.currentEnhancementState,b=e.sizesAndQuantities;return{id:void 0===n?null:n,dtfPrintId:m,name:void 0===o?"":o,uploadedOn:void 0===c?"":c,purchasedDate:void 0===u?"":u,originalMime:void 0===i?"":i,enhancementTier:void 0===l?"":l,url:p.imageUrl,spangledImageUrl:null==p?void 0:p.spangledImageUrl,cutlineUrl:null==p?void 0:p.cutlineUrl,originalImageUrl:_.imageUrl,originalMimeType:_.mimeType,cmykOriginalImageUrl:null==p?void 0:p.cmykOriginalImageUrl,processTimeStamp:Date.now(),goildFoilPreviewAttached:t.isGoldFoil,enhancedNoBgUrl:p.noBgUrl,enhancedWithBgUrl:p.withBgUrl,enhancementCompleted:!0,originalDpi:p.dpi,enhancedDpi:p.dpi,sliderPreviewUrl:p.noBgNoTrimUrl,canRemoveBg:p.canRemoveBg||!1,useFootLength:h||!1,removeBackgroun
1d:p.removeBackground||!1,metadata:null==p?void 0:p.metadata,originalMetadata:null==p?void 0:p.originalMetadata,enhancedMetadata:null==p?void 0:p.enhancedMetadata,withBgMetadata:null==p?void 0:p.withBgMetadata,enhanceImage:null==p?void 0:p.enhanceImage,previewMetadata:t.printAsIs?{heightInch:p.height}:{},enhancedOriginalDpi:null==p?void 0:p.enhancedOriginalDpi,originalWidth:t.defineOriginalWidth(p),originalHeight:t.defineOriginalHeight(p),sizeBasedDpi:(null==p?void 0:p.enhanceImage)?null==p?void 0:p.enhancedOriginalDpi:null==p||null==(r=p.originalMetadata)?void 0:r.dpi,currentEnhancementState:g,sizesAndQuantities:b}})).find(function(e){return String(e.id)===String(_)}))||!(m.length>1)||(0,S.notifyError)("DTF enhancement history: lastArtworkId absent, falling back to [0]",{params:{last_artwork_id:String(_),mapped_ids:m.map(function(e){return String(e.id)}).join(",")},fingerprint:"dtf-enhancement-history-pick-fallback"}),"complete_processing"!==(b=null!=g?g:m[0]).currentEnhancementState)return[3,5];return[4,this.setupCompletedEnhancement(b)];case 4:return v.sent(),[3,7];case 5:return[4,this.setupInProgressEnhancement(b,o,{width:l,height:c})];case 6:v.sent(),v.label=7;case 7:return this.cleanupUrlParameters(),[3,10];case 8:return y=v.sent(),(0,S.notifyError)("Enhancement loading failed",{params:{error:y.message}}),[3,10];case 9:return this.isEnhancementLoading=!1,[7];case 10:return[2]}})}).apply(this,arguments)},initializeLoadingState:function(e){this.artworksState=[_object_spread_props(_object_spread({},eN),{id:e,isLoading:!0,isFile:!1,originalIndex:0})],this.settleJiffyFirstUploadPending({deferReask:!0}),this.simulation=_object_spread({},eC),this.updateArtworkValuesById({id:e,isLoading:!1,enhancementCompleted:!1,imageProcessingCompletedEventSent:!1,progress:50,progressMessage:"Loading artwork details...",processTimeStamp:Date.now()})},fetchArtworkDetails:function(e,t){return _async_to_generator(function(){var r,n,o;return _ts_generator(this,function(i){switch(i.label){case 0:return this.updateArtworkValuesById({id:e[e.length-1],progress:50,currentProgress:25,progressMessage:"Loading artwork details..."}),[4,Promise.all([W.api.dtf.getArtworkHistory({artwork_ids:e,dtf_channel_uuid:t,catalog_number:this.catalogNumber,enhancement_started:!0}),W.api.dtf.getArtwork({id:e[e.length-1]},{catalog_number:this.catalogNumber,dtf_channel_uuid:t})])];case 1:return r=i.sent(),n=e[e.length-1],o=r[0].artworks.map(function(e){return _object_spread_props(_object_spread({},e),{ordered:String(e.id)===String(n)?_object_spread({},e.ordered,r[1]):e.ordered})}),[2,(0,y.Tm)(_object_spread_props(_object_spread({},r[0]),{artworks:o}))]}})}).call(this)},setupCompletedEnhancement:function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(r){switch(r.label){case 0:if(t=_object_spread_props(_object_spread({},e),{enhancementCompleted:!0}),this.setLoadedArtwork({artwork:t}),this.updateArtworkValuesById({id:e.id,progress:100,progressMessage:"Enhancement complete",processTimeStamp:Date.now(),isLoading:!1,enhancementCompleted:!0}),!this.isStandardArtwork)return[3,2];return this.updatePreviewDpi({artworkId:e.id}),[4,this.downscaleOriginalImage({artworkId:e.id}).catch(function(e){console.warn("[DTF] downscaleOriginalImage failed, continuing:",e)})];case 1:r.sent(),r.label=2;case 2:return this.updateArtworkValuesById({id:e.id,imageProcessingCompletedEventSent:!0}),this.updatePrintReadyInfoState(e.id),[2]}})}).call(this)},setupInProgressEnhancement:function(e,t,r){return _async_to_generator(function(){var n,o,i,l,c,u,d,p,f,_,h,m,g,b,y,v,w,j,k;return _ts_generator(this,function(x){return this.setDtfChannelUuid(t),w=(0,es.A)(this),this.setCable(w),j=r.width,k=r.height,this.updateArtworkValuesById(_object_spread_props(_object_spread({id:e.id,isLoading:!1,enhancementCompleted:!1,progress:50,progressMessage:"Processing enhancements...",processTimeStamp:Date.now(),url:e.url,originalImageUrl:e.originalImageUrl,canRemoveBg:e.canRemoveBg,removeBackground:e.removeBackground,filetype:e.filetype,filesize:e.filesize,name:e.name},this.initialValues),{metadata:_object_spread_props(_object_spread({},e.metadata),{width:null!=(n=null==(f=e.metadata)?void 0:f.width)?n:j,height:null!=(o=null==(_=e.metadata)?void 0:_.he
1ight)?o:k,widthInch:null!=(i=null==(h=e.metadata)?void 0:h.widthInch)?i:j,heightInch:null!=(l=null==(m=e.metadata)?void 0:m.heightInch)?l:k}),withBgMetadata:_object_spread_props(_object_spread({},e.withBgMetadata),{width:null!=(c=null==(g=e.withBgMetadata)?void 0:g.width)?c:j,height:null!=(u=null==(b=e.withBgMetadata)?void 0:b.height)?u:k,widthInch:null!=(d=null==(y=e.withBgMetadata)?void 0:y.widthInch)?d:j,heightInch:null!=(p=null==(v=e.withBgMetadata)?void 0:v.heightInch)?p:k})})),this.schedulePollingFallback(e.id),[2]})}).call(this)},cleanupUrlParameters:function(){var e=new URL(window.location.href);["uploaded_artwork_ids","artwork_urls","file_content_type","enhancements_started","dtf_channel_uuid","side"].forEach(function(t){return e.searchParams.delete(t)}),window.history.replaceState({},"",e.toString())}}}),eM=eT.store;let eR=eT},472837(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(277889),o=r(433769),i=r(586519),l=r(501038),c=r(398433);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function _class_call_check(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function _class_private_method_get(e,t,r){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return r}function _class_private_method_init(e,t){_check_private_redeclaration(e,t),t.add(e)}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _create_class(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _class_static_private_method_get(e,t,r){return _class_check_private_static_access(e,t),r}function _class_check_private_static_access(e,t){if(e!==t)throw TypeError("Private static access of wrong provenance")}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var u=new WeakSet,d=new WeakSet,p=new WeakSet,f=new WeakSet,_=new WeakSet,h=new WeakSet,m=function(){function TransfersPollingService(){_class_call_check(this,TransfersPollingService),_class_private_method_init(this,u),_class_private_method_init(this,d),_class_private_method_init(this,p),_class_private_method_init(this,f),_class_private_method_init(this,_),_class_private_method_init(this,h),_define_property(this,"INITIAL_DELAY",void 0),_define_property(this,"MAX_POLLING_DURATION",void 0),_define_property(this,"POLLING_INTERVAL",void 0),_define_property(this,"pollingInstances",void 0),_define_property(this,"inFlight",void 0),this.pollingInstances=new Map,this.inFlight=new Set,this.INITIAL_DELAY=4e4,this.POLLING_INTERVAL=1e4,this.MAX_POLLING_DURATION=18e4}return _create_class(TransfersPollingService,[{key:"startPolling",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e=Number(e),!this.pollingInstances.has(e)){var i=n.catalogNumber,l=n.dtfChannelUuid,c=n.checkArtworkExists,d=n.onTimeout,p=n.initialDelay,f=void 0===p?this.INITIAL_DELAY:p,_={isPolling:!0,pollCount:0,attempt:0,startTime:Date.now(),timeoutId:null,catalogNumber:void 0===i?null:i,dtfChannelUuid:void 0===l?null:l,checkArtworkExists:void 0===c?null:c,onTimeout:void 0===d?null:d};this.pollingInstances.set(e,_),_.timeoutId=setTimeout(function(){_.checkArtworkExists&&!_.checkArtworkExists(e)?r.stopPolling(e):((0,o.track)("fallback_polling_started",{artwork_id:String(e),catalog_number:_.catalogNumber,page:"transfers_pdp"}),_class_private_method_get(r,u,pollArtwork).call(r,e,t))},f)}}},{key:"stopPolling",value:function(e){var t=this.pollingInstances.get(e);t&&(t.timeoutId&&clearTimeout(t.timeoutId),t.attempt=0,t.lastStatus=void 0,t.nextDelayMs=void 0,this.inFlight.delete(e),this.pollingInstances.delete(e))}},{key:"stopAllPolling",value:function(){var e=this;
1this.pollingInstances.forEach(function(t,r){e.stopPolling(r)})}},{key:"isPolling",value:function(e){return this.pollingInstances.has(e)}}]),TransfersPollingService}();function pollArtwork(e,t){return _async_to_generator(function(){var r;return _ts_generator(this,function(n){switch(n.label){case 0:if(!(r=this.pollingInstances.get(e))||!r.isPolling)return[2];if(r.checkArtworkExists&&!r.checkArtworkExists(e))return(0,o.track)("fallback_polling_stopped_artwork_removed",{artwork_id:String(e),catalog_number:r.catalogNumber,page:"transfers_pdp",poll_count:r.pollCount}),this.stopPolling(e),[2];return r.pollCount+=1,[4,_class_private_method_get(this,d,checkArtworkStatus).call(this,e,t)];case 1:if(!n.sent())return[2];if(_class_private_method_get(this,f,isPollingTimedOut).call(this,r))return _class_private_method_get(this,_,handlePollingTimeout).call(this,e),[2];return _class_private_method_get(this,h,scheduleNextPoll).call(this,e,t),[2]}})}).call(this)}function checkArtworkStatus(e,t){return _async_to_generator(function(){var r,u,d,m,g,b,y,v,w,j,k;return _ts_generator(this,function(x){switch(x.label){case 0:if(!(r=this.pollingInstances.get(e)))return[2,!1];if(this.inFlight.size>=2&&!this.inFlight.has(e)){if(_class_private_method_get(this,f,isPollingTimedOut).call(this,r))return _class_private_method_get(this,_,handlePollingTimeout).call(this,e),[2,!1];return r.nextDelayMs=this.POLLING_INTERVAL,_class_private_method_get(this,h,scheduleNextPoll).call(this,e,t),[2,!1]}this.inFlight.add(e),u=new AbortController,d=setTimeout(function(){u.abort()},.9*this.POLLING_INTERVAL),x.label=1;case 1:return x.trys.push([1,3,4,5]),m={artwork_ids:[e],catalog_number:r.catalogNumber,dtf_channel_uuid:r.dtfChannelUuid,enhancement_started:!0},[4,(0,n.api.dtf.getArtworkHistory)(m,{silent:!0,signal:u.signal})];case 2:if(g=x.sent(),this.pollingInstances.get(e)!==r)return[2,!1];if(y=(null==(b=g.artworks.find(function(t){return Number(t.id)===e}))?void 0:b.current_enhancement_state)||(null==b?void 0:b.currentEnhancementState),r.attempt=0,r.lastStatus=void 0,r.nextDelayMs=void 0,"complete_processing"===y)return _class_private_method_get(this,p,handleEnhancementComplete).call(this,e,b,t),[2,!1];return[3,5];case 3:if(v=x.sent(),this.pollingInstances.get(e)!==r)return[2,!1];if(401===(j=null==(w=v)?void 0:w.status))return(0,o.track)("fallback_polling_stopped_session_expired",{artwork_id:String(e),catalog_number:r.catalogNumber,page:"transfers_pdp"}),this.stopPolling(e),[2,!1];if((k=(0,c.q)({error:w,attempt:r.attempt,lastStatus:r.lastStatus,baseIntervalMs:this.POLLING_INTERVAL,capMs:45e3,remainingBudgetMs:this.MAX_POLLING_DURATION-(Date.now()-r.startTime)})).shouldStop)return this.stopPolling(e),[2,!1];if(r.attempt=k.attemptNext,r.lastStatus=k.lastStatusNext,r.nextDelayMs=k.delayMs,!(0,l._n)(v)||j&&j>=400&&j<500)return[2,!0];if((0,i.notifyError)("Transfers polling error:",{params:{error:_instanceof(v,Error)?v.message:String(v),hook:"transfers_polling_service",step:"check_artwork_status",artwork_id:String(e),status_code:j}}),j&&j>=500)return(0,o.track)("fallback_polling_stopped_server_error",{artwork_id:String(e),catalog_number:r.catalogNumber,page:"transfers_pdp"}),this.stopPolling(e),[2,!1];return[3,5];case 4:return clearTimeout(d),this.pollingInstances.get(e)===r&&this.inFlight.delete(e),[7];case 5:return[2,!0]}})}).call(this)}function handleEnhancementComplete(e,t,r){var n=this.pollingInstances.get(e),l=null==n?void 0:n.catalogNumber;try{if((0,o.track)("fallback_polling_enhancement_completed",{artwork_id:String(e),catalog_number:l,page:"transfers_pdp"}),t){var c=_class_static_private_method_get(m,m,transformArtworkData).call(m,t);r(c)}this.stopPolling(e)}catch(t){(0,i.notifyError)("Error in handleEnhancementComplete:",{params:{error:_instanceof(t,Error)?t.message:String(t),hook:"transfers_polling_service",step:"handle_enhancement_complete",artwork_id:String(e)}}),this.stopPolling(e)}}function isPollingTimedOut(e){return Date.now()-e.startTime>=this.MAX_POLLING_DURATION}function handlePollingTimeout(e){var t,r=this.pollingInstances.get(e);try{null==r||null==(t=r.onTimeout)||t.call(r,e)}catch(t){(0,i.notifyError)(_instanceof(t,Error)?t:Error(String(t)),{params:{artwork_id:String(e),source:"transfers_polling_service.on_timeout",catalog_number:null==r?void 0:r.catalogNumber}})}this.stopPolling(e),(0,o.track)("fallback_polling_stopped",{artwork_id:String(e),catalog_number:null==r?void 0:r.catalogNumber,page:"transfers_pdp"})}function scheduleNextPoll(e,t){var r,n=this,o=this.pollingInstances.get(e);o&&(o.timeoutId=setTimeout(function(){_class_private_method_get(n,u,pollArtwork).call(n,e,t)},null!=(r=o.nextDelayMs)?r:this.POLLING_INTERVAL))}function transformArtworkData(e){var t,r,n,o=e.ordered,i=e.original,l=(null==o?void 0:o.image_url)||(null==o?void 0:o.imageUrl);return{id:e.id,noBgUrl:(null==o?void 0:o.no_bg_url)||(null==o?void 0:o.noBgUrl),noBgNoTrimUrl:(null==o?void 0:o.no_bg_no_trim_url)||(null==o?void 0:o.noBgNoTrimUrl),withBgUrl:(null==o?void 0:o.with_bg_url)||(null==o?void 0:o.withBgUrl),imageUrl:l,url:l,originalImageUrl:(null==i?void 0:i.image_url)||(null==i?void 0:i.imageUrl),canRemoveBg:null!=(t=null==o?void 0:o.can_remove_bg)?t:null==o?void 0:o.canRemoveBg,removeBackgroun
1d:null!=(r=null==o?void 0:o.remove_background)?r:null==o?void 0:o.removeBackground,metadata:null==o?void 0:o.metadata,cutlineUrl:null!=(n=null==o?void 0:o.cutline_url)?n:null==o?void 0:o.cutlineUrl,enhancedMetadata:(null==o?void 0:o.enhanced_metadata)||(null==o?void 0:o.enhancedMetadata),originalMetadata:(null==o?void 0:o.original_metadata)||(null==o?void 0:o.originalMetadata),withBgMetadata:(null==o?void 0:o.with_bg_metadata)||(null==o?void 0:o.withBgMetadata)}}let g=new m},404773(e,t,r){"use strict";r.d(t,{CM:()=>useDismissOnOutsideClick,kS:()=>useRelocatedModalFocus,nx:()=>useAnchoredModal});var n=r(293534);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function useAnchoredModal(e,t){var r=(0,n.useRef)(null),o=_sliced_to_array((0,n.useState)(null),2),i=o[0],l=o[1],c=(0,n.useCallback)(function(e){r.current=e,l(e)},[]);return(0,n.useLayoutEffect)(function(){if(t&&i&&"u">typeof window)return sync(),window.addEventListener("scroll",sync,!0),window.addEventListener("resize",sync),function(){window.removeEventListener("scroll",sync,!0),window.removeEventListener("resize",sync)};function sync(){var t=e.current;if(t&&i){var r=t.getBoundingClientRect(),n=i.querySelector(".color-picker__content"),o=(n||i).offsetWidth||280,l=(n||i).offsetHeight,c=Math.max(8,Math.min(r.right+-48,window.innerWidth-o-8)),u=Math.max(8,Math.min(r.top+-4,window.innerHeight-l-8));i.style.setProperty("--color-picker-modal-left","".concat(c,"px")),i.style.setProperty("--color-picker-modal-top","".concat(u,"px"))}}},[e,t,i]),{modalRef:r,modalNode:i,attachModal:c}}function useRelocatedModalFocus(e,t){(0,n.useEffect)(function(){if(t&&e){var r,n=document.activeElement;return null==(r=e.focus)||r.call(e),function(){if(document.activeElement===document.body||!document.activeElement){var e;null==n||null==(e=n.focus)||e.call(n)}}}},[t,e])}function useDismissOnOutsideClick(e,t,r){(0,n.useEffect)(function(){function handleClickOutside(n){var o=n.target;e.current&&e.current.contains(o)||t.current&&t.current.contains(o)||r()}return document.addEventListener("mousedown",handleClickOutside),function(){document.removeEventListener("mousedown",handleClickOutside)}},[])}},127038(e,t,r){"use strict";r.d(t,{_:()=>useJiffyLocalShopper});var n=r(293534),o=r(927937);function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var r,n,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],l=!0,c=!1;try{for(o=o.call(e);!(l=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{l||null==o.return||o.return()}finally{if(c)throw n}}return i}}function _non_iterable_rest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);
1if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _array_like_to_array(e,t)}}function initialVerdict(){if("u"<typeof document)return!1;if(0===(0,o.Eg)()){var e=(0,o.ny)(document);if(e)return!0===e.blanks||(0,o.ph)(document)}return(0,o.Hm)()}function useJiffyLocalShopper(e){var t=_sliced_to_array((0,n.useState)(initialVerdict),2),r=t[0],i=t[1];return(0,n.useLayoutEffect)(function(){if(e){var t=!1,r=(0,o.Eg)();(0,o.KG)().then(function(){t||(0,o.Eg)()!==r||i((0,o.Hm)())});var n=(0,o.ZV)(function(e,t){t&&i((0,o.Hm)())});return function(){t=!0,n()}}},[e]),e&&r}},632397(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(483134),o=r(293534),i=r(81588),l=r(684723),c=r(741235),u=r(299410),d=r(508551),p=r(355698),f=r(927937),_=r(203687),h=r(586519),m=r(433769),g=r(497512),b=r(48859),y=r(119978),v=r(35451),w=r(298210),j=r(612141),k=r(643444),x=r(73916),S=r(538896),O=r(444636),P=r(2605);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var track=function(e,t){window.mixpanel?(0,m.track)(e,t):(0,_.B1)("mixpanel",function(){return(0,m.track)(e,t)})},A=["saved-carts","saved-carts-modal","promotion-banner","dates","free-shipping","favorite","payment-badges","payment-badges-modal","transfers-j1"];function SlotContainer(e){var t=e.html,r=(0,o.useRef)(null),i=(0,o.useRef)(!1);return(0,o.useEffect)(function(){r.current&&!i.current&&(i.current=!0,r.current.innerHTML=t)},[t]),(0,n.jsx)("div",{ref:r})}function extractSlots(e){var t={};return A.forEach(function(r){var o=e.dataset["slot".concat(r.split("-").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(""))];o&&(t[r]=function(){return(0,n.jsx)(SlotContainer,{html:o})})}),t}let __rspack_default_export=function(){return _async_to_generator(function(){var e,t,o,_,m,A,C,I,E,N,D,T,M,R,F,L,B,z,U,H,q,V,G,K,W,Q,J,Z,Y,X,ee,et,er,en,eo,ea,ei,es,el,ec,eu,ed,ep,ef,e_,eh,em,eg,eb,ey,ev,ew,ej,ek,ex,eS,eO,eP,eA,eC,eI,eE,eN,eD,eT,eM;return _ts_generator(this,function(eR){return b.g.refresh=function(){return S.dtfStore.refreshPdpDatesForCutoffWatch()},b.g.clearSnapshot=function(){return S.dtfStore.clearLastSubmittedPdpDatesPayload()},m=(_=JSON.parse((o=document.getElementById("vue-product-details-dtf")).dataset.appConfig)).variant,A=_.favorites,C=_.experiments,I=_.cached_artwork_prices,E=(0,u.Tm)(_.product),N=(0,u.Tm)(_.config_data),D=(0,u.Tm)(_.spangle_data),T=_.gang_sheet_data,R=(M=new URLSearchParams(window.location.search)).get("uploaded_artwork_ids")||(0,c.v8)("uploaded_artwork_ids")||null,F=M.get("buy_as_sticker_artwork_ids"),L=M.get("artwork_width"),B=M.get("artwork_height"),z=M.get("artwork_padding_size"),U=M.get("artwork_bg_color"),H=M.get("artwork_color"),q=M.get("artwork_shape"),G=null===(V=M.get("process_artwork"))||"true"===V,K=M.get("pre_cut"),W=M.get("buy_all_from_order"),Q=M.get("file_content_type")||null,J=M.get("source"),Z=(0,c.v8)("name")?"signed_in":"guest_user",Y=M.get("height"),X=M.get("style"),ee=M.get("color"),et=M.get("max_length"),er=M.get("font"),en=M.get("artwork_urls")||null,eo=M.get("design_id"),ea="true"===M.get("enhancements_started"),ei=M.get("dtf_channel_uuid"),es={},el=extractSlots(o),ec=o.dataset.locale||"en-US",eu=o.dataset.currentStore||null,ed=JSON.parse((null==o?void 0:o.getAttribute("data-imaging-promise"))||"null"),ep=S.dtfStore,ef=null,e_=!1,eh=!1,em=null,eg=null,eb=null,ey=(0,p.Mv)(),ev=function(){if(e_)return!0;
1if(null!==ef)return ef;if(eh&&!(0,f.TA)()&&!(0,f.d2)())return(0,f.kw)();var e,t=null==(e=document.querySelector('meta[name="jiffy-dtf-redraw-gate"]'))?void 0:e.getAttribute("content"),r="gated"===t||"off"===t,n=document.pdpDynamicData,o="boolean"==typeof(null==n?void 0:n.dallas_redraw_gated)||"boolean"==typeof(null==n?void 0:n.dallas_same_day_entry)||"boolean"==typeof(null==n?void 0:n.dallas_same_day_experience),i="boolean"==typeof(null==n?void 0:n.dallas_redraw_gated)?n.dallas_redraw_gated:!!(null==n?void 0:n.dallas_same_day_entry)||!!(null==n?void 0:n.dallas_same_day_experience);return!o&&!r&&(0,f.d2)()&&null!==em?em:"gated"===t||i||(0,f.kw)()||!o&&!r&&((0,f.d2)()||!eh&&!(0,f.TA)())},ew=null,ej=function(){ew=N.enableRedraw&&!ev(),ep.setEnableRedraw(ew)},ek=function(){var e=ew;ej(),e&&!ew&&ep.clearGatedRedrawFields()},ep.setShowCTA(N.showCta),ep.setIsMobile(N.mobile),ep.setPreCutDuration(N.preCutDuration),ep.setPreCutUpsellThreshold(N.preCutUpsellThreshold),ep.setAllowForceBgRemove(N.allowForceBgRemove),ep.setCanvaDtfEnabled(N.canvaDtfEnabled),ep.setForcePdpTransfersRedraw(N.forcePdpTransfersRedraw),ep.setPinBasedRedrawEnabled(N.pinBasedRedrawEnabled),ej(),(0,f.Cp)().then(function(){!(0,f.d2)()&&(eh=!0,(0,f.TA)()||e_||null!==ef||(em=(0,f.kw)())),ek()}).catch(function(){}),ep.setCanvaReviewer(N.canvaReviewer),ep.setShowMultiSize(N.showMultiSize),ep.setPaidExpertEditAddonEnabled(N.paidExpertEditAddonEnabled),ep.setMatchingShirtUpsellEnabled(N.matchingShirtUpsellEnabled),ep.setMatchingShirtOptions(N.matchingShirtOptions||[]),ep.setGangSheetCatalogNumbers(N.gangSheetCatalogNumbers||[]),ep.setEnableMobileFooterCTA(N.enableMobileFooterCta),ep.setCustomerReviewOnRedraws(N.customerReviewOnRedraws),ep.setCustomerReviewOnTransferRedraws(N.customerReviewOnTransferRedraws),ep.setPinSessionRecording(N.pinSessionRecording),ep.setPinSessionForceMixpanelRecording(N.pinSessionForceMixpanelRecording),ep.setCmykSoftProofEnabled(N.cmykSoftProofEnabled),ep.setDtfPollingFallbackAllCatalogs(!!N.dtfPollingFallbackAllCatalogs),ep.setTransferPdpBackButtonDetection(N.transferPdpBackButtonDetection),ep.setPreCutPrice(E.preCutPrice),ep.setPreCutEnabled(E.preCutEnabled),ep.setProductId(E.id),ep.setProductSlug(E.slug),ep.setPdpType(E.dtfPdpType),ep.setCatalogNumber(E.catalogNumber),ep.setPrintAsIs(E.printAsIs),ep.setNeckLabel(E.neckLabel),ep.setSticker(E.sticker),ep.setDtfMaxWidth(Number(E.uploadMaxWidth)),ep.setDtfMaxHeight(Number(E.uploadMaxHeight)),ep.setPrintAsIsMaxHeight(null!=E.printAsIsMaxHeight?Number(E.printAsIsMaxHeight):null),ep.setDtfMinWidth(Number(E.uploadMinWidth)),ep.setDtfMinHeight(Number(E.uploadMinHeight)),ep.setPrintingServiceName(E.printingServiceName),ep.setIsSpangle(E.isSpangle),ep.setIsProColor(E.isProColor),ep.setIsLetters(E.isLetters),ep.setBusinessLine(E.businessLine),ep.setIsPuff(E.isPuff),ep.setIsSticker(E.isSticker),ep.setIsDieCutSticker(E.isDieCutSticker),ep.setStickerPromoPrice(null!=(e=_.sticker_promo_price)?e:null),ep.setIsStickerSample(E.isStickerSample),ep.setIsJerseyNumbers(E.isJerseyNumbers),ep.setDtfCategory(E.dtfCategory),ep.setIsGoldFoil(E.isGoldFoil),ep.setReorderEnabled(E.reorderEnabled),ep.setIsDtfSheet(E.isDtfSheet),E.minOrderQuantity&&ep.setMinStickerQuantity(E.minOrderQuantity),ep.setSpangleAlgorithms(D.spangleVersionIdentifiers),ep.setSpangleColors(D.spangleColors),ep.setGangSheetBuilder("u">typeof gs_builder?gs_builder:null),ep.setGangSheetBuilderShopId(T.gang_sheet_builder_shop_id),ep.setShowGangSheetBuilderFeature(T.show_gang_sheet_builder_feature),ep.setGangSheetWidth225Exposed(T.gang_sheet_width_22_5_exposed),ep.setGangSheetBuilderSizes(T.gang_sheet_builder_sizes),ep.setVariantId(m.variant_id),ep.setFavorites(A),ep.setExperiments(C),ep.setUserType(Z),ep.setIsStaff(!!N.isStaff),ep.setCachedArtworkPrices(JSON.parse(I)),ep.setKlaviyoSmsTransactionalSubscribed(N.klaviyoSmsTransactionalSubscribed),ep.setSmsTransactionalSubscriptionPdpEnabled(N.smsTransactionalSubscriptionPdpEnabled),ep.setHidePdpRestockNotify(!!N.hidePdpRestockNotify),ep.setBogoEligibility(N.bogoEligibility||{visible:!1,reason:null}),ep.setBogoMaxDimensionLabel(N.bogoMaxDimensionLabel||'12"x12"'),ep.setPromotionResolution(N.promotionResolution||{winner:"none"}),ex=function(){var e;
1(null==(e=document.pdpDynamicData)?void 0:e.promotion_resolution)&&ep.setPromotionResolution((0,u.Tm)(document.pdpDynamicData.promotion_resolution)),r.e("7612").then(r.bind(r,403282)).then(function(e){e.default()}).catch(h.notifyError),Promise.resolve().then(r.bind(r,497512)).then(function(e){e.initAllBanners()}).catch(h.notifyError)},(null==(t=document.pdpDynamicData)?void 0:t.promotion_resolution)&&ex(),document.addEventListener("dynamicDataLoaded",ex),ej(),document.addEventListener("dynamicDataLoaded",ek),(0,f.ZV)(function(e,t){if(!t){e_||(eg=ew),e_=!0,ep.setZipTransitionPending(!0);var r=ew;if(ej(),r&&!ew){var n=ep.clearGatedRedrawFields({skipDateRefresh:!0});n&&(eb=n),eg=!1}return}if((0,f.d2)()){if((0,p.Mv)()===ey){e_=!1,ep.setZipTransitionPending(!1),eg=null,ev()?(ep.clearGatedRedrawFields({skipDateRefresh:!0}),eb=null):eb&&(ep.restoreGatedRedrawFields(eb),eb=null),ej();return}if(ep.setZipTransitionPending(!1),ej(),eg&&!ew){eg=!1;var o=ep.clearGatedRedrawFields({skipDateRefresh:!0});o&&(eb=o)}return}e_=!1,ep.setZipTransitionPending(!1),eg=null,ey=(0,p.Mv)(),(ef="boolean"==typeof e.redraw?e.redraw:!0===e.entry||!0===e.dallas)?(ep.clearGatedRedrawFields({skipDateRefresh:!0}),eb=null):eb&&(ep.restoreGatedRedrawFields(eb),eb=null),ej()}),E.isGangSheetBuilder&&(eO=(eS=T.gang_sheet_builder_variants)[Object.keys(eS)[0]],M.get("v")&&(eO=Object.values(eS).find(function(e){return e.catalog_number===M.get("v")})||eO),eP={height:B?Number(B):w.nk.height*w.OL,variantId:eO.variant_id},ep.updateGangSheetBuilderSettings(eP),ep.setIsGangSheetBuilder(E.isGangSheetBuilder),ep.setGangSheetBuilderVariants(eS),ep.setVariantId(eO.variant_id),ep.setProductSlug(eO.product_slug),ep.setGangSheetBuilderCarousels(T.gang_sheet_builder_carousels)),eA=function(){return(0,P.CI)(ep)},F&&!eA()&&(eC=(0,d.parseJsonArray)(decodeURIComponent(F)))&&eC.length&&ep.buyAsStickerById({artworkIds:eC}),R&&(eI=(0,d.parseJsonArray)(decodeURIComponent(R))||[],eN=(null==(eE=(0,d.parseArtworkUrls)(en))?void 0:eE.urlsObject)||{},eI.forEach(function(e,t){ep.setEmptyArtwork(e);var r=(0,O.VG)(Q),n={id:e,progress:25,progressMessage:"Processing file",processTimeStamp:Date.now(),width:L,height:B,originalIndex:t};!r&&eN[e]&&(n.url=eN[e],n.isFile=!0),ep.updateArtworkValuesById(n)}),es={artworkIds:eI,artworkWidth:L,artworkHeight:B,processArtwork:G,urlPreCut:K,fileContentType:Q,artworkPaddingSize:z,artworkBgColor:U,artworkColor:H,artworkShape:q},ep.setActionCableOptions(es)),eD=null,en&&Q&&!ea&&(eD={artworkUrls:en,fileContentType:Q}),E.sticker&&"gangsheet"===J&&("signed_in"!==Z||eA()||(ep.setShowArtworkHistoryModal(!0),ep.setStickerQrScanned(!0)),track("sticker_qr_scanned_on_gangsheets",{})),E.isJerseyNumbers&&Y&&X&&ee&&(ep.setLoadFromConfig(!1),ep.updateArtworkValues({index:0,height:Number(Y),color:ee,style:X}),eT="true"===K,ep.setPreCut(eT),ep.setEnablePreCut()),E.isLetters&&ee&&X&&et&&Y&&er&&(ep.setLoadFromConfig(!1),ep.updateArtworkValues({index:0,height:Number(Y),color:ee,style:X,maxLength:Number(et),font:er}),eM="true"===K,ep.setPreCut(eM),ep.setEnablePreCut()),W&&!eA()&&ep.buyArtworksAgainFromOrder(W),eo&&ep.setPreloadedDesignId(eo),window.history.scrollRestoration&&(window.history.scrollRestoration="manual"),ep.syncInventoryFromWindow(),(0,i.G)(o,"DTF Product Details").render((0,n.jsx)(x.w,{children:(0,n.jsx)(l.A,{locale:ec,defaultLocale:"en-US",messages:v.D,children:(0,n.jsx)(k.A,{locale:ec,currentStore:eu,imagingPromise:ed,slots:el,dtfPdpRedesign:!!N.dtfPdpRedesign,dtfPdpRedesignCatalogNumbers:N.dtfPdpRedesignCatalogNumbers||[]})})})),requestAnimationFrame(function(){var e=document.querySelector(".js-dtf-skeleton");null==e||e.classList.add("hidden"),(0,g.initAllBanners)(),(0,y.A)()}),ea&&ei&&en?ep.loadEnhancementArtwork({enhancementsStarted:ea,dtfChannelUuid:ei,rawArtworkUrls:en,artworkWidth:L,artworkHeight:B}):eD&&!R&&_async_to_generator(function(){var e,t,n,o,i,l;return _ts_generator(this,function(c){switch(c.label){case 0:if(c.trys.push([0,4,,5]),!(e=(0,d.parseArtworkUrls)(eD.artworkUrls)))return[2];if(t=e.imageUrl,n=e.artworkIds,o=e.lastArtworkId,!(n.length>0&&!eA()))return[3,3];return[4,r.e("292").then(r.bind(r,958527))];case 1:return[4,(0,c.sent().getFileFromUrl)(t,"artwork_image-".concat(Date.now()),eD.fileContentType)];case 2:i=c.sent(),ep.addFilesToQueue({files:[i],isDropEvent:!1,existingArtworkId:o}),(l=new URL(window.location)).searchParams.delete("artwork_urls"),l.searchParams.delete("file_content_type"),l.searchParams.delete("side"),window.history.replaceState({},"",l.toString()),c.label=3;case 3:return[3,5];case 4:return console.error("Error during AI Studio auto upload:",c.sent()),[3,5];case 5:return[2]}})})(),(0,j.mj)(),[2]})})()}},921079(e,t,r){"use strict";r.d(t,{Ay:()=>__rspack_default_export,dh:()=>provideNewCartsData});var n=r(299410),o=r(628629);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var provideNewCartsData=function(e){var t=e.customer,r=e.number;
1o.Ay.commit("setOrderNumber",r),o.Ay.commit("savedCarts/setSavedCartsCustomer",(0,n.Tm)(t))};let __rspack_default_export=function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:if(!document.querySelector(e))return[2];return o.Ay.dispatch("initializeStore",{}),[4,o.Ay.dispatch("savedCarts/loadSavedCarts")];case 1:return t.sent(),[2]}})})()}},163964(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(433769),o=r(277889),i=r(864188),l=r(122388),c=r(921079);function asyncGeneratorStep(e,t,r,n,o,i,l){try{var c=e[i](l),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function _next(e){asyncGeneratorStep(i,n,o,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(i,n,o,_next,_throw,"throw",e)}_next(void 0)})}}function _instanceof(e,t){return null!=t&&"u">typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _ts_generator(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(l,"next",{value:verb(0)}),c(l,"throw",{value:verb(1)}),c(l,"return",{value:verb(2)}),"function"==typeof Symbol&&c(l,Symbol.iterator,{value:function(){return this}}),l;function verb(e){return function(t){return step([e,t])}}function step(c){if(r)throw TypeError("Generator is already executing.");for(;l&&(l=0,c[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,n=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var u=".js-saved-carts-get-by-date-input",d="saved-carts-create-modal__input--invalid",p="saved-carts-create-modal__label--invalid",setMinLocalDate=function(){var e=document.querySelector(u);if(e){var t=new Date,r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0");e.min="".concat(r,"-").concat(n,"-").concat(o)}},initGetByDateSelector=function(){setMinLocalDate(),(0,l.on)("click",".js-saved-carts-get-by-date-input",function(e){e.target.showPicker()})};function __rspack_default_export(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=arguments.length>3&&void 0!==arguments[3]&&arguments[3],f=t.querySelector(e),_=document.querySelector(".js-create-modal-form");if(f&&_){var h=$(".js-saved-carts-create-modal");if(f.addEventListener("click",function(){h.modal("show"),(0,n.track)("saved_carts_new_cart_modal_opened"),null==r||r(),h.off("hidden.bs.modal").on("hidden.bs.modal",function(){var e;return null==(e=t.querySelector(".js-qty-form-saved-carts-input"))?void 0:e.focus()})}),!_.dataset.inited){var m=document.querySelectorAll(".js-saved-carts-create-modal-input"),g=document.querySelectorAll(".js-saved-carts-create-modal-close"),b=document.querySelector(".js-create-cart-submit"),y=_.querySelector("#js-cart-name-control"),inputHandler=function(e){var t=e.target;_instanceof(t,HTMLElement)&&(t.value?(t.classList.remove(d),t.nextElementSibling.classList.remove(p)):(t.classList.add(d),t.nextElementSibling.classList.add(p)))};["blur","input"].forEach(function(e){return y.addEventListener(e,function(e){inputHandler({target:e.target})})}),h.on("shown.bs.modal",function(){m.forEach(function(e){e.id===y.id?(e.focus(),e.placeholder="Cart Name",e.classList.remove(d),e.nextElementSibling.classList.remove(p),b.removeAttribute("disabled")):"notes-control"===e.id&&(e.placeholder="Add some notes")})}),m.forEach(function(e){e.addEventListener("blur",function(){(0,n.track)("saved_carts_new_cart_modal_".concat(e.id,"_updated"))})}),g.forEach(function(e){e.addEventListener("click",function(){h.modal("hide"),_.reset(),(0,n.track)("saved_carts_new_cart_modal_canceled")})});var getCurrentCartName=function(){var e;return null==(e=_.querySelector("#js-cart-name-control"))?void 0:e.value},getCurrentNotes=function(){var e;return null==(e=_.querySelector("#js-notes-control"))?void 0:e.value},getCurrentConsumerGuid=function(){var e;return null==(e=_.querySelector(".js-saved-carts-consumer-guid-input"))?void 0:e.value},getCurrentGetByDate=function(){var e;return null==(e=_.querySelector(u))?void 0:e.value},createCartRequest=function(){var e={saved_carts:{cart_name:getCurrentCartName(),notes:getCurrentNotes(),consumer_guid:getCurrentConsumerGuid(),get_by_date:getCurrentGetByDate()}};return o.api.account.savedCarts.create(e)},trackSavedCartCreated=function(){(0,n.track)("saved_carts_new_cart_modal_created",{name:getCurrentCartName(),created_at:new Date().toISOString()})};_.addEventListener("submit",function(e){return _async_to_generator(function(){var t;return _ts_generator(this,function(n){switch(n.label){case 0:if(e.preventDefault(),e.stopPropagation(),b.setAttribute("disabled","disabled"),y.classList.contains(d))return[2];if(!l)return[3,2];
1return[4,createCartRequest()];case 1:(t=n.sent()).items=0,t.amount="0.00",trackSavedCartCreated(),h.modal("hide"),_.reset(),(0,c.dh)({customer:{},number:null}),i.EventBus.publish(i.Events.SAVED_CART_CREATED,null,t),n.label=2;case 2:return r&&(trackSavedCartCreated(),_.submit()),[2]}})})()}),_.dataset.inited="true",initGetByDateSelector(),(0,c.Ay)("#saved-carts-create-modal-consumer")}}}},569278(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(433769);let __rspack_default_export=function(e){var t=$(".saved-carts-name-congrats-modal");document.querySelector(".js-saved-carts-name-congrats-modal-cart-name").textContent=e,t.modal("show"),(0,n.track)("saved_carts_first_name_congrats_modal_viewed")}},16095(e){"use strict";function a(e){let t=Object.create(null);return{on:function(r,n,o){if("function"!=typeof n)throw Error("callback is expected to be a function");let i=t[r];return i||(i=t[r]=[]),i.push({callback:n,ctx:o}),e},off:function(r,n){if(typeof r>"u")return t=Object.create(null),e;if(t[r])if("function"!=typeof n)delete t[r];else{let e=t[r];for(let t=0;t<e.length;++t)e[t].callback===n&&e.splice(t,1)}return e},fire:function(r){let n,o=t[r];if(!o)return e;arguments.length>1&&(n=Array.prototype.slice.call(arguments,1));for(let e=0;e<o.length;++e){let t=o[e];t.callback.apply(t.ctx,n)}return e}}}function s(e){if(!e)throw Error("Eventify cannot use falsy object as events subject");let t=["on","fire","off"];for(let r=0;r<t.length;++r)if(e.hasOwnProperty(t[r]))throw Error("Subject cannot be eventified, since it already has property '"+t[r]+"'")}e.exports=function(e){s(e);let t=a(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},937286(e,t,r){"use strict";function _assertThisInitialized(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{A:()=>_assertThisInitialized})},609883(e,t,r){"use strict";function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}r.d(t,{A:()=>_extends})},285896(e,t,r){"use strict";r.d(t,{A:()=>_inheritsLoose});var n=r(516891);function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,n.A)(e,t)}},959394(e,t,r){"use strict";function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}r.d(t,{A:()=>_objectWithoutPropertiesLoose})},516891(e,t,r){"use strict";function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,{A:()=>_setPrototypeOf})},133172(e,t,r){"use strict";function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,l,c=[],u=!0,d=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(e){d=!0,o=e}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw o}}return c}}function _nonIterableRest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}r.d(t,{A:()=>el});let n=Object.entries,o=Object.setPrototypeOf,i=Object.isFrozen,l=Object.getPrototypeOf,c=Object.getOwnPropertyDescriptor,u=Object.freeze,d=Object.
vendor: 5,979 bytes, line 1
1seal,p=Object.create,f="u">typeof Reflect&&Reflect,_=f.apply,h=f.construct;u||(u=function(e){return e}),d||(d=function(e){return e}),_||(_=function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return e.apply(t,n)}),h||(h=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return new e(...r)});let m=unapply(Array.prototype.forEach),g=unapply(Array.prototype.lastIndexOf),b=unapply(Array.prototype.pop),y=unapply(Array.prototype.push),v=unapply(Array.prototype.splice),w=Array.isArray,j=unapply(String.prototype.toLowerCase),k=unapply(String.prototype.toString),x=unapply(String.prototype.match),S=unapply(String.prototype.replace),O=unapply(String.prototype.indexOf),P=unapply(String.prototype.trim),A=unapply(Number.prototype.toString),C=unapply(Boolean.prototype.toString),I="u"<typeof BigInt?null:unapply(BigInt.prototype.toString),E="u"<typeof Symbol?null:unapply(Symbol.prototype.toString),N=unapply(Object.prototype.hasOwnProperty),D=unapply(Object.prototype.toString),T=unapply(RegExp.prototype.test),M=unconstruct(TypeError);function unapply(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return _(e,t,n)}}function unconstruct(e){return function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,r)}}function addToSet(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:j;if(o&&o(e,null),!w(t))return e;let n=t.length;for(;n--;){let o=t[n];if("string"==typeof o){let e=r(o);e!==o&&(i(t)||(t[n]=e),o=e)}e[o]=!0}return e}function cleanArray(e){for(let t=0;t<e.length;t++)N(e,t)||(e[t]=null);return e}function clone(e){let t=p(null);for(let o of n(e)){var r=_slicedToArray(o,2);let n=r[0],i=r[1];N(e,n)&&(w(i)?t[n]=cleanArray(i):i&&"object"==typeof i&&i.constructor===Object?t[n]=clone(i):t[n]=i)}return t}function stringifyValue(e){switch(typeof e){case"string":return e;case"number":return A(e);case"boolean":return C(e);case"bigint":return I?I(e):"0";case"symbol":return E?E(e):"Symbol()";case"undefined":default:return D(e);case"function":case"object":{if(null===e)return D(e);let t=lookupGetter(e,"toString");if("function"==typeof t){let r=t(e);return"string"==typeof r?r:D(r)}return D(e)}}}function lookupGetter(e,t){for(;null!==e;){let r=c(e,t);if(r){if(r.get)return unapply(r.get);if("function"==typeof r.value)return unapply(r.value)}e=l(e)}return function(){return null}}function isRegex(e){try{return T(e,""),!0}catch(e){return!1}}let R=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),B=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),z=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),H=u(["#text"]),q=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
1spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),V=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=u(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),W=d(/{{[\w\W]*|^[\w\W]*}}/g),Q=d(/<%[\w\W]*|^[\w\W]*%>/g),J=d(/\${[\w\W]*/g),Z=d(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=d(/^aria-[\-\w]+$/),X=d(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=d(/^(?:\w+script|data):/i),et=d(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),er=d(/^html$/i),en=d(/^[a-z][.\w]*(-[.\w]+)+$/i),eo=d(/<[/\w!]/g),ea=d(/<[/\w]/g),ei=d(/<\/no(script|embed|frames)/i),es=d(/\/>/i),_createTrustedTypesPolicy=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null,n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));let o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}},_createHooksMap=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_resolveSetOption=function(e,t,r,n){return N(e,t)&&w(e[t])?addToSet(n.base?clone(n.base):{},e[t],n.transform):r};function createDOMPurify(){let e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"u"<typeof window?null:window,DOMPurify=e=>createDOMPurify(e);if(DOMPurify.version="3.4.12",DOMPurify.removed=[],!r||!r.document||9!==r.document.nodeType||!r.Element)return DOMPurify.isSupported=!1,DOMPurify;let o=r.document,i=o,l=i.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,f=r.Node,_=r.Element,h=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let A=r.DOMParser,C=r.trustedTypes,I=_.prototype,E=lookupGetter(I,"cloneNode"),D=lookupGetter(I,"remove"),el=lookupGetter(I,"nextSibling"),ec=lookupGetter(I,"childNodes"),eu=lookupGetter(I,"parentNode"),ed=lookupGetter(I,"shadowRoot"),ep=lookupGetter(I,"attributes"),ef=f&&f.prototype?lookupGetter(f.prototype,"nodeType"):null,e_=f&&f.prototype?lookupGetter(f.prototype,"nodeName"):null;if("function"==typeof c){let e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let eh="",em=!1,eg=0,_assertNotInTrustedTypesPolicy=function(){if(eg>0)throw M('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},_createTrustedHTML=function(t){_assertNotInTrustedTypesPolicy(),eg++;try{return e.createHTML(t)}finally{eg--}},_createTrustedScriptURL=function(t){_assertNotInTrustedTypesPolicy(),eg++;try{return e.createScriptURL(t)}finally{eg--}},eb=o,ey=eb.implementation,ev=eb.createNodeIterator,ew=eb.createDocumentFragment,ej=eb.getElementsByTagName,ek=i.importNode,ex=_createHooksMap();DOMPurify.isSupported="function"==typeof n&&"function"==typeof eu&&ey&&void 0!==ey.createHTMLDocument;let eS=X,eO=null,eP=addToSet({},[...R,...F,...L,...z,...H]),eA=null,eC=addToSet({}
1,[...q,...V,...G,...K]),eI=Object.seal(p(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eE=null,eN=null,eD=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),eT=!0,eM=!0,eR=!1,eF=!0,eL=!1,eB=!0,ez=!1,eU=!1,eH=null,eV=null,eG=!1,eK=!1,eW=!1,eQ=!1,e$=!0,eJ=!1,eZ="user-content-",eY=!0,eX=!1,e0={},e1=null,e2=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),e3=null,e4=addToSet({},["audio","video","img","source","image","track"]),e5=null,e9=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),e8="http://www.w3.org/1998/Math/MathML",e6="http://www.w3.org/2000/svg",e7="http://www.w3.org/1999/xhtml",te=e7,tt=!1,tr=null,tn=addToSet({},[e8,e6,e7],k),to=u(["mi","mo","mn","ms","mtext"]),ta=addToSet({},to),ti=u(["annotation-xml"]),ts=addToSet({},ti),tl=addToSet({},["title","style","font","a","script"]),tc=null,tu=["application/xhtml+xml","text/html"],td=null,tp=null,tf=o.createElement("form"),isRegexOrFunction=function(e){return e instanceof RegExp||e instanceof Function},_parseConfig=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tp&&tp===r)return;r&&"object"==typeof r||(r={}),r=clone(r),td="application/xhtml+xml"===(tc=-1===tu.indexOf(r.PARSER_MEDIA_TYPE)?"text/html":r.PARSER_MEDIA_TYPE)?k:j,eO=_resolveSetOption(r,"ALLOWED_TAGS",eP,{transform:td}),eA=_resolveSetOption(r,"ALLOWED_ATTR",eC,{transform:td}),tr=_resolveSetOption(r,"ALLOWED_NAMESPACES",tn,{transform:k}),e5=_resolveSetOption(r,"ADD_URI_SAFE_ATTR",e9,{transform:td,base:e9}),e3=_resolveSetOption(r,"ADD_DATA_URI_TAGS",e4,{transform:td,base:e4}),e1=_resolveSetOption(r,"FORBID_CONTENTS",e2,{transform:td}),eE=_resolveSetOption(r,"FORBID_TAGS",clone({}),{transform:td}),eN=_resolveSetOption(r,"FORBID_ATTR",clone({}),{transform:td}),e0=!!N(r,"USE_PROFILES")&&(r.USE_PROFILES&&"object"==typeof r.USE_PROFILES?clone(r.USE_PROFILES):r.USE_PROFILES),eT=!1!==r.ALLOW_ARIA_ATTR,eM=!1!==r.ALLOW_DATA_ATTR,eR=r.ALLOW_UNKNOWN_PROTOCOLS||!1,eF=!1!==r.ALLOW_SELF_CLOSE_IN_ATTR,eL=r.SAFE_FOR_TEMPLATES||!1,eB=!1!==r.SAFE_FOR_XML,ez=r.WHOLE_DOCUMENT||!1,eK=r.RETURN_DOM||!1,eW=r.RETURN_DOM_FRAGMENT||!1,eQ=r.RETURN_TRUSTED_TYPE||!1,eG=r.FORCE_BODY||!1,e$=!1!==r.SANITIZE_DOM,eJ=r.SANITIZE_NAMED_PROPS||!1,eY=!1!==r.KEEP_CONTENT,eX=r.IN_PLACE||!1,eS=isRegex(r.ALLOWED_URI_REGEXP)?r.ALLOWED_URI_REGEXP:X,te="string"==typeof r.NAMESPACE?r.NAMESPACE:e7,ta=N(r,"MATHML_TEXT_INTEGRATION_POINTS")&&r.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof r.MATHML_TEXT_INTEGRATION_POINTS?clone(r.MATHML_TEXT_INTEGRATION_POINTS):addToSet({},to),ts=N(r,"HTML_INTEGRATION_POINTS")&&r.HTML_INTEGRATION_POINTS&&"object"==typeof r.HTML_INTEGRATION_POINTS?clone(r.HTML_INTEGRATION_POINTS):addToSet({},ti);let n=N(r,"CUSTOM_ELEMENT_HANDLING")&&r.CUSTOM_ELEMENT_HANDLING&&"object"==typeof r.CUSTOM_ELEMENT_HANDLING?clone(r.CUSTOM_ELEMENT_HANDLING):p(null);if(eI=p(null),N(n,"tagNameCheck")&&isRegexOrFunction(n.tagNameCheck)&&(eI.tagNameCheck=n.tagNameCheck),N(n,"attributeNameCheck")&&isRegexOrFunction(n.attributeNameCheck)&&(eI.attributeNameCheck=n.attributeNameCheck),N(n,"allowCustomizedBuiltInElements")&&"boolean"==typeof n.allowCustomizedBuiltInElements&&(eI.allowCustomizedBuiltInElements=n.allowCustomizedBuiltInElements),d(eI),eL&&(eM=!1),eW&&(eK=!0),e0&&(eO=addToSet({},H),eA=p(null),!0===e0.html&&(addToSet(eO,R),addToSet(eA,q)),!0===e0.svg&&(addToSet(eO,F),addToSet(eA,V),addToSet(eA,K)),!0===e0.svgFilters&&(addToSet(eO,L),addToSet(eA,V),addToSet(eA,K)),!0===e0.mathMl&&(addToSet(eO,z),addToSet(eA,G),addToSet(eA,K))),eD.tagCheck=null,eD.attributeCheck=null,N(r,"ADD_TAGS")&&("function"==typeof r.ADD_TAGS?eD.tagCheck=r.ADD_TAGS:w(r.ADD_TAGS)&&(eO===eP&&(eO=clone(eO)),addToSet(eO,r.ADD_TAGS,td))),N(r,"ADD_ATTR")&&("function"==typeof r.ADD_ATTR?eD.attributeCheck=r.ADD_ATTR:w(r.ADD_ATTR)&&(eA===eC&&(eA=clone(eA)),addToSet(eA,r.ADD_ATTR,td))),N(r,"ADD_URI_SAFE_ATTR")&&w(r.ADD_URI_SAFE_ATTR)&&addToSet(e5,r.ADD_URI_SAFE_ATTR,td),N(r,"FORBID_CONTENTS")&&w(r.FORBID_CONTENTS)&&(e1===e2&&(e1=clone(e1)),addToSet(e1,r.FORBID_CONTENTS,td)),N(r,"ADD_FORBID_CONTENTS")&&w(r.ADD_FORBID_CONTENTS)&&(e1===e2&&(e1=clone(e1)),addToSet(e1,r.ADD_FORBID_CONTENTS,td)),eY&&(eO["#text"]=!0),ez&&addToSet(eO,["html","head","body"]),eO.table&&(addToSet(eO,["tbody"]),delete eE.tbody),r.TRUSTED_TYPES_POLICY){if("function"!=typeof r.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof r.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let t=e;e=r.TRUSTED_TYPES_POLICY;try{eh=_createTrustedHTML("")}catch(r){throw e=t,r}}else null===r.TRUSTED_TYPES_POLICY?(e=void 0,eh=""):(void 0===e&&(em||(t=_createTrustedTypesPolicy(C,l),em=!0),e=t),e&&"string"==typeof eh&&(eh=_createTrustedHTML("")));u&&u(r),tp=r},t_=addToSet({},[...F,...L,...B]),th=addToSet({}
1,[...z,...U]),_checkValidNamespace=function(e){var t,r,n;let o=eu(e);o&&o.tagName||(o={namespaceURI:te,tagName:"template"});let i=j(e.tagName),l=j(o.tagName);return!!tr[e.namespaceURI]&&(e.namespaceURI===e6?(t=o).namespaceURI===e7?"svg"===i:t.namespaceURI===e8?"svg"===i&&("annotation-xml"===l||ta[l]):!!t_[i]:e.namespaceURI===e8?(r=o).namespaceURI===e7?"math"===i:r.namespaceURI===e6?"math"===i&&ts[l]:!!th[i]:e.namespaceURI===e7?((n=o).namespaceURI!==e6||!!ts[l])&&(n.namespaceURI!==e8||!!ta[l])&&!th[i]&&(tl[i]||!t_[i]):"application/xhtml+xml"===tc&&!!tr[e.namespaceURI])},_forceRemove=function(e){y(DOMPurify.removed,{element:e});try{eu(e).removeChild(e)}catch(t){if(D(e),!eu(e))throw M("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},_neutralizeRoot=function(e){_neutralizeSubtree(e);let t=ec(e);if(t){let e=[];m(t,t=>{y(e,t)}),m(e,e=>{try{D(e)}catch(e){}})}let r=ep(e);if(r)for(let t=r.length-1;t>=0;--t){let n=r[t],o=n&&n.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},_removeAttribute=function(e,t){try{y(DOMPurify.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){y(DOMPurify.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(eK||eW)try{_forceRemove(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_stripDisallowedAttributes=function(e){let t=ep(e);if(t)for(let r=t.length-1;r>=0;--r){let n=t[r],o=n&&n.name;if("string"==typeof o&&!eA[td(o)])try{e.removeAttribute(o)}catch(e){}}},_neutralizeSubtree=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(ef?ef(e):e.nodeType)===1&&_stripDisallowedAttributes(e);let r=ec(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},_neutralizePatchLinkage=function(e){if(!eB)return;let t=[e];for(;t.length>0;){let e=t.pop(),r=ef?ef(e):e.nodeType;if(7===r||8===r&&T(ea,e.data)){try{D(e)}catch(e){}continue}if(1===r){let t=td(e_?e_(e):e.nodeName);try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&"label"!==t&&"output"!==t&&e.removeAttribute("for")}catch(e){}}let n=ec(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},_initDocument=function(t){let r=null,n=null;if(eG)t="<remove></remove>"+t;else{let e=x(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===tc&&te===e7&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");let i=e?_createTrustedHTML(t):t;if(te===e7)try{r=new A().parseFromString(i,tc)}catch(e){}if(!r||!r.documentElement){r=ey.createDocument(te,"template",null);try{r.documentElement.innerHTML=tt?eh:i}catch(e){}}let l=r.body||r.documentElement;return(t&&n&&l.insertBefore(o.createTextNode(n),l.childNodes[0]||null),te===e7)?ej.call(r,ez?"html":"body")[0]:ez?r.documentElement:l},_createNodeIterator=function(e){return ev.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},_stripTemplateExpressions=function(e){return e=S(e,W," "),e=S(e,Q," "),e=S(e,J," ")},_scrubTemplateExpressions2=function(e){var t;e.normalize();let r=ev.call(e.ownerDocument||e,e,h.SHOW_TEXT|h.SHOW_COMMENT|h.SHOW_CDATA_SECTION|h.SHOW_PROCESSING_INSTRUCTION,null),n=r.nextNode();for(;n;)n.data=_stripTemplateExpressions(n.data),n=r.nextNode();let o=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");o&&m(o,e=>{_isDocumentFragment(e.content)&&_scrubTemplateExpressions2(e.content)})},_isClobbered=function(e){let t=e_?e_(e):null;return"string"==typeof t&&"form"===td(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==ep(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==ef(e)||e.childNodes!==ec(e))},_isDocumentFragment=function(e){if(!ef||"object"!=typeof e||null===e)return!1;try{return 11===ef(e)}catch(e){return!1}},_isNode=function(e){if(!ef||"object"!=typeof e||null===e)return!1;try{return"number"==typeof ef(e)}catch(e){return!1}};function _executeHooks(e,t,r){0!==e.length&&m(e,e=>{e.call(DOMPurify,t,r,tp)})}let _sanitizeDisallowedNode=function(e,t){if(!eE[t]&&_isBasicCustomElement(t)&&(eI.tagNameCheck instanceof RegExp&&T(eI.tagNameCheck,t)||eI.tagNameCheck instanceof Function&&eI.tagNameCheck(t)))return!1;if(eY&&!e1[t]){let t=eu(e),r=ec(e);if(r&&t){let n=r.length;for(let o=n-1;o>=0;--o){let n=eX?r[o]:E(r[o],!0);t.insertBefore(n,el(e))}}}return _forceRemove(e),!0},_sanitizeElements=function(e,t){if(_executeHooks(ex.beforeSanitizeElements,e,null),e!==t&&null===eu(e))return!0;
1if(_isClobbered(e))return _forceRemove(e),!0;let r=td(e_?e_(e):e.nodeName);if(_executeHooks(ex.uponSanitizeElement,e,{tagName:r,allowedTags:eO}),e!==t&&null===eu(e))return!0;if(eB&&e.hasChildNodes()&&!_isNode(e.firstElementChild)&&T(eo,e.textContent)&&T(eo,e.innerHTML)||eB&&e.namespaceURI===e7&&"style"===r&&_isNode(e.firstElementChild)||7===e.nodeType||eB&&8===e.nodeType&&T(ea,e.data))return _forceRemove(e),!0;if(eE[r]||!(eD.tagCheck instanceof Function&&eD.tagCheck(r))&&!eO[r]){let t=_sanitizeDisallowedNode(e,r);return!1===t&&_executeHooks(ex.afterSanitizeElements,e,null),t}if((ef?ef(e):e.nodeType)===1&&!_checkValidNamespace(e)||("noscript"===r||"noembed"===r||"noframes"===r)&&T(ei,e.innerHTML))return _forceRemove(e),!0;if(eL&&3===e.nodeType){let t=_stripTemplateExpressions(e.textContent);e.textContent!==t&&(y(DOMPurify.removed,{element:e.cloneNode()}),e.textContent=t)}return _executeHooks(ex.afterSanitizeElements,e,null),!1},_isValidAttribute=function(e,t,r){if(eN[t]||eB&&"patchsrc"===t||eB&&"for"===t&&"label"!==e&&"output"!==e||e$&&("id"===t||"name"===t)&&(r in o||r in tf))return!1;let n=eA[t]||eD.attributeCheck instanceof Function&&eD.attributeCheck(t,e);if(eM&&T(Z,t));else if(eT&&T(Y,t));else if(n){if(e5[t]);else if(T(eS,S(r,et,"")));else if(("src"===t||"xlink:href"===t||"href"===t)&&"script"!==e&&0===O(r,"data:")&&e3[e]);else if(eR&&!T(ee,S(r,et,"")));else if(r)return!1}else if(!(_isBasicCustomElement(e)&&(eI.tagNameCheck instanceof RegExp&&T(eI.tagNameCheck,e)||eI.tagNameCheck instanceof Function&&eI.tagNameCheck(e))&&(eI.attributeNameCheck instanceof RegExp&&T(eI.attributeNameCheck,t)||eI.attributeNameCheck instanceof Function&&eI.attributeNameCheck(t,e))||"is"===t&&eI.allowCustomizedBuiltInElements&&(eI.tagNameCheck instanceof RegExp&&T(eI.tagNameCheck,r)||eI.tagNameCheck instanceof Function&&eI.tagNameCheck(r))))return!1;return!0},tm=addToSet({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),_isBasicCustomElement=function(e){return!tm[j(e)]&&T(en,e)},_applyTrustedTypesToAttribute=function(t,r,n,o){if(e&&"object"==typeof C&&"function"==typeof C.getAttributeType&&!n)switch(C.getAttributeType(t,r)){case"TrustedHTML":return _createTrustedHTML(o);case"TrustedScriptURL":return _createTrustedScriptURL(o)}return o},_setAttributeValue=function(e,t,r,n){try{r?e.setAttributeNS(r,t,n):e.setAttribute(t,n),_isClobbered(e)?_forceRemove(e):b(DOMPurify.removed)}catch(r){_removeAttribute(t,e)}},_sanitizeAttributes=function(e){_executeHooks(ex.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||_isClobbered(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eA,forceKeepAttr:void 0},n=t.length,o=td(e.nodeName);for(;n--;){let i=t[n],l=i.name,c=i.namespaceURI,u=i.value,d=td(l),p="value"===l?u:P(u);if(r.attrName=d,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,_executeHooks(ex.uponSanitizeAttribute,e,r),p=r.attrValue,eJ&&("id"===d||"name"===d)&&0!==O(p,eZ)&&(_removeAttribute(l,e),p=eZ+p),eB&&T(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===d&&x(p,"href")){_removeAttribute(l,e);continue}if(!r.forceKeepAttr){if(!r.keepAttr||!eF&&T(es,p)||(eL&&(p=_stripTemplateExpressions(p)),!_isValidAttribute(o,d,p))){_removeAttribute(l,e);continue}(p=_applyTrustedTypesToAttribute(o,d,c,p))!==u&&_setAttributeValue(e,l,c,p)}}_executeHooks(ex.afterSanitizeAttributes,e,null)},_sanitizeShadowDOM2=function(e){let t=null,r=_createNodeIterator(e);for(_executeHooks(ex.beforeSanitizeShadowDOM,e,null);t=r.nextNode();)if(_executeHooks(ex.uponSanitizeShadowNode,t,null),_sanitizeElements(t,e),_sanitizeAttributes(t),_isDocumentFragment(t.content)&&_sanitizeShadowDOM2(t.content),(ef?ef(t):t.nodeType)===1){let e=ed(t);_isDocumentFragment(e)&&(_sanitizeAttachedShadowRoots(e),_sanitizeShadowDOM2(e))}_executeHooks(ex.afterSanitizeShadowDOM,e,null)},_sanitizeAttachedShadowRoots=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){_sanitizeShadowDOM2(e.shadow);continue}let r=e.node,n=(ef?ef(r):r.nodeType)===1,o=ec(r);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(n){let e=e_?e_(r):null;if("string"==typeof e&&"template"===td(e)){let e=r.content;_isDocumentFragment(e)&&t.push({node:e,shadow:null})}}if(n){let e=ed(r);_isDocumentFragment(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return DOMPurify.sanitize=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,l=null,c=null;if((tt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_isNode(t)&&"string"!=typeof(t=stringifyValue(t)))throw M("dirty is not a string, aborting");if(!DOMPurify.isSupported)return t;eU?(eO=eH,eA=eV):_parseConfig(r),(ex.uponSanitizeElement.length>0||ex.uponSanitizeAttribute.length>0)&&(eO=clone(eO)),ex.uponSanitizeAttribute.length>0&&(eA=clone(eA)),DOMPurify.removed=[];let u=eX&&"string"!=typeof t&&_isNode(t);if(u){_neutralizePatchLinkage(t);let e=e_?e_(t):t.nodeName;if("string"==typeof e){let r=td(e);if(!eO[r]||eE[r])throw _neutralizeRoot(t),M("root node is forbidden and cannot be sanitized in-place")}if(_isClobbered(t))throw _neutralizeRoot(t),M("root node is clobbered and cannot be sanitized in-place");try{_sanitizeAttachedShadowRoots(t)}catch(e){throw _neutralizeRoot(t),e}}else if(_isNode(t))1===(o=(n=_initDocument("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o),_sanitizeAttachedShadowRoots(o);else{if(!eK&&!eL&&!ez&&-1===t.indexOf("<"))return e&&eQ?_createTrustedHTML(t):t;if(!(n=_initDocument(t)))return eK?null:eQ?eh:""}n&&eG&&_forceRemove(n.firstChild);let d=u?t:n,p=_createNodeIterator(d);try{for(;l=p.nextNode();)_sanitizeElements(l,d),_sanitizeAttributes(l),_isDocumentFragment(l.content)&&_sanitizeShadowDOM2(l.content)}catch(e){throw u&&(_neutralizeRoot(t),m(DOMPurify.removed,e=>{e.element&&_neutralizeSubtree(e.element)})),e}if(u)return m(DOMPurify.removed,e=>{e.element&&_neutralizeSubtree(e.element)}),eL&&_scrubTemplateExpressions2(t),t;if(eK){if(eL&&_scrubTemplateExpressions2(n),eW)for(c=ew.call(n.ownerDocument);n.firstChild;)c.appendChild(n.firstChild);else c=n;return(eA.shadowroot||eA.shadowrootmode)&&(c=ek.call(i,c,!0)),c}let f=ez?n.outerHTML:n.innerHTML;return ez&&eO["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(er,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),eL&&(f=_stripTemplateExpressions(f)),e&&eQ?_createTrustedHTML(f):f},DOMPurify.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_parseConfig(e),eU=!0,eH=eO,eV=eA},DOMPurify.clearConfig=function(){tp=null,eU=!1,eH=null,eV=null,e=t,eh=""},DOMPurify.isValidAttribute=function(e,t,r){return tp||_parseConfig({}),_isValidAttribute(td(e),td(t),r)},DOMPurify.addHook=function(e,t){"function"!=typeof t||N(ex,e)&&y(ex[e],t)},DOMPurify.removeHook=function(e,t){if(N(ex,e)){if(void 0!==t){let r=g(ex[e],t);return -1===r?void 0:v(ex[e],r,1)[0]}return b(ex[e])}},DOMPurify.removeHooks=function(e){N(ex,e)&&(ex[e]=[])},DOMPurify.removeAllHooks=function(){ex=_createHooksMap()},DOMPurify}var el=createDOMPurify()},684204(e,t,r){"use strict";r.d(t,{ht:()=>I,jM:()=>C});var n,o=Symbol.for("immer-nothing"),i=Symbol.for("immer-draftable"),l=Symbol.for("immer-state");function die(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var c=Object,u=c.getPrototypeOf,d="constructor",p="prototype",f="configurable",_="enumerable",h="writable",m="value",isDraft=e=>!!e&&!!e[l];function isDraftable(e){return!!e&&(isPlainObject(e)||y(e)||!!e[
1i]||!!e[d]?.[i]||isMap(e)||isSet(e))}var g=c[p][d].toString(),b=new WeakMap;function isPlainObject(e){if(!e||!isObjectish(e))return!1;let t=u(e);if(null===t||t===c[p])return!0;let r=c.hasOwnProperty.call(t,d)&&t[d];if(r===Object)return!0;if(!isFunction(r))return!1;let n=b.get(r);return void 0===n&&(n=Function.toString.call(r),b.set(r,n)),n===g}function each(e,t,r=!0){0===getArchtype(e)?(r?Reflect.ownKeys(e):c.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function getArchtype(e){let t=e[l];return t?t.type_:y(e)?1:isMap(e)?2:3*!!isSet(e)}var has=(e,t,r=getArchtype(e))=>2===r?e.has(t):c[p].hasOwnProperty.call(e,t),get=(e,t,r=getArchtype(e))=>2===r?e.get(t):e[t],set=(e,t,r,n=getArchtype(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r};function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var y=Array.isArray,isMap=e=>e instanceof Map,isSet=e=>e instanceof Set,isObjectish=e=>"object"==typeof e,isFunction=e=>"function"==typeof e;function isArrayIndex(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var getFinalValue=e=>e.modified_?e.copy_:e.base_;function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(y(e))return Array[p].slice.call(e);let r=isPlainObject(e);if(!0!==t&&("class_only"!==t||r)){let t=u(e);if(null!==t&&r)return{...e};let n=c.create(t);return c.assign(n,e)}{let t=c.getOwnPropertyDescriptors(e);delete t[l];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let o=r[n],i=t[o];!1===i[h]&&(i[h]=!0,i[f]=!0),(i.get||i.set)&&(t[o]={[f]:!0,[h]:!0,[_]:i[_],[m]:e[o]})}return c.create(u(e),t)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&c.defineProperties(e,{set:v,add:v,clear:v,delete:v}),c.freeze(e),t&&each(e,(e,t)=>{freeze(t,!0)},!1)),e}var v={[m]:function(){die(2)}};function isFrozen(e){return!(null!==e&&isObjectish(e))||c.isFrozen(e)}var w="MapSet",j="Patches",k="ArrayMethods",x={};function getPlugin(e){let t=x[e];return t||die(0,e),t}var isPluginLoaded=e=>!!x[e];function usePatchesInScope(e,t){t&&(e.patchPlugin_=getPlugin(j),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===n&&(n=e.parent_)}var enterScope=e=>n={drafts_:[],parent_:n,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(w)?getPlugin(w):void 0,arrayMethodsPlugin_:isPluginLoaded(k)?getPlugin(k):void 0};function revokeDraft(e){let t=e[l];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[l].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[l].base_,e,t)}else e=finalize(t,r);return maybeFreeze(t,e,!0),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==o?e:void 0}function finalize(e,t){if(isFrozen(t))return t;let r=t[l];if(!r)return handleValue(t,e.handledSet_,e);if(!isSameScope(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);generatePatchesAndFinalize(r,e)}return r.copy_}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function markStateFinalized(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var isSameScope=(e,t)=>e.scope_===t,S=[];function updateDraftInParent(e,t,r,n){let o=e.copy_||e.base_,i=e.type_;if(void 0!==n&&get(o,n,i)===t)return void set(o,n,r,i);if(!e.draftLocations_){let t=e.draftLocations_=new Map;each(o,(e,r)=>{if(isDraft(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??S)set(o,n,r,i)}function registerChildFinalizationCallback(e,t,r){e.callbacks_.push(function(n){if(!t||!isSameScope(t,n))return;n.mapSetPlugin_?.fixSetContents(t);let o=getFinalValue(t);updateDraftInParent(e,t.draft_??t,o,r),generatePatchesAndFinalize(t,n)})}function generatePatchesAndFinalize(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}markStateFinalized(e)}}function handleCrossReference(e,t,r){let{scope_:n}=e;if(isDraft(r)){let o=r[l];isSameScope(o,n)&&o.callbacks_.push(function(){prepareCopy(e),updateDraftInParent(e,r,getFinalValue(o),t)}
1)}else isDraftable(r)&&e.callbacks_.push(function(){let o=e.copy_||e.base_;3===e.type_?o.has(r)&&handleValue(r,n.handledSet_,n):get(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&handleValue(get(e.copy_,t,e.type_),n.handledSet_,n)})}function handleValue(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||isDraft(e)||t.has(e)||!isDraftable(e)||isFrozen(e)||(t.add(e),each(e,(n,o)=>{if(isDraft(o)){let t=o[l];isSameScope(t,r)&&(set(e,n,getFinalValue(t),e.type_),markStateFinalized(t))}else isDraftable(o)&&handleValue(o,t,r)})),e}function createProxyProxy(e,t){let r=y(e),o={type_:+!!r,scope_:t?t.scope_:n,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=o,l=O;r&&(i=[o],l=P);let{revoke:c,proxy:u}=Proxy.revocable(i,l);return o.draft_=u,o.revoke_=c,[u,o]}var O={get(e,t){if(t===l)return e;let r=e.scope_.arrayMethodsPlugin_,n=1===e.type_&&"string"==typeof t;if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=e.copy_||e.base_;if(!has(o,t,e.type_))return readPropFromProto(e,o,t);let i=o[t];if(e.finalized_||!isDraftable(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&isArrayIndex(t))return i;if(i===peek(e.base_,t)){prepareCopy(e);let r=1===e.type_?+t:t,n=createProxy(e.scope_,i,e,r);return e.copy_[r]=n}return i},has:(e,t)=>t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,r){let n=getDescriptorFromProto(e.copy_||e.base_,t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=peek(e.copy_||e.base_,t),o=n?.[l];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(is(r,n)&&(void 0!==r||has(e.base_,t,e.type_)))return!0;prepareCopy(e),markChanged(e)}return!!(e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||(e.copy_[t]=r,e.assigned_.set(t,!0),handleCrossReference(e,t,r),!0)},deleteProperty:(e,t)=>(prepareCopy(e),void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),markChanged(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=e.copy_||e.base_,n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[h]:!0,[f]:1!==e.type_||"length"!==t,[_]:n[_],[m]:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>u(e.base_),setPrototypeOf(){die(12)}},P={};for(let e in O){let t=O[e];P[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function peek(e,t){let r=e[l];return(r?r.copy_||r.base_:e)[t]}function readPropFromProto(e,t,r){let n=getDescriptorFromProto(t,r);return n?m in n?n[m]:n.get?.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=u(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=u(r)}}function markChanged(e){!e.modified_&&(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.assigned_=new Map,e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function createProxy(e,t,r,o){let[i,l]=isMap(t)?getPlugin(w).proxyMap_(t,r):isSet(t)?getPlugin(w).proxySet_(t,r):createProxyProxy(t,r);return(r?.scope_??n).drafts_.push(i),l.callbacks_=r?.callbacks_??[],l.key_=o,r&&void 0!==o?registerChildFinalizationCallback(r,l,o):l.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(l);let{patchPlugin_:t}=e;l.modified_&&t&&t.generatePatches_(l,[],e)}),i}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){let t;if(!isDraftable(e)||isFrozen(e))return e;let r=e[l],n=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,t=shallowCopy(e,r.scope_.immer_.useStrictShallowCopy_),n=r.scope_.immer_.shouldUseStrictIteration()}else t=shallowCopy(e,!0);return each(t,(e,r)=>{set(t,e,currentImpl(r))},n),r&&(r.finalized_=!1),t}P.deleteProperty=function(e,t){return P.set.call(this,e,t,void 0)},P.set=function(e,t,r){return O.set.call(this,e[0],t,r,e[0])};var A=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(isFunction(e)&&!isFunction(t)){let r=t;t=e;let n=this;return function(e=r,...o){return n.produce(e,e=>t.call(this,e,...o))}}if(isFunction(t)||die(6),void 0===r||isFunction(r)||die(7),isDraftable(e)){let o=enterScope(this),i=createProxy(o,e,void 0),l=!0;try{n=t(i),l=!1}finally{l?revokeScope(o):leaveScope(o)}return usePatchesInScope(o,r),processResult(n,o)}if(e&&isObjectish(e))die(1,e);else{if(void 0===(n=t(e))&&(n=e),n===o&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){let t=[],o=[];getPlugin(j).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:o}),r(t,o)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return isFunction(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));let t=enterScope(this),r=createProxy(t,e,void 0);return r[l].isManual_=!0,leaveScope(t),r}finishDraft(e,t){let r=e&&e[l];r&&r.isManual_||die(9);let{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];
1if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=getPlugin(j).applyPatches_;return isDraft(e)?n(e,t):this.produce(e,e=>n(e,t))}},C=A.produce,I=A.setAutoFreeze.bind(A)},492624(e,t,r){"use strict";r.d(t,{Pj:()=>useStore,Xr:()=>useSetAtom,fp:()=>useAtom,md:()=>useAtomValue});var n=r(293534),o=r(802436),i=r(758151);let l=(0,n.createContext)(void 0);function useStore(e){let t=(0,n.useContext)(l);return(null==e?void 0:e.store)||t||(0,o.zp)()}let isPromiseLike=e=>"function"==typeof(null==e?void 0:e.then),attachPromiseStatus=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},c=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw attachPromiseStatus(e),e}),u=new WeakMap,createContinuablePromise=(e,t)=>{let r=u.get(e);return r||(r=new Promise((n,o)=>{let l=e,onFulfilled=e=>t=>{l===e&&n(t)},onRejected=e=>t=>{l===e&&o(t)},onAbort=()=>{try{let e=t();isPromiseLike(e)?(u.set(e,r),l=e,e.then(onFulfilled(e),onRejected(e)),(0,i.MO)(e,onAbort)):n(e)}catch(e){o(e)}};e.then(onFulfilled(e),onRejected(e)),(0,i.MO)(e,onAbort)}),u.set(e,r)),r};function useAtomValue(e,t){let{delay:r,unstable_promiseStatus:o=!n.use}=t||{},i=useStore(t),[[l,u,d],p]=(0,n.useReducer)(t=>{let r=i.get(e);return Object.is(t[0],r)&&t[1]===i&&t[2]===e?t:[r,i,e]},void 0,()=>[i.get(e),i,e]),f=l;if((u!==i||d!==e)&&(p(),f=i.get(e)),(0,n.useEffect)(()=>{let t=i.sub(e,()=>{if(o)try{let t=i.get(e);isPromiseLike(t)&&attachPromiseStatus(createContinuablePromise(t,()=>i.get(e)))}catch(e){}"number"==typeof r?setTimeout(p,r):p()});return p(),t},[i,e,r,o]),(0,n.useDebugValue)(f),isPromiseLike(f)){let t=createContinuablePromise(f,()=>i.get(e));return o&&attachPromiseStatus(t),c(t)}return f}function useSetAtom(e,t){let r=useStore(t);return(0,n.useCallback)((...t)=>{if(!("write"in e))throw Error("not writable atom");return r.set(e,...t)},[r,e])}function useAtom(e,t){return[useAtomValue(e,t),useSetAtom(e,t)]}},802436(e,t,r){"use strict";let n,o;r.d(t,{eU:()=>atom,y$:()=>createStore,zp:()=>getDefaultStore});var i=r(758151);let l=0;function atom(e,t){let r=`atom${++l}`,n={toString(){return this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?n.read=e:(n.init=e,n.read=defaultRead,n.write=defaultWrite),t&&(n.write=t),n}function defaultRead(e){return e(this)}function defaultWrite(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}function createStore(){return n?n():(0,i.ff)()}function getDefaultStore(){return o||(o=createStore(),globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=o),globalThis.__JOTAI_DEFAULT_STORE__!==o&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044")),o}},758151(e,t,r){"use strict";function isActuallyWritableAtom(e){return!!e.write}function isAtomStateInitialized(e){return"v"in e||"e"in e}function returnAtomValue(e){if("e"in e)throw e.e;if(!("v"in e))throw Error("[Bug] atom state is not initialized");return e.v}r.d(t,{MO:()=>registerAbortHandler,ff:()=>buildStore});let n=new WeakMap;function isPendingPromise(e){var t;return isPromiseLike(e)&&!!(null==(t=n.get(e))?void 0:t[0])}function abortPromise(e){let t=n.get(e);(null==t?void 0:t[0])&&(t[0]=!1,t[1].forEach(e=>e()))}function registerAbortHandler(e,t){let r=n.get(e);if(!r){r=[!0,new Set],n.set(e,r);let settle=()=>{r[0]=!1};e.then(settle,settle)}r[1].add(t)}function isPromiseLike(e){return"function"==typeof(null==e?void 0:e.then)}function addPendingPromiseToDependency(e,t,r){if(!r.p.has(e)){r.p.add(e);let cleanup=()=>r.p.delete(e);t.then(cleanup,cleanup)}}function getMountedOrPendingDependents(e,t,r){var n;let o=new Set;for(let t of(null==(n=r.get(e))?void 0:n.t)||[])o.add(t);for(let e of t.p)o.add(e);return o}let BUILDING_BLOCK_atomRead=(e,t,...r)=>t.read(...r),BUILDING_BLOCK_atomWrite=(e,t,...r)=>t.write(...r),BUILDING_BLOCK_atomOnInit=(e,t)=>{var r;return null==(r=t.INTERNAL_onInit)?void 0:r.call(t,e)},BUILDING_BLOCK_atomOnMount=(e,t,r)=>{var n;return null==(n=t.onMount)?void 0:n.call(t,r)},BUILDING_BLOCK_ensureAtomState=(e,t)=>
1{var r;let n=getInternalBuildingBlocks(e),o=n[0],i=n[6],l=n[9];if(!t)throw Error("Atom is undefined or null");let c=o.get(t);return c||(c={d:new Map,p:new Set,n:0},o.set(t,c),null==(r=i.i)||r.call(i,t),null==l||l(e,t)),c},BUILDING_BLOCK_flushCallbacks=e=>{let t=getInternalBuildingBlocks(e),r=t[1],n=t[3],o=t[4],i=t[5],l=t[6],c=t[13],u=[],call=e=>{try{e()}catch(e){u.push(e)}};do{l.f&&call(l.f);let t=new Set,u=t.add.bind(t);n.forEach(e=>{var t;return null==(t=r.get(e))?void 0:t.l.forEach(u)}),n.clear(),i.forEach(u),i.clear(),o.forEach(u),o.clear(),t.forEach(call),n.size&&c(e)}while(n.size||i.size||o.size);if(u.length)throw AggregateError(u)},BUILDING_BLOCK_recomputeInvalidatedAtoms=e=>{let t=getInternalBuildingBlocks(e),r=t[1],n=t[2],o=t[3],i=t[11],l=t[14],c=t[17],u=[],d=new WeakSet,p=new WeakSet,f=Array.from(o);for(;f.length;){let t=f[f.length-1],o=i(e,t);if(p.has(t)){f.pop();continue}if(d.has(t)){if(n.get(t)===o.n)u.push([t,o]);else if(n.has(t))throw Error("[Bug] invalidated atom exists");p.add(t),f.pop();continue}for(let e of(d.add(t),getMountedOrPendingDependents(t,o,r)))d.has(e)||f.push(e)}for(let t=u.length-1;t>=0;--t){let[r,i]=u[t],d=!1;for(let e of i.d.keys())if(e!==r&&o.has(e)){d=!0;break}d&&(l(e,r),c(e,r)),n.delete(r)}},o=new WeakSet,BUILDING_BLOCK_readAtomState=(e,t)=>{var r,n;let i,l,c=getInternalBuildingBlocks(e),u=c[1],d=c[2],p=c[3],f=c[6],_=c[7],h=c[11],m=c[12],g=c[13],b=c[14],y=c[16],v=c[17],w=c[20],j=h(e,t);if(isAtomStateInitialized(j)){if(u.has(t)&&d.get(t)!==j.n)return j;let r=!1;for(let[t,n]of j.d)if(b(e,t).n!==n){r=!0;break}if(!r)return j}j.d.clear();let k=!0;function mountDependenciesIfAsync(){u.has(t)&&(v(e,t),g(e),m(e))}function getter(r){var n;if(r===t){let t=h(e,r);if(!isAtomStateInitialized(t))if("init"in r)w(e,r,r.init);else throw Error("no atom init");return returnAtomValue(t)}let o=b(e,r);try{return returnAtomValue(o)}finally{j.d.set(r,o.n),isPendingPromise(j.v)&&addPendingPromiseToDependency(t,j.v,o),u.has(t)&&(null==(n=u.get(r))||n.t.add(t)),k||mountDependenciesIfAsync()}}let x=j.n;try{o.delete(e);let n=_(e,t,getter,{get signal(){return i||(i=new AbortController),i.signal},get setSelf(){return console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),isActuallyWritableAtom(t)||console.warn("setSelf function cannot be used with read-only atom"),!l&&isActuallyWritableAtom(t)&&(l=(...r)=>{if(k&&console.warn("setSelf function cannot be called in sync"),!k)try{return y(e,t,...r)}finally{g(e),m(e)}}),l}});return o.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),w(e,t,n),isPromiseLike(n)&&(registerAbortHandler(n,()=>null==i?void 0:i.abort()),n.then(mountDependenciesIfAsync,mountDependenciesIfAsync)),null==(r=f.r)||r.call(f,t),j}catch(e){return delete j.v,j.e=e,++j.n,j}finally{k=!1,x!==j.n&&d.get(t)===x&&(d.set(t,j.n),p.add(t),null==(n=f.c)||n.call(f,t))}},BUILDING_BLOCK_invalidateDependents=(e,t)=>{let r=getInternalBuildingBlocks(e),n=r[1],o=r[2],i=r[11],l=[t];for(;l.length;){let t=l.pop(),r=i(e,t);for(let c of getMountedOrPendingDependents(t,r,n)){let t=i(e,c);o.set(c,t.n),l.push(c)}}},BUILDING_BLOCK_writeAtomState=(e,t,...r)=>{let n=getInternalBuildingBlocks(e),i=n[3],l=n[6],c=n[8],u=n[11],d=n[12],p=n[13],f=n[14],_=n[15],h=n[16],m=n[17],g=n[20],b=!0;try{return c(e,t,t=>returnAtomValue(f(e,t)),(r,...n)=>{var c;let f=u(e,r);try{if(r!==t)return h(e,r,...n);{if(!("init"in r))throw Error("atom not writable");o.add(e);let t=f.n,u=n[0];g(e,r,u),m(e,r),t!==f.n&&(i.add(r),_(e,r),null==(c=l.c)||c.call(l,r));return}}finally{b||(p(e),d(e))}},...r)}finally{b=!1}},BUILDING_BLOCK_mountDependencies=(e,t)=>{var r;let n=getInternalBuildingBlocks(e),o=n[1],i=n[3],l=n[6],c=n[11],u=n[15],d=n[18],p=n[19],f=c(e,t),_=o.get(t);if(_&&!isPendingPromise(f.v)){for(let[n,o]of f.d)if(!_.d.has(n)){let p=c(e,n);d(e,n).t.add(t),_.d.add(n),o!==p.n&&(i.add(n),u(e,n),null==(r=l.c)||r.call(l,n))}for(let r of _.d)if(!f.d.has(r)){_.d.delete(r);let n=p(e,r);null==n||n.t.delete(t)}}},BUILDING_BLOCK_mountAtom=(e,t)=>{var r;let n=getInternalBuildingBlocks(e),o=n[1],i=n[4],l=n[6],c=n[10],u=n[11],d=n[12],p=n[13],f=n[14],_=n[16],h=n[18],m=u(e,t),g=o.get(t);if(!g){for(let r of(f(e,t),m.d.keys()))h(e,r).t.add(t);g={l:new Set,d:new Set(m.d.keys()),t:new Set},o.set(t,g),isActuallyWritableAtom(t)&&i.add(()=>{let r=!0;try{let n=c(e,t,(...n)=>{try{return _(e,t,...n)}finally{r||(p(e),d(e))}});n&&(g.u=()=>{r=!0;try{n()}finally{r=!1}})}finally{r=!1}}),null==(r=l.m)||r.call(l,t)}return g},BUILDING_BLOCK_unmountAtom=(e,t)=>{var r,n;let o=getInternalBuildingBlocks(e),i=o[1],l=o[5],c=o[6],u=o[11],d=o[19],p=u(e,t),f=i.get(t);if(!f||f.l.size)return f;let _=!1;for(let e of f.t)if(null==(r=i.get(e))?void 0:r.d.has(t)){_=!0;break}if(!_){for(let r of(f.u&&l.add(f.u),f=void 0,i.delete(t),p.d.keys())){let n=d(e,r);null==n||n.t.delete(t)}null==(n=c.u)||n.call(c,t);return}return f},BUILDING_BLOCK_setAtomStateValueOrPromise=(e,t,r)=>{let n=getInternalBuildingBlocks(e)[11],o=n(e,t),i="v"in o,l=o.v;
1if(isPromiseLike(r))for(let i of o.d.keys())addPendingPromiseToDependency(t,r,n(e,i));o.v=r,delete o.e,i&&Object.is(l,o.v)||(++o.n,isPromiseLike(l)&&abortPromise(l))},BUILDING_BLOCK_storeGet=(e,t)=>returnAtomValue((0,getInternalBuildingBlocks(e)[14])(e,t)),BUILDING_BLOCK_storeSet=(e,t,...r)=>{let n=getInternalBuildingBlocks(e),o=n[12],i=n[13],l=n[16];try{return l(e,t,...r)}finally{i(e),o(e)}},BUILDING_BLOCK_storeSub=(e,t,r)=>{let n=getInternalBuildingBlocks(e),o=n[12],i=n[18],l=n[19],c=i(e,t).l;return c.add(r),o(e),()=>{c.delete(r),l(e,t),o(e)}},i=new WeakMap,getInternalBuildingBlocks=e=>{let t=i.get(e);if(!t)throw Error("Store must be created by buildStore to read its building blocks");return t};function buildStore(...e){let t={get:e=>(0,getInternalBuildingBlocks(t)[21])(t,e),set:(e,...r)=>(0,getInternalBuildingBlocks(t)[22])(t,e,...r),sub:(e,r)=>(0,getInternalBuildingBlocks(t)[23])(t,e,r)},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},BUILDING_BLOCK_atomRead,BUILDING_BLOCK_atomWrite,BUILDING_BLOCK_atomOnInit,BUILDING_BLOCK_atomOnMount,BUILDING_BLOCK_ensureAtomState,BUILDING_BLOCK_flushCallbacks,BUILDING_BLOCK_recomputeInvalidatedAtoms,BUILDING_BLOCK_readAtomState,BUILDING_BLOCK_invalidateDependents,BUILDING_BLOCK_writeAtomState,BUILDING_BLOCK_mountDependencies,BUILDING_BLOCK_mountAtom,BUILDING_BLOCK_unmountAtom,BUILDING_BLOCK_setAtomStateValueOrPromise,BUILDING_BLOCK_storeGet,BUILDING_BLOCK_storeSet,BUILDING_BLOCK_storeSub,void 0].map((t,r)=>e[r]||t);return i.set(t,Object.freeze(r)),t}},671611(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(269215),o=r(116426);let i=(0,n.A)(o.A,"DataView")},449998(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(925365),o=r(726469),i=r(437356),l=r(413928),c=r(30536);function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Hash.prototype.clear=n.A,Hash.prototype.delete=o.A,Hash.prototype.get=i.A,Hash.prototype.has=l.A,Hash.prototype.set=c.A;let u=Hash},54318(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(797589),o=r(198565),i=r(139660),l=r(950920),c=r(227496);function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ListCache.prototype.clear=n.A,ListCache.prototype.delete=o.A,ListCache.prototype.get=i.A,ListCache.prototype.has=l.A,ListCache.prototype.set=c.A;let u=ListCache},308046(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(269215),o=r(116426);let i=(0,n.A)(o.A,"Map")},39422(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(412901),o=r(787477),i=r(474076),l=r(285336),c=r(911448);function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}MapCache.prototype.clear=n.A,MapCache.prototype.delete=o.A,MapCache.prototype.get=i.A,MapCache.prototype.has=l.A,MapCache.prototype.set=c.A;let u=MapCache},285705(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(269215),o=r(116426);let i=(0,n.A)(o.A,"Promise")},922444(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(269215),o=r(116426);let i=(0,n.A)(o.A,"Set")},249448(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(39422),o=r(660009),i=r(858442);function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n.A;++t<r;)this.add(e[t])}SetCache.prototype.add=SetCache.prototype.push=o.A,SetCache.prototype.has=i.A;let l=SetCache},669856(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(54318),o=r(222275),i=r(16215),l=r(980070),c=r(399842),u=r(100378);function Stack(e){var t=this.__data__=new n.A(e);this.size=t.size}Stack.prototype.clear=o.A,Stack.prototype.delete=i.A,Stack.prototype.get=l.A,Stack.prototype.has=c.A,Stack.prototype.set=u.A;let d=Stack},578286(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(116426).A.Symbol},165091(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(116426).A.Uint8Array},234298(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(269215),o=r(116426);let i=(0,n.A)(o.A,"WeakMap")},633412(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},695428(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},674739(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var l=e[r];t(l,r,e)&&(i[o++]=l)}return i}},121962(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(972421),o=r(990223),i=r(667586),l=r(526049),c=r(538948),u=r(184086),d=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e,t){var r=(0,i.A)(e),p=!r&&(0,o.A)(e),f=!r&&!p&&(0,l.A)(e),_=!r&&!p&&!f&&(0,u.A)(e),h=r||p||f||_,m=h?(0,n.A)(e.length,String):[],g=m.length;for(var b in e)(t||d.call(e,b))&&!(h&&("length"==b||f&&("offset"==b||"parent"==b)||_&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||(0,c.A)(b,g)))&&m.push(b);return m}},861907(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},836205(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},842277(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},953374(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(677669),o=r(209449);let __rspack_default_export=function(e,t,r){(void 0===r||(0,o.A)(e[t],r))&&(void 0!==r||t in e)||(0,n.A)(e,t,r)}},820298(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(677669),o=r(209449),i=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e,t,r){var l=e[t];i.call(e,t)&&(0,o.A)(l,r)&&(void 0!==r||t in e)||(0,n.A)(e,t,r)}},557614(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(209449);let __rspack_default_export=function(e,t){for(var r=e.length;r--;)if((0,n.A)(e[r][0],t))return r;return -1}},677669(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(172776);let __rspack_default_export=function(e,t,r){"__proto__"==t&&n.A?(0,n.A)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},782727(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(118040),o=Object.create;let i=function(){function object(){}return function(e){if(!(0,n.A)(e))return{};if(o)return o(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}()},866270(e,t,r){"use strict";r.d(t,{A:()=>
1o});var n=r(94998);let o=(0,r(72294).A)(n.A)},503400(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(112928).A)()},94998(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(503400),o=r(649383);let __rspack_default_export=function(e,t){return e&&(0,n.A)(e,t,o.A)}},54271(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(1786),o=r(632540);let __rspack_default_export=function(e,t){t=(0,n.A)(t,e);for(var r=0,i=t.length;null!=e&&r<i;)e=e[(0,o.A)(t[r++])];return r&&r==i?e:void 0}},986928(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(836205),o=r(667586);let __rspack_default_export=function(e,t,r){var i=t(e);return(0,o.A)(e)?i:(0,n.A)(i,r(e))}},799415(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(578286),o=r(68754),i=r(966625),l=n.A?n.A.toStringTag:void 0;let __rspack_default_export=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?(0,o.A)(e):(0,i.A)(e)}},533424(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return null!=e&&t in Object(e)}},353551(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(799415),o=r(897311);let __rspack_default_export=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,n.A)(e)}},579467(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(88085),o=r(897311);function baseIsEqual(e,t,r,i,l){return e===t||(null!=e&&null!=t&&((0,o.A)(e)||(0,o.A)(t))?(0,n.A)(e,t,r,i,baseIsEqual,l):e!=e&&t!=t)}let i=baseIsEqual},88085(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(669856),o=r(667138),i=r(171577),l=r(455138),c=r(892770),u=r(667586),d=r(526049),p=r(184086),f="[object Arguments]",_="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e,t,r,g,b,y){var v=(0,u.A)(e),w=(0,u.A)(t),j=v?_:(0,c.A)(e),k=w?_:(0,c.A)(t);j=j==f?h:j,k=k==f?h:k;var x=j==h,S=k==h,O=j==k;if(O&&(0,d.A)(e)){if(!(0,d.A)(t))return!1;v=!0,x=!1}if(O&&!x)return y||(y=new n.A),v||(0,p.A)(e)?(0,o.A)(e,t,r,g,b,y):(0,i.A)(e,t,j,r,g,b,y);if(!(1&r)){var P=x&&m.call(e,"__wrapped__"),A=S&&m.call(t,"__wrapped__");
1if(P||A){var C=P?e.value():e,I=A?t.value():t;return y||(y=new n.A),b(C,I,r,g,y)}}return!!O&&(y||(y=new n.A),(0,l.A)(e,t,r,g,b,y))}},406030(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(669856),o=r(579467);let __rspack_default_export=function(e,t,r,i){var l=r.length,c=l,u=!i;if(null==e)return!c;for(e=Object(e);l--;){var d=r[l];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++l<c;){var p=(d=r[l])[0],f=e[p],_=d[1];if(u&&d[2]){if(void 0===f&&!(p in e))return!1}else{var h=new n.A;if(i)var m=i(f,_,p,e,t,h);if(!(void 0===m?(0,o.A)(_,f,3,i,h):m))return!1}}return!0}},933236(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(850427),o=r(82131),i=r(118040),l=r(477534),c=/^\[object .+?Constructor\]$/,u=Object.prototype,d=Function.prototype.toString,p=u.hasOwnProperty,f=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let __rspack_default_export=function(e){return!(!(0,i.A)(e)||(0,o.A)(e))&&((0,n.A)(e)?f:c).test((0,l.A)(e))}},670678(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(799415),o=r(340183),i=r(897311),l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l["[object Arguments]"]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l["[object Function]"]=l["[object Map]"]=l["[object Number]"]=l["[object Object]"]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;let __rspack_default_export=function(e){return(0,i.A)(e)&&(0,o.A)(e.length)&&!!l[(0,n.A)(e)]}},98890(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(398954),o=r(354971),i=r(244993),l=r(667586),c=r(751806);let __rspack_default_export=function(e){return"function"==typeof e?e:null==e?i.A:"object"==typeof e?(0,l.A)(e)?(0,o.A)(e[0],e[1]):(0,n.A)(e):(0,c.A)(e)}},722407(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(438550),o=r(701285),i=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e){if(!(0,n.A)(e))return(0,o.A)(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},8524(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(118040),o=r(438550),i=r(826486),l=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e){if(!(0,n.A)(e))return(0,i.A)(e);var t=(0,o.A)(e),r=[];for(var c in e)"constructor"==c&&(t||!l.call(e,c))||r.push(c);return r}},837309(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(866270),o=r(306749);let __rspack_default_export=function(e,t){var r=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,n.A)(e,function(e,n,o){i[++r]=t(e,n,o)}),i}},398954(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(406030),o=r(585099),i=r(559700);let __rspack_default_export=function(e){var t=(0,o.A)(e);return 1==t.length&&t[0][2]?(0,i.A)(t[0][0],t[0][1]):function(r){return r===e||(0,n.A)(r,e,t)}}},354971(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(579467),o=r(439743),i=r(82160),l=r(445479),c=r(720743),u=r(559700),d=r(632540);let __rspack_default_export=function(e,t){return(0,l.A)(e)&&(0,c.A)(t)?(0,u.A)((0,d.A)(e),t):function(r){var l=(0,o.A)(r,e);return void 0===l&&l===t?(0,i.A)(r,e):(0,n.A)(t,l,3)}}},339807(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(669856),o=r(953374),i=r(503400),l=r(731537),c=r(118040),u=r(918348),d=r(676575);function baseMerge(e,t,r,p,f){e!==t&&(0,i.A)(t,function(i,u){if(f||(f=ne
1w n.A),(0,c.A)(i))(0,l.A)(e,t,u,r,baseMerge,p,f);else{var _=p?p((0,d.A)(e,u),i,u+"",e,t,f):void 0;void 0===_&&(_=i),(0,o.A)(e,u,_)}},u.A)}let p=baseMerge},731537(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(953374),o=r(505655),i=r(966556),l=r(767990),c=r(67856),u=r(990223),d=r(667586),p=r(913746),f=r(526049),_=r(850427),h=r(118040),m=r(581148),g=r(184086),b=r(676575),y=r(48691);let __rspack_default_export=function(e,t,r,v,w,j,k){var x=(0,b.A)(e,r),S=(0,b.A)(t,r),O=k.get(S);if(O)return void(0,n.A)(e,r,O);var P=j?j(x,S,r+"",e,t,k):void 0,A=void 0===P;if(A){var C=(0,d.A)(S),I=!C&&(0,f.A)(S),E=!C&&!I&&(0,g.A)(S);P=S,C||I||E?(0,d.A)(x)?P=x:(0,p.A)(x)?P=(0,l.A)(x):I?(A=!1,P=(0,o.A)(S,!0)):E?(A=!1,P=(0,i.A)(S,!0)):P=[]:(0,m.A)(S)||(0,u.A)(S)?(P=x,(0,u.A)(x)?P=(0,y.A)(x):(!(0,h.A)(x)||(0,_.A)(x))&&(P=(0,c.A)(S))):A=!1}A&&(k.set(S,P),w(P,S,v,j,k),k.delete(S)),(0,n.A)(e,r,P)}},181566(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return function(t){return null==t?void 0:t[e]}}},300268(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(54271);let __rspack_default_export=function(e){return function(t){return(0,n.A)(t,e)}}},415733(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(244993),o=r(568878),i=r(551776);let __rspack_default_export=function(e,t){return(0,i.A)((0,o.A)(e,t,n.A),e+"")}},30583(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(877911),o=r(172776),i=r(244993);let l=o.A?function(e,t){return(0,o.A)(e,"toString",{configurable:!0,enumerable:!1,value:(0,n.A)(t),writable:!0})}:i.A},972421(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},685799(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(578286),o=r(861907),i=r(667586),l=r(691423),c=1/0,u=n.A?n.A.prototype:void 0,d=u?u.toString:void 0;function baseToString(e){if("string"==typeof e)return e;if((0,i.A)(e))return(0,o.A)(e,baseToString)+"";if((0,l.A)(e))return d?d.call(e):"";var t=e+"";return"0"==t&&1/e==-c?"-0":t}let p=baseToString},296159(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(100197),o=/^\s+/;let __rspack_default_export=function(e){return e?e.slice(0,(0,n.A)(e)+1).replace(o,""):e}},527144(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return function(t){return e(t)}}},150748(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return e.has(t)}},673033(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(244993);let __rspack_default_export=function(e){return"function"==typeof e?e:n.A}},1786(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(667586),o=r(445479),i=r(202961),l=r(772391);let __rspack_default_export=function(e,t){return(0,n.A)(e)?e:(0,o.A)(e,t)?[e]:(0,i.A)((0,l.A)(e))}},443606(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(165091);let __rspack_default_export=function(e){var t=new e.constructor(e.byteLength);return new n.A(t).set(new n.A(e)),t}},505655(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(116426),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,l=i&&i.exports===o?n.A.Buffer:void 0,c=l?l.allocUnsafe:void 0;let __rspack_default_export=function(e,t){if(t)return e.slice();var r=e.length,n=c?c(r):new e.constructor(r);return e.copy(n),n}},966556(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(443606);let __rspack_default_export=function(e,t){var r=t?(0,n.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},767990(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},765004(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(820298),o=r(677669);let __rspack_default_export=function(e,t,r,i){var l=!r;r||(r={});for(var c=-1,u=t.length;++c<u;){var d=t[c],p=i?i(r[d],e[d],d,r,e):void 0;void 0===p&&(p=e[d]),l?(0,o.A)(r,d,p):(0,n.A)(r,d,p)}return r}},807106(e,t,r){"use strict";r.d(t,{A:()=>n});let n=r(116426).A["__core-js_shared__"]},905740(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(415733),o=r(407155);let __rspack_default_export=function(e){return(0,n.A)(function(t,r){var n=-1,i=r.length,l=i>1?r[i-1]:void 0,c=i>2?r[2]:void 0;for(l=e.length>3&&"function"==typeof l?(i--,l):void 0,c&&(0,o.A)(r[0],r[1],c)&&(l=i<3?void 0:l,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,l)}return t})}},72294(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(306749);let __rspack_default_export=function(e,t){return function(r,o){if(null==r)return r;if(!(0,n.A)(r))return e(r,o);for(var i=r.length,l=t?i:-1,c=Object(r);(t?l--:++l<i)&&!1!==o(c[l],l,c););return r}}},112928(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return function(t,r,n){for(var o=-1,i=Object(t),l=n(t),c=l.length;c--;){var u=l[e?c:++o];if(!1===r(i[u],u,i))break}return t}}},172776(e,t,r){"use strict";r.d(t,{A:()=>
1o});var n=r(269215);let o=function(){try{var e=(0,n.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},667138(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(249448),o=r(842277),i=r(150748);let __rspack_default_export=function(e,t,r,l,c,u){var d=1&r,p=e.length,f=t.length;if(p!=f&&!(d&&f>p))return!1;var _=u.get(e),h=u.get(t);if(_&&h)return _==t&&h==e;var m=-1,g=!0,b=2&r?new n.A:void 0;for(u.set(e,t),u.set(t,e);++m<p;){var y=e[m],v=t[m];if(l)var w=d?l(v,y,m,t,e,u):l(y,v,m,e,t,u);if(void 0!==w){if(w)continue;g=!1;break}if(b){if(!(0,o.A)(t,function(e,t){if(!(0,i.A)(b,t)&&(y===e||c(y,e,r,l,u)))return b.push(t)})){g=!1;break}}else if(!(y===v||c(y,v,r,l,u))){g=!1;break}}return u.delete(e),u.delete(t),g}},171577(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(578286),o=r(165091),i=r(209449),l=r(667138),c=r(350562),u=r(880024),d=n.A?n.A.prototype:void 0,p=d?d.valueOf:void 0;let __rspack_default_export=function(e,t,r,n,d,f,_){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!f(new o.A(e),new o.A(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,i.A)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=c.A;case"[object Set]":var m=1&n;if(h||(h=u.A),e.size!=t.size&&!m)break;var g=_.get(e);if(g)return g==t;n|=2,_.set(e,t);var b=(0,l.A)(h(e),h(t),n,d,f,_);return _.delete(e),b;case"[object Symbol]":if(p)return p.call(e)==p.call(t)}return!1}},455138(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(171021),o=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e,t,r,i,l,c){var u=1&r,d=(0,n.A)(e),p=d.length;if(p!=(0,n.A)(t).length&&!u)return!1;for(var f=p;f--;){var _=d[f];if(!(u?_ in t:o.call(t,_)))return!1}var h=c.get(e),m=c.get(t);if(h&&m)return h==t&&m==e;var g=!0;c.set(e,t),c.set(t,e);for(var b=u;++f<p;){var y=e[_=d[f]],v=t[_];if(i)var w=u?i(v,y,_,t,e,c):i(y,v,_,e,t,c);if(!(void 0===w?y===v||l(y,v,r,i,c):w)){g=!1;break}b||(b="constructor"==_)}if(g&&!b){var j=e.constructor,k=t.constructor;j!=k&&"constructor"in e&&"constructor"in t&&!("function"==typeof j&&j instanceof j&&"function"==typeof k&&k instanceof k)&&(g=!1)}return c.delete(e),c.delete(t),g}},704163(e,t,r){"use strict";r.d(t,{A:()=>n});let n="object"==typeof global&&global&&global.Object===Object&&global},171021(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(986928),o=r(836319),i=r(649383);let __rspack_default_export=function(e){return(0,n.A)(e,i.A,o.A)}},498992(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(129279);let __rspack_default_export=function(e,t){var r=e.__data__;return(0,n.A)(t)?r["string"==typeof t?"string":"hash"]:r.map}},585099(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(720743),o=r(649383);let __rspack_default_export=function(e){for(var t=(0,o.A)(e),r=t.length;r--;){var i=t[r],l=e[i];t[r]=[i,l,(0,n.A)(l)]}return t}},269215(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(933236),o=r(220103);let __rspack_default_export=function(e,t){var r=(0,o.A)(e,t);return(0,n.A)(r)?r:void 0}},871540(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(29602).A)(Object.getPrototypeOf,Object)},68754(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(578286),o=Object.prototype,i=o.hasOwnProperty,l=o.toString,c=n.A?n.A.toStringTag:void 0;let __rspack_default_export=function(e){var t=i.call(e,c),r=e[c];try{e[c]=void 0;var n=!0}catch(e){}var o=l.call(e);return n&&(t?e[c]=r:delete e[c]),o}},836319(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(674739),o=r(276230),i=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols;let c=l?function(e){return null==e?[]:(e=Object(e),(0,n.A)(l(e),function(t){return i.call(e,t)}))}:o.A},892770(e,t,r){"use strict";r.d(t,{A:()=>k});var n=r(671611),o=r(308046),i=r(285705),l=r(922444),c=r(234298),u=r(799415),d=r(477534),p="[object Map]",f="[object Promise]",_="[object Set]",h="[object WeakMap]",m="[object DataView]",g=(0,d.A)(n.A),b=(0,d.A)(o.A),y=(0,d.A)(i.A),v=(0,d.A)(l.A),w=(0,d.A)(c.A),j=u.A;(n.A&&j(new n.A(new ArrayBuffer(1)))!=m||o.A&&j(new o.A)!=p||i.A&&j(i.A.resolve())!=f||l.A&&j(new l.A)!=_||c.A&&j(new c.A)!=h)&&(j=function(e){var t=(0,u.A)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,d.A)(r):"";if(n)switch(n){case g:return m;case b:return p;case y:return f;case v:return _;case w:return h}return t});let k=j},220103(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return null==e?void 0:e[t]}},690751(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(1786),o=r(990223),i=r(667586),l=r(538948),c=r(340183),u=r(632540);let __rspack_default_export=function(e,t,r){t=(0,n.A)(t,e);for(var d=-1,p=t.length,f=!1;++d<p;){var _=(0,u.A)(t[d]);if(!(f=null!=e&&r(e,_)))break;e=e[_]}return f||++d!=p?f:!!(p=null==e?0:e.length)&&(0,c.A)(p)&&(0,l.A)(_,p)&&((0,i.A)(e)||(0,o.A)(e))}},925365(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(155213);let __rspack_default_export=function(){this.__data__=n.A?(0,n.A)(null):{},this.size=0}},726469(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},437356(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(155213),o=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e){var t=this.__data__;if(n.A){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},413928(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(155213),o=Object.prototype.hasOwnProperty;let __rspack_default_export=function(e){var t=this.__data__;return n.A?void 0!==t[e]:o.call(t,e)}},30536(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(155213);let __rspack_default_export=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n.A&&void 0===t?"__lodash_hash_undefined__":t,this}},67856(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(782727),o=r(871540),i=r(438550);let __rspack_default_export=function(e){return"function"!=typeof e.constructor||(0,i.A)(e)?{}:(0,n.A)((0,o.A)(e))}},538948(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=/^(?:0|[1-9]\d*)$/;let __rspack_default_export=function(e,t){var r=typeof e;return!!(t=null==t?0x1fffffffffffff:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},407155(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});
1var n=r(209449),o=r(306749),i=r(538948),l=r(118040);let __rspack_default_export=function(e,t,r){if(!(0,l.A)(r))return!1;var c=typeof t;return("number"==c?!!((0,o.A)(r)&&(0,i.A)(t,r.length)):"string"==c&&t in r)&&(0,n.A)(r[t],e)}},445479(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(667586),o=r(691423),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;let __rspack_default_export=function(e,t){if((0,n.A)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,o.A)(e))||l.test(e)||!i.test(e)||null!=t&&e in Object(t)}},129279(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},82131(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n,o=r(807106),i=(n=/[^.]+$/.exec(o.A&&o.A.keys&&o.A.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";let __rspack_default_export=function(e){return!!i&&i in e}},438550(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=Object.prototype;let __rspack_default_export=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},720743(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(118040);let __rspack_default_export=function(e){return e==e&&!(0,n.A)(e)}},797589(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(){this.__data__=[],this.size=0}},198565(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(557614),o=Array.prototype.splice;let __rspack_default_export=function(e){var t=this.__data__,r=(0,n.A)(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},139660(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(557614);let __rspack_default_export=function(e){var t=this.__data__,r=(0,n.A)(t,e);return r<0?void 0:t[r][1]}},950920(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(557614);let __rspack_default_export=function(e){return(0,n.A)(this.__data__,e)>-1}},227496(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(557614);let __rspack_default_export=function(e,t){var r=this.__data__,o=(0,n.A)(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},412901(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(449998),o=r(54318),i=r(308046);let __rspack_default_export=function(){this.size=0,this.__data__={hash:new n.A,map:new(i.A||o.A),string:new n.A}}},787477(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(498992);let __rspack_default_export=function(e){var t=(0,n.A)(this,e).delete(e);return this.size-=!!t,t}},474076(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(498992);let __rspack_default_export=function(e){return(0,n.A)(this,e).get(e)}},285336(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(498992);let __rspack_default_export=function(e){return(0,n.A)(this,e).has(e)}},911448(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(498992);let __rspack_default_export=function(e,t){var r=(0,n.A)(this,e),o=r.size;return r.set(e,t),this.size+=+(r.size!=o),this}},350562(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},559700(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},234617(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(624951);let __rspack_default_export=function(e){var t=(0,n.A)(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},155213(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(269215).A)(Object,"create")},701285(e,t,r){"use strict";r.d(t,{A:()=>n});let n=(0,r(29602).A)(Object.keys,Object)},826486(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},521294(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(704163),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof module&&module&&!module.nodeType&&module,l=i&&i.exports===o&&n.A.process;
1let c=function(){try{var e=i&&i.require&&i.require("util").types;if(e)return e;return l&&l.binding&&l.binding("util")}catch(e){}}()},966625(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=Object.prototype.toString;let __rspack_default_export=function(e){return n.call(e)}},29602(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return function(r){return e(t(r))}}},568878(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(633412),o=Math.max;let __rspack_default_export=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,l=-1,c=o(i.length-t,0),u=Array(c);++l<c;)u[l]=i[t+l];l=-1;for(var d=Array(t+1);++l<t;)d[l]=i[l];return d[t]=r(u),(0,n.A)(e,this,d)}}},116426(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(704163),o="object"==typeof self&&self&&self.Object===Object&&self;let i=n.A||o||Function("return this")()},676575(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},660009(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},858442(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return this.__data__.has(e)}},880024(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},551776(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(30583);let o=(0,r(145760).A)(n.A)},145760(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=Date.now;let __rspack_default_export=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},222275(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(54318);let __rspack_default_export=function(){this.__data__=new n.A,this.size=0}},16215(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},980070(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return this.__data__.get(e)}},399842(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return this.__data__.has(e)}},100378(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(54318),o=r(308046),i=r(39422);let __rspack_default_export=function(e,t){var r=this.__data__;if(r instanceof n.A){var l=r.__data__;if(!o.A||l.length<199)return l.push([e,t]),this.size=++r.size,this;r=this.__data__=new i.A(l)}return r.set(e,t),this.size=r.size,this}},202961(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(234617),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;let l=(0,n.A)(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)}),t})},632540(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(691423),o=1/0;let __rspack_default_export=function(e){if("string"==typeof e||(0,n.A)(e))return e;var t=e+"";return"0"==t&&1/e==-o?"-0":t}},477534(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=Function.prototype.toString;let __rspack_default_export=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},100197(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=/\s/;let __rspack_default_export=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},877911(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return function(){return e}}},608324(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(118040),o=r(192323),i=r(28695),l=Math.max,c=Math.min;let __rspack_default_export=function(e,t,r){var u,d,p,f,_,h,m=0,g=!1,b=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function invokeFunc(t){var r=u,n=d;return u=d=void 0,m=t,f=e.apply(n,r)}function leadingEdge(e){return m=e,_=setTimeout(timerExpired,t),g?invokeFunc(e):f}function remainingWait(e){var r=e-h,n=e-m,o=t-r;return b?c(o,p-n):o}function shouldInvoke(e){var r=e-h,n=e-m;return void 0===h||r>=t||r<0||b&&n>=p}function timerExpired(){var e=(0,o.A)();if(shouldInvoke(e))return trailingEdge(e);_=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){return(_=void 0,y&&u)?invokeFunc(e):(u=d=void 0,f)}function flush(){return void 0===_?f:trailingEdge((0,o.A)())}function debounced(){var e=(0,o.A)(),r=shouldInvoke(e);if(u=arguments,d=this,h=e,r){if(void 0===_)return leadingEdge(h);if(b)return clearTimeout(_),_=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===_&&(_=setTimeout(timerExpired,t)),f}return t=(0,i.A)(t)||0,(0,n.A)(r)&&(g=!!r.leading,p=(b="maxWait"in r)?l((0,i.A)(r.maxWait)||0,t):p,y="trailing"in r?!!r.trailing:y),debounced.cancel=function(){void 0!==_&&clearTimeout(_),m=0,u=h=d=_=void 0},debounced.flush=flush,debounced}},209449(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e,t){return e===t||e!=e&&t!=t}},634893(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(695428),o=r(866270),i=r(673033),l=r(667586);let __rspack_default_export=function(e,t){return((0,l.A)(e)?n.A:o.A)(e,(0,i.A)(t))}},439743(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(54271);let __rspack_default_export=function(e,t,r){var o=null==e?void 0:(0,n.A)(e,t);return void 0===o?r:o}},82160(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(533424),o=r(690751);let __rspack_default_export=function(e,t){return null!=e&&(0,o.A)(e,t,n.A)}},244993(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return e}},990223(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(353551),o=r(897311),i=Object.prototype,l=i.hasOwnProperty,c=i.propertyIsEnumerable;let u=(0,n.A)(function(){return arguments}())?n.A:function(e){return(0,o.A)(e)&&l.call(e,"callee")&&!c.call(e,"callee")}},667586(e,t,r){"use strict";r.d(t,{A:()=>n});let n=Array.isArray},306749(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(850427),o=r(340183);let __rspack_default_export=function(e){return null!=e&&(0,o.A)(e.length)&&!(0,n.A)(e)}},913746(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(306749),o=r(897311);let __rspack_default_export=function(e){return(0,o.A)(e)&&(0,n.A)(e)}},526049(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(116426),o=r(272520),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,l=i&&"object"==typeof module&&module&&!module.nodeType&&module,c=l&&l.exports===i?n.A.Buffer:void 0;let u=(c?c.isBuffer:void 0)||o.A},850427(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(799415),o=r(118040);let __rspack_default_export=function(e){if(!(0,o.A)(e))return!1;var t=(0,n.A)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},340183(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}},118040(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},897311(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return null!=e&&"object"==typeof e}},581148(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(799415),o=r(871540),i=r(897311),l=Object.prototype,c=Function.prototype.toString,u=l.hasOwnProperty,d=c.call(Object);let __rspack_default_export=function(e){if(!(0,i.A)(e)||"[object Object]"!=(0,n.A)(e))return!1;var t=(0,o.A)(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==d}},691423(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(799415),o=r(897311);let __rspack_default_export=function(e){return"symbol"==typeof e||(0,o.A)(e)&&"[object Symbol]"==(0,n.A)(e)}},184086(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(670678),o=r(527144),i=r(521294),l=i.A&&i.A.isTypedArray;let c=l?(0,o.A)(l):n.A},582847(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(e){return void 0===e}},649383(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(121962),o=r(722407),i=r(306749);let __rspack_default_export=function(e){return(0,i.A)(e)?(0,n.A)(e):(0,o.A)(e)}},918348(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(121962),o=r(8524),i=r(306749);let __rspack_default_export=function(e){return(0,i.A)(e)?(0,n.A)(e,!0):(0,o.A)(e)}},222781(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(861907),o=r(98890),i=r(837309),l=r(667586);let __rspack_default_export=function(e,t){return((0,l.A)(e)?n.A:i.A)(e,(0,o.A)(t,3))}},624951(e,t,r){"use strict";r.d(t,{A:()=>
1o});var n=r(39422);function memoize(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var memoized=function(){var r=arguments,n=t?t.apply(this,r):r[0],o=memoized.cache;if(o.has(n))return o.get(n);var i=e.apply(this,r);return memoized.cache=o.set(n,i)||o,i};return memoized.cache=new(memoize.Cache||n.A),memoized}memoize.Cache=n.A;let o=memoize},888543(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(339807);let o=(0,r(905740).A)(function(e,t,r){(0,n.A)(e,t,r)})},192323(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(116426);let __rspack_default_export=function(){return n.A.Date.now()}},751806(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(181566),o=r(300268),i=r(445479),l=r(632540);let __rspack_default_export=function(e){return(0,i.A)(e)?(0,n.A)((0,l.A)(e)):(0,o.A)(e)}},276230(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(){return[]}},272520(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});let __rspack_default_export=function(){return!1}},148455(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(608324),o=r(118040);let __rspack_default_export=function(e,t,r){var i=!0,l=!0;if("function"!=typeof e)throw TypeError("Expected a function");return(0,o.A)(r)&&(i="leading"in r?!!r.leading:i,l="trailing"in r?!!r.trailing:l),(0,n.A)(e,t,{leading:i,maxWait:t,trailing:l})}},28695(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(296159),o=r(118040),i=r(691423),l=0/0,c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,p=parseInt;let __rspack_default_export=function(e){if("number"==typeof e)return e;if((0,i.A)(e))return l;if((0,o.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=(0,n.A)(e);var r=u.test(e);return r||d.test(e)?p(e.slice(2),r?2:8):c.test(e)?l:+e}},48691(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(765004),o=r(918348);let __rspack_default_export=function(e){return(0,n.A)(e,(0,o.A)(e))}},772391(e,t,r){"use strict";r.d(t,{A:()=>__rspack_default_export});var n=r(685799);let __rspack_default_export=function(e){return null==e?"":(0,n.A)(e)}},683919(e,t,r){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r.d(t,{A:()=>tinycolor});var n,o,i,l=/^\s+/,c=/\s+$/;function tinycolor(e,t){if(t=t||{},(e=e||"")instanceof tinycolor)return e;if(!(this instanceof tinycolor))return new tinycolor(e,t);var r=inputToRGB(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function inputToRGB(e){var t={r:0,g:0,b:0},r=1,n=null,o=null,i=null,l=!1,c=!1;return"string"==typeof e&&(e=stringInputToObject(e)),"object"==_typeof(e)&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(t=rgbToRgb(e.r,e.g,e.b),l=!0,c="%"===String(e.r).substr(-1)?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(n=convertToPercentage(e.s),o=convertToPercentage(e.v),t=hsvToRgb(e.h,n,o),l=!0,c="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(n=convertToPercentage(e.s),i=convertToPercentage(e.l),t=hslToRgb(e.h,n,i),l=!0,c="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=boundAlpha(r),{ok:l,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function rgbToRgb(e,t,r){return{r:255*bound01(e,255),g:255*bound01(t,255),b:255*bound01(r,255)}}function rgbToHsl(e,t,r){e=bound01(e,255);var n,o,i=Math.max(e,t=bound01(t,255),r=bound01(r,255)),l=Math.min(e,t,r),c=(i+l)/2;if(i==l)n=o=0;else{var u=i-l;switch(o=c>.5?u/(2-i-l):u/(i+l),i){case e:n=(t-r)/u+6*(t<r);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:o,l:c}}function hslToRgb(e,t,r){var n,o,i;function hue2rgb(e,t,r){return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?e+(t-e)*6*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=bound01(e,360),t=bound01(t,100),r=bound01(r,100),0===t)n=o=i=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;n=hue2rgb(c,l,e+1/3),o=hue2rgb(c,l,e),i=hue2rgb(c,l,e-1/3)}return{r:255*n,g:255*o,b:255*i}}function rgbToHsv(e,t,r){e=bound01(e,255);var n,o=Math.max(e,t=bound01(t,255),r=bound01(r,255)),i=Math.min(e,t,r),l=o-i;if(o==i)n=0;else{switch(o){case e:n=(t-r)/l+6*(t<r);break;case t:n=(r-e)/l+2;break;case r:n=(e-t)/l+4}n/=6}return{h:n,s:0===o?0:l/o,v:o}}function hsvToRgb(e,t,r){e=6*bound01(e,360),t=bound01(t,100),r=bound01(r,100);var n=Math.floor(e),o=e-n,i=r*(1-t),l=r*(1-o*t),c=r*(1-(1-o)*t),u=n%6;return{r:255*[r,l,i,i,c,r][u],g:255*[c,r,r,l,i,i][u],b:255*[i,i,c,r,r,l][u]}}function rgbToHex(e,t,r,n){var o=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16))];return n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function rgbaToHex(e,t,r,n,o){var i=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(convertDecimalToHex(n))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function rgbaToArgbHex(e,t,r,n){return[pad2(convertDecimalToHex(n)),pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16))].join("")}function _desaturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s-=t/100,r.s=clamp01(r.s),tinycolor(r)}function _saturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s+=t/100,r.s=clamp01(r.s),tinycolor(r)}function _greyscale(e){return tinycolor(e).desaturate(100)}
vendor: 7,159 bytes, line 1
1function _lighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l+=t/100,r.l=clamp01(r.l),tinycolor(r)}function _brighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-(t/100*255)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-(t/100*255)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-(t/100*255)))),tinycolor(r)}function _darken(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l-=t/100,r.l=clamp01(r.l),tinycolor(r)}function _spin(e,t){var r=tinycolor(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,tinycolor(r)}function _complement(e){var t=tinycolor(e).toHsl();return t.h=(t.h+180)%360,tinycolor(t)}function polyad(e,t){if(isNaN(t)||t<=0)throw Error("Argument to polyad must be a positive number");for(var r=tinycolor(e).toHsl(),n=[tinycolor(e)],o=360/t,i=1;i<t;i++)n.push(tinycolor({h:(r.h+i*o)%360,s:r.s,l:r.l}));return n}function _splitcomplement(e){var t=tinycolor(e).toHsl(),r=t.h;return[tinycolor(e),tinycolor({h:(r+72)%360,s:t.s,l:t.l}),tinycolor({h:(r+216)%360,s:t.s,l:t.l})]}function _analogous(e,t,r){t=t||6,r=r||30;var n=tinycolor(e).toHsl(),o=360/r,i=[tinycolor(e)];for(n.h=(n.h-(o*t>>1)+720)%360;--t;)n.h=(n.h+o)%360,i.push(tinycolor(n));return i}function _monochromatic(e,t){t=t||6;for(var r=tinycolor(e).toHsv(),n=r.h,o=r.s,i=r.v,l=[],c=1/t;t--;)l.push(tinycolor({h:n,s:o,v:i})),i=(i+c)%1;return l}tinycolor.prototype={isDark:function(){return 128>this.getBrightness()},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((r=n.b/255)<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=boundAlpha(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=rgbToHsv(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=rgbToHsv(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=rgbToHsl(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=rgbToHsl(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return rgbToHex(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return rgbaToHex(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(d[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=tinycolor(e);r="#"+rgbaToArgbHex(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return!t&&n&&("hex"===e||"hex6"===e||"hex3"===e||"hex4"===e||"hex8"===e||"name"===e)?"name"===e&&0===this._a?this.toName():this.toRgbString():("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),("hex"===e||"hex6"===e)&&(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return tinycolor(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(e,t){if("object"==_typeof(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&("a"===n?r[n]=e[n]:r[n]=convertToPercentage(e[n]));e=r}return tinycolor(e,t)},tinycolor.equals=function(e,t){return!!e&&!!t&&tinycolor(e).toRgbString()==tinycolor(t).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(e,t,r){r=0===r?0:r||50;var n=tinycolor(e).toRgb(),o=tinycolor(t).toRgb(),i=r/100;return tinycolor({r:(o.r-n.r)*i+n.r,g:(o.g-n.g)*i+n.g,b:(o.b-n.b)*i+n.b,a:(o.a-n.a)*i+n.a})},tinycolor.readability=function(e,t){var r=tinycolor(e),n=tinycolor(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},tinycolor.isReadable=function(e,t,r){var n,o,i=tinycolor.readability(e,t);switch(o=!1,(n=validateWCAG2Parms(r)).level+n.size){case"AAsmall":case"AAAlarge":o=i>=4.5;break;case"AAlarge":o=i>=3;break;case"AAAsmall":o=i>=7}return o},tinycolor.mostReadable=function(e,t,r){var n,o,i,l,c=null,u=0;o=(r=r||{}).includeFallbackColors,i=r.level,l=r.size;
vendor: 1,623 bytes, line 1
1for(var d=0;d<t.length;d++)(n=tinycolor.readability(e,t[d]))>u&&(u=n,c=tinycolor(t[d]));return tinycolor.isReadable(e,c,{level:i,size:l})||!o?c:(r.includeFallbackColors=!1,tinycolor.mostReadable(e,["#fff","#000"],r))};var u=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee9
10",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},d=tinycolor.hexNames=flip(u);function flip(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function boundAlpha(e){return(isNaN(e=parseFloat(e))||e<0||e>1)&&(e=1),e}function bound01(e,t){isOnePointZero(e)&&(e="100%");var r=isPercentage(e);return(e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}function clamp01(e){return Math.min(1,Math.max(0,e))}function parseIntFromHex(e){return parseInt(e,16)}function isOnePointZero(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)}function isPercentage(e){return"string"==typeof e&&-1!=e.indexOf("%")}function pad2(e){return 1==e.length?"0"+e:""+e}function convertToPercentage(e){return e<=1&&(e=100*e+"%"),e}function convertDecimalToHex(e){return Math.round(255*parseFloat(e)).toString(16)}var p=(o="[\\s|\\(]+("+(n="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",{CSS_UNIT:new RegExp(n),rgb:RegExp("rgb"+o),rgba:RegExp("rgba"+i),hsl:RegExp("hsl"+o),hsla:RegExp("hsla"+i),hsv:RegExp("hsv"+o),hsva:RegExp("hsva"
1+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function isValidCSSUnit(e){return!!p.CSS_UNIT.exec(e)}function stringInputToObject(e){e=e.replace(l,"").replace(c,"").toLowerCase();var t,r=!1;if(u[e])e=u[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=p.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=p.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=p.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=p.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=p.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=p.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=p.hex8.exec(e))?{r:parseIntFromHex(t[1]),g:parseIntFromHex(t[2]),b:parseIntFromHex(t[3]),a:parseIntFromHex(t[4])/255,format:r?"name":"hex8"}:(t=p.hex6.exec(e))?{r:parseIntFromHex(t[1]),g:parseIntFromHex(t[2]),b:parseIntFromHex(t[3]),format:r?"name":"hex"}:(t=p.hex4.exec(e))?{r:parseIntFromHex(t[1]+""+t[1]),g:parseIntFromHex(t[2]+""+t[2]),b:parseIntFromHex(t[3]+""+t[3]),a:parseIntFromHex(t[4]+""+t[4])/255,format:r?"name":"hex8"}:!!(t=p.hex3.exec(e))&&{r:parseIntFromHex(t[1]+""+t[1]),g:parseIntFromHex(t[2]+""+t[2]),b:parseIntFromHex(t[3]+""+t[3]),format:r?"name":"hex"}}function validateWCAG2Parms(e){var t,r;return t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA"),"small"!==r&&"large"!==r&&(r="small"),{level:t,size:r}}}}]);

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.