11 lines
674 KiB
JavaScript
11 lines
674 KiB
JavaScript
|
(window.webpackJsonp_cartflows=window.webpackJsonp_cartflows||[]).push([[1],{44:function(e,t,n){},56:function(e,t,n){},57:function(e,t,n){},58:function(e,t,n){}}]),function(e){function t(t){for(var o,l,r=t[0],c=t[1],u=t[2],d=0,b=[];d<r.length;d++)l=r[d],Object.prototype.hasOwnProperty.call(a,l)&&a[l]&&b.push(a[l][0]),a[l]=0;for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(e[o]=c[o]);for(s&&s(t);b.length;)b.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],o=!0,r=1;r<n.length;r++){var c=n[r];0!==a[c]&&(o=!1)}o&&(i.splice(t--,1),e=l(l.s=n[0]))}return e}var o={},a={0:0},i=[];function l(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.m=e,l.c=o,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)l.d(n,o,function(t){return e[t]}.bind(null,o));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="";var r=window.webpackJsonp_cartflows=window.webpackJsonp_cartflows||[],c=r.push.bind(r);r.push=t,r=r.slice();for(var u=0;u<r.length;u++)t(r[u]);var s=c;i.push([59,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.components},function(e,t,n){"use strict";var o,a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function l(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function r(e,t){for(var n={},o=[],a=0;a<e.length;a++){var r=e[a],c=t.base?r[0]+t.base:r[0],u=n[c]||0,s="".concat(c," ").concat(u);n[c]=u+1;var d=l(s),b={css:r[1],media:r[2],sourceMap:r[3]};-1!==d?(i[d].references++,i[d].updater(b)):i.push({identifier:s,updater:m(b,t),references:1}),o.push(s)}return o}function c(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var l=a(e.insert||"head");if(!l)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(t)}return t}var u,s=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function d(e,t,n,o){var a=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=s(t,a);else{var i=document.createTextNode(a),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function b(e,t,n){var o=n.css,a=n.media,i=n.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var p=null,g=0;function m(e,t){var n,o,a;if(t.singleton){var i=g++;n=p||(p=c(t)),o=d.bind(null,n,i,!1),a=d.bind(null,n,i,!0)}else n=c(t),o=b.bind(null,n,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.single
|
||
|
/* translators: abbreviation for units */
|
||
|
"%s",t),key:a},Object(b.createElement)(S.Button,{key:a,className:`components-button components-tab-panel__tabs-item ${r}${n===o?" active-tab":""}`,"aria-pressed":o===n,onClick:()=>l(n)},i))}))):null},ae=n(18),ie=0,le={injectType:"lazySingletonStyleTag",attributes:{id:"uagb-editor-styles"},insert:"head",singleton:!0},re={};re.locals=ae.a.locals||{},re.use=function(){return ie++||(te=i()(ae.a,le)),re},re.unuse=function(){ie>0&&!--ie&&(te(),te=null)};var ce=re;const ue=(e,t,n)=>{let o=0;if(n){var a;const n=ee();o=(e||t.data[n.toLowerCase()].value)&&null!==(a=t.data[n.toLowerCase()])&&void 0!==a&&a.max?t.data[n.toLowerCase()].max:t.max}else o=e&&t.limitMax?t.limitMax[e]:t.max;return o},se=(e,t,n)=>{let o=0;if(n){var a;const n=ee();o=(e||t.data[n.toLowerCase()].value)&&null!==(a=t.data[n.toLowerCase()])&&void 0!==a&&a.min?t.data[n.toLowerCase()].min:t.min}else o=e&&t.limitMin?t.limitMin[e]:t.min;return o},de=!!S.__experimentalNumberControl,be=e=>{var t,n;Object(m.useLayoutEffect)(()=>(ce.use(),()=>{ce.unuse()}),[]);const{withInputField:o,isShiftStepEnabled:a}=e;let i=ue(null===(t=e.unit)||void 0===t?void 0:t.value,e),l=se(null===(n=e.unit)||void 0===n?void 0:n.value,e);const r=isNaN(null==e?void 0:e.value)?"":null==e?void 0:e.value;let c=[{name:Object(y.__)("Pixel","ultimate-addons-for-gutenberg"),unitValue:"px"},{name:Object(y.__)("Em","ultimate-addons-for-gutenberg"),unitValue:"em"}];e.units&&(c=e.units);const u=t=>{const n=parseFloat(t);e.setAttributes&&e.setAttributes({[e.data.label]:n}),null!=e&&e.onChange&&e.onChange(n)},s=t=>{e.setAttributes({[e.unit.label]:t}),i=ue(t,e),l=se(t,e),e.value>i&&u(i),e.value<l&&u(l)};return Object(b.createElement)("div",{className:"components-base-control uag-range-control uagb-size-type-field-tabs"},Object(b.createElement)("div",{className:"uagb-control__header"},Object(b.createElement)(oe,{label:e.label,responsive:e.responsive}),Object(b.createElement)("div",{className:"uagb-range-control__actions uagb-control__actions"},Object(b.createElement)(P,{onReset:t=>{var n,o;null!=e&&e.onChange&&(null==e||e.onChange(t[null==e||null===(n=e.data)||void 0===n?void 0:n.label])),e.displayUnit&&s(t[null==e||null===(o=e.unit)||void 0===o?void 0:o.label])},attributeNames:[e.data.label,!!e.displayUnit&&e.unit.label],setAttributes:e.setAttributes}),e.displayUnit&&Object(b.createElement)(S.ButtonGroup,{className:"uagb-control__units","aria-label":Object(y.__)("Select Units","ultimate-addons-for-gutenberg")},(t=>{const n=[];return t.map(t=>n.push(Object(b.createElement)(S.Tooltip,{text:Object(y.sprintf)(
|
||
|
/* translators: abbreviation for units */
|
||
|
Object(y.__)("%s units","ultimate-addons-for-gutenberg"),t.name),key:t.name},Object(b.createElement)(S.Button,{key:t.unitValue,className:"uagb-range-control__units--"+t.name,isSmall:!0,isPrimary:e.unit.value===t.unitValue,isSecondary:e.unit.value!==t.unitValue,"aria-pressed":e.unit.value===t.unitValue,"aria-label":Object(y.sprintf)(
|
||
|
/* translators: abbreviation for units */
|
||
|
Object(y.__)("%s units","ultimate-addons-for-gutenberg"),t.name),onClick:()=>s(t.unitValue)},t.unitValue)))),n})(c)))),Object(b.createElement)("div",{className:"uagb-range-control__mobile-controls"},Object(b.createElement)(S.RangeControl,{value:r,onChange:u,withInputField:!1,allowReset:!1,max:i,min:l,step:(null==e?void 0:e.step)||1,initialPosition:r}),o&&de&&Object(b.createElement)(S.__experimentalNumberControl,{disabled:e.disabled,isShiftStepEnabled:a,max:i,min:l,onChange:u,value:r,step:(null==e?void 0:e.step)||1})),e.help&&Object(b.createElement)("p",{className:"uag-control-help-notice"},e.help))};be.defaultProps={label:Object(y.__)("Margin","ultimate-addons-for-gutenberg"),className:"",allowReset:!0,withInputField:!0,isShiftStepEnabled:!0,max:1/0,min:-1/0,resetFallbackValue:"",placeholder:null,unit:["px","em"],displayUnit:!0,responsive:!1};var pe,ge=be,me=e=>{var t,n,o,a,i,l;const r=ee(),c={},u=ue(null===(t=e.data.desktop.unit)||void 0===t?void 0:t.value,e,!0),s=ue(null===(n=e.data.tablet.unit)||void 0===n?void 0:n.value,e,!0),d=ue(null===(o=e.data.mobile.unit)||void 0===o?void 0:o.value,e,!0),p=se(null===(a=e.data.desktop.unit)||void 0===a?void 0:a.value,e,!0),g=se(null===(i=e.data.tablet.unit)||void 0===i?void 0:i.value,e,!0),m=se(null===(l=e.data.mobile.unit)||void 0===l?void 0:l.value,e,!0);return c.Desktop=Object(b.createElement)(b.Fragment,null,Object(b.createElement)(ge,w()({},e,{label:e.label,value:isNaN(e.data.desktop.value)?"":e.data.desktop.value,data:{value:e.data.desktop.value,label:e.data.desktop.label},onChange:!(null==e||!e.onChange)&&(t=>{null!=e&&e.onChange&&e.onChange(t)}),min:p,max:u,unit:e.data.desktop.unit||e.unit,responsive:!0,units:e.units}))),c.Tablet=Object(b.createElement)(b.Fragment,null,Object(b.createElement)(ge,w()({},e,{label:e.label,value:isNaN(e.data.tablet.value)?"":e.data.tablet.value,data:{value:e.data.tablet.value,label:e.data.tablet.label},onChange:!(null==e||!e.onChange)&&(t=>{null!=e&&e.onChange&&e.onChange(t)}),min:g,max:s,unit:e.data.tablet.unit||e.unit,responsive:!0,units:e.units}))),c.Mobile=Object(b.createElement)(b.Fragment,null,Object(b.createElement)(ge,w()({},e,{label:e.label,value:isNaN(e.data.mobile.value)?"":e.data.mobile.value,data:{value:e.data.mobile.value,label:e.data.mobile.label},onChange:!(null==e||!e.onChange)&&(t=>{null!=e&&e.onChange&&e.onChange(t)}),min:m,max:d,unit:e.data.mobile.unit||e.unit,responsive:!0,units:e.units}))),Object(b.createElement)("div",{className:"components-base-control uagb-responsive-range"},Object(b.createElement)("div",{className:"uagb-responsive-control-inner"},c[r]?c[r]:c.Desktop))},fe=n(19),he=0,ve={injectType:"lazySingletonStyleTag",attributes:{id:"uagb-editor-styles"},insert:"head",singleton:!0},we={};we.locals=fe.a.locals||{},we.use=function(){return he++||(pe=i()(fe.a,ve)),we},we.unuse=function(){he>0&&!--he&&(pe(),pe=null)};var ye,_e=we,ke=e=>{Object(m.useLayoutEffect)(()=>(_e.use(),()=>{_e.unuse()}),[]);const{label:t,data:n,setAttributes:o,options:a}=e,i=ee(),l={};return l.Desktop=Object(b.createElement)(S.SelectControl,{value:n.desktop.value,onChange:e=>o({[n.desktop.label]:e}),options:a.desktop}),l.Tablet=Object(b.createElement)(S.SelectControl,{value:n.tablet.value,onChange:e=>o({[n.tablet.label]:e}),options:a.tablet||a.desktop}),l.Mobile=Object(b.createElement)(S.SelectControl,{value:n.mobile.value,onChange:e=>o({[n.mobile.label]:e}),options:a.mobile||a.desktop}),Object(b.createElement)("div",{className:"components-base-control uagb-responsive-select-control"},Object(b.createElement)("div",{className:"uagb-size-type-field-tabs"},Object(b.createElement)("div",{className:"uagb-control__header"},Object(b.createElement)(oe,{label:t,responsive:!0})),l[i]?l[i]:l.Desktop),e.help&&Object(b.createElement)("p",{className:"uag-control-help-notice"},e.help))},xe=e=>{const{backgroundImage:t,setAttributes:n}=e,o=ee(),a=o.toLowerCase(),i=e=>{e&&e.url?e.type&&"image"===e.type?n({[t[a].label]:e}):n({[t[a].label]:null}):n({[t[a].label]:null})},l=()=>{n({[t[a].label]:""})},r={};return r.Desktop=Object(b.createElement)(Q,{onSelectImage:i,
|
||
|
/* translators: abbreviation for units */
|
||
|
Object(y.__)("%s units","ultimate-addons-for-gutenberg"),e.name)},Object(b.createElement)(S.Button,{key:e.unitValue,className:"uagb-range-control__units--"+e.name,isSmall:!0,isPrimary:"Desktop"===t&&o.value===e.unitValue||"Mobile"===t&&a.value===e.unitValue||"Tablet"===t&&i.value===e.unitValue,isSecondary:o.value!==e.unitValue||a.value!==e.unitValue||i.value!==e.unitValue,"aria-pressed":"Desktop"===t&&o.value===e.unitValue||"Mobile"===t&&a.value===e.unitValue||"Tablet"===t&&i.value===e.unitValue,"data-device-type":t,"aria-label":Object(y.sprintf)(
|
||
|
/* translators: abbreviation for units */
|
||
|
Object(y.__)("%s units","ultimate-addons-for-gutenberg"),e.name),onClick:()=>{return n=e,void x("Mobile"===t?{[a.label]:n.unitValue}:"Tablet"===t?{[i.label]:n.unitValue}:{[o.label]:n.unitValue});var n}},e.unitValue)))),n})(M)))),H[t]?H[t]:H.Desktop,Object(b.createElement)("div",{className:"uagb-spacing-control__input-labels"},Object(b.createElement)("span",{className:"uagb-spacing-control__number-label"},Object(y.__)("Top","ultimate-addons-for-gutenberg")),Object(b.createElement)("span",{className:"uagb-spacing-control__number-label"},Object(y.__)("Right","ultimate-addons-for-gutenberg")),Object(b.createElement)("span",{className:"uagb-spacing-control__number-label"},Object(y.__)("Bottom","ultimate-addons-for-gutenberg")),Object(b.createElement)("span",{className:"uagb-spacing-control__number-label"},Object(y.__)("Left","ultimate-addons-for-gutenberg")),Object(b.createElement)("span",{className:"uagb-spacing-control__number-label uagb-spacing-control__link-label"}))),e.help&&Object(b.createElement)("p",{className:"uag-control-help-notice"},e.help))};const ca={prefix:Ve.a.string,borderStyleLabel:Ve.a.string,borderWidthLabel:Ve.a.string,borderRadiusLabel:Ve.a.string,borderColorLabel:Ve.a.string},ua={borderStyleLabel:Object(y.__)("Style","ultimate-addons-for-gutenberg"),borderWidthLabel:Object(y.__)("Width","ultimate-addons-for-gutenberg"),borderRadiusLabel:Object(y.__)("Radius","ultimate-addons-for-gutenberg"),borderColorLabel:Object(y.__)("Color","ultimate-addons-for-gutenberg"),borderHoverColorLabel:Object(y.__)("Hover Color","ultimate-addons-for-gutenberg")},sa=e=>{const{attributes:t,setAttributes:n,disabledBorderTitle:o,disableBottomSeparator:a=!1,deviceType:i,prefix:l,borderStyleLabel:r,borderWidthLabel:c,borderRadiusLabel:u,borderColorLabel:s,borderHoverColorLabel:d,showWidth:p,label:g=Object(y.__)("Border","ultimate-addons-for-gutenberg"),normalTabLabel:m=Object(y.__)("Normal","ultimate-addons-for-gutenberg"),hoverTabLabel:f=Object(y.__)("Hover","ultimate-addons-for-gutenberg"),borderRadiusHelp:h}=e,v=[{name:"normal",title:m}];v.push({name:"hover",title:f});const w=t[l+"BorderStyle"],_=Object(b.createElement)(N,{label:s,colorValue:t[l+"BorderColor"]?t[l+"BorderColor"]:"",data:{value:t[l+"BorderColor"],label:l+"BorderColor"},setAttributes:n}),k=Object(b.createElement)(N,{label:d,colorValue:t[l+"BorderHColor"]?t[l+"BorderHColor"]:"",data:{value:t[l+"BorderHColor"],label:l+"BorderHColor"},setAttributes:n});return Object(b.createElement)(b.Fragment,null,!o&&Object(b.createElement)("h2",null,g),Object(b.createElement)(We,{label:r,data:{value:w,label:l+"BorderStyle"},setAttributes:n,options:[{value:"none",label:Object(y.__)("None","ultimate-addons-for-gutenberg")},{value:"solid",label:Object(y.__)("Solid","ultimate-addons-for-gutenberg")},{value:"dotted",label:Object(y.__)("Dotted","ultimate-addons-for-gutenberg")},{value:"dashed",label:Object(y.__)("Dashed","ultimate-addons-for-gutenberg")},{value:"double",label:Object(y.__)("Double","ultimate-addons-for-gutenberg")},{value:"groove",label:Object(y.__)("Groove","ultimate-addons-for-gutenberg")},{value:"inset",label:Object(y.__)("Inset","ultimate-addons-for-gutenberg")},{value:"outset",label:Object(y.__)("Outset","ultimate-addons-for-gutenberg")},{value:"ridge",label:Object(y.__)("Ridge","ultimate-addons-for-gutenberg")}]}),""!==w&&"none"!==w&&!1!==p&&Object(b.createElement)(ra,{label:c,valueTop:{value:t[l+"BorderTopWidth"],label:l+"BorderTopWidth"},valueRight:{value:t[l+"BorderRightWidth"],label:l+"BorderRightWidth"},valueBottom:{value:t[l+"BorderBottomWidth"],label:l+"BorderBottomWidth"},valueLeft:{value:t[l+"BorderLeftWidth"],label:l+"BorderLeftWidth"},valueTopTablet:{value:t[l+"BorderTopWidthTablet"],label:l+"BorderTopWidthTablet"},valueRightTablet:{value:t[l+"BorderRightWidthTablet"],label:l+"BorderRightWidthTablet"},valueBottomTablet:{value:t[l+"BorderBottomWidthTablet"],label:l+"BorderBottomWidthTablet"},valueLeftTablet:{value:t[l+"BorderLeftWidthTablet"],label:l+"BorderLeftWidthTablet"},valueTopMobile:{value:t[l+"BorderTopWidthMobile"],label:l+"BorderTopWidthMobil
|