/
/
home
/
melaqxso
/
public_html
/
wp-content
/
plugins
/
woocommerce-square
/
build
Server: server63.web-hosting.com (198.54.116.184)
You: 216.73.216.220
PHP 7.4.33
Dir:
/home/melaqxso/public_html/wp-content/plugins/woocommerce-square/build
Edit:
/home/melaqxso/public_html/wp-content/plugins/woocommerce-square/build/settings.js
(()=>{var e={106:(e,t)=>{(()=>{var e={56:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},72:e=>{"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var a={},i=[],l=0;l<e.length;l++){var s=e[l],c=o.base?s[0]+o.base:s[0],u=a[c]||0,d="".concat(c," ").concat(u);a[c]=u+1;var p=n(d),m={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(m);else{var f=r(m,o);o.byIndex=l,t.splice(l,0,{identifier:d,updater:f,references:1})}i.push(d)}return i}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var a=o(e=e||[],r=r||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var l=n(a[i]);t[l].references--}for(var s=o(e,r),c=0;c<a.length;c++){var u=n(a[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}a=s}}},113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},192:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(601),r=n.n(o),a=n(314),i=n.n(a)()(r());i.push([e.id,':root{--wp-admin-theme-color: #007cba;--wp-admin-theme-color--rgb: 0, 124, 186;--wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);--wp-admin-theme-color-darker-10--rgb: 0, 107, 161;--wp-admin-theme-color-darker-20: #005a87;--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;--wp-admin-border-width-focus: 2px;--wp-block-synced-color: #7a00df;--wp-block-synced-color--rgb: 122, 0, 223;--wp-bound-block-color: var(--wp-block-synced-color)}@media(-webkit-min-device-pixel-ratio: 2),(min-resolution: 192dpi){:root{--wp-admin-border-width-focus: 1.5px}}.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}.codeamp-components-multi-select-control__input-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;padding:6px 8px;box-shadow:0 0 0 rgba(0,0,0,0);border-radius:2px;border:1px solid #949494;font-size:16px;line-height:normal;width:100%;margin:0 0 8px 0;padding:0;cursor:text}@media not (prefers-reduced-motion){.codeamp-components-multi-select-control__input-container{transition:box-shadow .1s linear}}@media(min-width: 600px){.codeamp-components-multi-select-control__input-container{font-size:13px;line-height:normal}}.codeamp-components-multi-select-control__input-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.codeamp-components-multi-select-control__input-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container::-moz-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.codeamp-components-multi-select-control__input-container.is-disabled{background:#ddd;border-color:#ddd}.codeamp-components-multi-select-control__input-container.is-active{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid rgba(0,0,0,0)}.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{display:inline-block;flex:1;font-family:inherit;font-size:16px;width:100%;max-width:100%;margin-left:4px;padding:0;min-height:24px;min-width:50px;background:inherit;border:0;color:#1e1e1e;box-shadow:none;line-height:30px}@media(min-width: 600px){.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{font-size:13px}}.codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input:focus,.codeamp-components-multi-select-control.is-active .codeamp-components-multi-select-control__input-container input[type=text].codeamp-components-multi-select-control__input{outline:none;box-shadow:none}.codeamp-components-multi-select-control__input-container .codeamp-components-multi-select-control__token+input[type=text].codeamp-components-multi-select-control__input{width:auto}.codeamp-components-multi-select-control__help{font-size:12px;font-style:normal;color:#757575}.codeamp-components-multi-select-control__tokens-container{min-height:38px;padding:4px;width:100%}.codeamp-components-multi-select-control__token{font-size:13px;display:flex;color:#1e1e1e;max-width:100%;padding:0}.codeamp-components-multi-select-control__token.is-borderless{position:relative;padding:0 24px 0 0}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__token-text{background:rgba(0,0,0,0);color:var(--wp-admin-theme-color)}.codeamp-components-multi-select-control__token.is-borderless .codeamp-components-multi-select-control__remove-token{background:rgba(0,0,0,0);color:#757575;position:absolute;top:1px;right:0;padding:0}.codeamp-components-multi-select-control__token.is-borderless.is-success .codeamp-components-multi-select-control__token-text{color:#4ab866}.codeamp-components-multi-select-control__token.is-borderless.is-error .codeamp-components-multi-select-control__token-text{color:#cc1818;border-radius:4px 0 0 4px;padding:0 4px 0 6px}.codeamp-components-multi-select-control__token.is-borderless.is-validating .codeamp-components-multi-select-control__token-text{color:#1e1e1e}.codeamp-components-multi-select-control__token.is-disabled .codeamp-components-multi-select-control__remove-token{cursor:default}.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{display:inline-block;line-height:30px;height:auto;background:#ddd;min-width:unset;transition:all .2s cubic-bezier(0.4, 1, 0.4, 1)}@media(prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__token-text,.codeamp-components-multi-select-control__remove-token.components-button{transition-duration:0s;transition-delay:0s;animation-duration:1ms;animation-delay:0s}}.codeamp-components-multi-select-control__token-text{border-radius:2px 0 0 2px;padding:0 0 0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.codeamp-components-multi-select-control__remove-token.components-button{cursor:pointer;border-radius:0 2px 2px 0;padding:0 4px;color:#1e1e1e;line-height:10px;overflow:initial}.codeamp-components-multi-select-control__remove-token.components-button:hover{color:#1e1e1e}.codeamp-components-multi-select-control__suggestions-list{flex:1 0 100%;min-width:100%;overflow-y:auto;transition:all .15s ease-in-out;list-style:none;border-top:1px solid #757575;margin:0;padding:0}@media(prefers-reduced-motion: reduce){.codeamp-components-multi-select-control__suggestions-list{transition-duration:0s;transition-delay:0s}}.codeamp-components-multi-select-control__no-suggestions{color:#757575;font-size:13px;margin:0;display:block;padding:4px 8px}.codeamp-components-multi-select-control__suggestion{color:#757575;display:block;font-size:13px;padding:4px 8px;margin:0;cursor:pointer}.codeamp-components-multi-select-control__suggestion.is-selected{background:var(--wp-admin-theme-color);color:#fff}.codeamp-components-multi-select-control__suggestion-match{text-decoration:underline}',""]);const l=i},243:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var o=n(601),r=n.n(o),a=n(314),i=n.n(a)()(r());i.push([e.id,".codeamp-components-resource-select-control>.components-base-control__field{position:relative;display:flex;flex-wrap:wrap}.codeamp-components-resource-select-control>.components-base-control__field>.components-base-control__label{flex:2}.codeamp-components-resource-select-control__label{margin-bottom:8px}.codeamp-components-resource-select-control .codeamp-components-resource-select-control__menu_button.has-icon{height:40px;margin-bottom:0;min-width:26px;padding:2px 0;flex-basis:26px;width:26px}.codeamp-components-resource-select-control__select{width:auto;flex:1}.codeamp-components-resource-select-control .components-base-control{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control__field{margin-bottom:0}.codeamp-components-resource-select-control .components-base-control{flex:1}",""]);const l=i},314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,o,r,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(o)for(var l=0;l<this.length;l++){var s=this[l][0];null!=s&&(i[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&i[u[0]]||(void 0!==a&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=a),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},485:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},601:e=>{"use strict";e.exports=function(e){return e[1]}},659:e=>{"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},825:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var a=n[t]={id:t,exports:{}};return e[t](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var r={};(()=>{"use strict";o.r(r),o.d(r,{MultiSelectControl:()=>Ae,ResourceSelectControl:()=>O});const e=window.wp.i18n,t=window.wp.components,n=window.wp.compose,a=window.React,i=window.wp.primitives,l=(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(i.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var s=o(72),c=o.n(s),u=o(825),d=o.n(u),p=o(659),m=o.n(p),f=o(56),g=o.n(f),_=o(540),h=o.n(_),y=o(113),b=o.n(y),v=o(243),w={};w.styleTagTransform=b(),w.setAttributes=g(),w.insert=m().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=h(),c()(v.A,w),v.A&&v.A.locals&&v.A.locals;var S=o(485),E=o.n(S);function C(e){return C="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},C(e)}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},x.apply(null,arguments)}function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach(function(t){A(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function A(e,t,n){return(t=function(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=C(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var P=function(){},O=function(o){var r,a,i=o.onChange,s=void 0===i?P:i,c=o.label,u=void 0===c?"":c,d=o.loadingLabel,p=void 0===d?(0,e.__)("Loading","codeamp-block-components"):d,m=o.showActions,f=void 0===m||m,g=o.dropdownProps,_=o.dropdownToggleProps,h=o.disabled,y=void 0!==h&&h,b=o.defaultOption,v=o.options,w=o.value,S=o.help,C=o.id,k=o.className,A=[];p&&(A=[{value:"loading",label:p}]),v&&(A=[],b&&A.push(b),(r=A).push.apply(r,function(e){if(Array.isArray(e))return q(e)}(a=v)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));var R=(0,n.useInstanceId)(O,"codeamp-components-resource-select-control");return C&&(R=C),React.createElement(t.BaseControl,{id:R,className:E()("components-base-control codeamp-components-resource-select-control",k),help:S,label:u,__nextHasNoMarginBottom:!0},React.createElement(t.__experimentalHStack,null,React.createElement(t.SelectControl,{id:R,value:w,options:A,className:"codeamp-components-resource-select-control__select",onChange:s,disabled:y,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),f&&React.createElement(t.DropdownMenu,x({icon:l,toggleProps:T(T({className:"codeamp-components-resource-select-control__menu_button",iconSize:26},_),{},{__next40pxDefaultSize:!0})},g))))};const R=window.wp.element,D=window.wp.a11y,I=window.wp.isShallowEqual;var N=o.n(I);const L=(0,a.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(i.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var M=function(){};function j(o){var r=o.value,a=o.label,i=o.title,l=o.isBorderless,s=void 0!==l&&l,c=o.disabled,u=void 0!==c&&c,d=o.onClickRemove,p=void 0===d?M:d,m=o.onMouseEnter,f=o.onMouseLeave,g=o.messages,_=o.termPosition,h=o.termsCount,y=(0,n.useInstanceId)(j),b=E()("codeamp-components-multi-select-control__token",{"is-borderless":s,"is-disabled":u}),v=(0,e.sprintf)((0,e.__)("%1$s (%2$s of %3$s)"),a,_,h);return React.createElement("span",{className:b,onMouseEnter:m,onMouseLeave:f,title:i,style:{margin:"0"}},React.createElement("span",{className:"codeamp-components-multi-select-control__token-text",id:"codeamp-components-multi-select-control__token-text-".concat(y)},React.createElement(t.VisuallyHidden,{as:"span"},v),React.createElement("span",{"aria-hidden":"true"},a)),React.createElement(t.Button,{className:"codeamp-components-multi-select-control__remove-token",icon:L,onClick:u?M:function(){return p({value:r})},label:g.remove,"aria-describedby":"codeamp-components-multi-select-control__token-text-".concat(y)}))}var G=["value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur"];function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},B.apply(null,arguments)}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}const z=(0,R.forwardRef)(function(e,t){var n,o=e.value,r=e.isExpanded,a=e.instanceId,i=e.selectedSuggestionIndex,l=e.className,s=e.onChange,c=e.onFocus,u=e.onBlur,d=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;n[o]=e[o]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,G),p=function(e){if(Array.isArray(e))return e}(n=(0,R.useState)(!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,r,a,i=[],l=!0,s=!1;try{for(r=(t=t.call(e)).next;!(l=(n=r.call(t)).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw o}}return i}}(n)||function(e){if(e){if("string"==typeof e)return F(e,2);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)?F(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),m=p[0],f=p[1],g=o?o.length+1:0;return React.createElement("input",B({ref:t,id:a,type:"text"},d,{value:o||"",onChange:function(e){s&&s({value:e.target.value})},onFocus:function(e){f(!0),null==c||c(e)},onBlur:function(e){f(!1),null==u||u(e)},size:g,className:E()(l,"codeamp-components-multi-select-control__input"),autoComplete:"off",role:"combobox","aria-expanded":r,"aria-autocomplete":"list","aria-owns":r?"".concat(a,"-suggestions"):void 0,"aria-activedescendant":m&&-1!==i&&r?"".concat(a,"-suggestions-").concat(i):void 0,"aria-describedby":"".concat(a,"-howto"),"data-lpignore":"true"}))});function U(e){return U="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},U(e)}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function V(e,t){var n=e["page".concat(t?"Y":"X","Offset")],o="scroll".concat(t?"Top":"Left");if("number"!=typeof n){var r=e.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function $(e){return V(e)}function X(e){return V(e,!0)}function Y(e){var t=function(e){var t,n,o,r=e.ownerDocument,a=r.body,i=r&&r.documentElement;return n=(t=e.getBoundingClientRect()).left,o=t.top,{left:n-=i.clientLeft||a.clientLeft||0,top:o-=i.clientTop||a.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=$(o),t.top+=X(o),t}var K,J=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Z=/^(top|right|bottom|left)$/,Q="currentStyle",ee="runtimeStyle",te="left";function ne(e,t){for(var n=0;n<e.length;n++)t(e[n])}function oe(e){return"border-box"===K(e,"boxSizing")}"undefined"!=typeof window&&(K=window.getComputedStyle?function(e,t,n){var o="",r=e.ownerDocument,a=n||r.defaultView.getComputedStyle(e,null);return a&&(o=a.getPropertyValue(t)||a[t]),o}:function(e,t){var n=e[Q]&&e[Q][t];if(J.test(n)&&!Z.test(t)){var o=e.style,r=o[te],a=e[ee][te];e[ee][te]=e[Q][te],o[te]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[te]=r,e[ee][te]=a}return""===n?"auto":n});var re=["margin","border","padding"];function ae(e,t,n){var o,r,a,i=0;for(r=0;r<t.length;r++)if(o=t[r])for(a=0;a<n.length;a++){var l;l="border"===o?"".concat(o+n[a],"Width"):o+n[a],i+=parseFloat(K(e,l))||0}return i}function ie(e){return null!=e&&e==e.window}var le={};function se(e,t,n){if(ie(e))return"width"===t?le.viewportWidth(e):le.viewportHeight(e);if(9===e.nodeType)return"width"===t?le.docWidth(e):le.docHeight(e);var o="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?e.offsetWidth:e.offsetHeight,a=(K(e),oe(e)),i=0;(null==r||r<=0)&&(r=void 0,(null==(i=K(e,t))||Number(i)<0)&&(i=e.style[t]||0),i=parseFloat(i)||0),void 0===n&&(n=a?1:-1);var l=void 0!==r||a,s=r||i;if(-1===n)return l?s-ae(e,["border","padding"],o):i;if(l){var c=2===n?-ae(e,["border"],o):ae(e,["margin"],o);return s+(1===n?0:c)}return i+ae(e,re.slice(n),o)}ne(["Width","Height"],function(e){le["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],le["viewport".concat(e)](n))},le["viewport".concat(e)]=function(t){var n="client".concat(e),o=t.document,r=o.body,a=o.documentElement[n];return"CSS1Compat"===o.compatMode&&a||r&&r[n]||a}});var ce={position:"absolute",visibility:"hidden",display:"block"};function ue(e){var t,n=arguments;return 0!==e.offsetWidth?t=se.apply(void 0,n):function(e,o){var r,a={},i=e.style;for(r in o)o.hasOwnProperty(r)&&(a[r]=i[r],i[r]=o[r]);for(r in function(){t=se.apply(void 0,n)}.call(e),o)o.hasOwnProperty(r)&&(i[r]=a[r])}(e,ce),t}function de(e,t,n){var o=n;if("object"!==U(t))return void 0!==o?("number"==typeof o&&(o+="px"),void(e.style[t]=o)):K(e,t);for(var r in t)t.hasOwnProperty(r)&&de(e,r,t[r])}ne(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);le["outer".concat(t)]=function(t,n){return t&&ue(t,e,n?0:1)};var n="width"===e?["Left","Right"]:["Top","Bottom"];le[e]=function(t,o){return void 0===o?t&&ue(t,e,-1):t?(K(t),oe(t)&&(o+=ae(t,["padding","border"],n)),de(t,e,o)):void 0}});var pe=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(n,!0).forEach(function(t){H(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({getWindow:function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},offset:function(e,t){if(void 0===t)return Y(e);!function(e,t){"static"===de(e,"position")&&(e.style.position="relative");var n,o,r=Y(e),a={};for(o in t)t.hasOwnProperty(o)&&(n=parseFloat(de(e,o))||0,a[o]=n+t[o]-r[o]);de(e,a)}(e,t)},isWindow:ie,each:ne,css:de,clone:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);if(e.overflow)for(var o in e)e.hasOwnProperty(o)&&(t.overflow[o]=e.overflow[o]);return t},scrollLeft:function(e,t){if(ie(e)){if(void 0===t)return $(e);window.scrollTo(t,X(e))}else{if(void 0===t)return e.scrollLeft;e.scrollLeft=t}},scrollTop:function(e,t){if(ie(e)){if(void 0===t)return X(e);window.scrollTo($(e),t)}else{if(void 0===t)return e.scrollTop;e.scrollTop=t}},viewportWidth:0,viewportHeight:0},le);function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var fe=function(e){e.preventDefault()};const ge=function(t){var o,r=t.selectedIndex,a=t.scrollIntoView,i=t.searchValue,l=t.onHover,s=t.onSelect,c=t.suggestions,u=void 0===c?[]:c,d=t.instanceId,p=t.__experimentalRenderItem,m=function(e){if(Array.isArray(e))return e}(o=(0,R.useState)(!1))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,r,a,i=[],l=!0,s=!1;try{for(r=(t=t.call(e)).next;!(l=(n=r.call(t)).done)&&(i.push(n.value),2!==i.length);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(s)throw o}}return i}}(o)||function(e){if(e){if("string"==typeof e)return me(e,2);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)?me(e,2):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),f=m[0],g=m[1],_=(0,n.useRefEffect)(function(e){var t;return r>-1&&a&&e.children[r]&&(g(!0),function(e,t,n){n=n||{},9===t.nodeType&&(t=pe.getWindow(t));var o=n.allowHorizontalScroll,r=n.onlyScrollIfNeeded,a=n.alignWithTop,i=n.alignWithLeft,l=n.offsetTop||0,s=n.offsetLeft||0,c=n.offsetBottom||0,u=n.offsetRight||0;o=void 0===o||o;var d,p,m,f,g,_,h,y,b,v,w=pe.isWindow(t),S=pe.offset(e),E=pe.outerHeight(e),C=pe.outerWidth(e);w?(h=t,v=pe.height(h),b=pe.width(h),y={left:pe.scrollLeft(h),top:pe.scrollTop(h)},g={left:S.left-y.left-s,top:S.top-y.top-l},_={left:S.left+C-(y.left+b)+u,top:S.top+E-(y.top+v)+c},f=y):(d=pe.offset(t),p=t.clientHeight,m=t.clientWidth,f={left:t.scrollLeft,top:t.scrollTop},g={left:S.left-(d.left+(parseFloat(pe.css(t,"borderLeftWidth"))||0))-s,top:S.top-(d.top+(parseFloat(pe.css(t,"borderTopWidth"))||0))-l},_={left:S.left+C-(d.left+m+(parseFloat(pe.css(t,"borderRightWidth"))||0))+u,top:S.top+E-(d.top+p+(parseFloat(pe.css(t,"borderBottomWidth"))||0))+c}),g.top<0||_.top>0?!0===a?pe.scrollTop(t,f.top+g.top):!1===a?pe.scrollTop(t,f.top+_.top):g.top<0?pe.scrollTop(t,f.top+g.top):pe.scrollTop(t,f.top+_.top):r||((a=void 0===a||!!a)?pe.scrollTop(t,f.top+g.top):pe.scrollTop(t,f.top+_.top)),o&&(g.left<0||_.left>0?!0===i?pe.scrollLeft(t,f.left+g.left):!1===i?pe.scrollLeft(t,f.left+_.left):g.left<0?pe.scrollLeft(t,f.left+g.left):pe.scrollLeft(t,f.left+_.left):r||((i=void 0===i||!!i)?pe.scrollLeft(t,f.left+g.left):pe.scrollLeft(t,f.left+_.left)))}(e.children[r],e,{onlyScrollIfNeeded:!0}),t=requestAnimationFrame(function(){g(!1)})),function(){void 0!==t&&cancelAnimationFrame(t)}},[r,a]),h=function(e){return function(){f||null==l||l(e)}},y=function(e){return function(){null==s||s(e)}};return React.createElement("ul",{ref:_,className:"codeamp-components-multi-select-control__suggestions-list",id:"".concat(d,"-suggestions"),role:"listbox"},0===u.length&&React.createElement("li",{className:"codeamp-components-multi-select-control__no-suggestions",role:"option"},(0,e.__)("No results found.","codeamp-block-components")),u.map(function(e,t){var n,o=function(e){var t=e.label.toLocaleLowerCase().indexOf(i);return{suggestionBeforeMatch:e.label.substring(0,t),suggestionMatch:e.label.substring(t,t+i.length),suggestionAfterMatch:e.label.substring(t+i.length)}}(e),a=E()("codeamp-components-multi-select-control__suggestion",{"is-selected":t===r});return n="function"==typeof p?p({item:e}):o?React.createElement("span",{"aria-label":e.label},o.suggestionBeforeMatch,React.createElement("strong",{className:"codeamp-components-multi-select-control__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):e.label,React.createElement("li",{id:"".concat(d,"-suggestions-").concat(t),role:"option",className:a,key:e.value,onMouseDown:fe,onClick:y(e),onMouseEnter:h(e),"aria-selected":t===r},n)}))};var _e=o(192),he={};function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ye.apply(null,arguments)}function be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ve(e,t,n){return(t=function(e){var t=function(e){if("object"!=we(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=we(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==we(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){return we="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},we(e)}function Se(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ce(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(o=a.call(n)).done)&&(l.push(o.value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return l}}(e,t)||Ce(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e,t){if(e){if("string"==typeof e)return xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function ke(e){if(""===e)return null;var t=null!=e?e:"";return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find(function(e){return-1!==e.label.toLocaleLowerCase().indexOf(t.trim().toLocaleLowerCase())})}he.styleTagTransform=b(),he.setAttributes=g(),he.insert=m().bind(null,"head"),he.domAPI=d(),he.insertStyleElement=h(),c()(_e.A,he),_e.A&&_e.A.locals&&_e.A.locals;var Te=function(){};function Ae(o){var r=o.autoCapitalize,a=o.autoComplete,i=o.maxLength,l=o.placeholder,s=o.label,c=void 0===s?(0,e.__)("Add item"):s,u=o.help,d=o.className,p=o.suggestions,m=void 0===p?[]:p,f=o.options,g=void 0===f?[]:f,_=o.maxSuggestions,h=void 0===_?100:_,y=o.value,b=void 0===y?[]:y,v=o.onChange,w=void 0===v?function(){}:v,S=o.onInputChange,C=void 0===S?function(){}:S,x=o.onFocus,k=void 0===x?void 0:x,T=(o.isBorderless,o.id),A=o.disabled,q=void 0!==A&&A,P=o.messages,O=void 0===P?{added:(0,e.__)("Item added."),removed:(0,e.__)("Item removed."),remove:(0,e.__)("Remove item"),__experimentalInvalid:(0,e.__)("Invalid item")}:P,I=o.__experimentalRenderItem,L=o.__experimentalAutoSelectFirstMatch,M=void 0===L||L,G=o.__experimentalValidateInput,B=void 0===G?function(){return!0}:G,F=o.__experimentalCloseSuggestionsOnSelect,U=void 0===F||F,H=(0,n.useInstanceId)(Ae,"codeamp-components-multi-select-control");T&&(H=T);var W=Ee((0,R.useState)(""),2),V=W[0],$=W[1],X=Ee((0,R.useState)(0),2),Y=X[0],K=X[1],J=Ee((0,R.useState)(!1),2),Z=J[0],Q=J[1],ee=Ee((0,R.useState)(!1),2),te=ee[0],ne=ee[1],oe=Ee((0,R.useState)(-1),2),re=oe[0],ae=oe[1],ie=Ee((0,R.useState)(!1),2),le=ie[0],se=ie[1],ce=(0,n.usePrevious)(m),ue=(0,n.usePrevious)(b),de=(0,R.useRef)(null),pe=(0,R.useRef)(null),me=(0,n.useDebounce)(D.speak,500);function fe(){var e;null===(e=de.current)||void 0===e||e.focus()}function _e(){var e;return de.current===(null===(e=de.current)||void 0===e?void 0:e.ownerDocument.activeElement)}function he(e){_e()||e.target===pe.current?(Q(!0),ne(!0)):Q(!1),"function"==typeof k&&k(e)}function Ce(e){e.target===pe.current&&Z&&e.preventDefault()}function xe(e){De(e.value),fe()}function qe(e){var t=!1;return _e()&&je()&&(e(),t=!0),t}function Pe(){var e=Me()-1;e>-1&&De(b[e])}function Oe(){var e=Me();e<b.length&&(De(b[e]),function(e){K(b.length-Math.max(e,-1)-1)}(e))}function Re(e){B(e.label)?(function(e){if(Se(new Set(e.filter(function(e){return!function(e){return b.some(function(t){return Ie(e)===Ie(t)})}(e)}))),e.length>0){var t=Se(b);t.splice.apply(t,[Me(),0].concat(Se(e))),w(t)}}([e.value]),(0,D.speak)(O.added,"assertive"),$(""),se(!1),ae(-1),U&&ne(!1),Z&&fe()):(0,D.speak)(O.__experimentalInvalid,"assertive")}function De(e){var t=b.filter(function(t){return Ie(t)!==Ie(e)});w(t),(0,D.speak)(O.removed,"assertive")}function Ie(e){return"object"===we(e)?e.value:e}function Ne(){return g.filter(function(e){return-1===b.indexOf(e.value)})}function Le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne(),n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h;if(""!==e.trim()){var o=[],r=[];t.forEach(function(t){var n=t.label.toLocaleLowerCase().indexOf(e.trim().toLocaleLowerCase());0===n?o.push(t):n>0&&r.push(t)}),t=o.concat(r)}return t.slice(0,n)}function Me(){return b.length-Y}function je(){return 0===V.length}function Ge(){var e;return(null===(e=ke(V))||void 0===e||null===(e=e.label)||void 0===e?void 0:e.length)>0}function Be(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=Le(V),o=n.length>0;t&&(M&&o?(ae(0),se(!0)):(ae(-1),se(!1))),ae(0);var r=o?(0,e.sprintf)((0,e._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",n.length),n.length):(0,e.__)("No results.");me(r,"assertive")}function Fe(e){return g.find(function(t){return t.value===e})||null}(0,R.useEffect)(function(){Z&&!_e()&&fe()},[Z]),(0,R.useEffect)(function(){var e=!N()(m,ce||[]);(e||b!==ue)&&Be(e)},[m,ce,b,ue]),(0,R.useEffect)(function(){Be()},[V]),q&&Z&&(Q(!1),$(""));var ze,Ue,He=E()(d,"codeamp-components-multi-select-control__input-container",{"is-active":Z,"is-disabled":q}),We={className:"components-base-control codeamp-components-multi-select-control",tabIndex:-1},Ve=Le();return q||(We=Object.assign({},We,{onKeyDown:function(e){var t=!1;if(!e.defaultPrevented){switch(e.code){case"Backspace":t=qe(Pe);break;case"Enter":case"Space":t=function(){var e=!1,t=function(){if(-1!==re)return Le()[re]}();return t&&te?(Re(t),e=!0):Ge()&&""!==V.trim()&&(Re(V),e=!0),e}();break;case"ArrowLeft":t=function(){var e=!1;return je()&&(K(function(e){return Math.min(e+1,b.length)}),e=!0),e}();break;case"ArrowUp":t=te?(ae(function(e){return(0===e?Le(V,Ne(),b,h).length:e)-1}),se(!0),!0):(ne(!0),ae(0),se(!0),!0);break;case"ArrowRight":t=function(){var e=!1;return je()&&(K(function(e){return Math.max(e-1,0)}),e=!0),e}();break;case"ArrowDown":t=te?(ae(function(e){return(e+1)%Le(V,Ne(),b,h).length}),se(!0),!0):(ne(!0),ae(0),se(!0),!0);break;case"Delete":t=qe(Oe);break;case"Escape":t=function(e){return e.target instanceof HTMLInputElement&&($(e.target.value),ne(!1),ae(-1),se(!1)),!0}(e)}t&&e.preventDefault()}},onKeyPress:function(e){var t=!1;44===e.charCode&&(Ge()&&Re(V),t=!0),t&&e.preventDefault()},onFocus:he})),React.createElement(t.BaseControl,{id:H,label:c,help:u},React.createElement("div",We,React.createElement("div",{ref:pe,className:He,tabIndex:-1,onMouseDown:Ce,onTouchStart:Ce},React.createElement(t.Flex,{className:"codeamp-components-multi-select-control__tokens-container",justify:"flex-start",align:"flex-start",gap:"4px",wrap:!0,hasTokens:!!b.length},(Ue=[],b.forEach(function(e,n){var o=Fe(e);Fe(e)&&Ue.push(function(e,n){var o=e.value,r=e.label,a=e.onMouseEnter,i=void 0===a?Te:a,l=e.onMouseLeave,s=void 0===l?Te:l,c=e.isBorderless,u=void 0!==c&&c,d=o,p=n+1;return React.createElement(t.FlexItem,{key:"token-"+d},React.createElement(j,{value:d,label:r,title:"string"!=typeof token?r:void 0,onClickRemove:xe,isBorderless:u,onMouseEnter:i,onMouseLeave:s,disabled:q,messages:O,termPosition:p,termsCount:b.length}))}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?be(Object(n),!0).forEach(function(t){ve(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},o),n))}),Ue.splice(Me(),0,(ze={instanceId:H,autoCapitalize:r,autoComplete:a,placeholder:0===b.length?l:"",key:"input",disabled:q,value:V,onBlur:function(){Ge()?Q(!1):($(""),K(0),Q(!1),ne(!1),ae(-1),se(!1))},isExpanded:te,selectedSuggestionIndex:re,onClick:he},React.createElement(z,ye({},ze,{onChange:i&&b.length>=i?void 0:function(e){var t=e.value;$(t),ne(!0),C(t)},ref:de})))),Ue)),te&&React.createElement(ge,{instanceId:H,match:ke(V,g),searchValue:V.trim(),suggestions:Ve,selectedIndex:re,scrollIntoView:le,onHover:function(e){var t=Le().indexOf(e);t>=0&&(ae(t),se(!1))},onSelect:function(e){Re(e)},__experimentalRenderItem:I}))))}})();var a=t;for(var i in r)a[i]=r[i];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})()},133:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var o=(0,r.default)(e),a="function"==typeof t;return o.forEach(function(e){if("declaration"===e.type){var o=e.property,r=e.value;a?t(o,r,e):r&&((n=n||{})[o]=r)}}),n};var r=o(n(788))},141:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(413),i=n(957);r(n(957),t);var l={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,o=new i.Element(e,t,void 0,n);this.addNode(o),this.tagStack.push(o)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},210:(e,t,n)=>{"use strict";function o(e,t,n,o,r,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{r[e]=new o(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{r[e]=new o(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{r[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{r[e]=new o(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{r[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{r[e]=new o(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{r[e]=new o(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{r[e]=new o(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{r[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)});const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(a,i);r[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}),r.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{r[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:l,SAME:s,possibleStandardNames:c}=n(811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((e,t)=>{const n=c[t];return n===s?e[t]=t:n===l?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},229:function(e,t,n){"use strict";var o=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(133)),r=n(917);function a(e,t){var n={};return e&&"string"==typeof e?((0,o.default)(e,function(e,o){e&&o&&(n[(0,r.camelCase)(e,t)]=o)}),n):n}a.default=a,e.exports=a},270:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},308:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var o=[],r="function"==typeof n.replace,c=n.transform||i.returnFirstArg,u=n.library||l,d=u.cloneElement,p=u.createElement,m=u.isValidElement,f=t.length,g=0;g<f;g++){var _=t[g];if(r){var h=n.replace(_,g);if(m(h)){f>1&&(h=d(h,{key:h.key||g})),o.push(c(h,_,g));continue}}if("text"!==_.type){var y=_,b={};s(y)?((0,i.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,a.default)(y.attribs,y.name));var v=void 0;switch(_.type){case"script":case"style":_.children[0]&&(b.dangerouslySetInnerHTML={__html:_.children[0].data});break;case"tag":"textarea"===_.name&&_.children[0]?b.defaultValue=_.children[0].data:_.children&&_.children.length&&(v=e(_.children,n));break;default:continue}f>1&&(b.key=g),o.push(c(p(_.name,b,v),_,g))}else{var w=!_.data.trim().length;if(w&&_.parent&&!(0,i.canTextBeChildOfNode)(_.parent))continue;if(n.trim&&w)continue;o.push(c(_.data,_,g))}}return 1===o.length?o[0]:o};var r=n(609),a=o(n(840)),i=n(958),l={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}},413:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},418:(e,t,n)=>{"use strict";var o=n(609),r=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,n){var o,s={},c=null,u=null;for(o in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!l.hasOwnProperty(o)&&(s[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===s[o]&&(s[o]=t[o]);return{$$typeof:r,type:e,key:c,ref:u,props:s,_owner:i.current}}},442:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||s),t):[]};var r=o(n(471));t.htmlToDOM=r.default;var a=o(n(840));t.attributesToProps=a.default;var i=o(n(308));t.domToReact=i.default;var l=n(141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return l.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return l.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return l.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return l.Text}});var s={lowerCaseAttributeNames:!1}},471:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(i),n=t?t[1]:void 0;return(0,a.formatDOM)((0,r.default)(e),null,n)};var r=o(n(496)),a=n(731),i=/<(![a-zA-Z\s]+)>/},496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,p=(e=(0,o.escapeSpecialCharacters)(e)).match(l),m=p&&p[1]?p[1].toLowerCase():"";switch(m){case r:var f=d(e);return s.test(e)||null===(t=null==(h=f.querySelector(a))?void 0:h.parentNode)||void 0===t||t.removeChild(h),c.test(e)||null===(n=null==(h=f.querySelector(i))?void 0:h.parentNode)||void 0===n||n.removeChild(h),f.querySelectorAll(r);case a:case i:var _=u(e).querySelectorAll(m);return c.test(e)&&s.test(e)?_[0].parentNode.childNodes:_;default:return g?g(e):(h=u(e,i).querySelector(i)).childNodes;var h}};var o=n(731),r="html",a="head",i="body",l=/<([a-zA-Z]+[0-9]?)/,s=/<head[^]*>/i,c=/<body[^]*>/i,u=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},p="object"==typeof window&&window.DOMParser;if("function"==typeof p){var m=new p;u=d=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),m.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();u=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var g,_="object"==typeof document&&document.createElement("template");_&&_.content&&(g=function(e){return _.innerHTML=e,_.content.childNodes})},609:e=>{"use strict";e.exports=window.React},706:(e,t,n)=>{"use strict";e.exports=n(418)},731:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=a,t.escapeSpecialCharacters=function(e){return e.replace(r.CARRIAGE_RETURN_REGEX,r.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=l,t.formatDOM=function e(t,n,r){void 0===n&&(n=null);for(var s,c=[],u=0,d=t.length;u<d;u++){var p=t[u];switch(p.nodeType){case 1:var m=i(p.nodeName);(s=new o.Element(m,a(p.attributes))).children=e("template"===m?p.content.childNodes:p.childNodes,s);break;case 3:s=new o.Text(l(p.nodeValue));break;case 8:s=new o.Comment(p.nodeValue);break;default:continue}var f=c[u-1]||null;f&&(f.next=s),s.parent=n,s.prev=f,s.next=null,c.push(s)}return r&&((s=new o.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=c[0]||null,s.parent=n,c.unshift(s),c[1]&&(c[1].prev=c[0])),c};var o=n(141),r=n(270);function a(e){for(var t={},n=0,o=e.length;n<o;n++){var r=e[n];t[r.name]=r.value}return t}function i(e){return function(e){return r.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function l(e){return e.replace(r.CARRIAGE_RETURN_PLACEHOLDER_REGEX,r.CARRIAGE_RETURN)}},788:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,o=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var d=1,p=1;function m(e){var t=e.match(n);t&&(d+=t.length);var o=e.lastIndexOf("\n");p=~o?e.length-o:p+e.length}function f(){var e={line:d,column:p};return function(t){return t.position=new g(e),b(),t}}function g(e){this.start=e,this.end={line:d,column:p},this.source=s.source}g.prototype.content=e;var _=[];function h(t){var n=new Error(s.source+":"+d+":"+p+": "+t);if(n.reason=t,n.filename=s.source,n.line=d,n.column=p,n.source=e,!s.silent)throw n;_.push(n)}function y(t){var n=t.exec(e);if(n){var o=n[0];return m(o),e=e.slice(o.length),n}}function b(){y(o)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return h("End of comment missing");var o=e.slice(2,n-2);return p+=2,m(o),e=e.slice(n),p+=2,t({type:"comment",comment:o})}}function S(){var e=f(),n=y(r);if(n){if(w(),!y(a))return h("property missing ':'");var o=y(i),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:o?u(o[0].replace(t,c)):c});return y(l),s}}return b(),function(){var e,t=[];for(v(t);e=S();)!1!==e&&(t.push(e),v(t));return t}()}},811:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},840:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&l[e.type]);for(var u in e){var d=e[u];if((0,o.isCustomAttribute)(u))n[u]=d;else{var p=u.toLowerCase(),m=s(p);if(m){var f=(0,o.getPropertyInfo)(m);switch(a.includes(m)&&i.includes(t)&&!c&&(m=s("default"+p)),n[m]=d,f&&f.type){case o.BOOLEAN:n[m]=!0;break;case o.OVERLOADED_BOOLEAN:""===d&&(n[m]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,r.setStyleProp)(e.style,n),n};var o=n(210),r=n(958),a=["checked","value"],i=["input","select","textarea"],l={reset:!0,submit:!0};function s(e){return o.possibleStandardNames[e]}},917:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,o=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,l=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,s):e.replace(a,s)).replace(o,l))}},957:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var i=n(413),l=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var s=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=s;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Text,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(s);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Comment,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(s);t.Comment=u;var d=function(e){function t(t,n){var o=e.call(this,n)||this;return o.name=t,o.type=i.ElementType.Directive,o}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(s);t.ProcessingInstruction=d;var p=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var g=function(e){function t(t,n,o,r){void 0===o&&(o=[]),void 0===r&&(r="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,o)||this;return a.name=t,a.attribs=n,a.type=r,a}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,o;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(o=e["x-attribsPrefix"])||void 0===o?void 0:o[t]}})},enumerable:!1,configurable:!0}),t}(p);function _(e){return(0,i.isTag)(e)}function h(e){return e.type===i.ElementType.CDATA}function y(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function v(e){return e.type===i.ElementType.Directive}function w(e){return e.type===i.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),y(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(_(e)){var o=t?E(e.children):[],r=new g(e.name,a({},e.attribs),o);o.forEach(function(e){return e.parent=r}),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=r}else if(h(e)){o=t?E(e.children):[];var i=new m(o);o.forEach(function(e){return e.parent=i}),n=i}else if(w(e)){o=t?E(e.children):[];var l=new f(o);o.forEach(function(e){return e.parent=l}),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!v(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new d(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map(function(e){return S(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=g,t.isTag=_,t.isCDATA=h,t.isText=y,t.isComment=b,t.isDirective=v,t.isDocument=w,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},958:function(e,t,n){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,l)}catch(e){t.style={}}else t.style={}};var r=n(609),a=o(n(229)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),l={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(609);const t=window.wp.domReady;var o=n.n(t);const r=window.wp.element,a=window.wp.data,i=window.wp.i18n;var l=n(442);const s=l.default||l,c=window.wp.components,u=window.wp.apiFetch;var d=n.n(u);const p={enabled:"yes",title:(0,i.__)("Credit Card","woocommerce-square"),description:(0,i.__)("Pay securely using your credit card.","woocommerce-square"),transaction_type:"charge",charge_virtual_orders:"no",enable_paid_capture:"no",card_types:["VISA","MC","AMEX","DISC","DINERS","JCB","UNIONPAY"],tokenization:"no"},m={enable_digital_wallets:"yes",digital_wallets_button_type:"buy",digital_wallets_apple_pay_button_color:"black",digital_wallets_google_pay_button_color:"black",digital_wallets_hide_button_options:[]},f={enabled:"no",title:(0,i.__)("Square Gift Cards","woocommerce-square"),is_default_placeholder:"no",placeholder_id:0,description:(0,i.__)("Allow customers to purchase and redeem gift cards during checkout.","woocommerce-square")},g={enabled:"no",title:(0,i.__)("Cash App Pay","woocommerce-square"),description:(0,i.__)("Pay securely using Cash App Pay.","woocommerce-square"),transaction_type:"charge",charge_virtual_orders:"no",enable_paid_capture:"no",button_theme:"dark",button_shape:"semiround"},_={enable_sandbox:"no",sandbox_application_id:"",sandbox_token:"",sandbox_location_id:"",production_location_id:"",system_of_record:"disabled",enable_inventory_sync:"no",override_product_images:"no",hide_missing_products:"no",sync_interval:"0.25",is_connected:!1,disconnection_url:"",access_tokens:[],connection_url:"",connection_url_wizard:"",connection_url_sandbox:"",locations:[],enable_customer_decline_messages:"no",debug_mode:"off",debug_logging_enabled:"no",enable_order_fulfillment_sync:"no"},h={squareSettingsIsSaving:!1,creditCardSettingsIsSaving:!1,cashAppSettingsIsSaving:!1,giftCardsSettingsIsSaving:!1},y={step:"connect-square",backStep:""},b={creditCard:(e=p,t)=>"SET_CREDIT_CARD_DATA"===t.type?{...e,...t.payload}:e,digitalWallet:(e=m,t)=>"SET_DIGITAL_WALLETS_DATA"===t.type?{...e,...t.payload}:e,giftCard:(e=f,t)=>"SET_GIFT_CARD_DATA"===t.type?{...e,...t.payload}:e,cashApp:(e=g,t)=>"SET_CASH_APP_DATA"===t.type?{...e,...t.payload}:e,squareSettings:(e=_,t)=>"SET_SQUARE_SETTING_DATA"===t.type?{...e,...t.payload}:e,savingProcessStatus:(e=h,t)=>{switch(t.type){case"SET_SQUARE_SETTING_PROCESS_STATUS":return{...e,squareSettingsIsSaving:t.payload};case"SET_CREDIT_CARD_SETTING_PROCESS_STATUS":return{...e,creditCardSettingsIsSaving:t.payload};case"SET_CASH_APP_PROCESS_STATUS":return{...e,cashAppSettingsIsSaving:t.payload};case"SET_GIFT_CARDS_PROCESS_STATUS":return{...e,giftCardsSettingsIsSaving:t.payload};default:return e}},step:(e=y,t)=>{switch(t.type){case"SET_STEP":return{...e,step:t.payload};case"SET_BACK_STEP":return{...e,backStep:t.payload};default:return e}}},v=(0,a.createReduxStore)("woo-square/onboarding",{reducer:(0,a.combineReducers)(b),actions:{setCreditCardData:e=>({type:"SET_CREDIT_CARD_DATA",payload:e}),setDigitalWalletData:e=>({type:"SET_DIGITAL_WALLETS_DATA",payload:e}),setGiftCardData:e=>({type:"SET_GIFT_CARD_DATA",payload:e}),setCashAppData:e=>({type:"SET_CASH_APP_DATA",payload:e}),setSquareSettings:e=>({type:"SET_SQUARE_SETTING_DATA",payload:e}),setSquareSettingsSavingProcess:e=>({type:"SET_SQUARE_SETTING_PROCESS_STATUS",payload:e}),setCreditCardSettingsSavingProcess:e=>({type:"SET_CREDIT_CARD_SETTING_PROCESS_STATUS",payload:e}),setCashAppSettingsSavingProcess:e=>({type:"SET_CASH_APP_PROCESS_STATUS",payload:e}),setGiftCardsSettingsSavingProcess:e=>({type:"SET_GIFT_CARDS_PROCESS_STATUS",payload:e}),setStep:e=>({type:"SET_STEP",payload:e}),setBackStep:e=>({type:"SET_BACK_STEP",payload:e})},selectors:{getCreditCardData:(e,t)=>t&&e.creditCard[t]||e.creditCard,getDigitalWalletData:(e,t)=>t&&e.digitalWallet[t]||e.digitalWallet,getGiftCardData:(e,t)=>t&&e.giftCard[t]||e.giftCard,getCashAppData:(e,t)=>t&&e.cashApp[t]||e.cashApp,getSquareSettings:(e,t)=>t&&e.squareSettings[t]||e.squareSettings,getSquareSettingsSavingProcess:e=>e.savingProcessStatus.squareSettingsIsSaving,getCreditCardSettingsSavingProcess:e=>e.savingProcessStatus.creditCardSettingsIsSaving,getCashAppSettingsSavingProcess:e=>e.savingProcessStatus.cashAppSettingsIsSaving,getGiftCardsSettingsSavingProcess:e=>e.savingProcessStatus.giftCardsSettingsIsSaving,getStep:e=>e.step.step,getBackStep:e=>e.step.backStep}}),w=(e=[])=>e.filter(e=>"ACTIVE"===e.status).map(e=>({label:e.name,value:e.id})),S=(e=!1)=>{const t=(0,a.useDispatch)(),[n,o]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1),[s,c]=(0,r.useState)(!1),u=e=>(0,a.useSelect)(t=>t(v).getCreditCardData(e)),_=e=>(0,a.useSelect)(t=>t(v).getDigitalWalletData(e)),h=e=>(0,a.useSelect)(t=>t(v).getGiftCardData(e)),y=e=>(0,a.useSelect)(t=>t(v).getCashAppData(e)),b=e=>t(v).setCreditCardData(e),w=e=>t(v).setDigitalWalletData(e),S=e=>t(v).setGiftCardData(e),E=e=>t(v).setCashAppData(e),C=e=>t(v).setCreditCardSettingsSavingProcess(e),x=e=>t(v).setCashAppSettingsSavingProcess(e),k=e=>t(v).setGiftCardsSettingsSavingProcess(e),T=(0,a.useSelect)(e=>e(v).getCreditCardSettingsSavingProcess(undefined));const A=(0,a.useSelect)(e=>e(v).getCashAppSettingsSavingProcess(void 0)),q=(0,a.useSelect)(e=>e(v).getGiftCardsSettingsSavingProcess(void 0)),P={...u(),..._()},O={...h()},R={...y()};return(0,r.useEffect)(()=>{if(!e)return o(!0),c(!0),void l(!0);(async()=>{if(!n){const{creditCard:e,digitalWallet:t}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/payment_settings"});return{creditCard:{enabled:e.enabled||p.enabled,title:e.title||p.title,description:e.description||p.description,transaction_type:e.transaction_type||p.transaction_type,charge_virtual_orders:e.charge_virtual_orders||p.charge_virtual_orders,enable_paid_capture:e.enable_paid_capture||p.enable_paid_capture,card_types:e.card_types||p.card_types,tokenization:e.tokenization||p.tokenization},digitalWallet:{enable_digital_wallets:e.enable_digital_wallets||m.enable_digital_wallets,digital_wallets_button_type:e.digital_wallets_button_type||m.digital_wallets_button_type,digital_wallets_apple_pay_button_color:e.digital_wallets_apple_pay_button_color||m.digital_wallets_apple_pay_button_color,digital_wallets_google_pay_button_color:e.digital_wallets_google_pay_button_color||m.digital_wallets_google_pay_button_color,digital_wallets_hide_button_options:e.digital_wallets_hide_button_options||m.digital_wallets_hide_button_options}}})();b(e),w(t),o(!0)}if(!s){const{giftCard:e}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/gift_cards_settings"});return{giftCard:{enabled:e.enabled||f.enabled,is_default_placeholder:e.is_default_placeholder||f.is_default_placeholder,placeholder_id:e.placeholder_id||f.placeholder_id}}})();S(e),c(!0)}})()},[e]),(0,r.useEffect)(()=>{e?(async()=>{const{cashApp:e}=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/cash_app_settings"});return{cashApp:{enabled:e.enabled||g.enabled,title:e.title||g.title,description:e.description||g.description,transaction_type:e.transaction_type||g.transaction_type,charge_virtual_orders:e.charge_virtual_orders||g.charge_virtual_orders,enable_paid_capture:e.enable_paid_capture||g.enable_paid_capture,button_theme:e.button_theme||g.button_theme,button_shape:e.button_shape||g.button_shape}}})();i||(E(e),l(!0))})():l(!0)},[e]),{isPaymentGatewaySettingsSaving:T,isCashAppGatewaySettingsSaving:A,isGiftCardsGatewaySettingsSaving:q,paymentGatewaySettings:P,cashAppGatewaySettings:R,giftCardsGatewaySettings:O,paymentGatewaySettingsLoaded:n,cashAppGatewaySettingsLoaded:i,giftCardsGatewaySettingsLoaded:s,getCreditCardData:u,getDigitalWalletData:_,getGiftCardData:h,getCashAppData:y,setCreditCardData:b,setDigitalWalletData:w,setGiftCardData:S,setCashAppData:E,savePaymentGatewaySettings:async()=>{C(!0);const e=await d()({path:"/wc/v3/wc_square/payment_settings",method:"POST",data:P});return C(null),await new Promise(e=>setTimeout(e,1e3)),C(!1),e},saveGiftCardsSettings:async()=>{k(!0);const e=await d()({path:"/wc/v3/wc_square/gift_cards_settings",method:"POST",data:O});return k(null),await new Promise(e=>setTimeout(e,1e3)),k(!1),e},saveCashAppSettings:async()=>{x(!0);const e=await d()({path:"/wc/v3/wc_square/cash_app_settings",method:"POST",data:R});return x(null),await new Promise(e=>setTimeout(e,1e3)),x(!1),e}}},E=window.wc.tracks,C=({children:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section"},t),x=({title:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section-title heading_1"},t),k=({children:t})=>(0,e.createElement)("div",{className:"woo-square-setting__section-description"},t),T=({label:t,children:n,description:o,variant:r,indent:a=0,className:i=""})=>{if("boxed"===r)return(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper woo-square-setting__input-wrapper--boxed "+i},(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper--boxed-bg"},(0,e.createElement)("div",{className:"woo-square-setting__input-label"},t),(0,e.createElement)("div",{className:"woo-square-setting__input-field"},n)),(0,e.createElement)("div",{className:"woo-square-setting__input-description"},o));const l={marginLeft:16*a+"px"};return(0,e.createElement)("div",{className:"woo-square-setting__input-wrapper "+i,style:l},t&&(0,e.createElement)("div",{className:"woo-square-setting__input-label"},t),n,o&&(0,e.createElement)("div",{className:"woo-square-setting__input-description"},o))},A=t=>{const{label:n,...o}=t;return(0,e.createElement)("div",{className:"woo-square-setting__input-field--checkbox"},(0,e.createElement)(c.CheckboxControl,{...o}),(0,e.createElement)("div",{className:"woo-square-setting__input-field--checkbox-label"},n))},q=window.wp.primitives;var P=n(706);const O=(0,P.jsx)(q.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,P.jsx)(q.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})}),R=(e=!1)=>{const t=(0,a.useDispatch)(),[n,o]=(0,r.useState)(!1),i=e=>(0,a.useSelect)(t=>t(v).getSquareSettings(e)),l=e=>t(v).setSquareSettings(e),s=e=>t(v).setSquareSettingsSavingProcess(e),c=(e=[])=>{l({locations:w(e)})},u=i(),p=(0,a.useSelect)(e=>e(v).getSquareSettingsSavingProcess());return(0,r.useEffect)(()=>{e?(async()=>{if(!n){const e=await(async()=>{const e=await d()({path:"/wc/v3/wc_square/settings"});return{enable_sandbox:e.enable_sandbox||_.enable_sandbox,sandbox_application_id:e.sandbox_application_id||_.sandbox_application_id,sandbox_token:e.sandbox_token||_.sandbox_token,production_location_id:e.production_location_id||_.production_location_id,sandbox_location_id:e.sandbox_location_id||_.sandbox_location_id,system_of_record:e.system_of_record||_.system_of_record,enable_inventory_sync:e.enable_inventory_sync||_.enable_inventory_sync,override_product_images:e.override_product_images||_.override_product_images,hide_missing_products:e.hide_missing_products||_.hide_missing_products,sync_interval:e.sync_interval||_.sync_interval,is_connected:e.is_connected||_.is_connected,disconnection_url:e.disconnection_url||_.disconnection_url,access_tokens:e.access_tokens||_.access_tokens,connection_url:e.connection_url||_.connection_url,connection_url_wizard:e.connection_url_wizard||_.connection_url_wizard,connection_url_sandbox:e.connection_url_sandbox||_.connection_url_sandbox,locations:e.locations||_.locations,enable_customer_decline_messages:e.enable_customer_decline_messages||_.enable_customer_decline_messages,debug_mode:e.debug_mode||_.debug_mode,debug_logging_enabled:e.debug_logging_enabled||_.debug_logging_enabled,enable_order_fulfillment_sync:e.enable_order_fulfillment_sync||_.enable_order_fulfillment_sync}})();l(e),c(e.locations),o(!0)}})():o(!0)},[e]),{settings:u,squareSettingsLoaded:n,isSquareSettingsSaving:p,getSquareSettingData:i,setSquareSettingData:l,setBusinessLocation:c,saveSquareSettings:async()=>{s(!0);const e=await d()({path:"/wc/v3/wc_square/settings",method:"POST",data:u});return s(null),await new Promise(e=>setTimeout(e,1e3)),s(!1),e}}},D=(I=c.Button,t=>{const{label:n=(0,i.__)("Apply Changes","woocommerce-square")}=t,{afterSaveLabel:o=(0,i.__)("Changes Saved!","woocommerce-square"),afterSaveCallback:r,icon:a=O,...l}=t,{isSquareSettingsSaving:s,settings:c,saveSquareSettings:u}=R();return(0,e.createElement)(I,{"data-testid":"square-settings-save-button",...null===s&&{icon:a},isBusy:s,variant:"button-primary",className:"button-primary",onClick:()=>{(async()=>{const e=document.querySelectorAll("[required]");let t=!0;e.forEach(e=>{e.value?e.classList.remove("required-error"):(e.classList.add("required-error"),t=!1)}),t&&(await u(c),r&&r())})()},...l},null===s?o:n)});var I;const N=(t=>n=>{const{label:o=(0,i.__)("Apply Changes","woocommerce-square"),afterSaveLabel:r=(0,i.__)("Changes Saved!","woocommerce-square"),onClick:a}=n,{isPaymentGatewaySettingsSaving:l,isGiftCardsGatewaySettingsSaving:s,isCashAppGatewaySettingsSaving:c}=S(),u=null===l||null===s||null===c,d=[l,s,c].some(e=>e);return(0,e.createElement)(t,{"data-testid":"payment-gateway-settings-save-button",...n,...u&&{icon:O},isBusy:d,variant:"button-primary",className:"button-primary",onClick:()=>a()},u?r:o)})(c.Button),L=()=>(0,e.createElement)("div",{className:"woo-square-loader"},(0,e.createElement)(c.Spinner,null)),M=({indent:t=0,isDirty:n=!1,showViewProgressButton:o=!0})=>{const{settings:a,squareSettingsLoaded:l,setSquareSettingData:u}=R(),[p,m]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[_,h]=(0,r.useState)(!1),[y,b]=(0,r.useState)(""),v=()=>g(!1),{system_of_record:w="disabled",enable_inventory_sync:S="no",override_product_images:q="no",hide_missing_products:P="no",sync_interval:O="0.25",is_connected:D=!1,enable_order_fulfillment_sync:I="no"}=a,N=[{label:(0,i.__)("15 minutes","woocommerce-square"),value:"0.25"},{label:(0,i.__)("30 minutes","woocommerce-square"),value:"0.5"},{label:(0,i.__)("45 minutes","woocommerce-square"),value:"0.75"},{label:(0,i.__)("1 hour","woocommerce-square"),value:"1"},{label:(0,i.__)("2 hours","woocommerce-square"),value:"2"},{label:(0,i.__)("3 hours","woocommerce-square"),value:"3"},{label:(0,i.__)("6 hours","woocommerce-square"),value:"6"},{label:(0,i.__)("8 hours","woocommerce-square"),value:"8"},{label:(0,i.__)("12 hours","woocommerce-square"),value:"12"},{label:(0,i.__)("24 hours","woocommerce-square"),value:"24"}];return l?(0,e.createElement)(e.Fragment,null,D&&(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Configure Sync Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Choose how you want your product data to flow between WooCommerce and Square to keep your inventory and listings perfectly aligned. Select from the options below to best match your business operations:","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Sync Settings","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation, %3$s and %4$s are placeholders for the link to the support forum */ /* translators: %1$s and %2$s are placeholders for the link to the documentation, %3$s and %4$s are placeholders for the link to the support forum */ (0,i.__)("Choose where data will be updated for synced products. Inventory in Square is always checked for adjustments when sync is enabled. %1$sLearn more%2$s about choosing a system of record or %3$screate a ticket%4$s if you're experiencing technical issues.","woocommerce-square"),'<a href="https://woocommerce.com/document/woocommerce-square/#section-8" target="_blank">',"</a>",'<a href="https://wordpress.org/support/plugin/woocommerce-square/" target="_blank">',"</a>"))},(0,e.createElement)(c.SelectControl,{"data-testid":"sync-settings-field",value:w,onChange:e=>u({system_of_record:e}),options:[{label:(0,i.__)("Disabled","woocommerce-square"),value:"disabled"},{label:(0,i.__)("Square","woocommerce-square"),value:"square"},{label:(0,i.__)("WooCommerce","woocommerce-square"),value:"woocommerce"}]})),"woocommerce"===w&&(0,e.createElement)(T,{label:(0,i.__)("Sync Inventory","woocommerce-square"),indent:t,description:s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the strong tag */ /* translators: %1$s and %2$s are placeholders for the strong tag */ (0,i.__)("Inventory is %1$salways fetched from Square%2$s periodically to account for sales from other channels.","woocommerce-square"),"<strong>","</strong>"))},(0,e.createElement)(A,{"data-testid":"push-inventory-field",checked:"yes"===S,onChange:e=>u({enable_inventory_sync:e?"yes":"no"}),label:(0,i.__)("Enable to push inventory changes to Square","woocommerce-square")})),"square"===w&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sync Inventory","woocommerce-square"),indent:t,description:(0,i.__)("Inventory is fetched from Square periodically and updated in WooCommerce.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"pull-inventory-field",checked:"yes"===S,onChange:e=>u({enable_inventory_sync:e?"yes":"no"}),label:(0,i.__)("Enable to fetch inventory changes from Square","woocommerce-square")})),(0,e.createElement)(T,{label:(0,i.__)("Override product images","woocommerce-square"),indent:t,description:(0,i.__)("Product images that have been updated in Square will also be updated within WooCommerce during a sync.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"override-images-field",checked:"yes"===q,onChange:e=>u({override_product_images:e?"yes":"no"}),label:(0,i.__)("Enable to override Product images from Square","woocommerce-square")})),(0,e.createElement)(T,{label:(0,i.__)("Handle missing products","woocommerce-square"),indent:t,description:(0,i.__)("Products not found in Square will be hidden in the WooCommerce product catalog.","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"hide-missing-products-field",checked:"yes"===P,onChange:e=>u({hide_missing_products:e?"yes":"no"}),label:(0,i.__)("Hide synced products when not found in Square","woocommerce-square")}))),("woocommerce"===w||"square"===w)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sync interval","woocommerce-square"),description:(0,i.__)("Frequency for how regularly WooCommerce will sync products with Square.","woocommerce-square"),indent:t},(0,e.createElement)(c.SelectControl,{"data-testid":"sync-interval-field",value:O,options:N,onChange:e=>u({sync_interval:e})})),(0,e.createElement)(T,{label:(0,i.__)("Import Products","woocommerce-square"),indent:t,className:"import-products-wrapper"},(0,e.createElement)(c.Button,{"data-testid":"import-products-button",variant:"secondary",className:"import-square-products-react",onClick:()=>g(!0),style:{display:y?"none":"block"},disabled:n},(0,i.__)("Import all Products from Square","woocommerce-square")),n&&(0,e.createElement)("p",null,(0,i.__)("You have made changes to the settings. Please save the changes to enable the button.","woocommerce-square")),(0,e.createElement)("div",{className:"import-notice notice notice-info is-dismissible",style:{display:y?"block":"none",padding:"10px"}},y,y&&o&&(0,e.createElement)("div",{style:{marginTop:"10px"}},(0,e.createElement)("a",{href:`${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=square§ion=update`,className:"button button-primary"},(0,i.__)("View Progress →","woocommerce-square"))))),f&&(0,e.createElement)(c.Modal,{title:"Import Products From Square",size:"large",onRequestClose:v},(0,e.createElement)("div",{className:"import-modal-cover"},(0,e.createElement)("div",{className:"import-modal-content"},(0,e.createElement)("p",null,(0,i.__)("You are about to import all new products, variations and categories from Square. This will create a new product in WooCommerce for every product retrieved from Square. If you have products in the trash from the previous imports, these will be ignored in the import.","woocommerce-square")," "),(0,e.createElement)("h3",null,(0,i.__)("Do you wish to import existing product updates from Square?","woocommerce-square")," "),(0,e.createElement)("p",null,s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation */ /* translators: %1$s and %2$s are placeholders for the link to the documentation */ (0,i.__)("Doing so will update existing WooCommerce products with the latest information from Square. %1$sView Documentation%2$s.","woocommerce-square"),'<a href="https://woocommerce.com/document/woocommerce-square/#section-8" target="_blank">',"</a>"))),(0,e.createElement)(c.CheckboxControl,{"data-testid":"update-during-import-field",checked:p,onChange:e=>m(e),label:(0,i.__)("Update existing products during import.","woocommerce-square")})),(0,e.createElement)("div",{className:"import-buttons"},(0,e.createElement)(c.Button,{variant:"secondary",onClick:v},(0,i.__)("Cancel","woocommerce-square")),(0,e.createElement)(c.Button,{"data-testid":"import-products-button-confirm",variant:"button-primary",className:"button-primary",onClick:()=>{h(!0),(async()=>{const e=await d()({path:"/wc/v3/wc_square/import-products",method:"POST",data:{update_during_import:p,api_callback:!0}});v(),h(!1),b(e.data)})(),((e="",t={})=>{const{eventName:n,allProperties:o}=((e="",t={})=>({eventName:`woocommerce_square_${e}`,allProperties:{...t,plugin_version:wcSquareOnboarding.plugin_version,is_mobile:wcSquareOnboarding.is_mobile}}))(e,t);(0,E.recordEvent)(n,o)})("product_import_started")},isBusy:_},(0,i.__)("Import Products","woocommerce-square")))))),(0,e.createElement)(T,{label:(0,i.__)("Order Fulfillment Sync","woocommerce-square"),description:(0,i.__)("Enable bidirectional fulfillment synchronization between WooCommerce and Square orders. This will sync fulfillment status changes from Square back to WooCommerce and include fulfillment data when creating new orders.","woocommerce-square"),indent:t},(0,e.createElement)(A,{"data-testid":"order-fulfillment-sync-field",checked:"yes"===I,onChange:e=>u({enable_order_fulfillment_sync:e?"yes":"no"}),label:(0,i.__)("Enable bidirectional order fulfillment sync","woocommerce-square")}))))):null},j=()=>{const{settings:t,squareSettingsLoaded:n,setSquareSettingData:o}=R(),{stepData:{step:l}}=((e=!1)=>{const t=(0,a.useDispatch)(),n=e=>(0,a.useSelect)(t=>t(v).getStep(e)),o=e=>(0,a.useSelect)(t=>t(v).getBackStep(e)),i=e=>t(v).setStep(e),l=e=>t(v).setBackStep(e),s={step:n(),backStep:o()};return(0,r.useEffect)(()=>{e&&(i(localStorage.getItem("step")||s.step),l(localStorage.getItem("backStep")||s.stepData))},[e]),{stepData:s,getStep:n,getBackStep:o,setStep:i,setBackStep:l}})(),{enable_customer_decline_messages:u,debug_logging_enabled:d="no"}=t;return n?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Advanced Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Adjust these options to provide your customers with additional clarity and troubleshoot any issues more effectively.","woocommerce-square"),(0,e.createElement)("br",null),"advanced-settings"===l&&s((0,i.sprintf)(/* translators: %1$s and %2$s are HTML tags for the link to the Square settings page */ /* translators: %1$s and %2$s are HTML tags for the link to the Square settings page */ (0,i.__)("%1$sClick here%2$s to further refine your settings in the traditional view.","woocommerce-square"),`<a href='${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=square'>`,"</a>"))),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Detailed Decline Messages","woocommerce-square")},(0,e.createElement)(A,{checked:"yes"===u,onChange:e=>o({enable_customer_decline_messages:e?"yes":"no"}),label:(0,i.__)("Show detailed decline messages to the customer during checkout rather than a generic decline message.","woocommerce-square")})),(0,e.createElement)(B,null),(0,e.createElement)(T,{label:(0,i.__)("Enable Logging","woocommerce-square"),variant:"boxed",description:s((0,i.sprintf)(/* translators: %1$s and %2$s are HTML tags for the link to the WooCommerce status log */ /* translators: %1$s and %2$s are HTML tags for the link to the WooCommerce status log */ (0,i.__)("Log debug messages to the %1$sWooCommerce status log%2$s","woocommerce-square"),`<a href="${wcSquareSettings.adminUrl}admin.php?page=wc-status&tab=logs">`,"</a>"))},(0,e.createElement)(c.ToggleControl,{checked:"yes"===d,onChange:e=>o({debug_logging_enabled:e?"yes":"no"})}))))):null},G=({indent:t=0,showToggle:n=!0})=>{const{settings:o,squareSettingsLoaded:r,setSquareSettingData:a}=R(),{enable_sandbox:l="no",sandbox_application_id:u="",sandbox_token:d=""}=o;return r?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,n&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(x,{title:(0,i.__)("Configure Sandbox Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Activate Sandbox Mode to safely simulate transactions and sync operations, ensuring your WooCommerce/Square integration functions seamlessly. Experiment with payment methods and product data syncing in a risk-free environment before going live with your store.","woocommerce-square"))),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},n&&(0,e.createElement)(T,{label:(0,i.__)("Enable Sandbox Mode","woocommerce-square"),description:(0,i.__)("After enabling you'll see a new Sandbox settings section with two fields: Sandbox Application ID & Sandbox Access Token.","woocommerce-square"),variant:"boxed"},(0,e.createElement)(c.ToggleControl,{className:"enable-sandbox-mode-field",checked:"yes"===l,onChange:e=>a({enable_sandbox:e?"yes":"no"})})),"yes"===l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Sandbox Application ID","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ (0,i.__)("Application ID for the Sandbox Application, see the details in the %1$sMy Applications%2$s section.","woocommerce-square"),'<a target="_blank" href="https://developer.squareup.com/console/en/apps">',"</a>")),indent:t},(0,e.createElement)(c.TextControl,{required:!0,"data-testid":"sandbox-application-id-field",value:u,onChange:e=>a({sandbox_application_id:e})})),(0,e.createElement)(T,{label:(0,i.__)("Sandbox Access Token","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ /* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */ (0,i.__)("Access Token for the Sandbox Test Account, see the details in the %1$sSandbox Test Account%2$s section. Make sure you use the correct Sandbox Access Token for your application. For a given Sandbox Test Account, each Authorized Application is assigned a different Access Token.","woocommerce-square"),'<a target="_blank" href="https://developer.squareup.com/console/en/sandbox-test-accounts">',"</a>")),indent:t},(0,e.createElement)(c.TextControl,{required:!0,"data-testid":"sandbox-token-field",value:d,onChange:e=>a({sandbox_token:e})})))))):null},B=()=>{const{settings:t,setSquareSettingData:n}=R(),{debug_mode:o}=t;return(0,e.createElement)(T,{label:(0,i.__)("Debug Mode","woocommerce-square")},(0,e.createElement)(c.SelectControl,{value:o,onChange:e=>n({debug_mode:e}),options:[{label:(0,i.__)("Off","woocommerce-square"),value:"off"},{label:(0,i.__)("Show on Checkout Page","woocommerce-square"),value:"checkout"},{label:(0,i.__)("Save to Log","woocommerce-square"),value:"log"},{label:(0,i.__)("Both","woocommerce-square"),value:"both"}]}))},F=()=>{const{settings:t,isSquareSettingsSaving:n,squareSettingsLoaded:o,setSquareSettingData:a,saveSquareSettings:l}=R(!0),[u,d]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),f=(0,r.useRef)(null),{enable_sandbox:g="no",sandbox_location_id:_="",production_location_id:h="",is_connected:y=!1,connection_url:b="",disconnection_url:v="",access_tokens:w=[],locations:S=[]}=t,E="yes"===g?_:h;return(0,r.useEffect)(()=>{o&&(d(t),f.current="no"===g)},[o]),(0,r.useEffect)(()=>{!1!==u&&m(!Object.keys(u).every(e=>u[e]===t[e]))},[t]),(0,r.useEffect)(()=>{null===n&&(d(t),m(!1))},[n]),o?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(x,{title:(0,i.__)("Connect to Square","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Activate Square integration to securely manage and process transactions for your WooCommerce store. Choose between connecting to a live production account for real transactions or a sandbox account for testing purposes. This setup ensures your payment processing is seamless, whether you are in a development stage or ready to go live.","woocommerce-square")),(0,e.createElement)(T,{label:(0,i.__)("Environment Selection","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"environment-selection-field",required:!0,value:g,onChange:e=>{a({enable_sandbox:e})},options:[{label:(0,i.__)("Please choose an environment","woocommerce-square"),value:""},{label:(0,i.__)("Production","woocommerce-square"),value:"no"},{label:(0,i.__)("Sandbox","woocommerce-square"),value:"yes"}]})),"yes"===g&&(0,e.createElement)(G,{showToggle:!1}),"no"===g&&(0,e.createElement)(T,{label:(0,i.__)("Connection","woocommerce-square"),variant:"boxed",className:"square-settings__connection"},(0,e.createElement)(c.Button,{"data-testid":"connect-to-square-button",variant:"button-primary",className:"button-primary",onClick:async function(){f.current||await l(),window.location.href=f.current&&w.production?v:b},isBusy:n,disabled:!wcSquareSettings.depsCheck},f.current&&w.production?(0,i.__)("Disconnect from Square","woocommerce-square"):(0,i.__)("Connect to Square","woocommerce-square"))),y&&(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Select your business location","woocommerce-square")}),(0,e.createElement)(k,null,s((0,i.sprintf)(/* translators: %1$s and %2$s are placeholders for the link to the documentation */ /* translators: %1$s and %2$s are placeholders for the link to the documentation */ (0,i.__)("Please select the location you wish to link with this WooCommerce store. Only active %1$slocations%2$s that support credit card processing in Square can be linked.","woocommerce-square"),'<a target="_blank" href="https://docs.woocommerce.com/document/woocommerce-square/#section-4">',"</a>"))),(0,e.createElement)(T,{label:(0,i.__)("Business location","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"business-location-field",value:E,onChange:e=>{a("yes"===g?{sandbox_location_id:e}:{production_location_id:e})},options:[{label:(0,i.__)("Please choose a location","woocommerce-square"),value:""},...S]}))),y&&(0,e.createElement)(M,{indent:2,isDirty:p}),(0,e.createElement)(j,null),(0,e.createElement)(D,{label:(0,i.__)("Save changes","woocommerce-square"),afterSaveLabel:(0,i.__)("Changes Saved!","woocommerce-square"),afterSaveCallback:()=>document.querySelector(".woocommerce-save-button").click(),disabled:!wcSquareSettings.depsCheck})):(0,e.createElement)(L,null)};var z=n(106);const U=({origin:t=""})=>{const{paymentGatewaySettings:n,paymentGatewaySettingsLoaded:o,setCreditCardData:r}=S(),{enabled:a,title:l,description:u,charge_virtual_orders:d,enable_paid_capture:p,transaction_type:m,tokenization:f,card_types:g}=n;if(!o)return null;const _="authorization"===m&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{description:(0,i.__)("If the order contains exclusively virtual items, enable this to immediately charge, rather than authorize, the transaction.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-virtual-order-only-field",label:(0,i.__)("Charge Virtual-Only Orders","woocommerce-square"),checked:"yes"===d,onChange:e=>r({charge_virtual_orders:e?"yes":"no"})})),(0,e.createElement)(T,{description:(0,i.__)("Automatically capture orders when they are changed to Processing or Completed.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-capture-paid-orders-field",label:(0,i.__)("Capture Paid Orders","woocommerce-square"),checked:"yes"===p,onChange:e=>r({enable_paid_capture:e?"yes":"no"})})));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: link to payments settings */ /* translators: %s: link to payments settings */ (0,i.__)("Manage Credit Card Payment Settings %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("Here you can fine-tune the details of how credit card payments are processed, ensuring a secure and smooth transaction for every customer.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"credit-card-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===a,onChange:e=>r({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Title","woocommerce-square")},(0,e.createElement)(c.TextControl,{"data-testid":"credit-card-gateway-title-field",value:l,onChange:e=>r({title:e})})),(0,e.createElement)(T,{label:(0,i.__)("Description","woocommerce-square")},(0,e.createElement)(c.TextareaControl,{"data-testid":"credit-card-gateway-description-field",value:u,onChange:e=>r({description:e})})),(0,e.createElement)(T,{label:(0,i.__)("Transaction Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"credit-card-transaction-type-field",value:m,onChange:e=>r({transaction_type:e}),options:[{label:(0,i.__)("Charge","woocommerce-square"),value:"charge"},{label:(0,i.__)("Authorization","woocommerce-square"),value:"authorization"}]})),_,(0,e.createElement)(T,{label:(0,i.__)("Accepted Card Logos","woocommerce-square")},(0,e.createElement)(z.MultiSelectControl,{className:"credit-card-gateway-card-logos-field",id:"credit-card-gateway-card-logos-field",label:"",__experimentalShowHowTo:!1,value:g,onChange:e=>r({card_types:e}),options:[{label:(0,i.__)("Visa","woocommerce-square"),value:"VISA"},{label:(0,i.__)("MasterCard","woocommerce-square"),value:"MC"},{label:(0,i.__)("American Express","woocommerce-square"),value:"AMEX"},{label:(0,i.__)("Discover","woocommerce-square"),value:"DISC"},{label:(0,i.__)("Diners","woocommerce-square"),value:"DINERS"},{label:(0,i.__)("JCB","woocommerce-square"),value:"JCB"},{label:(0,i.__)("UnionPay","woocommerce-square"),value:"UNIONPAY"}]})),(0,e.createElement)(T,{label:(0,i.__)("Customer Profiles","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"credit-card-tokenization-field",label:(0,i.__)("Check to enable tokenization and allow customers to securely save their payment details for future checkout.","woocommerce-square"),checked:"yes"===f,onChange:e=>r({tokenization:e?"yes":"no"})})))))},H=()=>{const{paymentGatewaySettingsLoaded:t,paymentGatewaySettings:n,setDigitalWalletData:o}=S(),{enable_digital_wallets:r,digital_wallets_button_type:a,digital_wallets_apple_pay_button_color:l,digital_wallets_google_pay_button_color:u,digital_wallets_hide_button_options:d}=n;return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:(0,i.__)("Manage Digital Wallet Settings","woocommerce-square")}),(0,e.createElement)(k,null,(0,i.__)("Accept payments with Apple Pay and Google Pay on your store, available in select countries. Enabling digital wallets adds payment buttons to Product, Cart and Checkout pages.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square"),description:s((0,i.sprintf)(/* translators: %1$s: opening link tag, %2$s: closing link tag */ /* translators: %1$s: opening link tag, %2$s: closing link tag */ (0,i.__)("Allow customers to pay with Apple Pay or Google Pay from your Product, Cart and Checkout pages. Read more about the availablity of digital wallets in our %1$sdocumentation%2$s.","woocommerce-square"),'<a target="_blank" href="https://docs.woocommerce.com/document/woocommerce-square/">',"</a>"))},(0,e.createElement)(A,{"data-testid":"digital-wallet-gateway-toggle-field",label:(0,i.__)("Enable digital wallets.","woocommerce-square"),checked:"yes"===r,onChange:e=>o({enable_digital_wallets:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Button Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewaybutton-type-field",value:a,onChange:e=>o({digital_wallets_button_type:e}),options:[{label:(0,i.__)("Buy Now","woocommerce-square"),value:"buy"},{label:(0,i.__)("Donate","woocommerce-square"),value:"donate"},{label:(0,i.__)("No Text","woocommerce-square"),value:"plain"}]})),(0,e.createElement)(T,{label:(0,i.__)("Apple Pay Button Color","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewayapple-pay-button-color-field",value:l,onChange:e=>o({digital_wallets_apple_pay_button_color:e}),options:[{label:(0,i.__)("Black","woocommerce-square"),value:"black"},{label:(0,i.__)("White","woocommerce-square"),value:"white"},{label:(0,i.__)("White with outline","woocommerce-square"),value:"white-outline"}]})),(0,e.createElement)(T,{label:(0,i.__)("Google Pay Button Color","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"digital-wallet-gatewaygoogle-pay-button-color-field",value:u,onChange:e=>o({digital_wallets_google_pay_button_color:e}),options:[{label:(0,i.__)("Black","woocommerce-square"),value:"black"},{label:(0,i.__)("White","woocommerce-square"),value:"white"}]})),(0,e.createElement)(T,{label:(0,i.__)("Hide Digital Wallet Buttons","woocommerce-square")},(0,e.createElement)(z.MultiSelectControl,{"data-testid":"digital-wallet-gatewayhide-buttons-field",label:"",__experimentalShowHowTo:!1,value:d,onChange:e=>o({digital_wallets_hide_button_options:e}),options:[{label:(0,i.__)("Apple Pay","woocommerce-square"),value:"apple"},{label:(0,i.__)("Google Pay","woocommerce-square"),value:"google"}]}))))):null},W=({origin:t=""})=>{const{giftCardsGatewaySettingsLoaded:n,giftCardsGatewaySettings:o,setGiftCardData:a}=S(),[l,u]=(0,r.useState)(wcSquareSettings.gcPlaceholderUrl),{enabled:d,is_default_placeholder:p}=o;return n?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: Gift Cards */ /* translators: %s: Gift Cards */ (0,i.__)("Gift Cards %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("You can receive payments with Square Gift Cards and sell Square Gift Cards by enabling the Gift Cards option here.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},"settings"!==t&&(0,e.createElement)(T,{label:(0,i.__)("Enable Square Gift Cards","woocommerce-square"),variant:"boxed"},(0,e.createElement)(c.ToggleControl,{className:"gift-card-gateway-toggle-field","data-testid":"gift-card-gateway-toggle-field",checked:"yes"===d,onChange:e=>a({enabled:e?"yes":"no"})})),"settings"===t&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{className:"gift-card-gateway-toggle-field","data-testid":"gift-card-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===d,onChange:e=>a({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Gift card product placeholder image","woocommerce-square")},(0,e.createElement)(A,{className:"gift-card-gateway-product-placeholder-toggle-field","data-testid":"gift-card-gateway-product-placeholder-toggle-field",label:(0,i.__)("Enable to use the following image as the default placeholder for gift card products.","woocommerce-square"),checked:"yes"===p,onChange:e=>a({is_default_placeholder:e?"yes":"no"})}),(0,e.createElement)("img",{style:{maxWidth:"350px"},src:l,alt:(0,i.__)("Preview of the Gift card placeholder","woocommerce-square")}),(0,e.createElement)(c.Button,{variant:"link",onClick:function(){const e=wp.media({title:(0,i.__)("Select or Upload an image to use as the Gift card placeholder:","woocommerce-square"),library:{type:"image"},button:{text:"Use this image"},multiple:!1}).on("select",function(){const t=e.state().get("selection").first().toJSON();a({placeholder_id:t.id}),u(t.url)});e.open()},style:{width:"auto"}},(0,i.__)("Replace image","woocommerce-square"))))))):null},V=({origin:t=""})=>{const{cashAppGatewaySettings:n,setCashAppData:o}=S(),{enabled:r,title:a,description:l,transaction_type:u,button_theme:d,charge_virtual_orders:p,enable_paid_capture:m,button_shape:f}=n,g="authorization"===u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(T,{description:(0,i.__)("If the order contains exclusively virtual items, enable this to immediately charge, rather than authorize, the transaction.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-virtual-order-only-field",label:(0,i.__)("Charge Virtual-Only Orders","woocommerce-square"),checked:"yes"===p,onChange:e=>o({charge_virtual_orders:e?"yes":"no"})})),(0,e.createElement)(T,{description:(0,i.__)("Automatically capture orders when they are changed to Processing or Completed.","woocommerce-square"),indent:2},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-capture-paid-orders-field",label:(0,i.__)("Capture Paid Orders","woocommerce-square"),checked:"yes"===m,onChange:e=>o({enable_paid_capture:e?"yes":"no"})})));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(C,null,(0,e.createElement)(x,{title:s((0,i.sprintf)(/* translators: %s: link to settings page */ /* translators: %s: link to settings page */ (0,i.__)("Manage Cash App Pay Settings %s","woocommerce-square"),"settings"===t?`<small className="wc-admin-breadcrumb"><a href="${wcSquareSettings.adminUrl}admin.php?page=wc-settings&tab=checkout" ariaLabel="Return to payments">⤴</a></small>`:""))}),(0,e.createElement)(k,null,(0,i.__)("Cash App Pay is an innovative payment solution that offers your customers a quick and secure way to check out. With just a few settings, you can tailor how Cash App Pay appears and operates on your site.","woocommerce-square")),(0,e.createElement)("div",{className:"woo-square-wizard__fields"},(0,e.createElement)(T,{label:(0,i.__)("Enable / Disable","woocommerce-square")},(0,e.createElement)(A,{"data-testid":"cash-app-gateway-toggle-field",label:(0,i.__)("Enable this payment method.","woocommerce-square"),checked:"yes"===r,onChange:e=>o({enabled:e?"yes":"no"})})),(0,e.createElement)(T,{label:(0,i.__)("Title","woocommerce-square")},(0,e.createElement)(c.TextControl,{"data-testid":"cash-app-gateway-title-field",value:a,onChange:e=>o({title:e})})),(0,e.createElement)(T,{label:(0,i.__)("Description","woocommerce-square")},(0,e.createElement)(c.TextareaControl,{"data-testid":"cash-app-gateway-description-field",value:l,onChange:e=>o({description:e})})),(0,e.createElement)(T,{label:(0,i.__)("Transaction Type","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-transaction-type-field",value:u,onChange:e=>o({transaction_type:e}),options:[{label:(0,i.__)("Charge","woocommerce-square"),value:"charge"},{label:(0,i.__)("Authorization","woocommerce-square"),value:"authorization"}]})),g,(0,e.createElement)(T,{label:(0,i.__)("Cash App Pay Button Theme","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-button-theme-field",value:d,onChange:e=>o({button_theme:e}),options:[{label:(0,i.__)("Dark","woocommerce-square"),value:"dark"},{label:(0,i.__)("Light","woocommerce-square"),value:"light"}]})),(0,e.createElement)(T,{label:(0,i.__)("Cash App Pay Button Shape","woocommerce-square")},(0,e.createElement)(c.SelectControl,{"data-testid":"cash-app-gateway-button-shape-field",value:f,onChange:e=>o({button_shape:e}),options:[{label:(0,i.__)("Semiround","woocommerce-square"),value:"semiround"},{label:(0,i.__)("Round","woocommerce-square"),value:"round"}]})))))},$=()=>{const{paymentGatewaySettingsLoaded:t,savePaymentGatewaySettings:n}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(U,{origin:"settings"}),(0,e.createElement)(H,null),(0,e.createElement)(N,{onClick:()=>{n()}})):(0,e.createElement)(L,null)},X=()=>{const{cashAppGatewaySettingsLoaded:t,saveCashAppSettings:n}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(V,{origin:"settings"}),(0,e.createElement)(N,{onClick:()=>{n()}})):(0,e.createElement)(L,null)},Y=()=>{const{giftCardsGatewaySettingsLoaded:t,saveGiftCardsSettings:n}=S(!0);return t?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(W,{origin:"settings"}),(0,e.createElement)(N,{onClick:()=>{n()}})):(0,e.createElement)(L,null)};(0,a.register)(v),o()(()=>{let t=document.getElementById("woocommerce-square-settings__container-general");t?(0,r.createRoot)(t).render((0,e.createElement)(F,null)):(t=document.getElementById("woocommerce-square-payment-gateway-settings__container--square_credit_card"),t&&(0,r.createRoot)(t).render((0,e.createElement)($,null)),t=document.getElementById("woocommerce-square-payment-gateway-settings__container--square_cash_app_pay"),t&&(0,r.createRoot)(t).render((0,e.createElement)(X,null)),t=document.getElementById("woocommerce-square-payment-gateway-settings__container--gift_cards_pay"),t&&(0,r.createRoot)(t).render((0,e.createElement)(Y,null)))})})()})();
Ukuran: 114.4 KB