File "order-confirmation-additional-fields-wrapper.js"

Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/woocommerce/assets/client/blocks/order-confirmation-additional-fields-wrapper.js
File size: 4.92 KB
MIME-type: text/plain
Charset: utf-8

(()=>{var e,t={2772:(e,t,o)=>{"use strict";o.r(t);var i=o(9196);const n=window.wp.blocks,r=window.wp.blockEditor;var l=o(2911),a=o(2720);const s=window.wc.wcSettings;var c,d,p,m,u,g,f,w,S,b;const k=(0,s.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),v=(k.pluginUrl,k.pluginUrl,k.buildPhase,null===(c=s.STORE_PAGES.shop)||void 0===c||c.permalink,null===(d=s.STORE_PAGES.checkout)||void 0===d||d.id,null===(p=s.STORE_PAGES.checkout)||void 0===p||p.permalink,null===(m=s.STORE_PAGES.privacy)||void 0===m||m.permalink,null===(u=s.STORE_PAGES.privacy)||void 0===u||u.title,null===(g=s.STORE_PAGES.terms)||void 0===g||g.permalink,null===(f=s.STORE_PAGES.terms)||void 0===f||f.title,null===(w=s.STORE_PAGES.cart)||void 0===w||w.id,null===(S=s.STORE_PAGES.cart)||void 0===S||S.permalink,null!==(b=s.STORE_PAGES.myaccount)&&void 0!==b&&b.permalink?s.STORE_PAGES.myaccount.permalink:(0,s.getSetting)("wpLoginUrl","/wp-login.php"),(0,s.getSetting)("localPickupEnabled",!1),(0,s.getSetting)("countries",{})),h=(0,s.getSetting)("countryData",{}),O=(Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowBilling)).map((e=>[e,v[e]||""]))),Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowBilling)).map((e=>[e,h[e].states||[]]))),Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowShipping)).map((e=>[e,v[e]||""]))),Object.fromEntries(Object.keys(h).filter((e=>!0===h[e].allowShipping)).map((e=>[e,h[e].states||[]]))),Object.fromEntries(Object.keys(h).map((e=>[e,h[e].locale||[]]))),{address:["first_name","last_name","company","address_1","address_2","city","postcode","country","state","phone"],contact:["email"],additional:[]}),y=((0,s.getSetting)("addressFieldsLocations",O).address,(0,s.getSetting)("addressFieldsLocations",O).contact,(0,s.getSetting)("addressFieldsLocations",O).additional,(0,s.getSetting)("additionalFields",{})),E=(0,s.getSetting)("additionalContactFields",{});(0,s.getSetting)("additionalAddressFields",{}),o(7453);const _=JSON.parse('{"name":"woocommerce/order-confirmation-additional-fields-wrapper","version":"1.0.0","title":"Additional Fields","description":"Display additional checkout fields from the \'contact\' and \'additional\' locations.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}'),j={heading:{type:"string",default:(0,o(5736).__)("Additional Information","woocommerce")}};(0,n.registerBlockType)(_,{icon:{src:(0,i.createElement)(l.Z,{icon:a.Z,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:t})=>{const o=(0,r.useBlockProps)({className:"wc-block-order-confirmation-additional-fields-wrapper"}),n={...y,...E};return 0===Object.entries(n).length?null:(0,i.createElement)("div",{...o},(0,i.createElement)(r.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:3,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>t({heading:e})}],["woocommerce/order-confirmation-additional-fields",{lock:{remove:!0}}]]}))},save:()=>(0,i.createElement)(r.InnerBlocks.Content,null),attributes:j})},7453:()=>{},9196:e=>{"use strict";e.exports=window.React},9307:e=>{"use strict";e.exports=window.wp.element},5736:e=>{"use strict";e.exports=window.wp.i18n},444:e=>{"use strict";e.exports=window.wp.primitives}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e].call(r.exports,r,r.exports,i),r.exports}i.m=t,e=[],i.O=(t,o,n,r)=>{if(!o){var l=1/0;for(d=0;d<e.length;d++){for(var[o,n,r]=e[d],a=!0,s=0;s<o.length;s++)(!1&r||l>=r)&&Object.keys(i.O).every((e=>i.O[e](o[s])))?o.splice(s--,1):(a=!1,r<l&&(l=r));if(a){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[o,n,r]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=9816,(()=>{var e={9816:0};i.O.j=t=>0===e[t];var t=(t,o)=>{var n,r,[l,a,s]=o,c=0;if(l.some((t=>0!==e[t]))){for(n in a)i.o(a,n)&&(i.m[n]=a[n]);if(s)var d=s(i)}for(t&&t(o);c<l.length;c++)r=l[c],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(d)},o=self.webpackChunkwebpackWcBlocksJsonp=self.webpackChunkwebpackWcBlocksJsonp||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=i.O(void 0,[2869],(()=>i(2772)));n=i.O(n),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["order-confirmation-additional-fields-wrapper"]=n})();