Files

7 lines
27 KiB
JavaScript
Raw Permalink Normal View History

2025-02-05 23:15:46 +01:00
(()=>{var e,o,t,c={9767:(e,o,t)=>{"use strict";t.r(o);var c={};t.r(c),t.d(c,{blockifyConfig:()=>_e,getDescription:()=>ge,isConversionPossible:()=>ke});var r={};t.r(r),t.d(r,{blockifyConfig:()=>ve,getDescription:()=>ye,isConversionPossible:()=>he});var l={};t.r(l),t.d(l,{blockifyConfig:()=>Pe,getDescription:()=>Ce,getSkeleton:()=>Se,isConversionPossible:()=>Be});var a=t(1609);const n=window.wp.blocks,i=window.wc.wcSettings;var s,m,d,p,u,w,k,g,_,f;const b=(0,i.getSetting)("wcBlocksConfig",{pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),h=b.pluginUrl+"assets/images/",y=(b.pluginUrl,null===(s=i.STORE_PAGES.shop)||void 0===s||s.permalink,null===(m=i.STORE_PAGES.checkout)||void 0===m||m.id,null===(d=i.STORE_PAGES.checkout)||void 0===d||d.permalink,null===(p=i.STORE_PAGES.privacy)||void 0===p||p.permalink,null===(u=i.STORE_PAGES.privacy)||void 0===u||u.title,null===(w=i.STORE_PAGES.terms)||void 0===w||w.permalink,null===(k=i.STORE_PAGES.terms)||void 0===k||k.title,null===(g=i.STORE_PAGES.cart)||void 0===g||g.id,null===(_=i.STORE_PAGES.cart)||void 0===_||_.permalink,null!==(f=i.STORE_PAGES.myaccount)&&void 0!==f&&f.permalink?i.STORE_PAGES.myaccount.permalink:(0,i.getSetting)("wpLoginUrl","/wp-login.php"),(0,i.getSetting)("localPickupEnabled",!1),(0,i.getSetting)("countries",{})),v=(0,i.getSetting)("countryData",{}),B=(Object.fromEntries(Object.keys(v).filter((e=>!0===v[e].allowBilling)).map((e=>[e,y[e]||""]))),Object.fromEntries(Object.keys(v).filter((e=>!0===v[e].allowBilling)).map((e=>[e,v[e].states||[]]))),Object.fromEntries(Object.keys(v).filter((e=>!0===v[e].allowShipping)).map((e=>[e,y[e]||""]))),Object.fromEntries(Object.keys(v).filter((e=>!0===v[e].allowShipping)).map((e=>[e,v[e].states||[]]))),Object.fromEntries(Object.keys(v).map((e=>[e,v[e].locale||[]]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],order:[]}),E=((0,i.getSetting)("addressFieldsLocations",B).address,(0,i.getSetting)("addressFieldsLocations",B).contact,(0,i.getSetting)("addressFieldsLocations",B).order,(0,i.getSetting)("additionalOrderFields",{}),(0,i.getSetting)("additionalContactFields",{}),(0,i.getSetting)("additionalAddressFields",{}),window.wp.blockEditor),C=window.wp.components;var S=t(7723),P=t(7104),T=t(885);const O=window.wp.data;var N=t(6087);const x=window.wp.notices,I=window.wp.coreData;var L=t(5573),A=t(851);const j=(0,a.createElement)((({className:e,...o})=>(0,a.createElement)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 6",className:(0,A.A)("woo-icon",e),...o,width:46,height:12},(0,a.createElement)("g",{id:"surface1"},(0,a.createElement)("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(52.941179%,24.313726%,100%)",fillOpacity:1},d:"M 9.695312 0.0234375 C 9.15625 0.0234375 8.808594 0.199219 8.492188 0.789062 L 7.066406 3.480469 L 7.066406 1.089844 C 7.066406 0.375 6.726562 0.0234375 6.101562 0.0234375 C 5.472656 0.0234375 5.210938 0.238281 4.898438 0.839844 L 3.546875 3.480469 L 3.546875 1.113281 C 3.546875 0.351562 3.230469 0.0234375 2.46875 0.0234375 L 0.914062 0.0234375 C 0.324219 0.0234375 0 0.300781 0 0.800781 C 0 1.300781 0.3125 1.601562 0.890625 1.601562 L 1.527344 1.601562 L 1.527344 4.621094 C 1.527344 5.472656 2.105469 5.976562 2.929688 5.976562 C 3.757812 5.976562 4.132812 5.648438 4.546875 4.886719 L 5.449219 3.195312 L 5.449219 4.621094 C 5.449219 5.460938 6 5.976562 6.839844 5.976562 C 7.679688 5.976562 7.992188 5.6875 8.46875 4.886719 L 10.546875 1.378906 C 11 0.613281 10.6875 0.0234375 9.683594 0.0234375 C 9.683594 0.0234375 9.683594 0.0234375 9.695312 0.0234375 Z M 9.695312 0.0234375"}),(0,a.createElement)("path",{style:{stroke:"none",fillRule:"evenodd",fill:"rgb(52.941179%,24.313726%,100%)",fillOpacity:1},d:"M 13.605469 0.0234375 C 11.902344 0.0234375 10.609375 1.289062 10.609375 3.007812 C 10.609375 4.722656 11.914062 5.976562 13.605469 5.976562 C 15.296875 5.976562 16.585938 4.710938 16.597656 3.007812 C 16.597656 1.289062 15.296875 0.0234375 13.605469 0.0234375 Z M 13.6054
(0,S.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e))(e):(e=>(0,S.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */
(0,S.__)("This block serves as a placeholder for your %s. It will display the actual product image, title, price in your store. You can move this placeholder around and add more blocks around to customize the template.","woocommerce"),e))(e),ne=()=>(0,S.__)("Transform into blocks","woocommerce"),ie={isConversionPossible:le,getDescription:ae,blockifyConfig:{getButtonLabel:ne,onClickCallback:({clientId:e,attributes:o,getBlocks:t,replaceBlock:c,selectBlock:r})=>{c(e,re(o));const l=t().find((e=>"core/group"===e.name&&e.innerBlocks.some((e=>"woocommerce/store-notices"===e.name))));l&&r(l.clientId)},getBlockifiedTemplate:re}},se={isConversionPossible:le,getDescription:ae,blockifyConfig:{getButtonLabel:ne,onClickCallback:({clientId:e,attributes:o,getBlocks:t,replaceBlock:c,selectBlock:r})=>{c(e,re(o,!0));const l=t().find((e=>"core/group"===e.name&&e.innerBlocks.some((e=>"woocommerce/store-notices"===e.name))));l&&r(l.clientId)},getBlockifiedTemplate:e=>re(e,!0)}};var me=t(4478);const de=(0,S.__)("Product Title","woocommerce"),pe=((0,a.createElement)(P.A,{icon:me.A,className:"wc-block-editor-components-block-icon"}),(0,S.__)("Display the title of a product.","woocommerce")),ue="woocommerce/product-query/product-title";!function(e,{blockDescription:o,blockIcon:t,blockTitle:c,variationName:r,scope:l}){(0,n.registerBlockVariation)(e,{description:o,name:r,title:c,isActive:e=>e.__woocommerceNamespace===r,icon:{src:t},attributes:{__woocommerceNamespace:r},scope:l})}("core/post-title",{blockDescription:pe,blockIcon:(0,a.createElement)(C.Icon,{icon:me.A}),blockTitle:de,variationName:ue,scope:["block"]});const we=()=>[(0,n.createBlock)("woocommerce/breadcrumbs"),(0,n.createBlock)("woocommerce/store-notices"),(0,n.createBlock)("core/columns",{align:"wide"},[(0,n.createBlock)("core/column",{type:"constrained",justifyContent:"right",width:"512px"},[(0,n.createBlock)("woocommerce/product-image-gallery")]),(0,n.createBlock)("core/column",{},[(0,n.createBlock)("core/post-title",{__woocommerceNamespace:ue,level:1}),(0,n.createBlock)("woocommerce/product-rating"),(0,n.createBlock)("woocommerce/product-price",{fontSize:"large"}),(0,n.createBlock)("woocommerce/product-summary",{isDescendentOfSingleProductTemplate:!0}),(0,n.createBlock)("woocommerce/add-to-cart-form"),(0,n.createBlock)("woocommerce/product-meta")])]),(0,n.createBlock)("woocommerce/product-details",{align:"wide",className:"is-style-minimal"}),(0,n.createBlock)("core/heading",{align:"wide",level:2,content:(0,S.__)("Related Products","woocommerce"),style:{spacing:{margin:{bottom:"1rem"}}}}),(0,n.createBlock)("woocommerce/product-collection",{...ee,query:{...X,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,n.createBlocksFromInnerBlocksTemplate)([oe]))].filter(Boolean),ke=()=>(0,i.isWpVersion)("6.1",">="),ge=(e,o)=>o?(e=>(0,S.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */
(0,S.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e))(e):(e=>(0,S.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */
(0,S.__)("This block serves as a placeholder for your %s. It will display the actual product image, title, price in your store. You can move this placeholder around and add more blocks around to customize the template.","woocommerce"),e))(e),_e={getButtonLabel:()=>(0,S.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,getBlocks:o,replaceBlock:t,selectBlock:c})=>{t(e,we());const r=o().find((e=>"core/group"===e.name&&e.innerBlocks.some((e=>"woocommerce/breadcrumbs"===e.name))));r&&c(r.clientId)},getBlockifiedTemplate:we},fe=e=>{const o=((e,o)=>{const t=[(0,n.createBlock)("core/paragraph",{content:(0,S.__)("No products were found matching your selection.","woocommerce")}),(0,n.createBlock)("core/search",{buttonPosition:"button-outside",buttonText:(0,S.__)("Search","woocommerce"),buttonUseIcon:!1,showLabel:!1,placeholder:(0,S.__)("Search products","woocommerce"),query:{post_type:"product"}})],c="woocommerce/product-collection-no-results",r=e.findIndex((e=>e[0]===c)),l={...e[r][1]||{},...o},a=[c,l,t];return[...e.slice(0,r),a,...e.slice(r+1)]})(te,e);return(0,n.createBlock)("woocommerce/product-collection",{...ee,...e,query:{...X,inherit:!0}},(0,n.createBlocksFromInnerBlocksTemplate)(o))},be=e=>[q("search-title",e),(0,n.createBlock)("woocommerce/store-notices",e),Y([(0,n.createBlock)("woocommerce/product-results-count"),(0,n.createBlock)("woocommerce/catalog-sorting")],e),fe(e)].filter(Boolean),he=()=>(0,i.isWpVersion)("6.1",">="),ye=(e,o)=>o?(e=>(0,S.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */
(0,S.__)("Transform this template into multiple blocks so you can add, remove, reorder, and customize your %s template.","woocommerce"),e))(e):(e=>(0,S.sprintf)(/* translators: %s is the template title */ /* translators: %s is the template title */
(0,S.__)("This block serves as a placeholder for your %s. It will display the actual product image, title, price in your store. You can move this placeholder around and add more blocks around to customize the template.","woocommerce"),e))(e),ve={getButtonLabel:()=>(0,S.__)("Transform into blocks","woocommerce"),onClickCallback:({clientId:e,attributes:o,getBlocks:t,replaceBlock:c,selectBlock:r})=>{c(e,be(o));const l=t().find((e=>"core/group"===e.name&&e.innerBlocks.some((e=>"woocommerce/store-notices"===e.name))));l&&r(l.clientId)},getBlockifiedTemplate:be},Be=()=>!0,Ee=e=>[(0,n.createBlock)("woocommerce/order-confirmation-status",{...e,fontSize:"large"}),(0,n.createBlock)("woocommerce/order-confirmation-summary",e),(0,n.createBlock)("woocommerce/order-confirmation-totals-wrapper",e),(0,n.createBlock)("woocommerce/order-confirmation-downloads-wrapper",e),(0,n.createBlock)("core/columns",{...e,className:"wc-block-order-confirmation-address-wrapper"},[(0,n.createBlock)("core/column",e,[(0,n.createBlock)("woocommerce/order-confirmation-shipping-wrapper",e)]),(0,n.createBlock)("core/column",e,[(0,n.createBlock)("woocommerce/order-confirmation-billing-wrapper",e)])]),(0,n.createBlock)("woocommerce/order-confirmation-additional-fields-wrapper",e),(0,n.createBlock)("woocommerce/order-confirmation-additional-information",e)].filter(Boolean),Ce=()=>(0,S.__)("This block represents the classic template used to display the order confirmation. The actual rendered template may appear different from this placeholder.","woocommerce"),Se=()=>(0,a.createElement)("div",{className:"woocommerce-page"},(0,a.createElement)("div",{className:"woocommerce-order"},(0,a.createElement)("h1",null,(0,S.__)("Order received","woocommerce")),(0,a.createElement)("p",{className:"woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-confirmation"},(0,S.__)("Thank you. Your order has been received.","woocommerce")),(0,a.createElement)("ul",{className:"woocommerce-order-overview woocommerce-thankyou-order-details order_details"},(0,a.createElement)("li",{className:"woocommerce-order-overview__order order"},(0,S.__)("Order number","woocommerce"),":"," ",(0,a.createElement)("strong",null,"123")),(0,a.createElement)("li",{className:"woocommerce-order-overview__date date"},(0,S.__)("Date","woocommerce"),":"," ",(0,a.createElement)("strong",null,"May 25, 2023")),(0,a.createElement)("li",{className:"woocommerce-order-overview__email email"},(0,S.__)("Email","woocommerce"),":"," ",(0,a.createElement)("strong",null,"shopper@woocommerce.com")),(0,a.createElement)("li",{className:"woocommerce-order-overview__total total"},(0,S.__)("Total","woocommerce"),":"," ",(0,a.createElement)("strong",null,"$20.00"))),(0,a.createElement)("section",{className:"woocommerce-order-details"},(0,a.createElement)("h2",{className:"woocommerce-order-details__title"},(0,S.__)("Order details","woocommerce")),(0,a.createElement)("table",{className:"woocommerce-table woocommerce-table--order-details shop_table order_details"},(0,a.createElement)("thead",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",{className:"woocommerce-table__product-name product-name"},(0,S.__)("Product","woocommerce")),(0,a.createElement)("th",{className:"woocommerce-table__product-table product-total"},(0,S.__)("Total","woocommerce")))),(0,a.createElement)("tbody",null,(0,a.createElement)("tr",{className:"woocommerce-table__line-item order_item"},(0,a.createElement)("td",{className:"woocommerce-table__product-name product-name"},"Sample Product"," ",(0,a.createElement)("strong",{className:"product-quantity"},"× 2")," "),(0,a.createElement)("td",{className:"woocommerce-table__product-total product-total"},"$20.00"))),(0,a.createElement)("tfoot",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"row"},(0,S.__)("Subtotal","woocommerce"),":"),(0,a.createElement)("td",null,"$20.00")),(0,a.createElement)("tr",null,(0,a.createElement)("th",{scope:"row"},(0,S.__)("Total","woocommerce"),":"),(0,a.createElement)("td",null,"$20.00"))))),(0,a.createElement)("section",{className:"w