JezK
Edit File: wc-block-library.js
(()=>{var e,t,o={93450:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var r=o(86087),s=(0,r.forwardRef)(({icon:e,size:t=24,...o},s)=>(0,r.cloneElement)(e,{width:t,height:t,...o,ref:s}))},74175:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"})})},5764:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{d:"M8 12.5h8V11H8v1.5Z M19 6.5H5a2 2 0 0 0-2 2V15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2ZM5 8h14a.5.5 0 0 1 .5.5V15a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V8.5A.5.5 0 0 1 5 8Z"})})},94878:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z"})})},82024:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{d:"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z",fillRule:"evenodd",clipRule:"evenodd"})})},62748:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z"})})},55414:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})},73580:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})},49254:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})})},16870:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"})})},69863:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})})},84718:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M10.7 9.6c.3-.2.8-.4 1.3-.4s1 .2 1.3.4c.3.2.4.5.4.6 0 .4.3.8.8.8s.8-.3.8-.8c0-.8-.5-1.4-1.1-1.9-.4-.3-.9-.5-1.4-.6v-.3c0-.4-.3-.8-.8-.8s-.8.3-.8.8v.3c-.5 0-1 .3-1.4.6-.6.4-1.1 1.1-1.1 1.9s.5 1.4 1.1 1.9c.6.4 1.4.6 2.2.6h.2c.5 0 .9.2 1.1.4.3.2.4.5.4.6s0 .4-.4.6c-.3.2-.8.4-1.3.4s-1-.2-1.3-.4c-.3-.2-.4-.5-.4-.6 0-.4-.3-.8-.8-.8s-.8.3-.8.8c0 .8.5 1.4 1.1 1.9.4.3.9.5 1.4.6v.3c0 .4.3.8.8.8s.8-.3.8-.8v-.3c.5 0 1-.3 1.4-.6.6-.4 1.1-1.1 1.1-1.9s-.5-1.4-1.1-1.9c-.5-.4-1.2-.6-1.9-.6H12c-.6 0-1-.2-1.3-.4-.3-.2-.4-.5-.4-.6s0-.4.4-.6ZM12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5Z"})})},2488:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})})},43907:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},41096:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})})},69544:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})})},19432:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})})},74774:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})})},30046:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(s.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})})},53987:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})})},83243:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsxs)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,r.jsx)(s.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,r.jsx)(s.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]})},54200:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",d:"M5.5 9.5v-2h13v2h-13zm0 3v4h13v-4h-13zM4 7a1 1 0 011-1h14a1 1 0 011 1v10a1 1 0 01-1 1H5a1 1 0 01-1-1V7z",clipRule:"evenodd"})})},86083:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",d:"M6.5 8a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zM8 5a3 3 0 100 6 3 3 0 000-6zm6.5 11a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm1.5-3a3 3 0 100 6 3 3 0 000-6zM5.47 17.41a.75.75 0 001.06 1.06L18.47 6.53a.75.75 0 10-1.06-1.06L5.47 17.41z",clipRule:"evenodd"})})},71460:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})})},77092:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})})},44657:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})})},41180:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})})},41607:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})})},17230:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})})},78592:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},45791:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(10790),s=o(5573),c=(0,r.jsx)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(s.Path,{d:"M3.445 16.505a.75.75 0 001.06.05l5.005-4.55 4.024 3.521 4.716-4.715V14h1.5V8.25H14v1.5h3.19l-3.724 3.723L9.49 9.995l-5.995 5.45a.75.75 0 00-.05 1.06z"})})},37757:(e,t,o)=>{"use strict";o.d(t,{yM:()=>i});var r=o(96153),s=o.n(r);const c=!1;s()("wc-admin:tracks:stats");const n=s()("wc-admin:tracks");function i(e,t){return n("recordevent %s %o","wcadmin_"+e,t,{_tqk:window._tkq,shouldRecord:!(c||!window._tkq||!window.wcTracks||!window.wcTracks.isEnabled)}),!(!window.wcTracks||"function"!=typeof window.wcTracks.recordEvent)&&(c?(window.wcTracks.validateEvent(e,t),!1):void window.wcTracks.recordEvent(e,t))}},64765:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>l,default:()=>d});var r=o(4921),s=o(62796),c=o(24947),n=o(27723),i=o(41616),a=o(10790);const l=e=>{const{textAlign:t}=e,o=(0,c.p)(e),{product:i}=(0,s.useProductDataContext)(),l=(0,r.A)(o.className,"wc-block-components-product-average-rating",{[`has-text-align-${t}`]:t});return(0,a.jsx)("div",{className:l,style:o.style,children:Number(i.average_rating)>0?i.average_rating:(0,n.__)("No ratings","woocommerce")})},d=(0,i.withProductDataContext)(l)},76754:(e,t,o)=>{"use strict";o.r(t),o.d(t,{AddToCartButton:()=>f,Block:()=>k,default:()=>j});var r=o(86087),s=o(4921),c=o(27723),n=o(2269),i=o(47143),a=o(47594),l=o(18537),d=o(86697);const u=(e,t)=>{const o=e.find(({id:e})=>e===t);return o?o.quantity:0};var m=o(24947),p=o(36352),h=o(15703),g=o(62796),w=o(41616),_=(o(27316),o(95248)),b=o(10790);const x=({product:e,isDescendantOfAddToCartWithOptions:t,collection:o})=>{const r="woocommerce/product-collection/cart-contents"===o,n="external"===e.type,i=n?e.button_text:e.add_to_cart?.single_text;let a;return a=r?(0,c.__)("Finish checkout","woocommerce"):t?i:e.add_to_cart?.text,(0,b.jsx)("button",{disabled:!1,className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button"),style:{},children:n?e.button_text:a||(0,c.__)("Add to cart","woocommerce")})},f=({product:e,isDescendantOfAddToCartWithOptions:t,className:o,style:m,collection:g})=>{const{id:w,permalink:_,add_to_cart:x,has_options:f,is_purchasable:y,is_in_stock:v}=e,{dispatchStoreEvent:k}=(0,n.y)(),{cartQuantity:j,addingToCart:C,addToCart:S}=(e=>{const{addItemToCart:t}=(0,i.useDispatch)(a.cartStore),{cartItems:o,cartIsLoading:s}=(0,d.V)(),{createErrorNotice:c,removeNotice:n}=(0,i.useDispatch)("core/notices"),[m,p]=(0,r.useState)(!1),h=(0,r.useRef)(u(o,e));return(0,r.useEffect)(()=>{const t=u(o,e);t!==h.current&&(h.current=t)},[o,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:m,cartIsLoading:s,addToCart:(o=1)=>(p(!0),t(e,o).then(()=>{n("add-to-cart")}).catch(e=>{c((0,l.decodeEntities)(e.message),{id:"add-to-cart",context:"wc/all-products",isDismissible:!0})}).finally(()=>{p(!1)}))}})(w),A=Number.isFinite(j)&&j>0,N="woocommerce/product-collection/cart-contents"===g,P=!f&&y&&v,B=(0,l.decodeEntities)(x?.description||""),I=N?(0,c.__)("Finish checkout","woocommerce"):(({cartQuantity:e,productCartDetails:t,isDescendantOfAddToCartWithOptions:o})=>Number.isFinite(e)&&e>0?(0,c.sprintf)(/* translators: %s number of products in cart. */ /* translators: %s number of products in cart. */ (0,c._n)("%d in cart","%d in cart",e,"woocommerce"),e):o&&t?.single_text?t?.single_text:t?.text||(0,c.__)("Add to cart","woocommerce"))({cartQuantity:j,productCartDetails:x,isDescendantOfAddToCartWithOptions:t}),T=P&&!N?"button":"a",E={};return N?(E.href=p.Vo,E.rel="nofollow",E.onClick=()=>{k("cart-view-link",{product:e})}):P?E.onClick=async()=>{await S(),k("cart-add-item",{product:e});const{cartRedirectAfterAdd:t}=(0,h.getSetting)("productsSettings");t&&(window.location.href=p.Vo)}:(E.href=_,E.onClick=()=>{k("product-view-link",{product:e})}),(0,b.jsx)(T,{...E,"aria-label":B,disabled:C,className:(0,s.A)(o,"wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",{loading:C,added:A}),style:m,children:I})},y=({className:e,style:t})=>(0,b.jsx)("button",{className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder",e),style:t,disabled:!0,children:(0,c.__)("Add to cart","woocommerce")}),v=({className:e,style:t,blockClientId:o,collection:n})=>{const{current:i,registerListener:a,unregisterListener:l}=(0,_.A)();let d;return(0,r.useEffect)(()=>{if(o)return a(o),()=>{l(o)}},[o,a,l]),d="woocommerce/product-collection/cart-contents"===n?(0,c.__)("Finish checkout","woocommerce"):"external"===i?.slug?(0,c.__)("Buy product","woocommerce"):(0,c.__)("Add to cart","woocommerce"),(0,b.jsx)("button",{className:(0,s.A)("wp-block-button__link","wp-element-button","add_to_cart_button","wc-block-components-product-button__button",e),style:t,disabled:!0,children:d})},k=e=>{const{className:t,textAlign:o,blockClientId:r,collection:c}=e,n=(0,m.p)(e),{parentClassName:i}=(0,g.useInnerBlockLayoutContext)(),{product:a,isLoading:l}=(0,g.useProductDataContext)({product:e.product,isAdmin:e.isAdmin}),d=a?.id&&e.isAdmin&&(0,p.Sc)();return(0,b.jsx)("div",{className:(0,s.A)(t,"wp-block-button","wc-block-components-product-button",{[`${i}__product-add-to-cart`]:i,[`align-${o}`]:o}),children:l?(0,b.jsx)(y,{className:n.className,style:n.style}):(0,b.jsxs)(b.Fragment,{children:[d&&(0,b.jsx)(x,{product:a,isDescendantOfAddToCartWithOptions:e["woocommerce/isDescendantOfAddToCartWithOptions"],collection:c}),!d&&(a&&a?.id?(0,b.jsx)(f,{product:a,style:n.style,className:n.className,isAdmin:e.isAdmin,isDescendantOfAddToCartWithOptions:e["woocommerce/isDescendantOfAddToCartWithOptions"],productEntity:e.product,collection:c}):(0,b.jsx)(v,{style:n.style,className:n.className,isLoading:l??!1,blockClientId:r,collection:c}))]})})},j=(0,w.withProductDataContext)(k)},43129:(e,t,o)=>{"use strict";o.d(t,{A:()=>y,e:()=>f});var r=o(86087),s=o(27723),c=o(4921),n=o(15703),i=o(62796),a=o(24947),l=o(41616),d=o(2269),u=o(18537),m=o(73993),p=o(44927),h=(o(51189),o(34903)),g=o(10790);const w=e=>{const{aspectRatio:t,height:o,width:r,scale:s}=e;return{height:o,width:r,objectFit:s,aspectRatio:t}},_=e=>{const t=(0,n.getSetting)("placeholderImgSrcFullSize",n.PLACEHOLDER_IMG_SRC);return(0,g.jsx)("img",{...e,src:t,alt:"",width:void 0,height:void 0})},b=({image:e,loaded:t,fallbackAlt:o,width:r,scale:s,height:c,aspectRatio:n})=>{const{src:i,srcset:a,sizes:l,alt:d}=e||{},u={alt:d||o,hidden:!t,src:i,srcSet:a,sizes:l},m=w({height:c,width:r,scale:s,aspectRatio:n});return e?(0,g.jsx)("img",{style:m,"data-testid":"product-image",...u}):(0,g.jsx)(_,{style:m})},x=e=>{const{product:t}=e;return!(0,m.isEmpty)(t)&&(0,h.S)(e.showSaleBadge)},f=e=>{const{aspectRatio:t,children:o,className:l,height:m,imageId:f,imageSizing:y,scale:v,showProductLink:k=!0,style:j,width:C,isAdmin:S,product:A,isResolving:N,...P}=e,B=(0,a.p)(e),{parentClassName:I}=(0,i.useInnerBlockLayoutContext)(),{product:T,isLoading:E}=(0,i.useProductDataContext)({isAdmin:S,product:A,isResolving:N}),{dispatchStoreEvent:R}=(0,d.y)(),D=(0,n.getSetting)("thumbnailAspectRatio",null),L=(0,h.O)(j,t,D,y),O=`wc-block-components-product-image--aspect-ratio-${L?L.replace("/","-"):"auto"}`;if(!T?.id){const e=w({height:m,width:C,scale:v,aspectRatio:L});return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:(0,c.A)(l,"wc-block-components-product-image",O,{[`${I}__product-image`]:I},B.className),style:B.style,children:(0,g.jsx)(_,{style:e})}),o]})}const M=((e,t)=>e.images.length?t&&e.images.find(e=>e.id===t)||e.images[0]:null)(T,f);M&&(M.alt=M.alt||(0,u.decodeEntities)(T.name));const V=k?"a":r.Fragment,F=T?.name? // translators: %s is the product name. // translators: %s is the product name. (0,s.sprintf)((0,s.__)("Link to %s","woocommerce"),T.name):"",H={href:k?T?.permalink:void 0,...k&&{"aria-label":F,onClick:()=>{R("product-view-link",{product:T})}}};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:(0,c.A)(l,"wc-block-components-product-image",O,{[`${I}__product-image`]:I},B.className),style:B.style,children:[x(e)&&(0,g.jsx)(p.default,{align:e.saleBadgeAlign||"right",...P}),(0,g.jsx)(V,{...!S&&k&&H,children:(0,g.jsx)(b,{fallbackAlt:(0,u.decodeEntities)(T.name),image:M,loaded:!E,width:C,height:m,scale:v,aspectRatio:L})})]}),o]})},y=(0,l.withProductDataContext)(f)},37156:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>n});var r=o(41616),s=o(43129),c=o(47746);const n=(0,r.withFilteredAttributes)(c.attributes)(s.A)},1267:(e,t,o)=>{"use strict";o.d(t,{e:()=>r});let r=function(e){return e.SINGLE="single",e.THUMBNAIL="thumbnail",e.CROPPED="cropped",e}({})},34903:(e,t,o)=>{"use strict";o.d(t,{O:()=>c,S:()=>s});var r=o(1267);const s=e=>void 0===e||e,c=(e,t,o,s)=>e&&e.dimensions&&e.dimensions.aspectRatio&&"string"==typeof e.dimensions.aspectRatio?e.dimensions.aspectRatio:t&&"string"==typeof t?t:!s||s!==r.e.THUMBNAIL&&s!==r.e.CROPPED?void 0:o??void 0},73805:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>m,convertAdminPriceToStoreApiFormat:()=>u,default:()=>p});var r=o(4921),s=o(56464),c=o(70910),n=o(62796),i=o(24947),a=o(41616),l=o(15703),d=o(10790);const u=(e,t,o="0")=>{const r=10**t.minorUnit;return Math.round(Number.parseFloat(e??o)*r).toString()},m=e=>{const{className:t,textAlign:o,isDescendentOfSingleProductTemplate:a,isAdmin:m,product:p,isExperimentalWcRestApiV4Enabled:h}=e,{parentName:g,parentClassName:w}=(0,n.useInnerBlockLayoutContext)(),{product:_}=(0,n.useProductDataContext)(h?{isAdmin:m,product:p}:void 0),b="woocommerce/all-products"===g,x="woocommerce/add-to-cart-with-options-grouped-product-item"===g,f=(0,i.p)(e),{margin:y,marginTop:v,marginRight:k,marginBottom:j,marginLeft:C,...S}=f.style,A={margin:y,marginTop:v,marginRight:k,marginBottom:j,marginLeft:C},N=a&&!x||!_,P=(0,r.A)("wp-block-woocommerce-product-price",t),B=(0,r.A)(f.className,{[`${w}__product-price`]:w});if(!_?.id&&!a){const e=(0,d.jsx)(s.A,{align:o,className:B,style:S});return b?(0,d.jsx)("div",{className:P,style:m?void 0:A,children:e}):e}let I=_?.prices??{};const T=N?(0,c.getCurrencyFromPriceResponse)():(0,c.getCurrencyFromPriceResponse)(I);h&&(I={price:u(_?.price,T),..._?.sale_price?{sale_price:u(_?.sale_price,T)}:{},..._?.regular_price?{regular_price:u(_?.regular_price,T)}:{},currency_minor_unit:l.SITE_CURRENCY.minorUnit,price_range:_?.max_price&&_?.min_price?{min_amount:u(_.min_price,T),max_amount:u(_.max_price,T)}:null});const E="5000",R=I.price!==I.regular_price,D=(0,r.A)({[`${w}__product-price__value`]:w,[`${w}__product-price__value--on-sale`]:R}),L=(0,d.jsx)(s.A,{align:o,className:B,style:S,priceClassName:D,currency:T,price:N?E:I.price,minPrice:I?.price_range?.min_amount,maxPrice:I?.price_range?.max_amount,regularPrice:N?E:I.regular_price,regularPriceClassName:(0,r.A)({[`${w}__product-price__regular`]:w})});return b?(0,d.jsx)("div",{className:P,style:m?void 0:A,children:L}):L},p=e=>e.isDescendentOfSingleProductTemplate?(0,d.jsx)(m,{...e}):(0,a.withProductDataContext)(m)(e)},25549:(e,t,o)=>{"use strict";o.d(t,{T:()=>i});var r=o(74997),s=o(47143),c=o(34892),n=o(55455);const i=e=>{const t=(0,s.select)("core/block-editor").getBlocks();if((0,c.P)({blocks:t,findCondition:t=>t.name===n.name&&t.clientId===e})){const t=(0,r.createBlock)("woocommerce/product-gallery");return(0,s.dispatch)("core/block-editor").replaceBlock(e,t),!0}return!1}},47924:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>m,default:()=>p});var r=o(27723),s=o(4921),c=o(62796),n=o(24947),i=o(41616),a=o(73993),l=o(56427),d=o(10790);const u=e=>{const{reviews:t}=e,o=t?(0,r.sprintf)(/* translators: %s is referring to the total of reviews for a product */ /* translators: %s is referring to the total of reviews for a product */ (0,r._n)("(%s customer review)","(%s customer reviews)",t,"woocommerce"),t):(0,r.__)("(X customer reviews)","woocommerce");return(0,d.jsx)("span",{className:"wc-block-components-product-rating-counter__reviews_count",children:(0,d.jsx)(l.Disabled,{children:(0,d.jsx)("a",{href:"/",children:o})})})},m=e=>{const{textAlign:t,shouldDisplayMockedReviewsWhenProductHasNoReviews:o}=e,r=(0,n.p)(e),{parentClassName:i}=(0,c.useInnerBlockLayoutContext)(),{product:l}=(0,c.useProductDataContext)(),m=(e=>{const t=(0,a.isNumber)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0})(l),p=(0,s.A)(r.className,"wc-block-components-product-rating-counter",{[`${i}__product-rating`]:i,[`has-text-align-${t}`]:t});if(m||o)return(0,d.jsx)("div",{className:p,style:r.style,children:(0,d.jsx)("div",{className:"wc-block-components-product-rating-counter__container",children:(0,d.jsx)(u,{reviews:m})})})},p=(0,i.withProductDataContext)(m)},63895:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>a,default:()=>l});var r=o(62796),s=o(24947),c=o(41616),n=o(16980),i=(o(27545),o(10790));const a=e=>{const{textAlign:t="",shouldDisplayMockedReviewsWhenProductHasNoReviews:o}=e,c=(0,s.p)(e),{parentClassName:a}=(0,r.useInnerBlockLayoutContext)(),{product:l}=(0,r.useProductDataContext)(),d=(0,n.p3)(l),u=(0,n.Nm)(l);return(0,i.jsx)(n.fb,{className:"wc-block-components-product-rating-stars",showMockedReviews:o,styleProps:c,parentClassName:a,reviews:u,rating:d,textAlign:t})},l=(0,c.withProductDataContext)(a)},45547:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>a,default:()=>l});var r=o(62796),s=o(24947),c=o(41616),n=o(16980),i=(o(34053),o(10790));const a=e=>{const{textAlign:t="",shouldDisplayMockedReviewsWhenProductHasNoReviews:o,isDescendentOfQueryLoop:c,product:a}=e,l=(0,s.p)(e),{parentClassName:d}=(0,r.useInnerBlockLayoutContext)(),{product:u}=(0,r.useProductDataContext)({product:a,isAdmin:e.isAdmin}),m=u?(0,n.p3)(u):0,p=u?(0,n.Nm)(u):0;if(p||o)return(0,i.jsx)(n.fb,{className:"wc-block-components-product-rating",showReviewCount:!c,showMockedReviews:o,styleProps:l,parentClassName:d,reviews:p,rating:m,textAlign:t})},l=(0,c.withProductDataContext)(a)},44927:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>d,default:()=>u});var r=o(27723),s=o(4921),c=o(14656),n=o(62796),i=o(24947),a=o(41616),l=(o(14313),o(10790));const d=e=>{const{className:t,align:o,isDescendentOfSingleProductTemplate:a}=e,d=(0,i.p)(e),{parentClassName:u}=(0,n.useInnerBlockLayoutContext)(),{product:m}=(0,n.useProductDataContext)();if(!(m.id&&m.on_sale||a))return null;const p="string"==typeof o?`wc-block-components-product-sale-badge--align-${o}`:"";return(0,l.jsx)("div",{className:(0,s.A)("wc-block-components-product-sale-badge",t,p,{[`${u}__product-onsale`]:u},d.className),style:d.style,children:(0,l.jsx)(c.Label,{label:(0,r.__)("Sale","woocommerce"),screenReaderLabel:(0,r.__)("Product on sale","woocommerce")})})},u=(0,a.withProductDataContext)(d)},13277:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>u});var r=o(4921),s=o(62796),c=o(41616),n=o(24947),i=o(94715),a=o(27723),l=(o(1129),o(10790));const d=({setAttributes:e,parentClassName:t,sku:o,className:s,style:c,prefix:n,suffix:d})=>(0,l.jsxs)("div",{className:(0,r.A)(s,"wp-block-post-terms",{[`${t}__product-sku`]:t}),style:c,children:[(0,l.jsx)(i.RichText,{className:"wc-block-components-product-sku__prefix",tagName:"span",placeholder:(0,a.__)("Prefix","woocommerce"),value:n,onChange:t=>e({prefix:t})}),(0,l.jsxs)("span",{children:[" ",o]}),(0,l.jsx)(i.RichText,{className:(0,r.A)("wc-block-components-product-sku__suffix",{"has-content":!!d}),tagName:"span",placeholder:" "+(0,a.__)("Suffix","woocommerce"),value:d,onChange:t=>e({suffix:t})})]}),u=(0,c.withProductDataContext)(e=>{const{className:t}=e,o=(0,n.p)(e),{parentClassName:c}=(0,s.useInnerBlockLayoutContext)(),{product:i}=(0,s.useProductDataContext)(),u=i.sku;return e.isDescendentOfSingleProductTemplate?(0,l.jsx)(d,{setAttributes:e.setAttributes,parentClassName:c,className:t,sku:(0,a.__)("Product SKU","woocommerce"),prefix:e.prefix,suffix:e.suffix}):u?(0,l.jsx)(d,{setAttributes:e.setAttributes,className:t,parentClassName:c,sku:u,prefix:e.prefix,suffix:e.suffix,...e.isDescendantOfAllProducts&&{className:(0,r.A)(t,"wc-block-components-product-sku wp-block-woocommerce-product-sku",o.className),style:{...o.style}}}):null})},80964:(e,t,o)=>{"use strict";o.r(t),o.d(t,{Block:()=>u,default:()=>m});var r=o(27723),s=o(4921),c=o(62796),n=o(24947),i=o(41616),a=o(15703),l=o(95248),d=(o(33790),o(10790));const u=e=>{const{className:t}=e,o=(0,n.p)(e),{parentClassName:i}=(0,c.useInnerBlockLayoutContext)(),{product:u}=(0,c.useProductDataContext)(),{text:m,class:p}=u.stock_availability,{current:h}=(0,l.A)();if(!((e,t,o)=>{if(0!==e.id)return""!==t;const r=(0,a.getSetting)("productTypesWithoutStockIndicator",["external","grouped","variable"]),s=o||e?.type;return!r.includes(s)})(u,m,h?.slug))return null;const g=0===u.id,w=u.low_stock_remaining;return(0,d.jsx)("div",{className:(0,s.A)(t,{[`${i}__stock-indicator`]:i,[`wc-block-components-product-stock-indicator--${p}`]:p,"wc-block-components-product-stock-indicator--in-stock":g,"wc-block-components-product-stock-indicator--low-stock":!!w,...e.isDescendantOfAllProducts&&{[o.className]:o.className,"wc-block-components-product-stock-indicator wp-block-woocommerce-product-stock-indicator":!0}}),...e.isDescendantOfAllProducts&&{style:o.style},children:g?(0,r.__)("In stock","woocommerce"):m})},m=e=>{const{product:t}=(0,c.useProductDataContext)();return 0===t.id?(0,d.jsx)(u,{...e}):(0,i.withProductDataContext)(u)(e)}},42822:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>p});var r=o(27723),s=o(4921),c=o(8043),n=o(36352),i=o(73993),a=o(62796),l=o(24947),d=o(41616),u=(o(53608),o(10790));const m=e=>{const{className:t,showDescriptionIfEmpty:o,summaryLength:d,showLink:m,linkText:p,isDescendantOfAllProducts:h,isDescendentOfSingleProductTemplate:g,product:w,isAdmin:_}=e,{parentClassName:b}=(0,a.useInnerBlockLayoutContext)(),{product:x}=(0,a.useProductDataContext)({product:w,isAdmin:_}),f=(0,l.p)(e),y=(e=>{const{isDescendantOfAllProducts:t,summaryLength:o,showDescriptionIfEmpty:r,showLink:s}=e;return t&&(0,i.isEmpty)(o)&&(0,i.isEmpty)(r)&&(0,i.isEmpty)(s)})(e),v=y?150:d,k=!y&&m,j=x?((e,t)=>{const{short_description:o,description:r}=e;return o||(t&&r?r:"")})(x,!!y||o):"",C=v||1/0,S="wc-block-components-product-summary";return g?(0,u.jsx)("div",{className:S,children:(0,u.jsx)("p",{children:(0,r.__)("This block displays the product summary and all its customizations.","woocommerce")})}):x?j?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.A,{className:(0,s.A)(t,f.className,S,{"wp-block-woocommerce-product-summary":h,[`${b}__product-summary`]:b}),source:j,maxLength:C,countType:n.r7.wordCountType||"words",style:f.style}),h&&k&&p&&x?.permalink?(0,u.jsx)("a",{href:`${x.permalink}#tab-description`,children:p}):null]}):h?null:(0,u.jsx)("div",{className:S,children:(0,u.jsx)("p",{children:(0,r.__)("No product summary to show.","woocommerce")})}):(0,u.jsx)("div",{className:(0,s.A)(t,S,{"wp-block-woocommerce-product-summary":h,[`${b}__product-summary`]:b})})},p=e=>e.isDescendentOfSingleProductTemplate?(0,u.jsx)(m,{...e}):(0,d.withProductDataContext)(m)(e)},53522:(e,t,o)=>{"use strict";o.d(t,{J$:()=>i,KT:()=>a,j0:()=>l});var r=o(27723),s=o(93450),c=o(83243),n=o(10790);const i=(0,r.__)("Product Summary","woocommerce"),a=(0,n.jsx)(s.A,{icon:c.A,className:"wc-block-editor-components-block-icon"}),l=(0,r.__)("Display a short description about a product.","woocommerce")},38708:(e,t,o)=>{"use strict";o.d(t,{A:()=>m,e:()=>u});var r=o(4921),s=o(62796),c=o(41616),n=o(30572),i=o(2269),a=o(24947),l=(o(77578),o(10790));const d=({children:e,headingLevel:t,elementType:o=`h${t}`,...r})=>(0,l.jsx)(o,{...r,children:e}),u=e=>{const{className:t,headingLevel:o=2,showProductLink:c=!0,linkTarget:u,align:m}=e,p=(0,a.p)(e),{parentClassName:h}=(0,s.useInnerBlockLayoutContext)(),{product:g}=(0,s.useProductDataContext)(),{dispatchStoreEvent:w}=(0,i.y)();return g.id?(0,l.jsx)(d,{headingLevel:o,className:(0,r.A)(t,p.className,"wc-block-components-product-title",{[`${h}__product-title`]:h,[`wc-block-components-product-title--align-${m}`]:m}),style:p.style,children:(0,l.jsx)(n.A,{disabled:!c,name:g.name,permalink:g.permalink,target:u,onClick:()=>{w("product-view-link",{product:g})}})}):(0,l.jsx)(d,{headingLevel:o,className:(0,r.A)(t,p.className,"wc-block-components-product-title",{[`${h}__product-title`]:h,[`wc-block-components-product-title--align-${m}`]:m}),style:p.style})},m=(0,c.withProductDataContext)(u)},93777:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>n});var r=o(41616),s=o(38708),c=o(83925);const n=(0,r.withFilteredAttributes)(c.attributes)(s.A)},70982:(e,t,o)=>{"use strict";o.d(t,{Y:()=>n});var r=o(34083),s=o(86087),c=o(36352);o.p=c.XK,(0,r.registerBlockComponent)({blockName:"woocommerce/product-price",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,73805)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-image",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,37156)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-title",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,93777)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,45547)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-rating-stars",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,63895)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-rating-counter",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,47924)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-average-rating",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,64765)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-button",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,76754)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,42822)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,44927)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,13277)))}),(0,r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:(0,s.lazy)(()=>Promise.resolve().then(o.bind(o,80964)))});const n=e=>(0,r.getRegisteredBlockComponents)(e)},60407:(e,t,o)=>{"use strict";o.d(t,{W:()=>a});var r=o(74997),s=o(47143),c=o(29283),n=o(73993);class i{blocks=new Map;initialized=!1;attemptedRegisteredBlocks=new Set;constructor(){this.initializeSubscriptions()}static getInstance(){return i.instance||(i.instance=new i),i.instance}initializeSubscriptions(){if(this.initialized)return;const e=(0,s.subscribe)(()=>{const t=(0,s.select)(c.Y);if(!t)return;const o=t.getCurrentPostType();if(o)if("post"===o||"page"===o)e(),this.blocks.forEach(e=>{if(e.isAvailableOnPostEditor){const t=e.variationName||e.blockName;this.hasAttemptedRegistration(t)||this.registerBlock(e)}}),this.initialized=!0;else{e();const o=String(t.getEditedPostSlug());this.currentTemplateId=o,this.handleTemplateChange(void 0),(0,s.subscribe)(()=>{const e=this.currentTemplateId;this.currentTemplateId=String(t.getEditedPostSlug()),e!==this.currentTemplateId&&this.handleTemplateChange(e)},c.Y),this.initialized=!0}})}handleTemplateChange(e){(this.currentTemplateId?.includes("single-product")||e?.includes("single-product"))&&this.blocks.forEach(e=>{this.unregisterBlock(e),this.registerBlock(e)})}hasAttemptedRegistration(e){return this.attemptedRegisteredBlocks.has(e)}unregisterBlock(e){const{blockName:t,isVariationBlock:o,variationName:s}=e;try{o&&s?((0,r.unregisterBlockVariation)(t,s),this.attemptedRegisteredBlocks.delete(s)):((0,r.unregisterBlockType)(t),this.attemptedRegisteredBlocks.delete(t))}catch(e){console.debug(`Failed to unregister block ${t}:`,e)}}registerBlock(e){const{blockName:t,settings:o,isVariationBlock:c,variationName:i,isAvailableOnPostEditor:a}=e;try{const e=i||t;if(this.hasAttemptedRegistration(e))return;const l=(0,s.select)("core/edit-site");if(!l&&!a)return;if(c)(0,r.registerBlockVariation)(t,o);else{const e=(0,n.isEmpty)(o?.ancestor)?["woocommerce/single-product"]:o?.ancestor,s=l&&this.currentTemplateId?.includes("single-product");(0,r.registerBlockType)(t,{...o,ancestor:s?void 0:e})}this.attemptedRegisteredBlocks.add(e)}catch(e){console.error(`Failed to register block ${t}:`,e)}}registerBlockConfig(e){const t=e.variationName||e.blockName;this.blocks.set(t,e),this.registerBlock(e)}}const a=(e,t)=>{const o="string"==typeof e?e:e.name;if(!o)return void console.error("registerProductBlockType: Block name is required for registration");const r="string"==typeof e?{}:(({name:e,...t})=>t)(e),{isVariationBlock:s,variationName:c,isAvailableOnPostEditor:n,...a}={...r,...t||{}},l={blockName:o,settings:{...a},isVariationBlock:s??!1,variationName:c??void 0,isAvailableOnPostEditor:n??!1};i.getInstance().registerBlockConfig(l)}},96242:(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var r=o(86087),s=o(27723),c=o(36352),n=o(10790);const i=({imageUrl:e=`${c.sW}/block-error.svg`,header:t=(0,s.__)("Oops!","woocommerce"),text:o=(0,s.__)("There was an error loading the content.","woocommerce"),errorMessage:r,errorMessagePrefix:i=(0,s.__)("Error:","woocommerce"),button:a,showErrorBlock:l=!0})=>l?(0,n.jsxs)("div",{className:"wc-block-error wc-block-components-error",children:[e&&(0,n.jsx)("img",{className:"wc-block-error__image wc-block-components-error__image",src:e,alt:""}),(0,n.jsxs)("div",{className:"wc-block-error__content wc-block-components-error__content",children:[t&&(0,n.jsx)("p",{className:"wc-block-error__header wc-block-components-error__header",children:t}),o&&(0,n.jsx)("p",{className:"wc-block-error__text wc-block-components-error__text",children:o}),r&&(0,n.jsxs)("p",{className:"wc-block-error__message wc-block-components-error__message",children:[i?i+" ":"",r]}),a&&(0,n.jsx)("p",{className:"wc-block-error__button wc-block-components-error__button",children:a})]})]}):null;o(45893);class a extends r.Component{state={errorMessage:"",hasError:!1};static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("strong",{children:e.status}),": ",e.statusText]}),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:o=!0,showErrorBlock:r=!0,text:s,errorMessagePrefix:c,renderError:a,button:l}=this.props,{errorMessage:d,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:d}):(0,n.jsx)(i,{showErrorBlock:r,errorMessage:o?d:null,header:e,imageUrl:t,text:s,errorMessagePrefix:c,button:l}):this.props.children}}const l=a},83911:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(51348),s=o(86087),c=o(4921),n=(o(46882),o(10790));const i=(0,s.forwardRef)((e,t)=>{const{className:o,children:s,variant:i="contained",removeTextWrap:a=!1,...l}=e,d=(0,c.A)("wc-block-components-button","wp-element-button",o,i);if("href"in e)return(0,n.jsx)(r.$,{render:(0,n.jsx)("a",{ref:t,href:e.href,children:(0,n.jsx)("div",{className:"wc-block-components-button__text",children:s})}),className:d,...l});const u=a?e.children:(0,n.jsx)("div",{className:"wc-block-components-button__text",children:e.children});return(0,n.jsx)(r.$,{ref:t,className:d,...l,children:u})})},19092:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(27723),s=(o(9757),o(10790));const c=({additionalFields:e=[]})=>(0,s.jsx)("dl",{className:"wc-block-components-additional-fields-list",children:Object.entries(e).map(([,e])=>{const{label:t,type:o,options:c}=e;let n=(0,r.__)("Placeholder","woocommerce");return"checkbox"===o&&(n=(0,r.__)("Yes","woocommerce")),"select"===o&&(n=c[0].label),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("dt",{children:t}),(0,s.jsx)("dd",{children:n})]})})})},15404:(e,t,o)=>{"use strict";o.d(t,{A:()=>V});var r=o(4921),s=o(27723),c=o(86087),n=o(24015),i=o(72048),a=o(18537),l=o(20195),d=o(48558),u=o(64347),m=(o(79959),o(10790));const p=({className:e,quantity:t=1,minimum:o=1,maximum:n,onChange:i=()=>{},step:a=1,itemName:p="",disabled:h,editable:g=!0})=>{const w=(0,r.A)("wc-block-components-quantity-selector",e),_=(0,c.useRef)(null),b=(0,c.useRef)(null),x=(0,c.useRef)(null),f=void 0!==n,y=!h&&t-a>=o,v=!h&&(!f||t+a<=n),[k,j]=(0,c.useState)(t),C=(0,c.useRef)(t),S=(0,c.useRef)("input"),A=(0,c.useCallback)(e=>{let t=e;f&&(t=Math.min(t,Math.floor(n/a)*a)),t=Math.max(t,Math.ceil(o/a)*a),t=Math.round(t/a)*a;const r=a.toString().split(".")[1]?.length||0;return t=Math.round(t*Math.pow(10,r))/Math.pow(10,r),t},[f,n,o,a]),N=(0,u.YQ)(e=>{i(e)},600),P=(0,c.useCallback)(e=>{if(isNaN(e))return void j(t);N.cancel();const o=A(e);j(o),C.current=o,o!==t&&i(o)},[A,t,N,i]);(0,c.useLayoutEffect)(()=>{t!==C.current?"increase"===S.current&&t<C.current||"decrease"===S.current&&t>C.current||(j(t),C.current=t,S.current="input"):S.current="input"},[t,A]);const B=(0,c.useCallback)(e=>{const t="ArrowDown"===e.key||e.keyCode===d.DOWN,o="ArrowUp"===e.key||e.keyCode===d.UP,r="Enter"===e.key||e.keyCode===d.ENTER;t&&(e.preventDefault(),b.current?.click()),o&&(e.preventDefault(),x.current?.click()),r&&(e.preventDefault(),_.current?.blur())},[]),I=(0,c.useCallback)(e=>{const o=e.target.value,r=Number(o);if(j(r),isNaN(r))return void N.cancel();const s=A(r);C.current=s,s===r&&s!==t?N(s):N.cancel()},[N,A,t]),T=(0,c.useCallback)(()=>{P(k)},[k,P]),E=(0,c.useCallback)(e=>e.toString(),[]);return(0,m.jsxs)("div",{className:w,children:[g&&(0,m.jsx)("button",{ref:b,"aria-label":(0,s.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */ (0,s.__)("Reduce quantity of %s","woocommerce"),p),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:!y,onClick:()=>{const e=k-a;P(e),S.current="decrease",(0,l.speak)((0,s.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */ /* translators: %s refers to the item's new quantity in the cart. */ (0,s.__)("Quantity reduced to %s.","woocommerce"),e))},children:"−"}),(0,m.jsx)("input",{ref:_,className:"wc-block-components-quantity-selector__input",disabled:h,readOnly:!g,type:"number",step:a,min:o,max:n,value:E(k),onKeyDown:B,onBlur:T,onChange:I,"aria-label":(0,s.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */ (0,s.__)("Quantity of %s in your cart.","woocommerce"),p)}),g&&(0,m.jsx)("button",{ref:x,"aria-label":(0,s.sprintf)(/* translators: %s refers to the item's name in the cart. */ /* translators: %s refers to the item's name in the cart. */ (0,s.__)("Increase quantity of %s","woocommerce"),p),disabled:!v,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=k+a;P(e),S.current="increase",(0,l.speak)((0,s.sprintf)(/* translators: %s refers to the item's new quantity in the cart. */ /* translators: %s refers to the item's new quantity in the cart. */ (0,s.__)("Quantity increased to %s.","woocommerce"),e))},children:"+"})]})};var h=o(56464),g=o(30572),w=o(47143),_=o(47594),b=o(13817),x=o(73993),f=o(86697);var y=o(692),v=o(2269),k=o(70910),j=o(71e3),C=o(15703),S=o(93450),A=o(78592),N=o(90054),P=o(5341),B=o(95754),I=o(12892),T=o(78196),E=o(66342),R=o(66640),D=o(19968);const L=(e,t)=>(0,P.i)((0,P.n)(e,t.minorUnit)).amount,O=(0,c.forwardRef)(({lineItem:e,onRemove:t=()=>{},tabIndex:o},n)=>{const{name:i="",catalog_visibility:d="visible",short_description:O="",description:M="",show_backorder_badge:V=!1,quantity_limits:F={minimum:1,maximum:99,multiple_of:1,editable:!0},sold_individually:H=!1,permalink:z="",images:$=[],variation:W=[],item_data:G=[],prices:q={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:U={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:Y}=e,{quantity:Z,setItemQuantity:J,removeItem:X,isPendingDelete:Q}=(e=>{const t={key:"",quantity:1};(e=>(0,x.isObject)(e)&&(0,x.objectHasProp)(e,"key")&&(0,x.objectHasProp)(e,"quantity")&&(0,x.isString)(e.key)&&(0,x.isNumber)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:o="",quantity:r=1}=t,{cartErrors:s}=(0,f.V)(),{__internalStartCalculation:n,__internalFinishCalculation:i}=(0,w.useDispatch)(_.checkoutStore),[a,l]=(0,c.useState)(r),[d]=(0,u.d7)(a,400),m=(0,b.Z)(d),{removeItemFromCart:p,changeCartItemQuantity:h}=(0,w.useDispatch)(_.cartStore),g=(0,w.useSelect)(e=>{if(!o)return{quantity:!1,delete:!1};const t=e(_.cartStore);return{quantity:t.isItemPendingQuantity(o),delete:t.isItemPendingDelete(o)}},[o]);(0,c.useEffect)(()=>{const e=a!==d,t=g.quantity;e||t||d!==m&&d!==r||l(r)},[r,a,d,m,g.quantity]);const y=(0,c.useCallback)(()=>o?p(o).catch(e=>{(0,_.processErrorResponse)(e)}):Promise.resolve(!1),[o,p]);return(0,c.useEffect)(()=>{o&&(0,x.isNumber)(m)&&Number.isFinite(m)&&m!==d&&h(o,d).catch(e=>{(0,_.processErrorResponse)(e)})},[o,h,d,m]),(0,c.useEffect)(()=>(g.delete?n():i(),()=>{g.delete&&i()}),[i,n,g.delete]),(0,c.useEffect)(()=>(g.quantity||d!==a?n():i(),()=>{(g.quantity||d!==a)&&i()}),[n,i,g.quantity,d,a]),{isPendingDelete:g.delete,quantity:a,setItemQuantity:l,removeItem:y,cartItemQuantityErrors:s}})(e),{saveForLater:K,isSaving:ee}=(()=>{const[e,t]=(0,c.useState)(!1),{saveForLater:o}=(0,w.useDispatch)(_.cartStore),r=(0,c.useCallback)(async r=>{if(!r||e)return!1;t(!0);try{return await o(r),!0}catch(e){const t=e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message?e.message:(0,s.__)("There was a problem saving this item for later.","woocommerce");return(0,w.dispatch)(y.store).createNotice("error",t,{context:"wc/cart",isDismissible:!0}),!1}finally{t(!1)}},[e,o]);return{isSaving:e,saveForLater:r}})(),{dispatchStoreEvent:te}=(0,v.y)(),oe=!!(0,C.getSetting)("currentUserId",0),re=(0,C.getSettingWithCoercion)("experimentalCartSaveForLater",!1,x.isBoolean),se=(0,C.getSettingWithCoercion)("cartPageHasSavedForLater",!1,x.isBoolean),ce=oe&&re&&se,{receiveCart:ne,...ie}=(0,f.V)(),ae=(0,c.useMemo)(()=>({context:"cart",cartItem:e,cart:ie}),[e,ie]),le=(0,k.getCurrencyFromPriceResponse)(q),de=(0,j.applyCheckoutFilter)({filterName:"itemName",defaultValue:i,extensions:Y,arg:ae}),ue=(0,a.decodeEntities)(de),me=(0,B.uE)({amount:parseInt(q.raw_prices.regular_price,10),currency:I.B3,scale:q.raw_prices.precision}),pe=(0,B.uE)({amount:parseInt(q.raw_prices.price,10),currency:I.B3,scale:q.raw_prices.precision}),he=(0,N.A)(q,le.minorUnit),ge=(0,k.getCurrencyFromPriceResponse)(U);let we=parseInt(U.line_subtotal,10);(0,C.getSetting)("displayCartPricesIncludingTax",!1)&&(we+=parseInt(U.line_subtotal_tax,10));const _e=(0,B.uE)({amount:we,currency:I.B3,scale:ge.minorUnit}),be=$.length?$[0]:{},xe="hidden"===d||"search"===d,fe=(0,j.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:Y,arg:ae}),ye=(0,j.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:Y,arg:ae,validation:j.productPriceValidation}),ve=(0,j.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:Y,arg:ae,validation:j.productPriceValidation}),ke=(0,j.applyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",extensions:Y,arg:ae,validation:j.productPriceValidation}),je=(0,j.applyCheckoutFilter)({filterName:"showRemoveItemLink",defaultValue:!0,extensions:Y,arg:ae});return(0,m.jsxs)("tr",{role:"row","data-cart-item-key":e.key,className:(0,r.A)("wc-block-cart-items__row",fe,{"is-disabled":Q}),ref:n,tabIndex:o,children:[(0,m.jsx)("td",{className:"wc-block-cart-item__image","aria-hidden":"true",children:xe?(0,m.jsx)(E.A,{image:be,fallbackAlt:de,width:80,height:80}):(0,m.jsx)("a",{href:z,tabIndex:-1,children:(0,m.jsx)(E.A,{image:be,fallbackAlt:de,width:80,height:80})})}),(0,m.jsx)("td",{role:"rowheader","aria-label":ue,className:"wc-block-cart-item__product",children:(0,m.jsxs)("div",{className:"wc-block-cart-item__wrap",children:[(0,m.jsx)(g.A,{disabled:Q||xe,name:de,permalink:z}),V&&(0,m.jsx)(T.A,{}),(0,m.jsx)("div",{className:"wc-block-cart-item__prices",children:(0,m.jsx)(h.A,{currency:le,regularPrice:L(me,le),price:L(pe,le),format:ve})}),(0,m.jsx)(R.A,{shortDescription:O,fullDescription:M,itemData:G,variation:W}),(0,m.jsxs)("div",{className:"wc-block-cart-item__quantity",children:[!H&&(0,m.jsx)(p,{disabled:Q,editable:F.editable,quantity:Z,minimum:F.minimum,maximum:F.maximum,step:F.multiple_of,onChange:t=>{J(t),te("cart-set-item-quantity",{product:e,quantity:t})},itemName:ue}),je&&(0,m.jsx)("button",{className:"wc-block-cart-item__remove-link","aria-label":(0,s.sprintf)(/* translators: %s refers to the item's name in the cart. */ /* translators: %s refers to the item's name in the cart. */ (0,s.__)("Remove %s from cart","woocommerce"),ue),onClick:()=>{t(),X(),te("cart-remove-item",{product:e,quantity:Z}),(0,l.speak)((0,s.sprintf)(/* translators: %s refers to the item name in the cart. */ /* translators: %s refers to the item name in the cart. */ (0,s.__)("%s has been removed from your cart.","woocommerce"),ue))},disabled:Q,children:(0,m.jsx)(S.A,{icon:A.A,size:24})})]}),ce&&(0,m.jsx)("div",{className:"wc-block-cart-item__save-for-later",children:(0,m.jsx)("button",{type:"button",className:"wc-block-cart-item__save-for-later-link",onClick:async()=>{await K(e.key)&&(await X(),te("cart-remove-item",{product:e,quantity:Z}),(0,l.speak)((0,s.sprintf)(/* translators: %s refers to the item name. */ /* translators: %s refers to the item name. */ (0,s.__)("%s has been saved for later and removed from your cart.","woocommerce"),ue)))},disabled:Q||ee,children:ee?(0,s.__)("Saving…","woocommerce"):(0,s.__)("Save for later","woocommerce")})})]})}),(0,m.jsx)("td",{className:"wc-block-cart-item__total",children:(0,m.jsxs)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper",children:[(0,m.jsx)(h.A,{currency:ge,format:ye,price:(0,P.i)(_e).amount}),(0,m.jsx)(D.A,{currency:le,saleAmount:he*Z,format:ke})]})})]})});o(60359);const M=e=>{const t={};return e.forEach(({key:e})=>{t[e]=(0,c.createRef)()}),t},V=({lineItems:e=[],isLoading:t=!1,className:o})=>{const a=(0,c.useRef)(null),l=(0,c.useRef)(M(e));(0,c.useEffect)(()=>{l.current=M(e)},[e]);const d=e=>()=>{requestAnimationFrame(()=>{l?.current&&e&&l.current[e].current instanceof HTMLElement?l.current[e].current.focus():a.current instanceof HTMLElement&&a.current.focus()})},u=(0,m.jsx)(i.T,{isLoading:t,skeleton:(0,m.jsx)(n.q,{}),children:(0,m.jsx)(m.Fragment,{children:e.map((t,o)=>{const r=e.length>o+1?e[o+1].key:null;return(0,m.jsx)(O,{lineItem:t,onRemove:d(r),ref:l.current[t.key],tabIndex:-1},t.key)})})});return(0,m.jsxs)("table",{className:(0,r.A)("wc-block-cart-items",o),ref:a,tabIndex:-1,children:[(0,m.jsx)("caption",{className:"screen-reader-text",children:(0,m.jsx)("h2",{children:(0,s.__)("Products in cart","woocommerce")})}),(0,m.jsx)("thead",{children:(0,m.jsxs)("tr",{className:"wc-block-cart-items__header",children:[(0,m.jsx)("th",{scope:"col","aria-hidden":"true",className:"wc-block-cart-items__header-image",children:(0,m.jsx)("span",{children:(0,s.__)("Product","woocommerce")})}),(0,m.jsx)("th",{scope:"col",className:"wc-block-cart-items__header-product",children:(0,m.jsx)("span",{className:"screen-reader-text",children:(0,s.__)("Details","woocommerce")})}),(0,m.jsx)("th",{scope:"col",className:"wc-block-cart-items__header-total",children:(0,m.jsx)("span",{children:(0,s.__)("Total","woocommerce")})})]})}),(0,m.jsx)("tbody",{children:u})]})}},54579:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(36352),s=o(73993),c=o(27723);const n=Object.entries(r.iI).reduce((e,[t,o])=>(e[t]=Object.entries(o).reduce((e,[t,o])=>(e[t]=(e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=(0,c.sprintf)(/* translators: %s Field label. */ /* translators: %s Field label. */ (0,c.__)("%s (optional)","woocommerce"),e.label)),void 0!==e.optionalLabel&&(t.optionalLabel=e.optionalLabel),e.index&&((0,s.isNumber)(e.index)&&(t.index=e.index),(0,s.isString)(e.index)&&(t.index=parseInt(e.index,10))),e.hidden&&(t.required=!1),t})(o),e),{}),e),{}),i=(e,t,o="")=>{const r=o&&void 0!==n[o]?n[o]:{};return e.map(e=>({key:e,...t&&e in t?t[e]:{},...r&&e in r?r[e]:{}})).sort((e,t)=>e.index-t.index)}},83671:(e,t,o)=>{"use strict";o.d(t,{ME:()=>g,Ay:()=>w,NL:()=>h});var r=o(27723),s=o(29491),c={exports:{}};const n=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],i=(e,t=n,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";t[0].minDiversity=0,t[0].minLength=0;const s=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&s.push({regex:`[${o}]`,message:"symbol"});let c={};c.contains=s.filter(e=>new RegExp(`${e.regex}`).test(r)).map(e=>e.message),c.length=r.length;let i=t.filter(e=>c.contains.length>=e.minDiversity).filter(e=>c.length>=e.minLength).sort((e,t)=>t.id-e.id).map(e=>({id:e.id,value:e.value}));return Object.assign(c,i[0]),c};c.exports={passwordStrength:i,defaultOptions:n};var a=c.exports.passwordStrength=i,l=(c.exports.defaultOptions=n,c.exports,o(13817)),d=o(86087),u=o(4921),m=(o(36713),o(10790));const p=[(0,r.__)("Too weak","woocommerce"),(0,r.__)("Weak","woocommerce"),(0,r.__)("Medium","woocommerce"),(0,r.__)("Strong","woocommerce"),(0,r.__)("Very strong","woocommerce")],h=e=>void 0===window.zxcvbn?a(e,[{id:0,value:p[0],minDiversity:0,minLength:0},{id:1,value:p[1],minDiversity:1,minLength:4},{id:2,value:p[2],minDiversity:2,minLength:8},{id:3,value:p[3],minDiversity:4,minLength:12},{id:4,value:p[4],minDiversity:4,minLength:20}]).id:window.zxcvbn(e).score,g=({password:e="",onChange:t})=>{const o=(0,s.useInstanceId)(g,"woocommerce-password-strength-meter");let c=-1;e.length>0&&(c=h(e));const n=(0,l.Z)(c);return(0,d.useEffect)(()=>{c!==n&&t&&t(c)},[c,n,t]),(0,m.jsxs)("div",{id:o,className:(0,u.A)("wc-block-components-password-strength",{hidden:-1===c}),children:[(0,m.jsx)("label",{htmlFor:o+"-meter",className:"screen-reader-text",children:(0,r.__)("Password strength","woocommerce")}),(0,m.jsx)("meter",{id:o+"-meter",className:"wc-block-components-password-strength__meter",min:0,max:4,value:c>-1?c:0,children:p[c]??""}),!!p[c]&&(0,m.jsxs)("div",{id:o+"-result",className:"wc-block-components-password-strength__result",children:[(0,m.jsx)("span",{className:"screen-reader-text","aria-live":"polite",children:(0,r.sprintf)(/* translators: %s: Password strength */ /* translators: %s: Password strength */ (0,r.__)("Password strength: %1$s (%2$d characters long)","woocommerce"),p[c],e.length)})," ",(0,m.jsx)("span",{"aria-hidden":!0,children:p[c]})]})]})},w=g},5856:(e,t,o)=>{"use strict";o.d(t,{h:()=>d});var r=o(4921),s=o(10790);const c=e=>`wc-block-components-payment-method-icon wc-block-components-payment-method-icon--${e}`,n=({id:e,src:t=null,alt:o=""})=>t?(0,s.jsx)("img",{className:c(e),src:t,alt:o}):null;var i=o(36352);const a=[{id:"alipay",alt:"Alipay",src:i.sW+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:i.sW+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:i.sW+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:i.sW+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:i.sW+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:i.sW+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:i.sW+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:i.sW+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:i.sW+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:i.sW+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:i.sW+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:i.sW+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:i.sW+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:i.sW+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:i.sW+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:i.sW+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:i.sW+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:i.sW+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:i.sW+"payment-methods/wechat.svg"}];var l=o(73993);o(86983);const d=({icons:e=[],align:t="center",className:o})=>{const c=(e=>{const t={};return e.forEach(e=>{let o={};"string"==typeof e&&(o={id:e,alt:e,src:null}),"object"==typeof e&&(o={id:e.id||"",alt:e.alt||"",src:e.src||null}),o.id&&(0,l.isString)(o.id)&&!t[o.id]&&(t[o.id]=o)}),Object.values(t)})(e);if(0===c.length)return null;const i=(0,r.A)("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===t,"wc-block-components-payment-method-icons--align-right":"right"===t},o);return(0,s.jsx)("div",{className:i,children:c.map(e=>{const t={...e,...(o=e.id,a.find(e=>e.id===o)||{})};var o;return(0,s.jsx)(n,{...t},"payment-method-icon-"+e.id)})})}},78196:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(27723),s=o(43676),c=o(10790);const n=()=>(0,c.jsx)(s.A,{className:"wc-block-components-product-backorder-badge",children:(0,r.__)("Available on backorder","woocommerce")})},43676:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(4921),s=(o(37605),o(10790));const c=({children:e,className:t})=>(0,s.jsx)("div",{className:(0,r.A)("wc-block-components-product-badge",t),children:e})},66342:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(18537),s=o(15703),c=o(10790);const n=({image:e={},fallbackAlt:t="",width:o,height:n})=>{const i=e.alt||t;let a;e.thumbnail_srcset&&(a=o?`${o}px`:"100px");const l=e.thumbnail?{src:e.thumbnail,alt:i?(0,r.decodeEntities)(i):"Product Image",srcSet:e.thumbnail_srcset||void 0,sizes:a}:{src:s.PLACEHOLDER_IMG_SRC,alt:"",srcSet:void 0,sizes:void 0};return(0,c.jsx)("img",{src:l.src,alt:l.alt,srcSet:l.srcSet,sizes:l.sizes,width:o,height:n})}},66640:(e,t,o)=>{"use strict";o.d(t,{A:()=>m});var r=o(67356),s=o(42435),c=(o(3692),o(10790));const n=["a","b","em","i","strong","br","abbr","span"],i=["target","href","rel","name","download","class","title"],a=({details:e=[]})=>{if(!Array.isArray(e))return null;const t=e.filter(e=>!e.hidden);return 0===t.length?null:(0,c.jsx)("div",{className:"wc-block-components-product-details",children:t.map((e,o)=>{const a=e?.key||e.name||"",l=document.createElement("div");l.innerHTML=a;const d=l.textContent||l.innerText||"",u=e?.className||(d?`wc-block-components-product-details__${(0,r.c)(d)}`:""),m=o===t.length-1;return(0,c.jsxs)("span",{className:u,children:[a&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"wc-block-components-product-details__name",dangerouslySetInnerHTML:{__html:(0,s.sanitizeHTML)(a,{tags:n,attr:i})+":"}})," "]}),(0,c.jsx)("span",{className:"wc-block-components-product-details__value",dangerouslySetInnerHTML:{__html:(0,s.sanitizeHTML)(e.display||e.value,{tags:n,attr:i})}}),!m&&(0,c.jsx)("span",{"aria-hidden":"true",children:" / "})]},a+(e.display||e.value))})})};var l=o(8043),d=o(36352);const u=({className:e,shortDescription:t="",fullDescription:o=""})=>{const r=t||o;return r?(0,c.jsx)(l.A,{className:e,source:r,maxLength:15,countType:d.r7.wordCountType||"words"}):null};o(8879);const m=({shortDescription:e="",fullDescription:t="",itemData:o=[],variation:r=[]})=>(0,c.jsxs)("div",{className:"wc-block-components-product-metadata",children:[(0,c.jsx)(u,{className:"wc-block-components-product-metadata__description",shortDescription:e,fullDescription:t}),(0,c.jsx)(a,{details:o}),(0,c.jsx)(a,{details:r.map(({attribute:e="",value:t})=>({key:e,value:t}))})]})},19968:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(86087),s=o(27723),c=o(14656),n=o(43676),i=o(10790);const a=({currency:e,saleAmount:t,format:o="<price/>"})=>{if(!t||t<=0)return null;o.includes("<price/>")||(o="<price/>",console.error("Price formats need to include the `<price/>` tag."));const a=(0,s.sprintf)(/* translators: %s will be replaced by the discount amount */ /* translators: %s will be replaced by the discount amount */ (0,s.__)("Save %s","woocommerce"),o);return(0,i.jsx)(n.A,{className:"wc-block-components-sale-badge",children:(0,r.createInterpolateElement)(a,{price:(0,i.jsx)(c.FormattedMonetaryAmount,{currency:e,value:t})})})}},12220:(e,t,o)=>{"use strict";o.d(t,{_i:()=>m,n$:()=>w,Ay:()=>v,w7:()=>A});var r=o(4921),s=o(27723),c=o(86087),n=o(83911),i=o(4138),a=o(14656),l=o(47143),d=o(47594),u=(o(81962),o(10790));const m=({instanceId:e,isLoading:t=!1,onSubmit:o,displayCouponForm:m=!1})=>{const[p,h]=(0,c.useState)(""),[g,w]=(0,c.useState)(m),_=`wc-block-components-totals-coupon__input-${e}`,{validationErrorId:b}=(0,l.useSelect)(t=>({validationErrorId:t(d.validationStore).getValidationErrorId(e)}),[e]),x=(0,c.useRef)(null);return(0,u.jsx)(a.Panel,{className:"wc-block-components-totals-coupon",initialOpen:g,hasBorder:!1,headingLevel:2,title:(0,s.__)("Add coupons","woocommerce"),state:[g,w],children:(0,u.jsx)(i.A,{screenReaderLabel:(0,s.__)("Applying coupon…","woocommerce"),isLoading:t,showSpinner:!1,children:(0,u.jsxs)("div",{className:"wc-block-components-totals-coupon__content",children:[(0,u.jsxs)("form",{className:"wc-block-components-totals-coupon__form",id:"wc-block-components-totals-coupon__form",children:[(0,u.jsx)(a.ValidatedTextInput,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:(0,s.__)("Enter code","woocommerce"),value:p,ariaDescribedBy:b||"",onChange:e=>{h(e)},focusOnMount:!0,validateOnMount:!1,showError:!1,ref:x}),(0,u.jsxs)(n.A,{className:(0,r.A)("wc-block-components-totals-coupon__button",{"wc-block-components-totals-coupon__button--loading":t}),disabled:t||!p,onClick:e=>{e.preventDefault(),void 0!==o?o(p)?.then(e=>{e?(h(""),w(!1)):x.current?.focus&&x.current.focus()}):(h(""),w(!0))},type:"submit",children:[t&&(0,u.jsx)(a.Spinner,{}),(0,s.__)("Apply","woocommerce")]})]}),(0,u.jsx)(a.ValidationInputError,{propertyName:"coupon",elementId:e})]})})})};var p=o(71e3),h=o(15703);o(90619);const g={context:"summary"},w=({cartCoupons:e=[],currency:t,isRemovingCoupon:o,removeCoupon:r,values:c,isLoading:n})=>{const{total_discount:l,total_discount_tax:d}=c,m=parseInt(l,10),w=(0,p.applyCheckoutFilter)({arg:g,filterName:"coupons",defaultValue:e});if(!m&&0===w.length)return null;const _=parseInt(d,10),b=(0,h.getSetting)("displayCartPricesIncludingTax",!1)?m+_:m;return(0,u.jsx)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:t,description:0!==w.length&&(0,u.jsx)(i.A,{screenReaderLabel:(0,s.__)("Removing coupon…","woocommerce"),isLoading:o,showSpinner:!1,children:(0,u.jsx)("ul",{className:"wc-block-components-totals-discount__coupon-list",children:w.map(e=>(0,u.jsx)(a.RemovableChip,{className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:(0,s.sprintf)(/* translators: %s Coupon code. */ /* translators: %s Coupon code. */ (0,s.__)("Coupon: %s","woocommerce"),e.label),disabled:o,onRemove:()=>{r(e.code)},radius:"large",ariaLabel:(0,s.sprintf)(/* translators: %s is a coupon code. */ /* translators: %s is a coupon code. */ (0,s.__)('Remove coupon "%s"',"woocommerce"),e.label)},"coupon-"+e.code))})}),label:b?(0,s.__)("Discount","woocommerce"):(0,s.__)("Coupons","woocommerce"),value:b?-1*b:"-",showSkeleton:n})};var _=o(86697),b=o(37486),x=o(80305),f=o(61526),y=o(72048);o(48413);const v=({currency:e,values:t,className:o,isEstimate:n=!1})=>{const i=(0,h.getSetting)("taxesEnabled",!0)&&(0,h.getSetting)("displayCartPricesIncludingTax",!1),{total_price:l,total_tax:d,tax_lines:m}=t,{receiveCart:g,...w}=(0,_.V)(),{isLoading:v}=(0,b.n)(),k=(0,p.applyCheckoutFilter)({filterName:"totalLabel",defaultValue:n?(0,s.__)("Estimated total","woocommerce"):(0,s.__)("Total","woocommerce"),extensions:w.extensions,arg:{cart:w}}),j=(0,p.applyCheckoutFilter)({filterName:"totalValue",defaultValue:"<price/>",extensions:w.extensions,arg:{cart:w},validation:p.productPriceValidation}),C=(0,u.jsx)(a.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:parseInt(l,10)}),S=(0,c.createInterpolateElement)(j,{price:C}),A=parseInt(d,10),N=(0,u.jsx)(u.Fragment,{children:m?.map(({name:t,price:o,rate:r},s)=>(0,u.jsxs)(c.Fragment,{children:[s>0&&", ",(0,u.jsx)(a.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:o}),` ${t}`]},`${t}-${r}`))}),P=m&&m.length>0?(0,s.sprintf)(/* translators: %s is a list of tax rates */ /* translators: %s is a list of tax rates */ (0,s.__)("Including %s","woocommerce"),"<TaxLines/>"):(0,s.__)("Including <TaxAmount/> in taxes","woocommerce"),B=(0,x.m3)(w.shippingRates),I=w.cartNeedsShipping,T=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("span",{children:(0,s.__)("Including","woocommerce")}),(0,u.jsx)(f.E,{height:"1em",width:"45px",tag:"span",ariaMessage:(0,s.__)("Loading price… ","woocommerce")})]});return(0,u.jsx)(a.TotalsItem,{className:(0,r.A)("wc-block-components-totals-footer-item",o),currency:e,label:k,value:S,description:(0,u.jsxs)(u.Fragment,{children:[i&&0!==A&&(0,u.jsx)("p",{className:"wc-block-components-totals-footer-item-tax",children:(0,u.jsx)(y.T,{isLoading:v,skeleton:T,children:(0,u.jsx)(u.Fragment,{children:(0,c.createInterpolateElement)(P,{TaxAmount:(0,u.jsx)(a.FormattedMonetaryAmount,{className:"wc-block-components-totals-footer-item-tax-value",currency:e,value:A}),TaxLines:N})})})}),n&&!B&&I&&(0,u.jsx)("p",{className:"wc-block-components-totals-footer-item-shipping",children:(0,s.__)("Shipping will be calculated at checkout","woocommerce")})]}),showSkeleton:v})};var k=o(70910),j=o(18537);const C=()=>{const{shippingRates:e}=(0,_.V)(),t=(0,x.qr)(e);return t?(0,u.jsx)("div",{className:"wc-block-components-totals-shipping__via",children:(0,j.decodeEntities)(t.filter((e,o)=>t.indexOf(e)===o).join(", "))}):null};o(73993);const S=e=>{const t=(0,x.mH)(e);return 0===t?(0,u.jsx)("strong",{children:(0,s.__)("Free","woocommerce")}):t};o(36562);const A=({label:e=(0,s.__)("Shipping","woocommerce"),placeholder:t=null,collaterals:o=null,shippingRates:r})=>{const{cartTotals:c,shippingRates:n}=(0,_.V)(),{isLoading:i}=(0,b.n)(),l=r??n,d=(0,x.m3)(l),m=(0,x.qr)(l),p=l.flatMap(e=>e.shipping_rates.map(e=>e.name).filter(Boolean));let h=[];m.length>0?h=m:1===p.length&&(h=p);const g=m.length>1||p.length>1,w=0===h.length||g?e:h[0];return(0,u.jsx)("div",{className:"wc-block-components-totals-shipping",children:(0,u.jsx)(a.TotalsItem,{label:w,value:d?S(c):t,description:(0,u.jsxs)(u.Fragment,{children:[g&&(0,u.jsx)(C,{}),o&&(0,u.jsx)("div",{className:"wc-block-components-totals-shipping__collaterals",children:o})]}),currency:(0,k.getCurrencyFromPriceResponse)(c),showSkeleton:i})})}},72048:(e,t,o)=>{"use strict";o.d(t,{T:()=>n});var r=o(86087),s=o(29491),c=o(10790);const n=({children:e,isLoading:t,skeleton:o})=>{const n=(0,s.useReducedMotion)(),[i,a]=(0,r.useState)(t),[l,d]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(n)return void a(t);let e;if(t)a(!0),d(Date.now());else if(l){const t=Date.now()-l,o=Math.max(0,2e3-t);e=setTimeout(()=>{a(!1),d(null)},o)}return()=>{e&&clearTimeout(e)}},[t,l,n]),(0,c.jsx)(c.Fragment,{children:i?o:e})}},38323:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(27723),s=o(14656),c=(o(98502),o(10790));const n=({name:e,count:t})=>(0,c.jsxs)(c.Fragment,{children:[e,null!==t&&Number.isFinite(t)&&(0,c.jsx)(s.Label,{label:t.toString(),screenReaderLabel:(0,r.sprintf)(/* translators: %s number of products. */ /* translators: %s number of products. */ (0,r._n)("%s product","%s products",t,"woocommerce"),t),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}})]})},58733:(e,t,o)=>{"use strict";o.d(t,{A:()=>s}),o(49300);var r=o(10790);const s=({children:e})=>(0,r.jsx)("div",{className:"wc-block-filter-title-placeholder",children:e})},30612:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(27723),s=o(4921),c=o(14656),n=(o(97165),o(10790));const i=({className:e, /* translators: Reset button text for filters. */ label:t=(0,r.__)("Reset","woocommerce"),onClick:o,screenReaderLabel:i=(0,r.__)("Reset filter","woocommerce")})=>(0,n.jsx)("button",{className:(0,s.A)("wc-block-components-filter-reset-button",e),onClick:o,children:(0,n.jsx)(c.Label,{label:t,screenReaderLabel:i})})},60427:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(27723),s=o(4921),c=o(14656),n=(o(90874),o(10790));const i=({className:e,isLoading:t,disabled:o, /* translators: Submit button text for filters. */ label:i=(0,r.__)("Apply","woocommerce"),onClick:a,screenReaderLabel:l=(0,r.__)("Apply filter","woocommerce")})=>(0,n.jsx)("button",{type:"submit",className:(0,s.A)("wp-block-button__link","wc-block-filter-submit-button","wc-block-components-filter-submit-button",{"is-loading":t},e),disabled:o,onClick:a,children:(0,n.jsx)(c.Label,{label:i,screenReaderLabel:l})})},30426:(e,t,o)=>{"use strict";o.d(t,{A:()=>ge});var r=o(86087);const s=window.lodash;var c=o(65993),n=o.n(c),i=o(27723),a=o(29491),l=o(48558),d=o(20923),u=o.n(d),m=o(5573);const p=(0,r.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(m.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},h.apply(null,arguments)}var g=o(64040),w=o.n(g),_=o(28107);const b=(0,r.createElement)(m.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(m.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function x(e,t,o){const{defaultView:r}=t,{frameElement:s}=r;if(!s||t===o.ownerDocument)return e;const c=s.getBoundingClientRect();return new r.DOMRect(e.left+c.left,e.top+c.top,e.width,e.height)}let f=0;function y(e){const t=document.scrollingElement||document.body;e&&(f=t.scrollTop);const o=e?"add":"remove";t.classList[o]("lockscroll"),document.documentElement.classList[o]("lockscroll"),e||(t.scrollTop=f)}let v=0;function k(){return(0,r.useEffect)(()=>(0===v&&y(!0),++v,()=>{1===v&&y(!1),--v}),[]),null}window.wp.warning;const j=(0,r.createContext)({slots:{},fills:{},registerSlot:()=>{"undefined"!=typeof process&&process.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function C(e){const t=(0,r.useContext)(j),o=t.slots[e]||{},s=t.fills[e],c=(0,r.useMemo)(()=>s||[],[s]);return{...o,updateSlot:(0,r.useCallback)(o=>{t.updateSlot(e,o)},[e,t.updateSlot]),unregisterSlot:(0,r.useCallback)(o=>{t.unregisterSlot(e,o)},[e,t.unregisterSlot]),fills:c,registerFill:(0,r.useCallback)(o=>{t.registerFill(e,o)},[e,t.registerFill]),unregisterFill:(0,r.useCallback)(o=>{t.unregisterFill(e,o)},[e,t.unregisterFill])}}const S=(0,r.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function A({name:e,children:t,registerFill:o,unregisterFill:c}){const n=(e=>{const{getSlot:t,subscribe:o}=(0,r.useContext)(S),[s,c]=(0,r.useState)(t(e));return(0,r.useEffect)(()=>(c(t(e)),o(()=>{c(t(e))})),[e]),s})(e),i=(0,r.useRef)({name:e,children:t});return(0,r.useLayoutEffect)(()=>(o(e,i.current),()=>c(e,i.current)),[]),(0,r.useLayoutEffect)(()=>{i.current.children=t,n&&n.forceUpdate()},[t]),(0,r.useLayoutEffect)(()=>{e!==i.current.name&&(c(i.current.name,i.current),i.current.name=e,o(e,i.current))},[e]),n&&n.node?((0,s.isFunction)(t)&&(t=t(n.props.fillProps)),(0,r.createPortal)(t,n.node)):null}const N=e=>(0,r.createElement)(S.Consumer,null,({registerFill:t,unregisterFill:o})=>(0,r.createElement)(A,h({},e,{registerFill:t,unregisterFill:o})));class P extends r.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:o,registerSlot:r}=this.props;e.name!==t&&(o(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:o={},getFills:c}=this.props,n=(0,s.map)(c(t,this),e=>{const t=(0,s.isFunction)(e.children)?e.children(o):e.children;return r.Children.map(t,(e,t)=>{if(!e||(0,s.isString)(e))return e;const o=e.key||t;return(0,r.cloneElement)(e,{key:o})})}).filter((0,s.negate)(r.isEmptyElement));return(0,r.createElement)(r.Fragment,null,(0,s.isFunction)(e)?e(n):n)}}const B=e=>(0,r.createElement)(S.Consumer,null,({registerSlot:t,unregisterSlot:o,getFills:s})=>(0,r.createElement)(P,h({},e,{registerSlot:t,unregisterSlot:o,getFills:s})));function I(){const[,e]=(0,r.useState)({}),t=(0,r.useRef)(!0);return(0,r.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function T({name:e,children:t}){const o=C(e),s=(0,r.useRef)({rerender:I()});return(0,r.useEffect)(()=>(o.registerFill(s),()=>{o.unregisterFill(s)}),[o.registerFill,o.unregisterFill]),o.ref&&o.ref.current?("function"==typeof t&&(t=t(o.fillProps)),(0,r.createPortal)(t,o.ref.current)):null}const E=(0,r.forwardRef)(function({name:e,fillProps:t={},as:o="div",...s},c){const n=(0,r.useContext)(j),i=(0,r.useRef)();return(0,r.useLayoutEffect)(()=>(n.registerSlot(e,i,t),()=>{n.unregisterSlot(e,i)}),[n.registerSlot,n.unregisterSlot,e]),(0,r.useLayoutEffect)(()=>{n.updateSlot(e,t)}),(0,r.createElement)(o,h({ref:(0,a.useMergeRefs)([c,i])},s))});function R(e){return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(N,e),(0,r.createElement)(T,e))}const D=(0,r.forwardRef)(({bubblesVirtually:e,...t},o)=>e?(0,r.createElement)(E,h({},t,{ref:o})):(0,r.createElement)(B,t));function L(e){return"appear"===e?"top":"left"}const O="Popover";function M(e,t){const{paddingTop:o,paddingBottom:r,paddingLeft:s,paddingRight:c}=(n=t).ownerDocument.defaultView.getComputedStyle(n);var n;const i=o?parseInt(o,10):0,a=r?parseInt(r,10):0,l=s?parseInt(s,10):0,d=c?parseInt(c,10):0;return{x:e.left+l,y:e.top+i,width:e.width-l-d,height:e.height-i-a,left:e.left+l,right:e.right-d,top:e.top+i,bottom:e.bottom-a}}function V(e,t,o){o?e.getAttribute(t)!==o&&e.setAttribute(t,o):e.hasAttribute(t)&&e.removeAttribute(t)}function F(e,t,o=""){e.style[t]!==o&&(e.style[t]=o)}function H(e,t,o){o?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const z=(0,r.forwardRef)(({headerTitle:e,onClose:t,children:o,className:s,noArrow:c=!0,isAlternate:l,position:d="bottom right",range:u,focusOnMount:m="firstElement",anchorRef:p,shouldAnchorIncludePadding:g,anchorRect:f,getAnchorRect:y,expandOnMobile:v,animate:j=!0,onClickOutside:S,onFocusOutside:A,__unstableStickyBoundaryElement:N,__unstableSlotName:P=O,__unstableObserveElement:B,__unstableBoundaryParent:I,__unstableForcePosition:T,__unstableForceXAlignment:E,...D},z)=>{const $=(0,r.useRef)(null),W=(0,r.useRef)(null),G=(0,r.useRef)(),q=(0,a.useViewportMatch)("medium","<"),[U,Y]=(0,r.useState)(),Z=C(P),J=v&&q,[X,Q]=(0,a.useResizeObserver)();c=J||c,(0,r.useLayoutEffect)(()=>{if(J)return H(G.current,"is-without-arrow",c),H(G.current,"is-alternate",l),V(G.current,"data-x-axis"),V(G.current,"data-y-axis"),F(G.current,"top"),F(G.current,"left"),F(W.current,"maxHeight"),void F(W.current,"maxWidth");const e=()=>{if(!G.current||!W.current)return;let e=function(e,t,o,r=!1,s,c){if(t)return t;if(o){if(!e.current)return;const t=o(e.current);return x(t,t.ownerDocument||e.current.ownerDocument,c)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return x((0,_.getRectangleFromRange)(r),r.endContainer.ownerDocument,c);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=x(r.getBoundingClientRect(),r.ownerDocument,c);return s?e:M(e,r)}const{top:e,bottom:t}=r,o=e.getBoundingClientRect(),n=t.getBoundingClientRect(),i=x(new window.DOMRect(o.left,o.top,o.width,n.bottom-o.top),e.ownerDocument,c);return s?i:M(i,r)}if(!e.current)return;const{parentNode:n}=e.current,i=n.getBoundingClientRect();return s?i:M(i,n)}($,f,y,p,g,G.current);if(!e)return;const{offsetParent:t,ownerDocument:o}=G.current;let r,s=0;if(t&&t!==o.body){const o=t.getBoundingClientRect();s=o.top,e=new window.DOMRect(e.left-o.left,e.top-o.top,e.width,e.height)}var n;I&&(r=null===(n=G.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);const a=Q.height?Q:W.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:m,xAxis:h,yAxis:w,contentHeight:b,contentWidth:v}=function(e,t,o="top",r,s,c,n,a,l){const[d,u="center",m]=o.split(" "),p=function(e,t,o,r,s,c,n,i){const{height:a}=t;if(s){const t=s.getBoundingClientRect().top+a-n;if(e.top<=t)return{yAxis:o,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);const d={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},u={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},m={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a};let p,h=o,g=null;if(!s&&!i)if("middle"===o&&d.contentHeight===a)h="middle";else if("top"===o&&u.contentHeight===a)h="top";else if("bottom"===o&&m.contentHeight===a)h="bottom";else{h=u.contentHeight>m.contentHeight?"top":"bottom";const e="top"===h?u.contentHeight:m.contentHeight;g=e!==a?e:null}return p="middle"===h?d.popoverTop:"top"===h?u.popoverTop:m.popoverTop,{yAxis:h,popoverTop:p,contentHeight:g}}(e,t,d,m,r,0,c,a),h=function(e,t,o,r,s,c,n,a,l){const{width:d}=t;"left"===o&&(0,i.isRTL)()?o="right":"right"===o&&(0,i.isRTL)()&&(o="left"),"left"===r&&(0,i.isRTL)()?r="right":"right"===r&&(0,i.isRTL)()&&(r="left");const u=Math.round(e.left+e.width/2),m={popoverLeft:u,contentWidth:(u-d/2>0?d/2:u)+(u+d/2>window.innerWidth?window.innerWidth-u:d/2)};let p=e.left;"right"===r?p=e.right:"middle"===c||l||(p=u);let h=e.right;"left"===r?h=e.left:"middle"===c||l||(h=u);const g={popoverLeft:p,contentWidth:p-d>0?d:p},w={popoverLeft:h,contentWidth:h+d>window.innerWidth?window.innerWidth-h:d};let _,b=o,x=null;if(!s&&!a)if("center"===o&&m.contentWidth===d)b="center";else if("left"===o&&g.contentWidth===d)b="left";else if("right"===o&&w.contentWidth===d)b="right";else{b=g.contentWidth>w.contentWidth?"left":"right";const e="left"===b?g.contentWidth:w.contentWidth;d>window.innerWidth&&(x=window.innerWidth),e!==d&&(b="center",m.popoverLeft=window.innerWidth/2)}if(_="center"===b?m.popoverLeft:"left"===b?g.popoverLeft:w.popoverLeft,n){const e=n.getBoundingClientRect();_=Math.min(_,e.right-d),(0,i.isRTL)()||(_=Math.max(_,0))}return{xAxis:b,popoverLeft:_,contentWidth:x}}(e,t,u,m,r,p.yAxis,n,a,l);return{...h,...p}}(e,a,d,N,G.current,s,r,T,E);"number"==typeof u&&"number"==typeof m&&(F(G.current,"top",u+"px"),F(G.current,"left",m+"px")),H(G.current,"is-without-arrow",c||"center"===h&&"middle"===w),H(G.current,"is-alternate",l),V(G.current,"data-x-axis",h),V(G.current,"data-y-axis",w),F(W.current,"maxHeight","number"==typeof b?b+"px":""),F(W.current,"maxWidth","number"==typeof v?v+"px":""),Y(({left:"right",right:"left"}[h]||"center")+" "+({top:"bottom",bottom:"top"}[w]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:o}=t,r=o.setInterval(e,500);let s;const n=()=>{o.cancelAnimationFrame(s),s=o.requestAnimationFrame(e)};o.addEventListener("click",n),o.addEventListener("resize",e),o.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(p);let u;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),B&&(u=new o.MutationObserver(e),u.observe(B,{attributes:!0})),()=>{o.clearInterval(r),o.removeEventListener("resize",e),o.removeEventListener("scroll",e,!0),o.removeEventListener("click",n),o.cancelAnimationFrame(s),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),u&&u.disconnect()}},[J,f,y,p,g,d,Q,N,B,I]);const K=(e,o)=>{if("focus-outside"===e&&A)A(o);else if("focus-outside"===e&&S){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>o.relatedTarget}),w()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),S(e)}else t&&t()},[te,oe]=(0,a.__experimentalUseDialog)({focusOnMount:m,__unstableOnClose:K,onClose:K}),re=(0,a.useMergeRefs)([G,te,z]),se=Boolean(j&&U)&&function(e){if("loading"===e.type)return n()("components-animate__loading");const{type:t,origin:o=L(t)}=e;if("appear"===t){const[e,t="center"]=o.split(" ");return n()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?n()("components-animate__slide-in","is-from-"+o):void 0}({type:"appear",origin:U});let ce=(0,r.createElement)("div",h({className:n()("components-popover",s,se,{"is-expanded":J,"is-without-arrow":c,"is-alternate":l})},D,{ref:re},oe,{tabIndex:"-1"}),J&&(0,r.createElement)(k,null),J&&(0,r.createElement)("div",{className:"components-popover__header"},(0,r.createElement)("span",{className:"components-popover__header-title"},e),(0,r.createElement)(ee,{className:"components-popover__close",icon:b,onClick:t})),(0,r.createElement)("div",{ref:W,className:"components-popover__content"},(0,r.createElement)("div",{style:{position:"relative"}},X,o)));return Z.ref&&(ce=(0,r.createElement)(R,{name:P},ce)),p||f?ce:(0,r.createElement)("span",{ref:$},ce)});z.Slot=(0,r.forwardRef)(function({name:e=O},t){return(0,r.createElement)(D,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})});const $=z,W=function({shortcut:e,className:t}){if(!e)return null;let o,c;return(0,s.isString)(e)&&(o=e),(0,s.isObject)(e)&&(o=e.display,c=e.ariaLabel),(0,r.createElement)("span",{className:t,"aria-label":c},o)},G=(0,r.createElement)("div",{className:"event-catcher"}),q=({eventHandlers:e,child:t,childrenWithPopover:o})=>(0,r.cloneElement)((0,r.createElement)("span",{className:"disabled-element-wrapper"},(0,r.cloneElement)(G,e),(0,r.cloneElement)(t,{children:o}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:o})=>(0,r.cloneElement)(e,{...t,children:o}),Y=(e,t,o)=>{if(1!==r.Children.count(e))return;const s=r.Children.only(e);"function"==typeof s.props[t]&&s.props[t](o)},Z=function({children:e,position:t,text:o,shortcut:c}){const[n,i]=(0,r.useState)(!1),[l,d]=(0,r.useState)(!1),u=(0,a.useDebounce)(d,700),m=t=>{Y(e,"onMouseDown",t),document.addEventListener("mouseup",g),i(!0)},p=t=>{Y(e,"onMouseUp",t),document.removeEventListener("mouseup",g),i(!1)},h=e=>"mouseUp"===e?p:"mouseDown"===e?m:void 0,g=h("mouseUp"),w=(t,o)=>r=>{if(Y(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&n)return;u.cancel();const c=(0,s.includes)(["focus","mouseenter"],r.type);c!==l&&(o?u(c):d(c))},_=()=>{u.cancel(),document.removeEventListener("mouseup",g)};if((0,r.useEffect)(()=>_,[]),1!==r.Children.count(e))return e;const b={onMouseEnter:w("onMouseEnter",!0),onMouseLeave:w("onMouseLeave"),onClick:w("onClick"),onFocus:w("onFocus"),onBlur:w("onBlur"),onMouseDown:h("mouseDown")},x=r.Children.only(e),{children:f,disabled:y}=x.props,v=y?q:U,k=(({grandchildren:e,isOver:t,position:o,text:s,shortcut:c})=>(0,r.concatChildren)(e,t&&(0,r.createElement)($,{focusOnMount:!1,position:o,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},s,(0,r.createElement)(W,{className:"components-tooltip__shortcut",shortcut:c}))))({grandchildren:f,isOver:l,position:t,text:o,shortcut:c});return v({child:x,eventHandlers:b,childrenWithPopover:k})},J=function({icon:e,className:t,...o}){const s=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return(0,r.createElement)("span",h({className:s},o))},X=function({icon:e=null,size:t=24,...o}){if("string"==typeof e)return(0,r.createElement)(J,h({icon:e},o));if((0,r.isValidElement)(e)&&J===e.type)return(0,r.cloneElement)(e,{...o});if("function"==typeof e)return e.prototype instanceof r.Component?(0,r.createElement)(e,{size:t,...o}):e({size:t,...o});if(e&&("svg"===e.type||e.type===m.SVG)){const s={width:t,height:t,...e.props,...o};return(0,r.createElement)(m.SVG,s)}return(0,r.isValidElement)(e)?(0,r.cloneElement)(e,{size:t,...o}):e},Q=(0,r.forwardRef)(function({as:e="div",className:t,...o},s){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):(0,r.createElement)(e,t)}({as:e,className:n()("components-visually-hidden",t),...o,ref:s})}),K=["onMouseDown","onClick"],ee=(0,r.forwardRef)(function(e,t){const{href:o,target:c,isSmall:i,isPressed:a,isBusy:l,isDestructive:d,className:u,disabled:m,icon:p,iconPosition:g="left",iconSize:_,showTooltip:b,tooltipPosition:x,shortcut:f,label:y,children:v,text:k,variant:j,__experimentalIsFocusable:C,describedBy:S,...A}=function({isDefault:e,isPrimary:t,isSecondary:o,isTertiary:r,isLink:s,variant:c,...n}){let i=c;var a,l,d,u,m;return t&&(null!==(a=i)&&void 0!==a||(i="primary")),r&&(null!==(l=i)&&void 0!==l||(i="tertiary")),o&&(null!==(d=i)&&void 0!==d||(i="secondary")),e&&(w()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(u=i)&&void 0!==u||(i="secondary")),s&&(null!==(m=i)&&void 0!==m||(i="link")),{...n,variant:i}}(e),N=n()("components-button",u,{"is-secondary":"secondary"===j,"is-primary":"primary"===j,"is-small":i,"is-tertiary":"tertiary"===j,"is-pressed":a,"is-busy":l,"is-link":"link"===j,"is-destructive":d,"has-text":!!p&&!!v,"has-icon":!!p}),P=m&&!C,B=void 0===o||P?"button":"a",I="a"===B?{href:o,target:c}:{type:"button",disabled:P,"aria-pressed":a};if(m&&C){I["aria-disabled"]=!0;for(const e of K)A[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!P&&(b&&y||f||!!y&&(!v||(0,s.isArray)(v)&&!v.length)&&!1!==b),E=S?(0,s.uniqueId)():null,R=A["aria-describedby"]||E,D=(0,r.createElement)(B,h({},I,A,{className:N,"aria-label":A["aria-label"]||y,"aria-describedby":R,ref:t}),p&&"left"===g&&(0,r.createElement)(X,{icon:p,size:_}),k&&(0,r.createElement)(r.Fragment,null,k),p&&"right"===g&&(0,r.createElement)(X,{icon:p,size:_}),v);return T?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Z,{text:S||y,shortcut:f,position:x},D),S&&(0,r.createElement)(Q,null,(0,r.createElement)("span",{id:E},S))):(0,r.createElement)(r.Fragment,null,D,S&&(0,r.createElement)(Q,null,(0,r.createElement)("span",{id:E},S)))});function te({value:e,status:t,title:o,displayTransform:c,isBorderless:l=!1,disabled:d=!1,onClickRemove:u=s.noop,onMouseEnter:m,onMouseLeave:h,messages:g,termPosition:w,termsCount:_}){const b=(0,a.useInstanceId)(te),x=n()("components-form-token-field__token",{"is-error":"error"===t,"is-success":"success"===t,"is-validating":"validating"===t,"is-borderless":l,"is-disabled":d}),f=c(e),y=(0,i.sprintf)( /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */ /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */ (0,i.__)("%1$s (%2$s of %3$s)"),f,w,_);return(0,r.createElement)("span",{className:x,onMouseEnter:m,onMouseLeave:h,title:o},(0,r.createElement)("span",{className:"components-form-token-field__token-text",id:`components-form-token-field__token-text-${b}`},(0,r.createElement)(Q,{as:"span"},y),(0,r.createElement)("span",{"aria-hidden":"true"},f)),(0,r.createElement)(ee,{className:"components-form-token-field__remove-token",icon:p,onClick:!d&&(()=>u({value:e})),label:g.remove,"aria-describedby":`components-form-token-field__token-text-${b}`}))}class oe extends r.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:o,selectedSuggestionIndex:s,className:c,...i}=this.props,a=e?e.length+1:0;return(0,r.createElement)("input",h({ref:this.bindInput,id:`components-form-token-input-${o}`,type:"text"},i,{value:e||"",onChange:this.onChange,size:a,className:n()(c,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?`components-form-token-suggestions-${o}`:void 0,"aria-activedescendant":-1!==s?`components-form-token-suggestions-${o}-${s}`:void 0,"aria-describedby":`components-form-token-suggestions-howto-${o}`}))}}const re=oe;var se=o(76406),ce=o.n(se);class ne extends r.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,ce()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const o=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,o),suggestionMatch:e.substring(o,o+t.length),suggestionAfterMatch:e.substring(o+t.length)}}render(){return(0,r.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:`components-form-token-suggestions-${this.props.instanceId}`,role:"listbox"},(0,s.map)(this.props.suggestions,(e,t)=>{const o=this.computeSuggestionMatch(e),s=n()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return(0,r.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:s,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},o?(0,r.createElement)("span",{"aria-label":this.props.displayTransform(e)},o.suggestionBeforeMatch,(0,r.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):this.props.displayTransform(e))}))}}ne.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])};const ie=(0,a.withSafeTimeout)(ne);var ae=o(20195);const le=(0,a.createHigherOrderComponent)(e=>t=>(0,r.createElement)(e,h({},t,{speak:ae.speak,debouncedSpeak:(0,a.useDebounce)(ae.speak,500)})),"withSpokenMessages"),de={incompleteTokenValue:"",inputOffsetFromEnd:0,isActive:!1,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1};class ue extends r.Component{constructor(){super(...arguments),this.state=de,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.deleteTokenBeforeInput=this.deleteTokenBeforeInput.bind(this),this.deleteTokenAfterInput=this.deleteTokenAfterInput.bind(this),this.addCurrentToken=this.addCurrentToken.bind(this),this.onContainerTouched=this.onContainerTouched.bind(this),this.renderToken=this.renderToken.bind(this),this.onTokenClickRemove=this.onTokenClickRemove.bind(this),this.onSuggestionHovered=this.onSuggestionHovered.bind(this),this.onSuggestionSelected=this.onSuggestionSelected.bind(this),this.onInputChange=this.onInputChange.bind(this),this.bindInput=this.bindInput.bind(this),this.bindTokensAndInput=this.bindTokensAndInput.bind(this),this.updateSuggestions=this.updateSuggestions.bind(this)}componentDidUpdate(e){this.state.isActive&&!this.input.hasFocus()&&this.input.focus();const{suggestions:t,value:o}=this.props,r=!u()(t,e.suggestions);(r||o!==e.value)&&this.updateSuggestions(r)}static getDerivedStateFromProps(e,t){return e.disabled&&t.isActive?{isActive:!1,incompleteTokenValue:""}:null}bindInput(e){this.input=e}bindTokensAndInput(e){this.tokensAndInput=e}onFocus(e){const{__experimentalExpandOnFocus:t}=this.props;this.input.hasFocus()||e.target===this.tokensAndInput?this.setState({isActive:!0,isExpanded:!!t||this.state.isExpanded}):this.setState({isActive:!1}),"function"==typeof this.props.onFocus&&this.props.onFocus(e)}onBlur(){this.inputHasValidValue()?this.setState({isActive:!1}):this.setState(de)}onKeyDown(e){let t=!1;switch(e.keyCode){case l.BACKSPACE:t=this.handleDeleteKey(this.deleteTokenBeforeInput);break;case l.ENTER:t=this.addCurrentToken();break;case l.LEFT:t=this.handleLeftArrowKey();break;case l.UP:t=this.handleUpArrowKey();break;case l.RIGHT:t=this.handleRightArrowKey();break;case l.DOWN:t=this.handleDownArrowKey();break;case l.DELETE:t=this.handleDeleteKey(this.deleteTokenAfterInput);break;case l.SPACE:this.props.tokenizeOnSpace&&(t=this.addCurrentToken());break;case l.ESCAPE:t=this.handleEscapeKey(e),e.stopPropagation()}t&&e.preventDefault()}onKeyPress(e){let t=!1;44===e.charCode&&(t=this.handleCommaKey()),t&&e.preventDefault()}onContainerTouched(e){e.target===this.tokensAndInput&&this.state.isActive&&e.preventDefault()}onTokenClickRemove(e){this.deleteToken(e.value),this.input.focus()}onSuggestionHovered(e){const t=this.getMatchingSuggestions().indexOf(e);t>=0&&this.setState({selectedSuggestionIndex:t,selectedSuggestionScroll:!1})}onSuggestionSelected(e){this.addNewToken(e)}onInputChange(e){const t=e.value,o=this.props.tokenizeOnSpace?/[ ,\t]+/:/[,\t]+/,r=t.split(o),c=(0,s.last)(r)||"";r.length>1&&this.addNewTokens(r.slice(0,-1)),this.setState({incompleteTokenValue:c},this.updateSuggestions),this.props.onInputChange(c)}handleDeleteKey(e){let t=!1;return this.input.hasFocus()&&this.isInputEmpty()&&(e(),t=!0),t}handleLeftArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputBeforePreviousToken(),e=!0),e}handleRightArrowKey(){let e=!1;return this.isInputEmpty()&&(this.moveInputAfterNextToken(),e=!0),e}handleUpArrowKey(){return this.setState((e,t)=>({selectedSuggestionIndex:(0===e.selectedSuggestionIndex?this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length:e.selectedSuggestionIndex)-1,selectedSuggestionScroll:!0})),!0}handleDownArrowKey(){return this.setState((e,t)=>({selectedSuggestionIndex:(e.selectedSuggestionIndex+1)%this.getMatchingSuggestions(e.incompleteTokenValue,t.suggestions,t.value,t.maxSuggestions,t.saveTransform).length,selectedSuggestionScroll:!0})),!0}handleEscapeKey(e){return this.setState({incompleteTokenValue:e.target.value,isExpanded:!1,selectedSuggestionIndex:-1,selectedSuggestionScroll:!1}),!0}handleCommaKey(){return this.inputHasValidValue()&&this.addNewToken(this.state.incompleteTokenValue),!0}moveInputToIndex(e){this.setState((t,o)=>({inputOffsetFromEnd:o.value.length-Math.max(e,-1)-1}))}moveInputBeforePreviousToken(){this.setState((e,t)=>({inputOffsetFromEnd:Math.min(e.inputOffsetFromEnd+1,t.value.length)}))}moveInputAfterNextToken(){this.setState(e=>({inputOffsetFromEnd:Math.max(e.inputOffsetFromEnd-1,0)}))}deleteTokenBeforeInput(){const e=this.getIndexOfInput()-1;e>-1&&this.deleteToken(this.props.value[e])}deleteTokenAfterInput(){const e=this.getIndexOfInput();e<this.props.value.length&&(this.deleteToken(this.props.value[e]),this.moveInputToIndex(e))}addCurrentToken(){let e=!1;const t=this.getSelectedSuggestion();return t?(this.addNewToken(t),e=!0):this.inputHasValidValue()&&(this.addNewToken(this.state.incompleteTokenValue),e=!0),e}addNewTokens(e){const t=(0,s.uniq)(e.map(this.props.saveTransform).filter(Boolean).filter(e=>!this.valueContainsToken(e)));if(t.length>0){const e=(0,s.clone)(this.props.value);e.splice.apply(e,[this.getIndexOfInput(),0].concat(t)),this.props.onChange(e)}}addNewToken(e){const{__experimentalExpandOnFocus:t,__experimentalValidateInput:o}=this.props;o(e)?(this.addNewTokens([e]),this.props.speak(this.props.messages.added,"assertive"),this.setState({incompleteTokenValue:"",selectedSuggestionIndex:-1,selectedSuggestionScroll:!1,isExpanded:!t}),this.state.isActive&&this.input.focus()):this.props.speak(this.props.messages.__experimentalInvalid,"assertive")}deleteToken(e){const t=this.props.value.filter(t=>this.getTokenValue(t)!==this.getTokenValue(e));this.props.onChange(t),this.props.speak(this.props.messages.removed,"assertive")}getTokenValue(e){return"object"==typeof e?e.value:e}getMatchingSuggestions(e=this.state.incompleteTokenValue,t=this.props.suggestions,o=this.props.value,r=this.props.maxSuggestions,c=this.props.saveTransform){let n=c(e);const i=[],a=[];return 0===n.length?t=(0,s.difference)(t,o):(n=n.toLocaleLowerCase(),(0,s.each)(t,e=>{const t=e.toLocaleLowerCase().indexOf(n);-1===o.indexOf(e)&&(0===t?i.push(e):t>0&&a.push(e))}),t=i.concat(a)),(0,s.take)(t,r)}getSelectedSuggestion(){if(-1!==this.state.selectedSuggestionIndex)return this.getMatchingSuggestions()[this.state.selectedSuggestionIndex]}valueContainsToken(e){return(0,s.some)(this.props.value,t=>this.getTokenValue(e)===this.getTokenValue(t))}getIndexOfInput(){return this.props.value.length-this.state.inputOffsetFromEnd}isInputEmpty(){return 0===this.state.incompleteTokenValue.length}inputHasValidValue(){return this.props.saveTransform(this.state.incompleteTokenValue).length>0}updateSuggestions(e=!0){const{__experimentalExpandOnFocus:t}=this.props,{incompleteTokenValue:o}=this.state,r=o.trim().length>1,s=this.getMatchingSuggestions(o),c=s.length>0,n={isExpanded:t||r&&c};if(e&&(n.selectedSuggestionIndex=-1,n.selectedSuggestionScroll=!1),this.setState(n),r){const{debouncedSpeak:e}=this.props;e(c?(0,i.sprintf)( /* translators: %d: number of results. */ /* translators: %d: number of results. */ (0,i._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",s.length),s.length):(0,i.__)("No results."),"assertive")}}renderTokensAndInput(){const e=(0,s.map)(this.props.value,this.renderToken);return e.splice(this.getIndexOfInput(),0,this.renderInput()),e}renderToken(e,t,o){const s=this.getTokenValue(e),c=e.status?e.status:void 0,n=t+1,i=o.length;return(0,r.createElement)(te,{key:"token-"+s,value:s,status:c,title:e.title,displayTransform:this.props.displayTransform,onClickRemove:this.onTokenClickRemove,isBorderless:e.isBorderless||this.props.isBorderless,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,disabled:"error"!==c&&this.props.disabled,messages:this.props.messages,termsCount:i,termPosition:n})}renderInput(){const{autoCapitalize:e,autoComplete:t,maxLength:o,placeholder:s,value:c,instanceId:n}=this.props;let i={instanceId:n,autoCapitalize:e,autoComplete:t,placeholder:0===c.length?s:"",ref:this.bindInput,key:"input",disabled:this.props.disabled,value:this.state.incompleteTokenValue,onBlur:this.onBlur,isExpanded:this.state.isExpanded,selectedSuggestionIndex:this.state.selectedSuggestionIndex};return o&&c.length>=o||(i={...i,onChange:this.onInputChange}),(0,r.createElement)(re,i)}render(){const{disabled:e,label:t=(0,i.__)("Add item"),instanceId:o,className:s,__experimentalShowHowTo:c}=this.props,{isExpanded:a}=this.state,l=n()(s,"components-form-token-field__input-container",{"is-active":this.state.isActive,"is-disabled":e});let d={className:"components-form-token-field",tabIndex:"-1"};const u=this.getMatchingSuggestions();return e||(d=Object.assign({},d,{onKeyDown:this.onKeyDown,onKeyPress:this.onKeyPress,onFocus:this.onFocus})),(0,r.createElement)("div",d,(0,r.createElement)("label",{htmlFor:`components-form-token-input-${o}`,className:"components-form-token-field__label"},t),(0,r.createElement)("div",{ref:this.bindTokensAndInput,className:l,tabIndex:"-1",onMouseDown:this.onContainerTouched,onTouchStart:this.onContainerTouched},this.renderTokensAndInput(),a&&(0,r.createElement)(ie,{instanceId:o,match:this.props.saveTransform(this.state.incompleteTokenValue),displayTransform:this.props.displayTransform,suggestions:u,selectedIndex:this.state.selectedSuggestionIndex,scrollIntoView:this.state.selectedSuggestionScroll,onHover:this.onSuggestionHovered,onSelect:this.onSuggestionSelected})),c&&(0,r.createElement)("p",{id:`components-form-token-suggestions-howto-${o}`,className:"components-form-token-field__help"},this.props.tokenizeOnSpace?(0,i.__)("Separate with commas, spaces, or the Enter key."):(0,i.__)("Separate with commas or the Enter key.")))}}ue.defaultProps={suggestions:Object.freeze([]),maxSuggestions:100,value:Object.freeze([]),displayTransform:s.identity,saveTransform:e=>e.trim(),onChange:()=>{},onInputChange:()=>{},isBorderless:!1,disabled:!1,tokenizeOnSpace:!1,messages:{added:(0,i.__)("Item added."),removed:(0,i.__)("Item removed."),remove:(0,i.__)("Remove item"),__experimentalInvalid:(0,i.__)("Invalid item")},__experimentalExpandOnFocus:!1,__experimentalValidateInput:()=>!0,__experimentalShowHowTo:!0};const me=le((0,a.withInstanceId)(ue));var pe=o(4921),he=(o(94357),o(10790));const ge=({className:e,style:t,suggestions:o,multiple:r=!0,saveTransform:s=e=>e.trim().replace(/\s/g,"-"),messages:c={},validateInput:n=e=>o.includes(e),label:i="",...a})=>(0,he.jsx)("div",{className:(0,pe.A)("wc-blocks-components-form-token-field-wrapper",e,{"single-selection":!r}),style:t,children:(0,he.jsx)(me,{label:i,__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,__experimentalValidateInput:n,saveTransform:s,maxLength:r?void 0:1,suggestions:o,messages:c,...a})})},4138:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(27723),s=o(4921),c=o(14656),n=(o(99961),o(10790));const i=({children:e,className:t,screenReaderLabel:o,showSpinner:i=!1,isLoading:a=!0})=>(0,n.jsxs)("div",{className:(0,s.A)(t,{"wc-block-components-loading-mask":a}),children:[a&&i&&(0,n.jsx)(c.Spinner,{}),(0,n.jsx)("div",{className:(0,s.A)({"wc-block-components-loading-mask__children":a}),"aria-hidden":a,children:e}),a&&(0,n.jsx)("span",{className:"screen-reader-text",children:o||(0,r.__)("Loading…","woocommerce")})]})},8840:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(86087),s=o(28107),c=o(64347),n=o(10790);const i=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"],a=({children:e,style:t={},...o})=>{const a=(0,r.useRef)(null),l=()=>{a.current&&s.focus.focusable.find(a.current).forEach(e=>{i.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=(0,c.YQ)(l,0,{leading:!0});return(0,r.useLayoutEffect)(()=>{let e;return l(),a.current&&(e=new window.MutationObserver(d),e.observe(a.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),(0,n.jsx)("div",{ref:a,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...t},...o,children:e})}},19403:(e,t,o)=>{"use strict";o.d(t,{A:()=>_});var r=o(4921),s=o(27723),c=o(93450),n=o(49254),i=(o(97575),o(10790)),a=o(5573),l=(0,i.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(a.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),d=o(19432),u=(0,i.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(a.Path,{fillRule:"evenodd",d:"M6.863 13.644L5 13.25h-.5a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5H5L18 6.5h2V16h-2l-3.854-.815.026.008a3.75 3.75 0 01-7.31-1.549zm1.477.313a2.251 2.251 0 004.356.921l-4.356-.921zm-2.84-3.28L18.157 8h.343v6.5h-.343L5.5 11.823v-1.146z",clipRule:"evenodd"})});const m=e=>{switch(e){case"success":case"warning":case"info":case"default":return"polite";default:return"assertive"}},p=e=>{switch(e){case"success":return l;case"warning":case"info":case"error":return d.A;default:return u}};var h=o(83911),g=o(86087),w=o(20195);const _=({className:e,status:t="default",children:o,spokenMessage:a=o,onRemove:l=()=>{},isDismissible:d=!0,politeness:u=m(t),summary:_})=>(((e,t)=>{const o="string"==typeof e?e:(0,g.renderToString)(e);(0,g.useEffect)(()=>{o&&(0,w.speak)(o,t)},[o,t])})(a,u),(0,i.jsxs)("div",{className:(0,r.A)(e,"wc-block-components-notice-banner","is-"+t,{"is-dismissible":d}),children:[(0,i.jsx)(c.A,{icon:p(t)}),(0,i.jsxs)("div",{className:"wc-block-components-notice-banner__content",children:[_&&(0,i.jsx)("p",{className:"wc-block-components-notice-banner__summary",children:_}),o]}),!!d&&(0,i.jsx)(h.A,{className:"wc-block-components-notice-banner__dismiss","aria-label":(0,s.__)("Dismiss this notice","woocommerce"),onClick:e=>{"function"==typeof e?.preventDefault&&e.preventDefault&&e.preventDefault(),l()},removeTextWrap:!0,children:(0,i.jsx)(c.A,{icon:n.A})})]}))},30572:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(4921),s=(o(40959),o(10790));const c=({className:e="",disabled:t=!1,name:o,permalink:c="",target:n,rel:i,style:a,onClick:l,disabledTagName:d="span",...u})=>{const m=(0,r.A)("wc-block-components-product-name",e),p=d;if(t){const e=u;return(0,s.jsx)(p,{className:m,...e,dangerouslySetInnerHTML:{__html:o}})}return(0,s.jsx)("a",{className:m,href:c,target:n,...u,dangerouslySetInnerHTML:{__html:o},style:a})}},56464:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var r=o(27723),s=o(14656),c=o(4921),n=o(70910),i=o(86087),a=(o(8501),o(10790));const l=({currency:e,maxPrice:t,minPrice:o,priceClassName:i,priceStyle:l={}})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"screen-reader-text",children:(0,r.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */ (0,r.__)("Price between %1$s and %2$s","woocommerce"),(0,n.formatPrice)(o),(0,n.formatPrice)(t))}),(0,a.jsxs)("span",{"aria-hidden":!0,children:[(0,a.jsx)(s.FormattedMonetaryAmount,{className:(0,c.A)("wc-block-components-product-price__value",i),currency:e,value:o,style:l})," — ",(0,a.jsx)(s.FormattedMonetaryAmount,{className:(0,c.A)("wc-block-components-product-price__value",i),currency:e,value:t,style:l})]})]}),d=({currency:e,regularPriceClassName:t,regularPriceStyle:o,regularPrice:n,priceClassName:i,priceStyle:l,price:d})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"screen-reader-text",children:(0,r.__)("Previous price:","woocommerce")}),(0,a.jsx)("del",{className:(0,c.A)("wc-block-components-product-price__regular",t),style:o,translate:"no",children:(0,a.jsx)(s.FormattedMonetaryAmount,{currency:e,value:n})}),(0,a.jsx)("span",{className:"screen-reader-text",children:(0,r.__)("Discounted price:","woocommerce")}),(0,a.jsx)("ins",{className:(0,c.A)("wc-block-components-product-price__value","is-discounted",i),style:l,translate:"no",children:(0,a.jsx)(s.FormattedMonetaryAmount,{currency:e,value:d})})]}),u=({align:e,className:t,currency:o,format:r="<price/>",maxPrice:n,minPrice:u,price:m,priceClassName:p,priceStyle:h,regularPrice:g,regularPriceClassName:w,regularPriceStyle:_,style:b})=>{const x=(0,c.A)(t,"price","wc-block-components-product-price",{[`wc-block-components-product-price--align-${e}`]:e});r.includes("<price/>")||(r="<price/>",console.error("Price formats need to include the `<price/>` tag."));const f=void 0!==g&&void 0!==m&&m<g;let y=(0,a.jsx)("span",{className:(0,c.A)("wc-block-components-product-price__value",p)});return f?y=(0,a.jsx)(d,{currency:o,price:m,priceClassName:p,priceStyle:h,regularPrice:g,regularPriceClassName:w,regularPriceStyle:_}):void 0!==u&&void 0!==n?y=(0,a.jsx)(l,{currency:o,maxPrice:n,minPrice:u,priceClassName:p,priceStyle:h}):(m||0===m)&&(y=(0,a.jsx)(s.FormattedMonetaryAmount,{className:(0,c.A)("wc-block-components-product-price__value",p),currency:o,value:m,style:h})),(0,a.jsx)("span",{className:x,style:b,children:(0,i.createInterpolateElement)(r,{price:y})})}},51067:(e,t,o)=>{"use strict";o.d(t,{A:()=>m});var r=o(86087),s=o(27723);function c(e){let t,o,r,s=[];for(let c=0;c<e.length;c++)t=e.substring(c),o=t.match(/^&[a-z0-9#]+;/),o?(r=o[0],s.push(r),c+=r.length-1):s.push(e[c]);return s}const n=(e,t,o="...")=>{const r=function(e,t){const o=(t=t||{}).limit||100,r=void 0===t.preserveTags||t.preserveTags,s=void 0!==t.wordBreak&&t.wordBreak,n=t.suffix||"...",i=t.moreLink||"",a=t.moreText||"»",l=t.preserveWhiteSpace||!1,d=e.replace(/</g,"\n<").replace(/>/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n");let u,m,p,h,g,w,_=0,b=[],x=!1;for(let e=0;e<d.length;e++){if(u=d[e],h=l?u:u.replace(/[ ]+/g," "),!u.length)continue;const t=c(h);if("<"!==u[0])if(_>=o)u="";else if(_+t.length>=o){if(m=o-_," "===t[m-1])for(;m&&(m-=1," "===t[m-1]););else p=t.slice(m).indexOf(" "),s||(-1!==p?m+=p:m=u.length);if(u=t.slice(0,m).join("")+n,i){const e=document.createElement("a");e.href=i,e.style.display="inline",e.textContent=a,u+=e.outerHTML}_=o,x=!0}else _+=t.length;else if(r){if(_>=o)if(g=u.match(/[a-zA-Z]+/),w=g?g[0]:"",w)if("</"!==u.substring(0,2))b.push(w),u="";else{for(;b[b.length-1]!==w&&b.length;)b.pop();b.length&&(u=""),b.pop()}else u=""}else u="";d[e]=u}return{html:d.join("\n").replace(/\n/g,""),more:x}}(e,{suffix:o,limit:t});return r.html},i=(e,t,o)=>(t<=o?e.start=e.middle+1:e.end=e.middle-1,e),a=(e,t,o,r)=>{const s=((e,t,o)=>{let r={start:0,middle:0,end:e.length};for(;r.start<=r.end;)r.middle=Math.floor((r.start+r.end)/2),t.innerHTML=n(e,r.middle),r=i(r,t.clientHeight,o);return r.middle})(e,t,o);return n(e,s-r.length,r)};var l=o(10790);const d={className:"read-more-content",ellipsis:"…",lessText:(0,s.__)("Read less","woocommerce"),maxLines:3,moreText:(0,s.__)("Read more","woocommerce")};class u extends r.Component{static defaultProps=d;constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=(0,r.createRef)(),this.reviewSummary=(0,r.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){this.setSummary()}componentDidUpdate(e){e.maxLines===this.props.maxLines&&e.children===this.props.children||this.setState({clampEnabled:null,summary:"."},this.setSummary)}setSummary(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const o=(this.reviewSummary.current.clientHeight+1)*e+1,r=this.reviewContent.current.clientHeight+1>o;this.setState({clampEnabled:r}),r&&this.setState({summary:a(this.reviewContent.current.innerHTML,this.reviewSummary.current,o,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:o,moreText:r}=this.props,s=e?o:r;if(s)return(0,l.jsx)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button",children:s})}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:o,clampEnabled:r,isExpanded:s}=this.state;return t?!1===r?(0,l.jsx)("div",{className:e,children:(0,l.jsx)("div",{ref:this.reviewContent,children:t})}):(0,l.jsxs)("div",{className:e,children:[(!s||null===r)&&(0,l.jsx)("div",{ref:this.reviewSummary,"aria-hidden":s,dangerouslySetInnerHTML:{__html:o}}),(s||null===r)&&(0,l.jsx)("div",{ref:this.reviewContent,"aria-hidden":!s,children:t}),this.getButton()]}):null}}const m=u},63877:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(86087),s=o(4921),c=o(10790);const n=(0,r.forwardRef)(({children:e,className:t=""},o)=>(0,c.jsx)("div",{ref:o,className:(0,s.A)("wc-block-components-main",t),children:e}))},96761:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(4921),s=o(85909),c=(o(99163),o(10790));const n=({children:e,className:t})=>(0,c.jsx)(s.u,{className:(0,r.A)("wc-block-components-sidebar-layout",t),children:e})},46328:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(86087),s=o(4921),c=o(10790);const n=(0,r.forwardRef)(({children:e,className:t=""},o)=>(0,c.jsx)("div",{ref:o,className:(0,s.A)("wc-block-components-sidebar",t),children:e}))},61526:(e,t,o)=>{"use strict";o.d(t,{E:()=>c});var r=o(4921),s=(o(42405),o(10790));const c=({tag:e="div",width:t="100%",height:o="8px",maxWidth:c="",className:n="",borderRadius:i="",isStatic:a=!1,ariaMessage:l})=>(0,s.jsx)(e,{className:(0,r.A)("wc-block-components-skeleton__element",{"wc-block-components-skeleton__element--static":a},n),...l?{"aria-live":"polite","aria-label":l}:{"aria-hidden":"true"},style:{width:t,height:o,borderRadius:i,maxWidth:c}})},24015:(e,t,o)=>{"use strict";o.d(t,{a:()=>i,q:()=>n});var r=o(27723),s=o(61526),c=(o(60359),o(77826),o(22336),o(10790));const n=({rows:e=2})=>(0,c.jsx)(c.Fragment,{children:Array.from({length:e}).map((e,t)=>(0,c.jsxs)("tr",{className:"wc-block-cart-items__row","aria-label":(0,r.__)("Loading products in cart…","woocommerce"),children:[(0,c.jsx)("td",{className:"wc-block-cart-item__image",children:(0,c.jsx)(s.E,{height:"0"})}),(0,c.jsx)("td",{className:"wc-block-cart-item__product",children:(0,c.jsxs)("div",{className:"wc-block-cart-item__wrap",children:[(0,c.jsx)(s.E,{width:"90%",maxWidth:"173px",height:".875em"}),(0,c.jsx)(s.E,{width:"50%",maxWidth:"85px",height:".875em"})]})}),(0,c.jsx)("td",{className:"wc-block-cart-item__total",children:(0,c.jsx)(s.E,{height:".875em",maxWidth:"45px"})})]},t))}),i=({rows:e=2})=>(0,c.jsx)("div",{className:"wc-block-components-order-summary","aria-live":"polite","aria-label":(0,r.__)("Loading products in cart…","woocommerce"),children:(0,c.jsx)("div",{className:"wc-block-components-skeleton wc-block-components-skeleton--cart-line-items-checkout wc-block-components-order-summary__content",children:Array.from({length:e}).map((e,t)=>(0,c.jsxs)("div",{className:"wc-block-components-order-summary-item",children:[(0,c.jsx)("div",{className:"wc-block-components-order-summary-item__image",children:(0,c.jsx)(s.E,{width:"48px",height:"48px"})}),(0,c.jsxs)("div",{className:"wc-block-components-order-summary-item__description",children:[(0,c.jsx)(s.E,{width:"90%",maxWidth:"173px",height:".875em"}),(0,c.jsx)(s.E,{width:"50%",maxWidth:"85px",height:".875em"})]}),(0,c.jsx)("div",{className:"wc-block-components-order-summary-item__total-price",children:(0,c.jsx)(s.E,{width:"45px",height:".875em"})})]},t))})})},59213:(e,t,o)=>{"use strict";o.d(t,{U:()=>c});var r=o(61526),s=o(10790);const c=({isStatic:e=!1})=>(0,s.jsxs)("div",{className:"wc-block-components-skeleton",children:[(0,s.jsx)(r.E,{height:"16px",isStatic:e}),(0,s.jsx)(r.E,{height:"16px",isStatic:e}),(0,s.jsx)(r.E,{height:"16px",width:"80%",isStatic:e})]})},8043:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var r=o(86087),s=o(42435),c=o(56004),n=o(38295);const i=window.wp.wordcount;var a=o(10790);const l=["a","b","em","i","strong","p","br","ul","ol","li","h1","h2","h3","h4","h5","h6","pre","blockquote","img"],d=["target","href","rel","name","download","src","class","alt","style"],u=({source:e,maxLength:t=15,countType:o="words",className:u="",style:m={}})=>{const p=(0,r.useMemo)(()=>((e,t=15,o="words")=>{const r=(0,c.autop)(e);if((0,i.count)(r,o)<=t)return r;const s=(e=>{const t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)})(r);return(0,i.count)(s,o)<=t?s:"words"===o?(0,n.G$)(s,t):(0,n.Bk)(s,t,"characters_including_spaces"===o)})(e,t,o),[e,t,o]);return(0,a.jsx)(r.RawHTML,{style:m,className:u,children:(0,s.sanitizeHTML)(p,{tags:l,attr:d})})}},77972:(e,t,o)=>{"use strict";o.d(t,{Y:()=>s});var r=o(58267);const s=(e,t)=>(o,s=10)=>{const c=r.o.addEventCallback(e,o,s);return t(c),()=>{t(r.o.removeEventCallback(e,c.id))}}},58267:(e,t,o)=>{"use strict";o.d(t,{o:()=>c,F:()=>i});var r=o(48197);let s=function(e){return e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback",e}({});const c={addEventCallback:(e,t,o=10)=>({id:(0,r.I)().toString(),type:s.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:o}),removeEventCallback:(e,t)=>({id:t,type:s.REMOVE_EVENT_CALLBACK,eventType:e})},n={},i=(e=n,{type:t,eventType:o,id:r,callback:c,priority:i})=>{const a=e.hasOwnProperty(o)?new Map(e[o]):new Map;switch(t){case s.ADD_EVENT_CALLBACK:return a.set(r,{priority:i,callback:c}),{...e,[o]:a};case s.REMOVE_EVENT_CALLBACK:return a.delete(r),{...e,[o]:a}}}},87853:(e,t,o)=>{"use strict";o.d(t,{fK:()=>r,tG:()=>s}),o(73993);const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];let s=function(e){return e.CART="wc/cart",e.CHECKOUT="wc/checkout",e.PAYMENTS="wc/checkout/payments",e.EXPRESS_PAYMENTS="wc/checkout/express-payments",e.CONTACT_INFORMATION="wc/checkout/contact-information",e.SHIPPING_ADDRESS="wc/checkout/shipping-address",e.BILLING_ADDRESS="wc/checkout/billing-address",e.SHIPPING_METHODS="wc/checkout/shipping-methods",e.CHECKOUT_ACTIONS="wc/checkout/checkout-actions",e.ORDER_INFORMATION="wc/checkout/order-information",e}({})},37273:(e,t,o)=>{"use strict";o.d(t,{k:()=>d});var r=o(27723),s=o(47143),c=o(86087),n=o(47594),i=o(18537),a=o(71e3),l=o(86697);const d=(e="")=>{const{cartCoupons:t,cartIsLoading:o}=(0,l.V)(),{applyCoupon:d,removeCoupon:u}=(0,s.useDispatch)(n.cartStore),{isApplyingCoupon:m,isRemovingCoupon:p,orderId:h}=(0,s.useSelect)(e=>({isApplyingCoupon:e(n.cartStore).isApplyingCoupon(),isRemovingCoupon:e(n.cartStore).isRemovingCoupon(),orderId:e(n.checkoutStore).getOrderId()}),[]),g=(0,c.useCallback)(e=>h&&h>0&&e?.data?.details?.checkout?e.data.details.checkout:e?.data?.details?.cart?e.data.details.cart:e.message,[h]);return{appliedCoupons:t,isLoading:o,applyCoupon:(0,c.useCallback)(t=>d(t).then(()=>((0,a.applyCheckoutFilter)({filterName:"showApplyCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&(0,s.dispatch)("core/notices").createNotice("info",(0,r.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,r.__)('Coupon code "%s" has been applied to your cart.',"woocommerce"),t),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(e=>{const t=g(e);return(0,s.dispatch)(n.validationStore).setValidationErrors({coupon:{message:(0,i.decodeEntities)(t),hidden:!1}}),Promise.resolve(!1)}),[d,g,e]),removeCoupon:(0,c.useCallback)(t=>u(t).then(()=>((0,a.applyCheckoutFilter)({filterName:"showRemoveCouponNotice",defaultValue:!0,arg:{couponCode:t,context:e}})&&(0,s.dispatch)("core/notices").createNotice("info",(0,r.sprintf)(/* translators: %s coupon code. */ /* translators: %s coupon code. */ (0,r.__)('Coupon code "%s" has been removed from your cart.',"woocommerce"),(0,i.decodeEntities)(t)),{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!0))).catch(t=>((0,s.dispatch)("core/notices").createErrorNotice(t.message,{id:"coupon-form",type:"snackbar",context:e}),Promise.resolve(!1))),[u,e]),isApplyingCoupon:m,isRemovingCoupon:p}}},86697:(e,t,o)=>{"use strict";o.d(t,{V:()=>y});var r=o(11824),s=o.n(r),c=o(86087),n=o(47594),i=o(47143),a=o(18537),l=o(90341);const d=window.CustomEvent||null,u=(e,t,o=!1,r=!1)=>{if("function"!=typeof jQuery)return()=>{};const s=()=>{((e,{bubbles:t=!1,cancelable:o=!1,element:r,detail:s={}})=>{if(!d)return;r||(r=document.body);const c=new d(e,{bubbles:t,cancelable:o,detail:s});r.dispatchEvent(c)})(t,{bubbles:o,cancelable:r})};return jQuery(document).on(e,s),()=>jQuery(document).off(e,s)},m=e=>{const t=e?.detail;t&&t.preserveCartData||(0,i.dispatch)(n.cartStore).invalidateResolutionForStore()},p=e=>{(e?.persisted||"back_forward"===(window.performance&&window.performance.getEntriesByType("navigation").length?window.performance.getEntriesByType("navigation")[0].type:""))&&(0,i.dispatch)(n.cartStore).invalidateResolutionForStore()},h=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},w={...g,email:""},_={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},b=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(0,a.decodeEntities)(t)])),x=(e,t)=>{const o=(0,l.TU)(b(e));return s()(t.current,o)||(t.current=o),t.current},f={billingAddress:w,billingData:w,cartCoupons:n.EMPTY_CART_COUPONS,cartErrors:n.EMPTY_CART_ERRORS,cartFees:n.EMPTY_CART_FEES,cartHasCalculatedShipping:!1,cartIsLoading:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartItems:n.EMPTY_CART_ITEMS,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartTotals:_,crossSellsProducts:n.EMPTY_CART_CROSS_SELLS,extensions:n.EMPTY_EXTENSIONS,hasPendingItemsOperations:!1,isLoadingRates:!1,paymentMethods:n.EMPTY_PAYMENT_METHODS,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},receiveCartContents:()=>{},shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES},y=(e={shouldSelect:!0})=>{const{shouldSelect:t}=e,o=(0,c.useRef)(),r=(0,c.useRef)(w),l=(0,c.useRef)(g);(0,c.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),window.wcBlocksStoreCartListeners?.count>0)return void window.wcBlocksStoreCartListeners.count++;document.body.addEventListener("wc-blocks_added_to_cart",m),document.body.addEventListener("wc-blocks_removed_from_cart",m),window.addEventListener("pageshow",p);const e=u("added_to_cart","wc-blocks_added_to_cart"),t=u("removed_from_cart","wc-blocks_removed_from_cart");window.wcBlocksStoreCartListeners.count=1,window.wcBlocksStoreCartListeners.remove=()=>{document.body.removeEventListener("wc-blocks_added_to_cart",m),document.body.removeEventListener("wc-blocks_removed_from_cart",m),window.removeEventListener("pageshow",p),e(),t()}})(),h),[]);const{receiveCart:d,receiveCartContents:_}=(0,i.useDispatch)(n.cartStore),{cartData:y,cartErrors:v,cartTotals:k,cartIsLoading:j,isLoadingRates:C,hasPendingItemsOperations:S}=(0,i.useSelect)(e=>{const t=e(n.cartStore),o=!t.hasFinishedResolution("getCartData",[]);return{cartData:t.getCartData(),cartErrors:t.getCartErrors(),cartTotals:t.getCartTotals(),cartIsLoading:o,isLoadingRates:t.isAddressFieldsForShippingRatesUpdating(),hasPendingItemsOperations:t.hasPendingItemsOperations()}},[]);if(!t)return f;const A=x(y.billingAddress,r),N=y.needsShipping?x(y.shippingAddress,l):A,P={billingAddress:A,billingData:A,cartCoupons:(T=y.coupons,T.length>0?T.map(e=>({...e,label:(0,a.decodeEntities)(e.code)})):n.EMPTY_CART_COUPONS),cartErrors:v,cartFees:(I=y.fees,I.length>0?I.map(e=>b(e)):n.EMPTY_CART_FEES),cartHasCalculatedShipping:y.hasCalculatedShipping,cartIsLoading:j,cartItemErrors:y.errors,cartItems:y.items,cartItemsCount:y.itemsCount,cartItemsWeight:y.itemsWeight,cartNeedsPayment:y.needsPayment,cartNeedsShipping:y.needsShipping,cartTotals:k,crossSellsProducts:y.crossSells,extensions:y.extensions,hasPendingItemsOperations:S,isLoadingRates:C,paymentMethods:y.paymentMethods,paymentRequirements:y.paymentRequirements,receiveCart:d,receiveCartContents:_,shippingAddress:N,shippingRates:(B=y.shippingRates,B.length>0?B.map(e=>({...e,shipping_rates:e.shipping_rates.length>0?e.shipping_rates.map(e=>b(e)):[]})):[])};var B,I,T;return o.current&&s()(o.current,P)||(o.current=P),o.current}},88199:(e,t,o)=>{"use strict";o.d(t,{A:()=>u});var r=o(86087),s=o(64347),c=o(73993),n=o(61303),i=o(46151),a=o(76748),l=o(42552),d=o(70154);const u=({queryAttribute:e,queryTaxonomy:t,queryPrices:o,queryStock:u,queryRating:m,queryState:p,isEditor:h=!1})=>{let g=(0,d._)();g=`${g}-collection-data`;const[w]=(0,a.dJ)(g),[_,b]=(0,a.xd)("calculate_attribute_counts",[],g),[x,f]=(0,a.xd)("calculate_taxonomy_counts",[],g),[y,v]=(0,a.xd)("calculate_price_range",null,g),[k,j]=(0,a.xd)("calculate_stock_status_counts",null,g),[C,S]=(0,a.xd)("calculate_rating_counts",null,g),A=(0,i.c)(e||{}),N=(0,i.c)(t),P=(0,i.c)(o),B=(0,i.c)(u),I=(0,i.c)(m);(0,r.useEffect)(()=>{"object"==typeof A&&Object.keys(A).length&&(_.find(e=>(0,c.objectHasProp)(A,"taxonomy")&&e.taxonomy===A.taxonomy)||b([..._,A]))},[A,_,b]),(0,r.useEffect)(()=>{N&&!x.includes(N)&&f([...x,N])},[N,x,f]),(0,r.useEffect)(()=>{y!==P&&void 0!==P&&v(P)},[P,v,y]),(0,r.useEffect)(()=>{k!==B&&void 0!==B&&j(B)},[B,j,k]),(0,r.useEffect)(()=>{C!==I&&void 0!==I&&S(I)},[I,S,C]);const[T,E]=(0,r.useState)(h),[R]=(0,s.d7)(T,200);T||E(!0);const D=(0,r.useMemo)(()=>(e=>{const t=e;return Array.isArray(e.calculate_attribute_counts)&&(t.calculate_attribute_counts=(0,n.di)(e.calculate_attribute_counts.map(({taxonomy:e,queryType:t})=>({taxonomy:e,query_type:t}))).asc(["taxonomy","query_type"])),Array.isArray(e.calculate_taxonomy_counts)&&(t.calculate_taxonomy_counts=e.calculate_taxonomy_counts),t})(w),[w]),{results:L,isLoading:O}=(0,l.G)({namespace:"/wc/store/v1",resourceName:"products/collection-data",query:{...p,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...D},shouldSelect:R});return{data:L,isLoading:O}}},42552:(e,t,o)=>{"use strict";o.d(t,{G:()=>l});var r=o(47594),s=o(47143),c=o(86087),n=o(46151),i=o(73993),a=o(27723);const l=e=>{const{namespace:t,resourceName:o,resourceValues:l=[],query:d={},shouldSelect:u=!0}=e;if(!t||!o)throw new Error("The options object must have valid values for the namespace and the resource properties.");const m=(0,c.useRef)({results:[],isLoading:!0}),p=(0,n.c)(d),h=(0,n.c)(l),g=(()=>{const[,e]=(0,c.useState)();return(0,c.useCallback)(t=>{e(()=>{throw t})},[])})(),w=(0,s.useSelect)(e=>{if(!u)return null;const s=e(r.COLLECTIONS_STORE_KEY),c=[t,o,p,h],n=s.getCollectionError(...c);if(n)if((0,i.isError)(n))g(n);else{const e="object"==typeof n&&null!==n&&"string"==typeof n.message?n.message:(0,a.__)("Something went wrong while loading data.","woocommerce");g(new Error(e))}return{results:s.getCollection(...c),isLoading:!s.hasFinishedResolution("getCollection",c)}},[t,o,h,p,u,g]);return null!==w&&(m.current=w),m.current}},92622:(e,t,o)=>{"use strict";o.d(t,{Y:()=>D});var r=o(27723),s=o(70910),c=o(86087),n=o(4921),i=o(5573),a=o(10790);const l=(0,a.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,a.jsx)("path",{d:"M0 0h24v24H0z"}),(0,a.jsx)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),(0,a.jsx)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"})]})});var d=(0,a.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(i.Path,{fillRule:"evenodd",d:"M18.646 9H20V8l-1-.5L12 4 5 7.5 4 8v1h14.646zm-3-1.5L12 5.677 8.354 7.5h7.292zm-7.897 9.44v-6.5h-1.5v6.5h1.5zm5-6.5v6.5h-1.5v-6.5h1.5zm5 0v6.5h-1.5v-6.5h1.5zm2.252 8.81c0 .414-.334.75-.748.75H4.752a.75.75 0 010-1.5h14.5a.75.75 0 01.749.75z",clipRule:"evenodd"})}),u=o(84718),m=o(54200),p=o(93450),h=o(73993);o(29287);const g={bank:d,bill:u.A,card:m.A,checkPayment:l},w=({icon:e="",text:t=""})=>{const o=!!e,r=(0,c.useCallback)(e=>o&&(0,h.isString)(e)&&(0,h.objectHasProp)(g,e),[o]),s=(0,n.A)("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return(0,a.jsxs)("span",{className:s,children:[r(e)?(0,a.jsx)(p.A,{icon:g[e]}):e,t]})};var _=o(5856),b=o(15703),x=o(64040),f=o.n(x),y=o(4138),v=o(61526),k=o(47143),j=o(47594),C=o(32679),S=o(14656),A=o(86697),N=o(37273),P=o(87853),B=o(51331),I=o(74191),T=o(37921);const E=(e,t)=>{const o=[],s=(t,o)=>{const r=o+"_tax",s=(0,h.objectHasProp)(e,o)&&(0,h.isString)(e[o])?parseInt(e[o],10):0;return{key:o,label:t,value:s,valueWithTax:s+((0,h.objectHasProp)(e,r)&&(0,h.isString)(e[r])?parseInt(e[r],10):0)}};return o.push(s((0,r.__)("Subtotal:","woocommerce"),"total_items")),o.push(s((0,r.__)("Fees:","woocommerce"),"total_fees")),o.push(s((0,r.__)("Discount:","woocommerce"),"total_discount")),o.push({key:"total_tax",label:(0,r.__)("Taxes:","woocommerce"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&o.push(s((0,r.__)("Shipping:","woocommerce"),"total_shipping")),o};var R=o(38260);const D=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:o,onCheckoutAfterProcessingWithError:n,onSubmit:i}=(0,B.E)(),{onCheckoutValidation:a,onCheckoutSuccess:l,onCheckoutFail:d}=C.checkoutEvents,{isCalculating:u,isComplete:m,isIdle:p,isProcessing:g,customerId:x}=(0,k.useSelect)(e=>{const t=e(j.checkoutStore);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}},[]),{paymentIsIdle:D,paymentIsStarted:L,paymentIsProcessing:O,paymentHasError:M,paymentIsReady:V,paymentIsDoingExpressPayment:F,activePaymentMethod:H,shouldSavePayment:z}=(0,k.useSelect)(e=>{const t=e(j.paymentStore);return{paymentIsIdle:t.isPaymentIdle(),paymentIsStarted:t.isExpressPaymentStarted(),paymentIsProcessing:t.isPaymentProcessing(),paymentHasError:t.hasPaymentError(),paymentIsReady:t.isPaymentReady(),paymentIsDoingExpressPayment:t.isExpressPaymentMethodActive(),activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}},[]),$={isIdle:D,isStarted:L,isProcessing:O,hasError:M,isReady:V,isDoingExpressPayment:F,get isPristine(){return f()("isPristine",{since:"7.5.0",alternative:"isIdle",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),D},get isFinished(){return f()("isFinished",{since:"7.5.0",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),M||V},get hasFailed(){return f()("hasFailed",{since:"7.5.0",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),M},get isSuccessful(){return f()("isSuccessful",{since:"7.5.0",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8110"}),V}},{__internalSetExpressPaymentError:W}=(0,k.useDispatch)(j.paymentStore),{onPaymentProcessing:G,onPaymentSetup:q}=(0,I.e)(),{shippingErrorStatus:U,shippingErrorTypes:Y,onShippingRateSuccess:Z,onShippingRateFail:J,onShippingRateSelectSuccess:X,onShippingRateSelectFail:Q}=(0,T.H)(),{shippingRates:K,isLoadingRates:ee,selectedRates:te,isSelectingRate:oe,selectShippingRate:re,needsShipping:se}=(0,R.m)(),{billingAddress:ce,shippingAddress:ne}=(0,k.useSelect)(e=>e(j.cartStore).getCustomerData(),[]),{setShippingAddress:ie}=(0,k.useDispatch)(j.cartStore),{cartItems:ae,cartFees:le,cartTotals:de,extensions:ue}=(0,A.V)(),{appliedCoupons:me}=(0,N.k)(),pe=(0,c.useRef)(E(de,se)),he=(0,c.useRef)({label:(0,r.__)("Total","woocommerce"),value:parseInt(de.total_price,10)});(0,c.useEffect)(()=>{pe.current=E(de,se),he.current={label:(0,r.__)("Total","woocommerce"),value:parseInt(de.total_price,10)}},[de,se]);const ge=(0,c.useCallback)((e="")=>{f()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),W(e)},[W]);return{activePaymentMethod:H,billing:{appliedCoupons:me,billingAddress:ce,billingData:ce,cartTotal:he.current,cartTotalItems:pe.current,currency:(0,s.getCurrencyFromPriceResponse)(de),customerId:x,displayPricesIncludingTax:(0,b.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:ae,cartFees:le,extensions:ue},checkoutStatus:{isCalculating:u,isComplete:m,isIdle:p,isProcessing:g},components:{LoadingMask:y.A,PaymentMethodIcons:_.h,PaymentMethodLabel:w,Skeleton:v.E,ValidationInputError:S.ValidationInputError},emitResponse:{noticeContexts:P.tG,responseTypes:h.responseTypes},eventRegistration:{onCheckoutAfterProcessingWithError:n,onCheckoutAfterProcessingWithSuccess:o,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutSuccess:l,onCheckoutFail:d,onCheckoutValidation:a,onPaymentProcessing:G,onPaymentSetup:q,onShippingRateFail:J,onShippingRateSelectFail:Q,onShippingRateSelectSuccess:X,onShippingRateSuccess:Z},onSubmit:i,paymentStatus:$,setExpressPaymentError:ge,shippingData:{isSelectingRate:oe,needsShipping:se,selectedRates:te,setSelectedRates:re,setShippingAddress:ie,shippingAddress:ne,shippingRates:K,shippingRatesLoading:ee},shippingStatus:{shippingErrorStatus:U,shippingErrorTypes:Y},shouldSavePayment:z}}},51565:(e,t,o)=>{"use strict";o.d(t,{m:()=>a,u:()=>l});var r=o(46151),s=o(34083),c=o(47143),n=o(47594);const i=(e=!1)=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:o,availablePaymentMethods:i,availableExpressPaymentMethods:a}=(0,c.useSelect)(e=>{const t=e(n.paymentStore);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),availablePaymentMethods:t.getAvailablePaymentMethods()}}),l=Object.values(i).map(({name:e})=>e),d=Object.values(a).map(({name:e})=>e),u=(0,s.getPaymentMethods)(),m=(0,s.getExpressPaymentMethods)(),p=Object.keys(u).reduce((e,t)=>(l.includes(t)&&(e[t]=u[t]),e),{}),h=Object.keys(m).reduce((e,t)=>(d.includes(t)&&(e[t]=m[t]),e),{}),g=(0,r.c)(p),w=(0,r.c)(h);return{paymentMethods:e?w:g,isInitialized:e?o:t}},a=()=>i(!1),l=()=>i(!0)},38260:(e,t,o)=>{"use strict";o.d(t,{m:()=>m});var r=o(47594),s=o(47143),c=o(73993),n=o(86087),i=o(80305),a=o(28347),l=o(20923),d=o.n(l),u=o(2269);const m=()=>{const{shippingRates:e,needsShipping:t,hasCalculatedShipping:o,isLoadingRates:l,isCollectable:m,isSelectingRate:p}=(0,s.useSelect)(e=>{const t=e(r.cartStore),o=t.getShippingRates();return{shippingRates:o,needsShipping:t.getNeedsShipping(),hasCalculatedShipping:t.getHasCalculatedShipping(),isLoadingRates:t.isAddressFieldsForShippingRatesUpdating(),isCollectable:o.every(({shipping_rates:e})=>e.find(({method_id:e})=>(0,i.jV)(e))),isSelectingRate:t.isShippingRateBeingSelected()}},[]),h=(0,n.useRef)({});(0,n.useEffect)(()=>{const t=(0,a.k)(e);(0,c.isObject)(t)&&!d()(h.current,t)&&(h.current=t)},[e]);const{selectShippingRate:g}=(0,s.useDispatch)(r.cartStore),w=(0,i.jV)(Object.values(h.current).map(e=>e.split(":")[0])),{dispatchCheckoutEvent:_}=(0,u.y)(),b=(0,n.useCallback)((e,t)=>{let o;void 0!==e&&(o=(0,i.jV)(e.split(":")[0])?g(e,null):g(e,t),o.then(()=>{_("set-selected-shipping-rate",{shippingRateId:e})}).catch(e=>{(0,r.processErrorResponse)(e)}))},[g,_]);return{isSelectingRate:p,selectedRates:h.current,selectShippingRate:b,shippingRates:e,needsShipping:t,hasCalculatedShipping:o,isLoadingRates:l,isCollectable:m,hasSelectedLocalPickup:w}}},92705:(e,t,o)=>{"use strict";o.d(t,{C:()=>m});var r=o(15703),s=o(86087),c=o(90341),n=o(46151),i=o(47143),a=o(47594),l=o(74321),d=o(38260),u=o(50929);const m=()=>{const{isEditor:e,getPreviewData:t}=(0,u.m)(),{needsShipping:o}=(0,d.m)(),{useShippingAsBilling:m,prefersCollection:p,editingBillingAddress:h,editingShippingAddress:g}=(0,i.useSelect)(e=>({useShippingAsBilling:e(a.checkoutStore).getUseShippingAsBilling(),prefersCollection:e(a.checkoutStore).prefersCollection(),editingBillingAddress:e(a.checkoutStore).getEditingBillingAddress(),editingShippingAddress:e(a.checkoutStore).getEditingShippingAddress()})),{__internalSetUseShippingAsBilling:w,setEditingBillingAddress:_,setEditingShippingAddress:b}=(0,i.useDispatch)(a.checkoutStore),{billingAddress:x,setBillingAddress:f,shippingAddress:y,setShippingAddress:v}=(0,l.q)(),k=(0,n.c)(x),j=(0,n.c)(y),C=(0,s.useMemo)(()=>(0,c.TU)(k),[k]),S=(0,s.useMemo)(()=>(0,c.TU)(j),[j]),A=(0,s.useCallback)(e=>{f({email:e})},[f]),N=(0,r.getSetting)("forcedBillingAddress",!1);return{shippingAddress:S,billingAddress:C,setShippingAddress:v,setBillingAddress:f,setEmail:A,defaultFields:e?t("defaultFields",r.defaultFields):r.defaultFields,useShippingAsBilling:m,setUseShippingAsBilling:w,editingBillingAddress:h,editingShippingAddress:g,setEditingBillingAddress:_,setEditingShippingAddress:b,needsShipping:o,showShippingFields:!N&&o&&!p,showShippingMethods:o&&!p,showBillingFields:!o||!m||!!p,forcedBillingAddress:N,useBillingAsShipping:N||!!p}}},74321:(e,t,o)=>{"use strict";o.d(t,{q:()=>c});var r=o(47143),s=o(47594);const c=()=>{const{customerData:e,isInitialized:t}=(0,r.useSelect)(e=>{const t=e(s.cartStore);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:o,setBillingAddress:c}=(0,r.useDispatch)(s.cartStore);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:c,setShippingAddress:o}}},37486:(e,t,o)=>{"use strict";o.d(t,{n:()=>i});var r=o(47143),s=o(47594),c=o(86697),n=o(37273);const i=()=>{const{cartIsLoading:e,isLoadingRates:t,hasPendingItemsOperations:o}=(0,c.V)(),{isApplyingCoupon:i,isRemovingCoupon:a}=(0,n.k)(),l=(0,r.useSelect)(e=>e(s.checkoutStore).isCalculating(),[]);return{isLoading:e||t||i||a||l||o}}},76748:(e,t,o)=>{"use strict";o.d(t,{Vt:()=>p,dJ:()=>u,xd:()=>m});var r=o(47594),s=o(47143),c=o(86087),n=o(20923),i=o.n(n),a=o(46151),l=o(13817),d=o(70154);const u=e=>{const t=(0,d._)();e=e||t;const o=(0,s.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:n}=(0,s.useDispatch)(r.QUERY_STATE_STORE_KEY);return[o,(0,c.useCallback)(t=>{n(e,t)},[e,n])]},m=(e,t,o)=>{const n=(0,d._)();o=o||n;const i=(0,s.useSelect)(s=>s(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(o,e,t),[o,e]),{setQueryValue:a}=(0,s.useDispatch)(r.QUERY_STATE_STORE_KEY);return[i,(0,c.useCallback)(t=>{a(o,e,t)},[o,e,a])]},p=(e,t)=>{const o=(0,d._)();t=t||o;const[r,s]=u(t),n=(0,a.c)(r),m=(0,a.c)(e),p=(0,l.Z)(m),h=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{i()(p,m)||(s(Object.assign({},n,m)),h.current=!0)},[n,m,p,s]),h.current?[r,s]:[e,s]}},2269:(e,t,o)=>{"use strict";o.d(t,{y:()=>n});var r=o(52619),s=o(47143),c=o(86087);const n=()=>({dispatchStoreEvent:(0,c.useCallback)((e,t={})=>{try{(0,r.doAction)(`experimental__woocommerce_blocks-${e}`,t)}catch(e){console.error(e)}},[]),dispatchCheckoutEvent:(0,c.useCallback)((e,t={})=>{try{(0,r.doAction)(`experimental__woocommerce_blocks-checkout-${e}`,{...t,storeCart:(0,s.select)("wc/store/cart").getCartData()})}catch(e){console.error(e)}},[])})},51331:(e,t,o)=>{"use strict";o.d(t,{E:()=>b,H:()=>x});var r=o(86087),s=o(13817),c=o(64040),n=o.n(c),i=o(47143),a=o(47594),l=o(692),d=o(32679),u=o(34083),m=o(58267),p=o(87853),h=o(2269),g=o(50929),w=o(10790);const _=(0,r.createContext)({onSubmit:()=>{},onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},onCheckoutSuccess:()=>()=>{},onCheckoutFail:()=>()=>{},onCheckoutValidation:()=>()=>{}}),b=()=>(0,r.useContext)(_),x=({children:e,redirectUrl:t})=>{const o=(0,u.getPaymentMethods)(),c=(0,u.getExpressPaymentMethods)(),b=(0,u.getExpressPaymentMethods)(),{isEditor:x}=(0,g.m)(),{__internalUpdateAvailablePaymentMethods:f,__internalSetRegisteredExpressPaymentMethods:y}=(0,i.useDispatch)(a.paymentStore);(0,r.useEffect)(()=>{y((e=>{const t={};return Object.keys(e).forEach(o=>{const r=e[o];t[o]={name:r.name,title:r.title,description:r.description,gatewayId:r.gatewayId,supportsStyle:r.supports?.style||[]}}),t})(b))},[y,b]),(0,r.useEffect)(()=>{(x||0!==Object.keys(o).length||0!==Object.keys(c).length)&&f()},[x,o,c,f]);const{__internalSetRedirectUrl:v,__internalEmitValidateEvent:k,__internalEmitAfterProcessingEvents:j,__internalSetBeforeProcessing:C}=(0,i.useDispatch)(a.checkoutStore),{checkoutRedirectUrl:S,checkoutStatus:A,isCheckoutBeforeProcessing:N,isCheckoutAfterProcessing:P,checkoutHasError:B,checkoutOrderId:I,checkoutOrderNotes:T,checkoutCustomerId:E}=(0,i.useSelect)(e=>{const t=e(a.checkoutStore);return{checkoutRedirectUrl:t.getRedirectUrl(),checkoutStatus:t.getCheckoutStatus(),isCheckoutBeforeProcessing:t.isBeforeProcessing(),isCheckoutAfterProcessing:t.isAfterProcessing(),checkoutHasError:t.hasError(),checkoutOrderId:t.getOrderId(),checkoutOrderNotes:t.getOrderNotes(),checkoutCustomerId:t.getCustomerId()}});t&&t!==S&&v(t);const{setValidationErrors:R}=(0,i.useDispatch)(a.validationStore),{dispatchCheckoutEvent:D}=(0,h.y)(),L=Object.values(p.tG).filter(e=>e!==p.tG.PAYMENTS&&e!==p.tG.EXPRESS_PAYMENTS),O=(0,i.useSelect)(e=>{const{getNotices:t}=e(l.store);return L.reduce((e,o)=>[...e,...t(o)],[])},[L]),{paymentNotices:M,expressPaymentNotices:V}=(0,i.useSelect)(e=>{const{getNotices:t}=e(l.store);return{paymentNotices:t(p.tG.PAYMENTS),expressPaymentNotices:t(p.tG.EXPRESS_PAYMENTS)}},[]),[F]=(0,r.useReducer)(m.F,{}),H=(0,r.useRef)(F),{onCheckoutValidation:z,onCheckoutSuccess:$,onCheckoutFail:W}=d.checkoutEvents;(0,r.useEffect)(()=>{H.current=F},[F]);const G=(0,r.useMemo)(()=>function(...e){return n()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidation"}),z(...e)},[z]),q=(0,r.useMemo)(()=>function(...e){return n()("onCheckoutValidationBeforeProcessing",{since:"7.6.0",alternative:"onCheckoutValidation",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),z(...e)},[z]),U=(0,r.useMemo)(()=>function(...e){return n()("onCheckoutAfterProcessingWithSuccess",{since:"7.6.0",alternative:"onCheckoutSuccess",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),$(...e)},[$]),Y=(0,r.useMemo)(()=>function(...e){return n()("onCheckoutAfterProcessingWithError",{since:"7.6.0",alternative:"onCheckoutFail",link:"https://github.com/woocommerce/woocommerce-blocks/pull/8381"}),W(...e)},[W]);(0,r.useEffect)(()=>{N&&k({setValidationErrors:R})},[N,R,k]);const Z=(0,s.Z)(A),J=(0,s.Z)(B);(0,r.useEffect)(()=>{A===Z&&B===J||P&&j({notices:{checkoutNotices:O,paymentNotices:M,expressPaymentNotices:V}})},[A,B,S,I,E,T,P,N,Z,J,O,V,M,k,j]);const X={onSubmit:(0,r.useCallback)(()=>{D("submit"),C()},[D,C]),onCheckoutBeforeProcessing:G,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:U,onCheckoutAfterProcessingWithError:Y,onCheckoutSuccess:$,onCheckoutFail:W,onCheckoutValidation:z};return(0,w.jsx)(_.Provider,{value:X,children:e})}},35943:(e,t,o)=>{"use strict";o.d(t,{s:()=>C});var r=o(92279),s=o(15703),c=o(96242),n=o(74191),i=o(37921),a=o(51331),l=o(27723),d=o(1455),u=o.n(d),m=o(86087),p=o(692),h=o(47143);(0,l.__)("Something went wrong. Please contact us to get assistance.","woocommerce");var g=o(47594),w=o(34083),_=o(73993),b=o(32679);const x=(e,t,o)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),s=`wc-${o}-new-payment-method`;return r.push({key:s,value:t}),r},f=e=>{if(!e)return;const{__internalSetCustomerId:t}=(0,h.dispatch)(g.checkoutStore);u().setNonce&&"function"==typeof u().setNonce&&u().setNonce(e),u().setCartHash&&"function"==typeof u().setCartHash&&u().setCartHash(e),e?.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))};var y=o(86697),v=o(92705);const k=()=>{const{onCheckoutValidation:e}=b.checkoutEvents,{additionalFields:t,customerId:o,customerPassword:r,extensionData:s,hasError:c,isBeforeProcessing:n,isComplete:a,isProcessing:d,orderNotes:k,redirectUrl:j,shouldCreateAccount:C}=(0,h.useSelect)(e=>{const t=e(g.checkoutStore);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId(),customerPassword:t.getCustomerPassword(),extensionData:t.getExtensionData(),hasError:t.hasError(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes(),redirectUrl:t.getRedirectUrl(),shouldCreateAccount:t.getShouldCreateAccount()}},[]),{__internalSetHasError:S,__internalProcessCheckoutResponse:A}=(0,h.useDispatch)(g.checkoutStore),N=(0,h.useSelect)(e=>e(g.validationStore).hasValidationErrors,[]),{shippingErrorStatus:P}=(0,i.H)(),{shippingAddress:B,billingAddress:I,useBillingAsShipping:T}=(0,v.C)(),{cartNeedsPayment:E,cartNeedsShipping:R,cartTotals:D,receiveCartContents:L}=(0,y.V)(),{activePaymentMethod:O,paymentMethodData:M,isExpressPaymentMethodActive:V,hasPaymentError:F,isPaymentReady:H,shouldSavePayment:z}=(0,h.useSelect)(e=>{const t=e(g.paymentStore);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),hasPaymentError:t.hasPaymentError(),isPaymentReady:t.isPaymentReady(),shouldSavePayment:t.getShouldSavePaymentMethod()}},[]),$=(0,w.getPaymentMethods)(),W=(0,w.getExpressPaymentMethods)(),G=(0,m.useRef)(I),q=(0,m.useRef)(B),U=(0,m.useRef)(j),[Y,Z]=(0,m.useState)(!1),J=(0,m.useMemo)(()=>{const e={...W,...$};return e?.[O]?.paymentMethodId},[O,W,$]),X=N()&&!V||F||P.hasError,Q=!c&&!X&&(H||!E)&&d;(0,m.useEffect)(()=>{X===c||!d&&!n||V||S(X)},[X,c,d,n,V,S]),(0,m.useEffect)(()=>{G.current=I,q.current=B,U.current=j},[I,B,j]);const K=(0,m.useCallback)(()=>N()?void 0!==(0,h.select)(g.validationStore).getValidationError("shipping-rates-error")&&{type:_.responseTypes.ERROR,errorMessage:(0,l.__)("Sorry, this order requires a shipping option.","woocommerce")}:F?{type:_.responseTypes.ERROR,errorMessage:(0,l.__)("There was a problem with your payment option.","woocommerce"),context:"wc/checkout/payments"}:!P.hasError||{type:_.responseTypes.ERROR,errorMessage:(0,l.__)("There was a problem with your shipping option.","woocommerce"),context:"wc/checkout/shipping-methods"},[N,F,P.hasError]);(0,m.useEffect)(()=>{let t;return V||(t=e(K,0)),()=>{V||"function"!=typeof t||t()}},[e,K,V]),(0,m.useEffect)(()=>{window.localStorage.removeItem("WOOCOMMERCE_CHECKOUT_IS_CUSTOMER_DATA_DIRTY"),U.current&&(window.location.href=U.current)},[a]);const ee=(0,m.useCallback)(async()=>{if(Y)return;Z(!0),(()=>{const e=(0,h.select)("wc/store/store-notices").getRegisteredContainers(),{removeNotice:t}=(0,h.dispatch)(p.store),{getNotices:o}=(0,h.select)(p.store);e.forEach(e=>{o(e).forEach(o=>{t(o.id,e)})})})();const e=E?{payment_method:J,payment_data:x(M,z,O)}:{},c=G.current,n=T?c:q.current,i={additional_fields:t,billing_address:c,create_account:C,customer_note:k,customer_password:r,extensions:{...s},shipping_address:R?n:void 0,...!V&&D&&""!==D.total_price?{expected_total:D.total_price}:{},...e};(0,g.clearCheckoutPutRequests)(),u()({path:"/wc/store/v1/checkout",method:"POST",data:i,cache:"no-store",parse:!1}).then(e=>{if((0,_.assertResponseIsValid)(e),f(e.headers),!e.ok)throw e;return e.json()}).then(e=>{A(e),Z(!1)}).catch(e=>{f(e?.headers);try{e.json().then(e=>e).then(e=>{e.data?.cart&&L(e.data.cart),(0,g.processErrorResponse)(e),A(e)})}catch{let e=(0,l.__)("Something went wrong when placing the order. Check your email for order updates before retrying.","woocommerce");0!==o&&(e=(0,l.__)("Something went wrong when placing the order. Check your account's order history or your email for order updates before retrying.","woocommerce")),(0,g.processErrorResponse)({code:"unknown_error",message:e,data:null})}S(!0),Z(!1)})},[Y,E,D,V,J,M,z,O,k,C,o,r,s,t,R,L,S,A,T]);return(0,m.useEffect)(()=>{Q&&!Y&&ee()},[ee,Q,Y]),null};var j=o(10790);const C=({children:e,redirectUrl:t})=>(0,j.jsx)(a.H,{redirectUrl:t,children:(0,j.jsx)(i.o,{children:(0,j.jsxs)(n.n,{children:[e,(0,j.jsx)(c.A,{renderError:s.CURRENT_USER_IS_ADMIN?null:()=>null,children:(0,j.jsx)(r.PluginArea,{scope:"woocommerce-checkout"})}),(0,j.jsx)(k,{})]})})})},74191:(e,t,o)=>{"use strict";o.d(t,{n:()=>p,e:()=>m});var r=o(86087),s=o(47143),c=o(47594),n=o(64040),i=o.n(n),a=o(58267),l=o(77972);var d=o(10790);const u=(0,r.createContext)({onPaymentProcessing:()=>()=>()=>{},onPaymentSetup:()=>()=>()=>{}}),m=()=>(0,r.useContext)(u),p=({children:e})=>{const{isProcessing:t,isIdle:o,isCalculating:n,hasError:m}=(0,s.useSelect)(e=>{const t=e(c.checkoutStore);return{isProcessing:t.isProcessing(),isIdle:t.isIdle(),hasError:t.hasError(),isCalculating:t.isCalculating()}}),{isPaymentReady:p}=(0,s.useSelect)(e=>{const t=e(c.paymentStore);return{isPaymentProcessing:t.isPaymentProcessing(),isPaymentReady:t.isPaymentReady()}}),{setValidationErrors:h}=(0,s.useDispatch)(c.validationStore),[g,w]=(0,r.useReducer)(a.F,{}),{onPaymentSetup:_}=(e=>(0,r.useMemo)(()=>({onPaymentSetup:(0,l.Y)("payment_setup",e)}),[e]))(w),b=(0,r.useRef)(g);(0,r.useEffect)(()=>{b.current=g},[g]);const{__internalSetPaymentProcessing:x,__internalSetPaymentIdle:f,__internalEmitPaymentProcessingEvent:y}=(0,s.useDispatch)(c.paymentStore);(0,r.useEffect)(()=>{!t||m||n||(x(),y(b.current,h))},[t,m,n,x,y,h]),(0,r.useEffect)(()=>{o&&!p&&f()},[o,p,f]),(0,r.useEffect)(()=>{m&&p&&f()},[m,p,f]);const v={onPaymentProcessing:(0,r.useMemo)(()=>function(...e){return i()("onPaymentProcessing",{alternative:"onPaymentSetup"}),_(...e)},[_]),onPaymentSetup:_};return(0,d.jsx)(u.Provider,{value:v,children:e})}},37921:(e,t,o)=>{"use strict";o.d(t,{o:()=>A,H:()=>S});var r=o(86087),s=o(47143),c=o(47594);const n={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},i={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},a={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:e=>e,shippingErrorTypes:n,onShippingRateSuccess:()=>()=>{},onShippingRateFail:()=>()=>{},onShippingRateSelectSuccess:()=>()=>{},onShippingRateSelectFail:()=>()=>{}},l=(e,{type:t})=>Object.values(n).includes(t)?t:e;var d=o(58267),u=o(77972);const m="shipping_rates_success",p="shipping_rates_fail",h="shipping_rate_select_success",g="shipping_rate_select_fail",w=e=>({onSuccess:(0,u.Y)(m,e),onFail:(0,u.Y)(p,e),onSelectSuccess:(0,u.Y)(h,e),onSelectFail:(0,u.Y)(g,e)});o(73993);var _=o(87853);const b=async(e,t,o)=>{const r=(0,_.fK)(e,t),s=[];for(const e of r)try{const t=await Promise.resolve(e.callback(o));"object"==typeof t&&s.push(t)}catch(e){console.error(e)}return!s.length||s};var x=o(86697),f=o(38260),y=o(10790);const{NONE:v,INVALID_ADDRESS:k,UNKNOWN:j}=n,C=(0,r.createContext)(a),S=()=>(0,r.useContext)(C),A=({children:e})=>{const{__internalStartCalculation:t,__internalFinishCalculation:o}=(0,s.useDispatch)(c.checkoutStore),{shippingRates:a,isLoadingRates:u,cartErrors:_}=(0,x.V)(),{selectedRates:S,isSelectingRate:A}=(0,f.m)(),[N,P]=(0,r.useReducer)(l,v),[B,I]=(0,r.useReducer)(d.F,{}),T=(0,r.useRef)(B),E=(0,r.useMemo)(()=>({onShippingRateSuccess:w(I).onSuccess,onShippingRateFail:w(I).onFail,onShippingRateSelectSuccess:w(I).onSelectSuccess,onShippingRateSelectFail:w(I).onSelectFail}),[I]);(0,r.useEffect)(()=>{T.current=B},[B]),(0,r.useEffect)(()=>{u?t():o()},[u,t,o]),(0,r.useEffect)(()=>{A?t():o()},[t,o,A]),(0,r.useEffect)(()=>{_.length>0&&_.some(e=>!(!e.code||!Object.values(i).includes(e.code)))?P({type:k}):P({type:v})},[_]);const R=(0,r.useMemo)(()=>({isPristine:N===v,isValid:N===v,hasInvalidAddress:N===k,hasError:N===j||N===k}),[N]);(0,r.useEffect)(()=>{u||0!==a.length&&!R.hasError||b(T.current,p,{hasInvalidAddress:R.hasInvalidAddress,hasError:R.hasError})},[a,u,R.hasError,R.hasInvalidAddress]),(0,r.useEffect)(()=>{!u&&a.length>0&&!R.hasError&&b(T.current,m,a)},[a,u,R.hasError]),(0,r.useEffect)(()=>{A||(R.hasError?b(T.current,g,{hasError:R.hasError,hasInvalidAddress:R.hasInvalidAddress}):b(T.current,h,S.current))},[S,A,R.hasError,R.hasInvalidAddress]);const D={shippingErrorStatus:R,dispatchErrorStatus:P,shippingErrorTypes:n,...E};return(0,y.jsx)(y.Fragment,{children:(0,y.jsx)(C.Provider,{value:D,children:e})})}},85909:(e,t,o)=>{"use strict";o.d(t,{u:()=>l,G:()=>a});var r=o(86087),s=o(29491),c=o(4921),n=o(10790);const i=(0,r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),a=()=>(0,r.useContext)(i),l=({children:e,className:t=""})=>{const[o,r]=(()=>{const[e,{width:t}]=(0,s.useResizeObserver)();let o="";return t>920?o="is-large":t>520?o="is-medium":t>400?o="is-small":t&&(o="is-mobile"),[e,o]})(),a={hasContainerWidth:""!==r,containerClassName:r,isMobile:"is-mobile"===r,isSmall:"is-small"===r,isMedium:"is-medium"===r,isLarge:"is-large"===r};return(0,n.jsx)(i.Provider,{value:a,children:(0,n.jsxs)("div",{className:(0,c.A)(t,r),children:[o,e]})})}},50929:(e,t,o)=>{"use strict";o.d(t,{m:()=>a,z:()=>l});var r=o(86087),s=o(47143),c=o(2284),n=o(10790);const i=(0,r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>({})}),a=()=>(0,r.useContext)(i),l=({children:e,currentPostId:t=0,previewData:o={},currentView:a=""})=>{const l=(0,c.H)(),d=(0,s.useSelect)(e=>t||e("core/editor").getCurrentPostId(),[t]),u=(0,r.useCallback)((e,t={})=>o&&e in o?o[e]:t,[o]),m={isEditor:!0,currentPostId:d,currentView:a,previewData:o,getPreviewData:u,isPreview:l};return(0,n.jsx)(i.Provider,{value:m,children:e})}},70154:(e,t,o)=>{"use strict";o.d(t,{_:()=>c});var r=o(86087);const s=(0,r.createContext)("page"),c=()=>(0,r.useContext)(s);s.Provider},2284:(e,t,o)=>{"use strict";o.d(t,{H:()=>c});var r=o(47143),s=o(94715);const c=()=>(0,r.useSelect)(e=>{const{getSettings:t}=e(s.store);return Boolean(t()?.isPreviewMode??!1)},[])},13817:(e,t,o)=>{"use strict";o.d(t,{Z:()=>s});var r=o(86087);function s(e,t){const o=(0,r.useRef)();return(0,r.useEffect)(()=>{o.current===e||t&&!t(e,o.current)||(o.current=e)},[e,t]),o.current}},19971:(e,t,o)=>{"use strict";o.d(t,{d:()=>i});var r=o(27723),s=o(94715),c=o(47143),n=o(10790);const i=({clientId:e,postType:t,blockName:o})=>({hasInvalidContext:(0,c.useSelect)(o=>o(s.store).getBlockParentsByBlockName(e,"core/post-template").length>0&&"product"!==t,[e,t]),warningElement:(0,n.jsx)("div",{...(0,s.useBlockProps)(),children:(0,n.jsx)(s.Warning,{children:(0,r.sprintf)(/* translators: %s: block name */ /* translators: %s: block name */ (0,r.__)("The %s block requires a product context. When used in a Query Loop, the Query Loop must be configured to display products.","woocommerce"),o)})})})},46151:(e,t,o)=>{"use strict";o.d(t,{c:()=>n});var r=o(86087),s=o(20923),c=o.n(s);function n(e){const t=(0,r.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},24947:(e,t,o)=>{"use strict";o.d(t,{p:()=>l});var r=o(4921),s=o(73993),c=o(67356);const n=window.wp.styleEngine;function i(e={}){const t={};return(0,n.getCSSRules)(e,{selector:""}).forEach(e=>{t[e.key]=e.value}),t}function a(e,t){return e&&t?`has-${(0,c.c)(t)}-${e}`:""}const l=e=>{const t=(e=>{const t=(0,s.isObject)(e)?e:{style:{}};let o=t.style;return(0,s.isString)(o)&&(o=JSON.parse(o)||{}),(0,s.isObject)(o)||(o={}),{...t,style:o}})(e),o=function(e){const{backgroundColor:t,textColor:o,gradient:c,style:n}=e,l=a("background-color",t),d=a("color",o),u=function(e){if(e)return`has-${e}-gradient-background`}(c),m=u||n?.color?.gradient;return{className:(0,r.A)(d,u,{[l]:!m&&!!l,"has-text-color":o||n?.color?.text,"has-background":t||n?.color?.background||c||n?.color?.gradient,"has-link-color":(0,s.isObject)(n?.elements?.link)?n?.elements?.link?.color:void 0}),style:i({color:n?.color||{}})}}(t),c=function(e){const t=e.style?.border||{};return{className:function(e){const{borderColor:t,style:o}=e,s=t?a("border-color",t):"";return(0,r.A)({"has-border-color":!!t||!!o?.border?.color,[s]:!!s})}(e),style:i({border:t})}}(t),n=function(e){return{className:void 0,style:i({spacing:e.style?.spacing||{}})}}(t),l=(e=>{const t=(0,s.isObject)(e.style.typography)?e.style.typography:{},o=(0,s.isString)(t.fontFamily)?t.fontFamily:"";return{className:e.fontFamily?`has-${e.fontFamily}-font-family`:o,style:{fontSize:e.fontSize?`var(--wp--preset--font-size--${e.fontSize})`:t.fontSize,fontStyle:t.fontStyle,fontWeight:t.fontWeight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,textDecoration:t.textDecoration,textTransform:t.textTransform}}})(t);return{className:(0,r.A)(l.className,o.className,c.className,n.className),style:{...l.style,...o.style,...c.style,...n.style}}}},90341:(e,t,o)=>{"use strict";o.d(t,{TU:()=>a,Z$:()=>d,ln:()=>l});var r=o(54579),s=o(36352),c=o(15703);o(73993),o(18537);const n=["state","country","postcode","city"],i=(e,t)=>e in t,a=e=>{const t=(0,r.A)(s.Hw,c.defaultFields,e.country),o=Object.assign({},e);return t.forEach(({key:t,hidden:r})=>{!0===r&&i(t,e)&&(o[t]="")}),o},l=e=>{const t=(0,r.A)(s.Hw,c.defaultFields,e.country),o=Object.assign({},e);return t.forEach(({key:t})=>{"country"!==t&&"state"!==t&&i(t,e)&&(o[t]="")}),o},d=e=>!!e.country&&(0,r.A)(s.Hw,c.defaultFields,e.country).filter(({key:e})=>n.includes(e)).every(({key:t,hidden:o,required:r})=>!0===o||!1===r||i(t,e)&&""!==e[t])},90054:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(95754),s=o(5341),c=o(12892);function n(e,t){const o="string"==typeof e.raw_prices.precision?parseInt(e.raw_prices.precision,10):e.raw_prices.precision,n=(0,r.uE)({amount:parseInt(e.raw_prices.regular_price,10),currency:c.B3,scale:o}),i=(0,r.uE)({amount:parseInt(e.raw_prices.price,10),currency:c.B3,scale:o});return(0,s.i)((0,s.n)((0,s.o)(n,i),t)).amount}},28347:(e,t,o)=>{"use strict";o.d(t,{k:()=>r});const r=e=>Object.fromEntries(e.map(({package_id:e,shipping_rates:t})=>[e,t.find(e=>e.selected)?.rate_id||""]))},51258:(e,t,o)=>{"use strict";o.d(t,{W:()=>r});const r=async e=>{if(!("json"in e))return{code:e.code||"",message:e.message,type:e.type||"general"};try{const t=await e.json();return{code:t.code||"",message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}}},61115:(e,t,o)=>{"use strict";o.d(t,{R:()=>r});const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},80305:(e,t,o)=>{"use strict";o.d(t,{J_:()=>i,Lb:()=>l,T4:()=>c,iS:()=>d,jV:()=>a,m3:()=>u,mH:()=>p,qr:()=>h,uo:()=>m});var r=o(15703),s=o(36352);const c=e=>e.length,n=(0,r.getSetting)("collectableMethodIds",[]),i=e=>n.includes(e.method_id),a=e=>!!s.F7&&(Array.isArray(e)?!!e.find(e=>n.includes(e)):n.includes(e)),l=e=>e.reduce(function(e,t){return e+t.shipping_rates.length},0),d=e=>e.find(e=>e.selected)?.rate_id??e[0]?.rate_id,u=e=>!!(e=>e.some(e=>!!e.shipping_rates.length))(e)&&e.some(e=>e.shipping_rates.some(e=>e.selected)),m=(e,t)=>e.map(e=>({...e,shipping_rates:e.shipping_rates.filter(e=>{const o=a(e.method_id);return t?o:!o})})),p=e=>(0,r.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.total_shipping,10)+parseInt(e.total_shipping_tax,10):parseInt(e.total_shipping,10),h=e=>Array.from(new Set(e.flatMap(e=>e.shipping_rates.filter(e=>e.selected).map(e=>e.name))))},79410:(e,t,o)=>{"use strict";o.d(t,{gu:()=>r,mm:()=>s});const r=e=>!e||"none"===e.type||!e.value,s=e=>{if(e&&"none"!==e.type&&e.value)return"image"===e.type?{backgroundImage:`url('${t=e.value,t.split("'").join("%27")}')`}:{backgroundColor:e.value};var t}},68566:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var r=o(10790);const s=()=>(0,r.jsxs)("div",{className:"quantity wc-block-components-quantity-selector",children:[(0,r.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",children:"−"}),(0,r.jsx)("input",{type:"number",value:"1",className:"input-text qty text",readOnly:!0}),(0,r.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",children:"+"})]})},55049:(e,t,o)=>{"use strict";o.d(t,{R7:()=>n,g2:()=>c,u3:()=>s});var r=o(27723);const s=[["woocommerce/add-to-cart-with-options-variation-selector-attribute",{},[["core/group",{layout:{type:"flex",orientation:"vertical",flexWrap:"nowrap"},style:{spacing:{blockGap:"0.5rem",margin:{top:"1rem",bottom:"1rem"}}}},[["woocommerce/add-to-cart-with-options-variation-selector-attribute-name",{fontSize:"medium"}],["woocommerce/product-filter-chips"]]]]]],c=[{id:1,taxonomy:"pa_color",name:(0,r.__)("Color","woocommerce"),has_variations:!0,terms:[{id:-1,slug:"blue",name:(0,r.__)("Blue","woocommerce")},{id:-2,slug:"red",name:(0,r.__)("Red","woocommerce")},{id:-3,slug:"green",name:(0,r.__)("Green","woocommerce")}]},{id:2,taxonomy:"pa_size",name:(0,r.__)("Size","woocommerce"),has_variations:!0,terms:[{id:-4,slug:"sm",name:(0,r.__)("Small","woocommerce")},{id:-5,slug:"md",name:(0,r.__)("Medium","woocommerce")},{id:-6,slug:"lg",name:(0,r.__)("Large","woocommerce")}]}],n={"-1":{type:"color",value:"#0000ff"},"-2":{type:"color",value:"#e10000"},"-3":{type:"color",value:"#009b00"}}},41323:(e,t,o)=>{"use strict";o.d(t,{b:()=>_});var r=o(94715),s=o(56427),c=o(93023),n=o(27723),i=o(47143),a=o(47594),l=o(15703),d=o(10790);const u=["height","borderRadius"],m=e=>{const t=(0,i.select)(a.paymentStore).getAvailableExpressPaymentMethods();return Object.values(t).reduce((t,o)=>t||o?.supportsStyle.some(t=>e.includes(t)),!1)},p=({attributes:e,setAttributes:t})=>{const{buttonHeight:o,buttonBorderRadius:c}=e;return(0,d.jsxs)(d.Fragment,{children:[m(["height"])&&(0,d.jsx)(s.RadioControl,{label:(0,n.__)("Button height","woocommerce"),selected:o,options:[{label:(0,n.__)("Small (40px)","woocommerce"),value:"40"},{label:(0,n.__)("Medium (48px)","woocommerce"),value:"48"},{label:(0,n.__)("Large (55px)","woocommerce"),value:"55"}],onChange:e=>t({buttonHeight:e})}),m(["borderRadius"])&&(0,d.jsx)("div",{className:"border-radius-control-container",children:(0,d.jsx)(r.HeightControl,{label:(0,n.__)("Button border radius","woocommerce"),value:c,onChange:e=>{const o=e.replace("px","");t({buttonBorderRadius:o})}})})]})},h=({attributes:e,setAttributes:t})=>e.showButtonStyles?(0,d.jsx)(p,{attributes:e,setAttributes:t}):null,g=()=>{const e=(0,i.select)(a.paymentStore).getAvailableExpressPaymentMethods();return Object.entries(e).length<1?(0,d.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,n.__)("You currently have no express payment integrations active.","woocommerce")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,n.__)("You currently have the following express payment integrations active.","woocommerce")}),Object.values(e).map(e=>(0,d.jsx)(c.A,{href:`${l.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${encodeURIComponent(e.gatewayId)}`,title:e.title,description:e.description},e.name))]})},w=(0,d.jsxs)(d.Fragment,{children:[(0,n.__)("Apply uniform styles","woocommerce")," ",(0,d.jsx)("span",{className:"express-payment-styles-beta-badge",children:"Beta"})]}),_=({attributes:e,setAttributes:t})=>(0,d.jsxs)(r.InspectorControls,{children:[m(u)&&(0,d.jsxs)(s.PanelBody,{title:(0,n.__)("Button Settings","woocommerce"),className:"express-payment-button-settings",children:[(0,d.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:w,checked:e.showButtonStyles,onChange:()=>t({showButtonStyles:!e.showButtonStyles}),help:(0,n.__)("Sets a consistent style for express payment buttons.","woocommerce")}),(0,d.jsxs)(s.Notice,{status:"warning",isDismissible:!1,className:"wc-block-checkout__notice express-payment-styles-notice",children:[(0,d.jsxs)("strong",{children:[(0,n.__)("Note","woocommerce"),":"]})," ",(0,n.__)("Some payment methods might not yet support all style controls","woocommerce")]}),(0,d.jsx)(h,{attributes:e,setAttributes:t})]}),(0,d.jsx)(s.PanelBody,{title:(0,n.__)("Express Payment Methods","woocommerce"),children:(0,d.jsx)(g,{})})]})},39940:(e,t,o)=>{"use strict";o.d(t,{t:()=>i});var r=o(94715),s=o(56427),c=o(27723),n=o(10790);const i=({attributes:e,setAttributes:t})=>{const{hasDarkControls:o,showFormStepNumbers:i}=e;return(0,n.jsx)(r.InspectorControls,{children:(0,n.jsxs)(s.PanelBody,{title:(0,c.__)("Style","woocommerce"),children:[(0,n.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Show form step numbers","woocommerce"),checked:i,onChange:()=>t({showFormStepNumbers:!i})}),(0,n.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Dark mode inputs","woocommerce"),help:(0,c.__)("Inputs styled specifically for use on dark background colors.","woocommerce"),checked:o,onChange:()=>t({hasDarkControls:!o})})]})})}},26999:(e,t,o)=>{"use strict";o.d(t,{h:()=>a});var r=o(74997),s=o(71e3),c=o(47594),n=o(47143);const i=["core/paragraph","core/image","core/separator"],a=e=>{const t=(0,s.applyCheckoutFilter)({filterName:"additionalCartCheckoutInnerBlockTypes",defaultValue:[],extensions:(0,n.select)(c.cartStore).getCartData().extensions,arg:{block:e},validation:e=>{if(Array.isArray(e)&&e.every(e=>"string"==typeof e))return!0;throw new Error("allowedBlockTypes filters must return an array of strings.")}});return Array.from(new Set([...(0,r.getBlockTypes)().filter(t=>(t?.parent||[]).includes(e)).map(({name:e})=>e),...i,...t]))}},17554:(e,t,o)=>{"use strict";o.d(t,{K:()=>m,t:()=>u});var r=o(94715),s=o(28107),c=o(47143),n=o(86087),i=o(48558),a=o(52619),l=o(74997);const d=(e,t=!0)=>{t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},u=()=>{(0,a.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||(0,c.subscribe)(()=>{const e=(0,c.select)(r.store);if(!e)return;const t=e.getSelectedBlock();t&&(d("wc-lock-selected-block--remove",!!t?.attributes?.lock?.remove),d("wc-lock-selected-block--move",!!t?.attributes?.lock?.move))})},m=(e={})=>{const t=(0,n.useRef)(),o=(0,r.useBlockProps)({ref:t,...e});return(({ref:e})=>{const t=(0,a.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),o=e.current;(0,n.useEffect)(()=>{if(o&&!t)return o.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{o.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:o}=e;if(!(o instanceof HTMLElement))return;if(t!==i.BACKSPACE&&t!==i.DELETE)return;if((0,s.isTextField)(o))return;const n=o;void 0!==n.dataset.block&&(e=>{if(!e)return!1;const{getBlock:t}=(0,c.select)(r.store),o=t(e);if("boolean"==typeof o?.attributes?.lock?.remove)return o.attributes.lock.remove;const s=(0,l.getBlockType)(o.name);return"boolean"==typeof s?.attributes?.lock?.default?.remove&&s?.attributes?.lock?.default?.remove})(n.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[o,t])})({ref:t}),o}},95309:(e,t,o)=>{"use strict";o.d(t,{A:()=>s});var r=o(10790);const s=(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{stroke:"#1E1E1E",strokeLinejoin:"round",strokeWidth:"1.5",d:"M18.25 12a6.25 6.25 0 1 1-12.5 0 6.25 6.25 0 0 1 12.5 0Z"}),(0,r.jsx)("path",{fill:"#1E1E1E",d:"M10 3h4v3h-4z"}),(0,r.jsx)("rect",{width:"1.5",height:"5",x:"11.25",y:"8",fill:"#1E1E1E",rx:".75"}),(0,r.jsx)("path",{fill:"#1E1E1E",d:"m15.7 4.816 1.66 1.078-1.114 1.718-1.661-1.078z"})]})},39011:(e,t,o)=>{"use strict";o.d(t,{A:()=>w});var r=o(27723),s=o(51565),c=o(92622),n=o(86087),i=o(50929),a=o(64040),l=o.n(a),d=o(47143),u=o(4921),m=o(47594),p=o(61018),h=o(9051),g=o(10790);const w=()=>{const{isEditor:e}=(0,i.m)(),{showButtonStyles:t,buttonHeight:o,buttonBorderRadius:a}=(0,h.V)(),w=t?{height:o,borderRadius:a}:void 0,{activePaymentMethod:_,paymentMethodData:b}=(0,d.useSelect)(e=>{const t=e(m.paymentStore);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData()}}),{__internalSetActivePaymentMethod:x,__internalSetExpressPaymentStarted:f,__internalSetPaymentIdle:y,__internalSetPaymentError:v,__internalSetPaymentMethodData:k,__internalSetExpressPaymentError:j}=(0,d.useDispatch)(m.paymentStore),{paymentMethods:C}=(0,s.u)(),S=(0,c.Y)(),A=(0,n.useRef)(_),N=(0,n.useRef)(b),P=Object.entries(C),{expressPaymentWrapperRef:B,focusedExpressPaymentMethod:I}=(e=>{const t=(0,n.useRef)(null),o=(0,n.useRef)(null),[r,s]=(0,n.useState)(null),c=(0,n.useCallback)(()=>{o.current&&(clearInterval(o.current),o.current=null)},[]),i=(0,n.useCallback)(()=>{const e=t.current,o=e?.ownerDocument.activeElement;if(!(e&&o instanceof Element))return{focusedPaymentMethod:null,isExpressPaymentIframe:!1};const r=o.closest('[id^="express-payment-method-"]'),s=o instanceof HTMLIFrameElement&&e.contains(o);return r&&e.contains(r)?{focusedPaymentMethod:r.id.replace("express-payment-method-",""),isExpressPaymentIframe:s}:{focusedPaymentMethod:null,isExpressPaymentIframe:!1}},[]),a=(0,n.useCallback)(()=>{const{focusedPaymentMethod:e,isExpressPaymentIframe:t}=i();s(e),t?o.current||(o.current=setInterval(()=>{const{focusedPaymentMethod:e,isExpressPaymentIframe:t}=i();s(e),t||c()},100)):c()},[i,c]);return(0,n.useEffect)(()=>{if(!e)return s(null),void c();const o=t.current;if(!o)return;const r=o.ownerDocument,n=r.defaultView,i=()=>{setTimeout(a,0)};return r.addEventListener("focusin",a),r.addEventListener("focusout",i),n?.addEventListener("blur",a),n?.addEventListener("focus",i),()=>{c(),r.removeEventListener("focusin",a),r.removeEventListener("focusout",i),n?.removeEventListener("blur",a),n?.removeEventListener("focus",i)}},[e,c,a]),{expressPaymentWrapperRef:t,focusedExpressPaymentMethod:r}})(!e&&P.length>0),T=(0,n.useCallback)(e=>()=>{A.current=_,N.current=b,f(),x(e)},[_,b,x,f]),E=(0,n.useCallback)(()=>{y(),x(A.current,N.current)},[x,y]),R=(0,n.useCallback)(e=>{v(),k(e),j(e),x(A.current,N.current)},[x,v,k,j]),D=(0,n.useCallback)((e="")=>{l()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?R(e):j("")},[j,R]),L=P.length>1?"ul":"div",O=P.length>1?"li":"div",M=P.length>0?P.map(([t,o])=>{const r=e?o.edit:o.content;return(0,n.isValidElement)(r)?(0,g.jsx)(O,{id:`express-payment-method-${t}`,className:(0,u.A)({"wc-block-components-express-payment__event-button--focused":I===t}),children:(0,n.cloneElement)(r,{...S,onClick:T(t),onClose:E,onError:R,setExpressPaymentError:D,buttonAttributes:w})},t):null}):(0,g.jsx)("div",{children:(0,r.__)("No registered Payment Methods","woocommerce")},"noneRegistered");return(0,g.jsx)(p.A,{isEditor:e,children:(0,g.jsx)(L,{className:"wc-block-components-express-payment__event-buttons",ref:B,children:M})})}},9051:(e,t,o)=>{"use strict";o.d(t,{V:()=>c,W:()=>s});var r=o(86087);const s=(0,r.createContext)({showButtonStyles:!1,buttonHeight:"48",buttonBorderRadius:"4"}),c=()=>(0,r.useContext)(s)},40808:(e,t,o)=>{"use strict";o.d(t,{m:()=>r});const r=({availableExpressPaymentMethods:e={},expressPaymentMethodsInitialized:t=!1,registeredExpressPaymentMethods:o={}})=>{const r=Object.keys(o||{}),s=Object.keys(e||{}),c=r.length,n=s.length,i=c>0;return{hasRegisteredExpressPaymentMethods:i,hasRegisteredNotInitializedExpressPaymentMethods:!t&&i,hasNoValidRegisteredExpressPaymentMethods:t&&i&&!n,availableExpressPaymentsCount:n||2}}},61018:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(86087),c=o(15703),n=o(14656),i=o(87853),a=o(10790);class l extends s.Component{state={errorMessage:"",hasError:!1};static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:o}=this.props;if(e){let e=(0,r.__)("We are experiencing difficulties with this payment method. Please contact us for assistance.","woocommerce");(o||c.CURRENT_USER_IS_ADMIN)&&(e=t||(0,r.__)("There was an error with this payment method. Please verify it's configured correctly.","woocommerce"));const s=[{id:"0",content:e,isDismissible:!1,status:"error"}];return(0,a.jsx)(n.StoreNoticesContainer,{additionalNotices:s,context:i.tG.PAYMENTS})}return this.props.children}}const d=l},45446:(e,t,o)=>{"use strict";var r=o(29491),s=o(94715),c=o(52619),n=o(27723),i=o(1455),a=o.n(i),l=o(3582),d=o(56427),u=o(47143),m=o(36352),p=o(29283),h=o(86087),g=(o(13650),o(10790));function w({block:e}){const t="checkout"===e?m.p1:m.f9,o="checkout"===e?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",{saveEntityRecord:r}=(0,u.useDispatch)(l.store),{editPost:s,savePost:c}=(0,u.useDispatch)(p.Y),{slug:i,postPublished:w,currentPostId:_}=(0,u.useSelect)(o=>{const{getEntityRecord:r}=o(l.store),s=o(p.Y);return{slug:r("postType","page",t)?.slug||e,postPublished:s?.isCurrentPostPublished?.()??!1,currentPostId:s?.getCurrentPostId?.()??0}},[t,e]),[b,x]=(0,h.useState)("pristine"),f=(0,h.useCallback)(()=>{x("updating"),Promise.resolve().then(()=>a()({path:`/wc/v3/settings/advanced/${o}`,method:"GET"})).catch(e=>{"rest_setting_setting_invalid"===e.code&&x("error")}).then(()=>{if(!w)return s({status:"publish"}),c()}).then(()=>a()({path:`/wc/v3/settings/advanced/${o}`,method:"POST",data:{value:_.toString()}})).then(()=>{if(0!==t)return r("postType","page",{id:t,slug:`${i}-2`})}).then(()=>s({slug:i})).then(()=>c()).then(()=>x("updated"))},[w,s,c,o,_,t,r,i]);let y;return y="checkout"===e?(0,h.createInterpolateElement)((0,n.__)("If you would like to use this block as your default checkout, <a>update your page settings</a>.","woocommerce"),{a:(0,g.jsx)("a",{href:"#",onClick:f,children:(0,n.__)("update your page settings","woocommerce")})}):(0,h.createInterpolateElement)((0,n.__)("If you would like to use this block as your default cart, <a>update your page settings</a>.","woocommerce"),{a:(0,g.jsx)("a",{href:"#",onClick:f,children:(0,n.__)("update your page settings","woocommerce")})}),"string"==typeof pagenow&&"site-editor"===pagenow||_===t||"dismissed"===b?null:(0,g.jsx)(d.Notice,{className:"wc-default-page-notice",status:"updated"===b?"success":"info",onRemove:()=>x("dismissed"),spokenMessage:"updated"===b?(0,n.__)("Page settings updated","woocommerce"):y,children:"updated"===b?(0,n.__)("Page settings updated","woocommerce"):(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("p",{children:y})})})}var _=o(49498),b=o(93450),x=o(55414),f=o(47594),y=o(15703);const v="wc-blocks_dismissed_incompatible_extensions_notices",k=(e,t)=>e.every(e=>t.includes(e)),j=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),C=e=>j(e),S=()=>(()=>{if(y.IS_MULTISITE)return[];try{const e=window.localStorage.getItem(v);if(!e)return[];const t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return console.error(`Value for key '${v}' could not be carried over from localStorage because it can't be read as a list of dismissals.`),[]})().filter(C),A=e=>{const[t,o,r,s]=(()=>{const e=(0,y.getSetting)("incompatibleExtensions",void 0),t=Array.isArray(e),o={};t&&e.forEach(e=>{o[e.id]=e.title});const r=Object.keys(o),s=r.length;return[o,r,s,t]})(),[c,n,i]=(()=>{const{incompatiblePaymentMethods:e}=(0,u.useSelect)(e=>{const{getIncompatiblePaymentMethods:t}=e(f.paymentStore);return{incompatiblePaymentMethods:t()}},[]),t=Object.keys(e);return[e,t,t.length]})(),a=(0,u.useSelect)(e=>{const{paymentMethodsInitialized:t,expressPaymentMethodsInitialized:o}=e(f.paymentStore);return t()&&o()},[]),l={...t,...c},d=[...o,...n],m=r+i,p=`${v}__${y.CURRENT_SITE_ID}`,g=(0,h.useMemo)(()=>((e,t)=>{try{return null===window.localStorage.getItem(e)?t():[]}catch{return[]}})(p,S),[p]),[w,_]=((e,t)=>{const[o,r]=(0,h.useState)(()=>{const o=window.localStorage.getItem(e);if(o)try{return JSON.parse(o)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return(0,h.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(o))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,o]),[o,r]})(p,g),[b,x]=(0,h.useState)(!1),C=(Array.isArray(w)?w:[]).reduce((t,o)=>(t.push(...((e,t)=>{if(!j(e))return[];const o=e[t];return Array.isArray(o)?o.filter(e=>"string"==typeof e):[]})(o,e)),t),[]),A=k(d,C),N=0===m||A,P=t=>_(o=>[...(Array.isArray(o)?o:[]).filter(t=>!((e,t)=>j(e)&&t in e)(t,e)),{[e]:t}]),B=a&&s&&!k(C,d)?C.filter(e=>d.includes(e)):null;var I;return(0,h.useEffect)(()=>{null!==B&&P(B)}),(0,h.useEffect)(()=>{x(!N)},[N]),[b,()=>{P(d)},(I=l,Object.fromEntries(Object.entries(I).sort(([,e],[,t])=>e.localeCompare(t)))),m]};var N=o(74997),P=o(692),B=o(37757),I=o(34892);const T=({blockType:e="woocommerce/cart"})=>"woocommerce/cart"===e?(0,g.jsx)("p",{children:(0,n.__)("If you continue, the cart block will be replaced with the classic experience powered by shortcodes. This means that you may lose customizations that you made to the cart block.","woocommerce")}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("p",{children:(0,n.__)("If you continue, the checkout block will be replaced with the classic experience powered by shortcodes. This means that you may lose:","woocommerce")}),(0,g.jsxs)("ul",{className:"cross-list",children:[(0,g.jsx)("li",{children:(0,n.__)("Customizations and updates to the block","woocommerce")}),(0,g.jsx)("li",{children:(0,n.__)("Additional local pickup options created for the new checkout","woocommerce")})]})]});function E({block:e,clientId:t,type:o}){const{createInfoNotice:r}=(0,u.useDispatch)(P.store),{replaceBlock:c,selectBlock:i}=(0,u.useDispatch)(s.store),[a,m]=(0,h.useState)(!1),p=()=>m(!1),{undo:w}=(0,u.useDispatch)(l.store),[,,_,b]=A(e),x="woocommerce/cart"===e,f=x?(0,n.__)("Switch to classic cart","woocommerce"):(0,n.__)("Switch to classic checkout","woocommerce"),y=x?(0,n.__)("Switched to classic cart.","woocommerce"):(0,n.__)("Switched to classic checkout.","woocommerce"),v=x?"cart":"checkout",k={shortcode:v,notice:"incompatible"===o?"incompatible_notice":"generic_notice",incompatible_extensions_count:b,incompatible_extensions_names:JSON.stringify(_)},{getBlocks:j}=(0,u.useSelect)(e=>({getBlocks:e(s.store).getBlocks}),[]),C=()=>{w(),(0,B.yM)("switch_to_classic_shortcode_undo",k)};return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d.Button,{variant:"secondary",onClick:()=>{(0,B.yM)("switch_to_classic_shortcode_click",k),m(!0)},children:f}),a&&(0,g.jsxs)(d.Modal,{size:"medium",title:f,onRequestClose:p,className:"wc-blocks-switch-to-classic-shortcode-modal-content",children:[(0,g.jsx)(T,{blockType:e}),(0,g.jsxs)(d.TabbableContainer,{className:"wc-blocks-switch-to-classic-shortcode-modal-actions",children:[(0,g.jsx)(d.Button,{variant:"primary",isDestructive:!0,onClick:()=>{c(t,(0,N.createBlock)("woocommerce/classic-shortcode",{shortcode:v})),(0,B.yM)("switch_to_classic_shortcode_confirm",k),(()=>{const e=(0,I.P)({blocks:j(),findCondition:e=>"woocommerce/classic-shortcode"===e.name});e&&i(e.clientId)})(),r(y,{actions:[{label:(0,n.__)("Undo","woocommerce"),onClick:C}],type:"snackbar"}),p()},children:(0,n.__)("Switch","woocommerce")})," ",(0,g.jsx)(d.Button,{variant:"secondary",onClick:()=>{(0,B.yM)("switch_to_classic_shortcode_cancel",k),p()},children:(0,n.__)("Cancel","woocommerce")})]})]})]})}function R({block:e,clientId:t}){const[o,r,s,c]=A(e);if(!o)return null;const i=(0,g.jsx)(g.Fragment,{children:c>1?(0,h.createInterpolateElement)((0,n.__)("Some active extensions do not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),{a:(0,g.jsx)(d.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})}):(0,h.createInterpolateElement)((0,n.sprintf)( // translators: %s is the name of the extension. // translators: %s is the name of the extension. (0,n.__)("<strong>%s</strong> does not yet support this block. This may impact the shopper experience. <a>Learn more</a>","woocommerce"),Object.values(s)[0]),{strong:(0,g.jsx)("strong",{}),a:(0,g.jsx)(d.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/#incompatible-extensions/"})})}),a=Object.entries(s),l=a.length-2;return(0,g.jsx)(d.Notice,{className:"wc-blocks-incompatible-extensions-notice",status:"warning",onRemove:r,spokenMessage:i,children:(0,g.jsxs)("div",{className:"wc-blocks-incompatible-extensions-notice__content",children:[(0,g.jsx)(b.A,{className:"wc-blocks-incompatible-extensions-notice__warning-icon",icon:(0,g.jsx)(_.A,{})}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{children:i}),c>1&&(0,g.jsx)("ul",{children:a.slice(0,2).map(([e,t])=>(0,g.jsx)("li",{className:"wc-blocks-incompatible-extensions-notice__element",children:t},e))}),a.length>2&&(0,g.jsxs)("details",{children:[(0,g.jsxs)("summary",{children:[(0,g.jsx)("span",{children:(0,n.sprintf)( // translators: %s is the number of incompatible extensions. // translators: %s is the number of incompatible extensions. (0,n._n)("%s more incompatibility","%s more incompatibilities",l,"woocommerce"),l)}),(0,g.jsx)(b.A,{icon:x.A})]}),(0,g.jsx)("ul",{children:a.slice(2).map(([e,t])=>(0,g.jsx)("li",{className:"wc-blocks-incompatible-extensions-notice__element",children:t},e))})]}),(0,g.jsx)(E,{block:e,clientId:t,type:"incompatible"})]})]})})}o(54490),o(96342);var D=o(69863),L=o(43907);o(34268);const O=({text:e,title:t=(0,n.__)("Feedback?","woocommerce"),url:o})=>{const[r,s]=(0,h.useState)(!1);return(0,h.useEffect)(()=>{s(!0)},[]),(0,g.jsx)(g.Fragment,{children:r&&(0,g.jsxs)("div",{className:"wc-block-feedback-prompt",children:[(0,g.jsx)(b.A,{icon:D.A}),(0,g.jsx)("h2",{className:"wc-block-feedback-prompt__title",children:t}),(0,g.jsx)("p",{className:"wc-block-feedback-prompt__text",children:e}),(0,g.jsxs)("a",{href:o,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank",children:[(0,n.__)("Give us your feedback.","woocommerce"),(0,g.jsx)(b.A,{icon:L.A,size:16})]})]})})},M=()=>(0,g.jsx)(O,{text:(0,n.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woocommerce"),url:"https://github.com/woocommerce/woocommerce/discussions/new?category=checkout-flow&labels=type%3A+product%20feedback"}),V=({clientId:e})=>{const{isCart:t,isCheckout:o,parentId:r}=(0,u.useSelect)(t=>{const{getBlockParentsByBlockName:o,getBlockName:r}=t(s.store),c=o(e,["woocommerce/cart","woocommerce/checkout"]).reduce((e,t)=>(e[r(t)]=t,e),{}),n=r(e),i=Object.keys(c).includes("woocommerce/cart"),a=Object.keys(c).includes("woocommerce/checkout"),l="woocommerce/cart"===n||i,d=l?"woocommerce/cart":"woocommerce/checkout";return{isCart:l,isCheckout:"woocommerce/checkout"===n||a,parentId:n===d?e:c[d]}},[e]);return(t||o)&&(0,g.jsxs)(s.InspectorControls,{children:[(0,g.jsx)(R,{block:t?"woocommerce/cart":"woocommerce/checkout",clientId:r}),(0,g.jsx)(w,{block:o?"checkout":"cart"}),(0,g.jsx)(M,{})]})},F=(0,r.createHigherOrderComponent)(e=>t=>{const{clientId:o,name:r,isSelected:s}=t;return(0,g.jsxs)(g.Fragment,{children:[r.startsWith("woocommerce/")&&s&&(0,g.jsx)(V,{clientId:o}),(0,g.jsx)(e,{...t},"edit")]})},"withSidebarNotices");(0,c.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||(0,c.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",F,11)},65676:(e,t,o)=>{"use strict";o.d(t,{B:()=>i});var r=o(86087),s=o(47143),c=o(50929),n=o(74997);const i=({clientId:e,registeredBlocks:t,defaultTemplate:o=[]})=>{const i=(0,r.useRef)(t),a=(0,r.useRef)(o),l=(0,s.useRegistry)(),{isPreview:d}=(0,c.m)();(0,r.useEffect)(()=>{let t=!1;if(d)return;const{replaceInnerBlocks:o}=(0,s.dispatch)("core/block-editor");return l.subscribe(()=>{if(!l.select("core/block-editor").getBlock(e))return;const r=l.select("core/block-editor").getBlocks(e);if(0===r.length&&a.current.length>0&&!t){const r=(0,n.createBlocksFromInnerBlocksTemplate)(a.current);if(0!==r.length)return t=!0,void o(e,r)}const s=i.current.map(e=>(0,n.getBlockType)(e)),c=((e,t)=>{const o=t.filter(e=>e&&(({attributes:e})=>Boolean(e.lock?.remove||e.lock?.default?.remove))(e)),r=[];return o.forEach(t=>{void 0!==t&&(e.find(e=>e.name===t.name)||r.push(t))}),r})(r,s);if(0===c.length)return;let d=-1;const u=c.map(e=>{const t=a.current.findIndex(([t])=>t===e.name),o=(0,n.createBlock)(e.name);return-1===d&&(d=(({defaultTemplatePosition:e,innerBlocks:t,currentDefaultTemplate:o})=>{switch(e){case-1:return t.length;case 0:return 0;default:const r=o.current[e-1],s=t.findIndex(({name:e})=>e===r[0]);return-1===s?e:s+1}})({defaultTemplatePosition:t,innerBlocks:r,currentDefaultTemplate:a})),o});l.batch(()=>{l.dispatch("core/block-editor").insertBlocks(u,d,e)})},"core/block-editor")},[e,d,l])}},93870:(e,t,o)=>{"use strict";o.d(t,{K:()=>u});var r=o(27723),s=o(94715),c=o(56427),n=o(10790),i=o(5573),a=(0,n.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(i.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})}),l=o(62976);const d=({backgroundImageId:e,backgroundImageSrc:t,contentAlign:o,cropLabel:i,editLabel:l,editMode:d,isEditingImage:u,mediaSrc:m,setAttributes:p,setIsEditingImage:h,setEditMode:g})=>(0,n.jsxs)(s.BlockControls,{children:[(0,n.jsx)(s.AlignmentToolbar,{value:o,onChange:e=>{p({contentAlign:e})}}),(0,n.jsxs)(c.ToolbarGroup,{children:[t&&!u&&(0,n.jsx)(c.ToolbarButton,{onClick:()=>h(!0),icon:a,label:i}),(0,n.jsx)(s.MediaReplaceFlow,{mediaId:e,mediaURL:m,accept:"image/*",onSelect:e=>{p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),e&&m?(0,n.jsx)(c.ToolbarButton,{onClick:()=>p({mediaId:0,mediaSrc:""}),children:(0,r.__)("Reset","woocommerce")}):null]}),(0,n.jsx)(c.ToolbarGroup,{controls:[{icon:"edit",title:l,onClick:()=>g(!d),isActive:d}]})]}),u=({cropLabel:e,editLabel:t})=>o=>r=>{const[s,c]=r.useEditingImage,[i,a]=r.useEditMode,{attributes:u,category:m,name:p,product:h,setAttributes:g}=r,{contentAlign:w,mediaId:_,mediaSrc:b}=u,x=m||h,{backgroundImageId:f,backgroundImageSrc:y}=(0,l.h)({item:x,mediaId:_,mediaSrc:b,blockName:p});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d,{backgroundImageId:f,backgroundImageSrc:y,contentAlign:w,cropLabel:e,editLabel:t,editMode:i,isEditingImage:s,mediaSrc:b,setAttributes:g,setIsEditingImage:c,setEditMode:a}),(0,n.jsx)(o,{...r})]})}},64035:(e,t,o)=>{"use strict";o.d(t,{CW:()=>a,Tl:()=>n,X1:()=>i,_N:()=>c});var r=o(27723),s=o(90194);const c={height:500,width:500},n={featuredCategory:"woocommerce/featured-category",featuredProduct:"woocommerce/featured-product"},i=e=>[["woocommerce/category-title",{level:2,textAlign:"center"}],["woocommerce/category-description",{textAlign:"center"}],["core/buttons",{layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:(0,r.__)("Shop now","woocommerce"),url:e.permalink}]]]],a=e=>[["core/post-title",{isLink:!0,level:2,textAlign:"center",__woocommerceNamespace:s.QL}],["woocommerce/product-summary",{showDescriptionIfEmpty:!0,style:{typography:{textAlign:"center"}},summaryLength:80}],["woocommerce/product-price",{style:{spacing:{padding:{bottom:"16px"}}},textAlign:"center"}],["core/buttons",{layout:{type:"flex",justifyContent:"center"}},[["core/button",{text:(0,r.__)("Shop now","woocommerce"),url:e.permalink}]]]]},17883:(e,t,o)=>{"use strict";o.d(t,{J:()=>l});var r=o(86087),s=o(94715),c=o(64035),n=o(62976),i=o(10790);const a=({align:e,backgroundImageId:t,backgroundImageSize:o,backgroundImageSrc:n,containerRef:a,originalImgDimension:l,setAttributes:d,setIsEditingImage:u})=>{const m=function(e,t){const[o,s]=(0,r.useState)(),c=(0,r.useCallback)(()=>{s(e.current?.clientWidth)},[e]);return(0,r.useEffect)(c,[c,...t]),(0,r.useEffect)(()=>{if(!e.current)return;const{defaultView:t}=e.current.ownerDocument;return t?(t.addEventListener("resize",c),()=>{t.removeEventListener("resize",c)}):void 0},[e,c]),o}(a,[e]),p=o.height||l.height||c._N.height,h=o.width||l.width||c._N.width;return(0,i.jsx)(s.__experimentalImageEditor,{id:t,url:n,height:p,width:h,naturalHeight:p,naturalWidth:h,onSaveImage:({id:e,url:t})=>{d({mediaId:e,mediaSrc:t})},onFinishEditing:()=>u(!1),clientWidth:m})},l=e=>t=>{const[o,s]=t.useEditingImage,l=(0,r.useRef)(null),{attributes:d,backgroundImageSize:u,name:m,setAttributes:p}=t,{mediaId:h,mediaSrc:g}=d,w=m===c.Tl.featuredProduct?t.product:t.category,{backgroundImageId:_,backgroundImageSrc:b,originalImgDimension:x}=(0,n.h)({item:w,mediaId:h,mediaSrc:g,blockName:m});return o?(0,i.jsx)("div",{ref:l,children:(0,i.jsx)(a,{align:d.align,backgroundImageId:_,backgroundImageSize:u,backgroundImageSrc:b,containerRef:l,originalImgDimension:x,setAttributes:p,setIsEditingImage:s})}):(0,i.jsx)(e,{...t})}},20238:(e,t,o)=>{"use strict";o.d(t,{y:()=>d});var r=o(27723),s=o(94715),c=o(56427),n=o(62976),i=o(64035),a=o(10790);const l=({alt:e,backgroundColor:t,backgroundColorVisibilityStatus:o,backgroundImageSrc:n,clientId:i,dimRatio:l,focalPoint:d,hasParallax:u,imageFit:m,isRepeated:p,overlayColor:h,overlayGradient:g,setAttributes:w,setGradient:_})=>{const b="function"==typeof c.FocalPointPicker,x=!p&&!u,f=(0,s.__experimentalUseMultipleOriginColorsAndGradients)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.InspectorControls,{children:!!n&&(0,a.jsx)(a.Fragment,{children:b&&(0,a.jsxs)(c.PanelBody,{title:(0,r.__)("Media settings","woocommerce"),children:[(0,a.jsx)(c.ToggleControl,{label:(0,r.__)("Fixed background","woocommerce"),checked:u,onChange:()=>{w({hasParallax:!u})}}),(0,a.jsx)(c.ToggleControl,{label:(0,r.__)("Repeated background","woocommerce"),checked:p,onChange:()=>{w({isRepeated:!p})}}),!p&&(0,a.jsxs)(c.__experimentalToggleGroupControl,{help:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{style:{display:"block",marginBottom:"1em"},children:(0,r.__)("Select “Cover” to have the image automatically fit its container.","woocommerce")}),(0,a.jsx)("span",{children:(0,r.__)("This may affect your ability to freely move the focal point of the image.","woocommerce")})]}),label:(0,r.__)("Image fit","woocommerce"),isBlock:!0,value:m,onChange:e=>w({imageFit:e}),children:[(0,a.jsx)(c.__experimentalToggleGroupControlOption,{label:(0,r.__)("None","woocommerce"),value:"none"}),(0,a.jsx)(c.__experimentalToggleGroupControlOption /* translators: "Cover" is a verb that indicates an image covering the entire container. */,{label:(0,r.__)("Cover","woocommerce"),value:"cover"})]}),(0,a.jsx)(c.FocalPointPicker,{label:(0,r.__)("Focal Point Picker","woocommerce"),url:n,value:d,onChange:e=>w({focalPoint:e})}),x&&(0,a.jsx)(c.TextareaControl,{label:(0,r.__)("Alt text (alternative text)","woocommerce"),value:e,onChange:e=>{w({alt:e})},help:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(c.ExternalLink,{href:"https://www.w3.org/WAI/tutorials/images/decision-tree",children:(0,r.__)("Describe the purpose of the image","woocommerce")})})})]})})},"inspector"),f.hasColorsOrGradients&&(0,a.jsxs)(s.InspectorControls,{group:"color",children:[!!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{clearable:!0,colorValue:h,gradientValue:g,label:(0,r.__)("Overlay","woocommerce"),onColorChange:e=>w({overlayColor:e}),onGradientChange:e=>{_(e),w({overlayGradient:e})},isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,overlayGradient:void 0})}],panelId:i,...f}),(0,a.jsx)(c.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>50!==l,label:(0,r.__)("Overlay opacity","woocommerce"),onDeselect:()=>w({dimRatio:50}),panelId:i,resetAllFilter:()=>({dimRatio:50}),children:(0,a.jsx)(c.RangeControl,{required:!0,label:(0,r.__)("Overlay opacity","woocommerce"),max:100,min:0,onChange:e=>w({dimRatio:e}),step:10,value:l})})]}),!1===o?.isBackgroundVisible&&o?.message&&t&&(0,a.jsx)("div",{className:"image-bg-color-warning",children:(0,a.jsx)(c.Notice,{status:"warning",isDismissible:!1,children:o.message})})]})]})},d=e=>t=>{const{attributes:o,backgroundColorVisibilityStatus:r,clientId:c,name:d,setAttributes:u}=t,{alt:m,dimRatio:p,focalPoint:h,hasParallax:g,isRepeated:w,imageFit:_,mediaId:b,mediaSrc:x,overlayColor:f,overlayGradient:y,backgroundColor:v,style:k}=o,j=d===i.Tl.featuredProduct?t.product:t.category,{setGradient:C}=(0,s.__experimentalUseGradient)({gradientAttribute:"overlayGradient",customGradientAttribute:"overlayGradient"}),{backgroundImageSrc:S}=(0,n.h)({item:j,mediaId:b,mediaSrc:x,blockName:d});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l,{alt:m,backgroundImageSrc:S,dimRatio:p,focalPoint:h,hasParallax:g,isRepeated:w,imageFit:_,overlayColor:f,overlayGradient:y,setAttributes:u,setGradient:C,backgroundColorVisibilityStatus:r,backgroundColor:v||k?.color?.background,clientId:c}),(0,a.jsx)(e,{...t})]})}},96657:(e,t,o)=>{"use strict";o.d(t,{k:()=>a});var r=o(94715),s=o(74997),c=o(15703),n=o(10790);function i(e){return function(t){const o=(0,r.useBlockProps)(),{color:s,...c}=o.style;return(0,n.jsx)("div",{...o,style:c,children:(0,n.jsx)(e,{...t})})}}function a(e,t,o,a){const l={attributes:{...o.attributes,minHeight:{type:"number",default:(0,c.getSetting)("defaultHeight",500)}},supports:{...o.supports,color:{background:o.supports?.color?.background,text:o.supports?.color?.text},spacing:{padding:o.supports?.spacing?.padding,__experimentalDefaultControls:{padding:o.supports?.spacing?.__experimentalDefaultControls},__experimentalSkipSerialization:o.supports?.spacing?.__experimentalSkipSerialization},__experimentalBorder:o?.supports?.__experimentalBorder}},d={attributes:{alt:"",contentAlign:"center",dimRatio:50,hasParallax:!1,isRepeated:!1,height:(0,c.getSetting)("defaultHeight",500),mediaSrc:"",overlayColor:"#000000",showDesc:!0}};(0,s.registerBlockType)(o,{...l,example:{...d,...t},edit:i(e),save:()=>(0,n.jsx)(r.InnerBlocks.Content,{}),...a})}},62976:(e,t,o)=>{"use strict";o.d(t,{h:()=>a});var r=o(50715),s=o(86087),c=o(64035),n=o(73993);function i(e){return!!e&&(0,n.isNumber)(e.id)&&"string"==typeof e.src}function a({blockName:e,item:t,mediaId:o,mediaSrc:n}){const[a,l]=(0,s.useState)(0),[d,u]=(0,s.useState)(""),[m,p]=(0,s.useState)(!1),[h,g]=(0,s.useState)({height:0,width:0}),w=(0,s.useRef)(null),_=(0,s.useRef)(null);return(0,s.useEffect)(()=>{var s;l(o||(e===c.Tl.featuredProduct?(0,r.OW)(t):(s=t)&&i(s.image)?s.image.id:0))},[e,t,o]),(0,s.useEffect)(()=>{var o;u(n||(e===c.Tl.featuredProduct?(0,r.JI)(t):(o=t)&&i(o.image)?o.image.src:""))},[e,t,n]),(0,s.useEffect)(()=>{if(d){w.current||(w.current=new Image),_.current||(_.current=document.createElement("canvas"));const e=w.current,t=_.current;e.src=d,e.onload=()=>{const o=e.naturalWidth,r=e.naturalHeight;null!==r&&null!==o&&g({height:r,width:o}),t.width=o,t.height=r;const s=t.getContext("2d",{willReadFrequently:!0});if(!s)return;s.drawImage(e,0,0,o,r);const c=s.getImageData(0,0,o,r).data,n=(()=>{for(let e=3;e<c.length;e+=4)if(c[e]<255)return!0;return!1})();p(n)}}else p(!0);return()=>{w.current&&(w.current.onload=null)}},[d]),{backgroundImageId:a,backgroundImageSrc:d,isImageBgTransparent:m,originalImgDimension:h}}},92351:(e,t,o)=>{"use strict";o.d(t,{Ee:()=>n,Ot:()=>i,_G:()=>d,dO:()=>l,tb:()=>a});var r=o(27723),s=o(64035);function c(e){return e?`${Math.round(100*e.x)}% ${Math.round(100*e.y)}%`:""}function n({focalPoint:e,imageFit:t,isImgElement:o,isRepeated:r,url:s}){let n={};var i;return n=o?{...n,...(i=e,i?{objectPosition:c(i)}:{}),objectFit:t}:{...n,...s&&{backgroundImage:`url(${s})`},backgroundPosition:c(e),...!r&&{backgroundRepeat:"no-repeat",backgroundSize:"cover"===t?t:"auto"}},n}function i(e){return`wc-block-${e.split("/")[1]}`}function a(e){return 0===e||50===e?null:"has-background-dim-"+10*Math.round(e/10)}function l(e){return e===s.Tl.featuredProduct?(0,r.__)("Previously selected product is no longer available","woocommerce"):(0,r.__)("Previously selected category is no longer available","woocommerce")}const d=({isImageBgTransparent:e,originalImgDimension:t,parentContainerDimension:o,isRepeated:s,imageFit:c})=>e?{isBackgroundVisible:!0,message:null}:e||!s&&"cover"!==c?!e&&t.height>=o.height&&t.width>=o.width?{isBackgroundVisible:!1,message:(0,r.__)("You've set background color to an opaque image, the background color cannot be seen.","woocommerce")}:(t.height<o.height||(t.width,o.width),{isBackgroundVisible:!0,message:null}):s?{isBackgroundVisible:!1,message:(0,r.__)("You’ve set a background color behind an image set to repeat, the background color cannot be seen.","woocommerce")}:{isBackgroundVisible:!1,message:(0,r.__)("You’ve set a background color behind an image set to cover, the background color cannot be seen.","woocommerce")}},58574:(e,t,o)=>{"use strict";o.d(t,{X:()=>i});var r=o(95493),s=o(64035),c=o(92351),n=o(10790);const i=e=>t=>{const{error:o,isLoading:i,name:a}=t,l=(0,c.Ot)(a),d=a===s.Tl.featuredCategory?t.getCategory:t.getProduct;return o?(0,n.jsx)(r.A,{className:`${l}-error`,error:o,isLoading:i,onRetry:d}):(0,n.jsx)(e,{...t})}},70843:(e,t,o)=>{"use strict";o.d(t,{E:()=>w});var r=o(27723),s=o(2284),c=o(86087),n=o(19432),i=o(50376),a=o(1041),l=o(56427),d=o(64035),u=o(92351),m=o(47143),p=o(3582),h=o(97529),g=o(10790);const w=({description:e,editLabel:t,icon:o,label:w})=>_=>b=>{const{attributes:x,debouncedSpeak:f,name:y,setAttributes:v,triggerUrlUpdate:k=()=>{},error:j}=b,C=(0,u.Ot)(y),[S,A]=(0,c.useState)(),N=y===d.Tl.featuredProduct&&x.productId||y===d.Tl.featuredCategory&&x.categoryId,[P,B]=(0,c.useState)(!N),I=y===d.Tl.featuredProduct?x?.productId:x?.categoryId,{status:T,isDeleted:E,isLoading:R}=(({itemId:e,itemType:t})=>{const{product:o,isResolutionFinished:r}=(0,h.useProduct)(e);return(0,m.useSelect)(s=>{if(!e)return{status:null,isDeleted:!1,isLoading:!1};if(t===d.Tl.featuredProduct){const e=!r,t="trash"===o?.status||!e&&!o;return{status:o?.status??null,isDeleted:t,isLoading:e}}if(t===d.Tl.featuredCategory){const{getEntityRecords:t,hasFinishedResolution:o}=s(p.store),r=["taxonomy","product_cat",{include:[e]}],c=t(...r),n=o("getEntityRecords",r),i=!c?.length;return{status:i?"deleted":null,isDeleted:i,isLoading:!n}}return{status:null,isDeleted:!0,isLoading:!1}},[e,t,o,r])})({itemId:I,itemType:y}),D=(0,s.H)();return(0,c.useEffect)(()=>{if(!D&&!R){const e=y===d.Tl.featuredProduct&&"publish"!==T||E;e&&B(e)}},[T,E,y,R,D]),P?(0,g.jsxs)(l.Placeholder,{icon:(0,g.jsx)(l.Icon,{icon:o}),label:w,className:C,children:[(0,g.jsxs)(l.__experimentalHStack,{alignment:"center",children:[E?(0,g.jsx)(l.Icon,{icon:n.A,className:"wc-blocks-featured-items__orange-info-icon"}):(0,g.jsx)(l.Icon,{icon:n.A}),(0,g.jsx)(l.__experimentalText,{children:E?(0,u.dO)(y):e})]}),(0,g.jsxs)("div",{className:`${C}__selection`,children:[y===d.Tl.featuredCategory&&(0,g.jsx)(i.A,{selected:S?.categoryId?[S.categoryId]:[],onChange:(e=[])=>{const t=e[0]?e[0].id:0;A({categoryId:t,mediaId:0,mediaSrc:""}),k()},isSingle:!0}),y===d.Tl.featuredProduct&&(0,g.jsx)(a.A,{selected:S?.productId?[S.productId]:[],showVariations:!0,onChange:(e=[])=>{const t=e[0]?e[0].id:0;A({productId:t,mediaId:0,mediaSrc:""}),k()}}),(0,g.jsx)(l.Button,{variant:"primary",onClick:()=>{S&&(v(S),B(!1),f(t))},children:(0,r.__)("Done","woocommerce")})]})]}):(0,g.jsx)(_,{...b,isLoading:R,error:R?null:j,useEditMode:[P,B]})}},33671:(e,t,o)=>{"use strict";o.d(t,{o:()=>c});var r=o(86087),s=o(10790);const c=e=>t=>{const[o,c]=(0,r.useState)(!1),{isSelected:n}=t;return(0,r.useEffect)(()=>{c(!1)},[n]),(0,s.jsx)(e,{...t,useEditingImage:[o,c]})}},90680:(e,t,o)=>{"use strict";o.d(t,{_:()=>g});var r=o(56427),s=o(62796),c=o(4921),n=o(86087),i=o(24947),a=o(94715),l=o(64347),d=o(10790);const u=({className:e="",onResize:t,...o})=>{const[s,i]=(0,n.useState)(!1),a=(0,c.A)(e,{"is-resizing":s}),u=(0,l.dh)((e,o,r,c)=>{s||i(!0),t?.(e,o,r,c)},50,{leading:!0});return(0,d.jsx)(r.ResizableBox,{className:a,enable:{bottom:!0},onResize:u,onResizeStop:(...e)=>{t?.(...e),i(!1)},...o})};var m=o(62976),p=o(92351),h=o(64035);const g=({emptyMessage:e,icon:t,label:o,noSelectionButtonLabel:l})=>g=>w=>{const[_]=w.useEditingImage,[,b]=w.useEditMode,{attributes:x,category:f,isLoading:y,isSelected:v,name:k,product:j,setAttributes:C}=w,{mediaId:S,mediaSrc:A,isRepeated:N,imageFit:P}=x,B=f||j,[I,T]=(0,n.useState)({}),{backgroundImageSrc:E,isImageBgTransparent:R,originalImgDimension:D}=(0,m.h)({item:B,mediaId:S,mediaSrc:A,blockName:k}),L=(0,n.useRef)(null),[O,M]=(0,n.useState)({height:0,width:0});(0,n.useEffect)(()=>{const e=new ResizeObserver(e=>{M({height:e[0].contentRect.height,width:e[0].contentRect.width})});if(!1===y){const t=L.current;if(!t)return;e.observe(t)}return()=>e.disconnect()},[y]);const V=(0,n.useMemo)(()=>(0,p._G)({isImageBgTransparent:R,originalImgDimension:D,parentContainerDimension:O,isRepeated:N,imageFit:P}),[O,D,N,P,R]),F=(0,p.Ot)(k),H=(0,n.useCallback)((e,t,o)=>{C({minHeight:parseInt(o.style.height,10)})},[C]),z=()=>{if(j){const e=(0,h.CW)(j);return(0,d.jsx)(a.BlockContextProvider,{value:{postId:j.id,postType:"product"},children:(0,d.jsx)(s.ProductDataContextProvider,{product:j,isLoading:y,children:(0,d.jsx)("div",{className:`${F}__inner-blocks`,children:(0,d.jsx)(a.InnerBlocks,{template:e,templateLock:!1})})})})}return(0,d.jsx)(a.BlockContextProvider,{value:{termId:f.term_id,termTaxonomy:"product_cat"},children:(0,d.jsx)("div",{className:`${F}__inner-blocks`,children:(0,d.jsx)(a.InnerBlocks,{template:(0,h.X1)(f),templateLock:!1})})})},$=(0,i.p)(x);return _?(0,d.jsx)(g,{...w,backgroundImageSize:I,backgroundColorVisibilityStatus:V}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(g,{...w,backgroundImageSize:I,backgroundColorVisibilityStatus:V}),B?(()=>{const{contentAlign:e,dimRatio:t,focalPoint:o,hasParallax:r,minHeight:s,overlayColor:n,overlayGradient:i,style:a,textColor:l}=x,m=(0,c.A)(F,{"is-selected":v&&"preview"!==x.categoryId&&"preview"!==x.productId,"is-loading":!B&&y,"is-not-found":!B&&!y,"has-background-dim":0!==t,"is-repeated":N},(0,p.tb)(t),"center"!==e&&`has-${e}-content`,$.className),h={borderRadius:a?.border?.radius,color:l?`var(--wp--preset--color--${l})`:a?.color?.text,boxSizing:"border-box",minHeight:s,...$.style},g=!N&&!r,w=(0,p.Ee)({focalPoint:o,imageFit:P,isImgElement:g,isRepeated:N,url:E}),_={background:i,backgroundColor:n};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{enable:{bottom:!0},onResize:H,showHandle:v,style:{minHeight:s}}),(0,d.jsx)("div",{className:m,ref:L,style:h,children:(0,d.jsxs)("div",{className:`${F}__wrapper`,children:[(0,d.jsx)("div",{className:"background-dim__overlay",style:_}),E&&(g?(0,d.jsx)("img",{alt:B.name,className:`${F}__background-image`,src:E,style:w,onLoad:e=>{T({height:e.currentTarget?.naturalHeight,width:e.currentTarget?.naturalWidth})}}):(0,d.jsx)("div",{className:(0,c.A)(`${F}__background-image`,{"has-parallax":r}),style:w})),z()]})})]})})():(0,d.jsx)(r.Placeholder,{className:F,icon:(0,d.jsx)(r.Icon,{icon:t}),label:o,children:y?(0,d.jsx)(r.Spinner,{}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:e}),(0,d.jsx)("div",{style:{flexBasis:"100%",height:"0"}}),(0,d.jsx)("button",{type:"button",className:"components-button is-secondary",onClick:()=>b(!0),children:l})]})})]})}},26621:(e,t,o)=>{"use strict";o.d(t,{t:()=>n});var r=o(86087),s=o(47143),c=o(10790);const n=e=>t=>{const[o,n]=(0,r.useState)(!1),{category:i,clientId:a,editMode:l,product:d}=t,u=i||d,m=u?.link||u?.permalink,p=(0,s.useSelect)(e=>e("core/block-editor").getBlock(a),[a]),h=e=>{if(!e)return;if("core/button"===e.name)return e;const t=e.innerBlocks||[];for(const e of t){const t=h(e);if(t)return t}},g=p?.innerBlocks?.[0],w=h(g),_=w?.clientId||"",b=(0,r.useMemo)(()=>w?.attributes||{},[w]),{url:x}=b,{updateBlockAttributes:f}=(0,s.useDispatch)("core/block-editor");return(0,r.useEffect)(()=>{o&&_&&!l&&m&&x&&m!==x&&(f(_,{url:m}),n(!1))},[_,o,l,m,f,x]),(0,c.jsx)(e,{...t,triggerUrlUpdate:()=>n(!0)})}},25238:(e,t,o)=>{"use strict";o.d(t,{LY:()=>c});var r=o(86087);const s=(0,r.createContext)({}),c=()=>{const{wrapper:e}=(0,r.useContext)(s);return t=>{e&&e.current&&(e.current.hidden=!t)}}},68059:(e,t,o)=>{"use strict";o.d(t,{d:()=>l});var r=o(27723),s=o(86087),c=o(4731),n=o(47143),i=o(74997),a=o(10790);const l=({clientId:e})=>{const{replaceBlock:t,removeBlock:o,updateBlockAttributes:l,selectBlock:d}=(0,n.useDispatch)("core/block-editor"),u=(0,s.createInterpolateElement)((0,r.__)("Upgrade all Filter blocks on this page for better performance and more customizability","woocommerce"),{strongText:(0,a.jsx)("strong",{children:(0,r.__)("Product Filters","woocommerce")})}),m=(0,r.__)("Upgrade all Filter blocks","woocommerce");return(0,a.jsx)(c.u,{isDismissible:!1,actionLabel:m,onActionClick:()=>{const{getBlocksByName:r,getBlockParentsByBlockName:s}=(0,n.select)("core/block-editor"),c=s(e,"woocommerce/filter-wrapper"),a=(0,i.createBlock)("woocommerce/product-filters");c.length?t(c[0],a):t(e,a),r("woocommerce/filter-wrapper").forEach(e=>{l(e,{lock:{remove:!1}}),o(e)}),["woocommerce/active-filters","woocommerce/price-filter","woocommerce/attribute-filter","woocommerce/stock-filter"].forEach(e=>{const t=r(e);t.length&&(l(t[0],{lock:{remove:!1}}),o(t[0]))}),d(a.clientId)},children:u})}},8881:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(91925),s=o(22510),c=o(45984),n=o(93450),i=o(10790);const a=({count:e=0,icon:t,iconColor:o,productCountColor:a,productCountVisibility:l})=>{const d="always"===l||"greater_than_zero"===l&&e>0,u=d?e:"";return(0,i.jsxs)("span",{className:"wc-block-mini-cart__quantity-badge",children:[(0,i.jsx)(n.A,{className:"wc-block-mini-cart__icon",color:o?.color,size:20,icon:function(e){switch(e){case"cart":default:return r.A;case"bag":return s.A;case"bag-alt":return c.A}}(t)}),d&&(0,i.jsx)("span",{className:"wc-block-mini-cart__badge",style:{background:a?.color},children:u})]})}},66683:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(93450),c=o(10790),n=o(5573),i=(0,c.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(n.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})}),a=o(59826),l=o(39842);const d={name:l.M.CROSS_SELLS,title:(0,r.__)("Cross-Sells","woocommerce"),icon:(0,c.jsx)(s.A,{icon:i}),description:(0,r.__)("By suggesting complementary products in the cart using cross-sells, you can significantly increase the average order value.","woocommerce"),keywords:["boost","promotion"],scope:["inserter","block"],usesReference:["product","cart","order"],attributes:{...a.g2,displayLayout:{type:"flex",columns:4,shrinkColumns:!0},query:{...a.Xl,perPage:8,pages:1},hideControls:[l.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"left",level:2,content:(0,r.__)("You may be interested in…","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],a.nx]}},59826:(e,t,o)=>{"use strict";o.d(t,{$0:()=>x,$r:()=>h,AJ:()=>g,An:()=>_,B8:()=>y,PL:()=>a,Xl:()=>u,cw:()=>f,eu:()=>d,g2:()=>m,mg:()=>w,nx:()=>b,q9:()=>p});var r=o(15703),s=o(33079),c=o(48323),n=o(39842);const i=`${c.name}/product-title`,a=(0,r.getSetting)("stockStatusOptions",[]),l=(0,r.getSetting)("hideOutOfStockItems",!1),d=()=>l?Object.keys((0,s.X)(a,"outofstock")):Object.keys(a),u={perPage:9,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",search:"",exclude:[],inherit:!1,taxQuery:{},isProductCollectionBlock:!0,featured:!1,woocommerceOnSale:!1,woocommerceStockStatus:d(),woocommerceAttributes:[],woocommerceHandPickedProducts:[],timeFrame:void 0,priceRange:void 0,filterable:!1,relatedBy:{categories:!0,tags:!0}},m={query:u,tagName:"div",displayLayout:{type:n.BX.GRID,columns:3,shrinkColumns:!0},dimensions:{widthType:n.Hi.FILL},queryContextIncludes:["collection"],forcePageReload:!1},p={woocommerceOnSale:u.woocommerceOnSale,woocommerceStockStatus:u.woocommerceStockStatus,woocommerceAttributes:u.woocommerceAttributes,woocommerceHandPickedProducts:u.woocommerceHandPickedProducts,taxQuery:u.taxQuery,featured:u.featured,timeFrame:u.timeFrame,priceRange:u.priceRange},h="core/heading",g="core/query-pagination",w="woocommerce/product-gallery-large-image-next-previous",_="woocommerce/product-template",b=[_,{},[["woocommerce/product-image",{showSaleBadge:!1,style:{dimensions:{aspectRatio:"1/1"}}},[["woocommerce/product-sale-badge",{align:"right"}]]],["core/post-title",{textAlign:"center",level:2,fontSize:"medium",style:{spacing:{margin:{bottom:"0.75rem",top:"0"}},typography:{lineHeight:"1.4"}},isLink:!0,__woocommerceNamespace:i}],["woocommerce/product-price",{textAlign:"center",fontSize:"small"}],["woocommerce/product-button",{textAlign:"center",fontSize:"small"}]]],x={layout:{type:"flex",justifyContent:"center"}},f=[g,x],y=[b,f,["woocommerce/product-collection-no-results"]]},39842:(e,t,o)=>{"use strict";o.d(t,{BX:()=>s,Hi:()=>c,M:()=>i,M0:()=>n,Op:()=>r,ug:()=>a});let r=function(e){return e.COLLECTION_PICKER="collection_chooser",e.PRODUCT_REFERENCE_PICKER="product_context_picker",e.HAND_PICKED_PRODUCTS_PICKER="hand_picked_products_picker",e.TAXONOMY_PICKER="taxonomy_picker",e.VALID_WITH_PREVIEW="uses_reference_preview_mode",e.VALID="valid",e.DELETED_PRODUCT_REFERENCE="deleted_product_reference",e}({}),s=function(e){return e.GRID="flex",e.STACK="list",e.CAROUSEL="carousel",e}({}),c=function(e){return e.FILL="fill",e.FIXED="fixed",e}({}),n=function(e){return e.IN="in",e.NOT_IN="not-in",e}({}),i=function(e){return e.PRODUCT_CATALOG="woocommerce/product-collection/product-catalog",e.BEST_SELLERS="woocommerce/product-collection/best-sellers",e.FEATURED="woocommerce/product-collection/featured",e.NEW_ARRIVALS="woocommerce/product-collection/new-arrivals",e.ON_SALE="woocommerce/product-collection/on-sale",e.TOP_RATED="woocommerce/product-collection/top-rated",e.HAND_PICKED="woocommerce/product-collection/hand-picked",e.RELATED="woocommerce/product-collection/related",e.UPSELLS="woocommerce/product-collection/upsells",e.CROSS_SELLS="woocommerce/product-collection/cross-sells",e.BY_CATEGORY="woocommerce/product-collection/by-category",e.BY_TAG="woocommerce/product-collection/by-tag",e.BY_BRAND="woocommerce/product-collection/by-brand",e.CART_CONTENTS="woocommerce/product-collection/cart-contents",e}({}),a=function(e){return e.ATTRIBUTES="attributes",e.CREATED="created",e.FEATURED="featured",e.HAND_PICKED="hand-picked",e.INHERIT="inherit",e.KEYWORD="keyword",e.ON_SALE="on-sale",e.ORDER="order",e.DEFAULT_ORDER="default-order",e.STOCK_STATUS="stock-status",e.TAXONOMY="taxonomy",e.PRICE_RANGE="price-range",e.FILTERABLE="filterable",e.PRODUCTS_PER_PAGE="products-per-page",e.MAX_PAGES_TO_SHOW="max-pages-to-show",e.OFFSET="offset",e.RELATED_BY="related-by",e}({})},27496:(e,t,o)=>{"use strict";o.d(t,{Ay:()=>d,QL:()=>l});var r=o(56427),s=o(83243),c=o(47017),n=o(53522),i=o(48323),a=o(10790);const l=`${i.name}/product-summary`,d=()=>{(0,c.R)("core/post-excerpt",{blockDescription:n.j0,blockIcon:(0,a.jsx)(r.Icon,{icon:s.A}),blockTitle:n.J$,variationName:l,scope:[]})}},90194:(e,t,o)=>{"use strict";o.d(t,{Ay:()=>d,QL:()=>l});var r=o(56427),s=o(69544),c=o(83925),n=o(47017),i=o(48323),a=o(10790);const l=`${i.name}/product-title`,d=()=>{(0,n.R)("core/post-title",{blockDescription:c.description,blockIcon:(0,a.jsx)(r.Icon,{icon:s.A}),blockTitle:c.title,variationName:l,scope:["block","inserter"]})}},47017:(e,t,o)=>{"use strict";o.d(t,{R:()=>s});var r=o(74997);function s(e,{blockDescription:t,blockIcon:o,blockTitle:s,variationName:c,scope:n}){(0,r.registerBlockVariation)(e,{description:t,name:c,title:s,isActive:e=>e.__woocommerceNamespace===c,icon:{src:o},attributes:{__woocommerceNamespace:c},scope:n})}},42393:(e,t,o)=>{"use strict";o.d(t,{$:()=>s}),o(11652);var r=o(10790);const s=({children:e})=>(0,r.jsxs)("div",{className:"wc-block-product-filter-components-initial-disabled",children:[(0,r.jsx)("div",{className:"wc-block-product-filter-components-initial-disabled-overlay"}),e]})},82152:(e,t,o)=>{"use strict";o.d(t,{$:()=>n});var r=o(56427),s=o(19432),c=(o(91007),o(10790));const n=({children:e})=>(0,c.jsxs)("div",{className:"wc-block-product-filter-components-notice",children:[(0,c.jsx)(r.Icon,{className:"wc-block-product-filter-components-notice__icon",icon:s.A}),(0,c.jsx)("div",{className:"wc-block-product-filter-components-notice__content",children:e})]})},54703:(e,t,o)=>{"use strict";o.d(t,{u:()=>r});const r=["woocommerce/product-filters","woocommerce/product-filter-attribute","woocommerce/product-filter-active","woocommerce/product-filter-price","woocommerce/product-filter-status","woocommerce/product-collection","woocommerce/add-to-cart-form","woocommerce/add-to-cart-with-options","core/query"]},98621:(e,t,o)=>{"use strict";o.d(t,{Uf:()=>i,bn:()=>n,yZ:()=>s});var r=o(67356);function s(e,t=""){return e?.length?`var(--wp--preset--color--${e})`:t||""}function c(e){return`custom${e.charAt(0).toUpperCase()}${e.slice(1)}`}function n(e,t,o){const n={};return o.forEach(o=>{const i=t[o],a=c(o),l=t[a];("string"==typeof i&&i.length>0||"string"==typeof l&&l.length>0)&&(n[`--${e}-${(0,r.c)(o)}`]=s(i,l))}),n}function i(e,t){const o={};return t.forEach(t=>{if(!t.startsWith("custom")){const s=c(t),n=`has-${(0,r.c)(t)}-color`;o[n]=e[t]||e[s]}}),o}},96708:(e,t,o)=>{"use strict";o.d(t,{h:()=>s});var r=o(74997);const s=(e=[])=>(0,r.getBlockTypes)().map(e=>e.name).filter(t=>!e.includes(t))},42986:(e,t,o)=>{"use strict";function r(e){return"string"==typeof e.label?e.label:e.ariaLabel}function s(e,t){return e.sort((e,o)=>{switch(t){case"menu_order-asc":{const t=e.menuOrder??0,s=o.menuOrder??0;return t!==s?t-s:r(e).localeCompare(r(o))}case"name-asc":return r(e).localeCompare(r(o));case"name-desc":return r(o).localeCompare(r(e));case"count-asc":return void 0===e.count||void 0===o.count?r(e).localeCompare(r(o)):e.count-o.count;default:return void 0===e.count||void 0===o.count?r(e).localeCompare(r(o)):o.count-e.count}})}o.d(t,{Z:()=>s})},20048:(e,t,o)=>{"use strict";o.d(t,{B8:()=>_,PL:()=>p,RC:()=>l,Rs:()=>a,SV:()=>d,X2:()=>g,Yf:()=>m,_v:()=>u});var r=o(15703),s=o(33079),c=o(73993),n=o(86172),i=o(94602);const a="woocommerce/product-query",l="/wp-admin/edit.php?post_type=product&page=product_attributes",d="core/query",u=["attributes","presets","productSelector","onSale","stockStatus","wooInherit"],m=["taxQuery","search",...u],p=(0,r.getSetting)("stockStatusOptions",[]),h=(0,r.getSetting)("hideOutOfStockItems",!1),g={allowedControls:m,displayLayout:{type:"flex",columns:3},query:{perPage:9,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1,__woocommerceAttributes:[],__woocommerceStockStatus:h?Object.keys((0,s.X)(p,"outofstock")):Object.keys(p)}},w=(0,r.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,c.isBoolean),_=[["core/post-template",{__woocommerceNamespace:i.Q,className:"products-block-post-template",...w&&{layout:{type:"grid",columnCount:3}}},[["woocommerce/product-image",{style:{dimensions:{aspectRatio:"1/1"}}}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",style:{spacing:{margin:{bottom:"0.75rem",top:"0"}}},isLink:!0,__woocommerceNamespace:n.Q}],["woocommerce/product-price",{textAlign:"center",fontSize:"small"}],["woocommerce/product-button",{textAlign:"center",fontSize:"small"}]]],["core/query-pagination",{layout:{type:"flex",justifyContent:"center"}}],["core/query-no-results"]]},51442:(e,t,o)=>{"use strict";o.d(t,{Q:()=>l,a:()=>a});var r=o(56427),s=o(83243),c=o(53522),n=o(59203),i=o(10790);const a="core/post-excerpt",l="woocommerce/product-query/product-summary";(0,n.R)(a,{blockDescription:c.j0,blockIcon:(0,i.jsx)(r.Icon,{icon:s.A}),blockTitle:c.J$,variationName:l,scope:[]})},94602:(e,t,o)=>{"use strict";o.d(t,{Q:()=>l,a:()=>a});var r=o(56427),s=o(27723),c=o(74774),n=o(59203),i=o(10790);const a="core/post-template",l="woocommerce/product-query/product-template";(0,n.R)(a,{blockDescription:(0,s.__)("Contains the block elements used to render a product, like its name, featured image, rating, and more.","woocommerce"),blockIcon:(0,i.jsx)(r.Icon,{icon:c.A}),blockTitle:(0,s.__)("Product template","woocommerce"),variationName:l,scope:["block","inserter"]})},86172:(e,t,o)=>{"use strict";o.d(t,{Q:()=>l,a:()=>a});var r=o(56427),s=o(83925),c=o(69544),n=o(59203),i=o(10790);const a="core/post-title",l="woocommerce/product-query/product-title";(0,n.R)(a,{blockDescription:s.description,blockIcon:(0,i.jsx)(r.Icon,{icon:c.A}),blockTitle:s.title,variationName:l,scope:["block"]})},59203:(e,t,o)=>{"use strict";o.d(t,{R:()=>s});var r=o(74997);function s(e,{blockDescription:t,blockIcon:o,blockTitle:s,variationName:c,scope:n}){(0,r.registerBlockVariation)(e,{description:t,name:c,title:s,isActive:e=>e.__woocommerceNamespace===c,icon:{src:o},attributes:{__woocommerceNamespace:c},scope:n})}},65448:(e,t,o)=>{"use strict";o.d(t,{B:()=>w,U:()=>h});var r=o(56427),s=o(27723),c=o(40177),n=o(60407),i=o(15703),a=o(73993),l=o(20048),d=o(94602),u=o(86172),m=o(10790);const p="woocommerce/related-products",h={namespace:p,allowedControls:[],displayLayout:{type:"flex",columns:5},query:{perPage:5,pages:0,offset:0,postType:"product",order:"asc",orderBy:"title",author:"",search:"",exclude:[],sticky:"",inherit:!1},lock:{remove:!0,move:!0}},g=(0,i.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,a.isBoolean),w=[["core/heading",{level:2,content:(0,s.__)("Related products","woocommerce"),style:{spacing:{margin:{top:"1rem",bottom:"1rem"}}}}],["core/post-template",{__woocommerceNamespace:d.Q,...g&&{layout:{type:"grid",columnCount:5}}},[["woocommerce/product-image",{productId:0,style:{dimensions:{aspectRatio:"1/1"}}}],["core/post-title",{textAlign:"center",level:3,fontSize:"medium",isLink:!0,__woocommerceNamespace:u.Q},[]],["woocommerce/product-price",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]],["woocommerce/product-button",{textAlign:"center",fontSize:"small",style:{spacing:{margin:{bottom:"1rem"}}}},[]]]]],_={name:l.SV,description:(0,s.__)("Display related products.","woocommerce"),title:(0,s.__)("Related Products Controls","woocommerce"),isActive:e=>e.namespace===p,icon:(0,m.jsx)(r.Icon,{icon:c.A,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:h,allowedControls:[],innerBlocks:w,scope:["block"]};(0,n.W)(_,{isVariationBlock:!0,variationName:p,isAvailableOnPostEditor:!1})},6408:(e,t,o)=>{"use strict";o.d(t,{BF:()=>h,Ck:()=>g,DT:()=>w,iF:()=>i});var r=o(47143),s=o(86087),c=o(3582),n=o(94715);let i=function(e){return e.Product="product",e.Archive="archive",e.Cart="cart",e.Order="order",e.Site="site",e}({});const a="single-product",l="taxonomy-product_cat",d="taxonomy-product_tag",u="taxonomy-product_brand",m=async(e,t,o,s)=>{var n;s((n=await(0,r.resolveSelect)(c.store).getEntityRecords(e,t,{_fields:["id"],slug:o}))&&n.length&&n[0]?.id?n[0].id:null)},p=(e,t={})=>({type:e,sourceData:t}),h=(e,t)=>{const o=e.templateSlug||"",c=e.postId||null,h=(e=>t=>e.replace(`${t}-`,""))(o),g=(e=>t=>e.includes(t)&&e!==t)(o),w=g(a),_=g(l),b=g(d),x=g(u),[f,y]=(0,s.useState)(null),[v,k]=(0,s.useState)(null),[j,C]=(0,s.useState)(null),[S,A]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(w){const e=h(a);m("postType","product",e,y)}if(_){const e=h(l);m("taxonomy","product_cat",e,k)}if(b){const e=h(d);m("taxonomy","product_tag",e,C)}if(x){const e=h(u);m("taxonomy","product_brand",e,A)}},[w,_,b,x,h]);const{isInSingleProductBlock:N,isInSomeCartCheckoutBlock:P}=(0,r.useSelect)(e=>{const{getBlockParentsByBlockName:o}=e(n.store),r=e=>o(t,e).length>0;return{isInSingleProductBlock:r(["woocommerce/single-product"]),isInSomeCartCheckoutBlock:r(["woocommerce/cart","woocommerce/checkout","woocommerce/mini-cart-contents"])}},[t]);if(N)return p(i.Product,{productId:c});if(P)return p(i.Cart);if(w)return p(i.Product,{productId:f});const B=(e=>t=>e===t)(o);if(B(a))return p(i.Product,{productId:null});if(_)return p(i.Archive,{taxonomy:"product_cat",termId:v});if(b)return p(i.Archive,{taxonomy:"product_tag",termId:j});if(x)return p(i.Archive,{taxonomy:"product_brand",termId:S});if(B(l))return p(i.Archive,{taxonomy:"product_cat",termId:null});if(B(d))return p(i.Archive,{taxonomy:"product_tag",termId:null});if(B(u))return p(i.Archive,{taxonomy:"product_brand",termId:null});if(B("taxonomy-product_attribute"))return p(i.Archive,{taxonomy:null,termId:null});if("page-cart"===o||"page-checkout"===o)return p(i.Cart);const I=B("order-confirmation");return p(I?i.Order:i.Site)},g=({clientId:e,queryContextIncludes:t})=>{const o=(0,r.useSelect)(t=>{const{getBlockParentsByBlockName:o,getBlockAttributes:r}=t("core/block-editor"),s=o(e,"woocommerce/product-collection",!0);return s?.length?r(s[0]):null},[e]);return(0,s.useMemo)(()=>{if(!o)return null;const e={};return t?.length&&t.forEach(t=>{o?.[t]&&(e[t]=o[t])}),e},[t,o])},w=(e="")=>{const t="category-",o="taxonomy-product_cat-",r="taxonomy-product_tag-",s="taxonomy-product_brand-";return e.startsWith(t)?{taxonomy:"category",slug:e.replace(t,"")}:e.startsWith(o)?{taxonomy:"product_cat",slug:e.replace(o,"")}:e.startsWith(r)?{taxonomy:"product_tag",slug:e.replace(r,"")}:e.startsWith(s)?{taxonomy:"product_brand",slug:e.replace(s,"")}:{taxonomy:"",slug:""}}},14741:(e,t,o)=>{"use strict";o.d(t,{A:()=>r});const r={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},30102:(e,t,o)=>{"use strict";o.d(t,{Ki:()=>m,W9:()=>d,f1:()=>u});var r=o(27723),s=o(86087),c=o(94715),n=o(15703),i=o(56427),a=o(10790);const l=e=>{const t=Number.parseInt(e,10),o=Number.isNaN(t)?10:t;return Math.max(1,Math.min(20,o))},d=(e,t,o)=>(0,a.jsx)(c.BlockControls,{children:(0,a.jsx)(i.ToolbarGroup,{controls:[{icon:"edit",title:o,onClick:()=>t({editMode:!e}),isActive:e}]})}),u=(e,t)=>{const o=(0,n.getSetting)("showAvatars",!0),c=(0,n.getSetting)("reviewRatingsEnabled",!0);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showReviewRating,label:(0,r.__)("Product rating","woocommerce"),onDeselect:()=>t({showReviewRating:!0}),isShownByDefault:!0,children:(0,a.jsxs)("div",{className:"wc-block-reviews__tools-panel-item-container",children:[(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Product rating","woocommerce"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!c&&(0,a.jsx)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1,children:(0,s.createInterpolateElement)((0,r.__)("Product rating is disabled in your <a>store settings</a>.","woocommerce"),{a:(0,a.jsx)("a",{href:(0,n.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})})]})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showReviewerName,label:(0,r.__)("Reviewer name","woocommerce"),onDeselect:()=>t({showReviewerName:!0}),isShownByDefault:!0,children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Reviewer name","woocommerce"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showReviewDate,label:(0,r.__)("Review date","woocommerce"),onDeselect:()=>t({showReviewDate:!0}),isShownByDefault:!0,children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Review date","woocommerce"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showReviewContent,label:(0,r.__)("Review content","woocommerce"),onDeselect:()=>t({showReviewContent:!0}),isShownByDefault:!0,children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Review content","woocommerce"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showReviewImage||"reviewer"!==e.imageType,label:(0,r.__)("Image","woocommerce"),onDeselect:()=>t({showReviewImage:!0,imageType:"reviewer"}),isShownByDefault:!0,children:(0,a.jsxs)("div",{className:"wc-block-reviews__tools-panel-item-container",children:[(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Image","woocommerce"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),e.showReviewImage&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.__experimentalToggleGroupControl,{label:(0,r.__)("Review image","woocommerce"),isBlock:!0,value:e.imageType,onChange:e=>t({imageType:e}),children:[(0,a.jsx)(i.__experimentalToggleGroupControlOption,{value:"reviewer",label:(0,r.__)("Reviewer photo","woocommerce")}),(0,a.jsx)(i.__experimentalToggleGroupControlOption,{value:"product",label:(0,r.__)("Product","woocommerce")})]}),"reviewer"===e.imageType&&!o&&(0,a.jsx)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1,children:(0,s.createInterpolateElement)((0,r.__)("Reviewer photo is disabled in your <a>site settings</a>.","woocommerce"),{a:(0,a.jsx)("a",{href:(0,n.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})})})]})]})})]})},m=(e,t,{showOffset:o=!1}={})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>"most-recent"!==e.orderby,label:(0,r.__)("Default sort order","woocommerce"),onDeselect:()=>t({orderby:"most-recent"}),isShownByDefault:!0,children:(0,a.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Default sort order","woocommerce"),value:e.orderby,options:[{label:(0,r.__)("Most recent","woocommerce"),value:"most-recent"},{label:(0,r.__)("Highest rating","woocommerce"),value:"highest-rating"},{label:(0,r.__)("Lowest rating","woocommerce"),value:"lowest-rating"}],onChange:e=>t({orderby:e})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showOrderby,label:(0,r.__)('Show "Order by" dropdown',"woocommerce"),onDeselect:()=>t({showOrderby:!0}),isShownByDefault:!0,children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)('Show "Order by" dropdown',"woocommerce"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>10!==e.reviewsOnPageLoad,label:(0,r.__)("Number of reviews","woocommerce"),onDeselect:()=>t({reviewsOnPageLoad:10}),isShownByDefault:!0,children:(0,a.jsx)(i.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,r.__)("Number of reviews","woocommerce"),value:String(e.reviewsOnPageLoad),onChange:e=>{t({reviewsOnPageLoad:l(e)})},type:"number",max:20,min:1,step:1})}),o&&(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>0!==(e.offset??0),label:(0,r.__)("Offset","woocommerce"),onDeselect:()=>t({offset:0}),isShownByDefault:!0,children:(0,a.jsx)(i.__experimentalNumberControl,{__next40pxDefaultSize:!0,__unstableStateReducer:e=>Object.is(Number(e.value),-0)?{...e,value:String(0)}:e,label:(0,r.__)("Offset","woocommerce"),help:(0,r.__)("Number of reviews to skip","woocommerce"),value:e.offset??0,onChange:e=>{if(""===e)return;const o=Number(e);!Number.isInteger(o)||o<0||t({offset:o})},min:0,step:1})}),(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showLoadMore||10!==e.reviewsOnLoadMore,label:(0,r.__)('Show "Load more" button',"woocommerce"),onDeselect:()=>t({showLoadMore:!0,reviewsOnLoadMore:10}),isShownByDefault:!0,children:(0,a.jsxs)("div",{className:"wc-block-reviews__tools-panel-item-container",children:[(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)('Show "Load more" button',"woocommerce"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&(0,a.jsx)(i.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,r.__)("Load more reviews","woocommerce"),value:String(e.reviewsOnLoadMore),onChange:e=>t({reviewsOnLoadMore:l(e)}),type:"number",max:20,min:1,step:1})]})})]})},51974:(e,t,o)=>{"use strict";o.d(t,{A:()=>I});var r=o(27723),s=o(56427),c=o(86087),n=o(15703),i=o(95493),a=o(42435),l=o(4921),d=o(10790);const u=({label:e,screenReaderLabel:t,wrapperElement:o,wrapperProps:r={},allowHTML:s=!1})=>{let n;const i=null!=e,u=null!=t;return!i&&u?(n=o||"span",r={...r,className:(0,l.A)(r.className,"screen-reader-text")},(0,d.jsx)(n,{...r,children:t})):(n=o||c.Fragment,i&&u&&e!==t?(0,d.jsxs)(n,{...r,children:[s?(0,d.jsx)(c.RawHTML,{children:(0,a.sanitizeHTML)(e,{tags:["b","em","i","strong","p","br","span"],attr:["style"]})}):(0,d.jsx)("span",{"aria-hidden":"true",children:e}),(0,d.jsx)("span",{className:"screen-reader-text",children:t})]}):(0,d.jsx)(n,{...r,children:e}))};o(16919);const m=({onClick:e,label:t=(0,r.__)("Load more","woocommerce"),screenReaderLabel:o=(0,r.__)("Load more","woocommerce")})=>(0,d.jsx)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more",children:(0,d.jsx)("button",{className:"wp-block-button__link",onClick:e,children:(0,d.jsx)(u,{label:t,screenReaderLabel:o})})});var p=o(14656);o(56878);const h=({onChange:e,readOnly:t,value:o})=>(0,d.jsx)(p.SortSelect,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:(0,r.__)("Order by","woocommerce"),onChange:e,options:[{key:"most-recent",label:(0,r.__)("Most recent","woocommerce")},{key:"highest-rating",label:(0,r.__)("Highest rating","woocommerce")},{key:"lowest-rating",label:(0,r.__)("Lowest rating","woocommerce")}],readOnly:t,screenReaderLabel:(0,r.__)("Order reviews by","woocommerce"),value:o});var g=o(51067),w=o(18537);function _(e,t,o){return o||!e?(0,d.jsx)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):(0,d.jsxs)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",children:["product"===t?(0,d.jsx)("img",{"aria-hidden":"true",alt:e.product_image?.alt||"",src:e.product_image?.thumbnail||""}):(0,d.jsx)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&(0,d.jsx)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:(0,r.__)("Verified buyer","woocommerce"),children:(0,r.__)("Verified buyer","woocommerce")})]})}function b(e){return(0,d.jsx)(g.A,{maxLines:10,moreText:(0,r.__)("Read full review","woocommerce"),lessText:(0,r.__)("Hide full review","woocommerce"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text",children:(0,d.jsx)("div",{dangerouslySetInnerHTML:{__html:e.review||""}})})}function x(e,t){return(0,d.jsx)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product",children:(0,d.jsx)("a",{href:e.product_permalink,"aria-labelledby":t,children:(0,w.decodeEntities)(e.product_name)})})}function f(e){const{reviewer:t=""}=e;return(0,d.jsx)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author",children:t})}function y(e){const{date_created:t,formatted_date_created:o}=e;return(0,d.jsx)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t,children:o})}function v(e,t){const{rating:o}=e,s={width:o/5*100+"%"},c=(0,r.sprintf)(/* translators: %f is referring to the average rating value */ /* translators: %f is referring to the average rating value */ (0,r.__)("Rated %f out of 5","woocommerce"),o),n={__html:(0,r.sprintf)(/* translators: %s is referring to the average rating value */ /* translators: %s is referring to the average rating value */ (0,r.__)("Rated %s out of 5","woocommerce"),(0,r.sprintf)('<strong class="rating">%f</strong>',o))};return(0,d.jsx)("div",{id:t,"aria-label":`${(0,w.decodeEntities)(e.product_name)} ${c}`,className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating",children:(0,d.jsx)("div",{"aria-hidden":"true",className:`wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars wc-block-review-list-item__rating__stars--${o}`,role:"img",children:(0,d.jsx)("span",{style:s,dangerouslySetInnerHTML:n})})})}o(47313);const k=({attributes:e,review:t={}})=>{const{imageType:o,showReviewDate:r,showReviewerName:s,showReviewImage:n,showReviewRating:i,showReviewContent:a,showProductName:u}=e,{rating:m}=t,p=!(Object.keys(t).length>0),h=Number.isFinite(m)&&i,g=(0,c.useId)();return(0,d.jsxs)("li",{className:(0,l.A)("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":p,"wc-block-components-review-list-item__item--has-image":n}),"aria-hidden":p,children:[(u||r||s||n||h)&&(0,d.jsxs)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info",children:[n&&_(t,o,p),(u||s||h||r)&&(0,d.jsxs)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta",children:[h&&v(t,g),u&&x(t,g),s&&f(t),r&&y(t)]})]}),a&&b(t)]})};o(95183);const j=({attributes:e,reviews:t})=>{const o=(0,n.getSetting)("showAvatars",!0),r=(0,n.getSetting)("reviewRatingsEnabled",!0),s=(o||"product"===e.imageType)&&e.showReviewImage,c=r&&e.showReviewRating,i={...e,showReviewImage:s,showReviewRating:c};return(0,d.jsx)("ul",{className:"wc-block-review-list wc-block-components-review-list",children:0===t.length?(0,d.jsx)(k,{attributes:i}):t.map((e,t)=>(0,d.jsx)(k,{attributes:i,review:e},e.id??`review-placeholder-${t}`))})};var C=o(20923),S=o.n(C),A=o(48357),N=o(51258);class P extends c.Component{render(){const{attributes:e,error:t,hasReviewsHiddenByOffset:o,isLoading:c,noReviewsPlaceholder:a,reviews:l,totalReviews:u}=this.props;if(t)return(0,d.jsx)(i.A,{className:"wc-block-featured-product-error",error:t,isLoading:c});if(0===l.length&&!c)return(0,d.jsx)(a,{attributes:e,reason:o?"offset":"no-reviews"});const p=(0,n.getSetting)("reviewRatingsEnabled",!0);return(0,d.jsxs)(s.Disabled,{children:[e.showOrderby&&p&&(0,d.jsx)(h,{readOnly:!0,value:e.orderby,onChange:()=>null}),(0,d.jsx)(j,{attributes:e,reviews:l}),e.showLoadMore&&u>l.length&&(0,d.jsx)(m,{screenReaderLabel:(0,r.__)("Load more reviews","woocommerce"),onClick:()=>null})]})}}const B=(e=>{class t extends c.Component{isPreview=!!this.props.attributes.previewReviews;delayedAppendReviews=(this.props.delayFunction??(e=>e))(this.appendReviews);isMounted=!1;state={error:null,hasReviewsHiddenByOffset:!1,loading:!0,reviews:this.isPreview&&this.props.attributes?.previewReviews?this.props.attributes.previewReviews:[],totalReviews:this.isPreview&&this.props.attributes?.previewReviews?this.props.attributes.previewReviews.length:0};componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){this.shouldReplaceReviews(e,this.props)?this.replaceReviews():e.reviewsToDisplay<this.props.reviewsToDisplay&&this.delayedAppendReviews()}shouldReplaceReviews(e,t){return e.orderby!==t.orderby||e.order!==t.order||this.getOffset(e)!==this.getOffset(t)||e.productId!==t.productId||!S()(e.categoryIds,t.categoryIds)}componentWillUnmount(){this.isMounted=!1,"cancel"in this.delayedAppendReviews&&"function"==typeof this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}getOffset(e=this.props){const t=Number(e.offset??0);return Number.isInteger(t)&&t>=0?t:0}getArgs(e){const{categoryIds:t,order:o,orderby:r,productId:s,reviewsToDisplay:c}=this.props,n={order:o,orderby:r,per_page:c-e,offset:this.getOffset()+e};if(t){const e=Array.isArray(t)?t:JSON.parse(t);n.category_id=Array.isArray(e)?e.join(","):e}return s&&(n.product_id=s),n}replaceReviews(){if(this.isPreview)return;const e=this.props.onReviewsReplaced??(()=>{});this.updateListOfReviews().then(e)}appendReviews(){if(this.isPreview)return;const e=this.props.onReviewsAppended??(()=>{}),{reviewsToDisplay:t}=this.props,{reviews:o}=this.state;t<=o.length||this.updateListOfReviews(o).then(e)}updateListOfReviews(e=[]){const{reviewsToDisplay:t}=this.props,{totalReviews:o}=this.state,r=this.getOffset(),s=Math.min(o,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(s).fill({}))}),(0,A.Gs)(this.getArgs(e.length)).then(({reviews:t,totalReviews:o})=>{const s=Math.max(o-r,0);return this.isMounted&&this.setState({hasReviewsHiddenByOffset:r>0&&o>0&&0===s,reviews:e.filter(e=>Object.keys(e).length).concat(t),totalReviews:s,loading:!1,error:null}),{newReviews:t}}).catch(this.setError)}setError=async e=>{if(!this.isMounted)return;const t=this.props.onReviewsLoadError??(()=>{}),o=await(0,N.W)(e);this.setState({reviews:[],loading:!1,error:o}),t(o)};render(){const{reviewsToDisplay:t}=this.props,{error:o,hasReviewsHiddenByOffset:r,loading:s,reviews:c,totalReviews:n}=this.state;return(0,d.jsx)(e,{...this.props,error:o,hasReviewsHiddenByOffset:r,isLoading:s,reviews:c.slice(0,t),totalReviews:n})}}const{displayName:o=e.name||"Component"}=e;return t.displayName=`WithReviews(${o})`,t})(P),I=({attributes:e,icon:t,name:o,noReviewsPlaceholder:c})=>{const{categoryIds:n,productId:i,reviewsOnPageLoad:a,showProductName:l,showReviewDate:u,showReviewerName:m,showReviewContent:p,showReviewImage:h,showReviewRating:g}=e,{order:w,orderby:_}=(0,A.A2)(e.orderby);return p||g||u||m||h||l?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(B,{attributes:e,categoryIds:n,delayFunction:e=>(e=>{let t,o=null;const r=(...r)=>{o=r,t&&clearTimeout(t),t=setTimeout(()=>{t=null,o&&e(...o)},400)};return r.flush=()=>{t&&o&&(e(...o),clearTimeout(t),t=null)},r.clear=()=>{t&&clearTimeout(t),t=null},r})(e),noReviewsPlaceholder:c,offset:e.offset??0,orderby:_,order:w,productId:i,reviewsToDisplay:a})}):(0,d.jsx)(s.Placeholder,{icon:t,label:o,children:(0,r.__)("The content for this block is hidden due to block settings.","woocommerce")})}},11946:(e,t,o)=>{"use strict";o.d(t,{F:()=>c});var r=o(27723),s=o(36352);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:(0,r.__)("July 15, 2019","woocommerce"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:(0,r.__)("WordPress Pennant","woocommerce"),product_permalink:"#", /* translators: An example person name used for the block previews. */ reviewer:(0,r.__)("Alice","woocommerce"),review:`<p>${(0,r.__)("I bought this product last week and I'm very happy with it.","woocommerce")}</p>\n`,reviewer_avatar_urls:{48:s.r7.defaultAvatar,96:s.r7.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:(0,r.__)("July 12, 2019","woocommerce"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:(0,r.__)("WordPress Pennant","woocommerce"),product_permalink:"#", /* translators: An example person name used for the block previews. */ reviewer:(0,r.__)("Bob","woocommerce"),review:`<p>${(0,r.__)("This product is awesome, I love it!","woocommerce")}</p>\n`,reviewer_avatar_urls:{48:s.r7.defaultAvatar,96:s.r7.defaultAvatar},rating:null,verified:!1}]}}},31171:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(94715),s=(o(14809),o(48357)),c=o(10790);const n=({attributes:e})=>(0,c.jsx)("div",{...r.useBlockProps.save({className:(0,s.Zb)(e)}),...(0,s.nz)(e)})},48357:(e,t,o)=>{"use strict";o.d(t,{A2:()=>i,Gs:()=>a,Zb:()=>l,nz:()=>d});var r=o(1455),s=o.n(r),c=o(4921),n=o(15703);const i=e=>{if((0,n.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},a=e=>s()({path:"/wc/store/v1/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),l=e=>{const{className:t,categoryIds:o,productId:r,showReviewDate:s,showReviewerName:n,showReviewContent:i,showProductName:a,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return r&&(u="wc-block-reviews-by-product"),Array.isArray(o)&&(u="wc-block-reviews-by-category"),(0,c.A)(u,t,{"has-image":l,"has-name":n,"has-date":s,"has-rating":d,"has-content":i,"has-product-name":a})},d=e=>{const{categoryIds:t,imageType:o,offset:r,orderby:s,productId:c,reviewsOnPageLoad:n,reviewsOnLoadMore:i,showLoadMore:a,showOrderby:l}=e,d={"data-image-type":o,"data-orderby":s,"data-reviews-on-page-load":n,"data-reviews-on-load-more":i,"data-show-load-more":a,"data-show-orderby":l},u=Number(r);return Number.isInteger(u)&&u>0&&(d["data-offset"]=u),c&&(d["data-product-id"]=c),Array.isArray(t)&&(d["data-category-ids"]=t.join(",")),d}},61909:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(94715),s=o(29491),c=o(27723),n=(o(12796),o(10790));const i=(0,s.withInstanceId)(({className:e,headingLevel:t,onChange:o,heading:s,instanceId:i})=>{const a=`h${t}`;return(0,n.jsxs)(a,{className:e,children:[(0,n.jsx)("label",{className:"screen-reader-text",htmlFor:`block-title-${i}`,children:(0,c.__)("Block title","woocommerce")}),(0,n.jsx)(r.PlainText,{id:`block-title-${i}`,className:"wc-block-editor-components-title",value:s,onChange:o,style:{backgroundColor:"transparent"}})]})})},21995:(e,t,o)=>{"use strict";o.d(t,{N:()=>g,w:()=>w});var r=o(74997),s=o(86087),c=o(47143),n=o(8e3),i=o(56427),a=o(10790);const l="woocommerce/selectableItems";function d(e){return Boolean(e)}function u(e){return e?Array.isArray(e)?e:[e]:[]}function m(e,t){return(0,r.getBlockTypes)().filter(o=>function(e,t,o){return!!t&&!!function(e){return!0===e.supports?.woocommerce?.innerBlockDisplayStyle}(e)&&u(e.ancestor).includes(t)&&u(e.usesContext).includes(o)}(o,e,t))}function p(e,t){return t.map(t=>(0,n.K)(e,t.name)).find(d)??null}function h(e,t){return t?.(e)??{rootClientId:e.clientId,index:e.innerBlocks.length}}const g=({clientId:e,currentStyle:t,onChange:o,contextKey:n=l,getFallbackDisplayStyleInsertionPoint:d})=>{const u=(0,c.select)("core/block-editor").getBlock(e),g=u?.name,w=m(g,n),{insertBlock:_,replaceBlock:b}=(0,c.useDispatch)("core/block-editor"),[x,f]=(0,s.useState)({});return 0===w.length?null:(0,a.jsx)(i.__experimentalToggleGroupControl,{value:t,isBlock:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:"",hideLabelFromVision:!0,onChange:e=>{if(!e||"string"!=typeof e)return;if(!u)return;if(!w.some(t=>t.name===e))return;const t=p(u,w);if(t){const o={...x,[t.name]:t.attributes};f(o),b(t.clientId,(0,r.createBlock)(e,o[e]||{}))}else{const t=h(u,d);_((0,r.createBlock)(e),t.index,t.rootClientId,!1)}o(e)},style:{width:"100%"},children:w.map(e=>(0,a.jsx)(i.__experimentalToggleGroupControlOption,{label:e.title,value:e.name},e.name))})};function w(e,t,o,s=l){const n=(0,c.select)("core/block-editor").getBlock(e);if(!n)return;const i=m(n.name,s);if(!i.some(e=>e.name===t))return;const a=p(n,i),{insertBlock:d,replaceBlock:u}=(0,c.dispatch)("core/block-editor");if(a)u(a.clientId,(0,r.createBlock)(t));else{const e=h(n,o);d((0,r.createBlock)(t),e.index,e.rootClientId,!1)}}},31716:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(93450),c=o(43907),n=o(15703),i=o(94715),a=o(62796),l=o(10790);const d=e=>{const t=((0,a.useProductDataContext)().product||{}).id||e.productId||0;return t&&1!==t?(0,l.jsx)(i.InspectorControls,{children:(0,l.jsxs)("div",{className:"wc-block-single-product__edit-card",children:[(0,l.jsx)("div",{className:"wc-block-single-product__edit-card-title",children:(0,l.jsxs)("a",{href:`${n.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer",children:[(0,r.__)("Edit this product's details","woocommerce"),(0,l.jsx)(s.A,{icon:c.A,size:16})]})}),(0,l.jsx)("div",{className:"wc-block-single-product__edit-card-description",children:(0,r.__)("Edit details such as title, price, description and more.","woocommerce")})]})}):null}},16606:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(83911),s=o(94715),c=o(10790);const n=({onChange:e,placeholder:t,value:o,children:n,...i})=>(0,c.jsxs)(r.A,{...i,children:[(0,c.jsx)(s.RichText,{multiline:!1,allowedFormats:[],value:o,placeholder:t,onChange:e}),n]})},64342:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(27723);const s=window.wp.escapeHtml;var c=o(10790);const n=({message:e,type:t})=>e?"general"===t?(0,c.jsxs)("span",{children:[(0,r.__)("The following error was returned","woocommerce"),(0,c.jsx)("br",{}),(0,c.jsx)("code",{children:(0,s.escapeHTML)(e)})]}):"api"===t?(0,c.jsxs)("span",{children:[(0,r.__)("The following error was returned from the API","woocommerce"),(0,c.jsx)("br",{}),(0,c.jsx)("code",{children:(0,s.escapeHTML)(e)})]}):e:(0,r.__)("An error has prevented the block from being updated.","woocommerce"),i=({error:e})=>(0,c.jsx)("div",{className:"wc-block-error-message",children:n(e)})},95493:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(93450),c=o(62748),n=o(4921),i=o(56427),a=o(64342),l=(o(63120),o(10790));const d=({className:e="",error:t,isLoading:o=!1,onRetry:d})=>(0,l.jsxs)(i.Placeholder,{icon:(0,l.jsx)(s.A,{icon:c.A}),label:(0,r.__)("Sorry, an error occurred","woocommerce"),className:(0,n.A)("wc-block-api-error",e),children:[(0,l.jsx)(a.A,{error:t}),d&&(0,l.jsx)(l.Fragment,{children:o?(0,l.jsx)(i.Spinner,{}):(0,l.jsx)(i.Button,{variant:"secondary",onClick:d,children:(0,r.__)("Retry","woocommerce")})})]})},3355:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(56427),s=o(84114),c=o(4921),n=o(51609),i=o(10790);const a=({className:e,item:t,isSelected:o,isLoading:a,onSelect:l,disabled:d,...u})=>(0,i.jsxs)(i.Fragment,{children:[(0,n.createElement)(s.s,{...u,key:t.id,...e&&{className:e},isSelected:o,item:t,onSelect:l,...d&&{disabled:d}}),o&&a&&(0,i.jsx)("div",{className:(0,c.A)("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active"),children:(0,i.jsx)(r.Spinner,{})},"loading")]})},93023:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(93450),c=o(43907),n=o(56427),i=o(42435),a=o(49498),l=(o(84459),o(10790));const d=({href:e,title:t,description:o,warning:d})=>(0,l.jsxs)("a",{href:e,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer",children:[(0,l.jsxs)("span",{className:"wc-block-editor-components-external-link-card__content",children:[(0,l.jsx)("strong",{className:"wc-block-editor-components-external-link-card__title",children:t}),o&&(0,l.jsx)("span",{className:"wc-block-editor-components-external-link-card__description",dangerouslySetInnerHTML:{__html:(0,i.sanitizeHTML)(o)}}),d?(0,l.jsxs)("span",{className:"wc-block-editor-components-external-link-card__warning",children:[(0,l.jsx)(s.A,{icon:(0,l.jsx)(a.A,{status:"error"})}),(0,l.jsx)("span",{children:d})]}):null]}),(0,l.jsx)(n.VisuallyHidden,{as:"span",children:/* translators: accessibility text */ /* translators: accessibility text */ (0,r.__)("(opens in a new tab)","woocommerce")}),(0,l.jsx)(s.A,{icon:c.A,className:"wc-block-editor-components-external-link-card__icon"})]})},10525:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(27723),s=o(56427),c=o(10790);const n=({onChange:e,settings:t})=>{const{image:o,button:n,price:i,rating:a,title:l}=t,d=!1!==o;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.ToggleControl,{label:(0,r.__)("Product image","woocommerce"),checked:d,onChange:()=>e({...t,image:!d})}),(0,c.jsx)(s.ToggleControl,{label:(0,r.__)("Product title","woocommerce"),checked:l,onChange:()=>e({...t,title:!l})}),(0,c.jsx)(s.ToggleControl,{label:(0,r.__)("Product price","woocommerce"),checked:i,onChange:()=>e({...t,price:!i})}),(0,c.jsx)(s.ToggleControl,{label:(0,r.__)("Product rating","woocommerce"),checked:a,onChange:()=>e({...t,rating:!a})}),(0,c.jsx)(s.ToggleControl,{label:(0,r.__)("Add to Cart button","woocommerce"),checked:n,onChange:()=>e({...t,button:!n})})]})}},1872:(e,t,o)=>{"use strict";o.d(t,{A:()=>i});var r=o(27723),s=o(56427),c=o(10790);const n=(e,t,o)=>o?Math.min(e,t)===e?t:Math.max(e,o)===e?o:e:Math.max(e,t)===t?e:t,i=({columns:e,rows:t,setAttributes:o,alignButtons:i,minColumns:a=1,maxColumns:l=6,minRows:d=1,maxRows:u=6})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Columns","woocommerce"),value:e,onChange:e=>{const t=n(e,a,l);o({columns:Number.isNaN(t)?"":t})},min:a,max:l}),(0,c.jsx)(s.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Rows","woocommerce"),value:t,onChange:e=>{const t=n(e,d,u);o({rows:Number.isNaN(t)?"":t})},min:d,max:u}),(0,c.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Align the last block to the bottom","woocommerce"),help:i?(0,r.__)("Align the last block to the bottom.","woocommerce"):(0,r.__)("The last inner block will follow other content.","woocommerce"),checked:i,onChange:()=>o({alignButtons:!i})})]})},69548:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(27723),s=o(47143),c=o(56427),n=o(58326),i=o(10790);const a=({setPageId:e,pageId:t,labels:o})=>{const a=(0,s.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return a?(0,i.jsx)(c.__experimentalToolsPanel,{label:o.title,resetAll:()=>e(0),children:(0,i.jsx)(c.__experimentalToolsPanelItem,{label:(0,r.__)("Link to","woocommerce"),hasValue:()=>"number"==typeof t&&0!==t,onDeselect:()=>e(0),isShownByDefault:!0,children:(0,i.jsx)(c.SelectControl,{label:(0,r.__)("Link to","woocommerce"),value:t,options:[{label:o.default,value:0},...a.map(e=>({label:(0,n.Ef)(e,a),value:parseInt(e.id,10)}))],onChange:t=>e(parseInt(t,10))})})}):null}},7971:(e,t,o)=>{"use strict";o.d(t,{A:()=>_});var r=o(4921),s=o(27723),c=o(84114),n=o(68420),i=o(56427),a=o(29491),l=o(86087),d=o(58326),u=o(51258),m=o(64342),p=o(3355),h=o(83250),g=(o(12663),o(10790));const w=e=>({...(0,h.ZK)(e),id:-e.id,parent:0}),_=(0,a.withInstanceId)(({onChange:e,onOperatorChange:t,instanceId:o,isCompact:a=!1,messages:_={},operator:b="any",selected:x,type:f="text"})=>{const{errorLoadingAttributes:y,isLoadingAttributes:v,productsAttributes:k}=function(e){const[t,o]=(0,l.useState)(null),[r,s]=(0,l.useState)(!1),[c,n]=(0,l.useState)([]),i=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(!r&&!i.current)return async function(){s(!0);try{const e=await(0,d.gu)(),t=[];for(const o of e){const e=await(0,d.Sl)(o.id);t.push({...o,parent:0,terms:e.map(e=>({...e,attr_slug:o.taxonomy,parent:o.id}))})}n(t),i.current=!0}catch(e){e instanceof Error&&o(await(0,u.W)(e))}finally{s(!1)}}(),()=>{i.current=!0}},[r,e]),{errorLoadingAttributes:t,isLoadingAttributes:r,productsAttributes:c}}(!0),j=k.reduce((e,t)=>{const{terms:o,...r}=t;return[...e,w(r),...o.map(e=>((e,t)=>({...(0,h.ZK)(e),parent:-t}))(e,r.id))]},[]);return _={clear:(0,s.__)("Clear all product attributes","woocommerce"),noItems:(0,s.__)("Your store doesn't have any product attributes.","woocommerce"),search:(0,s.__)("Search for product attributes","woocommerce"),selected:e=>(0,s.sprintf)(/* translators: %d is the count of attributes selected. */ /* translators: %d is the count of attributes selected. */ (0,s._n)("%d attribute selected","%d attributes selected",e,"woocommerce"),e),updated:(0,s.__)("Product attribute search results updated.","woocommerce"),..._},y?(0,g.jsx)(m.A,{error:y}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(n.W,{className:"woocommerce-product-attributes",isCompact:a,isHierarchical:!0,isLoading:v,isSingle:!1,list:j,messages:_,onChange:e,renderItem:e=>{const{item:t,search:n,depth:i=0}=e,a=t.count||0,l=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":n.length>0,"is-skip-level":0===i&&0!==t.parent}];if(!t.breadcrumbs.length)return(0,g.jsx)(p.A,{...e,className:(0,r.A)(l),item:t,isLoading:v,isSelectable:!1,disabled:0===t.count,name:`attributes-${o}`,countLabel:(0,s.sprintf)(/* translators: %d is the count of terms. */ /* translators: %d is the count of terms. */ (0,s._n)("%d term","%d terms",a,"woocommerce"),a),"aria-label":(0,s.sprintf)(/* translators: %1$s is the item name, %2$d is the count of terms for the item. */ /* translators: %1$s is the item name, %2$d is the count of terms for the item. */ (0,s._n)("%1$s, has %2$d term","%1$s, has %2$d terms",a,"woocommerce"),t.name,a)});const d=`${t.breadcrumbs[0]}: ${t.name}`;return(0,g.jsx)(c.s,{...e,name:`terms-${o}`,className:(0,r.A)(...l,"has-count"),countLabel:(0,s.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */ (0,s._n)("%d product","%d products",a,"woocommerce"),a),"aria-label":(0,s.sprintf)(/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ /* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ (0,s._n)("%1$s, has %2$d product","%1$s, has %2$d products",a,"woocommerce"),d,a)})},selected:x.map(({id:e})=>j.find(t=>t.id===e)).filter(Boolean),type:f}),!!t&&(0,g.jsx)("div",{hidden:x.length<2,children:(0,g.jsx)(i.SelectControl,{className:"woocommerce-product-attributes__operator",label:(0,s.__)("Display products matching","woocommerce"),help:(0,s.__)("Pick at least two attributes to use this setting.","woocommerce"),value:b,onChange:t,options:[{label:(0,s.__)("Any selected attributes","woocommerce"),value:"any"},{label:(0,s.__)("All selected attributes","woocommerce"),value:"all"}]})})]})})},50376:(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var r=o(27723),s=o(84114),c=o(68420),n=o(56427),i=o(86087),a=o(58326),l=o(51258),d=o(10790);var u=o(64342),m=o(4921),p=o(50715);o(66982);const h=(g=({categories:e=[],error:t=null,isLoading:o=!1,onChange:i,onOperatorChange:a,operator:l="any",selected:h,isCompact:g=!1,isSingle:w=!1,showReviewCount:_})=>{const b={clear:(0,r.__)("Clear all product categories","woocommerce"),list:(0,r.__)("Product Categories","woocommerce"),noItems:(0,r.__)("Your store doesn't have any product categories.","woocommerce"),search:(0,r.__)("Search for product categories","woocommerce"),selected:e=>(0,r.sprintf)(/* translators: %d is the count of selected categories. */ /* translators: %d is the count of selected categories. */ (0,r._n)("%d category selected","%d categories selected",e,"woocommerce"),e),updated:(0,r.__)("Category search results updated.","woocommerce")};if(t)return(0,d.jsx)(u.A,{error:t});const x=e.map(p.vL);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c.W,{className:"woocommerce-product-categories",list:x,isLoading:o,selected:x.filter(({id:e})=>h.includes(Number(e))),onChange:i,renderItem:e=>{const{item:t,search:o,depth:c=0}=e,n=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,i=_?(0,r.sprintf)(/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ /* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ (0,r._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.details?.review_count||0,"woocommerce"),n,t.details?.review_count||0):(0,r.sprintf)(/* translators: %1$s is the item name, %2$d is the count of products for the item. */ /* translators: %1$s is the item name, %2$d is the count of products for the item. */ (0,r._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.details?.count||0,"woocommerce"),n,t.details?.count||0),a=_?(0,r.sprintf)(/* translators: %d is the count of reviews. */ /* translators: %d is the count of reviews. */ (0,r._n)("%d review","%d reviews",t.details?.review_count||0,"woocommerce"),t.details?.review_count||0):(0,r.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */ (0,r._n)("%d product","%d products",t.details?.count||0,"woocommerce"),t.details?.count||0);return(0,d.jsx)(s.s,{className:(0,m.A)("woocommerce-product-categories__item","has-count",{"is-searching":o.length>0,"is-skip-level":0===c&&0!==t.parent}),...e,countLabel:a,"aria-label":i})},messages:b,isCompact:g,isHierarchical:!0,isSingle:w}),!!a&&(0,d.jsx)("div",{hidden:h.length<2,children:(0,d.jsx)(n.SelectControl,{className:"woocommerce-product-categories__operator",label:(0,r.__)("Display products matching","woocommerce"),help:(0,r.__)("Pick at least two categories to use this setting.","woocommerce"),value:l,onChange:a,options:[{label:(0,r.__)("Any selected categories","woocommerce"),value:"any"},{label:(0,r.__)("All selected categories","woocommerce"),value:"all"}]})})]})},({selected:e,...t})=>{const[o,r]=(0,i.useState)(!0),[s,c]=(0,i.useState)(null),[n,u]=(0,i.useState)([]),m=async e=>{const t=await(0,l.W)(e);c(t),r(!1)},p=(0,i.useRef)(e);return(0,i.useEffect)(()=>{(0,a.bW)({selected:p.current}).then(e=>{u(e),r(!1)}).catch(m)},[p]),(0,d.jsx)(g,{...t,selected:e,error:s,categories:n,isLoading:o})});var g},1041:(e,t,o)=>{"use strict";o.d(t,{A:()=>v});var r=o(27723),s=o(73993),c=o(84114),n=o(68420),i=o(29491),a=o(10790);var l=o(67580),d=o(86087),u=o(20923),m=o.n(u),p=o(58326),h=o(51258);const g=(0,i.createHigherOrderComponent)(e=>{class t extends d.Component{state={error:null,loading:!1,variations:{},totalVariations:{}};componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:o,showVariations:r}=this.props;r&&(!m()(e.selected,o)||e.isLoading&&!t)&&this.loadVariations()}loadVariations=({offset:e=0}={})=>{const{products:t}=this.props,{loading:o,variations:r,totalVariations:s}=this.state;if(o)return;const c=this.getExpandedProduct();if(!c)return;if(!e&&r?.[c])return;if(r?.[c]&&s?.[c]&&r[c].length>=s[c])return;const n=t.find(e=>e.id===c);if(!n?.variations||0===n.variations.length)return void this.setState({variations:{...this.state.variations,[c]:null},loading:!1,error:null});this.setState({loading:!0});const i=this.state.variations[c]||[];(0,p.q3)(c,{offset:e}).then(({variations:e,total:t})=>{const o=e.map(e=>({...e,parent:c}));this.setState({variations:{...this.state.variations,[c]:[...i,...o]},totalVariations:{...this.state.totalVariations,[c]:t},loading:!1,error:null})}).catch(async e=>{const t=await(0,h.W)(e);this.setState({variations:{...this.state.variations,[c]:null},totalVariations:{...this.state.totalVariations,[c]:null},loading:!1,error:t})})};isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props,o=t.filter(t=>t.variations&&t.variations.find(({id:t})=>t===e));return o[0]?.id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:o}=this.props;if(!o)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:!this.prevSelectedItem||e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:o}=this.props,{error:r,loading:s,variations:c,totalVariations:n}=this.state,i=this.getExpandedProduct(),l=i&&c[i]?.length||0;return(0,a.jsx)(e,{...this.props,error:r||t,onLoadMoreVariations:()=>this.loadVariations({offset:l}),expandedProduct:this.getExpandedProduct(),isLoading:o,totalVariations:n,variations:c,variationsLoading:s})}}return t},"withProductVariations");var w=o(50715),_=o(64342),b=o(4921),x=o(3355),f=(o(20415),o(52258));const y={list:(0,r.__)("Products","woocommerce"),noItems:(0,r.__)("Your store doesn't have any products.","woocommerce"),search:(0,r.__)("Search for a product to display","woocommerce"),updated:(0,r.__)("Product search results updated.","woocommerce")},v=(k=(0,l.A)(g((0,i.withInstanceId)(e=>{const{expandedProduct:t=null,error:o,instanceId:i,isCompact:l=!1,isLoading:d,onChange:u,onLoadMoreVariations:m,totalVariations:p,onSearch:h,products:g,renderItem:v,selected:k=[],showVariations:j=!1,variations:C,variationsLoading:S}=e;if(o)return(0,a.jsx)(_.A,{error:o});const A=[...g,...C&&t&&C[t]?C[t]:[]].map(w.vh);return(0,a.jsx)(n.W,{className:"woocommerce-products",list:A,isCompact:l,isLoading:d,isSingle:!0,selected:A.filter(({id:e})=>k.includes(Number(e))),onChange:u,loadMoreChildrenText:j?(0,r.__)("Load more variations","woocommerce"):void 0,onLoadMoreChildren:j?m:void 0,totalChildren:j?p:void 0,renderItem:v||(j?e=>{const{item:t,search:o,depth:n=0,isSelected:l,onSelect:u,useExpandedPanelId:m}=e,[p,h]=m??[null,()=>{}],g=(0,f.R7)(t,p),w=t.details?.variations&&Array.isArray(t.details.variations)?t.details.variations.length:0,_=(0,b.A)("woocommerce-search-product__item","woocommerce-search-list__item",`depth-${n}`,"has-count",{"is-searching":o.length>0,"is-skip-level":0===n&&0!==t.parent,"is-variable":w>0});if(!t.breadcrumbs.length){const o=t.details?.variations&&t.details.variations.length>0;return(0,a.jsx)(x.A,{...e,className:(0,b.A)(_,{"is-selected":l}),isSelected:l,item:t,onSelect:()=>()=>{u(t)(),g||h(t.id)},isLoading:d||S,countLabel:o?(0,r.sprintf)(/* translators: %1$d is the number of variations of a product product. */ /* translators: %1$d is the number of variations of a product product. */ (0,r.__)("%1$d variations","woocommerce"),t.details?.variations.length):null,name:`products-${i}`,"aria-label":o?(0,r.sprintf)(/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ /* translators: %1$s is the product name, %2$d is the number of variations of that product. */ (0,r._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.details?.variations?.length,"woocommerce"),t.name,t.details?.variations.length):void 0})}const y=(0,s.isEmpty)(t.details?.variation)?e:{...e,item:{...e.item,name:t.details?.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.details?.variation}`};return(0,a.jsx)(c.s,{...y,className:_,name:`variations-${i}`})}:void 0),onSearch:h,messages:{...y,...e.messages},isHierarchical:!0})}))),e=>{let{selected:t}=e;t=void 0===t?null:t;const o=null===t;return Array.isArray(t)?(0,a.jsx)(k,{...e}):(0,a.jsx)(k,{...e,selected:o?[]:[t]})});var k},11474:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(27723),s=o(56427),c=o(10790);const n=({value:e,setAttributes:t})=>(0,c.jsx)(s.SelectControl,{label:(0,r.__)("Order products by","woocommerce"),value:e,options:[{label:(0,r.__)("Newness - newest first","woocommerce"),value:"date"},{label:(0,r.__)("Price - low to high","woocommerce"),value:"price_asc"},{label:(0,r.__)("Price - high to low","woocommerce"),value:"price_desc"},{label:(0,r.__)("Rating - highest first","woocommerce"),value:"rating"},{label:(0,r.__)("Sales - most first","woocommerce"),value:"popularity"},{label:(0,r.__)("Title - alphabetical","woocommerce"),value:"title"},{label:(0,r.__)("Menu Order","woocommerce"),value:"menu_order"}],onChange:e=>t({orderby:e})})},16980:(e,t,o)=>{"use strict";o.d(t,{Nm:()=>a,fb:()=>p,p3:()=>i});var r=o(27723),s=o(4921),c=o(73993),n=o(10790);const i=e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0},a=e=>{if("review_count"in e){const t=(0,c.isNumber)(e.review_count)?e.review_count:parseInt(e.review_count,10);return Number.isFinite(t)&&t>0?t:0}if("rating_count"in e){const t=(0,c.isNumber)(e.rating_count)?e.rating_count:parseInt(e.rating_count,10);return Number.isFinite(t)&&t>0?t:0}return 0},l=e=>({width:e/5*100+"%"}),d=({className:e,parentClassName:t})=>{const o=l(0);return(0,n.jsxs)("div",{className:(0,s.A)(`${e}__norating-container`,`${t}-product-rating__norating-container`),children:[(0,n.jsx)("div",{className:`${e}__norating`,role:"img",children:(0,n.jsx)("span",{style:o})}),(0,n.jsx)("span",{children:(0,r.__)("No Reviews","woocommerce")})]})},u=e=>{const{className:t,rating:o,reviews:c,parentClassName:i}=e,a=l(o),d=(0,r.sprintf)(/* translators: %f is referring to the average rating value */ /* translators: %f is referring to the average rating value */ (0,r.__)("Rated %f out of 5","woocommerce"),o),u={__html:(0,r.sprintf)(/* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */ /* translators: %1$s is referring to the average rating value, %2$s is referring to the number of ratings */ (0,r._n)("Rated %1$s out of 5 based on %2$s customer rating","Rated %1$s out of 5 based on %2$s customer ratings",c,"woocommerce"),(0,r.sprintf)('<strong class="rating">%f</strong>',o),(0,r.sprintf)('<span class="rating">%d</span>',c))};return(0,n.jsx)("div",{className:(0,s.A)(`${t}__stars`,`${i}__product-rating__stars`),role:"img","aria-label":d,children:(0,n.jsx)("span",{style:a,dangerouslySetInnerHTML:u})})},m=e=>{const{className:t,reviews:o}=e,s=(0,r.sprintf)(/* translators: %s is referring to the total of reviews for a product */ /* translators: %s is referring to the total of reviews for a product */ (0,r._n)("(%s customer review)","(%s customer reviews)",o,"woocommerce"),o);return(0,n.jsx)("span",{className:`${t}__reviews_count`,children:s})},p=e=>{const{className:t="wc-block-components-product-rating",showReviewCount:o,showMockedReviews:r,parentClassName:c="",rating:i,reviews:a,styleProps:l,textAlign:p}=e,h=(0,s.A)(l.className,t,{[`${c}__product-rating`]:c,[`has-text-align-${p}`]:p}),g=r&&(0,n.jsx)(d,{className:t,parentClassName:c}),w=a?(0,n.jsx)(u,{className:t,rating:i,reviews:a,parentClassName:c}):g,_=a&&o;return(0,n.jsx)("div",{className:h,style:l.style,children:(0,n.jsxs)("div",{className:`${t}__container`,children:[w,_?(0,n.jsx)(m,{className:t,reviews:a}):null]})})}},84667:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(15703),c=o(86087),n=o(56427),i=o(10790);const a=(0,s.getSetting)("hideOutOfStockItems",!1),l=(0,s.getSetting)("stockStatusOptions",{}),d=({value:e,setAttributes:t})=>{const{outofstock:o,...s}=l,d=a?s:l,u=Object.entries(d).map(([e,t])=>({value:e,label:t})).filter(e=>!!e.label),m=Object.keys(d).filter(e=>!!e),[p,h]=(0,c.useState)(e||m);(0,c.useEffect)(()=>{t({stockStatus:["",...p]})},[p,t]);const g=(0,c.useCallback)(e=>{const t=p.includes(e),o=p.filter(t=>t!==e);t||(o.push(e),o.sort()),h(o)},[p]);return(0,i.jsx)(i.Fragment,{children:u.map(e=>{const t=p.includes(e.value)?/* translators: %s stock status. */ /* translators: %s stock status. */(0,r.__)('Stock status "%s" visible.',"woocommerce"):/* translators: %s stock status. */ /* translators: %s stock status. */(0,r.__)('Stock status "%s" hidden.',"woocommerce");return(0,i.jsx)(n.ToggleControl,{label:e.label,help:(0,r.sprintf)(t,e.label),checked:p.includes(e.value),onChange:()=>g(e.value)},e.value)})})}},6479:(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var r=o(27723),s=o(86087),c=o(68420),n=o(56427),i=o(15703),a=o(64347),l=o(84114),d=o(4921),u=o(10790);const m=({item:e,search:t,depth:o=0,...s})=>{const c=e.breadcrumbs.length?`${e.breadcrumbs.join(", ")}, ${e.name}`:e.name;return(0,u.jsx)(l.s,{className:(0,d.A)("woocommerce-product-tags__item","has-count",{"is-searching":t.length>0,"is-skip-level":0===o&&0!==e.parent}),item:e,search:t,depth:o,...s,ariaLabel:(0,r.sprintf)(/* translators: %1$d is the count of products, %2$s is the name of the tag. */ /* translators: %1$d is the count of products, %2$s is the name of the tag. */ (0,r._n)("%1$d product tagged as %2$s","%1$d products tagged as %2$s",e.count,"woocommerce"),e.count,c)})};var p=o(58326);o(69910);const h=({isCompact:e=!1,onChange:t,onOperatorChange:o,operator:l="any",selected:d})=>{const[h,g]=(0,s.useState)([]),[w,_]=(0,s.useState)(!0),[b,x]=(0,s.useState)(!1),f=(0,i.getSetting)("limitTags",!1),y=(0,s.useMemo)(()=>h.filter(e=>d.includes(e.id)),[h,d]),v=(0,s.useCallback)(e=>{_(!0),(0,p.rc)({selected:d,search:e}).then(e=>{g(e),_(!1)}).catch(()=>{_(!1)})},[d]);(0,s.useEffect)(()=>{b||(v(""),x(!0))},[v,b]);const k=(0,a.YQ)(v,400),j={clear:(0,r.__)("Clear all product tags","woocommerce"),list:(0,r.__)("Product Tags","woocommerce"),noItems:(0,r.__)("You have not set up any product tags on your store.","woocommerce"),search:(0,r.__)("Search for product tags","woocommerce"),selected:e=>(0,r.sprintf)(/* translators: %d is the count of selected tags. */ /* translators: %d is the count of selected tags. */ (0,r._n)("%d tag selected","%d tags selected",e,"woocommerce"),e),updated:(0,r.__)("Tag search results updated.","woocommerce")};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(c.W,{className:"woocommerce-product-tags",list:h,isLoading:w,selected:y,onChange:t,onSearch:f?k:void 0,renderItem:m,messages:j,isCompact:e,isHierarchical:!0,isSingle:!1}),!!o&&(0,u.jsx)("div",{hidden:d.length<2,children:(0,u.jsx)(n.SelectControl,{className:"woocommerce-product-tags__operator",label:(0,r.__)("Display products matching","woocommerce"),help:(0,r.__)("Pick at least two tags to use this setting.","woocommerce"),value:l,onChange:o,options:[{label:(0,r.__)("Any selected tags","woocommerce"),value:"any"},{label:(0,r.__)("All selected tags","woocommerce"),value:"all"}]})})]})}},9537:(e,t,o)=>{"use strict";o.d(t,{A:()=>d});var r=o(27723),s=o(68420),c=o(67580),n=o(64342),i=o(18537),a=o(50715),l=o(10790);const d=(0,c.A)(({error:e,onChange:t,onSearch:o,selected:c=[],products:d=[],isLoading:u=!0,isCompact:m=!1})=>{const p={clear:(0,r.__)("Clear all products","woocommerce"),noItems:(0,r.__)("Your store doesn't have any products.","woocommerce"),search:(0,r.__)("Search for products to display","woocommerce"),selected:e=>(0,r.sprintf)(/* translators: %d is the number of selected products. */ /* translators: %d is the number of selected products. */ (0,r._n)("%d product selected","%d products selected",e,"woocommerce"),e),updated:(0,r.__)("Product search results updated.","woocommerce")};if(e)return(0,l.jsx)(n.A,{error:e});const h=d.map(a.vh);return(0,l.jsx)(s.W,{className:"woocommerce-products",list:h.map(e=>{const t=e.details?.sku?" ("+e.details.sku+")":"";return{...e,name:`${(0,i.decodeEntities)(e.name)}${t}`}}),isCompact:m,isLoading:u,isSingle:!1,selected:h.filter(({details:e})=>!(!e||!Number.isSafeInteger(e.id))&&c.includes(e.id)),onSearch:o,onChange:t,messages:p})})},84114:(e,t,o)=>{"use strict";o.d(t,{s:()=>g,A:()=>w});var r=o(4921),s=o(56427),c=o(86087);function n(e,t,o){const r=new Set(t.map(e=>e[o]));return e.filter(e=>!r.has(e[o]))}var i=o(18537),a=o(52258),l=o(10790);const d=e=>{const t=e.children?.map(e=>[e,...d(e)]);return t?t.flat():[]},u=(e,t)=>d(e).some(e=>t.find(t=>t.id===e.id)),m=(e,t)=>d(e).every(e=>t.find(t=>t.id===e.id)),p=({label:e})=>(0,l.jsx)("span",{className:"woocommerce-search-list__item-count",children:e}),h=e=>{const{item:t,search:o}=e,r=t.breadcrumbs&&t.breadcrumbs.length;return(0,l.jsxs)("span",{className:"woocommerce-search-list__item-label",children:[r?(0,l.jsx)("span",{className:"woocommerce-search-list__item-prefix",children:(0,a.qw)(t.breadcrumbs)}):null,(0,l.jsx)("span",{className:"woocommerce-search-list__item-name",children:(0,a.Jl)((0,i.decodeEntities)(t.name),o)})]})},g=({countLabel:e,className:t,depth:o=0,controlId:g="",disabled:w=!1,item:_,isSelected:b,isSelectable:x=!0,isSingle:f,onSelect:y,search:v="",selected:k,useExpandedPanelId:j,...C})=>{const[S,A]=j,N=null!=e&&void 0!==_.count&&null!==_.count,P=!!_.breadcrumbs?.length,B=!!_.children?.length,I=(0,a.R7)(_,S),T=(0,r.A)(["woocommerce-search-list__item",`depth-${o}`,t],{"has-breadcrumbs":P,"has-children":B,"has-count":N,"is-expanded":I,"is-radio-button":f}),E=C.name||`search-list-item-${g}`,R=`${E}-${_.id}`,D=(0,c.useCallback)(()=>{I||"number"!=typeof _.id&&"string"!=typeof _.id?!_.parent||"number"!=typeof _.parent&&"string"!=typeof _.parent?A(null):A(_.parent):A(_.id)},[I,_.id,_.parent,A]),L=(b||!x)&&m(_,k);return B?(0,l.jsx)("div",{className:T,onClick:D,onKeyDown:e=>"Enter"===e.key||" "===e.key?D():null,role:"treeitem",tabIndex:0,children:f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{type:"radio",id:R,name:E,value:_.value,onChange:()=>{y(_)(),I||A(_.id)},onClick:e=>e.stopPropagation(),checked:b,disabled:w,className:"woocommerce-search-list__item-input",...C}),(0,l.jsx)(h,{item:_,search:v}),N?(0,l.jsx)(p,{label:e||_.count}):null]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.CheckboxControl,{className:"woocommerce-search-list__item-input",checked:L,disabled:w,indeterminate:!L&&(b||u(_,k)),label:(0,a.Jl)((0,i.decodeEntities)(_.name),v),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),onChange:()=>{const e=d(_),t=x?[_,...e]:[...e],o=m(_,k);x&&b||!x&&o?y(n(k,t,"id"))():(y(function(e,t){const o=n(t,e,"id");return[...e,...o]}(k,t))(),I||A(_.id))},__nextHasNoMarginBottom:!0}),N?(0,l.jsx)(p,{label:e||_.count}):null]})}):(0,l.jsxs)("div",{className:T,onClick:w?void 0:y(_),children:[f?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{...C,type:"radio",id:R,name:E,value:_.value,onChange:y(_),checked:b,disabled:w,className:"woocommerce-search-list__item-input",onClick:e=>e.stopPropagation()}),(0,l.jsx)("label",{htmlFor:R,children:(0,l.jsx)(h,{item:_,search:v})})]}):(0,l.jsx)(s.CheckboxControl,{...C,id:R,name:E,className:"woocommerce-search-list__item-input",value:(0,i.decodeEntities)(_.value),label:(0,a.Jl)((0,i.decodeEntities)(_.name),v),onChange:()=>{y(_)(),I||A(_.id)},checked:b,disabled:w,__nextHasNoMarginBottom:!0,onClick:e=>e.stopPropagation()}),N?(0,l.jsx)(p,{label:e||_.count}):null]})},w=g},68420:(e,t,o)=>{"use strict";o.d(t,{W:()=>v});var r=o(27723),s=o(56427),c=o(86087),n=o(93450),i=o(19432),a=o(4921),l=o(29491),d=o(52258),u=o(84114),m=o(10790),p=o(5573),h=(0,m.jsx)(p.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,m.jsx)(p.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm3.8 10.7-1.1 1.1-2.7-2.7-2.7 2.7-1.1-1.1 2.7-2.7-2.7-2.7 1.1-1.1 2.7 2.7 2.7-2.7 1.1 1.1-2.7 2.7 2.7 2.7Z"})}),g=o(18537);o(75022);const w=({id:e,label:t,popoverContents:o,remove:i,screenReaderLabel:d,className:u=""})=>{const[p,_]=(0,c.useState)(!1),b=(0,l.useInstanceId)(w);if(d=d||t,!t)return null;t=(0,g.decodeEntities)(t);const x=(0,a.A)("woocommerce-tag",u,{"has-remove":!!i}),f=`woocommerce-tag__label-${b}`,y=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("span",{className:"screen-reader-text",children:d}),(0,m.jsx)("span",{"aria-hidden":"true",children:t})]});return(0,m.jsxs)("span",{className:x,children:[o?(0,m.jsx)(s.Button,{className:"woocommerce-tag__text",id:f,onClick:()=>_(!0),children:y}):(0,m.jsx)("span",{className:"woocommerce-tag__text",id:f,children:y}),o&&p&&(0,m.jsx)(s.Popover,{onClose:()=>_(!1),children:o}),i&&(0,m.jsx)(s.Button,{className:"woocommerce-tag__remove",onClick:i(e),label:(0,r.sprintf)( // Translators: %s label. // Translators: %s label. (0,r.__)("Remove %s","woocommerce"),t),"aria-describedby":f,children:(0,m.jsx)(n.A,{icon:h,size:20,className:"clear-icon",role:"img"})})]})},_=w;o(71939);const b=e=>(0,m.jsx)(u.A,{...e}),x=e=>{const{list:t,selected:o,renderItem:s,depth:n=0,loadMoreChildrenText:i,onLoadMoreChildren:a,totalChildren:l,onSelect:u,instanceId:p,isSingle:h,search:g,useExpandedPanelId:w}=e,[_]=w;return t?(0,m.jsx)(m.Fragment,{children:t.map(t=>{const b=t.children?.length??0,f=!!o.find(({id:e})=>e===t.id),y=(0,d.R7)(t,_),v=l?.[t.id],k="number"==typeof v&&b<v;return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsx)("li",{children:s({item:t,isSelected:f,onSelect:u,isSingle:h,selected:o,search:g,depth:n,useExpandedPanelId:w,controlId:p})}),y?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(x,{...e,list:t.children,depth:n+1}),a&&k?(0,m.jsx)("li",{children:(0,m.jsx)("button",{type:"button",className:"woocommerce-search-list__item woocommerce-search-list__item-load-more",onClick:()=>a(),children:i||(0,r.__)("Load more","woocommerce")})}):null]}):null]},t.id)})}):null},f=({isLoading:e,isSingle:t,selected:o,messages:c,onChange:n,onRemove:i})=>{if(e||t||!o)return null;const a=o.length;return(0,m.jsxs)("div",{className:"woocommerce-search-list__selected",children:[(0,m.jsxs)("div",{className:"woocommerce-search-list__selected-header",children:[(0,m.jsx)("strong",{children:c.selected(a)}),a>0?(0,m.jsx)(s.Button,{variant:"link",isDestructive:!0,onClick:()=>n([]),"aria-label":c.clear,children:(0,r.__)("Clear all","woocommerce")}):null]}),a>0?(0,m.jsx)("ul",{children:o.map((e,t)=>(0,m.jsx)("li",{children:(0,m.jsx)(_,{label:e.name,id:e.id,remove:i})},t))}):null]})},y=({filteredList:e,search:t,onSelect:o,instanceId:s,useExpandedPanelId:c,...a})=>{const{messages:l,renderItem:d,selected:u,isSingle:p,loadMoreChildrenText:h,onLoadMoreChildren:g,totalChildren:w}=a,_=d||b;return 0===e.length?(0,m.jsxs)("div",{className:"woocommerce-search-list__list is-not-found",children:[(0,m.jsx)("span",{className:"woocommerce-search-list__not-found-icon",children:(0,m.jsx)(n.A,{icon:i.A,role:"img"})}),(0,m.jsx)("span",{className:"woocommerce-search-list__not-found-text",children:t?(0,r.sprintf)(l.noResults,t):l.noItems})]}):(0,m.jsx)("ul",{className:"woocommerce-search-list__list",children:(0,m.jsx)(x,{useExpandedPanelId:c,list:e,selected:u,renderItem:_,loadMoreChildrenText:h,onLoadMoreChildren:g,totalChildren:w,onSelect:o,instanceId:s,isSingle:p,search:t})})},v=e=>{const{className:t="",isCompact:o,isHierarchical:n,isLoading:i,isSingle:u,list:p,messages:h=d.kg,onChange:g,onSearch:w,selected:_,type:b="text",debouncedSpeak:x}=e,[k,j]=(0,c.useState)(""),C=(0,c.useState)(null),S=(0,l.useInstanceId)(v),A=(0,c.useMemo)(()=>({...d.kg,...h}),[h]),N=(0,c.useMemo)(()=>(0,d.GG)(p,k,n),[p,k,n]);(0,c.useEffect)(()=>{x&&x(A.updated)},[x,A]),(0,c.useEffect)(()=>{"function"==typeof w&&w(k)},[k,w]);const P=(0,c.useCallback)(e=>()=>{u&&g([]);const t=_.findIndex(({id:t})=>t===e);g([..._.slice(0,t),..._.slice(t+1)])},[u,_,g]),B=(0,c.useCallback)(e=>()=>{Array.isArray(e)?g(e):-1===_.findIndex(({id:t})=>t===e.id)?g(u?[e]:[..._,e]):P(e.id)()},[u,P,g,_]),I=(0,c.useCallback)(e=>{const[t]=_.filter(t=>!e.find(e=>t.id===e.id));P(t.id)()},[P,_]);return(0,m.jsxs)("div",{className:(0,a.A)("woocommerce-search-list",t,{"is-compact":o,"is-loading":i,"is-token":"token"===b}),children:["text"===b&&(0,m.jsx)(f,{...e,onRemove:P,messages:A}),(0,m.jsx)("div",{className:"woocommerce-search-list__search",children:"text"===b?(0,m.jsx)(s.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:A.search,type:"search",value:k,onChange:e=>j(e)}):(0,m.jsx)(s.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:i,label:A.search,onChange:I,onInputChange:e=>j(e),suggestions:[],__experimentalValidateInput:()=>!1,value:i?[(0,r.__)("Loading…","woocommerce")]:_.map(e=>({...e,value:e.name})),__experimentalShowHowTo:!1})}),i?(0,m.jsx)("div",{className:"woocommerce-search-list__list",children:(0,m.jsx)(s.Spinner,{})}):(0,m.jsx)(y,{...e,search:k,filteredList:N,messages:A,onSelect:B,instanceId:S,useExpandedPanelId:C})]})};(0,s.withSpokenMessages)(v)},52258:(e,t,o)=>{"use strict";o.d(t,{kg:()=>n,qw:()=>u,GG:()=>l,Jl:()=>d,R7:()=>i});var r=o(86087),s=o(27723),c=o(10790);const n={clear:(0,s.__)("Clear all selected items","woocommerce"),noItems:(0,s.__)("No items found.","woocommerce"), /* Translators: %s search term */ noResults:(0,s.__)("No results for %s","woocommerce"),search:(0,s.__)("Search for items","woocommerce"),selected:e=>(0,s.sprintf)(/* translators: Number of items selected from list. */ /* translators: Number of items selected from list. */ (0,s._n)("%d item selected","%d items selected",e,"woocommerce"),e),updated:(0,s.__)("Search results updated.","woocommerce")},i=(e,t)=>null!==t&&(e.id===t||!!(Array.isArray(e.children)&&e.children.length>0)&&e.children.some(e=>i(e,t))),a=(e,t=e)=>{const o=e.reduce((e,t)=>{const o=t.parent||0;return e[o]||(e[o]=[]),e[o].push(t),e},{}),r=t.reduce((e,t)=>(e[String(t.id)]=t,e),{});const s=["0"],c=(e={})=>e.parent?[...c(r[e.parent]),e.name]:e.name?[e.name]:[],n=e=>e.map(e=>{const t=o[e.id];return s.push(""+e.id),{...e,breadcrumbs:c(r[e.parent]),children:t&&t.length?n(t):[]}}),i=n(o[0]||[]);return Object.entries(o).forEach(([e,t])=>{s.includes(e)||i.push(...n(t||[]))}),i},l=(e,t,o)=>{if(!t)return o?a(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),s=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return o?a(s,e):s},d=(e,t)=>{if(!t)return e;const o=new RegExp(`(${t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")})`,"ig");return e.split(o).map((e,t)=>o.test(e)?(0,c.jsx)("strong",{children:e},t):(0,c.jsx)(r.Fragment,{children:e},t))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},4731:(e,t,o)=>{"use strict";o.d(t,{u:()=>n});var r=o(56427),s=o(4921),c=(o(49969),o(10790));function n({children:e,className:t,actionLabel:o,onActionClick:n,status:i="info",...a}){return(0,c.jsx)(r.Notice,{...a,status:i,politeness:"polite",className:(0,s.$)("wc-block-editor-components-upgrade-downgrade-notice",t),actions:[{label:o,onClick:n,noDefaultClasses:!0,variant:"link"}],children:(0,c.jsx)("div",{className:"wc-block-editor-components-upgrade-downgrade-notice__text",children:e})})}},58326:(e,t,o)=>{"use strict";o.d(t,{Ef:()=>_,Fs:()=>g,Sl:()=>u,bW:()=>p,d$:()=>a,gu:()=>d,oo:()=>l,p7:()=>h,q3:()=>w,rc:()=>m});var r=o(93832),s=o(1455),c=o.n(s),n=o(15703),i=o(36352);const a=({selected:e=[],search:t="",queryArgs:o={}})=>{const s=(({selected:e=[],search:t="",queryArgs:o={}})=>{const s=i.r7.productCount>100&&e.length>0,c=[(0,r.addQueryArgs)("/wc/store/v1/products",{per_page:100,catalog_visibility:"any",search:t,orderby:"title",order:"asc",exclude:s?e:[],...o})];if(s){const t=Math.ceil(e.length/100);for(let o=1;o<=t;o++)c.push((0,r.addQueryArgs)("/wc/store/v1/products",{catalog_visibility:"any",include:e,per_page:100,page:o}))}return c})({selected:e,search:t,queryArgs:o});return Promise.all(s.map(e=>c()({path:e}))).then(e=>[...new Map(e.flatMap(e=>e.map(e=>[e.id,{...e,parent:0}]))).values()])},l=e=>c()({path:`/wc/store/v1/products/${e}`}),d=()=>c()({path:"wc/store/v1/products/attributes"}),u=e=>c()({path:`wc/store/v1/products/attributes/${e}/terms`}),m=({selected:e=[],search:t})=>{const o=(({selected:e=[],search:t})=>{const o=(0,n.getSetting)("limitTags",!1),s=[(0,r.addQueryArgs)("wc/store/v1/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:t})];return o&&e.length&&s.push((0,r.addQueryArgs)("wc/store/v1/products/tags",{include:e})),s})({selected:e,search:t});return Promise.all(o.map(e=>c()({path:e}))).then(e=>[...new Map(e.flatMap(e=>e.map(e=>[e.id,e]))).values()])},p=e=>c()({path:(0,r.addQueryArgs)("wc/store/v1/products/categories",{per_page:0,...e})}),h=e=>c()({path:`wc/store/v1/products/categories/${e}`}),g=e=>c()({path:(0,r.addQueryArgs)("wc/store/v1/products/brands",{per_page:0,...e})}),w=(e,t={})=>c()({path:(0,r.addQueryArgs)("wc/store/v1/products",{type:"variation",parent:e,orderby:"title",per_page:25,...t}),parse:!1}).then(e=>e.json().then(t=>{const o=e.headers.get("x-wp-total");return{variations:t,total:o?Number(o):null}})),_=(e,t)=>{if(!e.title.raw)return e.slug;const o=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(o?"":` - ${e.slug}`)}},98945:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var r=o(86087),s=o(29491),c=o(58326),n=o(51258),i=o(10790);const a=(0,s.createHigherOrderComponent)(e=>class extends r.Component{state={error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null};componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}loadProduct=()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(0,c.oo)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await(0,n.W)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))};render(){const{error:t,loading:o,product:r}=this.state;return(0,i.jsx)(e,{...this.props,error:t,getProduct:this.loadProduct,isLoading:o,product:r})}},"withProduct")},67580:(e,t,o)=>{"use strict";o.d(t,{A:()=>l});var r=o(86087),s=o(36352),c=o(58326),n=o(64347),i=o(51258),a=o(10790);const l=e=>({selected:t,...o})=>{const[l,d]=(0,r.useState)(!0),[u,m]=(0,r.useState)(null),[p,h]=(0,r.useState)([]),g=s.r7.productCount>100,w=async e=>{const t=await(0,i.W)(e);m(t),d(!1)},_=(0,r.useRef)(t);(0,r.useEffect)(()=>{(0,c.d$)({selected:_.current}).then(e=>{h(e),d(!1)}).catch(w)},[_]);const b=(0,n.YQ)(e=>{(0,c.d$)({selected:t,search:e}).then(e=>{h(e),d(!1)}).catch(w)},400),x=(0,r.useCallback)(e=>{d(!0),b(e)},[d,b]);return(0,a.jsx)(e,{...o,selected:t,error:u,products:p,isLoading:l,onSearch:g?x:null})}},49498:(e,t,o)=>{"use strict";o.d(t,{A:()=>n});var r=o(5573),s=o(10790);const c={warning:"#F0B849",error:"#CC1818",success:"#46B450",info:"#0073AA"},n=({status:e="warning",...t})=>(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...t,children:[(0,s.jsx)("path",{d:"M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z",stroke:c[e],strokeWidth:"1.5"}),(0,s.jsx)("path",{d:"M13 7H11V13H13V7Z",fill:c[e]}),(0,s.jsx)("path",{d:"M13 15H11V17H13V15Z",fill:c[e]})]})},45984:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",children:[(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5556 12.3333C19.0646 12.3333 18.6667 11.9354 18.6667 11.4444C18.6667 10.7372 18.3857 8.05893 17.8856 7.55883C17.3855 7.05873 16.7073 6.77778 16 6.77778C15.2928 6.77778 14.6145 7.05873 14.1144 7.55883C13.6143 8.05893 13.3333 10.7372 13.3333 11.4444C13.3333 11.9354 12.9354 12.3333 12.4445 12.3333C11.9535 12.3333 11.5556 11.9354 11.5556 11.4444C11.5556 10.2657 12.0238 7.13524 12.8573 6.30175C13.6908 5.46825 14.8213 5 16 5C17.1788 5 18.3092 5.46825 19.1427 6.30175C19.9762 7.13524 20.4445 10.2657 20.4445 11.4444C20.4445 11.9354 20.0465 12.3333 19.5556 12.3333Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 12C7.5 11.4477 7.94772 11 8.5 11H23.5C24.0523 11 24.5 11.4477 24.5 12V25.3333C24.5 25.8856 24.0523 26.3333 23.5 26.3333H8.5C7.94772 26.3333 7.5 25.8856 7.5 25.3333V12ZM9.5 13V24.3333H22.5V13H9.5Z",fill:"currentColor"})]})},22510:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",children:[(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4444 14.2222C12.9354 14.2222 13.3333 14.6202 13.3333 15.1111C13.3333 15.8183 13.6143 16.4966 14.1144 16.9967C14.6145 17.4968 15.2927 17.7778 16 17.7778C16.7072 17.7778 17.3855 17.4968 17.8856 16.9967C18.3857 16.4966 18.6667 15.8183 18.6667 15.1111C18.6667 14.6202 19.0646 14.2222 19.5555 14.2222C20.0465 14.2222 20.4444 14.6202 20.4444 15.1111C20.4444 16.2898 19.9762 17.4203 19.1427 18.2538C18.3092 19.0873 17.1787 19.5555 16 19.5555C14.8212 19.5555 13.6908 19.0873 12.8573 18.2538C12.0238 17.4203 11.5555 16.2898 11.5555 15.1111C11.5555 14.6202 11.9535 14.2222 12.4444 14.2222Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2408 6.68254C11.4307 6.46089 11.7081 6.33333 12 6.33333H20C20.2919 6.33333 20.5693 6.46089 20.7593 6.68254L24.7593 11.3492C25.0134 11.6457 25.0717 12.0631 24.9085 12.4179C24.7453 12.7727 24.3905 13 24 13H8.00001C7.60948 13 7.25469 12.7727 7.0915 12.4179C6.92832 12.0631 6.9866 11.6457 7.24076 11.3492L11.2408 6.68254ZM12.4599 8.33333L10.1742 11H21.8258L19.5401 8.33333H12.4599Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 12C7 11.4477 7.44772 11 8 11H24C24.5523 11 25 11.4477 25 12V25.3333C25 25.8856 24.5523 26.3333 24 26.3333H8C7.44772 26.3333 7 25.8856 7 25.3333V12ZM9 13V24.3333H23V13H9Z",fill:"currentColor"})]})},91925:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"none",children:[(0,s.jsx)("circle",{cx:"12.6667",cy:"24.6667",r:"2",fill:"currentColor"}),(0,s.jsx)("circle",{cx:"23.3333",cy:"24.6667",r:"2",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.28491 10.0356C9.47481 9.80216 9.75971 9.66667 10.0606 9.66667H25.3333C25.6232 9.66667 25.8989 9.79247 26.0888 10.0115C26.2787 10.2305 26.3643 10.5211 26.3233 10.8081L24.99 20.1414C24.9196 20.6341 24.4977 21 24 21H12C11.5261 21 11.1173 20.6674 11.0209 20.2034L9.08153 10.8701C9.02031 10.5755 9.09501 10.269 9.28491 10.0356ZM11.2898 11.6667L12.8136 19H23.1327L24.1803 11.6667H11.2898Z",fill:"currentColor"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.66669 6.66667C5.66669 6.11438 6.1144 5.66667 6.66669 5.66667H9.33335C9.81664 5.66667 10.2308 6.01229 10.3172 6.48778L11.0445 10.4878C11.1433 11.0312 10.7829 11.5517 10.2395 11.6505C9.69614 11.7493 9.17555 11.3889 9.07676 10.8456L8.49878 7.66667H6.66669C6.1144 7.66667 5.66669 7.21895 5.66669 6.66667Z",fill:"currentColor"})]})},10628:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})]})},58647:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M12 6a9.77 9.77 0 0 1 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0 1 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 0 1 0 5 2.5 2.5 0 0 1 0-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"})]})},88723:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",children:[(0,s.jsx)("path",{d:"M0 0h24v24H0z"}),(0,s.jsx)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2Z"})]})," "]})},71044:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M5 5.5H19C19.1326 5.5 19.2598 5.55268 19.3536 5.64645C19.4473 5.74021 19.5 5.86739 19.5 6V7.5C19.5 7.63261 19.4473 7.75979 19.3536 7.85355C19.2598 7.94732 19.1326 8 19 8H5C4.86739 8 4.74021 7.94732 4.64645 7.85355C4.55268 7.75979 4.5 7.63261 4.5 7.5V6C4.5 5.86739 4.55268 5.74021 4.64645 5.64645C4.74021 5.55268 4.86739 5.5 5 5.5V5.5ZM4 9.232C3.69597 9.05647 3.4435 8.804 3.26796 8.49997C3.09243 8.19594 3.00001 7.85106 3 7.5V6C3 5.46957 3.21071 4.96086 3.58579 4.58579C3.96086 4.21071 4.46957 4 5 4H19C19.5304 4 20.0391 4.21071 20.4142 4.58579C20.7893 4.96086 21 5.46957 21 6V7.5C21 7.85106 20.9076 8.19594 20.732 8.49997C20.5565 8.804 20.304 9.05647 20 9.232V18C20 18.5304 19.7893 19.0391 19.4142 19.4142C19.0391 19.7893 18.5304 20 18 20H6C5.46957 20 4.96086 19.7893 4.58579 19.4142C4.21071 19.0391 4 18.5304 4 18V9.232ZM5.5 9.5V18C5.5 18.1326 5.55268 18.2598 5.64645 18.3536C5.74021 18.4473 5.86739 18.5 6 18.5H18C18.1326 18.5 18.2598 18.4473 18.3536 18.3536C18.4473 18.2598 18.5 18.1326 18.5 18V9.5H5.5Z"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 13.25V11.75H16V13.25L8 13.25Z"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 16.25V14.75H16V16.25H8Z"})]})},55721:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=()=>(0,s.jsx)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.25 4C4.25 3.58579 4.58579 3.25 5 3.25L9.17284 3.25C9.37179 3.25 9.56258 3.32904 9.70324 3.46974L13.2877 7.05515L13.2893 7.05673C13.5844 7.35367 13.75 7.75532 13.75 8.17393C13.75 8.59255 13.5844 8.99419 13.2893 9.29114L12.7573 8.76246L13.2877 9.29272L10.2961 12.2851C10.1489 12.4325 9.97417 12.5494 9.78179 12.6292C9.58941 12.7089 9.38319 12.75 9.17493 12.75C8.96667 12.75 8.76045 12.7089 8.56807 12.6292C8.37575 12.5494 8.20104 12.4326 8.05392 12.2853L8.05378 12.2851L4.46991 8.7045C4.32911 8.56383 4.25 8.37296 4.25 8.17393V4ZM12.2253 8.23378L12.2257 8.23341C12.2412 8.21758 12.25 8.19622 12.25 8.17393C12.25 8.15164 12.2412 8.13029 12.2257 8.11446L12.2253 8.11409L8.86212 4.75H5.75V7.86307L9.11456 11.2246L9.11517 11.2252C9.12303 11.2331 9.13236 11.2393 9.14261 11.2436C9.15286 11.2478 9.16384 11.25 9.17493 11.25C9.18602 11.25 9.197 11.2478 9.20725 11.2436C9.2175 11.2393 9.22683 11.2331 9.23469 11.2252L9.23499 11.2249L12.2253 8.23378ZM12.9999 20H3.99988V18.5H12.9999V20ZM3.99988 16L19.9999 16V14.5L3.99988 14.5V16Z",fill:"currentColor"})})},76339:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsx)(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 10C7.10457 10 8 9.10457 8 8C8 6.89543 7.10457 6 6 6C4.89543 6 4 6.89543 4 8C4 9.10457 4.89543 10 6 10ZM20 8.75H11.1111V7.25L20 7.25V8.75ZM20 15.75L11.1111 15.75V14.25L20 14.25V15.75ZM8 15C8 16.1046 7.10457 17 6 17C4.89543 17 4 16.1046 4 15C4 13.8954 4.89543 13 6 13C7.10457 13 8 13.8954 8 15Z",fill:"currentColor"})})},47791:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"})]})},40177:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 19.375L4.5 7.625C4.5 7.55596 4.55596 7.5 4.625 7.5L16.375 7.5C16.444 7.5 16.5 7.55596 16.5 7.625L16.5 19.375C16.5 19.444 16.444 19.5 16.375 19.5L4.625 19.5C4.55596 19.5 4.5 19.444 4.5 19.375ZM4.625 21C3.72754 21 3 20.2725 3 19.375L3 7.625C3 6.72754 3.72754 6 4.625 6L16.375 6C17.2725 6 18 6.72754 18 7.625L18 19.375C18 20.2725 17.2725 21 16.375 21L4.625 21ZM19 3.75L8 3.75L8 2.25L19 2.25C20.5183 2.25 21.75 3.4796 21.75 4.99891L21.75 18L20.25 18L20.25 4.99891C20.25 4.30909 19.6909 3.75 19 3.75Z"})})},82490:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,s.jsx)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})]})},81475:(e,t,o)=>{"use strict";o.d(t,{A:()=>c});var r=o(5573),s=o(10790);const c=(0,s.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none",children:[(0,s.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,s.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),(0,s.jsx)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"})]})},64534:(e,t,o)=>{"use strict";o.d(t,{B:()=>g});var r=o(27723),s=o(36352),c=o(15703);const n={currency_code:c.SITE_CURRENCY.code,currency_symbol:c.SITE_CURRENCY.symbol,currency_minor_unit:c.SITE_CURRENCY.minorUnit,currency_decimal_separator:c.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:c.SITE_CURRENCY.thousandSeparator,currency_prefix:c.SITE_CURRENCY.prefix,currency_suffix:c.SITE_CURRENCY.suffix},i=(e,t=2)=>{const o=c.SITE_CURRENCY.minorUnit;if(o===t||!e)return e;const r=Math.pow(10,o);return(Math.round(parseInt(e,10)/Math.pow(10,t))*r).toString()},a=(0,c.getSetting)("localPickupEnabled",!1),l=(0,c.getSetting)("localPickupText",(0,r.__)("Local pickup","woocommerce")),d=(0,c.getSetting)("localPickupCost",""),u=a?(0,c.getSetting)("localPickupLocations",[]):[],m=u?Object.values(u).map((e,t)=>({...n,name:`${l} (${e.name})`,description:"",delivery_time:"",price:i(d,0)||"0",taxes:"0",rate_id:`pickup_location:${t+1}`,instance_id:t+1,meta_data:[{key:"pickup_location",value:e.name},{key:"pickup_address",value:e.formatted_address},{key:"pickup_details",value:e.details}],method_id:"pickup_location",selected:!1})):[],p=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:(0,r.__)("Shipping","woocommerce"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:(0,r._x)("Beanie with Logo","example product in Cart Block","woocommerce"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:(0,r._x)("Beanie","example product in Cart Block","woocommerce"),quantity:1}],shipping_rates:[{...n,name:(0,r.__)("Flat rate shipping","woocommerce"),description:"",delivery_time:"",price:i("500"),taxes:"0",rate_id:"flat_rate:0",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!1},{...n,name:(0,r.__)("Free shipping","woocommerce"),description:"",delivery_time:"",price:"0",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},...m]}],h=(0,c.getSetting)("displayCartPricesIncludingTax",!1),g={coupons:[],shipping_rates:(0,c.getSetting)("shippingMethodsExist",!1)||(0,c.getSetting)("localPickupEnabled",!1)?p:[],items:[{key:"1",id:1,type:"simple",quantity:2,catalog_visibility:"visible",name:(0,r.__)("Beanie","woocommerce"),summary:(0,r.__)("Beanie","woocommerce"),short_description:(0,r.__)("Warm hat for winter","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:10,src:s.sW+"previews/beanie.jpg",thumbnail:s.sW+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,r.__)("Color","woocommerce"),value:(0,r.__)("Yellow","woocommerce")},{attribute:(0,r.__)("Size","woocommerce"),value:(0,r.__)("Small","woocommerce")}],prices:{...n,price:i(h?"12000":"10000"),regular_price:i(h?"120":"100"),sale_price:i(h?"12000":"10000"),price_range:null,raw_prices:{precision:6,price:h?"12000000":"10000000",regular_price:h?"12000000":"10000000",sale_price:h?"12000000":"10000000"}},totals:{...n,line_subtotal:i("2000"),line_subtotal_tax:i("400"),line_total:i("2000"),line_total_tax:i("400")},extensions:{},item_data:[]},{key:"2",id:2,type:"simple",quantity:1,catalog_visibility:"visible",name:(0,r.__)("Cap","woocommerce"),summary:(0,r.__)("Cap","woocommerce"),short_description:(0,r.__)("Lightweight baseball cap","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",low_stock_remaining:null,permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,quantity_limits:{minimum:1,maximum:99,multiple_of:1,editable:!0},images:[{id:11,src:s.sW+"previews/cap.jpg",thumbnail:s.sW+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:(0,r.__)("Color","woocommerce"),value:(0,r.__)("Orange","woocommerce")}],prices:{...n,price:i(h?"2400":"2000"),regular_price:i(h?"2400":"2000"),sale_price:i(h?"2400":"2000"),price_range:null,raw_prices:{precision:6,price:h?"24000000":"20000000",regular_price:h?"24000000":"20000000",sale_price:h?"24000000":"20000000"}},totals:{...n,line_subtotal:i("2000"),line_subtotal_tax:i("400"),line_total:i("2000"),line_total_tax:i("400")},extensions:{},item_data:[]}],cross_sells:[{id:1,name:(0,r.__)("Polo","woocommerce"),slug:"polo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-polo",short_description:(0,r.__)("Polo","woocommerce"),description:(0,r.__)("Polo","woocommerce"),on_sale:!1,prices:{...n,price:i(h?"24000":"20000"),regular_price:i(h?"24000":"20000"),sale_price:i(h?"12000":"10000"),price_range:null},price_html:"",average_rating:"4.5",review_count:2,images:[{id:17,src:s.sW+"previews/polo.jpg",thumbnail:s.sW+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:2,name:(0,r.__)("Long Sleeve Tee","woocommerce"),slug:"long-sleeve-tee",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-long-sleeve-tee",short_description:(0,r.__)("Long Sleeve Tee","woocommerce"),description:(0,r.__)("Long Sleeve Tee","woocommerce"),on_sale:!1,prices:{...n,price:i(h?"30000":"25000"),regular_price:i(h?"30000":"25000"),sale_price:i(h?"30000":"25000"),price_range:null},price_html:"",average_rating:"4",review_count:2,images:[{id:17,src:s.sW+"previews/long-sleeve-tee.jpg",thumbnail:s.sW+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:3,name:(0,r.__)("Hoodie with Zipper","woocommerce"),slug:"hoodie-with-zipper",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-zipper",short_description:(0,r.__)("Hoodie with Zipper","woocommerce"),description:(0,r.__)("Hoodie with Zipper","woocommerce"),on_sale:!0,prices:{...n,price:i(h?"15000":"12500"),regular_price:i(h?"30000":"25000"),sale_price:i(h?"15000":"12500"),price_range:null},price_html:"",average_rating:"1",review_count:2,images:[{id:17,src:s.sW+"previews/hoodie-with-zipper.jpg",thumbnail:s.sW+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:4,name:(0,r.__)("Hoodie with Logo","woocommerce"),slug:"hoodie-with-logo",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-logo",short_description:(0,r.__)("Polo","woocommerce"),description:(0,r.__)("Polo","woocommerce"),on_sale:!1,prices:{...n,price:i(h?"4500":"4250"),regular_price:i(h?"4500":"4250"),sale_price:i(h?"4500":"4250"),price_range:null},price_html:"",average_rating:"5",review_count:2,images:[{id:17,src:s.sW+"previews/hoodie-with-logo.jpg",thumbnail:s.sW+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:5,name:(0,r.__)("Hoodie with Pocket","woocommerce"),slug:"hoodie-with-pocket",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-hoodie-with-pocket",short_description:(0,r.__)("Hoodie with Pocket","woocommerce"),description:(0,r.__)("Hoodie with Pocket","woocommerce"),on_sale:!0,prices:{...n,price:i(h?"3500":"3250"),regular_price:i(h?"4500":"4250"),sale_price:i(h?"3500":"3250"),price_range:null},price_html:"",average_rating:"3.75",review_count:4,images:[{id:17,src:s.sW+"previews/hoodie-with-pocket.jpg",thumbnail:s.sW+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}},{id:6,name:(0,r.__)("T-Shirt","woocommerce"),slug:"t-shirt",parent:0,type:"simple",variation:"",permalink:"https://example.org",sku:"woo-t-shirt",short_description:(0,r.__)("T-Shirt","woocommerce"),description:(0,r.__)("T-Shirt","woocommerce"),on_sale:!1,prices:{...n,price:i(h?"1800":"1500"),regular_price:i(h?"1800":"1500"),sale_price:i(h?"1800":"1500"),price_range:null},price_html:"",average_rating:"3",review_count:2,images:[{id:17,src:s.sW+"previews/tshirt.jpg",thumbnail:s.sW+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,add_to_cart:{text:"",description:"",url:"",minimum:1,maximum:99,multiple_of:1}}],fees:[{id:"fee",name:(0,r.__)("Fee","woocommerce"),totals:{...n,total:i("100"),total_tax:i("20")}}],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:s.h0,has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{...n,total_items:i("4000"),total_items_tax:i("800"),total_fees:i("100"),total_fees_tax:i("20"),total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:i("820"),total_price:i("4920"),tax_lines:[{name:(0,r.__)("Sales tax","woocommerce"),rate:"20%",price:i("820")}]},errors:[],payment_methods:["cod","bacs","cheque"],payment_requirements:["products"],extensions:{}}},99853:(e,t,o)=>{"use strict";o.d(t,{L:()=>c});var r=o(27723),s=o(36352);const c=[{id:1,name:(0,r.__)("Clothing","woocommerce"),slug:"clothing",parent:0,count:10,description:`<p>${(0,r.__)("Branded t-shirts, jumpers, pants and more!","woocommerce")}</p>\n`,image:{id:1,date_created:"2019-07-15T17:05:04",date_created_gmt:"2019-07-15T17:05:04",date_modified:"2019-07-15T17:05:04",date_modified_gmt:"2019-07-15T17:05:04",src:s.sW+"previews/collection.jpg",name:"",alt:""},permalink:"#"}]},53829:(e,t,o)=>{"use strict";o.d(t,{i:()=>s});var r=o(10790);const s=(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"},children:[(0,r.jsx)("title",{children:"Grid Block Preview"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),(0,r.jsx)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),(0,r.jsx)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"})]})},48841:(e,t,o)=>{"use strict";o.d(t,{h:()=>c});var r=o(27723),s=o(36352);const c=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:(0,r.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol" translate="no">$</span>7.99</span>',images:[{id:1,src:s.sW+"previews/pennant.jpg",thumbnail:s.sW+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,categories:[{id:1,name:"Decor",slug:"decor",link:"https://example.org"}],review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:(0,r.__)("Add to cart","woocommerce"),description:(0,r.__)("Add to cart","woocommerce")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},36352:(e,t,o)=>{"use strict";o.d(t,{Ay:()=>P,Hw:()=>j,AG:()=>b,f9:()=>m,Vo:()=>p,p1:()=>l,CD:()=>N,fO:()=>C,FS:()=>f,iI:()=>v,F7:()=>h,CJ:()=>A,pt:()=>S,pk:()=>d,G3:()=>x,h0:()=>g,Jn:()=>a,xj:()=>y,gu:()=>u,XK:()=>i,sW:()=>n,r7:()=>c,el:()=>B,Sc:()=>I});var r=o(15703),s=o(73993);const c=(0,r.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),n=c.pluginUrl+"assets/images/",i=c.pluginUrl+"assets/client/blocks/",a=r.STORE_PAGES.shop?.permalink,l=r.STORE_PAGES.checkout?.id,d=(r.STORE_PAGES.checkout,r.STORE_PAGES.privacy?.permalink),u=(r.STORE_PAGES.privacy,r.STORE_PAGES.terms?.permalink),m=(r.STORE_PAGES.terms,r.STORE_PAGES.cart?.id),p=r.STORE_PAGES.cart?.permalink,h=(r.STORE_PAGES.myaccount?.permalink?r.STORE_PAGES.myaccount.permalink:(0,r.getSetting)("wpLoginUrl","/wp-login.php"),(0,r.getSetting)("localPickupEnabled",!1)),g=((0,r.getSetting)("shippingMethodsExist",!1),(0,r.getSetting)("shippingEnabled",!0)),w=(0,r.getSettingWithCoercion)("countries",{},s.isObject),_=(0,r.getSetting)("countryData",{}),b=Object.fromEntries(Object.keys(_).filter(e=>!0===_[e].allowBilling).map(e=>{const t=w[e];return[e,(0,s.isString)(t)?t:""]})),x=Object.fromEntries(Object.keys(_).filter(e=>!0===_[e].allowShipping).map(e=>{const t=w[e];return[e,(0,s.isString)(t)?t:""]})),f={...b,...x},y=Object.fromEntries(Object.keys(f).map(e=>[e,_[e].states||{}])),v=Object.fromEntries(Object.keys(f).map(e=>[e,_[e].locale||{}])),k={address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]},j=(0,r.getSetting)("addressFieldsLocations",k).address,C=(0,r.getSetting)("addressFieldsLocations",k).contact,S=(0,r.getSetting)("addressFieldsLocations",k).order,A=(0,r.getSetting)("additionalOrderFields",{}),N=(0,r.getSetting)("additionalContactFields",{}),P=(0,r.getSetting)("additionalAddressFields",{}),B=()=>{const{experimentalBlocksEnabled:e}=(0,r.getSetting)("wcBlocksConfig",{experimentalBlocksEnabled:!1});return e},I=()=>(0,r.getSetting)("experimentalWcRestApiV4",!1)},17560:(e,t,o)=>{"use strict";o.d(t,{F:()=>s});var r=o(86087);const s=(e,t)=>{const o=(0,r.useRef)(null);(0,r.useEffect)(()=>{let r=document.querySelector(".editor-styles-wrapper");if(!r){const e=document.querySelector(".edit-site-visual-editor__editor-canvas");if(!(e&&e instanceof HTMLIFrameElement))return;const t=e.contentDocument||e.contentWindow?.document;if(!t)return;r=t.querySelector(".editor-styles-wrapper")}if(!r)return;const s=window.getComputedStyle(r),c=s?.backgroundColor,n=s?.color;if(!c||!n)return;const i=`${e}-editor-theme-colors`;let a=r.querySelector(`#${i}`);a||(a=document.createElement("style"),a.id=i,r.appendChild(a)),o.current=a;const l=t({editorBackgroundColor:c,editorColor:n});a.textContent=l;const d=new MutationObserver(()=>{const e=window.getComputedStyle(r),s=e?.backgroundColor,i=e?.color;if(s!==c||i!==n){const e=t({editorBackgroundColor:s,editorColor:i});o.current&&(o.current.textContent=e)}});return d.observe(r,{attributes:!0,attributeFilter:["class"]}),()=>{d.disconnect(),o.current&&o.current.parentNode&&o.current.parentNode.removeChild(o.current)}},[t,e])}},95248:(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var r=o(47143);const s="woocommerce/product-type-template-state",c="SWITCH_PRODUCT_TYPE",n="SET_PRODUCT_TYPES",i="REGISTER_LISTENER",a="UNREGISTER_LISTENER",l=(0,o(15703).getSetting)("productTypes",{}),d=Object.keys(l).map(e=>({slug:e,label:l[e]})),u={productTypes:{list:d,current:d[0]?.slug},listeners:[]},m={switchProductType:e=>({type:c,current:e}),setProductTypes:e=>({type:n,productTypes:e}),registerListener:e=>({type:i,listener:e}),unregisterListener:e=>({type:a,listener:e})},p=(0,r.createReduxStore)(s,{reducer:(e=u,t)=>{switch(t.type){case n:return{...e,productTypes:{...e.productTypes,list:t.productTypes||[]}};case c:return{...e,productTypes:{...e.productTypes,current:t.current}};case i:return{...e,listeners:[...e.listeners,t.listener||""]};case a:return{...e,listeners:e.listeners.filter(e=>e!==t.listener)};default:return e}},actions:m,selectors:{getProductTypes:e=>e.productTypes.list,getCurrentProductType:e=>e.productTypes.list.find(t=>t.slug===e.productTypes.current),getRegisteredListeners:e=>e.listeners}});function h(){const{productTypes:e,current:t,registeredListeners:o}=(0,r.useSelect)(e=>{const{getProductTypes:t,getCurrentProductType:o,getRegisteredListeners:r}=e(p);return{productTypes:t(),current:o(),registeredListeners:r()}},[]),{switchProductType:s,registerListener:c,unregisterListener:n}=(0,r.useDispatch)(p);return{productTypes:e,current:t,set:s,registeredListeners:o,registerListener:c,unregisterListener:n}}(0,r.select)(s)||(0,r.register)(p)},62167:(e,t,o)=>{"use strict";o.d(t,{$:()=>s,u:()=>c});var r=o(61303);const s=(e=[],t,o,s="")=>{const c=e.filter(e=>e.attribute===o.taxonomy),n=c.length?c[0]:null;if(!(n&&n.slug&&Array.isArray(n.slug)&&n.slug.includes(s)))return;const i=n.slug.filter(e=>e!==s),a=e.filter(e=>e.attribute!==o.taxonomy);i.length>0&&(n.slug=i.sort(),a.push(n)),t((0,r.di)(a).asc("attribute"))},c=(e=[],t,o,s=[],c="in")=>{if(!o||!o.taxonomy)return[];const n=e.filter(e=>e.attribute!==o.taxonomy);return 0===s.length?t(n):(n.push({attribute:o.taxonomy,operator:c,slug:s.map(({slug:e})=>e).sort()}),t((0,r.di)(n).asc("attribute"))),n}},83250:(e,t,o)=>{"use strict";o.d(t,{OJ:()=>a,WK:()=>i,ZK:()=>n});var r=o(15703),s=o(73993);o(47143);const c=(0,r.getSetting)("attributes",[]).reduce((e,t)=>{const o=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label,orderby:r.attribute_orderby}:null;var r;return o&&o.id&&e.push(o),e},[]),n=e=>{const{count:t,id:o,name:r,parent:c}=e;return{count:t,id:o,name:r,parent:c,breadcrumbs:[],children:[],value:(0,s.isAttributeTerm)(e)?e.attr_slug:""}},i=e=>{if(e)return c.find(t=>t.id===e)},a=e=>{if(e)return c.find(t=>t.taxonomy===e)}},37848:(e,t,o)=>{"use strict";o.d(t,{CH:()=>d,Q:()=>u,Vf:()=>l,nD:()=>a,xB:()=>i});var r=o(93832),s=o(15703),c=o(73993);const n=(0,s.getSettingWithCoercion)("isRenderingPhpTemplate",!1,c.isBoolean),i="query_type_",a="filter_";function l(e){return window?(0,r.getQueryArg)(window.location.href,e):null}function d(e){if(n){const t=new URL(e);t.pathname=t.pathname.replace(/\/page\/[0-9]+/i,""),t.searchParams.delete("paged"),t.searchParams.forEach((e,o)=>{o.match(/^query(?:-[0-9]+)?-page$/)&&t.searchParams.delete(o)}),window.location.href=t.href}else window.history.replaceState({},"",e)}const u=e=>{const t=(0,r.getQueryArgs)(e);return(0,r.addQueryArgs)(e,t)}},34892:(e,t,o)=>{"use strict";o.d(t,{P:()=>r});const r=({blocks:e,findCondition:t})=>{for(const o of e){if(t(o))return o;if(o.innerBlocks){const e=r({blocks:o.innerBlocks,findCondition:t});if(e)return e}}}},8e3:(e,t,o)=>{"use strict";o.d(t,{F:()=>r,K:()=>s});const r=(e,t)=>{if(!e)return null;if(0===e.innerBlocks.length)return null;for(const o of e.innerBlocks){if(t(o))return o;const e=r(o,t);if(e)return e}return null},s=(e,t)=>r(e,function(e){return e.name===t})},48197:(e,t,o)=>{"use strict";function r(){return Math.floor(Math.random()*Date.now())}o.d(t,{I:()=>r})},72620:(e,t,o)=>{"use strict";o.d(t,{j:()=>r});const r=e=>{if("string"!=typeof e)return"";const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}},15937:(e,t,o)=>{"use strict";o.d(t,{I:()=>c});var r=o(47143),s=o(29283);const c=()=>{const e=(0,r.select)(s.Y),t=e?.getCurrentPostType?.();return"wp_template"===t||"wp_template_part"===t}},33079:(e,t,o)=>{"use strict";function r(e,t){const{[t]:o,...r}=e;return r}o.d(t,{X:()=>r})},50715:(e,t,o)=>{"use strict";o.d(t,{JI:()=>n,OW:()=>i,YS:()=>c,vL:()=>s,vh:()=>r});const r=e=>{const{id:t,name:o,parent:r}=e;return{id:t,name:o,parent:r,breadcrumbs:[],children:[],details:e,value:e.slug}},s=e=>{const{id:t,name:o,parent:r,count:s}=e;return{id:t,name:o,parent:r,count:s,breadcrumbs:[],children:[],details:e,value:e.slug}},c=e=>{const{id:t,name:o,parent:r,count:s}=e;return{id:t,name:o,parent:r,count:s,breadcrumbs:[],children:[],details:e,value:e.slug}};function n(e){return e&&e.images&&e.images.length&&e.images[0].src||""}function i(e){return e&&e.images&&e.images.length&&e.images[0].id||0}},88664:(e,t,o)=>{"use strict";o.d(t,{A:()=>c,K:()=>s});var r=o(15703);const s=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"],c={columns:{type:"number",default:(0,r.getSetting)("defaultColumns",3)},rows:{type:"number",default:(0,r.getSetting)("defaultRows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{image:!0,title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1},stockStatus:{type:"array",default:Object.keys((0,r.getSetting)("stockStatusOptions",[]))}}},38295:(e,t,o)=>{"use strict";o.d(t,{Bk:()=>i,G$:()=>n});var r=o(56004);const s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),c=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,n=(e,t,o="…",n=!0)=>{const i=s(e),a=i.split(" ").splice(0,t).join(" ");return a===i?n?(0,r.autop)(i):i:n?(0,r.autop)(c(a,o)):c(a,o)},i=(e,t,o=!0,n="…",i=!0)=>{const a=s(e),l=a.slice(0,t);if(l===a)return i?(0,r.autop)(a):a;if(o)return(0,r.autop)(c(l,n));const d=l.match(/([\s]+)/g),u=d?d.length:0,m=a.slice(0,t+u);return i?(0,r.autop)(c(m,n)):c(m,n)}},29283:(e,t,o)=>{"use strict";o.d(t,{Y:()=>r});const r="core/editor"},96153:(e,t,o)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const o="color: "+this.color;t.splice(1,0,o,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(s=r))}),t.splice(s,0,o)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=o(4048)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},4048:(e,t,o)=>{e.exports=function(e){function t(e){let o,s,c,n=null;function i(...e){if(!i.enabled)return;const r=i,s=Number(new Date),c=s-(o||s);r.diff=c,r.prev=o,r.curr=s,o=s,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let n=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(o,s)=>{if("%%"===o)return"%";n++;const c=t.formatters[s];if("function"==typeof c){const t=e[n];o=c.call(r,t),e.splice(n,1),n--}return o}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return i.namespace=e,i.useColors=t.useColors(),i.color=t.selectColor(e),i.extend=r,i.destroy=t.destroy,Object.defineProperty(i,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==n?n:(s!==t.namespaces&&(s=t.namespaces,c=t.enabled(e)),c),set:e=>{n=e}}),"function"==typeof t.init&&t.init(i),i}function r(e,o){const r=t(this.namespace+(void 0===o?":":o)+e);return r.log=this.log,r}function s(e,t){let o=0,r=0,s=-1,c=0;for(;o<e.length;)if(r<t.length&&(t[r]===e[o]||"*"===t[r]))"*"===t[r]?(s=r,c=o,r++):(o++,r++);else{if(-1===s)return!1;r=s+1,c++,o=c}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const o=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of o)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const o of t.skips)if(s(e,o))return!1;for(const o of t.names)if(s(e,o))return!0;return!1},t.humanize=o(94636),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(o=>{t[o]=e[o]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let o=0;for(let t=0;t<e.length;t++)o=(o<<5)-o+e.charCodeAt(t),o|=0;return t.colors[Math.abs(o)%t.colors.length]},t.enable(t.load()),t}},79571:(e,t,o)=>{"use strict";var r=o(22984);e.exports=function(e,t,o){o=o||{},9===t.nodeType&&(t=r.getWindow(t));var s=o.allowHorizontalScroll,c=o.onlyScrollIfNeeded,n=o.alignWithTop,i=o.alignWithLeft,a=o.offsetTop||0,l=o.offsetLeft||0,d=o.offsetBottom||0,u=o.offsetRight||0;s=void 0===s||s;var m=r.isWindow(t),p=r.offset(e),h=r.outerHeight(e),g=r.outerWidth(e),w=void 0,_=void 0,b=void 0,x=void 0,f=void 0,y=void 0,v=void 0,k=void 0,j=void 0,C=void 0;m?(v=t,C=r.height(v),j=r.width(v),k={left:r.scrollLeft(v),top:r.scrollTop(v)},f={left:p.left-k.left-l,top:p.top-k.top-a},y={left:p.left+g-(k.left+j)+u,top:p.top+h-(k.top+C)+d},x=k):(w=r.offset(t),_=t.clientHeight,b=t.clientWidth,x={left:t.scrollLeft,top:t.scrollTop},f={left:p.left-(w.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-l,top:p.top-(w.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-a},y={left:p.left+g-(w.left+b+(parseFloat(r.css(t,"borderRightWidth"))||0))+u,top:p.top+h-(w.top+_+(parseFloat(r.css(t,"borderBottomWidth"))||0))+d}),f.top<0||y.top>0?!0===n?r.scrollTop(t,x.top+f.top):!1===n?r.scrollTop(t,x.top+y.top):f.top<0?r.scrollTop(t,x.top+f.top):r.scrollTop(t,x.top+y.top):c||((n=void 0===n||!!n)?r.scrollTop(t,x.top+f.top):r.scrollTop(t,x.top+y.top)),s&&(f.left<0||y.left>0?!0===i?r.scrollLeft(t,x.left+f.left):!1===i?r.scrollLeft(t,x.left+y.left):f.left<0?r.scrollLeft(t,x.left+f.left):r.scrollLeft(t,x.left+y.left):c||((i=void 0===i||!!i)?r.scrollLeft(t,x.left+f.left):r.scrollLeft(t,x.left+y.left)))}},76406:(e,t,o)=>{"use strict";e.exports=o(79571)},22984:e=>{"use strict";var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function r(e,t){var o=e["page"+(t?"Y":"X")+"Offset"],r="scroll"+(t?"Top":"Left");if("number"!=typeof o){var s=e.document;"number"!=typeof(o=s.documentElement[r])&&(o=s.body[r])}return o}function s(e){return r(e)}function c(e){return r(e,!0)}function n(e){var t=function(e){var t,o=void 0,r=void 0,s=e.ownerDocument,c=s.body,n=s&&s.documentElement;return o=(t=e.getBoundingClientRect()).left,r=t.top,{left:o-=n.clientLeft||c.clientLeft||0,top:r-=n.clientTop||c.clientTop||0}}(e),o=e.ownerDocument,r=o.defaultView||o.parentWindow;return t.left+=s(r),t.top+=c(r),t}var i=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),a=/^(top|right|bottom|left)$/,l="currentStyle",d="runtimeStyle",u="left",m=void 0;function p(e,t){for(var o=0;o<e.length;o++)t(e[o])}function h(e){return"border-box"===m(e,"boxSizing")}"undefined"!=typeof window&&(m=window.getComputedStyle?function(e,t,o){var r="",s=e.ownerDocument,c=o||s.defaultView.getComputedStyle(e,null);return c&&(r=c.getPropertyValue(t)||c[t]),r}:function(e,t){var o=e[l]&&e[l][t];if(i.test(o)&&!a.test(t)){var r=e.style,s=r[u],c=e[d][u];e[d][u]=e[l][u],r[u]="fontSize"===t?"1em":o||0,o=r.pixelLeft+"px",r[u]=s,e[d][u]=c}return""===o?"auto":o});var g=["margin","border","padding"];function w(e,t,o){var r=0,s=void 0,c=void 0,n=void 0;for(c=0;c<t.length;c++)if(s=t[c])for(n=0;n<o.length;n++){var i;i="border"===s?s+o[n]+"Width":s+o[n],r+=parseFloat(m(e,i))||0}return r}function _(e){return null!=e&&e==e.window}var b={};function x(e,t,o){if(_(e))return"width"===t?b.viewportWidth(e):b.viewportHeight(e);if(9===e.nodeType)return"width"===t?b.docWidth(e):b.docHeight(e);var r="width"===t?["Left","Right"]:["Top","Bottom"],s="width"===t?e.offsetWidth:e.offsetHeight,c=(m(e),h(e)),n=0;(null==s||s<=0)&&(s=void 0,(null==(n=m(e,t))||Number(n)<0)&&(n=e.style[t]||0),n=parseFloat(n)||0),void 0===o&&(o=c?1:-1);var i=void 0!==s||c,a=s||n;if(-1===o)return i?a-w(e,["border","padding"],r):n;if(i){var l=2===o?-w(e,["border"],r):w(e,["margin"],r);return a+(1===o?0:l)}return n+w(e,g.slice(o),r)}p(["Width","Height"],function(e){b["doc"+e]=function(t){var o=t.document;return Math.max(o.documentElement["scroll"+e],o.body["scroll"+e],b["viewport"+e](o))},b["viewport"+e]=function(t){var o="client"+e,r=t.document,s=r.body,c=r.documentElement[o];return"CSS1Compat"===r.compatMode&&c||s&&s[o]||c}});var f={position:"absolute",visibility:"hidden",display:"block"};function y(e){var t=void 0,o=arguments;return 0!==e.offsetWidth?t=x.apply(void 0,o):function(e,r){var s={},c=e.style,n=void 0;for(n in r)r.hasOwnProperty(n)&&(s[n]=c[n],c[n]=r[n]);for(n in function(){t=x.apply(void 0,o)}.call(e),r)r.hasOwnProperty(n)&&(c[n]=s[n])}(e,f),t}function v(e,t,r){var s=r;if("object"!==(void 0===t?"undefined":o(t)))return void 0!==s?("number"==typeof s&&(s+="px"),void(e.style[t]=s)):m(e,t);for(var c in t)t.hasOwnProperty(c)&&v(e,c,t[c])}p(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);b["outer"+t]=function(t,o){return t&&y(t,e,o?0:1)};var o="width"===e?["Left","Right"]:["Top","Bottom"];b[e]=function(t,r){return void 0===r?t&&y(t,e,-1):t?(m(t),h(t)&&(r+=w(t,["padding","border"],o)),v(t,e,r)):void 0}}),e.exports=t({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return n(e);!function(e,t){"static"===v(e,"position")&&(e.style.position="relative");var o=n(e),r={},s=void 0,c=void 0;for(c in t)t.hasOwnProperty(c)&&(s=parseFloat(v(e,c))||0,r[c]=s+t[c]-o[c]);v(e,r)}(e,t)},isWindow:_,each:p,css:v,clone:function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);if(e.overflow)for(var o in e)e.hasOwnProperty(o)&&(t.overflow[o]=e.overflow[o]);return t},scrollLeft:function(e,t){if(_(e)){if(void 0===t)return s(e);window.scrollTo(t,c(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(_(e)){if(void 0===t)return c(e);window.scrollTo(s(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},b)},41142:(e,t,o)=>{"use strict";o.d(t,{a:()=>a});var r=o(51177);function s(e){return e.toLowerCase()}var c=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],n=/[^A-Z0-9]+/gi;function i(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(e,t){return e.replace(t,o)},e)}function a(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,r=void 0===o?c:o,a=t.stripRegexp,l=void 0===a?n:a,d=t.transform,u=void 0===d?s:d,m=t.delimiter,p=void 0===m?" ":m,h=i(i(e,r,"$1\0$2"),l,"\0"),g=0,w=h.length;"\0"===h.charAt(g);)g++;for(;"\0"===h.charAt(w-1);)w--;return h.slice(g,w).split("\0").map(u).join(p)}(e,(0,r.Cl)({delimiter:"."},t))}},11824:e=>{"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var r,s,c;if(Array.isArray(t)){if((r=t.length)!=o.length)return!1;for(s=r;0!==s--;)if(!e(t[s],o[s]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(s of t.entries())if(!o.has(s[0]))return!1;for(s of t.entries())if(!e(s[1],o.get(s[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(s of t.entries())if(!o.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((r=t.length)!=o.length)return!1;for(s=r;0!==s--;)if(t[s]!==o[s])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((r=(c=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(s=r;0!==s--;)if(!Object.prototype.hasOwnProperty.call(o,c[s]))return!1;for(s=r;0!==s--;){var n=c[s];if(!e(t[n],o[n]))return!1}return!0}return t!=t&&o!=o}},50364:()=>{},38878:()=>{},27316:()=>{},51189:()=>{},81986:()=>{},79556:()=>{},99835:()=>{},27545:()=>{},23081:()=>{},34053:()=>{},752:()=>{},14313:()=>{},14093:()=>{},1129:()=>{},33790:()=>{},83030:()=>{},53608:()=>{},41784:()=>{},77578:()=>{},45893:()=>{},46882:()=>{},9757:()=>{},64927:()=>{},60359:()=>{},32770:()=>{},11817:()=>{},26161:()=>{},36713:()=>{},86983:()=>{},29287:()=>{},73793:()=>{},37605:()=>{},3692:()=>{},8879:()=>{},92840:()=>{},2793:()=>{},81962:()=>{},90619:()=>{},48413:()=>{},36562:()=>{},44249:()=>{},98502:()=>{},49300:()=>{},97165:()=>{},90874:()=>{},94357:()=>{},16919:()=>{},99961:()=>{},97575:()=>{},18714:()=>{},86599:()=>{},86854:()=>{},13320:()=>{},40959:()=>{},8501:()=>{},25765:()=>{},79959:()=>{},47313:()=>{},95183:()=>{},56878:()=>{},48306:()=>{},99163:()=>{},22336:()=>{},9249:()=>{},31215:()=>{},42405:()=>{},47525:()=>{},58786:()=>{},94756:()=>{},1541:()=>{},98023:()=>{},44544:()=>{},63285:()=>{},42145:()=>{},14922:()=>{},42831:()=>{},94147:()=>{},85193:()=>{},9725:()=>{},87215:()=>{},67905:()=>{},9261:()=>{},9184:()=>{},70535:()=>{},74747:()=>{},17467:()=>{},43580:()=>{},42115:()=>{},65675:()=>{},69685:()=>{},30398:()=>{},2766:()=>{},77826:()=>{},47950:()=>{},28796:()=>{},71121:()=>{},62862:()=>{},40264:()=>{},56715:()=>{},94793:()=>{},89003:()=>{},86229:()=>{},62739:()=>{},25991:()=>{},86336:()=>{},1393:()=>{},37693:()=>{},76223:()=>{},65763:()=>{},6811:()=>{},76443:()=>{},84259:()=>{},33640:()=>{},9754:()=>{},72801:()=>{},25101:()=>{},21159:()=>{},88302:()=>{},72380:()=>{},76233:()=>{},6789:()=>{},91117:()=>{},97545:()=>{},90210:()=>{},76388:()=>{},9202:()=>{},70274:()=>{},16126:()=>{},93337:()=>{},67424:()=>{},23140:()=>{},39970:()=>{},61760:()=>{},28841:()=>{},20515:()=>{},48177:()=>{},94968:()=>{},65944:()=>{},64324:()=>{},2161:()=>{},88409:()=>{},44628:()=>{},91089:()=>{},15151:()=>{},65012:()=>{},83846:()=>{},31008:()=>{},84738:()=>{},39312:()=>{},54802:()=>{},57492:()=>{},11652:()=>{},91007:()=>{},31981:()=>{},42933:()=>{},24966:()=>{},97176:()=>{},24415:()=>{},63664:()=>{},13135:()=>{},21449:()=>{},61404:()=>{},48286:()=>{},74342:()=>{},46302:()=>{},36142:()=>{},23425:()=>{},69951:()=>{},87197:()=>{},24180:()=>{},95398:()=>{},57836:()=>{},42434:()=>{},99164:()=>{},75152:()=>{},14747:()=>{},34695:()=>{},92516:()=>{},88502:()=>{},14809:()=>{},41986:()=>{},27539:()=>{},71107:()=>{},28071:()=>{},88677:()=>{},40849:()=>{},58147:()=>{},12796:()=>{},13650:()=>{},63120:()=>{},84459:()=>{},34268:()=>{},96342:()=>{},12663:()=>{},2411:()=>{},66982:()=>{},20415:()=>{},69910:()=>{},71939:()=>{},54490:()=>{},75022:()=>{},49969:()=>{},41540:(e,t,o)=>{var r=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,n=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g,l="object"==typeof self&&self&&self.Object===Object&&self,d=a||l||Function("return this")(),u=Object.prototype.toString,m=Math.max,p=Math.min,h=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var o=c.test(e);return o||n.test(e)?i(e.slice(2),o?2:8):s.test(e)?NaN:+e}e.exports=function(e,t,o){var r,s,c,n,i,a,l=0,d=!1,u=!1,_=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=r,c=s;return r=s=void 0,l=t,n=e.apply(c,o)}function x(e){var o=e-a;return void 0===a||o>=t||o<0||u&&e-l>=c}function f(){var e=h();if(x(e))return y(e);i=setTimeout(f,function(e){var o=t-(e-a);return u?p(o,c-(e-l)):o}(e))}function y(e){return i=void 0,_&&r?b(e):(r=s=void 0,n)}function v(){var e=h(),o=x(e);if(r=arguments,s=this,a=e,o){if(void 0===i)return function(e){return l=e,i=setTimeout(f,t),d?b(e):n}(a);if(u)return i=setTimeout(f,t),b(a)}return void 0===i&&(i=setTimeout(f,t)),n}return t=w(t)||0,g(o)&&(d=!!o.leading,c=(u="maxWait"in o)?m(w(o.maxWait)||0,t):c,_="trailing"in o?!!o.trailing:_),v.cancel=function(){void 0!==i&&clearTimeout(i),l=0,r=a=s=i=void 0},v.flush=function(){return void 0===i?n:y(h())},v}},94636:e=>{var t=1e3,o=60*t,r=60*o,s=24*r,c=7*s;function n(e,t,o,r){var s=t>=1.5*o;return Math.round(e/o)+" "+r+(s?"s":"")}e.exports=function(e,i){i=i||{};var a,l,d=typeof e;if("string"===d&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(n){var i=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return i*c;case"days":case"day":case"d":return i*s;case"hours":case"hour":case"hrs":case"hr":case"h":return i*r;case"minutes":case"minute":case"mins":case"min":case"m":return i*o;case"seconds":case"second":case"secs":case"sec":case"s":return i*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}(e);if("number"===d&&isFinite(e))return i.long?(a=e,(l=Math.abs(a))>=s?n(a,l,s,"day"):l>=r?n(a,l,r,"hour"):l>=o?n(a,l,o,"minute"):l>=t?n(a,l,t,"second"):a+" ms"):function(e){var c=Math.abs(e);return c>=s?Math.round(e/s)+"d":c>=r?Math.round(e/r)+"h":c>=o?Math.round(e/o)+"m":c>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},67356:(e,t,o)=>{"use strict";o.d(t,{c:()=>c});var r=o(51177),s=o(41142);function c(e,t){return void 0===t&&(t={}),(0,s.a)(e,(0,r.Cl)({delimiter:"-"},t))}},64347:(e,t,o)=>{"use strict";o.d(t,{YQ:()=>s,d7:()=>i,dh:()=>a});var r=o(51609);function s(e,t,o){var s=this,c=(0,r.useRef)(null),n=(0,r.useRef)(0),i=(0,r.useRef)(null),a=(0,r.useRef)([]),l=(0,r.useRef)(),d=(0,r.useRef)(),u=(0,r.useRef)(e),m=(0,r.useRef)(!0);(0,r.useEffect)(function(){u.current=e},[e]);var p=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var h=!!(o=o||{}).leading,g=!("trailing"in o)||!!o.trailing,w="maxWait"in o,_=w?Math.max(+o.maxWait||0,t):null;(0,r.useEffect)(function(){return m.current=!0,function(){m.current=!1}},[]);var b=(0,r.useMemo)(function(){var e=function(e){var t=a.current,o=l.current;return a.current=l.current=null,n.current=e,d.current=u.current.apply(o,t)},o=function(e,t){p&&cancelAnimationFrame(i.current),i.current=p?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!m.current)return!1;var o=e-c.current;return!c.current||o>=t||o<0||w&&e-n.current>=_},b=function(t){return i.current=null,g&&a.current?e(t):(a.current=l.current=null,d.current)},x=function e(){var s=Date.now();if(r(s))return b(s);if(m.current){var i=t-(s-c.current),a=w?Math.min(i,_-(s-n.current)):i;o(e,a)}},f=function(){var u=Date.now(),p=r(u);if(a.current=[].slice.call(arguments),l.current=s,c.current=u,p){if(!i.current&&m.current)return n.current=c.current,o(x,t),h?e(c.current):d.current;if(w)return o(x,t),e(c.current)}return i.current||o(x,t),d.current};return f.cancel=function(){i.current&&(p?cancelAnimationFrame(i.current):clearTimeout(i.current)),n.current=0,a.current=c.current=l.current=i.current=null},f.isPending=function(){return!!i.current},f.flush=function(){return i.current?b(Date.now()):d.current},f},[h,w,t,_,g,p]);return b}function c(e,t){return e===t}function n(e){return"function"==typeof e?function(){return e}:e}function i(e,t,o){var i,a,l=o&&o.equalityFn||c,d=(i=(0,r.useState)(n(e)),a=i[1],[i[0],(0,r.useCallback)(function(e){return a(n(e))},[])]),u=d[0],m=d[1],p=s((0,r.useCallback)(function(e){return m(e)},[m]),t,o),h=(0,r.useRef)(e);return l(h.current,e)||(p(e),h.current=e),[u,p]}function a(e,t,o){var r=void 0===o?{}:o,c=r.leading,n=r.trailing;return s(e,t,{maxWait:t,leading:void 0===c||c,trailing:void 0===n||n})}},51609:e=>{"use strict";e.exports=window.React},10790:e=>{"use strict";e.exports=window.ReactJSXRuntime},71e3:e=>{"use strict";e.exports=window.wc.blocksCheckout},32679:e=>{"use strict";e.exports=window.wc.blocksCheckoutEvents},14656:e=>{"use strict";e.exports=window.wc.blocksComponents},40314:e=>{"use strict";e.exports=window.wc.data},70910:e=>{"use strict";e.exports=window.wc.priceFormat},42435:e=>{"use strict";e.exports=window.wc.sanitize},47594:e=>{"use strict";e.exports=window.wc.wcBlocksData},34083:e=>{"use strict";e.exports=window.wc.wcBlocksRegistry},62796:e=>{"use strict";e.exports=window.wc.wcBlocksSharedContext},41616:e=>{"use strict";e.exports=window.wc.wcBlocksSharedHocs},97529:e=>{"use strict";e.exports=window.wc.wcEntities},15703:e=>{"use strict";e.exports=window.wc.wcSettings},73993:e=>{"use strict";e.exports=window.wc.wcTypes},20195:e=>{"use strict";e.exports=window.wp.a11y},1455:e=>{"use strict";e.exports=window.wp.apiFetch},56004:e=>{"use strict";e.exports=window.wp.autop},94715:e=>{"use strict";e.exports=window.wp.blockEditor},74997:e=>{"use strict";e.exports=window.wp.blocks},56427:e=>{"use strict";e.exports=window.wp.components},29491:e=>{"use strict";e.exports=window.wp.compose},3582:e=>{"use strict";e.exports=window.wp.coreData},47143:e=>{"use strict";e.exports=window.wp.data},38443:e=>{"use strict";e.exports=window.wp.date},64040:e=>{"use strict";e.exports=window.wp.deprecated},28107:e=>{"use strict";e.exports=window.wp.dom},86087:e=>{"use strict";e.exports=window.wp.element},52619:e=>{"use strict";e.exports=window.wp.hooks},18537:e=>{"use strict";e.exports=window.wp.htmlEntities},27723:e=>{"use strict";e.exports=window.wp.i18n},20923:e=>{"use strict";e.exports=window.wp.isShallowEqual},48558:e=>{"use strict";e.exports=window.wp.keycodes},692:e=>{"use strict";e.exports=window.wp.notices},92279:e=>{"use strict";e.exports=window.wp.plugins},5573:e=>{"use strict";e.exports=window.wp.primitives},84871:e=>{"use strict";e.exports=window.wp.serverSideRender},93832:e=>{"use strict";e.exports=window.wp.url},65993:(e,t)=>{var o;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,c(o)))}return e}function c(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)r.call(e,o)&&e[o]&&(t=n(t,o));return t}function n(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(o=function(){return s}.apply(t,[]))||(e.exports=o)}()},51348:(e,t,o)=>{"use strict";o.d(t,{$:()=>Y});var r=o(51609),s=o.t(r,2),c=(0,r.createContext)(!0);function n(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function i(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function a(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var l,d="undefined"!=typeof window&&!!(null==(l=window.document)?void 0:l.createElement);function u(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function m(e,t=!1){var o;const{activeElement:r}=u(e);if(!(null==r?void 0:r.nodeName))return null;if("IFRAME"===r.tagName&&(null==(o=r.contentDocument)?void 0:o.body))return m(r.contentDocument.body,t);if(t){const e=r.getAttribute("aria-activedescendant");if(e){const t=u(r).getElementById(e);if(t)return t}}return r}function p(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==h.indexOf(e.type)}var h=["button","color","file","image","reset","submit"];var g={...s},w=(g.useId,g.useDeferredValue,g.useInsertionEffect),_=d?r.useLayoutEffect:r.useEffect;function b(e){const t=(0,r.useRef)(()=>{throw new Error("Cannot call an event handler while rendering.")});return w?w(()=>{t.current=e}):t.current=e,(0,r.useCallback)((...e)=>{var o;return null==(o=t.current)?void 0:o.call(t,...e)},[])}function x(...e){return(0,r.useMemo)(()=>{if(e.some(Boolean))return t=>{for(const o of e)a(o,t)}},e)}function f(e,t){const o=e=>{if("string"==typeof e)return e},[s,c]=(0,r.useState)(()=>o(t));return _(()=>{const r=e&&"current"in e?e.current:e;c((null==r?void 0:r.tagName.toLowerCase())||o(t))},[e,t]),s}function y(e,t,o){const s=e.onLoadedMetadataCapture,c=(0,r.useMemo)(()=>Object.assign(()=>{},s,...void 0!==o?[{[t]:o}]:[]),[s,t,o]);return[null==s?void 0:s[t],{onLoadedMetadataCapture:c}]}var v=o(10790);function k(e){const t=r.forwardRef((t,o)=>e({...t,ref:o}));return t.displayName=e.displayName||e.name,t}function j(e,t){const{wrapElement:o,render:s,...c}=t,i=x(t.ref,function(e){return function(e){return!!e&&!!(0,r.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e)?{...e.props}.ref||e.ref:null}(s));let a;if(r.isValidElement(s)){const e={...s.props,ref:i};a=r.cloneElement(s,function(e,t){const o={...e};for(const r in t){if(!n(t,r))continue;if("className"===r){const r="className";o[r]=e[r]?`${e[r]} ${t[r]}`:t[r];continue}if("style"===r){const r="style";o[r]=e[r]?{...e[r],...t[r]}:t[r];continue}const s=t[r];if("function"==typeof s&&r.startsWith("on")){const t=e[r];if("function"==typeof t){o[r]=(...e)=>{s(...e),t(...e)};continue}}o[r]=s}return o}(c,e))}else a=s?s(c):(0,v.jsx)(e,{...c});return o?o(a):a}function C(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function S(e){return e.target===e.currentTarget}function A(e,t){const o=new MouseEvent("click",t);return e.dispatchEvent(o)}function N(e,t,o,r){const s=(e=>{if(r){const t=setTimeout(e,r);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})(()=>{e.removeEventListener(t,c,!0),o()}),c=()=>{s(),o()};return e.addEventListener(t,c,{once:!0,capture:!0}),s}function P(e,t,o,r=window){const s=[];try{r.document.addEventListener(e,t,o);for(const c of Array.from(r.frames))s.push(P(e,t,o,c))}catch{}return()=>{try{r.document.removeEventListener(e,t,o)}catch{}for(const e of s)e()}}function B(e){return!!e.matches("input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])")&&!!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!e.closest("[inert]")}function I(e){const t=m(e);if(!t)return!1;if(t===e)return!0;const o=t.getAttribute("aria-activedescendant");return!!o&&o===e.id}var T=Symbol("accessibleWhenDisabled"),E=d&&!!d&&/mac|iphone|ipad|ipod/i.test(navigator.platform)&&/apple/i.test(navigator.vendor),R=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],D=["button","color","file","image","reset","submit"];function L({focusable:e,trulyDisabled:t,nativeTabbable:o,supportsDisabled:r,safariTabIndex:s,tabIndexProp:c}){return e?t?o&&!r?-1:void 0:o?s&&null==c?0:c:null!=c?c:0:c}function O(e,t){return b(o=>{null==e||e(o),o.defaultPrevented||t&&(o.stopPropagation(),o.preventDefault())})}var M=!1,V=!0;function F(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(V=!1))}function H(e){e.metaKey||e.ctrlKey||e.altKey||(V=!0)}var z=C(function({focusable:e=!0,accessibleWhenDisabled:t,autoFocus:o,onFocusVisible:s,...n}){const a=(0,r.useRef)(null),[l,d]=y(n,T,t);null!=t||(t=l),(0,r.useEffect)(()=>{e&&(M||(P("mousedown",F,!0),P("keydown",H,!0),M=!0))},[e]);const u=e&&i(n),m=!!u&&!t,[p,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{e&&m&&p&&h(!1)},[e,m,p]),(0,r.useEffect)(()=>{if(!e)return;if(!p)return;const t=a.current;if(!t)return;if("undefined"==typeof IntersectionObserver)return;const o=new IntersectionObserver(()=>{B(t)||h(!1)});return o.observe(t),()=>o.disconnect()},[e,p]);const g=O(n.onKeyPressCapture,u),w=O(n.onMouseDownCapture,u),_=O(n.onClickCapture,u),v=(t,o)=>{if(o&&(t.currentTarget=o),!e)return;const r=t.currentTarget;r&&I(r)&&(null==s||s(t),t.defaultPrevented||(r.dataset.focusVisible="true",h(!0)))},k=n.onKeyDownCapture,j=b(t=>{if(null==k||k(t),t.defaultPrevented)return;if(!e)return;if(p)return;if(t.metaKey)return;if(t.altKey)return;if(t.ctrlKey)return;if(!S(t))return;const o=t.currentTarget;N(o,"focusout",()=>v(t,o))}),C=n.onFocusCapture,A=b(t=>{if(null==C||C(t),t.defaultPrevented)return;if(!e)return;if(!S(t))return void h(!1);const o=t.currentTarget;V||function(e){const{tagName:t,readOnly:o,type:r}=e;return"TEXTAREA"===t&&!o||"SELECT"===t&&!o||("INPUT"!==t||o?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):R.includes(r))}(t.target)?N(t.target,"focusout",()=>v(t,o)):h(!1)}),z=n.onBlur,$=b(t=>{null==z||z(t),e&&function(e){const t=e.currentTarget,o=e.relatedTarget;return!(o&&(r=t,s=o,r===s||r.contains(s)));var r,s}(t)&&(t.currentTarget.removeAttribute("data-focus-visible"),h(!1))}),W=(0,r.useContext)(c),G=b(t=>{e&&o&&t&&W&&queueMicrotask(()=>{I(t)||B(t)&&t.focus()})}),q=f(a),U=e&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(q),Y=e&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(q),[Z,J]=(0,r.useState)(!1);E&&(0,r.useEffect)(()=>{if(!e)return;const t=a.current;if(!t)return;const o=t.tagName.toLowerCase(),r=t.type;J(function(e,t){return"button"===e||!("input"!==e||!t)&&("checkbox"===t||"radio"===t||D.includes(t))}(o,r))},[e]);const X=n.style,Q=(0,r.useMemo)(()=>m?{pointerEvents:"none",...X}:X,[m,X]);return function(e){const t={};for(const o in e)void 0!==e[o]&&(t[o]=e[o]);return t}(n={"data-focus-visible":e&&p||void 0,"data-autofocus":o||void 0,"aria-disabled":u||void 0,...n,...d,ref:x(a,G,n.ref),style:Q,tabIndex:L({focusable:e,trulyDisabled:m,nativeTabbable:U,supportsDisabled:Y,safariTabIndex:Z,tabIndexProp:n.tabIndex}),disabled:!(!Y||!m)||void 0,contentEditable:u?void 0:n.contentEditable,onKeyPressCapture:g,onClickCapture:_,onMouseDownCapture:w,onKeyDownCapture:j,onFocusCapture:A,onBlur:$})});function $(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?p(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(p(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}k(function(e){return j("div",z(e))});var W=Symbol("command"),G=C(function({clickOnEnter:e=!0,clickOnSpace:t=!0,...o}){const s=(0,r.useRef)(null),[c,n]=(0,r.useState)(!1);(0,r.useEffect)(()=>{s.current&&n(p(s.current))},[]);const[a,l]=(0,r.useState)(!1),u=(0,r.useRef)(!1),m=i(o),[h,g]=y(o,W,!0),w=o.onKeyDown,_=b(o=>{null==w||w(o);const r=o.currentTarget;if(o.defaultPrevented)return;if(h)return;if(m)return;if(!S(o))return;if(function(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,o="TEXTAREA"===e.tagName;return t||o||!1}catch(e){return!1}}(r))return;if(r.isContentEditable)return;const s=e&&"Enter"===o.key,c=t&&" "===o.key,n="Enter"===o.key&&!e,i=" "===o.key&&!t;if(n||i)o.preventDefault();else if(s||c){const e=$(o);if(s){if(!e){o.preventDefault();const{view:e,...t}=o,s=()=>A(r,t);d&&/firefox\//i.test(navigator.userAgent)?N(r,"keyup",s):queueMicrotask(s)}}else c&&(u.current=!0,e||(o.preventDefault(),l(!0)))}}),f=o.onKeyUp,v=b(e=>{if(null==f||f(e),e.defaultPrevented)return;if(h)return;if(m)return;if(e.metaKey)return;const o=t&&" "===e.key;if(u.current&&o&&(u.current=!1,!$(e))){e.preventDefault(),l(!1);const t=e.currentTarget,{view:o,...r}=e;queueMicrotask(()=>A(t,r))}});return o={"data-active":a||void 0,type:c?"button":void 0,...g,...o,ref:x(s,o.ref),onKeyDown:_,onKeyUp:v},z(o)}),q=(k(function(e){return j("button",G(e))}),"button"),U=C(function(e){const t=(0,r.useRef)(null),o=f(t,q),[s,c]=(0,r.useState)(()=>!!o&&p({tagName:o,type:e.type}));return(0,r.useEffect)(()=>{t.current&&c(p(t.current))},[]),e={role:s||"a"===o?void 0:"button",...e,ref:x(t,e.ref)},e=G(e)}),Y=k(function(e){const t=U(e);return j(q,t)})},4921:(e,t,o)=>{"use strict";function r(e){var t,o,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var c=e.length;for(t=0;t<c;t++)e[t]&&(o=r(e[t]))&&(s&&(s+=" "),s+=o)}else for(o in e)e[o]&&(s&&(s+=" "),s+=o);return s}function s(){for(var e,t,o=0,s="",c=arguments.length;o<c;o++)(e=arguments[o])&&(t=r(e))&&(s&&(s+=" "),s+=t);return s}o.d(t,{$:()=>s,A:()=>c});const c=s},12892:(e,t,o)=>{"use strict";o.d(t,{B3:()=>r});const r={code:"USD",base:10,exponent:2}},95754:(e,t,o)=>{"use strict";o.d(t,{uE:()=>c});var r=o(5341);const s={add:(e,t)=>e+t,compare:(e,t)=>e<t?r.P.LT:e>t?r.P.GT:r.P.EQ,decrement:e=>e-1,increment:e=>e+1,integerDivide:(e,t)=>Math.trunc(e/t),modulo:(e,t)=>e%t,multiply:(e,t)=>e*t,power:(e,t)=>e**t,subtract:(e,t)=>e-t,zero:function(){return 0}},c=(0,r.F)({calculator:s,onCreate({amount:e,scale:t}){(0,r.I)(Number.isInteger(e),r.L),(0,r.I)(Number.isInteger(t),r.R)}})},5341:(e,t,o)=>{"use strict";o.d(t,{F:()=>i,I:()=>n,L:()=>r,P:()=>a,R:()=>s,i:()=>w,n:()=>_,o:()=>g});const r="Amount is invalid.",s="Scale is invalid.",c="Objects must have the same currency.";function n(e,t){if(!e)throw new Error(`[Dinero.js] ${t}`)}function i({calculator:e,onCreate:t,formatter:o={toNumber:Number,toString:String}}){return function r({amount:s,currency:{code:c,base:n,exponent:i},scale:a=i}){const l={code:c,base:n,exponent:i};return t?.({amount:s,currency:l,scale:a}),{calculator:e,formatter:o,create:r,toJSON:()=>({amount:s,currency:l,scale:a})}}}let a=function(e){return e[e.LT=-1]="LT",e[e.EQ=0]="EQ",e[e.GT=1]="GT",e}({});function l(e){return(t,o)=>e.compare(t,o)===a.EQ}function d(e){return t=>{return o=t,Array.isArray(o)?t.reduce((t,o)=>e.multiply(t,o)):t;var o}}function u(e){return(t,o)=>e.compare(t,o)===a.GT}function m(e){const t=function(e){return(t,o)=>e.compare(t,o)===a.LT}(e);return e=>e.reduce((e,o)=>t(e,o)?o:e)}const p=(e,t,o)=>{const r=u(o),s=l(o),c=o.zero(),n=r(e,c),i=o.integerDivide(e,t),a=s(o.modulo(e,t),c);return n||a?i:o.decrement(i)};function h(e){const t=u(e),o=d(e);return function(...[r,s,c=p]){const{amount:n,currency:i,scale:a}=r.toJSON(),l=t(s,a),d=l?e.multiply:c,[u,m]=l?[s,a]:[a,s],h=o(i.base),g=e.power(h,e.subtract(u,m));return r.create({amount:d(n,g,e),currency:i,scale:s})}}function g(...[e,t]){const{calculator:o}=e;return function(e){const t=function(e){const t=m(e),o=h(e),r=l(e);return function(...[s]){const c=s.reduce((e,o)=>{const{scale:r}=o.toJSON();return t([e,r])},e.zero());return s.map(e=>{const{scale:t}=e.toJSON();return r(t,c)?e:o(e,c)})}}(e),o=function(e){return function(...[t,o]){const{amount:r,currency:s,scale:c}=t.toJSON(),{amount:n}=o.toJSON(),i=e.subtract(r,n);return t.create({amount:i,currency:s,scale:c})}}(e);return function(...[e,r]){n(function(e){const[t,...o]=e,r=d(t.calculator),{currency:s}=t.toJSON(),c=l(t.calculator),n=r(s.base);return o.every(e=>{const{currency:t}=e.toJSON(),o=r(t.base);return t.code===s.code&&c(o,n)&&c(t.exponent,s.exponent)})}([e,r]),c);const[s,i]=t([e,r]);return o(s,i)}}(o)(e,t)}const w=function(e){return e.toJSON()};function _(...[e,t,o]){const{calculator:r}=e;return h(r)(e,t,o)}},61303:(e,t,o)=>{"use strict";o.d(t,{di:()=>d});var r=function(e){return function(t,o,r){return e(t,o,r)*r}},s=function(e,t){if(e)throw Error("Invalid sort config: "+t)},c=function(e){var t=e||{},o=t.asc,c=t.desc,n=o?1:-1,i=o||c;return s(!i,"Expected `asc` or `desc` property"),s(o&&c,"Ambiguous object with `asc` and `desc` config properties"),{order:n,sortBy:i,comparer:e.comparer&&r(e.comparer)}};function n(e,t,o){if(void 0===e||!0===e)return function(e,r){return t(e,r,o)};if("string"==typeof e)return s(e.includes("."),"String syntax not allowed for nested properties."),function(r,s){return t(r[e],s[e],o)};if("function"==typeof e)return function(r,s){return t(e(r),e(s),o)};if(Array.isArray(e)){var r=function(e){return function t(o,r,s,n,i,a,l){var d,u;if("string"==typeof o)d=a[o],u=l[o];else{if("function"!=typeof o){var m=c(o);return t(m.sortBy,r,s,m.order,m.comparer||e,a,l)}d=o(a),u=o(l)}var p=i(d,u,n);return(0===p||null==d&&null==u)&&r.length>s?t(r[s],r,s+1,n,i,a,l):p}}(t);return function(s,c){return r(e[0],e,1,o,t,s,c)}}var i=c(e);return n(i.sortBy,i.comparer||t,i.order)}var i=function(e,t,o,r){return Array.isArray(t)?(Array.isArray(o)&&o.length<2&&(o=o[0]),t.sort(n(o,r,e))):t};function a(e){var t=r(e.comparer);return function(o){var r=Array.isArray(o)&&!e.inPlaceSorting?o.slice():o;return{asc:function(e){return i(1,r,e,t)},desc:function(e){return i(-1,r,e,t)},by:function(e){return i(1,r,e,t)}}}}var l=function(e,t,o){return null==e?o:null==t?-o:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},d=a({comparer:l});a({comparer:l,inPlaceSorting:!0})},51177:(e,t,o)=>{"use strict";o.d(t,{Cl:()=>r});var r=function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var s in t=arguments[o])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},47746:e=>{"use strict";e.exports=JSON.parse('{"name":"woocommerce/product-image","title":"Product Image","description":"Display the main product image.","category":"woocommerce-product-elements","attributes":{"showProductLink":{"type":"boolean","default":true},"showSaleBadge":{"type":"boolean","default":true},"saleBadgeAlign":{"type":"string","default":"right"},"imageSizing":{"type":"string","default":"single"},"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"aspectRatio":{"type":"string"}},"supports":{"interactivity":{"clientNavigation":true},"html":false,"__experimentalBorder":{"color":true,"width":true,"style":true,"radius":true,"__experimentalSkipSerialization":true},"typography":{"fontSize":true,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"padding":true},"dimensions":{"aspectRatio":true,"__experimentalSkipSerialization":true},"email":true},"selectors":{"root":".wp-block-woocommerce-product-image.wc-block-components-product-image, .wp-block-woocommerce-product-image .wc-block-components-product-image"},"ancestor":["woocommerce/all-products","woocommerce/single-product","woocommerce/product-template","core/post-template"],"usesContext":["imageId","postId","query","queryId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}')},55455:e=>{"use strict";e.exports=JSON.parse('{"name":"woocommerce/product-image-gallery","title":"Product Image Gallery","icon":"gallery","description":"Display a product\'s images.","category":"woocommerce-product-elements","supports":{"interactivity":{"clientNavigation":true},"align":true,"multiple":false},"keywords":["WooCommerce"],"usesContext":["postId","postType","queryId"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}')},83925:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-title","version":"1.0.0","title":"Product Title","category":"woocommerce-product-elements","description":"Display the title of a product.","supports":{"html":false,"interactivity":{"clientNavigation":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true},"color":{"text":true,"background":true,"link":false,"gradients":true,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"__experimentalSkipSerialization":true}},"selectors":{"root":".wp-block-woocommerce-product-title .wc-block-components-product-title"},"textdomain":"woocommerce","attributes":{"headingLevel":{"type":"number","default":2},"showProductLink":{"type":"boolean","default":true},"linkTarget":{"type":"string"},"productId":{"type":"number","default":0},"align":{"type":"string"}},"ancestor":["woocommerce/all-products"]}')},48323:e=>{"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-collection","title":"Product Collection","description":"Display a collection of products from your store.","category":"woocommerce","keywords":["WooCommerce","Products (Beta)","all products","by attribute","by category","by tag"],"textdomain":"woocommerce","attributes":{"queryId":{"type":"number"},"query":{"type":"object"},"tagName":{"type":"string"},"displayLayout":{"type":"object","properties":{"type":{"type":"string","enum":["flex","list","carousel"]},"columns":{"type":"number"},"shrinkColumns":{"type":"boolean"}}},"dimensions":{"type":"object"},"convertedFromProducts":{"type":"boolean","default":false},"collection":{"type":"string"},"hideControls":{"default":[],"type":"array"},"queryContextIncludes":{"type":"array"},"forcePageReload":{"type":"boolean","default":false},"__privatePreviewState":{"type":"object","role":"local"}},"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","dimensions":"dimensions","queryContextIncludes":"queryContextIncludes","collection":"collection","forcePageReload":"forcePageReload","__privateProductCollectionPreviewState":"__privatePreviewState"},"usesContext":["templateSlug","postId"],"supports":{"align":["wide","full"],"anchor":true,"html":false,"__experimentalLayout":true,"interactivity":true,"email":true},"editorStyle":"file:../woocommerce/product-collection-editor.css","style":"file:../woocommerce/product-collection-style.css"}')}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var c=r[e]={exports:{}};return o[e](c,c.exports,s),c.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(o,r){if(1&r&&(o=this(o)),8&r)return o;if("object"==typeof o&&o){if(4&r&&o.__esModule)return o;if(16&r&&"function"==typeof o.then)return o}var c=Object.create(null);s.r(c);var n={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&o;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(e=>n[e]=()=>o[e]);return n.default=()=>o,s.d(c,n),c},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var r=o.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=o[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{"use strict";s(50364),s(38878);var e=s(86087),t=s(29491),o=s(74997),r=s(52619),c=s(10790);const n=(0,t.createHigherOrderComponent)(t=>{class r extends e.Component{mounted=!1;componentDidMount(){const{block:e,setAttributes:t}=this.props;e.name.startsWith("woocommerce/")&&t(this.getAttributesWithDefaults())}componentDidUpdate(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}getAttributesWithDefaults(){const e=(0,o.getBlockType)(this.props.block.name);let t=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==e.attributes&&void 0!==e.defaults&&(t=Object.assign({},this.props.attributes||{}),Object.keys(e.attributes).map(o=>(void 0===t[o]&&void 0!==e.defaults[o]&&(t[o]=e.defaults[o]),o))),t}render(){return(0,c.jsx)(t,{...this.props,attributes:this.getAttributesWithDefaults()})}}return r},"withDefaultAttributes");(0,r.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",n),(0,r.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(e,t)=>(t.name.startsWith("woocommerce/")&&Object.keys(t.attributes).map(o=>(void 0===e[o]&&void 0!==t.defaults&&void 0!==t.defaults[o]&&(e[o]=t.defaults[o]),o)),e));const i=window.wp.domReady,a=["woocommerce/breadcrumbs","woocommerce/catalog-sorting","woocommerce/legacy-template","woocommerce/product-results-count","woocommerce/product-reviews","woocommerce/order-confirmation-status","woocommerce/order-confirmation-summary","woocommerce/order-confirmation-totals","woocommerce/order-confirmation-totals-wrapper","woocommerce/order-confirmation-downloads","woocommerce/order-confirmation-downloads-wrapper","woocommerce/order-confirmation-billing-address","woocommerce/order-confirmation-shipping-address","woocommerce/order-confirmation-billing-wrapper","woocommerce/order-confirmation-shipping-wrapper","woocommerce/order-confirmation-additional-information","woocommerce/order-confirmation-additional-fields-wrapper","woocommerce/order-confirmation-additional-fields"],l=["woocommerce/all-reviews","woocommerce/breadcrumbs","woocommerce/cart-link","woocommerce/catalog-sorting","woocommerce/classic-shortcode","woocommerce/customer-account","woocommerce/dropdown","woocommerce/featured-category","woocommerce/featured-product","woocommerce/mini-cart","woocommerce/product-categories","woocommerce/product-results-count","woocommerce/product-search","woocommerce/reviews-by-category","woocommerce/reviews-by-product","woocommerce/product-filters","woocommerce/product-filter-status","woocommerce/product-filter-price","woocommerce/product-filter-price-slider","woocommerce/product-filter-attribute","woocommerce/product-filter-rating","woocommerce/product-filter-active","woocommerce/product-filter-removable-chips","woocommerce/product-filter-clear-button","woocommerce/product-filter-checkbox-list","woocommerce/product-filter-chips","woocommerce/product-filter-taxonomy","woocommerce/active-filters","woocommerce/attribute-filter","woocommerce/filter-wrapper","woocommerce/price-filter","woocommerce/rating-filter","woocommerce/stock-filter","woocommerce/handpicked-products","woocommerce/product-best-sellers","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated","woocommerce/products-by-attribute","woocommerce/product-category","woocommerce/product-tag"];s.n(i)()(()=>{(()=>{const e=(0,o.getBlockTypes)().map(({name:e})=>e),t=(()=>{const e=window,t=e.adminpage;return["post-php","post-new-php"].includes(t??"")?"post":["widgets-php","customize-php"].includes(t??"")||"customize"===e.pagenow?"widgets":"other"})();return"post"===t?a.filter(t=>e.includes(t)):"widgets"===t?e.filter(e=>e.startsWith("woocommerce/")&&!l.includes(e)):[]})().forEach(e=>{(0,o.unregisterBlockType)(e)})}),s(97575)})(),(()=>{"use strict";var e=s(74997),t=s(82490),o=s(93450),r=s(4921),c=s(94715),n=s(27723),i=s(61909),a=s(56427),l=s(76748),d=s(15703),u=s(86087),m=s(14656),p=s(73993),h=s(37848),g=s(58733);s(94756);var w=s(83250),_=s(70910),b=s(93832),x=s(73580),f=s(10790);const y=(e,t)=>Number.isFinite(e)&&Number.isFinite(t)?(0,n.sprintf)(/* translators: %1$s min price, %2$s max price */ /* translators: %1$s min price, %2$s max price */ (0,n.__)("Between %1$s and %2$s","woocommerce"),(0,_.formatPrice)(e),(0,_.formatPrice)(t)):Number.isFinite(e)?(0,n.sprintf)(/* translators: %s min price */ /* translators: %s min price */ (0,n.__)("From %s","woocommerce"),(0,_.formatPrice)(e)):(0,n.sprintf)(/* translators: %s max price */ /* translators: %s max price */ (0,n.__)("Up to %s","woocommerce"),(0,_.formatPrice)(t)),v=({type:e,name:t,prefix:r="",removeCallback:s=()=>null,showLabel:c=!0,displayStyle:i})=>{const a=r?(0,f.jsxs)(f.Fragment,{children:[r," ",t]}):t,l=(0,n.sprintf)(/* translators: 1: filter type, 2: attribute value used in the filter. For example: Remove Size Large filter. */ /* translators: 1: filter type, 2: attribute value used in the filter. For example: Remove Size Large filter. */ (0,n.__)("Remove %1$s %2$s filter","woocommerce"),e,t);return(0,f.jsxs)("li",{className:"wc-block-active-filters__list-item",children:[c&&(0,f.jsx)("span",{className:"wc-block-active-filters__list-item-type",children:e+": "}),"chips"===i?(0,f.jsx)(m.RemovableChip,{element:"span",text:a,onRemove:s,radius:"large",ariaLabel:l}):(0,f.jsxs)("span",{className:"wc-block-active-filters__list-item-name",children:[(0,f.jsxs)("button",{className:"wc-block-active-filters__list-item-remove",onClick:s,children:[(0,f.jsx)(o.A,{className:"wc-block-components-chip__remove-icon",icon:x.A,size:16}),(0,f.jsx)(m.Label,{screenReaderLabel:l})]}),a]})]},e+":"+t)},k=(...e)=>{if(!window)return;const t=window.location.href,o=(0,b.getQueryArgs)(t),r=(0,b.removeQueryArgs)(t,...Object.keys(o));e.forEach(e=>{if("string"==typeof e)return delete o[e];if("object"==typeof e){const t=Object.keys(e)[0],r=o[t].toString().split(",");o[t]=r.filter(o=>o!==e[t]).join(",")}});const s=Object.fromEntries(Object.entries(o).filter(([,e])=>e)),c=(0,b.addQueryArgs)(r,s);(0,h.CH)(c)},j=["min_price","max_price","rating_filter","filter_","query_type_"],C=e=>{let t=!1;for(let o=0;j.length>o;o++){const r=j[o];if(r===e.substring(0,r.length)){t=!0;break}}return t};var S=s(42552),A=s(18537),N=s(62167);const P=({attributeObject:e,slugs:t=[],operator:o="in",displayStyle:r,isLoadingCallback:s})=>{const{results:c,isLoading:i}=(0,S.G)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[e.id]}),[a,m]=(0,l.xd)("attributes",[]);if((0,u.useEffect)(()=>{s(i)},[i,s]),!Array.isArray(c)||!(0,p.isAttributeTermCollection)(c)||!(0,p.isAttributeQueryCollection)(a))return null;const h=e.label,g=(0,d.getSettingWithCoercion)("isRenderingPhpTemplate",!1,p.isBoolean);return(0,f.jsxs)("li",{children:[(0,f.jsxs)("span",{className:"wc-block-active-filters__list-item-type",children:[h,":"]}),(0,f.jsx)("ul",{children:t.map((t,s)=>{const l=c.find(e=>e.slug===t);if(!l)return null;let d="";return s>0&&"and"===o&&(d=(0,f.jsx)("span",{className:"wc-block-active-filters__list-item-operator",children:(0,n.__)("All","woocommerce")})),v({type:h,name:(0,A.decodeEntities)(l.name||t),prefix:d,isLoading:i,removeCallback:()=>{const o=a.find(({attribute:t})=>t===`pa_${e.name}`);1===o?.slug.length?k(`query_type_${e.name}`,`filter_${e.name}`):k({[`filter_${e.name}`]:t}),g||(0,N.$)(a,m,e,t)},showLabel:!1,displayStyle:r})})})]})},B=({displayStyle:e,isLoading:t})=>t?(0,f.jsx)(f.Fragment,{children:[...Array("list"===e?2:3)].map((t,o)=>(0,f.jsx)("li",{className:"list"===e?"show-loading-state-list":"show-loading-state-chips",children:(0,f.jsx)("span",{className:"show-loading-state__inner"})},o))}):null;var I=s(25238);const T=({attributes:e,isEditor:t=!1})=>{const o=(0,I.LY)(),s=function(){const e=(0,u.useRef)(!1);return(0,u.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),(0,u.useCallback)(()=>e.current,[])}()(),c=(0,d.getSettingWithCoercion)("isRenderingPhpTemplate",!1,p.isBoolean),[i,a]=(0,u.useState)(!0),_=(()=>{if(!window)return!1;const e=window.location.href,t=(0,b.getQueryArgs)(e),o=Object.keys(t);let r=!1;for(let e=0;o.length>e;e++){const t=o[e];if(C(t)){r=!0;break}}return r})()&&!t&&i,[x,j]=(0,l.xd)("attributes",[]),[S,A]=(0,l.xd)("stock_status",[]),[N,T]=(0,l.xd)("min_price"),[E,R]=(0,l.xd)("max_price"),[D,L]=(0,l.xd)("rating"),O=(0,d.getSetting)("stockStatusOptions",[]),M=(0,d.getSetting)("attributes",[]),V=(0,u.useMemo)(()=>{if(_||0===S.length||!(0,p.isStockStatusQueryCollection)(S)||!(0,p.isStockStatusOptions)(O))return null;const t=(0,n.__)("Stock Status","woocommerce");return(0,f.jsxs)("li",{children:[(0,f.jsxs)("span",{className:"wc-block-active-filters__list-item-type",children:[t,":"]}),(0,f.jsx)("ul",{children:S.map(o=>v({type:t,name:O[o],removeCallback:()=>{if(k({filter_stock_status:o}),!c){const e=S.filter(e=>e!==o);A(e)}},showLabel:!1,displayStyle:e.displayStyle}))})]})},[_,O,S,A,e.displayStyle,c]),F=(0,u.useMemo)(()=>_||!Number.isFinite(N)&&!Number.isFinite(E)?null:v({type:(0,n.__)("Price","woocommerce"),name:y(N,E),removeCallback:()=>{k("max_price","min_price"),c||(T(void 0),R(void 0))},displayStyle:e.displayStyle}),[_,N,E,e.displayStyle,T,R,c]),H=(0,u.useMemo)(()=>!(0,p.isAttributeQueryCollection)(x)&&s||!x.length&&!(e=>{if(!window)return!1;const t=e.map(e=>`filter_${e.attribute_name}`),o=window.location.href,r=(0,b.getQueryArgs)(o),s=Object.keys(r);let c=!1;for(let e=0;s.length>e;e++){const o=s[e];if(t.includes(o)){c=!0;break}}return c})(M)?(i&&a(!1),null):x.map(t=>{const o=(0,w.OJ)(t.attribute);return o?(0,f.jsx)(P,{attributeObject:o,displayStyle:e.displayStyle,slugs:t.slug,operator:t.operator,isLoadingCallback:a},t.attribute):(i&&a(!1),null)}),[x,s,M,i,e.displayStyle]);(0,u.useEffect)(()=>{if(!c)return;if(D.length&&D.length>0)return;const e=(0,h.Vf)("rating_filter")?.toString();e&&L(e.split(","))},[c,D,L]);const z=(0,u.useMemo)(()=>{if(_||0===D.length||!(0,p.isRatingQueryCollection)(D))return null;const t=(0,n.__)("Rating","woocommerce");return(0,f.jsxs)("li",{children:[(0,f.jsxs)("span",{className:"wc-block-active-filters__list-item-type",children:[t,":"]}),(0,f.jsx)("ul",{children:D.map(o=>v({type:t,name:(0,n.sprintf)(/* translators: %s is referring to the average rating value */ /* translators: %s is referring to the average rating value */ (0,n.__)("Rated %s out of 5","woocommerce"),o),removeCallback:()=>{if(k({rating_filter:o}),!c){const e=D.filter(e=>e!==o);L(e)}},showLabel:!1,displayStyle:e.displayStyle}))})]})},[_,D,L,e.displayStyle,c]);if(!_&&!(x.length>0||S.length>0||D.length>0||Number.isFinite(N)||Number.isFinite(E))&&!t)return o(!1),null;const $=`h${e.headingLevel}`,W=(0,f.jsx)($,{className:"wc-block-active-filters__title",children:e.heading}),G=_?(0,f.jsx)(g.A,{children:W}):W;if(!(0,d.getSettingWithCoercion)("hasFilterableProducts",!1,p.isBoolean))return o(!1),null;o(!0);const q=(0,r.A)("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===e.displayStyle,"wc-block-active-filters--loading":_});return(0,f.jsxs)(f.Fragment,{children:[!t&&e.heading&&G,(0,f.jsxs)("div",{className:"wc-block-active-filters",children:[(0,f.jsx)("ul",{className:q,children:t?(0,f.jsxs)(f.Fragment,{children:[v({type:(0,n.__)("Size","woocommerce"),name:(0,n.__)("Small","woocommerce"),displayStyle:e.displayStyle}),v({type:(0,n.__)("Color","woocommerce"),name:(0,n.__)("Blue","woocommerce"),displayStyle:e.displayStyle})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(B,{isLoading:_,displayStyle:e.displayStyle}),F,V,H,z]})}),_?(0,f.jsx)("span",{className:"wc-block-active-filters__clear-all-placeholder"}):(0,f.jsx)("button",{className:"wc-block-active-filters__clear-all",onClick:()=>{(()=>{if(!window)return;const e=window.location.href,t=(0,b.getQueryArgs)(e),o=(0,b.removeQueryArgs)(e,...Object.keys(t)),r=Object.fromEntries(Object.keys(t).filter(e=>!C(e)).map(e=>[e,t[e]])),s=(0,b.addQueryArgs)(o,r);(0,h.CH)(s)})(),c||(T(void 0),R(void 0),j([]),A([]),L([]))},children:(0,f.jsx)(m.Label,{label:(0,n.__)("Clear All","woocommerce"),screenReaderLabel:(0,n.__)("Clear All Filters","woocommerce")})})]})]})};s(58786);var E=s(68059);const R=(0,a.withSpokenMessages)(({attributes:e,setAttributes:t,clientId:o})=>{const{className:r,displayStyle:s,heading:l,headingLevel:d}=e,u=(0,c.useBlockProps)({className:r});return(0,f.jsxs)("div",{...u,children:[(0,f.jsxs)(c.InspectorControls,{children:[(0,f.jsx)(a.PanelBody,{children:(0,f.jsx)(E.d,{clientId:o})}),(0,f.jsx)(a.PanelBody,{title:(0,n.__)("Display Settings","woocommerce"),children:(0,f.jsxs)(a.__experimentalToggleGroupControl,{label:(0,n.__)("Display Style","woocommerce"),isBlock:!0,value:s,onChange:e=>t({displayStyle:e}),className:"wc-block-active-filter__style-toggle",children:[(0,f.jsx)(a.__experimentalToggleGroupControlOption,{value:"list",label:(0,n.__)("List","woocommerce")}),(0,f.jsx)(a.__experimentalToggleGroupControlOption,{value:"chips",label:(0,n.__)("Chips","woocommerce")})]})})]},"inspector"),l&&(0,f.jsx)(i.A,{className:"wc-block-active-filters__title",headingLevel:d,heading:l,onChange:e=>t({heading:e})}),(0,f.jsx)(a.Disabled,{children:(0,f.jsx)(T,{attributes:e,isEditor:!0})})]})}),D=JSON.parse('{"name":"woocommerce/active-filters","title":"Active Filters Controls","description":"Display the currently active filters.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"html":false,"multiple":false,"inserter":false,"color":{"text":true,"background":false},"lock":false},"attributes":{"displayStyle":{"type":"string","default":"list"},"headingLevel":{"type":"number","default":3}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),L={heading:{type:"string",default:(0,n.__)("Active filters","woocommerce")}},O={attributes:{...D.attributes,...L},save:({attributes:e})=>{const{className:t,displayStyle:o,heading:s,headingLevel:n}=e,i={"data-display-style":o,"data-heading":s,"data-heading-level":n};return(0,f.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)}),...i,children:(0,f.jsx)("span",{"aria-hidden":!0,className:"wc-block-active-filters__placeholder"})})}},M=[O];(0,e.registerBlockType)(D,{apiVersion:3,icon:{src:(0,f.jsx)(o.A,{icon:t.A,className:"wc-block-editor-components-block-icon"})},attributes:{...D.attributes,...L},edit:R,save({attributes:e}){const{className:t}=e;return(0,f.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)}),children:(0,f.jsx)("span",{"aria-hidden":!0,className:"wc-block-active-filters__placeholder"})})},deprecated:M})})(),(()=>{"use strict";var e=s(60407),t=s(93450),o=s(5764),r=s(74997);const c=JSON.parse('{"name":"woocommerce/add-to-cart-form","title":"Add to Cart with Options","description":"Display a button that lets customers add a product to their cart. Use the added options to optimize for different product types.","category":"woocommerce-product-elements","attributes":{"quantitySelectorStyle":{"type":"string","enum":["input","stepper"],"default":"input"}},"keywords":["WooCommerce"],"usesContext":["postId"],"textdomain":"woocommerce","supports":{"interactivity":true},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-form","style":"file:../woocommerce/add-to-cart-form-style.css","editorStyle":"file:../woocommerce/add-to-cart-form-editor.css"}');var n=s(94715),i=s(27723),a=s(59213),l=s(56427),d=s(15937),u=s(15703),m=s(10790);let p=function(e){return e.Input="input",e.Stepper="stepper",e}({});const h=e=>e===p.Input?(0,i.__)("Shoppers can enter a number of items to add to cart.","woocommerce"):e===p.Stepper?(0,i.__)("Shoppers can use buttons to change the number of items to add to cart.","woocommerce"):void 0,g=({quantitySelectorStyle:e,setAttributes:t})=>(0,m.jsx)(n.InspectorControls,{children:(0,m.jsx)(l.PanelBody,{title:(0,i.__)("Quantity Selector","woocommerce"),children:(0,m.jsxs)(l.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:e,isBlock:!0,onChange:e=>{t({quantitySelectorStyle:e})},help:h(e),children:[(0,m.jsx)(l.__experimentalToggleGroupControlOption,{label:(0,i.__)("Input","woocommerce"),value:p.Input}),(0,m.jsx)(l.__experimentalToggleGroupControlOption,{label:(0,i.__)("Stepper","woocommerce"),value:p.Stepper})]})})});var w=s(86087),_=s(37757),b=s(47143),x=s(4731),f=s(34892);const y=({blockClientId:e})=>{const t=(0,w.createInterpolateElement)((0,i.__)("Upgrade to the <strongText /> for more flexibility. You can switch back anytime.","woocommerce"),{strongText:(0,m.jsx)("strong",{children:(0,i.__)("Add to Cart + Options block","woocommerce")})}),o=(0,i.__)("Use the Add to Cart + Options block","woocommerce");return(0,m.jsx)(x.u,{isDismissible:!1,actionLabel:o,onActionClick:async()=>{const t=await(async e=>{const t=(0,b.select)("core/block-editor").getBlocks(),o=(0,f.P)({blocks:t,findCondition:t=>t.name===c.name&&t.clientId===e});if(!o)return!1;const s=(0,r.createBlock)("woocommerce/add-to-cart-with-options");return(0,b.dispatch)("core/block-editor").replaceBlock(o.clientId,s),!0})(e);t&&(0,_.yM)("blocks_add_to_cart_with_options_migration",{transform_to:"blockified"})},children:t})},v={...c,edit:e=>{const{setAttributes:t}=e,o=e.attributes.quantitySelectorStyle===p.Input?"wc-block-add-to-cart-form--input":"wc-block-add-to-cart-form--stepper",r=(0,n.useBlockProps)({className:`wc-block-add-to-cart-form ${o}`}),s=(0,d.I)(),c=(0,u.getSetting)("isBlockTheme",!1),h=c?"":"wp-block-button",w=c?"":"wp-block-button__link wc-block-components-button";return(0,m.jsxs)(m.Fragment,{children:[c&&(0,m.jsx)(n.InspectorControls,{children:(0,m.jsx)(y,{blockClientId:e.clientId})}),(0,m.jsx)(g,{quantitySelectorStyle:e.attributes.quantitySelectorStyle,setAttributes:t}),(0,m.jsx)("div",{...r,children:(0,m.jsx)(l.Tooltip,{text:(0,i.__)("Customer will see product add-to-cart options in this space, dependent on the product type.","woocommerce"),position:"bottom right",children:(0,m.jsxs)("div",{className:"wc-block-editor-add-to-cart-form-container",children:[(0,m.jsx)(a.U,{isStatic:!0}),(0,m.jsxs)(l.Disabled,{children:[e.attributes.quantitySelectorStyle===p.Input&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"quantity",children:(0,m.jsx)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0})}),(0,m.jsx)("div",{className:h,children:(0,m.jsx)("button",{className:`single_add_to_cart_button alt wp-element-button ${w}`,children:(0,i.__)("Add to cart","woocommerce")})})]}),e.attributes.quantitySelectorStyle===p.Stepper&&(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)("div",{className:"quantity wc-block-components-quantity-selector",children:[(0,m.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",children:"−"}),(0,m.jsx)("input",{style:s?{}:{backgroundColor:"#ffffff",lineHeight:"normal",minHeight:"unset",boxSizing:"unset",borderRadius:"unset"},type:"number",value:"1",className:"input-text qty text",readOnly:!0}),(0,m.jsx)("button",{className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",children:"+"})]}),(0,m.jsx)("div",{className:h,children:(0,m.jsx)("button",{className:`single_add_to_cart_button alt wp-element-button ${w}`,children:(0,i.__)("Add to cart","woocommerce")})})]})]})]})})})]})},icon:{src:(0,m.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},ancestor:["woocommerce/single-product"],transforms:{to:[{type:"block",blocks:["woocommerce/add-to-cart-with-options"],transform:()=>(0,r.createBlock)("woocommerce/add-to-cart-with-options")}]},save:()=>null};(0,e.W)(v,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(5764),t=s(92279),o=s(60407),r=s(52619),c=s(27723),n=s(47143),i=s(56427),a=s(37757);const l=window.wp.editor;var d=s(95248),u=s(10790);function m(){const{productTypes:e,current:t,set:o}=(0,d.A)();return(0,u.jsx)(i.SelectControl,{label:(0,c.__)("Type switcher","woocommerce"),value:t?.slug,options:e.map(e=>({label:e.label,value:e.slug})),onChange:e=>{o(e),(0,a.yM)("blocks_add_to_cart_with_options_product_type_switched",{context:"inspector",from:t?.slug,to:e})},help:(0,c.__)("Switch product type to see how the template adapts to each one.","woocommerce")})}const p=JSON.parse('{"name":"woocommerce/add-to-cart-with-options","title":"Add to Cart + Options (Beta)","description":"Use blocks to create an \\"Add to cart\\" area that\'s customized for different product types, such as variable and grouped. ","category":"woocommerce-product-elements","attributes":{"isDescendantOfAddToCartWithOptions":{"type":"boolean","default":true}},"usesContext":["postId"],"providesContext":{"woocommerce/isDescendantOfAddToCartWithOptions":"isDescendantOfAddToCartWithOptions"},"textdomain":"woocommerce","supports":{"interactivity":true},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","style":"file:../woocommerce/add-to-cart-with-options-style.css","editorStyle":"file:../woocommerce/add-to-cart-with-options-editor.css"}');var h=s(86087),g=s(94715),w=s(15703),_=s(97529),b=s(58647),x=s(62796);function f(){const{current:e,productTypes:t,set:o}=(0,d.A)(),{product:r}=(0,x.useProductDataContext)();return r?.id||t?.length<2?null:(0,u.jsx)(i.ToolbarGroup,{children:(0,u.jsx)(i.ToolbarDropdownMenu,{icon:(0,u.jsx)(i.Icon,{icon:b.A}),text:e?.label||(0,c.__)("Switch product type","woocommerce"),label:(0,c.__)("Switch product type","woocommerce"),value:e?.slug,controls:t.map(t=>({title:t.label,onClick:()=>{o(t.slug),e?.slug!==t.slug&&(0,a.yM)("blocks_add_to_cart_with_options_product_type_switched",{context:"toolbar",from:e?.slug,to:t.slug})}}))})})}var y=s(74997),v=s(4731),k=s(34892);const j=({blockClientId:e})=>{const t=(0,c.__)("Facing compatibility issues with extensions? You can switch back to the classic Add to Cart with Options block.","woocommerce"),o=(0,c.__)("Switch back","woocommerce");return(0,u.jsx)(v.u,{isDismissible:!1,actionLabel:o,onActionClick:async()=>{const t=await(e=>{const t=(0,n.select)("core/block-editor").getBlocks(),o=(0,k.P)({blocks:t,findCondition:t=>t.name===p.name&&t.clientId===e});if(!o)return!1;const r=(0,y.createBlock)("woocommerce/add-to-cart-form",{quantitySelectorStyle:"input"});return(0,n.dispatch)("core/block-editor").replaceBlock(o.clientId,r),!0})(e);t&&(0,a.yM)("blocks_add_to_cart_with_options_migration",{transform_to:"legacy"})},children:t})};var C=s(25549);const S=()=>{const[e,t]=(0,h.useState)(null);if((0,h.useEffect)(()=>{const e=(0,k.P)({blocks:(0,n.select)("core/block-editor").getBlocks(),findCondition:e=>"woocommerce/product-image-gallery"===e.name});t(e||null)},[t]),!e)return null;const o=(0,c.__)("This template contains the classic Product Image Gallery block which is not compatible with the Add to Cart + Options block. Switch to the new Product Gallery block for a better experience.","woocommerce"),r=(0,c.__)("Upgrade to the Product Gallery block","woocommerce");return(0,u.jsx)(v.u,{isDismissible:!1,actionLabel:r,onActionClick:()=>{(0,C.T)(e.clientId)&&t(null)},status:"warning",children:o})};var A=s(3582),N=s(93450),P=s(77092),B=s(59213);const I=({buttonText:e,productType:t,isLoading:o=!1})=>(0,u.jsxs)("div",{"aria-label":o?(0,c.__)("Loading the Add to Cart + Options template part","woocommerce"):(0,c.__)("Add to Cart + Options form","woocommerce"),children:[(0,u.jsx)("div",{className:"wp-block-woocommerce-add-to-cart-with-options__skeleton-wrapper",children:(0,u.jsx)(B.U,{isStatic:!o})}),(0,u.jsx)(i.Disabled,{children:(0,u.jsx)("button",{className:`alt wp-element-button ${t||"simple"}_add_to_cart_button`,children:e||(0,c.__)("Add to cart","woocommerce")})})]}),T=()=>(0,u.jsx)("div",{className:"wc-block-add-to-wishlist-button",children:(0,u.jsxs)("button",{type:"button",className:"wc-block-add-to-wishlist-button__toggle",disabled:!0,children:[(0,u.jsx)("span",{className:"wc-block-add-to-wishlist-button__icon wc-block-add-to-wishlist-button__icon--empty",children:(0,u.jsx)(N.A,{icon:P.A,size:24})}),(0,u.jsx)("span",{className:"wc-block-add-to-wishlist-button__label",children:(0,c.__)("Add to wishlist","woocommerce")})]})}),E=({blockProps:e,productType:t,templatePartId:o,showAddToWishlist:r})=>{const[s,c,i]=(0,A.useEntityBlockEditor)("postType","wp_template_part",{id:o}),{isLoading:a}=(0,n.useSelect)(e=>{const{hasFinishedResolution:t}=e(A.store);return{isLoading:!t("getEditedEntityRecord",["postType","wp_template_part",o])}},[o]),l=(0,g.useInnerBlocksProps)(e,{value:s,onInput:c,onChange:i,renderAppender:a||0!==s.length?null:g.InnerBlocks.ButtonBlockAppender});if(a)return(0,u.jsx)("div",{...e,children:(0,u.jsx)(I,{productType:t,isLoading:!0})});const{children:d,...m}=l;return(0,u.jsxs)("div",{...m,children:[d,r&&(0,u.jsx)(T,{})]})},R=({productType:e,showAddToWishlist:t})=>{const o=(0,w.getSetting)("addToCartWithOptionsTemplatePartIds",{}),r=o?.[e],s=(0,g.useBlockProps)({className:"wc-block-add-to-cart-with-options"}),{canEditTemplatePart:c,isLoading:i}=(0,n.useSelect)(e=>{if(!r)return{canEditTemplatePart:!1,isLoading:!1};const{canUser:t,hasFinishedResolution:o}=e(A.store);return{canEditTemplatePart:t("update",{kind:"postType",name:"wp_template_part",id:r}),isLoading:!o("canUser",["update",{kind:"postType",name:"wp_template_part",id:r}])}},[r]);return r&&c?(0,u.jsx)(E,{blockProps:s,productType:e,templatePartId:r,showAddToWishlist:t}):(0,u.jsxs)("div",{...s,children:[(0,u.jsx)(I,{productType:e,isLoading:i}),t&&(0,u.jsx)(T,{})]})};s(79959);const D="document-settings-template-selector-pane";(0,t.getPlugin)(D)||(0,t.registerPlugin)(D,{render:function(){const{slug:e,type:t}=(0,n.useSelect)(e=>{const t=e("core/editor");if(!t)return{slug:"",type:""};const{slug:o,type:r}=t.getCurrentPost();return{slug:o,type:r}},[]),{registeredListeners:o}=(0,d.A)();return"wp_template"===t&&"single-product"===e&&o.length>0?(0,u.jsx)(l.PluginDocumentSettingPanel,{name:"woocommerce/product-type-selector",title:(0,c.__)("Product Type","woocommerce"),children:(0,u.jsx)(m,{})}):null}}),(0,o.W)({...p,icon:{src:({size:t})=>(0,u.jsx)("span",{className:"wp-block-woocommerce-add-to-cart-with-options__block-icon",style:{height:t,width:t},children:e.A})},edit:e=>{const t=(0,w.getSetting)("wishlistFeatureEnabled",!1),{product:o}=(0,_.useProduct)(e.context?.postId),r=(0,g.useBlockProps)({className:"wc-block-add-to-cart-with-options"}),s=r?.id,{current:c,registerListener:n,unregisterListener:i}=(0,d.A)();(0,h.useEffect)(()=>(n(s),()=>{i(s)}),[s,n,i]);const a=void 0===o?.id?c?.slug:o?.type,l=a&&["simple","variable","external","grouped"].includes(a);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(g.InspectorControls,{children:[(0,u.jsx)(S,{}),(0,u.jsx)(j,{blockClientId:e?.clientId})]}),(0,u.jsx)(g.BlockControls,{children:(0,u.jsx)(f,{})}),l?(0,u.jsx)(R,{productType:a,showAddToWishlist:t}):(0,u.jsx)("div",{...r,children:(0,u.jsx)(I,{buttonText:o?.add_to_cart?.single_text,productType:a,isLoading:!1})})]})},save:()=>null,ancestor:["woocommerce/single-product"]},{isAvailableOnPostEditor:!0}),(0,r.addFilter)("blocks.registerBlockType","woocommerce/area_add-to-cart-with-options",function(e,t){return"core/template-part"===t?{...e,variations:e.variations.map(e=>"area_add-to-cart-with-options"===e.name?{...e,scope:[]}:e)}:e})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-quantity-selector","title":"Product Quantity (Beta)","description":"Display an input field customers can use to select the number of products to add to their cart. ","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options"],"textdomain":"woocommerce","apiVersion":3,"supports":{"interactivity":true,"color":{"background":true,"text":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"shadow":true},"selectors":{"root":".wp-block-woocommerce-add-to-cart-with-options-quantity-selector, .wc-block-add-to-cart-with-options-grouped-product-item-selector .wc-block-components-quantity-selector, .wc-block-cart-item__quantity .wc-block-components-quantity-selector"},"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-with-options-quantity-selector"}');var c=s(94715),n=s(56427),i=s(68566),a=s(10790);(0,e.registerBlockType)(r,{edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-add-to-cart-with-options__quantity-selector"});return(0,a.jsx)("div",{...e,children:(0,a.jsx)(n.Disabled,{children:(0,a.jsx)(i.A,{})})})},icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(83243);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/add-to-cart-with-options-variation-description","title":"Variation Description (Beta)","description":"Displays the description of the selected variation.","category":"woocommerce","textdomain":"woocommerce","ancestor":["woocommerce/add-to-cart-with-options"],"supports":{"interactivity":true,"html":false,"dimensions":{"minHeight":true},"spacing":{"padding":true,"margin":true},"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"viewScriptModule":"woocommerce/product-elements"}');var c=s(94715),n=s(27723),i=s(10790);(0,e.registerBlockType)(r,{edit:function(){const e=(0,c.useBlockProps)();return(0,i.jsx)("div",{...e,children:(0,i.jsx)("p",{children:(0,n.__)("This block displays the variation description. When the shopper selects a variation, the description content will automatically appear here.","woocommerce")})})},icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-variation-selector","title":"Variation Selector (Beta)","description":"Display any product variations available to select from and add to cart.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options"],"textdomain":"woocommerce","apiVersion":3,"supports":{"interactivity":true},"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-with-options-variation-selector"}');var c=s(94715),n=s(55049),i=s(10790);(0,e.registerBlockType)(r,{edit:function(e){const{className:t}=e.attributes,o=(0,c.useBlockProps)({className:t}),r=(0,c.useInnerBlocksProps)(o,{template:n.u3});return(0,i.jsx)("div",{...r})},icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:function(){const e=c.useBlockProps.save(),t=c.useInnerBlocksProps.save({...e,role:"list"});return(0,i.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-variation-selector-attribute","title":"Variation Selector: Template (Beta)","description":"A template for attribute name and options that will be applied to all variable products with attributes.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options-variation-selector"],"attributes":{"displayStyle":{"type":"string","default":"woocommerce/product-filter-chips"},"autoselect":{"type":"boolean","default":false},"disabledAttributesAction":{"type":"string","enum":["disable","hide"],"default":"disable"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","supports":{"inserter":false,"interactivity":true},"style":"file:../woocommerce/add-to-cart-with-options-variation-selector-attribute-style.css"}');var c=s(86087),n=s(94715),i=s(47143),a=s(42552),l=s(62796),d=s(97529),u=s(27723),m=s(21995),p=s(56427),h=s(15703),g=s(55049),w=s(10790);const _="woocommerce/product-filter-chips",b=e=>{const t=e.innerBlocks.find(e=>"core/group"===e.name);return t?{rootClientId:t.clientId,index:t.innerBlocks.length}:{rootClientId:e.clientId,index:e.innerBlocks.length}};function x({blocks:e,isSelected:t,onSelect:o}){const{data:r}=(0,l.useCustomDataContext)("attribute"),s=(0,c.useMemo)(()=>r?.terms?r.terms.map(e=>e.id).filter(e=>e>0):[],[r]),{results:i}=(0,a.G)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[r?.id||0],shouldSelect:!!r?.id&&s.length>0,query:{include:s,hide_empty:!1,__experimental_visual:!0}}),d=(0,h.getSetting)("experimentalVisualAttributes",!1),u=(0,c.useMemo)(()=>i.reduce((e,t)=>(t.__experimentalVisual&&(e[t.id]=t.__experimentalVisual),e),{}),[i]),m=(0,c.useMemo)(()=>{let e=[];return r&&Array.isArray(r?.terms)&&r.terms.length>0&&(e=r.terms.map(e=>{const t=u[e.id]||(d?g.R7[e.id]:void 0);return{id:`${r.taxonomy}-${e.slug}`,label:e.name,value:e.slug,ariaLabel:e.name,...t?{visual:t}:{}}})),{items:e,selectionMode:"single",storeNamespace:"woocommerce/add-to-cart-with-options",groupLabel:""}},[r,d,u]),p=(0,n.__experimentalUseBlockPreview)({blocks:e}),_=(0,n.useInnerBlocksProps)();return r?(0,w.jsx)(n.BlockContextProvider,{value:{"woocommerce/selectableItems":m},children:t?(0,w.jsx)("div",{..._}):(0,w.jsx)("div",{...p,onClick:o})}):null}function f(){const e=n.useBlockProps.save(),t=n.useInnerBlocksProps.save({...e,role:"listitem"});return(0,w.jsx)("div",{...t})}const y="woocommerce/add-to-cart-with-options-variation-selector-attribute-options",v="woocommerce/product-filter-chips",k="woocommerce/dropdown";function j(e){return e.some(e=>"core/missing"===e.name&&e.attributes.originalName===y||!!e.innerBlocks?.length&&j(e.innerBlocks))}function C(t,o){return t.flatMap(t=>"core/missing"===t.name&&t.attributes.originalName===y?(t.originalContent?.includes('"autoselect":true')&&(o.autoselect=!0),t.originalContent?.includes('"disabledAttributesAction":"hide"')&&(o.disabledAttributesAction="hide"),t.originalContent?.includes('"optionStyle":"dropdown"')?(o.displayStyle=k,[(0,e.createBlock)(k)]):(o.displayStyle=v,[(0,e.createBlock)(v)])):t.innerBlocks?.length?[{...t,innerBlocks:C(t.innerBlocks,o)}]:[t])}const S=[{save:f,isEligible:(e,t)=>j(t),migrate(e,t){const o={displayStyle:r.attributes.displayStyle.default,autoselect:r.attributes.autoselect.default,disabledAttributesAction:r.attributes.disabledAttributesAction.default},s=C(t,o);return[{...e,displayStyle:o.displayStyle,autoselect:o.autoselect,disabledAttributesAction:o.disabledAttributesAction},s]}}];s(98023),(0,e.registerBlockType)(r,{edit:function(e){const{attributes:t,setAttributes:o,clientId:r}=e,{className:s,displayStyle:a,autoselect:h,disabledAttributesAction:f}=t,y=(0,n.useBlockProps)({className:s}),{product:v}=(0,l.useProductDataContext)(),k=(0,d.isProductResponseItem)(v)&&"variable"===v.type?v.attributes:g.g2,{blocks:j}=(0,i.useSelect)(e=>{const{getBlocks:t}=e(n.store);return{blocks:t(r)}},[r]),[C,S]=(0,c.useState)();return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(n.InspectorControls,{children:[(0,w.jsx)(p.__experimentalToolsPanel,{label:(0,u.__)("Style","woocommerce"),resetAll:()=>{o({displayStyle:_}),(0,m.w)(r,_,b)},children:(0,w.jsx)(p.__experimentalToolsPanelItem,{hasValue:()=>a!==_,label:(0,u.__)("Style","woocommerce"),onDeselect:()=>{o({displayStyle:_}),(0,m.w)(r,_,b)},isShownByDefault:!0,children:(0,w.jsxs)("div",{children:[(0,w.jsx)("span",{className:"screen-reader-text",children:(0,u.__)("Style","woocommerce")}),(0,w.jsx)(m.N,{clientId:r,currentStyle:a,getFallbackDisplayStyleInsertionPoint:b,onChange:e=>{o({displayStyle:e})}})]})})}),(0,w.jsxs)(p.__experimentalToolsPanel,{label:(0,u.__)("Auto-select","woocommerce"),resetAll:()=>o({autoselect:!1,disabledAttributesAction:"disable"}),children:[(0,w.jsx)(p.__experimentalToolsPanelItem,{label:(0,u.__)("Auto-select when only one option is available","woocommerce"),hasValue:()=>h,onDeselect:()=>o({autoselect:!1}),isShownByDefault:!0,children:(0,w.jsx)(p.ToggleControl,{label:(0,u.__)("Auto-select when only one option is available","woocommerce"),help:(0,u.__)("Automatically select options on page load or after the shopper changes attributes, when only one valid choice is available.","woocommerce"),checked:h,onChange:()=>o({autoselect:!h}),__nextHasNoMarginBottom:!0})}),(0,w.jsx)(p.__experimentalToolsPanelItem,{label:(0,u.__)("Invalid options","woocommerce"),hasValue:()=>"disable"!==f,onDeselect:()=>o({disabledAttributesAction:"disable"}),isShownByDefault:!0,children:(0,w.jsxs)(p.__experimentalToggleGroupControl,{label:(0,u.__)("Invalid options","woocommerce"),help:(0,u.__)("Control the display of invalid options.","woocommerce"),value:f,onChange:e=>{"hide"!==e&&"disable"!==e||o({disabledAttributesAction:e})},isBlock:!0,size:"__unstable-large",children:[(0,w.jsx)(p.__experimentalToggleGroupControlOption,{value:"disable",label:(0,u.__)("Grayed-out","woocommerce")}),(0,w.jsx)(p.__experimentalToggleGroupControlOption,{value:"hide",label:(0,u.__)("Hidden","woocommerce")})]})})]})]}),(0,w.jsx)("div",{...y,children:k.map((e,t)=>(0,w.jsx)(l.CustomDataProvider,{id:"attribute",data:e,children:(0,w.jsx)(x,{blocks:j,isSelected:(C??0)===t,onSelect:()=>S(t)})},t))})]})},icon:{src:(0,w.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:f,deprecated:S})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(69544);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-variation-selector-attribute-name","title":"Variation Selector: Attribute Name (Beta)","description":"Format the name of an attribute associated with a variable product.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"ancestor":["woocommerce/add-to-cart-with-options-variation-selector-attribute"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","supports":{"inserter":false,"interactivity":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}}},"usesContext":["woocommerce/attributeId","woocommerce/attributeName","woocommerce/attributeTerms"],"style":"file:../woocommerce/add-to-cart-with-options-variation-selector-attribute-name-style.css"}');var c=s(94715),n=s(62796),i=s(4921),a=s(10790);(0,e.registerBlockType)(r,{edit:function(e){const{attributes:t}=e,{className:o}=t,r=(0,c.__experimentalUseColorProps)(t),[s,l]=(0,c.useSettings)("typography.fluid","layout"),d=(0,c.getTypographyClassesAndStyles)(t,{typography:{fluid:s},layout:{wideSize:l?.wideSize}}),u=(0,c.__experimentalGetSpacingClassesAndStyles)(t),m=(0,c.useBlockProps)({className:(0,i.A)(o,r.className,d.className,u.className),style:{...r.style,...d.style,...u.style}}),{data:p}=(0,n.useCustomDataContext)("attribute");if(p)return(0,a.jsx)("label",{...m,htmlFor:p.taxonomy,children:p.name})},icon:{src:(0,a.jsx)(t.A,{icon:o.A})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-grouped-product-selector","title":"Grouped Product Selector (Beta)","description":"Display a group of products that can be added to the cart.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options"],"textdomain":"woocommerce","apiVersion":3,"supports":{"interactivity":true},"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-with-options-grouped-product-selector"}');var c=s(94715);const n=[["woocommerce/add-to-cart-with-options-grouped-product-item",{},[["core/group",{layout:{type:"flex",orientation:"horizontal",flexWrap:"nowrap"},style:{spacing:{margin:{top:"1rem",bottom:"1rem"}}}},[["woocommerce/add-to-cart-with-options-grouped-product-item-selector"],["woocommerce/add-to-cart-with-options-grouped-product-item-label",{fontSize:"medium",style:{layout:{selfStretch:"fill"},spacing:{margin:{top:"0",bottom:"0"}},typography:{fontWeight:400}}}],["core/group",{layout:{type:"flex",orientation:"vertical",justifyContent:"right"},style:{spacing:{blockGap:"0"}}},[["woocommerce/product-price",{isDescendentOfSingleProductBlock:!0,fontSize:"medium",textAlign:"right",style:{typography:{fontWeight:400}}}],["woocommerce/product-stock-indicator"]]]]]]]];var i=s(10790);(0,e.registerBlockType)(r,{edit:function(e){const{className:t}=e.attributes,o=(0,c.useBlockProps)({className:t}),r=(0,c.useInnerBlocksProps)(o,{template:n,templateLock:"all"});return(0,i.jsx)("div",{...r})},icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:function(){const e=c.useBlockProps.save(),t=c.useInnerBlocksProps.save({...e,role:"list"});return(0,i.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-grouped-product-item","title":"Grouped Product: Template (Beta)","description":"A list item template that represents a child product within the Grouped Product Selector block.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options-grouped-product-selector"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","supports":{"inserter":false,"interactivity":true},"style":"file:../woocommerce/add-to-cart-with-options-grouped-product-item-style.css"}');var c=s(86087),n=s(94715),i=s(98945),a=s(62796),l=s(47143),d=s(40314),u=s(97529),m=s(56427),p=s(27723),h=s(36352);const g=[{id:1,name:(0,p.__)("Beanie","woocommerce"),parent:0,type:"simple",variation:"",permalink:"https://example.org",slug:"wp-beanie",sku:"wp-beanie",short_description:(0,p.__)("Warm hat for winter","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"799",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol" translate="no">$</span>7.99</span>',images:[{id:1,src:h.sW+"previews/beanie.jpg",thumbnail:h.sW+"previews/beanie.jpg",name:"beanie-1.jpg",alt:"Beanie",srcset:"",sizes:""}],average_rating:"5",categories:[{id:1,name:"Clothing",slug:"clothing",link:"https://example.org"}],tags:[],attributes:[],variations:[],review_count:1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"799",regular_price:"999",sale_price:"799",price_range:null},add_to_cart:{text:(0,p.__)("Add to cart","woocommerce"),description:(0,p.__)("Add to cart","woocommerce"),url:"#",minimum:1,maximum:9999,multiple_of:1,single_text:(0,p.__)("Add to cart","woocommerce")},has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,stock_availability:{text:(0,p.__)("In stock","woocommerce"),class:"in-stock"},sold_individually:!1,grouped_products:[],regular_price:"999",sale_price:"799",on_sale:!0},{id:2,name:(0,p.__)("Cap","woocommerce"),parent:0,type:"simple",variation:"",permalink:"https://example.org",slug:"wp-cap",sku:"wp-cap",short_description:(0,p.__)("Warm hat for winter","woocommerce"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"2299",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>22.99</span>',images:[{id:1,src:h.sW+"previews/cap.jpg",thumbnail:h.sW+"previews/cap.jpg",name:"cap-1.jpg",alt:"Cap",srcset:"",sizes:""}],average_rating:"5",categories:[{id:1,name:"Clothing",slug:"clothing",link:"https://example.org"}],tags:[],attributes:[],variations:[],review_count:1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"2299",regular_price:"2499",sale_price:"2299",price_range:null},add_to_cart:{text:(0,p.__)("Add to cart","woocommerce"),description:(0,p.__)("Add to cart","woocommerce"),url:"#",minimum:1,maximum:9999,multiple_of:1,single_text:(0,p.__)("Add to cart","woocommerce")},has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,stock_availability:{text:(0,p.__)("In stock","woocommerce"),class:"in-stock"},sold_individually:!1,grouped_products:[],regular_price:"2499",sale_price:"2299",on_sale:!0},{id:3,name:(0,p.__)("Polo","woocommerce"),parent:0,type:"simple",variation:"",permalink:"https://example.org",slug:"polo",sku:"woo-polo",short_description:(0,p.__)("Polo","woocommerce"),description:"Polo",price:"2299",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>22.99</span>',images:[{id:1,src:h.sW+"previews/polo.jpg",thumbnail:h.sW+"previews/polo.jpg",name:"polo-1.jpg",alt:"Polo",srcset:"",sizes:""}],average_rating:"5",categories:[{id:1,name:"Clothing",slug:"clothing",link:"https://example.org"}],tags:[],attributes:[],variations:[],review_count:1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"2299",regular_price:"2499",sale_price:"2299",price_range:null},add_to_cart:{text:(0,p.__)("Add to cart","woocommerce"),description:(0,p.__)("Add to cart","woocommerce"),url:"#",minimum:1,maximum:9999,multiple_of:1,single_text:(0,p.__)("Add to cart","woocommerce")},has_options:!1,is_purchasable:!0,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,stock_availability:{text:(0,p.__)("In stock","woocommerce"),class:"in-stock"},sold_individually:!1,grouped_products:[],regular_price:"2499",sale_price:"2299",on_sale:!0}];var w=s(10790);const _=({product:e,blocks:t,isLoading:o,isSelected:r,onSelect:s})=>{const c=(0,n.__experimentalUseBlockPreview)({blocks:t}),i=(0,n.useInnerBlocksProps)({},{templateLock:"insert"});return(0,w.jsx)(a.ProductDataContextProvider,{product:e,isLoading:o,children:r?(0,w.jsx)("div",{...i}):(0,w.jsx)("div",{...c,onClick:s})})},b=(0,i.A)(({attributes:e,isLoading:t=!0,product:o=null,blocks:r,isSelected:s,onSelect:c})=>(0,w.jsx)(n.BlockContextProvider,{value:{postId:e.productId,postType:"product"},children:(0,w.jsx)(_,{product:o,blocks:r,isLoading:t,isSelected:s,onSelect:c})}));(0,e.registerBlockType)(r,{edit:function(e){const{clientId:t}=e,{className:o}=e.attributes,r=(0,n.useBlockProps)({className:o}),{product:s,isLoading:i}=(0,a.useProductDataContext)(),[p,h]=(0,c.useState)(!0),[x,f]=(0,c.useState)(null),y=x?.length||0;(0,c.useEffect)(()=>{const e=async e=>{e&&0!==e.length?(0,l.resolveSelect)(d.productsStore).getProducts({include:e,per_page:e.length,_fields:["id"]}).then(e=>{f(e),h(!1)}):h(!1)};!i&&s&&0===y&&((0,u.isProductResponseItem)(s)?e(s.grouped_products):(0,l.resolveSelect)(d.productsStore).getProducts({type:"grouped",per_page:1}).then(t=>{t.length>0&&t[0]?.grouped_products?.length>0?e(t[0].grouped_products):(0,l.resolveSelect)(d.productsStore).getProducts({per_page:3,_fields:["id"]}).then(e=>{e.length>0&&f(e),h(!1)})}))},[i,s,y]);const{blocks:v}=(0,l.useSelect)(e=>{const{getBlocks:o}=e(n.store);return{blocks:o(t)}},[t]),[k,j]=(0,c.useState)();if(i||p)return(0,w.jsx)(m.Spinner,{});const C=x?x?.map(e=>(0,w.jsx)(b,{attributes:{productId:e.id},blocks:v,isSelected:(k??x[0]?.id)===e.id,onSelect:()=>j(e.id)},e.id)):g?.map(e=>(0,w.jsx)(_,{product:e,blocks:v,isLoading:!1,isSelected:(k??g[0]?.id)===e.id,onSelect:()=>j(e.id)},e.id));return(0,w.jsx)("div",{...r,children:(0,w.jsx)(a.InnerBlockLayoutContextProvider,{parentName:"woocommerce/add-to-cart-with-options-grouped-product-item",children:C})})},icon:{src:(0,w.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:function(){const e=n.useBlockProps.save(),t=n.useInnerBlocksProps.save({...e,role:"listitem"});return(0,w.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5764);const r=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-grouped-product-item-selector","title":"Grouped Product: Item Selector (Beta)","description":"Add a way of selecting a child product within the Grouped Product block. Depending on the type of product and its properties, this might be a button, a checkbox, or a link.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options-grouped-product-item"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","supports":{"inserter":false,"interactivity":true},"style":"file:../woocommerce/add-to-cart-with-options-grouped-product-item-selector-style.css"}');var c=s(62796),n=s(56427),i=s(94715),a=s(27723),l=s(97529),d=s(68566),u=s(10790);const m=()=>{const{isLoading:e,product:t}=(0,c.useProductDataContext)();if(e||!(0,l.isProductResponseItem)(t))return(0,u.jsx)(n.Spinner,{});const{permalink:o,add_to_cart:r,has_options:s,is_purchasable:i,is_in_stock:m,sold_individually:p}=t;return!s&&i&&m?p?(0,u.jsx)("input",{type:"checkbox",value:"1",className:"wc-grouped-product-add-to-cart-checkbox"}):(0,u.jsx)(d.A,{}):(0,u.jsx)("a",{"aria-label":r?.description||"",className:"button wp-element-button add_to_cart_button wc-block-components-product-button__button",href:o,children:r?.text||(0,a.__)("Add to Cart","woocommerce")})};s(1541),(0,e.registerBlockType)(r,{edit:function(){const e=(0,i.useBlockProps)({className:"wc-block-add-to-cart-with-options-grouped-product-item-selector"});return(0,u.jsx)("div",{...e,children:(0,u.jsx)(n.Disabled,{children:(0,u.jsx)(m,{})})})},icon:{src:(0,u.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(69544),o=s(94715),r=s(62796),c=s(56427),n=s(97529);const i=JSON.parse('{"name":"woocommerce/add-to-cart-with-options-grouped-product-item-label","title":"Grouped Product: Item Label (Beta)","description":"Display the product title as a label or paragraph.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"ancestor":["woocommerce/add-to-cart-with-options-grouped-product-item"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","supports":{"color":{"text":true,"background":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"layout":{"selfStretch":true},"spacing":{"margin":true,"padding":true,"blockGap":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"textAlign":true,"__experimentalDefaultControls":{"fontSize":true,"fontWeight":true,"fontStyle":true}}},"usesContext":["postId","postType"]}');var a=s(10790);(0,e.registerBlockType)(i.name,{...i,edit:function(){const e=(0,o.useBlockProps)(),{isLoading:t,product:s}=(0,r.useProductDataContext)();return t||!(0,n.isProductResponseItem)(s)?(0,a.jsx)(c.Spinner,{}):(0,a.jsx)("div",{...e,children:(0,a.jsx)("div",{className:"wp-block-woocommerce-add-to-cart-with-options-grouped-product-item-label",children:s.name})})},icon:t.A,save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(41096),r=s(27723),c=s(94715),n=s(86087),i=s(56427),a=s(5573),l=s(10790);function d({level:e}){const t={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return t.hasOwnProperty(e)?(0,l.jsx)(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)(a.Path,{d:t[e]})}):null}class u extends n.Component{createLevelControl(e,t,o){const s=e===t;return{icon:(0,l.jsx)(d,{level:e}),title:(0,r.sprintf)(/* translators: %s: heading level e.g: "2", "3", "4" */ /* translators: %s: heading level e.g: "2", "3", "4" */ (0,r.__)("Heading %d","woocommerce"),e),isActive:s,onClick:()=>o(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:o,selectedLevel:r,onChange:s}=this.props,c=Array.from({length:o-t+1},(e,o)=>o+t);return(0,l.jsx)(i.ToolbarGroup,{isCollapsed:e,icon:(0,l.jsx)(d,{level:r}),controls:c.map(e=>this.createLevelControl(e,r,s))})}}const m=u;var p=s(38708);s(41784);const h=!0,g="_self";var w=s(4921),_=s(69544);const b=(0,l.jsx)(t.A,{icon:_.A,className:"wc-block-editor-components-block-icon"});var x=s(83925);(0,e.registerBlockType)(x,{icon:{src:b},edit:({attributes:e,setAttributes:t})=>{const o=(0,c.useBlockProps)(),{headingLevel:s,showProductLink:n,align:a,linkTarget:d}=e;return(0,l.jsxs)("div",{...o,children:[(0,l.jsxs)(c.BlockControls,{children:[(0,l.jsx)(m,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:s,onChange:e=>t({headingLevel:e})}),(0,l.jsx)(c.AlignmentToolbar,{value:a,onChange:e=>{t({align:e})}})]}),(0,l.jsx)(c.InspectorControls,{children:(0,l.jsxs)(i.__experimentalToolsPanel,{label:(0,r.__)("Link settings","woocommerce"),resetAll:()=>t({showProductLink:h,linkTarget:g}),children:[(0,l.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Make title a link","woocommerce"),hasValue:()=>n!==h,onDeselect:()=>t({showProductLink:h}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{label:(0,r.__)("Make title a link","woocommerce"),checked:n,onChange:()=>t({showProductLink:!n})})}),n&&(0,l.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Open in new tab","woocommerce"),hasValue:()=>d!==g,onDeselect:()=>t({linkTarget:g}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{label:(0,r.__)("Open in new tab","woocommerce"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===d})})]})}),(0,l.jsx)(i.Disabled,{children:(0,l.jsx)(p.A,{...e})})]})},save:({attributes:e})=>(0,l.jsx)("div",{...c.useBlockProps.save({className:(0,w.A)("is-loading",e.className)})})});var f=s(60407),y=s(84718);const v=({attributes:e})=>e.isDescendentOfQueryLoop||e.isDescendentOfSingleProductBlock||e.isDescendentOfSingleProductTemplate?null:(0,l.jsx)("div",{className:(0,w.A)("is-loading",e.className)});var k=s(36352),j=s(97529),C=s(73805),S=s(47143),A=s(73993),N=s(29283);const P=()=>({isDescendentOfSingleProductTemplate:(0,S.useSelect)(e=>{const t=e(N.Y),o=t?.getEditedPostSlug?.();return!!(0,A.isString)(o)&&o.includes("single-product")},[])}),B={...JSON.parse('{"name":"woocommerce/product-price","title":"Product Price","description":"Display the price of a product.","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"textAlign":{"type":"string","default":""},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false}},"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"supports":{"html":false,"interactivity":true,"color":{"text":true,"background":true,"link":false,"__experimentalSkipSerialization":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalLetterSpacing":true,"__experimentalSkipSerialization":true},"email":true,"spacing":{"margin":true,"padding":true,"__experimentalSkipSerialization":["padding"]}},"selectors":{"root":".wp-block-woocommerce-product-price .wc-block-components-product-price","spacing":{"margin":".wp-block-woocommerce-product-price","padding":".wp-block-woocommerce-product-price .wc-block-components-product-price"}},"ancestor":["woocommerce/all-products","woocommerce/featured-product","woocommerce/single-product","woocommerce/product-template","core/post-template"],"style":"file:../product-price.css","$schema":"https://schemas.wp.org/trunk/block.json"}'),icon:(0,l.jsx)(t.A,{icon:y.A,className:"wc-block-editor-components-block-icon"}),edit:({attributes:e,setAttributes:t,context:o})=>{const r=(0,c.useBlockProps)(),s={...e,...o},i=Number.isFinite(o.queryId);let{isDescendentOfSingleProductTemplate:a}=P();i&&(a=!1),(0,n.useEffect)(()=>t({isDescendentOfQueryLoop:i,isDescendentOfSingleProductTemplate:a}),[i,a,t]);const d=(0,k.Sc)(),{product:u}=(0,j.useProduct)(o.postId);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:e.textAlign,onChange:e=>{t({textAlign:e})}})}),(0,l.jsx)("div",{...r,children:d?(0,l.jsx)(C.default,{...s,isAdmin:!0,product:u,isExperimentalWcRestApiV4Enabled:d}):(0,l.jsx)(C.default,{...s,product:void 0,isAdmin:!1,isExperimentalWcRestApiV4Enabled:!1})})]})},save:v};(0,f.W)(B,{isAvailableOnPostEditor:!0});var I=s(47746),T=s(34903);const E=[{save:v,attributes:I.attributes,isEligible:({showSaleBadge:e})=>(0,T.S)(e),migrate:t=>{const{showSaleBadge:o,saleBadgeAlign:r}=t;return!1===o?[t]:[{...t,showSaleBadge:!1},[(0,e.createBlock)("woocommerce/product-sale-badge",{align:r})]]}}];var R=s(43129);const D=({blockClientId:e})=>{const{isDescendentOfSingleProductBlock:t}=(0,S.useSelect)(t=>{const{getBlockParentsByBlockName:o}=t("core/block-editor");return{isDescendentOfSingleProductBlock:o(e?.replace("block-",""),["woocommerce/single-product"]).length>0}},[e]);return{isDescendentOfSingleProductBlock:t}},L={cover:(0,r.__)("Image is scaled and cropped to fill the entire space without being distorted.","woocommerce"),contain:(0,r.__)("Image is scaled to fill the space without clipping nor distorting.","woocommerce"),fill:(0,r.__)("Image will be stretched and distorted to completely fill the space.","woocommerce")},O=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"vw",label:"vw"},{value:"vh",label:"vh"}],M=({scale:e,width:t,height:o,setAttributes:s})=>(0,l.jsxs)(i.__experimentalToolsPanel,{className:"wc-block-product-image__tools-panel",label:(0,r.__)("Image size","woocommerce"),children:[(0,l.jsx)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,r.__)("Height","woocommerce"),onChange:e=>{s({height:e})},value:o,units:O}),(0,l.jsx)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,r.__)("Width","woocommerce"),onChange:e=>{s({width:e})},value:t,units:O}),o&&(0,l.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!0,label:(0,r.__)("Scale","woocommerce"),children:(0,l.jsx)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Scale","woocommerce"),value:e,help:L[e],onChange:e=>s({scale:e}),isBlock:!0,children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.__experimentalToggleGroupControlOption,{value:"cover",label:(0,r.__)("Cover","woocommerce")}),(0,l.jsx)(i.__experimentalToggleGroupControlOption,{value:"contain",label:(0,r.__)("Contain","woocommerce")}),(0,l.jsx)(i.__experimentalToggleGroupControlOption,{value:"fill",label:(0,r.__)("Fill","woocommerce")})]})})})]}),V=[["woocommerce/product-sale-badge",{align:"right"}]],F=!0;var H=(0,l.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)(a.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});const z=(0,l.jsx)(t.A,{icon:H,className:"wc-block-editor-components-block-icon"});(0,e.registerBlockType)(I,{deprecated:E,icon:z,edit:({attributes:e,setAttributes:t,context:o,clientId:s})=>{const{showProductLink:a,width:d,height:u,scale:m}=e,p=(0,n.useRef)(null),h=(0,c.useBlockProps)(),{wasBlockJustInserted:g,isInProductGallery:w}=(0,S.useSelect)(e=>({wasBlockJustInserted:e(c.store).wasBlockJustInserted(s),isInProductGallery:e(c.store).getBlockParentsByBlockName(s,"woocommerce/product-gallery").length>0}),[s]),_=Number.isFinite(o.queryId),{isDescendentOfSingleProductBlock:b}=D({blockClientId:h?.id});(0,n.useEffect)(()=>{t(_||b?{isDescendentOfQueryLoop:_,isDescendentOfSingleProductBlock:b,showSaleBadge:!1}:{isDescendentOfQueryLoop:_,isDescendentOfSingleProductBlock:b})},[_,b,t]);const x=_||b,f=(0,c.useInnerBlocksProps)({className:"wc-block-components-product-image__inner-container"},{dropZoneElement:p.current,template:g?V:void 0}),{product:y,isResolving:v}=(0,j.useProduct)(o.postId);return(0,l.jsxs)("div",{...h,children:[x&&!w&&(0,l.jsxs)(c.InspectorControls,{children:[(0,l.jsx)(M,{scale:m,width:d,height:u,setAttributes:t}),(0,l.jsx)(i.__experimentalToolsPanel,{label:(0,r.__)("Content","woocommerce"),resetAll:()=>t({showProductLink:F}),children:(0,l.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Link to Product Page","woocommerce"),hasValue:()=>a!==F,onDeselect:()=>t({showProductLink:F}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Link to Product Page","woocommerce"),help:(0,r.__)("Links the image to the single product listing.","woocommerce"),checked:a,onChange:()=>t({showProductLink:!a})})})})]}),(0,l.jsx)(R.A,{...e,...o,isAdmin:!0,product:y,isResolving:v,children:x&&(0,l.jsx)("div",{...f})})]})},save:({attributes:e})=>e.isDescendentOfQueryLoop||e.isDescendentOfSingleProductBlock?(0,l.jsx)(c.InnerBlocks.Content,{}):(0,l.jsx)("div",{className:(0,w.A)("is-loading",e.className)})});var $=s(45547);s(23081);var W=s(77092);(0,r.__)("Product Rating","woocommerce");const G=(0,l.jsx)(t.A,{icon:W.A,className:"wc-block-editor-components-block-icon"}),q=((0,r.__)("Display the average rating of a product.","woocommerce"),{...JSON.parse('{"name":"woocommerce/product-rating","icon":"info","title":"Product Rating","description":"Display the average rating of a product.","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"textAlign":{"type":"string","default":""},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false}},"supports":{"interactivity":{"clientNavigation":true},"color":{"text":true,"background":false,"link":false,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"__experimentalSkipSerialization":true}},"selectors":{"root":".wp-block-woocommerce-product-rating.wc-block-components-product-rating, .wp-block-woocommerce-product-rating .wc-block-components-product-rating"},"ancestor":["woocommerce/all-products","woocommerce/single-product","woocommerce/product-template","core/post-template"],"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),icon:{src:G},edit:e=>{const{attributes:t,setAttributes:o,context:r}=e,s=(0,c.useBlockProps)({className:"wp-block-woocommerce-product-rating"}),i={...t,...r,shouldDisplayMockedReviewsWhenProductHasNoReviews:!0},a=Number.isFinite(r.queryId),{isDescendentOfSingleProductBlock:d}=D({blockClientId:s?.id});let{isDescendentOfSingleProductTemplate:u}=P();(a||d)&&(u=!1),(0,n.useEffect)(()=>{o({isDescendentOfQueryLoop:a,isDescendentOfSingleProductBlock:d,isDescendentOfSingleProductTemplate:u})},[o,a,d,u]);const{product:m}=(0,j.useProduct)(r.postId);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:t.textAlign,onChange:e=>{o({textAlign:e||""})}})}),(0,l.jsx)("div",{...s,children:(0,l.jsx)($.default,{isAdmin:!0,...i,product:m})})]})},save:v});(0,f.W)(q,{isAvailableOnPostEditor:!0});var U=s(44657);const Y=JSON.parse('{"name":"woocommerce/product-rating-stars","title":"Product Rating Stars","description":"Display the average rating of a product with stars","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"textAlign":{"type":"string","default":""},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false}},"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"inserter":false,"color":{"text":true,"background":false,"link":false,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"__experimentalSkipSerialization":true}},"selectors":{"root":".wp-block-woocommerce-product-rating-stars.wc-block-components-product-rating, .wp-block-woocommerce-product-rating-stars .wc-block-components-product-rating"},"ancestor":["woocommerce/single-product"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var Z=s(63895);(0,e.registerBlockType)(Y,{apiVersion:3,icon:{src:(0,l.jsx)(t.A,{icon:U.A,className:"wc-block-editor-components-block-icon"})},edit:e=>{const{attributes:t,setAttributes:o,context:r}=e,s=(0,c.useBlockProps)({className:"wp-block-woocommerce-product-rating"}),i={...t,...r,shouldDisplayMockedReviewsWhenProductHasNoReviews:!0},a=Number.isFinite(r.queryId),{isDescendentOfSingleProductBlock:d}=D({blockClientId:s?.id});let{isDescendentOfSingleProductTemplate:u}=P();return(a||d)&&(u=!1),(0,n.useEffect)(()=>{o({isDescendentOfQueryLoop:a,isDescendentOfSingleProductBlock:d,isDescendentOfSingleProductTemplate:u})},[o,a,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:t.textAlign,onChange:e=>{o({textAlign:e||""})}})}),(0,l.jsx)("div",{...s,children:(0,l.jsx)(Z.default,{...i})})]})}});const J=JSON.parse('{"name":"woocommerce/product-rating-counter","title":"Product Rating Counter","description":"Display the review count of a product","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"textAlign":{"type":"string","default":""},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false}},"supports":{"interactivity":{"clientNavigation":true},"inserter":false,"color":{"text":false,"background":false,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"__experimentalSkipSerialization":true}},"selectors":{"root":".wp-block-woocommerce-product-rating-counter.wc-block-components-product-rating-counter, .wp-block-woocommerce-product-rating-counter .wc-block-components-product-rating-counter"},"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"ancestor":["woocommerce/single-product"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var X=s(47924);(0,e.registerBlockType)(J,{apiVersion:3,icon:{src:(0,l.jsx)(t.A,{icon:U.A,className:"wc-block-editor-components-block-icon"})},edit:e=>{const{attributes:t,setAttributes:o,context:r}=e,s=(0,c.useBlockProps)({className:"wp-block-woocommerce-product-rating-counter"}),i={...t,...r,shouldDisplayMockedReviewsWhenProductHasNoReviews:!0},a=Number.isFinite(r.queryId),{isDescendentOfSingleProductBlock:d}=D({blockClientId:s?.id});let{isDescendentOfSingleProductTemplate:u}=P();return(a||d)&&(u=!1),(0,n.useEffect)(()=>{o({isDescendentOfQueryLoop:a,isDescendentOfSingleProductBlock:d,isDescendentOfSingleProductTemplate:u})},[o,a,d,u]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:t.textAlign,onChange:e=>{o({textAlign:e||""})}})}),(0,l.jsx)("div",{...s,children:(0,l.jsx)(X.default,{...i})})]})}});var Q=s(41180);const K=JSON.parse('{"name":"woocommerce/product-average-rating","title":"Product Average Rating (Beta)","description":"Display the average rating of a product","apiVersion":3,"category":"woocommerce-product-elements","attributes":{"textAlign":{"type":"string"}},"keywords":["WooCommerce"],"ancestor":["woocommerce/single-product"],"supports":{"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"padding":true,"__experimentalSkipSerialization":true},"typography":{"fontSize":true,"__experimentalFontWeight":true,"__experimentalSkipSerialization":true},"__experimentalSelector":".wc-block-components-product-average-rating"},"textdomain":"woocommerce","$schema":"https://schemas.wp.org/trunk/block.json"}');var ee=s(64765);(0,e.registerBlockType)(K,{apiVersion:3,icon:{src:(0,l.jsx)(t.A,{icon:Q.A,className:"wc-block-editor-components-block-icon"})},edit:e=>{const{attributes:t,setAttributes:o}=e,r=(0,c.useBlockProps)({className:"wp-block-woocommerce-product-average-rating"});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:t.textAlign,onChange:e=>{o({textAlign:e||""})}})}),(0,l.jsx)("div",{...r,children:(0,l.jsx)(ee.default,{...t})})]})}});var te=s(5764),oe=s(76754);const re=void 0;function se({selectedWidth:e,setAttributes:t}){return(0,l.jsx)(i.__experimentalToolsPanel,{label:(0,r.__)("Width settings","woocommerce"),resetAll:()=>t({width:re}),children:(0,l.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Button width","woocommerce"),hasValue:()=>e!==re,onDeselect:()=>t({width:re}),isShownByDefault:!0,children:(0,l.jsx)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,r.__)("Button width","woocommerce"),value:e,isDeselectable:!0,onChange:e=>t({width:e}),children:[25,50,75,100].map(e=>(0,l.jsx)(i.__experimentalToggleGroupControlOption,{value:e,label:`${e}%`},e))})})})}const ce=JSON.parse('{"name":"woocommerce/product-button","title":"Add to Cart Button","description":"Display a call to action button which either adds the product to the cart, or links to the product page.","category":"woocommerce-product-elements","keywords":["WooCommerce"],"usesContext":["query","queryId","postId","collection","woocommerce/isDescendantOfAddToCartWithOptions"],"textdomain":"woocommerce","attributes":{"productId":{"type":"number","default":0},"textAlign":{"type":"string","default":""},"width":{"type":"number"},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendentOfQueryLoop":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"color":{"text":true,"background":true,"link":false,"__experimentalSkipSerialization":true},"interactivity":true,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true},"spacing":{"margin":true,"padding":true,"__experimentalSkipSerialization":true},"email":true},"selectors":{"root":".wp-block-woocommerce-product-button .wc-block-components-product-button__button"},"ancestor":["woocommerce/all-products","woocommerce/single-product","core/post-template","woocommerce/product-template"],"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/product-button","style":"file:../woocommerce/product-button-style.css"}');(0,e.registerBlockType)(ce,{apiVersion:3,icon:{src:(0,l.jsx)(t.A,{icon:te.A,className:"wc-block-editor-components-block-icon"})},attributes:{...ce.attributes},edit:({attributes:e,setAttributes:t,context:o})=>{const r=(0,c.useBlockProps)(),{product:s}=(0,j.useProduct)(o?.postId),a=Number.isFinite(o?.queryId),{width:d}=e;return(0,n.useEffect)(()=>t({isDescendentOfQueryLoop:a}),[t,a]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(c.AlignmentToolbar,{value:e.textAlign,onChange:e=>{t({textAlign:e||""})}})}),(0,l.jsx)(c.InspectorControls,{children:(0,l.jsx)(se,{selectedWidth:d,setAttributes:t})}),(0,l.jsx)("div",{...r,children:(0,l.jsx)(i.Disabled,{children:(0,l.jsx)(oe.default,{...e,...o,product:{...s,button_text:s?.button_text||""},isAdmin:!0,blockClientId:r?.id,className:(0,w.A)(e.className,{[`has-custom-width wp-block-button__width-${d}`]:d})})})})]})},save:({attributes:e,innerBlocks:t})=>e.isDescendentOfQueryLoop||e.isDescendentOfSingleProductBlock||!t||0===t?.length?null:(0,l.jsx)("div",{...c.useBlockProps.save({className:(0,w.A)("is-loading",e.className,{[`has-custom-width wp-block-button__width-${e.width}`]:e.width})})})});var ne=s(42822);s(83030);const ie=({showDescriptionIfEmpty:e,setAttributes:t})=>{const o=(0,r.__)("Show description if empty","woocommerce"),s=(0,r.__)("Display the product description if it doesn't have a summary","woocommerce");return(0,l.jsx)(i.__experimentalToolsPanelItem,{label:o,hasValue:()=>!0===e,onDeselect:()=>t({showDescriptionIfEmpty:!1}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{label:o,help:s,checked:e,onChange:e=>{t({showDescriptionIfEmpty:e})}})})},ae=({summaryLength:e,setAttributes:t})=>{const o=(0,r.__)("Max word count","woocommerce"),s=(0,r.__)("If the content exceeds the word limit, only the first paragraph will be shown. If the content is within the limit, all paragraphs will be displayed. Set to 0 to remove the word limit.","woocommerce");return(0,l.jsx)(i.__experimentalToolsPanelItem,{label:o,hasValue:()=>0!==e,onDeselect:()=>t({summaryLength:0}),isShownByDefault:!0,children:(0,l.jsx)(i.RangeControl,{label:o,help:s,value:e,onChange:e=>{t({summaryLength:e||0})},min:0,max:200,step:1})})},le=({showLink:e,setAttributes:t})=>{const o=(0,r.__)("Link to description","woocommerce"),s=(0,r.__)("Display a button to let shoppers jump to the product's description","woocommerce");return(0,l.jsx)(i.__experimentalToolsPanelItem,{label:o,hasValue:()=>!1===e,onDeselect:()=>t({showLink:!1}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{label:o,help:s,checked:e,onChange:e=>{t({showLink:e})}})})},de=({linkText:e,setAttributes:t})=>(0,l.jsx)("p",{children:(0,l.jsx)(c.RichText,{identifier:"linkToDescription",className:"wc-block-components-product-summary__more-link",tagName:"a","aria-label":(0,r.__)("“Read more” link text","woocommerce"),placeholder:(0,r.__)('Add "read more" link text',"woocommerce"),value:e,onChange:e=>t({linkText:e}),withoutInteractiveFormatting:!0})});var ue=s(53522);const me=JSON.parse('{"name":"woocommerce/product-summary","icon":"page","title":"Product Summary","description":"Display a short description about a product.","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendantOfAllProducts":{"type":"boolean","default":false},"showDescriptionIfEmpty":{"type":"boolean","default":false},"showLink":{"type":"boolean","default":false},"summaryLength":{"type":"number","default":0},"linkText":{"type":"string","default":""}},"supports":{"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"textAlign":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}}},"selectors":{"root":".wp-block-woocommerce-product-summary.wc-block-components-product-summary, .wp-block-woocommerce-product-summary .wc-block-components-product-summary"},"ancestor":["woocommerce/all-products","woocommerce/featured-product","woocommerce/single-product","woocommerce/product-template","core/post-template"],"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var pe=s(52619),he=s(51442),ge=s(27496),we=s(4731);const _e=({clientId:t})=>{const o=(0,S.useRegistry)(),{replaceBlock:s}=(0,S.useDispatch)("core/block-editor"),c=(0,n.createInterpolateElement)((0,r.__)("There's <strongText /> with important fixes and brand new features.","woocommerce"),{strongText:(0,l.jsx)("strong",{children:(0,r.__)("new version of Product Summary","woocommerce")})}),i=(0,r.__)("Upgrade now (just this block)","woocommerce");return(0,l.jsx)(we.u,{isDismissible:!1,actionLabel:i,onActionClick:()=>{const{getBlocksByClientId:r}=o.select("core/block-editor"),c=r(t);if(c?.length&&c[0]){const o=c[0],{excerptLength:r,showMoreOnNewLine:n,moreText:i,...a}=o.attributes,l=(0,e.createBlock)("woocommerce/product-summary",a);s(t,l)}},children:c})};(0,pe.addFilter)("editor.BlockEdit","woocommerce-blocks/product-summary-upgrade-notice",e=>t=>(e=>{const t=e.attributes.__woocommerceNamespace===he.Q,o=e.attributes.__woocommerceNamespace===ge.QL;return"core/post-excerpt"===e.name&&(t||o)})(t)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.InspectorControls,{children:(0,l.jsx)(_e,{clientId:t.clientId})}),(0,l.jsx)(e,{...t})]}):(0,l.jsx)(e,{...t}));const be=[{save:v,migrate:e=>({...e,showDescriptionIfEmpty:!0,summaryLength:150}),isEligible:e=>(0,A.isEmptyObject)(e)}],xe={...me,icon:{src:ue.KT},deprecated:be,edit:({attributes:e,context:t,setAttributes:o})=>{const s=(0,c.useBlockProps)(),{showDescriptionIfEmpty:a,showLink:d,summaryLength:u,linkText:m,isDescendantOfAllProducts:p}=e,h=Number.isFinite(t.queryId),{isDescendentOfSingleProductBlock:g}=D({blockClientId:s.id});let{isDescendentOfSingleProductTemplate:w}=P();h&&(w=!1),(0,n.useEffect)(()=>o({isDescendentOfQueryLoop:h,isDescendentOfSingleProductTemplate:w,isDescendentOfSingleProductBlock:g}),[o,h,w,g]);const{product:_}=(0,j.useProduct)(t.postId);return(0,l.jsxs)("div",{...s,children:[(0,l.jsx)(ne.default,{isAdmin:!0,...e,product:_}),(0,l.jsx)(c.InspectorControls,{children:(0,l.jsxs)(i.__experimentalToolsPanel,{label:(0,r.__)("Settings","woocommerce"),resetAll:()=>{o({})},children:[(0,l.jsx)(ae,{summaryLength:u,setAttributes:o}),(0,l.jsx)(ie,{showDescriptionIfEmpty:a,setAttributes:o}),!p&&(0,l.jsx)(le,{showLink:d,setAttributes:o})]})}),!p&&d&&(0,l.jsx)(de,{linkText:m,setAttributes:o})]})},save:v};(0,f.W)(xe,{isAvailableOnPostEditor:!0});var fe=s(86083),ye=s(44927);const ve=JSON.parse('{"name":"woocommerce/product-sale-badge","title":"On-Sale Badge","description":"Displays an on-sale badge if the product is on-sale.","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendentOfQueryLoop":{"type":"boolean","default":false},"isDescendentOfSingleProductBlock":{"type":"boolean","default":false},"isDescendentOfSingleProductTemplate":{"type":"boolean","default":false}},"supports":{"interactivity":{"clientNavigation":true},"html":false,"align":true,"color":{"gradients":true,"background":true,"link":false,"__experimentalSkipSerialization":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalSkipSerialization":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true},"spacing":{"margin":true},"email":true},"selectors":{"root":".wp-block-woocommerce-product-sale-badge .wc-block-components-product-sale-badge"},"ancestor":["woocommerce/single-product","woocommerce/product-template","core/post-template","woocommerce/product-gallery"],"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"example":{},"$schema":"https://schemas.wp.org/trunk/block.json"}'),{attributes:ke}=ve,je=[{attributes:{...ke,isDescendentOfQueryLoop:{type:"boolean",default:!1},isDescendentOfSingleProductTemplate:{type:"boolean",default:!1}},save:v,apiVersion:3}],Ce={...ve,icon:(0,l.jsx)(t.A,{icon:fe.A,className:"wc-block-editor-components-block-icon"}),edit:({attributes:e,context:t})=>{const o=(0,c.useBlockProps)(),{style:r,...s}=o,{isDescendentOfSingleProductTemplate:n}=P(),i={...e,...t};return(0,l.jsx)("div",{...s,children:(0,l.jsx)(ye.default,{...i,isDescendentOfSingleProductTemplate:n})})},save:()=>null,deprecated:je};(0,f.W)(Ce,{isAvailableOnPostEditor:!0});const Se=(0,l.jsx)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})}),Ae=JSON.parse('{"name":"woocommerce/product-sku","title":"Product SKU","description":"Displays the SKU of a product.","category":"woocommerce-product-elements","attributes":{"productId":{"type":"number","default":0},"isDescendantOfAllProducts":{"type":"boolean","default":false},"showProductSelector":{"type":"boolean","default":false},"prefix":{"type":"string","default":"SKU:","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["query","queryId","postId"],"ancestor":["woocommerce/product-meta","woocommerce/all-products","woocommerce/single-product","woocommerce/product-template","core/post-template"],"supports":{"html":false,"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true},"spacing":{"margin":true,"padding":true}},"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var Ne=s(31716),Pe=(s(14093),s(13277));(0,e.registerBlockType)(Ae,{icon:(0,l.jsx)(t.A,{icon:Se,className:"wc-block-editor-components-block-icon"}),edit:({attributes:e,setAttributes:t,context:o})=>{const{style:r,...s}=(0,c.useBlockProps)({className:"wc-block-components-product-sku wp-block-woocommerce-product-sku"}),n={...e,...o},i=Number.isFinite(o.queryId);let{isDescendentOfSingleProductTemplate:a}=P();return i&&(a=!1),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Ne.A,{}),(0,l.jsx)("div",{...s,style:e.isDescendantOfAllProducts?void 0:r,children:(0,l.jsx)(Pe.default,{...n,setAttributes:t,isDescendentOfSingleProductTemplate:a,isDescendantOfAllProducts:e.isDescendantOfAllProducts})})]})},save:()=>null});var Be=s(80964);const Ie=({attributes:e,context:t})=>{const{style:o,...r}=(0,c.useBlockProps)({className:"wc-block-components-product-stock-indicator"}),s={...e,...t};return(0,l.jsxs)("div",{...r,style:e.isDescendantOfAllProducts?void 0:o,children:[(0,l.jsx)(Ne.A,{}),(0,l.jsx)(Be.default,{...s})]})},Te=JSON.parse('{"name":"woocommerce/product-stock-indicator","icon":"info","title":"Product Stock Indicator","description":"Let shoppers know when products are out of stock or on backorder. This block is hidden when products are in stock.","category":"woocommerce-product-elements","attributes":{"isDescendantOfAllProducts":{"type":"boolean","default":false}},"supports":{"html":false,"interactivity":true,"color":{"text":true,"background":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true},"spacing":{"margin":true,"padding":true}},"ancestor":["woocommerce/all-products","woocommerce/single-product","woocommerce/product-template","core/post-template"],"usesContext":["query","queryId","postId"],"keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var Ee=s(74175);const Re={...Te,icon:{src:(0,l.jsx)(t.A,{icon:Ee.A,className:"wc-block-editor-components-block-icon"})},edit:e=>(0,l.jsx)(Ie,{...e}),save:()=>null};(0,f.W)(Re,{isAvailableOnPostEditor:!0});var De=(0,l.jsx)(a.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)(a.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})}),Le=s(15703),Oe=s(34892),Me=s(25549);const Ve=({blockClientId:e,showAddToCartWithOptionsCompatibilityNotice:t})=>{const o=t?(0,r.__)("The classic Product Image Gallery block is not compatible with the Add to Cart + Options block in this template. Switch to the new Product Gallery block for a better experience.","woocommerce"):(0,n.createInterpolateElement)((0,r.__)("Upgrade to the <strongText /> for more flexibility.","woocommerce"),{strongText:(0,l.jsx)("strong",{children:(0,r.__)("Product Gallery block","woocommerce")})}),s=(0,r.__)("Use the Product Gallery block","woocommerce");return(0,l.jsx)(we.u,{isDismissible:!1,actionLabel:s,onActionClick:()=>(0,Me.T)(e),status:t?"warning":"info",children:o})};s(81986);const Fe=()=>(0,l.jsxs)("div",{className:"wc-block-editor-product-gallery",children:[(0,l.jsx)("img",{src:Le.PLACEHOLDER_IMG_SRC,alt:"Placeholder"}),(0,l.jsx)("div",{className:"wc-block-editor-product-gallery__other-images",children:[...Array(4).keys()].map(e=>(0,l.jsx)("img",{src:Le.PLACEHOLDER_IMG_SRC,alt:"Placeholder"},e))})]});var He=s(55455);s(79556);const ze="woocommerce/product-gallery",$e={...He,icon:De,edit:e=>{const t=(0,c.useBlockProps)(),o=(0,S.useSelect)(e=>{const t=e("core/block-editor").getBlocks();return!!(0,Oe.P)({blocks:t,findCondition:e=>"woocommerce/add-to-cart-with-options"===e.name})},[]);return(0,l.jsxs)("div",{...t,children:[(0,l.jsx)(c.InspectorControls,{children:(0,l.jsx)(Ve,{blockClientId:e.clientId,showAddToCartWithOptionsCompatibilityNotice:o})}),(0,l.jsx)(i.Disabled,{children:(0,l.jsx)(Fe,{})})]})},transforms:{to:[{type:"block",blocks:[ze],transform:()=>(0,e.createBlock)(ze)}]}};(0,f.W)($e,{isAvailableOnPostEditor:!1});var We=s(65448);s(752);const Ge={...JSON.parse('{"name":"woocommerce/related-products","title":"Related Products","icon":"product","description":"Display related products.","category":"woocommerce","supports":{"interactivity":{"clientNavigation":true},"align":true,"reusable":false,"inserter":false},"keywords":["WooCommerce"],"usesContext":["postId","postType","queryId"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),icon:{src:Ee.A},edit:()=>{const e=[["core/query",We.U,We.B]],t=(0,c.useBlockProps)();return(0,l.jsxs)("div",{...t,children:[(0,l.jsx)(c.InspectorControls,{children:(0,l.jsx)(i.Notice,{className:"wc-block-editor-related-products__notice",status:"warning",isDismissible:!1,children:(0,l.jsx)("p",{children:(0,r.__)("These products will vary depending on the main product in the page","woocommerce")})})}),(0,l.jsx)(c.InnerBlocks,{template:e})]})},save:()=>{const e=c.useBlockProps.save();return(0,l.jsx)("div",{...e,children:(0,l.jsx)(c.InnerBlocks.Content,{})})},isAvailableOnPostEditor:!1};(0,f.W)(Ge,{isAvailableOnPostEditor:!1});const qe=(0,l.jsxs)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,l.jsx)("path",{id:"icon/action/view_list_24px",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M5 5.5H19C19.1326 5.5 19.2598 5.55268 19.3536 5.64645C19.4473 5.74021 19.5 5.86739 19.5 6V7.5C19.5 7.63261 19.4473 7.75979 19.3536 7.85355C19.2598 7.94732 19.1326 8 19 8H5C4.86739 8 4.74021 7.94732 4.64645 7.85355C4.55268 7.75979 4.5 7.63261 4.5 7.5V6C4.5 5.86739 4.55268 5.74021 4.64645 5.64645C4.74021 5.55268 4.86739 5.5 5 5.5V5.5ZM4 9.232C3.69597 9.05647 3.4435 8.804 3.26796 8.49997C3.09243 8.19594 3.00001 7.85106 3 7.5V6C3 5.46957 3.21071 4.96086 3.58579 4.58579C3.96086 4.21071 4.46957 4 5 4H19C19.5304 4 20.0391 4.21071 20.4142 4.58579C20.7893 4.96086 21 5.46957 21 6V7.5C21 7.85106 20.9076 8.19594 20.732 8.49997C20.5565 8.804 20.304 9.05647 20 9.232V18C20 18.5304 19.7893 19.0391 19.4142 19.4142C19.0391 19.7893 18.5304 20 18 20H6C5.46957 20 4.96086 19.7893 4.58579 19.4142C4.21071 19.0391 4 18.5304 4 18V9.232ZM5.5 9.5V18C5.5 18.1326 5.55268 18.2598 5.64645 18.3536C5.74021 18.4473 5.86739 18.5 6 18.5H18C18.1326 18.5 18.2598 18.4473 18.3536 18.3536C18.4473 18.2598 18.5 18.1326 18.5 18V9.5H5.5Z"}),(0,l.jsx)("circle",{cx:"9",cy:"14",r:"1"}),(0,l.jsx)("circle",{cx:"12",cy:"14",r:"1"}),(0,l.jsx)("circle",{cx:"15",cy:"14",r:"1"})]});s(99835);const Ue={...JSON.parse('{"name":"woocommerce/product-meta","title":"Product Meta","icon":"product","description":"Display a product’s SKU, categories, tags, and more.","category":"woocommerce-product-elements","supports":{"interactivity":{"clientNavigation":true},"align":true,"reusable":false},"keywords":["WooCommerce"],"usesContext":["postId","postType","queryId"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),icon:{src:(0,l.jsx)(t.A,{icon:qe,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=[["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[["woocommerce/product-sku"],["core/post-terms",{prefix:(0,r.__)("Category: ","woocommerce"),term:"product_cat"}],["core/post-terms",{prefix:(0,r.__)("Tags: ","woocommerce"),term:"product_tag"}]]]],t=(0,c.useBlockProps)();return(0,l.jsx)("div",{...t,children:(0,l.jsx)(c.InnerBlocks,{template:e})})},save:()=>{const e=c.useBlockProps.save();return(0,l.jsx)("div",{...e,children:(0,l.jsx)(c.InnerBlocks.Content,{})})},ancestor:["woocommerce/single-product"]};(0,f.W)(Ue,{isAvailableOnPostEditor:!0});const Ye=JSON.parse('{"UU":"woocommerce/all-products","DD":"All Products","uK":{"columns":{"type":"number"},"rows":{"type":"number"},"alignButtons":{"type":"boolean"},"contentVisibility":{"type":"object"},"orderby":{"type":"string"},"layoutConfig":{"type":"array"},"isPreview":{"type":"boolean","default":false}}}'),Ze=(e,t)=>{const{className:o,contentVisibility:r}=t;return(0,w.A)(e,o,{"has-image":r&&r.image,"has-title":r&&r.title,"has-rating":r&&r.rating,"has-price":r&&r.price,"has-button":r&&r.button})},{uK:Je}=Ye,Xe=[{attributes:Object.assign({},Je,{rows:{type:"number",default:1}}),save({attributes:e}){const t={"data-attributes":JSON.stringify(e)};return(0,l.jsx)("div",{className:Ze("wc-block-all-products",e),...t,children:(0,l.jsx)(c.InnerBlocks.Content,{})})}}];var Qe=s(29491),Ke=s(70982),et=s(1872),tt=s(48841),ot=s(62796);const rt=[["woocommerce/product-image",{style:{dimensions:{aspectRatio:"1/1"}}}],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],st=e=>e&&0!==e.length?e.map(e=>[e.name,{...e.attributes,product:void 0,children:e.innerBlocks.length>0?st(e.innerBlocks):[],...e.name===ce.name&&{className:(0,w.A)(e.attributes.className,{[`has-custom-width wp-block-button__width-${e.attributes?.width}`]:e.attributes?.width})},isDescendantOfAllProducts:!0}]):[],ct=(e,t)=>{const{contentVisibility:o}=e;return(0,l.jsx)(i.ToggleControl,{label:(0,r.__)("Show Sorting Dropdown","woocommerce"),checked:o.orderBy,onChange:()=>t({contentVisibility:{...o,orderBy:!o.orderBy}})})},nt=(e,t)=>(0,l.jsx)(i.SelectControl,{label:(0,r.__)("Order Products By","woocommerce"),value:e.orderby,options:[{label:(0,r.__)("Default sorting (menu order)","woocommerce"),value:"menu_order"},{label:(0,r.__)("Popularity","woocommerce"),value:"popularity"},{label:(0,r.__)("Average rating","woocommerce"),value:"rating"},{label:(0,r.__)("Latest","woocommerce"),value:"date"},{label:(0,r.__)("Price: low to high","woocommerce"),value:"price"},{label:(0,r.__)("Price: high to low","woocommerce"),value:"price-desc"}],onChange:e=>t({orderby:e})});var it=s(43907),at=s(11824),lt=s.n(at),dt=s(14656);s(18714);const ut=({currentPage:e,displayFirstAndLastPages:t=!0,displayNextAndPreviousArrows:o=!0,pagesToDisplay:s=3,onPageChange:c,totalPages:n})=>{let{minIndex:i,maxIndex:a}=((e,t,o)=>{if(o<=2)return{minIndex:null,maxIndex:null};const r=e-1,s=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-s))),o-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}})(s,e,n);const d=t&&Boolean(1!==i),u=t&&Boolean(a!==n),m=t&&Boolean(i&&i>3),p=t&&Boolean(a&&a<n-2);d&&3===i&&(i-=1),u&&a===n-2&&(a+=1);const h=[];if(i&&a)for(let e=i;e<=a;e++)h.push(e);return(0,l.jsxs)("div",{className:"wc-block-pagination wc-block-components-pagination",children:[(0,l.jsx)(dt.Label,{screenReaderLabel:(0,r.__)("Navigate to another page","woocommerce")}),o&&(0,l.jsx)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>c(e-1),title:(0,r.__)("Previous page","woocommerce"),disabled:e<=1,children:(0,l.jsx)(dt.Label,{label:"←",screenReaderLabel:(0,r.__)("Previous page","woocommerce")})}),d&&(0,l.jsx)("button",{className:(0,w.A)("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===e,"wc-block-components-pagination__page--active":1===e}),onClick:()=>c(1),disabled:1===e,children:(0,l.jsx)(dt.Label,{label:"1",screenReaderLabel:(0,r.sprintf)(/* translators: %d is the page number (1, 2, 3...). */ /* translators: %d is the page number (1, 2, 3...). */ (0,r.__)("Page %d","woocommerce"),1)})}),m&&(0,l.jsx)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true",children:(0,r.__)("…","woocommerce")}),h.map(t=>(0,l.jsx)("button",{className:(0,w.A)("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":e===t,"wc-block-components-pagination__page--active":e===t}),onClick:e===t?void 0:()=>c(t),disabled:e===t,children:(0,l.jsx)(dt.Label,{label:t.toString(),screenReaderLabel:(0,r.sprintf)(/* translators: %d is the page number (1, 2, 3...). */ /* translators: %d is the page number (1, 2, 3...). */ (0,r.__)("Page %d","woocommerce"),t)})},t)),p&&(0,l.jsx)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true",children:(0,r.__)("…","woocommerce")}),u&&(0,l.jsx)("button",{className:(0,w.A)("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":e===n,"wc-block-components-pagination__page--active":e===n}),onClick:()=>c(n),disabled:e===n,children:(0,l.jsx)(dt.Label,{label:n.toString(),screenReaderLabel:(0,r.sprintf)(/* translators: %d is the page number (1, 2, 3...). */ /* translators: %d is the page number (1, 2, 3...). */ (0,r.__)("Page %d","woocommerce"),n)})}),o&&(0,l.jsx)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>c(e+1),title:(0,r.__)("Next page","woocommerce"),disabled:e>=n,children:(0,l.jsx)(dt.Label,{label:"→",screenReaderLabel:(0,r.__)("Next page","woocommerce")})})]})};var mt=s(13817),pt=s(76748),ht=s(42552),gt=s(47594),wt=s(46151);var _t=s(2269);s(47525);const bt=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};var xt=s(20195),ft=s(62748);const yt=()=>{const{parentClassName:e}=(0,ot.useInnerBlockLayoutContext)();return(0,l.jsxs)("div",{className:`${e}__no-products`,children:[(0,l.jsx)(t.A,{className:`${e}__no-products-image`,icon:ft.A,size:100}),(0,l.jsx)("strong",{className:`${e}__no-products-title`,children:(0,r.__)("No products","woocommerce")}),(0,l.jsx)("p",{className:`${e}__no-products-description`,children:(0,r.__)("There are currently no products available to display.","woocommerce")})]})};var vt=s(71460);const kt=({resetCallback:e=()=>{}})=>{const{parentClassName:o}=(0,ot.useInnerBlockLayoutContext)();return(0,l.jsxs)("div",{className:`${o}__no-products`,children:[(0,l.jsx)(t.A,{className:`${o}__no-products-image`,icon:vt.A,size:100}),(0,l.jsx)("strong",{className:`${o}__no-products-title`,children:(0,r.__)("No products found","woocommerce")}),(0,l.jsx)("p",{className:`${o}__no-products-description`,children:(0,r.__)("We were unable to find any results based on your search.","woocommerce")}),(0,l.jsx)("button",{onClick:e,children:(0,r.__)("Reset Search","woocommerce")})]})};s(86854);const jt=({onChange:e,value:t})=>(0,l.jsx)(dt.SortSelect,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",onChange:e,options:[{key:"menu_order",label:(0,r.__)("Default sorting","woocommerce")},{key:"popularity",label:(0,r.__)("Popularity","woocommerce")},{key:"rating",label:(0,r.__)("Average rating","woocommerce")},{key:"date",label:(0,r.__)("Latest","woocommerce")},{key:"price",label:(0,r.__)("Price: low to high","woocommerce")},{key:"price-desc",label:(0,r.__)("Price: high to low","woocommerce")}],screenReaderLabel:(0,r.__)("Order products by","woocommerce"),value:t}),Ct=(e,t,o,r)=>{if(!o)return;const s=(0,Ke.Y)(e);return o.map(([o,c={}],i)=>{let a=[];c.children&&c.children.length>0&&(a=Ct(e,t,c.children,r));const d=s[o];if(!d)return null;const u=t.id||0,m=["layout",o,i,r,u];return(0,l.jsx)(n.Suspense,{fallback:(0,l.jsx)("div",{className:"wc-block-placeholder"}),children:(0,l.jsx)(d,{...c,children:a,product:t})},m.join("_"))})},St=(0,Qe.withInstanceId)(({product:e={},attributes:t,instanceId:o})=>{const{layoutConfig:r}=t,{parentClassName:s,parentName:c}=(0,ot.useInnerBlockLayoutContext)(),n=0===Object.keys(e).length,i=(0,w.A)(`${s}__product`,"wc-block-layout",{"is-loading":n});return(0,l.jsx)("li",{className:i,"aria-hidden":n,children:Ct(c,e,r,o)})});s(13320);const At=e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}},Nt=({totalQuery:e,totalProducts:t},{totalQuery:o}={})=>!lt()(e,o)&&Number.isFinite(t),Pt=(It=({attributes:e,currentPage:t,onPageChange:o,onSortChange:s,sortValue:c,scrollToTop:i})=>{const[a,d]=(0,pt.xd)("attributes",[]),[u,m]=(0,pt.xd)("stock_status",[]),[p,h]=(0,pt.xd)("rating",[]),[g,_]=(0,pt.xd)("min_price"),[b,x]=(0,pt.xd)("max_price"),[f]=(0,pt.Vt)((({sortValue:e,currentPage:t,attributes:o})=>{const{columns:r,rows:s}=o;return{...At(e),catalog_visibility:"catalog",per_page:r*s,page:t}})({attributes:e,sortValue:c,currentPage:t})),{products:y,totalProducts:v,productsLoading:k}=(e=>{const t={namespace:"/wc/store/v1",resourceName:"products"},{results:o,isLoading:r}=(0,ht.G)({...t,query:e}),{value:s}=((e,t)=>{const{namespace:o,resourceName:r,resourceValues:s=[],query:c={}}=t;if(!o||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const n=(0,wt.c)(c),i=(0,wt.c)(s),{value:a,isLoading:l=!0}=(0,S.useSelect)(t=>{const s=t(gt.COLLECTIONS_STORE_KEY),c=[e,o,r,n,i];return{value:s.getCollectionHeader(...c),isLoading:s.hasFinishedResolution("getCollectionHeader",c)}},[e,o,r,i,n]);return{value:a,isLoading:l}})("x-wp-total",{...t,query:e});return{products:o,totalProducts:parseInt(s,10),productsLoading:r}})(f),{parentClassName:j,parentName:C}=(0,ot.useInnerBlockLayoutContext)(),A=(e=>{const{order:t,orderby:o,page:r,per_page:s,...c}=e;return c||{}})(f),{dispatchStoreEvent:N}=(0,_t.y)(),P=(0,mt.Z)({totalQuery:A,totalProducts:v},Nt);(0,n.useEffect)(()=>{N("product-list-render",{products:y,listName:C})},[y,C,N]),(0,n.useEffect)(()=>{lt()(A,P?.totalQuery)||(o(1),P?.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?(0,xt.speak)((0,r.__)("No products found","woocommerce")):(0,xt.speak)((0,r.sprintf)(/* translators: %s is an integer higher than 0 (1, 2, 3...) */ /* translators: %s is an integer higher than 0 (1, 2, 3...) */ (0,r._n)("%d product found","%d products found",e,"woocommerce"),e)))})(v))},[P?.totalQuery,v,o,A]);const{contentVisibility:B}=e,I=e.columns*e.rows,T=!Number.isFinite(v)&&Number.isFinite(P?.totalProducts)&<()(A,P?.totalQuery)?Math.ceil((P?.totalProducts||0)/I):Math.ceil(v/I),E=y.length?y:Array.from({length:I}),R=0!==y.length||k,D=a.length>0||u.length>0||p.length>0||Number.isFinite(g)||Number.isFinite(b);return(0,l.jsxs)("div",{className:(()=>{const{columns:t,rows:o,alignButtons:r,align:s}=e,c=void 0!==s?"align"+s:"";return(0,w.A)(j,c,"has-"+t+"-columns",{"has-multiple-rows":o>1,"has-aligned-buttons":r})})(),children:[B?.orderBy&&R&&(0,l.jsx)(jt,{onChange:s,value:c}),!R&&D&&(0,l.jsx)(kt,{resetCallback:()=>{d([]),m([]),h([]),_(null),x(null)}}),!R&&!D&&(0,l.jsx)(yt,{}),R&&(0,l.jsx)("ul",{className:(0,w.A)(`${j}__products`,{"is-loading-products":k}),children:E.map((t={},o)=>(0,l.jsx)(St,{attributes:e,product:t},t.id||o))}),T>1&&(0,l.jsx)(ut,{currentPage:t,onPageChange:e=>{i({focusableSelector:"a, button"}),o(e)},totalPages:T})]})},e=>{const t=(0,n.useRef)(null);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),(0,l.jsx)(It,{...e,scrollToTop:e=>{null!==t.current&&((e,t)=>{const{focusableSelector:o}=t||{};window&&Number.isFinite(window.innerHeight)&&(o?((e,t)=>{const o=e.parentElement?.querySelectorAll(t)||[];if(o.length){const e=o[0];bt(e),e?.focus()}else bt(e)})(e,o):bt(e))})(t.current,e)}})]})}),Bt=({attributes:e})=>{const[t,o]=(0,n.useState)(1),[r,s]=(0,n.useState)(e.orderby);return(0,n.useEffect)(()=>{s(e.orderby)},[e.orderby]),(0,l.jsx)(Pt,{attributes:e,currentPage:t,onPageChange:e=>{o(e)},onSortChange:e=>{const t=e?.target?.value;s(t),o(1)},sortValue:r})};var It,Tt=s(53829);class Et extends n.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?Tt.i:(0,l.jsxs)(ot.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid",children:[(0,l.jsx)(dt.StoreNoticesContainer,{context:"wc/all-products"}),(0,l.jsx)(Bt,{attributes:e,urlParameterSuffix:t})]})}}const Rt=Et;s(34695);const Dt=(0,Ke.Y)("woocommerce/all-products"),Lt=(0,l.jsx)(t.A,{icon:o.A}),Ot=(0,Qe.compose)(i.withSpokenMessages,(0,S.withSelect)((e,{clientId:t})=>{const{getBlock:o}=e("core/block-editor");return{block:o(t)}}),(0,S.withDispatch)(e=>{const{replaceInnerBlocks:t}=e("core/block-editor");return{replaceInnerBlocks:t}}))(({block:s,attributes:a,setAttributes:d,debouncedSpeak:u,replaceInnerBlocks:m})=>{const[p,h]=(0,n.useState)(!1),[g,w]=(0,n.useState)([]),_=(0,c.useBlockProps)({className:Ze("wc-block-all-products",a)});if(0===k.r7.productCount)return((e,o)=>(0,l.jsxs)(i.Placeholder,{className:"wc-block-products",icon:o,label:e,children:[(0,l.jsx)("p",{children:(0,r.__)("You haven't published any products to list here yet.","woocommerce")}),(0,l.jsxs)(i.Button,{className:"wc-block-products__add-product-button",variant:"secondary",href:Le.ADMIN_URL+"post-new.php?post_type=product",target:"_top",children:[(0,r.__)("Add new product","woocommerce")+" ",(0,l.jsx)(t.A,{icon:it.A})]}),(0,l.jsx)(i.Button,{className:"wc-block-products__read_more_button",variant:"tertiary",href:"https://woocommerce.com/document/managing-products/",target:"_blank",children:(0,r.__)("Learn more","woocommerce")})]}))(Ye.DD,(0,l.jsx)(t.A,{icon:o.A}));const b=()=>{h(!p),p||u((0,r.__)("Showing All Products block preview.","woocommerce"))};return(0,l.jsxs)("div",{..._,children:[(0,l.jsx)(c.BlockControls,{children:(0,l.jsx)(i.ToolbarGroup,{controls:[{icon:"edit",title:(0,r.__)("Edit the layout of each product","woocommerce"),onClick:()=>b(),isActive:p}]})}),(()=>{const{columns:e,rows:t,alignButtons:o}=a;return(0,l.jsxs)(c.InspectorControls,{children:[(0,l.jsx)(i.PanelBody,{title:(0,r.__)("Layout Settings","woocommerce"),initialOpen:!0,children:(0,l.jsx)(et.A,{columns:e,rows:t,alignButtons:o,setAttributes:d,minColumns:(0,Le.getSetting)("minColumns",1),maxColumns:(0,Le.getSetting)("maxColumns",6),minRows:(0,Le.getSetting)("minRows",1),maxRows:(0,Le.getSetting)("maxRows",6)})}),(0,l.jsxs)(i.PanelBody,{title:(0,r.__)("Content Settings","woocommerce"),children:[ct(a,d),nt(a,d)]})]},"inspector")})(),p?(()=>{const t={template:a.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(Dt)};return 0!==a.layoutConfig.length&&(t.renderAppender=!1),(0,l.jsxs)(i.Placeholder,{icon:Lt,label:Ye.DD,children:[(0,r.__)("Display all products from your store as a grid.","woocommerce"),(0,l.jsxs)("div",{className:"wc-block-all-products-grid-item-template",children:[(0,l.jsx)(i.Tip,{children:(0,r.__)("Edit the blocks inside the example below to change the content displayed for all products within the product grid.","woocommerce")}),(0,l.jsx)(ot.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid",children:(0,l.jsx)("div",{className:"wc-block-grid wc-block-layout has-1-columns",children:(0,l.jsx)("ul",{className:"wc-block-grid__products",children:(0,l.jsx)("li",{className:"wc-block-grid__product",children:(0,l.jsx)(ot.ProductDataContextProvider,{product:tt.h[0],children:(0,l.jsx)(c.InnerBlocks,{...t})})})})})}),(0,l.jsxs)("div",{className:"wc-block-all-products__actions",children:[(0,l.jsx)(i.Button,{className:"wc-block-all-products__done-button",variant:"primary",onClick:()=>{d({layoutConfig:st(s.innerBlocks)}),w(s.innerBlocks),b()},children:(0,r.__)("Done","woocommerce")}),(0,l.jsx)(i.Button,{className:"wc-block-all-products__cancel-button",variant:"tertiary",onClick:()=>{m(s.clientId,g,!1),b()},children:(0,r.__)("Cancel","woocommerce")}),(0,l.jsx)(i.Button,{className:"wc-block-all-products__reset-button",icon:Lt,label:(0,r.__)("Reset layout to default","woocommerce"),onClick:()=>{const t=[];rt.map(([o,r])=>(t.push((0,e.createBlock)(o,r)),!0)),m(s.clientId,t,!1),w(s.innerBlocks)},children:(0,r.__)("Reset Layout","woocommerce")})]})]})]})})():(()=>{const{layoutConfig:e}=a,t=e&&0!==e.length,o=Ye.DD;return t?(0,l.jsx)(i.Disabled,{children:(0,l.jsx)(Rt,{attributes:a})}):((e,t)=>(0,l.jsx)(i.Placeholder,{className:"wc-block-products",icon:t,label:e,children:(0,r.__)("The content for this block is hidden due to block settings.","woocommerce")}))(o,Lt)})()]})}),Mt={columns:(0,Le.getSetting)("defaultColumns",3),rows:(0,Le.getSetting)("defaultRows",3),alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:rt,isPreview:!1},{UU:Vt}=Ye,Ft={icon:{src:(0,l.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},edit:Ot,save:function({attributes:e}){const t={};Object.keys(e).sort().forEach(o=>{t[o]=e[o]});const o=c.useBlockProps.save({className:Ze("wc-block-all-products",e),"data-attributes":JSON.stringify(t)});return(0,l.jsx)("div",{...o,children:(0,l.jsx)(c.InnerBlocks.Content,{})})},deprecated:Xe,defaults:Mt};(0,e.registerBlockType)(Vt,Ft)})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M14 10.1V4c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1zm-1.5-.5H6.7l-1.2 1.2V4.5h7v5.1zM19 12h-8c-.6 0-1 .4-1 1v6.1c0 .6.4 1 1 1h5.7l1.8 1.8c.1.2.4.3.6.3.1 0 .2 0 .3-.1.4-.1.6-.5.6-.8V13c0-.6-.4-1-1-1zm-.5 7.8l-1.2-1.2h-5.8v-5.1h7v6.3z"})}),n=(s(14809),s(94715)),i=s(27723),a=s(56427),l=s(51974);const d=()=>(0,o.jsx)(a.Placeholder,{className:"wc-block-all-reviews",icon:(0,o.jsx)(t.A,{icon:c,className:"block-editor-block-icon"}),label:(0,i.__)("All Reviews","woocommerce"),children:(0,i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woocommerce")});var u=s(30102);const m=({attributes:e,setAttributes:r})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.InspectorControls,{children:[(0,o.jsxs)(a.__experimentalToolsPanel,{label:(0,i.__)("Content","woocommerce"),resetAll:()=>r({showProductName:!0,showReviewRating:!0,showReviewerName:!0,showReviewImage:!0,showReviewDate:!0,showReviewContent:!0,imageType:"reviewer"}),children:[(0,o.jsx)(a.__experimentalToolsPanelItem,{hasValue:()=>!e.showProductName,label:(0,i.__)("Product name","woocommerce"),onDeselect:()=>r({showProductName:!0}),isShownByDefault:!0,children:(0,o.jsx)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Product name","woocommerce"),checked:e.showProductName,onChange:()=>r({showProductName:!e.showProductName})})}),(0,u.f1)(e,r)]}),(0,o.jsx)(a.__experimentalToolsPanel,{label:(0,i.__)("List Settings","woocommerce"),resetAll:()=>r({showOrderby:!0,orderby:"most-recent",reviewsOnPageLoad:10,showLoadMore:!0,reviewsOnLoadMore:10}),children:(0,u.Ki)(e,r)})]},"inspector"),(0,o.jsx)(l.A,{attributes:e,icon:(0,o.jsx)(t.A,{icon:c,className:"block-editor-block-icon"}),name:(0,i.__)("All Reviews","woocommerce"),noReviewsPlaceholder:d})]});var p=s(14741),h=s(31171),g=s(11946);const w=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/all-reviews","title":"All Reviews","category":"woocommerce","keywords":["WooCommerce"],"description":"Show a list of all product reviews.","textdomain":"woocommerce","supports":{"html":false,"interactivity":{"clientNavigation":true},"color":{"background":false},"typography":{"fontSize":true}}}');(0,e.registerBlockType)(w,{icon:{src:(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},example:{...g.F,attributes:{...g.F.attributes,showProductName:!0}},attributes:{...p.A,showProductName:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>"woocommerce_recent_reviews"===e&&!!t?.raw,transform:({instance:t})=>(0,e.createBlock)("woocommerce/all-reviews",{reviewsOnPageLoad:t.raw.number,imageType:"product",showLoadMore:!1,showOrderby:!1,showReviewDate:!1,showReviewContent:!1})}]},edit:e=>{const t=(0,n.useBlockProps)();return(0,o.jsx)("div",{...t,children:(0,o.jsx)(m,{...e})})},save:h.A})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(82024),c=s(4921),n=s(61303),i=s(27723),a=s(86087),l=s(43907),d=s(68420),u=s(15703),m=s(61909),p=s(56427),h=s(46151),g=s(13817),w=s(76748),_=s(42552),b=s(88199),x=s(38323),f=s(30612),y=s(60427),v=s(20923),k=s.n(v),j=s(18537),C=s(93832),S=s(73993),A=s(55414),N=s(48197),P=s(37848),B=s(30426),I=s(58733),T=s(83250),E=s(62167),R=s(10790);const D=[{value:"preview-1",formattedValue:"preview-1",name:"Blue",label:(0,R.jsx)(x.A,{name:"Blue",count:3}),textLabel:"Blue (3)"},{value:"preview-2",formattedValue:"preview-2",name:"Green",label:(0,R.jsx)(x.A,{name:"Green",count:3}),textLabel:"Green (3)"},{value:"preview-3",formattedValue:"preview-3",name:"Red",label:(0,R.jsx)(x.A,{name:"Red",count:2}),textLabel:"Red (2)"}],L={count:0,has_archives:!0,id:0,label:"Preview",name:"preview",order:"menu_order",parent:0,taxonomy:"preview",type:""};s(42145);const O=e=>e.replace("pa_",""),M=(e,t=[])=>{const o={};t.forEach(e=>{const{attribute:t,slug:r,operator:s}=e,c=O(t),n=r.join(","),i=`${P.xB}${c}`,a="in"===s?"or":"and";o[`${P.nD}${c}`]=n,o[i]=a});const r=(0,C.removeQueryArgs)(e,...Object.keys(o));return(0,C.addQueryArgs)(r,o)},V=e=>{if(e){const t=(0,P.Vf)(`filter_${e.name}`);return("string"==typeof t?t.split(","):[]).map(e=>encodeURIComponent(e).toLowerCase())}return[]},F=e=>e.trim().replace(/\s/g,"-").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,"");var H=s(14656);const z=({isLoading:e=!1,options:t,checked:o,onChange:r})=>e?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("span",{className:"is-loading"}),(0,R.jsx)("span",{className:"is-loading"})]}):(0,R.jsx)(H.CheckboxList,{className:"wc-block-attribute-filter-list",options:t,checked:o,onChange:r,isLoading:e,isDisabled:e});var $=s(25238);const W=({attributes:e,isEditor:t=!1,getNotice:r=()=>null})=>{const s=(0,u.getSettingWithCoercion)("hasFilterableProducts",!1,S.isBoolean),n=(0,u.getSettingWithCoercion)("isRenderingPhpTemplate",!1,S.isBoolean),l=(0,u.getSettingWithCoercion)("pageUrl",window.location.href,S.isString),[d,m]=(0,a.useState)(!1),p=e.isPreview&&!e.attributeId?L:(0,T.WK)(e.attributeId),v=(0,a.useMemo)(()=>V(p),[p]),[H,W]=(0,a.useState)(v),[G,q]=(0,a.useState)((0,N.I)()),[U,Y]=(0,a.useState)(e.isPreview&&!e.attributeId?D:[]),[Z]=(0,w.dJ)(),[J,X]=(0,w.xd)("attributes",[]),{results:Q,isLoading:K}=(0,_.G)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[p?.id||0],shouldSelect:e.attributeId>0,query:{orderby:p?.orderby||"menu_order"}}),ee=(0,u.getSettingWithCoercion)("queryState",{},S.isObject),{data:te,isLoading:oe}=(0,b.A)({queryAttribute:{taxonomy:p?.taxonomy||"",queryType:e.queryType},queryState:{...ee,...Z},isEditor:t}),re=(0,a.useCallback)(e=>(0,S.objectHasProp)(te,"attribute_counts")&&Array.isArray(te.attribute_counts)?te.attribute_counts.find(({term:t})=>t===e):null,[te]);(0,a.useEffect)(()=>{if(K||oe)return;if(!Array.isArray(Q))return;const t=Q.map(t=>{const o=re(t.id);if(!(o||H.includes(t.slug)||(r=t.slug,Z?.attributes&&Z.attributes.some(({attribute:e,slug:t=[]})=>e===p?.taxonomy&&t.includes(r)))))return null;var r;const s=o?o.count:0;return{formattedValue:F(t.slug),value:t.slug,name:(0,j.decodeEntities)(t.name),label:(0,R.jsx)(x.A,{name:(0,j.decodeEntities)(t.name),count:e.showCounts?s:null}),textLabel:e.showCounts?`${(0,j.decodeEntities)(t.name)} (${s})`:(0,j.decodeEntities)(t.name)}}).filter(e=>!!e);Y(t),q((0,N.I)())},[p?.taxonomy,Q,K,e.showCounts,oe,re,H,Z.attributes]);const se=(0,a.useCallback)(e=>Array.isArray(Q)?Q.reduce((t,o)=>(e.includes(o.slug)&&t.push(o),t),[]):[],[Q]),ce=(0,a.useCallback)((e,t=!1)=>{if(e=e.map(e=>({...e,slug:e.slug.map(e=>decodeURIComponent(e))})),t){if(!p?.taxonomy)return;const t=Object.keys((0,C.getQueryArgs)(window.location.href)),o=O(p.taxonomy),r=t.reduce((e,t)=>t.includes(P.xB+o)||t.includes(P.nD+o)?(0,C.removeQueryArgs)(e,t):e,window.location.href),s=M(r,e);(0,P.CH)(s)}else{const t=M(l,e);((e,t)=>{const o=Object.entries(t).reduce((e,[t,o])=>t.includes("query_type")?e:{...e,[t]:o},{});return Object.entries(o).reduce((t,[o,r])=>e[o]===r&&t,!0)})((0,C.getQueryArgs)(window.location.href),(0,C.getQueryArgs)(t))||(0,P.CH)(t)}},[l,p?.taxonomy]),ne=t=>{const o=(0,E.u)(J,X,p,se(t),"or"===e.queryType?"in":"and");ce(o,0===t.length)},ie=(0,a.useCallback)((o,r=!1)=>{t||(W(o),!r&&e.showFilterButton||(0,E.u)(J,X,p,se(o),"or"===e.queryType?"in":"and"))},[t,W,J,X,p,se,e.queryType,e.showFilterButton]),ae=(0,a.useMemo)(()=>(0,S.isAttributeQueryCollection)(J)?J.filter(({attribute:e})=>e===p?.taxonomy).flatMap(({slug:e})=>e):[],[J,p?.taxonomy]),le=(0,h.c)(ae),de=(0,g.Z)(le);(0,a.useEffect)(()=>{!de||k()(de,le)||k()(H,le)||ie(le)},[H,le,de,ie]);const ue="single"!==e.selectType,me=(0,a.useCallback)(e=>{const t=H.includes(e);let o;ue?(o=H.filter(t=>t!==e),t||(o.push(e),o.sort())):o=t?[]:[e],ie(o)},[H,ue,ie]);(0,a.useEffect)(()=>{p&&!e.showFilterButton&&((({currentCheckedFilters:e,hasSetFilterDefaultsFromUrl:t})=>t&&0===e.length)({currentCheckedFilters:H,hasSetFilterDefaultsFromUrl:d})?ce(J,!0):ce(J,!1))},[d,ce,J,p,H,e.showFilterButton]),(0,a.useEffect)(()=>{if(!d&&!K)return v.length>0?(m(!0),void ie(v,!0)):void(n||m(!0))},[p,d,K,ie,v,n]);const pe=(0,$.LY)();if(!s)return pe(!1),null;if(!p)return t?r("noAttributes"):(pe(!1),null);if(0===U.length&&!K&&t)return r("noProducts");const he=`h${e.headingLevel}`,ge=!e.isPreview&&K,we=!e.isPreview&&oe,_e=(ge||we)&&0===U.length;if(!_e&&0===U.length)return pe(!1),null;const be=ue?!_e&&H.length<U.length:!_e&&0===H.length,xe=(0,R.jsx)(he,{className:"wc-block-attribute-filter__title",children:e.heading}),fe=_e?(0,R.jsx)(I.A,{children:xe}):xe;return pe(!0),(0,R.jsxs)(R.Fragment,{children:[!t&&e.heading&&fe,(0,R.jsx)("div",{className:(0,c.A)("wc-block-attribute-filter",`style-${e.displayStyle}`),children:"dropdown"===e.displayStyle?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(B.A,{label:p.label,className:(0,c.A)({"single-selection":!ue,"is-loading":_e}),suggestions:U.filter(e=>!H.includes(e.value)).map(e=>e.formattedValue),disabled:_e,placeholder:(0,i.sprintf)(/* translators: %s attribute name. */ /* translators: %s attribute name. */ (0,i.__)("Select %s","woocommerce"),p.label),onChange:e=>{!ue&&e.length>1&&(e=[e[e.length-1]]);const t=[e=e.map(e=>{const t=U.find(t=>t.formattedValue===e);return t?t.value:e}),H].reduce((e,t)=>e.filter(e=>!t.includes(e)));if(1===t.length)return me(t[0]);const o=[H,e].reduce((e,t)=>e.filter(e=>!t.includes(e)));1===o.length&&me(o[0])},value:H,displayTransform:e=>{const t=U.find(t=>[t.value,t.formattedValue].includes(e));return t?t.textLabel:e},saveTransform:F,messages:{added:(0,i.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,i.__)("%s filter added.","woocommerce"),p.label),removed:(0,i.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,i.__)("%s filter removed.","woocommerce"),p.label),remove:(0,i.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,i.__)("Remove %s filter.","woocommerce"),p.label.toLocaleLowerCase()),__experimentalInvalid:(0,i.sprintf)(/* translators: %s is the attribute label. */ /* translators: %s is the attribute label. */ (0,i.__)("Invalid %s filter.","woocommerce"),p.label.toLocaleLowerCase())}},G),be&&(0,R.jsx)(o.A,{icon:A.A,size:30})]}):(0,R.jsx)(z,{options:U,checked:H,onChange:me,isLoading:_e,isDisabled:_e})}),(0,R.jsxs)("div",{className:"wc-block-attribute-filter__actions",children:[(H.length>0||t)&&!_e&&(0,R.jsx)(f.A,{onClick:()=>{W([]),q((0,N.I)()),d&&ne([])},screenReaderLabel:(0,i.__)("Reset attribute filter","woocommerce")}),e.showFilterButton&&(0,R.jsx)(y.A,{className:"wc-block-attribute-filter__button",isLoading:_e,disabled:(()=>{if(ge||we)return!0;const e=V(p);return e.length===H.length&&H.every(t=>e.includes(t))})(),onClick:()=>ne(H),screenReaderLabel:(0,i.sprintf)(/* translators: %s is the attribute label */ /* translators: %s is the attribute label */ (0,i.__)("Apply attribute filter: %s","woocommerce"),p.label)})]})]})};s(63285);var G=s(68059);const q=(0,u.getSetting)("attributes",[]),U={noAttributes:(0,i.__)("Please select an attribute to use this filter!","woocommerce"),noProducts:(0,i.__)("There are no products with the selected attributes.","woocommerce")},Y=e=>{const t=U[e];return t?(0,R.jsx)(p.Notice,{status:"warning",isDismissible:!1,children:(0,R.jsx)("p",{children:t})}):null},Z=(0,p.withSpokenMessages)(({attributes:e,setAttributes:s,debouncedSpeak:h,clientId:g})=>{const{attributeId:w,displayStyle:_,heading:b,headingLevel:x,isPreview:f,queryType:y,showCounts:v,showFilterButton:k,selectType:j}=e,[C,S]=(0,a.useState)(!w&&!f),A=(0,t.useBlockProps)(),N=e=>{if(!e||!e.length)return;const t=e[0].id;q.find(e=>e.attribute_id===t.toString())&&w!==t&&s({attributeId:t})},P=({isCompact:e})=>{const t={clear:(0,i.__)("Clear selected attribute","woocommerce"),list:(0,i.__)("Product Attributes","woocommerce"),noItems:(0,i.__)("Your store doesn't have any product attributes.","woocommerce"),search:(0,i.__)("Search for a product attribute:","woocommerce"),selected:e=>(0,i.sprintf)(/* translators: %d is the number of attributes selected. */ /* translators: %d is the number of attributes selected. */ (0,i._n)("%d attribute selected","%d attributes selected",e,"woocommerce"),e),updated:(0,i.__)("Product attribute search results updated.","woocommerce")},o=(0,n.di)(q.map(e=>({id:parseInt(e.attribute_id,10),name:e.attribute_label}))).asc("name");return(0,R.jsx)(d.W,{className:"woocommerce-product-attributes",list:o,selected:o.filter(({id:e})=>e===w),onChange:N,messages:t,isSingle:!0,isCompact:e})};return 0===Object.keys(q).length?(0,R.jsxs)(p.Placeholder,{className:"wc-block-attribute-filter",icon:(0,R.jsx)(o.A,{icon:r.A}),label:(0,i.__)("Filter by Attribute","woocommerce"),instructions:(0,i.__)("Display a list of filters based on the selected attributes.","woocommerce"),children:[(0,R.jsx)("p",{children:(0,i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woocommerce")}),(0,R.jsxs)(p.Button,{className:"wc-block-attribute-filter__add-attribute-button",variant:"secondary",href:(0,u.getAdminLink)("edit.php?post_type=product&page=product_attributes"),target:"_top",children:[(0,i.__)("Add new attribute","woocommerce")+" ",(0,R.jsx)(o.A,{icon:l.A})]}),(0,R.jsx)(p.Button,{className:"wc-block-attribute-filter__read_more_button",variant:"tertiary",href:"https://woocommerce.com/document/managing-product-taxonomies/",target:"_blank",children:(0,i.__)("Learn more","woocommerce")})]}):(0,R.jsxs)("div",{...A,children:[(0,R.jsx)(t.BlockControls,{children:(0,R.jsx)(p.ToolbarGroup,{controls:[{icon:"edit",title:(0,i.__)("Edit","woocommerce"),onClick:()=>S(!C),isActive:C}]})}),(0,R.jsxs)(t.InspectorControls,{children:[(0,R.jsx)(p.PanelBody,{children:(0,R.jsx)(G.d,{clientId:g})}),(0,R.jsxs)(p.PanelBody,{title:(0,i.__)("Display Settings","woocommerce"),children:[(0,R.jsx)(p.ToggleControl,{label:(0,i.__)("Display product count","woocommerce"),checked:v,onChange:()=>s({showCounts:!v})}),(0,R.jsxs)(p.__experimentalToggleGroupControl,{label:(0,i.__)("Allow selecting multiple options?","woocommerce"),isBlock:!0,value:j||"multiple",onChange:e=>s({selectType:e}),className:"wc-block-attribute-filter__multiple-toggle",children:[(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"multiple",label:(0,i._x)("Multiple","Number of filters","woocommerce")}),(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"single",label:(0,i._x)("Single","Number of filters","woocommerce")})]}),"multiple"===j&&(0,R.jsxs)(p.__experimentalToggleGroupControl,{label:(0,i.__)("Filter Conditions","woocommerce"),isBlock:!0,help:"and"===y?(0,i.__)("Choose to return filter results for all of the attributes selected.","woocommerce"):(0,i.__)("Choose to return filter results for any of the attributes selected.","woocommerce"),value:y,onChange:e=>s({queryType:e}),className:"wc-block-attribute-filter__conditions-toggle",children:[(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"or",label:(0,i.__)("Any","woocommerce")}),(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"and",label:(0,i.__)("All","woocommerce")})]}),(0,R.jsxs)(p.__experimentalToggleGroupControl,{label:(0,i.__)("Display Style","woocommerce"),isBlock:!0,value:_,onChange:e=>s({displayStyle:e}),className:"wc-block-attribute-filter__display-toggle",children:[(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"list",label:(0,i.__)("List","woocommerce")}),(0,R.jsx)(p.__experimentalToggleGroupControlOption,{value:"dropdown",label:(0,i.__)("Dropdown","woocommerce")})]}),(0,R.jsx)(p.ToggleControl,{label:(0,i.__)("Show 'Apply filters' button","woocommerce"),help:(0,i.__)("Products will update when the button is clicked.","woocommerce"),checked:k,onChange:e=>s({showFilterButton:e})})]}),(0,R.jsx)(p.PanelBody,{title:(0,i.__)("Content Settings","woocommerce"),initialOpen:!1,children:P({isCompact:!0})})]},"inspector"),C?(0,R.jsxs)(p.Placeholder,{className:"wc-block-attribute-filter",icon:(0,R.jsx)(o.A,{icon:r.A}),label:(0,i.__)("Filter by Attribute","woocommerce"),children:[(0,R.jsx)("div",{className:"wc-block-attribute-filter__instructions",children:(0,i.__)("Display a list of filters based on the selected attributes.","woocommerce")}),(0,R.jsxs)("div",{className:"wc-block-attribute-filter__selection",children:[P({isCompact:!1}),(0,R.jsx)(p.Button,{variant:"primary",onClick:()=>{S(!1),h((0,i.__)("Now displaying a preview of the Filter Products by Attribute block.","woocommerce"))},children:(0,i.__)("Done","woocommerce")})]})]}):(0,R.jsxs)("div",{className:(0,c.A)("wc-block-attribute-filter"),children:[b&&(0,R.jsx)(m.A,{className:"wc-block-attribute-filter__title",headingLevel:x,heading:b,onChange:e=>s({heading:e})}),(0,R.jsx)(p.Disabled,{children:(0,R.jsx)(W,{attributes:e,isEditor:!0,getNotice:Y})})]})]})}),J={heading:{type:"string",default:(0,i.__)("Filter by attribute","woocommerce")}},X=JSON.parse('{"name":"woocommerce/attribute-filter","title":"Filter by Attribute Controls","description":"Enable customers to filter the product grid by selecting one or more attributes, such as color.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"color":{"text":true,"background":false},"inserter":false,"lock":false,"interactivity":false},"attributes":{"className":{"type":"string","default":""},"attributeId":{"type":"number","default":0},"showCounts":{"type":"boolean","default":false},"queryType":{"type":"string","default":"or"},"headingLevel":{"type":"number","default":3},"displayStyle":{"type":"string","default":"list"},"showFilterButton":{"type":"boolean","default":false},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),Q={supports:{...X.supports,__experimentalBorder:{radius:!1,color:!0,width:!1}},attributes:{...X.attributes,showCounts:{type:"boolean",default:!0},...J},save:({attributes:e})=>{const{className:o,showCounts:r,queryType:s,attributeId:n,heading:i,headingLevel:a,displayStyle:l,showFilterButton:d,selectType:u}=e,m={"data-attribute-id":n,"data-show-counts":r,"data-query-type":s,"data-heading":i,"data-heading-level":a};return"list"!==l&&(m["data-display-style"]=l),d&&(m["data-show-filter-button"]=d),"single"===u&&(m["data-select-type"]=u),(0,R.jsx)("div",{...t.useBlockProps.save({className:(0,c.A)("is-loading",o)}),...m,children:(0,R.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"})})}},K=[Q];(0,e.registerBlockType)(X,{icon:{src:(0,R.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},attributes:{...X.attributes,...J},edit:Z,save({attributes:e}){const{className:o}=e;return(0,R.jsx)("div",{...t.useBlockProps.save({className:(0,c.A)("is-loading",o)})})},deprecated:K})})(),(()=>{"use strict";var e=s(74997),t=s(93450);const o=JSON.parse('{"name":"woocommerce/breadcrumbs","title":"Store Breadcrumbs","description":"Enable customers to keep track of their location within the store and navigate back to parent pages.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","attributes":{"contentJustification":{"type":"string"},"fontSize":{"type":"string","default":"small"},"align":{"type":"string","default":"wide"}},"supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"color":{"background":false,"link":true},"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var r=s(94715),c=s(56427),n=s(27723),i=s(47143),a=s(10790);var l=s(5573);const d=(0,a.jsxs)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(l.Rect,{x:"4",y:"10.5",width:"6",height:"3",rx:"1.5",fill:"currentColor"}),(0,a.jsx)(l.Rect,{x:"12",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"}),(0,a.jsx)(l.Rect,{x:"17",y:"10.5",width:"3",height:"3",rx:"1.5",fill:"currentColor"})]});s(14922),(0,e.registerBlockType)(o,{icon:{src:(0,a.jsx)(t.A,{icon:d,className:"wc-block-editor-components-block-icon"})},attributes:{...o.attributes},edit:({attributes:e})=>{const t=(0,r.useBlockProps)({className:"woocommerce wc-block-breadcrumbs"}),o=(0,i.useSelect)(e=>{const t=e(r.store).getSettings(),o=Object.getOwnPropertySymbols(t).find(e=>"globalStylesDataKey"===e.description);if(!o)return;const s=t[o];return s?.blocks?.["woocommerce/breadcrumbs"]?.typography?.fontSize},[]);return"small"===e.fontSize&&o&&"var(--wp--preset--font-size--small)"!==o&&(t.className=t.className.split(" ").filter(e=>e&&"has-small-font-size"!==e).join(" "),t.style.fontSize=o),(0,a.jsx)("div",{...t,children:(0,a.jsxs)(c.Disabled,{children:[(0,a.jsx)("a",{href:"/",children:(0,n.__)("Breadcrumbs","woocommerce")}),(0,n.__)(" / Navigation / Path","woocommerce")]})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(81475);const r=JSON.parse('{"name":"woocommerce/catalog-sorting","title":"Catalog Sorting","description":"Enable customers to change the sorting order of the products.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":true,"color":{"text":true,"background":false},"typography":{"fontSize":true}},"viewScriptModule":"woocommerce/catalog-sorting","style":"file:../woocommerce/catalog-sorting-style.css","attributes":{"fontSize":{"type":"string","default":"small"},"useLabel":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(27723),i=s(56427),a=s(10790);const l=({useLabel:e})=>(0,a.jsx)(a.Fragment,{children:e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("label",{htmlFor:"woocommerce-orderby",children:(0,n.__)("Sort by","woocommerce")}),(0,a.jsx)("select",{className:"orderby",id:"woocommerce-orderby",children:(0,a.jsx)("option",{children:(0,n.__)("Default","woocommerce")})})]}):(0,a.jsx)("select",{className:"orderby",children:(0,a.jsx)("option",{children:(0,n.__)("Default sorting","woocommerce")})})});s(47950),(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:({attributes:e,setAttributes:t})=>{const{useLabel:o}=e,r=(0,c.useBlockProps)({className:"woocommerce wc-block-catalog-sorting"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.InspectorControls,{children:(0,a.jsx)(i.__experimentalToolsPanel,{label:(0,n.__)("Accessibility","woocommerce"),resetAll:()=>{t({useLabel:!1})},children:(0,a.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!1!==o,label:(0,n.__)("Show visual label","woocommerce"),onDeselect:()=>t({useLabel:!1}),isShownByDefault:!0,children:(0,a.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Show visual label","woocommerce"),help:(0,n.__)('Displays "Sort by" text before the dropdown menu to improve clarity and accessibility.',"woocommerce"),checked:o,onChange:e=>t({useLabel:e})})})})}),(0,a.jsx)("div",{...r,children:(0,a.jsx)(i.Disabled,{children:(0,a.jsx)(l,{useLabel:o})})})]})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(83243);const o=JSON.parse('{"name":"woocommerce/category-description","title":"Product Category Description","description":"Displays the current category description.","category":"woocommerce","apiVersion":3,"textdomain":"woocommerce","attributes":{"textAlign":{"type":"string"}},"supports":{"align":false,"color":{"background":true,"text":true},"html":false,"spacing":{"margin":true,"padding":true},"typography":true},"usesContext":["termId","termTaxonomy"]}');var r=s(4921),c=s(27723),n=s(47143),i=s(3582),a=s(94715),l=s(2284),d=s(99853),u=s(10790);(0,e.registerBlockType)(o,{edit:function({attributes:e,setAttributes:t,context:o}){const{textAlign:s}=e,{termId:m,termTaxonomy:p}=o,h=(0,n.useSelect)(e=>!!m&&e(i.store).canUser("update",{kind:"taxonomy",name:p||"product_cat",id:m}),[m,p]),[g="",w,_]=(0,i.useEntityProp)("taxonomy",p||"product_cat","description",String(m)),b=(0,l.H)();let x="";b?x=d.L[0].description:"string"==typeof g&&(x=g);let f="";b?f=d.L[0].description:"object"==typeof _&&null!==_&&"rendered"in _&&"string"==typeof _.rendered&&(f=_.rendered);const y=(0,a.useBlockProps)({className:(0,r.A)({[`has-text-align-${s}`]:s})});let v=(0,u.jsx)("p",{...y,children:(0,c.__)("Category description","woocommerce")});return m&&(v=h?(0,u.jsx)(a.PlainText,{tagName:"p",placeholder:(0,c.__)("No description","woocommerce"),value:x,onChange:e=>w(e),__experimentalVersion:2,...y}):(0,u.jsx)("p",{...y,dangerouslySetInnerHTML:{__html:f}})),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a.BlockControls,{group:"block",children:(0,u.jsx)(a.AlignmentControl,{value:s,onChange:e=>t({textAlign:e||""})})}),v]})},icon:t.A,save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(69544);const o=JSON.parse('{"name":"woocommerce/category-title","title":"Product Category Title","description":"Displays the current category title and lets permitted users edit it.","category":"woocommerce","apiVersion":3,"textdomain":"woocommerce","attributes":{"isLink":{"type":"boolean","default":false},"level":{"type":"number","default":2},"linkTarget":{"type":"string","default":"_self"},"rel":{"type":"string","default":""},"textAlign":{"type":"string"}},"supports":{"align":false,"color":{"background":true,"text":true},"html":false,"spacing":{"margin":true,"padding":true},"typography":true},"usesContext":["termId","termTaxonomy"]}');var r=s(4921),c=s(3582),n=s(47143),i=s(86087),a=s(27723),l=s(94715),d=s(2284),u=s(99853),m=s(56427),p=s(10790);const h={isLink:!1,linkTarget:"_self",rel:""},g=(0,i.forwardRef)(({tagName:e,children:t,...o},r)=>(0,i.createElement)(e,{...o,ref:r},t));(0,e.registerBlockType)(o,{edit:function({attributes:e,setAttributes:t,context:o}){const{isLink:s,level:w,linkTarget:_,rel:b,textAlign:x}=e,f=0===w?"p":`h${w}`,{termId:y,termTaxonomy:v}=o,k=(0,n.useSelect)(e=>!!y&&e(c.store).canUser("update",{kind:"taxonomy",name:v||"product_cat",id:y}),[y,v]),j=(0,d.H)(),[C="",S,A]=(0,c.useEntityProp)("taxonomy",v||"product_cat","name",y?String(y):void 0);let N="";j?N=u.L[0].description:"string"==typeof C&&(N=C);let P="";j?P=u.L[0].description:"object"==typeof A&&null!==A&&"rendered"in A&&"string"==typeof A.rendered&&(P=A.rendered);const B=(0,n.useSelect)(e=>{if(!y)return;const t=e(c.store).getEntityRecord("taxonomy",v||"product_cat",y);return t?.link},[y,v]),I=(0,l.useBlockProps)({className:(0,r.A)({[`has-text-align-${x}`]:x})});let T=(0,i.createElement)(f,I,(0,a.__)("Category title","woocommerce"));return y&&(T=k?(0,p.jsx)(l.PlainText,{tagName:f,placeholder:(0,a.__)("No title","woocommerce"),value:N,onChange:e=>S(e),__experimentalVersion:2,...I}):(0,p.jsx)(g,{tagName:f,...I,dangerouslySetInnerHTML:{__html:P}})),s&&y&&(T=k?(0,p.jsx)(g,{tagName:f,...I,children:(0,p.jsx)(l.PlainText,{tagName:"a",href:B,target:_,rel:b,placeholder:N?.length?void 0:(0,a.__)("No title","woocommerce"),value:N,onChange:e=>S(e),__experimentalVersion:2})}):(0,p.jsx)(g,{tagName:f,...I,children:(0,p.jsx)("a",{href:B,target:_,rel:b,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:P}})})),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(l.BlockControls,{group:"block",children:[(0,p.jsx)(l.HeadingLevelDropdown,{value:w,onChange:e=>t({level:e})}),(0,p.jsx)(l.AlignmentControl,{value:x,onChange:e=>t({textAlign:e||""})})]}),(0,p.jsx)(l.InspectorControls,{children:(0,p.jsxs)(m.__experimentalToolsPanel,{label:(0,a.__)("Settings","woocommerce"),resetAll:()=>{t(h)},children:[(0,p.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Make title a link","woocommerce"),hasValue:()=>s!==h.isLink,onDeselect:()=>t({isLink:h.isLink}),isShownByDefault:!0,children:(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Make title a link","woocommerce"),onChange:()=>t({isLink:!s}),checked:s})}),s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Open in new tab","woocommerce"),hasValue:()=>_!==h.linkTarget,onDeselect:()=>t({linkTarget:h.linkTarget}),isShownByDefault:!0,children:(0,p.jsx)(m.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Open in new tab","woocommerce"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===_})}),(0,p.jsx)(m.__experimentalToolsPanelItem,{label:(0,a.__)("Link rel","woocommerce"),hasValue:()=>b!==h.rel,onDeselect:()=>t({rel:h.rel}),isShownByDefault:!0,children:(0,p.jsx)(m.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,a.__)("Link rel","woocommerce"),value:b,onChange:e=>t({rel:e})})})]})]})}),T]})},icon:t.A,save:()=>null})})(),(()=>{"use strict";var e=s(27723),t=s(74997),o=s(94715),r=s(56427),c=s(10790);const n=JSON.parse('{"name":"woocommerce/coming-soon","category":"woocommerce","title":"Coming Soon","attributes":{"color":{"type":"string"},"storeOnly":{"type":"boolean","default":false},"comingSoonPatternId":{"type":"string","default":""}},"supports":{"color":{"background":true,"text":true},"inserter":false}}'),i=(e="#bea0f2")=>`\n /* Reset */\n h1, p, a {\n margin: 0;\n padding: 0;\n border: 0;\n vertical-align: baseline;\n }\n ol, ul {\n list-style: none;\n }\n a {\n text-decoration: none;\n }\n body,\n body.custom-background {\n margin: 0;\n background-color: ${e};\n font-family: 'Inter', sans-serif;\n min-width: 320px;\n --wp--preset--color--contrast: #111111;\n --wp--style--global--wide-size: 1280px;\n }\n body .is-layout-constrained > .alignwide {\n margin: 0 auto;\n }\n .wp-container-core-group-is-layout-4.wp-container-core-group-is-layout-4 {\n justify-content: space-between;\n }\n .is-layout-flex {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0;\n }\n .wp-block-site-title p {\n line-height: normal;\n }\n .wp-block-site-title a {\n font-weight: 600;\n font-size: 20px;\n font-style: normal;\n line-height: normal;\n letter-spacing: -0.4px;\n color: var(--wp--preset--color--contrast);\n text-decoration: none;\n }\n .wp-block-social-links {\n gap: 0.5em 18px;\n }\n .woocommerce-coming-soon-social-login {\n gap: 48px;\n }\n .wp-block-loginout {\n background-color: #000000;\n border-radius: 6px;\n display: flex;\n height: 40px;\n width: 74px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n box-sizing: border-box;\n }\n .wp-block-loginout a {\n color: #ffffff;\n text-decoration: none;\n line-height: 17px;\n font-size: 14px;\n font-weight: 500;\n }\n .wp-block-spacer {\n margin: 0;\n }\n .woocommerce-coming-soon-banner-container {\n padding-inline: min(5.5rem, 8vw);\n margin: 0;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n\t@media (max-width: 660px) {\n\t\t.woocommerce-coming-soon-banner-container {\n\t\t\tpadding-inline: 0;\n\t\t}\n\t}\n .woocommerce-coming-soon-banner-container > .wp-block-group__inner-container {\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n }\n .woocommerce-coming-soon-powered-by-woo {\n width: 100%;\n --wp--preset--spacing--30: 0;\n --wp--preset--spacing--10: 19px;\n }\n .woocommerce-coming-soon-powered-by-woo p {\n font-style: normal;\n font-weight: 400;\n line-height: 160%; /* 19.2px */\n letter-spacing: -0.12px;\n color: #3C434A;\n font-size: 12px;\n font-family: Inter;\n }\n .woocommerce-coming-soon-powered-by-woo a {\n font-family: Inter;\n }\n body .is-layout-constrained > .woocommerce-coming-soon-banner.alignwide {\n max-width: 820px;\n }\n .coming-soon-is-vertically-aligned-center {\n width: 100%;\n align-items: stretch;\n }\n .coming-soon-cover .wp-block-cover__background {\n background-color: ${e} !important;\n }\n .woocommerce-coming-soon-header {\n height: 40px;\n }\n .woocommerce-coming-soon-banner {\n font-size: clamp(27px, 1.74rem + ((1vw - 3px) * 2), 48px);\n font-weight: 400;\n line-height: 58px;\n font-family: 'Cardo', serif;\n letter-spacing: normal;\n text-align: center;\n font-style: normal;\n max-width: 820px;\n color: var(--wp--preset--color--contrast);\n margin: 0 auto;\n text-wrap: balance;\n }`,a=[{attributes:{color:{type:"string"},storeOnly:{type:"boolean",default:!1}},supports:{color:{background:!1,text:!0}},save:({attributes:e})=>{const{color:t,storeOnly:r}=e,s={...o.useBlockProps.save()};return r?(0,c.jsxs)("div",{...s,children:[(0,c.jsx)(o.InnerBlocks.Content,{}),(0,c.jsx)("style",{children:".woocommerce-breadcrumb {display: none;}"})]}):(0,c.jsxs)("div",{...s,children:[(0,c.jsx)(o.InnerBlocks.Content,{}),(0,c.jsx)("style",{children:i(t)})]})}}];s(88302),s(21159),(0,t.registerBlockType)(n,{title:(0,e.__)("Coming Soon","woocommerce"),edit:function({attributes:t,setAttributes:s}){const{color:n,storeOnly:i}=t,a={...(0,o.useBlockProps)()};if(i||!n)return(0,c.jsx)("div",{...a,children:(0,c.jsx)(o.InnerBlocks,{})});const l="#bea0f2";return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.InspectorControls,{children:(0,c.jsx)(r.__experimentalToolsPanel,{label:(0,e.__)("Settings","woocommerce"),resetAll:()=>{s({color:l})},children:(0,c.jsx)(r.__experimentalToolsPanelItem,{hasValue:()=>n!==l,label:(0,e.__)("Color","woocommerce"),onDeselect:()=>s({color:l}),isShownByDefault:!0,children:(0,c.jsx)(r.ColorPicker,{color:n,onChange:e=>s({color:e}),enableAlpha:!0,defaultValue:l})})})}),(0,c.jsxs)("div",{...a,children:[(0,c.jsx)(o.InnerBlocks,{}),(0,c.jsx)("style",{children:`:root{--woocommerce-coming-soon-color: ${n} }`})]})]})},save:function(){return(0,c.jsx)("div",{...o.useBlockProps.save(),children:(0,c.jsx)(o.InnerBlocks.Content,{})})},apiVersion:3,deprecated:a})})(),(()=>{"use strict";var e=s(74997),t=s(27723),o=s(94715),r=s(56427),c=s(86087),n=s(1455),i=s.n(n),a=s(52619),l=s(47143),d=s(15703),u=s(10790);const m={percent:(0,t.__)("Percentage discount","woocommerce"),fixed_cart:(0,t.__)("Fixed cart discount","woocommerce"),fixed_product:(0,t.__)("Fixed product discount","woocommerce")};function p(e){return"percent"===e?100:1e6}function h({attributes:e,setAttributes:o}){const s=function(){const e=(0,d.getSetting)("couponTypes",m);return Object.entries(e).map(([e,t])=>({value:e,label:t}))}(),c=p(e.discountType);return(0,u.jsxs)(r.PanelBody,{title:(0,t.__)("General","woocommerce"),initialOpen:!0,children:[(0,u.jsx)(r.SelectControl,{label:(0,t.__)("Discount type","woocommerce"),value:e.discountType,options:s,onChange:t=>{const r=p(t);o({discountType:t,amount:Math.min(e.amount,r)})},__nextHasNoMarginBottom:!0}),(0,u.jsx)(r.TextControl,{label:(0,t.__)("Amount","woocommerce"),value:String(e.amount),type:"number",min:0,max:c,onChange:e=>o({amount:Math.min(Number(e)||0,c)}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)(r.TextControl,{label:(0,t.__)("Expires (days after send)","woocommerce"),help:(0,t.__)("Set to 0 for no expiry.","woocommerce"),value:String(e.expiryDay),type:"number",min:0,onChange:e=>o({expiryDay:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)(r.ToggleControl,{label:(0,t.__)("Free shipping","woocommerce"),checked:e.freeShipping,onChange:e=>o({freeShipping:e}),__nextHasNoMarginBottom:!0})]})}function g({attributes:e,setAttributes:o}){return(0,u.jsxs)(r.PanelBody,{title:(0,t.__)("Usage limits","woocommerce"),initialOpen:!1,children:[(0,u.jsx)(r.TextControl,{label:(0,t.__)("Usage limit per coupon","woocommerce"),help:(0,t.__)("How many times this coupon can be used before it is void. Set to 0 for unlimited.","woocommerce"),value:String(e.usageLimit),type:"number",min:0,onChange:e=>o({usageLimit:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)(r.TextControl,{label:(0,t.__)("Usage limit per user","woocommerce"),help:(0,t.__)("How many times this coupon can be used by an individual user. Set to 0 for unlimited.","woocommerce"),value:String(e.usageLimitPerUser),type:"number",min:0,onChange:e=>o({usageLimitPerUser:Number(e)||0}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}function w({label:e,value:t,onChange:o,endpoint:s}){const[n,a]=(0,c.useState)([]),[l,d]=(0,c.useState)([]),m=(0,c.useRef)(null),p=(0,c.useRef)(null),h=(0,c.useCallback)(e=>{if(p.current&&p.current.abort(),e.length<2)return a([]),void d([]);p.current=new AbortController,i()({path:`/wc/v3/${s}?search=${encodeURIComponent(e)}&per_page=20`,signal:p.current.signal}).then(e=>{d(e),a(e.map(e=>e.name))}).catch(e=>{e instanceof Error&&"AbortError"===e.name||(a([]),d([]))})},[s]);(0,c.useEffect)(()=>()=>{m.current&&clearTimeout(m.current),p.current&&p.current.abort()},[]);const g=t.map(e=>e.title);return(0,u.jsx)("div",{style:{marginBottom:"24px"},children:(0,u.jsx)(r.FormTokenField,{label:e,value:g,suggestions:n,onInputChange:e=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{h(e)},300)},onChange:e=>{const r=e.map(e=>{const o=t.find(t=>t.title===e);if(o)return o;const r=l.find(t=>t.name===e);return r?{id:r.id,title:r.name}:null}).filter(e=>null!==e);o(r)},__experimentalExpandOnFocus:!0,__next40pxDefaultSize:!0})})}function _({attributes:e,setAttributes:o}){return(0,u.jsxs)(r.PanelBody,{title:(0,t.__)("Usage restrictions","woocommerce"),initialOpen:!1,children:[(0,u.jsx)(r.TextControl,{label:(0,t.__)("Minimum spend","woocommerce"),value:e.minimumAmount,onChange:e=>o({minimumAmount:e}),type:"number",min:0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)(r.TextControl,{label:(0,t.__)("Maximum spend","woocommerce"),value:e.maximumAmount,onChange:e=>o({maximumAmount:e}),type:"number",min:0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)(r.ToggleControl,{label:(0,t.__)("Individual use only","woocommerce"),help:(0,t.__)("If checked, this coupon cannot be used in conjunction with other coupons.","woocommerce"),checked:e.individualUse,onChange:e=>o({individualUse:e}),__nextHasNoMarginBottom:!0}),(0,u.jsx)(r.ToggleControl,{label:(0,t.__)("Exclude sale items","woocommerce"),help:(0,t.__)("If checked, this coupon will not apply to items on sale.","woocommerce"),checked:e.excludeSaleItems,onChange:e=>o({excludeSaleItems:e}),__nextHasNoMarginBottom:!0}),(0,u.jsx)(w,{label:(0,t.__)("Products","woocommerce"),value:e.productIds,onChange:e=>o({productIds:e}),endpoint:"products"}),(0,u.jsx)(w,{label:(0,t.__)("Excluded products","woocommerce"),value:e.excludedProductIds,onChange:e=>o({excludedProductIds:e}),endpoint:"products"}),(0,u.jsx)(w,{label:(0,t.__)("Product categories","woocommerce"),value:e.productCategoryIds,onChange:e=>o({productCategoryIds:e}),endpoint:"products/categories"}),(0,u.jsx)(w,{label:(0,t.__)("Excluded product categories","woocommerce"),value:e.excludedProductCategoryIds,onChange:e=>o({excludedProductCategoryIds:e}),endpoint:"products/categories"}),(0,u.jsx)(r.TextControl,{label:(0,t.__)("Allowed emails","woocommerce"),help:(0,t.__)("Comma-separated list of allowed emails to check against the customer's billing email.","woocommerce"),value:e.emailRestrictions,onChange:e=>o({emailRestrictions:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})}const b=["draft","future","pending","private","publish"];function x({attributes:e,setAttributes:o}){const s=e.couponCode,[n,d]=(0,c.useState)(""),[m,p]=(0,c.useState)([]),[h,g]=(0,c.useState)(!1),w=(0,c.useRef)(null),_=(0,c.useRef)(null),x=(0,c.useCallback)(e=>{if(_.current&&_.current.abort(),e.length<2)return p([]),void g(!1);g(!0),_.current=new AbortController;const o=new URLSearchParams({per_page:"20",search:e});b.forEach(e=>{o.append("status[]",e)}),i()({path:`/wc/v3/coupons?${o.toString()}`,signal:_.current.signal}).then(e=>{p(e),g(!1)}).catch(e=>{e instanceof Error&&"AbortError"===e.name||("rest_forbidden"!==e.code&&403!==e.status||(0,l.dispatch)("core/notices").createErrorNotice((0,t.__)("You do not have permission to view coupons.","woocommerce"),{id:"coupon-code-permission-error",type:"snackbar"}),g(!1))})},[]);(0,c.useEffect)(()=>(w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{x(n)},300),()=>{w.current&&clearTimeout(w.current)}),[n,x]),(0,c.useEffect)(()=>()=>{_.current&&_.current.abort()},[]);const f=m.map(e=>({value:e.code,label:e.code}));return s&&!f.some(e=>e.value===s)&&f.unshift({value:s,label:s}),(0,u.jsxs)(r.PanelBody,{title:(0,t.__)("Coupon","woocommerce"),initialOpen:!0,children:[(0,u.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,u.jsx)("div",{children:(0,t.__)("Search for an existing coupon","woocommerce")}),(0,u.jsx)(r.ComboboxControl,{label:(0,t.__)("Search coupons","woocommerce"),hideLabelFromVision:!0,value:s,onChange:e=>{o({couponCode:e||""})},onFilterValueChange:e=>{d(e)},options:f,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:h?(0,t.__)("Searching coupons…","woocommerce"):n.length>0&&n.length<2?(0,t.__)("Type at least 2 characters to search","woocommerce"):null}),h&&(0,u.jsx)("div",{style:{display:"flex",alignItems:"center",marginTop:"8px"},children:(0,u.jsx)(r.Spinner,{})})]}),(0,u.jsx)("div",{children:(0,u.jsx)(r.Button,{variant:"link",onClick:()=>{const e=(0,a.applyFilters)("woocommerce_email_editor_create_coupon_handler",()=>{window.open("/wp-admin/post-new.php?post_type=shop_coupon","_blank")});"function"==typeof e&&e()},style:{padding:0,height:"auto"},children:(0,t.__)("Create new coupon","woocommerce")})})]})}const f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/coupon-code","version":"1.0.0","title":"Coupon Code","category":"woocommerce","description":"Include a coupon code to entice customers to make a purchase.","supports":{"email":true,"html":false,"align":true,"color":{"text":true,"background":true},"typography":{"fontSize":true},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true}},"attributes":{"couponCode":{"type":"string","default":""},"source":{"type":"string","default":"createNew","enum":["createNew","existing"]},"discountType":{"type":"string","default":"percent"},"amount":{"type":"number","default":10},"expiryDay":{"type":"number","default":10},"freeShipping":{"type":"boolean","default":false},"usageLimit":{"type":"number","default":0},"usageLimitPerUser":{"type":"number","default":0},"minimumAmount":{"type":"string","default":""},"maximumAmount":{"type":"string","default":""},"individualUse":{"type":"boolean","default":false},"excludeSaleItems":{"type":"boolean","default":false},"productIds":{"type":"array","default":[],"items":{"type":"object"}},"excludedProductIds":{"type":"array","default":[],"items":{"type":"object"}},"productCategoryIds":{"type":"array","default":[],"items":{"type":"object"}},"excludedProductCategoryIds":{"type":"array","default":[],"items":{"type":"object"}},"emailRestrictions":{"type":"string","default":""}},"textdomain":"woocommerce"}');(0,e.registerBlockType)(f,{edit:function(e){const{attributes:s,setAttributes:c}=e,n=s.source??"createNew",i=s.couponCode,{className:a="",style:l,...d}=(0,o.useBlockProps)(),m="createNew"===n?"XXXX-XXXXXX-XXXX":i||"",{background:p,backgroundColor:w,border:b,...f}=l||{},y={fontSize:"1.2em",padding:"12px 20px",borderWidth:"2px",borderStyle:"dashed",borderColor:"#cccccc",borderRadius:"4px",color:"#000000",backgroundColor:"#f5f5f5",fontWeight:"bold",letterSpacing:"1px",...f,display:"inline-block",boxSizing:"border-box",textAlign:"center"},v=s.align,k={textAlign:["left","center","right","justify","start","end"].includes(v)?v:"center"},j=a.split(" ").filter(Boolean),C=[],S=[];j.forEach(e=>{e.startsWith("has-")||e.startsWith("wp-elements-")?C.push(e):S.push(e)});const A=S.length>0?S.join(" "):void 0,N=C.length>0?C.join(" "):void 0;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(o.InspectorControls,{children:[(0,u.jsx)(r.PanelBody,{title:(0,t.__)("Coupon source","woocommerce"),initialOpen:!0,children:(0,u.jsx)(r.SelectControl,{label:(0,t.__)("Coupon source","woocommerce"),hideLabelFromVision:!0,value:n,options:[{value:"createNew",label:(0,t.__)("Create new","woocommerce")},{value:"existing",label:(0,t.__)("Use existing","woocommerce")}],onChange:e=>{c({source:"existing"===e?"existing":"createNew"})},__nextHasNoMarginBottom:!0})}),"createNew"===n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(h,{attributes:s,setAttributes:c}),(0,u.jsx)(g,{attributes:s,setAttributes:c}),(0,u.jsx)(_,{attributes:s,setAttributes:c})]}),"existing"===n&&(0,u.jsx)(x,{attributes:s,setAttributes:c})]}),(0,u.jsxs)("div",{...d,className:A,style:{...d.style,...k},children:[(0,u.jsx)("span",{className:N,style:y,children:m||(0,t.__)("Coupon Code block – No coupon selected","woocommerce")}),"createNew"===n&&(0,u.jsx)("div",{style:{fontSize:"12px",color:"#757575",marginTop:"8px"},children:(0,t.__)("A coupon code will be automatically generated at send time.","woocommerce")})]})]})},save:function(e){const{attributes:t}=e,r=t.source??"createNew",s=t.couponCode,c="createNew"===r?"XXXX-XXXXXX-XXXX":s,n=o.useBlockProps.save();return(0,u.jsx)("div",{...n,children:c&&(0,u.jsx)("strong",{children:c})})},deprecated:[{attributes:{couponCode:{type:"string",default:""}},save:function(e){const{attributes:t}=e,r="string"==typeof t.couponCode?t.couponCode:"",s=o.useBlockProps.save();return(0,u.jsx)("div",{...s,children:r&&(0,u.jsx)("strong",{children:r})})},migrate:e=>({...e,source:"existing"})}]})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(5573),r=s(10790);const c=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{id:"icon/action/account_circle_24px_2",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM7.07 18.28C7.5 17.38 10.12 16.5 12 16.5C13.88 16.5 16.51 17.38 16.93 18.28C15.57 19.36 13.86 20 12 20C10.14 20 8.43 19.36 7.07 18.28ZM12 14.5C13.46 14.5 16.93 15.09 18.36 16.83C19.38 15.49 20 13.82 20 12C20 7.59 16.41 4 12 4C7.59 4 4 7.59 4 12C4 13.82 4.62 15.49 5.64 16.83C7.07 15.09 10.54 14.5 12 14.5ZM12 6C10.06 6 8.5 7.56 8.5 9.5C8.5 11.44 10.06 13 12 13C13.94 13 15.5 11.44 15.5 9.5C15.5 7.56 13.94 6 12 6ZM10.5 9.5C10.5 10.33 11.17 11 12 11C12.83 11 13.5 10.33 13.5 9.5C13.5 8.67 12.83 8 12 8C11.17 8 10.5 8.67 10.5 9.5Z"})});var n=s(27723);const i=JSON.parse('{"name":"woocommerce/customer-account","title":"Customer account","description":"A block that allows your customers to log in and out of their accounts in your store.","category":"woocommerce","keywords":["WooCommerce","My Account"],"supports":{"align":true,"color":{"text":true},"interactivity":true,"typography":{"fontSize":true,"__experimentalFontFamily":true},"spacing":{"margin":true,"padding":true}},"attributes":{"displayStyle":{"type":"string","default":"icon_and_text"},"hasDropdownNavigation":{"type":"boolean","default":false},"iconStyle":{"type":"string","default":"default"},"iconClass":{"type":"string","default":"icon"}},"viewScriptModule":"woocommerce/customer-account","style":"file:../woocommerce/customer-account-style.css","editorStyle":"file:../woocommerce/customer-account-editor.css","textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var a=s(4921),l=s(94715),d=s(56427);const u=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-5 -5 25 25",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00009 8.34785C10.3096 8.34785 12.1819 6.47909 12.1819 4.17393C12.1819 1.86876 10.3096 0 8.00009 0C5.69055 0 3.81824 1.86876 3.81824 4.17393C3.81824 6.47909 5.69055 8.34785 8.00009 8.34785ZM0.333496 15.6522C0.333496 15.8444 0.489412 16 0.681933 16H15.3184C15.5109 16 15.6668 15.8444 15.6668 15.6522V14.9565C15.6668 12.1428 13.7821 9.73911 10.0912 9.73911H5.90931C2.21828 9.73911 0.333645 12.1428 0.333645 14.9565L0.333496 15.6522Z",fill:"currentColor"})}),m=(0,r.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-4 -4 25 25",children:(0,r.jsx)("path",{d:"M9 0C4.03579 0 0 4.03579 0 9C0 13.9642 4.03579 18 9 18C13.9642 18 18 13.9642 18 9C18 4.03579 13.9642 0 9 0ZM9 4.32C10.5347 4.32 11.7664 5.57056 11.7664 7.08638C11.7664 8.62109 10.5158 9.85277 9 9.85277C7.4653 9.85277 6.23362 8.60221 6.23362 7.08638C6.23362 5.57056 7.46526 4.32 9 4.32ZM9 10.7242C11.1221 10.7242 12.96 12.2021 13.7937 14.4189C12.5242 15.5559 10.8379 16.238 9 16.238C7.16207 16.238 5.49474 15.5369 4.20632 14.4189C5.05891 12.2021 6.87793 10.7242 9 10.7242Z",fill:"currentColor"})}),p=(0,r.jsxs)(o.SVG,{viewBox:"1 1 29 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)(o.Circle,{cx:"16",cy:"10.5",r:"3.5",stroke:"currentColor",strokeWidth:"2"}),(0,r.jsx)(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5 18.5H20.5C21.8807 18.5 23 19.6193 23 21V25.5H25V21C25 18.5147 22.9853 16.5 20.5 16.5H11.5C9.01472 16.5 7 18.5147 7 21V25.5H9V21C9 19.6193 10.1193 18.5 11.5 18.5Z",fill:"currentColor"})]}),h=(0,r.jsx)(o.SVG,{viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(o.Path,{d:"M1 1L5 5L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});var g=s(15703);let w=function(e){return e.ICON_AND_TEXT="icon_and_text",e.TEXT_ONLY="text_only",e.ICON_ONLY="icon_only",e}({}),_=function(e){return e.DEFAULT="default",e.ALT="alt",e.LINE="line",e}({});const b={default:u,alt:m,line:p},x=({iconStyle:e,displayStyle:o,iconClass:s})=>o!==w.TEXT_ONLY?(0,r.jsx)("div",{className:"wc-block-customer-account__visual",children:(0,r.jsx)(t.A,{className:s,icon:b[e],size:18})}):null,f=({displayStyle:e})=>{if(e===w.ICON_ONLY)return null;const t=(0,g.getSetting)("currentUserId",null);return(0,r.jsx)("span",{className:"label",children:t?(0,n.__)("My Account","woocommerce"):(0,n.__)("Log in","woocommerce")})},y=({attributes:e})=>{const{displayStyle:o,hasDropdownNavigation:s,iconStyle:c,iconClass:i}=e,a=o===w.ICON_ONLY?{"aria-label":(0,n.__)("My Account","woocommerce")}:{},l=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x,{iconStyle:c,displayStyle:o,iconClass:i}),(0,r.jsx)(f,{displayStyle:o})]});return s?(0,r.jsxs)("button",{type:"button",className:"wc-block-customer-account__toggle",...a,children:[l,(0,r.jsx)(t.A,{className:"wc-block-customer-account__caret",icon:h,size:10})]}):(0,r.jsx)("a",{className:"wc-block-customer-account__link",href:(0,g.getSetting)("dashboardUrl",(0,g.getSetting)("wpLoginUrl","/wp-login.php")),...a,children:l})};var v=s(86087);const k=()=>{const e=`${(0,g.getSetting)("adminUrl")}admin.php?page=wc-settings&tab=account`,t=(0,v.createInterpolateElement)(`<a>${(0,n.__)("Manage account settings","woocommerce")}</a>`,{a:(0,r.jsx)(d.ExternalLink,{href:e})});return(0,r.jsx)("div",{className:"wc-block-editor-customer-account__link",children:t})},j=({attributes:e,setAttributes:o})=>{const{displayStyle:s,iconStyle:c}=e,i=[w.ICON_ONLY,w.ICON_AND_TEXT].includes(s);return(0,r.jsxs)(l.InspectorControls,{children:[(0,r.jsx)(d.PanelBody,{children:(0,r.jsx)(k,{})}),(0,r.jsxs)(d.PanelBody,{title:(0,n.__)("Display settings","woocommerce"),children:[(0,r.jsx)(d.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"customer-account-display-style",label:(0,n.__)("Icon options","woocommerce"),value:s,onChange:e=>{o({displayStyle:e})},help:(0,n.__)("Choose if you want to include an icon with the customer account link.","woocommerce"),options:[{value:w.ICON_AND_TEXT,label:(0,n.__)("Icon and text","woocommerce")},{value:w.TEXT_ONLY,label:(0,n.__)("Text-only","woocommerce")},{value:w.ICON_ONLY,label:(0,n.__)("Icon-only","woocommerce")}]}),i?(0,r.jsxs)(d.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,n.__)("Display Style","woocommerce"),isBlock:!0,value:c,onChange:e=>o({iconStyle:e}),help:(0,n.__)("When a logged-in customer has a profile photo, it replaces the icon.","woocommerce"),className:"wc-block-editor-customer-account__icon-style-toggle",children:[(0,r.jsx)(d.__experimentalToggleGroupControlOption,{value:_.LINE,label:(0,r.jsx)(t.A,{icon:p,size:32,className:(0,a.A)("wc-block-editor-customer-account__icon-option",{active:c===_.LINE})})}),(0,r.jsx)(d.__experimentalToggleGroupControlOption,{value:_.DEFAULT,label:(0,r.jsx)(t.A,{icon:u,size:32,className:(0,a.A)("wc-block-editor-customer-account__icon-option",{active:c===_.DEFAULT})})}),(0,r.jsx)(d.__experimentalToggleGroupControlOption,{value:_.ALT,label:(0,r.jsx)(t.A,{icon:m,size:32,className:(0,a.A)("wc-block-editor-customer-account__icon-option",{active:c===_.ALT})})})]}):null,(0,r.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Show dropdown navigation","woocommerce"),help:(0,n.__)("Display a dropdown menu with account navigation links when clicked.","woocommerce"),checked:e.hasDropdownNavigation??!1,onChange:e=>{o({hasDropdownNavigation:e})}})]})]},"inspector")};s(72380);(0,e.registerBlockType)(i,{icon:{src:(0,r.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},attributes:{...i.attributes},edit:({attributes:e,setAttributes:t})=>{const{className:o,hasDropdownNavigation:s}=e,c=(0,l.useBlockProps)({className:(0,a.A)("wc-block-editor-customer-account",o,{"wc-block-customer-account--has-dropdown":s})});return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{...c,children:[(0,r.jsx)(l.InspectorControls,{children:(0,r.jsx)(j,{attributes:e,setAttributes:t})}),(0,r.jsx)(d.Disabled,{children:(0,r.jsx)(y,{attributes:e})})]})})},save:()=>null}),(0,e.registerBlockVariation)("woocommerce/customer-account",{name:"woocommerce/customer-account",title:(0,n.__)("Customer account","woocommerce"),isDefault:!0,attributes:{...i.attributes,displayStyle:"icon_and_text",hasDropdownNavigation:!1,iconStyle:"default",iconClass:"wc-block-customer-account__account-icon"}})})(),(()=>{"use strict";var e=s(76339),t=s(74997);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/dropdown","title":"Dropdown","description":"Display options in a dropdown.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/add-to-cart-with-options-variation-selector-attribute"],"supports":{"interactivity":true,"woocommerce":{"innerBlockDisplayStyle":true}},"usesContext":["woocommerce/selectableItems","woocommerce/attributeId"],"attributes":{},"viewScriptModule":"woocommerce/dropdown","style":"file:../woocommerce/dropdown-style.css","editorStyle":"file:../woocommerce/dropdown-editor.css"}');var r=s(27723),c=s(4921),n=s(72620),i=s(56427),a=s(94715),l=(s(76233),s(6789),s(10790));(0,t.registerBlockType)(o,{edit:e=>{const{context:t}=e,o=t?.["woocommerce/selectableItems"]??{},s=o.isLoading??!1,d=Array.isArray(o.items)?o.items:[],u=(0,a.useBlockProps)({className:(0,c.A)("wc-block-dropdown",{"is-loading":s})});return(0,l.jsx)("div",{...u,children:(0,l.jsx)(i.Disabled,{children:(0,l.jsxs)("fieldset",{className:"wc-block-dropdown__fieldset",children:[(0,l.jsx)("legend",{className:"screen-reader-text",children:(0,r.__)("Choose an option","woocommerce")}),s?(0,l.jsx)("div",{className:"wc-block-dropdown__skeleton",children:(0,l.jsx)("div",{className:"wc-block-dropdown__skeleton-option"})}):(0,l.jsxs)("select",{className:"wc-block-dropdown__select","aria-label":o.groupLabel,children:[(0,l.jsx)("option",{value:"",children:(0,r.__)("Choose an option","woocommerce")}),d.map((e,t)=>{const o=function(e){return"string"==typeof e.label&&e.label.trim().length>0?(0,n.j)(e.label.trim()):"string"==typeof e.ariaLabel&&e.ariaLabel.trim().length>0?e.ariaLabel.trim():""}(e);return o?(0,l.jsx)("option",{value:e.value,disabled:!!e.disabled,children:o},t):null})]})]})})})},icon:e.A,save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(27723),o=s(86087),r=s(47143),c=s(84871),n=s.n(c),i=s(94715),a=s(29283),l=s(56427);const d=JSON.parse('{"name":"woocommerce/email-content","title":"Email Content","description":"A placeholder block for email content.","category":"woocommerce","textdomain":"woocommerce","supports":{"inserter":false,"email":true},"attributes":{"emailType":{"type":"string"},"postId":{"type":"integer"}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var u=s(10790);function m(){return(0,u.jsx)("div",{style:{margin:"20vh auto",maxWidth:400,padding:20,backgroundColor:"#fff",borderRadius:4,boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",textAlign:"center",color:"#000"},children:(0,u.jsxs)(l.__experimentalText,{children:[" ",(0,t.__)("Autogenerated content","woocommerce")," "]})})}(0,e.registerBlockType)(d.name,{...d,edit:function(){const[e,t]=(0,o.useState)(!1),s=(0,i.useBlockProps)(),{postId:c}=(0,r.useSelect)(e=>({postId:e(a.Y)?.getCurrentPostId?.()??0}),[]);return(0,u.jsxs)("div",{...s,onMouseEnter:()=>{t(!0)},onMouseLeave:()=>{t(!1)},style:{position:"relative"},children:[(0,u.jsx)(n(),{block:d.name,attributes:{postId:c}}),e&&(0,u.jsx)("div",{style:{position:"absolute",zIndex:1e3,left:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:(0,u.jsx)(m,{})})]})},save:function(){return(0,u.jsx)("div",{className:"wp-block-woocommerce-email-content",children:"##WOO_CONTENT##"})}})})(),(()=>{"use strict";var e=s(5573),t=s(10790);const o=(0,t.jsxs)(e.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,t.jsx)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"})]});var r=s(93450),c=(s(97545),s(91117),s(86087)),n=s(29491),i=s(58326),a=s(51258);const l=(0,n.createHigherOrderComponent)(e=>class extends c.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,category:"preview"===this.props.attributes.categoryId?this.props.attributes.previewCategory:null},this.loadCategory=this.loadCategory.bind(this)}componentDidMount(){this.loadCategory()}componentDidUpdate(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}loadCategory(){const{categoryId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(0,i.p7)(e).then(e=>{this.setState({category:e,loading:!1,error:null})}).catch(async e=>{const t=await(0,a.W)(e);this.setState({category:null,loading:!1,error:t})})):this.setState({category:null,loading:!1,error:null}))}render(){const{error:o,loading:r,category:s}=this.state;return(0,t.jsx)(e,{...this.props,error:o,getCategory:this.loadCategory,isLoading:r,category:s})}},"withCategory");var d=s(56427),u=s(27723),m=s(93870),p=s(17883),h=s(20238),g=s(58574),w=s(70843),_=s(33671),b=s(90680),x=s(26621);const f={icon:o,label:(0,u.__)("Featured Category","woocommerce")},y={...f,cropLabel:(0,u.__)("Edit category image","woocommerce"),editLabel:(0,u.__)("Edit selected category","woocommerce")},v={...f,emptyMessage:(0,u.__)("No product category is selected.","woocommerce"),noSelectionButtonLabel:(0,u.__)("Select a category","woocommerce")},k={...f,description:(0,u.__)("Visually highlight a product category and encourage prompt action.","woocommerce"),editLabel:(0,u.__)("Showing Featured Product block preview.","woocommerce")},j=(0,n.compose)([l,d.withSpokenMessages,x.t,_.o,(0,w.E)(k),(0,b._)(v),g.X,p.J,h.y,(0,m.K)(y)])(()=>(0,t.jsx)(t.Fragment,{})),C=JSON.parse('{"name":"woocommerce/featured-category","title":"Featured Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Visually highlight a product category and encourage prompt action.","supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"ariaLabel":true,"color":{"background":true,"text":true},"html":false,"filter":{"duotone":true},"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSkipSerialization":true}},"attributes":{"alt":{"type":"string","default":""},"contentAlign":{"type":"string","default":"center"},"dimRatio":{"type":"number","default":50},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"imageFit":{"type":"string","default":"none"},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"mediaId":{"type":"number","default":0},"mediaSrc":{"type":"string","default":""},"minHeight":{"type":"number","default":500},"linkText":{"default":"Shop now","type":"string"},"categoryId":{"type":"number"},"overlayColor":{"type":"string","default":"#000000"},"overlayGradient":{"type":"string"},"previewCategory":{"type":"object","default":null}},"selectors":{"filter":{"duotone":".wp-block-woocommerce-featured-category .wc-block-featured-category__background-image"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","usesContext":["termId","termTaxonomy"],"providesContext":{"termId":"categoryId","termTaxonomy":"termTaxonomy"}}');var S=s(96657);const A={attributes:{categoryId:"preview",previewCategory:s(99853).L[0]}};var N=s(74997),P=s(94715);const B=[{attributes:{...C.attributes,showDesc:{type:"boolean",default:!0}},save:()=>(0,t.jsx)(P.InnerBlocks.Content,{}),isEligible:e=>"boolean"==typeof e.editMode,migrate:(e,t)=>{const{editMode:o,showDesc:r,...s}=e,c="16px";return r&&t.unshift((0,N.createBlock)("woocommerce/category-description",{textAlign:"center",style:{padding:{bottom:c}}})),t.unshift((0,N.createBlock)("woocommerce/category-title",{level:2,isLink:!1,textAlign:"center",style:{padding:{bottom:c}}})),[s,t]}}];(0,S.k)(j,A,C,{deprecated:B,icon:{src:(0,t.jsx)(r.A,{icon:o,className:"wc-block-editor-components-block-icon"})}})})(),(()=>{"use strict";var e=s(93450),t=s(77092),o=(s(76388),s(90210),s(98945)),r=s(56427),c=s(29491),n=s(27723),i=s(93870),a=s(17883),l=s(20238),d=s(58574),u=s(70843),m=s(33671),p=s(90680),h=s(26621),g=s(10790);const w={icon:t.A,label:(0,n.__)("Featured Product","woocommerce")},_={...w,cropLabel:(0,n.__)("Edit product image","woocommerce"),editLabel:(0,n.__)("Edit selected product","woocommerce")},b={...w,emptyMessage:(0,n.__)("No product is selected.","woocommerce"),noSelectionButtonLabel:(0,n.__)("Select a product","woocommerce")},x={...w,description:(0,n.__)("Highlight a product or variation.","woocommerce"),editLabel:(0,n.__)("Showing Featured Product block preview.","woocommerce")},f=(0,c.compose)([o.A,r.withSpokenMessages,h.t,m.o,(0,u.E)(x),(0,p._)(b),d.X,a.J,l.y,(0,i.K)(_)])(()=>(0,g.jsx)(g.Fragment,{}));var y=s(96657);const v={attributes:{productId:"preview",previewProduct:s(48841).h[0]}};var k=s(74997),j=s(94715);const C=JSON.parse('{"name":"woocommerce/featured-product","title":"Featured Product","description":"Highlight a product or variation.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"ariaLabel":true,"html":false,"filter":{"duotone":true},"color":{"background":true,"text":true},"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSkipSerialization":true},"multiple":true},"attributes":{"alt":{"type":"string","default":""},"contentAlign":{"type":"string","default":"center"},"dimRatio":{"type":"number","default":50},"focalPoint":{"type":"object","default":{"x":0.5,"y":0.5}},"imageFit":{"type":"string","default":"none"},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"mediaId":{"type":"number","default":0},"mediaSrc":{"type":"string","default":""},"minHeight":{"type":"number","default":500},"linkText":{"type":"string","default":"Shop now"},"overlayColor":{"type":"string","default":"#000000"},"overlayGradient":{"type":"string"},"productId":{"type":"number"},"previewProduct":{"type":"object","default":null}},"selectors":{"filter":{"duotone":".wp-block-woocommerce-featured-product .wc-block-featured-product__background-image"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),S=[{attributes:{...C.attributes,showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},save:()=>(0,g.jsx)(j.InnerBlocks.Content,{}),isEligible:e=>"boolean"==typeof e.editMode,migrate:(e,t)=>{const{editMode:o,showDesc:r,showPrice:s,...c}=e;return!1!==s&&t.unshift((0,k.createBlock)("woocommerce/product-price",{style:{spacing:{padding:{bottom:"16px"}}},textAlign:"center"})),!1!==r&&t.unshift((0,k.createBlock)("woocommerce/product-summary",{showDescriptionIfEmpty:!0,summaryLength:80,style:{typography:{textAlign:"center"}}})),t.unshift((0,k.createBlock)("core/post-title",{level:2,isLink:!1,textAlign:"center",__woocommerceNamespace:"woocommerce/product-collection/product-title"})),[c,t]}}];(0,y.k)(f,v,C,{deprecated:S,icon:{src:(0,g.jsx)(e.A,{icon:t.A,className:"wc-block-editor-components-block-icon"})}})})(),(()=>{"use strict";var e=s(27723),t=s(74997),o=s(82490),r=s(94715),c=s(93450),n=s(84718),i=s(74175),a=s(82024),l=s(77092),d=s(56427),u=s(68059),m=s(10790);const p=JSON.parse('{"name":"woocommerce/filter-wrapper","title":"Filter Block","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"inserter":false},"attributes":{"filterType":{"type":"string"},"heading":{"type":"string"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),h=[{widgetId:"woocommerce_layered_nav_filters",name:"active-filters",heading:(0,e.__)("Active filters","woocommerce")},{widgetId:"woocommerce_price_filter",name:"price-filter",heading:(0,e.__)("Filter by price","woocommerce")},{widgetId:"woocommerce_layered_nav",name:"attribute-filter",heading:(0,e.__)("Filter by attribute","woocommerce")},{widgetId:"woocommerce_rating_filter",name:"rating-filter",heading:(0,e.__)("Filter by rating","woocommerce")}];(0,t.registerBlockType)(p,{edit:({attributes:e,clientId:t})=>{const o=(0,r.useBlockProps)();return(0,m.jsxs)("div",{...o,children:[(0,m.jsx)(r.InspectorControls,{children:(0,m.jsx)(d.PanelBody,{children:(0,m.jsx)(u.d,{clientId:t})})}),(0,m.jsx)(r.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:3,content:e.heading||""}],[`woocommerce/${e.filterType}`,{heading:"",lock:{remove:!0}}]]})]})},save:()=>(0,m.jsx)("div",{...r.useBlockProps.save(),children:(0,m.jsx)(r.InnerBlocks.Content,{})}),variations:[{name:"active-filters",title:(0,e.__)("Active Filters","woocommerce"),description:(0,e.__)("Display the currently active filters.","woocommerce"),isActive:e=>"active-filters"===e.filterType||!e.filterType,attributes:{heading:(0,e.__)("Active filters","woocommerce"),filterType:"active-filters"},icon:{src:(0,m.jsx)(c.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},isDefault:!0},{name:"price-filter",title:(0,e.__)("Filter by Price","woocommerce"),description:(0,e.__)("Enable customers to filter the product grid by choosing a price range.","woocommerce"),isActive:e=>"price-filter"===e.filterType,attributes:{filterType:"price-filter",heading:(0,e.__)("Filter by price","woocommerce")},icon:{src:(0,m.jsx)(c.A,{icon:n.A,className:"wc-block-editor-components-block-icon"})}},{name:"stock-filter",title:(0,e.__)("Filter by Stock","woocommerce"),description:(0,e.__)("Enable customers to filter the product grid by stock status.","woocommerce"),isActive:e=>"stock-filter"===e.filterType,attributes:{filterType:"stock-filter",heading:(0,e.__)("Filter by stock status","woocommerce")},icon:{src:(0,m.jsx)(c.A,{icon:i.A,className:"wc-block-editor-components-block-icon"})}},{name:"attribute-filter",title:(0,e.__)("Filter by Attribute","woocommerce"),description:(0,e.__)("Enable customers to filter the product grid by selecting one or more attributes, such as color.","woocommerce"),isActive:e=>"attribute-filter"===e.filterType,attributes:{filterType:"attribute-filter",heading:(0,e.__)("Filter by attribute","woocommerce")},icon:{src:(0,m.jsx)(c.A,{icon:a.A,className:"wc-block-editor-components-block-icon"})}},{name:"rating-filter",title:(0,e.__)("Filter by Rating","woocommerce"),description:(0,e.__)("Enable customers to filter the product grid by rating.","woocommerce"),isActive:e=>"rating-filter"===e.filterType,attributes:{filterType:"rating-filter",heading:(0,e.__)("Filter by rating","woocommerce")},icon:{src:(0,m.jsx)(c.A,{icon:l.A,className:"wc-block-editor-components-block-icon"})}}],transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>{return o=e,h.some(e=>e.widgetId===o)&&!!t?.raw;var o},transform:({idBase:e,instance:o})=>{const r=(s=e,h.find(e=>e.widgetId===s));var s;return r?((e,o,r)=>{const s=[(0,t.createBlock)(`woocommerce/${e}`,o)];return s.unshift((0,t.createBlock)("core/heading",{content:r,level:3})),(0,t.createBlock)("woocommerce/filter-wrapper",{filterType:e},s)})(r.name,((e,t)=>{switch(t){case"attribute-filter":return{attributeId:0,showCounts:!0,queryType:e?.raw?.query_type||"or",heading:"",displayStyle:e?.raw?.display_type||"list",showFilterButton:!1,selectType:e?.raw?.select_type||"multiple",isPreview:!1};case"active-filters":return{displayStyle:"list",heading:""};case"price-filter":return{heading:"",showInputFields:!1,showFilterButton:!0,inlineInput:!1};default:return{}}})(o,r.name),o?.raw?.title||r.heading):null}}]}})})(),(()=>{"use strict";var e=s(74997),t=s(15703),o=s(93450),r=s(10790),c=s(5573),n=(0,r.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(c.Path,{d:"M17.5 4v5a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V4H8v5a.5.5 0 0 0 .5.5h7A.5.5 0 0 0 16 9V4h1.5Zm0 16v-5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v5H8v-5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v5h1.5Z"})});s(9202);const i=JSON.parse('{"name":"woocommerce/handpicked-products","title":"Hand-picked Products","category":"woocommerce","keywords":["Handpicked Products","WooCommerce"],"description":"Display a selection of hand-picked products in a grid.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"align":{"type":"string"},"columns":{"type":"number","default":3},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","image":true},"title":{"type":"boolean","title":true},"price":{"type":"boolean","price":true},"rating":{"type":"boolean","rating":true},"button":{"type":"boolean","button":true}}},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"},"products":{"type":"array","default":[]},"alignButtons":{"type":"boolean","default":false},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var a=s(94715),l=s(56427),d=s(86087),u=s(27723),m=s(10525),p=s(11474),h=s(9537);const g=e=>{const{attributes:o,setAttributes:s}=e,{columns:c,contentVisibility:n,orderby:i,alignButtons:d}=o;return(0,r.jsxs)(a.InspectorControls,{children:[(0,r.jsxs)(l.PanelBody,{title:(0,u.__)("Layout","woocommerce"),initialOpen:!0,children:[(0,r.jsx)(l.RangeControl,{label:(0,u.__)("Columns","woocommerce"),value:c,onChange:e=>s({columns:e}),min:(0,t.getSetting)("minColumns",1),max:(0,t.getSetting)("maxColumns",6)}),(0,r.jsx)(l.ToggleControl,{label:(0,u.__)("Align Buttons","woocommerce"),help:d?(0,u.__)("Buttons are aligned vertically.","woocommerce"):(0,u.__)("Buttons follow content.","woocommerce"),checked:d,onChange:()=>s({alignButtons:!d})})]}),(0,r.jsx)(l.PanelBody,{title:(0,u.__)("Content","woocommerce"),initialOpen:!0,children:(0,r.jsx)(m.A,{settings:n,onChange:e=>s({contentVisibility:e})})}),(0,r.jsx)(l.PanelBody,{title:(0,u.__)("Order By","woocommerce"),initialOpen:!1,children:(0,r.jsx)(p.A,{setAttributes:s,value:i})}),(0,r.jsx)(l.PanelBody,{title:(0,u.__)("Products","woocommerce"),initialOpen:!1,children:(0,r.jsx)(h.A,{selected:o.products,onChange:(e=[])=>{const t=e.map(({id:e})=>e);s({products:t})},isCompact:!0})})]},"inspector")},w=e=>{const{attributes:t,setAttributes:s,debouncedSpeak:c,isEditing:i,setIsEditing:a}=e;return(0,r.jsxs)(l.Placeholder,{icon:(0,r.jsx)(o.A,{icon:n}),label:(0,u.__)("Hand-picked Products","woocommerce"),className:"wc-block-products-grid wc-block-handpicked-products",children:[(0,u.__)("Display a selection of hand-picked products in a grid.","woocommerce"),(0,r.jsxs)("div",{className:"wc-block-handpicked-products__selection",children:[(0,r.jsx)(h.A,{selected:t.products,onChange:(e=[])=>{const t=e.map(({id:e})=>e);s({products:t})}}),(0,r.jsx)(l.Button,{variant:"primary",onClick:()=>{a(!i),c((0,u.__)("Now displaying a preview of the Hand-picked Products block.","woocommerce"))},children:(0,u.__)("Done","woocommerce")})]})]})};var _=s(84871),b=s.n(_),x=s(53829);const f=e=>{const{attributes:t,name:o}=e;return t.isPreview?x.i:(0,r.jsx)(b(),{block:o,attributes:t})},y=(0,l.withSpokenMessages)(e=>{const t=(0,a.useBlockProps)(),{attributes:{products:o}}=e,[s,c]=(0,d.useState)(!o.length);return(0,r.jsxs)("div",{...t,children:[(0,r.jsx)(a.BlockControls,{children:(0,r.jsx)(l.ToolbarGroup,{controls:[{icon:"edit",title:(0,u.__)("Edit selected products","woocommerce"),onClick:()=>c(!s),isActive:s}]})}),(0,r.jsx)(g,{...e}),s?(0,r.jsx)(w,{isEditing:s,setIsEditing:c,...e}):(0,r.jsx)(l.Disabled,{children:(0,r.jsx)(f,{...e})})]})});(0,e.registerBlockType)(i,{icon:{src:(0,r.jsx)(o.A,{icon:n,className:"wc-block-editor-components-block-icon"})},attributes:{...i.attributes,columns:{type:"number",default:(0,t.getSetting)("defaultColumns",3)}},edit:y,save:()=>null})})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{blockifyConfig:()=>L,getDescription:()=>D});var t={};s.r(t),s.d(t,{blockifyConfig:()=>F,getDescription:()=>V});var o={};s.r(o),s.d(o,{blockifyConfig:()=>G,getDescription:()=>$,getSkeleton:()=>W});var r=s(74997),c=s(36352),n=s(94715),i=s(56427),a=s(27723),l=s(93450),d=s(74175),u=s(47143),m=s(86087),p=s(692),h=s(3582),g=s(29283);s(72801),s(25101);const w="single-product",_="product-catalog",b="product-taxonomy",x="product-search-results",f="order-confirmation",y="archive-product",v={"single-product":{type:w,title:(0,a.__)("Product (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product page.","woocommerce"),placeholder:"single-product"},"archive-product":{type:_,title:(0,a.__)("Product Grid (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product grid page. ","woocommerce"),placeholder:y},"taxonomy-product_cat":{type:b,title:(0,a.__)("Product Category (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product category page.","woocommerce"),placeholder:y},"taxonomy-product_tag":{type:b,title:(0,a.__)("Product Tag (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product tag page.","woocommerce"),placeholder:y},"taxonomy-product_attribute":{type:b,title:(0,a.__)("Product Attribute (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product attribute page.","woocommerce"),placeholder:y},"taxonomy-product":{type:b,title:(0,a.__)("Product's Custom Taxonomy (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product's custom taxonomy page.","woocommerce"),placeholder:y},"product-search-results":{type:x,title:(0,a.__)("Product Search Results (Classic)","woocommerce"),description:(0,a.__)("Displays the PHP product search results.","woocommerce"),placeholder:y},"checkout-header":{type:"checkout-header",title:(0,a.__)("Checkout Header","woocommerce"),placeholder:"checkout-header"},"order-confirmation":{type:f,title:(0,a.__)("Order Confirmation Block","woocommerce"),placeholder:"fallback"}},k=(e,t)=>{const o="core/query-title",s=((0,r.getBlockType)(o)?.variations||[]).find(({name:t})=>t===e);if(!s)return null;const{attributes:c}=s,n={...c,...t,showPrefix:!1};return(0,r.createBlock)(o,n)},j=(e,t)=>{const o="core/group",s=((0,r.getBlockType)(o)?.variations||[]).find(({name:e})=>"group-row"===e);if(!s)return null;const{attributes:c}=s,n={...c,...t,layout:{...c.layout,justifyContent:"space-between"}};return(0,r.createBlock)(o,n,e)};var C=s(59826);const S=e=>(0,r.createBlock)("woocommerce/product-collection",{...C.g2,...e,query:{...C.Xl,inherit:!0}},(0,r.createBlocksFromInnerBlocksTemplate)(C.B8)),A=(e,t=!1)=>[(0,r.createBlock)("woocommerce/breadcrumbs",e),k("archive-title",e),t?(0,r.createBlock)("core/term-description",e):null,(0,r.createBlock)("woocommerce/store-notices",e),j([(0,r.createBlock)("woocommerce/product-results-count"),(0,r.createBlock)("woocommerce/catalog-sorting")],e),S(e)].filter(Boolean),N=e=>(0,a.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */ (0,a.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e),P=()=>(0,a.__)("Transform into blocks","woocommerce"),B={getDescription:N,blockifyConfig:{getButtonLabel:P,onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,A(t));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:A}},I={getDescription:N,blockifyConfig:{getButtonLabel:P,onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,A(t,!0));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:e=>A(e,!0)}};var T=s(15703),E=s(86172);const R=()=>[(0,r.createBlock)("woocommerce/breadcrumbs"),(0,r.createBlock)("woocommerce/store-notices"),(0,r.createBlock)("core/columns",{align:"wide"},[(0,r.createBlock)("core/column",{type:"constrained",justifyContent:"right",width:"512px"},[(0,r.createBlock)("woocommerce/product-gallery")]),(0,r.createBlock)("core/column",{},[(0,r.createBlock)("core/post-title",{__woocommerceNamespace:E.Q,level:1}),(0,r.createBlock)("woocommerce/product-rating"),(0,r.createBlock)("woocommerce/product-price",{fontSize:"large"}),(0,r.createBlock)("woocommerce/product-summary",{isDescendentOfSingleProductTemplate:!0}),(0,r.createBlock)((0,T.getSetting)("isBlockTheme",!1)?"woocommerce/add-to-cart-with-options":"woocommerce/add-to-cart-form"),(0,r.createBlock)("woocommerce/product-meta")])]),(0,r.createBlock)("woocommerce/product-details",{align:"wide",className:"is-style-minimal"}),(0,r.createBlock)("core/heading",{align:"wide",level:2,content:(0,a.__)("Related Products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}),(0,r.createBlock)("woocommerce/product-collection",{...C.g2,query:{...C.Xl,perPage:5,pages:1,woocommerceStockStatus:["instock","onbackorder"],filterable:!1},displayLayout:{type:"flex",columns:5,shrinkColumns:!0},collection:"woocommerce/product-collection/related",hideControls:["inherit"],align:"wide"},(0,r.createBlocksFromInnerBlocksTemplate)([C.nx]))].filter(Boolean),D=e=>(0,a.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */ (0,a.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e),L={getButtonLabel:()=>(0,a.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,getBlocks:t,replaceBlock:o,selectBlock:r})=>{o(e,R());const s=t().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/breadcrumbs"===e.name));s&&r(s.clientId)},getBlockifiedTemplate:R},O=e=>{const t=((e,t)=>{const o=[(0,r.createBlock)("core/paragraph",{content:(0,a.__)("No products were found matching your selection.","woocommerce")}),(0,r.createBlock)("core/search",{buttonPosition:"button-outside",buttonText:(0,a.__)("Search","woocommerce"),buttonUseIcon:!1,showLabel:!1,placeholder:(0,a.__)("Search products…","woocommerce"),query:{post_type:"product"}})],s="woocommerce/product-collection-no-results",c=e.findIndex(e=>e[0]===s),n={...e[c][1]||{},...t},i=[s,n,o];return[...e.slice(0,c),i,...e.slice(c+1)]})(C.B8,e);return(0,r.createBlock)("woocommerce/product-collection",{...C.g2,...e,query:{...C.Xl,inherit:!0}},(0,r.createBlocksFromInnerBlocksTemplate)(t))},M=e=>[k("search-title",e),(0,r.createBlock)("woocommerce/store-notices",e),j([(0,r.createBlock)("woocommerce/product-results-count"),(0,r.createBlock)("woocommerce/catalog-sorting")],e),O(e)].filter(Boolean),V=e=>(0,a.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */ (0,a.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e),F={getButtonLabel:()=>(0,a.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,M(t));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:M};var H=s(10790);const z=e=>[(0,r.createBlock)("woocommerce/order-confirmation-status",{...e,fontSize:"large"}),(0,r.createBlock)("woocommerce/order-confirmation-summary",e),(0,r.createBlock)("woocommerce/order-confirmation-totals-wrapper",e),(0,r.createBlock)("woocommerce/order-confirmation-downloads-wrapper",e),(0,r.createBlock)("core/columns",{...e,className:"wc-block-order-confirmation-address-wrapper"},[(0,r.createBlock)("core/column",e,[(0,r.createBlock)("woocommerce/order-confirmation-shipping-wrapper",e)]),(0,r.createBlock)("core/column",e,[(0,r.createBlock)("woocommerce/order-confirmation-billing-wrapper",e)])]),(0,r.createBlock)("woocommerce/order-confirmation-additional-fields-wrapper",e),(0,r.createBlock)("woocommerce/order-confirmation-additional-information",e)].filter(Boolean),$=()=>(0,a.__)("This block represents the classic template used to display the order confirmation. The actual rendered template may appear different from this placeholder.","woocommerce"),W=()=>(0,H.jsx)("div",{className:"woocommerce-page",children:(0,H.jsxs)("div",{className:"woocommerce-order",children:[(0,H.jsx)("h1",{children:(0,a.__)("Order received","woocommerce")}),(0,H.jsx)("p",{className:"woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-confirmation",children:(0,a.__)("Thank you. Your order has been received.","woocommerce")}),(0,H.jsxs)("ul",{className:"woocommerce-order-overview woocommerce-thankyou-order-details order_details",children:[(0,H.jsxs)("li",{className:"woocommerce-order-overview__order order",children:[(0,a.__)("Order number","woocommerce"),":"," ",(0,H.jsx)("strong",{children:"123"})]}),(0,H.jsxs)("li",{className:"woocommerce-order-overview__date date",children:[(0,a.__)("Date","woocommerce"),":"," ",(0,H.jsx)("strong",{children:"May 25, 2023"})]}),(0,H.jsxs)("li",{className:"woocommerce-order-overview__email email",children:[(0,a.__)("Email","woocommerce"),":"," ",(0,H.jsx)("strong",{children:"shopper@woocommerce.com"})]}),(0,H.jsxs)("li",{className:"woocommerce-order-overview__total total",children:[(0,a.__)("Total","woocommerce"),":"," ",(0,H.jsx)("strong",{children:"$20.00"})]})]}),(0,H.jsxs)("section",{className:"woocommerce-order-details",children:[(0,H.jsx)("h2",{className:"woocommerce-order-details__title",children:(0,a.__)("Order details","woocommerce")}),(0,H.jsxs)("table",{className:"woocommerce-table woocommerce-table--order-details shop_table order_details",children:[(0,H.jsx)("thead",{children:(0,H.jsxs)("tr",{children:[(0,H.jsx)("th",{className:"woocommerce-table__product-name product-name",children:(0,a.__)("Product","woocommerce")}),(0,H.jsx)("th",{className:"woocommerce-table__product-table product-total",children:(0,a.__)("Total","woocommerce")})]})}),(0,H.jsx)("tbody",{children:(0,H.jsxs)("tr",{className:"woocommerce-table__line-item order_item",children:[(0,H.jsxs)("td",{className:"woocommerce-table__product-name product-name",children:["Sample Product"," ",(0,H.jsx)("strong",{className:"product-quantity",children:"× 2"})," "]}),(0,H.jsx)("td",{className:"woocommerce-table__product-total product-total",children:"$20.00"})]})}),(0,H.jsxs)("tfoot",{children:[(0,H.jsxs)("tr",{children:[(0,H.jsxs)("th",{scope:"row",children:[(0,a.__)("Subtotal","woocommerce"),":"]}),(0,H.jsx)("td",{children:"$20.00"})]}),(0,H.jsxs)("tr",{children:[(0,H.jsxs)("th",{scope:"row",children:[(0,a.__)("Total","woocommerce"),":"]}),(0,H.jsx)("td",{children:"$20.00"})]})]})]})]}),(0,H.jsx)("section",{className:"woocommerce-customer-details",children:(0,H.jsxs)("section",{className:"woocommerce-columns woocommerce-columns--2 woocommerce-columns--addresses col2-set addresses",children:[(0,H.jsxs)("div",{className:"woocommerce-column woocommerce-column--1 woocommerce-column--billing-address col-1",children:[(0,H.jsx)("h2",{className:"woocommerce-column__title",children:(0,a.__)("Billing address","woocommerce")}),(0,H.jsxs)("address",{children:["123 Main St",(0,H.jsx)("br",{}),"New York, NY 10001",(0,H.jsx)("br",{}),"United States (US)"]})]}),(0,H.jsxs)("div",{className:"woocommerce-column woocommerce-column--2 woocommerce-column--shipping-address col-2",children:[(0,H.jsx)("h2",{className:"woocommerce-column__title",children:(0,a.__)("Shipping address","woocommerce")}),(0,H.jsxs)("address",{children:["123 Main St",(0,H.jsx)("br",{}),"New York, NY 10001",(0,H.jsx)("br",{}),"United States (US)"]})]})]})})]})}),G={getButtonLabel:()=>(0,a.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,z(t));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:z},q={[_]:B,[b]:I,[w]:e,[x]:t,[f]:o,fallback:{getBlockifiedTemplate:()=>[],getDescription:()=>"",onClickCallback:()=>{}}},U=({blockifyConfig:e,clientId:t,attributes:o})=>{const{getButtonLabel:s,onClickCallback:c,getBlockifiedTemplate:l}=e,[d,h]=(0,m.useState)(!1),{replaceBlock:g,selectBlock:w,replaceBlocks:_}=(0,u.useDispatch)(n.store),{getBlocks:b}=(0,u.useSelect)(e=>({getBlocks:e(n.store).getBlocks}),[]),{createInfoNotice:x}=(0,u.useDispatch)(p.store);return(0,H.jsx)("div",{className:"wp-block-woocommerce-classic-template__placeholder-migration-button-container",children:(0,H.jsx)(i.Button,{variant:"primary",onClick:()=>{c({clientId:t,getBlocks:b,attributes:o,replaceBlock:g,selectBlock:w}),x((0,a.__)("Template transformed into blocks!","woocommerce"),{actions:[{label:(0,a.__)("Undo","woocommerce"),onClick:()=>{const e=(e=>e.reduce((e,t)=>"core/template-part"===t.name?e:[...e,t.clientId],[]))(b());_(e,(0,r.createBlock)("core/group",{layout:{inherit:!0,type:"constrained"}},[(0,r.createBlock)("woocommerce/legacy-template",{template:o.template})]))}}],type:"snackbar"})},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),text:s?s():"",children:d&&(0,H.jsx)(i.Popover,{resize:!1,placement:"right-end",children:(0,H.jsx)("div",{style:{minWidth:"250px",width:"250px",maxWidth:"250px",minHeight:"300px",height:"300px",maxHeight:"300px",cursor:"pointer"},children:(0,H.jsx)(n.BlockPreview,{blocks:l({...o,isPreview:!0}),viewportWidth:1200,additionalStyles:[{css:"body { padding: 20px !important; height: fit-content !important; overflow:hidden}"}]})})})})})},Y=({clientId:e,attributes:t,setAttributes:o})=>{const r=(0,n.useBlockProps)(),{__unstableMarkNextChangeAsNotPersistent:s}=(0,u.useDispatch)(n.store),{currentPostId:l}=(0,u.useSelect)(e=>({currentPostId:e(g.Y)?.getCurrentPostId?.()??0}),[]),d=(0,h.useEntityRecord)("postType","wp_template",l),p=d.record?.slug,w=function(e,t){if(!e)return null;const o=Object.keys(t);let r=null;for(let s=0;o.length>s;s++){const c=t[e.substr(0,o[s].length)];if(c){r=c;break}}return r}(p,v),_=d.record?.title.rendered?.toLowerCase()??t.template,b=w?.placeholder??"fallback",x=w?.type??"fallback";(0,m.useEffect)(()=>{const e=p??t.template,r=t.align??"wide";e===t.template&&r===t.align||(s(),o({template:e,align:r}))},[t.align,t.template,o,p,s]);const{getDescription:f,getSkeleton:y,blockifyConfig:k}=q[x],j=y?y():(0,H.jsx)("img",{className:"wp-block-woocommerce-classic-template__placeholder-image",src:`${c.sW}template-placeholders/${b}.svg`,alt:_}),C=!!w?.type,S=f(_);return(0,H.jsx)("div",{...r,children:(0,H.jsxs)(i.Placeholder,{className:"wp-block-woocommerce-classic-template__placeholder",children:[(0,H.jsx)("div",{className:"wp-block-woocommerce-classic-template__placeholder-wireframe",children:j}),(0,H.jsxs)("div",{className:"wp-block-woocommerce-classic-template__placeholder-copy",children:[(0,H.jsxs)("div",{className:"wp-block-woocommerce-classic-template__placeholder-copy__icon-container",children:[(0,H.jsx)("h1",{children:(0,a.__)("WooCommerce","woocommerce")}),(0,H.jsx)("span",{children:(0,a.__)("Classic Template Placeholder","woocommerce")})]}),C&&(0,H.jsx)("p",{dangerouslySetInnerHTML:{__html:S}}),(0,H.jsx)("p",{children:(0,a.__)("You cannot edit the content of this block. However, you can move it and place other blocks around it.","woocommerce")}),C&&k&&(0,H.jsx)(U,{clientId:e,blockifyConfig:k,attributes:t})]})]})})};(0,r.registerBlockType)("woocommerce/legacy-template",{title:(0,a.__)("WooCommerce Classic Template","woocommerce"),icon:(0,H.jsx)(l.A,{icon:d.A,className:"wc-block-editor-components-block-icon"}),category:"woocommerce",apiVersion:3,keywords:[(0,a.__)("WooCommerce","woocommerce")],description:(0,a.__)("Renders classic WooCommerce PHP template.","woocommerce"),supports:{interactivity:{clientNavigation:!1},align:["wide","full"],html:!1,multiple:!1,reusable:!1,inserter:!1},attributes:{template:{type:"string",default:"any"},align:{type:"string",default:"wide"}},edit:({attributes:e,clientId:t,setAttributes:o})=>(0,H.jsx)(Y,{attributes:e,setAttributes:o,clientId:t}),save:()=>null})})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{blockifyConfig:()=>k,getDescription:()=>v,getTitle:()=>y});var t={};s.r(t),s.d(t,{blockifyConfig:()=>A,getDescription:()=>S,getTitle:()=>C});var o=s(74997),r=s(94715),c=s(56427),n=s(27723),i=s(93450),a=s(10790),l=s(5573),d=(0,a.jsx)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(l.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})}),u=s(47143),m=s(86087),p=s(692),h=s(34892);s(33640),s(9754);const g=()=>(0,a.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 892 516",children:(0,a.jsxs)(l.G,{fill:"currentColor",transform:"translate(-1)",children:[(0,a.jsx)(l.Rect,{width:"100",height:"20",x:"1",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"20",x:"421",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"20",x:"793",rx:"2"}),(0,a.jsx)(l.Rect,{width:"150",height:"24",x:"125",y:"48",rx:"2"}),(0,a.jsx)(l.Rect,{width:"50",height:"24",x:"125",y:"86",rx:"2"}),(0,a.jsx)(l.Rect,{width:"50",height:"24",x:"457",y:"48",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"100",x:"15",y:"48",rx:"2"}),(0,a.jsx)(l.Rect,{width:"150",height:"150",x:"1",y:"318",rx:"2"}),(0,a.jsx)(l.Rect,{width:"150",height:"150",x:"373",y:"318",rx:"2"}),(0,a.jsx)(l.Rect,{width:"150",height:"150",x:"187",y:"318",rx:"2"}),(0,a.jsx)(l.Rect,{width:"150",height:"24",x:"125",y:"178",rx:"2"}),(0,a.jsx)(l.Rect,{width:"50",height:"24",x:"125",y:"216",rx:"2"}),(0,a.jsx)(l.Rect,{width:"50",height:"24",x:"457",y:"178",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"100",x:"15",y:"178",rx:"2"}),(0,a.jsx)(l.Rect,{width:"304",height:"359",x:"588",y:"34",rx:"2"}),(0,a.jsx)(l.Rect,{width:"520",height:"1",x:"1",y:"34",rx:".5"}),(0,a.jsx)(l.Rect,{width:"520",height:"1",y:"162",rx:".5"}),(0,a.jsx)(l.Rect,{width:"520",height:"1",x:"1",y:"292",rx:".5"}),(0,a.jsx)(l.Rect,{width:"304",height:"64",x:"589",y:"407",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"38",x:"26",y:"478",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"38",x:"212",y:"478",rx:"2"}),(0,a.jsx)(l.Rect,{width:"100",height:"38",x:"398",y:"478",rx:"2"})]})}),w=()=>(0,a.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 892 726",children:(0,a.jsxs)(l.G,{fill:"currentColor",transform:"translate(-1)",children:[(0,a.jsx)(l.Rect,{width:"203",height:"38",x:"1",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",x:"1",y:"62",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",y:"124",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",x:"1",y:"186",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",x:"2",y:"248",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",x:"3",y:"310",rx:"2"}),(0,a.jsx)(l.Rect,{width:"434",height:"38",x:"3",y:"372",rx:"2"}),(0,a.jsx)(l.Rect,{width:"892",height:"204",x:"2",y:"434",rx:"2"}),(0,a.jsx)(l.Rect,{width:"203",height:"38",x:"231",rx:"2"}),(0,a.jsx)(l.Rect,{width:"203",height:"38",x:"514",rx:"2"}),(0,a.jsx)(l.Rect,{width:"427",height:"100",x:"466",y:"62",rx:"2"}),(0,a.jsx)(l.Rect,{width:"304",height:"64",x:"588",y:"662",rx:"2"}),(0,a.jsx)(l.Rect,{width:"38",height:"38",x:"466",rx:"2"}),(0,a.jsx)(l.Rect,{width:"203",height:"38",x:"48",y:"662",rx:"2"}),(0,a.jsx)(l.Rect,{width:"38",height:"38",y:"662",rx:"2"})]})}),_="cart",b="checkout",x={cart:{type:_,title:(0,n.__)("Cart Shortcode","woocommerce"),description:(0,n.__)("Renders the classic cart shortcode.","woocommerce"),placeholder:"cart"},checkout:{type:b,title:(0,n.__)("Checkout Cart","woocommerce"),description:(0,n.__)("Renders the classic checkout shortcode.","woocommerce"),placeholder:"checkout"}},f=e=>[(0,o.createBlock)("woocommerce/checkout",{...e,className:"wc-block-checkout"})].filter(Boolean),y=()=>(0,n.__)("Classic Checkout","woocommerce"),v=()=>(0,n.__)("This block will render the classic checkout shortcode. You can optionally transform it into blocks for more control over the checkout experience.","woocommerce"),k={getButtonLabel:()=>(0,n.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,f(t));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:f},j=e=>[(0,o.createBlock)("woocommerce/cart",{...e,className:"wc-block-cart"})].filter(Boolean),C=()=>(0,n.__)("Classic Cart","woocommerce"),S=()=>(0,n.__)("This block will render the classic cart shortcode. You can optionally transform it into blocks for more control over the cart experience.","woocommerce"),A={getButtonLabel:()=>(0,n.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,attributes:t,getBlocks:o,replaceBlock:r,selectBlock:s})=>{r(e,j(t));const c=o().find(e=>"core/group"===e.name&&e.innerBlocks.some(e=>"woocommerce/store-notices"===e.name));c&&s(c.clientId)},getBlockifiedTemplate:j},N=JSON.parse('{"name":"woocommerce/classic-shortcode","title":"Classic Shortcode","description":"Renders classic WooCommerce shortcodes.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"align":true,"html":false,"multiple":false,"reusable":false,"inserter":true},"attributes":{"shortcode":{"type":"string","default":"cart","enum":["cart","checkout"]},"align":{"type":"string","default":"wide"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),P={[_]:t,[b]:e,fallback:{getBlockifiedTemplate:()=>[],getDescription:()=>"",onClickCallback:()=>{}}},B=({blockifyConfig:e,clientId:t,attributes:s})=>{const{getButtonLabel:i,onClickCallback:l,getBlockifiedTemplate:d}=e,[g,w]=(0,m.useState)(!1),{replaceBlock:_,selectBlock:b}=(0,u.useDispatch)(r.store),{createInfoNotice:x}=(0,u.useDispatch)(p.store),{getBlocks:f}=(0,u.useSelect)(e=>({getBlocks:e(r.store).getBlocks}),[]);return(0,a.jsxs)(c.TabbableContainer,{className:"wp-block-woocommerce-classic-shortcode__placeholder-migration-button-container",children:[(0,a.jsx)(c.Button,{variant:"primary",onClick:()=>{l({clientId:t,getBlocks:f,attributes:s,replaceBlock:_,selectBlock:b}),x((0,n.__)("Classic shortcode transformed to blocks.","woocommerce"),{actions:[{label:(0,n.__)("Undo","woocommerce"),onClick:()=>{const e=["woocommerce/cart","woocommerce/checkout"],t=(0,h.P)({blocks:f(),findCondition:t=>e.includes(t.name)});t&&_(t.clientId,(0,o.createBlock)("woocommerce/classic-shortcode",{shortcode:s.shortcode}))}}],type:"snackbar"})},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),text:i?i():"",tabIndex:0,children:g&&(0,a.jsx)(c.Popover,{resize:!1,placement:"right-end",children:(0,a.jsx)("div",{style:{minWidth:"250px",width:"250px",maxWidth:"250px",minHeight:"300px",height:"300px",maxHeight:"300px",cursor:"pointer"},children:(0,a.jsx)(r.BlockPreview,{blocks:d({...s,isPreview:!0}),viewportWidth:1200,additionalStyles:[{css:"body { padding: 20px !important; height: fit-content !important; overflow:hidden}"}]})})})}),(0,a.jsx)(c.Button,{variant:"secondary",href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/",target:"_blank",tabIndex:0,children:(0,n.__)("Learn more","woocommerce")})]})},I=({clientId:e,attributes:t})=>{const o=(0,r.useBlockProps)(),s=function(e,t){const o=Object.keys(t);let r=null;for(let s=0;o.length>s;s++){const c=t[e.substr(0,o[s].length)];if(c){r=c;break}}return r}(t.shortcode,x),i=t.shortcode,l=s?.placeholder??"cart",d=s?.type??"fallback",{getDescription:u,getTitle:p,blockifyConfig:h}=P[d],_=!!s?.type,b=p?p():(0,n.__)("Classic Shortcode Placeholder","woocommerce"),f=u(i),y=(0,m.createInterpolateElement)((0,n.__)("You can learn more about the benefits of switching to blocks, compatibility with extensions, and how to switch back to shortcodes <a>in our documentation</a>.","woocommerce"),{a:(0,a.jsx)(c.ExternalLink,{href:"https://woocommerce.com/document/woocommerce-store-editing/customizing-cart-and-checkout/"})});return(0,a.jsx)("div",{...o,children:(0,a.jsxs)(c.Placeholder,{className:"wp-block-woocommerce-classic-shortcode__placeholder",children:[(0,a.jsx)("div",{className:"wp-block-woocommerce-classic-shortcode__placeholder-wireframe",children:"cart"===l?(0,a.jsx)(g,{}):(0,a.jsx)(w,{})}),(0,a.jsxs)("div",{className:"wp-block-woocommerce-classic-shortcode__placeholder-copy",children:[(0,a.jsxs)("div",{className:"wp-block-woocommerce-classic-shortcode__placeholder-copy__icon-container",children:[(0,a.jsx)("h1",{children:(0,n.__)("WooCommerce","woocommerce")}),(0,a.jsx)("span",{children:b})]}),_&&(0,a.jsx)("p",{children:f}),(0,a.jsx)("p",{children:y}),_&&h&&(0,a.jsx)(B,{clientId:e,blockifyConfig:h,attributes:t})]})]})})},T={icon:(0,a.jsx)(i.A,{icon:d,className:"wc-block-editor-components-block-icon"}),edit:({attributes:e,clientId:t,setAttributes:o})=>(0,a.jsx)(I,{attributes:e,setAttributes:o,clientId:t}),save:()=>null,variations:[{name:"checkout",title:(0,n.__)("Classic Checkout","woocommerce"),attributes:{shortcode:"checkout"},isActive:(e,t)=>e.shortcode===t.shortcode,scope:["inserter"]},{name:"cart",title:(0,n.__)("Classic Cart","woocommerce"),attributes:{shortcode:"cart"},isActive:(e,t)=>e.shortcode===t.shortcode,scope:["inserter"],isDefault:!0}],apiVersion:3};(0,o.registerBlockType)(N,T)})(),(()=>{"use strict";var e=s(74997),t=s(27723),o=s(94715),r=s(83243),c=s(36352),n=s(86087);const i=JSON.parse('{"name":"woocommerce/page-content-wrapper","title":"WooCommerce Page","description":"Displays WooCommerce page content.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","supports":{"html":false,"multiple":false,"inserter":false},"attributes":{"page":{"type":"string","default":""}},"providesContext":{"postId":"postId","postType":"postType"},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');s(91089);var a=s(10790);(0,e.registerBlockType)(i,{icon:{src:r.A},edit:({attributes:e,setAttributes:t})=>{const r=(0,o.useBlockProps)({className:"wp-block-woocommerce-page-content-wrapper"});return(0,n.useEffect)(()=>{if(!e.postId&&e.page){let o=0;"checkout"===e.page&&(o=c.p1),"cart"===e.page&&(o=c.f9),o&&t({postId:o,postType:"page"})}},[e,t]),(0,a.jsx)("div",{...r,children:(0,a.jsx)(o.InnerBlocks,{template:[["core/post-title",{align:"wide",level:1}],["core/post-content",{align:"wide"}]]})})},save:()=>(0,a.jsx)(o.InnerBlocks.Content,{}),variations:[{name:"checkout-page",title:(0,t.__)("Checkout Page","woocommerce"),attributes:{page:"checkout"},isActive:(e,t)=>e.page===t.page},{name:"cart-page",title:(0,t.__)("Cart Page","woocommerce"),attributes:{page:"cart"},isActive:(e,t)=>e.page===t.page}]})})(),(()=>{"use strict";var e=s(74997),t=s(56427);const o=JSON.parse('{"name":"woocommerce/payment-method-icons","version":"1.0.0","title":"Payment Method Icons","description":"Display icons for available payment methods.","category":"woocommerce","keywords":["woocommerce","payments","payment methods"],"textdomain":"woocommerce","attributes":{"numberOfIcons":{"type":"number","default":0}},"supports":{"spacing":{"margin":true,"padding":true}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var r=s(10790);const c=(0,r.jsxs)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{fill:"none",d:"M0 0h24v24H0z"}),(0,r.jsx)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})]});var n=s(27723),i=s(94715);const a=({type:e,icon:t})=>{let o=null;return e&&t&&(o=(0,r.jsx)("div",{className:"wc-block-payment-method-icons__item",children:(0,r.jsx)("span",{className:"wc-block-payment-method-icons__icon",style:{backgroundImage:`url(${t})`},role:"img","aria-label":e})})),o};s(15151),(0,e.registerBlockType)(o,{icon:{src:(0,r.jsx)(t.Icon,{icon:c})},edit:({attributes:e,setAttributes:o})=>{const s=(0,i.useBlockProps)(),c=window.wcSettings?.availablePaymentMethods||{},{numberOfIcons:l}=e;if(c&&Object.keys(c).length>0){const e=Object.keys(c).reduce((e,t)=>c[t]&&c[t].icon?(e.push({type:t,icon:c[t].icon}),e):e,[]),d=0===l?e.length:Math.min(l,e.length);return(0,r.jsxs)("div",{...s,children:[(0,r.jsx)(i.InspectorControls,{children:(0,r.jsx)(t.PanelBody,{title:(0,n.__)("Payment Method Icon Settings","woocommerce"),children:(0,r.jsx)(t.RangeControl,{label:(0,n.__)("Number of icons","woocommerce"),value:l,onChange:e=>o({numberOfIcons:e||0}),min:0,max:e.length,help:(0,n.__)("Choose how many icons to display. To show all icons, use 0 (zero).","woocommerce")})})}),(0,r.jsx)("div",{className:"wc-block-payment-method-icons",children:e.slice(0,d).map(e=>(0,r.jsx)(a,{type:e?.type,icon:e?.icon},e?.type))})]})}return(0,r.jsx)("div",{...s,children:(0,n.__)("No active payment methods found.","woocommerce")})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(4921),o=s(93450),r=s(84718),c=s(94715),n=s(27723),i=s(15703),a=s(36352),l=s(61909),d=s(43907),u=s(56427),m=s(13817),p=s(76748),h=s(88199),g=s(86087),w=s(14656),_=s(73993),b=s(64347);s(86599);const x=(e,t,o,r=1,s=!1)=>{let[c,n]=e;const i=e=>Number.isFinite(e);return i(c)||(c=t||0),i(n)||(n=o||r),i(t)&&t>c&&(c=t),i(o)&&o<=c&&(c=o-r),i(t)&&t>=n&&(n=t+r),i(o)&&o<n&&(n=o),!s&&c>=n&&(c=n-r),s&&n<=c&&(n=c+r),[c,n]};var f=s(60427);const y=({maxConstraint:e,minorUnit:t})=>({floatValue:o})=>void 0!==o&&o<=e/10**t&&o>0,v=({minConstraint:e,currentMaxValue:t,minorUnit:o})=>({floatValue:r})=>void 0!==r&&r>=e/10**o&&r<t/10**o;var k=s(30612),j=s(10790);const C=({minPrice:e,maxPrice:o,minConstraint:r,maxConstraint:s,onChange:c,step:i,currency:a,showInputFields:l=!0,showFilterButton:d=!1,inlineInput:u=!0,isLoading:m=!1,isUpdating:p=!1,isEditor:h=!1,onSubmit:C=()=>{}})=>{const S=(0,g.useRef)(null),A=(0,g.useRef)(null),N=i||10**a.minorUnit,[P,B]=(0,g.useState)(e),[I,T]=(0,g.useState)(o),E=(0,g.useRef)(null),[R,D]=(0,g.useState)(0);(0,g.useEffect)(()=>{B(e)},[e]),(0,g.useEffect)(()=>{T(o)},[o]),(0,g.useLayoutEffect)(()=>{u&&E.current&&D(E.current?.offsetWidth)},[u,D]);const L=(0,g.useMemo)(()=>isFinite(r)&&isFinite(s),[r,s]),O=(0,g.useMemo)(()=>isFinite(e)&&isFinite(o)&&L?{"--low":(e-r)/(s-r)*100+"%","--high":(o-r)/(s-r)*100+"%"}:{"--low":"0%","--high":"100%"},[e,o,r,s,L]),M=(0,g.useCallback)(e=>{if(m||!L||!S.current||!A.current)return;const t=e.target.getBoundingClientRect(),o=e.clientX-t.left,r=S.current.offsetWidth,c=+S.current.value,n=A.current.offsetWidth,i=+A.current.value,a=r*(c/s),l=n*(i/s);Math.abs(o-a)>Math.abs(o-l)?(S.current.style.zIndex="20",A.current.style.zIndex="21"):(S.current.style.zIndex="21",A.current.style.zIndex="20")},[m,s,L]),V=(0,g.useCallback)(t=>{const n=t.target.classList.contains("wc-block-price-filter__range-input--min"),i=+t.target.value,a=n?[Math.round(i/N)*N,o]:[e,Math.round(i/N)*N],l=x(a,r,s,N,n);c(l)},[c,e,o,r,s,N]),F=(0,b.YQ)((e,t,o)=>{if(e>=t){const e=x([0,t],null,null,N,o);return c([parseInt(e[0],10),parseInt(e[1],10)])}const r=x([e,t],null,null,N,o);c(r)},1e3),H=(0,b.YQ)(C,600),z=(0,t.A)("wc-block-price-filter","wc-block-components-price-slider",l&&"wc-block-price-filter--has-input-fields",l&&"wc-block-components-price-slider--has-input-fields",d&&"wc-block-price-filter--has-filter-button",d&&"wc-block-components-price-slider--has-filter-button",!L&&"is-disabled",(u||R<=300)&&"wc-block-components-price-slider--is-input-inline"),$=(0,_.isObject)(S.current)?S.current.ownerDocument.activeElement:void 0,W=$&&$===S.current?N:1,G=$&&$===A.current?N:1,q=String(P/10**a.minorUnit),U=String(I/10**a.minorUnit),Y=u&&R>300,Z=(0,j.jsx)("div",{className:(0,t.A)("wc-block-price-filter__range-input-wrapper","wc-block-components-price-slider__range-input-wrapper",{"is-loading":m&&p}),onMouseMove:M,onFocus:M,children:L&&(0,j.jsxs)("div",{"aria-hidden":l,children:[(0,j.jsx)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:O}),(0,j.jsx)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":(0,n.__)("Filter products by minimum price","woocommerce"),"aria-valuetext":q,value:Number.isFinite(e)?e:r,onChange:V,step:W,min:r,max:s,ref:S,disabled:m&&!L,tabIndex:l?-1:0}),(0,j.jsx)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":(0,n.__)("Filter products by maximum price","woocommerce"),"aria-valuetext":U,value:Number.isFinite(o)?o:s,onChange:V,step:G,min:r,max:s,ref:A,disabled:m,tabIndex:l?-1:0})]})}),J=e=>`wc-block-price-filter__amount wc-block-price-filter__amount--${e} wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--${e}`,X={currency:a,decimalScale:0},Q={...X,displayType:"input",allowNegative:!1,disabled:m||!L,onClick:e=>{const t=e.currentTarget;t&&t.select()}};return(0,j.jsxs)("div",{className:z,ref:E,children:[(!Y||!l)&&Z,l&&(0,j.jsxs)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls",children:[p?(0,j.jsx)("div",{className:"input-loading"}):(0,j.jsxs)("div",{className:"wc-block-price-filter__control wc-block-components-price-slider__control",children:[(0,j.jsx)("label",{className:"wc-block-components-price-slider__label",htmlFor:"minPriceInput",children:(0,n.__)("Min. Price","woocommerce")}),(0,j.jsx)(w.FormattedMonetaryAmount,{...Q,id:"minPriceInput",className:J("min"),"aria-label":(0,n.__)("Filter products by minimum price","woocommerce"),isAllowed:v({minConstraint:r,minorUnit:a.minorUnit,currentMaxValue:I}),onValueChange:e=>{e!==P&&(B(e),F(e,I,!0))},value:P})]}),Y&&Z,p?(0,j.jsx)("div",{className:"input-loading"}):(0,j.jsxs)("div",{className:"wc-block-price-filter__control wc-block-components-price-slider__control",children:[(0,j.jsx)("label",{className:"wc-block-components-price-slider__label",htmlFor:"maxPriceInput",children:(0,n.__)("Max. Price","woocommerce")}),(0,j.jsx)(w.FormattedMonetaryAmount,{...Q,id:"maxPriceInput",className:J("max"),"aria-label":(0,n.__)("Filter products by maximum price","woocommerce"),isAllowed:y({maxConstraint:s,minorUnit:a.minorUnit}),onValueChange:e=>{e!==I&&(T(e),F(P,e,!1))},value:I})]})]}),!l&&!p&&Number.isFinite(e)&&Number.isFinite(o)&&(0,j.jsxs)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text",children:[(0,j.jsx)(w.FormattedMonetaryAmount,{...X,value:e}),(0,j.jsx)(w.FormattedMonetaryAmount,{...X,value:o})]}),(0,j.jsxs)("div",{className:"wc-block-components-price-slider__actions",children:[(h||!p&&(e!==r||o!==s))&&(0,j.jsx)(k.A,{onClick:()=>{c([r,s]),H()},screenReaderLabel:(0,n.__)("Reset price filter","woocommerce")}),d&&(0,j.jsx)(f.A,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",isLoading:p,disabled:m||!L,onClick:C,screenReaderLabel:(0,n.__)("Apply price filter","woocommerce")})]})]})};var S=s(58733),A=s(70910),N=s(93832),P=s(37848);const B="ROUND_UP",I="ROUND_DOWN",T=(e,t,o)=>{const r=1*10**t;let s=null;const c=parseFloat(e);isNaN(c)||(o===B?s=Math.ceil(c/r)*r:o===I&&(s=Math.floor(c/r)*r));const n=(0,m.Z)(s,Number.isFinite);return Number.isFinite(s)?s:n};s(83846);var E=s(25238);function R(e,t){return Number(e)*10**t}const D=({attributes:e,isEditor:t=!1})=>{const o=(0,E.LY)(),r=(0,i.getSettingWithCoercion)("hasFilterableProducts",!1,_.isBoolean),s=(0,i.getSettingWithCoercion)("isRenderingPhpTemplate",!1,_.isBoolean),[c,n]=(0,g.useState)(!1),a=(0,P.Vf)("min_price"),l=(0,P.Vf)("max_price"),[d]=(0,p.dJ)(),u=(0,i.getSettingWithCoercion)("queryState",{},_.isObject),{data:w,isLoading:x}=(0,h.A)({queryPrices:!0,queryState:{...u,...d},isEditor:t}),f=(0,A.getCurrencyFromPriceResponse)((0,_.objectHasProp)(w,"price_range")?w.price_range:void 0),[y,v]=(0,p.xd)("min_price"),[k,D]=(0,p.xd)("max_price"),[L,O]=(0,g.useState)(R(a,f.minorUnit)||null),[M,V]=(0,g.useState)(R(l,f.minorUnit)||null),{minConstraint:F,maxConstraint:H}=(({minPrice:e,maxPrice:t,minorUnit:o})=>({minConstraint:T(e||"",o,I),maxConstraint:T(t||"",o,B)}))({minPrice:(0,_.objectHasProp)(w,"price_range")&&(0,_.objectHasProp)(w.price_range,"min_price")&&(0,_.isString)(w.price_range.min_price)?w.price_range.min_price:void 0,maxPrice:(0,_.objectHasProp)(w,"price_range")&&(0,_.objectHasProp)(w.price_range,"max_price")&&(0,_.isString)(w.price_range.max_price)?w.price_range.max_price:void 0,minorUnit:f.minorUnit});(0,g.useEffect)(()=>{c||(v(R(a,f.minorUnit)),D(R(l,f.minorUnit)),n(!0))},[f.minorUnit,c,l,a,D,v]);const[z,$]=(0,g.useState)(x),W=(0,g.useCallback)((e,t)=>{const o=t>=Number(H)?void 0:t,r=e<=Number(F)?void 0:e;if(window){const e=function(e,t){const o={};for(const[e,r]of Object.entries(t))r?o[e]=r.toString():delete o[e];const r=(0,N.removeQueryArgs)(e,...Object.keys(t));return(0,N.addQueryArgs)(r,o)}(window.location.href,{min_price:r/10**f.minorUnit,max_price:o/10**f.minorUnit});window.location.href!==e&&(0,P.CH)(e)}v(r),D(o)},[F,H,v,D,f.minorUnit]),G=(0,b.YQ)(W,500),q=(0,g.useCallback)(t=>{$(!0),t[0]!==L&&O(t[0]),t[1]!==M&&V(t[1]),s&&c&&!e.showFilterButton&&G(t[0],t[1])},[L,M,O,V,s,c,G,e.showFilterButton]);(0,g.useEffect)(()=>{e.showFilterButton||s||G(L,M)},[L,M,e.showFilterButton,G,s]);const U=(0,m.Z)(y),Y=(0,m.Z)(k),Z=(0,m.Z)(F),J=(0,m.Z)(H);if((0,g.useEffect)(()=>{(!Number.isFinite(L)||y!==U&&y!==L||F!==Z&&F!==L)&&O(Number.isFinite(y)?y:F),(!Number.isFinite(M)||k!==Y&&k!==M||H!==J&&H!==M)&&V(Number.isFinite(k)?k:H)},[L,M,y,k,F,H,Z,J,U,Y]),!r)return o(!1),null;if(!x&&(null===F||null===H||F===H))return o(!1),null;const X=`h${e.headingLevel}`;o(!0),!x&&z&&$(!1);const Q=(0,j.jsx)(X,{className:"wc-block-price-filter__title",children:e.heading}),K=x&&z?(0,j.jsx)(S.A,{children:Q}):Q;return(0,j.jsxs)(j.Fragment,{children:[!t&&e.heading&&K,(0,j.jsx)("div",{className:"wc-block-price-slider",children:(0,j.jsx)(C,{minConstraint:F,maxConstraint:H,minPrice:L,maxPrice:M,currency:f,showInputFields:e.showInputFields,inlineInput:e.inlineInput,showFilterButton:e.showFilterButton,onChange:q,onSubmit:()=>W(L,M),isLoading:x,isUpdating:z,isEditor:t})})]})};s(65012);var L=s(68059);const O=JSON.parse('{"name":"woocommerce/price-filter","title":"Filter by Price Controls","description":"Enable customers to filter the product grid by choosing a price range.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"html":false,"multiple":false,"color":{"text":true,"background":false},"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"showInputFields":{"type":"boolean","default":true},"inlineInput":{"type":"boolean","default":false},"showFilterButton":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),M={heading:{type:"string",default:(0,n.__)("Filter by price","woocommerce")}},V=[{attributes:{...O.attributes,...M},save:({attributes:e})=>{const{className:o,showInputFields:r,showFilterButton:s,heading:n,headingLevel:i}=e,a={"data-showinputfields":r,"data-showfilterbutton":s,"data-heading":n,"data-heading-level":i};return(0,j.jsx)("div",{...c.useBlockProps.save({className:(0,t.A)("is-loading",o)}),...a,children:(0,j.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"})})}}];(0,e.registerBlockType)(O,{icon:{src:(0,j.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},attributes:{...O.attributes,...M},edit:function({attributes:e,setAttributes:t,clientId:s}){const{heading:m,headingLevel:p,showInputFields:h,inlineInput:g,showFilterButton:w}=e,_=(0,c.useBlockProps)();return(0,j.jsx)("div",{..._,children:0===a.r7.productCount?(0,j.jsxs)(u.Placeholder,{className:"wc-block-price-slider",icon:(0,j.jsx)(o.A,{icon:r.A}),label:(0,n.__)("Filter by Price","woocommerce"),instructions:(0,n.__)("Display a slider to filter products in your store by price.","woocommerce"),children:[(0,j.jsx)("p",{children:(0,n.__)("To filter your products by price you first need to assign prices to your products.","woocommerce")}),(0,j.jsxs)(u.Button,{className:"wc-block-price-slider__add-product-button",variant:"secondary",href:(0,i.getAdminLink)("post-new.php?post_type=product"),target:"_top",children:[(0,n.__)("Add new product","woocommerce")+" ",(0,j.jsx)(o.A,{icon:d.A})]}),(0,j.jsx)(u.Button,{className:"wc-block-price-slider__read_more_button",variant:"tertiary",href:"https://woocommerce.com/document/managing-products/",target:"_blank",children:(0,n.__)("Learn more","woocommerce")})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(c.InspectorControls,{children:[(0,j.jsx)(u.PanelBody,{children:(0,j.jsx)(L.d,{clientId:s})}),(0,j.jsxs)(u.PanelBody,{title:(0,n.__)("Settings","woocommerce"),children:[(0,j.jsxs)(u.__experimentalToggleGroupControl,{label:(0,n.__)("Price Range Selector","woocommerce"),isBlock:!0,value:h?"editable":"text",onChange:e=>t({showInputFields:"editable"===e}),className:"wc-block-price-filter__price-range-toggle",children:[(0,j.jsx)(u.__experimentalToggleGroupControlOption,{value:"editable",label:(0,n.__)("Editable","woocommerce")}),(0,j.jsx)(u.__experimentalToggleGroupControlOption,{value:"text",label:(0,n.__)("Text","woocommerce")})]}),h&&(0,j.jsx)(u.ToggleControl,{label:(0,n.__)("Inline input fields","woocommerce"),checked:g,onChange:()=>t({inlineInput:!g}),help:(0,n.__)("Show input fields inline with the slider.","woocommerce")}),(0,j.jsx)(u.ToggleControl,{label:(0,n.__)("Show 'Apply filters' button","woocommerce"),help:(0,n.__)("Products will update when the button is clicked.","woocommerce"),checked:w,onChange:()=>t({showFilterButton:!w})})]})]},"inspector"),m&&(0,j.jsx)(l.A,{className:"wc-block-price-filter__title",headingLevel:p,heading:m,onChange:e=>t({heading:e})}),(0,j.jsx)(u.Disabled,{children:(0,j.jsx)(D,{attributes:e,isEditor:!0})})]})})},save({attributes:e}){const{className:o}=e;return(0,j.jsx)("div",{...c.useBlockProps.save({className:(0,t.A)("is-loading",o)}),children:(0,j.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"})})},deprecated:V})})(),(()=>{"use strict";var e=s(93450),t=s(45791),o=s(74997);const r=JSON.parse('{"name":"woocommerce/product-best-sellers","title":"Best Selling Products","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of your all-time best selling products.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"popularity"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(56427),i=s(84871),a=s.n(i),l=s(53829),d=s(27723),u=s(1872),m=s(15703),p=s(10525),h=s(50376),g=s(10790);const w=e=>{const{attributes:t,setAttributes:o}=e,{categories:r,catOperator:s,columns:i,contentVisibility:a,rows:l,alignButtons:w}=t;return(0,g.jsxs)(c.InspectorControls,{children:[(0,g.jsx)(n.PanelBody,{title:(0,d.__)("Layout","woocommerce"),initialOpen:!0,children:(0,g.jsx)(u.A,{columns:i,rows:l,alignButtons:w,setAttributes:o,minColumns:(0,m.getSetting)("minColumns",1),maxColumns:(0,m.getSetting)("maxColumns",6),minRows:(0,m.getSetting)("minRows",1),maxRows:(0,m.getSetting)("maxRows",6)})}),(0,g.jsx)(n.PanelBody,{title:(0,d.__)("Content","woocommerce"),initialOpen:!0,children:(0,g.jsx)(p.A,{settings:a,onChange:e=>o({contentVisibility:e})})}),(0,g.jsx)(n.PanelBody,{title:(0,d.__)("Filter by Product Category","woocommerce"),initialOpen:!1,children:(0,g.jsx)(h.A,{selected:r,onChange:(e=[])=>{const t=e.map(({id:e})=>e);o({categories:t})},operator:s,onOperatorChange:(e="any")=>o({catOperator:e})})})]},"inspector")},_=e=>{const{attributes:t,name:o}=e;return t.isPreview?l.i:(0,g.jsxs)("div",{className:"wc-block-product-best-sellers",children:[(0,g.jsx)(w,{...e}),(0,g.jsx)(n.Disabled,{children:(0,g.jsx)(a(),{block:o,attributes:t})})]})};var b=s(88664);(0,o.registerBlockType)(r,{icon:{src:(0,g.jsx)(e.A,{icon:t.A,className:"wc-block-editor-components-block-icon"})},attributes:{...b.A,...r.attributes},transforms:{from:[{type:"block",blocks:b.K.filter(e=>"woocommerce/product-best-sellers"!==e),transform:e=>(0,o.createBlock)("woocommerce/product-best-sellers",e)}]},edit:e=>{const t=(0,c.useBlockProps)();return(0,g.jsx)("div",{...t,children:(0,g.jsx)(_,{...e})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});s(39312);const n=JSON.parse('{"name":"woocommerce/product-category","title":"Products by Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of products from your selected categories.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var i=s(88664),a=s(94715),l=s(86087),d=s(56427),u=s(27723),m=s(84871),p=s.n(m),h=s(53829);const g=()=>(0,o.jsx)(d.Placeholder,{icon:(0,o.jsx)(t.A,{icon:c}),label:(0,u.__)("Products by Category","woocommerce"),className:"wc-block-products-grid wc-block-products-category",children:(0,u.__)("No products were found that matched your selection.","woocommerce")}),w=e=>{const{name:t,attributes:r}=e,s=r.categories.length;return r.isPreview?h.i:s?(0,o.jsx)(p(),{block:t,attributes:r,EmptyResponsePlaceholder:g}):(0,o.jsx)(o.Fragment,{children:(0,u.__)("Select at least one category to display its products.","woocommerce")})};var _=s(50376),b=s(1872),x=s(15703),f=s(10525),y=s(11474),v=s(84667);const k=e=>{const{isEditing:t,attributes:r,setAttributes:s,setChangedAttributes:c}=e,{columns:n,catOperator:i,contentVisibility:l,orderby:m,rows:p,alignButtons:h,stockStatus:g}=r;return(0,o.jsxs)(a.InspectorControls,{children:[(0,o.jsx)(d.PanelBody,{title:(0,u.__)("Product Category","woocommerce"),initialOpen:!r.categories.length&&!t,children:(0,o.jsx)(_.A,{selected:r.categories,onChange:(e=[])=>{const t={categories:e.map(({id:e})=>e)};s(t),c(t)},operator:i,onOperatorChange:(e="any")=>{const t={catOperator:e};s(t),c(t)},isCompact:!0})}),(0,o.jsx)(d.PanelBody,{title:(0,u.__)("Layout","woocommerce"),initialOpen:!0,children:(0,o.jsx)(b.A,{columns:n,rows:p,alignButtons:h,setAttributes:s,minColumns:(0,x.getSetting)("minColumns",1),maxColumns:(0,x.getSetting)("maxColumns",6),minRows:(0,x.getSetting)("minRows",1),maxRows:(0,x.getSetting)("maxRows",6)})}),(0,o.jsx)(d.PanelBody,{title:(0,u.__)("Content","woocommerce"),initialOpen:!0,children:(0,o.jsx)(f.A,{settings:l,onChange:e=>s({contentVisibility:e})})}),(0,o.jsx)(d.PanelBody,{title:(0,u.__)("Order By","woocommerce"),initialOpen:!1,children:(0,o.jsx)(y.A,{setAttributes:s,value:m})}),(0,o.jsx)(d.PanelBody,{title:(0,u.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,o.jsx)(v.A,{setAttributes:s,value:g})})]},"inspector")},j=e=>{const{debouncedSpeak:r,setIsEditing:s,changedAttributes:n,setChangedAttributes:i,attributes:a}=e,l={...a,...n},m=()=>{s(!1),i({})};return(0,o.jsxs)(d.Placeholder,{icon:(0,o.jsx)(t.A,{icon:c}),label:(0,u.__)("Products by Category","woocommerce"),className:"wc-block-products-grid wc-block-products-category",children:[(0,u.__)("Display a grid of products from your selected categories.","woocommerce"),(0,o.jsxs)("div",{className:"wc-block-products-category__selection",children:[(0,o.jsx)(_.A,{selected:l.categories,onChange:(e=[])=>{const t=e.map(({id:e})=>e);i({categories:t})},operator:l.catOperator,onOperatorChange:(e="any")=>i({catOperator:e})}),(0,o.jsx)(d.Button,{variant:"primary",onClick:()=>{(()=>{const{setAttributes:t}=e;t(n),m()})(),r((0,u.__)("Now displaying a preview of the reviews for the products in the selected categories.","woocommerce"))},children:(0,u.__)("Done","woocommerce")}),(0,o.jsx)(d.Button,{className:"wc-block-products-category__cancel-button",variant:"tertiary",onClick:()=>{m(),r((0,u.__)("Now displaying a preview of the reviews for the products in the selected categories.","woocommerce"))},children:(0,u.__)("Cancel","woocommerce")})]})]})},C=(0,d.withSpokenMessages)(e=>{const t=(0,a.useBlockProps)(),{attributes:r}=e,[s,c]=(0,l.useState)(!r.categories.length),[n,i]=(0,l.useState)({});return(0,o.jsxs)("div",{...t,children:[(0,o.jsx)(a.BlockControls,{children:(0,o.jsx)(d.ToolbarGroup,{controls:[{icon:"edit",title:(0,u.__)("Edit selected categories","woocommerce"),onClick:()=>c(!s),isActive:s}]})}),(0,o.jsx)(k,{isEditing:s,setChangedAttributes:i,...e}),s?(0,o.jsx)(j,{isEditing:s,setIsEditing:c,changedAttributes:n,setChangedAttributes:i,...e}):(0,o.jsx)(d.Disabled,{children:(0,o.jsx)(w,{...e})})]})});(0,e.registerBlockType)(n,{icon:{src:(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},attributes:{...n.attributes,...i.A},transforms:{from:[{type:"block",blocks:i.K.filter(e=>"woocommerce/product-category"!==e),transform:t=>(0,e.createBlock)("woocommerce/product-category",{...t,editMode:!1})}]},edit:C,save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});const n=JSON.parse('{"name":"woocommerce/product-categories","title":"Product Categories List","category":"woocommerce","description":"Show all product categories as a list or dropdown.","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"html":false,"color":{"background":false,"link":true},"typography":{"fontSize":true,"lineHeight":true}},"attributes":{"align":{"type":"string"},"hasCount":{"type":"boolean","default":true},"hasImage":{"type":"boolean","default":false},"hasEmpty":{"type":"boolean","default":false},"isDropdown":{"type":"boolean","default":false},"isHierarchical":{"type":"boolean","default":true},"showChildrenOnly":{"type":"boolean","default":false}},"example":{"attributes":{"hasCount":true,"hasImage":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var i=s(94715),a=s(27723),l=s(84871),d=s.n(l),u=s(15937);var m=s(47143),p=s(56427);const h=()=>(0,o.jsx)(p.Placeholder,{icon:(0,o.jsx)(t.A,{icon:c}),label:(0,a.__)("Product Categories List","woocommerce"),className:"wc-block-product-categories",children:(0,a.__)("This block displays the product categories for your store. To use it you first need to create a product and assign it to a category.","woocommerce")}),g=({attributes:e,setAttributes:t,name:r})=>{const s=(0,m.useSelect)(e=>e("core/edit-widgets"),[]),c=(0,u.I)(),n=(e=>{if(!(e=>null===e)(t=e)&&t instanceof Object&&t.constructor===Object){const t=e.getWidgetAreas();return Array.isArray(t)&&t.length>0}var t;return!1})(s),l=(0,i.useBlockProps)({className:"wc-block-product-categories"});return(0,o.jsxs)("div",{...l,children:[(()=>{const{hasCount:r,hasImage:s,hasEmpty:l,isDropdown:d,isHierarchical:u,showChildrenOnly:m}=e;return(0,o.jsxs)(i.InspectorControls,{children:[(0,o.jsx)(p.PanelBody,{title:(0,a.__)("List Settings","woocommerce"),initialOpen:!0,children:(0,o.jsxs)(p.__experimentalToggleGroupControl,{label:(0,a.__)("Display style","woocommerce"),isBlock:!0,value:d?"dropdown":"list",onChange:e=>t({isDropdown:"dropdown"===e}),children:[(0,o.jsx)(p.__experimentalToggleGroupControlOption,{value:"list",label:(0,a.__)("List","woocommerce")}),(0,o.jsx)(p.__experimentalToggleGroupControlOption,{value:"dropdown",label:(0,a.__)("Dropdown","woocommerce")})]})}),(0,o.jsxs)(p.PanelBody,{title:(0,a.__)("Content","woocommerce"),initialOpen:!0,children:[(0,o.jsx)(p.ToggleControl,{label:(0,a.__)("Show product count","woocommerce"),checked:r,onChange:()=>t({hasCount:!r})}),!d&&(0,o.jsx)(p.ToggleControl,{label:(0,a.__)("Show category images","woocommerce"),help:s?(0,a.__)("Category images are visible.","woocommerce"):(0,a.__)("Category images are hidden.","woocommerce"),checked:s,onChange:()=>t({hasImage:!s})}),(0,o.jsx)(p.ToggleControl,{label:(0,a.__)("Show hierarchy","woocommerce"),checked:u,onChange:()=>t({isHierarchical:!u})}),(0,o.jsx)(p.ToggleControl,{label:(0,a.__)("Show empty categories","woocommerce"),checked:l,onChange:()=>t({hasEmpty:!l})}),(c||n)&&(0,o.jsx)(p.ToggleControl,{label:(0,a.__)("Only show children of current category","woocommerce"),help:(0,a.__)("This will affect product category pages","woocommerce"),checked:m,onChange:()=>t({showChildrenOnly:!m})})]})]},"inspector")})(),(0,o.jsx)(p.Disabled,{children:(0,o.jsx)(d(),{block:r,attributes:e,EmptyResponsePlaceholder:h})})]})};s(31008),s(84738),(0,e.registerBlockType)(n,{icon:{src:(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>"woocommerce_product_categories"===e&&!!t?.raw,transform:({instance:t})=>(0,e.createBlock)("woocommerce/product-categories",{hasCount:!!t.raw.count,hasEmpty:!t.raw.hide_empty,isDropdown:!!t.raw.dropdown,isHierarchical:!!t.raw.hierarchical})}]},deprecated:[{attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},migrate:e=>e,save(e){const{hasCount:t,hasEmpty:r,isDropdown:s,isHierarchical:c}=e,n={};return t&&(n["data-has-count"]=!0),r&&(n["data-has-empty"]=!0),s&&(n["data-is-dropdown"]=!0),c&&(n["data-is-hierarchical"]=!0),(0,o.jsx)("div",{className:"is-loading",...n,children:s?(0,o.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):(0,o.jsxs)("ul",{"aria-hidden":!0,children:[(0,o.jsx)("li",{children:(0,o.jsx)("span",{className:"wc-block-product-categories__placeholder"})}),(0,o.jsx)("li",{children:(0,o.jsx)("span",{className:"wc-block-product-categories__placeholder"})}),(0,o.jsx)("li",{children:(0,o.jsx)("span",{className:"wc-block-product-categories__placeholder"})})]})})}}],edit:function(e){const t=(0,i.useBlockProps)();return(0,o.jsx)("div",{...t,children:(0,o.jsx)(g,{...e})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(48323),o=s(94715),r=s(86087),c=s(47143),n=s(6408),i=s(56427),a=s(39842),l=s(27723),d=s(37757),u=s(29491),m=s(34083),p=s(93450),h=s(10790),g=s(5573),w=(0,h.jsx)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,h.jsx)(g.Path,{fillRule:"evenodd",d:"M11.25 5h1.5v15h-1.5V5zM6 10h1.5v10H6V10zm12 4h-1.5v6H18v-6z",clipRule:"evenodd"})}),_=s(59826),b=s(52619),x=s(3582),f=s(29283),y=s(73993),v=s(58326);const k=(e,t)=>{const{taxQuery:o,...r}=t,s=o&&"object"==typeof o&&!Array.isArray(o);return{...e,...r,...s&&{taxQuery:{...e.taxQuery,...o}}}};function j(e,t){const r=(0,c.select)(o.store).getBlock(e.clientId),s=r?.attributes,n=s?.query||e.attributes.query;e.setAttributes({query:k(n,t)})}const C=()=>{const e=(0,c.select)(f.Y)?.getEditedPostSlug?.();return!!e&&["archive-product","taxonomy-product_attribute","product-search-results","taxonomy-product_cat","taxonomy-product_tag","taxonomy-product_brand"].some(t=>!!(0,y.isString)(e)&&e.includes(t))},S=e=>{const{getBlocksByName:t,getBlock:r}=(0,c.select)(o.store),s=t("woocommerce/product-collection").find(t=>{const o=r(t);return o.attributes?.query?.[e]});return!s};function A(){return!!C()&&S("inherit")}function N(){return!C()&&S("filterable")}const P=()=>_.g2.displayLayout,B=({setState:e,location:t,attributes:o})=>{let r=!1;try{r=!!(0,c.select)("email-editor/editor")}catch{}e(r?{isPreview:!0,previewMessage:(0,l.__)("Sample products shown for preview. Actual products will be based on store inventory.","woocommerce")}:{isPreview:!(t.type!==n.iF.Archive||t.sourceData?.termId||!o?.query?.inherit),previewMessage:(0,l.__)("Actual products will vary depending on the page being viewed.","woocommerce")})},I={name:a.M.BEST_SELLERS,title:(0,l.__)("Best Sellers","woocommerce"),icon:(0,h.jsx)(p.A,{icon:w}),description:(0,l.__)("Recommend your best-selling products.","woocommerce"),keywords:["best selling"],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{orderBy:"popularity",order:"desc",perPage:5,pages:1},hideControls:[a.ug.ORDER,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Best selling products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx],preview:{setPreviewState:B}};var T=s(66683),E=s(44657);const R={name:a.M.FEATURED,title:(0,l.__)("Featured Products","woocommerce"),icon:(0,h.jsx)(p.A,{icon:E.A}),description:(0,l.__)("Showcase your featured products.","woocommerce"),keywords:[],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{featured:!0,perPage:5,pages:1},hideControls:[a.ug.FEATURED,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Featured products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]},D=(0,h.jsxs)(g.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)(g.Path,{d:"M8.85074 4.8213L7.64702 3.92627L5.56365 6.72818L4.44959 5.89735L3.55286 7.0998L5.87107 8.82862L8.85074 4.8213Z",fill:"currentColor"}),(0,h.jsx)(g.Path,{d:"M20 7.75004H11.1111V6.25004H20V7.75004Z",fill:"currentColor"}),(0,h.jsx)(g.Path,{d:"M20 12.75H11.1111V11.25H20V12.75Z",fill:"currentColor"}),(0,h.jsx)(g.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 14C7.10457 14 8 13.1046 8 12C8 10.8955 7.10457 10 6 10C4.89543 10 4 10.8955 4 12C4 13.1046 4.89543 14 6 14ZM6 13C6.55229 13 7 12.5523 7 12C7 11.4478 6.55229 11 6 11C5.44772 11 5 11.4478 5 12C5 12.5523 5.44772 13 6 13Z",fill:"currentColor"}),(0,h.jsx)(g.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 17C8 18.1046 7.10457 19 6 19C4.89543 19 4 18.1046 4 17C4 15.8955 4.89543 15 6 15C7.10457 15 8 15.8955 8 17ZM7 17C7 17.5523 6.55229 18 6 18C5.44772 18 5 17.5523 5 17C5 16.4478 5.44772 16 6 16C6.55229 16 7 16.4478 7 17Z",fill:"currentColor"}),(0,h.jsx)(g.Path,{d:"M11.1111 17.75H20V16.25H11.1111V17.75Z",fill:"currentColor"})]}),L={name:a.M.HAND_PICKED,title:(0,l.__)("Hand-Picked Products","woocommerce"),icon:(0,h.jsx)(p.A,{icon:D}),description:(0,l.__)("Select specific products to recommend to customers.","woocommerce"),keywords:["specific","choose","recommend","handpicked","hand picked"],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{orderBy:"post__in"},hideControls:[a.ug.HAND_PICKED,a.ug.FILTERABLE,a.ug.ORDER]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Recommended products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx,["core/query-pagination",{layout:{type:"flex",justifyContent:"center"}}]]};var O=s(94878);const M={name:a.M.NEW_ARRIVALS,title:(0,l.__)("New Arrivals","woocommerce"),icon:(0,h.jsx)(p.A,{icon:O.A}),description:(0,l.__)("Recommend your newest products.","woocommerce"),keywords:["newest"],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{orderBy:"date",order:"desc",perPage:5,pages:1,timeFrame:{operator:a.M0.IN,value:"-7 days"}},hideControls:[a.ug.ORDER,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("New arrivals","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx],preview:{setPreviewState:B}};var V=s(86083);const F={name:a.M.ON_SALE,title:(0,l.__)("On Sale Products","woocommerce"),icon:(0,h.jsx)(p.A,{icon:V.A}),description:(0,l.__)("Highlight products that are currently on sale.","woocommerce"),keywords:["discount","promotion","onsale"],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{woocommerceOnSale:!0,perPage:5,pages:1},hideControls:[a.ug.ON_SALE,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("On sale products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]};var H=s(30046);const z={name:a.M.PRODUCT_CATALOG,title:(0,l.__)("Product Catalog","woocommerce"),icon:(0,h.jsx)(p.A,{icon:H.A}),description:"Display all products in your catalog. Results can (change to) match the current template, page, or search term.",keywords:["all products"],scope:[],innerBlocks:_.B8},$={name:a.M.RELATED,title:(0,l.__)("Related Products","woocommerce"),icon:(0,h.jsx)(p.A,{icon:H.A}),description:(0,l.__)("Recommend products like this one.","woocommerce"),keywords:[],scope:["inserter","block"],usesReference:["product"],attributes:{displayLayout:{type:a.BX.GRID,columns:4,shrinkColumns:!0},query:{perPage:4,pages:1}},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Related Products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]};var W=s(77092);const G={name:a.M.TOP_RATED,title:(0,l.__)("Top Rated Products","woocommerce"),icon:(0,h.jsx)(p.A,{icon:W.A}),description:(0,l.__)("Recommend products with the highest review ratings.","woocommerce"),keywords:[],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},query:{orderBy:"rating",order:"desc",perPage:5,pages:1},hideControls:[a.ug.ORDER,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Top rated products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]};var q=s(45791);const U={name:a.M.UPSELLS,title:(0,l.__)("Upsells","woocommerce"),icon:(0,h.jsx)(p.A,{icon:q.A}),description:(0,l.__)("Upsells are typically products that are extra profitable or better quality or more expensive. Experiment with combinations to boost sales.","woocommerce"),keywords:["boost","promotion"],scope:["inserter","block"],usesReference:["product","cart","order"],attributes:{..._.g2,displayLayout:{type:"flex",columns:4,shrinkColumns:!0},query:{..._.Xl,perPage:8,pages:1},hideControls:[a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"left",level:2,content:(0,l.__)("You may also like","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]};var Y=s(82024);const Z={name:a.M.BY_CATEGORY,title:(0,l.__)("Products by Category","woocommerce"),icon:(0,h.jsx)(p.A,{icon:Y.A}),description:(0,l.__)("Display products from specific categories.","woocommerce"),scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},hideControls:[a.ug.HAND_PICKED,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Products by Category","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx,_.cw]};var J=s(17230);const X={name:a.M.BY_TAG,title:(0,l.__)("Products by Tag","woocommerce"),icon:(0,h.jsx)(p.A,{icon:J.A}),description:(0,l.__)("Display products with specific tags.","woocommerce"),scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},hideControls:[a.ug.HAND_PICKED,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Products by Tag","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx,_.cw]};var Q=s(41607);const K={name:a.M.BY_BRAND,title:(0,l.__)("Products by Brand","woocommerce"),icon:(0,h.jsx)(p.A,{icon:Q.A}),description:(0,l.__)("Display products from specific brands.","woocommerce"),scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:5,shrinkColumns:!0},hideControls:[a.ug.HAND_PICKED,a.ug.FILTERABLE]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Products by Brand","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx,_.cw]};var ee=s(10628);const te={name:a.M.CART_CONTENTS,title:(0,l.__)("Cart Contents","woocommerce"),icon:(0,h.jsx)(p.A,{icon:ee.A}),description:(0,l.__)("Display products from the customer cart for abandoned cart emails.","woocommerce"),keywords:["cart","email","abandoned"],scope:["inserter","block"],attributes:{displayLayout:{type:"flex",columns:1,shrinkColumns:!0},query:{inherit:!1,perPage:10,pages:1},hideControls:[a.ug.ATTRIBUTES,a.ug.KEYWORD,a.ug.ORDER,a.ug.DEFAULT_ORDER,a.ug.FEATURED,a.ug.ON_SALE,a.ug.STOCK_STATUS,a.ug.HAND_PICKED,a.ug.TAXONOMY,a.ug.FILTERABLE,a.ug.CREATED,a.ug.PRICE_RANGE],queryContextIncludes:["cart"]},innerBlocks:[["core/heading",{textAlign:"center",level:2,content:(0,l.__)("Your Cart","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}],_.nx]},oe=[z,R,M,F,I,G,L,Z,X,K,$,U,T.A],re=[te],se=o=>o?(0,c.select)(e.store).getBlockVariations(t.name).find(({name:e})=>e===o):null,ce=(o,r,s)=>{const c=se(o);c&&s(r,c.name===a.M.PRODUCT_CATALOG?(0,e.createBlock)(t.name,{..._.g2,query:{..._.g2.query,inherit:A(),filterable:N()}},(0,e.createBlocksFromInnerBlocksTemplate)(_.B8)):(0,e.createBlock)(t.name,c.attributes,(0,e.createBlocksFromInnerBlocksTemplate)(c.innerBlocks)))},ne=({title:e,icon:t,description:o,onClick:r})=>(0,h.jsx)(i.Tooltip,{text:o,placement:"top",children:(0,h.jsxs)(i.Button,{className:"wc-blocks-product-collection__collection-button",onClick:r,children:[(0,h.jsx)("div",{className:"wc-blocks-product-collection__collection-button-icon",children:(0,h.jsx)(i.Icon,{icon:t})}),(0,h.jsx)("p",{className:"wc-blocks-product-collection__collection-button-title",children:e})]})}),ie=e=>{const{description:t,onClick:o}=e;return(0,h.jsxs)("div",{className:"wc-blocks-product-collection__collections-create",children:[(0,h.jsx)("span",{children:(0,l.__)("or","woocommerce")}),(0,h.jsx)(i.Tooltip,{text:t,placement:"top",children:(0,h.jsx)(i.Button,{onClick:o,children:(0,l.__)("create your own","woocommerce")})})]})},ae=e=>{const{onCollectionClick:t,catalogVariation:o,collectionVariations:r}=e;return(0,h.jsxs)("div",{className:"wc-blocks-product-collection__collections-grid",children:[(0,h.jsx)("div",{className:"wc-blocks-product-collection__collections-section",children:r.map(({name:e,title:o,icon:r,description:s})=>(0,h.jsx)(ne,{title:o,description:s,icon:r,onClick:()=>t(e)},e))}),(0,h.jsx)(ie,{title:o.title,description:o.description,icon:o.icon,onClick:()=>t(o.name)})]})},le=e=>{const{onCollectionClick:t,catalogVariation:o,collectionVariations:r}=e;return(0,h.jsxs)("div",{className:"wc-blocks-product-collection__collections-dropdown",children:[(0,h.jsx)(i.Dropdown,{className:"wc-blocks-product-collection__collections-dropdown-toggle",contentClassName:"wc-blocks-product-collection__collections-dropdown-content",renderToggle:({isOpen:e,onToggle:t})=>(0,h.jsx)(i.Button,{variant:"secondary",onClick:t,"aria-expanded":e,children:(0,l.__)("Choose collection","woocommerce")}),renderContent:()=>(0,h.jsx)(h.Fragment,{children:r.map(({name:e,title:o,icon:r,description:s})=>(0,h.jsx)(ne,{title:o,description:s,icon:r,onClick:()=>t(e)},e))})}),(0,h.jsx)(ie,{title:o.title,description:o.description,icon:o.icon,onClick:()=>t(o.name)})]})},de=o=>{const s=(0,c.useSelect)(o=>{const{getBlockVariations:r}=o(e.store);return r(t.name)},[]),n=(0,r.useMemo)(()=>s.find(({name:e})=>e===a.M.PRODUCT_CATALOG),[s]),i=(0,r.useMemo)(()=>s.filter(({name:e,scope:t})=>e!==a.M.PRODUCT_CATALOG&&(void 0===t||t?.includes("block"))),[s]),[l,{width:d}]=(0,u.useResizeObserver)();let m;return m=null!==d&&d>=600?ae:le,(0,h.jsxs)(h.Fragment,{children:[l,!!d&&(0,h.jsx)(m,{...o,catalogVariation:n,collectionVariations:i})]})},ue=e=>{const t=(0,o.useBlockProps)(),{clientId:r,tracksLocation:s}=e,{replaceBlock:n}=(0,c.useDispatch)(o.store);return(0,h.jsx)("div",{...t,children:(0,h.jsx)(i.Placeholder,{className:"wc-blocks-product-collection__placeholder",instructions:(0,l.__)("What products do you want to show?","woocommerce"),children:(0,h.jsx)(de,{onCollectionClick:e=>{(0,d.yM)("blocks_product_collection_collection_chosen_from_placeholder",{collection:e,location:s}),ce(e,r,n)}})})})};var me=s(11824),pe=s.n(me);function he(){return(0,c.useSelect)(e=>{const t=e("email-editor/editor");if(!t)return!1;const o=e("core/editor");if(!o)return!1;const r=o.getCurrentPostId(),s=o.getCurrentPostType(),c=t.getEmailPostId(),n=t.getEmailPostType();if(String(r)===String(c)&&String(s)===String(n))return!0;if("wp_template"===s){const e=t.getCurrentTemplate();if(!e)return!1;const o=t.getEmailTemplates();return!!o&&o.some(t=>t.id===e.id&&t.post_types?.includes(n))}return!1},[])}var ge=function(e){return e.SINGLE_PRODUCT="single-product",e.PRODUCT_CATALOG="product-catalog",e.PRODUCT_ARCHIVE="product-archive",e.ORDER_CONFIRMATION="order-confirmation",e.CART="cart",e.CHECKOUT="checkout",e.POST="post",e.PAGE="page",e.OTHER="other",e}(ge||{});const we={"single-product":ge.SINGLE_PRODUCT,"archive-product":ge.PRODUCT_CATALOG,"taxonomy-product_cat":ge.PRODUCT_ARCHIVE,"taxonomy-product_tag":ge.PRODUCT_ARCHIVE,"taxonomy-product_attribute":ge.PRODUCT_ARCHIVE,"product-search-results":ge.PRODUCT_ARCHIVE,"order-confirmation":ge.ORDER_CONFIRMATION,"page-cart":ge.CART,"page-checkout":ge.CHECKOUT},_e=e=>{const t=(0,c.useSelect)(e=>{const t=e(f.Y);return t?.getCurrentPostType?.()},[]);if(t===ge.PAGE||t===ge.POST)return t;if(!e)return ge.OTHER;return we[e]||(e.includes("single-product")?ge.SINGLE_PRODUCT:e.includes("taxonomy-product_cat")||e.includes("taxonomy-product_tag")?ge.PRODUCT_ARCHIVE:ge.OTHER)},be=(0,l.__)("Columns","woocommerce"),xe=(0,l.__)("Responsive","woocommerce"),fe=(0,l.__)("Automatically adjust the number of columns to better fit smaller screens.","woocommerce"),ye=e=>{const{maxColumns:t,hideResponsiveToggle:o}=e,{type:r,columns:s,shrinkColumns:c}=e.displayLayout,n="flex"===r,a=P(),l=()=>{e.setAttributes({displayLayout:a})},d=t??6;return n?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.__experimentalToolsPanelItem,{label:be,hasValue:()=>a?.columns!==s,isShownByDefault:!0,onDeselect:l,children:(0,h.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:be,onChange:t=>{void 0!==t&&e.setAttributes({displayLayout:{...e.displayLayout,columns:t}})},value:s,min:1,max:Math.max(d,s)})}),!o&&(0,h.jsx)(i.__experimentalToolsPanelItem,{label:xe,hasValue:()=>a?.shrinkColumns!==c,isShownByDefault:!0,onDeselect:l,children:(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,checked:!!c,label:xe,help:fe,onChange:t=>{e.setAttributes({displayLayout:{...e.displayLayout,shrinkColumns:t}})}})})]}):null};var ve=s(13817);const ke=(0,l.__)("Query type","woocommerce"),je=(0,l.__)("Default","woocommerce"),Ce=(0,l.__)("Custom","woocommerce"),Se=(0,l.__)("Display products based on the current template and allow shoppers to filter.","woocommerce"),Ae=(0,l.__)("Show products based on specific criteria and allow shoppers to filter.","woocommerce"),Ne=(0,l.__)("Show a list of products based on fixed criteria.","woocommerce"),Pe=({setQueryAttribute:e,trackInteraction:t,query:o})=>{const s=o?.inherit,c=(0,ve.Z)(o,e=>!1===e?.inherit),n=(0,r.useMemo)(()=>A(),[]);return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:ke,hasValue:()=>s!==n,isShownByDefault:!0,onDeselect:()=>{e({inherit:n}),t(a.ug.INHERIT)},children:(0,h.jsxs)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wc-block-product-collection__inherit-query-control",isBlock:!0,label:ke,help:s?Se:Ne,value:s?"default":"custom",onChange:o=>{e("default"===o?{..._.Xl,inherit:!0}:{..._.Xl,...c,inherit:!1}),t(a.ug.INHERIT)},children:[(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:"default",label:je}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:"custom",label:Ce})]})})},Be=({setQueryAttribute:e,trackInteraction:t,query:o})=>{const s=o?.filterable,c=(0,r.useMemo)(()=>N(),[]);return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:ke,hasValue:()=>s!==c,isShownByDefault:!0,onDeselect:()=>{e({filterable:c}),t(a.ug.FILTERABLE)},children:(0,h.jsxs)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wc-block-product-collection__inherit-query-control",isBlock:!0,label:ke,help:s?Ae:Ne,value:s?"default":"custom",onChange:o=>{e({filterable:"default"===o}),t(a.ug.FILTERABLE)},children:[(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:"default",label:je}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:"custom",label:Ce})]})})};var Ie=s(8e3);const Te={layout:{}},Ee={layout:{type:"flex",justifyContent:"left",verticalAlignment:"top",flexWrap:"nowrap",orientation:"horizontal"}},Re=(t,s)=>{const{displayLayout:n,collection:i}=s,l=(0,r.useRef)(n.type),d=(0,c.useDispatch)(o.store),{productCollectionBlock:u}=(0,c.useSelect)(e=>({productCollectionBlock:e(o.store).getBlock(t)}),[t]);(0,r.useEffect)(()=>{t&&u&&(n?.type===a.BX.CAROUSEL&&l.current!==a.BX.CAROUSEL&&((t,r)=>{const{removeBlock:s,insertBlock:n,updateBlockAttributes:i}=r,a=(0,Ie.K)(t,_.An),l=(0,Ie.K)(t,_.AJ),d=(0,Ie.K)(t,_.$r),u=t?.clientId,m=a?.clientId;i(m,Ee);const p=(0,e.createBlock)(_.mg,{layout:{type:"flex",flexWrap:"nowrap"}});if(d){const t=(0,c.select)(o.store).getBlockIndex(d.clientId),r=(h=[d,p],(0,e.createBlock)("core/group",{className:"wc-product-collection-carousel-header",layout:{type:"flex",flexWrap:"nowrap",justifyContent:"space-between",verticalAlignment:"center"}},h));s(d.clientId,!1),n(r,t,u,!1)}else{const t=(0,c.select)(o.store).getBlockIndex(m),r=(t=>(0,e.createBlock)("core/group",{layout:{type:"flex",flexWrap:"nowrap",justifyContent:"right"}},t))([p]);n(r,t,u,!1)}var h;l&&s(l.clientId,!1)})(u,d),n?.type!==a.BX.CAROUSEL&&l.current===a.BX.CAROUSEL&&((t,r,s)=>{const{removeBlock:n,insertBlock:i,updateBlockAttributes:a}=r,l=(0,Ie.K)(t,_.An);a(l?.clientId,Te);const d=(0,Ie.F)(t,e=>"core/group"===e.name&&e.innerBlocks.some(e=>e.name===_.mg));if(d)if(1===d.innerBlocks.length)n(d.clientId,!1);else{const e=(0,Ie.K)(d,_.$r);if(e&&2===d.innerBlocks.length){const r=(0,c.select)(o.store).getBlockIndex(e.clientId);n(d.clientId,!1),i(e,r,t.clientId,!1)}else{const e=(0,Ie.K)(t,_.mg);n(e?.clientId,!1)}}s||i((0,e.createBlock)(_.AJ,_.$0),t.innerBlocks.length,t.clientId,!1)})(u,d,i),l.current=n.type)},[n.type,t,d,i,u])},De=({hasValue:e=()=>!0,orderOptions:t,onChange:o,onDeselect:r=()=>{},selectedValue:s,label:c,help:n})=>(0,h.jsx)(i.__experimentalToolsPanelItem,{label:c||(0,l.__)("Order by","woocommerce"),hasValue:e,isShownByDefault:!0,onDeselect:r,resetAllFilter:r,children:(0,h.jsx)(i.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:s,options:t,label:c||(0,l.__)("Order by","woocommerce"),onChange:o,help:n})}),Le=[{label:(0,l.__)("Newest to oldest","woocommerce"),value:"date"},{label:(0,l.__)("Price, high to low","woocommerce"),value:"price-desc"},{label:(0,l.__)("Price, low to high","woocommerce"),value:"price"},{label:(0,l.__)("Sales, high to low","woocommerce"),value:"popularity"},{label:(0,l.__)("Rating, high to low","woocommerce"),value:"rating"},{value:"menu_order",label:(0,l.__)("Manual (menu order + name)","woocommerce")}],Oe=({trackInteraction:e})=>{const t=(0,c.select)("core").getEditedEntityRecord("root","site"),[o,s]=(0,r.useState)(t.woocommerce_default_catalog_orderby||"menu_order");return(0,h.jsx)(De,{label:(0,l.__)("Default sort by","woocommerce"),selectedValue:o,orderOptions:Le,onChange:t=>{s(t),(0,c.dispatch)(x.store).editEntityRecord("root","site",void 0,{woocommerce_default_catalog_orderby:t}),e(a.ug.DEFAULT_ORDER)},help:(0,l.__)("All Product Collection blocks using the Default Query will sync to this sort order.","woocommerce")})},Me=[{label:(0,l.__)("A → Z","woocommerce"),value:"title/asc"},{label:(0,l.__)("Z → A","woocommerce"),value:"title/desc"},{label:(0,l.__)("Newest to oldest","woocommerce"),value:"date/desc"},{label:(0,l.__)("Oldest to newest","woocommerce"),value:"date/asc"},{label:(0,l.__)("Price, high to low","woocommerce"),value:"price/desc"},{label:(0,l.__)("Price, low to high","woocommerce"),value:"price/asc"},{label:(0,l.__)("Sales, high to low","woocommerce"),value:"sales/desc"},{label:(0,l.__)("Sales, low to high","woocommerce"),value:"sales/asc"},{value:"rating/desc",label:(0,l.__)("Rating, high to low","woocommerce")},{value:"rating/asc",label:(0,l.__)("Rating, low to high","woocommerce")},{value:"menu_order/asc",label:(0,l.__)("Manual (menu order + name)","woocommerce")},{value:"random",label:(0,l.__)("Random","woocommerce")}],Ve=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,{order:s,orderBy:c}=t;let n=s?`${c}/${s}`:c;return"popularity"===c&&(n=`sales/${s}`),(0,h.jsx)(De,{selectedValue:n,hasValue:()=>s!==_.Xl.order||c!==_.Xl.orderBy,orderOptions:Me,onChange:e=>{const[t,s]=e.split("/");r({orderBy:t,order:s||void 0}),o(a.ug.ORDER)},onDeselect:()=>{r({orderBy:_.Xl.orderBy}),o(a.ug.ORDER)},help:(0,l.__)("Set the products order in this collection.","woocommerce")})},Fe=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,s=()=>{r({woocommerceOnSale:_.q9.woocommerceOnSale}),o(a.ug.ON_SALE)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("On Sale","woocommerce"),hasValue:()=>!0===t.woocommerceOnSale,isShownByDefault:!0,onDeselect:s,resetAllFilter:s,children:(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Show only products on sale","woocommerce"),checked:t.woocommerceOnSale||!1,onChange:e=>{r({woocommerceOnSale:e}),o(a.ug.ON_SALE)}})})};function He(e){const t="string"==typeof e?e:e.value;return Object.entries(_.PL).find(([,e])=>e===t)?.[0]}const ze=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,s=()=>{r({woocommerceStockStatus:_.q9.woocommerceStockStatus}),o(a.ug.STOCK_STATUS)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Stock Status","woocommerce"),hasValue:()=>!pe()(t.woocommerceStockStatus,(0,_.eu)()),onDeselect:s,resetAllFilter:s,isShownByDefault:!0,children:(0,h.jsx)(i.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Stock Status","woocommerce"),onChange:e=>{const t=e.map(He).filter(Boolean);r({woocommerceStockStatus:t}),o(a.ug.STOCK_STATUS)},suggestions:Object.values(_.PL),validateInput:e=>Object.values(_.PL).includes(e),value:t?.woocommerceStockStatus?.map(e=>_.PL[e])||[],__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1})})},$e=e=>{const{query:t,trackInteraction:o,setQueryAttribute:s}=e,[c,n]=(0,r.useState)(t.search),d=(0,u.useDebounce)(()=>{t.search!==c&&(s({search:c}),o(a.ug.KEYWORD))},250);(0,r.useEffect)(()=>(d(),d.cancel),[c,d]);const m=()=>{n(""),o(a.ug.KEYWORD)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,l.__)("Keyword","woocommerce"),onDeselect:m,resetAllFilter:m,children:(0,h.jsx)(i.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Keyword","woocommerce"),value:c,onChange:n})})};var We=s(7971);const Ge=`${s(15703).ADMIN_URL}edit.php?post_type=product&page=product_attributes`,qe=({query:e,trackInteraction:t,setQueryAttribute:o})=>{const r=e.woocommerceAttributes||[],s=r?.map(({termId:e})=>({id:e})),c=()=>{o({woocommerceAttributes:_.q9.woocommerceAttributes}),t(a.ug.ATTRIBUTES)};return(0,h.jsxs)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Product Attributes","woocommerce"),hasValue:()=>!!r?.length,onDeselect:c,resetAllFilter:c,children:[(0,h.jsx)(We.A,{messages:{search:(0,l.__)("Attributes","woocommerce")},selected:s||[],onChange:e=>{const r=e.map(({id:e,value:t})=>({termId:e,taxonomy:t}));o({woocommerceAttributes:r}),t(a.ug.ATTRIBUTES)},operator:"any",isCompact:!0,type:"token"}),(0,h.jsx)(i.ExternalLink,{className:"wc-block-editor-product-collection-panel__manage-attributes-link",href:Ge,children:(0,l.__)("Manage attributes","woocommerce")})]})};var Ue=s(50376),Ye=s(6479),Ze=s(84114),Je=s(68420),Xe=s(51258);var Qe=s(64342),Ke=s(4921),et=s(50715);s(2411);const tt=(ot=({brands:e=[],error:t=null,isLoading:o=!1,onChange:r,onOperatorChange:s,operator:c="any",selected:n=[],isCompact:a=!1,isSingle:d=!1,showReviewCount:u})=>{const m={clear:(0,l.__)("Clear all product brands","woocommerce"),list:(0,l.__)("Product Brands","woocommerce"),noItems:(0,l.__)("Your store doesn't have any product brands.","woocommerce"),search:(0,l.__)("Search for product brands","woocommerce"),selected:e=>(0,l.sprintf)(/* translators: %d is the count of selected brands. */ /* translators: %d is the count of selected brands. */ (0,l._n)("%d brand selected","%d brands selected",e,"woocommerce"),e),updated:(0,l.__)("Brand search results updated.","woocommerce")};if(t)return(0,h.jsx)(Qe.A,{error:t});const p=e.map(et.YS);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Je.W,{className:"woocommerce-product-brands",list:p,isLoading:o,selected:p.filter(({id:e})=>n.includes(Number(e))),onChange:r,renderItem:e=>{const{item:t,search:o,depth:r=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,c=u?(0,l.sprintf)(/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ /* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ (0,l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.details?.review_count||0,"woocommerce"),s,t.details?.review_count||0):(0,l.sprintf)(/* translators: %1$s is the item name, %2$d is the count of products for the item. */ /* translators: %1$s is the item name, %2$d is the count of products for the item. */ (0,l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.details?.count||0,"woocommerce"),s,t.details?.count||0),n=u?(0,l.sprintf)(/* translators: %d is the count of reviews. */ /* translators: %d is the count of reviews. */ (0,l._n)("%d review","%d reviews",t.details?.review_count||0,"woocommerce"),t.details?.review_count||0):(0,l.sprintf)(/* translators: %d is the count of products. */ /* translators: %d is the count of products. */ (0,l._n)("%d product","%d products",t.details?.count||0,"woocommerce"),t.details?.count||0);return(0,h.jsx)(Ze.s,{className:(0,Ke.A)("woocommerce-product-brands__item","has-count",{"is-searching":o.length>0,"is-skip-level":0===r&&0!==t.parent}),...e,countLabel:n,"aria-label":c})},messages:m,isCompact:a,isHierarchical:!0,isSingle:d}),!!s&&(0,h.jsx)("div",{hidden:n.length<2,children:(0,h.jsx)(i.SelectControl,{className:"woocommerce-product-brands__operator",label:(0,l.__)("Display products matching","woocommerce"),help:(0,l.__)("Pick at least two brands to use this setting.","woocommerce"),value:c,onChange:s,options:[{label:(0,l.__)("Any selected brands","woocommerce"),value:"any"},{label:(0,l.__)("All selected brands","woocommerce"),value:"all"}]})})]})},({selected:e,...t})=>{const[o,s]=(0,r.useState)(!0),[c,n]=(0,r.useState)(null),[i,a]=(0,r.useState)([]),l=async e=>{const t=await(0,Xe.W)(e);n(t),s(!1)};return(0,r.useEffect)(()=>{(0,v.Fs)({}).then(e=>{a(e),s(!1)}).catch(l)},[]),(0,h.jsx)(ot,{...t,selected:e,error:c,brands:i,isLoading:o})});var ot,rt=s(18537);const st={_fields:"id,name",order:"asc",orderby:"name",context:"view"},ct=e=>{const t=e.match(/^(?:(.+) )?\(#(\d+)\)$/);return!!t&&{name:t[1]??"",id:parseInt(t[2],10)}},nt=({taxonomy:e,termIds:t,onChange:o})=>{const{existingTerms:s,isLoadingExistingTerms:n}=(0,c.useSelect)(o=>{if(!t||!t.length)return{existingTerms:[],isLoadingExistingTerms:!1};const{getEntityRecords:r,hasFinishedResolution:s}=o("core"),c=["taxonomy",e.slug,{...st,include:t}];return{existingTerms:r(...c),isLoadingExistingTerms:!s("getEntityRecords",c)}},[e,t]),[a,d]=(0,r.useState)(""),{searchTerms:m}=(0,c.useSelect)(o=>{if(a.length<=1)return{searchTerms:[]};const{getEntityRecords:r}=o("core");return{searchTerms:r("taxonomy",e.slug,{...st,exclude:t,search:a})}},[e,t,a]),p=(0,u.useDebounce)(d,250),g=new Set,w=new Set,_=e=>(g.has(e.name)&&w.add(e.name),g.add(e.name),(e=>`${e.name} (#${e.id})`)(e)),b=s?s.map(_):[],x=m?m.map(_):[];if(s&&t.length!==s.length){const e=s.reduce((e,t)=>(e[t.id]=t,e),{});t.forEach(t=>{e[t]||b.push(`(#${t})`)})}return(0,h.jsx)("div",{className:"wc-block-editor-product-collection-inspector__taxonomy-control",children:(0,h.jsx)(i.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:e.name,value:b,onInputChange:p,onChange:e=>{const t=[];e.forEach(e=>{const o=ct(e);o&&t.push(o.id)}),o(t)},suggestions:x,disabled:n,displayTransform:e=>{const t=ct(e);return t&&(e=t.name?w.has(t.name)?`${t.name} (#${t.id})`:t.name:`(#${t.id} ${(0,l.__)("Missing","woocommerce")})`),(0,rt.decodeEntities)(e)||""},__experimentalShowHowTo:!1})})},it=()=>{const e=(0,c.useSelect)(e=>{const{getTaxonomies:t}=e(x.store);return t({type:"product",per_page:-1})},[]);return(0,r.useMemo)(()=>e?.filter(({visibility:e})=>!!e?.publicly_queryable),[e])},at=e=>e?e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):"",lt=function({setQueryAttribute:e,trackInteraction:t,query:o,collection:s,renderMode:c="panel"}){const{filteredTaxonomies:n,taxQuery:l,createHandleChange:d,shouldShowTaxonomyControl:u}=function({setQueryAttribute:e,trackInteraction:t,query:o,collection:s,isFiltersPanel:c}){const{taxQuery:n}=o,i=it(),l=(0,r.useMemo)(()=>i&&0!==i.length?s===a.M.BY_CATEGORY?i.filter(e=>c?"product_cat"!==e.slug:"product_cat"===e.slug):s===a.M.BY_TAG?i.filter(e=>c?"product_tag"!==e.slug:"product_tag"===e.slug):s===a.M.BY_BRAND?i.filter(e=>c?"product_brand"!==e.slug:"product_brand"===e.slug):c?i:[]:[],[i,s,c]);return{filteredTaxonomies:l,taxQuery:n,createHandleChange:o=>r=>{e({taxQuery:{[o]:r}}),t(`${a.ug.TAXONOMY}__${o}`)},shouldShowTaxonomyControl:l.length>0}}({query:o,collection:s,setQueryAttribute:e,trackInteraction:t,isFiltersPanel:"panel"===c});if(!u)return null;const m=e=>{const{slug:t}=e,o=l?.[t]||[],r=d(t),s=e=>{const t=e.map(({id:e})=>Number(e));r(t)};switch(t){case"product_cat":return(0,h.jsx)(Ue.A,{selected:o,onChange:s,isCompact:!0,type:"token"},t);case"product_tag":return(0,h.jsx)(Ye.A,{selected:o,onChange:s,isCompact:!0,type:"token"},t);case"product_brand":return(0,h.jsx)(tt,{selected:o,onChange:s,isCompact:!0,type:"token"},t);default:return(0,h.jsx)(nt,{taxonomy:e,termIds:o,onChange:r},t)}};return(0,h.jsx)(h.Fragment,{children:n.map(e=>"panel"===c?(e=>{const{slug:t,name:o}=e,r=l?.[t]||[],s=d(t),c=()=>s([]);return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:at(o),hasValue:()=>r.length>0,onDeselect:c,resetAllFilter:c,children:m(e)},t)})(e):m(e))})};var dt=s(36352);const ut=({query:e,trackInteraction:t,setQueryAttribute:o})=>{const s=(dt.r7.productCount||0)>100,c=e.woocommerceHandPickedProducts,[n,d]=(0,r.useState)(""),{productsMap:m,productsList:p,productsLoaded:g}=function(e,t,o=[]){const[s,c]=(0,r.useState)(new Map),[n,i]=(0,r.useState)([]),[a,l]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const r={selected:e?o.map(Number):[],queryArgs:e?{search:t,per_page:40}:{per_page:100}};(0,v.d$)(r).then(e=>{const t=new Map;e.forEach(e=>{t.set(e.id,e),t.set(e.name,e)}),i(e),c(t),l(!0)})},[e,t,o]),{productsMap:s,productsList:n,productsLoaded:a}}(s,n,c),w=(0,u.useDebounce)(d,250),_=(0,r.useMemo)(()=>c?.length&&m.size?c.filter(e=>!!m.get(Number(e))):c||[],[c,m]);(0,r.useEffect)(()=>{_.length!==c.length&&o({woocommerceHandPickedProducts:_})},[_,c,o]);const b=(0,r.useCallback)(e=>{const r=e.reduce((e,t)=>{const o=m.get(t)||m.get(Number(t));return o&&e.add(String(o.id)),e},new Set);o({woocommerceHandPickedProducts:Array.from(r)}),t(a.ug.HAND_PICKED)},[o,t,m]),x=(0,r.useMemo)(()=>p.filter(e=>!_?.includes(String(e.id))).map(e=>e.name),[p,_]);return(0,h.jsx)(i.FormTokenField,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,displayTransform:e=>{const t=Number(e);if(Number.isNaN(t))return(0,rt.decodeEntities)(e)||"";const o=m.get(t);return(0,rt.decodeEntities)(o?.name)||""},label:(0,l.__)("Hand-Picked","woocommerce"),onChange:b,onInputChange:s?w:void 0,suggestions:x,__experimentalValidateInput:e=>m.has(e),value:g?_||[]:[(0,l.__)("Loading…","woocommerce")],__experimentalExpandOnFocus:!0,__experimentalShowHowTo:!1,placeholder:(0,l.__)("Search for products to display…","woocommerce")})},mt=({query:e,trackInteraction:t,setQueryAttribute:o})=>{const r=e.woocommerceHandPickedProducts,s=()=>{o({woocommerceHandPickedProducts:_.q9.woocommerceHandPickedProducts}),t(a.ug.HAND_PICKED)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Hand-Picked","woocommerce"),hasValue:()=>!!r?.length,onDeselect:s,resetAllFilter:s,children:(0,h.jsx)(ut,{query:e,trackInteraction:t,setQueryAttribute:o})})},pt=e=>{switch(e){case a.BX.GRID:return(0,l.__)("Display products using rows and columns.","woocommerce");case a.BX.STACK:return(0,l.__)("Display products in a single column.","woocommerce");case a.BX.CAROUSEL:return(0,l.__)("Display products in a carousel. It displays a single row of products.","woocommerce");default:return""}},ht=a.BX.GRID,gt=e=>{const{type:t,columns:o,shrinkColumns:r}=e.displayLayout,s=t=>{e.setAttributes({displayLayout:{type:t,columns:o,shrinkColumns:r}})};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Layout","woocommerce"),hasValue:()=>t!==ht,isShownByDefault:!0,onDeselect:()=>{s(a.BX.GRID)},children:(0,h.jsxs)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Layout","woocommerce"),isBlock:!0,onChange:e=>{s(e)},help:pt(t),value:t,children:[(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.BX.STACK,label:(0,l.__)("Stack","woocommerce")}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.BX.GRID,label:(0,l.__)("Grid","woocommerce")}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.BX.CAROUSEL,label:(0,l.__)("Carousel","woocommerce")})]})})},wt=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,s=()=>{r({featured:_.q9.featured}),o(a.ug.FEATURED)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Featured","woocommerce"),hasValue:()=>!0===t.featured,onDeselect:s,resetAllFilter:s,children:(0,h.jsx)(i.BaseControl,{__nextHasNoMarginBottom:!0,id:"product-collection-featured-products-control",label:(0,l.__)("Featured","woocommerce"),children:(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Show only featured products","woocommerce"),checked:t.featured||!1,onChange:e=>{r({featured:e}),o(a.ug.FEATURED)}})})})},_t=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,{timeFrame:s}=t,c=()=>{r({timeFrame:_.q9.timeFrame}),o(a.ug.CREATED)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Created","woocommerce"),hasValue:()=>s?.operator&&s?.value,onDeselect:c,resetAllFilter:c,children:(0,h.jsxs)(i.Flex,{direction:"column",gap:3,children:[(0,h.jsx)(i.FlexItem,{children:(0,h.jsxs)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Created","woocommerce"),isBlock:!0,onChange:e=>{r({timeFrame:{...s,operator:e}}),o(a.ug.CREATED)},value:s?.operator||a.M0.IN,children:[(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.M0.IN,label:(0,l._x)("Within","Product Collection query operator","woocommerce")}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.M0.NOT_IN,label:(0,l._x)("Before","Product Collection query operator","woocommerce")})]})}),(0,h.jsx)(i.FlexItem,{children:(0,h.jsx)(i.RadioControl,{onChange:e=>{r({timeFrame:{operator:a.M0.IN,...s,value:e}}),o(a.ug.CREATED)},options:[{label:"last 24 hours",value:"-1 day"},{label:"last 7 days",value:"-7 days"},{label:"last 30 days",value:"-30 days"},{label:"last 3 months",value:"-3 months"}],selected:s?.value})})]})})};var bt=s(70910);const xt=({value:e,onChange:t,label:o})=>{const[s,c]=(0,r.useState)(`${e||""}`),n=(0,bt.getCurrency)(),a=((e="",t)=>{const o=e.replace(new RegExp(`[^0-9\\${t.decimalSeparator||""}]`,"g"),"").replace(new RegExp(`\\${t.decimalSeparator}`,"g"),"."),r=Number(o);if(""!==o&&!isNaN(r))return r<0?0:r})(s,n),d=((e,t)=>{if(void 0===e||isNaN(e))return;let o=((e,t)=>{const o=Math.pow(10,t.minorUnit),r=""+Math.round(e*o)/o;let[s,c]=r.split(".");return t.thousandSeparator&&(s=s.replace(/\B(?=(\d{3})+(?!\d))/g,t.thousandSeparator)),c?`${s}${t.decimalSeparator||"."}${c}`:s})(e,t);return t?.prefix&&(o=`${t.prefix}${o}`),t?.suffix&&(o=`${o}${t.suffix}`),o})(a,n);return(0,h.jsx)(i.__experimentalInputControl,{value:d,onChange:e=>{c(e)},onBlur:()=>{t(a)},onKeyDown:e=>{"Enter"===e.key&&t(a)},label:o,prefix:(0,h.jsx)(i.__experimentalInputControlPrefixWrapper,{children:o}),placeholder:(0,l.__)("Auto","woocommerce"),hideLabelFromVision:!0,type:"text",style:{textAlign:"right"},__next40pxDefaultSize:!0})},ft=e=>{const{query:t,trackInteraction:o,setQueryAttribute:r}=e,s=t.priceRange,c=()=>{r({priceRange:_.q9.priceRange}),o(a.ug.PRICE_RANGE)};return(0,h.jsxs)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Price Range","woocommerce"),hasValue:()=>void 0!==s?.min||void 0!==s?.max,onDeselect:c,resetAllFilter:c,className:"wc-block-product-price-range-control",children:[(0,h.jsx)(i.BaseControl.VisualLabel,{children:(0,l.__)("PRICE RANGE","woocommerce")}),(0,h.jsxs)(i.__experimentalHStack,{spacing:"2",children:[(0,h.jsx)(xt,{label:(0,l.__)("MIN","woocommerce"),value:s?.min,onChange:e=>{r({priceRange:{min:0===e?void 0:e,max:s?.max}}),o(a.ug.PRICE_RANGE)}}),(0,h.jsx)(xt,{label:(0,l.__)("MAX","woocommerce"),value:s?.max,onChange:e=>{const t=0===e?void 0:e;r({priceRange:{min:s?.min,max:t}}),o(a.ug.PRICE_RANGE)}})]})]})};var yt=s(1041);const vt="product",kt="cart",jt="order",Ct=({isOpen:e,onToggle:t,product:o,isLoading:r})=>{if(r&&!o)return(0,h.jsx)(i.Spinner,{});const s=!o,c=s||!o?.images?.[0]?.src,n=c?`${dt.sW}/blocks/product-collection/placeholder.svg`:o.images[0].src,a=c?"":o?.name;return(0,h.jsx)(i.Button,{className:"wc-block-product-collection-linked-product-control__button",onClick:t,"aria-expanded":e,disabled:r,children:(0,h.jsxs)(i.Flex,{direction:"row",expanded:!0,justify:"flex-start",children:[(0,h.jsx)(i.FlexItem,{className:"wc-block-product-collection-linked-product-control__image-container",children:(0,h.jsx)("img",{src:n,alt:a})}),(0,h.jsx)(i.Flex,{direction:"column",align:"flex-start",gap:1,className:"wc-block-product-collection-linked-product-control__content",children:s?(0,h.jsx)(i.FlexItem,{children:(0,h.jsx)(i.__experimentalText,{color:"inherit",lineHeight:1,children:(0,l.__)("Select product","woocommerce")})}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(i.FlexItem,{children:(0,h.jsx)(i.__experimentalText,{color:"inherit",lineHeight:1,children:o?.name?(0,rt.decodeEntities)(o.name):""})}),(0,h.jsx)(i.FlexItem,{children:(0,h.jsx)(i.__experimentalText,{color:"inherit",lineHeight:1,children:o?.sku})})]})})]})})},St=({query:e,setAttributes:t,setIsDropdownOpen:o})=>(0,h.jsx)(yt.A,{selected:e?.productReference,onChange:(r=[])=>{const s=r[0]?.id??null;null!==s&&(t({query:{...e,productReference:s}}),o(!1))},messages:{search:(0,l.__)("Select a product","woocommerce")}});var At=function(e){return e.CURRENT_PRODUCT="CURRENT_PRODUCT",e.SPECIFIC_PRODUCT="SPECIFIC_PRODUCT",e}(At||{});const Nt=({query:e,setAttributes:t,location:o,usesReference:s})=>{const c=o.type===vt,n=!!s?.includes(vt),a=o.type===kt,d=!!s?.includes(kt),u=o.type===jt,m=!!s?.includes(jt),{productReference:p}=e,{product:g,isLoading:w}=(e=>{const[t,o]=(0,r.useState)(null),[s,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(e){c(!0);try{const t=await(0,v.oo)(e);o(t)}catch(e){o(null)}finally{c(!1)}}else o(null),c(!1)})()},[e]),{product:t,isLoading:s}})(p),[_,b]=(0,r.useState)(!1),[x,f]=(0,r.useState)((c||a||u)&&(0,y.isEmpty)(p)?At.CURRENT_PRODUCT:At.SPECIFIC_PRODUCT),k=(0,r.useRef)(void 0),j=c&&n||a&&d||u&&m,C=j?x===At.SPECIFIC_PRODUCT:!(0,y.isEmpty)(p);if(!j&&!C||!(n||d||m))return null;const S=x===At.CURRENT_PRODUCT?(0,l.__)("Linked products will be pulled from the product a shopper is currently viewing","woocommerce"):(0,l.__)("Select a product to pull the linked products from","woocommerce"),A=((e,t,o)=>e===kt&&t?(0,l.__)("From products in the cart","woocommerce"):e===jt&&o?(0,l.__)("From products in the order","woocommerce"):(0,l.__)("From the current product","woocommerce"))(o.type,d,m);return(0,h.jsxs)(i.PanelBody,{title:(0,l.__)("Linked Product","woocommerce"),children:[j&&(0,h.jsx)(i.PanelRow,{children:(0,h.jsx)(i.RadioControl,{className:"wc-block-product-collection-product-reference-radio",label:(0,l.__)("Products to show","woocommerce"),help:S,selected:x,options:[{label:A,value:At.CURRENT_PRODUCT},{label:(0,l.__)("From a specific product","woocommerce"),value:At.SPECIFIC_PRODUCT}],onChange:o=>{if(o===At.CURRENT_PRODUCT){const{productReference:o,...r}=e;k.current=o,t({query:r})}else t({query:k.current?{...e,productReference:k.current}:e});f(o)}})}),C&&(0,h.jsx)(i.PanelRow,{children:(0,h.jsx)(i.Dropdown,{className:"wc-block-product-collection-linked-product-control",contentClassName:"wc-block-product-collection-linked-product__popover-content",popoverProps:{placement:"left-start"},renderToggle:({isOpen:e,onToggle:t})=>(0,h.jsx)(Ct,{isOpen:e,onToggle:t,product:g,isLoading:w}),renderContent:()=>(0,h.jsx)(St,{query:e,setAttributes:t,setIsDropdownOpen:b}),open:_,onToggle:()=>b(!_)})})]})},Pt=({dimensions:e,setAttributes:t})=>{const{widthType:o,fixedWidth:r=""}=e;return(0,h.jsxs)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Width","woocommerce"),hasValue:()=>o!==a.Hi.FILL,isShownByDefault:!0,children:[(0,h.jsxs)(i.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,l.__)("Width","woocommerce"),value:o,help:(s=o,s===a.Hi.FILL?(0,l.__)("Stretch to fill available space.","woocommerce"):(0,l.__)("Specify a fixed width.","woocommerce")),onChange:o=>(o=>{t({dimensions:{...e,widthType:o}})})(o),isBlock:!0,children:[(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.Hi.FILL,label:(0,l.__)("Fill","woocommerce")}),(0,h.jsx)(i.__experimentalToggleGroupControlOption,{value:a.Hi.FIXED,label:(0,l.__)("Fixed","woocommerce")})]}),o===a.Hi.FIXED&&(0,h.jsx)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,onChange:o=>{t({dimensions:{...e,fixedWidth:o}})},value:r})]});var s},Bt=({query:e,setQueryAttribute:t,trackInteraction:o})=>{const r=e?.relatedBy,s=(e,s)=>{const c={...r,[s]:e};t({relatedBy:c}),o(a.ug.RELATED_BY)};return(0,h.jsx)(i.PanelBody,{title:(0,l.__)("Related by","woocommerce"),children:(0,h.jsxs)("div",{className:"wc-block-editor-product-collection-inspector-controls__relate-by",children:[(0,h.jsx)(i.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Categories","woocommerce"),checked:r?.categories,onChange:e=>{s(e,"categories")}}),(0,h.jsx)(i.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Tags","woocommerce"),checked:r?.tags,onChange:e=>{s(e,"tags")}})]})})},It=(0,l.__)("Products per page","woocommerce"),Tt=(0,l.__)("Products in carousel","woocommerce"),Et=(0,l.__)("Number of products","woocommerce"),Rt=({query:e,setQueryAttribute:t,trackInteraction:o,carouselVariant:r})=>{const s=()=>{t({perPage:_.Xl.perPage}),o(a.ug.PRODUCTS_PER_PAGE)},c=((e,t)=>t?Et:e?Tt:It)(r,he()),n=e.perPage||_.Xl.perPage,d=r&&n>30;return(0,h.jsxs)(i.__experimentalToolsPanelItem,{label:c,isShownByDefault:!0,hasValue:()=>e.perPage!==_.Xl.perPage,onDeselect:s,resetAllFilter:s,children:[d&&(0,h.jsx)("div",{children:(0,h.jsx)(i.Notice,{status:"warning",isDismissible:!1,className:"wc-block-editor-product-collection__carousel-warning",children:(0,l.__)("High product counts in carousel may impact performance. Consider reducing the number of products for better user experience.","woocommerce")})}),(0,h.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:c,min:1,max:100,onChange:e=>{e<1||e>100||(t({perPage:e}),o(a.ug.PRODUCTS_PER_PAGE))},value:n})]})},Dt=({query:e,setQueryAttribute:t,trackInteraction:o})=>{const r=()=>{t({offset:_.Xl.offset}),o(a.ug.OFFSET)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Offset","woocommerce"),hasValue:()=>e.offset!==_.Xl.offset,onDeselect:r,resetAllFilter:r,children:(0,h.jsx)(i.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,l.__)("Offset","woocommerce"),value:e.offset,min:0,onChange:e=>{isNaN(e)||e<0||e>100||(t({offset:e}),o(a.ug.OFFSET))}})})},Lt=({query:e,setQueryAttribute:t,trackInteraction:o})=>{const r=()=>{t({pages:_.Xl.pages}),o(a.ug.MAX_PAGES_TO_SHOW)};return(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,l.__)("Max pages to show","woocommerce"),hasValue:()=>e.pages!==_.Xl.pages,onDeselect:r,resetAllFilter:r,children:(0,h.jsx)(i.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,l.__)("Max pages to show","woocommerce"),value:e.pages,min:0,onChange:e=>{isNaN(e)||e<0||(t({pages:e}),o(a.ug.MAX_PAGES_TO_SHOW))},help:(0,l.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).","woocommerce")})})},Ot=e=>{const{attributes:t,context:s,setAttributes:n,clientId:u}=e,{query:m,hideControls:p,dimensions:g,displayLayout:w,collection:b}=t,x=_e(s.templateSlug),f=e=>(0,d.yM)("blocks_product_collection_inspector_control_clicked",{collection:t.collection,location:x,filter:e}),y=m?.inherit||!1,v=(e=>t=>!e.includes(t))(p),k="product-catalog"===x||"product-archive"===x,C=w?.type===a.BX.CAROUSEL,S=he();Re(u,t),((e,t)=>{const{displayLayout:s,collection:n}=t,i=(0,c.useDispatch)(o.store),l=he(),{productCollectionBlock:d}=(0,c.useSelect)(t=>({productCollectionBlock:t(o.store).getBlock(e)}),[e]);(0,r.useEffect)(()=>{if(e&&d&&l&&d.innerBlocks&&Array.isArray(d.innerBlocks)&&s.type===a.BX.GRID){const e=d.innerBlocks.filter(e=>e&&"core/query-pagination"===e.name);e.forEach(e=>{if(e&&e.clientId)try{i.removeBlock(e.clientId)}catch(e){}})}},[s.type,e,i,n,d,l])})(u,t),((e,t)=>{const{displayLayout:o}=e,s=he();(0,r.useEffect)(()=>{s&&o.columns&&o.columns>2&&t({displayLayout:{...o,columns:2}})},[s,o,t])})(t,n),(e=>{const t=(0,c.useDispatch)(o.store),s=he(),{productCollectionBlock:n}=(0,c.useSelect)(t=>({productCollectionBlock:t(o.store).getBlock(e)}),[e]);(0,r.useEffect)(()=>{if(!e||!n||!s)return;if(!n.innerBlocks||!Array.isArray(n.innerBlocks))return;const o=n.innerBlocks.filter(e=>e&&"core/heading"===e.name);o.forEach(e=>{if(e&&e.clientId)try{t.removeBlock(e.clientId)}catch(e){}})},[e,t,n,s])})(u);const B=!1===y,I=k&&v(a.ug.INHERIT),T=!k&&v(a.ug.FILTERABLE),E=B&&v(a.ug.ORDER),R=!B,D=B&&v(a.ug.OFFSET),L=!C,O=B&&!C&&v(a.ug.MAX_PAGES_TO_SHOW),M=B&&v(a.ug.PRODUCTS_PER_PAGE),V=v(a.ug.ON_SALE),F=v(a.ug.STOCK_STATUS),H=v(a.ug.HAND_PICKED),z=v(a.ug.KEYWORD),$=v(a.ug.ATTRIBUTES),W=v(a.ug.TAXONOMY),G=v(a.ug.FEATURED),q=v(a.ug.CREATED),U=v(a.ug.PRICE_RANGE),Y={setAttributes:n,displayLayout:w},Z={setAttributes:n,dimensions:g},J={setQueryAttribute:(0,r.useMemo)(()=>j.bind(null,e),[e]),trackInteraction:f,query:m};return(0,h.jsxs)(o.InspectorControls,{children:[(0,h.jsx)(Nt,{query:e.attributes.query,setAttributes:e.setAttributes,usesReference:e.usesReference,location:e.location}),(()=>{switch(b){case a.M.HAND_PICKED:return(0,h.jsx)(i.PanelBody,{children:(0,h.jsx)(ut,{...J})});case a.M.BY_CATEGORY:case a.M.BY_TAG:case a.M.BY_BRAND:return(0,h.jsx)(i.PanelBody,{children:(0,h.jsx)(lt,{...J,collection:b,renderMode:"standalone"})});case a.M.RELATED:return(0,h.jsx)(Bt,{...J});default:return null}})(),(0,h.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Settings","woocommerce"),resetAll:()=>{const t=(o=e.attributes,{displayLayout:P(),query:(r=o.query,{...r,orderBy:_.Xl.orderBy,order:_.Xl.order,inherit:A(),filterable:N(),perPage:_.Xl.perPage,offset:_.Xl.offset,pages:_.Xl.pages}),dimensions:_.g2.dimensions});var o,r;e.setAttributes(t)},className:"wc-block-editor-product-collection__settings_panel",children:[I&&(0,h.jsx)(Pe,{...J}),T&&(0,h.jsx)(Be,{...J}),E&&(0,h.jsx)(Ve,{...J}),R&&(0,h.jsx)(Oe,{trackInteraction:f}),!S&&(0,h.jsx)(gt,{...Y}),!S&&(0,h.jsx)(Pt,{...Z}),M&&(0,h.jsx)(Rt,{...J,carouselVariant:C}),L&&(0,h.jsx)(ye,{...Y,...S&&{maxColumns:2,hideResponsiveToggle:!0}}),!S&&D&&(0,h.jsx)(Dt,{...J}),O&&!S&&(0,h.jsx)(Lt,{...J})]}),B?(0,h.jsxs)(i.__experimentalToolsPanel,{label:(0,l.__)("Filters","woocommerce"),resetAll:(e=[])=>{e.forEach(e=>{e()})},className:"wc-block-editor-product-collection-inspector-toolspanel__filters",children:[V&&(0,h.jsx)(Fe,{...J}),F&&(0,h.jsx)(ze,{...J}),H&&(0,h.jsx)(mt,{...J}),z&&(0,h.jsx)($e,{...J}),$&&(0,h.jsx)(qe,{...J}),W&&(0,h.jsx)(lt,{...J,collection:b,renderMode:"panel"}),G&&(0,h.jsx)(wt,{...J}),q&&(0,h.jsx)(_t,{...J}),U&&(0,h.jsx)(ft,{...J})]}):null]})},Mt=(0,l.__)("Enable to enforce full page reload on certain interactions, like using paginations controls.","woocommerce"),Vt=(0,l.__)("Browsing between pages requires a full page reload.","woocommerce"),Ft=(0,l.__)("Reload full page can't be disabled because there are incompatible blocks inside the Product Collection block.","woocommerce"),Ht=t=>{const{clientId:s,forcePageReload:n,setAttributes:a}=t,d=(t=>(0,c.useSelect)(r=>{const{getClientIdsOfDescendants:s,getBlockName:c}=r(o.store);return s(t).find(t=>!(t=>{const o=Object.is((0,e.getBlockSupport)(t,"interactivity"),!0),r=(0,e.getBlockSupport)(t,"interactivity.clientNavigation");return o||r})(c(t)))||!1},[t]))(s);(0,r.useEffect)(()=>{!n&&d&&a({forcePageReload:!0})},[n,d,a]);let u=Mt;return n&&(u=Vt),d&&(u=Ft),(0,h.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Reload full page","woocommerce"),help:u,checked:n,onChange:()=>a({forcePageReload:!n}),disabled:d})};function zt(e){const{clientId:t,attributes:r,setAttributes:s}=e,{forcePageReload:c}=r;return(0,h.jsx)(o.InspectorAdvancedControls,{children:(0,h.jsx)(Ht,{clientId:t,forcePageReload:c,setAttributes:s})})}const $t=e=>(0,h.jsx)(i.ToolbarGroup,{children:(0,h.jsx)(i.ToolbarButton,{onClick:e.openCollectionSelectionModal,children:(0,l.__)("Choose collection","woocommerce")})});function Wt(e){const{openCollectionSelectionModal:t}=e,r=se(e.attributes.collection),s=r?.scope?.includes("block")||void 0===r?.scope;return(0,h.jsx)(o.BlockControls,{children:s&&(0,h.jsx)($t,{openCollectionSelectionModal:t})})}const Gt=({preview:{setPreviewState:e,initialPreviewState:t}={},...s})=>{const d=(0,r.useRef)(!1),{clientId:m,attributes:p,setAttributes:g,location:w,isUsingReferencePreviewMode:b}=s,x=he();(({setPreviewState:e,location:t,attributes:s,setAttributes:i,isUsingReferencePreviewMode:a})=>{const{__unstableMarkNextChangeAsNotPersistent:d}=(0,c.useDispatch)(o.store),u=e=>{d(),i({__privatePreviewState:{...s.__privatePreviewState,...e}})},m=((e,t)=>t?e.type===n.iF.Product?(0,l.__)("Actual products will vary depending on the product being viewed.","woocommerce"):(0,l.__)("Actual products will vary depending on the page being viewed.","woocommerce"):"")(t,a);(0,r.useEffect)(()=>{a&&(d(),i({__privatePreviewState:{isPreview:m.length>0,previewMessage:m}}))},[i,m,a,d]),(0,r.useLayoutEffect)(()=>{if(!e&&!a)return;const o=e?.({setState:u,location:t,attributes:s});return o||void 0},[e]);const p=t.type===n.iF.Archive?t.sourceData?.termId:null;(0,r.useEffect)(()=>{if(!e&&!a){const e=t.type===n.iF.Archive&&null===p;d(),i({__privatePreviewState:{isPreview:!!e&&!!s?.query?.inherit,previewMessage:(0,l.__)("Actual products will vary depending on the page being viewed.","woocommerce")}})}},[s?.query?.inherit,m,p,t.type,i,e,a,d])})({setPreviewState:e,setAttributes:g,location:w,attributes:p,isUsingReferencePreviewMode:b});const f=(0,o.useBlockProps)(),y=(0,o.useInnerBlocksProps)({},{template:_.B8}),v=((e,t,s)=>{const n=(0,u.useInstanceId)(s),{getBlockParentsByBlockName:i}=(0,c.useSelect)(o.store);let a=n;return(0,r.useMemo)(()=>i(e,"core/block"),[i,e]).length>0&&(a=t.queryId),a})(m,p,Gt),k={..._.g2,query:{..._.g2.query,inherit:A(),filterable:N()},...p,queryId:v,...!!p.collection&&t&&{__privatePreviewState:t}};let j={};a.Hi.FIXED===p?.dimensions?.widthType&&p?.dimensions?.fixedWidth&&(j={maxWidth:p.dimensions.fixedWidth,margin:"0 auto"});const{__unstableMarkNextChangeAsNotPersistent:C}=(0,c.useDispatch)(o.store);return(0,r.useEffect)(()=>{C(),g(k),d.current=!0},[]),d.current=d.current||pe()(p,k),d.current?(0,h.jsxs)("div",{...f,children:[p.__privatePreviewState?.isPreview&&(x||s.isSelected)&&(0,h.jsx)(i.Button,{variant:"primary",size:"small",showTooltip:!0,label:p.__privatePreviewState?.previewMessage,className:"wc-block-product-collection__preview-button","data-testid":"product-collection-preview-button",children:"Preview"}),(0,h.jsx)(Ot,{...s}),(0,h.jsx)(zt,{...s}),(0,h.jsx)(Wt,{...s}),(0,h.jsx)("div",{...y,style:j})]}):null},qt=Gt,Ut=e=>{const{clientId:t,attributes:s,tracksLocation:n,closePatternSelectionModal:a}=e,{collection:u}=s,{replaceBlock:m}=(0,c.useDispatch)(o.store),[p,g]=(0,r.useState)(u),w=e=>{(0,d.yM)("blocks_product_collection_collection_replaced_from_placeholder",{action:e,location:n}),a()};return(0,h.jsx)(i.Modal,{overlayClassName:"wc-blocks-product-collection__modal",title:(0,l.__)("What products do you want to show?","woocommerce"),onRequestClose:()=>w("close"),size:"large",children:(0,h.jsxs)("div",{className:"wc-blocks-product-collection__content",children:[(0,h.jsx)(de,{chosenCollection:p,onCollectionClick:g}),(0,h.jsxs)("div",{className:"wc-blocks-product-collection__footer",children:[(0,h.jsx)(i.Button,{variant:"tertiary",onClick:()=>w("cancel"),children:(0,l.__)("Cancel","woocommerce")}),(0,h.jsx)(i.Button,{variant:"primary",onClick:()=>{p&&((0,d.yM)("blocks_product_collection_collection_replaced_from_placeholder",{from:u,to:p,location:n}),ce(p,t,m))},children:(0,l.__)("Continue","woocommerce")})]})]})})};var Yt=s(19432);const Zt=e=>{const{attributes:t,isDeletedProductReference:s}=e,c=(0,o.useBlockProps)(),n=se(t.collection);if(!n)return null;const a=s?(0,l.__)("Previously selected product is no longer available.","woocommerce"):(0,r.createInterpolateElement)((0,l.sprintf)(/* translators: %s: collection title */ /* translators: %s: collection title */ (0,l.__)("<strong>%s</strong> requires a product to be selected in order to display associated items.","woocommerce"),n.title),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)("div",{...c,children:(0,h.jsxs)(i.Placeholder,{className:"wc-block-editor-product-collection__product-picker",children:[(0,h.jsxs)(i.__experimentalHStack,{alignment:"center",children:[(0,h.jsx)(p.A,{icon:Yt.A,className:"wc-block-editor-product-collection__info-icon"}),(0,h.jsx)(i.__experimentalText,{children:a})]}),(0,h.jsx)(yt.A,{selected:t.query?.productReference,onChange:(o=[])=>{null!==(o[0]?.id??null)&&e.setAttributes({query:{...t.query,productReference:o[0].id}})},messages:{search:(0,l.__)("Select a product","woocommerce")}})]})})};var Jt=s(9537);const Xt=e=>{const{attributes:t,onDone:r}=e,s=(0,o.useBlockProps)(),c=se(t.collection),n=(t.query?.woocommerceHandPickedProducts||[]).map(Number),a=n.length>0;return c?(0,h.jsx)("div",{...s,children:(0,h.jsxs)(i.Placeholder,{className:"wc-block-editor-product-collection__product-picker",children:[(0,h.jsxs)("div",{className:"wc-block-editor-product-collection__product-picker-info",children:[(0,h.jsx)(p.A,{icon:Yt.A,className:"wc-block-editor-product-collection__info-icon"}),(0,h.jsx)("span",{children:(0,l.__)("Select products to display in this collection.","woocommerce")})]}),(0,h.jsxs)("div",{className:"wc-block-editor-product-collection__product-picker-selection",children:[(0,h.jsx)(Jt.A,{selected:n,onChange:(t=[])=>{const o=t.map(({id:e})=>String(e));j(e,{woocommerceHandPickedProducts:o})}}),(0,h.jsx)(i.Button,{variant:"primary",onClick:r,disabled:!a,children:(0,l.__)("Done","woocommerce")})]})]})}):null},Qt=e=>{switch(e){case a.M.BY_CATEGORY:return"product_cat";case a.M.BY_TAG:return"product_tag";case a.M.BY_BRAND:return"product_brand";default:return null}},Kt=e=>{switch(e){case a.M.BY_CATEGORY:return(0,l.__)("Display a grid of products from your selected categories.","woocommerce");case a.M.BY_TAG:return(0,l.__)("Display a grid of products from your selected tags.","woocommerce");case a.M.BY_BRAND:return(0,l.__)("Display a grid of products from your selected brands.","woocommerce");default:return(0,l.__)("Select taxonomy terms to display products from.","woocommerce")}},eo=e=>{switch(e){case a.M.BY_CATEGORY:return Y.A;case a.M.BY_TAG:return J.A;case a.M.BY_BRAND:return Q.A;default:return Y.A}},to=e=>{const{attributes:t,onDone:r}=e,s=(0,o.useBlockProps)(),c=se(t.collection),n=Qt(t.collection),d=n&&t.query?.taxQuery?.[n]||[],u=d.length>0;if(!c||!n)return null;const m=t=>{j(e,{taxQuery:{[n]:t}})};return(0,h.jsx)("div",{...s,children:(0,h.jsxs)(i.Placeholder,{icon:(0,h.jsx)(p.A,{icon:eo(t.collection),className:"block-editor-block-icon"}),label:c.title,children:[Kt(t.collection),(0,h.jsxs)("div",{className:"wc-block-editor-product-collection__taxonomy-picker-selection",children:[(()=>{switch(t.collection){case a.M.BY_CATEGORY:return(0,h.jsx)(Ue.A,{selected:d,onChange:(e=[])=>{const t=e.map(({id:e})=>e);m(t)}});case a.M.BY_TAG:return(0,h.jsx)(Ye.A,{selected:d,onChange:(e=[])=>{const t=e.map(({id:e})=>Number(e));m(t)}});case a.M.BY_BRAND:return(0,h.jsx)(tt,{selected:d,onChange:(e=[])=>{const t=e.map(({id:e})=>e);m(t)}});default:return null}})(),(0,h.jsx)(i.Button,{variant:"primary",onClick:r,disabled:!u,children:(0,l.__)("Done","woocommerce")})]})]})})};var oo=s(27496),ro=s(90194);(0,e.registerBlockType)(t,{icon:()=>(0,h.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 11H5C4.72386 11 4.5 11.2239 4.5 11.5V17.5C4.5 17.7761 4.72386 18 5 18H19C19.2761 18 19.5 17.7761 19.5 17.5V11.5C19.5 11.2239 19.2761 11 19 11ZM5 9.5H19C20.1046 9.5 21 10.3954 21 11.5V17.5C21 18.6046 20.1046 19.5 19 19.5H5C3.89543 19.5 3 18.6046 3 17.5V11.5C3 10.3954 3.89543 9.5 5 9.5Z",fill:"currentColor"}),(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 7.5C18 7.77614 17.7761 8 17.5 8L6.5 8C6.22386 8 6 7.77614 6 7.5V7.5C6 7.22386 6.22386 7 6.5 7L17.5 7C17.7761 7 18 7.22386 18 7.5V7.5Z",fill:"currentColor"}),(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 5C16 5.27614 15.7761 5.5 15.5 5.5L8.5 5.5C8.22386 5.5 8 5.27614 8 5V5C8 4.72386 8.22386 4.5 8.5 4.5L15.5 4.5C15.7761 4.5 16 4.72386 16 5V5Z",fill:"currentColor"})]}),edit:e=>{const{clientId:t,attributes:s,context:l}=e,d=(0,n.BF)(l,t),u=_e(l.templateSlug);(()=>{const e=he();(0,r.useEffect)(()=>{e&&re.forEach(e=>(0,m.__experimentalRegisterProductCollection)(e))},[e])})();const[p,g]=(0,r.useState)(!1),[w,_]=(0,r.useState)(!1),b=s.collection===a.M.HAND_PICKED,f=(s.query?.woocommerceHandPickedProducts?.length??0)>0,y=s.collection===a.M.BY_CATEGORY||s.collection===a.M.BY_TAG||s.collection===a.M.BY_BRAND,v=Qt(s.collection),k=!!v&&(s.query?.taxQuery?.[v]?.length??0)>0;(0,r.useEffect)(()=>{(b&&!f||y&&!k)&&_(!0)},[b,f,y,k]);const j=()=>_(!1),C=(0,c.useSelect)(e=>!!e(o.store).getBlocks(t).length,[t]),{productCollectionUIStateInEditor:S,isLoading:A}=(({location:e,usesReference:t,attributes:o,hasInnerBlocks:s})=>{const i=o.query?.productReference,{product:l,hasResolved:d}=(0,c.useSelect)(e=>{if(!i)return{product:null,hasResolved:!0};const{getEntityRecord:t,hasFinishedResolution:o}=e(x.store),r=["postType","product",i];return{product:t(...r),hasResolved:o("getEntityRecord",r)}},[i]);return{productCollectionUIStateInEditor:(0,r.useMemo)(()=>{const r=t?.includes(e.type),c=!!o.collection,d=t?.includes("product"),u=null!==(o.query?.productReference??null);if(c&&d&&!r&&!u)return a.Op.PRODUCT_REFERENCE_PICKER;if(c&&d&&!r&&u&&i&&(void 0===l||"trash"===l?.status))return a.Op.DELETED_PRODUCT_REFERENCE;const m=o.collection===a.M.HAND_PICKED,p=(o.query?.woocommerceHandPickedProducts?.length??0)>0;if(c&&m&&!p)return a.Op.HAND_PICKED_PRODUCTS_PICKER;const h=o.collection===a.M.BY_CATEGORY||o.collection===a.M.BY_TAG||o.collection===a.M.BY_BRAND;if(c&&h){let e;switch(o.collection){case a.M.BY_CATEGORY:e="product_cat";break;case a.M.BY_TAG:e="product_tag";break;case a.M.BY_BRAND:e="product_brand";break;default:e=""}if(!((o.query?.taxQuery?.[e]||[]).length>0))return a.Op.TAXONOMY_PICKER}if(r){const t=e.type===n.iF.Archive&&null!==(e.sourceData?.termId??null),o=e.type===n.iF.Product&&null!==(e.sourceData?.productId??null);if(!t&&!o&&!i)return a.Op.VALID_WITH_PREVIEW}return s||c?a.Op.VALID:a.Op.COLLECTION_PICKER},[e.type,e.sourceData?.termId,e.sourceData?.productId,t,o.collection,i,l,s,o.query?.productReference,o.query?.woocommerceHandPickedProducts,o.query?.taxQuery]),isLoading:!d}})({location:d,attributes:s,hasInnerBlocks:C,usesReference:e.usesReference});if(A)return(0,h.jsx)(i.Flex,{justify:"center",align:"center",children:(0,h.jsx)(i.Spinner,{})});const N={...e,openCollectionSelectionModal:()=>g(!0),location:d,isUsingReferencePreviewMode:S===a.Op.VALID_WITH_PREVIEW};return(0,h.jsxs)(h.Fragment,{children:[(()=>{if(w){if(b)return(0,h.jsx)(Xt,{...e,onDone:j});if(y)return(0,h.jsx)(to,{...e,onDone:j})}switch(S){case a.Op.COLLECTION_PICKER:return(0,h.jsx)(ue,{...e,tracksLocation:u});case a.Op.PRODUCT_REFERENCE_PICKER:return(0,h.jsx)(Zt,{...e,isDeletedProductReference:!1});case a.Op.DELETED_PRODUCT_REFERENCE:return(0,h.jsx)(Zt,{...e,isDeletedProductReference:!0});case a.Op.HAND_PICKED_PRODUCTS_PICKER:return(0,h.jsx)(Xt,{...e,onDone:j});case a.Op.TAXONOMY_PICKER:return(0,h.jsx)(to,{...e,onDone:j});case a.Op.VALID:case a.Op.VALID_WITH_PREVIEW:return(0,h.jsx)(qt,{...N});default:return(0,h.jsx)(ue,{...e,tracksLocation:u})}})(),p&&(0,h.jsx)(Ut,{clientId:t,attributes:s,tracksLocation:u,closePatternSelectionModal:()=>g(!1)})]})},save:function({attributes:{tagName:e="div"}}){const t=o.useBlockProps.save(),r=o.useInnerBlocksProps.save(t);return(0,h.jsx)(e,{...r})}}),(0,oo.Ay)(),(0,ro.Ay)(),oe.forEach(e=>(0,m.__experimentalRegisterProductCollection)(e)),(0,b.addFilter)("blocks.registerBlockType","woocommerce/add-product-collection-block-to-parent-array-of-pagination-block",(e,o)=>o!==_.AJ?e:e?.ancestor?{...e,ancestor:[...e.ancestor,t.name]}:e?.parent?{...e,parent:[...e.parent,t.name]}:e)})(),(()=>{"use strict";var e=s(74997),t=s(30046);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-collection-no-results","title":"No results","category":"woocommerce","description":"The contents of this block will display when there are no products found.","textdomain":"woocommerce","keywords":["Product Collection"],"usesContext":["queryId","query"],"ancestor":["woocommerce/product-collection"],"supports":{"interactivity":{"clientNavigation":true},"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"email":true}}');var r=s(94715),c=s(27723),n=s(10790);const i=[["core/group",{layout:{type:"flex",orientation:"vertical",justifyContent:"center",flexWrap:"wrap"}},[["core/paragraph",{textAlign:"center",fontSize:"medium",content:`<strong>${(0,c.__)("No results found","woocommerce")}</strong>`}],["core/paragraph",{content:`${(0,c.__)("You can try","woocommerce")} <a href="#" class="wc-link-clear-any-filters">${(0,c.__)("clearing any filters","woocommerce")}</a> ${(0,c.__)("or head to our","woocommerce")} <a href="#" class="wc-link-stores-home">${(0,c.__)("store's home","woocommerce")}</a>`}]]]];(0,e.registerBlockType)(o,{icon:t.A,edit:()=>{const e=(0,r.useBlockProps)({className:"wc-block-product-collection-no-results"});return(0,n.jsx)("div",{...e,children:(0,n.jsx)(r.InnerBlocks,{template:i})})},save:function(){return(0,n.jsx)(r.InnerBlocks.Content,{})}})})(),(()=>{"use strict";var e=s(60407);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-gallery","title":"Product Gallery","description":"Showcase your products relevant images and media.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":true,"interactivity":true,"layout":{"default":{"type":"flex","flexWrap":"nowrap","orientation":"horizontal"},"allowOrientation":true,"allowEditing":true,"allowJustification":false},"email":true},"textdomain":"woocommerce","usesContext":["postId"],"providesContext":{"hoverZoom":"hoverZoom","fullScreenOnClick":"fullScreenOnClick"},"ancestor":["woocommerce/single-product"],"attributes":{"hoverZoom":{"type":"boolean","default":true},"fullScreenOnClick":{"type":"boolean","default":true}},"viewScript":"wc-product-gallery-frontend","example":{},"viewScriptModule":"woocommerce/product-gallery","editorStyle":"file:../woocommerce/product-gallery-editor.css","style":"file:../woocommerce/product-gallery-style.css"}');var o=s(94715),r=s(47143),c=s(41616),n=s(62796),i=s(15703),a=s(4921),l=s(27723),d=s(56427),u=s(10790);const m=({attributes:e,setAttributes:t})=>{const{hoverZoom:r,fullScreenOnClick:s}=e;return(0,u.jsx)(o.InspectorControls,{children:(0,u.jsxs)(d.__experimentalToolsPanel,{label:(0,l.__)("Media Settings","woocommerce"),resetAll:()=>{t({hoverZoom:!0,fullScreenOnClick:!0})},children:[(0,u.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>!0!==r,label:(0,l.__)("Zoom while hovering","woocommerce"),onDeselect:()=>t({hoverZoom:!0}),isShownByDefault:!0,children:(0,u.jsx)(d.ToggleControl,{label:(0,l.__)("Zoom while hovering","woocommerce"),help:(0,l.__)("While hovering the image in the viewer will zoom in by 30%.","woocommerce"),checked:r,onChange:()=>t({hoverZoom:!r})})}),(0,u.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>!0!==s,label:(0,l.__)("Open pop-up when clicked","woocommerce"),onDeselect:()=>t({fullScreenOnClick:!0}),isShownByDefault:!0,children:(0,u.jsx)(d.ToggleControl,{label:(0,l.__)("Open pop-up when clicked","woocommerce"),help:(0,l.__)("Clicking on the image in the viewer will open a full-screen gallery experience.","woocommerce"),checked:s,onChange:()=>t({fullScreenOnClick:!s})})})]})})};var p=s(34903);const h=[["woocommerce/product-gallery-thumbnails"],["woocommerce/product-gallery-large-image",{},[["woocommerce/product-image",{showProductLink:!1,showSaleBadge:!1}],["woocommerce/product-sale-badge",{align:"right"}],["woocommerce/product-gallery-large-image-next-previous"]]]],g={width:"1",height:"1"},w=e=>"woocommerce/product-image"===e.name,_=e=>{for(const t of e){if(w(t))return t;const e=_(t.innerBlocks);if(e)return e}},b={...t,icon:()=>(0,u.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{d:"M19 3H5C4.4 3 4 3.4 4 4V11C4 11.5 4.4 12 5 12H19C19.5 12 20 11.6 20 11V4C20 3.4 19.6 3 19 3ZM5.5 10.5V10.1L7.3 8.8L8.6 9.6C8.9 9.8 9.3 9.8 9.5 9.5L11 8.1L13.4 10.5H5.5ZM18.5 10.5H15.6L11.6 6.5C11.3 6.2 10.8 6.2 10.5 6.5L8.9 8L7.7 7.2C7.4 7 7.1 7 6.8 7.2L5.5 8.2V4.5H18.5V10.5Z",fill:"currentColor"}),(0,u.jsx)("rect",{x:"4.75",y:"15.5",width:"5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,u.jsx)("rect",{x:"12.25",y:"15.5",width:"5",height:"4.5",rx:"1",stroke:"currentColor",strokeWidth:"1.5",fill:"none"})]}),edit:(0,c.withProductDataContext)(({clientId:e,attributes:t,setAttributes:s,context:c})=>{const{product:l,isLoading:d}=(0,n.useProductDataContext)(),w=l?.images||[],b=Boolean(c?.postId&&l?.id)&&!d&&w.length<=1,x=(0,i.getSetting)("thumbnailAspectRatio",null),f=(0,r.useSelect)(t=>{const r=_(t(o.store).getBlocks(e));return((e,t)=>{const{style:o,aspectRatio:r,imageSizing:s}=e??{};return(0,p.O)(o,r,t,s)})(r?.attributes,x)},[e,x]),y=(e=>{if(!e)return g;const t=e.split("/").map(e=>e.trim()).filter(Boolean);if(0===t.length||t.length>2)return g;const o=Number(t[0]),r=Number(t[1]??t[0]);return Number.isFinite(o)&&Number.isFinite(r)?{width:String(o),height:String(r)}:g})(f),v=(0,o.useBlockProps)({className:(0,a.A)("wc-block-product-gallery",{"wc-block-product-gallery--has-one-or-no-images":b}),style:{"--wc-block-product-gallery-large-image-ratio-width":y.width,"--wc-block-product-gallery-large-image-ratio-height":y.height}});return(0,u.jsxs)("div",{...v,children:[(0,u.jsx)(o.InspectorControls,{children:(0,u.jsx)(m,{attributes:t,setAttributes:s})}),(0,u.jsx)(o.InnerBlocks,{allowedBlocks:["woocommerce/product-gallery-large-image","woocommerce/product-gallery-thumbnails"],template:h})]})}),save:()=>{const e=o.useBlockProps.save({className:"wc-block-product-gallery"}),t=o.useInnerBlocksProps.save(e);return(0,u.jsx)("div",{...t})}};(0,e.W)(b,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(74997),t=s(10790);var o=s(94715);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-gallery-large-image","title":"Viewer","description":"Container for the current gallery image, navigation buttons, zoom functionality and more.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["postId","hoverZoom","fullScreenOnClick"],"supports":{"interactivity":true},"textdomain":"woocommerce","ancestor":["woocommerce/product-gallery"],"viewScriptModule":"woocommerce/product-gallery-large-image","editorStyle":"file:../woocommerce/product-gallery-large-image-editor.css"}');(0,e.registerBlockType)(r,{icon:()=>(0,t.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.22448 1.5L1.5 6.81504V11.7072L5.12953 9.06066C5.38061 8.87758 5.71858 8.86829 5.97934 9.0373L8.90601 10.9342L12.4772 7.46225C12.7683 7.17925 13.2317 7.17925 13.5228 7.46225L16.5 10.3568V2C16.5 1.72386 16.2761 1.5 16 1.5H6.22448ZM1.5 13.5636V16C1.5 16.2761 1.72386 16.5 2 16.5H16C16.2761 16.5 16.5 16.2761 16.5 16V12.4032L16.4772 12.4266L13 9.04603L9.52279 12.4266C9.27191 12.6706 8.88569 12.7086 8.59206 12.5183L5.59643 10.5766L1.5 13.5636ZM0 2C0 0.89543 0.895431 0 2 0H16C17.1046 0 18 0.895431 18 2V16C18 17.1046 17.1046 18 16 18H2C0.89543 18 0 17.1046 0 16V2Z",fill:"currentColor"})}),edit:()=>{const e=(0,o.useInnerBlocksProps)({className:"wc-block-product-gallery-large-image__inner-blocks"},{templateInsertUpdatesSelection:!0}),r=(0,o.useBlockProps)({className:"wc-block-product-gallery-large-image wc-block-editor-product-gallery-large-image"});return(0,t.jsx)("div",{...r,children:(0,t.jsx)("div",{...e})})},save:()=>{const e=o.useBlockProps.save({className:"wc-block-product-gallery-large-image__inner-blocks"}),r=o.useInnerBlocksProps.save(e);return(0,t.jsx)("div",{...r})}})})(),(()=>{"use strict";var e=s(74997),t=s(27723),o=s(4921),r=s(94715),c=s(10790);const n=({className:e})=>(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",fill:"none",className:e,children:(0,c.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.445 12.005.986 6 6.445-.005l1.11 1.01L3.014 6l4.54 4.995-1.109 1.01Z",clipRule:"evenodd"})}),i=({className:e})=>(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"12",fill:"none",className:e,children:(0,c.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.555-.004 7.014 6l-5.459 6.005-1.11-1.01L4.986 6 .446 1.005l1.109-1.01Z",clipRule:"evenodd"})}),a=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-gallery-large-image-next-previous","title":"Next/Previous Buttons","description":"Display next and previous buttons.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["iapi/provider"],"textdomain":"woocommerce","supports":{"interactivity":true,"color":{"background":true,"text":true,"__experimentalSkipSerialization":true},"align":true,"layout":{"default":{"type":"flex","flexWrap":"nowrap","verticalAlignment":"center"},"allowVerticalAlignment":true,"allowOrientation":false,"allowJustification":false},"shadow":true,"spacing":{"margin":true,"__experimentalSkipSerialization":true},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true}},"selectors":{"root":".wp-block-woocommerce-product-gallery-large-image-next-previous .wc-block-next-previous-buttons__button"},"ancestor":["woocommerce/product-gallery-large-image","woocommerce/product-collection"],"style":"file:../woocommerce/product-gallery-large-image-next-previous-style.css","editorStyle":"file:../woocommerce/product-gallery-large-image-next-previous-editor.css"}');(0,e.registerBlockType)(a,{icon:()=>(0,c.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.22448 1.5L1.5 6.81504V11.7072L5.12953 9.06066C5.38061 8.87758 5.71858 8.86829 5.97934 9.0373L8.90601 10.9342L12.4772 7.46225C12.7683 7.17925 13.2317 7.17925 13.5228 7.46225L16.5 10.3568V2C16.5 1.72386 16.2761 1.5 16 1.5H6.22448ZM1.5 13.5636V16C1.5 16.2761 1.72386 16.5 2 16.5H16C16.2761 16.5 16.5 16.2761 16.5 16V12.4032L16.4772 12.4266L13 9.04603L9.52279 12.4266C9.27191 12.6706 8.88569 12.7086 8.59206 12.5183L5.59643 10.5766L1.5 13.5636ZM0 2C0 0.89543 0.895431 0 2 0H16C17.1046 0 18 0.895431 18 2V16C18 17.1046 17.1046 18 16 18H2C0.89543 18 0 17.1046 0 16V2Z",fill:"#1E1E1E"})}),edit:({attributes:e})=>{const s=(e=>{const t=e?.layout?.verticalAlignment;return"top"===t?"aligntop":"bottom"===t?"alignbottom":""})(e),{style:a,...l}=(0,r.useBlockProps)({className:(0,o.A)("wc-block-next-previous-buttons",s)}),d=(0,r.__experimentalUseBorderProps)(e),u=(0,r.__experimentalUseColorProps)(e),m=(0,r.__experimentalGetSpacingClassesAndStyles)(e),p=(0,r.__experimentalGetShadowClassesAndStyles)(e),h=(0,o.A)("wc-block-next-previous-buttons__button",d.className,u.className,m.className,p.className),g={...a,...d.style,...u.style,...m.style,...p.style},w=(0,t.isRTL)(),_=w?i:n,b=w?n:i;return(0,c.jsxs)("div",{...l,children:[(0,c.jsx)("button",{className:h,style:g,disabled:!0,children:(0,c.jsx)(_,{className:"wc-block-next-previous-buttons__icon wc-block-next-previous-buttons__icon--left"})}),(0,c.jsx)("button",{className:h,style:g,children:(0,c.jsx)(b,{className:"wc-block-next-previous-buttons__icon wc-block-next-previous-buttons__icon--right"})})]})},save:()=>(0,c.jsx)("div",{...r.useBlockProps.save()})})})(),(()=>{"use strict";var e=s(74997),t=s(10790);var o=s(15703),r=s(94715),c=s(86087),n=s(97529),i=s(4921),a=s(27723),l=s(56427);let d=function(e){return e.OVERLAY="overlay",e.OUTLINE="outline",e}({});const u=({attributes:e,setAttributes:o})=>{const{thumbnailSize:r,aspectRatio:s,activeThumbnailStyle:c}=e,n=[{value:"",label:(0,a.__)("Select Aspect Ratio","woocommerce"),disabled:!0},{value:"auto",label:(0,a.__)("Auto","woocommerce")},{value:"1",label:(0,a.__)("Square - 1:1","woocommerce")},{value:"4/3",label:(0,a.__)("Standard - 4:3","woocommerce")},{value:"3/4",label:(0,a.__)("Portrait - 3:4","woocommerce")},{value:"3/2",label:(0,a.__)("Classic - 3:2","woocommerce")},{value:"2/3",label:(0,a.__)("Classic Portrait - 2:3","woocommerce")},{value:"16/9",label:(0,a.__)("Wide - 16:9","woocommerce")},{value:"9/16",label:(0,a.__)("Tall - 9:16","woocommerce")}],i=[{value:d.OVERLAY,label:(0,a.__)("Overlay","woocommerce")},{value:d.OUTLINE,label:(0,a.__)("Outline","woocommerce")}];return(0,t.jsxs)(l.__experimentalToolsPanel,{label:(0,a.__)("Settings","woocommerce"),resetAll:()=>{o({thumbnailSize:"25%",aspectRatio:"1",activeThumbnailStyle:d.OVERLAY})},children:[(0,t.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>"25%"!==r,label:(0,a.__)("Thumbnail Size","woocommerce"),onDeselect:()=>o({thumbnailSize:"25%"}),isShownByDefault:!0,children:(0,t.jsx)(l.__experimentalUnitControl,{label:(0,a.__)("Thumbnail Size","woocommerce"),value:r,onChange:e=>{const t=Number(e?.replace("%","")||25),r=Math.min(Math.max(t,10),50);o({thumbnailSize:r+"%"})},units:[{value:"%",label:"%"}],min:10,max:50,step:1,size:"default",__next40pxDefaultSize:!0,help:(0,a.__)("Choose the size of each thumbnail in respect to the product image. If thumbnails container size gets bigger than the product image, thumbnails will turn to slider.","woocommerce")})}),(0,t.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>"1"!==s,label:(0,a.__)("Aspect Ratio","woocommerce"),onDeselect:()=>o({aspectRatio:"1"}),isShownByDefault:!0,children:(0,t.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,multiple:!1,value:s,options:n,label:(0,a.__)("Aspect Ratio","woocommerce"),onChange:e=>{o({aspectRatio:e})},help:(0,a.__)("Applies the selected aspect ratio to product thumbnails.","woocommerce")})}),(0,t.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>c!==d.OVERLAY,label:(0,a.__)("Active Thumbnail Style","woocommerce"),onDeselect:()=>o({activeThumbnailStyle:d.OVERLAY}),isShownByDefault:!0,children:(0,t.jsx)(l.SelectControl,{__next40pxDefaultSize:!0,multiple:!1,value:c,options:i,label:(0,a.__)("Active Thumbnail Style","woocommerce"),onChange:e=>{e!==d.OVERLAY&&e!==d.OUTLINE||o({activeThumbnailStyle:e})},help:(0,a.__)("Choose how the active thumbnail is highlighted.","woocommerce")})})]})},m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-gallery-thumbnails","title":"Thumbnails","description":"Display the Thumbnails of a product.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["postId"],"textdomain":"woocommerce","ancestor":["woocommerce/product-gallery"],"attributes":{"thumbnailSize":{"type":"string","default":"25%"},"aspectRatio":{"type":"string","default":"1"},"activeThumbnailStyle":{"type":"string","default":"overlay"}},"supports":{"spacing":{"margin":true},"interactivity":true},"editorStyle":"file:../woocommerce/product-gallery-thumbnails-editor.css"}');(0,e.registerBlockType)(m,{icon:()=>(0,t.jsx)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.375 1.5H1.625C1.55596 1.5 1.5 1.55596 1.5 1.625V9.87895L4.35871 8.33965C4.5696 8.22609 4.82204 8.22009 5.03808 8.3235L7.42329 9.46513L10.3126 7.39076C10.574 7.20308 10.926 7.20308 11.1874 7.39076L13.5 9.05108V1.625C13.5 1.55596 13.444 1.5 13.375 1.5ZM13.5 10.8976L10.75 8.92328L7.93741 10.9426C7.71497 11.1023 7.42319 11.1281 7.1762 11.0098L4.73428 9.84105L1.5 11.5826V13.375C1.5 13.444 1.55596 13.5 1.625 13.5H13.375C13.444 13.5 13.5 13.444 13.5 13.375V10.8976ZM1.625 0C0.727537 0 0 0.727538 0 1.625V13.375C0 14.2725 0.727538 15 1.625 15H13.375C14.2725 15 15 14.2725 15 13.375V1.625C15 0.727537 14.2725 0 13.375 0H1.625ZM17.25 5V16C17.25 16.6909 16.6909 17.25 16.0011 17.25H3V18.75H16.0011C17.5204 18.75 18.75 17.5183 18.75 16V5H17.25Z",fill:"#1E1E1E"})}),edit:({attributes:e,setAttributes:s,context:a})=>{const{thumbnailSize:l,aspectRatio:d,activeThumbnailStyle:m}=e,{product:p}=(0,n.useProduct)(a.postId),h=p?.images||[],g=h.length<=1,w=!Boolean(a.postId&&p?.id),_=h.length>0?(e=>e.slice(0,10).map(e=>({src:e?.src,alt:e?.alt})))(h):Array(10).fill({src:o.PLACEHOLDER_IMG_SRC,alt:""}),b=w||!g,x=(0,c.useRef)(null),[f,y]=(0,c.useState)({bottom:!1,right:!1});(0,c.useEffect)(()=>{if(!b)return;const e=x.current;if(!e)return;const t=new ResizeObserver(()=>{const t=(e=>{if(!e)return{top:!1,bottom:!1,left:!1,right:!1};const{scrollTop:t,scrollHeight:o,clientHeight:r,scrollLeft:s,scrollWidth:c,clientWidth:n}=e;return{top:t>3,bottom:t+r<o-3,left:s>3,right:s+n<c-3}})(e);y(t)});return t.observe(e),e.parentElement&&t.observe(e.parentElement),()=>{t.disconnect()}},[b,l]);const v=Number(l.replace("%","")),k=(0,i.A)("wc-block-product-gallery-thumbnails",`wc-block-product-gallery-thumbnails--active-${m}`,{"wc-block-product-gallery-thumbnails--overflow-right":f.right,"wc-block-product-gallery-thumbnails--overflow-bottom":f.bottom}),j=(0,r.useBlockProps)({className:k,style:{"--wc-block-product-gallery-thumbnails-size":v}}),C={aspectRatio:d};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.InspectorControls,{children:(0,t.jsx)(u,{attributes:e,setAttributes:s})}),b&&(0,t.jsx)("div",{...j,children:(0,t.jsx)("div",{ref:x,className:"wc-block-product-gallery-thumbnails__scrollable",children:_.map(({src:e,alt:o},r)=>{const s=(0,i.A)("wc-block-product-gallery-thumbnails__thumbnail__image",{"wc-block-product-gallery-thumbnails__thumbnail__image--is-active":0===r});return(0,t.jsx)("div",{className:"wc-block-product-gallery-thumbnails__thumbnail",children:(0,t.jsx)("img",{className:s,src:e,alt:o,loading:"lazy",style:C})},r)})})})]})},save:()=>null})})(),(()=>{"use strict";var e=s(27723),t=s(74997),o=s(93450),r=s(5573),c=s(10790);const n=(0,c.jsx)(r.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)("path",{d:"M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",fill:"currentColor"})});var i=s(88664),a=s(94715),l=s(56427),d=s(84871),u=s.n(d),m=s(10525),p=s(1872),h=s(50376),g=s(84667),w=s(53829),_=s(15703);const b=({attributes:t,name:o,setAttributes:r})=>{const{categories:s,catOperator:n,columns:i,contentVisibility:d,rows:b,alignButtons:x,stockStatus:f,isPreview:y}=t;return y?w.i:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(a.InspectorControls,{children:[(0,c.jsx)(l.PanelBody,{title:(0,e.__)("Layout","woocommerce"),initialOpen:!0,children:(0,c.jsx)(p.A,{columns:i,rows:b,alignButtons:x,setAttributes:r,minColumns:(0,_.getSetting)("minColumns",1),maxColumns:(0,_.getSetting)("maxColumns",6),minRows:(0,_.getSetting)("minRows",1),maxRows:(0,_.getSetting)("maxRows",6)})}),(0,c.jsx)(l.PanelBody,{title:(0,e.__)("Content","woocommerce"),initialOpen:!0,children:(0,c.jsx)(m.A,{settings:d,onChange:e=>r({contentVisibility:e})})}),(0,c.jsx)(l.PanelBody,{title:(0,e.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,c.jsx)(g.A,{setAttributes:r,value:f})}),(0,c.jsx)(l.PanelBody,{title:(0,e.__)("Filter by Product Category","woocommerce"),initialOpen:!1,children:(0,c.jsx)(h.A,{selected:s,onChange:(e=[])=>{const t=e.map(({id:e})=>e);r({categories:t})},operator:n,onOperatorChange:(e="any")=>r({catOperator:e})})})]},"inspector"),(0,c.jsx)(l.Disabled,{children:(0,c.jsx)(u(),{block:o,attributes:t})})]})},x=JSON.parse('{"name":"woocommerce/product-new","title":"Newest Products","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of your newest products.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');(0,t.registerBlockType)(x,{title:(0,e.__)("Newest Products","woocommerce"),icon:{src:(0,c.jsx)(o.A,{icon:n,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--sparkles"})},attributes:{...i.A,...x.attributes},transforms:{from:[{type:"block",blocks:i.K.filter(e=>"woocommerce/product-new"!==e),transform:e=>(0,t.createBlock)("woocommerce/product-new",e)}]},edit:e=>{const t=(0,a.useBlockProps)();return(0,c.jsx)("div",{...t,children:(0,c.jsx)(b,{...e})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(86083),r=s(27723),c=s(56427),n=s(84871),i=s.n(n),a=s(53829),l=s(94715),d=s(10525),u=s(1872),m=s(50376),p=s(11474),h=s(84667),g=s(15703),w=s(10790);const _=e=>{const{attributes:t,setAttributes:o}=e,{categories:s,catOperator:n,columns:i,contentVisibility:a,rows:_,orderby:b,alignButtons:x,stockStatus:f}=t;return(0,w.jsxs)(l.InspectorControls,{children:[(0,w.jsx)(c.PanelBody,{title:(0,r.__)("Layout","woocommerce"),initialOpen:!0,children:(0,w.jsx)(u.A,{columns:i,rows:_,alignButtons:x,setAttributes:o,minColumns:(0,g.getSetting)("minColumns",1),maxColumns:(0,g.getSetting)("maxColumns",6),minRows:(0,g.getSetting)("minRows",1),maxRows:(0,g.getSetting)("maxRows",6)})}),(0,w.jsx)(c.PanelBody,{title:(0,r.__)("Content","woocommerce"),initialOpen:!0,children:(0,w.jsx)(d.A,{settings:a,onChange:e=>o({contentVisibility:e})})}),(0,w.jsx)(c.PanelBody,{title:(0,r.__)("Order By","woocommerce"),initialOpen:!1,children:(0,w.jsx)(p.A,{setAttributes:o,value:b})}),(0,w.jsx)(c.PanelBody,{title:(0,r.__)("Filter by Product Category","woocommerce"),initialOpen:!1,children:(0,w.jsx)(m.A,{selected:s,onChange:(e=[])=>{const t=e.map(({id:e})=>e);o({categories:t})},operator:n,onOperatorChange:(e="any")=>o({catOperator:e})})}),(0,w.jsx)(c.PanelBody,{title:(0,r.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,w.jsx)(h.A,{setAttributes:o,value:f})})]},"inspector")},b=()=>(0,w.jsx)(c.Placeholder,{icon:(0,w.jsx)(t.A,{icon:o.A}),label:(0,r.__)("On Sale Products","woocommerce"),className:"wc-block-product-on-sale",children:(0,r.__)("This block shows on-sale products. There are currently no discounted products in your store.","woocommerce")}),x=e=>{const{attributes:t,setAttributes:o,name:r}=e,s=(0,l.useBlockProps)();return t.isPreview?(0,w.jsx)("div",{...s,children:a.i}):(0,w.jsxs)("div",{...s,children:[(0,w.jsx)(_,{attributes:t,setAttributes:o}),(0,w.jsx)(c.Disabled,{children:(0,w.jsx)(i(),{block:r,attributes:t,EmptyResponsePlaceholder:b})})]})};s(21449);var f=s(88664);const y=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-on-sale","title":"On Sale Products","category":"woocommerce","description":"Display a grid of products currently on sale.","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"textdomain":"woocommerce","attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"orderby":{"type":"string","default":"date"}}}');(0,e.registerBlockType)(y,{icon:{src:(0,w.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...f.A,...y.attributes},transforms:{from:[{type:"block",blocks:f.K.filter(e=>"woocommerce/product-on-sale"!==e),transform:t=>(0,e.createBlock)("woocommerce/product-on-sale",t)}]},edit:e=>(0,w.jsx)(x,{...e}),save:()=>null})})(),(()=>{"use strict";var e=s(52619),t=s(86172),o=s(51442),r=s(94602),c=s(27723),n=s(94715),i=s(47143),a=s(73993),l=s(13817),d=s(74997),u=s(15703);const m=e=>"core/query"===e.name&&"woocommerce/product-query"===e.attributes.namespace,p=(e,t)=>{let o=[];return e.forEach(e=>{t(e)&&(o=[...o,e.clientId]),o=[...o,...p(e.innerBlocks,t)]}),o},h=(0,u.getSettingWithCoercion)("postTemplateHasSupportForGridView",!1,a.isBoolean);var g=s(59826),w=s(39842);const _=({name:e,attributes:t})=>"core/post-template"===e&&"woocommerce/product-query/product-template"===t.__woocommerceNamespace,b=e=>"grid"===e?w.BX.GRID:"default"===e?w.BX.STACK:w.BX.GRID,x=e=>e.map(e=>{const{name:t,attributes:o}=e,r=x(e.innerBlocks);return _(e)?((e,t)=>{const{__woocommerceNamespace:o,className:r,layout:s,...c}=e.attributes;return(0,d.createBlock)("woocommerce/product-template",c,t)})(e,r):(({name:e,attributes:t})=>"core/post-title"===e&&"woocommerce/product-query/product-title"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:o,...r}=e.attributes;return(0,d.createBlock)("core/post-title",{__woocommerceNamespace:"woocommerce/product-collection/product-title",...r},t)})(e,r):(({name:e,attributes:t})=>"core/post-excerpt"===e&&"woocommerce/product-query/product-summary"===t.__woocommerceNamespace)(e)?((e,t)=>{const{__woocommerceNamespace:o,...r}=e.attributes;return(0,d.createBlock)("core/post-excerpt",{__woocommerceNamespace:"woocommerce/product-collection/product-summary",...r},t)})(e,r):(0,d.createBlock)(t,o,r)}),f=e=>{const t=(0,i.select)("core/block-editor").getBlock(e),o=(e=>{const t=(0,i.select)("core/block-editor").getBlockRootClientId(e)||void 0;return(0,i.select)("core/block-editor").canInsertBlockType("woocommerce/product-collection",t)})(e);if(t&&o){const{attributes:o={},innerBlocks:r=[]}=t,s=((e,t)=>{const o=t.find(_),{layout:r}=o?.attributes||{};return h?(e=>{if(void 0===e)return g.g2.displayLayout;const{type:t,columnCount:o}=e;return{type:b(t),columns:o}})(r):e.displayLayout})(o,r),c=(e=>{const{query:t,namespace:o,...r}=e,{__woocommerceAttributes:s,__woocommerceStockStatus:c,__woocommerceOnSale:n,include:i,...a}=t;return{...r,query:{woocommerceAttributes:s,woocommerceStockStatus:c,woocommerceOnSale:n,woocommerceHandPickedProducts:i,taxQuery:{},isProductCollectionBlock:!0,...a},convertedFromProducts:!0}})({...o,displayLayout:s}),n=x(r),a=(0,d.createBlock)("woocommerce/product-collection",c,n);return(0,i.dispatch)("core/block-editor").replaceBlock(e,a),!0}return!1},y=()=>{(()=>{if(0===(0,i.select)("core/block-editor").getGlobalBlockCount("core/query"))return;const e=(t=(0,i.select)("core/block-editor").getBlocks(),p(t,m));var t;0!==e.length&&(e=>{const t=e.map(f);t.length&&t.every(e=>!!e)})(e)})()};var v=s(56427),k=s(15937),j=s(20048);let C=function(e){return e.PRODUCT_QUERY="woocommerce/product-query",e.RELATED_PRODUCTS="woocommerce/related-products",e}({});function S(e,t){const{query:o}=e.attributes;e.setAttributes({query:{...o,...t}})}var A=s(86087),N=s(7971),P=s(10790);const B=[{key:"title/asc",name:(0,c.__)("Sorted by title","woocommerce")},{key:"date/desc",name:(0,c.__)("Newest","woocommerce")},{key:"popularity/desc",name:(0,c.__)("Best Selling","woocommerce")},{key:"rating/desc",name:(0,c.__)("Top Rated","woocommerce")}];function I(e){const{query:t}=e.attributes;return(0,P.jsxs)(v.PanelBody,{className:"woocommerce-product-query-panel__sort",title:(0,c.__)("Popular Filters","woocommerce"),initialOpen:!0,children:[(0,P.jsx)("p",{children:(0,c.__)("Arrange products by popular pre-sets.","woocommerce")}),(0,P.jsx)(v.CustomSelectControl,{hideLabelFromVision:!0,label:(0,c.__)("Choose among these pre-sets","woocommerce"),onChange:t=>{if(!t.selectedItem?.key)return;const[o,r]=t.selectedItem?.key?.split("/");S(e,{order:r,orderBy:o})},options:B,value:B.find(e=>e.key===`${t.orderBy}/${t.order}`)})]})}var T=s(58326),E=s(33079),R=s(37757),D=s(4731);const L=e=>{const t=(0,A.createInterpolateElement)((0,c.__)("Upgrade all Products blocks on this page to <strongText /> for more features!","woocommerce"),{strongText:(0,P.jsx)("strong",{children:(0,c.__)("Product Collection","woocommerce")})}),o=(0,c.__)("Upgrade to Product Collection","woocommerce");return(0,P.jsx)(D.u,{isDismissible:!1,actionLabel:o,onActionClick:()=>{e.upgradeBlock(),(0,R.yM)("blocks_product_collection_migration_between_products_beta",{transform_to:"product_collection"})},children:t})};s(61404);var O=s(51609);const M=j._v.map(e=>`__woocommerce${e[0].toUpperCase()}${e.slice(1)}`);function V(e){const t="string"==typeof e?e:e.value;return Object.entries(j.PL).find(([,e])=>e===t)?.[0]}const F={attributes:e=>{const{query:t}=e.attributes,[o,r]=(0,A.useState)([]);return(0,A.useEffect)(()=>{t.__woocommerceAttributes&&r(t.__woocommerceAttributes.map(({termId:e})=>({id:e})))},[t.__woocommerceAttributes]),(0,P.jsxs)(v.__experimentalToolsPanelItem,{label:(0,c.__)("Product Attributes","woocommerce"),hasValue:()=>t.__woocommerceAttributes?.length,children:[(0,P.jsx)(N.A,{messages:{search:(0,c.__)("Attributes","woocommerce")},selected:o,onChange:t=>{const o=t.map(({id:e,value:t})=>({termId:e,taxonomy:t}));S(e,{__woocommerceAttributes:o})},operator:"any",isCompact:!0,type:"token"}),(0,P.jsx)(v.ExternalLink,{className:"woocommerce-product-query-panel__external-link",href:j.RC,children:(0,c.__)("Manage attributes","woocommerce")})]})},onSale:e=>{const{query:t}=e.attributes;return(0,P.jsx)(v.__experimentalToolsPanelItem,{label:(0,c.__)("Sale status","woocommerce"),hasValue:()=>t.__woocommerceOnSale,children:(0,P.jsx)(v.ToggleControl,{label:(0,c.__)("Show only products on sale","woocommerce"),checked:t.__woocommerceOnSale||!1,onChange:t=>{S(e,{__woocommerceOnSale:t})}})})},productSelector:e=>{const{query:t}=e.attributes,o=function(){const[e,t]=(0,A.useState)([]);return(0,A.useEffect)(()=>{(0,T.d$)({selected:[]}).then(e=>{t(e)})},[]),e}();return(0,P.jsx)(v.__experimentalToolsPanelItem,{label:(0,c.__)("Hand-picked Products","woocommerce"),hasValue:()=>t.include?.length,children:(0,P.jsx)(v.FormTokenField,{disabled:!o.length,displayTransform:e=>Number.isNaN(Number(e))?e:o.find(t=>t.id===Number(e))?.name||"",label:(0,c.__)("Pick some products","woocommerce"),onChange:t=>{const r=t.map(e=>o.find(t=>t.name===e||t.id===Number(e))?.id).filter(Boolean).map(String);if(!r.length&&e.attributes.query.include){const t=(0,E.X)(e.attributes.query,"include");S({...e,attributes:{...e.attributes,query:t}},{})}else S(e,{include:r})},suggestions:o.map(e=>e.name),validateInput:e=>o.find(t=>t.name===e),value:o.length?t?.include||[]:[(0,c.__)("Loading…","woocommerce")],__experimentalExpandOnFocus:!0})})},stockStatus:e=>{const{query:t}=e.attributes;return(0,P.jsx)(v.__experimentalToolsPanelItem,{label:(0,c.__)("Stock status","woocommerce"),hasValue:()=>t.__woocommerceStockStatus,children:(0,P.jsx)(v.FormTokenField,{label:(0,c.__)("Stock status","woocommerce"),onChange:t=>{const o=t.map(V).filter(Boolean);S(e,{__woocommerceStockStatus:o})},suggestions:Object.values(j.PL),validateInput:e=>Object.values(j.PL).includes(e),value:t?.__woocommerceStockStatus?.map(e=>j.PL[e])||[],__experimentalExpandOnFocus:!0})})},wooInherit:e=>{const t=(0,l.Z)(e.attributes.query,e=>!1===e.inherit);return(0,P.jsx)(v.ToggleControl,{className:"woo-inherit-query-toggle",label:(0,c.__)("Inherit query from template","woocommerce"),help:(0,c.__)("Toggle to use the global query context that is set with the current template, such as variations of the product catalog or search. Disable to customize the filtering independently.","woocommerce"),checked:e.attributes.query.inherit||!1,onChange:o=>{const r={inherit:o};o&&(r.perPage=(0,u.getSettingWithCoercion)("loopShopPerPage",12,a.isNumber)),S(e,{...e.defaultWooQueryParams,...r,...!1===o&&{...t}})}})}},H=e=>{const t=function(e){const t=(0,i.useSelect)(t=>t(d.store).getActiveBlockVariation(j.SV,e)?.allowedControls,[e]);return Array.isArray(t)?(0,k.I)()?function(e){return e.query.inherit}(e)?t.filter(e=>"wooInherit"===e):t:t.filter(e=>"wooInherit"!==e):[]}(e.attributes),o=function(e){const t=(0,i.useSelect)(t=>t("core/blocks").getBlockVariations(j.SV).find(t=>t.name===e)?.attributes);return t?Object.assign({},...M.map(e=>({[e]:t.query[e]}))):{}}(e.attributes.namespace),r=!((s=e).name===j.SV&&s.attributes.namespace===C.RELATED_PRODUCTS);var s;return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(n.InspectorControls,{children:[r&&(0,P.jsx)(L,{upgradeBlock:y}),t?.includes("presets")&&(0,P.jsx)(I,{...e}),r&&(0,P.jsx)(v.__experimentalToolsPanel,{className:"woocommerce-product-query-toolspanel",label:(0,c.__)("Advanced Filters","woocommerce"),resetAll:()=>{S(e,o)},children:Object.entries(F).map(([r,s])=>t?.includes(r)?(0,O.createElement)(s,{...e,defaultWooQueryParams:o,key:r}):null)})]})})};(0,e.addFilter)("editor.BlockEdit",j.SV,e=>t=>{return(o=t).name===j.SV&&Object.values(C).includes(o.attributes.namespace)?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(H,{...t}),(0,P.jsx)(e,{...t})]}):(0,P.jsx)(e,{...t});var o}),s(48286);var z=s(40177),$=s(29283);const W=["archive-product","taxonomy-product_cat","taxonomy-product_tag","taxonomy-product_brand","taxonomy-product_attribute","product-search-results"],G=e=>{(0,d.registerBlockVariation)(j.SV,{description:(0,c.__)("A block that displays a selection of products in your store.","woocommerce"),name:j.Rs, /* translators: "Products" is the name of the block. */ title:(0,c.__)("Products (Deprecated)","woocommerce"),isActive:e=>e.namespace===j.Rs,icon:(0,P.jsx)(v.Icon,{icon:z.A,className:"wc-block-editor-components-block-icon wc-block-editor-components-block-icon--stacks"}),attributes:{...e,namespace:j.Rs},allowedControls:j.Yf,innerBlocks:j.B8,scope:[]})};let q;(0,i.subscribe)(()=>{const e=q;if(q=(0,i.select)($.Y)?.getEditedPostSlug?.(),e!==q&&(0,k.I)()){const e=W.some(e=>!!(0,a.isString)(q)&&q.includes(e)),t={inherit:e};e&&(t.perPage=(0,u.getSettingWithCoercion)("loopShopPerPage",12,a.isNumber));const o={...j.X2,query:{...j.X2.query,...t}};(0,d.unregisterBlockVariation)(j.SV,j.Rs),G(o)}},"core/edit-site");let U=!1;(0,i.subscribe)(()=>{U||(U=!0,G(j.X2))},"core/edit-post"),s(65448);const Y=[o.a,r.a,t.a];(0,e.addFilter)("blocks.registerBlockType","core/custom-class-name/attribute",function(e,t){return Y.includes(t)&&(e.attributes={...e.attributes,__woocommerceNamespace:{type:"string"}}),e})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(81475);const r=JSON.parse('{"name":"woocommerce/product-results-count","title":"Product Results Count","description":"Display the number of products on the archive page or search result page.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"color":{"text":true,"background":false},"typography":{"fontSize":true}},"usesContext":["queryId"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(27723),i=s(10790);s(74342),(0,e.registerBlockType)(r,{icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,c.useBlockProps)({className:"woocommerce wc-block-product-results-count"});return(0,i.jsx)("div",{...e,children:(0,i.jsx)("p",{className:"woocommerce-result-count",children:(0,n.__)("Showing 1-X of X results","woocommerce")})})},save:()=>null})})(),(()=>{"use strict";var e=s(52619),t=s(94715),o=s(47143),r=s(27723),c=s(93450),n=s(71460),i=s(56427),a=s(74997),l=(s(42434),s(86087));const d="core/search",u="woocommerce/product-search";let m=function(e){return e.OUTSIDE="button-outside",e.INSIDE="button-inside",e.NO_BUTTON="no-button",e.BUTTON_ONLY="button-only",e.INPUT_AND_BUTTON="input-and-button",e}({});function p(e){return"button-outside"===e||"button-inside"===e}function h(e){return p(e)?m.INPUT_AND_BUTTON:e}function g(e){return p(e)?e:m.OUTSIDE}var w=s(10790);const _=e=>{const{attributes:o,setAttributes:s}=e,{buttonPosition:c,buttonUseIcon:n,showLabel:a}=o,[d,u]=(0,l.useState)(c);return(0,l.useEffect)(()=>{p(c)&&d!==c&&u(c)},[c,d]),(0,w.jsx)(t.InspectorControls,{group:"styles",children:(0,w.jsxs)(i.PanelBody,{title:(0,r.__)("Styles","woocommerce"),children:[(0,w.jsx)(i.RadioControl,{selected:h(c),options:[{label:(0,r.__)("Input and button","woocommerce"),value:m.INPUT_AND_BUTTON},{label:(0,r.__)("Input only","woocommerce"),value:m.NO_BUTTON},{label:(0,r.__)("Button only","woocommerce"),value:m.BUTTON_ONLY}],onChange:e=>{if(e!==m.INPUT_AND_BUTTON)s({buttonPosition:e});else{const e=g(d);s({buttonPosition:e})}}}),c!==m.NO_BUTTON&&(0,w.jsxs)(w.Fragment,{children:[c!==m.BUTTON_ONLY&&(0,w.jsxs)(i.__experimentalToggleGroupControl,{label:(0,r.__)("BUTTON POSITION","woocommerce"),isBlock:!0,onChange:e=>{s({buttonPosition:e})},value:g(c),children:[(0,w.jsx)(i.__experimentalToggleGroupControlOption,{value:m.INSIDE,label:(0,r.__)("Inside","woocommerce")}),(0,w.jsx)(i.__experimentalToggleGroupControlOption,{value:m.OUTSIDE,label:(0,r.__)("Outside","woocommerce")})]}),(0,w.jsxs)(i.__experimentalToggleGroupControl,{label:(0,r.__)("BUTTON APPEARANCE","woocommerce"),isBlock:!0,onChange:e=>{s({buttonUseIcon:e})},value:n,children:[(0,w.jsx)(i.__experimentalToggleGroupControlOption,{value:!1,label:(0,r.__)("Text","woocommerce")}),(0,w.jsx)(i.__experimentalToggleGroupControlOption,{value:!0,label:(0,r.__)("Icon","woocommerce")})]})]}),(0,w.jsx)(i.ToggleControl,{label:(0,r.__)("Show input label","woocommerce"),checked:a,onChange:e=>s({showLabel:e})})]})})};var b=s(4921),x=s(15703);const f=({attributes:{label:e,placeholder:t,formId:o,className:s,hasLabel:c,align:n}})=>{const i=(0,b.A)("wc-block-product-search",n?"align"+n:"",s);return(0,w.jsx)("div",{className:i,children:(0,w.jsxs)("form",{role:"search",method:"get",action:x.HOME_URL,children:[(0,w.jsx)("label",{htmlFor:o,className:c?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text",children:e}),(0,w.jsxs)("div",{className:"wc-block-product-search__fields",children:[(0,w.jsx)("input",{type:"search",id:o,className:"wc-block-product-search__field",placeholder:t,name:"s"}),(0,w.jsx)("input",{type:"hidden",name:"post_type",value:"product"}),(0,w.jsx)("button",{type:"submit",className:"wc-block-product-search__button","aria-label":(0,r.__)("Search","woocommerce"),children:(0,w.jsx)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",children:(0,w.jsx)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})})})]})]})})},y={hasLabel:{type:"boolean",default:!0},label:{type:"string",default:(0,r.__)("Search","woocommerce")},placeholder:{type:"string",default:(0,r.__)("Search products…","woocommerce")},formId:{type:"string",default:""}},v={label:y.label.default,buttonText:y.label.default,placeholder:y.placeholder.default,query:{post_type:"product"},namespace:u};(0,a.registerBlockType)(u,{title:(0,r.__)("Product Search","woocommerce"),apiVersion:3,icon:{src:(0,w.jsx)(c.A,{icon:n.A,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,r.__)("WooCommerce","woocommerce")],description:(0,r.__)("A search box to allow customers to search for products by keyword.","woocommerce"),supports:{align:["wide","full"],inserter:!1},attributes:y,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>"woocommerce_product_search"===e&&!!t?.raw,transform:({instance:e})=>(0,a.createBlock)(u,{label:e.raw.title||v.label})}]},deprecated:[{attributes:y,save:e=>(0,w.jsx)("div",{children:(0,w.jsx)(f,{...e})})}],edit:({clientId:e})=>{const{replaceBlocks:s}=(0,o.useDispatch)(t.store),c=(0,o.useSelect)(t=>t("core/block-editor").getBlockAttributes(e),[e]),n=[(0,w.jsx)(i.Button,{onClick:()=>{s(e,(0,a.createBlock)("core/search",{label:c?.label||v.label,buttonText:v.buttonText,placeholder:c?.placeholder||v.placeholder,query:v.query}))},variant:"primary",children:(0,r.__)("Upgrade Block","woocommerce")},"update")];return(0,w.jsx)(t.Warning,{actions:n,className:"wc-block-components-actions",children:(0,r.__)("This version of the Product Search block is outdated. Upgrade to continue using.","woocommerce")})},save:()=>null}),(0,e.addFilter)("blocks.registerBlockType",u,function(e,t){return"core/search"===t&&(e.attributes={...e.attributes,namespace:{type:"string"}}),e}),(0,a.registerBlockVariation)("core/search",{name:u,title:(0,r.__)("Product Search","woocommerce"),icon:{src:(0,w.jsx)(c.A,{icon:n.A,className:"wc-block-editor-components-block-icon"})},isActive:(e,t)=>e.query?.post_type===t.query.post_type,category:"woocommerce",keywords:[(0,r.__)("WooCommerce","woocommerce")],description:(0,r.__)("A search box to allow customers to search for products by keyword.","woocommerce"),attributes:v}),(0,e.addFilter)("editor.BlockEdit",d,e=>t=>function(e){return e.name===d&&e.attributes?.namespace===u}(t)?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_,{...t}),(0,w.jsx)(e,{...t})]}):(0,w.jsx)(e,{...t}))})(),(()=>{"use strict";var e=s(74997),t=s(15703),o=s(93450),r=s(17230);const c=JSON.parse('{"name":"woocommerce/product-tag","title":"Products by Tag","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of products with selected tags.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"tags":{"type":"array","default":[]},"tagOperator":{"type":"string","default":"any"},"orderby":{"type":"string","default":"date"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var n=s(94715),i=s(84871),a=s.n(i),l=s(27723),d=s(56427),u=s(86087),m=s(10525),p=s(1872),h=s(6479),g=s(11474),w=s(84667),_=s(53829),b=s(73993),x=s(10790);const f=(0,d.withSpokenMessages)(({attributes:e,name:s,setAttributes:c,debouncedSpeak:i})=>{const[f,y]=(0,u.useState)({}),[v,k]=(0,u.useState)(!1);(0,u.useEffect)(()=>{e.tags.length||k(!0)},[e.tags.length]);const j=()=>{k(!1),y({})};return e.isPreview?_.i:(0,t.getSetting)("hasTags",!0)?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.BlockControls,{children:(0,x.jsx)(d.ToolbarGroup,{controls:[{icon:"edit",title:(0,l.__)("Edit selected tags","woocommerce"),onClick:()=>v?j():(k(!0),void y({})),isActive:v}]})}),(()=>{const{columns:o,tagOperator:r,contentVisibility:s,orderby:i,rows:a,alignButtons:u,stockStatus:_}=e;return(0,x.jsxs)(n.InspectorControls,{children:[(0,x.jsx)(d.PanelBody,{title:(0,l.__)("Product Tag","woocommerce"),initialOpen:!e.tags.length&&!v,children:(0,x.jsx)(h.A,{selected:e.tags,onChange:(e=[])=>{const t=e.map(({id:e})=>e);c({tags:t})},operator:r,onOperatorChange:(e="any")=>c({tagOperator:e}),isCompact:!0})}),(0,x.jsx)(d.PanelBody,{title:(0,l.__)("Layout","woocommerce"),initialOpen:!0,children:(0,x.jsx)(p.A,{columns:o,rows:a,alignButtons:u,setAttributes:c,minColumns:(0,t.getSettingWithCoercion)("minColumns",1,b.isNumber),maxColumns:(0,t.getSettingWithCoercion)("maxColumns",6,b.isNumber),minRows:(0,t.getSettingWithCoercion)("minRows",6,b.isNumber),maxRows:(0,t.getSettingWithCoercion)("maxRows",6,b.isNumber)})}),(0,x.jsx)(d.PanelBody,{title:(0,l.__)("Content","woocommerce"),initialOpen:!0,children:(0,x.jsx)(m.A,{settings:s,onChange:e=>c({contentVisibility:e})})}),(0,x.jsx)(d.PanelBody,{title:(0,l.__)("Order By","woocommerce"),initialOpen:!1,children:(0,x.jsx)(g.A,{setAttributes:c,value:i})}),(0,x.jsx)(d.PanelBody,{title:(0,l.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,x.jsx)(w.A,{setAttributes:c,value:_})})]},"inspector")})(),v?(()=>{const t={...e,...f};return(0,x.jsxs)(d.Placeholder,{icon:(0,x.jsx)(o.A,{icon:r.A,className:"block-editor-block-icon"}),label:(0,l.__)("Products by Tag","woocommerce"),className:"wc-block-products-grid wc-block-product-tag",children:[(0,l.__)("Display a grid of products from your selected tags.","woocommerce"),(0,x.jsxs)("div",{className:"wc-block-product-tag__selection",children:[(0,x.jsx)(h.A,{selected:t.tags,onChange:(e=[])=>{const t=e.map(({id:e})=>e);y({...f,tags:t})},operator:t.tagOperator,onOperatorChange:(e="any")=>y({...f,tagOperator:e})}),(0,x.jsx)(d.Button,{variant:"primary",onClick:()=>{c(f),j(),i((0,l.__)("Showing Products by Tag block preview.","woocommerce"))},children:(0,l.__)("Done","woocommerce")}),(0,x.jsx)(d.Button,{className:"wc-block-product-tag__cancel-button",variant:"tertiary",onClick:()=>{j(),i((0,l.__)("Showing Products by Tag block preview.","woocommerce"))},children:(0,l.__)("Cancel","woocommerce")})]})]})})():(()=>{const t=e.tags.length;return(0,x.jsx)(d.Disabled,{children:t?(0,x.jsx)(a(),{block:s,attributes:e}):(0,x.jsx)(d.Placeholder,{icon:(0,x.jsx)(o.A,{icon:r.A,className:"block-editor-block-icon"}),label:(0,l.__)("Products by Tag","woocommerce"),className:"wc-block-products-grid wc-block-product-tag",children:(0,l.__)("This block displays products from selected tags. Select at least one tag to display its products.","woocommerce")})})})()]}):(0,x.jsx)(d.Placeholder,{icon:(0,x.jsx)(o.A,{icon:r.A,className:"block-editor-block-icon"}),label:(0,l.__)("Products by Tag","woocommerce"),className:"wc-block-products-grid wc-block-product-tag",children:(0,l.__)("This block displays products from selected tags. To use it you first need to create products and assign tags to them.","woocommerce")})});s(75152),(0,e.registerBlockType)(c,{icon:{src:(0,x.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},attributes:{...c.attributes,columns:{type:"number",default:(0,t.getSetting)("defaultColumns",3)},rows:{type:"number",default:(0,t.getSetting)("defaultRows",3)},tags:{type:"array",default:[]},stockStatus:{type:"array",default:Object.keys((0,t.getSetting)("stockStatusOptions",[]))}},edit:e=>{const t=(0,n.useBlockProps)();return(0,x.jsx)("div",{...t,children:(0,x.jsx)(f,{...e})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-template","title":"Product Template","category":"woocommerce","description":"Contains the block elements used to render a product.","keywords":["WooCommerce"],"textdomain":"woocommerce","usesContext":["queryId","query","queryContext","displayLayout","templateSlug","postId","queryContextIncludes","collection","__privateProductCollectionPreviewState"],"supports":{"interactivity":true,"inserter":false,"reusable":false,"html":false,"align":["wide","full"],"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowEditing":false,"allowSwitching":false,"allowInheriting":false,"allowSizingOnChildren":false,"allowVerticalAlignment":false},"email":true},"editorStyle":"file:../woocommerce/product-template-editor.css","style":"file:../woocommerce/product-template-style.css"}');var o=s(4921),r=s(86087),c=s(47143),n=s(27723),i=s(94715),a=s(56427),l=s(3582),d=s(15703),u=s(73993),m=s(62796),p=s(98945),h=s(6408),g=s(59826);const w="9.99",_=()=>String(Math.round(parseFloat(w)*Math.pow(10,d.SITE_CURRENCY.minorUnit))),b=e=>{const t=(0,n.__)("Product name","woocommerce"),o=_();return{id:e,name:t,parent:0,type:"simple",variation:"",permalink:"",sku:"",slug:`placeholder-product-${e}`,short_description:"",description:"",on_sale:!1,prices:{currency_code:d.SITE_CURRENCY.code,currency_symbol:d.SITE_CURRENCY.symbol,currency_minor_unit:d.SITE_CURRENCY.minorUnit,currency_decimal_separator:d.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:d.SITE_CURRENCY.thousandSeparator,currency_prefix:d.SITE_CURRENCY.prefix,currency_suffix:d.SITE_CURRENCY.suffix,price:o,regular_price:o,sale_price:o,price_range:null},price_html:"",average_rating:"0",review_count:0,images:[],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!1,is_in_stock:!0,is_on_backorder:!1,low_stock_remaining:null,stock_availability:{text:"",class:""},sold_individually:!1,weight:"",dimensions:{length:"",width:"",height:""},formatted_weight:"",formatted_dimensions:"",price:w,regular_price:w,sale_price:"",add_to_cart:{text:(0,n.__)("Add to cart","woocommerce"),description:(0,n.__)("Add to cart","woocommerce"),url:"",minimum:1,maximum:99,multiple_of:1,single_text:(0,n.__)("Add to cart","woocommerce")},grouped_products:[]}};var x=s(10790);const f=["collection"],y=()=>{const e=(0,i.useInnerBlocksProps)({className:"wc-block-product"},{__unstableDisableLayoutClassNames:!0});return(0,x.jsx)("li",{...e})},v=(0,r.memo)(({blocks:e,blockContextId:t,isHidden:o,setActiveBlockContextId:r})=>{const s=(0,i.__experimentalUseBlockPreview)({blocks:e,props:{className:"wc-block-product"}}),c=()=>{r(t)},n={display:o?"none":void 0};return(0,x.jsx)("li",{...s,tabIndex:0,role:"button",onClick:c,onKeyPress:c,style:n})}),k=({displayTemplate:e,blocks:t,blockContext:o,setActiveBlockContextId:r})=>(0,x.jsxs)(i.BlockContextProvider,{value:o,children:[e?(0,x.jsx)(y,{}):null,(0,x.jsx)(v,{blocks:t,blockContextId:o.postId,setActiveBlockContextId:r,isHidden:e})]},o.postId),j=(0,p.A)(({isLoading:e,product:t,displayTemplate:o,blocks:r,blockContext:s,setActiveBlockContextId:c})=>(0,x.jsx)(i.BlockContextProvider,{value:s,children:(0,x.jsxs)(m.ProductDataContextProvider,{product:t,isLoading:e,children:[o?(0,x.jsx)(y,{}):null,(0,x.jsx)(v,{blocks:r,blockContextId:s.postId,setActiveBlockContextId:c,isHidden:o})]})},s.postId));(0,e.registerBlockType)(t,{icon:()=>(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 4H18C19.1046 4 20 4.89543 20 6V18C20 19.1046 19.1046 20 18 20H6C4.89543 20 4 19.1046 4 18V6C4 4.89543 4.89543 4 6 4ZM18 5.5H6C5.72386 5.5 5.5 5.72386 5.5 6V9H18.5V6C18.5 5.72386 18.2761 5.5 18 5.5ZM18.5 10.5H10L10 18.5H18C18.2761 18.5 18.5 18.2761 18.5 18V10.5ZM8.5 10.5H5.5V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.5Z",fill:"#1E1E1E"})}),edit:e=>{const{clientId:t,context:{query:{perPage:s,offset:p=0,order:y,orderBy:v,search:C,exclude:S,inherit:A,taxQuery:N,pages:P,...B},queryContext:I=[{page:1}],templateSlug:T,displayLayout:{type:E,columns:R,shrinkColumns:D}={type:"flex",columns:3,shrinkColumns:!1},queryContextIncludes:L=[],__privateProductCollectionPreviewState:O},__unstableLayoutClassNames:M}=e,V=(0,h.BF)(e.context,e.clientId),[{page:F}]=I,[H,z]=(0,r.useState)(),$="product",W=(0,d.getSettingWithCoercion)("loopShopPerPage",12,u.isNumber),G=[...new Set(L.concat(f))],q=(0,h.Ck)({clientId:t,queryContextIncludes:G}),{products:U,isInSingleProductBlock:Y,blocks:Z}=(0,c.useSelect)(e=>{const{getEntityRecords:o,getEditedEntityRecord:r,getTaxonomies:c}=e(l.store),{getBlocks:n,getBlockParentsByBlockName:a}=e(i.store),d=c({type:$,per_page:-1,context:"view"}),u={postType:$,offset:s?s*(F-1)+p:0,order:y,orderby:v};if(N&&!A){const e=Object.entries(N).reduce((e,[t,o])=>{const r=d?.find(({slug:e})=>e===t);return r?.rest_base&&(e[r?.rest_base]=o),e},{});Object.keys(e).length&&Object.assign(u,e)}if(s&&(u.per_page=s),C&&(u.search=C),S?.length&&(u.exclude=S),A){const{taxonomy:e,slug:t}=(0,h.DT)(T);if(e&&t){const r=o("taxonomy",e,{context:"view",per_page:1,_fields:["id"],slug:t});if(r){const t=r[0]?.id;"category"===e?u.categories=t:u[e]=t}}u.per_page=W;const s=(e=>{switch(e){case"title":return{orderby:"title",order:"asc"};case"price":return{orderby:"price",order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"popularity":return{orderby:"popularity",order:"desc"};case"rating":return{orderby:"rating",order:"desc"};case"date":return{orderby:"date",order:"desc"}}return{orderby:"menu_order",order:"asc"}})(r("root","site",void 0).woocommerce_default_catalog_orderby);u.orderby=s.orderby,u.order=s.order}return{products:o("postType",$,{...u,...B,productCollectionLocation:V,productCollectionQueryContext:q,previewState:O,...A&&{woocommerceStockStatus:(0,g.eu)()}}),isInSingleProductBlock:a(t,["woocommerce/single-product"]).length>0,blocks:n(t)}},[s,F,p,y,v,t,C,$,S,A,T,N,B,V,q,W,O]),J=(0,r.useMemo)(()=>U?.map(e=>({postType:e.type,postId:e.id})),[U]),X="flex"===E&&R>1;let Q="";const K=!!O?.isPreview&&!!U&&!U.length,{blockContexts:ee,placeholderProductMap:te,isReady:oe}=(({isPreviewWithNoProducts:e,count:t})=>{const[o,s]=(0,r.useState)(!1),i=(0,r.useMemo)(()=>{if(!e)return[];const o=Math.max(1,Math.min(t,10));return Array.from({length:o},(e,t)=>-999e3-t)},[e,t]);return(0,r.useEffect)(()=>{if(!e||0===i.length)return void s(!1);const t=(0,n.__)("Product name","woocommerce"),o=(0,c.dispatch)(l.store),r=i.map(e=>({id:e,type:"product",status:"publish",title:{rendered:t,raw:t}})),a=_(),u=i.map(e=>({id:e,name:t,slug:`placeholder-product-${e}`,type:"simple",status:"publish",permalink:"",price:w,regular_price:w,sale_price:"",average_rating:"0",rating_count:0,stock_status:"instock",images:[],featured:!1,catalog_visibility:"visible",description:"",short_description:"",sku:"",prices:{currency_code:d.SITE_CURRENCY.code,currency_symbol:d.SITE_CURRENCY.symbol,currency_minor_unit:d.SITE_CURRENCY.minorUnit,currency_prefix:d.SITE_CURRENCY.prefix,currency_suffix:d.SITE_CURRENCY.suffix,currency_decimal_separator:d.SITE_CURRENCY.decimalSeparator,currency_thousand_separator:d.SITE_CURRENCY.thousandSeparator,price:a,regular_price:a,sale_price:a,price_range:null}}));o.receiveEntityRecords("postType","product",r,null,!1,null,null),o.receiveEntityRecords("root","product",u,null,!1,null,null);for(const e of i)o.finishResolution("getEntityRecord",["root","product",e]),o.finishResolution("getEntityRecord",["postType","product",e]),o.finishResolution("getEditedEntityRecord",["root","product",e]),o.finishResolution("getEditedEntityRecord",["postType","product",e]);s(!0)},[e,i]),{blockContexts:(0,r.useMemo)(()=>o?i.map(e=>({postType:"product",postId:e})):null,[o,i]),placeholderProductMap:(0,r.useMemo)(()=>o?new Map(i.map(e=>[e,b(e)])):new Map,[o,i]),isReady:o}})({isPreviewWithNoProducts:K,count:s??4});(U&&U.length||K)&&X&&(Q=D?`wc-block-product-template__responsive columns-${R}`:`is-flex-container columns-${R}`);const re=(0,i.useBlockProps)({className:(0,o.A)(M,"wc-block-product-template",Q,{[`is-product-collection-layout-${E}`]:E})}),se=Y?j:k;return U?U.length?(0,x.jsx)("ul",{...re,children:J&&J.map(e=>{const t=e.postId===(H||J[0]?.postId);return(0,x.jsx)(se,{attributes:{productId:e.postId},blocks:Z,displayTemplate:t,blockContext:e,setActiveBlockContextId:z},e.postId)})}):K&&oe&&ee?(0,x.jsx)("ul",{...re,children:ee.map(e=>{const t=e.postId===(H||ee[0]?.postId);return(0,x.jsx)(m.ProductDataContextProvider,{product:te.get(e.postId)??null,isLoading:!1,children:(0,x.jsx)(k,{attributes:{productId:e.postId},blocks:Z,displayTemplate:t,blockContext:e,setActiveBlockContextId:z})},e.postId)})}):K&&!oe?(0,x.jsx)("p",{...re,children:(0,x.jsx)(a.Spinner,{className:"wc-block-product-template__spinner"})}):(0,x.jsxs)("p",{...re,children:[" ",(0,n.__)("No products to display. Try adjusting the filters in the block settings panel.","woocommerce")]}):(0,x.jsx)("p",{...re,children:(0,x.jsx)(a.Spinner,{className:"wc-block-product-template__spinner"})})},save:function(){return(0,x.jsx)(i.InnerBlocks.Content,{})}})})(),(()=>{"use strict";var e=s(27723),t=s(74997),o=s(5573),r=s(10790);const c=(0,r.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{opacity:".87",fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.jsx)("path",{d:"M21 8h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2zm0 4l-3 7H9V9l4.34-4.34L12.23 10H21v2zM1 9h4v12H1z"})]});var n=s(93450);const i=JSON.parse('{"name":"woocommerce/product-top-rated","title":"Top Rated Products","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of your top rated products.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"rating"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var a=s(88664),l=s(94715),d=s(56427),u=s(84871),m=s.n(u),p=s(10525),h=s(1872),g=s(50376),w=s(84667),_=s(53829),b=s(15703);const x=({attributes:t,name:o,setAttributes:s})=>{const{categories:c,catOperator:n,columns:i,contentVisibility:a,rows:u,alignButtons:x,stockStatus:f,isPreview:y}=t;return y?_.i:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(l.InspectorControls,{children:[(0,r.jsx)(d.PanelBody,{title:(0,e.__)("Layout","woocommerce"),initialOpen:!0,children:(0,r.jsx)(h.A,{columns:i,rows:u,alignButtons:x,setAttributes:s,minColumns:(0,b.getSetting)("minColumns",1),maxColumns:(0,b.getSetting)("maxColumns",6),minRows:(0,b.getSetting)("minRows",1),maxRows:(0,b.getSetting)("maxRows",6)})}),(0,r.jsx)(d.PanelBody,{title:(0,e.__)("Content","woocommerce"),initialOpen:!0,children:(0,r.jsx)(p.A,{settings:a,onChange:e=>s({contentVisibility:e})})}),(0,r.jsx)(d.PanelBody,{title:(0,e.__)("Filter by Product Category","woocommerce"),initialOpen:!1,children:(0,r.jsx)(g.A,{selected:c,onChange:(e=[])=>{const t=e.map(({id:e})=>e);s({categories:t})},operator:n,onOperatorChange:(e="any")=>s({catOperator:e})})}),(0,r.jsx)(d.PanelBody,{title:(0,e.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,r.jsx)(w.A,{setAttributes:s,value:f})})]},"inspector"),(0,r.jsx)(d.Disabled,{children:(0,r.jsx)(m(),{block:o,attributes:t})})]})};(0,t.registerBlockType)(i,{icon:{src:(0,r.jsx)(n.A,{icon:c,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,e.__)("WooCommerce","woocommerce")],description:(0,e.__)("Display a grid of your top rated products.","woocommerce"),attributes:{...a.A,...i.attributes},transforms:{from:[{type:"block",blocks:a.K.filter(e=>"woocommerce/product-top-rated"!==e),transform:e=>(0,t.createBlock)("woocommerce/product-top-rated",e)}]},edit:e=>{const t=(0,l.useBlockProps)();return(0,r.jsx)("div",{...t,children:(0,r.jsx)(x,{...e})})},save:()=>null})})(),(()=>{"use strict";var e=s(93450),t=s(82024),o=s(74997),r=s(15703);s(14747);const c=JSON.parse('{"name":"woocommerce/products-by-attribute","title":"Products by Attribute","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of products with selected attributes.","supports":{"interactivity":{"clientNavigation":false},"align":["wide","full"],"html":false,"inserter":false},"attributes":{"attributes":{"type":"array","default":[]},"attrOperator":{"type":"string","enum":["all","any"],"default":"any"},"columns":{"type":"number","default":3},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var n=s(94715),i=s(56427),a=s(86087),l=s(27723),d=s(1872),u=s(10525),m=s(7971),p=s(11474),h=s(84667),g=s(10790);const w=e=>{const{setAttributes:t}=e,{attributes:o,attrOperator:s,columns:c,contentVisibility:a,orderby:w,rows:_,alignButtons:b,stockStatus:x}=e.attributes;return(0,g.jsxs)(n.InspectorControls,{children:[(0,g.jsx)(i.PanelBody,{title:(0,l.__)("Layout","woocommerce"),initialOpen:!0,children:(0,g.jsx)(d.A,{columns:c,rows:_,alignButtons:b,setAttributes:t,minColumns:(0,r.getSetting)("minColumns",1),maxColumns:(0,r.getSetting)("maxColumns",6),minRows:(0,r.getSetting)("minRows",1),maxRows:(0,r.getSetting)("maxRows",6)})}),(0,g.jsx)(i.PanelBody,{title:(0,l.__)("Content","woocommerce"),initialOpen:!0,children:(0,g.jsx)(u.A,{settings:a,onChange:e=>t({contentVisibility:e})})}),(0,g.jsx)(i.PanelBody,{title:(0,l.__)("Filter by Product Attribute","woocommerce"),initialOpen:!1,children:(0,g.jsx)(m.A,{selected:o,onChange:(e=[])=>{const o=e.map(({id:e,value:t})=>({id:e,attr_slug:t}));t({attributes:o})},operator:s,onOperatorChange:(e="any")=>t({attrOperator:e}),isCompact:!0})}),(0,g.jsx)(i.PanelBody,{title:(0,l.__)("Order By","woocommerce"),initialOpen:!1,children:(0,g.jsx)(p.A,{setAttributes:t,value:w})}),(0,g.jsx)(i.PanelBody,{title:(0,l.__)("Filter by stock status","woocommerce"),initialOpen:!1,children:(0,g.jsx)(h.A,{setAttributes:t,value:x})})]},"inspector")},_=o=>{const{attributes:r,setAttributes:s,setIsEditing:c,isEditing:n,debouncedSpeak:a}=o;return(0,g.jsxs)(i.Placeholder,{icon:(0,g.jsx)(e.A,{icon:t.A}),label:(0,l.__)("Products by Attribute","woocommerce"),className:"wc-block-products-grid wc-block-products-by-attribute",children:[(0,l.__)("Display a grid of products from your selected attributes.","woocommerce"),(0,g.jsxs)("div",{className:"wc-block-products-by-attribute__selection",children:[(0,g.jsx)(m.A,{selected:r.attributes,onChange:(e=[])=>{const t=e.map(({id:e,value:t})=>({id:e,attr_slug:t}));s({attributes:t})},operator:r.attrOperator,onOperatorChange:(e="any")=>s({attrOperator:e})}),(0,g.jsx)(i.Button,{variant:"primary",onClick:()=>{c(!n),a((0,l.__)("Showing Products by Attribute block preview.","woocommerce"))},children:(0,l.__)("Done","woocommerce")})]})]})};var b=s(84871),x=s.n(b),f=s(53829);const y=e=>{const{attributes:t,name:o}=e;return t.isPreview?f.i:(0,g.jsx)(x(),{block:o,attributes:t})},v=(0,i.withSpokenMessages)(e=>{const t=(0,n.useBlockProps)(),{attributes:{attributes:o}}=e,[r,s]=(0,a.useState)(!o.length);return(0,g.jsxs)("div",{...t,children:[(0,g.jsx)(n.BlockControls,{children:(0,g.jsx)(i.ToolbarGroup,{controls:[{icon:"edit",title:(0,l.__)("Edit selected attribute","woocommerce"),onClick:()=>s(!r),isActive:r}]})}),(0,g.jsx)(w,{...e}),r?(0,g.jsx)(_,{isEditing:r,setIsEditing:s,...e}):(0,g.jsx)(i.Disabled,{children:(0,g.jsx)(y,{...e})})]})});(0,o.registerBlockType)(c,{icon:{src:(0,g.jsx)(e.A,{icon:t.A,className:"wc-block-editor-components-block-icon"})},attributes:{...c.attributes,columns:{type:"number",default:(0,r.getSetting)("defaultColumns",3)},rows:{type:"number",default:(0,r.getSetting)("defaultRows",3)},stockStatus:{type:"array",default:Object.keys((0,r.getSetting)("stockStatusOptions",[]))}},edit:v,save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(77092),r=s(4921),c=s(94715),n=s(27723),i=s(56427),a=s(20195),l=s(55414),d=(s(25765),s(10790));const u=({className:e,rating:t,ratedProductsCount:o})=>{const s=(0,r.A)("wc-block-components-product-rating",e),c={width:t/5*100+"%"},i=(0,n.sprintf)(/* translators: %f is referring to the average rating value */ /* translators: %f is referring to the average rating value */ (0,n.__)("Rated %f out of 5","woocommerce"),t),a={__html:(0,n.sprintf)(/* translators: %s is the rating value wrapped in HTML strong tags. */ /* translators: %s is the rating value wrapped in HTML strong tags. */ (0,n.__)("Rated %s out of 5","woocommerce"),(0,n.sprintf)('<strong class="rating">%f</strong>',t))};return(0,d.jsxs)("div",{className:s,children:[(0,d.jsx)("div",{className:"wc-block-components-product-rating__stars",role:"img","aria-label":i,children:(0,d.jsx)("span",{style:c,dangerouslySetInnerHTML:a})}),null!==o?(0,d.jsxs)("span",{className:"wc-block-components-product-rating-count",children:["(",o,")"]}):null]})};var m=s(46151),p=s(13817),h=s(76748),g=s(88199),w=s(15703),_=s(73993),b=s(20923),x=s.n(b),f=s(86087),y=s(14656),v=s(60427),k=s(30612),j=s(30426),C=s(93832),S=s(48197),A=s(37848);const N=[{label:(0,d.jsx)(u,{rating:5,ratedProductsCount:null},5),value:"5"},{label:(0,d.jsx)(u,{rating:4,ratedProductsCount:null},4),value:"4"},{label:(0,d.jsx)(u,{rating:3,ratedProductsCount:null},3),value:"3"},{label:(0,d.jsx)(u,{rating:2,ratedProductsCount:null},2),value:"2"},{label:(0,d.jsx)(u,{rating:1,ratedProductsCount:null},1),value:"1"}];s(88502);const P=e=>e.trim().replace(/\s/g,"-").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,"");var B=s(25238);const I="rating_filter",T=e=>(0,n.sprintf)(/* translators: %s is referring to the average rating value */ /* translators: %s is referring to the average rating value */ (0,n.__)("Rated %s out of 5 filter added.","woocommerce"),e),E=e=>(0,n.sprintf)(/* translators: %s is referring to the average rating value */ /* translators: %s is referring to the average rating value */ (0,n.__)("Rated %s out of 5 filter added.","woocommerce"),e),R=({attributes:e,isEditor:o,noRatingsNotice:s=null})=>{const c=(0,B.LY)(),i=(0,w.getSettingWithCoercion)("isRenderingPhpTemplate",!1,_.isBoolean),[b,R]=(0,f.useState)(!1),[D]=(0,h.dJ)(),{data:L,isLoading:O}=(0,g.A)({queryRating:!0,queryState:D,isEditor:o}),[M,V]=(0,f.useState)(e.isPreview?N:[]),F=!e.isPreview&&O&&0===M.length,H=!e.isPreview&&O,z=(0,f.useMemo)(()=>((e="filter_rating")=>{const t=(0,A.Vf)(e);return t?(0,_.isString)(t)?t.split(","):t:[]})("rating_filter"),[]),[$,W]=(0,f.useState)(z),[G,q]=(0,h.xd)("rating",z),[U,Y]=(0,f.useState)((0,S.I)()),[Z,J]=(0,f.useState)(!1),X="single"!==e.selectType,Q=X?!F&&$.length<M.length:!F&&0===$.length,K=(0,f.useCallback)(e=>{o||(e&&!i&&q(e),(e=>{if(!window)return;if(0===e.length){const e=(0,C.removeQueryArgs)(window.location.href,I);return void(e!==(0,A.Q)(window.location.href)&&(0,A.CH)(e))}const t=(0,C.addQueryArgs)(window.location.href,{[I]:e.join(",")});t!==(0,A.Q)(window.location.href)&&(0,A.CH)(t)})(e))},[o,q,i]);(0,f.useEffect)(()=>{e.showFilterButton||K($)},[e.showFilterButton,$,K]);const ee=(0,f.useMemo)(()=>G,[G]),te=(0,m.c)(ee),oe=(0,p.Z)(te);(0,f.useEffect)(()=>{x()(oe,te)||x()($,te)||W(te)},[$,te,oe]),(0,f.useEffect)(()=>{b||(q(z),R(!0))},[q,b,R,z]),(0,f.useEffect)(()=>{if(O||e.isPreview)return;const t=!O&&(0,_.objectHasProp)(L,"rating_counts")&&Array.isArray(L.rating_counts)?[...L.rating_counts].reverse():[];if(o&&0===t.length)return V(N),void J(!0);const r=t.filter(e=>(0,_.isObject)(e)&&Object.keys(e).length>0).map(t=>({label:(0,d.jsx)(u,{rating:t?.rating,ratedProductsCount:e.showCounts?t?.count:null},t?.rating),value:t?.rating?.toString()}));V(r),Y((0,S.I)())},[e.showCounts,e.isPreview,L,O,G,o]);const re=(0,f.useCallback)(e=>{const t=$.includes(e);if(!X){const o=t?[]:[e];return(0,a.speak)(t?E(e):T(e)),void W(o)}if(t){const t=$.filter(t=>t!==e);return(0,a.speak)(E(e)),void W(t)}const o=[...$,e].sort((e,t)=>Number(t)-Number(e));(0,a.speak)(T(e)),W(o)},[$,X]);return(O||0!==M.length)&&(0,w.getSettingWithCoercion)("hasFilterableProducts",!1,_.isBoolean)?(c(!0),(0,d.jsxs)(d.Fragment,{children:[Z&&s,(0,d.jsx)("div",{className:(0,r.A)("wc-block-rating-filter",`style-${e.displayStyle}`,{"is-loading":F}),children:"dropdown"===e.displayStyle?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(j.A,{className:(0,r.A)({"single-selection":!X,"is-loading":F}),style:{borderStyle:"none"},suggestions:M.filter(e=>!$.includes(e.value)).map(e=>e.value),disabled:F,placeholder:(0,n.__)("Select Rating","woocommerce"),onChange:e=>{!X&&e.length>1&&(e=[e[e.length-1]]);const t=[e=e.map(e=>{const t=M.find(t=>t.value===e);return t?t.value:e}),$].reduce((e,t)=>e.filter(e=>!t.includes(e)));if(1===t.length)return re(t[0]);const o=[$,e].reduce((e,t)=>e.filter(e=>!t.includes(e)));1===o.length&&re(o[0])},value:$,displayTransform:e=>{const t={value:e,label:(0,d.jsx)(u,{rating:Number(e),ratedProductsCount:0},Number(e))},o=M.find(t=>t.value===e)||t,{label:r,value:s}=o;return Object.assign({},r,{toLocaleLowerCase:()=>s,substring:(e,t)=>0===e&&1===t?r:""})},saveTransform:P,messages:{added:(0,n.__)("Rating filter added.","woocommerce"),removed:(0,n.__)("Rating filter removed.","woocommerce"),remove:(0,n.__)("Remove rating filter.","woocommerce"),__experimentalInvalid:(0,n.__)("Invalid rating filter.","woocommerce")}},U),Q&&(0,d.jsx)(t.A,{icon:l.A,size:30})]}):(0,d.jsx)(y.CheckboxList,{className:"wc-block-rating-filter-list",options:M,checked:$,onChange:e=>{re(e.toString())},isLoading:F,isDisabled:H})}),(0,d.jsxs)("div",{className:"wc-block-rating-filter__actions",children:[($.length>0||o)&&!F&&(0,d.jsx)(k.A,{onClick:()=>{W([]),q([]),K([])},screenReaderLabel:(0,n.__)("Reset rating filter","woocommerce")}),e.showFilterButton&&(0,d.jsx)(v.A,{className:"wc-block-rating-filter__button",isLoading:F,disabled:F||H,onClick:()=>K($),screenReaderLabel:(0,n.__)("Apply rating filter","woocommerce")})]})]})):(c(!1),null)};s(92516);var D=s(68059);const L=(0,d.jsx)(i.Notice,{status:"warning",isDismissible:!1,children:(0,d.jsx)("p",{children:(0,n.__)("Your store doesn't have any products with ratings yet. This filter option will display when a product receives a review.","woocommerce")})}),O=(0,i.withSpokenMessages)(({attributes:e,setAttributes:t,clientId:o})=>{const{className:s,displayStyle:a,showCounts:l,showFilterButton:u,selectType:m}=e,p=(0,c.useBlockProps)({className:(0,r.A)("wc-block-rating-filter",s)});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(c.InspectorControls,{children:[(0,d.jsx)(i.PanelBody,{children:(0,d.jsx)(D.d,{clientId:o})}),(0,d.jsxs)(i.PanelBody,{title:(0,n.__)("Display Settings","woocommerce"),children:[(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Display product count","woocommerce"),checked:l,onChange:()=>t({showCounts:!l})}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Allow selecting multiple options?","woocommerce"),isBlock:!0,value:m||"multiple",onChange:e=>t({selectType:e}),className:"wc-block-attribute-filter__multiple-toggle",children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{value:"multiple",label:(0,n._x)("Multiple","Number of filters","woocommerce")}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{value:"single",label:(0,n._x)("Single","Number of filters","woocommerce")})]}),(0,d.jsxs)(i.__experimentalToggleGroupControl,{label:(0,n.__)("Display Style","woocommerce"),isBlock:!0,value:a,onChange:e=>t({displayStyle:e}),className:"wc-block-attribute-filter__display-toggle",children:[(0,d.jsx)(i.__experimentalToggleGroupControlOption,{value:"list",label:(0,n.__)("List","woocommerce")}),(0,d.jsx)(i.__experimentalToggleGroupControlOption,{value:"dropdown",label:(0,n.__)("Dropdown","woocommerce")})]}),(0,d.jsx)(i.ToggleControl,{label:(0,n.__)("Show 'Apply filters' button","woocommerce"),help:(0,n.__)("Products will update when the button is clicked.","woocommerce"),checked:u,onChange:e=>t({showFilterButton:e})})]})]},"inspector"),(0,d.jsx)("div",{...p,children:(0,d.jsx)(i.Disabled,{children:(0,d.jsx)(R,{attributes:e,isEditor:!0,noRatingsNotice:L})})})]})}),M=JSON.parse('{"name":"woocommerce/rating-filter","title":"Filter by Rating Controls","description":"Enable customers to filter the product grid by rating.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"html":false,"multiple":false,"color":{"background":true,"text":true,"button":true},"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"showCounts":{"type":"boolean","default":false},"displayStyle":{"type":"string","default":"list"},"showFilterButton":{"type":"boolean","default":false},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),V=[{attributes:{...M.attributes,showCounts:{type:"boolean",default:!0}},save:({attributes:e})=>{const{className:t,showCounts:o}=e,s={"data-show-counts":o};return(0,d.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)}),...s,children:(0,d.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-rating-filter__placeholder"})})}}];(0,e.registerBlockType)(M,{icon:{src:(0,d.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...M.attributes},edit:O,save({attributes:e}){const{className:t}=e;return(0,d.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)})})},deprecated:V})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(69863),r=s(94715),c=s(27723),n=s(50376),i=s(56427),a=s(51974),l=s(10790);const d=({reason:e})=>(0,l.jsx)(i.Placeholder,{className:"wc-block-reviews-by-category",icon:(0,l.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),label:(0,c.__)("Reviews by Category","woocommerce"),children:"offset"===e?(0,c.__)("No reviews are visible with the current offset. Reduce the offset to display reviews.","woocommerce"):(0,c.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woocommerce")});var u=s(30102);const m=(0,i.withSpokenMessages)(({attributes:e,debouncedSpeak:s,setAttributes:m})=>{const{editMode:p,categoryIds:h}=e;if(!h||0===h.length||p)return(0,l.jsxs)(i.Placeholder,{icon:(0,l.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),label:(0,c.__)("Reviews by Category","woocommerce"),className:"wc-block-reviews-by-category",children:[(0,c.__)("Show product reviews from specific categories.","woocommerce"),(0,l.jsxs)("div",{className:"wc-block-reviews__selection",children:[(0,l.jsx)(n.A,{selected:e.categoryIds,onChange:(e=[])=>{const t=e.map(({id:e})=>e);m({categoryIds:t})},showReviewCount:!0}),(0,l.jsx)(i.Button,{variant:"primary",onClick:()=>{m({editMode:!1}),s((0,c.__)("Now displaying a preview of the reviews for the products in the selected categories.","woocommerce"))},children:(0,c.__)("Done","woocommerce")})]})]});const g=(0,c.__)("Edit selected categories","woocommerce");return(0,l.jsxs)(l.Fragment,{children:[(0,u.W9)(p,m,g),(0,l.jsxs)(r.InspectorControls,{children:[(0,l.jsxs)(i.__experimentalToolsPanel,{label:(0,c.__)("Content","woocommerce"),resetAll:()=>m({showProductName:!0,showReviewRating:!0,showReviewerName:!0,showReviewImage:!0,showReviewDate:!0,showReviewContent:!0,imageType:"reviewer"}),children:[(0,l.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>!e.showProductName,label:(0,c.__)("Product name","woocommerce"),onDeselect:()=>m({showProductName:!0}),isShownByDefault:!0,children:(0,l.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,c.__)("Product name","woocommerce"),checked:e.showProductName,onChange:()=>m({showProductName:!e.showProductName})})}),(0,u.f1)(e,m)]}),(0,l.jsx)(i.__experimentalToolsPanel,{label:(0,c.__)("List Settings","woocommerce"),resetAll:()=>m({showOrderby:!0,orderby:"most-recent",reviewsOnPageLoad:10,offset:0,showLoadMore:!0,reviewsOnLoadMore:10}),children:(0,u.Ki)(e,m,{showOffset:!0})}),(0,l.jsx)(i.__experimentalToolsPanel,{label:(0,c.__)("Category","woocommerce"),resetAll:()=>m({categoryIds:[]}),children:(0,l.jsx)(i.__experimentalToolsPanelItem,{hasValue:()=>(e.categoryIds||[]).length>0,label:(0,c.__)("Category","woocommerce"),onDeselect:()=>m({categoryIds:[]}),isShownByDefault:!0,children:(0,l.jsx)(n.A,{selected:e.categoryIds,onChange:(e=[])=>{const t=e.map(({id:e})=>e);m({categoryIds:t})},isCompact:!0,showReviewCount:!0})})})]},"inspector"),(0,l.jsx)(a.A,{attributes:e,icon:(0,l.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),name:(0,c.__)("Reviews by Category","woocommerce"),noReviewsPlaceholder:d})]})});var p=s(14741),h=s(31171),g=s(11946);const w=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/reviews-by-category","title":"Reviews by Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Show product reviews from specific categories.","textdomain":"woocommerce","supports":{"html":false,"interactivity":{"clientNavigation":true},"color":{"background":false},"typography":{"fontSize":true}}}');(0,e.registerBlockType)(w,{icon:{src:(0,l.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},example:{...g.F,attributes:{...g.F.attributes,categoryIds:[1],showProductName:!0}},attributes:{...p.A,offset:{type:"number",default:0},categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}},edit:e=>{const t=(0,r.useBlockProps)();return(0,l.jsx)("div",{...t,children:(0,l.jsx)(m,{...e})})},save:h.A})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(69863),r=(s(14809),s(27723)),c=s(94715),n=s(84114),i=s(1041),a=s(18537),l=s(56427),d=s(51974),u=s(95493),m=s(98945),p=s(10790);const h=(0,m.A)(({error:e,getProduct:s,isLoading:c,product:n,reason:i})=>{if(e)return(0,p.jsx)(u.A,{className:"wc-block-featured-product-error",error:e,isLoading:c,onRetry:s});let d="offset"===i?(0,r.__)("No reviews are visible with the current offset. Reduce the offset to display reviews.","woocommerce"):void 0;return d||(d=!n||c?(0,p.jsx)(l.Spinner,{}):(0,r.sprintf)(/* translators: %s is the product name. */ /* translators: %s is the product name. */ (0,r.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.","woocommerce"),(0,a.decodeEntities)(n.name))),(0,p.jsx)(l.Placeholder,{className:"wc-block-reviews-by-product",icon:(0,p.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),label:(0,r.__)("Reviews by Product","woocommerce"),children:d})});var g=s(30102);const w=(0,l.withSpokenMessages)(({attributes:e,debouncedSpeak:s,setAttributes:u})=>{const{editMode:m,productId:w}=e,_=(0,c.useBlockProps)(),b=e=>{const{item:t=0}=e;return(0,p.jsx)(n.s,{...e,item:{...t,count:t.details.review_count},countLabel:(0,r.sprintf)(/* translators: %d is the review count. */ /* translators: %d is the review count. */ (0,r._n)("%d review","%d reviews",t.details.review_count,"woocommerce"),t.details.review_count),"aria-label":(0,r.sprintf)(/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */ /* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */ (0,r._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.details.review_count,"woocommerce"),(0,a.decodeEntities)(t.name),t.details.review_count)})};if(!w||m)return(0,p.jsxs)(l.Placeholder,{icon:(0,p.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),label:(0,r.__)("Reviews by Product","woocommerce"),className:"wc-block-reviews-by-product",children:[(0,r.__)("Show reviews of your product to build trust","woocommerce"),(0,p.jsxs)("div",{className:"wc-block-reviews__selection",children:[(0,p.jsx)(i.A,{selected:e.productId?[e.productId]:[],onChange:(e=[])=>{const t=e[0]?e[0].id:0;u({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:b}),(0,p.jsx)(l.Button,{variant:"primary",onClick:()=>{u({editMode:!1}),s((0,r.__)("Showing Reviews by Product block preview.","woocommerce"))},children:(0,r.__)("Done","woocommerce")})]})]});const x=(0,r.__)("Edit selected product","woocommerce");return(0,p.jsxs)("div",{..._,children:[(0,g.W9)(m,u,x),(0,p.jsxs)(c.InspectorControls,{children:[(0,p.jsx)(l.__experimentalToolsPanel,{label:(0,r.__)("Content","woocommerce"),resetAll:()=>u({showReviewRating:!0,showReviewerName:!0,showReviewImage:!0,showReviewDate:!0,showReviewContent:!0,imageType:"reviewer"}),children:(0,g.f1)(e,u)}),(0,p.jsx)(l.__experimentalToolsPanel,{label:(0,r.__)("List Settings","woocommerce"),resetAll:()=>u({showOrderby:!0,orderby:"most-recent",reviewsOnPageLoad:10,offset:0,showLoadMore:!0,reviewsOnLoadMore:10}),children:(0,g.Ki)(e,u,{showOffset:!0})}),(0,p.jsx)(l.__experimentalToolsPanel,{label:(0,r.__)("Product","woocommerce"),resetAll:()=>u({productId:0}),children:(0,p.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>!!e.productId,label:(0,r.__)("Product","woocommerce"),onDeselect:()=>u({productId:0}),isShownByDefault:!0,children:(0,p.jsx)(i.A,{selected:e.productId?[e.productId]:[],onChange:(e=[])=>{const t=e[0]?e[0].id:0;u({productId:t})},renderItem:b,isCompact:!0})})})]},"inspector"),(0,p.jsx)(d.A,{attributes:e,icon:(0,p.jsx)(t.A,{icon:o.A,className:"block-editor-block-icon"}),name:(0,r.__)("Reviews by Product","woocommerce"),noReviewsPlaceholder:h})]})});var _=s(14741),b=s(31171),x=s(11946);const f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/reviews-by-product","title":"Reviews by Product","category":"woocommerce","keywords":["WooCommerce"],"description":"Display reviews for your products.","textdomain":"woocommerce","supports":{"html":false,"interactivity":{"clientNavigation":true},"color":{"background":false},"typography":{"fontSize":true}}}');(0,e.registerBlockType)(f,{icon:{src:(0,p.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},example:{...x.F,attributes:{...x.F.attributes,productId:1}},attributes:{..._.A,offset:{type:"number",default:0},productId:{type:"number"}},edit:e=>(0,p.jsx)(w,{...e}),save:b.A})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(77092);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/saved-for-later","version":"1.0.0","title":"Saved for Later","description":"Display items the shopper has saved from their cart for later.","category":"woocommerce","keywords":["WooCommerce","Saved for Later"],"textdomain":"woocommerce","blockHooks":{"woocommerce/cart":"after"},"attributes":{"columnCount":{"type":"number"}},"allowedBlocks":["core/heading"],"supports":{"align":["wide","full"],"interactivity":true,"html":false,"multiple":false,"reusable":false,"spacing":{"margin":true,"padding":true,"blockGap":true},"typography":{"fontSize":true,"lineHeight":true},"color":{"text":true,"background":true}},"viewScriptModule":"woocommerce/saved-for-later","style":["file:../woocommerce/saved-for-later-style.css","wc-blocks-style-product-image","woocommerce-product-price-style","woocommerce-product-button-style"]}');var c=s(27723),n=s(94715),i=s(56427),a=s(78592),l=s(15703),d=s(73993),u=s(10790);const m=[["core/heading",{content:(0,c.__)("Saved for later","woocommerce"),level:2}]],p=[{key:"preview-1",name:(0,c.__)("Sample product one","woocommerce"),variation:(0,c.__)("Size: M","woocommerce"),price:"$19.99",quantity:(0,c.__)("Qty: 2","woocommerce")},{key:"preview-2",name:(0,c.__)("Sample product two","woocommerce"),variation:(0,c.__)("Color: Blue","woocommerce"),price:"$29.99",quantity:(0,c.__)("Qty: 1","woocommerce")},{key:"preview-3",name:(0,c.__)("Sample product three","woocommerce"),variation:"",price:"$9.99",quantity:(0,c.__)("Qty: 3","woocommerce")},{key:"preview-4",name:(0,c.__)("Sample product four","woocommerce"),variation:(0,c.__)("Size: L","woocommerce"),price:"$24.99",quantity:(0,c.__)("Qty: 1","woocommerce")},{key:"preview-5",name:(0,c.__)("Sample product five","woocommerce"),variation:"",price:"$14.99",quantity:(0,c.__)("Qty: 2","woocommerce")},{key:"preview-6",name:(0,c.__)("Sample product six","woocommerce"),variation:(0,c.__)("Color: Red","woocommerce"),price:"$39.99",quantity:(0,c.__)("Qty: 1","woocommerce")}];s(41986),(0,e.registerBlockType)(r,{icon:{src:(0,u.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:r})=>{const s=e.columnCount??5,h=(0,l.getSettingWithCoercion)("experimentalCartSaveForLater",!1,d.isBoolean),g=(0,n.useBlockProps)({className:"wc-block-saved-for-later"}),w=(0,n.useInnerBlocksProps)({className:"wc-block-saved-for-later__header"},{template:m});return h?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsx)(i.PanelBody,{title:(0,c.__)("Settings","woocommerce"),children:(0,u.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,c.__)("Columns","woocommerce"),value:s,onChange:e=>{"number"==typeof e&&r({columnCount:e})},min:2,max:6})})}),(0,u.jsxs)("section",{...g,children:[(0,u.jsx)("div",{...w}),(0,u.jsx)("ul",{className:`wc-block-saved-for-later__list columns-${s}`,children:p.map(e=>(0,u.jsxs)("li",{className:"wc-block-shopper-list-item",children:[(0,u.jsxs)("div",{className:"wc-block-components-product-image wc-block-components-product-image--aspect-ratio-auto",children:[(0,u.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:(0,u.jsx)("img",{src:l.PLACEHOLDER_IMG_SRC,alt:""})}),(0,u.jsx)("button",{type:"button",className:"wc-block-shopper-list-item__remove","aria-label":(0,c.sprintf)(/* translators: %s: product name. */ /* translators: %s: product name. */ (0,c.__)("Remove %s from Saved for later list","woocommerce"),e.name),disabled:!0,children:(0,u.jsx)(t.A,{icon:a.A,size:24})}),e.variation&&(0,u.jsx)("span",{className:"wc-block-shopper-list-item__variation",children:e.variation})]}),(0,u.jsx)("h2",{className:"wp-block-post-title has-text-align-center has-medium-font-size",children:(0,u.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:e.name})}),(0,u.jsx)("div",{className:"price wc-block-components-product-price has-text-align-center has-small-font-size",children:(0,u.jsx)("span",{className:"wc-block-components-product-price__value",children:e.price})}),(0,u.jsx)("span",{className:"wc-block-shopper-list-item__quantity",children:e.quantity}),(0,u.jsx)("div",{className:"wp-block-button wc-block-components-product-button",children:(0,u.jsx)("button",{type:"button",className:"wp-block-button__link wp-element-button add_to_cart_button wc-block-components-product-button__button",disabled:!0,children:(0,c.__)("Move to cart","woocommerce")})})]},e.key))})]})]}):(0,u.jsx)("div",{...g,children:(0,u.jsx)(i.Placeholder,{icon:(0,u.jsx)(t.A,{icon:o.A}),label:(0,c.__)("Saved for later","woocommerce"),instructions:(0,c.sprintf)(/* translators: %s: the feature name ("Save for Later in Cart"). */ /* translators: %s: the feature name ("Save for Later in Cart"). */ (0,c.__)("The “%s” feature is off, so this block will not appear on your store.","woocommerce"),(0,c.__)("Save for Later in Cart","woocommerce")),children:(0,u.jsx)(i.ExternalLink,{href:(0,l.getAdminLink)("admin.php?page=wc-settings&tab=advanced§ion=features"),children:(0,c.__)("Enable it in WooCommerce settings","woocommerce")})})})},save:()=>(0,u.jsx)(n.InnerBlocks.Content,{})})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(77092);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/wishlist","version":"1.0.0","title":"Wishlist","description":"Display the shopper\'s wishlist.","category":"woocommerce","keywords":["WooCommerce","Wishlist"],"textdomain":"woocommerce","attributes":{"columnCount":{"type":"number","default":5}},"allowedBlocks":["core/heading"],"supports":{"align":["wide","full"],"interactivity":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true,"blockGap":true},"typography":{"fontSize":true,"lineHeight":true},"color":{"text":true,"background":true}},"viewScriptModule":"woocommerce/wishlist","style":["file:../woocommerce/wishlist-style.css","wc-blocks-style-product-image","woocommerce-product-price-style","woocommerce-product-button-style"]}');var c=s(27723),n=s(94715),i=s(56427),a=s(78592),l=s(15703),d=s(10790);const u=[["core/heading",{content:(0,c.__)("Wishlist","woocommerce"),level:2}]],m=[{key:"preview-1",name:(0,c.__)("Sample product one","woocommerce"),variation:(0,c.__)("Size: M","woocommerce"),price:"$19.99"},{key:"preview-2",name:(0,c.__)("Sample product two","woocommerce"),variation:(0,c.__)("Color: Blue","woocommerce"),price:"$29.99"},{key:"preview-3",name:(0,c.__)("Sample product three","woocommerce"),variation:"",price:"$9.99"},{key:"preview-4",name:(0,c.__)("Sample product four","woocommerce"),variation:(0,c.__)("Size: L","woocommerce"),price:"$24.99"},{key:"preview-5",name:(0,c.__)("Sample product five","woocommerce"),variation:"",price:"$14.99"},{key:"preview-6",name:(0,c.__)("Sample product six","woocommerce"),variation:(0,c.__)("Color: Red","woocommerce"),price:"$39.99"}];s(58147),(0,e.registerBlockType)(r,{icon:{src:(0,d.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const{columnCount:r}=e,s=(0,n.useBlockProps)({className:"wc-block-wishlist"}),p=(0,n.useInnerBlocksProps)({className:"wc-block-wishlist__header"},{template:u});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.InspectorControls,{children:(0,d.jsx)(i.PanelBody,{title:(0,c.__)("Settings","woocommerce"),children:(0,d.jsx)(i.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,c.__)("Columns","woocommerce"),value:r,onChange:e=>{"number"==typeof e&&o({columnCount:e})},min:2,max:6})})}),(0,d.jsxs)("section",{...s,children:[(0,d.jsx)("div",{...p}),(0,d.jsx)("ul",{className:`wc-block-wishlist__list columns-${r}`,children:m.map(e=>(0,d.jsxs)("li",{className:"wc-block-shopper-list-item",children:[(0,d.jsxs)("div",{className:"wc-block-components-product-image wc-block-components-product-image--aspect-ratio-auto",children:[(0,d.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:(0,d.jsx)("img",{src:l.PLACEHOLDER_IMG_SRC,alt:""})}),(0,d.jsx)("button",{type:"button",className:"wc-block-shopper-list-item__remove","aria-label":(0,c.sprintf)(/* translators: %s: product name. */ /* translators: %s: product name. */ (0,c.__)("Remove %s from wishlist","woocommerce"),e.name),disabled:!0,children:(0,d.jsx)(t.A,{icon:a.A,size:24})}),e.variation&&(0,d.jsx)("span",{className:"wc-block-shopper-list-item__variation",children:e.variation})]}),(0,d.jsx)("h2",{className:"wp-block-post-title has-text-align-center has-medium-font-size",children:(0,d.jsx)("a",{href:"#preview",onClick:e=>e.preventDefault(),children:e.name})}),(0,d.jsx)("div",{className:"price wc-block-components-product-price has-text-align-center has-small-font-size",children:(0,d.jsx)("span",{className:"wc-block-components-product-price__value",children:e.price})}),(0,d.jsx)("div",{className:"wp-block-button wc-block-components-product-button",children:(0,d.jsx)("button",{type:"button",className:"wp-block-button__link wp-element-button add_to_cart_button wc-block-components-product-button__button",disabled:!0,children:(0,c.__)("Add to cart","woocommerce")})})]},e.key))})]})]})},save:()=>(0,d.jsx)(n.InnerBlocks.Content,{})})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(77092);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/add-to-wishlist-button","version":"1.0.0","title":"Add to Wishlist Button","description":"Lets shoppers add the current product to their wishlist from the single-product page.","category":"woocommerce","keywords":["WooCommerce","Wishlist"],"textdomain":"woocommerce","usesContext":["postId"],"ancestor":["woocommerce/add-to-cart-with-options"],"supports":{"interactivity":true,"html":false,"reusable":false,"multiple":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true},"color":{"text":true,"background":true}},"viewScriptModule":"woocommerce/add-to-wishlist-button","style":["file:../woocommerce/add-to-wishlist-button-style.css"]}');var c=s(27723),n=s(94715),i=s(10790);s(44544),(0,e.registerBlockType)(r,{icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,n.useBlockProps)({className:"wc-block-add-to-wishlist-button"});return(0,i.jsx)("div",{...e,children:(0,i.jsxs)("button",{type:"button",className:"wc-block-add-to-wishlist-button__toggle",disabled:!0,children:[(0,i.jsx)("span",{className:"wc-block-add-to-wishlist-button__icon wc-block-add-to-wishlist-button__icon--empty",children:(0,i.jsx)(t.A,{icon:o.A,size:24})}),(0,i.jsx)("span",{className:"wc-block-add-to-wishlist-button__label",children:(0,c.__)("Add to wishlist","woocommerce")})]})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})}),n=s(70982),i=s(15703);const a=JSON.parse('{"name":"woocommerce/single-product","icon":"info","title":"Product","description":"Display a single product of your choice with full control over its presentation.","category":"woocommerce","keywords":["WooCommerce","single product"],"supports":{"interactivity":true,"align":["wide","full"]},"attributes":{"productId":{"type":"number"}},"example":{},"usesContext":["postId","postType","queryId"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var l=s(86172);const d=(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"}),u=[["core/columns",{},[["core/column",{},[["woocommerce/product-gallery"]]],["core/column",{},[["core/post-title",{headingLevel:2,isLink:!0,__woocommerceNamespace:l.Q}],["woocommerce/product-rating",{isDescendentOfSingleProductBlock:!0}],["woocommerce/product-price",{isDescendentOfSingleProductBlock:!0}],["woocommerce/product-summary",{isDescendentOfSingleProductBlock:!0}],[(0,i.getSetting)("isBlockTheme",!1)?"woocommerce/add-to-cart-with-options":"woocommerce/add-to-cart-form"],["woocommerce/product-meta"]]]]]],m=["core/columns","core/column","core/post-title","core/post-excerpt","woocommerce/add-to-cart-form","woocommerce/add-to-cart-with-options","woocommerce/product-meta","woocommerce/product-gallery","woocommerce/product-reviews","woocommerce/product-details",...Object.keys((0,n.Y)(a.name))];var p=s(27723),h=s(86087),g=s(98945),w=s(96242),_=s(31716),b=s(94715),x=s(95493),f=s(40314),y=s(47143),v=s(19432),k=s(2284),j=s(56427),C=(s(27539),s(1041));const S=({attributes:e,setAttributes:t,onChange:r})=>(0,o.jsx)(C.A,{selected:e.productId||0,showVariations:!0,onChange:(e=[])=>{const o=e[0]?e[0].id:0;t({productId:o}),r&&r()}}),A=({isEditing:e,setIsEditing:t})=>(0,o.jsx)(b.BlockControls,{children:(0,o.jsx)(j.ToolbarGroup,{controls:[{icon:"edit",title:(0,p.__)("Edit selected product","woocommerce"),onClick:()=>t(!e),isActive:e}]})});var N=s(62796),P=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});const B=({isLoading:t,product:r,clientId:s})=>{const c="wc-block-editor-single-product",{replaceInnerBlocks:n}=(0,y.useDispatch)("core/block-editor"),i=(0,h.useCallback)(()=>{n(s,(0,e.createBlocksFromInnerBlocksTemplate)(u),!1)},[s,n]);return(0,o.jsx)(N.InnerBlockLayoutContextProvider,{parentName:a.name,parentClassName:c,children:(0,o.jsxs)(N.ProductDataContextProvider,{product:r,isLoading:t,children:[(0,o.jsx)(b.InspectorControls,{children:(0,o.jsx)(j.PanelBody,{title:(0,p.__)("Layout","woocommerce"),initialOpen:!0,children:(0,o.jsx)(j.Button,{label:(0,p.__)("Reset layout to default","woocommerce"),onClick:i,variant:"tertiary",className:"wc-block-editor-single-product__reset-layout",icon:P,children:(0,p.__)("Reset layout","woocommerce")})})}),(0,o.jsx)("div",{className:c,children:(0,o.jsx)(b.BlockContextProvider,{value:{postId:r?.id,postType:"product"},children:(0,o.jsx)(b.InnerBlocks,{template:u,allowedBlocks:m,templateLock:!1})})})]})})},I=(0,g.A)(({attributes:e,setAttributes:r,error:s,getProduct:c,product:n,isLoading:i,clientId:l})=>{const{productId:u}=e,m=(0,k.H)(),[g,C]=(0,h.useState)(!u),N=(0,b.useBlockProps)(),P=(0,y.useSelect)(e=>e("core/blocks").getBlockType(a.name),[]),I=(0,y.useSelect)(e=>m?e(f.PRODUCTS_STORE_NAME).getProducts({per_page:1}):null),T="object"==typeof s&&"woocommerce_rest_product_invalid_id"===s?.code;if((0,h.useEffect)(()=>{const t=I?I[0]?.id:null;t&&!u&&(r({...e,productId:t}),C(!1))},[e,u,I,r]),(0,h.useEffect)(()=>{T&&C(!0)},[T]),s&&!T)return(0,o.jsx)(x.A,{className:"wc-block-editor-single-product-error",error:s,isLoading:i,onRetry:c});const E=T?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.A,{icon:v.A,className:"wc-block-editor-single-product__info-icon"}),(0,o.jsx)(j.__experimentalText,{children:(0,p.__)("Previously selected product is no longer available.","woocommerce")})]}):(0,o.jsx)(j.__experimentalText,{children:P.description}),R=T?()=>C(!1):void 0;return(0,o.jsx)("div",{...N,children:(0,o.jsxs)(w.A,{header:(0,p.__)("Single Product Block Error","woocommerce"),children:[(0,o.jsx)(A,{setIsEditing:C,isEditing:g}),g?(0,o.jsxs)(j.Placeholder,{icon:d,label:P.title,className:"wc-block-editor-single-product",children:[(0,o.jsxs)(j.__experimentalHStack,{alignment:"center",children:[" ",E," "]}),(0,o.jsxs)("div",{className:"wc-block-editor-single-product__selection",children:[(0,o.jsx)(S,{attributes:e,setAttributes:r,onChange:R}),!T&&(0,o.jsx)(j.Button,{variant:"secondary",onClick:()=>{C(!1)},children:(0,p.__)("Done","woocommerce")})]})]}):(0,o.jsxs)("div",{children:[(0,o.jsx)(b.InspectorControls,{children:(0,o.jsx)(j.PanelBody,{title:(0,p.__)("Product","woocommerce"),initialOpen:!1,children:(0,o.jsx)(S,{attributes:e,setAttributes:r})})}),(0,o.jsx)(_.A,{productId:u}),(0,o.jsx)(B,{clientId:l,product:n,isLoading:i})]})]})})}),T=[{attributes:a.attributes,supports:a.supports,save:()=>{const e=b.useBlockProps.save();return(0,o.jsx)("div",{...e,children:(0,o.jsx)(b.InnerBlocks.Content,{})})}}];(0,e.registerBlockType)(a,{icon:d,edit:I,save:()=>{const e=b.useBlockProps.save({className:"woocommerce"});return(0,o.jsx)("div",{...e,children:(0,o.jsx)(b.InnerBlocks.Content,{})})},deprecated:T})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(74175),r=s(4921),c=s(94715),n=s(27723),i=s(61909),a=s(56427),l=s(20195),d=s(55414),u=s(46151),m=s(13817),p=s(76748),h=s(88199),g=s(15703),w=s(86087),_=s(14656),b=s(60427),x=s(30612),f=s(58733),y=s(38323),v=s(30426),k=s(20923),j=s.n(k),C=s(18537),S=s(73993),A=s(93832),N=s(37848),P=s(48197),B=s(10790);const I=[{value:"preview-1",name:"In Stock",label:(0,B.jsx)(y.A,{name:"In Stock",count:3}),textLabel:"In Stock (3)"},{value:"preview-2",name:"Out of stock",label:(0,B.jsx)(y.A,{name:"Out of stock",count:3}),textLabel:"Out of stock (3)"},{value:"preview-3",name:"On backorder",label:(0,B.jsx)(y.A,{name:"On backorder",count:2}),textLabel:"On backorder (2)"}];s(28071);const T=e=>e.trim().replace(/\s/g,"").replace(/_/g,"-").replace(/-+/g,"-").replace(/[^a-zA-Z0-9-]/g,"");var E=s(25238);const R=N.nD+"stock_status",D=({attributes:e,isEditor:o=!1})=>{const s=(0,E.LY)(),c=(0,g.getSettingWithCoercion)("isRenderingPhpTemplate",!1,S.isBoolean),[i,a]=(0,w.useState)(!1),{outofstock:k,...D}=(0,g.getSetting)("stockStatusOptions",{}),L=(0,w.useRef)((0,g.getSetting)("hideOutOfStockItems",!1)?D:{outofstock:k,...D}),O=(0,w.useMemo)(()=>((e,t="filter_stock_status")=>{const o=(0,N.Vf)(t);if(!o)return[];const r=(0,S.isString)(o)?o.split(","):o,s=Object.keys(e);return r.filter(e=>s.includes(e))})(L.current,R),[]),[M,V]=(0,w.useState)(O),[F,H]=(0,w.useState)(e.isPreview?I:[]),[z]=(0,w.useState)(Object.entries(L.current).map(([e,t])=>({slug:e,name:t})).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[$]=(0,p.dJ)(),[W,G]=(0,p.xd)("stock_status",O),{data:q,isLoading:U}=(0,h.A)({queryStock:!0,queryState:$,isEditor:o}),Y=(0,w.useCallback)(e=>(0,S.objectHasProp)(q,"stock_status_counts")&&Array.isArray(q.stock_status_counts)?q.stock_status_counts.find(({status:t,count:o})=>t===e&&0!==Number(o)):null,[q]),[Z,J]=(0,w.useState)((0,P.I)());(0,w.useEffect)(()=>{if(U||e.isPreview)return;const t=z.map(t=>{const o=Y(t.slug);if(!(o||M.includes(t.slug)||(r=t.slug,$?.stock_status&&$.stock_status.some(({status:e=[]})=>e.includes(r)))))return null;var r;const s=o?Number(o.count):0;return{value:t.slug,name:(0,C.decodeEntities)(t.name),label:(0,B.jsx)(y.A,{name:(0,C.decodeEntities)(t.name),count:e.showCounts?s:null}),textLabel:e.showCounts?`${(0,C.decodeEntities)(t.name)} (${s})`:(0,C.decodeEntities)(t.name)}}).filter(e=>!!e);H(t),J((0,P.I)())},[e.showCounts,e.isPreview,U,Y,M,$.stock_status,z]);const X="single"!==e.selectType,Q=(0,w.useCallback)(e=>{o||(e&&!c&&G(e),(e=>{if(!window)return;if(0===e.length){const e=(0,A.removeQueryArgs)(window.location.href,R);return void(e!==(0,N.Q)(window.location.href)&&(0,N.CH)(e))}const t=(0,A.addQueryArgs)(window.location.href,{[R]:e.join(",")});t!==(0,N.Q)(window.location.href)&&(0,N.CH)(t)})(e))},[o,G,c]);(0,w.useEffect)(()=>{e.showFilterButton||Q(M)},[e.showFilterButton,M,Q]);const K=(0,w.useMemo)(()=>W,[W]),ee=(0,u.c)(K),te=(0,m.Z)(ee);(0,w.useEffect)(()=>{j()(te,ee)||j()(M,ee)||V(ee)},[M,ee,te]),(0,w.useEffect)(()=>{i||(G(O),a(!0))},[G,i,a,O]);const oe=(0,w.useCallback)(e=>{const t=e=>{const t=F.find(t=>t.value===e);return t?t.name:null},o=({filterAdded:e,filterRemoved:o})=>{const r=e?t(e):null,s=o?t(o):null;r?(0,l.speak)((0,n.sprintf)(/* translators: %s stock statuses (for example: 'instock'...) */ /* translators: %s stock statuses (for example: 'instock'...) */ (0,n.__)("%s filter added.","woocommerce"),r)):s&&(0,l.speak)((0,n.sprintf)(/* translators: %s stock statuses (for example:'instock'...) */ /* translators: %s stock statuses (for example:'instock'...) */ (0,n.__)("%s filter removed.","woocommerce"),s))},r=M.includes(e);if(!X){const t=r?[]:[e];return o(r?{filterRemoved:e}:{filterAdded:e}),void V(t)}if(r){const t=M.filter(t=>t!==e);return o({filterRemoved:e}),void V(t)}const s=[...M,e].sort();o({filterAdded:e}),V(s)},[M,X,F]);if(!U&&0===F.length)return s(!1),null;const re=`h${e.headingLevel}`,se=!e.isPreview&&!L.current||0===F.length,ce=!e.isPreview&&U;if(!(0,g.getSettingWithCoercion)("hasFilterableProducts",!1,S.isBoolean))return s(!1),null;const ne=X?!se&&M.length<F.length:!se&&0===M.length,ie=(0,B.jsx)(re,{className:"wc-block-stock-filter__title",children:e.heading}),ae=se?(0,B.jsx)(f.A,{children:ie}):ie;return s(!0),(0,B.jsxs)(B.Fragment,{children:[!o&&e.heading&&ae,(0,B.jsx)("div",{className:(0,r.A)("wc-block-stock-filter",`style-${e.displayStyle}`,{"is-loading":se}),children:"dropdown"===e.displayStyle?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v.A,{className:(0,r.A)({"single-selection":!X,"is-loading":se}),suggestions:F.filter(e=>!M.includes(e.value)).map(e=>e.value),disabled:se,placeholder:(0,n.__)("Select stock status","woocommerce"),onChange:e=>{!X&&e.length>1&&(e=e.slice(-1));const t=[e=e.map(e=>{const t=F.find(t=>t.value===e);return t?t.value:e}),M].reduce((e,t)=>e.filter(e=>!t.includes(e)));if(1===t.length)return oe(t[0]);const o=[M,e].reduce((e,t)=>e.filter(e=>!t.includes(e)));1===o.length&&oe(o[0])},value:M,displayTransform:e=>{const t=F.find(t=>t.value===e);return t?t.textLabel:e},saveTransform:T,messages:{added:(0,n.__)("Stock filter added.","woocommerce"),removed:(0,n.__)("Stock filter removed.","woocommerce"),remove:(0,n.__)("Remove stock filter.","woocommerce"),__experimentalInvalid:(0,n.__)("Invalid stock filter.","woocommerce")}},Z),ne&&(0,B.jsx)(t.A,{icon:d.A,size:30})]}):(0,B.jsx)(_.CheckboxList,{className:"wc-block-stock-filter-list",options:F,checked:M,onChange:oe,isLoading:se,isDisabled:ce})}),(0,B.jsxs)("div",{className:"wc-block-stock-filter__actions",children:[(M.length>0||o)&&!se&&(0,B.jsx)(x.A,{onClick:()=>{V([]),Q([])},screenReaderLabel:(0,n.__)("Reset stock filter","woocommerce")}),e.showFilterButton&&(0,B.jsx)(b.A,{className:"wc-block-stock-filter__button",isLoading:se,disabled:se||ce,onClick:()=>Q(M),screenReaderLabel:(0,n.__)("Apply stock filter","woocommerce")})]})]})};s(71107);var L=s(68059);const O=(0,a.withSpokenMessages)(({clientId:e,attributes:t,setAttributes:o})=>{const{className:s,heading:l,headingLevel:d,showCounts:u,showFilterButton:m,selectType:p,displayStyle:h}=t,g=(0,c.useBlockProps)({className:(0,r.A)("wc-block-stock-filter",s)});return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(c.InspectorControls,{children:[(0,B.jsx)(a.PanelBody,{children:(0,B.jsx)(L.d,{clientId:e})}),(0,B.jsxs)(a.__experimentalToolsPanel,{label:(0,n.__)("Display Settings","woocommerce"),resetAll:()=>o({showCounts:!1,showFilterButton:!1,displayStyle:"list",selectType:"multiple"}),children:[(0,B.jsx)(a.__experimentalToolsPanelItem,{label:(0,n.__)("Display product count","woocommerce"),hasValue:()=>!1!==u,onDeselect:()=>o({showCounts:!1}),isShownByDefault:!0,children:(0,B.jsx)(a.ToggleControl,{label:(0,n.__)("Display product count","woocommerce"),checked:u,onChange:()=>o({showCounts:!u})})}),(0,B.jsx)(a.__experimentalToolsPanelItem,{label:(0,n.__)("Allow selecting multiple options?","woocommerce"),hasValue:()=>"multiple"!==p,onDeselect:()=>o({selectType:"multiple"}),isShownByDefault:!0,children:(0,B.jsxs)(a.__experimentalToggleGroupControl,{label:(0,n.__)("Allow selecting multiple options?","woocommerce"),isBlock:!0,value:p||"multiple",onChange:e=>o({selectType:e}),className:"wc-block-attribute-filter__multiple-toggle",children:[(0,B.jsx)(a.__experimentalToggleGroupControlOption,{value:"multiple",label:(0,n._x)("Multiple","Number of filters","woocommerce")}),(0,B.jsx)(a.__experimentalToggleGroupControlOption,{value:"single",label:(0,n._x)("Single","Number of filters","woocommerce")})]})}),(0,B.jsx)(a.__experimentalToolsPanelItem,{label:(0,n.__)("Display Style","woocommerce"),hasValue:()=>"list"!==h,onDeselect:()=>o({displayStyle:"list"}),isShownByDefault:!0,children:(0,B.jsxs)(a.__experimentalToggleGroupControl,{label:(0,n.__)("Display Style","woocommerce"),isBlock:!0,value:h,onChange:e=>o({displayStyle:e}),className:"wc-block-attribute-filter__display-toggle",children:[(0,B.jsx)(a.__experimentalToggleGroupControlOption,{value:"list",label:(0,n.__)("List","woocommerce")}),(0,B.jsx)(a.__experimentalToggleGroupControlOption,{value:"dropdown",label:(0,n.__)("Dropdown","woocommerce")})]})}),(0,B.jsx)(a.__experimentalToolsPanelItem,{label:(0,n.__)("Show 'Apply filters' button","woocommerce"),hasValue:()=>!1!==m,onDeselect:()=>o({showFilterButton:!1}),isShownByDefault:!0,children:(0,B.jsx)(a.ToggleControl,{label:(0,n.__)("Show 'Apply filters' button","woocommerce"),help:(0,n.__)("Products will update when the button is clicked.","woocommerce"),checked:m,onChange:e=>o({showFilterButton:e})})})]})]},"inspector"),(0,B.jsxs)("div",{...g,children:[l&&(0,B.jsx)(i.A,{className:"wc-block-stock-filter__title",headingLevel:d,heading:l,onChange:e=>o({heading:e})}),(0,B.jsx)(a.Disabled,{children:(0,B.jsx)(D,{attributes:t,isEditor:!0})})]})]})}),M=JSON.parse('{"name":"woocommerce/stock-filter","title":"Filter by Stock Controls","description":"Enable customers to filter the product grid by stock status.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":false},"html":false,"multiple":false,"color":{"background":true,"text":true,"button":true},"inserter":false,"lock":false},"attributes":{"className":{"type":"string","default":""},"headingLevel":{"type":"number","default":3},"showCounts":{"type":"boolean","default":false},"showFilterButton":{"type":"boolean","default":false},"displayStyle":{"type":"string","default":"list"},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),V={heading:{type:"string",default:(0,n.__)("Filter by stock status","woocommerce")}},F=[{attributes:{...M.attributes,showCounts:{type:"boolean",default:!0},...V},save:({attributes:e})=>{const{className:t,showCounts:o,heading:s,headingLevel:n,showFilterButton:i}=e,a={"data-show-counts":o,"data-heading":s,"data-heading-level":n};return i&&(a["data-show-filter-button"]=i),(0,B.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)}),...a,children:(0,B.jsx)("span",{"aria-hidden":!0,className:"wc-block-product-stock-filter__placeholder"})})}}];(0,e.registerBlockType)(M,{icon:{src:(0,B.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...M.attributes,...V},edit:O,save({attributes:e}){const{className:t}=e;return(0,B.jsx)("div",{...c.useBlockProps.save({className:(0,r.A)("is-loading",t)})})},deprecated:F})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(81475);const r=JSON.parse('{"name":"woocommerce/store-notices","title":"Store Notices","description":"Display shopper-facing notifications generated by WooCommerce or extensions.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"interactivity":{"clientNavigation":true},"multiple":false,"align":["wide","full"]},"attributes":{"align":{"type":"string","default":"wide"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(27723),i=s(19403),a=(s(88677),s(10790));s(40849),(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-store-notices"});return(0,a.jsx)("div",{...e,children:(0,a.jsx)(i.A,{status:"info",isDismissible:!1,children:(0,n.__)("Notices added by WooCommerce or extensions will show up here.","woocommerce")})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(5573),o=s(10790);const r=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M4 11.5H8V10H4V11.5ZM0 0V1.5H12V0H0ZM2 6.5H10V5H2V6.5Z",transform:"translate(6,6)"})});var c=s(93450);const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-filters","title":"Product Filters","description":"Add a set of filters shoppers can use.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":true,"color":{"background":true,"text":true,"heading":true,"enableContrastChecker":false,"button":true},"inserter":true,"interactivity":true,"typography":{"fontSize":true},"layout":{"default":{"type":"flex","orientation":"vertical","flexWrap":"nowrap","justifyContent":"stretch"},"allowEditing":false},"position":{"sticky":true},"spacing":{"blockGap":true}},"textdomain":"woocommerce","usesContext":["postId","query","queryId","forcePageReload"],"attributes":{"isPreview":{"type":"boolean","default":false},"overlayMode":{"type":"string","enum":["off","mobile","always"]},"overlayPosition":{"type":"string","enum":["left","right"]}},"example":{"attributes":{"isPreview":true}},"viewScriptModule":"woocommerce/product-filters","style":"file:../woocommerce/product-filters-style.css","editorStyle":"file:../woocommerce/product-filters-editor.css"}');var i=s(94715),a=s(4921),l=s(98621);const d=e=>{const{backgroundColor:t,textColor:o,style:r}=e;return{textColor:(0,l.yZ)(o,r?.color?.text),backgroundColor:(0,l.yZ)(t,r?.color?.background)}};function u(e){return e.includes(":")&&e.includes("|")?`var(--wp--${e.replace("var:","").replaceAll("|","--")})`:e}function m(e,t){return null!==(o=e)&&o instanceof Object&&o.constructor===Object&&t in e;var o}function p(e){const t=d(e),o={"--wc-product-filters-text-color":t.textColor||"#111","--wc-product-filters-background-color":t.backgroundColor||"#fff"};return m(e,"style")&&m(e.style,"spacing")&&m(e.style.spacing,"blockGap")&&"string"==typeof e.style.spacing.blockGap&&(o["--wc-product-filter-block-spacing"]=u(e.style.spacing.blockGap)),o}const h=[{attributes:{...n.attributes,showFilterDrawer:{type:"boolean"}},save({attributes:e}){const t=i.useBlockProps.save({className:(0,a.A)("wc-block-product-filters",{"is-filter-drawer-disabled":!1===e.showFilterDrawer})}),r=i.useInnerBlocksProps.save(t);return(0,o.jsx)("div",{...r})},isEligible:e=>"boolean"==typeof e.showFilterDrawer,migrate(e){const{showFilterDrawer:t,...o}=e;return{...o,overlayMode:!1===t?"off":"mobile"}}},{save({attributes:e}){const t=i.useBlockProps.save({className:"wc-block-product-filters",style:p(e)}),r=i.useInnerBlocksProps.save(t);return(0,o.jsx)("div",{...r})}}];var g=s(56427),w=s(27723),_=s(49254),b=s(86087),x=s(15703);s(31981);const f=["off","mobile","always"],y=e=>f.includes(e),v=e=>y(e.overlayMode)?e.overlayMode:"mobile",k=[["core/heading",{level:2,content:(0,w.__)("Filters","woocommerce"),style:{margin:{top:"0",bottom:"0"},spacing:{margin:{top:"0",bottom:"0"}}}}],["woocommerce/product-filter-active"],["woocommerce/product-filter-price"],["woocommerce/product-filter-rating"],["woocommerce/product-filter-attribute"],["woocommerce/product-filter-taxonomy"],["woocommerce/product-filter-status"]];(0,e.registerBlockType)(n,{icon:(0,o.jsx)(c.A,{icon:r}),edit:e=>{const{attributes:t,setAttributes:s}=e,{isPreview:n}=t,l=v(t),m="off"!==l,p="right"===t.overlayPosition?"right":"left",[h,f]=(0,b.useState)(!1),j=(0,x.getSetting)("globalStylesColors",{}),C=d(t),S=t?.style?.spacing?.blockGap,A=(0,i.useBlockProps)({className:(0,a.A)("wc-block-product-filters",{"is-overlay-opened":h,"is-filter-drawer-disabled":!m,"is-mobile-overlay":"mobile"===l,"is-overlay-right":m&&"right"===p}),style:{"--wc-product-filters-background-color":C.backgroundColor||j.background||void 0,"--wc-product-filters-text-color":C.textColor||j.text||void 0,"--wc-product-filter-block-spacing":S?u(S):void 0}});let N;return N=n?(0,o.jsx)("div",{className:"wc-block-product-filters__overlay-content",children:(0,o.jsx)(i.InnerBlocks,{templateLock:!1,template:k})}):m?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{className:"wc-block-product-filters__open-overlay",onClick:()=>f(!h),children:[(0,o.jsx)(c.A,{icon:r}),(0,o.jsx)("span",{children:(0,w.__)("Filter products","woocommerce")})]}),(0,o.jsx)("div",{className:"wc-block-product-filters__overlay",children:(0,o.jsx)("div",{className:"wc-block-product-filters__overlay-wrapper",children:(0,o.jsxs)("div",{className:"wc-block-product-filters__overlay-dialog",role:"dialog",children:[(0,o.jsx)("header",{className:"wc-block-product-filters__overlay-header",children:(0,o.jsx)("button",{className:"wc-block-product-filters__close-overlay",onClick:()=>f(!h),children:(0,o.jsx)(c.A,{icon:_.A})})}),(0,o.jsx)("div",{className:"wc-block-product-filters__overlay-content",children:(0,o.jsx)(i.InnerBlocks,{templateLock:!1,template:k})}),(0,o.jsx)("footer",{className:"wc-block-product-filters__overlay-footer",children:(0,o.jsx)("button",{className:"wc-block-product-filters__apply wp-block-button__link wp-element-button",onClick:()=>f(!h),children:(0,o.jsx)("span",{children:(0,w.__)("Apply","woocommerce")})})})]})})})]}):(0,o.jsx)("div",{className:"wc-block-product-filters__content",children:(0,o.jsx)(i.InnerBlocks,{templateLock:!1,template:k})}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.InspectorControls,{children:(0,o.jsxs)(g.PanelBody,{title:(0,w.__)("Settings","woocommerce"),children:[(0,o.jsxs)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Overlay","woocommerce"),help:(0,w.__)("When on, filters are hidden behind a button instead of showing on the page.","woocommerce"),value:l,onChange:e=>{y(e)&&s({overlayMode:e})},children:[(0,o.jsx)(g.__experimentalToggleGroupControlOption,{value:"off",label:(0,w.__)("Off","woocommerce")}),(0,o.jsx)(g.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,w.__)("Mobile","woocommerce")}),(0,o.jsx)(g.__experimentalToggleGroupControlOption,{value:"always",label:(0,w.__)("Always","woocommerce")})]}),"off"!==l&&(0,o.jsxs)(g.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Overlay position","woocommerce"),value:p,onChange:e=>{"left"!==e&&"right"!==e||s({overlayPosition:e})},children:[(0,o.jsx)(g.__experimentalToggleGroupControlOption,{value:"left",label:(0,w.__)("Left","woocommerce")}),(0,o.jsx)(g.__experimentalToggleGroupControlOption,{value:"right",label:(0,w.__)("Right","woocommerce")})]})]})}),(0,o.jsx)("div",{...A,children:N})]})},save:({attributes:e})=>{const t="off"!==v(e),r=i.useBlockProps.save({className:(0,a.A)("wc-block-product-filters",{"is-filter-drawer-disabled":!t})}),s=i.useInnerBlocksProps.save(r);return(0,o.jsx)("div",{...s})},deprecated:h})})(),(()=>{"use strict";var e=s(74997),t=s(5573),o=s(10790);s(13135);var r=s(94715),c=s(88199),n=s(27723),i=s(86087),a=s(15703),l=s(42393),d=s(21995),u=s(56427);const m=JSON.parse('{"name":"woocommerce/product-filter-status","title":"Availability Filter","description":"Let shoppers filter products by availability.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"html":false,"color":{"text":true,"background":false,"__experimentalDefaultControls":{"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":false}},"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false,"blockGap":false}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":false,"radius":false,"style":false,"width":false}}},"attributes":{"showCounts":{"type":"boolean","default":false},"displayStyle":{"type":"string","default":"woocommerce/product-filter-checkbox-list"},"isPreview":{"type":"boolean","default":false},"hideEmpty":{"type":"boolean","default":true}},"usesContext":["query","filterParams"],"example":{"attributes":{"isPreview":true}}}'),p=({attributes:e,setAttributes:t,clientId:s})=>{const{displayStyle:c,showCounts:i,hideEmpty:a}=e;return(0,o.jsx)(r.InspectorControls,{children:(0,o.jsxs)(u.__experimentalToolsPanel,{label:(0,n.__)("Display Settings","woocommerce"),resetAll:()=>{t({displayStyle:m.attributes.displayStyle.default,showCounts:m.attributes.showCounts.default,hideEmpty:m.attributes.hideEmpty.default}),(0,d.w)(s,m.attributes.displayStyle.default)},children:[(0,o.jsx)(u.__experimentalToolsPanelItem,{label:(0,n.__)("Display Style","woocommerce"),hasValue:()=>"woocommerce/product-filter-checkbox-list"!==c,isShownByDefault:!0,onDeselect:()=>{t({displayStyle:m.attributes.displayStyle.default}),(0,d.w)(s,m.attributes.displayStyle.default)},children:(0,o.jsx)(d.N,{clientId:s,currentStyle:c,onChange:e=>t({displayStyle:e})})}),(0,o.jsx)(u.__experimentalToolsPanelItem,{label:(0,n.__)("Product counts","woocommerce"),hasValue:()=>i,onDeselect:()=>t({showCounts:m.attributes.showCounts.default}),isShownByDefault:!0,children:(0,o.jsx)(u.ToggleControl,{label:(0,n.__)("Product counts","woocommerce"),checked:i,onChange:e=>t({showCounts:e})})}),(0,o.jsx)(u.__experimentalToolsPanelItem,{label:(0,n.__)("Empty filter options","woocommerce"),hasValue:()=>!a,onDeselect:()=>t({hideEmpty:m.attributes.hideEmpty.default}),children:(0,o.jsx)(u.ToggleControl,{label:(0,n.__)("Empty filter options","woocommerce"),checked:!a,onChange:e=>t({hideEmpty:!e})})})]})})};(0,e.registerBlockType)(m,{icon:()=>(0,o.jsxs)(t.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("line",{x1:"4",y1:"15.25",x2:"20",y2:"15.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)("line",{x1:"4",y1:"19.25",x2:"13",y2:"19.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)(t.Path,{d:"M4.75 4.8999C4.75 4.20955 5.30964 3.6499 6 3.6499H8.34082C8.7889 3.6499 9.20271 3.88974 9.42544 4.27854L9.62184 4.62136C9.84457 5.01016 10.2584 5.25 10.7065 5.25H13C13.6904 5.25 14.25 5.80964 14.25 6.5V10.3999C14.25 11.0903 13.6904 11.6499 13 11.6499H6C5.30964 11.6499 4.75 11.0903 4.75 10.3999V4.8999Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",fill:"none"})]}),save:()=>{const e=r.useBlockProps.save(),t=r.useInnerBlocksProps.save(e);return(0,o.jsx)("div",{...t})},edit:e=>{const{showCounts:t,hideEmpty:s}=e.attributes,{children:d,...u}=(0,r.useInnerBlocksProps)((0,r.useBlockProps)(),{template:[["core/heading",{level:3,content:(0,n.__)("Availability","woocommerce"),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],["woocommerce/product-filter-checkbox-list"]]}),m=(0,a.getSetting)("stockStatusOptions",{}),{data:h,isLoading:g}=(0,c.A)({queryStock:!0,queryState:{},isEditor:!0}),w=(0,i.useMemo)(()=>Object.entries(m).filter(([e])=>!s||(h?.stock_status_counts?.find(t=>t.status===e)?.count??0)>0).map(([e,o],r)=>{const s=h?.stock_status_counts?.find(t=>t.status===e)?.count??0;return{label:o,ariaLabel:o,value:e,selected:0===r,...t&&{count:s},type:"status"}}),[m,h,s,t]);return(0,o.jsxs)("div",{...u,children:[(0,o.jsx)(p,{...e}),(0,o.jsx)(l.$,{children:(0,o.jsx)(r.BlockContextProvider,{value:{"woocommerce/selectableItems":{items:w,selectionMode:"multiple",storeNamespace:"woocommerce/product-filters",isLoading:g}},children:d})})]})}})})(),(()=>{"use strict";var e=s(74997),t=s(5573),o=s(10790);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-price","title":"Price Filter","description":"Let shoppers filter products by price.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"html":false},"usesContext":["query","filterParams"],"viewScriptModule":"woocommerce/product-filter-price"}');var c=s(94715),n=s(88199),i=s(27723),a=s(96708),l=s(70910),d=s(73993);function u(e,t){return("number"==typeof e?e:parseInt(e,10))/10**t.minorUnit}function m(e){if(!(0,d.objectHasProp)(e,"price_range"))return{currentMin:0,currentMax:0,min:0,max:0};const t=(0,l.getCurrencyFromPriceResponse)(e.price_range),o=(0,d.objectHasProp)(e.price_range,"min_price")&&(0,d.isString)(e.price_range.min_price)?u(e.price_range.min_price,t):0,r=(0,d.objectHasProp)(e.price_range,"max_price")&&(0,d.isString)(e.price_range.max_price)?u(e.price_range.max_price,t):0;return{currentMin:o,currentMax:r,min:o,max:r}}var p=s(42393);(0,e.registerBlockType)(r,{icon:()=>(0,o.jsxs)(t.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("line",{x1:"4",y1:"15.25",x2:"20",y2:"15.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)("line",{x1:"4",y1:"19.25",x2:"13",y2:"19.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)(t.Circle,{cx:"8.75",cy:"7.75",r:"4.75",stroke:"currentColor",strokeWidth:"1.4",fill:"none"}),(0,o.jsx)(t.Path,{d:"M7.99278 6.34419C7.8133 6.46983 7.75717 6.60229 7.75717 6.7002C7.75717 6.79811 7.8133 6.93057 7.99278 7.0562C8.17091 7.18089 8.43983 7.27162 8.75717 7.27162C9.2288 7.27162 9.67418 7.40475 10.0131 7.64199C10.3506 7.87828 10.6143 8.24582 10.6143 8.7002C10.6143 9.15457 10.3506 9.52211 10.0131 9.7584C9.77922 9.92211 9.49465 10.0362 9.18574 10.0913V10.2716C9.18574 10.5083 8.99386 10.7002 8.75717 10.7002C8.52047 10.7002 8.3286 10.5083 8.3286 10.2716V10.0913C8.01968 10.0362 7.73512 9.92211 7.50125 9.7584C7.16369 9.52211 6.90002 9.15457 6.90002 8.70019C6.90002 8.4635 7.0919 8.27162 7.3286 8.27162C7.56529 8.27162 7.75717 8.4635 7.75717 8.7002C7.75717 8.79811 7.8133 8.93057 7.99278 9.0562C8.17091 9.18089 8.43983 9.27162 8.75717 9.27162C9.07451 9.27162 9.34342 9.18089 9.52155 9.0562C9.70103 8.93057 9.75717 8.79811 9.75717 8.7002C9.75717 8.60229 9.70103 8.46983 9.52155 8.34419C9.34342 8.2195 9.07451 8.12877 8.75717 8.12877C8.28553 8.12877 7.84016 7.99564 7.50125 7.7584C7.16369 7.52211 6.90002 7.15457 6.90002 6.7002C6.90002 6.24582 7.16369 5.87828 7.50125 5.64199C7.73512 5.47828 8.01969 5.36415 8.3286 5.30912V5.12877C8.3286 4.89207 8.52047 4.7002 8.75717 4.7002C8.99386 4.7002 9.18574 4.89207 9.18574 5.12877V5.30912C9.49465 5.36415 9.77922 5.47828 10.0131 5.64199C10.3506 5.87828 10.6143 6.24582 10.6143 6.7002C10.6143 6.93689 10.4224 7.12877 10.1857 7.12877C9.94905 7.12877 9.75717 6.93689 9.75717 6.7002C9.75717 6.60229 9.70103 6.46983 9.52155 6.34419C9.34342 6.2195 9.07451 6.12877 8.75717 6.12877C8.43983 6.12877 8.17091 6.2195 7.99278 6.34419Z",fill:"currentColor"})]}),edit:()=>{const e=(0,c.useBlockProps)(),{data:t,isLoading:r}=(0,n.A)({queryPrices:!0,queryState:{},isEditor:!0});return(0,o.jsx)("div",{...e,children:(0,o.jsx)(p.$,{children:(0,o.jsx)(c.BlockContextProvider,{value:{"woocommerce/rangeInput":{...m(t),isLoading:r}},children:(0,o.jsx)(c.InnerBlocks,{allowedBlocks:(0,a.h)(),template:[["core/heading",{level:3,content:(0,i.__)("Price","woocommerce"),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],["woocommerce/product-filter-price-slider",{}]]})})})})},save:()=>{const e=c.useBlockProps.save(),t=c.useInnerBlocksProps.save(e);return(0,o.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(55721),t=s(15703),o=s(74997),r=s(27723);const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-attribute","title":"Attribute Filter","description":"Let shoppers filter products by attribute.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"color":{"text":true,"background":false,"__experimentalDefaultControls":{"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":false}},"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false,"blockGap":false}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":false,"radius":false,"style":false,"width":false}}},"usesContext":["query","filterParams"],"attributes":{"attributeId":{"type":"number","default":0},"showCounts":{"type":"boolean","default":false},"queryType":{"type":"string","default":"or"},"displayStyle":{"type":"string","default":"woocommerce/product-filter-checkbox-list"},"selectType":{"type":"string","default":"multiple"},"isPreview":{"type":"boolean","default":false},"sortOrder":{"type":"string","default":"count-desc"},"hideEmpty":{"type":"boolean","default":true}},"example":{"attributes":{"isPreview":true}},"style":"woocommerce/product-filter-attribute-view-style"}');var n=s(42552),i=s(88199),a=s(73993),l=s(94715),d=s(56427),u=s(86087),m=s(21995);const p=[{id:"blue",label:(0,r.__)("Blue","woocommerce"),value:"blue",rawData:{id:23,name:(0,r.__)("Blue","woocommerce"),slug:"blue",attr_slug:"blue",description:"",parent:0,count:4}},{id:"gray",label:(0,r.__)("Gray","woocommerce"),value:"gray",selected:!0,rawData:{id:29,name:(0,r.__)("Gray","woocommerce"),slug:"gray",attr_slug:"gray",description:"",parent:0,count:3}},{id:"green",label:(0,r.__)("Green","woocommerce"),value:"green",rawData:{id:24,name:(0,r.__)("Green","woocommerce"),slug:"green",attr_slug:"green",description:"",parent:0,count:3}},{id:"red",label:(0,r.__)("Red","woocommerce"),value:"red",selected:!0,rawData:{id:25,name:(0,r.__)("Red","woocommerce"),slug:"red",attr_slug:"red",description:"",parent:0,count:4}},{id:"yellow",label:(0,r.__)("Yellow","woocommerce"),value:"yellow",rawData:{id:30,name:(0,r.__)("Yellow","woocommerce"),slug:"yellow",attr_slug:"yellow",description:"",parent:0,count:1}}],h={"name-asc":(0,r.__)("Name, A to Z","woocommerce"),"name-desc":(0,r.__)("Name, Z to A","woocommerce"),"count-desc":(0,r.__)("Most results first","woocommerce"),"count-asc":(0,r.__)("Least results first","woocommerce")},g=Object.entries(h).map(([e,t])=>({label:t,value:e})),w=c.attributes.sortOrder.default,_=c.attributes.queryType.default;var b=s(10790);const x=({clientId:e,attributes:t,setAttributes:o})=>{const{sortOrder:s,queryType:n,displayStyle:i,showCounts:a,hideEmpty:p}=t;return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(l.InspectorControls,{children:(0,b.jsxs)(d.__experimentalToolsPanel,{label:(0,r.__)("Display Settings","woocommerce"),resetAll:()=>{o({sortOrder:w,queryType:_,displayStyle:c.attributes.displayStyle.default,showCounts:c.attributes.showCounts.default,hideEmpty:c.attributes.hideEmpty.default}),(0,m.w)(e,c.attributes.displayStyle.default)},children:[(0,b.jsx)(d.__experimentalToolsPanelItem,{label:(0,r.__)("Sort Order","woocommerce"),hasValue:()=>s!==w,onDeselect:()=>o({sortOrder:w}),children:(0,b.jsx)(d.SelectControl,{label:(0,r.__)("Sort order","woocommerce"),value:s,options:[{value:"",label:(0,r.__)("Select an option","woocommerce"),disabled:!0},...g],onChange:e=>{e&&Object.keys(h).includes(e)&&o({sortOrder:e})},help:(0,r.__)("Determine the order of filter options.","woocommerce"),__nextHasNoMarginBottom:!0})}),(0,b.jsx)(d.__experimentalToolsPanelItem,{label:(0,r.__)("Logic","woocommerce"),hasValue:()=>n!==_,onDeselect:()=>o({queryType:_}),children:(0,b.jsxs)(d.__experimentalToggleGroupControl,{label:(0,r.__)("Logic","woocommerce"),isBlock:!0,value:n,onChange:e=>{"and"!==e&&"or"!==e||o({queryType:e})},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,style:{width:"100%"},help:"and"===n?(0,u.createInterpolateElement)((0,r.__)("Display products that match <b>all</b> selected attributes (they need to include <b>all of them</b>).","woocommerce"),{b:(0,b.jsx)("strong",{})}):(0,r.__)("Display products that match any of the selected attributes (they don't need to match all).","woocommerce"),children:[(0,b.jsx)(d.__experimentalToggleGroupControlOption,{label:(0,r.__)("Any","woocommerce"),value:"or"}),(0,b.jsx)(d.__experimentalToggleGroupControlOption,{label:(0,r.__)("All","woocommerce"),value:"and"})]})}),(0,b.jsx)(d.__experimentalToolsPanelItem,{label:(0,r.__)("Display Style","woocommerce"),hasValue:()=>i!==c.attributes.displayStyle.default,isShownByDefault:!0,onDeselect:()=>{o({displayStyle:c.attributes.displayStyle.default}),(0,m.w)(e,c.attributes.displayStyle.default)},children:(0,b.jsx)(m.N,{clientId:e,currentStyle:i,onChange:e=>o({displayStyle:e})})}),(0,b.jsx)(d.__experimentalToolsPanelItem,{label:(0,r.__)("Product counts","woocommerce"),hasValue:()=>a!==c.attributes.showCounts.default,onDeselect:()=>o({showCounts:c.attributes.showCounts.default}),isShownByDefault:!0,children:(0,b.jsx)(d.ToggleControl,{label:(0,r.__)("Product counts","woocommerce"),checked:a,onChange:e=>o({showCounts:e}),__nextHasNoMarginBottom:!0})}),(0,b.jsx)(d.__experimentalToolsPanelItem,{label:(0,r.__)("Hide items with no products","woocommerce"),hasValue:()=>p!==c.attributes.hideEmpty.default,onDeselect:()=>o({hideEmpty:c.attributes.hideEmpty.default}),children:(0,b.jsx)(d.ToggleControl,{label:(0,r.__)("Hide items with no products","woocommerce"),checked:p,onChange:e=>o({hideEmpty:e}),__nextHasNoMarginBottom:!0})})]})},"inspector")})};s(42933);const f=(0,t.getSetting)("attributes",[]).reduce((e,t)=>{const o=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return o&&o.id&&e.push(o),e},[]);var y=s(96708),v=s(54703),k=s(42393),j=s(82152),C=s(42986);const S=(0,t.getSetting)("attributes",[]),A=(0,d.withSpokenMessages)(e=>{const{attributes:t}=e,{attributeId:o,queryType:s,isPreview:c,displayStyle:d,showCounts:m,sortOrder:h,hideEmpty:g}=t,w=function(e){if(e)return f.find(t=>t.id===e)}(o),[_,A]=(0,u.useState)([]),[N,P]=(0,u.useState)(!0),{results:B,isLoading:I}=(0,n.G)({namespace:"/wc/store/v1",resourceName:"products/attributes/terms",resourceValues:[w?.id||0],shouldSelect:!!w?.id,query:{orderby:"menu_order",hide_empty:g,__experimental_visual:!0}}),{data:T,isLoading:E}=(0,i.A)({queryAttribute:{taxonomy:w?.taxonomy||"",queryType:s},queryState:{},isEditor:!0});(0,u.useEffect)(()=>{if(I||E)return;const e=(0,a.objectHasProp)(T,"attribute_counts")&&(t=T.attribute_counts,Array.isArray(t)&&t.every(e=>"term"in e&&"count"in e))?T.attribute_counts.map(e=>e.term):[];var t;if(0===e.length&&g)A([]);else{const t=B.filter(t=>!g||e.includes(t.id)).map((e,t)=>({id:e.id.toString(),label:e.name,value:e.id.toString(),selected:0===t,...m&&{count:e.count},...e.__experimentalVisual&&{visual:e.__experimentalVisual}}));A((0,C.Z)(t,h))}P(!1)},[m,B,T,h,g,I,E,w]);const{children:R,...D}=(0,l.useInnerBlocksProps)((0,l.useBlockProps)(),{allowedBlocks:(0,y.h)(v.u),template:[["core/heading",{level:3,content:w?.label||(0,r.__)("Attribute","woocommerce"),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],[d]]}),L=I||E||N;return 0===Object.keys(S).length?(0,b.jsxs)("div",{...D,children:[(0,b.jsx)(x,{...e}),(0,b.jsx)(j.$,{children:(0,b.jsx)("p",{children:(0,r.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woocommerce")})})]}):o&&w?L||0!==B.length?(0,b.jsxs)("div",{...D,children:[(0,b.jsx)(x,{...e}),(0,b.jsx)(k.$,{children:(0,b.jsx)(l.BlockContextProvider,{value:{"woocommerce/selectableItems":{items:0===_.length&&c?p:_,selectionMode:"multiple",storeNamespace:"woocommerce/product-filters",isLoading:L}},children:R})})]}):(0,b.jsxs)("div",{...D,children:[(0,b.jsx)(x,{...e}),(0,b.jsx)(j.$,{children:(0,b.jsx)("p",{children:(0,r.__)("There are no products with the selected attributes.","woocommerce")})})]}):(0,b.jsxs)("div",{...D,children:[(0,b.jsx)(x,{...e}),(0,b.jsx)(j.$,{children:(0,b.jsx)("p",{children:(0,r.__)("Please select an attribute to use this filter!","woocommerce")})})]})}),N=(0,t.getSetting)("attributes",[]),P=(0,t.getSetting)("defaultProductFilterAttribute");(0,o.registerBlockType)(c,{edit:A,icon:e.A,attributes:{...c.attributes,attributeId:{...c.attributes.attributeId,default:parseInt(P.attribute_id,10)}},save:()=>{const e=l.useBlockProps.save(),t=l.useInnerBlocksProps.save(e);return(0,b.jsx)("div",{...t})},variations:N.map((e,t)=>({name:`product-filter-attribute-${e.attribute_name}`,title:(0,r.sprintf)( // translators: %s is the attribute label. // translators: %s is the attribute label. (0,r.__)("%s Filter","woocommerce"),e.attribute_label),description:(0,r.sprintf)( // translators: %s is the attribute label. // translators: %s is the attribute label. (0,r.__)("Let shoppers filter products by %s.","woocommerce"),e.attribute_label.toLocaleLowerCase()),attributes:{attributeId:parseInt(e.attribute_id,10)},isActive:["attributeId"],isDefault:0===t}))})})(),(()=>{"use strict";var e=s(74997),t=s(5573),o=s(10790);var r=s(27723),c=s(4921),n=s(94715),i=s(76748),a=s(88199),l=s(15703),d=s(73993),u=s(86087),m=s(56427);function p({stars:e=5,size:t=24,color:r="currentColor",gap:s=0}){const c=e*t+(e-1)*s;return(0,o.jsx)(m.SVG,{width:c,height:t,viewBox:`0 0 ${c} 24`,fill:r,"aria-hidden":"true",focusable:"false",children:Array.from({length:e},(e,r)=>(0,o.jsx)(m.Path,{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",transform:`translate(${r*(t+s)}, 0)`},r))})}const h=[{id:"rating-5",label:(0,o.jsx)(p,{stars:5}),ariaLabel:(0,r.__)("Rated 5 out of 5","woocommerce"),value:"5",count:35},{id:"rating-4",label:(0,o.jsx)(p,{stars:4}),ariaLabel:(0,r.__)("Rated 4 out of 5","woocommerce"),value:"4",count:20},{id:"rating-3",label:(0,o.jsx)(p,{stars:3}),ariaLabel:(0,r.__)("Rated 3 out of 5","woocommerce"),value:"3",count:3},{id:"rating-2",label:(0,o.jsx)(p,{stars:2}),ariaLabel:(0,r.__)("Rated 2 out of 5","woocommerce"),value:"2",count:6},{id:"rating-1",label:(0,o.jsx)(p,{stars:1}),ariaLabel:(0,r.__)("Rated 1 out of 5","woocommerce"),value:"1",count:1}];var g=s(37848);function w({stars:e,ariaLabel:t}){return(0,o.jsxs)(m.Flex,{title:t,"aria-label":t,justify:"flex-start",gap:1,children:[(0,o.jsx)(m.FlexItem,{children:(0,o.jsx)(p,{stars:e})}),(0,o.jsx)(m.FlexItem,{children:(0,r.__)("& up","woocommerce")})]})}const _=({attributes:e,setAttributes:t})=>{const{showCounts:s,minRating:c}=e;return(0,o.jsx)(n.InspectorControls,{children:(0,o.jsxs)(m.__experimentalToolsPanel,{label:(0,r.__)("Display","woocommerce"),resetAll:()=>{t({minRating:"0",showCounts:!1})},children:[(0,o.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>"0"!==c,label:(0,r.__)("Minimum rating","woocommerce"),onDeselect:()=>t({minRating:"0"}),isShownByDefault:!0,children:(0,o.jsx)(m.RadioControl,{label:(0,r.__)("Minimum rating","woocommerce"),selected:c,className:"wc-block-rating-filter__rating-control",options:[{label:(0,o.jsx)(w,{stars:4,ariaLabel:(0,r.__)("Four stars and up","woocommerce")}),value:"4"},{label:(0,o.jsx)(w,{stars:3,ariaLabel:(0,r.__)("Three stars and up","woocommerce")}),value:"3"},{label:(0,o.jsx)(w,{stars:2,ariaLabel:(0,r.__)("Two stars and up","woocommerce")}),value:"2"},{label:(0,r.__)("No limit","woocommerce"),value:"0"}],onChange:function(e){t({minRating:e})}})}),(0,o.jsx)(m.__experimentalToolsPanelItem,{hasValue:()=>!0===s,label:(0,r.__)("Product counts","woocommerce"),onDeselect:()=>t({showCounts:!1}),isShownByDefault:!0,children:(0,o.jsx)(m.ToggleControl,{label:(0,r.__)("Product counts","woocommerce"),checked:s,onChange:function(e){t({showCounts:e})},__nextHasNoMarginBottom:!0})})]})},"inspector")};var b=s(96708),x=s(54703),f=s(82152),y=s(42393);const v=(0,m.withSpokenMessages)(e=>{const{attributes:t,setAttributes:s,clientId:m}=e,{isPreview:w,showCounts:v,minRating:k}=t,{children:j,...C}=(0,n.useInnerBlocksProps)((0,n.useBlockProps)(),{allowedBlocks:(0,b.h)(x.u),template:[["core/heading",{level:3,content:(0,r.__)("Rating","woocommerce"),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],["woocommerce/product-filter-checkbox-list"]]}),[S]=(0,i.dJ)(),{data:A,isLoading:N}=(0,a.A)({queryRating:!0,queryState:S,isEditor:!0}),[P,B]=(0,u.useState)(w?h:[]),I=!w&&N&&0===P.length,T=(0,u.useMemo)(()=>((e="filter_rating")=>{const t=(0,g.Vf)(e);return t?(0,d.isString)(t)?t.split(","):t:[]})("rating_filter"),[]),[E]=(0,i.xd)("rating",T);if((0,u.useEffect)(()=>{if(N||w)return;if(!A?.rating_counts||0===A?.rating_counts?.length)return void B(h);const e="string"==typeof k?parseFloat(k):0,t=A?.rating_counts?.length?A.rating_counts.sort((e,t)=>t.rating-e.rating).filter(({rating:t})=>t>=e).map(({rating:e,count:t},s)=>({id:`rating-${e}`,label:(0,o.jsx)(p,{stars:e},e),ariaLabel:(0,r.sprintf)(/* translators: %d: rating value. Example: Rated 4 out of 5. */ /* translators: %d: rating value. Example: Rated 4 out of 5. */ (0,r.__)("Rated %d out of 5","woocommerce"),e),value:e?.toString(),selected:0===s,...v&&{count:t}})):[];B(t)},[v,w,A,N,E,k]),!N&&0===P.length)return null;if(!(0,l.getSettingWithCoercion)("hasFilterableProducts",!1,d.isBoolean))return null;const R=!N&&!A.rating_counts?.length;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(_,{clientId:m,attributes:t,setAttributes:s}),(0,o.jsx)("div",{...C,children:(0,o.jsxs)(y.$,{children:[R&&(0,o.jsx)(f.$,{children:(0,r.__)("Your store doesn't have any products with ratings yet. This filter option will display when a product receives a review.","woocommerce")}),(0,o.jsx)("div",{className:(0,c.A)({"is-loading":I}),children:(0,o.jsx)(n.BlockContextProvider,{value:{"woocommerce/selectableItems":{items:P,selectionMode:"multiple",storeNamespace:"woocommerce/product-filters",isLoading:I}},children:j})})]})})]})}),k=JSON.parse('{"name":"woocommerce/product-filter-rating","title":"Rating Filter","description":"Let shoppers filter products by rating.","category":"woocommerce","keywords":[],"supports":{"interactivity":true,"color":{"background":false,"text":true}},"ancestor":["woocommerce/product-filters"],"usesContext":["query","filterParams"],"attributes":{"className":{"type":"string","default":""},"showCounts":{"type":"boolean","default":false},"minRating":{"type":"string","default":"0"},"isPreview":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');(0,e.registerBlockType)(k,{icon:()=>(0,o.jsxs)(t.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("line",{x1:"4",y1:"15.25",x2:"20",y2:"15.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)("line",{x1:"4",y1:"19.25",x2:"13",y2:"19.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,o.jsx)(t.Path,{d:"M8.92572 3.95425C9.01742 3.76843 9.28238 3.76844 9.37409 3.95425L10.4877 6.21072C10.5241 6.28451 10.5945 6.33565 10.676 6.34748L13.1661 6.70933C13.3712 6.73912 13.4531 6.99112 13.3047 7.13575L11.5028 8.89217C11.4439 8.94961 11.417 9.03236 11.4309 9.11346L11.8563 11.5936C11.8913 11.7978 11.6769 11.9535 11.4935 11.8571L9.26624 10.6862C9.19341 10.6479 9.1064 10.6479 9.03357 10.6862L6.80629 11.8571C6.62288 11.9535 6.40853 11.7978 6.44355 11.5936L6.86893 9.11346C6.88283 9.03236 6.85595 8.94961 6.79703 8.89217L4.99512 7.13575C4.84674 6.99112 4.92862 6.73912 5.13367 6.70933L7.62385 6.34748C7.70527 6.33565 7.77566 6.28451 7.81208 6.21072L8.92572 3.95425Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round",fill:"none"})]}),attributes:{...k.attributes},edit:v,save:()=>{const e=n.useBlockProps.save(),t=n.useInnerBlocksProps.save(e);return(0,o.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(74997),t=s(5573),o=s(10790);const r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-active","title":"Active Filters","description":"Display all active filters.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":false,"radius":false,"style":false,"width":false}},"spacing":{"margin":true,"padding":true,"blockGap":false,"__experimentalDefaultControls":{"margin":false,"padding":false,"blockGap":false}}},"usesContext":["activeFilters"],"viewScriptModule":"woocommerce/product-filter-active"}');var c=s(94715),n=s(42393),i=s(54703),a=s(96708),l=s(27723);const d=[{id:"color_blue",type:(0,l.__)("Color","woocommerce"),value:"blue",label:(0,l.__)("Blue","woocommerce")},{id:"color_red",type:(0,l.__)("Color","woocommerce"),value:"red",label:(0,l.__)("Red","woocommerce")},{id:"size_large",type:(0,l.__)("Size","woocommerce"),value:"large",label:(0,l.__)("Large","woocommerce")},{id:"status_instock",type:(0,l.__)("Availability","woocommerce"),value:"instock",label:(0,l.__)("In stock","woocommerce")}];(0,e.registerBlockType)(r,{icon:()=>(0,o.jsxs)(t.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(t.Path,{d:"M9 17.5H11.5V16H9V17.5ZM5 6V7.5L17 7.5V6L5 6ZM7 12.5H15V11H7V12.5Z",fill:"currentColor"}),(0,o.jsx)(t.Path,{d:"M19.9982 13.1948L18.7945 12.2998L15.7111 16.1017L14.0969 14.8993L13.2002 16.1017L16.0185 18.2022L19.9982 13.1948Z",fill:"currentColor"})]}),edit:()=>{const{children:e,...t}=(0,c.useInnerBlocksProps)((0,c.useBlockProps)(),{allowedBlocks:(0,a.h)(i.u),template:[["woocommerce/product-filter-removable-chips"],["woocommerce/product-filter-clear-button"]]});return(0,o.jsx)("div",{...t,children:(0,o.jsx)(n.$,{children:(0,o.jsx)(c.BlockContextProvider,{value:{"woocommerce/removableItems":{items:d,storeNamespace:"woocommerce/product-filters"}},children:e})})})},save:()=>{const e=c.useBlockProps.save(),t=c.useInnerBlocksProps.save(e);return(0,o.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(55721),t=s(15703),o=s(74997),r=s(27723),c=s(94715);const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-taxonomy","title":"Taxonomy Filter","description":"Let shoppers filter products by category, brand, or tag.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filters"],"supports":{"interactivity":true,"color":{"text":true,"background":false,"__experimentalDefaultControls":{"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontWeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":false}},"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false,"blockGap":false}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":false,"radius":false,"style":false,"width":false}}},"usesContext":["query","filterParams"],"attributes":{"taxonomy":{"type":"string","default":"product_cat"},"showCounts":{"type":"boolean","default":false},"displayStyle":{"type":"string","default":"woocommerce/product-filter-checkbox-list"},"isPreview":{"type":"boolean","default":false},"sortOrder":{"type":"string","default":"count-desc"},"hideEmpty":{"type":"boolean","default":true}},"example":{"attributes":{"isPreview":true}}}');var i=s(56427),a=s(86087),l=s(47143),d=s(3582),u=s(88199),m=s(73993),p=s(21995),h=s(10790);const g=(0,t.getSetting)("sortableTaxonomies",["product_cat"]),w=({attributes:e,setAttributes:t,clientId:o})=>{const{showCounts:s,sortOrder:l,hideEmpty:d,displayStyle:u,taxonomy:m}=e,w=(0,a.useMemo)(()=>{const e=[{label:(0,r.__)("Count (High to Low)","woocommerce"),value:"count-desc"},{label:(0,r.__)("Count (Low to High)","woocommerce"),value:"count-asc"},{label:(0,r.__)("Name (A to Z)","woocommerce"),value:"name-asc"},{label:(0,r.__)("Name (Z to A)","woocommerce"),value:"name-desc"}];return g.includes(m)?[{label:(0,r.__)("Menu order","woocommerce"),value:"menu_order-asc"},...e]:e},[m]);return(0,h.jsx)(c.InspectorControls,{children:(0,h.jsxs)(i.__experimentalToolsPanel,{label:(0,r.__)("Display Settings","woocommerce"),resetAll:()=>{t({sortOrder:n.attributes.sortOrder.default,displayStyle:n.attributes.displayStyle.default,showCounts:n.attributes.showCounts.default,hideEmpty:n.attributes.hideEmpty.default}),(0,p.w)(o,n.attributes.displayStyle.default)},children:[(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Sort Order","woocommerce"),hasValue:()=>"count-desc"!==l,onDeselect:()=>t({sortOrder:n.attributes.sortOrder.default}),children:(0,h.jsx)(i.SelectControl,{label:(0,r.__)("Sort Order","woocommerce"),value:l,options:w,onChange:e=>t({sortOrder:e})})}),(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Display Style","woocommerce"),hasValue:()=>"woocommerce/product-filter-checkbox-list"!==u,isShownByDefault:!0,onDeselect:()=>{t({displayStyle:n.attributes.displayStyle.default}),(0,p.w)(o,n.attributes.displayStyle.default)},children:(0,h.jsx)(p.N,{clientId:o,currentStyle:u,onChange:e=>t({displayStyle:e})})}),(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Product counts","woocommerce"),hasValue:()=>s,onDeselect:()=>t({showCounts:n.attributes.showCounts.default}),isShownByDefault:!0,children:(0,h.jsx)(i.ToggleControl,{label:(0,r.__)("Product counts","woocommerce"),checked:s,onChange:e=>t({showCounts:e})})}),(0,h.jsx)(i.__experimentalToolsPanelItem,{label:(0,r.__)("Hide items with no products","woocommerce"),hasValue:()=>!d,onDeselect:()=>t({hideEmpty:n.attributes.hideEmpty.default}),children:(0,h.jsx)(i.ToggleControl,{label:(0,r.__)("Hide items with no products","woocommerce"),checked:d,onChange:e=>t({hideEmpty:e})})})]})})},_=[{id:"sample-item-1",label:"Sample Item 1",value:"sample-item-1",selected:!1,count:10},{id:"sample-item-2",label:"Sample Item 2",value:"sample-item-2",selected:!0,count:12},{id:"sample-item-3",label:"Sample Item 3",value:"sample-item-3",selected:!1,count:5}];var b=s(96708),x=s(54703),f=s(42393),y=s(82152);const v=(0,t.getSetting)("filterableProductTaxonomies",[]);function k(e){const t=v.find(t=>t.name===e);return t?t.label:(0,r.__)("Taxonomy","woocommerce")}var j=s(42986);const C=Object.freeze([]),S=Object.freeze({taxonomyTerms:C,isTermsLoading:!1}),A=(0,i.withSpokenMessages)(e=>{const{attributes:t}=e,{taxonomy:o,isPreview:s,displayStyle:n,showCounts:i,sortOrder:p,hideEmpty:g}=t,[v,A]=(0,a.useState)(s?(0,j.Z)([..._],p):[]),[N,P]=(0,a.useState)(!s),{taxonomyTerms:B,isTermsLoading:I}=(0,l.useSelect)(e=>{if(s||!o)return S;const{getEntityRecords:t,hasFinishedResolution:r}=e(d.store),c={per_page:15,hide_empty:g,orderby:"name",order:"asc"};return{taxonomyTerms:t("taxonomy",o,c)||C,isTermsLoading:!r("getEntityRecords",["taxonomy",o,c])}},[o,g,s]),{data:T,isLoading:E}=(0,u.A)({queryTaxonomy:s?void 0:o,queryState:{},isEditor:!0});(0,a.useEffect)(()=>{if(s){const e=_.map(e=>{if(i)return e;const{count:t,...o}=e;return o});return A((0,j.Z)(e,p)),void P(!1)}if(I||E)return void P(!0);if(!B.length)return A([]),void P(!1);const e=(0,m.objectHasProp)(T,"taxonomy_counts")&&Array.isArray(T.taxonomy_counts)?T.taxonomy_counts:[],t=function(e,t){const o=new Map;e.forEach(e=>{const t=e.parent??0;o.has(t)||o.set(t,[]),o.get(t).push(e)}),o.keys().forEach(e=>{o.set(e,(0,j.Z)(o.get(e),t))});const r=[];return function e(t,s=0,c=new Set){s>10||t.forEach(t=>{if(!t.termId||c.has(t.termId))return;c.add(t.termId),r.push({...t,depth:s});const n=o.get(t.termId)||[];n.length>0&&e(n,s+1,c)})}(o.get(0)),r}(B.reduce((t,o)=>{const r=e.find(e=>e.term===o.id)?.count||0;return g&&0===r||t.push({label:o.name,value:o.slug,selected:!1,...i&&{count:r},id:String(o.id),termId:o.id,parent:o.parent||0,menuOrder:o.menu_order??0}),t},[]),p);A(t),P(!1)},[o,B,T,p,g,i,s,I,E]);const{children:R,...D}=(0,c.useInnerBlocksProps)((0,c.useBlockProps)(),{allowedBlocks:(0,b.h)(x.u),template:[["core/heading",{level:3,content:k(o),style:{spacing:{margin:{bottom:"0.625rem",top:"0"}}}}],[n]]}),L=!s&&(I||E||N);return o?L||s||0!==B.length?(0,h.jsxs)("div",{...D,children:[(0,h.jsx)(w,{...e}),(0,h.jsx)(f.$,{children:(0,h.jsx)(c.BlockContextProvider,{value:{"woocommerce/selectableItems":{items:0===v.length&&s?_:v,selectionMode:"multiple",storeNamespace:"woocommerce/product-filters",isLoading:L}},children:R})})]}):(0,h.jsxs)("div",{...D,children:[(0,h.jsx)(w,{...e}),(0,h.jsx)(y.$,{children:(0,h.jsx)("p",{children:(0,r.sprintf)( // translators: %s: Taxonomy label. // translators: %s: Taxonomy label. (0,r.__)("There are no products associated with %s.","woocommerce"),k(o))})})]}):(0,h.jsxs)("div",{...D,children:[(0,h.jsx)(w,{...e}),(0,h.jsx)(y.$,{children:(0,h.jsx)("p",{children:(0,r.__)("Please select a taxonomy to use this filter!","woocommerce")})})]})}),N=(0,t.getSetting)("filterableProductTaxonomies",[]);(0,o.registerBlockType)(n,{edit:A,icon:e.A,save:()=>(0,h.jsx)("div",{...c.useBlockProps.save(),...c.useInnerBlocksProps.save()}),variations:N.map((e,t)=>({name:`product-filter-taxonomy-${e.name}`,title:(0,r.sprintf)( // translators: %s is the taxonomy label. // translators: %s is the taxonomy label. (0,r.__)("%s Filter","woocommerce"),e.label),description:(0,r.sprintf)( // translators: %s is the taxonomy label. // translators: %s is the taxonomy label. (0,r.__)("Let shoppers filter products by %s.","woocommerce"),e.label.toLocaleLowerCase()),attributes:{taxonomy:e.name},isActive:["taxonomy"],isDefault:0===t}))})})(),(()=>{"use strict";var e=s(76339),t=s(74997);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-removable-chips","title":"Chips","description":"Display active filters as removable chips.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filter-active"],"supports":{"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"default":{"type":"flex"}},"interactivity":true},"usesContext":["queryId","woocommerce/removableItems"],"attributes":{"chipText":{"type":"string"},"customChipText":{"type":"string"},"chipBackground":{"type":"string"},"customChipBackground":{"type":"string"},"chipBorder":{"type":"string"},"customChipBorder":{"type":"string"}},"style":"file:../woocommerce/product-filter-removable-chips-style.css"}');var r=s(27723),c=s(4921),n=s(10790),i=s(5573),a=(0,n.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(i.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),l=(0,n.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,n.jsx)(i.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})}),d=s(93450),u=s(73580),m=s(14656),p=s(56427),h=s(94715),g=s(98621);function w(e){const{chipText:t,chipBackground:o,chipBorder:r,customChipText:s,customChipBackground:c,customChipBorder:n}=e,i={"--wc-product-filter-removable-chips-text":(0,g.yZ)(t,s),"--wc-product-filter-removable-chips-background":(0,g.yZ)(o,c),"--wc-product-filter-removable-chips-border":(0,g.yZ)(r,n)};return Object.keys(i).reduce((e,t)=>(i[t]&&(e[t]=i[t]),e),{})}function _(e){const{chipText:t,chipBackground:o,chipBorder:r,customChipText:s,customChipBackground:c,customChipBorder:n}=e;return{"has-chip-text-color":t||s,"has-chip-background-color":o||c,"has-chip-border-color":r||n}}const b=(0,h.withColors)({chipText:"chip-text",chipBorder:"chip-border",chipBackground:"chip-background"})(e=>{const o=(0,h.__experimentalUseMultipleOriginColorsAndGradients)(),{name:s,context:i,clientId:g,attributes:b,setAttributes:x,chipText:f,setChipText:y,chipBackground:v,setChipBackground:k,chipBorder:j,setChipBorder:C}=e,{customChipText:S,customChipBackground:A,customChipBorder:N,layout:P}=b,B=i["woocommerce/removableItems"],{items:I}=B??{},T=(0,t.getBlockSupport)(s,"layout"),E=T?.default,R=P||E||{},D=(0,h.useBlockProps)({className:(0,c.A)("wc-block-product-filter-removable-chips",{..._(b)}),style:w(b)}),L=(0,h.useInnerBlocksProps)(D,{});return(0,n.jsxs)("div",{...L,children:[(0,n.jsx)(h.BlockControls,{children:(0,n.jsxs)(p.ToolbarGroup,{children:[(0,n.jsx)(p.ToolbarButton,{icon:a,label:(0,r.__)("Horizontal","woocommerce"),onClick:()=>x({layout:{...R,orientation:"horizontal"}}),isPressed:"horizontal"===R.orientation||!R.orientation}),(0,n.jsx)(p.ToolbarButton,{icon:l,label:(0,r.__)("Vertical","woocommerce"),onClick:()=>x({layout:{...R,orientation:"vertical"}}),isPressed:"vertical"===R.orientation})]})}),(0,n.jsx)("ul",{className:"wc-block-product-filter-removable-chips__items",children:I?.map((e,t)=>{return(0,n.jsxs)("li",{className:"wc-block-product-filter-removable-chips__item",children:[(0,n.jsx)("span",{className:"wc-block-product-filter-removable-chips__label",children:e.type+": "+e.label}),(0,n.jsxs)("button",{className:"wc-block-product-filter-removable-chips__remove",children:[(0,n.jsx)(d.A,{className:"wc-block-product-filter-removable-chips__remove-icon",icon:u.A,size:25}),(0,n.jsx)(m.Label,{screenReaderLabel:(o=e.type+": "+e.label,(0,r.sprintf)(/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ /* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ (0,r.__)("Remove %s filter","woocommerce"),o))})]})]},t);var o})}),(0,n.jsx)(h.InspectorControls,{group:"color",children:o.hasColorsOrGradients&&(0,n.jsx)(h.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{label:(0,r.__)("Chip Text","woocommerce"),colorValue:f.color||S,onColorChange:e=>{y(e),x({customChipText:e})},resetAllFilter:()=>{y(""),x({customChipText:""})}},{label:(0,r.__)("Chip Border","woocommerce"),colorValue:j.color||N,onColorChange:e=>{C(e),x({customChipBorder:e})},resetAllFilter:()=>{C(""),x({customChipBorder:""})}},{label:(0,r.__)("Chip Background","woocommerce"),colorValue:v.color||A,onColorChange:e=>{k(e),x({customChipBackground:e})},resetAllFilter:()=>{k(""),x({customChipBackground:""})}}],panelId:g,...o})})]})});(0,t.registerBlockType)(o,{edit:b,icon:e.A,save:({attributes:e,style:t})=>{const o=h.useBlockProps.save({className:(0,c.A)("wc-block-product-filter-removable-chips",e.className,_(e)),style:{...t,...w(e)}});return(0,n.jsx)("div",{...o})}})})(),(()=>{"use strict";var e=s(74997),t=s(5764);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-clear-button","title":"Clear filters","description":"Let shoppers clear any active filters.","category":"woocommerce","keywords":["WooCommerce","clear filters"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filter-active"],"usesContext":["woocommerce/removableItems"],"supports":{"interactivity":true,"inserter":true}}');var r=s(94715),c=s(27723),n=s(10790);s(63664),(0,e.registerBlockType)(o,{icon:t.A,edit:()=>{const e=(0,r.useBlockProps)(),t=(0,r.useInnerBlocksProps)(e,{allowedBlocks:["core/buttons","core/button"],template:[["core/buttons",{layout:{type:"flex",verticalAlignment:"stretched"}},[["core/button",{text:(0,c.__)("Clear filters","woocommerce"),className:"wc-block-product-filter-clear-button is-style-outline",style:{border:{width:"1px"},typography:{textDecoration:"none"},outline:"none",fontSize:"medium",spacing:{padding:{left:"8px",right:"8px",top:"5px",bottom:"5px"}}},textAlign:"center",width:100}]]]]});return(0,n.jsx)("div",{...t})},save:function(){return(0,n.jsx)(r.InnerBlocks.Content,{})}})})(),(()=>{"use strict";var e=s(76339),t=s(74997);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-checkbox-list","title":"List","description":"Display filter options as a list.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filter-attribute","woocommerce/product-filter-status","woocommerce/product-filter-taxonomy","woocommerce/product-filter-rating"],"supports":{"interactivity":true,"woocommerce":{"innerBlockDisplayStyle":true}},"usesContext":["woocommerce/selectableItems"],"attributes":{"optionElementBorder":{"type":"string","default":""},"customOptionElementBorder":{"type":"string","default":""},"optionElementSelected":{"type":"string","default":""},"customOptionElementSelected":{"type":"string","default":""},"optionElement":{"type":"string","default":""},"customOptionElement":{"type":"string","default":""},"labelElement":{"type":"string","default":""},"customLabelElement":{"type":"string","default":""}},"viewScriptModule":"woocommerce/product-filter-checkbox-list","style":"file:../woocommerce/product-filter-checkbox-list-style.css","editorStyle":"file:../woocommerce/product-filter-checkbox-list-editor.css"}');var r=s(4921),c=s(27723),n=s(56427),i=s(5573),a=s(10790);const l=e=>(0,a.jsx)(i.SVG,{viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)(i.Path,{d:"M9.25 1.19922L3.75 6.69922L1 3.94922",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});var d=s(86087),u=s(72620),m=s(94715),p=(s(97176),s(24966),s(98621));function h(e){const{optionElement:t,optionElementBorder:o,optionElementSelected:r,customOptionElement:s,customOptionElementBorder:c,customOptionElementSelected:n,labelElement:i,customLabelElement:a}=e,l={"--wc-product-filter-checkbox-list-option-element":(0,p.yZ)(t,s),"--wc-product-filter-checkbox-list-option-element-border":(0,p.yZ)(o,c),"--wc-product-filter-checkbox-list-option-element-selected":(0,p.yZ)(r,n),"--wc-product-filter-checkbox-list-label-element":(0,p.yZ)(i,a)};return Object.keys(l).reduce((e,t)=>(l[t]&&(e[t]=l[t]),e),{})}function g(e){const{optionElement:t,optionElementBorder:o,optionElementSelected:r,customOptionElement:s,customOptionElementBorder:c,customOptionElementSelected:n,labelElement:i,customLabelElement:a}=e;return{"has-option-element-color":t||s,"has-option-element-border-color":o||c,"has-option-element-selected-color":r||n,"has-label-element-color":i||a}}var w=s(79410);const _=(0,m.withColors)({optionElementBorder:"option-element-border",optionElementSelected:"option-element-border",optionElement:"option-element",labelElement:"label-element"})(e=>{const{clientId:t,context:o,attributes:s,setAttributes:i,optionElementBorder:p,setOptionElementBorder:_,optionElementSelected:b,setOptionElementSelected:x,optionElement:f,setOptionElement:y,labelElement:v,setLabelElement:k}=e,{customOptionElementBorder:j,customOptionElementSelected:C,customOptionElement:S,customLabelElement:A}=s,N=o?.["woocommerce/selectableItems"]??{},P=N.isLoading??!1,B=Array.isArray(N.items)?N.items:[],I=(0,m.__experimentalUseMultipleOriginColorsAndGradients)(),T=(0,m.useBlockProps)({className:(0,r.A)("wc-block-product-filter-checkbox-list",{"is-loading":P,...g(s)}),style:h(s)}),E=(0,d.useMemo)(()=>[...Array(5)].map((e,t)=>(0,a.jsx)("div",{className:"wc-block-product-filter-checkbox-list__item",style:{width:Math.floor(75*Math.random())+"%"},children:" "},t)),[]),R=B.length>15;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{...T,children:(0,a.jsxs)(n.Disabled,{children:[(0,a.jsxs)("div",{className:"wc-block-product-filter-checkbox-list__items",children:[P&&E,!P&&(R?B.slice(0,15):B).map((e,t)=>(0,a.jsx)("div",{className:(0,r.A)("wc-block-product-filter-checkbox-list__item",{[`has-depth-${e?.depth}`]:e?.depth}),children:(0,a.jsxs)("label",{htmlFor:`interactive-checkbox-${t}`,className:" wc-block-product-filter-checkbox-list__label",children:[(0,a.jsxs)("span",{className:"wc-block-product-filter-checkbox-list__input-wrapper",children:[(0,a.jsx)("input",{name:`interactive-checkbox-${t}`,type:"checkbox",className:"wc-block-product-filter-checkbox-list__input",defaultChecked:!!e.selected}),(0,a.jsx)(n.Icon,{className:"wc-block-product-filter-checkbox-list__mark",icon:l})]}),(0,a.jsxs)("span",{className:"wc-block-product-filter-checkbox-list__text-wrapper",children:[void 0!==e.visual&&(0,a.jsx)("span",{className:(0,r.A)("wc-block-product-filter-checkbox-list__color-swatch",{"is-empty":(0,w.gu)(e.visual)}),style:(0,w.mm)(e.visual),"aria-hidden":"true"}),(0,a.jsx)("span",{className:"wc-block-product-filter-checkbox-list__text",children:"string"==typeof e.label?(0,u.j)(e.label):e.label}),void 0!==e.count&&(0,a.jsx)("span",{className:"wc-block-product-filter-checkbox-list__count",children:` (${e.count})`})]})]})},t))]}),!P&&R&&(0,a.jsx)("button",{className:"wc-block-product-filter-checkbox-list__show-more",children:(0,c.__)("Show more…","woocommerce")})]})}),(0,a.jsx)(m.InspectorControls,{group:"color",children:I.hasColorsOrGradients&&(0,a.jsx)(m.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{label:(0,c.__)("Label","woocommerce"),colorValue:v.color||A,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{k(e),i({customLabelElement:e})},resetAllFilter:()=>{k(""),i({customLabelElement:""})}},{label:(0,c.__)("Option Element Border","woocommerce"),colorValue:p.color||j,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{_(e),i({customOptionElementBorder:e})},resetAllFilter:()=>{_(""),i({customOptionElementBorder:""})}},{label:(0,c.__)("Option Element (Selected)","woocommerce"),colorValue:b.color||C,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{x(e),i({customOptionElementSelected:e})},resetAllFilter:()=>{x(""),i({customOptionElementSelected:""})}},{label:(0,c.__)("Option Element","woocommerce"),colorValue:f.color||S,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{y(e),i({customOptionElement:e})},resetAllFilter:()=>{y(""),i({customOptionElement:""})}}],panelId:t,...I})})]})});(0,t.registerBlockType)(o,{edit:_,icon:e.A,save:({attributes:e})=>{const t=m.useBlockProps.save({className:(0,r.A)("wc-block-product-filter-checkbox-list",e.className,g(e)),style:{...h(e)}});return(0,a.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(76339),t=s(74997);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"woocommerce/product-filter-chips","title":"Chips","description":"Display filter options as chips.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","apiVersion":3,"ancestor":["woocommerce/product-filter-attribute","woocommerce/product-filter-taxonomy","woocommerce/product-filter-status","woocommerce/add-to-cart-with-options-variation-selector-attribute"],"supports":{"interactivity":true,"woocommerce":{"innerBlockDisplayStyle":true},"typography":{"fontSize":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true},"spacing":{"padding":true,"__experimentalSkipSerialization":true}},"selectors":{"border":".wp-block-woocommerce-product-filter-chips:not(.is-style-swatch) .wc-block-product-filter-chips__item","spacing":{"padding":".wp-block-woocommerce-product-filter-chips:not(.is-style-swatch) .wc-block-product-filter-chips__item"}},"usesContext":["woocommerce/selectableItems","woocommerce/attributeId"],"attributes":{"chipText":{"type":"string"},"customChipText":{"type":"string"},"chipBackground":{"type":"string"},"customChipBackground":{"type":"string"},"chipBorder":{"type":"string"},"customChipBorder":{"type":"string"},"selectedChipText":{"type":"string"},"customSelectedChipText":{"type":"string"},"selectedChipBackground":{"type":"string"},"customSelectedChipBackground":{"type":"string"},"selectedChipBorder":{"type":"string"},"customSelectedChipBorder":{"type":"string"}},"viewScriptModule":"woocommerce/product-filter-chips","style":"file:../woocommerce/product-filter-chips-style.css","editorStyle":"file:../woocommerce/product-filter-chips-editor.css"}');var r=s(27723),c=s(56427),n=s(4921),i=s(72620),a=s(15703),l=s(94715),d=(s(24415),s(98621));function u(e){const{chipText:t,chipBackground:o,chipBorder:r,selectedChipText:s,selectedChipBackground:c,selectedChipBorder:n,customChipText:i,customChipBackground:a,customChipBorder:l,customSelectedChipText:u,customSelectedChipBackground:m,customSelectedChipBorder:p}=e,h={"--wc-product-filter-chips-text":(0,d.yZ)(t,i),"--wc-product-filter-chips-background":(0,d.yZ)(o,a),"--wc-product-filter-chips-border":(0,d.yZ)(r,l),"--wc-product-filter-chips-selected-text":(0,d.yZ)(s,u),"--wc-product-filter-chips-selected-background":(0,d.yZ)(c,m),"--wc-product-filter-chips-selected-border":(0,d.yZ)(n,p)};return Object.keys(h).reduce((e,t)=>(h[t]&&(e[t]=h[t]),e),{})}function m(e){const{chipText:t,chipBackground:o,chipBorder:r,selectedChipText:s,selectedChipBackground:c,selectedChipBorder:n,customChipText:i,customChipBackground:a,customChipBorder:l,customSelectedChipText:d,customSelectedChipBackground:u,customSelectedChipBorder:m}=e;return{"has-chip-text-color":t||i,"has-chip-background-color":o||a,"has-chip-border-color":r||l,"has-selected-chip-text-color":s||d,"has-selected-chip-background-color":c||u,"has-selected-chip-border-color":n||m}}var p=s(79410),h=s(10790);const g=["42%","67%","31%","55%","73%","28%","48%","61%"],w=(0,l.withColors)({chipText:"chip-text",chipBorder:"chip-border",chipBackground:"chip-background",selectedChipText:"selected-chip-text",selectedChipBorder:"selected-chip-border",selectedChipBackground:"selected-chip-background"})(e=>{const t=(0,l.__experimentalUseMultipleOriginColorsAndGradients)(),{context:o,clientId:s,attributes:d,setAttributes:w,chipText:_,setChipText:b,chipBackground:x,setChipBackground:f,chipBorder:y,setChipBorder:v,selectedChipText:k,setSelectedChipText:j,selectedChipBackground:C,setSelectedChipBackground:S,selectedChipBorder:A,setSelectedChipBorder:N}=e,{customChipText:P,customChipBackground:B,customChipBorder:I,customSelectedChipText:T,customSelectedChipBackground:E,customSelectedChipBorder:R}=d,{isLoading:D=!1,items:L=[]}=o?.["woocommerce/selectableItems"]??{},O=L.some(e=>"visual"in e),M=(0,a.getSetting)("globalStylesColors",{}),V=u(d),F=(0,l.__experimentalUseBorderProps)(d),H=(0,l.__experimentalGetSpacingClassesAndStyles)(d),z=(0,l.useBlockProps)({className:(0,n.A)("wc-block-product-filter-chips",{"is-loading":D,"is-style-swatch":O,...m(d)}),style:{...V,"--wc-product-filter-chips-text":V["--wc-product-filter-chips-text"]||M.text||void 0,"--wc-product-filter-chips-background":V["--wc-product-filter-chips-background"]||M.background||void 0}});if(!L)return(0,h.jsx)(h.Fragment,{});const $=L.length>15,W=(0,n.A)("wc-block-product-filter-chips__item",!O&&F.className,!O&&H.className),G=O?void 0:{...F.style,...H.style},q=g.map((e,t)=>(0,h.jsx)("div",{className:W,style:{...G,width:e},children:" "},t));return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{...z,children:(0,h.jsxs)(c.Disabled,{children:[(0,h.jsxs)("div",{className:"wc-block-product-filter-chips__items",children:[D&&q,!D&&($?L.slice(0,15):L).map((e,t)=>(0,h.jsx)("div",{className:W,style:G,"aria-checked":!!e.selected,children:(0,h.jsxs)("span",{className:"wc-block-product-filter-chips__label",children:[(0,h.jsx)("span",{className:(0,n.A)("wc-block-product-filter-chips__swatch",{"wc-block-product-filter-chips__swatch--no-color":(0,p.gu)(e.visual)}),style:(0,p.mm)(e.visual),"aria-hidden":"true"}),(0,h.jsx)("span",{className:"wc-block-product-filter-chips__text",children:"string"==typeof e.label?(0,i.j)(e.label):e.label}),void 0!==e.count&&(0,h.jsx)("span",{className:"wc-block-product-filter-chips__count",children:` (${e.count})`})]})},t))]}),!D&&$&&(0,h.jsx)("button",{className:"wc-block-product-filter-chips__show-more",children:(0,r.__)("Show more…","woocommerce")})]})}),(0,h.jsx)(l.InspectorControls,{group:"color",children:t.hasColorsOrGradients&&(0,h.jsx)(l.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[...O?[]:[{label:(0,r.__)("Unselected Chip Text","woocommerce"),colorValue:_.color||P,onColorChange:e=>{b(e),w({customChipText:e})},resetAllFilter:()=>{b(""),w({customChipText:""})}}],{label:(0,r.__)("Unselected Chip Border","woocommerce"),colorValue:y.color||I,onColorChange:e=>{v(e),w({customChipBorder:e})},resetAllFilter:()=>{v(""),w({customChipBorder:""})}},...O?[]:[{label:(0,r.__)("Unselected Chip Background","woocommerce"),colorValue:x.color||B,onColorChange:e=>{f(e),w({customChipBackground:e})},resetAllFilter:()=>{f(""),w({customChipBackground:""})}},{label:(0,r.__)("Selected Chip Text","woocommerce"),colorValue:k.color||T,onColorChange:e=>{j(e),w({customSelectedChipText:e})},resetAllFilter:()=>{j(""),w({customSelectedChipText:""})}}],{label:(0,r.__)("Selected Chip Border","woocommerce"),colorValue:A.color||R,onColorChange:e=>{N(e),w({customSelectedChipBorder:e})},resetAllFilter:()=>{N(""),w({customSelectedChipBorder:""})}},...O?[]:[{label:(0,r.__)("Selected Chip Background","woocommerce"),colorValue:C.color||E,onColorChange:e=>{S(e),w({customSelectedChipBackground:e})},resetAllFilter:()=>{S(""),w({customSelectedChipBackground:""})}}]],panelId:s,...t})})]})});(0,t.registerBlockType)(o,{edit:w,icon:e.A,save:({attributes:e})=>{const t=l.useBlockProps.save({className:(0,n.A)("wc-block-product-filter-chips",e.className,m(e)),style:{...u(e)}});return(0,h.jsx)("div",{...t})}})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});const c=JSON.parse('{"name":"woocommerce/product-filter-price-slider","title":"Price Slider","description":"Let shoppers choose a price range with a slider.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"html":false,"color":{"enableContrastChecker":false,"background":false,"text":false},"interactivity":true},"attributes":{"showInputFields":{"type":"boolean","default":true},"inlineInput":{"type":"boolean","default":false},"sliderHandle":{"type":"string","default":""},"customSliderHandle":{"type":"string","default":""},"sliderHandleBorder":{"type":"string","default":""},"customSliderHandleBorder":{"type":"string","default":""},"slider":{"type":"string","default":""},"customSlider":{"type":"string","default":""}},"ancestor":["woocommerce/product-filter-price"],"usesContext":["woocommerce/rangeInput"],"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/product-filter-price-slider","style":"file:../woocommerce/product-filter-price-slider-style.css"}');var n=s(4921),i=s(27723),a=s(70910),l=s(94715),d=s(56427);const u=["sliderHandle","sliderHandleBorder","slider"];var m=s(98621);const p=(0,l.withColors)(...u)(({clientId:e,context:o,attributes:r,setAttributes:s,sliderHandle:c,setSliderHandle:p,sliderHandleBorder:h,setSliderHandleBorder:g,slider:w,setSlider:_})=>{const{showInputFields:b,inlineInput:x,customSliderHandle:f,customSliderHandleBorder:y,customSlider:v}=r,k=o["woocommerce/rangeInput"],{isLoading:j}=k??{},C=(0,l.useBlockProps)({className:(0,n.A)("wc-block-product-filter-price-slider",{"is-loading":j,...(0,m.Uf)(r,u)}),style:(0,m.bn)("wc-product-filter-price",r,u)}),S=(0,l.__experimentalUseMultipleOriginColorsAndGradients)();if(j||!k)return(0,t.jsx)(t.Fragment,{children:(0,i.__)("Loading…","woocommerce")});const{min:A,max:N,currentMin:P,currentMax:B}=k,I=(0,a.formatPrice)(P,(0,a.getCurrency)({minorUnit:0})),T=(0,a.formatPrice)(B,(0,a.getCurrency)({minorUnit:0})),E=b?(0,t.jsx)("input",{className:"min",type:"text",defaultValue:I}):(0,t.jsx)("span",{children:I}),R=b?(0,t.jsx)("input",{className:"max",type:"text",defaultValue:T}):(0,t.jsx)("span",{children:T});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.InspectorControls,{children:(0,t.jsxs)(d.__experimentalToolsPanel,{label:(0,i.__)("Settings","woocommerce"),resetAll:()=>{s({showInputFields:!0,inlineInput:!1})},children:[(0,t.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>!0!==b,label:(0,i.__)("Show input fields","woocommerce"),onDeselect:()=>s({showInputFields:!0}),isShownByDefault:!0,children:(0,t.jsx)(d.ToggleControl,{label:(0,i.__)("Show input fields","woocommerce"),checked:b,onChange:()=>s({showInputFields:!b}),__nextHasNoMarginBottom:!0})}),b&&(0,t.jsx)(d.__experimentalToolsPanelItem,{hasValue:()=>!0===x,label:(0,i.__)("Inline input fields","woocommerce"),onDeselect:()=>s({inlineInput:!1}),isShownByDefault:!0,children:(0,t.jsx)(d.ToggleControl,{label:(0,i.__)("Inline input fields","woocommerce"),checked:x,onChange:()=>s({inlineInput:!x}),__nextHasNoMarginBottom:!0})})]})}),(0,t.jsx)(l.InspectorControls,{group:"color",children:S.hasColorsOrGradients&&(0,t.jsx)(l.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{label:(0,i.__)("Slider Handle","woocommerce"),colorValue:c.color||f,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{p(e),s({customSliderHandle:e})},resetAllFilter:()=>{p(""),s({customSliderHandle:""})}},{label:(0,i.__)("Slider Handle Border","woocommerce"),colorValue:h.color||y,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{g(e),s({customSliderHandleBorder:e})},resetAllFilter:()=>{g(""),s({customSliderHandleBorder:""})}},{label:(0,i.__)("Slider","woocommerce"),colorValue:w.color||v,isShownByDefault:!0,enableAlpha:!0,onColorChange:e=>{_(e),s({customSlider:e})},resetAllFilter:()=>{_(""),s({customSlider:""})}}],panelId:e,...S})}),(0,t.jsx)("div",{...C,children:(0,t.jsx)(d.Disabled,{children:(0,t.jsxs)("div",{className:(0,n.A)("wc-block-product-filter-price-slider__content",{"wc-block-product-filter-price-slider__content--inline":x&&b}),children:[(0,t.jsx)("div",{className:"wc-block-product-filter-price-slider__left text",children:E}),(0,t.jsxs)("div",{className:"wc-block-product-filter-price-slider__range",children:[(0,t.jsx)("div",{className:"range-bar"}),(0,t.jsx)("input",{type:"range",className:"min",min:A,max:N,defaultValue:P}),(0,t.jsx)("input",{type:"range",className:"max",min:A,max:N,defaultValue:B})]}),(0,t.jsx)("div",{className:"wc-block-product-filter-price-slider__right text",children:R})]})})})]})});(0,e.registerBlockType)(c,{edit:p,save:function({attributes:e}){const o=l.useBlockProps.save({className:(0,n.A)("wc-block-product-filter-price-slider",(0,m.Uf)(e,u)),style:(0,m.bn)("wc-product-filter-price",e,u)});return(0,t.jsx)("div",{...o})},icon:r})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{fillRule:"evenodd",d:"M16.83 6.342l.602.3.625-.25.443-.176v12.569l-.443-.178-.625-.25-.603.301-1.444.723-2.41-.804-.475-.158-.474.158-2.41.803-1.445-.722-.603-.3-.625.25-.443.177V6.215l.443.178.625.25.603-.301 1.444-.722 2.41.803.475.158.474-.158 2.41-.803 1.445.722zM20 4l-1.5.6-1 .4-2-1-3 1-3-1-2 1-1-.4L5 4v17l1.5-.6 1-.4 2 1 3-1 3 1 2-1 1 .4 1.5.6V4zm-3.5 6.25v-1.5h-8v1.5h8zm0 3v-1.5h-8v1.5h8zm-8 3v-1.5h8v1.5h-8z",clipRule:"evenodd"})});const n=JSON.parse('{"name":"woocommerce/order-confirmation-summary","version":"1.0.0","title":"Order Summary","description":"Display the order summary on the order confirmation page.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var i=s(94715),a=s(56427),l=s(27723),d=s(70910),u=s(38443),m=s(15703);s(88409);(0,e.registerBlockType)(n,{icon:{src:(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},attributes:{...n.attributes},edit:()=>{const e=(0,i.useBlockProps)({className:"wc-block-order-confirmation-summary"});return(0,o.jsx)("div",{...e,children:(0,o.jsx)(a.Disabled,{children:(0,o.jsxs)("ul",{className:"wc-block-order-confirmation-summary-list",children:[(0,o.jsxs)("li",{className:"wc-block-order-confirmation-summary-list-item",children:[(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__key",children:(0,l.__)("Order number:","woocommerce")})," ",(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__value",children:"123"})]}),(0,o.jsxs)("li",{className:"wc-block-order-confirmation-summary-list-item",children:[(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__key",children:(0,l.__)("Date:","woocommerce")})," ",(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__value",children:(0,u.date)((0,m.getSetting)("dateFormat"),new Date,void 0)})]}),(0,o.jsxs)("li",{className:"wc-block-order-confirmation-summary-list-item",children:[(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__key",children:(0,l.__)("Total:","woocommerce")})," ",(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__value",children:(0,d.formatPrice)(4e3)})]}),(0,o.jsxs)("li",{className:"wc-block-order-confirmation-summary-list-item",children:[(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__key",children:(0,l.__)("Email:","woocommerce")})," ",(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__value",children:"test@test.com"})]}),(0,o.jsxs)("li",{className:"wc-block-order-confirmation-summary-list-item",children:[(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__key",children:(0,l.__)("Payment method:","woocommerce")})," ",(0,o.jsx)("span",{className:"wc-block-order-confirmation-summary-list-item__value",children:(0,l.__)("Credit Card","woocommerce")})]})]})})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(81475),c=s(10790);const n=JSON.parse('{"name":"woocommerce/order-confirmation-totals-wrapper","version":"1.0.0","title":"Order Totals Section","description":"Display the order details section.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),i={heading:{type:"string",default:(0,s(27723).__)("Order details","woocommerce")}};(0,e.registerBlockType)(n,{icon:{src:(0,c.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)();return(0,c.jsx)("div",{...r,children:(0,c.jsx)(t.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-totals",{lock:{remove:!0}}]]})})},save:()=>(0,c.jsx)(t.InnerBlocks.Content,{}),attributes:i})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(81475);const r=JSON.parse('{"name":"woocommerce/order-confirmation-totals","version":"1.0.0","title":"Order Totals","description":"Display the items purchased and order totals.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"__experimentalSelector":".wp-block-woocommerce-order-confirmation-totals table"},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(56427),i=s(27723),a=s(70910),l=(s(44628),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,l.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-totals"}),{borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:s,borderWidth:d}=e.style,u={borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:s,borderWidth:d};return(0,l.jsx)("div",{...e,children:(0,l.jsx)(n.Disabled,{children:(0,l.jsxs)("table",{style:u,cellSpacing:"0",className:"wc-block-order-confirmation-totals__table",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"wc-block-order-confirmation-totals__product",children:(0,i.__)("Product","woocommerce")}),(0,l.jsx)("th",{className:"wc-block-order-confirmation-totals__total",children:(0,i.__)("Total","woocommerce")})]})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{className:"woocommerce-table__line-item order_item",children:[(0,l.jsxs)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product",children:[(0,l.jsx)("a",{href:"#link",children:(0,i._x)("Test Product","sample product name","woocommerce")})," ",(0,l.jsx)("strong",{className:"product-quantity",children:"× 2"})]}),(0,l.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,a.formatPrice)(2e3)})]}),(0,l.jsxs)("tr",{className:"woocommerce-table__line-item order_item",children:[(0,l.jsxs)("th",{scope:"row",className:"wc-block-order-confirmation-totals__product",children:[(0,l.jsx)("a",{href:"#link",children:(0,i._x)("Test Product","sample product name","woocommerce")})," ",(0,l.jsx)("strong",{className:"product-quantity",children:"× 2"})]}),(0,l.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,a.formatPrice)(2e3)})]})]}),(0,l.jsx)("tfoot",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"wc-block-order-confirmation-totals__label",scope:"row",children:(0,i.__)("Total","woocommerce")}),(0,l.jsx)("td",{className:"wc-block-order-confirmation-totals__total",children:(0,a.formatPrice)(4e3)})]})})]})})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(2488),c=s(15703),n=s(4921),i=(s(94968),s(10790));const a=JSON.parse('{"name":"woocommerce/order-confirmation-downloads-wrapper","version":"1.0.0","title":"Downloads Section","description":"Display the downloadable products section.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),l={heading:{type:"string",default:(0,s(27723).__)("Downloads","woocommerce")}};(0,e.registerBlockType)(a,{icon:{src:(0,i.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)(),s=(0,c.getSetting)("storeHasDownloadableProducts");return(0,i.jsx)("div",{...r,className:(0,n.A)(r.className,{"store-has-downloads":s}),children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-downloads",{lock:{remove:!0}}]]})})},save:()=>(0,i.jsx)(t.InnerBlocks.Content,{}),attributes:l})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(2488);const r=JSON.parse('{"name":"woocommerce/order-confirmation-downloads","version":"1.0.0","title":"Order Downloads","description":"Display links to purchased downloads.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"__experimentalSelector":".wp-block-woocommerce-order-confirmation-totals table"},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(56427),i=s(27723),a=(s(65944),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-downloads"}),{borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:s,borderWidth:l}=e.style,d={borderBottomColor:t,borderLeftColor:o,borderRightColor:r,borderTopColor:s,borderWidth:l};return(0,a.jsx)("div",{...e,children:(0,a.jsx)(n.Disabled,{children:(0,a.jsxs)("table",{style:d,cellSpacing:"0",className:"wc-block-order-confirmation-downloads__table",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"download-product",children:(0,a.jsx)("span",{className:"nobr",children:(0,i.__)("Product","woocommerce")})}),(0,a.jsx)("th",{className:"download-remaining",children:(0,a.jsx)("span",{className:"nobr",children:(0,i.__)("Downloads remaining","woocommerce")})}),(0,a.jsx)("th",{className:"download-expires",children:(0,a.jsx)("span",{className:"nobr",children:(0,i.__)("Expires","woocommerce")})}),(0,a.jsx)("th",{className:"download-file",children:(0,a.jsx)("span",{className:"nobr",children:(0,i.__)("Download","woocommerce")})})]})}),(0,a.jsx)("tbody",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"download-product","data-title":"Product",children:(0,a.jsx)("a",{href:"https://example.com",children:(0,i._x)("Test Product","sample product name","woocommerce")})}),(0,a.jsx)("td",{className:"download-remaining","data-title":"Downloads remaining",children:(0,i._x)("∞","infinite downloads remaining","woocommerce")}),(0,a.jsx)("td",{className:"download-expires","data-title":"Expires",children:(0,i._x)("Never","download expires","woocommerce")}),(0,a.jsx)("td",{className:"download-file","data-title":"Download",children:(0,a.jsx)("a",{href:"https://example.com",className:"woocommerce-MyAccount-downloads-file button alt",children:(0,i._x)("Test Download","sample download name","woocommerce")})})]})})]})})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(53987);const r=JSON.parse('{"name":"woocommerce/order-confirmation-billing-address","version":"1.0.0","title":"Billing Address","description":"Display the order confirmation billing address.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"inserter":false,"html":false,"color":{"text":true,"background":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(19092),i=s(36352),a=(s(20515),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-billing-address"});return(0,a.jsx)("div",{...e,children:(0,a.jsxs)("address",{children:["Test address 1",(0,a.jsx)("br",{}),"Test address 2",(0,a.jsx)("br",{}),"San Francisco, CA 94110",(0,a.jsx)("br",{}),"United States",(0,a.jsx)(n.A,{additionalFields:i.Ay})]})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(53987);const r=JSON.parse('{"name":"woocommerce/order-confirmation-shipping-address","version":"1.0.0","title":"Shipping Address","description":"Display the order confirmation shipping address.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"inserter":false,"html":false,"color":{"text":true,"background":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(19092),i=s(36352),a=(s(64324),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-shipping-address"});return(0,a.jsx)("div",{...e,children:(0,a.jsxs)("address",{children:["Test address 1",(0,a.jsx)("br",{}),"Test address 2",(0,a.jsx)("br",{}),"San Francisco, CA 94110",(0,a.jsx)("br",{}),"United States",(0,a.jsx)(n.A,{additionalFields:i.Ay})]})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(53987),c=s(10790);const n=JSON.parse('{"name":"woocommerce/order-confirmation-billing-wrapper","version":"1.0.0","title":"Billing Address Section","description":"Display the order confirmation billing section.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),i={heading:{type:"string",default:(0,s(27723).__)("Billing address","woocommerce")}};(0,e.registerBlockType)(n,{icon:{src:(0,c.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)();return(0,c.jsx)("div",{...r,children:(0,c.jsx)(t.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-billing-address",{lock:{remove:!0}}]]})})},save:()=>(0,c.jsx)(t.InnerBlocks.Content,{}),attributes:i})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(53987),c=s(10790);const n=JSON.parse('{"name":"woocommerce/order-confirmation-shipping-wrapper","version":"1.0.0","title":"Shipping Address Section","description":"Display the order confirmation shipping section.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string","default":"Shipping"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),i={heading:{type:"string",default:(0,s(27723).__)("Shipping address","woocommerce")}};(0,e.registerBlockType)(n,{icon:{src:(0,c.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)();return(0,c.jsx)("div",{...r,children:(0,c.jsx)(t.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-shipping-address",{lock:{remove:!0}}]]})})},save:()=>(0,c.jsx)(t.InnerBlocks.Content,{}),attributes:i})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(19432);const r=JSON.parse('{"name":"woocommerce/order-confirmation-status","version":"1.0.0","title":"Order Status","description":"Display a \\"thank you\\" message, or a sentence regarding the current order status.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":true,"text":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(27723),i=(s(2161),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-status"});return(0,i.jsxs)("div",{...e,children:[(0,i.jsx)("h1",{children:(0,n.__)("Order received","woocommerce")}),(0,i.jsx)("p",{children:(0,n.__)("Thank you. Your order has been received.","woocommerce")})]})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(19432);const r=JSON.parse('{"name":"woocommerce/order-confirmation-additional-information","version":"1.0.0","title":"Additional Information","description":"Displays additional information provided by third-party extensions for the current order.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(27723),i=(s(28841),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,i.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-additional-information"});return(0,i.jsx)("div",{...e,children:(0,i.jsx)("div",{className:"wc-block-order-confirmation-additional-information-placeholder",children:(0,n.__)("Additional Information for your order","woocommerce")})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(93450),r=s(19432),c=s(36352),n=(s(39970),s(10790));const i=JSON.parse('{"name":"woocommerce/order-confirmation-additional-fields-wrapper","version":"1.0.0","title":"Additional Fields","description":"Display additional checkout fields from the \'contact\' and \'order\' locations.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),a={heading:{type:"string",default:(0,s(27723).__)("Additional Information","woocommerce")}};(0,e.registerBlockType)(i,{icon:{src:(0,n.jsx)(o.A,{icon:r.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)({className:"wc-block-order-confirmation-additional-fields-wrapper"}),s={...c.CJ,...c.CD};return 0===Object.entries(s).length?null:(0,n.jsx)("div",{...r,children:(0,n.jsx)(t.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-additional-fields",{lock:{remove:!0}}]]})})},save:()=>(0,n.jsx)(t.InnerBlocks.Content,{}),attributes:a})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(19432);const r=JSON.parse('{"name":"woocommerce/order-confirmation-additional-fields","version":"1.0.0","title":"Additional Field List","description":"Display the list of additional field values from the current order.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"multiple":false,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"attributes":{"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(36352),i=s(19092),a=(s(61760),s(10790));(0,e.registerBlockType)(r,{icon:{src:(0,a.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:()=>{const e=(0,c.useBlockProps)({className:"wc-block-order-confirmation-additional-fields"}),t={...n.CJ,...n.CD};return(0,a.jsx)("div",{...e,children:(0,a.jsx)(i.A,{additionalFields:t})})},save:()=>null})})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10790),r=s(5573),c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M15.5 9.5a1 1 0 100-2 1 1 0 000 2zm0 1.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5zm-2.25 6v-2a2.75 2.75 0 00-2.75-2.75h-4A2.75 2.75 0 003.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0120.25 15zM9.5 8.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",fillRule:"evenodd"})});const n=JSON.parse('{"name":"woocommerce/order-confirmation-create-account","version":"1.0.0","title":"Account Creation","description":"Allow customers to create an account after their purchase.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"customerEmail":{"type":"string","default":""},"nonceToken":{"type":"string","default":""},"align":{"type":"string","default":"wide"},"className":{"type":"string","default":""},"hasDarkControls":{"type":"boolean","default":false},"lock":{"type":"object","default":{"remove":true}}},"supports":{"multiple":false,"inserter":false,"html":false,"lock":false,"align":["wide","full"],"color":{"background":true,"text":true,"button":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var i=s(27723),a=s(4921),l=s(94715),d=s(15703);const u={adminUrl:"",countries:[],countryData:{},currency:{code:"USD",precision:2,symbol:"$",symbolPosition:"left",decimalSeparator:".",priceFormat:"%1$s%2$s",thousandSeparator:","},currentSiteId:0,currentUserId:0,currentUserIsAdmin:!1,homeUrl:"",isMultisite:!1,locale:{siteLocale:"en_US",userLocale:"en_US",weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},orderStatuses:[],placeholderImgSrc:"",siteTitle:"",storePages:[],wcAssetUrl:"",wcVersion:"",wpLoginUrl:"",wpVersion:""},m="object"==typeof window.wcSettings?window.wcSettings:{},p={...u,...m};p.currency={...u.currency,...p.currency},p.locale={...u.locale,...p.locale},p.adminUrl,p.countries,p.currentSiteId,p.currentUserIsAdmin,p.homeUrl,p.isMultisite,p.locale,p.orderStatuses,p.placeholderImgSrc;const h=p.siteTitle,g=(p.storePages,p.wcAssetUrl,p.wcVersion,p.wpLoginUrl,p.wpVersion,p.currency);g.code,g.symbol,g.thousandSeparator,g.decimalSeparator,g.precision,g.symbol,g.symbolPosition,g.symbol,g.symbolPosition;var w=s(56427),_=(s(48177),s(86087)),b=s(83911),x=s(83671),f=s(36352),y=s(14656),v=s(47143),k=s(47594);const j=f.gu?(0,o.jsx)("a",{href:f.gu,target:"_blank",rel:"noreferrer",children:(0,i.__)("Terms","woocommerce")}):(0,o.jsx)("span",{children:(0,i.__)("Terms","woocommerce")}),C=f.pk?(0,o.jsx)("a",{href:f.pk,target:"_blank",rel:"noreferrer",children:(0,i.__)("Privacy Policy","woocommerce")}):(0,o.jsx)("span",{children:(0,i.__)("Privacy Policy","woocommerce")}),S=({isLoading:e,password:t,setPassword:r})=>(0,o.jsx)("div",{children:(0,o.jsx)(y.ValidatedTextInput,{disabled:e,type:"password",label:(0,i.__)("Password","woocommerce"),className:"wc-block-components-address-form__password",value:t,required:!0,errorId:"account-password",customValidityMessage:e=>{if(e.valueMissing||e.badInput||e.typeMismatch)return(0,i.__)("Please enter a valid password","woocommerce")},customValidation:e=>!((0,x.NL)(e.value)<2&&(e.setCustomValidity((0,i.__)("Please create a stronger password","woocommerce")),1)),onChange:e=>r(e),feedback:(0,o.jsx)(x.ME,{password:t})})}),A=({attributes:e,isEditor:t})=>{const[r,s]=(0,_.useState)(!1),[c,n]=(0,_.useState)(""),l=(0,v.useSelect)(e=>e(k.validationStore).getValidationError("account-password"),[]),u=e?.customerEmail||(t?"customer@email.com":""),m=e?.nonceToken||"",p=(0,d.getSetting)("registrationGeneratePassword",!1),h=!p&&!c;return u?(0,o.jsxs)("form",{className:"wc-block-order-confirmation-create-account-form",id:"create-account",method:"POST",action:"#create-account",onSubmit:e=>{l?e.preventDefault():s(!0)},children:[!p&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:(0,_.createInterpolateElement)((0,i.__)("Set a password for <email/>","woocommerce"),{email:(0,o.jsx)("strong",{children:u})})}),(0,o.jsx)(S,{isLoading:r,password:c,setPassword:n})]}),(0,o.jsxs)(b.A,{className:(0,a.A)("wc-block-order-confirmation-create-account-button",{"wc-block-order-confirmation-create-account-button--loading":r}),type:"submit",disabled:!!l||h||r,children:[!!r&&(0,o.jsx)(y.Spinner,{}),(0,i.__)("Create account","woocommerce")]}),(0,o.jsx)("input",{type:"hidden",name:"email",value:u}),(0,o.jsx)("input",{type:"hidden",name:"password",value:c}),(0,o.jsx)("input",{type:"hidden",name:"create-account",value:"1"}),(0,o.jsx)("input",{type:"hidden",name:"_wpnonce",value:m}),(0,o.jsx)("div",{className:"wc-block-order-confirmation-create-account-description",children:(0,o.jsxs)("p",{children:[p&&(0,o.jsxs)(o.Fragment,{children:[(0,_.createInterpolateElement)((0,i.__)("Check your email at <email/> for the link to set up an account password.","woocommerce"),{email:(0,o.jsx)(o.Fragment,{children:u})})," "]}),(0,_.createInterpolateElement)((0,i.__)("By creating an account you agree to our <terms/> and <privacy/>.","woocommerce"),{terms:j,privacy:C})]})})]}):null},N=[["core/heading",{level:3,content:(0,i.sprintf)(/* translators: %s: site name */ /* translators: %s: site name */ (0,i.__)("Create an account with %s","woocommerce"),h)}],["core/list",{className:"is-style-checkmark-list"},[["core/list-item",{content:(0,i.__)("Faster future purchases","woocommerce")}],["core/list-item",{content:(0,i.__)("Securely save payment info","woocommerce")}],["core/list-item",{content:(0,i.__)("Track orders & view shopping history","woocommerce")}]]]];(0,e.registerBlockType)(n,{apiVersion:3,icon:{src:(0,o.jsx)(t.A,{icon:c,className:"wc-block-editor-components-block-icon"})},attributes:{...n.attributes},edit:({attributes:e,setAttributes:t})=>{const r=(0,a.A)("wc-block-order-confirmation-create-account",{"has-dark-controls":e.hasDarkControls}),s=(0,l.useBlockProps)({className:r});if(!(0,d.getSetting)("delayedAccountCreationEnabled",!0))return null;const c=(0,d.getSetting)("registrationGeneratePassword",!0);return(0,o.jsxs)("div",{...s,children:[(0,o.jsx)(l.InnerBlocks,{allowedBlocks:["core/heading","core/paragraph","core/list","core/list-item","core/image"],template:N,templateLock:!1}),(0,o.jsx)(w.Disabled,{children:(0,o.jsx)(A,{isEditor:!0})}),!c&&(0,o.jsx)(l.InspectorControls,{children:(0,o.jsx)(w.__experimentalToolsPanel,{label:(0,i.__)("Style","woocommerce"),resetAll:()=>{t({hasDarkControls:!1})},children:(0,o.jsx)(w.__experimentalToolsPanelItem,{hasValue:()=>!0===e.hasDarkControls,label:(0,i.__)("Dark mode inputs","woocommerce"),onDeselect:()=>t({hasDarkControls:!1}),isShownByDefault:!0,children:(0,o.jsx)(w.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Dark mode inputs","woocommerce"),help:(0,i.__)("Inputs styled specifically for use on dark background colors.","woocommerce"),checked:e.hasDarkControls,onChange:()=>t({hasDarkControls:!e.hasDarkControls})})})})}),(0,o.jsx)(l.InspectorControls,{children:(0,o.jsxs)(w.PanelBody,{children:[(0,o.jsx)("p",{children:(0,i.__)("Configure this feature in your store settings.","woocommerce")}),(0,o.jsx)(w.ExternalLink,{href:`${d.ADMIN_URL}admin.php?page=wc-settings&tab=account`,children:(0,i.__)("Manage account settings","woocommerce")})]})})]})},save:()=>(0,o.jsx)("div",{...l.useBlockProps.save(),children:(0,o.jsx)(l.InnerBlocks.Content,{})})})})(),(()=>{"use strict";var e=s(60407);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-details","title":"Product Details","description":"Display a product\'s description, attributes, and reviews","category":"woocommerce","textdomain":"woocommerce","supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"color":{"background":true,"text":false},"spacing":{"margin":true,"padding":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true}},"attributes":{"align":{"type":"string","default":"wide"},"hideTabTitle":{"type":"boolean","default":false}},"usesContext":["query","queryId","postId","postType"]}');var o=s(94715),r=s(10790),c=s(40314),n=s(86087),i=s(47143),a=s(27723),l=s(56427),d=s(8e3),u=s(15703),m=s(73993);const p=e=>{return(0,m.isEmpty)(e.weight)&&(!(t=e.dimensions)||Object.values(t).every(e=>!e||""===e.trim()))&&(0,m.isEmpty)(e.attributes);var t};var h=s(4921);const g=({id:e,title:t,active:o})=>(0,r.jsx)("li",{className:(0,h.A)(`${e}_tab`,{active:o}),id:`tab-title-${e}`,role:"tab","aria-controls":`tab-${e}`,children:(0,r.jsx)("a",{href:`#tab-${e}`,children:t})}),w=({id:e,content:t})=>(0,r.jsx)("div",{className:`${e}_tab`,id:`tab-title-${e}`,role:"tab","aria-controls":`tab-${e}`,children:t}),_=({hideTabTitle:e})=>{const t=[{id:"description",title:"Description",active:!0,content:(0,r.jsxs)(r.Fragment,{children:[!e&&(0,r.jsx)("h2",{children:(0,a.__)("Description","woocommerce")}),(0,r.jsx)("p",{children:(0,a.__)("This block lists description, attributes and reviews for a single product.","woocommerce")})]})},{id:"additional_information",title:"Additional Information",active:!1},{id:"reviews",title:"Reviews",active:!1}],o=t.map(({id:e,title:t,active:o})=>(0,r.jsx)(g,{id:e,title:t,active:o},e)),s=t.map(({id:e,content:t})=>(0,r.jsx)(w,{id:e,content:t},e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("ul",{className:"wc-tabs tabs",role:"tablist",children:o}),s]})};s(54802);const b=s(71044).A;s(57492);const x={...t,icon:b,edit:({clientId:e,context:t,attributes:s,setAttributes:m})=>{const h=(0,o.useBlockProps)(),{hideTabTitle:g}=s,w=(0,i.useSelect)(e=>{if(!t.postId)return null;const{getProduct:o}=e(c.productsStore);return o(Number(t.postId))},[t.postId]),{isInnerBlockOfSingleProductBlock:b,hasInnerBlocks:x,wasBlockJustInserted:f,accordionItemClientId:y}=(0,i.useSelect)(t=>{const r=t(o.store),s=r.getBlockParentsByBlockName(e,"woocommerce/single-product").length>0,c=r.getBlocks(e).length>0,n=r.wasBlockJustInserted(e),i=t(o.store).getBlock(e),a=(0,d.K)(i,"woocommerce/product-specifications")?.clientId;return{isInnerBlockOfSingleProductBlock:s,hasInnerBlocks:c,wasBlockJustInserted:n,accordionItemClientId:t(o.store).getBlockParentsByBlockName(a??"","woocommerce/accordion-item")[0]}},[e]),v=(0,n.useMemo)(()=>((e,{isInnerBlockOfSingleProductBlock:t})=>{const o=null!=e&&p(e)&&t,r=(0,u.isWpVersion)("6.9",">=")?{group:"core/accordion",item:"core/accordion-item",header:"core/accordion-heading",panel:"core/accordion-panel"}:{group:"woocommerce/accordion-group",item:"woocommerce/accordion-item",header:"woocommerce/accordion-header",panel:"woocommerce/accordion-panel"};return[[r.group,{metadata:{isDescendantOfProductDetails:!0}},[[r.item,{openByDefault:!0},[[r.header,{title:(0,a.__)("Description","woocommerce")},[]],[r.panel,{},[["woocommerce/product-description",{},[]]]]]],...o?[]:[[r.item,{},[[r.header,{title:(0,a.__)("Additional Information","woocommerce")},[]],[r.panel,{},[["woocommerce/product-specifications",{}]]]]]],[r.item,{},[[r.header,{title:(0,a.__)("Reviews","woocommerce")},[]],[r.panel,{},[["woocommerce/product-reviews",{}]]]]]]]]})(w,{isInnerBlockOfSingleProductBlock:b}),[w,b]),{removeBlock:k}=(0,i.useDispatch)(o.store),j=(0,o.useInnerBlocksProps)(h,{template:f?v:void 0});(0,n.useEffect)(()=>{f&&w&&p(w)&&y&&k(y)},[f,y,w,k]);const C=((e,t)=>(0,i.useSelect)(r=>r(o.store).getBlockParentsByBlockName(e,"core/post-template").length>0&&"product"!==t,[e,t]))(e,t.postType);return C?(0,r.jsx)("div",{...h,children:(0,r.jsx)(o.Warning,{children:(0,a.__)("The Product Details block requires a product context. When used in a Query Loop, the Query Loop must be configured to display products.","woocommerce")})}):x||f?(0,r.jsx)("div",{...j}):(0,r.jsxs)("div",{...h,children:[(0,r.jsx)(o.InspectorControls,{children:(0,r.jsx)(l.PanelBody,{title:(0,a.__)("Settings","woocommerce"),children:(0,r.jsx)(l.ToggleControl,{label:(0,a.__)("Show tab title in content","woocommerce"),checked:!g,onChange:()=>m({hideTabTitle:!g})})})},"inspector"),(0,r.jsx)(l.Disabled,{children:(0,r.jsx)(_,{hideTabTitle:g})})]})},save:function(){const e=o.useBlockProps.save(),t=o.useInnerBlocksProps.save(e);return(0,r.jsx)("div",{...t})},deprecated:[{attributes:{hideTabTitle:{type:"boolean",default:!1}},save:()=>null,migrate:e=>({...e,align:"wide"})}]};(0,e.W)(x,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(60407);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-description","title":"Product Description","description":"Displays the description of the product.","category":"woocommerce","textdomain":"woocommerce","usesContext":["postId","postType","queryId"],"ancestor":["woocommerce/single-product","woocommerce/product-template","core/post-template"],"supports":{"interactivity":{"clientNavigation":true},"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');var o=s(19971),r=s(94715),c=s(3582),n=s(27723),i=s(10790);function a({layoutClassNames:e}){const t=(0,r.useBlockProps)({className:e});return(0,i.jsx)("div",{...t,children:(0,i.jsx)("p",{children:(0,n.__)("This block displays the product description. When viewing a product page, the description content will automatically appear here.","woocommerce")})})}function l(e){const{context:{postType:t,postId:o}={},layoutClassNames:s}=e,[,,a]=(0,c.useEntityProp)("postType",t,"content",o),l=(0,r.useBlockProps)({className:s});return a?.protected?(0,i.jsx)("div",{...l,children:(0,i.jsx)(r.Warning,{children:(0,n.__)("This content is password protected.","woocommerce")})}):(0,i.jsx)("div",{...l,dangerouslySetInnerHTML:{__html:a?.rendered}})}function d(){const e=(0,r.useBlockProps)();return(0,i.jsx)("div",{...e,children:(0,i.jsx)(r.Warning,{children:(0,n.__)("Block cannot be rendered inside itself.","woocommerce")})})}const u={...t,icon:s(71044).A,edit:function({context:e,__unstableLayoutClassNames:t,__unstableParentLayout:s,clientId:c}){const{postId:u,postType:m}=e,p=(0,r.useHasRecursion)(u),{hasInvalidContext:h,warningElement:g}=(0,o.d)({clientId:c,postType:m,blockName:(0,n.__)("Product Description","woocommerce")});return h?g:u&&m&&p?(0,i.jsx)(d,{}):(0,i.jsx)(r.RecursionProvider,{uniqueId:u,children:u&&m?(0,i.jsx)(l,{context:e,parentLayout:s,layoutClassNames:t}):(0,i.jsx)(a,{layoutClassNames:t})})}};(0,e.W)(u,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(60407);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-specifications","version":"1.0.0","title":"Product Specifications","description":"Display product weight, dimensions, and attributes.","category":"woocommerce","keywords":["attributes","weight","dimensions","additional information"],"textdomain":"woocommerce","ancestor":["woocommerce/single-product","woocommerce/product-template","core/post-template"],"attributes":{"showWeight":{"type":"boolean","default":true},"showDimensions":{"type":"boolean","default":true},"showAttributes":{"type":"boolean","default":true}},"usesContext":["postId","postType"],"supports":{"html":false,"align":["wide","full"],"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true}}}');var o=s(94715),r=s(27723),c=s(19971),n=s(47143),i=s(40314),a=s(56427),l=s(10790);const d={showWeight:!0,showDimensions:!0,showAttributes:!0},u={product:null,isLoadingProduct:!1},m=s(71044).A;s(99164);const p={...t,icon:m,edit:({context:{postId:e,postType:t},clientId:s,attributes:m,setAttributes:p})=>{const{showWeight:h,showDimensions:g,showAttributes:w}=m,_=(0,o.useBlockProps)({className:"wp-block-table"}),b=!(!e||"product"!==t),{dimensionUnit:x,weightUnit:f,isLoadingUnits:y}=(0,n.useSelect)(e=>{const{getOption:t}=e(i.optionsStore);return{dimensionUnit:t("woocommerce_dimension_unit"),weightUnit:t("woocommerce_weight_unit"),isLoadingUnits:!e(i.optionsStore).hasFinishedResolution("getOption",["woocommerce_dimension_unit"])||!e(i.optionsStore).hasFinishedResolution("getOption",["woocommerce_weight_unit"])}},[]),{product:v,isLoadingProduct:k}=(0,n.useSelect)(t=>{if(!e)return u;const{getProduct:o}=t(i.productsStore);return{product:o(Number(e)),isLoadingProduct:!t(i.productsStore).hasFinishedResolution("getProduct",[Number(e)])}},[e]),{hasInvalidContext:j,warningElement:C}=(0,c.d)({clientId:s,postType:t,blockName:(0,r.__)("Product Specifications","woocommerce")});if(j)return C;if(y||k&&b)return(0,l.jsx)("div",{..._,children:(0,l.jsx)("span",{className:"wc-product-specifications__loading",children:(0,r.__)("Loading…","woocommerce")})});if(e&&!v)return(0,l.jsx)("div",{..._,children:(0,l.jsx)("p",{children:(0,r.__)("No product found","woocommerce")})});const S={};return h&&(S.weight={label:(0,r.__)("Weight","woocommerce"),value:""},S.weight.value=b?v?.weight?`${v.weight} ${f}`:"":`10 ${f}`),g&&(S.dimensions={label:(0,r.__)("Dimensions","woocommerce"),value:""},S.dimensions.value=b?v?.dimensions?((e,t)=>{if(!e)return"";const o=["length","width","height"].map(t=>e[t]).filter(e=>"string"==typeof e&&e.length>0);return 0===o.length?"":`${o.join(" × ")} ${t}`})(v.dimensions,x):"":`10 × 10 × 10 ${x}`),w&&(b?v?.attributes&&v.attributes.forEach(e=>{S[e.name.toLowerCase()]={label:e.name,value:e.options.join(", ")}}):S.test_attribute={label:(0,r.__)("Test Attribute","woocommerce"),value:(0,r.__)("First, Second, Third","woocommerce")}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.InspectorControls,{children:(0,l.jsxs)(a.__experimentalToolsPanel,{label:(0,r.__)("Display Settings","woocommerce"),resetAll:()=>{p(d)},children:[(0,l.jsx)(a.__experimentalToolsPanelItem,{label:(0,r.__)("Show Weight","woocommerce"),hasValue:()=>h!==d.showWeight,onDeselect:()=>p({showWeight:d.showWeight}),isShownByDefault:!0,children:(0,l.jsx)(a.ToggleControl,{label:(0,r.__)("Show Weight","woocommerce"),checked:h,onChange:()=>p({showWeight:!h})})}),(0,l.jsx)(a.__experimentalToolsPanelItem,{label:(0,r.__)("Show Dimensions","woocommerce"),hasValue:()=>g!==d.showDimensions,onDeselect:()=>p({showDimensions:d.showDimensions}),isShownByDefault:!0,children:(0,l.jsx)(a.ToggleControl,{label:(0,r.__)("Show Dimensions","woocommerce"),checked:g,onChange:()=>p({showDimensions:!g})})}),(0,l.jsx)(a.__experimentalToolsPanelItem,{label:(0,r.__)("Show Attributes","woocommerce"),hasValue:()=>w!==d.showAttributes,onDeselect:()=>p({showAttributes:d.showAttributes}),isShownByDefault:!0,children:(0,l.jsx)(a.ToggleControl,{label:(0,r.__)("Show Attributes","woocommerce"),checked:w,onChange:()=>p({showAttributes:!w})})})]})}),(0,l.jsx)("figure",{..._,children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{className:"screen-reader-text",children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:(0,r.__)("Attributes","woocommerce")}),(0,l.jsx)("th",{children:(0,r.__)("Value","woocommerce")})]})}),(0,l.jsx)("tbody",{children:Object.entries(S).map(([e,t])=>t.value&&(0,l.jsxs)("tr",{className:`wp-block-product-specifications-item wc-block-product-specifications-item-${e}`,children:[(0,l.jsx)("th",{scope:"row",className:"wp-block-product-specifications-item__label",children:t.label}),(0,l.jsx)("td",{className:"wp-block-product-specifications-item__value",children:t.value})]},e))})]})})]})}};(0,e.W)(p,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(60407);const t=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews","icon":"admin-comments","title":"Product Reviews","description":"Display a product\'s reviews","category":"woocommerce","textdomain":"woocommerce","attributes":{"tagName":{"type":"string","default":"div"}},"supports":{"interactivity":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"usesContext":["postId","postType"],"viewScriptModule":"woocommerce/product-reviews"}');var o=s(94715),r=s(10790),c=s(56427),n=s(27723),i=s(19971);const a=[["woocommerce/product-reviews-title"],["woocommerce/product-review-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/group",{tagName:"div",layout:{type:"flex",flexWrap:"nowrap",justifyContent:"space-between"}},[["woocommerce/product-review-author-name",{fontSize:"small"}],["woocommerce/product-review-rating"]]],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["woocommerce/product-review-date",{fontSize:"small"}]]],["woocommerce/product-review-content"]]]]]]],["woocommerce/product-reviews-pagination"],["woocommerce/product-review-form"]],l={article:(0,n.__)("The <article> element should represent a self-contained, syndicatable portion of the document.","woocommerce"),aside:(0,n.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.","woocommerce"),div:(0,n.__)("The <div> element should only be used if the block is a design element with no semantic meaning.","woocommerce"),footer:(0,n.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.).","woocommerce"),header:(0,n.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids.","woocommerce"),main:(0,n.__)("The <main> element should be used for the primary content of your document only.","woocommerce"),nav:(0,n.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation.","woocommerce"),section:(0,n.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.","woocommerce")},d={...t,edit:({attributes:e,setAttributes:t,clientId:s,context:d})=>{const{tagName:u="div"}=e,m=(0,o.useBlockProps)(),p=(0,o.useInnerBlocksProps)(m,{template:a}),{hasInvalidContext:h,warningElement:g}=(0,i.d)({clientId:s,postType:d.postType,blockName:(0,n.__)("Product Reviews","woocommerce")});return h?g:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.InspectorControls,{group:"advanced",children:(0,r.jsx)(c.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,n.__)("HTML element","woocommerce"),options:[{label:(0,n.__)("Default (<div>)","woocommerce"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}],value:u,onChange:e=>t({tagName:e}),help:l[u]})}),(0,r.jsx)(u,{...p})]})},save:function({attributes:{tagName:e="div"}}){const t=o.useBlockProps.save(),s=o.useInnerBlocksProps.save(t);return(0,r.jsx)(e,{...s})},deprecated:[{save:()=>null}]};(0,e.W)(d,{isAvailableOnPostEditor:!0})})(),(()=>{"use strict";var e=s(74997),t=s(41180);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-review-rating","title":"Review Rating","category":"woocommerce","ancestor":["woocommerce/product-reviews"],"description":"Displays the rating of a product review.","textdomain":"woocommerce","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"interactivity":{"clientNavigation":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}}}}');var r=s(4921),c=s(27723),n=s(94715),i=s(47143),a=s(40314),l=s(10790);(0,e.registerBlockType)(o,{edit:function({context:{commentId:e},attributes:t,setAttributes:o}){const{textAlign:s}=t,d=(0,r.A)("wc-block-product-review-rating",{[`has-text-align-${s}`]:s}),u=(0,n.useBlockProps)({className:d}),m=(0,i.useSelect)(t=>{const{getReview:o}=t(a.REVIEWS_STORE_NAME),r=e?o(Number(e)):null;return r?.rating??4},[e]),p={width:m/5*100+"%"},h=(0,c.sprintf)(/* translators: %f is referring to the average rating value */ /* translators: %f is referring to the average rating value */ (0,c.__)("Rated %f out of 5","woocommerce"),m),g={__html:(0,c.sprintf)(/* translators: %s is the rating value wrapped in HTML strong tags. */ /* translators: %s is the rating value wrapped in HTML strong tags. */ (0,c.__)("Rated %s out of 5","woocommerce"),(0,c.sprintf)('<strong class="rating">%f</strong>',m))};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.BlockControls,{children:(0,l.jsx)(n.AlignmentToolbar,{value:t.textAlign,onChange:e=>{o({textAlign:e||""})}})}),(0,l.jsx)("div",{...u,children:(0,l.jsx)("div",{className:"wc-block-product-review-rating__stars",role:"img","aria-label":h,children:(0,l.jsx)("span",{style:p,dangerouslySetInnerHTML:g})})})]})},icon:t.A})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})});const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews-title","title":"Reviews Title","category":"woocommerce","ancestor":["woocommerce/product-reviews"],"description":"Displays a title with the number of reviews.","textdomain":"woocommerce","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"showProductTitle":{"type":"boolean","default":true},"showReviewsCount":{"type":"boolean","default":true},"level":{"type":"number","default":2},"levelOptions":{"type":"array"}},"supports":{"anchor":false,"align":true,"html":false,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true}},"interactivity":{"clientNavigation":true}}}');var n=s(4921),i=s(27723),a=s(3582),l=s(56427),d=s(86087),u=s(47143),m=s(40314),p=s(94715);s(57836),(0,e.registerBlockType)(c,{edit:function({attributes:{textAlign:e,showProductTitle:o,showReviewsCount:r,level:s,levelOptions:c},setAttributes:h,context:{postType:g,postId:w}}){const _="h"+s,[b,x]=(0,d.useState)(3),[f]=(0,a.useEntityProp)("postType",g,"title",w),y=void 0===w,v=(0,p.useBlockProps)({className:(0,n.A)({[`has-text-align-${e}`]:e})});(0,d.useEffect)(()=>{y?x(3):(0,u.resolveSelect)(m.reviewsStore).getReviewsTotalCount({product:[Number(w)]}).then(e=>{x(e)}).catch(()=>{x(0)})},[w,y]);const k=(0,t.jsxs)(p.BlockControls,{group:"block",children:[(0,t.jsx)(p.AlignmentControl,{value:e,onChange:e=>h({textAlign:e})}),(0,t.jsx)(p.HeadingLevelDropdown,{value:s,options:c,onChange:e=>h({level:e})})]}),j=(0,t.jsx)(p.InspectorControls,{children:(0,t.jsxs)(l.PanelBody,{title:(0,i.__)("Settings","woocommerce"),children:[(0,t.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Show Product Title","woocommerce"),checked:o,onChange:e=>h({showProductTitle:e})}),(0,t.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Show Reviews Count","woocommerce"),checked:r,onChange:e=>h({showReviewsCount:e})})]})}),C=function(e,t,o,r){return e&&o?1===t?(0,i.sprintf)(/* translators: %s: Product title. */ /* translators: %s: Product title. */ (0,i.__)("One review for %s","woocommerce"),r):(0,i.sprintf)(/* translators: 1: Number of comments, 2: Product title. */ /* translators: 1: Number of comments, 2: Product title. */ (0,i._n)("%1$s review for %2$s","%1$s reviews for %2$s",t,"woocommerce"),t,r):!e&&o?1===t?(0,i.sprintf)(/* translators: %s: Product title. */ /* translators: %s: Product title. */ (0,i.__)("Review for %s","woocommerce"),r):(0,i.sprintf)(/* translators: %s: Product title. */ /* translators: %s: Product title. */ (0,i.__)("Reviews for %s","woocommerce"),r):e&&!o?1===t?(0,i.__)("One review","woocommerce"):(0,i.sprintf)(/* translators: %s: Number of reviews. */ /* translators: %s: Number of reviews. */ (0,i._n)("%s review","%s reviews",t,"woocommerce"),t):1===t?(0,i.__)("Review","woocommerce"):(0,i.__)("Reviews","woocommerce")}(r,b,o,y?(0,i.__)("Product Title","woocommerce"):f);return(0,t.jsxs)(t.Fragment,{children:[k,j,(0,t.jsx)(_,{...v,children:C})]})},icon:r})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.6 0-1 .4-1 1v8.3c0 .3.2.7.6.8.1.1.2.1.3.1.2 0 .5-.1.6-.3l1.8-1.8H13c.6 0 1-.4 1-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})});const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-review-form","title":"Reviews Form","category":"woocommerce","description":"Display a product\'s reviews form.","textdomain":"woocommerce","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"interactivity":true,"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"example":{"attributes":{"textAlign":"center"}},"viewScriptModule":"woocommerce/product-review-form","style":"file:../woocommerce/product-review-form-style.css","editorStyle":"file:../woocommerce/product-review-form-editor.css"}');var n=s(4921),i=s(94715),a=s(56427),l=s(29491),d=s(27723),u=s(47143),m=s(3582),p=s(40314);const h=()=>{const e=(0,l.useInstanceId)(h);return(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{id:"reply-title",className:"comment-reply-title",role:"heading","aria-level":3,children:(0,d.__)("Add a review","woocommerce")}),(0,t.jsxs)("form",{noValidate:!0,className:"review-form",onSubmit:e=>e.preventDefault(),children:[(0,t.jsxs)("div",{className:"comment-form-rating",children:[(0,t.jsx)("span",{children:(0,d.__)("Your rating *","woocommerce")}),(0,t.jsx)("p",{className:"wp-block-woocommerce-product-reviews__editor__stars"})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("label",{htmlFor:`review-${e}`,children:(0,d.__)("Your review *","woocommerce")}),(0,t.jsx)("textarea",{id:`review-${e}`,name:"review",cols:45,rows:8,readOnly:!0})]}),(0,t.jsx)("p",{className:"form-submit wp-block-button",children:(0,t.jsx)("input",{name:"submit",type:"submit",className:(0,n.A)("wp-block-button__link",(0,i.__experimentalGetElementClassName)("button")),value:(0,d.__)("Submit","woocommerce"),"aria-disabled":"true"})})]})]})},g=({postId:e,postType:o})=>{const{updateProduct:r}=(0,u.useDispatch)(p.productsStore),s=(0,u.useSelect)(t=>e?t(p.productsStore).getProduct(Number(e)):null,[e]),c=void 0===o||void 0===e,n=(0,u.useSelect)(e=>!!o&&!!e(m.store).getPostType(o)?.supports.comments,[o]);if(!c&&s&&!s?.reviews_allowed){const o=[(0,t.jsx)(a.Button,{__next40pxDefaultSize:!0,onClick:()=>void(e&&r(Number(e),{reviews_allowed:true})),variant:"primary",children:(0,d._x)("Enable reviews","action that affects the current product","woocommerce")},"enableReviews")];return(0,t.jsx)(i.Warning,{actions:o,children:(0,d.__)("Product Reviews Form block: Reviews are not enabled for this product.","woocommerce")})}return n?(0,t.jsx)(a.Disabled,{children:(0,t.jsx)(h,{})}):(0,t.jsx)(i.Warning,{children:(0,d.__)("Product Reviews Form block: Reviews are not enabled.","woocommerce")})};(0,e.registerBlockType)(c,{icon:r,edit:function e({attributes:o,context:r,setAttributes:s}){const{textAlign:c}=o,{postId:u,postType:m}=r,p=(0,l.useInstanceId)(e),h=(0,d.sprintf)("comments-form-edit-%d-desc",p),w=(0,i.useBlockProps)({className:(0,n.A)("comment-respond",{[`has-text-align-${c}`]:c}),"aria-describedby":h});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.BlockControls,{group:"block",children:(0,t.jsx)(i.AlignmentControl,{value:c,onChange:e=>{s({textAlign:e})}})}),(0,t.jsxs)("div",{...w,children:[(0,t.jsx)(g,{postId:u,postType:m}),(0,t.jsx)(a.VisuallyHidden,{id:h,children:(0,d.__)("Reviews form disabled in editor.","woocommerce")})]})]})}})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,t.jsx)(o.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,t.jsx)(o.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]});const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-review-date","title":"Review Date","category":"woocommerce","ancestor":["woocommerce/product-reviews"],"description":"Displays the date on which the review was posted.","textdomain":"woocommerce","attributes":{"format":{"type":"string"},"isLink":{"type":"boolean","default":true}},"usesContext":["commentId"],"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');var n=s(3582),i=s(38443),a=s(56427),l=s(27723),d=s(94715);s(23425),(0,e.registerBlockType)(c,{icon:r,edit:function({attributes:{format:e,isLink:o},context:{commentId:r},setAttributes:s}){const c=(0,d.useBlockProps)();let[u]=(0,n.useEntityProp)("root","comment","date",r);const[m=(0,i.getSettings)().formats.date]=(0,n.useEntityProp)("root","site","date_format");r&&u||(u=(0,l._x)("Review Date","block title","woocommerce"));let p=u instanceof Date?(0,t.jsx)("time",{dateTime:(0,i.dateI18n)("c",u,!0),children:"human-diff"===e?(0,i.humanTimeDiff)(u,new Date):(0,i.dateI18n)(e||m,u,!0)}):(0,t.jsx)("time",{children:u});return o&&(p=(0,t.jsx)("a",{href:"#review-date-pseudo-link",onClick:e=>e.preventDefault(),children:p})),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.InspectorControls,{children:(0,t.jsxs)(a.PanelBody,{title:(0,l.__)("Settings","woocommerce"),children:[(0,t.jsx)(d.__experimentalDateFormatPicker,{format:e,defaultFormat:m,onChange:e=>s({format:e})}),(0,t.jsx)(a.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Link to review","woocommerce"),onChange:()=>s({isLink:!o}),checked:o})]})}),(0,t.jsx)("div",{...c,children:p})]})}})})(),(()=>{"use strict";var e=s(74997),t=s(69863);const o=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-review-content","title":"Review Content","category":"woocommerce","ancestor":["woocommerce/product-reviews"],"description":"Displays the contents of a product review.","textdomain":"woocommerce","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"html":false}}');var r=s(4921),c=s(27723),n=s(86087),i=s(56427),a=s(3582),l=s(94715),d=s(10790);s(36142),(0,e.registerBlockType)(o,{icon:t.A,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:o}}){const s=(0,l.useBlockProps)({className:(0,r.A)({[`has-text-align-${t}`]:t})}),[u]=(0,a.useEntityProp)("root","comment","content",o),m=(0,d.jsx)(l.BlockControls,{children:(0,d.jsx)(l.AlignmentControl,{value:t,onChange:t=>{void 0!==t&&e({textAlign:t})}})});return o&&u?(0,d.jsxs)(d.Fragment,{children:[m,(0,d.jsx)("div",{...s,children:(0,d.jsx)(i.Disabled,{children:(0,d.jsx)(n.RawHTML,{children:u.rendered},"html")})})]}):(0,d.jsxs)(d.Fragment,{children:[m,(0,d.jsx)("div",{...s,children:(0,d.jsx)("p",{children:(0,c._x)("Review Content","block title","woocommerce")})})]})}})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsxs)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)(o.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,t.jsx)(o.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,t.jsx)(o.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]});const c=JSON.parse('{"UU":"woocommerce/product-review-author-name"}');var n=s(4921),i=s(27723),a=s(47143),l=s(3582),d=s(56427),u=s(94715);s(46302),(0,e.registerBlockType)(c.UU,{icon:r,edit:function({attributes:{isLink:e,linkTarget:o,textAlign:r},context:{commentId:s},setAttributes:c}){const m=(0,u.useBlockProps)({className:(0,n.A)({[`has-text-align-${r}`]:r})});let p=(0,a.useSelect)(e=>{const{getEntityRecord:t}=e(l.store),o=t("root","comment",s),r=o?.author_name;if(o&&!r){const e=t("root","user",o.author);return e?.name??(0,i.__)("Anonymous","woocommerce")}return r??""},[s]);s&&p||(p=(0,i._x)("Review Author","block title","woocommerce"));const h=e?(0,t.jsx)("a",{href:"#review-author-pseudo-link",onClick:e=>e.preventDefault(),children:p}):p;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.InspectorControls,{children:(0,t.jsxs)(d.PanelBody,{title:(0,i.__)("Settings","woocommerce"),children:[(0,t.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Link to authors URL","woocommerce"),onChange:()=>c({isLink:!e}),checked:e}),e&&(0,t.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,i.__)("Open in new tab","woocommerce"),onChange:e=>c({linkTarget:e?"_blank":"_self"}),checked:"_blank"===o})]})}),(0,t.jsx)(u.BlockControls,{children:(0,t.jsx)(u.AlignmentControl,{value:r,onChange:e=>{"string"==typeof e&&c({textAlign:e})}})}),(0,t.jsx)("div",{...m,children:h})]})}})})(),(()=>{"use strict";var e=s(74997),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})});const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews-pagination","title":"Reviews Pagination","category":"woocommerce","ancestor":["woocommerce/product-reviews"],"allowedBlocks":["woocommerce/product-reviews-pagination-previous","woocommerce/product-reviews-pagination-numbers","woocommerce/product-reviews-pagination-next"],"description":"Displays a paginated navigation to next/previous set of product reviews, when applicable.","textdomain":"woocommerce","attributes":{"paginationArrow":{"type":"string","default":"none"}},"example":{"attributes":{"paginationArrow":"none"}},"providesContext":{"reviews/paginationArrow":"paginationArrow"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');var n=s(27723),i=s(47143),a=s(56427),l=s(94715);function d({value:e,onChange:o}){return(0,t.jsxs)(a.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,n.__)("Arrow","woocommerce"),value:e,onChange:o,help:(0,n.__)("A decorative arrow appended to the next and previous product reviews link.","woocommerce"),isBlock:!0,children:[(0,t.jsx)(a.__experimentalToggleGroupControlOption,{value:"none",label:(0,n._x)("None","Arrow option for Product Reviews Pagination Next/Previous blocks","woocommerce")}),(0,t.jsx)(a.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,n._x)("Arrow","Arrow option for Product Reviews Pagination Next/Previous blocks","woocommerce")}),(0,t.jsx)(a.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,n._x)("Chevron","Arrow option for Product Reviews Pagination Next/Previous blocks","woocommerce")})]})}s(24180);const u=[["woocommerce/product-reviews-pagination-previous"],["woocommerce/product-reviews-pagination-numbers"],["woocommerce/product-reviews-pagination-next"]];s(95398),(0,e.registerBlockType)(c,{icon:r,edit:function({attributes:{paginationArrow:e},setAttributes:o,clientId:r}){const s=(0,i.useSelect)(e=>{const{getBlocks:t}=e(l.store),o=t(r);return o?.find(e=>["woocommerce/product-reviews-pagination-previous","woocommerce/product-reviews-pagination-next"].includes(e.name))},[r]),c=(0,l.useBlockProps)(),m=(0,l.useInnerBlocksProps)(c,{template:u});return(0,i.useSelect)(e=>{const{getSettings:t}=e(l.store),{__experimentalDiscussionSettings:o}=t();return o?.pageComments},[])?(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(l.InspectorControls,{children:(0,t.jsx)(a.PanelBody,{title:(0,n.__)("Settings","woocommerce"),children:(0,t.jsx)(d,{value:e,onChange:e=>{o({paginationArrow:e})}})})}),(0,t.jsx)("div",{...m})]}):(0,t.jsx)(l.Warning,{children:(0,n.__)("Product Reviews Pagination block: paging comments is disabled in the Discussion Settings","woocommerce")})},save:function(){return(0,t.jsx)(l.InnerBlocks.Content,{})}})})(),(()=>{"use strict";var e=s(27723),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})}),c=s(74997);const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews-pagination-next","title":"Reviews Next Page","category":"woocommerce","ancestor":["woocommerce/product-reviews-pagination"],"description":"Displays the next product review\'s page link.","textdomain":"woocommerce","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["postId","reviews/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');var i=s(94715);const a={none:"",arrow:"→",chevron:"»"};(0,c.registerBlockType)(n,{icon:r,edit:function({attributes:{label:o},setAttributes:r,context:{"reviews/paginationArrow":s}}){const c=a[s];return(0,t.jsxs)("a",{href:"#reviews-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,i.useBlockProps)(),children:[(0,t.jsx)(i.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,e.__)("Newer reviews page link","woocommerce"),placeholder:(0,e.__)("Newer Reviews","woocommerce"),value:o,onChange:e=>r({label:e})}),c&&(0,t.jsx)("span",{className:`wp-block-woocommerce-product-reviews-pagination-next-arrow is-arrow-${s}`,children:c})]})},example:{attributes:{label:(0,e.__)("Newer Reviews","woocommerce")}}})})(),(()=>{"use strict";var e=s(27723),t=s(10790),o=s(5573),r=(0,t.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,t.jsx)(o.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})}),c=s(74997);const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews-pagination-previous","title":"Reviews Previous Page","category":"woocommerce","ancestor":["woocommerce/product-reviews-pagination"],"description":"Displays the previous product review\'s page link.","textdomain":"woocommerce","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["postId","reviews/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');var i=s(94715);const a={none:"",arrow:"←",chevron:"«"};(0,c.registerBlockType)(n,{icon:r,edit:function({attributes:{label:o},setAttributes:r,context:{"reviews/paginationArrow":s}}){const c=a[s];return(0,t.jsxs)("a",{href:"#reviews-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,i.useBlockProps)(),children:[c&&(0,t.jsx)("span",{className:`wp-block-woocommerce-product-reviews-pagination-previous-arrow is-arrow-${s}`,children:c}),(0,t.jsx)(i.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,e.__)("Older reviews page link","woocommerce"),placeholder:(0,e.__)("Older Reviews","woocommerce"),value:o,onChange:e=>r({label:e})})]})},example:{attributes:{label:(0,e.__)("Older Reviews","woocommerce")}}})})(),(()=>{"use strict";var e=s(10790),t=s(5573),o=(0,e.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,e.jsx)(t.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})}),r=s(74997);const c=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/product-reviews-pagination-numbers","title":"Reviews Page Numbers","category":"woocommerce","ancestor":["woocommerce/product-reviews-pagination"],"description":"Displays a list of page numbers for product reviews pagination.","textdomain":"woocommerce","usesContext":["postId"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}');var n=s(94715);s(87197);const i=({content:t,tag:o="a",extraClass:r=""})=>"a"===o?(0,e.jsx)(o,{className:`page-numbers ${r}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault(),children:t}):(0,e.jsx)(o,{className:`page-numbers ${r}`,children:t});(0,r.registerBlockType)(c,{icon:o,edit:function(){return(0,e.jsxs)("div",{...(0,n.useBlockProps)(),children:[(0,e.jsx)(i,{content:"1"}),(0,e.jsx)(i,{content:"2"}),(0,e.jsx)(i,{content:"3",tag:"span",extraClass:"current"}),(0,e.jsx)(i,{content:"4"}),(0,e.jsx)(i,{content:"5"}),(0,e.jsx)(i,{content:"...",tag:"span",extraClass:"dots"}),(0,e.jsx)(i,{content:"8"})]})},example:{}})})(),(()=>{"use strict";var e=s(74997),t=s(74774);const o=JSON.parse('{"UU":"woocommerce/product-review-template"}');var r=s(86087),c=s(47143),n=s(27723),i=s(56427),a=s(3582),l=s(94715),d=s(93832),u=s(1455),m=s.n(u),p=s(10790);const h=[["core/avatar"],["woocommerce/product-review-author-name"],["woocommerce/product-review-date"],["woocommerce/product-review-content"]],g=(0,r.memo)(({blocks:e,commentId:t,setActiveCommentId:o,isHidden:r})=>{const s=(0,l.__experimentalUseBlockPreview)({blocks:e}),c=()=>{o(t)},n={display:r?"none":void 0};return(0,p.jsx)("div",{...s,tabIndex:0,role:"button",style:n,onClick:c,onKeyDown:c})}),w=(0,r.memo)(function e({comment:t,activeCommentId:o,setActiveCommentId:r,firstCommentId:s,blocks:c}){const{children:n,...i}=(0,l.useInnerBlocksProps)({},{template:h});return(0,p.jsxs)("li",{...i,children:[t.commentId===(o||s)?n:null,(0,p.jsx)(g,{blocks:c,commentId:t.commentId,setActiveCommentId:r,isHidden:t.commentId===(o||s)}),t.children&&t.children.length>0?(0,p.jsx)("ol",{children:t.children.map((t,n)=>(0,p.jsx)(l.BlockContextProvider,{value:{commentId:t.commentId<0?null:t.commentId},children:(0,p.jsx)(e,{comment:t,activeCommentId:o,setActiveCommentId:r,blocks:c,firstCommentId:s})},t.commentId||n))}):null]})});s(69951),(0,e.registerBlockType)(o.UU,{icon:t.A,edit:function({clientId:e,context:{postId:t}}){const o=(0,l.useBlockProps)(),[s,u]=(0,r.useState)(0),{commentOrder:h,commentsPerPage:g,pageComments:_}=(0,c.useSelect)(e=>{const{getSettings:t}=e(l.store);return t().__experimentalDiscussionSettings},[]),b=(({postId:e})=>{const t=(0,r.useMemo)(()=>({status:"approve",order:"asc",context:"embed",parent:0,type:"review",_embed:"children"}),[]),{pageComments:o,commentsPerPage:s,defaultCommentsPage:n}=(0,c.useSelect)(e=>{const{getSettings:t}=e(l.store),{__experimentalDiscussionSettings:o}=t();return o},[]),i=o?Math.min(s,100):100,a=(({defaultPage:e,postId:t,perPage:o,queryArgs:s})=>{const[c,n]=(0,r.useState)({}),i=`${t}_${o}`,a=c[i]||0;return(0,r.useEffect)(()=>{a||"newest"!==e||m()({path:(0,d.addQueryArgs)("/wp/v2/comments",{...s,post:t,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then(e=>{const t=parseInt(e.headers.get("X-WP-TotalPages")||"1",10);n({...c,[i]:t<=1?1:t})}).catch(()=>{n({...c,[i]:1})})},[e,t,o,n,a,s,c,i]),"newest"===e?a:1})({defaultPage:n,postId:e,perPage:i,queryArgs:t});return(0,r.useMemo)(()=>a?{...t,post:e,per_page:i,page:a}:null,[a,t,e,i])})({postId:t??0}),{topLevelComments:x,blocks:f}=(0,c.useSelect)(t=>{const{getEntityRecords:o}=t(a.store),{getBlocks:r}=t(l.store);return{topLevelComments:b?o("root","comment",b):null,blocks:r(e)}},[e,b]);let y=((e,t)=>(0,r.useMemo)(()=>{const o=e.map(({id:e,children:t})=>({commentId:e,children:Array.isArray(t)?t.map(e=>({commentId:e.id})):[]}));return"desc"===t?o.reverse():o},[e,t]))(Array.isArray(x)?x.map(e=>{const t=e._embedded?.children;return Array.isArray(t)&&t.length>=1&&Array.isArray(t[0])?{id:e.id,children:t[0].map(e=>({id:e.id}))}:{id:e.id}}):[],h);return x?(t||(y=(({perPage:e,pageComments:t})=>{const o=t?Math.min(e,3):3;return Array.from({length:o},(e,t)=>({commentId:-(t+1)}))})({perPage:g,pageComments:_})),y.length?(0,p.jsx)("ol",{...o,children:y&&y.map((e,t)=>(0,p.jsx)(l.BlockContextProvider,{value:{commentId:e.commentId<0?null:e.commentId},children:(0,p.jsx)(w,{comment:e,activeCommentId:s,setActiveCommentId:u,blocks:f,firstCommentId:y[0]?.commentId})},e.commentId||t))}):(0,p.jsx)("p",{...o,children:(0,n.__)("No results found.","woocommerce")})):(0,p.jsx)("p",{...o,children:(0,p.jsx)(i.Spinner,{})})},save:function(){return(0,p.jsx)(l.InnerBlocks.Content,{})}})})(),(()=>{"use strict";var e=s(56427),t=s(74997),o=s(15703),r=s(94715),c=s(27723),n=s(47143),i=s(10790);const a="woocommerce/accordion-item",l={name:a};function d({clientId:o}){const{replaceBlocks:s}=(0,n.useDispatch)(r.store),{currentBlockAttributes:a,innerBlocks:l}=(0,n.useSelect)(e=>{const t=e(r.store);return{currentBlockAttributes:t.getBlockAttributes(o),innerBlocks:t.getBlocks(o)}},[o]),d=e=>{const o=["icon","textAlignment","levelOptions"],r=["allowedBlocks","isSelected","openByDefault"];return e.map(e=>{let s=e.name;const c={...e.attributes};"woocommerce/accordion-item"===e.name?s="core/accordion-item":"woocommerce/accordion-header"===e.name?(s="core/accordion-heading",void 0!==e.attributes.icon&&(c.showIcon=!1!==e.attributes.icon),o.forEach(e=>{delete c[e]})):"woocommerce/accordion-panel"===e.name&&(s="core/accordion-panel",r.forEach(e=>{delete c[e]}));const n=e.innerBlocks?.length?d(e.innerBlocks):[];return(0,t.createBlock)(s,c,n)})},u=[(0,i.jsx)(e.Button,{onClick:()=>{if(!a)return;const e=d(l),{allowedBlocks:r,...c}=a;s(o,(0,t.createBlock)("core/accordion",c,e))},variant:"primary",children:(0,c.__)("Upgrade Block","woocommerce")},"update")];return(0,i.jsx)(r.Warning,{actions:u,className:"wc-block-components-actions",children:(0,c.__)("This version of the Accordion block is outdated. Upgrade to continue using.","woocommerce")})}var u=s(4921);const m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/accordion-group","title":"Accordion Group","category":"woocommerce","keywords":["WooCommerce"],"description":"A group of headers and associated expandable content.","example":{},"__experimental":true,"supports":{"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradient":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"interactivity":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"autoclose":{"type":"boolean","default":false},"allowedBlocks":{"type":"array"}},"allowedBlocks":["woocommerce/accordion-item"],"textdomain":"woocommerce","viewScriptModule":"woocommerce/accordion-group","style":"file:../woocommerce/accordion-group-style.css"}'),p=(0,i.jsxs)(e.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",fill:"currentColor"}),(0,i.jsx)(e.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z",fill:"currentColor"}),(0,i.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",fill:"currentColor"}),(0,i.jsx)(e.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z",fill:"currentColor"})]}),{name:h}=m,g={apiVersion:3,icon:p,example:{},edit:function({attributes:{autoclose:t},setAttributes:s,clientId:n}){const u=(0,r.useBlockProps)(),m=(0,r.useInnerBlocksProps)(u,{template:[[a],[a]],defaultBlock:l,directInsert:!0});return(0,o.isWpVersion)("6.9",">=")?(0,i.jsx)(d,{clientId:n}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.InspectorControls,{children:(0,i.jsx)(e.PanelBody,{title:(0,c.__)("Settings","woocommerce"),initialOpen:!0,children:(0,i.jsx)(e.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,c.__)("Auto-close","woocommerce"),onChange:e=>{s({autoclose:e})},checked:t,help:(0,c.__)("Automatically close accordions when a new one is opened.","woocommerce")})})},"setting"),(0,i.jsx)("div",{...m})]})},save:function({attributes:e}){const{iconPosition:t}=e,o=r.useBlockProps.save(),s=(0,u.A)({"icon-position-left":"left"===t},o.className);return(0,i.jsx)("div",{...r.useInnerBlocksProps.save({...o,className:s})})},supports:{inserter:(0,o.isWpVersion)("6.9","<")}};(0,t.registerBlockType)(m,g)})(),(()=>{"use strict";var e=s(56427),t=s(74997),o=s(4921),r=s(27723),c=s(94715),n=s(10790);const i=({width:t,height:o})=>(0,n.jsx)(e.SVG,{width:t||24,height:o||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0041 10.5547L11.9996 16.0134L5.99512 10.5547L7.00413 9.44482L11.9996 13.9862L16.9951 9.44483L18.0041 10.5547Z",fill:"currentColor"})}),a=({width:t,height:o})=>(0,n.jsx)(e.SVG,{width:t||24,height:o||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(e.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z",fill:"currentColor"})}),l=({width:t,height:o})=>(0,n.jsxs)(e.SVG,{width:t||24,height:o||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20.75 12C20.75 16.8325 16.8325 20.75 12 20.75C7.16751 20.75 3.25 16.8325 3.25 12C3.25 7.16751 7.16751 3.25 12 3.25C16.8325 3.25 20.75 7.16751 20.75 12ZM12 19.25C16.0041 19.25 19.25 16.0041 19.25 12C19.25 7.99594 16.0041 4.75 12 4.75C7.99594 4.75 4.75 7.99594 4.75 12C4.75 16.0041 7.99594 19.25 12 19.25Z",fill:"currentColor"}),(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.25 12.75V17H12.75V12.75H17V11.25H12.75V7H11.25V11.25H7V12.75H11.25Z",fill:"currentColor"})]}),d=({width:t,height:o})=>(0,n.jsx)(e.SVG,{width:t||24,height:o||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(e.Path,{d:"M12 14.5L16.5 9.5L7.5 9.5L12 14.5Z",fill:"currentColor"})}),u=({width:t,height:o})=>(0,n.jsx)(e.SVG,{width:t||24,height:o||24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9.82573 6.72441L15.2844 12.7289L9.82573 18.7334L8.71582 17.7244L13.2572 12.7289L8.71582 7.73342L9.82573 6.72441Z",fill:"currentColor"})}),m={plus:a,circlePlus:l,chevron:i,chevronRight:u,caret:d},p={plus:a,circlePlus:l,chevron:i,chevronRight:u,caret:d},h=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/accordion-header","title":"Accordion Header","category":"woocommerce","keywords":["WooCommerce"],"description":"Accordion header.","example":{},"__experimental":true,"parent":["woocommerce/accordion-item"],"supports":{"anchor":true,"color":{"background":true,"gradient":true},"align":false,"border":true,"interactivity":true,"spacing":{"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"padding":true,"margin":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"textAlign":true,"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"layout":true},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":"span"},"level":{"type":"number","default":3},"levelOptions":{"type":"array"},"textAlignment":{"type":"string","default":"left"},"icon":{"type":["string","boolean"],"enum":["plus","chevron","chevronRight","caret","circlePlus",false],"default":"plus"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"}},"textdomain":"woocommerce"}'),g=(0,n.jsxs)(e.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",fill:"currentColor"}),(0,n.jsx)(e.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z",fill:"currentColor"})]}),{name:w}=h,_={apiVersion:3,icon:g,example:{},edit:function({attributes:t,setAttributes:s}){const{level:p,title:h,textAlign:g,icon:w,iconPosition:_,levelOptions:b}=t,x="h"+p,f=(0,c.useBlockProps)(),y=(0,c.__experimentalUseBorderProps)(t),v=(0,c.__experimentalUseColorProps)(t),k=(0,c.__experimentalGetSpacingClassesAndStyles)(t),j=(0,c.__experimentalGetShadowClassesAndStyles)(t),C=m[w];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.BlockControls,{children:(0,n.jsx)(e.ToolbarGroup,{children:(0,n.jsx)(c.HeadingLevelDropdown,{value:p,options:b,onChange:e=>s({level:e})})})}),(0,n.jsx)(c.InspectorControls,{children:(0,n.jsxs)(e.PanelBody,{title:(0,r.__)("Settings","woocommerce"),children:[(0,n.jsxs)(e.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,r.__)("Icon","woocommerce"),value:w,onChange:e=>s({icon:e}),children:[(0,n.jsx)(e.__experimentalToggleGroupControlOptionIcon,{label:"Plus",icon:a,value:"plus"}),(0,n.jsx)(e.__experimentalToggleGroupControlOptionIcon,{label:"Chevron",icon:i,value:"chevron"}),(0,n.jsx)(e.__experimentalToggleGroupControlOptionIcon,{label:"Circle Plus",icon:l,value:"circlePlus"}),(0,n.jsx)(e.__experimentalToggleGroupControlOptionIcon,{label:"Caret",icon:d,value:"caret"}),(0,n.jsx)(e.__experimentalToggleGroupControlOptionIcon,{label:"Chevron Right",icon:u,value:"chevronRight"}),(0,n.jsx)(e.__experimentalToggleGroupControlOption,{label:"None",value:!1})]}),(0,n.jsxs)(e.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,r.__)("Icon Position","woocommerce"),value:_,onChange:e=>{s({iconPosition:e})},children:[(0,n.jsx)(e.__experimentalToggleGroupControlOption,{label:"Left",value:"left"}),(0,n.jsx)(e.__experimentalToggleGroupControlOption,{label:"Right",value:"right"})]})]})},"setting"),(0,n.jsx)(x,{...f,className:(0,o.A)(f.className,v.className,y.className,"accordion-item__heading",{"has-custom-font-size":f.style.fontSize,"icon-position-left":"left"===_,[`has-text-align-${g}`]:g}),style:{...y.style,...v.style,...j.style},children:(0,n.jsxs)("button",{className:(0,o.A)("accordion-item__toggle"),style:{...k.style},children:[(0,n.jsx)(c.RichText,{allowedFormats:["core/bold","core/italic","core/image","core/strikethrough"],disableLineBreaks:!0,tagName:"span",value:h,onChange:e=>s({title:e}),placeholder:(0,r.__)("Accordion title","woocommerce")}),(0,n.jsx)("span",{className:(0,o.A)("accordion-item__toggle-icon",{[`has-icon-${w}`]:w}),style:{width:"1.2em",height:"1.2em"},children:C&&(0,n.jsx)(C,{width:"1.2em",height:"1.2em"})})]})})]})},save:function({attributes:e}){const{level:t,title:r,iconPosition:s,textAlign:i,icon:a}=e,l="h"+t,d=c.useBlockProps.save(),u=(0,c.__experimentalGetBorderClassesAndStyles)(e),m=(0,c.__experimentalGetColorClassesAndStyles)(e),h=(0,c.__experimentalGetSpacingClassesAndStyles)(e),g=(0,c.__experimentalGetShadowClassesAndStyles)(e),w=p[a];return(0,n.jsx)(l,{...d,className:(0,o.A)(d.className,m.className,u.className,"accordion-item__heading",{"has-custom-font-size":d?.style?.fontSize,"icon-position-left":"left"===s,[`has-text-align-${i}`]:i}),style:{...u.style,...m.style,...g.style},children:(0,n.jsxs)("button",{className:(0,o.A)("accordion-item__toggle"),style:{...h.style},children:[(0,n.jsx)(c.RichText.Content,{tagName:"span",value:r}),(0,n.jsx)("span",{className:(0,o.A)("accordion-item__toggle-icon",{[`has-icon-${a}`]:a}),style:{width:"1.2em",height:"1.2em"},children:a&&(0,n.jsx)(w,{width:"1.2em",height:"1.2em"})})]})})}};(0,t.registerBlockType)(h,_)})(),(()=>{"use strict";var e=s(56427),t=s(74997),o=s(27723),r=s(94715),c=s(47143),n=s(86087),i=s(4921),a=s(10790);const l=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/accordion-item","title":"Accordion","category":"woocommerce","keywords":["WooCommerce"],"description":"A single accordion that displays a header and expandable content.","example":{},"__experimental":true,"parent":["woocommerce/accordion-group"],"allowedBlocks":["woocommerce/accordion-header","woocommerce/accordion-panel"],"supports":{"align":["wide","full"],"color":{"background":true,"gradient":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"woocommerce"}'),d=(0,a.jsxs)(e.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",fill:"currentColor"}),(0,a.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",fill:"currentColor"}),(0,a.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",fill:"currentColor"}),(0,a.jsx)(e.Path,{d:"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z",fill:"currentColor"})]}),{name:u}=l,m={apiVersion:3,icon:d,example:{},edit:function({attributes:{openByDefault:t},clientId:s,setAttributes:l}){const d=(0,c.useSelect)(e=>{const{isBlockSelected:t,hasSelectedInnerBlock:o}=e(r.store);return t(s)||o(s,!0)},[s]),u=(0,c.useSelect)(e=>e(r.store).getBlockOrder,[])(s)[1],{updateBlockAttributes:m,__unstableMarkNextChangeAsNotPersistent:p}=(0,c.useDispatch)(r.store);(0,n.useEffect)(()=>{u&&(p(),m(u,{isSelected:d}))},[d,u,p,m]);const h=(0,r.useBlockProps)(),g=(0,r.useInnerBlocksProps)({...h,className:(0,i.A)(h.className,{"is-open":t||d})},{template:[["woocommerce/accordion-header",{}],["woocommerce/accordion-panel",{isSelected:!0,openByDefault:t}]],templateLock:"all",directInsert:!0});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.InspectorControls,{children:(0,a.jsx)(e.PanelBody,{title:(0,o.__)("Settings","woocommerce"),children:(0,a.jsx)(e.ToggleControl,{label:(0,o.__)("Open by default","woocommerce"),__nextHasNoMarginBottom:!0,onChange:e=>{l({openByDefault:e}),u&&m(u,{openByDefault:e})},checked:t,help:(0,o.__)("Accordion content will be displayed by default.","woocommerce")})})},"setting"),(0,a.jsx)("div",{...g})]})},save:function({attributes:e}){const{openByDefault:t}=e,o=r.useBlockProps.save(),s=(0,i.A)({"is-open":t},o.className),c=r.useInnerBlocksProps.save({...o,className:s});return(0,a.jsx)("div",{...c})}};(0,t.registerBlockType)(l,m)})(),(()=>{"use strict";var e=s(56427),t=s(74997),o=s(94715),r=s(4921),c=s(10790);const n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"woocommerce/accordion-panel","title":"Accordion Panel","category":"woocommerce","keywords":["WooCommerce"],"description":"Accordion Panel","example":{},"__experimental":true,"parent":["woocommerce/accordion-item"],"supports":{"color":{"background":true,"gradient":true},"border":true,"interactivity":true,"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":true},"attributes":{"allowedBlocks":{"type":"array"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"woocommerce"}'),i=(0,c.jsx)(e.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(e.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",fill:"currentColor"})}),{name:a}=n,l={apiVersion:3,icon:i,example:{},edit:function({attributes:e}){const{allowedBlocks:t,templateLock:s,openByDefault:n,isSelected:i}=e,a=(0,o.__experimentalUseBorderProps)(e),l=(0,o.__experimentalUseColorProps)(e),d=(0,o.__experimentalGetSpacingClassesAndStyles)(e),u=(0,o.__experimentalGetShadowClassesAndStyles)(e),m=(0,o.useBlockProps)(),p=(0,o.useInnerBlocksProps)({className:"accordion-content__wrapper",style:{...d.style}},{allowedBlocks:t,template:[["core/paragraph",{}]],templateLock:s});return(0,c.jsx)("div",{...m,className:(0,r.A)(m.className,l.className,a.className,{"has-custom-font-size":m?.style?.fontSize}),style:{...a.style,...l.style,...u.style},"aria-hidden":!i&&!n,children:(0,c.jsx)("div",{...p})})},save:function({attributes:e}){const t=o.useBlockProps.save(),s=(0,o.__experimentalGetBorderClassesAndStyles)(e),n=(0,o.__experimentalGetColorClassesAndStyles)(e),i=(0,o.__experimentalGetSpacingClassesAndStyles)(e),a=(0,o.__experimentalGetShadowClassesAndStyles)(e);return(0,c.jsx)("div",{...t,className:(0,r.A)(t.className,n.className,s.className,{"has-custom-font-size":t?.style?.fontSize}),style:{...s.style,...n.style,...a.style},children:(0,c.jsx)("div",{className:"accordion-content__wrapper",style:{...i.style},children:(0,c.jsx)(o.InnerBlocks.Content,{})})})}};(0,t.registerBlockType)(n,l)})(),(()=>{"use strict";var e=s(4921),t=s(94715),o=s(74997),r=s(27723),c=s(96242),n=s(50929),i=s(35943),a=s(10790);const l=({children:e,redirectUrl:t})=>(0,a.jsx)(i.s,{redirectUrl:t,children:e});var d=s(64534),u=s(71e3),m=s(86087),p=s(93832),h=s(47143),g=s(2284),w=s(88723),_=s(93450),b=s(96761),x=s(26999),f=s(65676);s(30398);const y=(0,m.createContext)({hasDarkControls:!1}),v=JSON.parse('{"DD":"Filled Cart","XV":3}');(0,o.registerBlockType)("woocommerce/filled-cart-block",{apiVersion:v.XV,title:v.DD,icon:{src:(0,a.jsx)(_.A,{icon:w.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:o})=>{const r=(0,t.useBlockProps)(),{currentView:s}=(0,n.m)(),{hasDarkControls:c}=(0,m.useContext)(y),i=(0,x.h)(u.innerBlockAreas.FILLED_CART),l=[["woocommerce/cart-items-block",{},[]],["woocommerce/cart-totals-block",{},[]]];return(0,f.B)({clientId:o,registeredBlocks:i,defaultTemplate:l}),(0,a.jsx)("div",{...r,hidden:"woocommerce/filled-cart-block"!==s,children:(0,a.jsx)(b.A,{className:(0,e.A)("wc-block-cart",{"has-dark-controls":c}),children:(0,a.jsx)(t.InnerBlocks,{allowedBlocks:i,template:l,templateLock:"insert"})})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})});var k=s(16870),j=s(63877),C=s(66683);const S=JSON.parse('{"DD":"Cart Items","XV":3}');(0,o.registerBlockType)("woocommerce/cart-items-block",{apiVersion:S.XV,title:S.DD,icon:{src:(0,a.jsx)(_.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const o=(0,t.useBlockProps)({className:"wc-block-cart__main"}),r=(0,x.h)(u.innerBlockAreas.CART_ITEMS);r.push("woocommerce/product-collection");const s=[["woocommerce/cart-line-items-block",{},[]],["woocommerce/product-collection",{...C.A.attributes,displayLayout:{...C.A.attributes.displayLayout,columns:3},query:{...C.A.attributes.query,perPage:3},collection:"woocommerce/product-collection/cross-sells"},C.A.innerBlocks]];return(0,f.B)({clientId:e,registeredBlocks:r,defaultTemplate:s}),(0,a.jsx)(j.A,{...o,children:(0,a.jsx)(t.InnerBlocks,{allowedBlocks:r,template:s,templateLock:!1,renderAppender:t.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})});var A=s(8840),N=s(86697),P=s(15404);const B=({className:e})=>{const{cartItems:t,cartIsLoading:o}=(0,N.V)();return(0,a.jsx)(P.A,{className:e,lineItems:t,isLoading:o})},I=JSON.parse('{"DD":"Cart Line Items","XV":3}');(0,o.registerBlockType)("woocommerce/cart-line-items-block",{apiVersion:I.XV,title:I.DD,icon:{src:(0,a.jsx)(_.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(A.A,{children:(0,a.jsx)(B,{className:o})})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});const T=JSON.parse('{"DD":"Cart Cross-Sells","XV":3}');(0,o.registerBlockType)("woocommerce/cart-cross-sells-block",{apiVersion:T.XV,title:T.DD,icon:{src:(0,a.jsx)(_.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,t.useBlockProps)({className:"wc-block-cart__cross-sells"}),o=[["core/heading",{content:(0,r.__)("You may be interested in…","woocommerce"),level:2,fontSize:"large"},[]],["woocommerce/cart-cross-sells-products-block",{},[]]];return(0,a.jsx)("div",{...e,children:(0,a.jsx)(t.InnerBlocks,{template:o,templateLock:!1})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})}),transforms:{to:[{type:"block",blocks:["woocommerce/product-collection"],transform:()=>(0,o.createBlock)("woocommerce/product-collection",{...C.A.attributes,displayLayout:{...C.A.attributes.displayLayout,columns:3},query:{...C.A.attributes.query,perPage:3},collection:"woocommerce/product-collection/cross-sells"},(0,o.createBlocksFromInnerBlocksTemplate)(C.A.innerBlocks))}]}});var E=s(56427),R=s(15703),D=s(62796),L=s(43129),O=s(38708),M=s(63895),V=s(73805),F=s(76754),H=s(1267);const z=({product:e})=>(0,a.jsx)("div",{className:"cross-sells-product",children:(0,a.jsx)(D.InnerBlockLayoutContextProvider,{parentName:"woocommerce/cart-cross-sells-block",parentClassName:"wp-block-cart-cross-sells-product",children:(0,a.jsxs)(D.ProductDataContextProvider,{isLoading:!1,product:e,children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(L.e,{className:"",showSaleBadge:!0,productId:e.id,showProductLink:!0,saleBadgeAlign:"left",imageSizing:H.e.SINGLE,isDescendentOfQueryLoop:!1,scale:"cover",aspectRatio:"1:1"}),(0,a.jsx)(O.e,{align:"",headingLevel:3,showProductLink:!0}),(0,a.jsx)(M.Block,{isDescendentOfQueryLoop:!1,isDescendentOfSingleProductBlock:!1,productId:e.id,postId:0,shouldDisplayMockedReviewsWhenProductHasNoReviews:!1}),(0,a.jsx)(V.Block,{})]}),(0,a.jsx)(F.Block,{})]})})}),$=({products:e,columns:t})=>{const o=e.map((e,o)=>o>=t?null:(0,a.jsx)(z,{isLoading:!1,product:e},e.id));return(0,a.jsx)("div",{children:o})},W=JSON.parse('{"DD":"Cart Cross-Sells Products","uK":{"Y":{"A":3}},"XV":3}'),G=({className:e,columns:t})=>{const{crossSellsProducts:o}=(0,N.V)();return void 0===t&&(t=W.uK.Y.A),(0,a.jsx)($,{className:e,columns:t,products:o})};s(70535),s(74747),(0,o.registerBlockType)("woocommerce/cart-cross-sells-products-block",{apiVersion:W.XV,title:W.DD,icon:{src:(0,a.jsx)(_.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const{className:s,columns:c}=e,n=(0,t.useBlockProps)();return(0,a.jsxs)("div",{...n,children:[(0,a.jsx)(t.InspectorControls,{children:(0,a.jsx)(E.PanelBody,{title:(0,r.__)("Settings","woocommerce"),children:(0,a.jsx)(E.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Cross-Sells products to show","woocommerce"),value:c,onChange:e=>o({columns:e}),min:(0,R.getSetting)("minColumns",1),max:(0,R.getSetting)("maxColumns",6)})})}),(0,a.jsx)(A.A,{children:(0,a.jsx)(G,{columns:c,className:s})})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var q=s(46328);s(65675);const U=JSON.parse('{"DD":"Cart Totals","XV":3}');(0,o.registerBlockType)("woocommerce/cart-totals-block",{apiVersion:U.XV,title:U.DD,icon:{src:(0,a.jsx)(_.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const o=(0,t.useBlockProps)({className:"wc-block-cart__sidebar"}),r=(0,x.h)(u.innerBlockAreas.CART_TOTALS),s=[["woocommerce/cart-order-summary-block",{},[]],["woocommerce/cart-express-payment-block",{},[]],["woocommerce/proceed-to-checkout-block",{},[]],["woocommerce/cart-accepted-payment-methods-block",{},[]]];return(0,f.B)({clientId:e,registeredBlocks:r,defaultTemplate:s}),(0,a.jsx)(q.A,{...o,children:(0,a.jsx)(t.InnerBlocks,{allowedBlocks:r,template:s,templateLock:!1,renderAppender:t.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})});var Y=s(51565),Z=s(41323),J=s(87853),X=s(14656),Q=s(47594),K=s(61526),ee=s(39011),te=(s(42831),s(40808));const oe=()=>{const{availableExpressPaymentMethods:t={},expressPaymentMethodsInitialized:o,isExpressPaymentMethodActive:s,registeredExpressPaymentMethods:c={}}=(0,h.useSelect)(e=>{const t=e(Q.paymentStore);return{availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),registeredExpressPaymentMethods:t.getRegisteredExpressPaymentMethods()}},[]),{hasPendingItemsOperations:n}=(0,N.V)(),{hasRegisteredExpressPaymentMethods:i,hasRegisteredNotInitializedExpressPaymentMethods:l,hasNoValidRegisteredExpressPaymentMethods:d,availableExpressPaymentsCount:u}=(0,te.m)({availableExpressPaymentMethods:t,expressPaymentMethodsInitialized:o,registeredExpressPaymentMethods:c}),m=!s&&(n||l);if(!i||d)return null;const p=u>1?"ul":"div",g=u>1?"li":"div";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,e.A)("wc-block-components-express-payment","wc-block-components-express-payment--cart",{"wc-block-components-express-payment--disabled":s}),"aria-disabled":s,"aria-live":"polite",...s&&{"aria-busy":!0,"aria-label":(0,r.__)("Processing express checkout","woocommerce")},children:(0,a.jsxs)("div",{className:"wc-block-components-express-payment__content",children:[(0,a.jsx)(X.StoreNoticesContainer,{context:J.tG.EXPRESS_PAYMENTS}),m?(0,a.jsx)(p,{className:"wc-block-components-express-payment__event-buttons",children:Array.from({length:u}).map((e,t)=>(0,a.jsx)(g,{children:(0,a.jsx)(K.E,{height:"48px",ariaMessage:(0,r.__)("Loading express payment method…","woocommerce")})},t))}):(0,a.jsx)(ee.A,{})]})}),(0,a.jsx)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart",children:(0,r.__)("Or","woocommerce")})]})},re=({className:t})=>{const{cartNeedsPayment:o}=(0,N.V)();return o?(0,a.jsx)("div",{className:(0,e.A)("wc-block-cart__payment-options",t),children:(0,a.jsx)(oe,{})}):null};s(17467);var se=s(9051),ce=s(95309);const ne=JSON.parse('{"DD":"Express Checkout","XV":3}');(0,o.registerBlockType)("woocommerce/cart-express-payment-block",{apiVersion:ne.XV,title:ne.DD,icon:{src:(0,a.jsx)(_.A,{style:{fill:"none"},icon:ce.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:o,setAttributes:r})=>{const{paymentMethods:s,isInitialized:c}=(0,Y.u)(),n=Object.keys(s).length>0,i=(0,t.useBlockProps)({className:(0,e.A)({"wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods":n})}),{className:l,showButtonStyles:d,buttonHeight:u,buttonBorderRadius:m}=o;return c&&n?(0,a.jsxs)("div",{...i,children:[(0,a.jsx)(Z.b,{attributes:o,setAttributes:r}),(0,a.jsx)(se.W.Provider,{value:{showButtonStyles:d,buttonHeight:u,buttonBorderRadius:m},children:(0,a.jsx)(re,{className:l})})]}):null},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var ie=s(5764);const ae=(0,r.__)("Proceed to Checkout","woocommerce"),le={checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}},buttonLabel:{type:"string",default:ae}};var de=s(16606),ue=s(69548),me=s(36352);s(2766);const pe=JSON.parse('{"DD":"Proceed to Checkout","XV":3}');(0,o.registerBlockType)("woocommerce/proceed-to-checkout-block",{apiVersion:pe.XV,title:pe.DD,icon:{src:(0,a.jsx)(_.A,{icon:ie.A,className:"wc-block-editor-components-block-icon"})},attributes:le,edit:({attributes:e,setAttributes:o})=>{const s=(0,t.useBlockProps)(),{checkoutPageId:c=0,buttonLabel:n}=e,{current:i}=(0,m.useRef)(c),l=(0,h.useSelect)(e=>i||e("core/editor").getCurrentPostId(),[i]);return(0,a.jsxs)("div",{...s,children:[(0,a.jsx)(t.InspectorControls,{children:!(l===me.f9&&0===i)&&(0,a.jsx)(ue.A,{pageId:c,setPageId:e=>o({checkoutPageId:e}),labels:{title:(0,r.__)("Proceed to Checkout button","woocommerce"),default:(0,r.__)("WooCommerce Checkout Page","woocommerce")}})}),(0,a.jsx)(de.A,{className:"wc-block-cart__submit-button",value:n,placeholder:ae,onChange:e=>{o({buttonLabel:e})}})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var he=s(47791);const ge=me.Jn?["core/paragraph",{align:"center",content:(0,r.sprintf)(/* translators: %s is the link to the store product directory. */ /* translators: %s is the link to the store product directory. */ (0,r.__)('<a href="%s">Browse store</a>',"woocommerce"),me.Jn),dropCap:!1}]:null,we=[["core/heading",{textAlign:"center",content:(0,r.__)("Your cart is currently empty!","woocommerce"),level:2,className:"with-empty-cart-icon wc-block-cart__empty-cart__title"}],ge,["core/separator",{className:"is-style-dots"}],["core/heading",{textAlign:"center",content:(0,r.__)("New in store","woocommerce"),level:2}],["woocommerce/product-new",{columns:4,rows:1}]].filter(Boolean);s(69685);const _e=JSON.parse('{"DD":"Empty Cart","XV":3}');(0,o.registerBlockType)("woocommerce/empty-cart-block",{apiVersion:_e.XV,title:_e.DD,icon:{src:(0,a.jsx)(_.A,{icon:he.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const o=(0,t.useBlockProps)(),{currentView:r}=(0,n.m)(),s=(0,x.h)(u.innerBlockAreas.EMPTY_CART);return(0,f.B)({clientId:e,registeredBlocks:s,defaultTemplate:we}),(0,a.jsx)("div",{...o,hidden:"woocommerce/empty-cart-block"!==r,children:(0,a.jsx)(t.InnerBlocks,{template:we,templateLock:!1,renderAppender:t.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})});var be=s(54200),xe=s(5856),fe=s(61115);const ye=({className:e})=>{const{paymentMethods:t}=(0,Y.m)();return(0,a.jsx)(xe.h,{className:e,icons:(0,fe.R)(t)})},ve=JSON.parse('{"DD":"Accepted Payment Methods","XV":3}');(0,o.registerBlockType)("woocommerce/cart-accepted-payment-methods-block",{apiVersion:ve.XV,title:ve.DD,icon:{src:(0,a.jsx)(_.A,{icon:be.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(ye,{className:o})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var ke=s(81475),je=s(12220),Ce=s(70910);const Se=()=>{const{extensions:e,receiveCart:t,...o}=(0,N.V)(),r={extensions:e,cart:o,context:"woocommerce/cart"};return(0,a.jsx)(u.ExperimentalOrderMeta.Slot,{...r})},Ae=JSON.parse('{"DD":"Order Summary","xY":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"uK":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"XV":3}'),Ne=[{attributes:Ae.uK,save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})}),supports:Ae.xY,migrate:({attributes:e})=>[e,[(0,o.createBlock)("woocommerce/cart-order-summary-heading-block",{content:(0,r.__)("Cart totals","woocommerce")},[]),(0,o.createBlock)("woocommerce/cart-order-summary-coupon-form-block",{},[]),(0,o.createBlock)("woocommerce/cart-order-summary-totals-block",{},[(0,o.createBlock)("woocommerce/cart-order-summary-subtotal-block",{},[]),(0,o.createBlock)("woocommerce/cart-order-summary-fee-block",{},[]),(0,o.createBlock)("woocommerce/cart-order-summary-discount-block",{},[]),(0,o.createBlock)("woocommerce/cart-order-summary-shipping-block",{},[]),(0,o.createBlock)("woocommerce/cart-order-summary-taxes-block",{},[])])]],isEligible:(e,t)=>!t.some(e=>"woocommerce/cart-order-summary-totals-block"===e.name)}],Pe=Ne;(0,o.registerBlockType)("woocommerce/cart-order-summary-block",{apiVersion:Ae.XV,title:Ae.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const o=(0,t.useBlockProps)(),{cartTotals:s}=(0,N.V)(),c=(0,Ce.getCurrencyFromPriceResponse)(s),n=(0,x.h)(u.innerBlockAreas.CART_ORDER_SUMMARY),i=[["woocommerce/cart-order-summary-heading-block",{content:(0,r.__)("Cart totals","woocommerce")},[]],["woocommerce/cart-order-summary-coupon-form-block",{},[]],["woocommerce/cart-order-summary-totals-block",{},[]]];return(0,f.B)({clientId:e,registeredBlocks:n,defaultTemplate:i}),(0,a.jsxs)("div",{...o,children:[(0,a.jsx)(t.InnerBlocks,{allowedBlocks:n,template:i}),(0,a.jsx)("div",{className:"wc-block-components-totals-wrapper",children:(0,a.jsx)(je.Ay,{currency:c,values:s,isEstimate:!0})}),(0,a.jsx)(Se,{})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})}),deprecated:Pe});var Be=s(37486);const Ie=({className:e=""})=>{const{cartTotals:t}=(0,N.V)(),{isLoading:o}=(0,Be.n)();if(!parseFloat(t.total_fees)&&!parseFloat(t.total_discount)&&!parseFloat(t.total_shipping))return null;const r=(0,Ce.getCurrencyFromPriceResponse)(t);return(0,a.jsx)(X.TotalsWrapper,{className:e,children:(0,a.jsx)(X.Subtotal,{currency:r,values:t,showSkeleton:o})})},Te=JSON.parse('{"DD":"Subtotal","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-subtotal-block",{apiVersion:Te.XV,title:Te.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(Ie,{className:o})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})}),s(42115);const Ee=JSON.parse('{"DD":"Totals","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-totals-block",{apiVersion:Ee.XV,title:Ee.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const o=(0,t.useBlockProps)(),r=(0,x.h)(u.innerBlockAreas.CART_ORDER_SUMMARY_TOTALS),s=[["woocommerce/cart-order-summary-subtotal-block",{},[]],["woocommerce/cart-order-summary-fee-block",{},[]],["woocommerce/cart-order-summary-discount-block",{},[]],["woocommerce/cart-order-summary-shipping-block",{},[]],["woocommerce/cart-order-summary-taxes-block",{},[]]];return(0,f.B)({clientId:e,registeredBlocks:r,defaultTemplate:s}),(0,a.jsx)("div",{...o,children:(0,a.jsx)(t.InnerBlocks,{allowedBlocks:r,template:s})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})});const Re=({className:e})=>{const{cartFees:t,cartTotals:o}=(0,N.V)();if(!t.length)return null;const r=(0,Ce.getCurrencyFromPriceResponse)(o);return(0,a.jsx)(X.TotalsWrapper,{className:e,children:(0,a.jsx)(X.TotalsFees,{currency:r,cartFees:t})})};(0,o.registerBlockType)("woocommerce/cart-order-summary-fee-block",{apiVersion:3,title:"Fees",icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(Re,{className:o})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var De=s(37273);const Le=()=>{const{extensions:e,receiveCart:t,...o}=(0,N.V)(),r={extensions:e,cart:o,context:"woocommerce/cart"};return(0,a.jsx)(u.ExperimentalDiscountsMeta.Slot,{...r})},Oe=({className:e})=>{const{cartTotals:t,cartCoupons:o}=(0,N.V)(),{removeCoupon:r,isRemovingCoupon:s}=(0,De.k)("wc/cart"),{isLoading:c}=(0,Be.n)();if(!o.length)return(0,a.jsx)(Le,{});const n=(0,Ce.getCurrencyFromPriceResponse)(t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(X.TotalsWrapper,{className:e,children:(0,a.jsx)(je.n$,{cartCoupons:o,currency:n,isRemovingCoupon:s,removeCoupon:r,values:t,isLoading:c})}),(0,a.jsx)(Le,{})]})},Me=JSON.parse('{"DD":"Discount","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-discount-block",{apiVersion:Me.XV,title:Me.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(Oe,{className:o})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var Ve=s(80305);const Fe=({className:e})=>{const{cartNeedsShipping:t,shippingRates:o}=(0,N.V)();return t&&(0,Ve.m3)(o)?(0,a.jsx)(u.TotalsWrapper,{className:e,children:(0,a.jsx)(je.w7,{label:(0,r.__)("Shipping","woocommerce"),placeholder:(0,a.jsx)("span",{className:"wc-block-components-shipping-placeholder__value",children:(0,r.__)("Calculated at checkout","woocommerce")})})}):null},He=JSON.parse('{"DD":"Shipping","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-shipping-block",{apiVersion:He.XV,title:He.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,s=(0,t.useBlockProps)();return(0,a.jsxs)("div",{...s,children:[(0,a.jsx)(t.InspectorControls,{children:!!me.h0&&(0,a.jsxs)(E.PanelBody,{title:(0,r.__)("Shipping Calculations","woocommerce"),children:[(0,a.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,r.__)("Options that control shipping can be managed in your store settings.","woocommerce")}),(0,a.jsx)(E.ExternalLink,{href:`${R.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=options`,children:(0,r.__)("Manage shipping options","woocommerce")})," "]})}),(0,a.jsx)(A.A,{children:(0,a.jsx)(Fe,{className:o})})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});var ze=s(17230);const $e=JSON.parse('{"DD":"Coupon Form","XV":3}'),We=({className:e})=>{const t=(0,R.getSetting)("couponsEnabled",!0),{applyCoupon:o,isApplyingCoupon:r}=(0,De.k)("wc/cart");return t?(0,a.jsx)(X.TotalsWrapper,{className:e,children:(0,a.jsx)(je._i,{onSubmit:o,isLoading:r,instanceId:"coupon"})}):null};(0,o.registerBlockType)("woocommerce/cart-order-summary-coupon-form-block",{apiVersion:$e.XV,title:$e.DD,icon:{src:(0,a.jsx)(_.A,{icon:ze.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:o}=e,r=(0,t.useBlockProps)();return(0,a.jsx)("div",{...r,children:(0,a.jsx)(A.A,{children:(0,a.jsx)(We,{className:o})})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})});const Ge=({className:e,showRateAfterTaxName:t})=>{const{cartTotals:o}=(0,N.V)(),{isLoading:r}=(0,Be.n)();if((0,R.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(o.total_tax,10)<=0)return null;const s=(0,Ce.getCurrencyFromPriceResponse)(o);return(0,a.jsx)(X.TotalsWrapper,{className:e,children:(0,a.jsx)(X.TotalsTaxes,{showRateAfterTaxName:t,currency:s,values:o,showSkeleton:r})})},qe={showRateAfterTaxName:{type:"boolean",default:(0,R.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!1}}},Ue=JSON.parse('{"DD":"Taxes","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-taxes-block",{apiVersion:Ue.XV,title:Ue.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},attributes:qe,edit:({attributes:e,setAttributes:o})=>{const{className:s,showRateAfterTaxName:c}=e,n=(0,t.useBlockProps)(),i=(0,R.getSetting)("taxesEnabled"),l=(0,R.getSetting)("displayItemizedTaxes",!1),d=(0,R.getSetting)("displayCartPricesIncludingTax",!1);return(0,a.jsxs)("div",{...n,children:[(0,a.jsx)(t.InspectorControls,{children:i&&l&&!d&&(0,a.jsx)(E.PanelBody,{title:(0,r.__)("Taxes","woocommerce"),children:(0,a.jsx)(E.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show rate after tax name","woocommerce"),help:(0,r.__)("Show the percentage rate alongside each tax line in the summary.","woocommerce"),checked:c,onChange:()=>o({showRateAfterTaxName:!c})})})}),(0,a.jsx)(Ge,{className:s,showRateAfterTaxName:c})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})}),s(43580);const Ye=JSON.parse('{"DD":"Heading","XV":3}');(0,o.registerBlockType)("woocommerce/cart-order-summary-heading-block",{apiVersion:Ye.XV,title:Ye.DD,icon:{src:(0,a.jsx)(_.A,{icon:ke.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:o,setAttributes:r})=>{const{content:s="",className:c=""}=o,n=(0,t.useBlockProps)();return(0,a.jsx)("div",{...n,children:(0,a.jsx)("h2",{className:(0,e.A)(c,"wc-block-cart__totals-title"),children:(0,a.jsx)(t.PlainText,{className:"",value:s,onChange:e=>r({content:e}),style:{backgroundColor:"transparent"}})})})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save()})}),s(9184);var Ze=s(17554),Je=s(39940),Xe=(s(45446),s(52619)),Qe=s(58647);const Ke=(e,t,o=!0)=>{const{updateBlockAttributes:r,selectBlock:s}=(0,h.dispatch)("core/block-editor");r(e,{currentView:t}),o&&s((0,h.select)("core/block-editor").getBlock(e)?.innerBlocks.find(e=>e.name===t)?.clientId||e)},et={views:[],currentView:"",viewClientId:""},tt=(e,t=10,o=0)=>{const r=o+1;if(r>t)return et;const{getBlockAttributes:s,getBlockRootClientId:c}=(0,h.select)("core/block-editor"),n=c(e);if(null===n||""===n)return et;const i=s(n);return i?void 0!==i.editorViews?{views:i.editorViews,currentView:i.currentView||i.editorViews[0].view,viewClientId:n}:tt(n,t,r):et},ot=({currentView:e,views:o,clientId:s})=>{const{getBlockName:c,getSelectedBlockClientId:n,getBlockParentsByBlockName:i}=(0,h.useSelect)(e=>{const t=e("core/block-editor");return{getBlockName:t.getBlockName,getSelectedBlockClientId:t.getSelectedBlockClientId,getBlockParentsByBlockName:t.getBlockParentsByBlockName}},[]),l=n(),d=((e,t)=>t.find(t=>t.view===e))(e,o)||o[0],u=d.label;return(0,m.useLayoutEffect)(()=>{const t=l?c(l):null;if(!t||e===t)return;const r=o.map(e=>e.view);if(r.includes(t))return void Ke(s,t);const n=i(l,r),a=1===n.length?c(n[0]):null;a&&e!==a&&Ke(s,a,!1)},[s,e,c,i,l,o]),(0,a.jsx)(t.BlockControls,{children:(0,a.jsx)(E.ToolbarGroup,{children:(0,a.jsx)(E.ToolbarDropdownMenu,{label:(0,r.__)("Switch view","woocommerce"),text:u,icon:(0,a.jsx)(_.A,{icon:Qe.A,style:{marginRight:"8px"}}),controls:o.map(t=>({...t,title:(0,a.jsx)("span",{style:{marginLeft:"8px"},children:t.label}),isActive:t.view===e,onClick:()=>{Ke(s,t.view)}}))})})})};(0,Xe.hasFilter)("editor.BlockEdit","woocommerce/with-view-switcher")||(0,Xe.addFilter)("editor.BlockEdit","woocommerce/with-view-switcher",e=>t=>{const{clientId:o}=t,{views:r,currentView:s,viewClientId:c}=(0,h.useSelect)(e=>{const t=e("core/block-editor").getBlockAttributes(o);return t?.editorViews?{views:t.editorViews,currentView:t.currentView,viewClientId:o}:tt(o)});return 0===r.length?(0,a.jsx)(e,{...t}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ot,{currentView:s,views:r,clientId:c}),(0,a.jsx)(e,{...t})]})},11),(0,Ze.t)();const rt=["woocommerce/filled-cart-block","woocommerce/empty-cart-block"];s(77826);const st={currentView:{type:"string",default:"woocommerce/filled-cart-block",source:"readonly"},editorViews:{type:"object",default:[{view:"woocommerce/filled-cart-block",label:(0,r.__)("Filled Cart","woocommerce"),icon:(0,a.jsx)(_.A,{icon:w.A})},{view:"woocommerce/empty-cart-block",label:(0,r.__)("Empty Cart","woocommerce"),icon:(0,a.jsx)(_.A,{icon:he.A})}]},hasDarkControls:{type:"boolean",default:(0,R.getSetting)("hasDarkEditorStyleSupport",!1)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string",default:"wide"}};var ct=s(10628);const nt={title:(0,r.__)("Cart","woocommerce"),apiVersion:3,icon:{src:(0,a.jsx)(_.A,{icon:ct.A,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,r.__)("WooCommerce","woocommerce")],description:(0,r.__)("Shopping cart.","woocommerce"),supports:{align:["wide"],html:!1,multiple:!1},example:{viewportWidth:800},attributes:st,edit:({clientId:o,className:s,attributes:i,setAttributes:w})=>{const{hasDarkControls:_,currentView:b}=i,x=(0,g.H)(),f=(0,Ze.K)({className:(0,e.A)(s,"wp-block-woocommerce-cart",{"is-editor-preview":x})}),v=(0,m.useRef)((0,p.getQueryArg)(window.location.href,"focus"));return(0,m.useEffect)(()=>{"cart"!==v.current||(0,h.select)("core/block-editor").hasSelectedBlock()||((0,h.dispatch)("core/block-editor").selectBlock(o),(0,h.dispatch)("core/interface").enableComplementaryArea("core/edit-site","edit-site/block-inspector"))},[o]),(0,a.jsxs)("div",{...f,children:[(0,a.jsx)(t.InspectorControls,{children:(0,a.jsx)(Je.t,{attributes:i,setAttributes:w})}),(0,a.jsx)(c.A,{header:(0,r.__)("Cart Block Error","woocommerce"),text:(0,r.__)("There was an error whilst rendering the cart block. If this problem continues, try re-creating the block.","woocommerce"),showErrorMessage:!0,errorMessagePrefix:(0,r.__)("Error message:","woocommerce"),children:(0,a.jsx)(n.z,{previewData:{previewCart:d.B},currentView:b,children:(0,a.jsx)(y.Provider,{value:{hasDarkControls:_},children:(0,a.jsx)(u.SlotFillProvider,{children:(0,a.jsx)(l,{children:(0,a.jsx)(t.InnerBlocks,{allowedBlocks:rt,template:[["woocommerce/filled-cart-block",{},[]],["woocommerce/empty-cart-block",{},[]]],templateLock:"insert"})})})})})})]})},save:()=>(0,a.jsx)("div",{...t.useBlockProps.save({className:"is-loading"}),children:(0,a.jsx)(t.InnerBlocks.Content,{})}),transforms:{to:[{type:"block",blocks:["woocommerce/classic-shortcode"],transform:e=>(0,o.createBlock)("woocommerce/classic-shortcode",{shortcode:"cart",align:e.align},[])}]},deprecated:[{attributes:st,save:({attributes:o})=>(0,a.jsx)("div",{className:(0,e.A)("is-loading",o.className),children:(0,a.jsx)(t.InnerBlocks.Content,{})}),migrate:(e,t)=>{const{checkoutPageId:r,align:s}=e;return[e,[(0,o.createBlock)("woocommerce/filled-cart-block",{align:s},[(0,o.createBlock)("woocommerce/cart-items-block"),(0,o.createBlock)("woocommerce/cart-totals-block",{},[(0,o.createBlock)("woocommerce/cart-order-summary-block",{}),(0,o.createBlock)("woocommerce/cart-express-payment-block"),(0,o.createBlock)("woocommerce/proceed-to-checkout-block",{checkoutPageId:r}),(0,o.createBlock)("woocommerce/cart-accepted-payment-methods-block")])]),(0,o.createBlock)("woocommerce/empty-cart-block",{align:s},t)]]},isEligible:(e,t)=>!t.find(e=>"woocommerce/filled-cart-block"===e.name)}]};(0,o.registerBlockType)("woocommerce/cart",nt)})(),(()=>{"use strict";var e=s(74997),t=s(93450),o=s(10628);const r=JSON.parse('{"name":"woocommerce/cart-link","title":"Cart Link","icon":"cart","description":"Display a link to the cart.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","supports":{"interactivity":{"clientNavigation":true},"html":false,"multiple":false,"typography":{"fontSize":true},"color":{"text":false,"link":true},"spacing":{"padding":true}},"example":{"attributes":{"cartIcon":"cart","content":"Cart"}},"attributes":{"cartIcon":{"type":"string","default":"cart"},"content":{"type":"string","default":null}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var c=s(94715),n=s(91925),i=s(22510),a=s(45984),l=s(27723),d=s(56427),u=(s(9261),s(67905),s(8881)),m=s(10790);(0,e.registerBlockType)(r,{icon:{src:(0,m.jsx)(t.A,{icon:o.A,className:"wc-block-editor-components-block-icon"})},attributes:{...r.attributes},edit:({attributes:e,setAttributes:t})=>{const{cartIcon:o,content:r}=e,s=(0,c.useBlockProps)();return(0,m.jsxs)("div",{...s,children:[(0,m.jsx)(c.InspectorControls,{children:(0,m.jsx)(d.PanelBody,{title:(0,l.__)("Settings","woocommerce"),children:(0,m.jsxs)(d.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"wc-block-editor-mini-cart__cart-icon-toggle",isBlock:!0,label:(0,l.__)("Cart Icon","woocommerce"),value:o,onChange:e=>{t({cartIcon:e})},children:[(0,m.jsx)(d.__experimentalToggleGroupControlOption,{value:"cart",label:(0,m.jsx)(d.Icon,{size:32,icon:n.A})}),(0,m.jsx)(d.__experimentalToggleGroupControlOption,{value:"bag",label:(0,m.jsx)(d.Icon,{size:32,icon:i.A})}),(0,m.jsx)(d.__experimentalToggleGroupControlOption,{value:"bag-alt",label:(0,m.jsx)(d.Icon,{size:32,icon:a.A})})]})})}),(0,m.jsxs)("a",{className:"wc-block-cart-link",href:"#cart-pseudo-link",onClick:e=>e.preventDefault(),children:[(0,m.jsx)(u.A,{icon:o,productCountVisibility:"never"}),(0,m.jsx)(c.PlainText,{className:"wc-block-cart-link__text",value:null!==r?r:(0,l.__)("Cart","woocommerce"),__experimentalVersion:2,onChange:e=>t({content:e}),style:{backgroundColor:"transparent",resize:"none"}})]})]})},save:()=>null})})(),(()=>{"use strict";var e=s(4921),t=s(5573),o=s(10790);const r=(0,o.jsxs)(t.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none",children:[(0,o.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),(0,o.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"})]});var c=s(93450),n=s(74997),i=s(94715),a=s(96761),l=s(50929),d=s(35943),u=s(64534);const m={cc:[{method:{gateway:"credit-card",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]};var p=s(71e3),h=s(86087),g=s(93832),w=s(47143),_=s(3582),b=s(15703),x=s(16870),f=s(63877);const y={showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!1,cartPageId:0,showRateAfterTaxName:!1,showFormStepNumbers:!1,defaultFields:b.defaultFields},v=(0,h.createContext)(y),k=()=>{const e=(0,h.useContext)(v);return{...y,...e}};var j=s(26999),C=s(65676),S=(s(94793),s(27723)),A=s(56427);const N=()=>{const{defaultFields:e}=k(),t=(e,t)=>{["phone","company","address_2"].includes(e)&&["optional","required","hidden"].includes(t)&&(0,w.dispatch)(_.store).editEntityRecord("root","site",void 0,{[`woocommerce_checkout_${e}_field`]:t})},r=[{label:(0,S.__)("Optional","woocommerce"),value:"false"},{label:(0,S.__)("Required","woocommerce"),value:"true"}];return(0,o.jsx)(i.InspectorControls,{children:(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Address Fields","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Show or hide fields in the checkout address forms.","woocommerce")}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Company","woocommerce"),checked:!e.company.hidden,onChange:()=>{e.company.hidden?t("company","optional"):t("company","hidden")}}),!e.company.hidden&&(0,o.jsx)(A.RadioControl,{selected:e.company.required?"true":"false",options:r,onChange:e=>{t("company","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-company-field"}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Address line 2","woocommerce"),checked:!e.address_2.hidden,onChange:()=>{e.address_2.hidden?t("address_2","optional"):t("address_2","hidden")}}),!e.address_2.hidden&&(0,o.jsx)(A.RadioControl,{selected:e.address_2.required?"true":"false",options:r,onChange:e=>{t("address_2","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-address_2-field"}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Phone","woocommerce"),checked:!e.phone.hidden,onChange:()=>{e.phone.hidden?t("phone","optional"):t("phone","hidden")}}),!e.phone.hidden&&(0,o.jsx)(A.RadioControl,{selected:e.phone.required?"true":"false",options:r,onChange:e=>{t("phone","true"===e?"required":"optional")},className:"components-base-control--nested wc-block-components-require-phone-field"})]})})},P=JSON.parse('{"DD":"Checkout Fields","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-fields-block",{apiVersion:P.XV,title:P.DD,icon:{src:(0,o.jsx)(c.A,{icon:x.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:t,attributes:r})=>{const s=(0,i.useBlockProps)({className:(0,e.A)("wc-block-checkout__main",r?.className)}),c=(0,j.h)(p.innerBlockAreas.CHECKOUT_FIELDS),{showFormStepNumbers:n}=k(),a=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-method-block",{},[]],["woocommerce/checkout-pickup-options-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-additional-information-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return(0,C.B)({clientId:t,registeredBlocks:c,defaultTemplate:a}),(0,o.jsxs)(f.A,{...s,children:[(0,o.jsx)(N,{}),(0,o.jsx)("form",{className:(0,e.A)("wc-block-components-form wc-block-checkout__form",{"wc-block-checkout__form--with-step-numbers":n}),children:(0,o.jsx)(i.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:a,renderAppender:i.InnerBlocks.ButtonBlockAppender})})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(i.InnerBlocks.Content,{})})});var B=s(46328);s(6811);const I=JSON.parse('{"DD":"Checkout Totals","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-totals-block",{apiVersion:I.XV,title:I.DD,icon:{src:(0,o.jsx)(c.A,{icon:x.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:t,attributes:r})=>{const s=(0,i.useBlockProps)({className:(0,e.A)("wc-block-checkout__sidebar",r?.className)}),c=(0,j.h)(p.innerBlockAreas.CHECKOUT_TOTALS),n=[["woocommerce/checkout-order-summary-block",{},[]]];return(0,C.B)({clientId:t,registeredBlocks:c,defaultTemplate:n}),(0,o.jsx)(B.A,{...s,children:(0,o.jsx)(i.InnerBlocks,{allowedBlocks:c,templateLock:!1,template:n,renderAppender:i.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(i.InnerBlocks.Content,{})})});var T=s(53987),E=s(92705),R=s(14656);const D=({children:e,stepHeadingContent:t})=>(0,o.jsxs)("div",{className:"wc-block-components-checkout-step__heading",children:[(0,o.jsx)(R.Title,{className:"wc-block-components-checkout-step__title",headingLevel:"2",children:e}),!!t&&(0,o.jsx)("span",{className:"wc-block-components-checkout-step__heading-content",children:t})]}),L=({attributes:t,setAttributes:r,className:s="",children:c})=>{const{showFormStepNumbers:n}=k(),{title:a="",description:l=""}=t,d=(0,i.useBlockProps)({className:(0,e.A)("wc-block-components-checkout-step",s,{"wc-block-components-checkout-step--with-step-number":n})});return(0,o.jsxs)("div",{...d,children:[(0,o.jsxs)("div",{className:"wc-block-components-checkout-step__heading-container",children:[(0,o.jsx)(D,{children:(0,o.jsx)(i.PlainText,{className:"",value:a,onChange:e=>r({title:e}),style:{backgroundColor:"transparent"}})}),(0,o.jsx)("p",{className:"wc-block-components-checkout-step__description",children:(0,o.jsx)(i.PlainText,{className:l?"":"wc-block-components-checkout-step__description-placeholder",value:l,placeholder:(0,S.__)("Optional text for this form step.","woocommerce"),onChange:e=>r({description:e}),style:{backgroundColor:"transparent"}})})]}),(0,o.jsx)("div",{className:"wc-block-components-checkout-step__content",children:c})]})};s(62862);const O=({block:e})=>{const{"data-block":t}=(0,i.useBlockProps)(),r=(0,j.h)(e);return(0,C.B)({clientId:t,registeredBlocks:r}),(0,o.jsx)("div",{className:"wc-block-checkout__additional_fields",children:(0,o.jsx)(i.InnerBlocks,{allowedBlocks:r})})},M=()=>(0,o.jsx)(i.InnerBlocks.Content,{});var V=s(51609);function F(e){(0,V.useEffect)(e,[])}s(41540),"undefined"!=typeof window?V.useLayoutEffect:V.useEffect;var H=s(87853),z=s(8840),$=s(90341),W=s(18537),G=s(73993),q=(s(44249),s(55414)),U=s(47594);s(48306);const Y=t=>{const{onChange:r,options:s,label:n,value:i="",className:a,size:l,errorId:d,required:u,errorMessage:m=(0,S.__)("Please select a valid option","woocommerce"),placeholder:g,..._}=t,b=(0,h.useCallback)(e=>{r(e.target.value)},[r]),x=(0,p.getFieldLabel)(n),f=(0,h.useMemo)(()=>({value:"",label:g??(0,S.sprintf)( // translators: %s will be label of the field. For example "country/region". // translators: %s will be label of the field. For example "country/region". (0,S.__)("Select a %s","woocommerce"),x),disabled:!!u}),[g,u,x]),y=(0,h.useId)(),v=_.id||`wc-blocks-components-select-${y}`,k=d||v,j=(0,h.useMemo)(()=>[f].concat(s),[f,s]),{setValidationErrors:C,clearValidationError:A}=(0,w.useDispatch)(U.validationStore),{error:N,validationErrorId:P}=(0,w.useSelect)(e=>{const t=e(U.validationStore);return{error:t.getValidationError(k),validationErrorId:t.getValidationErrorId(k)}},[k]);(0,h.useEffect)(()=>(!u||i?A(k):C({[k]:{message:m,hidden:!0}}),()=>{A(k)}),[A,i,k,m,u,C]);const B=(0,w.useSelect)(e=>e(U.validationStore).getValidationError(k||"")||{hidden:!0},[k]);return(0,o.jsxs)("div",{className:(0,e.A)(a,{"has-error":!B.hidden}),children:[(0,o.jsx)("div",{className:"wc-blocks-components-select",children:(0,o.jsxs)("div",{className:"wc-blocks-components-select__container",children:[(0,o.jsx)("label",{htmlFor:v,className:"wc-blocks-components-select__label",children:n}),(0,o.jsx)("select",{className:"wc-blocks-components-select__select",id:v,size:void 0!==l?l:1,onChange:b,value:i,"aria-invalid":!(!N?.message||N?.hidden),"aria-errormessage":P,..._,children:j.map(e=>(0,o.jsx)("option",{value:e.value,"data-alternate-values":`[${e.label}]`,disabled:void 0!==e.disabled&&e.disabled,children:e.label},e.value))}),(0,o.jsx)(c.A,{className:"wc-blocks-components-select__expand",icon:q.A})]})}),(0,o.jsx)(R.ValidationInputError,{propertyName:k})]})},Z=({className:t,countries:r,id:s,errorId:c,label:n,onChange:i,value:a="",autoComplete:l="off",required:d=!1})=>{const u=(0,h.useMemo)(()=>{const e=Object.entries(r).map(([e,t])=>({value:e,label:(0,W.decodeEntities)(t)})),t="string"==typeof a?a:"";if(t&&!(0,G.objectHasProp)(r,t)){const o=(0,b.getSettingWithCoercion)("countries",{},G.isObject)[t];e.push({value:t,label:(0,W.decodeEntities)((0,G.isString)(o)&&o?o:t),disabled:!0})}return e},[r,a]);return(0,o.jsx)(Y,{className:(0,e.A)(t,"wc-block-components-country-input"),id:s,errorId:c,label:n||"",onChange:i,options:u,value:a,required:d,autoComplete:l})};var J=s(36352);const X=e=>{const{...t}=e;return(0,o.jsx)(Z,{countries:J.FS,...t})},Q=e=>(0,o.jsx)(Z,{countries:J.FS,...e}),K=(e,t)=>{const o=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return o?o.value:""},ee=({className:t,id:r,states:s,country:c,label:n,onChange:i,autoComplete:a="off",value:l="",required:d=!1})=>{const u=s[c],m=(0,h.useMemo)(()=>u&&Object.keys(u).length>0?Object.keys(u).map(e=>({value:e,label:(0,W.decodeEntities)(u[e])})):[],[u]),p=(0,h.useCallback)(e=>{const t=m.length>0?K(e,m):e;t!==l&&i(t)},[i,m,l]),g=(0,h.useRef)(l);return(0,h.useEffect)(()=>{g.current!==l&&(g.current=l)},[l]),(0,h.useEffect)(()=>{if(m.length>0&&g.current){const e=K(g.current,m);e!==g.current&&p(e)}},[m,p]),m.length>0?(0,o.jsx)(Y,{className:(0,e.$)(t,"wc-block-components-state-input"),options:m,label:n||"",id:r,onChange:p,value:l,autoComplete:a,required:d}):(0,o.jsx)(R.ValidatedTextInput,{className:t,id:r,label:n,onChange:p,autoComplete:a,value:l,required:d})},te=e=>{const{...t}=e;return(0,o.jsx)(ee,{states:J.xj,...t})},oe=e=>(0,o.jsx)(ee,{states:J.xj,...e});var re=s(46151),se=s(13817),ce=s(29491),ne=s(94878),ie=s(20923),ae=s.n(ie),le=s(11824),de=s.n(le),ue=s(51348);s(32770);const me=({field:e,props:t,onChange:r,value:s})=>{const c=e?.required??!1,n=(0,se.Z)(c),[i,a]=(0,h.useState)(()=>Boolean(s)||c),l=(0,p.getFieldLabel)(e.label);(0,h.useEffect)(()=>{n!==c&&a(Boolean(s)||c)},[s,n,c]);const d=(0,h.useCallback)(e=>{r(e),a(!0)},[r]);return(0,h.useEffect)(()=>{s&&a(!0)},[s]),(0,o.jsx)(h.Fragment,{children:i?(0,o.jsx)(R.ValidatedTextInput,{...t,type:e.type,label:c?e.label:e.optionalLabel,className:"wc-block-components-address-form__address_2",value:s,onChange:e=>r(e)}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ue.$,{render:(0,o.jsx)("span",{}),className:"wc-block-components-address-form__address_2-toggle",onClick:()=>a(!0),children:(0,S.sprintf)( // translators: %s: address 2 field label. // translators: %s: address 2 field label. (0,S.__)("+ Add %s","woocommerce"),l)}),(0,o.jsx)("input",{type:"text",tabIndex:-1,className:"wc-block-components-address-form__address_2-hidden-input","aria-hidden":"true","aria-label":e.label,autoComplete:t?.autoComplete,id:t?.id,value:s,onChange:e=>d(e.target.value)})]})})},pe=["billing","shipping"],he=(e,t)=>{if("string"!=typeof e)return;const o=e.trim();if(!o)return;const r=o.toLowerCase();if("on"===r||"off"===r)return o;if(o.includes(" "))return o;const s="string"==typeof t?t.trim().toLowerCase():"";return pe.includes(s)?`section-${s} ${s} ${o}`:o},ge=(e,t,o)=>({id:`${t}-${e?.key}`.replaceAll("/","-"),errorId:`${o}_${e?.key}`,name:`${o}_${e?.key}`,label:(e?.required?e?.label:e?.optionalLabel)||"",autoCapitalize:e?.autocapitalize,autoComplete:he(e?.autocomplete,o),errorMessage:e?.errorMessage||"",required:e?.required,placeholder:e?.placeholder,className:`wc-block-components-address-form__${e?.key}`.replaceAll("/","-"),...e?.attributes}),we=(e,t,o)=>{const r=t.find(t=>t.key===e),s=(0,G.objectHasProp)(o,e)?o[e]:"";return r?{field:{...r,key:e},value:s}:null},_e=(e,t)=>(0,G.isObject)(e[t])&&Object.keys(e[t]).length>0;s(64927);var be=s(42435);function xe(e,t){const r=(0,W.decodeEntities)(e),s=[];let c=0;return Array.isArray(t)?(t.filter(e=>e&&"number"==typeof e.offset&&"number"==typeof e.length&&e.offset>=0&&e.length>0&&e.offset+e.length<=r.length).forEach((e,t)=>{e.offset>c&&s.push(r.slice(c,e.offset)),s.push((0,o.jsx)("strong",{children:r.slice(e.offset,e.offset+e.length)},`match-${t}`)),c=e.offset+e.length}),c<r.length&&s.push(r.slice(c)),s):[r]}const fe=({suggestions:e,branding:t,selectedSuggestion:r,addressType:s,onSuggestionClick:c})=>{if(!e)return null;const n=`address-suggestions-${s}-list`;return(0,o.jsxs)("div",{className:"wc-block-components-address-autocomplete-suggestions",role:"region","aria-live":"polite",children:[(0,o.jsx)("ul",{className:"suggestions-list",id:n,role:"listbox","aria-label":"Address suggestions",children:e.slice(0,5).map((e,t)=>(0,o.jsx)("li",{id:`suggestion-item-${s}-${t}`,className:"wc-block-components-address-autocomplete-suggestion"+(r===t?" active":""),role:"option",tabIndex:-1,"aria-selected":r===t,onClick:()=>c(e.id),style:{cursor:"pointer"},children:xe(e?.label,e?.matchedSubstrings||[])},e.id))}),t?(0,o.jsx)("div",{className:"woocommerce-address-autocomplete-branding",dangerouslySetInnerHTML:{__html:(0,be.sanitizeHTML)(t,{tags:["a","img","span","br"],attr:["href","target","rel","src","alt","style","width","height"]})}}):null]})},ye=(0,b.getSettingWithCoercion)("addressAutocompleteProviders",[],e=>!!Array.isArray(e)&&e.every(e=>"string"==typeof e.name&&"string"==typeof e.id&&"string"==typeof e.branding_html));function ve(e){const{country:t,registeredProviders:o}=(0,w.useSelect)(t=>{const o="shipping"===e?"shippingAddress":"billingAddress";return{country:t("wc/store/cart").getCartData()?.[o]?.country,registeredProviders:t("wc/store/checkout").getRegisteredAutocompleteProviders()}},[e]),{setActiveAddressAutocompleteProvider:r}=(0,w.useDispatch)("wc/store/checkout");(0,h.useEffect)(()=>{if(!window?.wc?.addressAutocomplete?.providers)return r("",e),void(window?.wc?.addressAutocomplete?.activeProvider&&(window.wc.addressAutocomplete.activeProvider[e]=null));for(const o of ye){const s=window?.wc?.addressAutocomplete?.providers?.[o.id];if(s&&s.canSearch(t))return r(s.id,e),void(window.wc.addressAutocomplete.activeProvider[e]=s)}r("",e),window?.wc?.addressAutocomplete?.activeProvider&&(window.wc.addressAutocomplete.activeProvider[e]=null)},[e,t,r,o])}const ke=({addressType:e,id:t,...r})=>{ve(e);const{useShippingAsBilling:s,useBillingAsShipping:c}=(0,E.C)(),n=(0,h.useRef)(null),i=(0,h.useRef)(null),a=(0,b.getSettingWithCoercion)("addressAutocompleteProviders",[],e=>!!Array.isArray(e)&&e.every(e=>"string"==typeof e.name&&"string"==typeof e.id&&"string"==typeof e.branding_html)),{country:l,registeredProviders:d}=(0,w.useSelect)(t=>{const o=t(U.cartStore),r=t(U.checkoutStore),s="shipping"===e?"shippingAddress":"billingAddress",c=o.getCartData();return{country:c?.[s]?.country||"",registeredProviders:r.getRegisteredAutocompleteProviders()||[]}},[e]),{setActiveAddressAutocompleteProvider:u}=(0,w.useDispatch)(U.checkoutStore),{setBillingAddress:m,setShippingAddress:p}=(0,w.useDispatch)(U.cartStore),[g,_]=(0,h.useState)(""),x=(0,w.useSelect)(t=>t(U.checkoutStore).getActiveAutocompleteProvider(e),[e]);(0,h.useEffect)(()=>{if(!window?.wc?.addressAutocomplete?.providers)return;const e=a.find(e=>e.id===x)?.branding_html||"";_(e)},[l,d,u,e,a,x]);const[f,y]=(0,h.useState)([]),[v,k]=(0,h.useState)(""),[j,C]=(0,h.useState)(!1),S=(0,h.useRef)(null),A=(0,h.useRef)(!1),N=(0,h.useRef)(null),P=(0,h.useRef)(!1),B=(0,h.useRef)(0);(0,h.useEffect)(()=>{if(j||v.length<3||S.current)return void y([]);const t=window?.wc?.addressAutocomplete?.activeProvider?.[e];if(t){const e=++B.current;t.search(v,l).then(t=>{if(e!==B.current)return;const o=n.current?.inputRef?.current;o&&function(e){try{return e.matches(":-webkit-autofill")}catch{return!1}}(o)?y([]):t&&t.length?y(t):y([])}).catch(()=>{y([])})}},[v]),(0,h.useEffect)(()=>()=>{S.current&&clearTimeout(S.current),N.current&&clearTimeout(N.current)},[]),(0,h.useEffect)(()=>{const e=n.current?.inputRef?.current;if(e)return i.current=new MutationObserver(()=>{"on"===e.getAttribute("data-disable-autocomplete")?(e.setAttribute("data-1p-ignore","true"),e.setAttribute("autocomplete","none")):(e.removeAttribute("data-1p-ignore"),r.autoComplete?e.setAttribute("autocomplete",r.autoComplete):e.removeAttribute("autocomplete"));const t=e.parentElement;if(t){const o=e.ownerDocument.activeElement===e,r=e.selectionStart,s=e.selectionEnd;t.appendChild(t.removeChild(e)),o&&(e.focus(),null!==r&&null!==s&&e.setSelectionRange(r,s))}}),i.current.observe(e,{attributes:!0,attributeFilter:["data-disable-autocomplete"]}),()=>{i.current&&(i.current.disconnect(),i.current=null)}},[r.autoComplete]),(0,h.useEffect)(()=>{const e=n.current?.inputRef?.current;if(!e)return;const t=e=>{const t=e,{inputType:o}=t;"insertReplacementText"===o?P.current=!0:o&&(A.current=!0,N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{A.current=!1},200))};return e.addEventListener("input",t),()=>{e.removeEventListener("input",t)}},[]);const[I,T]=(0,h.useState)(-1),D=`address-suggestions-${e}-list`,L=I>=0?`suggestion-item-${e}-${I}`:void 0;return(0,o.jsxs)("div",{className:"wc-block-components-address-autocomplete-container",children:[(0,o.jsx)(R.ValidatedTextInput,{...r,id:t,ref:n,onChange:e=>{if(r.onChange(e),!j&&!S.current)return P.current?(P.current=!1,k(""),void y([])):void(A.current&&k(e))},onKeyDown:t=>{if(0!==f.length)if("ArrowDown"===t.key)t.preventDefault(),T(e=>e<f.length-1?e+1:0);else if("ArrowUp"===t.key)t.preventDefault(),T(e=>e>0?e-1:f.length-1);else if("Enter"===t.key){if(t.preventDefault(),I>=0&&I<f.length){const t=f[I],o=window?.wc?.addressAutocomplete?.activeProvider?.[e];o&&(C(!0),S.current=setTimeout(()=>{S.current=null},1e3),o.select(t.id,l).then(t=>{"shipping"===e?(p(t),s&&m(t)):(m(t),c&&p(t))}).finally(()=>{C(!1),y([]),T(-1)}))}}else"Escape"===t.key&&(y([]),T(-1))},onBlurCapture:()=>{setTimeout(()=>{y([]),T(-1)},200)},"aria-expanded":f.length>0,"aria-owns":f.length>0?D:void 0,"aria-activedescendant":L,"aria-autocomplete":"list",role:"combobox","data-disable-autocomplete":v.length>=3?"on":"off",icon:a.length>0?(0,o.jsx)("div",{className:"wc-block-components-address-autocomplete-icon","aria-hidden":"true"}):null}),v.length>=3&&f.length>0?(0,o.jsx)(fe,{selectedSuggestion:I,suggestions:f,branding:g,addressType:e,onSuggestionClick:async t=>{const o=window?.wc?.addressAutocomplete?.activeProvider?.[e];if(o){C(!0),S.current=setTimeout(()=>{S.current=null},1e3);try{const r=await o.select(t,l);"shipping"===e?(p(r),s&&m(r)):(m(r),c&&p(r))}finally{C(!1),y([]),T(-1)}}}}):null]})},je=({formId:e,address1:t,address2:r,addressType:s,onChange:c})=>{const n=ge(t.field,e,s),i=ge(r.field,e,s),a="billing"===s||"shipping"===s,l=(0,b.getSettingWithCoercion)("addressAutocompleteProviders",[],e=>!!Array.isArray(e)&&e.every(e=>"string"==typeof e.name&&"string"==typeof e.id&&"string"==typeof e.branding_html)).length>0&&a,d=l?ke:R.ValidatedTextInput;return(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)(d,{...n,type:t.field.type,...l?{addressType:s}:{},className:"wc-block-components-address-form__address_1",value:t.value,onChange:e=>c("address_1",e)}),r.field&&!r.field.hidden&&(0,o.jsx)(me,{field:r.field,props:i,onChange:e=>c("address_2",e),value:r.value})]})};var Ce=s(38443);const Se=globalThis.Temporal;function Ae(e){return(t,o,r)=>{const s=function(e){return"string"==typeof e?{roundingMode:e}:e||{}}(r);if(s.roundingMode)return t.until(o,{...s,largestUnit:e,smallestUnit:e})[e];const c=t.until(o,{...s,largestUnit:e});if(function(e){return"hours"===e||"minutes"===e||"seconds"===e||"milliseconds"===e||"microseconds"===e||"nanoseconds"===e}(e))return c.total(e);const n=!("day"in t)&&"toPlainDate"in t?t.toPlainDate({day:1}):t;return c.total({unit:e,relativeTo:n})}}Ae("years"),Ae("months"),Ae("weeks"),Ae("days"),Ae("hours"),Ae("minutes"),Ae("seconds"),Ae("milliseconds"),Ae("microseconds"),Ae("nanoseconds");const Ne=(e,t,o,r)=>Pe(e,t)+`; must be between ${o}-${r}`,Pe=(e,t)=>`Invalid ${e}: ${t}`;function Be(e,t){return Math.trunc(function(e,t="number"){if("bigint"==typeof e)throw new TypeError((e=>`Cannot convert bigint to ${e}`)(t));if(e=Number(e),!Number.isFinite(e))throw new RangeError(((e,t)=>`Non-finite ${e}: ${t}`)(t,e));return e}(e,t))||0}function Ie(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function Te(e){if(!Ie(e))throw new TypeError("Invalid object");return e}const Ee=Pe,Re="Invalid leap month",De="Out-of-bounds date",Le=e=>`Cannot parse: ${e}`,Oe=e=>`Invalid substring: ${e}`,Me=function(e,t,o){return Math.min(Math.max(e,t),o)};function Ve(e){throw new RangeError(e)}function Fe(e){throw new TypeError(e)}function He(e,t,o,r,s){return ze(t,((e,t)=>{const o=e[t];return void 0===o&&Fe(`Missing ${t}`),o})(e,t),o,r,s)}function ze(e,t,o,r,s,c){const n=Me(t,o,r);return s&&t!==n&&Ve(((e,t,o,r,s)=>s?Ne(e,s[t],s[o],s[r]):Ne(e,t,o,r))(e,t,o,r,c)),n}function $e(e,t){const o={};for(const r in t)o[r]=e(t[r],r);return o}function We(e){const t={};for(const o of e)t[o]=e=>e[o];return t}function Ge(e,t,o=Object.create(null)){for(const r of e)o[r]=t[r];return o}function qe(e,...t){return(...o)=>e(...t,...o)}function Ue(){}function Ye(e){return new RegExp(`^${e}$`,"i")}function Ze(e){return parseInt(e.padEnd(9,"0"))}function Je(e){return e&&"+"!==e?-1:1}function Xe(e,t){return String(t).padStart(e,"0")}const Qe=qe(Xe,2);function Ke(e,t){return[Math.floor(e/t),et(e,t)]}function et(e,t){return(e%t+t)%t}function tt(e,t){return Math.trunc(e/t)||0}function ot(e,t){return e%t||0}const rt=void 0;function st(e){return e===rt?"iso8601":0===e?"gregory":e.id}const ct={nanosecond:0,microsecond:1,millisecond:2,second:3,minute:4,hour:5,day:6,week:7,month:8,year:9},nt=Object.keys(ct),it=1e3,at=1e6,lt=1e9,dt=6e10,ut=36e11,mt=864e11,pt=[1,it,at,lt,dt,ut,mt],ht=BigInt(it),gt=BigInt(at),wt=BigInt(lt),_t=BigInt(dt),bt=BigInt(ut),xt=BigInt(mt),ft=["day","month","year"];function yt(e){return vt(e.year,e.month,e.day)}function vt(e,t=1,o=1){const r=t-1;return e+=Math.floor(r/12),t=et(r,12),Date.UTC(e%400-400,t,0)/864e5+146097*(tt(e,400)+1)+o}function kt(e){const t=new Date(864e5*et(e,146097));return{year:t.getUTCFullYear()+400*Math.floor(e/146097),month:t.getUTCMonth()+1,day:t.getUTCDate()}}function jt(e,t){switch(t){case 2:return Ct(e)?29:28;case 4:case 6:case 9:case 11:return 30}return 31}function Ct(e){return e%4==0&&(e%100!=0||e%400==0)}function St(e){return et(vt(e.year,e.month,e.day)+4,7)||7}function At(e){return vt(e.year,e.month,e.day)-vt(e.year)+1}function Nt(e){let t=e.year,o=Math.floor((At(e)-St(e)+10)/7),r=Pt(t);return o<1?o=r=Pt(--t):o>r&&(o=1,r=Pt(++t)),{weekOfYear:o,yearOfWeek:t,Be:r}}function Pt(e){const t=St({year:e,month:1,day:1});return 4===t||3===t&&Ct(e)?53:52}function Bt(e){return function(e,t){const{year:o}=e,r=He(e,"month",1,12,t);He(e,"day",1,jt(o,r),t)}(e,1),e}function It(e,t){return e?e.ae(t):t}function Tt(e,t,o){return e?e.L(t,o):function(e){return[e,0]}(o)}function Et(e,t){return 0===e?function({year:e}){return e<1?{era:"bce",eraYear:1-e}:{era:"ce",eraYear:e}}(t):e&&e.h?.(t)||{}}function Rt(e,t,o,r){return e?e.de(t,o,r):function(e,t,o){return{year:e,month:t,day:o}}(t,o,r)}function Dt(e,t){return e?e.j(t):12}function Lt(e,t,o){return e?e.o(t,o):jt(t,o)}function Ot(e,t){const{year:o,month:r}=It(e,t),[s,c]=Tt(e,o,r);return function(e,t){return"M"+Qe(e)+(t?"L":"")}(s,c)}function Mt(e,t){const{year:o}=It(e,t);return e?e.q(o):Ct(o)}function Vt(e,t){const{year:o}=It(e,t);return Dt(e,o)}function Ft(e,t){const{year:o,month:r}=It(e,t);return Lt(e,o,r)}function Ht(e,t){const{year:o}=It(e,t);return e?e.i(o):function(e){return Ct(e)?366:365}(o)}const zt=nt.map(e=>e+"s"),$t=We(zt),Wt=zt.slice(6).slice(1),Gt=qe(qt,"string");function qt(e,t,o=e){return typeof t!==e&&Fe(Ee(o,t)),t}const Ut={constrain:0,reject:1},Yt={auto:0,never:1,critical:2,always:3};function Zt(e,t,o,r=0){const s=o[e];if(void 0===s)return r;const c=("symbol"==typeof(i=s)&&Fe("Cannot convert Symbol to string"),String(i)),n=t[c];var i,a;return void 0===n&&Ve((a=t,Pe(e,c)+"; must be "+Object.keys(a).join())),n}Math.floor,Math.ceil,Math.trunc;const Jt=qe(Zt,"overflow",Ut),Xt=qe(Zt,"calendarName",Yt);function Qt(e){return void 0===e?0:Jt(Te(e))}const Kt=BigInt(1e8)*xt,eo=BigInt(-1e8)*xt,to=eo-xt;function oo(e,t=1){return function(e,t=1){(e<(t?to:eo)||e>Kt)&&Ve(De)}(function(e){return BigInt(yt(e))*xt}(e),t),e}function ro(e,t){return Ge(ft,e,{calendar:t})}function so(e,t,o,r){if(o.years||o.months||o.weeks)return function(e,t,o,r){let s,{years:c,months:n,weeks:i,days:a}=o;if(a+=Number(mo(o)/xt),c||n)s=function(e,t,o,r,s){const c=It(e,t);let{year:n,month:i,day:a}=c;if(o){const[t,r]=Tt(e,n,i);n+=o,i=function(e,t,o,r,s){if(o){const o=e?e.l:void 0;return void 0!==r&&(o<0||r===t+1)?r:(1===s&&Ve(Re),o<0?-o:t)}return function(e,t,o){return e+(t||o&&e>=o?1:0)}(t,0,r)}(e,t,r,e?e.p(n):void 0,s),i=ze("month",i,1,Dt(e,n),s)}if(r){const t=e?e.K(n,i,r):function(e,t,o){return e+=tt(o,12),(t+=ot(o,12))<1?(e--,t+=12):t>12&&(e++,t-=12),{year:e,month:t}}(n,i,r);({year:n,month:i}=t)}return a=ze("day",a,1,Lt(e,n,i),s),Rt(e,n,i,a)}(e,t,c,n,r);else{if(!i&&!a)return t;s=t}return(i||a)&&(s=co(s,7*i+a)),oo(s)}(e,t,o,Qt(r));Qt(r);const s=o.days+Number(mo(o)/xt);return s?oo(co(t,s)):t}function co(e,t){return t?kt(yt(e)+t):e}function no(e,t,o){const r={};for(let s=t;s>=0;s--){const t=pt[s];r[o[s]]=tt(e,t),e=ot(e,t)}return r}function io(e){const t={};for(const o of zt)t[o]=-1*e[o]||0;return t}function ao(e,t=zt){let o=0;for(const r of t){const t=Math.sign(e[r]);t&&(o&&o!==t&&Ve("Cannot mix duration signs"),o=t)}return o}function lo(e){for(const t of Wt)ze(t,e[t],-4294967295,4294967295,1);const t=function(e){return BigInt(e.days)*xt+mo(e)}(e);return uo(Number(t/wt)),e}function uo(e){Number.isSafeInteger(e)||Ve("Out-of-bounds duration")}function mo(e){return BigInt(e.hours)*bt+BigInt(e.minutes)*_t+po(e)}function po(e){return BigInt(e.seconds)*wt+BigInt(e.milliseconds)*gt+BigInt(e.microseconds)*ht+BigInt(e.nanoseconds)}WeakMap;function ho(e){return Xt(function(e){return void 0===e?Object.create(null):Te(e)}(e))}function go(e,t){const{sign:o}=e,r=-1===o?io(e):e,{hours:s,minutes:c}=r,n=po(r),i=Number(n/wt),a=Number(n%wt);uo(i);const l=function(e,t){let o=Xe(9,e);return o=void 0===t?o.replace(fo,""):o.slice(0,t),o?"."+o:""}(a,t),d=t>=0||!o||l;return(o<0?"-":"")+"P"+wo({Y:_o(r.years),M:_o(r.months),W:_o(r.weeks),D:_o(r.days)})+(s||c||i||d?"T"+wo({H:_o(s),M:_o(c),S:_o(i,d)+l}):"")}function wo(e){const t=[];for(const o in e){const r=e[o];r&&t.push(r,o)}return t.join("")}function _o(e,t){if(!e&&!t)return"";const o=Object.create(null);return o.useGrouping=0,e.toLocaleString("fullwide",o)}function bo(e){return function(e){const{year:t}=e;return(t<0||t>9999?(o=t,(o<0?"-":"+")+Xe(6,Math.abs(t))):Xe(4,t))+"-"+Qe(e.month);var o}(e)+"-"+Qe(e.day)}function xo(e,t){return"["+(t?"!":"")+"u-ca="+e+"]"}Intl.DateTimeFormat;const fo=/0+$/;function yo(e){return`(\\d{2})(?:(:?)(\\d{2})(?:\\${e}(\\d{2})(?:[.,](\\d{1,9}))?)?)?`}yo(8),yo(15),yo(2),yo(9);const vo=Ye("([+-])?P(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(?:T(?!$)(?:(\\d+)(?:[.,](\\d{1,9}))?H)?(?:(\\d+)(?:[.,](\\d{1,9}))?M)?(?:(\\d+)(?:[.,](\\d{1,9}))?S)?)?");function ko(e,t,o,...r){return Object.defineProperties(t,(c=1,$e(e=>({value:e,configurable:1,writable:!c}),{name:e}))),Object.defineProperties(t.prototype,(s="Temporal."+e,{[Symbol.toStringTag]:{value:s,configurable:1}})),Object.defineProperties(t.prototype,$e(e=>({get(){return e(o(this))},configurable:1}),Object.assign({},...r))),t;var s,c}const jo="noop"===Ue.name?e=>{Object.defineProperty(e,"_str_",{value:e.toJSON()})}:Ue;function Co(){Fe("Invalid calling context")}function So(){Fe("Cannot use valueOf")}const Ao={era:e=>Et(e.calendar,e).era,eraYear:e=>Et(e.calendar,e).eraYear,year:e=>It(e.calendar,e).year,month:e=>It(e.calendar,e).month,monthCode:e=>Ot(e.calendar,e),day:e=>It(e.calendar,e).day},No={daysInMonth:e=>Ft(e.calendar,e),daysInYear:e=>Ht(e.calendar,e),monthsInYear:e=>Vt(e.calendar,e),inLeapYear:e=>Mt(e.calendar,e)},Po={dayOfWeek:e=>St(e),dayOfYear:e=>function(e,t){if(!e)return At(t);const{year:o}=It(e,t),r=Rt(e,o,1,1);return yt(t)-yt(r)+1}(e.calendar,e),weekOfYear:e=>function(e,t){return e===rt?Nt(t).weekOfYear:void 0}(e.calendar,e),yearOfWeek:e=>function(e,t){return e===rt?Nt(t).yearOfWeek:void 0}(e.calendar,e),daysInWeek:()=>7,daysInMonth:e=>Ft(e.calendar,e),daysInYear:e=>Ht(e.calendar,e),monthsInYear:e=>Vt(e.calendar,e),inLeapYear:e=>Mt(e.calendar,e)};function Bo(e){return We(Object.keys(e))}const Io=Bo($t),To=Bo(Ao);Bo(No),Bo(Po);const Eo="PlainDateRecord",Ro="DurationRecord",Do=new WeakMap,Lo=new WeakMap,Oo=new WeakMap;function Mo(e){return function(e){return Do.get(e)}(e)||Co()}function Vo(e){return function(e){return Lo.get(e)}(e)||Co()}function Fo(e,t){Lo.set(e,t)}function Ho(e){return function(e){return Oo.get(e)}(e)||Co()}function zo(e,t){Oo.set(e,t)}function $o(e){return Mo(e).id}function Wo(e){const t=Mo(e).ue;return t||Ve(`Unknown calendar ${$o(e)}; might need getExotic or getAny`),t}const Go=Ho,qo=ko(Ro,class{toJSON(){return Go(this).toJSON()}valueOf(){return Go(this).valueOf()}},Go,Io);function Uo(e){if(void 0!==e)return Wo(t=e),$o(t);var t}const Yo=Vo,Zo=ko(Eo,class{get calendarId(){return Yo(this).calendarId}toJSON(){return Yo(this).toJSON()}valueOf(){return Yo(this).valueOf()}},Yo,To);function Jo(e){const t=Object.create(Zo.prototype);return Fo(t,e),jo(t),t}const Xo=Ho,Qo=ko(Ro,class{toJSON(){return go(Xo(this),void 0)}valueOf(){return So()}},Xo,$t);function Ko(e){return void 0===e?rt:Wo(e)()}const er=Vo,tr=ko(Eo,class{get calendarId(){return st(er(this).calendar)}toJSON(){return bo(e=er(this))+(e.calendar===rt?"":xo(st(e.calendar),0));var e}valueOf(){return So()}},er,Ao);function or(e){const t=Object.create(tr.prototype);return Fo(t,e),jo(t),t}const rr=Se?function(e){return function(e){const t=Object.create(qo.prototype);return zo(t,e),jo(t),t}(Se.Duration.from(e))}:function(e){return function(e){const t=Object.create(Qo.prototype);return zo(t,e),jo(t),t}(function(e){const t=vo.exec(Gt(e));return t||function(e){Ve(Le(e))}(e),o=lo((e=>{let t=0,o=0,r=0,s={years:c(e[2]),months:c(e[3]),weeks:c(e[4]),days:c(e[5]),hours:c(e[6],e[7],5),minutes:c(e[8],e[9],4),seconds:c(e[10],e[11],3),...no(r,2,zt)};return t||Ve("No valid fields: "+zt.join()),Je(e[1])<0&&(s=io(s)),s;function c(e,s,c){let n=0,i=0;return c&&([n,r]=Ke(r,pt[c])),void 0!==e&&(o&&Ve(Oe(e)),i=(e=>{const t=parseInt(e);return Number.isFinite(t)||Ve(Oe(e)),t})(e),t=1,s&&(r=Ze(s)*(pt[c]/lt),o=1)),n+i}})(t)),Ge(zt,o,{sign:ao(o)});var o}(e))},sr=Se?function(e,t,o,r){return Jo(new Se.PlainDate(e,t,o,Uo(r)))}:function(e,t,o,r){return or(ro(oo(Bt($e(Be,{year:e,month:t,day:o}))),Ko(r)))},cr=Se?function(e,t,o){const r=Yo(e),s=Go(t);return Jo(r.add(s,o))}:function(e,t,o){const r=er(e),s=Xo(t);return or(ro(so(r.calendar,r,s,o),r.calendar))},nr=Se?function(e,t){return Yo(e).toString(t)}:function(e,t){return function(e,t){return o=e.calendar,r=e,s=ho(t),bo(r)+function(e,t){return t>1||0===t&&e!==rt?xo(st(e),2===t):""}(o,s);var o,r,s}(er(e),t)},ir=new Map,ar=e=>{if(!e)return;const t=e.trim();if(/^\d{4}-\d{2}-\d{2}$/.test(t))return t;const o=(0,Ce.date)("Y-m-d",new Date),r=`${t}|${o}`;if(!ir.has(r)){let e;try{e=((e,t)=>{const[o,r,s]=t.split("-").map(Number);return nr(cr(sr(o,r,s),rr(e)))})(t,o)}catch{e=void 0}ir.set(r,e)}return ir.get(r)},lr=e=>{const t=ar(e.min),o=ar(e.max);return t&&o&&t>o?{min:void 0,max:void 0}:{min:t,max:o}};var dr=s(51177),ur=s(41142);const mr=e=>((e,t)=>Object.entries(e).reduce((e,[o,r])=>({...e,[t(0,o)]:r}),{}))(e,(e,t)=>{return o=t,void 0===r&&(r={}),(0,ur.a)(o,(0,dr.Cl)({delimiter:"_"},r));var o,r}),pr=e=>{const t=(e=>{const t=(0,h.useRef)({cart:{},checkout:{},customer:{}}),{cartData:o,prefersCollection:r,shouldCreateAccount:s,orderNotes:c,additionalFields:n,activePaymentMethod:i,customerId:a}=(0,w.useSelect)(e=>{const t=e(U.cartStore),o=e(U.checkoutStore),r=e(U.paymentStore);return{cartData:t.getCartData(),prefersCollection:o.prefersCollection(),shouldCreateAccount:o.getShouldCreateAccount(),orderNotes:o.getOrderNotes(),additionalFields:o.getAdditionalFields(),activePaymentMethod:r.getActivePaymentMethod(),customerId:o.getCustomerId()}},[]),l=(0,h.useMemo)(()=>{const{coupons:t,shippingRates:l,shippingAddress:d,billingAddress:u,items:m,itemsCount:p,itemsWeight:h,needsShipping:g,totals:w,extensions:_}=o,b={cart:{coupons:t.map(e=>e.code),shippingRates:[...new Set(l.map(e=>e.shipping_rates.find(e=>e.selected)?.rate_id).filter(Boolean))],items:m.map(e=>Array(Math.ceil(e.quantity)).fill(e.id)).flat(),itemsType:[...new Set(m.map(e=>e.type))],itemsCount:p,itemsWeight:h,needsShipping:g,prefersCollection:"boolean"==typeof r&&r,totals:{total_price:Number(w.total_price),total_tax:Number(w.total_tax)},extensions:_},checkout:{createAccount:s,customerNote:c,additionalFields:Object.fromEntries(Object.entries(n).filter(([e])=>J.pt.includes(e))),paymentMethod:i},customer:{id:a,billingAddress:u,shippingAddress:d,additionalFields:Object.fromEntries(Object.entries(n).filter(([e])=>J.fO.includes(e))),..."billing"===e||"shipping"===e?{address:"billing"===e?u:d}:{}}};return{cart:mr(b.cart),checkout:mr(b.checkout),customer:mr(b.customer)}},[o,r,s,c,n,i,a,e]);return t.current&&de()(t.current,l)||(t.current=l),t.current})(e);return window.schemaParser?{parser:window.schemaParser,data:t}:{parser:null,data:t}};var hr=s(54579);const gr=(e,t,o,r="")=>{const s=(0,h.useRef)([]),{parser:c,data:n}=pr(o),i=(0,hr.A)(e,t,r).map(e=>{const o=t[e.key]||{};if(c){if(_e(o,"required")){let t={};t=Object.keys(o.required).some(e=>"cart"===e||"checkout"===e||"customer"===e)?{type:"object",properties:o.required}:o.required;try{const o=c.validate(t,n);e.required=o}catch(e){b.CURRENT_USER_IS_ADMIN&&console.error(e)}}if(_e(o,"hidden")){let t={};t=Object.keys(o.hidden).some(e=>"cart"===e||"checkout"===e||"customer"===e)?{type:"object",properties:o.hidden}:o.hidden;try{const o=c.validate(t,n);e.hidden=o}catch(e){b.CURRENT_USER_IS_ADMIN&&console.error(e)}}}return e});if(!s.current||!de()(s.current,i)){const e=i.map(e=>({...e,hidden:"boolean"==typeof e.hidden&&e.hidden,required:"boolean"==typeof e.required&&e.required}));s.current=e}return s.current},wr={};function _r(e){let t=e;return function(e){const o=t;return t=e,o}}const br=_r(),xr=_r(),fr=({id:t="",fields:r,onChange:s,addressType:n="shipping",values:i,children:a,isEditing:l,ariaDescribedBy:d=""})=>{const u=(0,ce.useInstanceId)(fr),m=(0,h.useRef)(!0),{defaultFields:_}=(0,E.C)(),b=(0,re.c)(r),x=(0,re.c)("country"in i?i.country:""),f=gr(b,_,n,x),y=(0,se.Z)(f),v=(0,se.Z)(l),k=(0,se.Z)(i),j=(0,h.useRef)({}),{errors:C,previousErrors:A}=((e,t,o)=>{const{parser:r,data:s}=pr(t),c=(0,h.useRef)(wr),n=(0,se.Z)(c.current);if(!s)return{errors:c.current,previousErrors:void 0};let i;if(o)i=o;else switch(t){case"billing":case"shipping":i=s.customer.address||{};break;case"contact":case"order":i=s.checkout.additional_fields||{};break;default:i={}}const a=e.reduce((e,t)=>(_e(t,"validation")&&!t.hidden&&(t.required||i[t.key])&&(e[t.key]=t.validation),e),{});let l=wr;if(Object.keys(a).length>0&&r){const o={type:"object",properties:{}};switch(t){case"shipping":o.properties={customer:{type:"object",properties:{shipping_address:{type:"object",properties:a}}}};break;case"billing":o.properties={customer:{type:"object",properties:{billing_address:{type:"object",properties:a}}}};break;default:o.properties={checkout:{type:"object",properties:{additional_fields:{type:"object",properties:a}}}}}const c=r.compile(o),n=c(s);l=!n&&c.errors?((e,t)=>e.reduce((e,o)=>{const r=(s=o.instancePath,s.split("/").pop()?.replace("~1","/"));var s;const c=t.find(e=>e.key===r);if(!c||!r)return e;const n=(0,p.getFieldLabel)(c.label),i=(0,S.sprintf)( // translators: %s is the label of the field. // translators: %s is the label of the field. (0,S.__)("%s is invalid","woocommerce"),n);if(r)switch(o.keyword){case"errorMessage":e[r]=o.message??i;break;case"pattern":e[r]=(0,S.sprintf)( // translators: %1$s is the label of the field, %2$s is the pattern. // translators: %1$s is the label of the field, %2$s is the pattern. (0,S.__)("%1$s must match the pattern %2$s","woocommerce"),n,o.params.pattern);break;default:e[r]=i}return e},{}))(c.errors,e):wr}const d=e.map(e=>l[e.key]?[e.key,l[e.key]]:e.hidden||!e.required&&!i[e.key]?null:"postcode"===e.key&&"country"in i&&!(0,p.isPostcode)({postcode:i.postcode,country:i.country})?[e.key,(0,S.__)("Please enter a valid postcode","woocommerce")]:"email"===e.key&&"email"in i&&!(0,g.isEmail)(i.email)?[e.key,(0,S.__)("Please enter a valid email address","woocommerce")]:null).filter(G.nonNullable);return de()(c.current,Object.fromEntries(d))||(c.current=Object.fromEntries(d)),{errors:c.current,previousErrors:n}})(f,n,"shipping"===n?i:void 0);return(0,h.useEffect)(()=>{if(Object.entries(C).forEach(([e,t])=>{const o=j.current[e];t&&(o?.setErrorMessage(t),(0,w.select)(U.validationStore).getValidationError(`${n}_${e}`)||(0,w.dispatch)(U.validationStore).setValidationErrors({[`${n}_${e}`]:{message:t,hidden:!!o?.isFocused()}}))}),A){const e=[];Object.entries(A).forEach(([t])=>{const o=j.current[t];t in C||(e.push(`${n}_${t}`),o?.setErrorMessage(""))}),e.length&&(0,w.dispatch)(U.validationStore).clearValidationErrors(e)}},[C,A,n,i]),(0,h.useEffect)(()=>{j.current?.postcode?.revalidate()},[x]),(0,h.useEffect)(()=>{let e;if(!m.current&&l&&j.current&&v!==l){const o=f.find(e=>!1===e.hidden);if(!o)return;const{id:r}=ge(o,t||`${u}`,n),s=document.getElementById(r);s&&(e=setTimeout(()=>{s.focus()},300))}return m.current=!1,()=>{clearTimeout(e)}},[l,f,t,u,n,v]),(0,h.useEffect)(()=>{if(de()(y,f))return;const e={...i,...Object.fromEntries(f.filter(e=>e.hidden).map(e=>[e.key,""]))};ae()(i,e)||s(e)},[s,f,y,i]),(0,h.useEffect)(()=>{if((!de()(y,f)||!de()(k,i))&&("country"in i&&((e,t)=>{const o=`${e}_country`,r=(0,w.select)(U.validationStore).getValidationError(o),s=t.city||t.state||t.postcode;try{if(!t.country&&s)throw(0,S.__)("Please select your country","woocommerce");if("billing"===e&&t.country&&!Object.keys(J.AG).includes(t.country))throw(0,S.__)("Sorry, we do not allow orders from the selected country","woocommerce");if("shipping"===e&&t.country&&!Object.keys(J.G3).includes(t.country))throw(0,S.__)("Sorry, we do not ship orders to the selected country","woocommerce");r&&(0,w.dispatch)(U.validationStore).clearValidationError(o)}catch(e){r?(0,w.dispatch)(U.validationStore).showValidationError(o):(0,w.dispatch)(U.validationStore).setValidationErrors({[o]:{message:String(e),hidden:!1}})}})(n,i),"state"in i)){const e=f.find(e=>"state"===e.key);e&&((e,t,o)=>{const r=`${e}_state`,s=(0,w.select)(U.validationStore).getValidationError(r),c=o.required,n="shipping"===e?br(t):xr(t),i=!!n&&!ae()(n,t);s?!c||t.state?(0,w.dispatch)(U.validationStore).clearValidationError(r):i||(0,w.dispatch)(U.validationStore).showValidationError(r):!s&&c&&!t.state&&t.country&&(0,w.dispatch)(U.validationStore).setValidationErrors({[r]:{message:(0,S.sprintf)(/* translators: %s will be the state field label in lowercase e.g. "state" */ /* translators: %s will be the state field label in lowercase e.g. "state" */ (0,S.__)("Please select a %s","woocommerce"),o.label.toLowerCase()),hidden:!0}})})(n,i,e)}},[i,k,n,f,y]),t=t||`${u}`,(0,o.jsxs)("div",{id:t,className:"wc-block-components-address-form",children:[f.map(r=>{if(r.hidden)return null;const a=ge(r,t,n),l=(e=>{const{autoCapitalize:t,autoComplete:o,placeholder:r,...s}=e;return s})(a);if("email"===r.key&&(a.id="email",a.errorId="billing_email"),"checkbox"===r.type){const e=r.key in i&&i[r.key],t={checked:Boolean(e),onChange:e=>{s({...i,[r.key]:e})},...l};return r.required?(0,o.jsx)(R.ValidatedCheckboxControl,{...r.errorMessage?{errorMessage:r.errorMessage}:{},...t},r.key):(0,o.jsx)(R.CheckboxControl,{...t},r.key)}if("address_1"===r.key&&"address_1"in i){const e=we("address_1",f,i),c=we("address_2",f,i);return(0,G.isNull)(e)||(0,G.isNull)(c)?null:(0,o.jsx)(je,{address1:e,address2:c,addressType:n,formId:t,onChange:(e,t)=>{s({...i,[e]:t})}},r.key)}if("address_2"===r.key)return null;if("country"===r.key&&"country"in i){const e="shipping"===n?Q:X;return(0,o.jsx)(e,{...a,value:i.country,onChange:e=>{s({...i,country:e,state:"",postcode:""})}},r.key)}if("state"===r.key&&"state"in i&&"country"in i){const e="shipping"===n?oe:te;return(0,o.jsx)(e,{...a,country:i.country,value:i.state,onChange:e=>s({...i,state:e})},r.key)}return"select"===r.type&&"options"in r?void 0===r.options?null:(0,o.jsx)(Y,{...a,label:a.label||"",className:(0,e.A)("wc-block-components-select-input",`wc-block-components-select-input-${r.key}`.replaceAll("/","-")),value:r.key in i?i[r.key]:"",onChange:e=>{s({...i,[r.key]:e})},options:r.options,required:r.required,errorMessage:a.errorMessage||void 0},r.key):(0,o.jsx)(R.ValidatedTextInput,{ref:e=>j.current[r.key]=e,...a,type:r.type,..."date"===r.type?{...lr(r),icon:(0,o.jsx)("span",{className:"wc-block-components-text-input__date-icon","aria-hidden":"true",children:(0,o.jsx)(c.A,{icon:ne.A,size:24})})}:{},ariaDescribedBy:d,value:(0,W.decodeEntities)(i[r.key])??"",onChange:e=>s({...i,[r.key]:e}),customFormatter:e=>"postcode"===r.key?e.trimStart().toUpperCase():e},r.key)}),a]})},yr=fr;var vr=s(2269),kr=s(74321);s(71121);const jr=({isEditing:t=!1,addressCard:r,addressForm:s,shouldAnimate:c=!1})=>{const n=(0,e.A)("wc-block-components-address-address-wrapper",{"is-editing":t,"is-animated":c});return(0,o.jsxs)("div",{className:n,children:[(0,o.jsx)("div",{className:"wc-block-components-address-card-wrapper",children:r}),(0,o.jsx)("div",{className:"wc-block-components-address-form-wrapper",children:s})]})},Cr=e=>(0,G.isObject)(J.xj[e.country])&&(0,G.isString)(J.xj[e.country][e.state])?(0,W.decodeEntities)(J.xj[e.country][e.state]):e.state,Sr=e=>(0,G.isString)(J.FS[e.country])?(0,W.decodeEntities)(J.FS[e.country]):e.country;s(28796);const Ar=({address:t,onEdit:r,target:s,isExpanded:c})=>{const{name:n,address:i}=(e=>{const t=(0,b.getSetting)("countryData",{});let o=(0,b.getSetting)("defaultAddressFormat","{name}\n{company}\n{address_1}\n{address_2}\n{city}\n{state}\n{postcode}\n{country}");return(0,G.objectHasProp)(t,e?.country)&&(0,G.objectHasProp)(t[e.country],"format")&&(0,G.isString)(t[e.country].format)&&(o=t[e.country].format),((e,t)=>{const o=(e=>["{name}","{name_upper}","{first_name} {last_name}","{last_name} {first_name}","{first_name_upper} {last_name_upper}","{last_name_upper} {first_name_upper}","{first_name} {last_name_upper}","{first_name_upper} {last_name}","{last_name} {first_name_upper}","{last_name_upper} {first_name}"].find(t=>e.indexOf(t)>=0)||"")(t),r=t.replace(`${o}\n`,""),s=[["{company}",e?.company||""],["{address_1}",e?.address_1||""],["{address_2}",e?.address_2||""],["{city}",e?.city||""],["{state}",Cr(e)],["{postcode}",e?.postcode||""],["{country}",Sr(e)],["{company_upper}",(e?.company||"").toUpperCase()],["{address_1_upper}",(e?.address_1||"").toUpperCase()],["{address_2_upper}",(e?.address_2||"").toUpperCase()],["{city_upper}",(e?.city||"").toUpperCase()],["{state_upper}",Cr(e).toUpperCase()],["{state_code}",e?.state||""],["{postcode_upper}",(e?.postcode||"").toUpperCase()],["{country_upper}",Sr(e).toUpperCase()]],c=[["{name}",e?.first_name+(e?.first_name&&e?.last_name?" ":"")+e?.last_name],["{name_upper}",(e?.first_name+(e?.first_name&&e?.last_name?" ":"")+e?.last_name).toUpperCase()],["{first_name}",e?.first_name||""],["{last_name}",e?.last_name||""],["{first_name_upper}",(e?.first_name||"").toUpperCase()],["{last_name_upper}",(e?.last_name||"").toUpperCase()]];let n=o;c.forEach(([e,t])=>{n=n.replace(e,t)});let i=r;s.forEach(([e,t])=>{i=i.replace(e,t)});const a=i.trim().replace(/\n{2,}/g,"\n").split("\n").map(e=>e.split(", ").map(e=>e.trim()).filter(Boolean).join(", ")).filter(e=>e.length>0);return{name:n,address:a}})(e,o)})(t),a="shipping"===s?(0,S.__)("Edit shipping address","woocommerce"):(0,S.__)("Edit billing address","woocommerce"),l=(0,h.useMemo)(()=>[...i,t.phone].filter(e=>!!e).map(e=>(0,W.decodeEntities)(e)).join(", "),[i,t.phone]);return(0,o.jsxs)("div",{className:"wc-block-components-address-card",children:[(0,o.jsxs)("address",{children:[(0,o.jsx)("span",{className:(0,e.A)("wc-block-components-address-card__address-section","wc-block-components-address-card__address-section--primary"),children:(0,W.decodeEntities)(n)}),(0,o.jsx)("span",{className:(0,e.A)("wc-block-components-address-card__address-section","wc-block-components-address-card__address-section--secondary"),children:l})]}),r&&(0,o.jsx)(ue.$,{render:(0,o.jsx)("span",{}),className:"wc-block-components-address-card__edit","aria-controls":s,"aria-expanded":c,"aria-label":a,onClick:e=>{e.preventDefault(),r()},type:"button",children:(0,S.__)("Edit","woocommerce")})]})},Nr=()=>{const{shippingAddress:e,setShippingAddress:t,setBillingAddress:r,useShippingAsBilling:s,editingShippingAddress:c,setEditingShippingAddress:n}=(0,E.C)(),{dispatchCheckoutEvent:i}=(0,vr.y)(),[a,l]=(0,h.useState)(!1),{isInitialized:d}=(0,kr.q)(),{validationErrors:u}=(0,w.useSelect)(e=>({validationErrors:e(U.validationStore).getValidationErrors()}),[e]);(0,h.useEffect)(()=>{const t=Object.keys(e).some(e=>void 0!==u[`shipping_${e}`]);d&&t&&!1===c&&n(!0)},[c,e,d,n,u]);const m=(0,h.useCallback)(e=>{t(e),s&&(r(e),i("set-billing-address")),i("set-shipping-address")},[i,r,t,s]),p=(0,h.useCallback)(()=>{l(!0),n(!0)},[n]);return(0,o.jsx)(jr,{isEditing:c,shouldAnimate:a,addressCard:(0,o.jsx)(Ar,{address:e,target:"shipping",onEdit:p,isExpanded:c}),addressForm:(0,o.jsx)(yr,{id:"shipping",addressType:"shipping",onChange:m,values:e,fields:J.Hw,isEditing:c})})},Pr=()=>{const{defaultFields:e,setBillingAddress:t,shippingAddress:r,billingAddress:s,useShippingAsBilling:c,setUseShippingAsBilling:n,setEditingBillingAddress:i}=(0,E.C)(),{isEditor:a}=(0,l.m)(),d=0===(0,b.getSetting)("currentUserId"),u=()=>{const o={...r};e?.phone?.hidden&&delete o.phone,e?.company?.hidden&&delete o.company,(Object.keys(o).length!==Object.keys(s).length||!Object.keys(o).every(e=>o[e]===s[e]))&&t(o)};F(()=>{c&&u()});const m=a?z.A:h.Fragment,p=c?[H.tG.SHIPPING_ADDRESS,H.tG.BILLING_ADDRESS]:[H.tG.SHIPPING_ADDRESS];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.StoreNoticesContainer,{context:p}),(0,o.jsx)(m,{children:(0,o.jsx)(Nr,{})}),(0,o.jsx)(R.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:(0,S.__)("Use same address for billing","woocommerce"),checked:c,onChange:e=>{n(e),e?u():(i(!0),(e=>{if(!e||!d)return;const o=(0,$.ln)(e);t(o)})(s))}})]})},Br=({defaultTitle:e=(0,S.__)("Step","woocommerce"),defaultDescription:t=(0,S.__)("Step description text.","woocommerce"),defaultShowStepNumber:o=!0})=>({title:{type:"string",default:e},description:{type:"string",default:t},showStepNumber:{type:"boolean",default:o}}),Ir={...Br({defaultTitle:(0,S.__)("Shipping address","woocommerce"),defaultDescription:(0,S.__)("","woocommerce")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Tr=JSON.parse('{"DD":"Shipping Address","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-shipping-address-block",{apiVersion:Tr.XV,title:Tr.DD,icon:{src:(0,o.jsx)(c.A,{icon:T.A,className:"wc-block-editor-components-block-icon"})},attributes:Ir,edit:({attributes:t,setAttributes:r})=>{const{showShippingFields:s}=(0,E.C)();return s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(N,{}),(0,o.jsxs)(L,{setAttributes:r,attributes:t,className:(0,e.A)("wc-block-checkout__shipping-fields",t?.className),children:[(0,o.jsx)(Pr,{}),(0,o.jsx)(O,{block:p.innerBlockAreas.SHIPPING_ADDRESS})]})]}):null},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});var Er=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});s(76223);const Rr=J.gu?`<a href="${J.gu}" target="_blank">${(0,S.__)("Terms and Conditions","woocommerce")}</a>`:(0,S.__)("Terms and Conditions","woocommerce"),Dr=J.pk?`<a href="${J.pk}" target="_blank">${(0,S.__)("Privacy Policy","woocommerce")}</a>`:(0,S.__)("Privacy Policy","woocommerce"),Lr=(0,S.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,S.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woocommerce"),Rr,Dr),Or=(0,S.sprintf)(/* translators: %1$s terms page link, %2$s privacy page link. */ /* translators: %1$s terms page link, %2$s privacy page link. */ (0,S.__)("You must accept our %1$s and %2$s to continue with your purchase.","woocommerce"),Rr,Dr),Mr=()=>{},Vr=JSON.parse('{"DD":"Terms and Conditions","XV":3}');s(65763),(0,n.registerBlockType)("woocommerce/checkout-terms-block",{apiVersion:Vr.XV,title:Vr.DD,icon:{src:(0,o.jsx)(c.A,{icon:Er,className:"wc-block-editor-components-block-icon"})},edit:({attributes:{checkbox:t,text:r,showSeparator:s},setAttributes:c})=>{const n=(0,i.useBlockProps)(),a=r||(t?Or:Lr);return(0,o.jsxs)("div",{...n,children:[(0,o.jsxs)(i.InspectorControls,{children:[(!J.gu||!J.pk)&&(0,o.jsxs)(A.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,children:[(0,S.__)("Link to your store's Terms and Conditions and Privacy Policy pages by creating pages for them.","woocommerce"),(0,o.jsx)("br",{}),!J.gu&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=advanced`,children:(0,S.__)("Setup a Terms and Conditions page","woocommerce")})]}),!J.pk&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}options-privacy.php`,children:(0,S.__)("Setup a Privacy Policy page","woocommerce")})]})]}),J.gu&&J.pk&&!(a.includes(J.gu)&&a.includes(J.pk))&&(0,o.jsx)(A.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:Lr!==r?[{label:(0,S.__)("Restore default text","woocommerce"),onClick:()=>c({text:""})}]:[],children:(0,o.jsx)("p",{children:(0,S.__)("Ensure you add links to your policy pages in this section.","woocommerce")})}),(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Display options","woocommerce"),children:[(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Require checkbox","woocommerce"),checked:t,onChange:()=>c({checkbox:!t})}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Show separator","woocommerce"),checked:s,onChange:()=>c({showSeparator:!s})})]})]}),(0,o.jsx)("div",{className:(0,e.A)("wc-block-checkout__terms",{"wc-block-checkout__terms--with-separator":s}),children:t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:"wc-block-checkout__terms-checkbox-wrapper",children:(0,o.jsx)(R.CheckboxControl,{id:"terms-condition",checked:!1,onChange:Mr})}),(0,o.jsx)(i.RichText,{value:a,onChange:e=>c({text:e})})]}):(0,o.jsx)(i.RichText,{tagName:"span",value:a,onChange:e=>c({text:e})})})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var Fr=(0,o.jsx)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(t.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})}),Hr=s(83671);const zr=()=>{const[e,t]=(0,h.useState)(0),{customerPassword:r}=(0,w.useSelect)(e=>({customerPassword:e(U.checkoutStore).getCustomerPassword()}),[]),{__internalSetCustomerPassword:s}=(0,w.useDispatch)(U.checkoutStore),{setValidationErrors:c,clearValidationError:n}=(0,w.useDispatch)(U.validationStore);return(0,h.useEffect)(()=>{r&&(e<2?c({"account-password":{message:(0,S.__)("Please create a stronger password","woocommerce"),hidden:!0}}):n("account-password"))},[n,r,e,c]),(0,o.jsx)(R.ValidatedTextInput,{type:"password",label:(0,S.__)("Create a password","woocommerce"),className:"wc-block-components-address-form__password",value:r,required:!0,errorId:"account-password",onChange:e=>{s(e),e||c({"account-password":{message:(0,S.__)("Please enter a valid password","woocommerce"),hidden:!0}})},feedback:(0,o.jsx)(Hr.Ay,{password:r,onChange:e=>t(e)})})},$r="wc-guest-checkout-notice",Wr=()=>{const{shouldCreateAccount:e}=(0,w.useSelect)(e=>({shouldCreateAccount:e(U.checkoutStore).getShouldCreateAccount()})),{__internalSetShouldCreateAccount:t,__internalSetCustomerPassword:r}=(0,w.useDispatch)(U.checkoutStore),s=(0,b.getSetting)("checkoutAllowsGuest",!1),c=(0,b.getSetting)("checkoutAllowsSignup",!1),n=s&&c,i=!(0,b.getSetting)("generatePassword",!1)&&(n&&e||!s);return s||n||i?(0,o.jsxs)(o.Fragment,{children:[s&&(0,o.jsx)("p",{id:$r,className:"wc-block-checkout__guest-checkout-notice",children:(0,S.__)("You are currently checking out as a guest.","woocommerce")}),n&&(0,o.jsx)(R.CheckboxControl,{className:"wc-block-checkout__create-account",label:(0,S.sprintf)(/* translators: Store name */ /* translators: Store name */ (0,S.__)("Create an account with %s","woocommerce"),(0,b.getSetting)("siteTitle","")),checked:e,onChange:e=>{t(e),r("")}}),i&&(0,o.jsx)(zr,{})]}):null},Gr=()=>{const{additionalFields:e,customerId:t}=(0,w.useSelect)(e=>{const t=e(U.checkoutStore);return{additionalFields:t.getAdditionalFields(),customerId:t.getCustomerId()}}),{setAdditionalFields:r}=(0,w.useDispatch)(U.checkoutStore),{billingAddress:s,setEmail:c}=(0,E.C)(),{dispatchCheckoutEvent:n}=(0,vr.y)(),i={email:s.email,...e};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.StoreNoticesContainer,{context:H.tG.CONTACT_INFORMATION}),(0,o.jsx)(yr,{id:"contact",addressType:"contact",ariaDescribedBy:$r,onChange:e=>{const{email:t,...o}=e;c(t),n("set-email-address"),r(o)},values:i,fields:J.fO,children:!t&&(0,o.jsx)(Wr,{})})]})},qr={...Br({defaultTitle:(0,S.__)("Contact information","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}},Ur=JSON.parse('{"DD":"Contact Information","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-contact-information-block",{apiVersion:Ur.XV,title:Ur.DD,icon:{src:(0,o.jsx)(c.A,{icon:Fr,className:"wc-block-editor-components-block-icon"})},attributes:qr,edit:({attributes:t,setAttributes:r})=>(0,o.jsxs)(L,{attributes:t,setAttributes:r,className:(0,e.A)("wc-block-checkout__contact-fields",t?.className),children:[(0,o.jsx)(i.InspectorControls,{children:(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Account creation and guest checkout","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Account creation and guest checkout settings can be managed in your store settings.","woocommerce")}),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=account`,children:(0,S.__)("Manage account settings","woocommerce")})]})}),(0,o.jsx)(z.A,{children:(0,o.jsx)(Gr,{})}),(0,o.jsx)(O,{block:p.innerBlockAreas.CONTACT_INFORMATION})]}),save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});const Yr=()=>{const{billingAddress:e,setShippingAddress:t,setBillingAddress:r,useBillingAsShipping:s,editingBillingAddress:c,setEditingBillingAddress:n}=(0,E.C)(),{dispatchCheckoutEvent:i}=(0,vr.y)(),{isInitialized:a}=(0,kr.q)(),{validationErrors:l}=(0,w.useSelect)(e=>({validationErrors:e(U.validationStore).getValidationErrors()}),[e]);(0,h.useEffect)(()=>{const t=Object.keys(e).some(e=>void 0!==l[`billing_${e}`]);a&&t&&!1===c&&n(!0)},[c,e,a,n,l]);const d=(0,h.useCallback)(e=>{r(e),s&&(t(e),i("set-shipping-address")),i("set-billing-address")},[i,r,t,s]);return(0,o.jsx)(jr,{isEditing:c,addressCard:(0,o.jsx)(Ar,{address:e,target:"billing",onEdit:()=>{n(!0)},isExpanded:c}),addressForm:(0,o.jsx)(yr,{id:"billing",addressType:"billing",onChange:d,values:e,fields:J.Hw,isEditing:c})})},Zr=()=>{const{defaultFields:e,billingAddress:t,setShippingAddress:r,useBillingAsShipping:s}=(0,E.C)(),{isEditor:c}=(0,l.m)();F(()=>{if(s){const{email:o,...s}=t,c={...s};e?.phone?.hidden&&delete c.phone,e?.company?.hidden&&delete c.company,r(c)}});const n=c?z.A:h.Fragment,i=s?[H.tG.BILLING_ADDRESS,H.tG.SHIPPING_ADDRESS]:[H.tG.BILLING_ADDRESS];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.StoreNoticesContainer,{context:i}),(0,o.jsx)(n,{children:(0,o.jsx)(Yr,{})})]})},Jr=(0,S.__)("Billing address","woocommerce"),Xr=(0,S.__)("","woocommerce"),Qr=(0,S.__)("Billing and shipping address","woocommerce"),Kr=(0,S.__)("Enter the billing and shipping address that matches your payment method.","woocommerce"),es={...Br({defaultTitle:Jr,defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},ts=JSON.parse('{"DD":"Billing Address","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-billing-address-block",{apiVersion:ts.XV,title:ts.DD,icon:{src:(0,o.jsx)(c.A,{icon:T.A,className:"wc-block-editor-components-block-icon"})},attributes:es,edit:({attributes:t,setAttributes:r})=>{const{showBillingFields:s,forcedBillingAddress:c,useBillingAsShipping:n}=(0,E.C)();return s||n?(t.title=((e,t)=>t?e===Jr?Qr:e:e===Qr?Jr:e)(t.title,c),t.description=((e,t)=>t?e===Xr?Kr:e:e===Kr?Xr:e)(t.description,c),(0,o.jsxs)(L,{setAttributes:r,attributes:t,className:(0,e.A)("wc-block-checkout__billing-fields",t?.className),children:[(0,o.jsx)(N,{}),(0,o.jsx)(Zr,{}),(0,o.jsx)(O,{block:p.innerBlockAreas.BILLING_ADDRESS})]})):null},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});var os=s(5764);const rs=(0,S.__)("Place Order","woocommerce"),ss=(0,S.__)("Return to Cart","woocommerce"),cs={placeOrderButtonLabel:{type:"string",default:rs},returnToCartButtonLabel:{type:"string",default:ss}};var ns=s(69548),is=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});s(92840);const as=({href:e,children:t,element:r="a"})=>{const s=e||J.Vo;if(!s)return null;const n=r;return(0,o.jsxs)(n,{..."a"===r?{href:s}:{},className:"wc-block-components-checkout-return-to-cart-button",children:[(0,o.jsx)(c.A,{icon:is}),t]})};var ls=s(51331),ds=s(51565),us=s(92622),ms=s(86697),ps=s(83911),hs=s(70910);s(73793);const gs=({label:t,fullWidth:r=!1,showPrice:s=!1,priceSeparator:c="·",CustomButtonComponent:n})=>{const{onSubmit:i,isCalculating:a,isDisabled:d,waitingForProcessing:u,waitingForRedirect:m}=(()=>{const{isCalculating:e,isBeforeProcessing:t,isProcessing:o,isAfterProcessing:r,isComplete:s,hasError:c}=(0,w.useSelect)(e=>{const t=e(U.checkoutStore);return{isCalculating:t.isCalculating(),isBeforeProcessing:t.isBeforeProcessing(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isComplete:t.isComplete(),hasError:t.hasError()}}),{activePaymentMethod:n,isExpressPaymentMethodActive:i}=(0,w.useSelect)(e=>{const t=e(U.paymentStore);return{activePaymentMethod:t.getActivePaymentMethod(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive()}}),{onSubmit:a}=(0,ls.E)(),{paymentMethods:l={}}=(0,ds.m)(),d=l[n]||{},u=o||r||t,m=s&&!c;return{paymentMethodButtonLabel:d.placeOrderButtonLabel,paymentMethodPlaceOrderButton:d.placeOrderButton,onSubmit:a,isCalculating:e,isDisabled:o||i,waitingForProcessing:u,waitingForRedirect:m}})(),h=(0,us.Y)(),g=(0,p.useValidateCheckout)(),{isEditor:_,isPreview:b=!1}=(0,l.m)(),{cartTotals:x,cartIsLoading:f}=(0,ms.V)();return n?(0,o.jsx)(n,{waitingForProcessing:u,waitingForRedirect:m,disabled:a||d||u||m||f,isEditor:_,isPreview:b,validate:g,...h}):(0,o.jsxs)(ps.A,{className:(0,e.A)("wc-block-components-checkout-place-order-button",{"wc-block-components-checkout-place-order-button--full-width":r},{"wc-block-components-checkout-place-order-button--loading":u||m}),onClick:i,disabled:a||d||u||m||f,children:[u&&(0,o.jsx)(R.Spinner,{}),m&&(0,o.jsx)("svg",{className:"wc-block-components-checkout-place-order-button__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,o.jsx)("path",{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),(0,o.jsxs)("div",{className:"wc-block-components-checkout-place-order-button__text",children:[t,s&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{children:`.wp-block-woocommerce-checkout-actions-block {\n\t\t\t\t\t\t\t.wc-block-components-checkout-place-order-button__separator {\n\t\t\t\t\t\t\t\t&::after {\n\t\t\t\t\t\t\t\t\tcontent: "${c}";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}`}),(0,o.jsx)("div",{className:"wc-block-components-checkout-place-order-button__separator"}),(0,o.jsx)("div",{className:"wc-block-components-checkout-place-order-button__price",children:(0,o.jsx)(R.FormattedMonetaryAmount,{value:x.total_price,currency:(0,hs.getCurrencyFromPriceResponse)(x)})})]})]})]})},ws=JSON.parse('{"DD":"Actions","uK":{"lock":{"type":"object","default":{"remove":true,"move":true}},"cartPageId":{"type":"number","default":0},"showReturnToCart":{"type":"boolean","default":false},"className":{"type":"string","default":""},"priceSeparator":{"type":"string","default":"·"}},"XV":3}');s(40264);const _s={apiVersion:ws.XV,title:ws.DD,example:{attributes:{showPrice:!0,placeOrderButtonLabel:(0,S.__)("Place Order","woocommerce"),showReturnToCart:!1}},icon:{src:(0,o.jsx)(c.A,{icon:os.A,className:"wc-block-editor-components-block-icon"})},attributes:{...cs,...ws.uK},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()}),edit:({attributes:t,setAttributes:r})=>{const s=(0,i.useBlockProps)(),{cartPageId:c=0,showReturnToCart:n=!1,placeOrderButtonLabel:a,returnToCartButtonLabel:l}=t,{current:d}=(0,h.useRef)(c),u=(0,w.useSelect)(e=>d||e("core/editor").getCurrentPostId(),[d]),m=s.className.includes("is-style-with-price");return(0,o.jsxs)("div",{...s,children:[(0,o.jsxs)(i.InspectorControls,{children:[(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Options","woocommerce"),children:[(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)('Show a "Return to Cart" link',"woocommerce"),help:(0,S.__)("Recommended to enable only if there is no Cart link in the header.","woocommerce"),checked:n,onChange:()=>r({showReturnToCart:!n})}),m&&(0,o.jsx)(A.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,S.__)("Price separator","woocommerce"),id:"price-separator",value:t.priceSeparator,onChange:e=>{r({priceSeparator:e})}})]}),n&&!(u===J.p1&&0===d)&&(0,o.jsx)(ns.A,{pageId:c,setPageId:e=>r({cartPageId:e}),labels:{title:(0,S.__)("Return to Cart button","woocommerce"),default:(0,S.__)("WooCommerce Cart Page","woocommerce")}})]}),(0,o.jsx)("div",{className:"wc-block-checkout__actions",children:(0,o.jsxs)("div",{className:(0,e.A)("wc-block-checkout__actions_row",{"wc-block-checkout__actions_row--justify-flex-end":!n}),children:[n&&(0,o.jsx)(as,{element:"span",children:(0,o.jsx)(i.RichText,{multiline:!1,allowedFormats:[],value:l,placeholder:ss,onChange:e=>{r({returnToCartButtonLabel:e})}})}),(0,o.jsx)(gs,{label:(0,o.jsx)(i.RichText,{multiline:!1,allowedFormats:[],value:a,onChange:e=>{r({placeOrderButtonLabel:e})}}),fullWidth:!n,showPrice:m,priceSeparator:t.priceSeparator})]})})]})}};(0,n.registerBlockType)("woocommerce/checkout-actions-block",_s);const bs=()=>{const{additionalFields:e}=(0,w.useSelect)(e=>({additionalFields:e(U.checkoutStore).getAdditionalFields()}),[]),{isEditor:t}=(0,l.m)(),{setAdditionalFields:r}=(0,w.useDispatch)(U.checkoutStore),s={...e},c=t?z.A:h.Fragment;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.StoreNoticesContainer,{context:H.tG.ORDER_INFORMATION}),(0,o.jsx)(c,{children:(0,o.jsx)(yr,{id:"order",addressType:"order",onChange:e=>{r(e)},fields:J.pt,values:s})})]})},xs={...Br({defaultTitle:(0,S.__)("Additional order information","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!1,remove:!0}}},fs=JSON.parse('{"DD":"Additional information","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-additional-information-block",{apiVersion:fs.XV,title:fs.DD,attributes:xs,icon:{src:(0,o.jsx)(c.A,{icon:Er,className:"wc-block-editor-components-block-icon"})},edit:({attributes:t,setAttributes:r})=>{const{defaultFields:s}=(0,E.C)(),c=gr(J.pt,s,"order");return 0===c.length||c.every(e=>!!e.hidden)?null:(0,o.jsx)(L,{setAttributes:r,attributes:t,className:(0,e.A)("wc-block-checkout__additional-information-fields",t?.className),children:(0,o.jsx)(bs,{})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var ys=s(83243),vs=s(38260);s(76443);const ks=({disabled:e,onChange:t,placeholder:r,value:s})=>{const[c,n]=(0,h.useState)(""!==s),[i,a]=(0,h.useState)("");return(0,o.jsxs)("div",{className:"wc-block-checkout__add-note",children:[(0,o.jsx)(R.CheckboxControl,{disabled:e,label:(0,S.__)("Add a note to your order","woocommerce"),checked:c,onChange:e=>{n(e),e?s!==i&&t(i):(t(""),a(s))}}),c&&(0,o.jsx)(R.Textarea,{disabled:e,onTextChange:t,placeholder:r,value:s})]})},js=({className:t})=>{const{needsShipping:r}=(0,vs.m)(),{isProcessing:s,orderNotes:c}=(0,w.useSelect)(e=>{const t=e(U.checkoutStore);return{isProcessing:t.isProcessing(),orderNotes:t.getOrderNotes()}},[]),{__internalSetOrderNotes:n}=(0,w.useDispatch)(U.checkoutStore);return(0,o.jsx)(R.FormStep,{id:"order-notes",showStepNumber:!1,className:(0,e.A)("wc-block-checkout__order-notes",t),disabled:s,children:(0,o.jsx)(ks,{disabled:s,onChange:n,placeholder:r?(0,S.__)("Notes about your order, e.g. special notes for delivery.","woocommerce"):(0,S.__)("Notes about your order.","woocommerce"),value:c})})};s(89003);const Cs=JSON.parse('{"DD":"Order Note","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-note-block",{apiVersion:Cs.XV,title:Cs.DD,icon:{src:(0,o.jsx)(c.A,{icon:ys.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,i.useBlockProps)();return(0,o.jsx)("div",{...e,children:(0,o.jsx)(z.A,{children:(0,o.jsx)(js,{})})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var Ss=s(81475),As=s(12220),Ns=(0,o.jsx)(t.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(t.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Ps=s(85909);const Bs=()=>{const{extensions:e,receiveCart:t,...r}=(0,ms.V)(),s={extensions:e,cart:r,context:"woocommerce/checkout"};return(0,o.jsx)(p.ExperimentalOrderMeta.Slot,{...s})},{Fill:Is,Slot:Ts}=(0,p.createSlotFill)("checkoutOrderSummaryActionArea"),Es=JSON.parse('{"DD":"Order Summary","xY":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"uK":{"lock":{"type":"object","default":{"remove":true}}},"XV":3}'),Rs=[{attributes:Es.uK,save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(i.InnerBlocks.Content,{})}),supports:Es.xY,migrate:({attributes:e})=>[e,[(0,n.createBlock)("woocommerce/checkout-order-summary-cart-items-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-coupon-form-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-totals-block",{},[(0,n.createBlock)("woocommerce/checkout-order-summary-subtotal-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-fee-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-discount-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-shipping-block",{},[]),(0,n.createBlock)("woocommerce/checkout-order-summary-taxes-block",{},[])])]],isEligible:(e,t)=>!t.some(e=>"woocommerce/checkout-order-summary-totals-block"===e.name)}],Ds=Rs;s(86229),(0,n.registerBlockType)("woocommerce/checkout-order-summary-block",{apiVersion:Es.XV,title:Es.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},attributes:{className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:({clientId:t})=>{const r=(0,i.useBlockProps)(),{cartTotals:s}=(0,ms.V)(),c=(0,hs.getCurrencyFromPriceResponse)(s),n=parseInt(s.total_price,10),a=(0,j.h)(p.innerBlockAreas.CHECKOUT_ORDER_SUMMARY),{isLarge:l}=(0,Ps.G)(),[d,u]=(0,h.useState)(!1),m=(0,h.useId)(),g=l?{}:{role:"button",onClick:()=>u(!d),"aria-expanded":d,"aria-controls":m,tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||u(!d)}},w=[["woocommerce/checkout-order-summary-cart-items-block",{},[]],["woocommerce/checkout-order-summary-coupon-form-block",{},[]],["woocommerce/checkout-order-summary-totals-block",{},[]]];return(0,C.B)({clientId:t,registeredBlocks:a,defaultTemplate:w}),(0,o.jsxs)("div",{...r,children:[(0,o.jsxs)("div",{className:"wc-block-components-checkout-order-summary__title",...g,children:[(0,o.jsx)("p",{className:"wc-block-components-checkout-order-summary__title-text",role:"heading","aria-level":2,children:(0,S.__)("Order summary","woocommerce")}),(0,o.jsx)(R.FormattedMonetaryAmount,{currency:c,value:n,className:"wc-block-components-checkout-order-summary__title-price"}),(0,o.jsx)("span",{className:"wc-block-components-checkout-order-summary__title-icon",children:(0,o.jsx)(A.Icon,{icon:d?Ns:q.A})})]}),(0,o.jsxs)("div",{className:(0,e.A)("wc-block-components-checkout-order-summary__content",{"is-open":d}),id:m,children:[(0,o.jsx)(i.InnerBlocks,{allowedBlocks:a,template:w}),(0,o.jsx)("div",{className:"wc-block-components-totals-wrapper",children:(0,o.jsx)(As.Ay,{currency:c,values:s})}),(0,o.jsx)(Bs,{})]})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(i.InnerBlocks.Content,{})}),deprecated:Ds});var Ls=s(54200),Os=s(93023),Ms=s(38295),Vs=s(61526);s(9249);const Fs=()=>(0,o.jsxs)("div",{className:"wc-block-components-skeleton wc-block-components-skeleton--checkout-payment","aria-live":"polite","aria-label":(0,S.__)("Loading payment options… ","woocommerce"),children:[(0,o.jsxs)("div",{className:"wc-block-components-skeleton--checkout-payment-container",children:[(0,o.jsx)(Vs.E,{height:"20px",width:"20px",borderRadius:"100%"}),(0,o.jsx)(Vs.E,{height:"20px",maxWidth:"148px"})]}),(0,o.jsx)(Vs.E,{height:"20px"})]});var Hs=s(72048),zs=s(19403);s(94147);const $s=()=>(0,o.jsx)(zs.A,{isDismissible:!1,className:"wc-block-checkout__no-payment-methods-notice",status:"error",children:(0,S.__)("There are no payment methods available. Please contact us for help placing your order.","woocommerce")});s(85193);const Ws=()=>(0,o.jsx)(zs.A,{isDismissible:!1,className:"wc-block-checkout__only-express-payments-notice",status:"info",children:(0,S.__)("Only express payment methods are available for this order. Please select one to continue.","woocommerce")});var Gs=s(34083),qs=s(61018);const Us=({children:e,showSaveOption:t})=>{const{isEditor:r}=(0,l.m)(),{shouldSavePaymentMethod:s,customerId:c,shouldCreateAccount:n}=(0,w.useSelect)(e=>{const t=e(U.paymentStore),o=e(U.checkoutStore);return{shouldSavePaymentMethod:t.getShouldSavePaymentMethod(),customerId:o.getCustomerId(),shouldCreateAccount:o.getShouldCreateAccount()}},[]),{__internalSetShouldSavePaymentMethod:i}=(0,w.useDispatch)(U.paymentStore),a=(0,b.getSetting)("checkoutAllowsGuest",!1),d=c>0||n||!a;return(0,h.useEffect)(()=>{!d&&s&&i(!1)},[d,s,i]),(0,o.jsxs)(qs.A,{isEditor:r,children:[e,d&&t&&(0,o.jsx)(R.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:(0,S.__)("Save payment information to my account for future purchases.","woocommerce"),checked:s,onChange:()=>i(!s)})]})},Ys=()=>{const{activeSavedToken:e,activePaymentMethod:t,isExpressPaymentMethodActive:r,availablePaymentMethods:s}=(0,w.useSelect)(e=>{const t=e(U.paymentStore);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),availablePaymentMethods:t.getAvailablePaymentMethods()}}),{__internalSetActivePaymentMethod:c}=(0,w.useDispatch)(U.paymentStore),n=(0,Gs.getPaymentMethods)(),{...i}=(0,us.Y)(),{removeNotice:a}=(0,w.useDispatch)("core/notices"),{dispatchCheckoutEvent:d}=(0,vr.y)(),{isEditor:u}=(0,l.m)(),m=Object.keys(s).map(e=>{const{edit:t,content:r,label:s,supports:a}=n[e],l=u?t:r;return{value:e,label:"string"==typeof s?s:(0,h.cloneElement)(s,{components:i.components}),name:`wc-saved-payment-method-token-${e}`,content:(0,o.jsx)(Us,{showSaveOption:a.showSaveOption,children:(0,h.cloneElement)(l,{__internalSetActivePaymentMethod:c,...i})})}}),p=(0,h.useCallback)(e=>{c(e),a("wc-payment-error",H.tG.PAYMENTS),d("set-active-payment-method",{paymentMethodSlug:e})},[d,a,c]);return r?null:(0,o.jsx)(R.RadioControlAccordion,{highlightChecked:!0,id:"wc-payment-method-options",selected:e?null:t,onChange:p,options:m})};var Zs=s(28347);const Js=[],Xs=[],Qs={},Ks={};J.Hw.forEach(e=>{Ks[e]=""});const ec={};J.Hw.forEach(e=>{ec[e]=""}),ec.email="";const tc={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],productsPendingAdd:[],cartData:{coupons:[],shippingRates:[],shippingAddress:Ks,billingAddress:ec,items:[],itemsCount:0,itemsWeight:0,crossSells:[],needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:[],totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:[]},errors:Js,paymentMethods:[],paymentRequirements:[],extensions:Qs},metaData:{updatingCustomerData:!1,updatingAddressFieldsForShippingRates:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:Xs},oc="wc/store/cart";(0,S.__)("Unable to get cart data from the API.","woocommerce");const rc=({method:e,expires:t})=>(0,S.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ (0,S.__)("%1$s ending in %2$s (expires %3$s)","woocommerce"),e?.display_brand??e?.networks?.preferred??e.brand,e.last4,t),sc=({method:e})=>e.brand&&e.last4?(0,S.sprintf)(/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ /* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card. */ (0,S.__)("%1$s ending in %2$s","woocommerce"),e.brand,e.last4):(0,S.sprintf)(/* translators: %s is the name of the payment method gateway. */ /* translators: %s is the name of the payment method gateway. */ (0,S.__)("Saved token for %s","woocommerce"),e.gateway),cc=()=>{const{activeSavedToken:e,activePaymentMethod:t,savedPaymentMethods:r}=(0,w.useSelect)(e=>{const t=e(U.paymentStore);return{activeSavedToken:t.getActiveSavedToken(),activePaymentMethod:t.getActivePaymentMethod(),savedPaymentMethods:t.getSavedPaymentMethods()}}),{__internalSetActivePaymentMethod:s}=(0,w.useDispatch)(U.paymentStore),c=(()=>{let e;if((0,w.select)("core/editor")){const t={cartCoupons:u.B.coupons,cartItems:u.B.items,crossSellsProducts:u.B.cross_sells,cartFees:u.B.fees,cartItemsCount:u.B.items_count,cartItemsWeight:u.B.items_weight,cartNeedsPayment:u.B.needs_payment,cartNeedsShipping:u.B.needs_shipping,cartItemErrors:Js,cartTotals:u.B.totals,cartIsLoading:!1,cartErrors:Xs,billingData:tc.cartData.billingAddress,billingAddress:tc.cartData.billingAddress,shippingAddress:tc.cartData.shippingAddress,extensions:Qs,shippingRates:u.B.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:u.B.has_calculated_shipping,paymentRequirements:u.B.payment_requirements,receiveCart:()=>{}};e={cart:t,cartTotals:t.cartTotals,cartNeedsShipping:t.cartNeedsShipping,billingData:t.billingAddress,billingAddress:t.billingAddress,shippingAddress:t.shippingAddress,selectedShippingMethods:(0,Zs.k)(t.shippingRates),paymentMethods:u.B.payment_methods,paymentRequirements:t.paymentRequirements}}else{const t=(0,w.select)(oc),o=t.getCartData(),r=t.getCartErrors(),s=t.getCartTotals(),c=!t.hasFinishedResolution("getCartData"),n=t.isAddressFieldsForShippingRatesUpdating(),i=(0,Zs.k)(o.shippingRates);e={cart:{cartCoupons:o.coupons,cartItems:o.items,crossSellsProducts:o.crossSells,cartFees:o.fees,cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors,cartTotals:s,cartIsLoading:c,cartErrors:r,billingData:(0,$.TU)(o.billingAddress),billingAddress:(0,$.TU)(o.billingAddress),shippingAddress:(0,$.TU)(o.shippingAddress),extensions:o.extensions,shippingRates:o.shippingRates,isLoadingRates:n,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements,receiveCart:(0,w.dispatch)(oc).receiveCart},cartTotals:o.totals,cartNeedsShipping:o.needsShipping,billingData:o.billingAddress,billingAddress:o.billingAddress,shippingAddress:o.shippingAddress,selectedShippingMethods:i,paymentMethods:o.paymentMethods,paymentRequirements:o.paymentRequirements}}return e})(),n=(0,Gs.getPaymentMethods)(),i=(0,us.Y)(),{removeNotice:a}=(0,w.useDispatch)("core/notices"),{dispatchCheckoutEvent:l}=(0,vr.y)(),d=(0,h.useMemo)(()=>{const e=Object.keys(r),t=new Set(e.flatMap(e=>r[e].map(e=>e.method.gateway))),o=Array.from(t).filter(e=>n[e]?.canMakePayment(c));return e.flatMap(e=>r[e].map(t=>{if(!o.includes(t.method.gateway))return;const r="cc"===e||"echeck"===e,c=t.method.gateway;return{name:`wc-saved-payment-method-token-${c}`,label:r?rc(t):sc(t),value:t.tokenId.toString(),onChange:e=>{const t=`wc-${c}-payment-token`;s(c,{token:e,payment_method:c,[t]:e.toString(),isSavedToken:!0}),a("wc-payment-error",H.tG.PAYMENTS),l("set-active-payment-method",{paymentMethodSlug:c})}}})).filter(e=>void 0!==e)},[r,n,s,a,l,c]),m=e&&n[t]&&void 0!==n[t]?.savedTokenComponent&&!(0,G.isNull)(n[t].savedTokenComponent)?(0,h.cloneElement)(n[t].savedTokenComponent,{token:e,...i}):null;return d.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.RadioControl,{highlightChecked:!0,id:"wc-payment-method-saved-tokens",selected:e,options:d,onChange:()=>{}}),m]}):null};s(9725),s(87215);const nc=({noPaymentMethods:e=(0,o.jsx)($s,{}),onlyExpressPayments:t=(0,o.jsx)(Ws,{})})=>{const{paymentMethodsInitialized:r,expressPaymentMethodsInitialized:s,availablePaymentMethods:c,availableExpressPaymentMethods:n,savedPaymentMethods:i}=(0,w.useSelect)(e=>{const t=e(U.paymentStore);return{paymentMethodsInitialized:t.paymentMethodsInitialized(),expressPaymentMethodsInitialized:t.expressPaymentMethodsInitialized(),availablePaymentMethods:t.getAvailablePaymentMethods(),availableExpressPaymentMethods:t.getAvailableExpressPaymentMethods(),savedPaymentMethods:t.getSavedPaymentMethods()}}),a=Object.keys(c).length>0,l=Object.keys(n).length>0;if(r&&s){if(!a&&!l)return e;if(l&&!a)return t}return(0,o.jsxs)(Hs.T,{isLoading:!r||!s,skeleton:(0,o.jsx)(Fs,{}),children:[(0,o.jsx)(cc,{}),Object.keys(i).length>0&&(0,o.jsx)(R.Label,{label:(0,S.__)("Use another payment method.","woocommerce"),screenReaderLabel:(0,S.__)("Other available payment methods","woocommerce"),wrapperElement:"p",wrapperProps:{className:"wc-block-components-checkout-step__description-payments-aligned"}}),(0,o.jsx)(Ys,{})]})},ic=({noPaymentMethods:e})=>(0,o.jsx)(nc,{noPaymentMethods:e});var ac=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const lc=JSON.parse('{"T":{"cai":"#fff","fN2":"#101517"}}'),dc=({label:e,description:t,buttonLabel:r,buttonHref:s,icon:n=ac})=>(0,o.jsxs)(A.Placeholder,{icon:(0,o.jsx)(c.A,{icon:n}),label:e,className:"wc-block-checkout__configure-placeholder",children:[(0,o.jsx)("span",{className:"wc-block-checkout__configure-placeholder-description",children:t}),(0,o.jsx)(A.Button,{variant:"primary",href:s,target:"_blank",rel:"noopener noreferrer",style:{backgroundColor:lc.T.fN2,color:lc.T.cai,pointerEvents:"all"},children:r})]}),uc={...Br({defaultTitle:(0,S.__)("Payment options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},mc=JSON.parse('{"DD":"Payment Options","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-payment-block",{apiVersion:mc.XV,title:mc.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ls.A,className:"wc-block-editor-components-block-icon"})},attributes:uc,edit:({attributes:t,setAttributes:r})=>{const s=(0,b.getSetting)("globalPaymentMethods"),c=(0,w.select)(U.paymentStore).getIncompatiblePaymentMethods(),n=(0,S.__)("Incompatible with block-based checkout","woocommerce"),a=J.r7.wordCountType;return(0,o.jsxs)(L,{attributes:t,setAttributes:r,className:(0,e.A)("wc-block-checkout__payment-method",t?.className),children:[(0,o.jsx)(i.InspectorControls,{children:s.length>0&&(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Methods","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("You currently have the following payment integrations active.","woocommerce")}),s.map(e=>{const t=!!c[e.id];let r;return r="words"===a?(0,Ms.G$)(e.description,30,void 0,!1):(0,Ms.Bk)(e.description,30,"characters_including_spaces"===a,void 0,!1),(0,o.jsx)(Os.A,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:r,...t?{warning:n}:{}},e.id)}),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`,children:(0,S.__)("Manage payment methods","woocommerce")})]})}),(0,o.jsx)(z.A,{children:(0,o.jsx)(ic,{noPaymentMethods:(0,o.jsx)(dc,{icon:Ls.A,label:(0,S.__)("Payment options","woocommerce"),description:(0,S.__)("Your store does not have any payment methods that support the Checkout block. Once you have configured a compatible payment method it will be displayed here.","woocommerce"),buttonLabel:(0,S.__)("Configure Payment Options","woocommerce"),buttonHref:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=checkout`})})}),(0,o.jsx)(O,{block:p.innerBlockAreas.PAYMENT_METHODS})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});var pc=s(95309),hc=s(41323),gc=s(39011),wc=(s(42831),s(40808));const _c=()=>{const{isCalculating:t,isProcessing:r,isAfterProcessing:s,isBeforeProcessing:c,isComplete:n,hasError:i,availableExpressPaymentMethods:a={},expressPaymentMethodsInitialized:d,isExpressPaymentMethodActive:u,registeredExpressPaymentMethods:m={}}=(0,w.useSelect)(e=>{const t=e(U.checkoutStore),o=e(U.paymentStore);return{isCalculating:t.isCalculating(),isProcessing:t.isProcessing(),isAfterProcessing:t.isAfterProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete(),hasError:t.hasError(),availableExpressPaymentMethods:o.getAvailableExpressPaymentMethods(),expressPaymentMethodsInitialized:o.expressPaymentMethodsInitialized(),isExpressPaymentMethodActive:o.isExpressPaymentMethodActive(),registeredExpressPaymentMethods:o.getRegisteredExpressPaymentMethods()}},[]),{isEditor:p}=(0,l.m)(),{hasRegisteredExpressPaymentMethods:h,hasRegisteredNotInitializedExpressPaymentMethods:g,hasNoValidRegisteredExpressPaymentMethods:_,availableExpressPaymentsCount:x}=(0,wc.m)({availableExpressPaymentMethods:a,expressPaymentMethodsInitialized:d,registeredExpressPaymentMethods:m});if(!h||_)return p||b.CURRENT_USER_IS_ADMIN?(0,o.jsx)(R.StoreNoticesContainer,{context:H.tG.EXPRESS_PAYMENTS}):null;const f=r||s||c||n&&!i||u,y=!u&&(t||g);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:(0,e.A)("wc-block-components-express-payment","wc-block-components-express-payment--checkout",{"wc-block-components-express-payment--disabled":f}),"aria-disabled":f,"aria-live":"polite",...f&&{"aria-busy":!0,"aria-label":(0,S.__)("Processing express checkout","woocommerce")},children:[(0,o.jsx)("div",{className:"wc-block-components-express-payment__title-container",children:(0,o.jsx)("h2",{className:"wc-block-components-express-payment__title",children:g?(0,o.jsx)(Vs.E,{width:"127px",height:"20px",ariaMessage:(0,S.__)("Loading express payment area…","woocommerce")}):(0,S.__)(" Express Checkout","woocommerce")})}),(0,o.jsxs)("div",{className:"wc-block-components-express-payment__content",children:[(0,o.jsx)(R.StoreNoticesContainer,{context:H.tG.EXPRESS_PAYMENTS}),y?(0,o.jsx)("ul",{className:"wc-block-components-express-payment__event-buttons",children:Array.from({length:x}).map((e,t)=>(0,o.jsx)("li",{children:(0,o.jsx)(Vs.E,{height:"48px",ariaMessage:(0,S.__)("Loading express payment method…","woocommerce")})},t))}):(0,o.jsx)(gc.A,{})]})]}),(0,o.jsx)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout",children:(0,S.__)("Or continue below","woocommerce")})]})},bc=({className:e})=>{const{cartNeedsPayment:t}=(0,ms.V)();return t?(0,o.jsx)("div",{className:e,children:(0,o.jsx)(_c,{})}):null};s(56715);var xc=s(9051);const fc=JSON.parse('{"DD":"Express Checkout","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-express-payment-block",{apiVersion:fc.XV,title:fc.DD,icon:{src:(0,o.jsx)(c.A,{style:{fill:"none"},icon:pc.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:t,setAttributes:r})=>{const{paymentMethods:s,isInitialized:c}=(0,ds.u)(),n=Object.keys(s).length>0,a=(0,i.useBlockProps)({className:(0,e.A)({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":n},t?.className),attributes:t});if(!c||!n)return null;const{buttonHeight:l,buttonBorderRadius:d,showButtonStyles:u}=t;return(0,o.jsxs)("div",{...a,children:[(0,o.jsx)(hc.b,{attributes:t,setAttributes:r}),(0,o.jsx)(xc.W.Provider,{value:{showButtonStyles:u,buttonHeight:l,buttonBorderRadius:d},children:(0,o.jsx)(bc,{})})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var yc=(0,o.jsx)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(t.Path,{d:"M3 6.75C3 5.784 3.784 5 4.75 5H15V7.313l.05.027 5.056 2.73.394.212v3.468a1.75 1.75 0 01-1.75 1.75h-.012a2.5 2.5 0 11-4.975 0H9.737a2.5 2.5 0 11-4.975 0H3V6.75zM13.5 14V6.5H4.75a.25.25 0 00-.25.25V14h.965a2.493 2.493 0 011.785-.75c.7 0 1.332.287 1.785.75H13.5zm4.535 0h.715a.25.25 0 00.25-.25v-2.573l-4-2.16v4.568a2.487 2.487 0 011.25-.335c.7 0 1.332.287 1.785.75zM6.282 15.5a1.002 1.002 0 00.968 1.25 1 1 0 10-.968-1.25zm9 0a1 1 0 101.937.498 1 1 0 00-1.938-.498z"})}),vc=s(41607);const kc=({minRate:e,maxRate:t,multiple:r=!1})=>{if(void 0===e||void 0===t)return null;const s=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),c=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(t.price,10)+parseInt(t.taxes,10):parseInt(t.price,10),n=0===s&&0===c?(0,o.jsx)("em",{children:(0,S.__)("free","woocommerce")}):(0,o.jsx)(R.FormattedMonetaryAmount,{currency:(0,hs.getCurrencyFromPriceResponse)(e),value:s});return(0,o.jsx)("span",{className:"wc-block-checkout__shipping-method-option-price",children:s!==c||r?(0,h.createInterpolateElement)(0===s&&0===c?"<price />":(0,S.__)("from <price />","woocommerce"),{price:n}):n})};var jc=s(80305);function Cc(e){return e?{min:e.reduce((e,t)=>(0,jc.jV)(t.method_id)?e:void 0===e||parseInt(t.price,10)<parseInt(e.price,10)?t:e,void 0),max:e.reduce((e,t)=>(0,jc.jV)(t.method_id)?e:void 0===e||parseInt(t.price,10)>parseInt(e.price,10)?t:e,void 0)}:{min:void 0,max:void 0}}function Sc(e){return e?{min:e.reduce((e,t)=>(0,jc.jV)(t.method_id)&&(void 0===e||t.price<e.price)?t:e,void 0),max:e.reduce((e,t)=>(0,jc.jV)(t.method_id)&&(void 0===e||t.price>e.price)?t:e,void 0)}:{min:void 0,max:void 0}}s(86336);const Ac=(0,S.__)("Pickup","woocommerce"),Nc=(0,S.__)("Ship","woocommerce"),Pc=({checked:t,rate:r,showPrice:s,showIcon:n,toggleText:a,setAttributes:l,onClick:d})=>(0,o.jsxs)(ue.$,{render:(0,o.jsx)("div",{}),className:(0,e.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"pickup"===t}),onClick:d,children:[!0===n&&(0,o.jsx)(c.A,{icon:vc.A,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,o.jsx)(i.RichText,{value:a,placeholder:Ac,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>l({localPickupText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===s&&(0,o.jsx)(kc,{minRate:r.min,maxRate:r.max})]}),Bc=({checked:t,rate:r,showPrice:s,showIcon:n,toggleText:a,setAttributes:l,onClick:d})=>{const u=void 0===r.min?(0,o.jsx)("span",{className:"wc-block-checkout__shipping-method-option-price",children:(0,S.__)("calculated with an address","woocommerce")}):(0,o.jsx)(kc,{minRate:r.min,maxRate:r.max});return(0,o.jsxs)(ue.$,{render:(0,o.jsx)("div",{}),className:(0,e.A)("wc-block-checkout__shipping-method-option",{"wc-block-checkout__shipping-method-option--selected":"shipping"===t}),onClick:d,children:[!0===n&&(0,o.jsx)(c.A,{icon:yc,size:28,className:"wc-block-checkout__shipping-method-option-icon"}),(0,o.jsx)(i.RichText,{value:a,placeholder:Nc,tagName:"span",className:"wc-block-checkout__shipping-method-option-title",onChange:e=>l({shippingText:e}),__unstableDisableFormats:!0,preserveWhiteSpace:!0}),!0===s&&u]})},Ic={...Br({defaultTitle:(0,S.__)("Delivery","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},showIcon:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!1},localPickupText:{type:"string",default:Ac},shippingText:{type:"string",default:Nc},lock:{type:"object",default:{move:!0,remove:!0}}},Tc=JSON.parse('{"DD":"Delivery","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-shipping-method-block",{apiVersion:Tc.XV,title:Tc.DD,icon:{src:(0,o.jsx)(c.A,{icon:yc,className:"wc-block-editor-components-block-icon"})},attributes:Ic,edit:({attributes:t,setAttributes:r})=>{(0,h.useEffect)(()=>{const e=(0,b.getSetting)("localPickupText",t.localPickupText);r({localPickupText:e})},[r]);const{setPrefersCollection:s}=(0,w.useDispatch)(U.checkoutStore),{prefersCollection:c}=(0,w.useSelect)(e=>({prefersCollection:e(U.checkoutStore).prefersCollection()})),{showPrice:n,showIcon:a,className:l,localPickupText:d,shippingText:u}=t,{shippingRates:m,needsShipping:g,hasCalculatedShipping:_,isCollectable:x}=(0,vs.m)();if(!(g&&_&&m&&x&&J.F7))return null;const f=e=>{s("pickup"===e)};return(0,o.jsxs)(L,{attributes:t,setAttributes:r,className:(0,e.A)("wc-block-checkout__shipping-method",l),children:[(0,o.jsxs)(i.InspectorControls,{children:[(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Appearance","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Choose how this block is displayed to your customers.","woocommerce")}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Show icon","woocommerce"),checked:a,onChange:()=>r({showIcon:!a})}),(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Show costs","woocommerce"),checked:n,onChange:()=>r({showPrice:!n})})]}),(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Shipping Methods","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Methods can be made managed in your store settings.","woocommerce")}),(0,o.jsx)(Os.A,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`,title:(0,S.__)("Shipping","woocommerce"),description:(0,S.__)("Manage your shipping zones, methods, and rates.","woocommerce")},"shipping_methods"),(0,o.jsx)(Os.A,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=pickup_location`,title:(0,S.__)("Pickup","woocommerce"),description:(0,S.__)("Allow customers to choose a local pickup location during checkout.","woocommerce")},"pickup_location")]})]}),(0,o.jsxs)("div",{id:"shipping-method",className:"wc-block-checkout__shipping-method-container",role:"radiogroup",children:[(0,o.jsx)(Bc,{checked:c?"pickup":"shipping",rate:Cc(m[0]?.shipping_rates),onClick:()=>{f("shipping")},showPrice:n,showIcon:a,setAttributes:r,toggleText:u}),(0,o.jsx)(Pc,{checked:c?"pickup":"shipping",rate:Sc(m[0]?.shipping_rates),showPrice:n,onClick:()=>{f("pickup")},showIcon:a,setAttributes:r,toggleText:d})]}),(0,o.jsx)(O,{block:p.innerBlockAreas.SHIPPING_METHOD})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});var Ec=s(4138);s(31215);const Rc=()=>(0,o.jsxs)("div",{className:"wc-block-components-skeleton wc-block-components-skeleton--checkout-shipping","aria-live":"polite","aria-label":(0,S.__)("Loading shipping options…","woocommerce"),children:[(0,o.jsx)(Vs.E,{height:"20px",width:"20px",borderRadius:"100%"}),(0,o.jsx)(Vs.E,{height:"20px",maxWidth:"148px"}),(0,o.jsx)(Vs.E,{height:"20px",width:"50px"})]}),Dc=({packageData:e})=>(0,o.jsx)("ul",{className:"wc-block-components-shipping-rates-control__package-items",children:Object.values(e.items).map(e=>{const t=(0,W.decodeEntities)(e.name),r=e.quantity;return(0,o.jsx)("li",{className:"wc-block-components-shipping-rates-control__package-item",children:(0,o.jsx)(R.Label,{label:r>1?`${t} × ${r}`:`${t}`,allowHTML:!0,screenReaderLabel:(0,S.sprintf)(/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ /* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ (0,S._n)("%1$s (%2$d unit)","%1$s (%2$d units)",r,"woocommerce"),t,r)})},e.key)})});var Lc=s(66342);const Oc=({packageItem:e,cartItems:t=[]})=>{const r=t?.find(t=>t.key===e.key),s=r?.images||[];return(0,o.jsx)(Lc.A,{image:s.length?s[0]:{},fallbackAlt:r?.name||""})},Mc=e=>{const t=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);let r=(0,o.jsxs)(o.Fragment,{children:[Number.isFinite(t)&&(0,o.jsx)(R.FormattedMonetaryAmount,{currency:(0,hs.getCurrencyFromPriceResponse)(e),value:t}),(0,o.jsxs)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time",children:[Number.isFinite(t)&&e.delivery_time?" — ":null,(0,W.decodeEntities)(e.delivery_time)]})]});return 0===t&&(r=(0,o.jsxs)("span",{className:"wc-block-components-shipping-rates-control__package__description--free",children:[(0,S.__)("Free","woocommerce"),(0,o.jsx)("span",{className:"wc-block-components-shipping-rates-control__package__delivery_time",children:e.delivery_time&&" — "+(0,W.decodeEntities)(e.delivery_time)})]})),{label:(0,W.decodeEntities)(e.name),value:e.rate_id,description:r}},Vc=({className:e="",noResultsMessage:t,onSelectRate:r,rates:s,renderOption:c=Mc,selectedRate:n,disabled:i=!1,highlightChecked:a=!1,manageSelectionLocally:l=!0})=>{const d=n?.rate_id,[u,m]=(0,h.useState)(()=>(0,jc.iS)(s));if((0,h.useEffect)(()=>{l&&u&&r(u)},[]),(0,h.useEffect)(()=>{l&&d&&d!==u&&m(d)},[d,l]),0===s.length)return t;const p=l?u:d;return(0,o.jsx)(R.RadioControl,{className:e,onChange:e=>{l&&m(e),r(e)},highlightChecked:a,disabled:i,selected:p??"",options:s.map(c),descriptionStackingDirection:"column"})};s(2793);const Fc=({packageId:t,className:r="",noResultsMessage:s,renderOption:c,packageData:n,collapsible:i,showItems:a,highlightChecked:l=!1,manageSelectionLocally:d=!0})=>{const{selectShippingRate:u,shippingRates:m}=(0,vs.m)(),{cartItems:p}=(0,ms.V)(),g=m?.length||1,[w,_]=(0,h.useState)(0),b=g>1||w>1;(0,h.useEffect)(()=>{const e=()=>{_(document.querySelectorAll(".wc-block-components-shipping-rates-control__package").length)};e();const t=new MutationObserver(e);return t.observe(document.body,{childList:!0,subtree:!0}),()=>{t.disconnect()}},[]);const x=a??b,f=i??b,y=(0,h.useMemo)(()=>n?.shipping_rates?.find(e=>e?.selected),[n?.shipping_rates]);let v=null;if((f||x)&&(v=(0,o.jsxs)("div",{className:"wc-block-components-shipping-rates-control__package-header",children:[(0,o.jsx)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:(0,be.sanitizeHTML)(String(n.name??""))}}),f&&(0,o.jsx)("div",{className:"wc-block-components-totals-shipping__via",children:(0,W.decodeEntities)(y?.name)}),x&&(0,o.jsx)(Dc,{packageData:n})]}),b)){const e=n.items||[];v=(0,o.jsxs)("div",{className:"wc-block-components-shipping-rates-control__package-container",children:[v,(0,o.jsx)("div",{className:"wc-block-components-shipping-rates-control__package-thumbnails",children:e.slice(0,3).map(e=>(0,o.jsx)(Oc,{packageItem:e,cartItems:p},e.key))})]})}const k=(0,h.useCallback)(e=>{u(e,t)},[t,u]),j={className:r,noResultsMessage:s,rates:n.shipping_rates,onSelectRate:k,selectedRate:n.shipping_rates.find(e=>e.selected),renderOption:c,highlightChecked:l,manageSelectionLocally:d};return f?(0,o.jsx)(R.Panel,{className:(0,e.A)("wc-block-components-shipping-rates-control__package",b&&"wc-block-components-shipping-rates-control__package--multiple",r),initialOpen:!1,title:v,children:(0,o.jsx)(Vc,{...j})}):(0,o.jsxs)("div",{className:(0,e.A)("wc-block-components-shipping-rates-control__package",b&&"wc-block-components-shipping-rates-control__package--multiple",r),children:[v,(0,o.jsx)(Vc,{...j})]})};var Hc=s(20195);const zc=({packages:e,showItems:t,collapsible:r,noResultsMessage:s,renderOption:c,context:n=""})=>{const{selectShippingRate:i}=(0,vs.m)(),{isEditor:a}=(0,l.m)(),d=(0,h.useRef)(new Set);return(0,h.useEffect)(()=>{if(a)return;const t=new Set(e.map(e=>e.package_id));d.current.forEach(e=>{t.has(e)||d.current.delete(e)}),e.forEach(e=>{const t=(0,jc.iS)(e.shipping_rates);t?d.current.has(e.package_id)||(d.current.add(e.package_id),i(t,e.package_id)):d.current.delete(e.package_id)})},[e,i,a]),e.length?(0,o.jsx)(o.Fragment,{children:e.map(({package_id:e,...i})=>(0,o.jsx)(Fc,{highlightChecked:"woocommerce/cart"!==n,packageId:e,packageData:i,collapsible:r,showItems:t,noResultsMessage:s,renderOption:c,manageSelectionLocally:a},e))}):null},$c=({shippingRates:e,isLoadingRates:t,className:r,collapsible:s,showItems:c,noResultsMessage:n=(0,o.jsx)(o.Fragment,{}),renderOption:i,context:a})=>{const d=(0,jc.Lb)(e),u=(0,jc.T4)(e),m=(0,se.Z)(d),g=(0,se.Z)(u);(0,h.useEffect)(()=>{var e,o;t||m===d&&g===u||(o=d,1===(e=u)?(0,Hc.speak)((0,S.sprintf)(/* translators: %d number of shipping options found. */ /* translators: %d number of shipping options found. */ (0,S._n)("%d shipping option was found.","%d shipping options were found.",o,"woocommerce"),o)):(0,Hc.speak)((0,S.sprintf)(/* translators: %d number of shipping packages packages. */ /* translators: %d number of shipping packages packages. */ (0,S._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woocommerce"),e)+" "+(0,S.sprintf)(/* translators: %d number of shipping options available. */ /* translators: %d number of shipping options available. */ (0,S._n)("%d shipping option was found","%d shipping options were found",o,"woocommerce"),o)))},[t,d,u,m,g]);const{extensions:w,receiveCart:_,...b}=(0,ms.V)(),x={className:r,collapsible:s,showItems:c,noResultsMessage:n,renderOption:i,extensions:w,cart:b,components:{ShippingRatesControlPackage:Fc},context:a},{isEditor:f}=(0,l.m)(),{hasSelectedLocalPickup:y,selectedRates:v}=(0,vs.m)(),k=(0,G.isObject)(v)?Object.values(v):[],j=k.every(e=>e===k[0]);return t?(0,o.jsx)(Rc,{}):(0,o.jsxs)(Ec.A,{isLoading:t,screenReaderLabel:(0,S.__)("Loading shipping rates…","woocommerce"),showSpinner:!0,children:[y&&"woocommerce/cart"===a&&e.length>1&&!j&&!f&&(0,o.jsx)(zs.A,{className:"wc-block-components-notice",isDismissible:!1,status:"warning",children:(0,S.__)("Multiple shipments must have the same pickup location","woocommerce")}),(0,o.jsx)(p.ExperimentalOrderShippingPackages.Slot,{...x}),(0,o.jsx)(p.ExperimentalOrderShippingPackages,{children:(0,o.jsx)(zc,{packages:e,noResultsMessage:n,renderOption:i})})]})};var Wc=s(51067);const Gc=e=>{const t=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),r=e?.selected,s=0===t?(0,o.jsx)("span",{className:"wc-block-checkout__shipping-option--free",children:(0,S.__)("Free","woocommerce")}):(0,o.jsx)(R.FormattedMonetaryAmount,{currency:(0,hs.getCurrencyFromPriceResponse)(e),value:t});return{label:(0,W.decodeEntities)(e.name),value:e.rate_id,description:(0,W.decodeEntities)(e.delivery_time),secondaryLabel:s,secondaryDescription:r&&e.description?(0,o.jsx)(Wc.A,{maxLines:2,children:(0,W.decodeEntities)(e.description)}):void 0}},qc=()=>(0,o.jsx)("p",{role:"status","aria-live":"polite",className:"wc-block-components-shipping-rates-control__no-shipping-address-message",children:(0,S.__)("Enter a shipping address to view shipping options.","woocommerce")}),Uc=({noShippingPlaceholder:e=null})=>{const{isEditor:t}=(0,l.m)(),{shippingRates:r,needsShipping:s,isLoadingRates:c,hasCalculatedShipping:n,isCollectable:i}=(0,vs.m)(),{shippingAddress:a}=(0,kr.q)(),d=(0,h.useMemo)(()=>i?r.map(e=>({...e,shipping_rates:e.shipping_rates.filter(e=>!(0,jc.jV)(e.method_id))})):r,[r,i]);if(!s)return null;const u=(0,jc.T4)(r);if(!n&&!u)return(0,o.jsx)(qc,{});const m=(0,$.Z$)(a);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.StoreNoticesContainer,{context:H.tG.SHIPPING_METHODS}),t&&!u?e:(0,o.jsx)($c,{noResultsMessage:(0,o.jsx)(o.Fragment,{children:m?(0,o.jsx)(zs.A,{isDismissible:!1,className:"wc-block-components-shipping-rates-control__no-results-notice",status:"warning",children:(0,S.__)("No shipping options are available for this address. Please verify the address is correct or try a different address.","woocommerce")}):(0,o.jsx)(qc,{})}),renderOption:Gc,collapsible:!1,shippingRates:d,isLoadingRates:c,context:"woocommerce/checkout"})]})};s(1393);const Yc={...Br({defaultTitle:(0,S.__)("Shipping options","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Zc=JSON.parse('{"DD":"Shipping Options","XV":3}');s(37693),(0,n.registerBlockType)("woocommerce/checkout-shipping-methods-block",{apiVersion:Zc.XV,title:Zc.DD,icon:{src:(0,o.jsx)(c.A,{icon:yc,className:"wc-block-editor-components-block-icon"})},attributes:Yc,edit:({attributes:t,setAttributes:r})=>{const s=(0,b.getSetting)("globalShippingMethods"),c=(0,b.getSetting)("activeShippingZones"),{showShippingMethods:n}=(0,E.C)();return n?(0,o.jsxs)(L,{attributes:t,setAttributes:r,className:(0,e.A)("wc-block-checkout__shipping-option",t?.className),children:[(0,o.jsxs)(i.InspectorControls,{children:[(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Shipping Calculations","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Options that control shipping can be managed in your store settings.","woocommerce")}),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=options`,children:(0,S.__)("Manage shipping options","woocommerce")})," "]}),s.length>0&&(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Methods","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("The following shipping integrations are active on your store.","woocommerce")}),s.map(e=>(0,o.jsx)(Os.A,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description},e.id)),(0,o.jsx)(A.ExternalLink,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`,children:(0,S.__)("Manage shipping methods","woocommerce")})]}),c.length&&(0,o.jsxs)(A.PanelBody,{title:(0,S.__)("Shipping Zones","woocommerce"),children:[(0,o.jsx)("p",{className:"wc-block-checkout__controls-text",children:(0,S.__)("Shipping Zones can be made managed in your store settings.","woocommerce")}),c.map(e=>(0,o.jsx)(Os.A,{href:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description},e.id))]})]}),(0,o.jsx)(z.A,{children:(0,o.jsx)(Uc,{noShippingPlaceholder:(0,o.jsx)(dc,{icon:yc,label:(0,S.__)("Shipping options","woocommerce"),description:(0,S.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woocommerce"),buttonLabel:(0,S.__)("Configure Shipping Options","woocommerce"),buttonHref:`${b.ADMIN_URL}admin.php?page=wc-settings&tab=shipping`})})}),(0,o.jsx)(O,{block:p.innerBlockAreas.SHIPPING_METHODS})]}):null},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})}),s(11817);const Jc=({title:t,packageData:r,showItems:s,selectedOption:c,pickupLocations:n,renderPickupLocation:i,packageCount:a,onChange:l})=>{const{shippingRates:d}=(0,vs.m)(),{cartItems:u}=(0,ms.V)(),m=(d?.length||1)>1||document.querySelectorAll(".wc-block-components-local-pickup-select .wc-block-components-radio-control").length>1,p=s??m;let h=m&&t&&(0,o.jsx)("div",{children:t});if((m||p)&&r&&(h=(0,o.jsxs)("div",{className:"wc-block-components-shipping-rates-control__package-header",children:[(0,o.jsx)("div",{className:"wc-block-components-shipping-rates-control__package-title",dangerouslySetInnerHTML:{__html:(0,be.sanitizeHTML)(String(r.name??""))}}),p&&(0,o.jsx)(Dc,{packageData:r})]}),m)){const e=r.items||[];h=(0,o.jsxs)("div",{className:"wc-block-components-shipping-rates-control__package-container",children:[h,(0,o.jsx)("div",{className:"wc-block-components-shipping-rates-control__package-thumbnails",children:e.slice(0,3).map(e=>(0,o.jsx)(Oc,{packageItem:e,cartItems:u},e.key))})]})}return(0,o.jsxs)("div",{className:(0,e.A)("wc-block-components-local-pickup-select",m&&"wc-block-components-local-pickup-select--multiple"),children:[h,(0,o.jsx)(R.RadioControl,{onChange:l,highlightChecked:!0,selected:c,options:n.map(e=>i(e,a,c))})]})},Xc=(e,t,r="")=>{const s=(0,b.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),n=(e=>{if(e?.meta_data){const t=e.meta_data.find(e=>"pickup_location"===e.key);return t?t.value:""}return""})(e),i=(e=>{if(e?.meta_data){const t=e.meta_data.find(e=>"pickup_address"===e.key);return t?t.value:""}return""})(e),a=(e=>{if(e?.meta_data){const t=e.meta_data.find(e=>"pickup_details"===e.key);return t?t.value:""}return""})(e);let l=(0,o.jsx)("em",{children:(0,S.__)("free","woocommerce")});return s>0&&(l=1===t?(0,o.jsx)(R.FormattedMonetaryAmount,{currency:(0,hs.getCurrencyFromPriceResponse)(e),value:s}):(0,h.createInterpolateElement)(/* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ /* translators: <price/> is the price of the package, <packageCount/> is the number of packages. These must appear in the translated string. */ (0,S._n)("<price/> x <packageCount/> package","<price/> x <packageCount/> packages",t,"woocommerce"),{price:(0,o.jsx)(R.FormattedMonetaryAmount,{currency:(0,hs.getCurrencyFromPriceResponse)(e),value:s}),packageCount:(0,o.jsx)(o.Fragment,{children:t})})),{value:e.rate_id,label:n?(0,W.decodeEntities)(n):(0,W.decodeEntities)(e.name),secondaryLabel:l,description:i?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.A,{icon:T.A,className:"wc-block-editor-components-block-icon",width:16,height:16}),(0,W.decodeEntities)(i)]}):void 0,secondaryDescription:r===e?.rate_id&&a?(0,o.jsx)(Wc.A,{maxLines:2,children:(0,W.decodeEntities)(a)}):void 0}},Qc=()=>{const{shippingRates:e,selectShippingRate:t}=(0,vs.m)(),r=(0,h.useMemo)(()=>(e[0]?.shipping_rates||[]).filter(jc.J_),[e]),[s,c]=(0,h.useState)(()=>r.find(e=>e.selected)?.rate_id??r[0]?.rate_id),n=(0,h.useCallback)(e=>{c(e),t(e)},[c,t]);(0,h.useEffect)(()=>{s&&t(s)},[]),(0,h.useEffect)(()=>{const e=r.find(e=>e.selected),t=e?.rate_id;t&&t!==s&&c(t)},[r]);const{extensions:i,receiveCart:a,...l}=(0,ms.V)(),d={extensions:i,cart:l,components:{ShippingRatesControlPackage:Fc,LocalPickupSelect:Jc},renderPickupLocation:Xc},u=e[0]||null;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.ExperimentalOrderLocalPickupPackages.Slot,{...d}),(0,o.jsx)(p.ExperimentalOrderLocalPickupPackages,{children:(0,o.jsx)(Jc,{title:u?.name,packageData:u,selectedOption:s??"",renderPickupLocation:Xc,pickupLocations:r,packageCount:(0,jc.T4)(e),onChange:e=>n(e)})})]})},Kc={...Br({defaultTitle:(0,S.__)("Pickup locations","woocommerce"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},en=JSON.parse('{"DD":"Pickup Method","XV":3}');s(25991),(0,n.registerBlockType)("woocommerce/checkout-pickup-options-block",{apiVersion:en.XV,title:en.DD,icon:{src:(0,o.jsx)(c.A,{icon:vc.A,className:"wc-block-editor-components-block-icon"})},attributes:Kc,edit:({attributes:t,setAttributes:r})=>{const{prefersCollection:s}=(0,w.useSelect)(e=>({prefersCollection:e(U.checkoutStore).prefersCollection()})),{className:c}=t;return s&&J.F7?(0,o.jsxs)(L,{attributes:t,setAttributes:r,className:(0,e.A)("wc-block-checkout__shipping-method",c),children:[(0,o.jsx)(A.Disabled,{children:(0,o.jsx)(Qc,{})}),(0,o.jsx)(O,{block:p.innerBlockAreas.PICKUP_LOCATION})]}):null},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(M,{})})});var tn=s(37486);const on=({className:e=""})=>{const{cartTotals:t}=(0,ms.V)(),{isLoading:r}=(0,tn.n)(),s=(0,hs.getCurrencyFromPriceResponse)(t);return(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(R.Subtotal,{currency:s,values:t,showSkeleton:r})})},rn=JSON.parse('{"DD":"Subtotal","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-subtotal-block",{apiVersion:rn.XV,title:rn.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,r=(0,i.useBlockProps)();return(0,o.jsx)("div",{...r,children:(0,o.jsx)(on,{className:t})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});const sn=({className:e=""})=>{const{cartFees:t,cartTotals:r}=(0,ms.V)(),s=(0,hs.getCurrencyFromPriceResponse)(r);return(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(R.TotalsFees,{currency:s,cartFees:t})})};(0,n.registerBlockType)("woocommerce/checkout-order-summary-fee-block",{apiVersion:3,title:"Fees",icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,r=(0,i.useBlockProps)();return(0,o.jsx)("div",{...r,children:(0,o.jsx)(sn,{className:t})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var cn=s(37273);const nn=()=>{const{extensions:e,receiveCart:t,...r}=(0,ms.V)(),s={extensions:e,cart:r,context:"woocommerce/checkout"};return(0,o.jsx)(p.ExperimentalDiscountsMeta.Slot,{...s})},an=({className:e=""})=>{const{cartTotals:t,cartCoupons:r}=(0,ms.V)(),{removeCoupon:s,isRemovingCoupon:c}=(0,cn.k)("wc/checkout"),{isLoading:n}=(0,tn.n)(),i=(0,hs.getCurrencyFromPriceResponse)(t);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(As.n$,{cartCoupons:r,currency:i,isRemovingCoupon:c,removeCoupon:s,values:t,isLoading:n})}),(0,o.jsx)(nn,{})]})},ln=JSON.parse('{"DD":"Discount","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-discount-block",{apiVersion:ln.XV,title:ln.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,r=(0,i.useBlockProps)();return(0,o.jsx)("div",{...r,children:(0,o.jsx)(an,{className:t})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});const dn=({className:e=""})=>{const{cartNeedsShipping:t,shippingRates:r,shippingAddress:s}=(0,ms.V)(),c=(0,w.useSelect)(e=>e(U.checkoutStore).prefersCollection());if(!t)return null;const n=(0,jc.uo)(r,c??!1),i=(0,$.Z$)(s);return(0,o.jsx)(p.TotalsWrapper,{className:e,children:(0,o.jsx)(As.w7,{shippingRates:n,label:c?(0,S.__)("Pickup","woocommerce"):(0,S.__)("Delivery","woocommerce"),placeholder:(0,o.jsx)("span",{className:"wc-block-components-shipping-placeholder__value",children:i?(0,S.__)("No available delivery option","woocommerce"):(0,S.__)("Enter address to calculate","woocommerce")})})})},un=JSON.parse('{"DD":"Shipping","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-shipping-block",{apiVersion:un.XV,title:un.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,r=(0,i.useBlockProps)();return(0,o.jsx)("div",{...r,children:(0,o.jsx)(z.A,{children:(0,o.jsx)(dn,{className:t})})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var mn=s(17230);const pn=({className:e=""})=>{const t=(0,b.getSetting)("couponsEnabled",!0),{applyCoupon:r,isApplyingCoupon:s}=(0,cn.k)("wc/checkout");return t?(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(As._i,{onSubmit:r,isLoading:s,instanceId:"coupon"})}):null},hn=JSON.parse('{"DD":"Coupon Form","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-coupon-form-block",{apiVersion:hn.XV,title:hn.DD,icon:{src:(0,o.jsx)(c.A,{icon:mn.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e})=>{const{className:t}=e,r=(0,i.useBlockProps)();return(0,o.jsx)("div",{...r,children:(0,o.jsx)(z.A,{children:(0,o.jsx)(pn,{className:t})})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});const gn=({className:e,showRateAfterTaxName:t})=>{const{cartTotals:r}=(0,ms.V)(),{isLoading:s}=(0,tn.n)();if((0,b.getSetting)("displayCartPricesIncludingTax",!1)||parseInt(r.total_tax,10)<=0)return null;const c=(0,hs.getCurrencyFromPriceResponse)(r);return(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(R.TotalsTaxes,{showRateAfterTaxName:t,currency:c,values:r,showSkeleton:s})})},wn={showRateAfterTaxName:{type:"boolean",default:(0,b.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{remove:!0,move:!0}}},bn=JSON.parse('{"DD":"Taxes","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-taxes-block",{apiVersion:bn.XV,title:bn.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},attributes:wn,edit:({attributes:e,setAttributes:t})=>{const{className:r,showRateAfterTaxName:s}=e,c=(0,i.useBlockProps)(),n=(0,b.getSetting)("taxesEnabled"),a=(0,b.getSetting)("displayItemizedTaxes",!1),l=(0,b.getSetting)("displayCartPricesIncludingTax",!1);return(0,o.jsxs)("div",{...c,children:[(0,o.jsx)(i.InspectorControls,{children:n&&a&&!l&&(0,o.jsx)(A.PanelBody,{title:(0,S.__)("Taxes","woocommerce"),children:(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Show rate after tax name","woocommerce"),help:(0,S.__)("Show the percentage rate alongside each tax line in the summary.","woocommerce"),checked:s,onChange:()=>t({showRateAfterTaxName:!s})})})}),(0,o.jsx)(gn,{className:r,showRateAfterTaxName:s})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});var xn=s(10628),fn=s(24015),yn=s(56464),vn=s(30572),kn=s(90054),jn=s(5341),Cn=s(95754),Sn=s(12892),An=s(78196),Nn=s(66640),Pn=s(19968);const Bn=({cartItem:t,disableProductDescriptions:r})=>{const{images:s,show_backorder_badge:c,name:n,permalink:i,prices:a,quantity:l,short_description:d,description:u,item_data:m,variation:g,totals:w,extensions:_}=t,{receiveCart:x,...f}=(0,ms.V)(),y=(0,h.useMemo)(()=>({context:"summary",cartItem:t,cart:f}),[t,f]),v=(0,hs.getCurrencyFromPriceResponse)(a),k=(0,p.applyCheckoutFilter)({filterName:"itemName",defaultValue:n,extensions:_,arg:y}),j=(0,G.isString)(a.raw_prices.precision)?parseInt(a.raw_prices.precision,10):a.raw_prices.precision,C=(0,jn.i)((0,jn.n)((0,Cn.uE)({amount:parseInt(a.raw_prices.regular_price,10),currency:Sn.B3,scale:j}),v.minorUnit)).amount,A=(0,jn.i)((0,jn.n)((0,Cn.uE)({amount:parseInt(a.raw_prices.price,10),currency:Sn.B3,scale:j}),v.minorUnit)).amount,N=(0,hs.getCurrencyFromPriceResponse)(w);let P=parseInt(w.line_subtotal,10);(0,b.getSetting)("displayCartPricesIncludingTax",!1)&&(P+=parseInt(w.line_subtotal_tax,10));const B=(0,jn.i)((0,Cn.uE)({amount:P,currency:Sn.B3,scale:N.minorUnit})).amount,I=(0,kn.A)(a,v.minorUnit),T=(0,p.applyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",extensions:_,arg:y,validation:p.productPriceValidation}),E=(0,p.applyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",extensions:_,arg:y,validation:p.productPriceValidation}),D=(0,p.applyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",extensions:_,arg:y,validation:p.productPriceValidation}),L=(0,S._n)("Total price for <quantity/> <productName/> item: <price/>","Total price for <quantity/> <productName/> items: <price/>",l,"woocommerce"),O=(0,p.applyCheckoutFilter)({filterName:"cartItemScreenReaderPrice",defaultValue:L,extensions:_,arg:y,validation:p.productPriceScreenReaderValidation}).replace(/<(quantity|productName|price)\/>/g,(e,t)=>{switch(t){case"quantity":return String(l);case"productName":return k;case"price":return(0,hs.formatPrice)(B,N)}return""}),M=(0,p.applyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:_,arg:y}),V=r?{itemData:m,variation:g}:{itemData:m,variation:g,shortDescription:d,fullDescription:u};return(0,o.jsxs)("div",{className:(0,e.A)("wc-block-components-order-summary-item",M),children:[(0,o.jsxs)("div",{className:"wc-block-components-order-summary-item__image",children:[(0,o.jsx)("div",{className:"wc-block-components-order-summary-item__quantity",children:(0,o.jsx)(R.Label,{label:l.toString(),screenReaderLabel:(0,S.sprintf)(/* translators: %d number of products of the same type in the cart */ /* translators: %d number of products of the same type in the cart */ (0,S._n)("%d item","%d items",l,"woocommerce"),l)})}),(0,o.jsx)(Lc.A,{image:s.length?s[0]:{},fallbackAlt:k,width:48,height:48})]}),(0,o.jsxs)("div",{className:"wc-block-components-order-summary-item__description",children:[(0,o.jsx)(vn.A,{disabled:!0,name:k,permalink:i,disabledTagName:"h3"}),(0,o.jsx)("div",{className:"wc-block-cart-item__prices",children:(0,o.jsx)(yn.A,{currency:v,price:A,regularPrice:C,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:T})}),c&&(0,o.jsx)(An.A,{}),(0,o.jsx)(Nn.A,{...V})]}),(0,o.jsx)("span",{className:"screen-reader-text",children:O}),(0,o.jsx)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true",children:(0,o.jsxs)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper",children:[(0,o.jsx)(yn.A,{currency:N,format:D,price:B}),(0,o.jsx)(Pn.A,{currency:v,saleAmount:I*l,format:E})]})})]})};s(26161);const In=({cartItems:t=[],disableProductDescriptions:r=!1})=>{const{isLarge:s}=(0,Ps.G)(),{cartIsLoading:c,hasPendingItemsOperations:n}=(0,ms.V)(),i=c||n;return(0,o.jsx)(Hs.T,{isLoading:i,skeleton:(0,o.jsx)(fn.a,{rows:t?.length||2}),children:(0,o.jsx)("div",{className:(0,e.A)("wc-block-components-order-summary",{"is-large":s}),children:(0,o.jsx)("div",{className:"wc-block-components-order-summary__content",children:t.map(e=>(0,o.jsx)(Bn,{disableProductDescriptions:r,cartItem:e},e.key))})})})},Tn=({className:e="",disableProductDescriptions:t=!1})=>{const{cartItems:r}=(0,ms.V)();return(0,o.jsx)(R.TotalsWrapper,{className:e,children:(0,o.jsx)(In,{cartItems:r,disableProductDescriptions:t})})},En=JSON.parse('{"DD":"Cart Items","XV":3}');(0,n.registerBlockType)("woocommerce/checkout-order-summary-cart-items-block",{apiVersion:En.XV,title:En.DD,icon:{src:(0,o.jsx)(c.A,{icon:xn.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const{className:r="",disableProductDescriptions:s=!1}=e,c=(0,i.useBlockProps)();return(0,o.jsxs)("div",{...c,children:[(0,J.el)()&&(0,o.jsx)(i.InspectorControls,{children:(0,o.jsx)(A.PanelBody,{title:(0,S.__)("Settings","woocommerce"),children:(0,o.jsx)(A.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,S.__)("Disable product descriptions","woocommerce"),help:(0,S.__)("Disable display of product descriptions.","woocommerce"),checked:s,onChange:()=>t({disableProductDescriptions:!s})})})}),(0,o.jsx)(Tn,{disableProductDescriptions:s,className:r})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save()})});const Rn=JSON.parse('{"DD":"Totals","XV":3}');s(62739),(0,n.registerBlockType)("woocommerce/checkout-order-summary-totals-block",{apiVersion:Rn.XV,title:Rn.DD,icon:{src:(0,o.jsx)(c.A,{icon:Ss.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const t=(0,i.useBlockProps)(),r=(0,j.h)(p.innerBlockAreas.CHECKOUT_ORDER_SUMMARY_TOTALS),s=[["woocommerce/checkout-order-summary-subtotal-block",{},[]],["woocommerce/checkout-order-summary-fee-block",{},[]],["woocommerce/checkout-order-summary-discount-block",{},[]],["woocommerce/checkout-order-summary-shipping-block",{},[]],["woocommerce/checkout-order-summary-taxes-block",{},[]]];return(0,C.B)({clientId:e,registeredBlocks:r,defaultTemplate:s}),(0,o.jsx)("div",{...t,children:(0,o.jsx)(i.InnerBlocks,{allowedBlocks:r,template:s})})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save(),children:(0,o.jsx)(i.InnerBlocks.Content,{})})}),s(84259);var Dn=s(17554),Ln=s(39940);s(45446),(0,Dn.t)();const On=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],Mn={hasDarkControls:{type:"boolean",default:(0,b.getSetting)("hasDarkEditorStyleSupport",!1)},showRateAfterTaxName:{type:"boolean",default:(0,b.getSetting)("displayCartPricesIncludingTax",!1)}},Vn={showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},requireApartmentField:{type:"boolean",default:!1},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1}},Fn=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"example":{"viewportWidth":800},"attributes":{"align":{"type":"string","default":"wide"},"showFormStepNumbers":{"type":"boolean","default":false}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),Hn={icon:{src:(0,o.jsx)(c.A,{icon:r,className:"wc-block-editor-components-block-icon"})},attributes:{...Fn.attributes,...Mn,...Vn},edit:({clientId:t,attributes:r,setAttributes:s})=>{const{showOrderNotes:c,showPolicyLinks:n,showReturnToCart:x,showRateAfterTaxName:f,cartPageId:y,showFormStepNumbers:k=!1,hasDarkControls:j=!1}=r,C=(0,w.useSelect)(e=>e(_.store).getEditedEntityRecord("root","site"),[]),S={...b.defaultFields,...Object.fromEntries(Object.entries({phone:"optional",company:"hidden",address_2:"optional"}).map(([e,t])=>{const o=C[`woocommerce_checkout_${e}_field`]||t;return[e,{...b.defaultFields[e],required:"required"===o,hidden:"hidden"===o}]}))},A=(0,h.useRef)((0,g.getQueryArg)(window.location.href,"focus"));(0,h.useEffect)(()=>{"checkout"!==A.current||(0,w.select)("core/block-editor").hasSelectedBlock()||((0,w.dispatch)("core/block-editor").selectBlock(t),(0,w.dispatch)("core/interface").enableComplementaryArea("core/edit-site","edit-site/block-inspector"))},[t]);const N=(0,Dn.K)();return(0,o.jsxs)("div",{...N,children:[(0,o.jsx)(i.InspectorControls,{children:(0,o.jsx)(Ln.t,{attributes:r,setAttributes:s})}),(0,o.jsx)(l.z,{previewData:{previewCart:u.B,previewSavedPaymentMethods:m,defaultFields:S},children:(0,o.jsx)(p.SlotFillProvider,{children:(0,o.jsx)(d.s,{children:(0,o.jsx)(a.A,{className:(0,e.A)("wc-block-checkout",{"has-dark-controls":j}),children:(0,o.jsx)(v.Provider,{value:{showOrderNotes:c,showPolicyLinks:n,showReturnToCart:x,cartPageId:y,showRateAfterTaxName:f,showFormStepNumbers:k,defaultFields:S},children:(0,o.jsx)(i.InnerBlocks,{allowedBlocks:On,template:[["woocommerce/checkout-totals-block",{},[]],["woocommerce/checkout-fields-block",{},[]]],templateLock:"insert"})})})})})})]})},save:()=>(0,o.jsx)("div",{...i.useBlockProps.save({className:"wc-block-checkout is-loading"}),children:(0,o.jsx)(i.InnerBlocks.Content,{})}),transforms:{to:[{type:"block",blocks:["woocommerce/classic-shortcode"],transform:e=>(0,n.createBlock)("woocommerce/classic-shortcode",{shortcode:"checkout",align:e.align},[])}]},deprecated:[{attributes:{...Fn.attributes,...Mn,...Vn},save:({attributes:t})=>(0,o.jsx)("div",{className:(0,e.A)("is-loading",t.className)}),migrate:e=>{const{showOrderNotes:t,showPolicyLinks:o,showReturnToCart:r,cartPageId:s}=e;return[e,[(0,n.createBlock)("woocommerce/checkout-fields-block",{},[(0,n.createBlock)("woocommerce/checkout-express-payment-block",{},[]),(0,n.createBlock)("woocommerce/checkout-contact-information-block",{},[]),(0,n.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),(0,n.createBlock)("woocommerce/checkout-billing-address-block",{},[]),(0,n.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),(0,n.createBlock)("woocommerce/checkout-payment-block",{},[]),(0,n.createBlock)("woocommerce/checkout-additional-information-block",{},[]),!!t&&(0,n.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!o&&(0,n.createBlock)("woocommerce/checkout-terms-block",{},[]),(0,n.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:s},[])].filter(Boolean)),(0,n.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some(e=>"woocommerce/checkout-fields-block"===e.name)},{save:({attributes:t})=>(0,o.jsx)("div",{className:(0,e.A)("is-loading",t.className)}),isEligible:(e,t)=>{const o=t.find(e=>"woocommerce/checkout-fields-block"===e.name);return!!o&&!o.innerBlocks.some(e=>"woocommerce/checkout-additional-information-block"===e.name)},migrate:(e,t)=>{const o=t.findIndex(e=>"woocommerce/checkout-fields-block"===e.name);if(-1===o)return!1;const r=t[o],s=r.innerBlocks.findIndex(e=>"wp-block-woocommerce-checkout-payment-block"===e.name);return-1!==s&&(t[o]=r.innerBlocks.slice(0,s).concat((0,n.createBlock)("woocommerce/checkout-additional-information-block",{},[])).concat(t.slice(s+1,t.length)),[e,t])}}]};(0,n.registerBlockType)(Fn,Hn)})(),(()=>{"use strict";var e=s(5573),t=s(10790);const o=(0,t.jsxs)(e.SVG,{viewBox:"0 0 24 24",version:"1.1",id:"svg713",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("defs",{id:"defs705"}),(0,t.jsx)("path",{id:"path882",d:"m 19.199219,1.4501954 a 3.8,3.8 0 0 0 -3.72461,3.0996093 H 5.1992188 l -0.8984376,-2 H 1 v 2 h 2 l 3.5996094,7.5996093 -1.2988282,2.400391 a 2,2 0 0 0 1.6992188,3 h 12 v -2 H 7 l 1.0996094,-2 h 7.4999996 a 1.9,1.9 0 0 0 1.701172,-1 L 19.240234,9.0458985 A 3.8,3.8 0 0 0 23,5.2490235 3.8,3.8 0 0 0 19.199219,1.4501954 Z M 6.1757812,6.5087891 h 9.4433598 c 0.02007,0.055814 0.0433,0.1034655 0.06445,0.15625 a 3.8,3.8 0 0 0 0.08398,0.2050781 c 0.07333,0.1598062 0.153258,0.3011377 0.236328,0.4335937 0.194879,0.3107365 0.413084,0.5552137 0.646485,0.7578126 a 3.8,3.8 0 0 0 0.324218,0.2558593 3.8,3.8 0 0 0 0.228516,0.1601563 l -1.71093,3.0722659 H 8.5175781 Z M 7,18.549805 a 2,2 0 1 0 2,2 2,2 0 0 0 -2,-2 z m 10,0 a 2,2 0 0 0 -2,2 2,2 0 0 0 2,2 2,2 0 0 0 0.617188,-3.902344 A 2,2 0 0 0 17,18.549805 Z"})]});var r=s(93450),c=s(74997),n=s(52619);const i=JSON.parse('{"name":"woocommerce/mini-cart","version":"1.0.0","title":"Mini-Cart","icon":"miniCartAlt","description":"Display a button for shoppers to quickly view their cart.","category":"woocommerce","keywords":["WooCommerce"],"textdomain":"woocommerce","viewScriptModule":"woocommerce/mini-cart","style":"file:../woocommerce/mini-cart-style.css","editorStyle":"file:../woocommerce/mini-cart-editor.css","supports":{"html":false,"multiple":false,"typography":{"fontSize":true},"spacing":{"margin":true,"padding":true},"interactivity":true},"example":{"attributes":{"className":"wc-block-mini-cart--preview"}},"attributes":{"miniCartIcon":{"type":"string","default":"cart"},"addToCartBehaviour":{"type":"string","default":"none"},"onCartClickBehaviour":{"type":"string","default":"open_drawer"},"hasHiddenPrice":{"type":"boolean","default":true},"cartAndCheckoutRenderStyle":{"type":"string","default":"hidden"},"priceColor":{"type":"object"},"priceColorValue":{"type":"string"},"iconColor":{"type":"object"},"iconColorValue":{"type":"string"},"productCountColor":{"type":"object"},"productCountColorValue":{"type":"string"},"productCountVisibility":{"type":"string","default":"greater_than_zero"}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}');var a=s(94715),l=s(70910),d=s(56427),u=s(15703),m=s(27723),p=s(8840),h=s(15937),g=s(86087),w=s(91925),_=s(22510),b=s(45984),x=s(36352),f=s(47143);function y(e){for(;e;){const t=window.getComputedStyle(e).backgroundColor;if(t&&"rgba(0, 0, 0, 0)"!==t&&"transparent"!==t)return t;e=e.parentElement}return"rgb(255, 255, 255)"}const v=({colorTypes:e,miniCartButtonRef:o})=>{const r=(0,a.__experimentalUseMultipleOriginColorsAndGradients)(),s=(e=>{const t=[];return e.colors&&e.colors.forEach(e=>{t.push(...e.colors)}),e.gradients&&e.gradients.forEach(e=>{t.push(...e.gradients)}),t})(r),{clientId:c}=(0,a.useBlockEditContext)(),n=(0,f.useSelect)(e=>{const{getBlockAttributes:t}=e(a.store);return t(c)||{}},[c]),{updateBlockAttributes:i}=(0,f.useDispatch)(a.store),l=(0,g.useMemo)(()=>((e,t,o,r)=>Object.entries(e).reduce((e,[s,c])=>{const n=((e,t,o,r)=>s=>{const c=((e,t,o)=>{if(!t)return;const r=e?.find(e=>e.color===t||e.slug===t)||{};return r?.color||(r.color=t),r.class=(0,a.getColorClassName)(o,r?.slug),r})(o,s,t)||{};r({[e]:c})})(s,c.context,t,r),i={colorValue:o?.[s]?.color??void 0,label:c.label,onColorChange:n,resetAllFilter:()=>n()};return e.push(i),e},[]))(e,s,n,e=>i(c,e)),[e,s,i,n,c]),d=(0,g.useMemo)(()=>{if(!l||0===l.length)return;const e=[];for(let r=0;r<l.length;r++){const s=l[r];if(!s.colorValue||!o.current)continue;const c=y(o.current);(0,a.ContrastChecker)({backgroundColor:c,textColor:s.colorValue})&&e.push((0,t.jsxs)("div",{style:{gridColumnEnd:-1,gridColumnStart:1},children:[(0,t.jsx)("p",{children:s.label}),(0,t.jsx)(a.ContrastChecker,{backgroundColor:c,textColor:s.colorValue})]},s.label))}return e},[l,o]);return r.hasColorsOrGradients&&(0,t.jsxs)(a.InspectorControls,{group:"color",children:[(0,t.jsx)(a.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:l,panelId:c,...r}),d?.map(e=>e)]})};var k=s(8881);const j={name:void 0,color:void 0,slug:void 0};s(70274);var C=s(17560);s(23140);const S={...i.supports,typography:{...i.supports.typography,__experimentalFontFamily:!0,__experimentalFontWeight:!0}};(0,c.registerBlockType)(i,{icon:{src:(0,t.jsx)(r.A,{icon:o,className:"wc-block-editor-components-block-icon wc-block-editor-mini-cart__icon"})},supports:{...S},example:{...i.example},attributes:{...i.attributes},edit:({attributes:e,setAttributes:o})=>{const{cartAndCheckoutRenderStyle:s,addToCartBehaviour:c,onCartClickBehaviour:n,hasHiddenPrice:i,priceColor:f=j,iconColor:y=j,productCountColor:S=j,miniCartIcon:A,productCountVisibility:N}=function(e){const t={...e};return t.priceColorValue&&!t.priceColor&&(t.priceColor={color:e.priceColorValue},delete t.priceColorValue),t.iconColorValue&&!t.iconColor&&(t.iconColor={color:e.iconColorValue},delete t.iconColorValue),t.productCountColorValue&&!t.productCountColor&&(t.productCountColor={color:e.productCountColorValue},delete t.productCountColorValue),t}(e),P=(0,g.useRef)(null),B={priceColor:{label:(0,m.__)("Price","woocommerce"),context:"price-color"},iconColor:{label:(0,m.__)("Icon","woocommerce"),context:"icon-color"},productCountColor:{label:(0,m.__)("Product Count","woocommerce"),context:"product-count-color"}},I=(0,a.useBlockProps)({className:"wc-block-mini-cart"}),T=(0,h.I)(),E=(0,u.getSetting)("templatePartEditUri","");(0,C.F)("mini-cart-badge",({editorBackgroundColor:e,editorColor:t})=>`\n\t\t\tspan:where(.wc-block-mini-cart__badge) {\n\t\t\t\tcolor: ${e};\n\t\t\t\tbackground-color: ${t};\n\t\t\t}\n\t\t`);const R="never"===N||"always"===N?0:2;return(0,t.jsxs)("div",{...I,children:[(0,t.jsxs)(a.InspectorControls,{children:[(0,t.jsxs)(d.PanelBody,{title:(0,m.__)("Settings","woocommerce"),children:[(0,t.jsxs)(d.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"wc-block-editor-mini-cart__cart-icon-toggle",isBlock:!0,label:(0,m.__)("Cart Icon","woocommerce"),value:A,onChange:e=>{o({miniCartIcon:e})},children:[(0,t.jsx)(d.__experimentalToggleGroupControlOption,{value:"cart",label:(0,t.jsx)(r.A,{size:32,icon:w.A})}),(0,t.jsx)(d.__experimentalToggleGroupControlOption,{value:"bag",label:(0,t.jsx)(r.A,{size:32,icon:_.A})}),(0,t.jsx)(d.__experimentalToggleGroupControlOption,{value:"bag-alt",label:(0,t.jsx)(r.A,{size:32,icon:b.A})})]}),(0,t.jsx)(d.BaseControl,{__nextHasNoMarginBottom:!0,id:"wc-block-mini-cart__display-toggle",label:(0,m.__)("Display","woocommerce"),children:(0,t.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,m.__)("Display total price","woocommerce"),help:(0,m.__)("Toggle to display the total price of products in the shopping cart. If no products have been added, the price will not display.","woocommerce"),checked:!i,onChange:()=>o({hasHiddenPrice:!i})})}),(0,t.jsx)(d.BaseControl,{__nextHasNoMarginBottom:!0,id:"wc-block-mini-cart__product-count-basecontrol",label:(0,m.__)("Show Cart Item Count:","woocommerce"),children:(0,t.jsx)(d.RadioControl,{className:"wc-block-mini-cart__product-count-radiocontrol",selected:N,options:[{label:(0,m.__)("Always (even if empty)","woocommerce"),value:"always"},{label:(0,m.__)("Only if cart has items","woocommerce"),value:"greater_than_zero"},{label:(0,m.__)("Never","woocommerce"),value:"never"}],help:(0,m.__)("The editor does not display the real count value, but a placeholder to indicate how it will look on the front-end.","woocommerce"),onChange:e=>o({productCountVisibility:e})})}),T&&(0,t.jsxs)(d.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"wc-block-editor-mini-cart__render-in-cart-and-checkout-toggle",label:(0,m.__)("Mini-Cart in cart and checkout pages","woocommerce"),isBlock:!0,value:s,onChange:e=>{o({cartAndCheckoutRenderStyle:e})},help:(0,m.__)("Select how the Mini-Cart behaves in the Cart and Checkout pages. This might affect the header layout.","woocommerce"),children:[(0,t.jsx)(d.__experimentalToggleGroupControlOption,{value:"hidden",label:(0,m.__)("Hide","woocommerce")}),(0,t.jsx)(d.__experimentalToggleGroupControlOption,{value:"removed",label:(0,m.__)("Remove","woocommerce")})]})]}),(0,t.jsxs)(d.PanelBody,{title:(0,m.__)("Cart Drawer","woocommerce"),children:[E&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("img",{className:"wc-block-editor-mini-cart__drawer-image",src:(0,m.isRTL)()?`${x.sW}blocks/mini-cart/cart-drawer-rtl.svg`:`${x.sW}blocks/mini-cart/cart-drawer.svg`,alt:""}),(0,t.jsx)("p",{children:(0,m.__)("When opened, the Mini-Cart drawer gives shoppers quick access to view their selected products and checkout.","woocommerce")}),(0,t.jsx)("p",{className:"wc-block-editor-mini-cart__drawer-link",children:(0,t.jsx)(d.ExternalLink,{href:E,children:(0,m.__)("Edit Mini-Cart Drawer template","woocommerce")})})]}),(0,t.jsxs)(d.BaseControl,{__nextHasNoMarginBottom:!0,id:"wc-block-mini-cart__add-to-cart-behaviour-toggle",label:(0,m.__)("Behavior","woocommerce"),children:[(0,t.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,m.__)("Open drawer when adding","woocommerce"),onChange:e=>{o({addToCartBehaviour:e?"open_drawer":"none"})},help:(0,m.__)("Toggle to open the Mini-Cart drawer when a shopper adds a product to their cart.","woocommerce"),checked:"open_drawer"===c}),(0,t.jsx)(d.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,m.__)("Navigate to checkout when clicking the Mini-Cart, instead of opening the drawer.","woocommerce"),onChange:e=>{o({onCartClickBehaviour:e?"navigate_to_checkout":"open_drawer"})},help:(0,m.__)("Toggle to disable opening the Mini-Cart drawer when clicking the cart icon, and instead navigate to the checkout page.","woocommerce"),checked:"navigate_to_checkout"===n})]})]})]}),(0,t.jsx)(v,{colorTypes:B,miniCartButtonRef:P}),(0,t.jsx)(p.A,{children:(0,t.jsxs)("button",{ref:P,className:"wc-block-mini-cart__button",children:[(0,t.jsx)(k.A,{count:R,iconColor:y,productCountColor:S,icon:A,productCountVisibility:N}),!i&&(0,t.jsx)("span",{className:"wc-block-mini-cart__amount",style:{color:f.color},children:(0,l.formatPrice)(0)})]})})]})},save:()=>null}),(0,n.addFilter)("blocks.registerBlockType","woocommerce/area_mini-cart",function(e,t){return"core/template-part"===t?{...e,variations:e.variations.map(e=>"area_mini-cart"===e.name?{...e,scope:[]}:e)}:e})})(),(()=>{"use strict";var e=s(74997),t=s(94715),o=s(50929),r=s(27723),c=s(56427),n=s(65676),i=s(10790);const a=({style:e})=>{const t=[{selector:".wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout",properties:[{property:"color",value:e.backgroundColor},{property:"background-color",value:e.color},{property:"border-color",value:e.color}]}].map(({selector:e,properties:t})=>{const o=t.filter(({value:e})=>e).map(({property:e,value:t})=>`${e}: ${t};`).join("");return o?`${e} { ${o} }`:""}).join("").trim();return t?(0,i.jsxs)("style",{children:[t," "]}):(0,i.jsx)(i.Fragment,{})};s(16126);var l=s(93450),d=s(88723),u=s(47791);const m={lock:{type:"object",default:{remove:!0,move:!0}},currentView:{type:"string",default:"woocommerce/filled-mini-cart-contents-block",source:"readonly"},editorViews:{type:"object",default:[{view:"woocommerce/filled-mini-cart-contents-block",label:(0,r.__)("Filled Mini-Cart","woocommerce"),icon:(0,i.jsx)(l.A,{icon:d.A})},{view:"woocommerce/empty-mini-cart-contents-block",label:(0,r.__)("Empty Mini-Cart","woocommerce"),icon:(0,i.jsx)(l.A,{icon:u.A})}]},width:{type:"string",default:"480px"}};var p=s(17560);const h=["woocommerce/filled-mini-cart-contents-block","woocommerce/empty-mini-cart-contents-block"],g=["woocommerce/mini-cart","woocommerce/checkout","woocommerce/cart","woocommerce/single-product","woocommerce/cart-totals-block","woocommerce/checkout-fields-block","core/post-template","core/comment-template","core/query-pagination","core/comments-query-loop","core/post-comments-form","core/post-comments-link","core/post-comments-count","core/comments-pagination","core/post-navigation-link","core/button"],w=()=>(0,e.getBlockTypes)().filter(e=>!(g.includes(e.name)||e.parent&&e.parent.filter(e=>g.includes(e)).length>0)).map(({name:e})=>e);(0,e.registerBlockType)("woocommerce/empty-mini-cart-contents-block",{icon:{src:(0,i.jsx)(l.A,{icon:u.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,t.useBlockProps)(),{currentView:r}=(0,o.m)();return(0,i.jsx)("div",{...e,hidden:"woocommerce/empty-mini-cart-contents-block"!==r,children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:w(),renderAppender:t.InnerBlocks.ButtonBlockAppender})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})});var _=s(71e3),b=s(64534),x=s(26999);(0,e.registerBlockType)("woocommerce/filled-mini-cart-contents-block",{icon:{src:(0,i.jsx)(l.A,{icon:d.A,className:"wc-block-editor-components-block-icon"})},edit:({clientId:e})=>{const r=(0,t.useBlockProps)(),s=(0,x.h)(_.innerBlockAreas.FILLED_MINI_CART),{currentView:c}=(0,o.m)(),a=[["woocommerce/mini-cart-title-block",{}],["woocommerce/mini-cart-items-block",{}],["woocommerce/mini-cart-footer-block",{}]].filter(Boolean);return(0,n.B)({clientId:e,registeredBlocks:s,defaultTemplate:a}),(0,i.jsx)("div",{...r,hidden:"woocommerce/filled-mini-cart-contents-block"!==c,children:(0,i.jsx)(o.z,{currentView:c,previewData:{previewCart:b.B},children:(0,i.jsx)(t.InnerBlocks,{template:a,allowedBlocks:s,templateLock:"insert"})})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})});var f=s(69544);(0,e.registerBlockType)("woocommerce/mini-cart-title-block",{icon:{src:(0,i.jsx)(l.A,{icon:f.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,t.useBlockProps)({className:"wc-block-mini-cart__title"});return(0,i.jsx)("h2",{...e,children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:["woocommerce/mini-cart-title-label-block","woocommerce/mini-cart-title-items-counter-block"],template:[["woocommerce/mini-cart-title-label-block",{}],["woocommerce/mini-cart-title-items-counter-block",{}]],templateLock:"all"})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})});var y=s(86697);(0,e.registerBlockType)("woocommerce/mini-cart-title-items-counter-block",{icon:{src:(0,i.jsx)(l.A,{icon:f.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,t.useBlockProps)(),{cartItemsCount:o}=(0,y.V)();return(0,i.jsx)("span",{...e,children:(0,r.sprintf)(/* translators: %d is the count of items in the cart. */ /* translators: %d is the count of items in the cart. */ (0,r._n)("(%d item)","(%d items)",o,"woocommerce"),o)})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});const v={label:{type:"string",default:(0,r.__)("Your cart","woocommerce")}};(0,e.registerBlockType)("woocommerce/mini-cart-title-label-block",{icon:{src:(0,i.jsx)(l.A,{icon:f.A,className:"wc-block-editor-components-block-icon"})},attributes:v,edit:({attributes:{label:e},setAttributes:o})=>{const r=(0,t.useBlockProps)();return(0,i.jsx)("span",{...r,children:(0,i.jsx)(t.RichText,{allowedFormats:[],value:e,onChange:e=>o({label:e})})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});var k=s(41096);(0,e.registerBlockType)("woocommerce/mini-cart-items-block",{icon:{src:(0,i.jsx)(l.A,{icon:k.A,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=(0,t.useBlockProps)({className:"wc-block-mini-cart__items"}),o=[["woocommerce/mini-cart-products-table-block",{}]].filter(Boolean);return(0,i.jsx)("div",{...e,children:(0,i.jsx)(t.InnerBlocks,{template:o,renderAppender:t.InnerBlocks.ButtonBlockAppender,templateLock:!1,allowedBlocks:w()})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})});var j=s(5573),C=(0,i.jsx)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(j.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})}),S=s(8840),A=s(15404),N=s(4921);const P=({className:e})=>{const{cartItems:t,cartIsLoading:o}=(0,y.V)();return(0,i.jsx)("div",{className:(0,N.A)(e,"wc-block-mini-cart__products-table"),children:(0,i.jsx)(A.A,{lineItems:t,isLoading:o,className:"wc-block-mini-cart-items"})})};(0,e.registerBlockType)("woocommerce/mini-cart-products-table-block",{icon:(0,i.jsx)(l.A,{icon:C,className:"wc-block-editor-components-block-icon"}),edit:()=>{const e=(0,t.useBlockProps)();return(0,i.jsx)("div",{...e,children:(0,i.jsx)(S.A,{children:(0,i.jsx)(P,{className:"is-mobile"})})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});var B=s(54200),I=s(14656),T=s(70910),E=s(51565),R=s(5856),D=s(61115),L=s(15703),O=s(74191);const M=(e="",t)=>e.includes("is-style-outline")?"outlined":e.includes("is-style-fill")?"contained":t;s(93337);const V=()=>{const{paymentMethods:e}=(0,E.m)();return(0,i.jsx)(R.h,{icons:(0,D.R)(e)})},F={cartButtonLabel:{type:"string",default:(0,r.__)("View cart","woocommerce")},checkoutButtonLabel:{type:"string",default:(0,r.__)("Go to checkout","woocommerce")}};(0,e.registerBlockType)("woocommerce/mini-cart-footer-block",{icon:{src:(0,i.jsx)(l.A,{icon:B.A,className:"wc-block-editor-components-block-icon"})},deprecated:[{attributes:F,migrate(t,o){const{cartButtonLabel:r,checkoutButtonLabel:s,...c}=t;return[c,[(0,e.createBlock)("woocommerce/mini-cart-cart-button-block",{cartButtonLabel:r}),(0,e.createBlock)("woocommerce/mini-cart-checkout-button-block",{checkoutButtonLabel:s}),...o]]},isEligible:(e,t)=>!t.length,save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})}],edit:()=>{const e=(0,t.useBlockProps)(),{cartTotals:o}=(0,y.V)(),s=(0,L.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(o.total_items,10)+parseInt(o.total_items_tax,10):parseInt(o.total_items,10);return(0,i.jsx)("div",{...e,children:(0,i.jsxs)("div",{className:"wc-block-mini-cart__footer",children:[(0,i.jsx)(I.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:(0,T.getCurrencyFromPriceResponse)(o),label:(0,r.__)("Subtotal","woocommerce"),value:s,description:(0,L.getSetting)("miniCartFooterDescription","")}),(0,i.jsx)("div",{className:"wc-block-mini-cart__footer-actions",children:(0,i.jsx)(t.InnerBlocks,{template:[["woocommerce/mini-cart-cart-button-block",{}],["woocommerce/mini-cart-checkout-button-block",{}]]})}),(0,i.jsx)(O.n,{children:(0,i.jsx)(V,{})})]})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})});var H=s(5764),z=s(16606);const $=(0,r.__)("Return to shop","woocommerce"),W={startShoppingButtonLabel:{type:"string",default:$}};(0,e.registerBlockType)("woocommerce/mini-cart-shopping-button-block",{icon:{src:(0,i.jsx)(l.A,{icon:H.A,className:"wc-block-editor-components-block-icon"})},attributes:W,edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)({className:"wp-block-button aligncenter"}),s=(0,t.__experimentalUseColorProps)(e),{startShoppingButtonLabel:c}=e;return(0,i.jsx)("div",{...r,children:(0,i.jsx)(z.A,{className:`wc-block-mini-cart__shopping-button ${s.className||""}`,value:c,placeholder:$,onChange:e=>{o({startShoppingButtonLabel:e})},variant:M(r.className,"contained"),style:s.style})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});const G=(0,r.__)("View cart","woocommerce"),q={cartButtonLabel:{type:"string",default:G}};(0,e.registerBlockType)("woocommerce/mini-cart-cart-button-block",{icon:{src:(0,i.jsx)(l.A,{icon:H.A,className:"wc-block-editor-components-block-icon"})},attributes:q,edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)({className:"wc-block-mini-cart__footer-cart"}),{cartButtonLabel:s}=e;return(0,i.jsx)("div",{...r,children:(0,i.jsx)(z.A,{variant:M(r.className,"outlined"),value:s,placeholder:G,onChange:e=>{o({cartButtonLabel:e})},style:r.style})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});const U=(0,r.__)("Go to checkout","woocommerce"),Y={checkoutButtonLabel:{type:"string",default:U}};(0,e.registerBlockType)("woocommerce/mini-cart-checkout-button-block",{icon:{src:(0,i.jsx)(l.A,{icon:H.A,className:"wc-block-editor-components-block-icon"})},attributes:Y,edit:({attributes:e,setAttributes:o})=>{const r=(0,t.useBlockProps)({className:(0,N.A)("wc-block-mini-cart__footer-checkout")}),{checkoutButtonLabel:s}=e;return(0,i.jsx)("div",{...r,children:(0,i.jsx)(z.A,{variant:M(r.className,"contained"),value:s,placeholder:U,onChange:e=>{o({checkoutButtonLabel:e})},style:r.style})})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save()})});var Z=s(10628);const J={apiVersion:3,title:(0,r.__)("Mini-Cart Contents","woocommerce"),icon:{src:(0,i.jsx)(l.A,{icon:Z.A,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[(0,r.__)("WooCommerce","woocommerce")],description:(0,r.__)("Display a Mini-Cart widget.","woocommerce"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1,color:{link:!0},lock:!1,__experimentalBorder:{color:!0,width:!0}},example:{}};s(67424),(0,e.registerBlockType)("woocommerce/mini-cart-contents",{...J,attributes:m,edit:({clientId:e,attributes:s,setAttributes:l})=>{const{currentView:d,width:u}=s,g=(0,t.useBlockProps)(),w=[["woocommerce/filled-mini-cart-contents-block",{},[]],["woocommerce/empty-mini-cart-contents-block",{},[]]];return(0,n.B)({clientId:e,registeredBlocks:h,defaultTemplate:w}),(0,p.F)("mini-cart-contents",({editorBackgroundColor:e,editorColor:t})=>`\n\t\t\t\tdiv:where(.wp-block-woocommerce-mini-cart-contents) {\n\t\t\t\t\tbackground-color: ${e};\n\t\t\t\t\tcolor: ${t};\n\t\t\t\t}\n\t\t\t`),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.InspectorControls,{children:(0,i.jsx)(c.PanelBody,{title:(0,r.__)("Dimensions","woocommerce"),initialOpen:!0,children:(0,i.jsx)(c.__experimentalUnitControl,{__next40pxDefaultSize:!0,onChange:e=>{l({width:e})},onBlur:e=>{""===e.target.value?l({width:m.width.default}):Number(e.target.value)<300&&l({width:"300px"})},value:u,units:[{value:"px",label:"px",default:m.width.default}]})})},"inspector"),(0,i.jsx)("div",{className:"wc-block-components-drawer__screen-overlay","aria-hidden":"true"}),(0,i.jsx)("div",{className:"wc-block-editor-mini-cart-contents__wrapper",children:(0,i.jsxs)("div",{...g,children:[(0,i.jsx)(o.z,{currentView:d,children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:h,template:w,templateLock:!1})}),(0,i.jsx)(a,{style:g.style})]})})]})},save:()=>(0,i.jsx)("div",{...t.useBlockProps.save(),children:(0,i.jsx)(t.InnerBlocks.Content,{})})})})()})();