/*! elementor - v3.28.0 - 17-03-2025 */ (()=>{var e={40440:(e,r,t)=>{"use strict";var o=t(96784);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(t(18821)),a=o(t(39805)),s=o(t(40989)),i=function deprecatedMessage(e,r,t,o){var n="`".concat(r,"` is ").concat(e," deprecated since ").concat(t);o&&(n+=" - Use `".concat(o,"` instead")),elementorDevTools.consoleWarn(n)};r.default=function(){return(0,s.default)((function Deprecation(){(0,a.default)(this,Deprecation)}),[{key:"deprecated",value:function deprecated(e,r,t){this.isHardDeprecated(r)?function hardDeprecated(e,r,t){i("hard",e,r,t)}(e,r,t):function softDeprecated(e,r,t){elementorDevToolsConfig.isDebug&&i("soft",e,r,t)}(e,r,t)}},{key:"parseVersion",value:function parseVersion(e){var r=e.split(".");if(r.length<3||r.length>4)throw new RangeError("Invalid Semantic Version string provided");var t=(0,n.default)(r,4),o=t[0],a=t[1],s=t[2],i=t[3],u=void 0===i?"":i;return{major1:parseInt(o),major2:parseInt(a),minor:parseInt(s),build:u}}},{key:"getTotalMajor",value:function getTotalMajor(e){var r=parseInt("".concat(e.major1).concat(e.major2,"0"));return r=Number((r/10).toFixed(0)),e.major2>9&&(r=e.major2-9),r}},{key:"compareVersion",value:function compareVersion(e,r){var t=this;return[this.parseVersion(e),this.parseVersion(r)].map((function(e){return t.getTotalMajor(e)})).reduce((function(e,r){return e-r}))}},{key:"isSoftDeprecated",value:function isSoftDeprecated(e){return this.compareVersion(e,elementorDevToolsConfig.deprecation.current_version)<=elementorDevToolsConfig.deprecation.soft_version_count}},{key:"isHardDeprecated",value:function isHardDeprecated(e){var r=this.compareVersion(e,elementorDevToolsConfig.deprecation.current_version);return r<0||r>=elementorDevToolsConfig.deprecation.hard_version_count}}])}()},54952:(e,r,t)=>{"use strict";var o=t(96784);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(t(10906)),a=o(t(18821)),s=o(t(39805)),i=o(t(40989)),u=o(t(85707));o(t(40440)),r.default=function(){return(0,i.default)((function Module(e){(0,s.default)(this,Module),(0,u.default)(this,"deprecation",void 0),this.deprecation=e}),[{key:"notifyBackendDeprecations",value:function notifyBackendDeprecations(){var e=this,r=elementorDevToolsConfig.deprecation.soft_notices;Object.entries(r).forEach((function(r){var t,o=(0,a.default)(r,2),s=o[0],i=o[1];(t=e.deprecation).deprecated.apply(t,[s].concat((0,n.default)(i)))}))}},{key:"consoleWarn",value:function consoleWarn(){for(var e,r='font-size: 12px; background-image: url("'.concat(elementorDevToolsConfig.urls.assets,'images/logo-icon.png"); background-repeat: no-repeat; background-size: contain;'),t=arguments.length,o=new Array(t),n=0;n{e.exports=function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t{e.exports=function _arrayWithHoles(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},91819:(e,r,t)=>{var o=t(78113);e.exports=function _arrayWithoutHoles(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},39805:e=>{e.exports=function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},40989:(e,r,t)=>{var o=t(45498);function _defineProperties(e,r){for(var t=0;t{var o=t(45498);e.exports=function _defineProperty(e,r,t){return(r=o(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports},96784:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},20365:e=>{e.exports=function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},65474:e=>{e.exports=function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,n,a,s,i=[],u=!0,l=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(o=a.call(t)).done)&&(i.push(o.value),i.length!==r);u=!0);}catch(e){l=!0,n=e}finally{try{if(!u&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw n}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},11018:e=>{e.exports=function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},78687:e=>{e.exports=function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},18821:(e,r,t)=>{var o=t(70569),n=t(65474),a=t(37744),s=t(11018);e.exports=function _slicedToArray(e,r){return o(e)||n(e,r)||a(e,r)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},10906:(e,r,t)=>{var o=t(91819),n=t(20365),a=t(37744),s=t(78687);e.exports=function _toConsumableArray(e){return o(e)||n(e)||a(e)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},11327:(e,r,t)=>{var o=t(10564).default;e.exports=function toPrimitive(e,r){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},45498:(e,r,t)=>{var o=t(10564).default,n=t(11327);e.exports=function toPropertyKey(e){var r=n(e,"string");return"symbol"==o(r)?r:r+""},e.exports.__esModule=!0,e.exports.default=e.exports},10564:e=>{function _typeof(r){return e.exports=_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,_typeof(r)}e.exports=_typeof,e.exports.__esModule=!0,e.exports.default=e.exports},37744:(e,r,t)=>{var o=t(78113);e.exports=function _unsupportedIterableToArray(e,r){if(e){if("string"==typeof e)return o(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,r):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}},r={};function __webpack_require__(t){var o=r[t];if(void 0!==o)return o.exports;var n=r[t]={exports:{}};return e[t](n,n.exports,__webpack_require__),n.exports}(()=>{"use strict";var e=__webpack_require__(96784),r=e(__webpack_require__(40440)),t=e(__webpack_require__(54952));window.elementorDevTools||(window.elementorDevTools=new t.default(new r.default),window.elementorDevTools.notifyBackendDeprecations())})()})();"use strict";(self.webpackChunk_wcAdmin_webpackJsonp=self.webpackChunk_wcAdmin_webpackJsonp||[]).push([[9740],{94411:function(e,t,o){o.d(t,{F:function(){return p},s:function(){return _}});var n=o(69307),r=o(65736),a=o(55609),c=o(9818),i=o(17385),l=o(86020),s=o(67221),m=o(60188),u=o(7520),d=o(30226);const p="woocommerce_ces_product_mvp_ces_action",_=()=>{const{showCesModal:e}=(0,c.useDispatch)(d.Ls),{updateOptions:t}=(0,c.useDispatch)(s.OPTIONS_STORE_NAME),{cesAction:o,allowTracking:_,cesShownForActions:g,resolving:E}=(0,c.useSelect)((e=>{const{getOption:t,hasFinishedResolution:o}=e(s.OPTIONS_STORE_NAME),n=t(p);return{cesShownForActions:t(m.cS)||[],allowTracking:"yes"===(t(m.hW)||"no"),cesAction:n,resolving:!o("getOption",[m.cS])||!o("getOption",[p])||!o("getOption",[m.hW])}})),h=()=>{t({[p]:"hide"})},w=!E&&_&&o&&"hide"!==o;return(0,n.createElement)(n.Fragment,null,w&&(0,n.createElement)(u.Zz,null,(0,n.createElement)("div",{className:"woocommerce-product-mvp-ces-footer"},(0,n.createElement)("div",{className:"woocommerce-product-mvp-ces-footer__container"},(0,n.createElement)(l.Pill,null,(0,r.__)("BETA","woocommerce")),(0,r.__)("You're using the new product editor (currently in development). How is your experience so far?","woocommerce"),(0,n.createElement)(a.Button,{variant:"secondary",onClick:()=>{e({action:o,title:(0,r.__)("How's your experience with the product editor?","woocommerce"),firstQuestion:(0,r.__)("The product editing screen is easy to use","woocommerce"),secondQuestion:(0,r.__)("The product editing screen's functionality meets my needs","woocommerce"),onsubmitLabel:(0,r.__)("Thanks for the feedback. We'll put it to good use!","woocommerce")},{},{type:"snackbar",icon:(0,n.createElement)("span",null,"🌟")}),t({[m.cS]:[o,...g]})}},(0,r.__)("Share feedback","woocommerce")),(0,n.createElement)(a.Button,{onClick:h,variant:"tertiary"},(0,r.__)("Turn it off","woocommerce"))),(0,n.createElement)(a.Button,{className:"woocommerce-product-mvp-ces-footer__close-button",icon:i.Z,label:(0,r.__)("Remove share feedback","woocommerce"),onClick:h}))))}},8302:function(e,t,o){o.d(t,{g:function(){return i}});var n=o(9818),r=o(67221),a=o(94411);async function c(){return"hide"===await(0,n.resolveSelect)(r.OPTIONS_STORE_NAME).getOption(a.F)}const i=()=>{const{updateOptions:e}=(0,n.useDispatch)(r.OPTIONS_STORE_NAME),t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"show";e({[a.F]:t})};return{onSaveDraft:async()=>{!1===await c()&&t("new_product")},onPublish:async()=>{!1===await c()&&t("new_product")},showCesFooter:t}}},48701:function(e,t,o){o.d(t,{Z:function(){return i}});var n=o(69307),r=o(65736),a=o(10431),c=o(85597);function i(e,t,o){const i=(0,n.useMemo)((()=>null!=o?o:(0,r.__)("Changes you made may not be saved.","woocommerce")),[o]),{navigator:l}=(0,n.useContext)(c.Us),s=(0,c.TH)();(0,n.useEffect)((()=>{if(e){const e=l.push;return l.push=function(){const o=(0,a.parseAdminUrl)(arguments.length<=0?void 0:arguments[0]);if("function"==typeof t&&!t(o,s))return void e(...arguments);const n=window.confirm(i);!1!==n&&e(...arguments)},()=>{l.push=e}}}),[l,e,i]),(0,n.useEffect)((()=>{if(e){function e(e){return e.preventDefault(),e.returnValue=i}return window.addEventListener("beforeunload",e,{capture:!0}),()=>{window.removeEventListener("beforeunload",e,{capture:!0})}}}),[e,i])}},7506:function(e,t,o){o.d(t,{B1:function(){return c},UM:function(){return a},VY:function(){return l},aT:function(){return n},ec:function(){return r},pE:function(){return s},vE:function(){return i}});const n="[^-0-9%s1%s2]",r="[^-\\d\\%s]+",a="[%s](?=%s*[%s])",c="__ADD_NEW_SHIPPING_CLASS_OPTION__",i="uncategorized",l=32,s="standard"},65483:function(e,t,o){o.d(t,{X:function(){return L}});var n=o(69307),r=o(65736),a=o(86020),c=o(14599),i=o(78674),l=o(74617),s=o(42411),m=o(55609),u=o(9818),d=o(18248),p=o(67221);function _(e){return-99===e.id}const g=e=>{let{value:t=null,onChange:o,placeholder:i,label:l,disabled:s,ignoredAttributeIds:g=[]}=e;const{attributes:E,isLoading:h}=(0,u.useSelect)((e=>{const{getProductAttributes:t,hasFinishedResolution:o}=e(p.EXPERIMENTAL_PRODUCT_ATTRIBUTES_STORE_NAME);return{isLoading:!o("getProductAttributes"),attributes:t()}}));return(0,n.createElement)(a.__experimentalSelectControl,{className:"woocommerce-attribute-input-field",items:E||[],label:l||"",disabled:s,getFilteredItems:(e,t)=>{const o=e.filter((e=>(e=>!g.length||!g.includes(e.id))(e)&&(e.name||"").toLowerCase().startsWith(t.toLowerCase())));return t.length>0&&!e.find((e=>e.name.toLowerCase()===t.toLowerCase()))?[...o,{id:-99,name:t}]:o},placeholder:i,getItemLabel:e=>(null==e?void 0:e.name)||"",getItemValue:e=>(null==e?void 0:e.id)||"",selected:t,onSelect:e=>{_(e)&&(0,c.recordEvent)("product_attribute_add_custom_attribute",{new_product_page:!0}),o(_(e)?e.name:{id:e.id,name:e.name,options:[]})},onRemove:()=>o(),__experimentalOpenMenuOnFocus:!0},(e=>{let{items:t,highlightedIndex:o,getItemProps:c,getMenuProps:i,isOpen:l}=e;return(0,n.createElement)(a.__experimentalSelectControlMenu,{getMenuProps:i,isOpen:l},h?(0,n.createElement)(m.Spinner,null):t.map(((e,t)=>(0,n.createElement)(a.__experimentalSelectControlMenuItem,{key:e.id,index:t,isActive:o===t,item:e,getItemProps:c},_(e)?(0,n.createElement)("div",{className:"woocommerce-attribute-input-field__add-new"},(0,n.createElement)(m.Icon,{icon:d.Z,size:20,className:"woocommerce-attribute-input-field__add-new-icon"}),(0,n.createElement)("span",null,(0,r.sprintf)((0,r.__)('Create "%s"',"woocommerce"),e.name))):e.name))))}))};var E=o(94333),h=o(5267),w=o(96483);const b=e=>{let{initialAttributeTermName:t,attributeId:o,onCancel:i=(()=>{}),onCreated:l=(()=>{})}=e;const{createNotice:s}=(0,u.useDispatch)("core/notices"),[d,_]=(0,n.useState)(!1),{createProductAttributeTerm:g,invalidateResolutionForStoreSelector:E}=(0,u.useDispatch)(p.EXPERIMENTAL_PRODUCT_ATTRIBUTE_TERMS_STORE_NAME);return(0,n.createElement)(m.Modal,{title:(0,r.__)("Create attribute","woocommerce"),onRequestClose:e=>{e.stopPropagation(),i()},className:"woocommerce-create-attribute-term-modal"},(0,n.createElement)(a.Form,{initialValues:{name:t,slug:(0,w.cleanForSlug)(t)},validate:function(e){var t;const o={};return null!==(t=e.name)&&void 0!==t&&t.length||(o.name=(0,r.__)("The attribute term name is required.","woocommerce")),o},errors:{},onSubmit:async e=>{(0,c.recordEvent)("product_attribute_term_add",{new_product_page:!0}),_(!0);try{const t=await g({...e,attribute_id:o});(0,c.recordEvent)("product_attribute_term_add_success",{new_product_page:!0}),E("getProductAttributes"),_(!1),l(t)}catch(e){(0,c.recordEvent)("product_attribute_term_add_failed",{new_product_page:!0}),s("error",(0,r.__)("Failed to create attribute term.","woocommerce")),_(!1),i()}}},(e=>{let{getInputProps:t,handleSubmit:o,isValidForm:a,setValue:c,values:l}=e;const s=t("name");return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m.TextControl,(0,h.Z)({label:(0,r.__)("Name","woocommerce")},s,{onBlur:()=>{s.onBlur(),c("slug",(0,w.cleanForSlug)(l.name))}})),(0,n.createElement)(m.TextControl,(0,h.Z)({label:(0,r.__)("Slug","woocommerce")},t("slug"),{help:(0,r.__)("The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.","woocommerce")})),(0,n.createElement)(m.TextareaControl,(0,h.Z)({label:(0,r.__)("Description","woocommerce")},t("description"))),(0,n.createElement)("div",{className:"woocommerce-create-attribute-term-modal__buttons"},(0,n.createElement)(m.Button,{isSecondary:!0,label:(0,r.__)("Cancel","woocommerce"),onClick:()=>i()},(0,r.__)("Cancel","woocommerce")),(0,n.createElement)(m.Button,{isPrimary:!0,isBusy:d,label:(0,r.__)("Add attribute","woocommerce"),disabled:!a||d,onClick:o},(0,r.__)("Add","woocommerce"))))})))};let I=0;const N=e=>{let{value:t=[],onChange:o,placeholder:c,disabled:i,attributeId:l,label:s=""}=e;const _=(0,n.useRef)("woocommerce-attribute-term-field-"+ ++I),[g,h]=(0,n.useState)([]),[w,N]=(0,n.useState)(!1),[C,v]=(0,n.useState)(),f=(0,n.useCallback)((e=>(N(!0),(0,u.resolveSelect)(p.EXPERIMENTAL_PRODUCT_ATTRIBUTE_TERMS_STORE_NAME).getProductAttributeTerms({search:e||"",attribute_id:l}).then((e=>(h(e),N(!1),e)),(e=>(N(!1),e))))),[l]),S=(0,E.useDebounce)(f,250);(0,n.useEffect)((()=>{i||void 0===l||g.length||f()}),[i,l]);const y=e=>{o(t.filter((t=>t.slug!==e.slug)))},k=e=>{-99!==e.id?t.find((t=>t.slug===e.slug))?y(e):o([...t,e]):v(e.name)},M=()=>{const e=document.querySelector("."+_.current+" .woocommerce-experimental-select-control__input");e&&setTimeout((()=>{e.focus()}),0)},x=(t||[]).map((e=>e.slug));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.__experimentalSelectControl,{items:g,multiple:!0,disabled:i||!l,label:s,getFilteredItems:(e,t)=>t.length>0&&!e.find((e=>e.name.toLowerCase()===t.toLowerCase()))?[...e,{id:-99,name:t}]:e,onInputChange:S,placeholder:c||"",getItemLabel:e=>(null==e?void 0:e.name)||"",getItemValue:e=>(null==e?void 0:e.slug)||"",stateReducer:(e,t)=>{const{changes:o,type:n}=t;switch(n){case a.selectControlStateChangeTypes.ControlledPropUpdatedSelectedItem:return{...o,inputValue:e.inputValue};case a.selectControlStateChangeTypes.ItemClick:return o.selectedItem&&-99===o.selectedItem.id?o:{...o,isOpen:!0,inputValue:e.inputValue,highlightedIndex:e.highlightedIndex};default:return o}},selected:t,onSelect:k,onRemove:y,className:"woocommerce-attribute-term-field "+_.current,__experimentalOpenMenuOnFocus:!0},(e=>{let{items:t,highlightedIndex:o,getItemProps:c,getMenuProps:i,isOpen:l}=e;return(0,n.createElement)(a.__experimentalSelectControlMenu,{isOpen:l,getMenuProps:i},[w?(0,n.createElement)("div",{key:"loading-spinner",className:"woocommerce-attribute-term-field__loading-spinner"},(0,n.createElement)(m.Spinner,null)):null,...t.map(((e,t)=>{const i=x.includes(e.slug);return(0,n.createElement)(a.__experimentalSelectControlMenuItem,{key:`${e.slug}`,index:t,isActive:o===t,item:e,getItemProps:c},-99!==e.id?(0,n.createElement)(m.CheckboxControl,{onChange:()=>null,checked:i,label:(0,n.createElement)("span",{style:{fontWeight:i?"bold":"normal"}},e.name)}):(0,n.createElement)("div",{className:"woocommerce-attribute-term-field__add-new"},(0,n.createElement)(m.Icon,{icon:d.Z,size:20,className:"woocommerce-attribute-term-field__add-new-icon"}),(0,n.createElement)("span",null,(0,r.sprintf)((0,r.__)('Create "%s"',"woocommerce"),e.name))))}))].filter((e=>null!==e)))})),C&&void 0!==l&&(0,n.createElement)(b,{initialAttributeTermName:C,onCancel:()=>{v(void 0),M()},attributeId:l,onCreated:e=>{k(e),v(void 0),M()}}))};function C(e){return null!==e&&"object"==typeof e&&!!e.label}const v=e=>{let{value:t=[],onChange:o,placeholder:c,disabled:i,label:l}=e;const[s,u]=(0,n.useState)(t),p=e=>{o(t.filter((t=>t!==e)))};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.__experimentalSelectControl,{items:s,multiple:!0,disabled:i,label:l||"",placeholder:c||"",getItemLabel:e=>C(e)?e.label:e||"",getItemValue:e=>C(e)?e.id:e||"",getFilteredItems:(e,t)=>{const o=e.filter((e=>!t.length||!C(e)&&e.toLowerCase().includes(t.toLowerCase())));return t.length>0&&!o.find((e=>!C(e)&&e.toLowerCase()===t.toLowerCase()))?[...o,{id:"is-new",label:t}]:o},selected:t,onSelect:e=>{if(C(e))return u([...s,e.label]),void o([...t,e.label]);t.includes(e)?p(e):o([...t,e])},onRemove:p,className:"woocommerce-attribute-term-field"},(e=>{let{items:o,highlightedIndex:c,getItemProps:i,getMenuProps:l,isOpen:s}=e;return(0,n.createElement)(a.__experimentalSelectControlMenu,{isOpen:s,getMenuProps:l},o.map(((e,o)=>(0,n.createElement)(a.__experimentalSelectControlMenuItem,{key:`${C(e)?e.id:e}`,index:o,isActive:c===o,item:e,getItemProps:i},C(e)?(0,n.createElement)("div",{className:"woocommerce-attribute-term-field__add-new"},(0,n.createElement)(m.Icon,{icon:d.Z,size:20,className:"woocommerce-attribute-term-field__add-new-icon"}),(0,n.createElement)("span",null,(0,r.sprintf)((0,r.__)('Create "%s"',"woocommerce"),e.label))):(0,n.createElement)(m.CheckboxControl,{onChange:()=>null,checked:t.includes(e),label:(0,n.createElement)("span",{style:{fontWeight:t.includes(e)?"bold":"normal"}},e)})))))})))};function f(e){return 0!==e.id?e.id:e.name}const S=e=>{let{title:t=(0,r.__)("Add attributes","woocommerce"),notice:o=(0,r.__)("By default, attributes are filterable and visible on the product page. You can change these settings for each attribute separately later.","woocommerce"),attributeLabel:i=(0,r.__)("Attribute","woocommerce"),valueLabel:l=(0,r.__)("Values","woocommerce"),attributePlaceholder:u=(0,r.__)("Search or create attribute","woocommerce"),termPlaceholder:d=(0,r.__)("Search or create value","woocommerce"),removeLabel:p=(0,r.__)("Remove attribute","woocommerce"),addAnotherAccessibleLabel:_=(0,r.__)("Add another attribute","woocommerce"),addAnotherLabel:E=(0,r.__)("+ Add another","woocommerce"),cancelLabel:h=(0,r.__)("Cancel","woocommerce"),addAccessibleLabel:w=(0,r.__)("Add attributes","woocommerce"),addLabel:b=(0,r.__)("Add","woocommerce"),confirmMessage:I=(0,r.__)("You have some attributes added to the list, are you sure you want to cancel?","woocommerce"),confirmCancelLabel:C=(0,r.__)("No thanks","woocommerce"),confirmConfirmLabel:f=(0,r.__)("Yes please!","woocommerce"),onCancel:S,onAdd:y,selectedAttributeIds:k=[]}=e;const[M,x]=(0,n.useState)(!1),T=e=>{e.attributes.some((e=>null!==e&&(null==e?void 0:e.terms)&&(null==e?void 0:e.terms.length)>0))?x(!0):S()};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(a.Form,{initialValues:{attributes:[null]}},(e=>{let{values:r,setValue:a}=e;return(0,n.createElement)(m.Modal,{title:t,onRequestClose:e=>{e.isPropagationStopped()||T(r)},className:"woocommerce-add-attribute-modal"},(0,n.createElement)(m.Notice,{isDismissible:!1},(0,n.createElement)("p",null,o)),(0,n.createElement)("div",{className:"woocommerce-add-attribute-modal__body"},(0,n.createElement)("table",{className:"woocommerce-add-attribute-modal__table"},(0,n.createElement)("thead",null,(0,n.createElement)("tr",{className:"woocommerce-add-attribute-modal__table-header"},(0,n.createElement)("th",null,i),(0,n.createElement)("th",null,l))),(0,n.createElement)("tbody",null,r.attributes.map(((e,t)=>(0,n.createElement)("tr",{key:t,className:`woocommerce-add-attribute-modal__table-row woocommerce-add-attribute-modal__table-row-${t}`},(0,n.createElement)("td",{className:"woocommerce-add-attribute-modal__table-attribute-column"},(0,n.createElement)(g,{placeholder:u,value:e,label:i,onChange:e=>{a("attributes["+t+"]",e&&function(e){return"string"==typeof e?{id:0,name:e,options:[]}:e}(e)),e&&(e=>{setTimeout((()=>{const t=document.querySelector(".woocommerce-add-attribute-modal__table-row-"+e+" .woocommerce-add-attribute-modal__table-attribute-value-column .woocommerce-experimental-select-control__input");t&&t.focus()}),0)})(t)},ignoredAttributeIds:[...k,...r.attributes.map((e=>null==e?void 0:e.id)).filter((e=>void 0!==e))]})),(0,n.createElement)("td",{className:"woocommerce-add-attribute-modal__table-attribute-value-column"},null===e||0!==e.id?(0,n.createElement)(N,{placeholder:d,disabled:!e||!e.id,attributeId:e?e.id:void 0,value:null===e?[]:e.terms,label:l,onChange:e=>a("attributes["+t+"].terms",e)}):(0,n.createElement)(v,{placeholder:d,disabled:!e.name,value:e.options,label:l,onChange:e=>a("attributes["+t+"].options",e)})),(0,n.createElement)("td",{className:"woocommerce-add-attribute-modal__table-attribute-trash-column"},(0,n.createElement)(m.Button,{icon:s.Z,disabled:1===r.attributes.length&&null===r.attributes[0],label:p,onClick:()=>((e,t,o)=>{(0,c.recordEvent)("product_add_attributes_modal_remove_attribute_button_click"),t.attributes.length>1?o("attributes",t.attributes.filter(((t,o)=>o!==e))):o(`attributes[${e}]`,[null])})(t,r,a)})))))))),(0,n.createElement)("div",null,(0,n.createElement)(m.Button,{className:"woocommerce-add-attribute-modal__add-attribute",variant:"tertiary",label:_,onClick:()=>{(0,c.recordEvent)("product_add_attributes_modal_add_another_attribute_button_click"),((e,t)=>{var o;t("attributes",[...e.attributes,null]),o=e.attributes.length,setTimeout((()=>{const e=document.querySelector(`.woocommerce-add-attribute-modal__table-row-${o}`);null==e||e.scrollIntoView({behavior:"smooth"})}),0)})(r,a)}},E)),(0,n.createElement)("div",{className:"woocommerce-add-attribute-modal__buttons"},(0,n.createElement)(m.Button,{isSecondary:!0,label:h,onClick:()=>T(r)},h),(0,n.createElement)(m.Button,{isPrimary:!0,label:w,disabled:1===r.attributes.length&&null===r.attributes[0],onClick:()=>(e=>{const t=[];e.attributes.forEach((e=>{if(null!==e&&e.name&&((e.terms||[]).length>0||(e.options||[]).length>0)){const o=0!==e.id?(e.terms||[]).map((e=>e.name)):e.options;t.push({...e,options:o})}})),y(t)})(r)},b)))})),(0,n.createElement)(a.__experimentalSelectControlMenuSlot,null),M&&(0,n.createElement)(m.__experimentalConfirmDialog,{cancelButtonText:C,confirmButtonText:f,onCancel:()=>x(!1),onConfirm:S},I))},y=e=>{let{title:t=(0,r.__)("Edit attribute","woocommerce"),nameLabel:o=(0,r.__)("Name","woocommerce"),globalAttributeHelperMessage:c,customAttributeHelperMessage:i=(0,r.__)("Your customers will see this on the product page","woocommerce"),termsLabel:l=(0,r.__)("Values","woocommerce"),termsPlaceholder:s=(0,r.__)("Search or create value","woocommerce"),visibleLabel:u=(0,r.__)("Visible to customers","woocommerce"),visibleTooltip:d=(0,r.__)("Show or hide this attribute on the product page","woocommerce"),cancelAccessibleLabel:p=(0,r.__)("Cancel","woocommerce"),cancelLabel:_=(0,r.__)("Cancel","woocommerce"),updateAccessibleLabel:g=(0,r.__)("Edit attribute","woocommerce"),updateLabel:E=(0,r.__)("Update","woocommerce"),onCancel:h,onEdit:w,attribute:b}=e;const[I,C]=(0,n.useState)({...b}),f=0===(null==I?void 0:I.id);return(0,n.createElement)(m.Modal,{title:t,onRequestClose:()=>h(),className:"woocommerce-edit-attribute-modal"},(0,n.createElement)("div",{className:"woocommerce-edit-attribute-modal__body"},(0,n.createElement)(m.TextControl,{label:o,disabled:!f,value:null!=I&&I.name?null==I?void 0:I.name:"",onChange:e=>C({...I,name:e})}),(0,n.createElement)("p",{className:"woocommerce-edit-attribute-modal__helper-text"},f?i:c),b.terms?(0,n.createElement)(N,{label:l,placeholder:s,value:null==I?void 0:I.terms,attributeId:null==I?void 0:I.id,onChange:e=>{C({...I,terms:e})}}):(0,n.createElement)(v,{label:l,placeholder:s,disabled:!(null!=b&&b.name),value:null==I?void 0:I.options,onChange:e=>{C({...I,options:e})}}),(0,n.createElement)("div",{className:"woocommerce-edit-attribute-modal__option-container"},(0,n.createElement)(m.CheckboxControl,{onChange:e=>C({...I,visible:e}),checked:null==I?void 0:I.visible,label:u}),(0,n.createElement)(a.__experimentalTooltip,{text:d}))),(0,n.createElement)("div",{className:"woocommerce-add-attribute-modal__buttons"},(0,n.createElement)(m.Button,{isSecondary:!0,label:p,onClick:()=>h()},_),(0,n.createElement)(m.Button,{isPrimary:!0,label:g,onClick:()=>{w(I)}},E)))};var k=o(14812),M=o(83911);const x=e=>{let{image:t=M,subtitle:o=(0,r.__)("No attributes yet","woocommerce"),addNewLabel:a=(0,r.__)("Add first attribute","woocommerce"),onNewClick:c}=e;return(0,n.createElement)(m.Card,null,(0,n.createElement)(m.CardBody,null,(0,n.createElement)("div",{className:"woocommerce-attribute-empty-state"},(0,n.createElement)("img",{src:t,alt:"Completed",className:"woocommerce-attribute-empty-state__image"}),(0,n.createElement)(k.Text,{variant:"subtitle.small",weight:"600",size:"14",lineHeight:"20px",className:"woocommerce-attribute-empty-state__subtitle"},o),"function"==typeof c&&(0,n.createElement)(m.Button,{variant:"secondary",className:"woocommerce-attribute-empty-state__add-new",onClick:c},a))))},T=e=>{let{label:t=(0,r.__)("Add attribute","woocommerce"),onAddClick:o}=e;return(0,n.createElement)(a.ListItem,{className:"woocommerce-add-attribute-list-item"},(0,n.createElement)(m.Button,{variant:"secondary",className:"woocommerce-add-attribute-list-item__add-button",onClick:o},t))};var P=o(17385);const D=e=>{let{attribute:t,editLabel:o=(0,r.__)("edit","woocommerce"),removeLabel:c=(0,r.__)("Remove attribute","woocommerce"),onDragStart:i,onDragEnd:l,onEditClick:s,onRemoveClick:u}=e;return(0,n.createElement)(a.ListItem,{className:"woocommerce-attribute-list-item",onDragStart:i,onDragEnd:l},(0,n.createElement)("div",null,t.name),(0,n.createElement)("div",{className:"woocommerce-attribute-list-item__options"},t.options.slice(0,2).map(((e,t)=>(0,n.createElement)("div",{className:"woocommerce-attribute-list-item__option-chip",key:t},e))),t.options.length>2&&(0,n.createElement)("div",{className:"woocommerce-attribute-list-item__option-chip"},(0,r.sprintf)((0,r.__)("+ %i more","woocommerce"),t.options.length-2))),(0,n.createElement)("div",{className:"woocommerce-attribute-list-item__actions"},"function"==typeof s&&(0,n.createElement)(m.Button,{variant:"tertiary",onClick:()=>s(t)},o),"function"==typeof u&&(0,n.createElement)(m.Button,{icon:P.Z,label:c,onClick:()=>u(t)})))},L=e=>{let{value:t,attributeType:o="regular",onChange:s}=e;const[m,u]=(0,n.useState)(!1),[d,p]=(0,n.useState)(null),_="for-variations"===o,g={variation:_},E=_?"product_add_options_modal_cancel_button_click":"product_add_attributes_modal_cancel_button_click",h=e=>`${e.id}-${e.name}`,w=e=>{s(e.map((e=>({...e,options:e.terms?e.terms.map((e=>e.name)):e.options,terms:void 0,visible:e.visible||!1}))))},b=e=>{w([...t||[],...e.filter((e=>!(t||[]).find((t=>0===e.id?e.name===t.name:t.id===e.id)))).map(((e,o)=>({...g,...e,position:(t||[]).length+o})))]),(0,c.recordEvent)("product_add_attributes_modal_add_button_click"),u(!1)};if(!t.length)return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(x,{addNewLabel:_?(0,r.__)("Add options","woocommerce"):void 0,onNewClick:()=>{(0,c.recordEvent)("product_add_first_attribute_button_click"),u(!0)},subtitle:_?(0,r.__)("No options yet","woocommerce"):void 0}),m&&(0,n.createElement)(S,{onCancel:()=>{(0,c.recordEvent)(E),u(!1)},onAdd:b,selectedAttributeIds:[]}),(0,n.createElement)(a.__experimentalSelectControlMenuSlot,null));const I=t.sort(((e,t)=>e.position-t.position)),N=t.reduce(((e,t)=>(e[f(t)]=t,e)),{}),C=t.find((e=>h(e)===d)),v=_?(0,r.__)("You can change the option's name in {{link}}Attributes{{/link}}.","woocommerce"):(0,r.__)("You can change the attribute's name in {{link}}Attributes{{/link}}.","woocommerce");return(0,n.createElement)("div",{className:"woocommerce-attribute-field"},(0,n.createElement)(a.Sortable,{onOrderChange:e=>{const t=e.reduce(((e,t,o)=>{let{props:n}=t;return e[f(n.attribute)]=o,e}),{});s(function(e,t){return Object.keys(t).map((o=>isNaN(e[o])?{...t[o]}:{...t[o],position:e[o]}))}(t,N))}},I.map((e=>(0,n.createElement)(D,{attribute:e,key:h(e),onEditClick:()=>p(h(e)),onRemoveClick:()=>{return o=e,void(window.confirm((0,r.__)("Remove this attribute?","woocommerce"))?((0,c.recordEvent)("product_remove_attribute_confirmation_confirm_click"),w(t.filter((e=>h(e)!==h(o))))):(0,c.recordEvent)("product_remove_attribute_confirmation_cancel_click"));var o}})))),(0,n.createElement)(T,{label:_?(0,r.__)("Add option","woocommerce"):void 0,onAddClick:()=>{(0,c.recordEvent)(_?"product_add_option_button":"product_add_attribute_button"),u(!0)}}),m&&(0,n.createElement)(S,{title:_?(0,r.__)("Add options","woocommerce"):void 0,onCancel:()=>{(0,c.recordEvent)(E),u(!1)},onAdd:b,selectedAttributeIds:t.map((e=>e.id))}),(0,n.createElement)(a.__experimentalSelectControlMenuSlot,null),C&&(0,n.createElement)(y,{title:(0,r.sprintf)((0,r.__)("Edit %s","woocommerce"),C.name),globalAttributeHelperMessage:(0,i.Z)({mixedString:v,components:{link:(0,n.createElement)(a.Link,{href:(0,l.getAdminLink)("edit.php?post_type=product&page=product_attributes"),target:"_blank",type:"wp-admin"},(0,n.createElement)(n.Fragment,null))}}),onCancel:()=>p(null),onEdit:e=>{const o=[...t],n=o.findIndex((t=>0!==t.id?t.id===e.id:t.name===e.name));o.splice(n,1,e),w(o),p(null)},attribute:C}))}},9046:function(e,t,o){o.d(t,{GJ:function(){return a},Jd:function(){return c},OV:function(){return l},Op:function(){return i},PF:function(){return u},Sn:function(){return m},Uu:function(){return _},cw:function(){return p},hf:function(){return s},ii:function(){return n},o0:function(){return r},zi:function(){return d}});const n="product-details",r="general/details",a="inventory/inventory",c="inventory/advanced",i="general/images",l="general/attributes",s="shipping/shipping",m="shipping/dimensions",u="tab/inventory",d="tab/general",p="tab/shipping",_="woocommerce"},45809:function(e,t,o){var n=o(69307),r=o(98817),a=o(9818),c=o(67221),i=o(86020);const l=e=>{let{fields:t}=e;const{getInputProps:o}=(0,i.useFormContext)();return(0,n.createElement)(n.Fragment,null,t.map((e=>(0,n.createElement)(i.__experimentalWooProductFieldItem,{key:e.properties.name,id:e.id,section:e.section,pluginId:e.plugin_id,order:e.order},(0,n.createElement)(n.Fragment,null,(0,i.renderField)(e.type,{...o(e.properties.name),...e.properties})))))," ")},s=e=>{let{sections:t}=e;return(0,n.createElement)(n.Fragment,null,t.map((e=>(0,n.createElement)(i.__experimentalWooProductSectionItem,{key:e.id,id:e.id,location:e.location,pluginId:e.plugin_id,order:e.order},(0,n.createElement)(i.__experimentalProductFieldSection,{id:e.id,title:e.title,description:e.description})))))};(0,i.registerCoreProductFields)();const m=()=>{const{formData:e}=(0,a.useSelect)((e=>({formData:e(c.EXPERIMENTAL_PRODUCT_FORM_STORE_NAME).getProductForm()})));return(0,n.createElement)(n.Fragment,null,e&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s,{sections:e.sections}),(0,n.createElement)(l,{fields:e.fields})))};(0,a.resolveSelect)(c.EXPERIMENTAL_PRODUCT_FORM_STORE_NAME).getProductForm(),(0,r.registerPlugin)("wc-admin-product-editor-form-fills",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(m,null)});var u=o(65736),d=o(55609),p=o(5267),_=o(78674),g=o(14599),E=o(7506),h=o(79205);function w(e){var t;let{onAdd:o,onCancel:r}=e;const{errors:a,getInputProps:c,isValidForm:l}=(0,i.useFormContext)(),[s,m]=(0,n.useState)(!1);return(0,n.createElement)("div",{className:"woocommerce-add-new-shipping-class-modal__wrapper"},(0,n.createElement)(d.TextControl,(0,p.Z)({},c("name"),{placeholder:(0,u.__)("e.g. Fragile products","woocommerce"),label:(0,_.Z)({mixedString:(0,u.__)("Name {{required/}}","woocommerce"),components:{required:(0,n.createElement)("span",{className:"woocommerce-add-new-shipping-class-modal__optional-input"},(0,u.__)("(required)","woocommerce"))}})})),(0,n.createElement)(d.TextControl,(0,p.Z)({},c("slug"),{label:(0,u.__)("Slug","woocommerce")})),(0,n.createElement)(d.TextControl,(0,p.Z)({},c("description"),{label:(0,u.__)("Description","woocommerce"),help:null!==(t=null==a?void 0:a.description)&&void 0!==t?t:(0,u.__)("Describe how you and other store administrators can use this shipping class.","woocommerce")})),(0,n.createElement)("div",{className:"woocommerce-add-new-shipping-class-modal__buttons"},(0,n.createElement)(d.Button,{isSecondary:!0,onClick:r},(0,u.__)("Cancel","woocommerce")),(0,n.createElement)(d.Button,{isPrimary:!0,isBusy:s,disabled:!l||s,onClick:function(){m(!0),o().then((()=>{m(!1),r()})).catch((()=>{m(!1)}))}},(0,u.__)("Add","woocommerce"))))}function b(e){var t;const o={};return null!==(t=e.name)&&void 0!==t&&t.length||(o.name=(0,u.__)("The shipping class name is required.","woocommerce")),o}const I={name:"",slug:"",description:""};function N(e){let{shippingClass:t,onAdd:o,onCancel:r}=e;return(0,n.createElement)(d.Modal,{title:(0,u.__)("New shipping class","woocommerce"),className:"woocommerce-add-new-shipping-class-modal",onRequestClose:r},(0,n.createElement)(i.Form,{initialValues:null!=t?t:I,validate:b,errors:{},onSubmit:o},(e=>(0,n.createElement)(w,{onAdd:e.handleSubmit,onCancel:r}))))}const C=[{value:"",label:(0,u.__)("No shipping class","woocommerce")},{value:E.B1,label:(0,u.__)("Add new shipping class","woocommerce")}];function v(e){return e.map((e=>{let{slug:t,name:o}=e;return{value:t,label:o}}))}function f(e,t){var o;const n=null==e||null===(o=e.categories)||void 0===o?void 0:o.find((e=>{let{slug:t}=e;return t!==E.vE}));if(n&&(null==t||!t.some((e=>{let{slug:t}=e;return t===n.slug}))))return{name:n.name,slug:n.slug}}const S=e=>{let{product:t}=e;const{getInputProps:o,getSelectControlProps:r,setValue:l}=(0,i.useFormContext)(),[s,m]=(0,n.useState)(!1),w=o("shipping_class"),{shippingClasses:b,hasResolvedShippingClasses:I}=(0,a.useSelect)((e=>{const{getProductShippingClasses:t,hasFinishedResolution:o}=e(c.EXPERIMENTAL_PRODUCT_SHIPPING_CLASSES_STORE_NAME);return{hasResolvedShippingClasses:o("getProductShippingClasses"),shippingClasses:t()}}),[]),{createProductShippingClass:S,invalidateResolution:y}=(0,a.useDispatch)(c.EXPERIMENTAL_PRODUCT_SHIPPING_CLASSES_STORE_NAME),{createErrorNotice:k}=(0,a.useDispatch)("core/notices");function M(e){let t=(0,u.__)("We couldn’t add this shipping class. Try again in a few seconds.","woocommerce");throw"term_exists"===e.code&&(t=(0,u.__)("A shipping class with that slug already exists.","woocommerce")),k(t,{explicitDismiss:!0}),e}return(0,n.createElement)(n.Fragment,null,I?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(d.SelectControl,(0,p.Z)({label:(0,u.__)("Shipping class","woocommerce")},r("shipping_class",{className:"half-width-field"}),{onChange:e=>{e!==E.B1?w.onChange(e):m(!0)},options:[...C,...v(null!=b?b:[])]})),(0,n.createElement)("span",{className:"woocommerce-product-form__secondary-text"},(0,_.Z)({mixedString:(0,u.__)("Manage shipping classes and rates in {{link}}global settings{{/link}}.","woocommerce"),components:{link:(0,n.createElement)(i.Link,{href:`${h.SX}admin.php?page=wc-settings&tab=shipping§ion=classes`,target:"_blank",type:"external",onClick:()=>{(0,g.recordEvent)("product_shipping_global_settings_link_click")}},(0,n.createElement)(n.Fragment,null))}}))):(0,n.createElement)("div",{className:"product-shipping-section__spinner-wrapper"},(0,n.createElement)(i.Spinner,null)),s&&(0,n.createElement)(N,{shippingClass:f(t,b),onAdd:e=>S(e).then((e=>((0,g.recordEvent)("product_new_shipping_class_modal_add_button_click"),y("getProductShippingClasses"),l("shipping_class",e.slug),e))).catch(M),onCancel:()=>m(!1)}))};var y=o(15064);const k=e=>(0,_.Z)({mixedString:e,components:{span:(0,n.createElement)("span",{className:"woocommerce-product-form__secondary-text"})}}),M=e=>{let{dimensionProps:t,setHighlightSide:o}=e;const{getInputProps:r}=(0,i.useFormContext)(),{formatNumber:a}=(0,y.g)(),c=r("dimensions.width",t);return(0,n.createElement)(d.BaseControl,{id:"product_shipping_dimensions_width",className:c.className,help:c.help},(0,n.createElement)(d.__experimentalInputControl,(0,p.Z)({},c,{value:a(String(c.value)),label:k((0,u.__)("Width {{span}}A{{/span}}","woocommerce")),onFocus:()=>{o("A")}})))},x=e=>{let{dimensionProps:t,setHighlightSide:o}=e;const{getInputProps:r}=(0,i.useFormContext)(),{formatNumber:a}=(0,y.g)(),c=r("dimensions.length",t);return(0,n.createElement)(d.BaseControl,{id:"product_shipping_dimensions_length",className:c.className,help:c.help},(0,n.createElement)(d.__experimentalInputControl,(0,p.Z)({},c,{value:a(String(c.value)),label:k((0,u.__)("Length {{span}}B{{/span}}","woocommerce")),onFocus:()=>{o("B")}})))},T=e=>{let{dimensionProps:t,setHighlightSide:o}=e;const{getInputProps:r}=(0,i.useFormContext)(),{formatNumber:a}=(0,y.g)(),c=r("dimensions.height",t);return(0,n.createElement)(d.BaseControl,{id:"product_shipping_dimensions_height",className:c.className,help:c.help},(0,n.createElement)(d.__experimentalInputControl,(0,p.Z)({},c,{value:a(String(c.value)),label:k((0,u.__)("Height {{span}}C{{/span}}","woocommerce")),onFocus:()=>{o("C")}})))},P=()=>{const{getInputProps:e}=(0,i.useFormContext)(),{formatNumber:t,parseNumber:o}=(0,y.g)(),{weightUnit:r,hasResolvedUnits:l}=(0,a.useSelect)((e=>{const{getOption:t,hasFinishedResolution:o}=e(c.OPTIONS_STORE_NAME);return{weightUnit:t("woocommerce_weight_unit"),hasResolvedUnits:o("getOption",["woocommerce_weight_unit"])}}),[]);if(!l)return null;const s=e("weight",{sanitize:e=>o(String(e))});return(0,n.createElement)(d.BaseControl,{id:"product_shipping_weight",className:s.className,help:s.help},(0,n.createElement)(d.__experimentalInputControl,(0,p.Z)({},s,{value:t(String(s.value)),label:(0,u.__)("Weight","woocommerce"),suffix:r})))};var D=o(9046);function L(e){let{highlight:t,...o}=e;return(0,n.createElement)("svg",(0,p.Z)({},o,{viewBox:"0 0 288 195",fill:"none",xmlns:"http://www.w3.org/2000/svg"}),(0,n.createElement)("path",{d:"M10.4922 134.221V35.2617C10.4922 33.8539 11.9079 32.8867 13.2193 33.3986L98.3109 66.6076C99.0711 66.9043 99.5748 67.633 99.5837 68.449L100.703 171.089C100.719 172.534 99.2449 173.518 97.9167 172.95L11.7054 136.06C10.9695 135.745 10.4922 135.022 10.4922 134.221Z",fill:"A"===t?"#F0F6FC":"#F6F7F7"}),(0,n.createElement)("path",{d:"M43.9062 84.2338V44.7946L187.953 11.877L211.485 20.5392L67.0049 53.3546V93.6078L43.9062 84.2338Z",fill:"#F0F0F0",stroke:"#DDDDDD",strokeWidth:"2"}),(0,n.createElement)("path",{d:"M43.9062 99.8824V90.6973L67.0049 100.301V109.256L43.9062 99.8824Z",fill:"#F0F0F0",stroke:"#DDDDDD",strokeWidth:"2"}),(0,n.createElement)("path",{d:"M10.4922 134.22V35.2617C10.4922 33.8539 11.9079 32.8867 13.2193 33.3986L98.2977 66.6025C99.0645 66.9017 99.5696 67.6402 99.5705 68.4633L99.6936 173.635L11.7067 136.06C10.9701 135.745 10.4922 135.021 10.4922 134.22Z",stroke:"#DDDDDD",strokeWidth:"2"}),(0,n.createElement)("path",{d:"M249.015 32.8879L99.5703 66.7689V172.489C99.5703 173.801 100.812 174.758 102.081 174.423L249.968 135.378C250.846 135.146 251.458 134.352 251.458 133.444V34.8384C251.458 33.5554 250.267 32.6042 249.015 32.8879Z",fill:"B"===t?"#F0F6FC":"#F6F7F7",stroke:"#DDDDDD",strokeWidth:"2"}),(0,n.createElement)("path",{d:"M154.224 117.401L115.969 126.13C115.059 126.337 114.414 127.147 114.414 128.08V154.212C114.414 155.526 115.658 156.483 116.928 156.145L155.182 145.98C156.058 145.747 156.668 144.954 156.668 144.047V119.351C156.668 118.067 155.475 117.115 154.224 117.401Z",fill:"#F0F0F0",stroke:"#DDDDDD",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"6 6"}),(0,n.createElement)("path",{d:"M12.0625 33.3189L159.943 1.6182C160.304 1.54091 160.679 1.5648 161.027 1.68725L249.4 32.7973",stroke:"#DDDDDD",strokeWidth:"2"}),(0,n.createElement)("path",{d:"M0.214844 149.961L5.30102 156.971L8.8282 149.061L0.214844 149.961ZM84.7236 187.648L79.6374 180.638L76.1102 188.548L84.7236 187.648ZM6.07417 153.396L78.2533 185.584L78.8642 184.214L6.68509 152.026L6.07417 153.396Z",fill:"A"===t?"#007CBA":"#BBBBBB"}),(0,n.createElement)("path",{d:"M256.025 152.246L247.662 149.998L249.897 158.365L256.025 152.246ZM106.422 192.216L114.785 194.463L112.55 186.097L106.422 192.216ZM249.31 153.263L112.75 189.749L113.137 191.198L249.698 154.713L249.31 153.263Z",fill:"B"===t?"#007CBA":"#BBBBBB"}),(0,n.createElement)("path",{d:"M268.586 28.908L264.256 36.408H272.916L268.586 28.908ZM268.586 131.689L272.916 124.189H264.256L268.586 131.689ZM267.836 35.658V124.939H269.336V35.658H267.836Z",fill:"C"===t?"#007CBA":"#BBBBBB"}),(0,n.createElement)("path",{d:"M26.8564 184.66L29.6548 176.909H30.9492L33.7476 184.66H32.4692L31.7603 182.603H28.8062L28.0918 184.66H26.8564ZM29.1123 181.593H31.4541L30.3315 178.316H30.2402L29.1123 181.593Z",fill:"A"===t?"#007CBA":"#757575"}),(0,n.createElement)("path",{d:"M189.621 189.228V181.478H192.736C193.463 181.478 194.032 181.651 194.444 181.999C194.859 182.342 195.067 182.813 195.067 183.411C195.067 183.816 194.936 184.179 194.675 184.501C194.413 184.82 194.091 185.012 193.708 185.076V185.167C194.231 185.221 194.652 185.42 194.97 185.764C195.292 186.104 195.454 186.526 195.454 187.031C195.454 187.715 195.219 188.252 194.75 188.643C194.281 189.033 193.633 189.228 192.806 189.228H189.621ZM190.824 188.208H192.564C193.105 188.208 193.516 188.1 193.799 187.885C194.082 187.67 194.224 187.357 194.224 186.945C194.224 186.541 194.077 186.235 193.783 186.027C193.49 185.816 193.06 185.71 192.494 185.71H190.824V188.208ZM190.824 184.759H192.252C192.782 184.759 193.183 184.664 193.456 184.475C193.731 184.281 193.869 184 193.869 183.631C193.869 183.273 193.744 182.996 193.493 182.799C193.246 182.598 192.901 182.498 192.457 182.498H190.824V184.759Z",fill:"B"===t?"#007CBA":"#757575"}),(0,n.createElement)("path",{d:"M279.519 80.2898C279.519 79.033 279.83 78.0411 280.453 77.3142C281.08 76.5873 281.932 76.2239 283.01 76.2239C283.862 76.2239 284.587 76.4745 285.185 76.9758C285.787 77.4736 286.136 78.1181 286.232 78.9094H285.035C284.92 78.4332 284.68 78.0536 284.315 77.7708C283.953 77.4879 283.518 77.3464 283.01 77.3464C282.315 77.3464 281.764 77.6114 281.355 78.1414C280.951 78.6677 280.749 79.3839 280.749 80.2898C280.749 81.1921 280.951 81.9083 281.355 82.4382C281.764 82.9646 282.317 83.2278 283.015 83.2278C283.527 83.2278 283.964 83.0989 284.326 82.8411C284.691 82.5833 284.927 82.2359 285.035 81.7991H286.232C286.125 82.5653 285.778 83.183 285.19 83.6521C284.603 84.1176 283.878 84.3503 283.015 84.3503C281.937 84.3503 281.085 83.9869 280.458 83.26C279.832 82.5331 279.519 81.5431 279.519 80.2898Z",fill:"C"===t?"#007CBA":"#757575"}))}const R=()=>{const[e,t]=(0,n.useState)(),{parseNumber:o}=(0,y.g)(),{dimensionUnit:r,hasResolvedUnits:l}=(0,a.useSelect)((e=>{const{getOption:t,hasFinishedResolution:o}=e(c.OPTIONS_STORE_NAME);return{dimensionUnit:t("woocommerce_dimension_unit"),weightUnit:t("woocommerce_weight_unit"),hasResolvedUnits:o("getOption",["woocommerce_dimension_unit"])&&o("getOption",["woocommerce_weight_unit"])}}),[]),s={onBlur:()=>{t(void 0)},sanitize:e=>o(String(e)),suffix:r};return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalWooProductSectionItem,{id:D.hf,location:D.cw,pluginId:D.Uu,order:1},(0,n.createElement)(i.__experimentalProductSectionLayout,{title:(0,u.__)("Shipping","woocommerce"),description:(0,u.__)("Set up shipping costs and enter dimensions used for accurate rate calculations.","woocommerce")},(0,n.createElement)(d.Card,null,(0,n.createElement)(d.CardBody,{className:"product-shipping-section__classes"},(0,n.createElement)(i.__experimentalWooProductFieldItem.Slot,{section:D.hf}))),(0,n.createElement)(d.Card,null,(0,n.createElement)(d.CardBody,{className:"product-shipping-section__dimensions"},(0,n.createElement)("h4",null,(0,u.__)("Dimensions","woocommerce")),(0,n.createElement)("p",{className:"woocommerce-product-form__secondary-text"},(0,u.__)("Enter the size of the product as you'd put it in a shipping box, including packaging like bubble wrap.","woocommerce")),(0,n.createElement)("div",{className:"product-shipping-section__dimensions-body"},(0,n.createElement)("div",{className:"product-shipping-section__dimensions-body-col"},l&&(0,n.createElement)(i.__experimentalWooProductFieldItem.Slot,{section:D.Sn,fillProps:{setHighlightSide:t,dimensionProps:s}})),(0,n.createElement)("div",{className:"product-shipping-section__dimensions-body-col"},(0,n.createElement)(L,{highlight:e,className:"product-shipping-section__dimensions-image"}))))))),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"shipping/class",section:D.hf,pluginId:D.Uu,order:1},(e=>{let{product:t}=e;return(0,n.createElement)(S,{product:t})})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"shipping/dimensions/width",section:D.Sn,pluginId:D.Uu,order:1},(e=>{let{...t}=e;return(0,n.createElement)(M,t)})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"shipping/dimensions/length",section:D.Sn,pluginId:D.Uu,order:3},(e=>{let{...t}=e;return(0,n.createElement)(x,t)})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"shipping/dimensions/height",section:D.Sn,pluginId:D.Uu,order:5},(e=>{let{...t}=e;return(0,n.createElement)(T,t)})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"shipping/dimensions/weight",section:D.Sn,pluginId:D.Uu,order:7},(0,n.createElement)(P,null)))};(0,r.registerPlugin)("wc-admin-product-editor-shipping-section",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(R,null)});var A=o(96483),j=o(14812);const O=e=>{let{product:t,permalinkPrefix:o,permalinkSuffix:r,onCancel:c,onSaved:l}=e;const{createNotice:s}=(0,a.useDispatch)("core/notices"),{updateProductWithStatus:m,isUpdatingDraft:p,isUpdatingPublished:_}=(0,y.g)(),[E,h]=(0,n.useState)(t.slug||(0,A.cleanForSlug)(t.name)),{resetForm:w,touched:b,errors:I}=(0,i.useFormContext)(),N=o+(0,A.cleanForSlug)(E)+r;return(0,n.createElement)(d.Modal,{title:(0,u.__)("Edit product link","woocommerce"),onRequestClose:()=>c(),className:"woocommerce-product-link-edit-modal"},(0,n.createElement)("div",{className:"woocommerce-product-link-edit-modal__wrapper"},(0,n.createElement)(d.TextControl,{label:N,name:"slug",value:E,onChange:h}),(0,n.createElement)(j.Text,{size:12},(0,u.__)("Use simple, descriptive words and numbers. We'll replace spaces with hyphens (-).","woocommerce")),(0,n.createElement)("div",{className:"woocommerce-product-link-edit-modal__buttons"},(0,n.createElement)(d.Button,{isSecondary:!0,onClick:()=>c()},(0,u.__)("Cancel","woocommerce")),(0,n.createElement)(d.Button,{isPrimary:!0,isBusy:p||_,disabled:p||_||E===t.slug,onClick:()=>{(async()=>{(0,g.recordEvent)("product_update_slug",{new_product_page:!0,product_id:t.id,product_type:t.type});const e=await m(t.id,{slug:E},t.status,!0);e&&e.id?(w({...t,slug:e.slug,permalink:e.permalink},b,I),s(e.slug===(0,A.cleanForSlug)(E)?"success":"info",e.slug===(0,A.cleanForSlug)(E)?(0,u.__)("Product link successfully updated.","woocommerce"):(0,u.__)("Product link already existed, updated to ","woocommerce")+e.permalink)):s("error",(0,u.__)("Failed to update product link.","woocommerce")),l()})()}},(0,u.__)("Save","woocommerce")))))},F=e=>{let{}=e;const[t,o]=(0,n.useState)(!1),{getInputProps:r,values:l,touched:s,errors:m,setValue:g}=(0,i.useFormContext)(),{permalinkPrefix:E,permalinkSuffix:h}=(0,a.useSelect)((e=>{const{getPermalinkParts:t}=e(c.PRODUCTS_STORE_NAME);if(l.id){const e=t(l.id);return{permalinkPrefix:null==e?void 0:e.prefix,permalinkSuffix:null==e?void 0:e.suffix}}return{}}));return(0,n.createElement)("div",null,(0,n.createElement)(d.TextControl,(0,p.Z)({label:(0,_.Z)({mixedString:(0,u.__)("Name {{required/}}","woocommerce"),components:{required:(0,n.createElement)("span",{className:"woocommerce-product-form__optional-input"},(0,u.__)("(required)","woocommerce"))}}),name:`${D.ii}-name`,placeholder:(0,u.__)("e.g. 12 oz Coffee Mug","woocommerce")},r("name",{onBlur:()=>{var e;!l.sku&&null!==(e=l.name)&&void 0!==e&&e.length&&g("sku",(0,A.cleanForSlug)(l.name))}}))),l.id&&!(Boolean(s.name)&&Boolean(m.name))&&E&&(0,n.createElement)("span",{className:"woocommerce-product-form__secondary-text product-details-section__product-link"},(0,u.__)("Product link","woocommerce"),": ",(0,n.createElement)("a",{href:l.permalink,target:"_blank",rel:"noreferrer"},E,l.slug||(0,A.cleanForSlug)(l.name),h),(0,n.createElement)(d.Button,{variant:"link",onClick:()=>o(!0)},(0,u.__)("Edit","woocommerce"))),t&&(0,n.createElement)(O,{permalinkPrefix:E||"",permalinkSuffix:h||"",product:l,onCancel:()=>o(!1),onSaved:()=>o(!1)}))};var z=o(92819),U=o(22629),Z=o(37942),B=o(10314),H=o(83849),W=o.n(H);const V=e=>{let{item:t,selectedIds:o=[],items:r,highlightedIndex:a,openParent:c,getItemProps:i}=e;const[l,s]=(0,n.useState)(t.isOpen||!1),m=r.findIndex((e=>e.id===t.data.id)),u=t.children.filter((e=>r.includes(e.data)));return(0,n.useEffect)((()=>{a===m&&u.length>0&&!l?s(!0):a===m&&c&&c()}),[a]),(0,n.useEffect)((()=>{t.isOpen!==l&&s(t.isOpen)}),[t.isOpen]),(0,n.createElement)("li",{className:W()("woocommerce-category-field-dropdown__item",{item_highlighted:m===a})},(0,n.createElement)("div",(0,p.Z)({className:"woocommerce-category-field-dropdown__item-content"},i({item:t.data,index:m})),u.length>0?(0,n.createElement)(d.Icon,{className:"woocommerce-category-field-dropdown__toggle",icon:l?Z.Z:B.Z,size:20,onClick:e=>{e.stopPropagation(),s(!l)}}):(0,n.createElement)("div",{className:"woocommerce-category-field-dropdown__toggle-placeholder"}),(0,n.createElement)(d.CheckboxControl,{label:(0,U.decodeEntities)(t.data.name),checked:o.includes(t.data.id),onChange:()=>t.data})),u.length>0?(0,n.createElement)("ul",{className:W()("woocommerce-category-field-dropdown__item-children",{"woocommerce-category-field-dropdown__item-open":l})},u.map((e=>(0,n.createElement)(V,{key:e.data.id,item:e,selectedIds:o,items:r,highlightedIndex:a,openParent:()=>!l&&s(!0),getItemProps:i})))):null)},Y={};function Q(e,t){e[t.parentID]&&(e[t.parentID].isOpen=!0,0!==e[t.parentID].parentID&&Q(e,e[t.parentID]))}const J=e=>e.sort(((e,t)=>e.data.count===t.data.count?e.data.name.localeCompare(t.data.name):t.data.count-e.data.count));function G(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;for(const o of t)e.push(o.data),o.children.length>0&&(o.children=J(o.children),G(e,o.children));return e}async function X(e,t){const o={},n=[];for(const t of e)o[t.id]={data:t,children:[],parentID:t.parent,isOpen:!1};if(Object.keys(o).forEach((e=>{const r=o[parseInt(e,10)];if(0!==r.parentID)if(!o[r.parentID]&&Y[r.parentID]&&(o[r.parentID]={data:Y[r.parentID],children:[],parentID:Y[r.parentID].parent,isOpen:!1}),o[r.parentID]){o[r.parentID].children.push(r),Y[r.parentID]=o[r.parentID].data;const e=new RegExp((0,z.escapeRegExp)(t),"i");t.length>0&&e.test(r.data.name)&&Q(o,r)}else n.push(r.parentID)})),n.length>0)return(0,a.resolveSelect)(c.EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME).getProductCategories({include:n}).then((o=>X([...o,...e],t)));const r=J(Object.values(o).filter((e=>0===e.parentID))),i=G([],r);return Promise.resolve([i,r,o])}const q={per_page:100},$=()=>{const e=(0,n.useRef)(""),{initialCategories:t,totalCount:o}=(0,a.useSelect)((e=>{const{getProductCategories:t,getProductCategoriesTotalCount:o}=e(c.EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME);return{initialCategories:t(q),totalCount:o(q)}})),[r,i]=(0,n.useState)(!0),[l,s]=(0,n.useState)([[],[],{}]),m=!t||t.length>0&&o>100;(0,n.useEffect)((()=>{t&&t.length>0&&(0===l[0].length||0===e.current.length)&&(i(!0),X([...t],"").then((e=>{s(e),i(!1)}),(()=>{i(!1)})))}),[t]);const u=(0,n.useCallback)((async o=>{if(e.current=o||"",!m&&t.length>0)return X([...t],o||"").then((e=>(s(e),e[1])));i(!0);try{const e=await(0,a.resolveSelect)(c.EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME).getProductCategories({search:o,per_page:100}),t=await X(e,o||"");return i(!1),s(t),t[1]}catch(e){return i(!1),[]}}),[t]),d=l[2];return{searchCategories:u,getFilteredItems:(0,n.useCallback)(((e,t,o)=>{const n=new RegExp((0,z.escapeRegExp)(t),"i");return e.filter((e=>o.indexOf(e)<0&&(n.test(e.name)||d[e.id]&&d[e.id].isOpen)))}),[l]),categoriesSelectList:l[0],categories:l[1],isSearching:r,categoryTreeKeyValues:d}};var K=o(94333);const ee=e=>{let{initialCategoryName:t,onCancel:o,onCreate:r}=e;const{categoriesSelectList:l,isSearching:s,categoryTreeKeyValues:m,searchCategories:p,getFilteredItems:E}=$(),{createNotice:h}=(0,a.useDispatch)("core/notices"),[w,b]=(0,n.useState)(!1),{createProductCategory:I,invalidateResolutionForStoreSelector:N}=(0,a.useDispatch)(c.EXPERIMENTAL_PRODUCT_CATEGORIES_STORE_NAME),[C,v]=(0,n.useState)(t||""),[f,S]=(0,n.useState)(null),y=(0,K.useDebounce)(p,250);return(0,n.createElement)(d.Modal,{title:(0,u.__)("Create category","woocommerce"),onRequestClose:()=>o(),className:"woocommerce-create-new-category-modal"},(0,n.createElement)("div",{className:"woocommerce-create-new-category-modal__wrapper"},(0,n.createElement)(d.TextControl,{label:(0,u.__)("Name","woocommerce"),name:"Tops",value:C,onChange:v}),(0,n.createElement)(i.__experimentalSelectControl,{items:l,label:(0,_.Z)({mixedString:(0,u.__)("Parent category {{optional/}}","woocommerce"),components:{optional:(0,n.createElement)("span",{className:"woocommerce-product-form__optional-input"},(0,u.__)("(optional)","woocommerce"))}}),selected:f,onSelect:e=>e&&S(e),onRemove:()=>S(null),onInputChange:y,getFilteredItems:E,getItemLabel:e=>(null==e?void 0:e.name)||"",getItemValue:e=>(null==e?void 0:e.id)||""},(e=>{let{items:t,isOpen:o,getMenuProps:r,highlightedIndex:a,getItemProps:c}=e;return(0,n.createElement)(i.__experimentalSelectControlMenu,{isOpen:o,getMenuProps:r,className:"woocommerce-category-field-dropdown__menu"},[s?(0,n.createElement)("div",{key:"loading-spinner",className:"woocommerce-category-field-dropdown__item"},(0,n.createElement)("div",{className:"woocommerce-category-field-dropdown__item-content"},(0,n.createElement)(d.Spinner,null))):null,...t.filter((e=>{var t;return 0===(null===(t=m[e.id])||void 0===t?void 0:t.parentID)})).map((e=>(0,n.createElement)(V,{key:`${e.id}`,item:m[e.id],selectedIds:f?[f.id]:[],items:t,highlightedIndex:a,getItemProps:c})))].filter((e=>null!==e)))})),(0,n.createElement)("div",{className:"woocommerce-create-new-category-modal__buttons"},(0,n.createElement)(d.Button,{isSecondary:!0,onClick:()=>o(),disabled:w},(0,u.__)("Cancel","woocommerce")),(0,n.createElement)(d.Button,{isPrimary:!0,disabled:0===C.length||w,isBusy:w,onClick:()=>{(async()=>{(0,g.recordEvent)("product_category_add",{new_product_page:!0}),b(!0);try{const e=await I({name:C,parent:f?f.id:void 0});N("getProductCategories"),b(!1),r(e)}catch(e){h("error",(0,u.__)("Failed to create category.","woocommerce")),b(!1),o()}})()}},(0,u.__)("Save","woocommerce")))))};var te=o(18248);const oe=e=>{let{item:t,highlightedIndex:o,getItemProps:r,items:a}=e;const c=a.findIndex((e=>e.id===t.id));return(0,n.createElement)("li",(0,p.Z)({},r({item:t,index:c}),{className:W()("woocommerce-category-field-dropdown__item is-new",{item_highlighted:o===c})}),(0,n.createElement)("div",{className:"woocommerce-category-field-dropdown__item-content"},(0,n.createElement)(d.Icon,{className:"category-field-dropdown__toggle",icon:te.Z,size:20}),(0,u.sprintf)((0,u.__)('Create "%s"',"woocommerce"),t.name)))};function ne(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;e.push({id:t.id,name:t.name});const n=void 0!==t.parent?t.parent:o[t.id].parentID;return n>0&&o[n]&&!e.find((e=>e.id===n))&&ne(e,o[n].data,o),e}const re=e=>{let{label:t,placeholder:o,value:r=[],onChange:a}=e;const{isSearching:c,categoriesSelectList:l,categoryTreeKeyValues:s,searchCategories:m,getFilteredItems:u}=$(),[d,p]=(0,n.useState)(!1),[_,g]=(0,n.useState)(""),E=e=>{g(e||""),m(e||"")},h=(0,n.useMemo)((()=>(0,z.debounce)(E,150)),[E]),w=(e,t)=>{if(-99!==e)if(t){const t=s[e].data;t&&a(ne([...r],t,s))}else a(r.filter((t=>t.id!==e)));else p(!0)},b=r.map((e=>e.id));return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalSelectControl,{className:"woocommerce-category-field-dropdown components-base-control",multiple:!0,items:l,label:t,selected:r,getItemLabel:e=>(null==e?void 0:e.name)||"",getItemValue:e=>(null==e?void 0:e.id)||"",onSelect:e=>{e&&w(e.id,!b.includes(e.id))},onRemove:e=>e&&w(e.id,!1),onInputChange:h,getFilteredItems:(e,t,o)=>{const n=u(e,t,o);return t.length>0&&!c&&!n.find((e=>e.name.toLowerCase()===t.toLowerCase()))?[...n,{id:-99,name:t}]:n},placeholder:0===r.length?o:"",stateReducer:(e,t)=>{const{changes:o,type:n}=t;switch(n){case i.selectControlStateChangeTypes.ControlledPropUpdatedSelectedItem:return{...o,inputValue:e.inputValue};case i.selectControlStateChangeTypes.ItemClick:return o.selectedItem&&-99===o.selectedItem.id?o:{...o,isOpen:!0,inputValue:e.inputValue,highlightedIndex:e.highlightedIndex};default:return o}},__experimentalOpenMenuOnFocus:!0},(e=>{let{items:t,isOpen:o,getMenuProps:r,getItemProps:a,highlightedIndex:l}=e;const m=t.length>0?t.filter((e=>{var t;return 0===(null===(t=s[e.id])||void 0===t?void 0:t.parentID)||-99===e.id})):[];return(0,n.createElement)(i.__experimentalSelectControlMenu,{isOpen:o,getMenuProps:r,className:"woocommerce-category-field-dropdown__menu"},(0,n.createElement)(n.Fragment,null,c?(0,n.createElement)("li",{className:"woocommerce-category-field-dropdown__item"},(0,n.createElement)("div",{className:"woocommerce-category-field-dropdown__item-content"},(0,n.createElement)(i.Spinner,null))):m.map((e=>-99===e.id?(0,n.createElement)(oe,{key:`${e.id}`,item:e,highlightedIndex:l,items:t,getItemProps:a}):(0,n.createElement)(V,{key:`${e.id}`,item:s[e.id],highlightedIndex:l,selectedIds:b,items:t,getItemProps:a})))))})),(0,n.createElement)(i.__experimentalSelectControlMenuSlot,null),d&&(0,n.createElement)(ee,{initialCategoryName:_,onCancel:()=>p(!1),onCreate:e=>{a(ne([...r],e,s)),p(!1),E("")}}))},ae=()=>{const{getInputProps:e}=(0,i.useFormContext)();return(0,n.createElement)(re,(0,p.Z)({label:(0,u.__)("Categories","woocommerce"),placeholder:(0,u.__)("Search or create category…","woocommerce")},e("categories")))};var ce=o(59989);const ie=()=>{const{getCheckboxControlProps:e}=(0,i.useFormContext)();return(0,n.createElement)(d.CheckboxControl,(0,p.Z)({label:(0,n.createElement)(n.Fragment,null,(0,u.__)("Feature this product","woocommerce"),(0,n.createElement)(i.__experimentalTooltip,{text:(0,_.Z)({mixedString:(0,u.__)("Include this product in a featured section on your website with a widget or shortcode. {{moreLink/}}","woocommerce"),components:{moreLink:(0,n.createElement)(i.Link,{href:"https://woocommerce.com/document/woocommerce-shortcodes/#products",target:"_blank",type:"external",onClick:()=>(0,g.recordEvent)("add_product_learn_more",{category:D.ii})},(0,u.__)("Learn more","woocommerce"))}})}))},e("featured",(0,ce.HP)("featured"))))};var le=o(4981);const se=()=>{const{setValue:e,values:t}=(0,i.useFormContext)(),[o,r]=(0,n.useState)((0,le.parse)(t.short_description||""));return(0,n.createElement)(i.__experimentalRichTextEditor,{label:(0,u.__)("Summary","woocommerce"),blocks:o,onChange:t=>{r(t),o.length&&e("short_description",(0,le.serialize)(t))},placeholder:(0,u.__)("Summarize this product in 1-2 short sentences. We'll show it at the top of the page.","woocommerce")})},me=()=>{const{setValue:e,values:t}=(0,i.useFormContext)(),[o,r]=(0,n.useState)((0,le.parse)(t.description||""));return(0,n.createElement)(i.__experimentalRichTextEditor,{label:(0,u.__)("Description","woocommerce"),blocks:o,onChange:t=>{r(t),o.length&&e("description",(0,le.serialize)(t))},placeholder:(0,u.__)("Describe this product. What makes it unique? What are its most important features?","woocommerce")})},ue=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalWooProductSectionItem,{id:D.o0,location:D.zi,pluginId:D.Uu,order:1},(0,n.createElement)(i.__experimentalProductFieldSection,{id:D.o0,title:(0,u.__)("Product details","woocommerce"),description:(0,u.__)("This info will be displayed on the product page, category pages, social media, and search results.","woocommerce")})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"details/name",section:D.o0,pluginId:D.Uu,order:1},(0,n.createElement)(F,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"details/categories",section:D.o0,pluginId:D.Uu,order:3},(0,n.createElement)(ae,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"details/feature",section:D.o0,pluginId:D.Uu,order:5},(0,n.createElement)(ie,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"details/summary",section:D.o0,pluginId:D.Uu,order:7},(0,n.createElement)(se,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"details/description",section:D.o0,pluginId:D.Uu,order:9},(0,n.createElement)(me,null)));(0,r.registerPlugin)("wc-admin-product-editor-details-section",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(ue,null)});var de=o(62907),pe=o(42411),_e=o(34537);const ge=()=>{const{getInputProps:e,setValue:t}=(0,i.useFormContext)(),o=e("images").value||[],[r,a]=(0,n.useState)(!1),[c,l]=(0,n.useState)(!1),[s,m]=(0,n.useState)(null),p=()=>{a(!r)};return(0,n.createElement)("div",{className:W()("woocommerce-product-form__images",{"has-images":o.length>0})},(0,n.createElement)(i.ImageGallery,{onDragStart:e=>{const{id:t,dataset:n}=e.target;if(t)m(parseInt(t,10));else{const e=null==n?void 0:n.index;var r;e&&m(null===(r=o[parseInt(e,10)])||void 0===r?void 0:r.id)}p()},onDragEnd:()=>{c&&s&&((0,g.recordEvent)("product_images_remove_image_button_click"),t("images",o.filter((e=>e.id!==s))),l(!1),m(null)),p()},onOrderChange:e=>{const n=e.map((e=>o.find((t=>{var o;return t.id===parseInt(null==e||null===(o=e.props)||void 0===o?void 0:o.id,10)}))));(0,g.recordEvent)("product_images_change_image_order_via_image_gallery"),t("images",n)},onReplace:e=>{let{replaceIndex:n,media:r}=e;void 0===o.find((e=>r.id===e.id))&&(o[n]=r,(0,g.recordEvent)("product_images_replace_image_button_click"),t("images",o))},onSelectAsCover:()=>(0,g.recordEvent)("product_images_select_image_as_cover_button_click")},o.map((e=>(0,n.createElement)(i.ImageGalleryItem,{key:e.id||e.url,alt:e.alt,src:e.url||e.src,id:`${e.id}`})))),(0,n.createElement)("div",{className:"woocommerce-product-form__image-drop-zone"},r?(0,n.createElement)(d.CardBody,null,(0,n.createElement)("div",{className:"woocommerce-product-form__remove-image-drop-zone"},(0,n.createElement)("span",null,(0,n.createElement)(de.Z,{icon:pe.Z,size:20,className:"icon-control"}),(0,u.__)("Drop here to remove","woocommerce")),(0,n.createElement)(d.DropZone,{onHTMLDrop:()=>l(!0),onDrop:()=>l(!0),label:(0,u.__)("Drop here to remove","woocommerce")}))):(0,n.createElement)(d.CardBody,null,(0,n.createElement)(i.MediaUploader,{multipleSelect:!0,onError:()=>null,onFileUploadChange:e=>{e[0].id&&((0,g.recordEvent)("product_images_add_via_file_upload_area"),t("images",[...o,...e]))},onSelect:e=>{const n=e.filter((e=>!o.find((t=>t.id===e.id))));n.length>0&&((0,g.recordEvent)("product_images_add_via_media_library"),t("images",[...o,...n]))},onUpload:e=>{e[0].id&&((0,g.recordEvent)("product_images_add_via_drag_and_drop_upload"),t("images",[...o,...e]))},label:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("img",{src:_e,alt:(0,u.__)("Completed","woocommerce"),className:"woocommerce-product-form__drag-and-drop-image"}),(0,n.createElement)("span",null,(0,u.__)("Drag images here or click to upload","woocommerce")))}))))},Ee=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalWooProductSectionItem,{id:D.Op,location:D.zi,pluginId:D.Uu,order:3},(0,n.createElement)(i.__experimentalProductFieldSection,{id:D.Op,title:(0,u.__)("Images","woocommerce"),description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,(0,u.__)("For best results, use JPEG files that are 1000 by 1000 pixels or larger.","woocommerce")),(0,n.createElement)(i.Link,{className:"woocommerce-form-section__header-link",href:"https://woocommerce.com/posts/fast-high-quality-product-photos/",target:"_blank",type:"external",onClick:()=>{(0,g.recordEvent)("prepare_images_help")}},(0,u.__)("How should I prepare images?","woocommerce")))})),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"images/gallery",section:D.Op,pluginId:D.Uu,order:1},(0,n.createElement)(ge,null)));(0,r.registerPlugin)("wc-admin-product-editor-images-section",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(Ee,null)});var he=o(65483),we=o(1800);const be=e=>{let{value:t,onChange:o,productId:r}=e;const{attributes:a,handleChange:c}=(0,we.g)({allAttributes:t,onChange:o,productId:r});return(0,n.createElement)(he.X,{attributeType:"regular",value:a,onChange:c})},Ie=()=>{const{getInputProps:e,values:{id:t}}=(0,i.useFormContext)();return(0,n.createElement)(be,e("attributes",{productId:t}))},Ne=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalWooProductSectionItem,{id:D.OV,location:D.zi,pluginId:D.Uu,order:5},(0,n.createElement)(i.__experimentalProductSectionLayout,{title:(0,u.__)("Attributes","woocommerce"),className:"woocommerce-product-attributes-section",description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,(0,u.__)("Add descriptive pieces of information that customers can use to filter and search for this product.","woocommerce")),(0,n.createElement)(i.Link,{className:"woocommerce-form-section__header-link",href:"https://woocommerce.com/document/managing-product-taxonomies/#product-attributes",target:"_blank",type:"external",onClick:()=>{(0,g.recordEvent)("learn_more_about_attributes_help")}},(0,u.__)("Learn more about attributes","woocommerce")))},(0,n.createElement)(i.__experimentalWooProductFieldItem.Slot,{section:D.OV}))),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"attributes/add",section:D.OV,pluginId:D.Uu,order:1},(0,n.createElement)(Ie,null)));(0,r.registerPlugin)("wc-admin-product-editor-attributes-section",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(Ne,null)});var Ce=o(74617);const ve=()=>{const{getInputProps:e}=(0,i.useFormContext)();return(0,n.createElement)(d.TextControl,(0,p.Z)({label:(0,u.__)("SKU (Stock Keeping Unit)","woocommerce")},e("sku",{className:"half-width-field"})))},fe=()=>{const{getCheckboxControlProps:e}=(0,i.useFormContext)(),t="yes"===(0,h.O3)("manageStock","yes");return(0,n.createElement)(i.__experimentalConditionalWrapper,{condition:!t,wrapper:e=>(0,n.createElement)(d.Tooltip,{text:(0,u.__)("Quantity tracking is disabled for all products. Go to global store settings to change it.","woocommerce"),position:"top center"},(0,n.createElement)("div",{className:"woocommerce-product-form__tooltip-disabled-overlay"},e))},(0,n.createElement)(d.ToggleControl,(0,p.Z)({label:(0,u.__)("Track quantity for this product","woocommerce")},e("manage_stock",(0,ce.HP)("manage_stock")),{disabled:!t})))},Se=()=>{const{getInputProps:e}=(0,i.useFormContext)(),t=e("stock_status");return delete t.checked,delete t.value,(0,n.createElement)(d.RadioControl,(0,p.Z)({label:(0,u.__)("Stock status","woocommerce"),options:[{label:(0,u.__)("In stock","woocommerce"),value:"instock"},{label:(0,u.__)("Out of stock","woocommerce"),value:"outofstock"},{label:(0,u.__)("On backorder","woocommerce"),value:"onbackorder"}]},t))},ye=()=>{const{getInputProps:e}=(0,i.useFormContext)(),t=(0,h.O3)("notifyLowStockAmount",2);return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("h4",null,(0,u.__)("Product quantity","woocommerce")),(0,n.createElement)(d.TextControl,(0,p.Z)({type:"number",label:(0,u.__)("Current quantity","woocommerce")},e("stock_quantity"),{min:0})),(0,n.createElement)(d.TextControl,(0,p.Z)({type:"number",label:(0,u.__)("Email me when quantity reaches","woocommerce"),placeholder:(0,u.sprintf)((0,u.__)("%d (store default)","woocommerce"),t)},e("low_stock_amount"),{min:0})),(0,n.createElement)("span",{className:"woocommerce-product-form__secondary-text"},(0,_.Z)({mixedString:(0,u.__)("Make sure to enable notifications in {{link}}store settings{{/link}}.","woocommerce"),components:{link:(0,n.createElement)(i.Link,{href:(0,Ce.getAdminLink)("admin.php?page=wc-settings&tab=products§ion=inventory"),target:"_blank",type:"wp-admin",onClick:()=>{(0,g.recordEvent)("product_pricing_list_price_help_tax_settings_click")}},(0,n.createElement)(n.Fragment,null)),strong:(0,n.createElement)("strong",null)}})))},ke=()=>{const{getInputProps:e}=(0,i.useFormContext)(),t=e("backorders");return delete t.checked,delete t.value,(0,n.createElement)(d.RadioControl,(0,p.Z)({label:(0,u.__)("When out of stock","woocommerce"),options:[{label:(0,u.__)("Allow purchases","woocommerce"),value:"yes"},{label:(0,u.__)("Allow purchases, but notify customers","woocommerce"),value:"notify"},{label:(0,u.__)("Don't allow purchases","woocommerce"),value:"no"}]},t))},Me=()=>{const{getCheckboxControlProps:e}=(0,i.useFormContext)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("h4",null,(0,u.__)("Restrictions","woocommerce")),(0,n.createElement)(d.CheckboxControl,(0,p.Z)({label:(0,u.__)("Limit purchases to 1 item per order","woocommerce")},e("sold_individually",(0,ce.HP)("sold_individually")))))},xe=()=>{const{values:e}=(0,i.useFormContext)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.__experimentalWooProductSectionItem,{id:D.GJ,location:D.PF,pluginId:D.Uu,order:1},(0,n.createElement)(i.__experimentalProductSectionLayout,{title:(0,u.__)("Inventory","woocommerce"),description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,(0,u.__)("Set up and manage inventory for this product, including status and available quantity.","woocommerce")),(0,n.createElement)(i.Link,{href:(0,Ce.getAdminLink)("admin.php?page=wc-settings&tab=products§ion=inventory"),target:"_blank",type:"wp-admin",onClick:()=>{(0,g.recordEvent)("add_product_inventory_help")},className:"woocommerce-form-section__header-link"},(0,u.__)("Manage global inventory settings","woocommerce")))},(0,n.createElement)(d.Card,null,(0,n.createElement)(d.CardBody,null,(0,n.createElement)(i.__experimentalWooProductFieldItem.Slot,{section:D.GJ}),(0,n.createElement)(i.CollapsibleContent,{toggleText:(0,u.__)("Advanced","woocommerce")},(0,n.createElement)(i.__experimentalWooProductFieldItem.Slot,{section:D.Jd})))))),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/sku",section:D.GJ,pluginId:D.Uu,order:1},(0,n.createElement)(ve,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/track-quantity",section:D.GJ,pluginId:D.Uu,order:3},(0,n.createElement)(fe,null)),e.manage_stock?(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/stock-manage",section:D.GJ,pluginId:D.Uu,order:5},(0,n.createElement)(ye,null)):(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/stock-manual",section:D.GJ,pluginId:D.Uu,order:5},(0,n.createElement)(Se,null)),e.manage_stock&&(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/advanced/stock-out",section:D.Jd,pluginId:D.Uu,order:1},(0,n.createElement)(ke,null)),(0,n.createElement)(i.__experimentalWooProductFieldItem,{id:"inventory/advanced/stock-limit",section:D.Jd,pluginId:D.Uu,order:3},(0,n.createElement)(Me,null)))};(0,r.registerPlugin)("wc-admin-product-editor-inventory-section",{scope:"woocommerce-product-editor",render:()=>(0,n.createElement)(xe,null)})},1800:function(e,t,o){o.d(t,{g:function(){return i}});var n=o(67221),r=o(9818),a=o(69307),c=o(15635);function i(e){let{allAttributes:t=[],isVariationAttributes:o=!1,onChange:i,productId:l}=e;const s=()=>o?t.filter((e=>!!e.variation)):t.filter((e=>!e.variation)),[m,u]=(0,a.useState)(s()),[d,p]=(0,c.QB)(m,(e=>0===e.id)),_=(0,a.useCallback)((e=>(0,r.resolveSelect)(n.EXPERIMENTAL_PRODUCT_ATTRIBUTE_TERMS_STORE_NAME).getProductAttributeTerms({attribute_id:e,product:l}).then((e=>e),(e=>e))),[l]);return(0,a.useEffect)((()=>{s().length&&!m.length&&Promise.all(p.map((e=>_(e.id)))).then((e=>{u([...p.map(((t,o)=>{return n=t,r=e[o],{...n,terms:r.length>0?r:void 0,options:0===r.length?n.options:[]};var n,r})),...d])}))}),[t,m,_]),{attributes:m,handleChange:e=>{const n=o?t.filter((e=>!e.variation)):t.filter((e=>!!e.variation));u(e),i([...n,...e])},setAttributes:u}}},39152:function(e,t,o){o.d(t,{H:function(){return a}});var n=o(69307),r=o(94411);const a=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.s,null))},36279:function(e,t,o){o.d(t,{a:function(){return l}});var n=o(69307),r=o(65736),a=o(55609),c=o(10431),i=o(73085);const l=e=>{var t;let{children:o}=e;const l=(0,c.getQuery)();(0,n.useEffect)((()=>(window.document.body.classList.add("woocommerce-admin-product-layout"),()=>{window.document.body.classList.remove("woocommerce-admin-product-layout")})),[]);const{adminBarHeight:s,headerHeight:m}=(()=>{const[e,t]=(0,n.useState)(60),[o,r]=(0,n.useState)(32);return(0,n.useEffect)((()=>{const e=document.querySelector("#wpbody"),o=new MutationObserver((()=>{t(parseInt(e.style.marginTop,10))}));return o.observe(e,{attributes:!0}),()=>{o.disconnect()}}),[]),(0,n.useLayoutEffect)((()=>{const e=()=>{const e=document.querySelector("#wpadminbar");r(e.clientHeight)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),{adminBarHeight:o,headerHeight:e}})();(0,n.useEffect)((()=>{document.querySelector(".product-form-layout .components-tab-panel__tabs").style.top=s+m+"px"}),[s,m]);const u=n.Children.map(o,(e=>e.type!==i.w?null:{name:e.props.name,title:e.props.disabled?(0,n.createElement)(a.Tooltip,{text:(0,r.__)("Manage individual variation details in the Options tab.","woocommerce")},(0,n.createElement)("span",{className:"woocommerce-product-form-tab__item-inner"},(0,n.createElement)("span",{className:"woocommerce-product-form-tab__item-inner-text"},e.props.title))):(0,n.createElement)("span",{className:"woocommerce-product-form-tab__item-inner"},(0,n.createElement)("span",{className:"woocommerce-product-form-tab__item-inner-text"},e.props.title)),disabled:e.props.disabled}));return(0,n.createElement)(a.TabPanel,{className:"product-form-layout",activeClass:"is-active",tabs:u,initialTabName:null!==(t=l.tab)&&void 0!==t?t:u[0].name,onSelect:e=>{window.document.documentElement.scrollTop=0,(0,c.navigateTo)({url:(0,c.getNewPath)({tab:e})})}},(e=>(0,n.createElement)(n.Fragment,null,n.Children.map(o,(t=>t.type!==i.w||t.props.name!==e.name?null:t)))))}},28599:function(e,t,o){o.d(t,{N:function(){return a}});var n=o(69307),r=o(86020);const a=e=>{let{title:t,description:o,className:a,children:c}=e;return(0,n.createElement)(r.FormSection,{title:t,description:o,className:a},n.Children.map(c,(e=>(0,n.isValidElement)(e)&&e.props.onChange?(0,n.createElement)("div",{className:"product-field-layout"},e):e)))}},73085:function(e,t,o){o.d(t,{w:function(){return c}});var n=o(69307),r=o(83849),a=o.n(r);const c=e=>{let{name:t,children:o}=e;const r=a()("woocommerce-product-form-tab","woocommerce-product-form-tab__"+t);return(0,n.createElement)("div",{className:r},o)}},1361:function(e,t,o){o.d(t,{H:function(){return we}});var n=o(69307),r=o(86020),a=o(98817),c=o(65736),i=o(55609),l=o(62907),s=o(86158),m=o(10314),u=o(14599),d=o(10431),p=o(9818),_=o(90162),g=o(8573),E=o(48701),h=o(91920),w=o(15064),b=o(8302),I=o(5656);const N=()=>{const{createProductWithStatus:e,updateProductWithStatus:t,deleteProductAndRedirect:o,copyProductWithStatus:a,isUpdatingDraft:N,isUpdatingPublished:C,isDeleting:v}=(0,w.g)(),{onPublish:f,onSaveDraft:S}=(0,b.g)(),{isDirty:y,isValidForm:k,values:M,resetForm:x}=(0,r.useFormContext)();(0,E.Z)(y,g.$),((e,t)=>{const o=(0,n.useRef)(t);(0,n.useEffect)((()=>{o.current=t}),[t]),(0,n.useEffect)((()=>()=>{o.current&&(0,I.HF)(e)}),[]),(0,n.useEffect)((()=>((0,I.Eb)(e,(()=>t)),()=>{(0,I.at)(e)})),[t])})(M.id?"editing_new_product":"new_product",y);const{isSmallViewport:T}=(0,p.useSelect)((e=>({isSmallViewport:e(_.store).isViewportMatch("< medium")}))),P=()=>({product_id:M.id,product_type:M.type,is_downloadable:M.downloadable,is_virtual:M.virtual,manage_stock:M.manage_stock}),D=async()=>{if((0,u.recordEvent)("product_update",{new_product_page:!0,...P()}),M.id){const e=await t(M.id,M,"publish");e&&e.id&&x(e)}else{const t=await e(M,"publish");null!=t&&t.id&&(x(),(0,d.navigateTo)({url:"admin.php?page=wc-admin&path=/product/"+t.id}))}await f()},L=async()=>{(0,u.recordEvent)("product_publish_and_copy",{new_product_page:!0,...P()}),M.id?await t(M.id,M,"publish"):await e(M,"publish",!1),await a(M)},R=async()=>{(0,u.recordEvent)("product_copy",{new_product_page:!0,...P()}),M.id&&await t(M.id,M,M.status||"draft"),await a(M)},A=async()=>{if((0,u.recordEvent)("product_delete",{new_product_page:!0,...P()}),M.id){const e=await o(M.id);null!=e&&e.id&&(x(e),(0,d.navigateTo)({url:"edit.php?post_type=product"}))}},j=M.id&&"publish"===M.status,O=T?i.MenuItem:i.Button,F=(0,n.createElement)(n.Fragment,null,(0,n.createElement)(O,{onClick:async()=>{if((0,u.recordEvent)("product_edit",{new_product_page:!0,...P()}),M.id){const e=await t(M.id,M,"draft");e&&e.id&&x(e)}else{const t=await e(M,"draft");null!=t&&t.id&&(x(),(0,d.navigateTo)({url:"admin.php?page=wc-admin&path=/product/"+t.id}))}await S()},disabled:!k||!y&&!!M.id&&"publish"!==M.status||N||C||v},!y&&M.id&&"publish"!==M.status&&(0,n.createElement)(l.Z,{icon:s.Z}),N?(0,c.__)("Saving","woocommerce"):null,!y&&M.id||N||"publish"===M.status?null:(0,c.__)("Save draft","woocommerce"),"publish"!==M.status||N?null:(0,c.__)("Switch to draft","woocommerce"),y||!M.id||N||"publish"===M.status?null:(0,c.__)("Saved","woocommerce")),(0,n.createElement)(O,{onClick:()=>(0,u.recordEvent)("product_preview_changes",{new_product_page:!0,...P()}),href:M.permalink+"?preview=true",disabled:!k||!M.permalink,target:"_blank"},(0,c.__)("Preview","woocommerce")));return(0,n.createElement)(h.Nw,null,(()=>(0,n.createElement)("div",{className:"woocommerce-product-form-actions"},!T&&F,(0,n.createElement)(i.ButtonGroup,{className:"woocommerce-product-form-actions__publish-button-group"},(0,n.createElement)(i.Button,{onClick:D,variant:"primary",isBusy:C,disabled:!k||!y&&!!j||N||C||v},C?(0,c.__)("Updating","woocommerce"):null,j&&!C?(0,c.__)("Update","woocommerce"):null,j||C?null:(0,c.__)("Publish","woocommerce")),(0,n.createElement)(i.DropdownMenu,{className:"woocommerce-product-form-actions__publish-dropdown",label:(0,c.__)("Publish options","woocommerce"),icon:m.Z,popoverProps:{position:"bottom left"},toggleProps:{variant:"primary",disabled:!M.id&&!k}},(()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.MenuGroup,null,T&&F,(0,n.createElement)(i.MenuItem,{onClick:L,disabled:!k},j?(0,c.__)("Update & duplicate","woocommerce"):(0,c.__)("Publish & duplicate","woocommerce")),(0,n.createElement)(i.MenuItem,{onClick:R,disabled:!k},(0,c.__)("Copy to a new draft","woocommerce")),M.id&&(0,n.createElement)(i.MenuItem,{onClick:A,isDestructive:!0},(0,c.__)("Move to trash","woocommerce"))))))))))};(0,a.registerPlugin)("action-buttons-header-item",{render:N,icon:"admin-generic"});var C=o(74617),v=o(9161);const f=()=>(0,n.createElement)("svg",{width:"18",height:"19",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.73365 13.1059L5.91005 10.7253L4.81688 9.69821L0.970703 13.8559L4.81688 18.0137L5.91005 16.9865L3.73365 14.6059H6.54528C7.67008 14.6059 8.79454 14.6362 9.91926 14.6059C11.3464 14.6047 13.2805 14.3559 14.882 13.3288C16.5414 12.2645 17.7498 10.423 17.7498 7.47022C17.7498 4.99134 16.4227 2.57446 14.1007 1.53934C12.279 0.727299 11.0554 0.740873 9.29353 0.751627C9.09868 0.752817 8.90948 0.753973 8.7271 0.753973C8.7271 0.753973 8.7271 1.08588 8.7271 1.50009C8.7271 1.9143 8.7271 2.25397 8.7271 2.25397C8.91043 2.25397 9.09488 2.25326 9.27997 2.25254C11.1006 2.24547 11.9842 2.23816 13.4899 2.90938C15.3434 3.73563 16.2498 5.56574 16.2498 7.47022C16.2498 9.94253 15.2764 11.2938 14.0722 12.0662C12.8139 12.8732 11.2081 13.1059 9.90892 13.1059H9.89866L9.8884 13.1062C8.774 13.1367 7.65978 13.1059 6.54528 13.1059H3.73365Z",fill:"#1E1E1E"}));var S=o(78215),y=o(30226);const k=()=>{const{values:e}=(0,r.useFormContext)(),{showCesModal:t}=(0,p.useDispatch)(y.Ls),o=e.id?(0,C.getAdminLink)(`post.php?post=${e.id}&action=edit`):(0,C.getAdminLink)("post-new.php?post_type=product");return(0,n.createElement)(h.Nw,null,(0,n.createElement)(i.DropdownMenu,{className:"woocommerce-product-form-more-menu",label:(0,c.__)("More product options","woocommerce"),icon:v.Z,popoverProps:{position:"bottom left"}},(e=>{let{onClose:r}=e;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.MenuItem,{onClick:()=>{t({action:"new_product",title:(0,c.__)("How's your experience with the product editor?","woocommerce"),firstQuestion:(0,c.__)("The product editing screen is easy to use","woocommerce"),secondQuestion:(0,c.__)("The product editing screen's functionality meets my needs","woocommerce")},{},{type:"snackbar",icon:(0,n.createElement)("span",null,"🌟")}),r()},icon:(0,n.createElement)(S.A,null),iconPosition:"right"},(0,c.__)("Share feedback","woocommerce")),(0,n.createElement)(i.MenuItem,{onClick:()=>{r()},href:o,icon:(0,n.createElement)(f,null),iconPosition:"right"},(0,c.__)("Use the classic editor","woocommerce")))})))};var M=o(5267),x=o(86347),T=o(17385),P=o(59989);const D=()=>{const{getCheckboxControlProps:e,getInputProps:t}=(0,r.useFormContext)(),[o,a]=(0,n.useState)(!1);return(0,n.createElement)(h.Nw,null,(0,n.createElement)(n.Fragment,null,(0,n.createElement)(i.Button,{"aria-label":(0,c.__)("Settings","woocommerce"),icon:x.Z,isPressed:o,onClick:()=>a(!o),className:"woocommerce-product-settings__toggle"}),o&&(0,n.createElement)(i.Panel,{className:"woocommerce-product-settings__panel"},(0,n.createElement)(i.PanelHeader,{label:(0,c.__)("Settings","woocommerce")},(0,n.createElement)(i.Button,{icon:T.Z,onClick:()=>a(!1),"aria-label":(0,c.__)("Close settings","woocommerce")})),(0,n.createElement)(i.PanelBody,{title:(0,c.__)("Advanced","woocommerce")},(0,n.createElement)(i.CheckboxControl,(0,M.Z)({label:(0,c.__)("Enable reviews","woocommerce")},e("reviews_allowed",(0,P.HP)("reviews_allowed")))),(0,n.createElement)(i.TextControl,(0,M.Z)({label:(0,c.__)("Menu order","woocommerce"),type:"number"},t("menu_order")))))))};var L=o(35723);const R=()=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(L.t,null),(0,n.createElement)(N,null),(0,n.createElement)(D,null),(0,n.createElement)(k,null));var A=o(36279),j=o(45473),O=o(28599),F=o(67221),z=o(83849),U=o.n(z),Z=o(56519),B=o.n(Z),H=o(7506);function W(e){return`${e.id}:${e.menu_order}`}function V(e){let{key:t}=e;return"string"==typeof t?Number.parseInt(t.split(":")[1],10):Number.MAX_SAFE_INTEGER}function Y(e,t,o){let{variationsOrder:n}=o;if(!n||!n[t])return e;const r=n[t];return[...e].sort(((e,t)=>r[e.id]&&r[t.id]?r[e.id]-r[t.id]:0))}function Q(e){let{variations:t,currentPage:o}=e;const{setValue:n,values:a}=(0,r.useFormContext)();return{sortedVariations:Y(t,o,a),getVariationKey:W,onOrderChange:function(e){const t=Math.min(...e.map(V));n("variationsOrder",{...a.variationsOrder,[o]:e.reduce(((e,o,n)=>({...e,[function(e){let{key:t}=e;return"string"==typeof t?Number.parseInt(t.split(":")[0],10):0}(o)]:t+n})),{})})}}}function J(e){let{width:t=24,height:o=24,...r}=e;return(0,n.createElement)("svg",(0,M.Z)({},r,{width:t,height:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"}),(0,n.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.7226 6.2125C13.1641 6.0766 12.5883 6 11.9999 6C8.10055 6 4.75407 9.36447 3.31899 11.0546C2.8507 11.6061 2.8507 12.3939 3.31899 12.9454C4.17896 13.9582 5.72533 15.5723 7.66574 16.7033L8.41572 15.4043C8.13761 15.242 7.86389 15.0655 7.59553 14.8776C6.25019 13.9359 5.15775 12.7905 4.48406 12C5.15775 11.2095 6.25019 10.0641 7.59553 9.12235C8.96667 8.16257 10.4775 7.5 11.9999 7.5C12.3118 7.5 12.6231 7.5278 12.9329 7.58027L13.7226 6.2125ZM12.3504 8.58923C12.2352 8.57753 12.1182 8.57153 11.9999 8.57153C10.1063 8.57153 8.57132 10.1066 8.57132 12.0001C8.57132 12.7505 8.81237 13.4445 9.22126 14.0091L10.1233 12.4467C10.0893 12.3034 10.0713 12.1538 10.0713 12.0001C10.0713 11.1266 10.652 10.3888 11.4484 10.1515L12.3504 8.58923ZM12.8092 10.2491L13.5611 8.94679C14.6697 9.51479 15.4285 10.6688 15.4285 12.0001C15.4285 13.8937 13.8934 15.4287 11.9999 15.4287C11.3128 15.4287 10.6729 15.2266 10.1364 14.8785L10.8883 13.5763C11.2025 13.7983 11.5859 13.9287 11.9999 13.9287C13.065 13.9287 13.9285 13.0652 13.9285 12.0001C13.9285 11.224 13.4701 10.555 12.8092 10.2491ZM9.51376 15.957C10.3246 16.2986 11.1605 16.5 11.9999 16.5C13.5223 16.5 15.0331 15.8374 16.4043 14.8776C17.7496 13.9359 18.842 12.7905 19.5157 12C18.842 11.2095 17.7496 10.0641 16.4043 9.12235C15.6875 8.62066 14.9327 8.20018 14.1579 7.91308L14.917 6.59839C17.5164 7.64275 19.6204 9.80575 20.6808 11.0546C21.1491 11.6061 21.1491 12.3939 20.6808 12.9454C19.2457 14.6355 15.8992 18 11.9999 18C10.8611 18 9.76945 17.713 8.7588 17.2646L9.51376 15.957Z",fill:"currentColor"}),(0,n.createElement)("rect",{x:"16.0625",y:"4.61377",width:"1.22727",height:"16",transform:"rotate(30 16.0625 4.61377)",fill:"currentColor"}))}function G(e){let{width:t=24,height:o=24,...r}=e;return(0,n.createElement)("svg",(0,M.Z)({},r,{width:t,height:o,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"}),(0,n.createElement)("path",{d:"M20.1091 11.54C20.3396 11.8116 20.3396 12.1884 20.1091 12.46C19.4144 13.2781 18.266 14.4899 16.8343 15.4921C15.397 16.4982 13.7359 17.25 11.9999 17.25C10.2638 17.25 8.60268 16.4982 7.1654 15.4921C5.73376 14.4899 4.58533 13.2781 3.89066 12.46C3.6601 12.1884 3.6601 11.8116 3.89066 11.54C4.58533 10.7219 5.73376 9.51006 7.1654 8.50792C8.60268 7.50184 10.2638 6.75 11.9999 6.75C13.7359 6.75 15.397 7.50184 16.8343 8.50792C18.266 9.51006 19.4144 10.7219 20.1091 11.54Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),(0,n.createElement)("circle",{cx:"11.9999",cy:"11.9999",r:"2.67857",stroke:"currentColor",strokeWidth:"1.5"}))}var X=o(54071);let q,$;!function(e){e.instock="instock",e.onbackorder="onbackorder",e.outofstock="outofstock"}(q||(q={})),function(e){e.instock="green",e.onbackorder="yellow",e.outofstock="red"}($||($={}));const K={[q.instock]:(0,c.__)("In stock","woocommerce"),[q.onbackorder]:(0,c.__)("On backorder","woocommerce"),[q.outofstock]:(0,c.__)("Out of stock","woocommerce")},ee=e=>{if(e.manage_stock){const t=e.stock_quantity||0;return t>=10?$.instock:t<10&&t>2?$.onbackorder:$.outofstock}return e.stock_status?$[e.stock_status]:""},te=(0,c.__)("Not visible to customers","woocommerce"),oe=(0,c.__)("Visible to customers","woocommerce"),ne=(0,c.__)("Updating product variation","woocommerce"),re=()=>{const[e,t]=(0,n.useState)(1),[o,a]=(0,n.useState)(25),[l,s]=(0,n.useState)({}),{values:m}=(0,r.useFormContext)(),u=m.id,_=(0,n.useContext)(X.$),{formatAmount:g,getCurrencyConfig:E}=_,{isLoading:h,variations:w,totalCount:b}=(0,p.useSelect)((t=>{const{getProductVariations:n,hasFinishedResolution:r,getProductVariationsTotalCount:a}=t(F.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),c={product_id:u,page:e,per_page:o,order:"asc",orderby:"menu_order"};return{isLoading:!r("getProductVariations",[c]),variations:n(c),totalCount:a(c)}}),[e,o,u]),{updateProductVariation:I}=(0,p.useDispatch)(F.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),{sortedVariations:N,getVariationKey:C,onOrderChange:v}=Q({variations:w,currentPage:e});if(!w||h)return(0,n.createElement)(i.Card,{className:"woocommerce-product-variations is-loading"},(0,n.createElement)(i.Spinner,null));const f=E();function S(e,t){l[e]||(s((t=>({...t,[e]:!0}))),I({product_id:u,id:e},{status:t}).finally((()=>s((t=>({...t,[e]:!1}))))))}return(0,n.createElement)(i.Card,{className:"woocommerce-product-variations"},(0,n.createElement)("div",{className:"woocommerce-product-variations__header"},(0,n.createElement)("h4",null,(0,c.__)("Variation","woocommerce")),(0,n.createElement)("h4",null,(0,c.sprintf)((0,c.__)("Price (%s)","woocommerce"),f.code)),(0,n.createElement)("h4",null,(0,c.__)("Quantity","woocommerce"))),(0,n.createElement)(r.Sortable,{onOrderChange:v},N.map((e=>{return(0,n.createElement)(r.ListItem,{key:C(e)},(0,n.createElement)("div",{className:"woocommerce-product-variations__attributes"},e.attributes.map((e=>{const t=(0,n.createElement)(r.Tag,{id:e.id,className:"woocommerce-product-variations__attribute",key:e.id,label:B()(e.option,{length:H.VY}),screenReaderLabel:e.option});return e.option.length<=H.VY?t:(0,n.createElement)(i.Tooltip,{key:e.id,text:e.option,position:"top center"},(0,n.createElement)("span",null,t))}))),(0,n.createElement)("div",{className:U()("woocommerce-product-variations__price",{"woocommerce-product-variations__price--fade":"private"===e.status})},g(e.price)),(0,n.createElement)("div",{className:U()("woocommerce-product-variations__quantity",{"woocommerce-product-variations__quantity--fade":"private"===e.status})},(0,n.createElement)("span",{className:U()("woocommerce-product-variations__status-dot",ee(e))},"●"),(t=e).manage_stock?t.stock_quantity||0:t.stock_status?K[t.stock_status]:K.instock),(0,n.createElement)("div",{className:"woocommerce-product-variations__actions"},(0,n.createElement)(r.Link,{href:(0,d.getNewPath)({},`/product/${u}/variation/${e.id}`,{}),type:"wc-admin",className:"components-button"},(0,c.__)("Edit","woocommerce")),"private"===e.status&&(0,n.createElement)(i.Tooltip,{position:"top center",text:te},(0,n.createElement)(i.Button,{className:"components-button--hidden","aria-label":l[e.id]?ne:te,"aria-disabled":l[e.id],onClick:()=>S(e.id,"publish")},l[e.id]?(0,n.createElement)(i.Spinner,null):(0,n.createElement)(J,null))),"publish"===e.status&&(0,n.createElement)(i.Tooltip,{position:"top center",text:oe},(0,n.createElement)(i.Button,{className:"components-button--visible","aria-label":l[e.id]?ne:oe,"aria-disabled":l[e.id],onClick:()=>S(e.id,"private")},l[e.id]?(0,n.createElement)(i.Spinner,null):(0,n.createElement)(G,null)))));var t}))),(0,n.createElement)(r.Pagination,{className:"woocommerce-product-variations__footer",page:e,perPage:o,total:b,showPagePicker:!1,onPageChange:t,onPerPageChange:a}))},ae=()=>{const{getInputProps:e,values:{id:t}}=(0,r.useFormContext)(),{value:o}=e("attributes",{productId:t});return 0===(o?o.filter((e=>e.variation)):[]).length?null:(0,n.createElement)(O.N,{title:(0,c.__)("Variations","woocommerce"),description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,(0,c.__)("Manage individual product combinations created from options.","woocommerce")),(0,n.createElement)(r.Link,{className:"woocommerce-form-section__header-link",href:"https://woocommerce.com/posts/product-variations-display/",target:"_blank",type:"external",onClick:()=>{(0,u.recordEvent)("add_product_variation_help")}},(0,c.__)("How to make variations work for you","woocommerce")))},(0,n.createElement)(re,null))};var ce=o(76292),ie=o.n(ce);function le(e){const t={},o=ie()(e.date_on_sale_from_gmt,ie().ISO_8601,!0),n=ie()(e.date_on_sale_to_gmt,ie().ISO_8601,!0);return e.date_on_sale_from_gmt&&!o.isValid()&&(t.date_on_sale_from_gmt=(0,c.__)("Please enter a valid date.","woocommerce")),e.date_on_sale_to_gmt&&!n.isValid()&&(t.date_on_sale_to_gmt=(0,c.__)("Please enter a valid date.","woocommerce")),o.isAfter(n)&&(t.date_on_sale_from_gmt=(0,c.__)("The start date of the sale must be before the end date.","woocommerce")),n.isBefore(o)&&(t.date_on_sale_to_gmt=(0,c.__)("The end date of the sale must be after the start date.","woocommerce")),t}const se=e=>{var t,o,n,r;let a={};var i,l;return a=((e,t)=>{const o={...t};return e.stock_quantity&&e.stock_quantity<0&&(o.stock_quantity=(0,c.__)("Stock quantity must be a positive number.","woocommerce")),e.low_stock_amount&&e.low_stock_amount<0&&(o.low_stock_amount=(0,c.__)("Stock quantity must be a positive number.","woocommerce")),o})(e,a),null!==(t=e.name)&&void 0!==t&&t.length||(a.name=(0,c.__)("This field is required.","woocommerce")),e.name&&e.name.length>120&&(a.name=(0,c.__)("Please enter a product name shorter than 120 characters.","woocommerce")),e.regular_price&&!/^[0-9.,]+$/.test(e.regular_price)&&(a.regular_price=(0,c.__)("Please enter a price with one monetary decimal point without thousand separators and currency symbols.","woocommerce")),e.sale_price&&!/^[0-9.,]+$/.test(e.sale_price)&&(a.sale_price=(0,c.__)("Please enter a price with one monetary decimal point without thousand separators and currency symbols.","woocommerce")),e.sale_price&&(!e.regular_price||parseFloat(e.sale_price)>=parseFloat(null==e?void 0:e.regular_price))&&(a.sale_price=(0,c.__)("Sale price cannot be equal to or higher than list price.","woocommerce")),a={...a,...le(e)},null!==(o=e.dimensions)&&void 0!==o&&o.width&&+e.dimensions.width<=0&&(a.dimensions={width:(0,c.__)("Width must be higher than zero.","woocommerce")}),null!==(n=e.dimensions)&&void 0!==n&&n.length&&+e.dimensions.length<=0&&(a.dimensions={...null!==(i=a.dimensions)&&void 0!==i?i:{},length:(0,c.__)("Length must be higher than zero.","woocommerce")}),null!==(r=e.dimensions)&&void 0!==r&&r.height&&+e.dimensions.height<=0&&(a.dimensions={...null!==(l=a.dimensions)&&void 0!==l?l:{},height:(0,c.__)("Height must be higher than zero.","woocommerce")}),e.weight&&+e.weight<=0&&(a.weight=(0,c.__)("Weight must be higher than zero.","woocommerce")),a};var me=o(65483),ue=o(1800),de=o(67191);const pe=e=>{let{value:t,onChange:o,productId:a}=e;const{values:c}=(0,r.useFormContext)(),{generateProductVariations:i}=function(){const{generateProductVariations:e,invalidateResolutionForStoreSelector:t}=(0,p.useDispatch)(F.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),{createProduct:o,updateProduct:a}=(0,p.useDispatch)(F.PRODUCTS_STORE_NAME),{resetForm:c}=(0,r.useFormContext)(),[i,l]=(0,n.useState)(!1);return{generateProductVariations:(0,n.useCallback)((async n=>(l(!0),(n.id?()=>a(n.id,n):()=>o({...n,status:"auto-draft",name:n.name||de.I}))().then((t=>(n.id||c({...t,name:n.name||""}),e({product_id:t.id})))).then((()=>t("getProductVariations"))).finally((()=>{l(!1)})))),[]),isGenerating:i}}(),{attributes:l,handleChange:s}=(0,ue.g)({allAttributes:t,isVariationAttributes:!0,onChange:e=>{o(e),i({...c,attributes:e})},productId:a});return(0,n.createElement)(me.X,{attributeType:"for-variations",value:l,onChange:s})},_e=()=>{const{getInputProps:e,values:{id:t}}=(0,r.useFormContext)();return(0,n.createElement)(O.N,{title:(0,c.__)("Options","woocommerce"),className:"woocommerce-product-options-section",description:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,(0,c.__)("Add and manage options, such as size and color, for customers to choose on the product page.","woocommerce")),(0,n.createElement)(r.Link,{className:"woocommerce-form-section__header-link",href:"https://woocommerce.com/document/managing-product-taxonomies/#product-attributes",target:"_blank",type:"external",onClick:()=>{(0,u.recordEvent)("learn_more_about_options_help")}},(0,c.__)("Learn more about options","woocommerce")))},(0,n.createElement)(pe,e("attributes",{productId:t})))};var ge=o(39152),Ee=o(73085),he=o(9046);const we=e=>{var t,o,c;let{product:i,formRef:l}=e;return(0,n.createElement)(r.SlotContextProvider,null,(0,n.createElement)(r.Form,{initialValues:i||{reviews_allowed:!0,name:"",sku:"",stock_quantity:0,stock_status:"instock"},ref:l,errors:{},validate:se},(0,n.createElement)(R,null),(0,n.createElement)(A.a,null,(0,n.createElement)(Ee.w,{name:"general",title:"General"},(0,n.createElement)(r.__experimentalWooProductSectionItem.Slot,{location:he.zi})),(0,n.createElement)(Ee.w,{name:"pricing",title:"Pricing",disabled:!(null==i||null===(t=i.variations)||void 0===t||!t.length)},(0,n.createElement)(j.t,null)),(0,n.createElement)(Ee.w,{name:"inventory",title:"Inventory",disabled:!(null==i||null===(o=i.variations)||void 0===o||!o.length)},(0,n.createElement)(r.__experimentalWooProductSectionItem.Slot,{location:he.PF})),(0,n.createElement)(Ee.w,{name:"shipping",title:"Shipping",disabled:!(null==i||null===(c=i.variations)||void 0===c||!c.length)},(0,n.createElement)(r.__experimentalWooProductSectionItem.Slot,{location:he.cw,fillProps:{product:i}})),window.wcAdminFeatures["product-variation-management"]?(0,n.createElement)(Ee.w,{name:"options",title:"Options"},(0,n.createElement)(_e,null),(0,n.createElement)(ae,null)):(0,n.createElement)(n.Fragment,null)),(0,n.createElement)(ge.H,null),(0,n.createElement)(a.PluginArea,{scope:"woocommerce-product-editor"})))}},35723:function(e,t,o){o.d(t,{t:function(){return f}});var n=o(69307),r=o(65736),a=o(67221),c=o(74617),i=o(10431),l=o(86020),s=o(85597),m=o(9818),u=o(67191),d=o(7506);const p=e=>{var t;return null!=e&&null!==(t=e.attributes)&&void 0!==t&&t.length?e.attributes.map((e=>e.option)).join(", "):"#"+e.id},_=e=>{const t=p(e);return t.length>d.VY?t.substring(0,d.VY)+"…":t};var g=o(62907),E=o(92226);const h=e=>{let{breadcrumbs:t}=e;const o=t.length>3?[t[0],{title:(0,n.createElement)(n.Fragment,null,"…")},t[t.length-1]]:t;return(0,n.createElement)("span",{className:"woocommerce-product-breadcrumbs"},o.map((e=>{const{href:t,title:o,type:r}=e;return(0,n.createElement)(n.Fragment,{key:t},(0,n.createElement)("span",{className:"woocommerce-product-breadcrumbs__item"},t?(0,n.createElement)(l.Link,{href:t,type:r||"wp-admin"},o):o),(0,n.createElement)("span",{className:"woocommerce-product-breadcrumbs__separator"},(0,n.createElement)(g.Z,{icon:E.Z})))})))};var w=o(83849),b=o.n(w);let I;!function(e){e.unsaved="unsaved",e.draft="draft",e.instock="instock",e.outofstock="outofstock"}(I||(I={}));const N={[I.unsaved]:(0,r.__)("Unsaved","woocommerce"),[I.draft]:(0,r.__)("Draft","woocommerce"),[I.instock]:(0,r.__)("In stock","woocommerce"),[I.outofstock]:(0,r.__)("Out of stock","woocommerce")},C=()=>{const{productId:e}=(0,s.UO)(),t=(o=(0,m.useSelect)((t=>e?t(a.PRODUCTS_STORE_NAME).getProduct(parseInt(e,10),void 0):void 0)))?"draft"===o.status?I.draft:"instock"===o.stock_status?I.instock:I.outofstock:I.unsaved;var o;return(0,n.createElement)(l.Pill,{className:b()("woocommerce-product-status",`is-${t}`)},N[t])};var v=o(91920);const f=()=>{const{values:e}=(0,l.useFormContext)(),{productId:t,variationId:o}=(0,s.UO)(),{isLoading:d,persistedName:g,productVariation:E}=(0,m.useSelect)((e=>{const{getProduct:n,hasFinishedResolution:r}=e(a.PRODUCTS_STORE_NAME),{getProductVariation:c,hasFinishedResolution:i}=e(a.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),l=t?n(parseInt(t,10)):null,s=o&&t?c({id:parseInt(o,10),product_id:parseInt(t,10)}):null,m=t&&!r("getProduct",[parseInt(t,10)]),u=o&&t&&!i("getProductVariation",[{id:parseInt(o,10),product_id:parseInt(t,10)}]);return{persistedName:null==l?void 0:l.name,productVariation:s,isLoading:m||u}})),w=(0,u.X)(e.name,e.type,g),b=E&&p(E),I=[{href:(0,c.getAdminLink)("edit.php?post_type=product"),title:(0,r.__)("Products","woocommerce")},{href:(0,i.getNewPath)({},"/product/"+t),type:"wc-admin",title:(0,n.createElement)(n.Fragment,null,w,(0,n.createElement)(C,null))},b&&{title:(0,n.createElement)("span",{title:b},_(E))}].filter((e=>!!e)),N=I.pop();return d?null:(0,n.createElement)(v.Kr,null,(0,n.createElement)("span",{className:"woocommerce-product-title"},(0,n.createElement)(h,{breadcrumbs:I}),(0,n.createElement)("span",{className:"woocommerce-product-title__wrapper"},null==N?void 0:N.title)))}},45473:function(e,t,o){o.d(t,{t:function(){return N}});var n=o(5267),r=o(69307),a=o(65736),c=o(86020),i=o(67221),l=o(14599),s=o(9818),m=o(69771),u=o(76292),d=o.n(u),p=o(78674),_=o(55609),g=o(59989),E=o(28599),h=o(79205),w=o(54071),b=o(15064),I=o(7506);const N=()=>{var e,t,o;const{sanitizePrice:u}=(0,b.g)(),{getInputProps:N,setValues:C,values:v}=(0,c.useFormContext)(),[f,S]=(0,r.useState)(!1),[y,k]=(0,r.useState)(!1),[M,x]=(0,r.useState)(!1),{isResolving:T,taxSettings:P,taxesEnabled:D}=(0,s.useSelect)((e=>{var t,o;const{getSettings:n,hasFinishedResolution:r}=e(i.SETTINGS_STORE_NAME);return{isResolving:!r("getSettings",["tax"]),taxSettings:n("tax").tax||{},taxesEnabled:"yes"===(null===(t=n("general"))||void 0===t||null===(o=t.general)||void 0===o?void 0:o.woocommerce_calc_taxes)}})),{isResolving:L,taxClasses:R}=(0,s.useSelect)((e=>{const{hasFinishedResolution:t,getTaxClasses:o}=e(i.EXPERIMENTAL_TAX_CLASSES_STORE_NAME);return{isResolving:!t("getTaxClasses"),taxClasses:o()}})),A="yes"===P.woocommerce_prices_include_tax,j=(0,r.useContext)(w.$),{getCurrencyConfig:O,formatAmount:F}=j,z=O(),U=(0,a.__)("Per your {{link}}store settings{{/link}}, tax is {{strong}}included{{/strong}} in the price.","woocommerce"),Z=(0,a.__)("Per your {{link}}store settings{{/link}}, tax is {{strong}}not included{{/strong}} in the price.","woocommerce"),{dateFormat:B,timeFormat:H}=(0,s.useSelect)((e=>{const{getOption:t}=e(i.OPTIONS_STORE_NAME);return{dateFormat:t("date_format")||"F j, Y",timeFormat:t("time_format")||"H:i"}}));(0,r.useEffect)((()=>{if(y||M)return;const e="string"==typeof v.date_on_sale_from_gmt&&v.date_on_sale_from_gmt.length>0,t="string"==typeof v.date_on_sale_to_gmt&&v.date_on_sale_to_gmt.length>0;(e||t)&&(x(!0),S(!0))}),[y,M,v]);const W=(0,p.Z)({mixedString:A?U:Z,components:{link:(0,r.createElement)(c.Link,{href:`${h.SX}admin.php?page=wc-settings&tab=tax`,target:"_blank",type:"external",onClick:()=>{(0,l.recordEvent)("product_pricing_list_price_help_tax_settings_click")}},(0,r.createElement)(r.Fragment,null)),strong:(0,r.createElement)("strong",null)}}),V={prefix:z.symbol,className:"half-width-field components-currency-control",sanitize:e=>u(String(e)),onFocus(e){setTimeout((function(e){e.select()}),0,e.currentTarget)},onKeyUp(e){const t=e.currentTarget.name,o=Number.parseFloat(u(v[t]||"0")),n=Number(e.currentTarget.step||"1");"ArrowUp"===e.code&&C({[t]:String(o+n)}),"ArrowDown"===e.code&&C({[t]:String(o-n)})}},Y=N("regular_price",V),Q=N("sale_price",V),J={className:"woocommerce-product__date-time-picker",isDateOnlyPicker:!0,dateTimeFormat:B},G=N("tax_status");delete G.checked,delete G.value;const X=N("tax_class");return delete X.checked,delete X.value,(0,r.createElement)(E.N,{title:(0,a.__)("Pricing","woocommerce"),description:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",null,(0,a.__)("Set a competitive price, put the product on sale, and manage tax calculations.","woocommerce")),(0,r.createElement)(c.Link,{className:"woocommerce-form-section__header-link",href:"https://woocommerce.com/posts/how-to-price-products-strategies-expert-tips/",target:"_blank",type:"external",onClick:()=>{(0,l.recordEvent)("add_product_pricing_help")}},(0,a.__)("How to price your product: expert tips","woocommerce")))},(0,r.createElement)(_.Card,null,(0,r.createElement)(_.CardBody,null,(0,r.createElement)(_.BaseControl,{id:"product_pricing_regular_price",help:null!==(e=null==Y?void 0:Y.help)&&void 0!==e?e:""},(0,r.createElement)(_.__experimentalInputControl,(0,n.Z)({},Y,{name:"regular_price",label:(0,a.__)("List price","woocommerce"),value:(0,g.Fb)(String(null==Y?void 0:Y.value),z,F)}))),!T&&(0,r.createElement)("span",{className:"woocommerce-product-form__secondary-text"},W),(0,r.createElement)(_.BaseControl,{id:"product_pricing_sale_price",help:null!==(t=null==Q?void 0:Q.help)&&void 0!==t?t:""},(0,r.createElement)(_.__experimentalInputControl,(0,n.Z)({},Q,{name:"sale_price",label:(0,a.__)("Sale price","woocommerce"),value:(0,g.Fb)(String(null==Q?void 0:Q.value),z,F)}))),(0,r.createElement)(_.ToggleControl,{label:(0,r.createElement)(r.Fragment,null,(0,a.__)("Schedule sale","woocommerce"),(0,r.createElement)(c.__experimentalTooltip,{text:(0,p.Z)({mixedString:(0,a.__)('The sale will start at the beginning of the "From" date ({{startTime/}}) and expire at the end of the "To" date ({{endTime/}}). {{moreLink/}}',"woocommerce"),components:{startTime:(0,r.createElement)("span",null,(0,m.format)(H,d()().startOf("day"))),endTime:(0,r.createElement)("span",null,(0,m.format)(H,d()().endOf("day"))),moreLink:(0,r.createElement)(c.Link,{href:"https://woocommerce.com/document/managing-products/#product-data",target:"_blank",type:"external",onClick:()=>(0,l.recordEvent)("add_product_learn_more",{category:"product-scheduled-sale"})},(0,a.__)("Learn more","woocommerce"))}})})),checked:f,onChange:e=>{(0,l.recordEvent)("product_pricing_schedule_sale_toggle_click",{enabled:e}),k(!0),S(e),C(e?{date_on_sale_from_gmt:d()().startOf("day").toISOString(),date_on_sale_to_gmt:null}:{date_on_sale_from_gmt:null,date_on_sale_to_gmt:null})},disabled:!((null===(o=v.sale_price)||void 0===o?void 0:o.length)>0)}),f&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.DateTimePickerControl,(0,n.Z)({label:(0,a.__)("From","woocommerce"),placeholder:(0,a.__)("Now","woocommerce"),timeForDateOnly:"start-of-day",currentDate:v.date_on_sale_from_gmt},N("date_on_sale_from_gmt",{...J}))),(0,r.createElement)(c.DateTimePickerControl,(0,n.Z)({label:(0,a.__)("To","woocommerce"),placeholder:(0,a.__)("No end date","woocommerce"),timeForDateOnly:"end-of-day",currentDate:v.date_on_sale_to_gmt},N("date_on_sale_to_gmt",{...J})))))),D&&(0,r.createElement)(_.Card,null,(0,r.createElement)(_.CardBody,null,(0,r.createElement)(_.RadioControl,(0,n.Z)({},G,{label:(0,a.__)("Charge sales tax on","woocommerce"),options:[{label:(0,a.__)("Product and shipping","woocommerce"),value:"taxable"},{label:(0,a.__)("Only shipping","woocommerce"),value:"shipping"},{label:(0,a.__)("Don’t charge tax","woocommerce"),value:"none"}]})),(0,r.createElement)(c.CollapsibleContent,{toggleText:(0,a.__)("Advanced","woocommerce")},!L&&R.length>0&&(0,r.createElement)(_.RadioControl,(0,n.Z)({},X,{label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",null,(0,a.__)("Tax class","woocommerce")),(0,r.createElement)("span",{className:"woocommerce-product-form__secondary-text"},(0,p.Z)({mixedString:(0,a.__)("Apply a tax rate if this product qualifies for tax reduction or exemption. {{link}}Learn more{{/link}}","woocommerce"),components:{link:(0,r.createElement)(c.Link,{href:"https://woocommerce.com/document/setting-up-taxes-in-woocommerce/#shipping-tax-class",target:"_blank",type:"external"},(0,r.createElement)(r.Fragment,null))}}))),options:R.map((e=>({label:e.name,value:e.slug===I.pE?"":e.slug})))}))))))}},59989:function(e,t,o){o.d(t,{Fb:function(){return c},HP:function(){return a}});var n=o(14599),r=o(7506);function a(e){return{onChange:t=>{(0,n.recordEvent)(`product_checkbox_${e}`,{checked:t})}}}const c=(e,t,o)=>{const{decimalSeparator:n,thousandSeparator:a}=t,c=new RegExp(r.aT.replace("%s1",n).replace("%s2",a),"g");return void 0===e?e:o(e).replace(c,"")}},15064:function(e,t,o){o.d(t,{g:function(){return g}});var n=o(65736),r=o(9818),a=o(69307),c=o(81595),i=o(67221),l=o(14599),s=o(67191),m=o(54071);const u=e=>{var t;return window.wcAdminFeatures["product-variation-management"]&&null!==(t=e.attributes)&&void 0!==t&&t.find((e=>e.options.length&&e.variation))?"variable":"simple"};var d=o(7506);function p(e){return i.productReadOnlyProperties.forEach((t=>delete e[t])),e}function _(e,t){return"publish"===e&&t?[{label:(0,n.__)("View in store","woocommerce"),onClick:()=>{(0,l.recordEvent)("product_preview_changes",{new_product_page:!0}),window.open(t,"_blank")}}]:[]}function g(){const{createProduct:e,updateProduct:t,deleteProduct:o}=(0,r.useDispatch)(i.PRODUCTS_STORE_NAME),{batchUpdateProductVariations:l,invalidateResolutionForStoreSelector:g}=(0,r.useDispatch)(i.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),{createNotice:E}=(0,r.useDispatch)("core/notices"),[h,w]=(0,a.useState)(!1),[b,I]=(0,a.useState)({draft:!1,publish:!1}),N=(0,a.useContext)(m.$),C=(0,a.useCallback)((async function(t,o){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return I({...b,[o]:!0}),e({...t,status:o,type:u(t)}).then((e=>{if(!r){const t="publish"===e.status?(0,n.__)("Product published.","woocommerce"):(0,n.__)("Product successfully created.","woocommerce");E("success",`🎉‎ ${t}`,{actions:_(e.status,e.permalink)})}return I({...b,[o]:!1}),e}),(e=>(r||E("error","publish"===o?(0,n.__)("Failed to publish product.","woocommerce"):(0,n.__)("Failed to create product.","woocommerce")),I({...b,[o]:!1}),e)))}),[b]);async function v(e,t){if(t)return l({product_id:e},{update:Object.values(t).flatMap(Object.entries).map((e=>{let[t,o]=e;return{id:t,menu_order:o}}))})}const f=(0,a.useCallback)((async function(e,o,r){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return I({...b,[r]:!0}),t(e,{...o,status:r,type:u(o)}).then((async e=>v(e.id,o.variationsOrder).then((()=>g("getProductVariations"))).then((()=>e)))).then((e=>{if(!a){const t="draft"===o.status&&"publish"===e.status?(0,n.__)("Product published.","woocommerce"):(0,n.__)("Product successfully updated.","woocommerce");E("success",`🎉‎ ${t}`,{actions:_(e.status,e.permalink)})}return I({...b,[r]:!1}),e}),(e=>(a||E("error",(0,n.__)("Failed to update product.","woocommerce")),I({...b,[r]:!1}),e)))}),[b]),S=(0,a.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"draft";return C(p({...e,name:(e.name||s.I)+" - Copy"}),t)}),[]),y=(0,a.useCallback)((async e=>(w(!0),o(e).then((e=>{const t=(0,n.__)("Successfully moved product to Trash.","woocommerce");return E("success",`🎉‎ ${t}`),w(!1),e}),(e=>(E("error",(0,n.__)("Failed to move product to Trash.","woocommerce")),w(!1),e))))),[]),k=(0,a.useCallback)((e=>{const{getCurrencyConfig:t}=N,{decimalSeparator:o}=t(),n=new RegExp(d.ec.replace("%s",o),"g"),r=new RegExp(d.UM.replaceAll("%s",o),"g");return e.replace(n,"").replace(r,"").replace(o,".")}),[N]),M=(0,a.useCallback)((e=>{const{getCurrencyConfig:t}=N,{decimalSeparator:o,thousandSeparator:n}=t();return c.numberFormat({decimalSeparator:o,thousandSeparator:n},e)}),[N]),x=(0,a.useCallback)((e=>{const{getCurrencyConfig:t}=N,{decimalSeparator:o,thousandSeparator:n}=t();return c.parseNumber({decimalSeparator:o,thousandSeparator:n},e)}),[N]);return{createProductWithStatus:C,updateProductWithStatus:f,copyProductWithStatus:S,deleteProductAndRedirect:y,sanitizePrice:k,formatNumber:M,parseNumber:x,isUpdatingDraft:b.draft,isUpdatingPublished:b.publish,isDeleting:h}}},67191:function(e,t,o){o.d(t,{I:function(){return r},X:function(){return a}});var n=o(65736);const r="AUTO-DRAFT",a=(e,t,o)=>null!=e&&e.length?e:o&&o!==r?o:"simple"===t?(0,n.__)("New standard product","woocommerce"):(0,n.__)("New product","woocommerce")},8573:function(e,t,o){o.d(t,{$:function(){return n}});const n=(e,t)=>{const o=new URLSearchParams(e.search),n=new URLSearchParams(t.search);return o.delete("tab"),n.delete("tab"),o.toString()!==n.toString()}},83911:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUxIiBoZWlnaHQ9IjcyIiB2aWV3Qm94PSIwIDAgMTUxIDcyIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cmVjdCB4PSI0NS44MjkxIiB5PSIyNS4yMzYzIiB3aWR0aD0iNzguNDk0NSIgaGVpZ2h0PSI0NS4yNjM3IiByeD0iMy43MzgxIiBmaWxsPSIjRjZGN0Y3IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWRhc2hhcnJheT0iNCAzIi8+CjxyZWN0IHg9IjIuMzEyNSIgeT0iMS41IiB3aWR0aD0iNzguNDk0NSIgaGVpZ2h0PSI2OSIgcng9IjMuNzM4MSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iI0RERERERCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxsaW5lIHgxPSIxMS4zNTE2IiB5MT0iOS45NDkyMiIgeDI9IjMzLjY3MDIiIHkyPSI5Ljk0OTIyIiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxsaW5lIHgxPSIxMS4wMTU2IiB5MT0iNTUuNDY2OCIgeDI9IjMzLjMzNDMiIHkyPSI1NS40NjY4IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxsaW5lIHgxPSIxMS4wMTU2IiB5MT0iNjEuMDA1NCIgeDI9IjI2LjIxMzQiIHkyPSI2MS4wMDU0IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxyZWN0IHg9IjExLjAxNTYiIHk9IjQxLjA2MDUiIHdpZHRoPSIyNy4wNjU5IiBoZWlnaHQ9IjguMDc2OTIiIHJ4PSIxLjUiIHN0cm9rZT0iI0RERERERCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxsaW5lIHgxPSI0NS4wMzYxIiB5MT0iNTUuNDY3MyIgeDI9IjY3LjM1NDgiIHkyPSI1NS40NjczIiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxsaW5lIHgxPSI0NS4wMzYxIiB5MT0iNjEuMDA1NCIgeDI9IjYwLjIzMzkiIHkyPSI2MS4wMDU0IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxyZWN0IHg9IjQ1LjAzNjEiIHk9IjQxLjA2MDUiIHdpZHRoPSIyNy4wNjU5IiBoZWlnaHQ9IjguMDc2OTIiIHJ4PSIxLjUiIHN0cm9rZT0iI0RERERERCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxyZWN0IHg9IjExLjAxNTYiIHk9IjE4LjExNTIiIHdpZHRoPSI2MS4wODc5IiBoZWlnaHQ9IjE0LjQwNjYiIHJ4PSIxLjUiIHN0cm9rZT0iI0RERERERCIgc3Ryb2tlLXdpZHRoPSIzIi8+CjxwYXRoIGQ9Ik01OC41NzAzIDIzLjczNjNMNjEuNDIzNiAyNi41ODk3QzYxLjgxNDIgMjYuOTgwMiA2Mi40NDczIDI2Ljk4MDIgNjIuODM3OSAyNi41ODk3TDY1LjY5MTIgMjMuNzM2MyIgc3Ryb2tlPSIjREREREREIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8bGluZSB4MT0iMTcuNSIgeTE9IjI1IiB4Mj0iMzkuODE4NyIgeTI9IjI1IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjxwYXRoIGQ9Ik0xNDkuMTg4IDQyLjYzMDhMMTM0Ljk3NyAzMC4xOTY4IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxjaXJjbGUgcj0iMTguMDM5MiIgdHJhbnNmb3JtPSJtYXRyaXgoLTEgMCAwIDEgMTIyLjU0MSAxOS41MzkyKSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iI0RERERERCIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0xMjEuMjk3IDE1LjgzNEgxMzEuNjY3TTEyMS4yOTcgMjQuMDAwN0gxMzEuNjY3IiBzdHJva2U9IiNEREREREQiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxlbGxpcHNlIGN4PSIxMTQuMzMzIiBjeT0iMjMuOTk5MyIgcng9IjIuMzMzMzMiIHJ5PSIyLjMzMzMzIiBmaWxsPSIjREREREREIi8+CjxlbGxpcHNlIGN4PSIxMTQuMzMzIiBjeT0iMTUuODMzMyIgcng9IjIuMzMzMzMiIHJ5PSIyLjMzMzMzIiBmaWxsPSIjREREREREIi8+Cjwvc3ZnPgo="},34537:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzIiIGhlaWdodD0iNzQiIHZpZXdCb3g9IjAgMCA3MiA3NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxyZWN0IHg9IjIwLjcxIiB5PSIxLjUiIHdpZHRoPSI0OS42NTExIiBoZWlnaHQ9IjQ5LjY1MTEiIHJ4PSIyLjUiIGZpbGw9IiNGNkY3RjciIHN0cm9rZT0iI0UwRTBFMCIgc3Ryb2tlLXdpZHRoPSIzIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS1kYXNoYXJyYXk9IjQgOSIvPgoJPHJlY3QgeD0iMS44MzM4MSIgeT0iMTguMDE4OCIgd2lkdGg9IjQ5LjY1MTEiIGhlaWdodD0iNDkuNjUxMSIgcng9IjIuNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTggMS44MzM4MSAxOC4wMTg4KSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iI0NDQ0NDQyIgc3Ryb2tlLXdpZHRoPSIzIi8+Cgk8cGF0aCBkPSJNNy4xMzM5MiA1NC4xMTA1TDE5LjY5MjQgNDIuNDY3MkwzMS4wNCA0Ny40NThMNDEuNjMxNiAzNC40NDQ3TDU1LjM5OTkgNDQuMDM0NCIgc3Ryb2tlPSIjQ0NDQ0NDIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KCTxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMTQyNiA1NS43MDczTDY1LjE3NjIgNjEuNzQyNkw1OS4xODgzIDY1LjYzMDVMNDguMTQyNiA1NS43MDczWk00OC4xNDI1IDU1LjcwNzdMNTUuOTYxNyA3MS45OTk3TDU5LjE4ODIgNjUuNjMwOUw0OC4xNDI1IDU1LjcwNzdaIiBmaWxsPSIjQkJCQkJCIi8+Cgk8cGF0aCBkPSJNNjUuMTc2MiA2MS43NDI2TDY1Ljc4NzkgNjIuNjg0N0M2Ni4xNDY2IDYyLjQ1MTggNjYuMzQyIDYyLjAzNTQgNjYuMjkxNyA2MS42MTA3QzY2LjI0MTUgNjEuMTg2IDY1Ljk1NDUgNjAuODI2NiA2NS41NTE0IDYwLjY4MzhMNjUuMTc2MiA2MS43NDI2Wk00OC4xNDI2IDU1LjcwNzNMNDguNTE3OCA1NC42NDg1QzQ4LjAxMjQgNTQuNDY5NCA0Ny40NTA5IDU0LjY3MjUgNDcuMTc3IDU1LjEzMzRDNDYuOTAzIDU1LjU5NDQgNDYuOTkzIDU2LjE4NDYgNDcuMzkxOSA1Ni41NDI5TDQ4LjE0MjYgNTUuNzA3M1pNNTkuMTg4MyA2NS42MzA1TDU4LjQzNzYgNjYuNDY2MkM1OC44MTU0IDY2LjgwNTYgNTkuMzc0IDY2Ljg0OTMgNTkuOCA2Ni41NzI3TDU5LjE4ODMgNjUuNjMwNVpNNTUuOTYxNyA3MS45OTk3TDU0Ljk0OSA3Mi40ODU3QzU1LjEzNCA3Mi44NzEzIDU1LjUyMiA3My4xMTgzIDU1Ljk0OTYgNzMuMTIyOUM1Ni4zNzczIDczLjEyNzUgNTYuNzcwNCA3Mi44ODg4IDU2Ljk2MzcgNzIuNTA3M0w1NS45NjE3IDcxLjk5OTdaTTQ4LjE0MjUgNTUuNzA3N0w0OC44OTMyIDU0Ljg3MjFDNDguNDk0MyA1NC41MTM3IDQ3Ljg5NzggNTQuNDg3MyA0Ny40Njg4IDU0LjgwODhDNDcuMDM5NyA1NS4xMzA0IDQ2Ljg5NzggNTUuNzEwMyA0Ny4xMjk4IDU2LjE5MzdMNDguMTQyNSA1NS43MDc3Wk01OS4xODgyIDY1LjYzMDlMNjAuMTkwMiA2Ni4xMzg2QzYwLjQxOTcgNjUuNjg1NSA2MC4zMTY3IDY1LjEzNDcgNTkuOTM4OSA2NC43OTUzTDU5LjE4ODIgNjUuNjMwOVpNNjUuNTUxNCA2MC42ODM4TDQ4LjUxNzggNTQuNjQ4NUw0Ny43Njc0IDU2Ljc2NjFMNjQuODAxMSA2Mi44MDE0TDY1LjU1MTQgNjAuNjgzOFpNNTkuOCA2Ni41NzI3TDY1Ljc4NzkgNjIuNjg0N0w2NC41NjQ1IDYwLjgwMDVMNTguNTc2NiA2NC42ODg0TDU5LjggNjYuNTcyN1pNNDcuMzkxOSA1Ni41NDI5TDU4LjQzNzYgNjYuNDY2Mkw1OS45MzkgNjQuNzk0OUw0OC44OTMzIDU0Ljg3MTdMNDcuMzkxOSA1Ni41NDI5Wk01Ni45NzQ0IDcxLjUxMzZMNDkuMTU1MiA1NS4yMjE2TDQ3LjEyOTggNTYuMTkzN0w1NC45NDkgNzIuNDg1N0w1Ni45NzQ0IDcxLjUxMzZaTTU4LjE4NjEgNjUuMTIzM0w1NC45NTk2IDcxLjQ5Mkw1Ni45NjM3IDcyLjUwNzNMNjAuMTkwMiA2Ni4xMzg2TDU4LjE4NjEgNjUuMTIzM1pNNDcuMzkxOCA1Ni41NDMzTDU4LjQzNzUgNjYuNDY2NUw1OS45Mzg5IDY0Ljc5NTNMNDguODkzMiA1NC44NzIxTDQ3LjM5MTggNTYuNTQzM1oiIGZpbGw9IiNCQkJCQkIiLz4KPC9zdmc+Cg=="}}]);