/*! For license information please see wc-payments-settings-spotlight.js.LICENSE.txt */
(()=>{var e={2838(e){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,r){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,r)}function r(e,o,n){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,r,o){var n=[null];n.push.apply(n,r);var a=new(Function.bind.apply(e,n));return o&&t(a,o.prototype),a},r.apply(null,arguments)}function o(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var a=Object.hasOwnProperty,i=Object.setPrototypeOf,s=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,d=Object.freeze,l=Object.seal,p=Object.create,m="undefined"!=typeof Reflect&&Reflect,_=m.apply,y=m.construct;_||(_=function(e,t,r){return e.apply(t,r)}),d||(d=function(e){return e}),l||(l=function(e){return e}),y||(y=function(e,t){return r(e,o(t))});var h,f=I(Array.prototype.forEach),E=I(Array.prototype.pop),S=I(Array.prototype.push),g=I(String.prototype.toLowerCase),T=I(String.prototype.toString),w=I(String.prototype.match),R=I(String.prototype.replace),v=I(String.prototype.indexOf),O=I(String.prototype.trim),b=I(RegExp.prototype.test),A=(h=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return y(h,t)});function I(e){return function(t){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];return _(e,t,o)}}function N(e,t,r){var o;r=null!==(o=r)&&void 0!==o?o:g,i&&i(e,null);for(var n=t.length;n--;){var a=t[n];if("string"==typeof a){var c=r(a);c!==a&&(s(t)||(t[n]=c),a=c)}e[a]=!0}return e}function D(e){var t,r=p(null);for(t in e)!0===_(a,e,[t])&&(r[t]=e[t]);return r}function M(e,t){for(;null!==e;){var r=u(e,t);if(r){if(r.get)return I(r.get);if("function"==typeof r.value)return I(r.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var C=d(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=d(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),k=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),L=d(["#text"]),z=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),j=d(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),B=d(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=l(/<%[\w\W]*|[\w\W]*%>/gm),$=l(/\${[\w\W]*}/gm),W=l(/^data-[\-\w.\u00B7-\uFFFF]/),G=l(/^aria-[\-\w]+$/),V=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Q=l(/^(?:\w+script|data):/i),Z=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=l(/^html$/i),X=l(/^[a-z][.\w]*(-[.\w]+)+$/i),J=function(){return"undefined"==typeof window?null:window};return function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J(),n=function(e){return t(e)};if(n.version="2.5.6",n.removed=[],!r||!r.document||9!==r.document.nodeType)return n.isSupported=!1,n;var a=r.document,i=r.document,s=r.DocumentFragment,c=r.HTMLTemplateElement,u=r.Node,l=r.Element,p=r.NodeFilter,m=r.NamedNodeMap,_=void 0===m?r.NamedNodeMap||r.MozNamedAttrMap:m,y=r.HTMLFormElement,h=r.DOMParser,I=r.trustedTypes,ee=l.prototype,te=M(ee,"cloneNode"),re=M(ee,"nextSibling"),oe=M(ee,"childNodes"),ne=M(ee,"parentNode");if("function"==typeof c){var ae=i.createElement("template");ae.content&&ae.content.ownerDocument&&(i=ae.content.ownerDocument)}var ie=function(t,r){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var o=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(o=r.currentScript.getAttribute(n));var a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(I,a),se=ie?ie.createHTML(""):"",ce=i,ue=ce.implementation,de=ce.createNodeIterator,le=ce.createDocumentFragment,pe=ce.getElementsByTagName,me=a.importNode,_e={};try{_e=D(i).documentMode?i.documentMode:{}}catch(e){}var ye={};n.isSupported="function"==typeof ne&&ue&&void 0!==ue.createHTMLDocument&&9!==_e;var he,fe,Ee=Y,Se=q,ge=$,Te=W,we=G,Re=Q,ve=Z,Oe=X,be=V,Ae=null,Ie=N({},[].concat(o(C),o(P),o(F),o(x),o(L))),Ne=null,De=N({},[].concat(o(z),o(j),o(B),o(H))),Me=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Pe=null,Fe=!0,Ue=!0,xe=!1,ke=!0,Le=!1,ze=!0,je=!1,Be=!1,He=!1,Ye=!1,qe=!1,$e=!1,We=!0,Ge=!1,Ve=!0,Qe=!1,Ze={},Ke=null,Xe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Je=null,et=N({},["audio","video","img","source","image","track"]),tt=null,rt=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ot="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml",it=at,st=!1,ct=null,ut=N({},[ot,nt,at],T),dt=["application/xhtml+xml","text/html"],lt=null,pt=i.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},_t=function(t){lt&&lt===t||(t&&"object"===e(t)||(t={}),t=D(t),he=he=-1===dt.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,fe="application/xhtml+xml"===he?T:g,Ae="ALLOWED_TAGS"in t?N({},t.ALLOWED_TAGS,fe):Ie,Ne="ALLOWED_ATTR"in t?N({},t.ALLOWED_ATTR,fe):De,ct="ALLOWED_NAMESPACES"in t?N({},t.ALLOWED_NAMESPACES,T):ut,tt="ADD_URI_SAFE_ATTR"in t?N(D(rt),t.ADD_URI_SAFE_ATTR,fe):rt,Je="ADD_DATA_URI_TAGS"in t?N(D(et),t.ADD_DATA_URI_TAGS,fe):et,Ke="FORBID_CONTENTS"in t?N({},t.FORBID_CONTENTS,fe):Xe,Ce="FORBID_TAGS"in t?N({},t.FORBID_TAGS,fe):{},Pe="FORBID_ATTR"in t?N({},t.FORBID_ATTR,fe):{},Ze="USE_PROFILES"in t&&t.USE_PROFILES,Fe=!1!==t.ALLOW_ARIA_ATTR,Ue=!1!==t.ALLOW_DATA_ATTR,xe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Le=t.SAFE_FOR_TEMPLATES||!1,ze=!1!==t.SAFE_FOR_XML,je=t.WHOLE_DOCUMENT||!1,Ye=t.RETURN_DOM||!1,qe=t.RETURN_DOM_FRAGMENT||!1,$e=t.RETURN_TRUSTED_TYPE||!1,He=t.FORCE_BODY||!1,We=!1!==t.SANITIZE_DOM,Ge=t.SANITIZE_NAMED_PROPS||!1,Ve=!1!==t.KEEP_CONTENT,Qe=t.IN_PLACE||!1,be=t.ALLOWED_URI_REGEXP||be,it=t.NAMESPACE||at,Me=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&mt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Me.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&mt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Me.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Me.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Ue=!1),qe&&(Ye=!0),Ze&&(Ae=N({},o(L)),Ne=[],!0===Ze.html&&(N(Ae,C),N(Ne,z)),!0===Ze.svg&&(N(Ae,P),N(Ne,j),N(Ne,H)),!0===Ze.svgFilters&&(N(Ae,F),N(Ne,j),N(Ne,H)),!0===Ze.mathMl&&(N(Ae,x),N(Ne,B),N(Ne,H))),t.ADD_TAGS&&(Ae===Ie&&(Ae=D(Ae)),N(Ae,t.ADD_TAGS,fe)),t.ADD_ATTR&&(Ne===De&&(Ne=D(Ne)),N(Ne,t.ADD_ATTR,fe)),t.ADD_URI_SAFE_ATTR&&N(tt,t.ADD_URI_SAFE_ATTR,fe),t.FORBID_CONTENTS&&(Ke===Xe&&(Ke=D(Ke)),N(Ke,t.FORBID_CONTENTS,fe)),Ve&&(Ae["#text"]=!0),je&&N(Ae,["html","head","body"]),Ae.table&&(N(Ae,["tbody"]),delete Ce.tbody),d&&d(t),lt=t)},yt=N({},["mi","mo","mn","ms","mtext"]),ht=N({},["foreignobject","annotation-xml"]),ft=N({},["title","style","font","a","script"]),Et=N({},P);N(Et,F),N(Et,U);var St=N({},x);N(St,k);var gt=function(e){S(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=se}catch(t){e.remove()}}},Tt=function(e,t){try{S(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){S(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ne[e])if(Ye||qe)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},wt=function(e){var t,r;if(He)e="<remove></remove>"+e;else{var o=w(e,/^[\r\n\t ]+/);r=o&&o[0]}"application/xhtml+xml"===he&&it===at&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var n=ie?ie.createHTML(e):e;if(it===at)try{t=(new h).parseFromString(n,he)}catch(e){}if(!t||!t.documentElement){t=ue.createDocument(it,"template",null);try{t.documentElement.innerHTML=st?se:n}catch(e){}}var a=t.body||t.documentElement;return e&&r&&a.insertBefore(i.createTextNode(r),a.childNodes[0]||null),it===at?pe.call(t,je?"html":"body")[0]:je?t.documentElement:a},Rt=function(e){return de.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null,!1)},vt=function(e){return e instanceof y&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof _)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ot=function(t){return"object"===e(u)?t instanceof u:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},bt=function(e,t,r){ye[e]&&f(ye[e],function(e){e.call(n,t,r,lt)})},At=function(e){var t;if(bt("beforeSanitizeElements",e,null),vt(e))return gt(e),!0;if(b(/[\u0080-\uFFFF]/,e.nodeName))return gt(e),!0;var r=fe(e.nodeName);if(bt("uponSanitizeElement",e,{tagName:r,allowedTags:Ae}),e.hasChildNodes()&&!Ot(e.firstElementChild)&&(!Ot(e.content)||!Ot(e.content.firstElementChild))&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return gt(e),!0;if("select"===r&&b(/<template/i,e.innerHTML))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(ze&&8===e.nodeType&&b(/<[/\w]/g,e.data))return gt(e),!0;if(!Ae[r]||Ce[r]){if(!Ce[r]&&Nt(r)){if(Me.tagNameCheck instanceof RegExp&&b(Me.tagNameCheck,r))return!1;if(Me.tagNameCheck instanceof Function&&Me.tagNameCheck(r))return!1}if(Ve&&!Ke[r]){var o=ne(e)||e.parentNode,a=oe(e)||e.childNodes;if(a&&o)for(var i=a.length-1;i>=0;--i){var s=te(a[i],!0);s.__removalCount=(e.__removalCount||0)+1,o.insertBefore(s,re(e))}}return gt(e),!0}return e instanceof l&&!function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});var r=g(e.tagName),o=g(t.tagName);return!!ct[e.namespaceURI]&&(e.namespaceURI===nt?t.namespaceURI===at?"svg"===r:t.namespaceURI===ot?"svg"===r&&("annotation-xml"===o||yt[o]):Boolean(Et[r]):e.namespaceURI===ot?t.namespaceURI===at?"math"===r:t.namespaceURI===nt?"math"===r&&ht[o]:Boolean(St[r]):e.namespaceURI===at?!(t.namespaceURI===nt&&!ht[o])&&!(t.namespaceURI===ot&&!yt[o])&&!St[r]&&(ft[r]||!Et[r]):!("application/xhtml+xml"!==he||!ct[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,t=R(t,Ee," "),t=R(t,Se," "),t=R(t,ge," "),e.textContent!==t&&(S(n.removed,{element:e.cloneNode()}),e.textContent=t)),bt("afterSanitizeElements",e,null),!1):(gt(e),!0)},It=function(e,t,r){if(We&&("id"===t||"name"===t)&&(r in i||r in pt))return!1;if(Ue&&!Pe[t]&&b(Te,t));else if(Fe&&b(we,t));else if(!Ne[t]||Pe[t]){if(!(Nt(e)&&(Me.tagNameCheck instanceof RegExp&&b(Me.tagNameCheck,e)||Me.tagNameCheck instanceof Function&&Me.tagNameCheck(e))&&(Me.attributeNameCheck instanceof RegExp&&b(Me.attributeNameCheck,t)||Me.attributeNameCheck instanceof Function&&Me.attributeNameCheck(t))||"is"===t&&Me.allowCustomizedBuiltInElements&&(Me.tagNameCheck instanceof RegExp&&b(Me.tagNameCheck,r)||Me.tagNameCheck instanceof Function&&Me.tagNameCheck(r))))return!1}else if(tt[t]);else if(b(be,R(r,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(r,"data:")||!Je[e])if(xe&&!b(Re,R(r,ve,"")));else if(r)return!1;return!0},Nt=function(e){return"annotation-xml"!==e&&w(e,Oe)},Dt=function(t){var r,o,a,i;bt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var c={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne};for(i=s.length;i--;){var u=r=s[i],d=u.name,l=u.namespaceURI;if(o="value"===d?r.value:O(r.value),a=fe(d),c.attrName=a,c.attrValue=o,c.keepAttr=!0,c.forceKeepAttr=void 0,bt("uponSanitizeAttribute",t,c),o=c.attrValue,ze&&b(/((--!?|])>)|<\/(style|title)/i,o))Tt(d,t);else if(!c.forceKeepAttr&&(Tt(d,t),c.keepAttr))if(ke||!b(/\/>/i,o)){Le&&(o=R(o,Ee," "),o=R(o,Se," "),o=R(o,ge," "));var p=fe(t.nodeName);if(It(p,a,o)){if(!Ge||"id"!==a&&"name"!==a||(Tt(d,t),o="user-content-"+o),ie&&"object"===e(I)&&"function"==typeof I.getAttributeType)if(l);else switch(I.getAttributeType(p,a)){case"TrustedHTML":o=ie.createHTML(o);break;case"TrustedScriptURL":o=ie.createScriptURL(o)}try{l?t.setAttributeNS(l,d,o):t.setAttribute(d,o),vt(t)?gt(t):E(n.removed)}catch(e){}}}else Tt(d,t)}bt("afterSanitizeAttributes",t,null)}},Mt=function e(t){var r,o=Rt(t);for(bt("beforeSanitizeShadowDOM",t,null);r=o.nextNode();)bt("uponSanitizeShadowNode",r,null),At(r)||(r.content instanceof s&&e(r.content),Dt(r));bt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(t){var o,i,c,d,l,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((st=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ot(t)){if("function"!=typeof t.toString)throw A("toString is not a function");if("string"!=typeof(t=t.toString()))throw A("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(r.toStaticHTML)||"function"==typeof r.toStaticHTML){if("string"==typeof t)return r.toStaticHTML(t);if(Ot(t))return r.toStaticHTML(t.outerHTML)}return t}if(Be||_t(p),n.removed=[],"string"==typeof t&&(Qe=!1),Qe){if(t.nodeName){var m=fe(t.nodeName);if(!Ae[m]||Ce[m])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)1===(i=(o=wt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Ye&&!Le&&!je&&-1===t.indexOf("<"))return ie&&$e?ie.createHTML(t):t;if(!(o=wt(t)))return Ye?null:$e?se:""}o&&He&&gt(o.firstChild);for(var _=Rt(Qe?t:o);c=_.nextNode();)3===c.nodeType&&c===d||At(c)||(c.content instanceof s&&Mt(c.content),Dt(c),d=c);if(d=null,Qe)return t;if(Ye){if(qe)for(l=le.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return(Ne.shadowroot||Ne.shadowrootmod)&&(l=me.call(a,l,!0)),l}var y=je?o.outerHTML:o.innerHTML;return je&&Ae["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&b(K,o.ownerDocument.doctype.name)&&(y="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+y),Le&&(y=R(y,Ee," "),y=R(y,Se," "),y=R(y,ge," ")),ie&&$e?ie.createHTML(y):y},n.setConfig=function(e){_t(e),Be=!0},n.clearConfig=function(){lt=null,Be=!1},n.isValidAttribute=function(e,t,r){lt||_t({});var o=fe(e),n=fe(t);return It(o,n,r)},n.addHook=function(e,t){"function"==typeof t&&(ye[e]=ye[e]||[],S(ye[e],t))},n.removeHook=function(e){if(ye[e])return E(ye[e])},n.removeHooks=function(e){ye[e]&&(ye[e]=[])},n.removeAllHooks=function(){ye={}},n}()}()},5338(e,t,r){"use strict";var o=r(5795);t.H=o.createRoot,o.hydrateRoot},1020(e,t,r){"use strict";var o=r(1609),n=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var o,a={},u=null,d=null;for(o in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(d=t.ref),t)i.call(t,o)&&!c.hasOwnProperty(o)&&(a[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===a[o]&&(a[o]=t[o]);return{$$typeof:n,type:e,key:u,ref:d,props:a,_owner:s.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},4848(e,t,r){"use strict";e.exports=r(1020)},1609(e){"use strict";e.exports=window.React},5795(e){"use strict";e.exports=window.ReactDOM}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:()=>ge,getAllDepositsOverviewsError:()=>Te,getDeposit:()=>Se,getDepositQueryError:()=>Oe,getDeposits:()=>Re,getDepositsCount:()=>ve,getDepositsSummary:()=>Ae,getDepositsSummaryError:()=>Ie,getInstantDeposit:()=>Ne});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Je,updateAllDepositsOverviews:()=>$e,updateDeposit:()=>qe,updateDeposits:()=>Ge,updateDepositsCount:()=>Ve,updateDepositsSummary:()=>Ze,updateErrorForAllDepositsOverviews:()=>We,updateErrorForDepositQuery:()=>Qe,updateErrorForDepositsSummary:()=>Ke,updateInstantDeposit:()=>Xe});var o={};r.r(o),r.d(o,{getAllDepositsOverviews:()=>tt,getDeposit:()=>et,getDeposits:()=>at,getDepositsSummary:()=>it,getPayoutsCSVRequestURL:()=>nt,payoutsDownloadEndpoint:()=>ot});var n={};r.r(n),r.d(n,{getFraudOutcomeTransactions:()=>ft,getFraudOutcomeTransactionsError:()=>Et,getFraudOutcomeTransactionsSummary:()=>gt,getFraudOutcomeTransactionsSummaryError:()=>Tt,getTransactions:()=>lt,getTransactionsError:()=>pt,getTransactionsSummary:()=>_t,getTransactionsSummaryError:()=>yt});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>At,updateErrorForFraudOutcomeTransactionsSummary:()=>Nt,updateErrorForTransactions:()=>Rt,updateErrorForTransactionsSummary:()=>Ot,updateFraudOutcomeTransactions:()=>bt,updateFraudOutcomeTransactionsSummary:()=>It,updateTransactions:()=>wt,updateTransactionsSummary:()=>vt});var i={};r.r(i),r.d(i,{formatQueryFilters:()=>Dt,getFraudOutcomeTransactions:()=>Ut,getFraudOutcomeTransactionsExport:()=>kt,getFraudOutcomeTransactionsSummary:()=>xt,getTransactions:()=>Mt,getTransactionsCSVRequestURL:()=>Pt,getTransactionsSummary:()=>Ft,transactionsDownloadEndpoint:()=>Ct});var s={};r.r(s),r.d(s,{getCharge:()=>zt,getChargeError:()=>jt,getChargeFromOrder:()=>Bt,getChargeFromOrderError:()=>Ht});var c={};r.r(c),r.d(c,{updateCharge:()=>Yt,updateErrorForCharge:()=>qt});var u={};r.r(u),r.d(u,{getCharge:()=>$t,getChargeFromOrder:()=>Wt});var d={};r.r(d),r.d(d,{getTimeline:()=>Vt,getTimelineError:()=>Qt});var l={};r.r(l),r.d(l,{updateErrorForTimeline:()=>Kt,updateTimeline:()=>Zt});var p={};r.r(p),r.d(p,{getTimeline:()=>Xt});var m={};r.r(m),r.d(m,{getCachedDispute:()=>nr,getDispute:()=>rr,getDisputeError:()=>or,getDisputes:()=>ar,getDisputesSummary:()=>ir});var _={};r.r(_),r.d(_,{refundCharge:()=>lr,updateErrorForPaymentIntent:()=>dr,updatePaymentIntent:()=>ur});var y={};r.r(y),r.d(y,{getPaymentIntent:()=>pr});var h={};r.r(h),r.d(h,{acceptDispute:()=>fr,updateDispute:()=>mr,updateDisputes:()=>yr,updateDisputesSummary:()=>hr,updateErrorForDispute:()=>_r});var f={};r.r(f),r.d(f,{disputesDownloadEndpoint:()=>Rr,getDispute:()=>Or,getDisputes:()=>br,getDisputesCSVRequestURL:()=>vr,getDisputesSummary:()=>Ar});var E={};r.r(E),r.d(E,{getAccountBusinessSupportEmail:()=>qr,getAccountBusinessSupportPhone:()=>$r,getAccountCommunicationsEmail:()=>Do,getAccountDomesticCurrency:()=>Wr,getAccountStatementDescriptor:()=>Br,getAccountStatementDescriptorKana:()=>Yr,getAccountStatementDescriptorKanji:()=>Hr,getAdvancedFraudProtectionSettings:()=>vo,getAvailablePaymentMethodIds:()=>kr,getCompletedWaitingPeriod:()=>Kr,getCurrentProtectionLevel:()=>Ro,getDepositDelayDays:()=>Zr,getDepositRestrictions:()=>Jr,getDepositScheduleInterval:()=>Gr,getDepositScheduleMonthlyAnchor:()=>Qr,getDepositScheduleWeeklyAnchor:()=>Vr,getDepositStatus:()=>Xr,getDuplicatedPaymentMethodIds:()=>Fr,getEnabledPaymentMethodIds:()=>xr,getExpressCheckoutCartMethods:()=>Co,getExpressCheckoutCheckoutMethods:()=>Po,getExpressCheckoutProductMethods:()=>Mo,getIsCardPresentEligible:()=>yo,getIsDebugLogEnabled:()=>io,getIsDevModeEnabled:()=>oo,getIsExpressCheckoutInPaymentMethodsEnabled:()=>ao,getIsManualCaptureEnabled:()=>eo,getIsMultiCurrencyEnabled:()=>so,getIsPaymentRequestEnabled:()=>no,getIsSavedCardsEnabled:()=>mo,getIsStripeBillingEnabled:()=>bo,getIsStripeBillingMigrationInProgress:()=>Ao,getIsSubscriptionsPluginActive:()=>Eo,getIsTestModeEnabled:()=>to,getIsTestModeOnboarding:()=>ro,getIsWCPayEnabled:()=>Ur,getIsWCPaySubscriptionsEligible:()=>fo,getIsWCPaySubscriptionsEnabled:()=>ho,getIsWooPayEnabled:()=>So,getIsWooPayGlobalThemeSupportEnabled:()=>go,getPaymentMethodStatuses:()=>Lr,getPaymentRequestButtonBorderRadius:()=>po,getPaymentRequestButtonSize:()=>uo,getPaymentRequestButtonTheme:()=>lo,getPaymentRequestButtonType:()=>co,getSavingError:()=>_o,getSettings:()=>Pr,getShowWooPayIncompatibilityNotice:()=>Oo,getStripeBillingMigratedCount:()=>No,getStripeBillingSubscriptionCount:()=>Io,getWooPayCustomMessage:()=>To,getWooPayStoreLogo:()=>wo,isDirty:()=>jr,isSavingSettings:()=>zr});var S={};r.r(S),r.d(S,{saveOption:()=>vn,saveSettings:()=>ln,submitStripeBillingSubscriptionMigration:()=>Rn,updateAccountBusinessSupportEmail:()=>an,updateAccountBusinessSupportPhone:()=>sn,updateAccountCommunicationsEmail:()=>Sn,updateAccountStatementDescriptor:()=>rn,updateAccountStatementDescriptorKana:()=>nn,updateAccountStatementDescriptorKanji:()=>on,updateAdvancedFraudProtectionSettings:()=>fn,updateDepositScheduleInterval:()=>cn,updateDepositScheduleMonthlyAnchor:()=>dn,updateDepositScheduleWeeklyAnchor:()=>un,updateEnabledPaymentMethodIds:()=>Go,updateExpressCheckoutCartMethods:()=>Tn,updateExpressCheckoutCheckoutMethods:()=>wn,updateExpressCheckoutProductMethods:()=>gn,updateIsCardPresentEligible:()=>Lo,updateIsDebugLogEnabled:()=>Jo,updateIsExpressCheckoutInPaymentMethodsEnabled:()=>Wo,updateIsManualCaptureEnabled:()=>Ko,updateIsMultiCurrencyEnabled:()=>en,updateIsPaymentRequestEnabled:()=>$o,updateIsSavedCardsEnabled:()=>ko,updateIsSavingSettings:()=>Vo,updateIsStripeBillingEnabled:()=>En,updateIsTestModeEnabled:()=>Xo,updateIsWCPayEnabled:()=>qo,updateIsWCPaySubscriptionsEnabled:()=>tn,updateIsWooPayEnabled:()=>pn,updateIsWooPayGlobalThemeSupportEnabled:()=>mn,updatePaymentRequestButtonBorderRadius:()=>Ho,updatePaymentRequestButtonSize:()=>jo,updatePaymentRequestButtonTheme:()=>Bo,updatePaymentRequestButtonType:()=>zo,updateProtectionLevel:()=>hn,updateSelectedPaymentMethod:()=>Qo,updateSettings:()=>Yo,updateUnselectedPaymentMethod:()=>Zo,updateWooPayCustomMessage:()=>_n,updateWooPayStoreLogo:()=>yn});var g={};r.r(g),r.d(g,{getSettings:()=>On});var T={};r.r(T),r.d(T,{getCardReaderStats:()=>In,getCardReaderStatsError:()=>Nn,getCardReaders:()=>Dn});var w={};r.r(w),r.d(w,{updateCardReaderStats:()=>Mn,updateCardReaders:()=>Cn,updateErrorForCardReaderStats:()=>Pn,updateErrorForCardReaders:()=>Fn});var R={};r.r(R),r.d(R,{getCardReaderStats:()=>Un,getCardReaders:()=>xn});var v={};r.r(v),r.d(v,{getActiveLoanSummary:()=>Hn,getActiveLoanSummaryError:()=>Yn,getLoans:()=>qn,getLoansError:()=>$n});var O={};r.r(O),r.d(O,{updateActiveLoanSummary:()=>Wn,updateErrorForActiveLoanSummary:()=>Gn,updateErrorForLoans:()=>Qn,updateLoans:()=>Vn});var b={};r.r(b),r.d(b,{getActiveLoanSummary:()=>Zn,getLoans:()=>Kn});var A={};r.r(A),r.d(A,{getDocuments:()=>ra,getDocumentsError:()=>oa,getDocumentsSummary:()=>aa,getDocumentsSummaryError:()=>ia});var I={};r.r(I),r.d(I,{updateDocuments:()=>sa,updateDocumentsSummary:()=>ua,updateErrorForDocuments:()=>ca,updateErrorForDocumentsSummary:()=>da});var N={};r.r(N),r.d(N,{formatQueryFilters:()=>la,getDocuments:()=>pa,getDocumentsSummary:()=>ma});var D={};r.r(D),r.d(D,{getPaymentIntent:()=>ya,getPaymentIntentError:()=>ha});var M={};r.r(M),r.d(M,{getAuthorization:()=>wa,getAuthorizations:()=>Ta,getAuthorizationsError:()=>Ra,getAuthorizationsSummary:()=>Oa,getAuthorizationsSummaryError:()=>ba,getIsRequesting:()=>Aa});var C={};r.r(C),r.d(C,{setIsRequestingAuthorization:()=>Pa,submitCancelAuthorization:()=>Ua,submitCaptureAuthorization:()=>Fa,updateAuthorization:()=>Ma,updateAuthorizations:()=>Na,updateAuthorizationsSummary:()=>Ca,updateErrorForAuthorizations:()=>Da,updateErrorForAuthorizationsSummary:()=>xa});var P={};r.r(P),r.d(P,{getAuthorization:()=>La,getAuthorizations:()=>ka,getAuthorizationsSummary:()=>za});var F={};r.r(F),r.d(F,{getFile:()=>Ya,getFileError:()=>qa});var U={};r.r(U),r.d(U,{updateErrorForFiles:()=>Wa,updateFiles:()=>$a});var x={};r.r(x),r.d(x,{getFile:()=>Ga});var k={};r.r(k),r.d(k,{getPmPromotions:()=>Za,getPmPromotionsError:()=>Ka});var L={};r.r(L),r.d(L,{activatePmPromotion:()=>ti,dismissPmPromotion:()=>ri,updateErrorForPmPromotions:()=>ei,updatePmPromotions:()=>Ja});var z={};r.r(z),r.d(z,{getPmPromotions:()=>ni});var j=r(1609),B=r(5338);const H=window.wp.components,Y=window.wp.primitives;var q=r(4848);const $=(0,q.jsx)(Y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,q.jsx)(Y.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"})}),W=window.wp.i18n,G=window.wp.a11y,V=window.wp.element,Q=(0,V.forwardRef)(function({icon:e,size:t=24,...r},o){return(0,V.cloneElement)(e,{width:t,height:t,...r,ref:o})});function Z(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Z(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}const K=function(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Z(e))&&(o&&(o+=" "),o+=t);return o},X=window.lodash;var J=r(5795);const ee=document.getElementById("wpbody-content")||document.body,te=(e,t)=>!(!t||t!==e.target&&!(e.target instanceof Node&&t.contains(e.target))),re=(0,j.memo)(({children:e,parentElement:t})=>{const r=(0,j.useRef)(null);return r.current||(r.current=document.createElement("div"),t.appendChild(r.current)),(0,j.useEffect)(()=>()=>{r.current&&(t.removeChild(r.current),r.current=null)},[t]),(0,J.createPortal)(e,r.current)}),oe=({className:e,children:t,content:r,parentElement:o=ee,hideDelayMs:n=600,isVisible:a,onHide:i,maxWidth:s="250px"})=>{const c=(0,j.useRef)(null),u=(0,j.useRef)(null),d=((e,{hideDelayMs:t=600,triggerRef:r,tooltipRef:o,parentElement:n,onHide:a=X.noop})=>{const[i,s]=(0,j.useState)(e),c=(0,j.useRef)(!1),u=(0,j.useRef)(a);return(0,j.useEffect)(()=>{u.current=a},[a]),(0,j.useEffect)(()=>{let r=null;if(c.current){if(e)return n.dispatchEvent(new Event("wcpay-tooltip-open")),void s(!0);if(i)return r=setTimeout(()=>{s(!1),u.current()},t),()=>{r&&clearTimeout(r)}}else c.current=!0},[s,t,e,i,n]),(0,j.useEffect)(()=>{if(!i)return;const e=()=>{s(!1),u.current()},t=e=>{te(e,r.current?.firstChild)||te(e,o.current)||(s(!1),u.current())};return document.addEventListener("click",t),n.addEventListener("wcpay-tooltip-open",e),()=>{document.removeEventListener("click",t),n.removeEventListener("wcpay-tooltip-open",e)}},[e,i,r,o,n]),i})(!!a,{hideDelayMs:n,triggerRef:c,tooltipRef:u,parentElement:o,onHide:i});return(0,j.useEffect)(()=>{const e=()=>{if(!d)return;const e=u.current,t=c.current?.firstChild;if(!e||!t)return;if(!(t instanceof HTMLElement))return;e.style.maxWidth=s;const r=window.innerWidth-16;e.offsetWidth>r&&(e.style.maxWidth=`${r}px`);const o=t.getBoundingClientRect(),n=e.getBoundingClientRect().height;e.style.top=o.top-n-8+"px";const a=t.offsetWidth/2+o.left,i=e.offsetWidth,l=window.innerWidth-i-8,p=Math.max(8,Math.min(a-i/2,l));e.style.left=`${p}px`,e.style.visibility="visible",e.style.opacity="1"};e();const t=(0,X.debounce)(e,150);return window.addEventListener("resize",t),document.addEventListener("scroll",t),()=>{window.removeEventListener("resize",t),document.removeEventListener("scroll",t)}},[d,s]),(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{className:"wcpay-tooltip__content-wrapper",ref:c,children:t}),d&&(0,q.jsx)(re,{parentElement:o,children:(0,q.jsx)("div",{ref:u,className:K("wcpay-tooltip__tooltip-wrapper",{"is-hiding":!a}),role:"tooltip",children:(0,q.jsx)("div",{className:K("wcpay-tooltip__tooltip",e),children:r})})})]})},ne=({isVisible:e,onHide:t=X.noop,children:r,buttonIcon:o,buttonLabel:n,buttonSize:a=16,...i})=>{const[s,c]=(0,j.useState)(!1),[u,d]=(0,j.useState)(!1),l=()=>{c(!0)},p=()=>{c(!1),t()};return(0,q.jsx)("button",{className:"wcpay-tooltip__content-wrapper",onMouseEnter:l,onMouseLeave:p,onFocus:l,onBlur:p,onClick:()=>{d(e=>!e),u&&t()},type:"button",children:(0,q.jsx)(oe,{...i,onHide:()=>{c(!1),d(!1),t()},isVisible:e||s||u,children:o?(0,q.jsx)(H.Icon,{icon:o,size:a,"aria-label":n}):r})})},ae=({message:e,type:t="primary",className:r,tooltip:o,icon:n})=>{const a=K("chip",`chip-${t}`,n&&"chip-has-icon",r),i=(0,q.jsxs)(q.Fragment,{children:[n&&(0,q.jsx)(Q,{icon:n,size:16}),e]});return o?(0,q.jsx)(ne,{content:o,children:(0,q.jsx)("span",{className:a,children:i})}):(0,q.jsx)("span",{className:a,children:i})};var ie=r(2838),se=r.n(ie);const ce=e=>({__html:se().sanitize(e,{ALLOWED_TAGS:["a","b","em","i","strong","p","br"],ALLOWED_ATTR:["target","href","rel","name","download"]})}),ue=["primary","success","light","warning","alert"],de=({badge:e,badgeType:t,heading:r,description:o,footnote:n,image:a,icon:i,primaryButtonLabel:s,onPrimaryClick:c,secondaryButtonLabel:u,onSecondaryClick:d,onDismiss:l,onView:p,showImmediately:m=!1,showDelayMs:_=4e3,reverseButtons:y=!1})=>{const h=(f=t)&&ue.includes(f)?f:"success";var f;const[E,S]=(0,j.useState)(!1),[g,T]=(0,j.useState)(!1),w=(0,j.useRef)(null),R=(0,j.useRef)(null),v=(0,j.useRef)(null);(0,j.useEffect)(()=>{if(m)return S(!0),void T(!0);const e=setTimeout(()=>{S(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{T(!0)})})},_);return()=>clearTimeout(e)},[m,_]),(0,j.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]),(0,j.useEffect)(()=>{g&&((0,G.speak)((0,W.sprintf)((0,W.__)("Dialog opened: %s","woocommerce-payments"),r),"polite"),p&&p())},[g]);const O=(0,j.useCallback)((e=!0)=>{T(!1),w.current=setTimeout(()=>{S(!1),e&&l()},300)},[l]);if((0,j.useEffect)(()=>{if(!E||!R.current)return;const e=R.current,t=e.ownerDocument;v.current=t.activeElement,e.focus();const r=r=>{if("Escape"===r.key)return r.preventDefault(),void O();if("Tab"===r.key){const o=e.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=o[0],a=o[o.length-1],i=t.activeElement;r.shiftKey&&i===n?(r.preventDefault(),a?.focus()):r.shiftKey||i!==a||(r.preventDefault(),n?.focus())}};return t.addEventListener("keydown",r),()=>{t.removeEventListener("keydown",r),v.current?.focus()}},[E,O]),!E)return null;const b=(0,q.jsx)(H.Button,{className:"wcpay-spotlight__primary-btn",variant:"secondary",onClick:()=>{c(),O(!1)},size:"compact",children:s}),A=u&&(0,q.jsx)(H.Button,{className:"wcpay-spotlight__secondary-btn",variant:"tertiary",onClick:d,size:"compact",children:u});return(0,q.jsx)("div",{className:"wcpay-spotlight "+(g?"wcpay-spotlight--visible":""),children:(0,q.jsx)("div",{ref:R,role:"dialog","aria-modal":"true","aria-labelledby":"spotlight-heading",tabIndex:-1,className:"wcpay-spotlight__container",children:(0,q.jsxs)(H.Card,{className:`wcpay-spotlight__card ${a?"has-image":""} ${i?"has-icon":""}`,elevation:2,children:[a&&(0,q.jsx)(H.CardMedia,{className:"wcpay-spotlight__image",children:"string"==typeof a?(0,q.jsx)("img",{src:a,alt:"","aria-hidden":"true",role:"presentation"}):a}),(0,q.jsx)(H.CardHeader,{isBorderless:!0,size:"small",className:"wcpay-spotlight__header",children:(0,q.jsxs)(H.Flex,{className:"wcpay-spotlight__controls",justify:"space-between",align:"center",children:[!a&&!i&&e&&(0,q.jsx)("div",{className:"wcpay-spotlight__badge",children:(0,q.jsx)(ae,{message:e,type:h})}),!a&&!i&&!e&&(0,q.jsx)("h2",{id:"spotlight-heading",className:"wcpay-spotlight__heading",children:r}),(a||i)&&(0,q.jsx)("span",{}),(0,q.jsx)(H.Button,{className:"wcpay-spotlight__close-btn",label:(0,W.__)("Close","woocommerce-payments"),icon:(0,q.jsx)(H.Icon,{icon:$,viewBox:"6 4 12 14"}),iconSize:16,onClick:()=>O()})]})}),(0,q.jsxs)(H.CardBody,{className:"wcpay-spotlight__body",size:"small",children:[i&&(0,q.jsx)("div",{className:"wcpay-spotlight__icon",children:i}),a&&e&&(0,q.jsx)("div",{className:"wcpay-spotlight__badge",children:(0,q.jsx)(ae,{message:e,type:h})}),(a||i||e)&&(0,q.jsx)("h2",{id:"spotlight-heading",className:"wcpay-spotlight__heading",children:r}),"string"==typeof o?(0,q.jsx)("div",{className:"wcpay-spotlight__description",dangerouslySetInnerHTML:ce(o)}):(0,q.jsx)("div",{className:"wcpay-spotlight__description",children:o}),n&&("string"==typeof n?(0,q.jsx)("div",{className:"wcpay-spotlight__footnote",dangerouslySetInnerHTML:ce(n)}):(0,q.jsx)("div",{className:"wcpay-spotlight__footnote",children:n}))]}),(0,q.jsx)(H.CardFooter,{isBorderless:!0,size:"small",className:"wcpay-spotlight__footer",children:(0,q.jsx)(H.Flex,{justify:"flex-start",gap:3,children:y?(0,q.jsxs)(q.Fragment,{children:[b,A]}):(0,q.jsxs)(q.Fragment,{children:[A,b]})})})]})})})},le=window.wp.data,pe=window.wp.dataControls,me="/wc/v3/payments",_e="wc/payments",ye={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS:"SET_DEPOSITS",SET_DEPOSITS_COUNT:"SET_DEPOSITS_COUNT",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY",SET_DEPOSITS_SUMMARY:"SET_DEPOSITS_SUMMARY",SET_ERROR_FOR_DEPOSITS_SUMMARY:"SET_ERROR_FOR_DEPOSITS_SUMMARY",SET_INSTANT_DEPOSIT:"SET_INSTANT_DEPOSIT",SET_ALL_DEPOSITS_OVERVIEWS:"SET_ALL_DEPOSITS_OVERVIEWS",SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:"SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS"},he=e=>JSON.stringify(e,Object.keys(e).sort()),fe={byId:{},queries:{},count:0,instant:{}},Ee=e=>e&&e.deposits||{},Se=(e,t)=>(Ee(e).byId||{})[t],ge=e=>{const t=Ee(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:o,account:n}=t.data,a={lastPaid:r.last_paid,pending:o.pending,available:o.available,instant:o.instant},i={};for(const[e,t]of Object.entries(a))t?.forEach(t=>{const{currency:r}=t;i[r]||(i[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),i[r][e]=t});const s=Object.values(i);return{account:n,currencies:[...s.filter(e=>n.default_currency===e.currency),...s.filter(e=>n.default_currency!==e.currency)]}},Te=e=>(Ee(e).overviews||{}).error,we=(e,t)=>{const r=he(t);return(Ee(e).queries||{})[r]||{}},Re=(e,t)=>(we(e,t).data||[]).map(Se.bind(void 0,e)),ve=e=>Ee(e).count,Oe=(e,t)=>we(e,t).error||{},be=(e,t)=>{const r=he(t);return(Ee(e).summary||{})[r]||{}},Ae=(e,t)=>be(e,t).data||{},Ie=(e,t)=>be(e,t).error||{},Ne=e=>(Ee(e).instant||{}).data,De=window.wp.domReady;var Me=r.n(De);const Ce=(e,t={})=>{if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:wcpaySettings.trackingInfo?.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}Me()(()=>{(wc?.tracks?.recordEvent??wcTracks.recordEvent)(e,t)})};(0,j.createContext)(window.wcpaySettings),(0,j.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""});const Pe=window.wc.currency;var Fe=r.n(Pe);(0,W.__)("Australian dollar","woocommerce-payments"),(0,W.__)("Canadian dollar","woocommerce-payments"),(0,W.__)("Swiss franc","woocommerce-payments"),(0,W.__)("Danish krone","woocommerce-payments"),(0,W.__)("Euro","woocommerce-payments"),(0,W.__)("Pound sterling","woocommerce-payments"),(0,W.__)("Norwegian krone","woocommerce-payments"),(0,W.__)("New Zealand dollar","woocommerce-payments"),(0,W.__)("Swedish krona","woocommerce-payments"),(0,W.__)("United States (US) dollar","woocommerce-payments");const Ue=(e,t="USD",r=null,o=!1)=>{const n=(e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()))(t);n||(e/=100);const a=e<0,i=a?-1*e:e,s=a?"-":"",c=o?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:o="US"}}=wcpaySettings;if(r[o]?.code===t)return Fe()(r[o]);const n=(0,X.find)(r,{code:t});if(n){const{defaultLocale:e={}}=n;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(n.decimalSeparator=e.decimalSeparator,n.thousandSeparator=e.thousandSeparator,n.symbolPosition=e.symbolPosition),Fe()(n)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:o="US"}}=wcpaySettings,n=(0,X.find)(r,{code:e.toUpperCase()});if(n){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[o]){const e=t?(0,X.find)(r,{code:t.toUpperCase()}):r[o];e&&(n.decimalSeparator=e.decimalSeparator,n.thousandSeparator=e.thousandSeparator,n.symbolPosition=e.symbolPosition)}return Fe()(n)}return null})(t,r);if(null===c)return s+xe(i,t,n);try{return s+("function"==typeof c.formatAmount?ke(c.formatAmount(i)):ke(c.formatCurrency(i)))}catch(e){return s+ke(xe(i,t,n))}};function xe(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(o){return(0,W.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function ke(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const Le=window.wp.url,ze=window.moment;var je=r.n(ze);const Be=window.wp.date;window.wc.number;const He=e=>(0,Le.addQueryArgs)("admin.php",e),Ye=(e,t=!1)=>{const r=t?je()(e).endOf("day").utc().toISOString():je()(e).startOf("day").utc().toISOString();return e&&(0,Be.dateI18n)("Y-m-d H:i:s",r,!0)};function qe(e){return{type:ye.SET_DEPOSIT,data:e}}function $e(e){return{type:ye.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function We(e,t){return{type:ye.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Ge(e,t){return{type:ye.SET_DEPOSITS,query:e,data:t}}function Ve(e){return{type:ye.SET_DEPOSITS_COUNT,data:e}}function Qe(e,t,r){return{type:ye.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function Ze(e,t){return{type:ye.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Ke(e,t,r){return{type:ye.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function Xe(e){return{type:ye.SET_INSTANT_DEPOSIT,data:e}}function*Je(e){try{yield(0,le.dispatch)(_e).startResolution("getInstantDeposit",[e]);const t=yield(0,pe.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield Xe(t),yield(0,le.dispatch)(_e).invalidateResolutionForStoreSelector("getDeposits"),yield(0,le.dispatch)(_e).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,le.dispatch)("core/notices").createSuccessNotice((0,W.sprintf)((0,W.__)("Instant payout for %s in transit.","woocommerce-payments"),Ue(t.amount)),{actions:[{label:(0,W.__)("View details","woocommerce-payments"),url:He({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,le.dispatch)("core/notices").createErrorNotice((0,W.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,le.dispatch)(_e).finishResolution("getInstantDeposit",[e])}}function*et(e){if(/\W/.test(e))return;const t=(0,Le.addQueryArgs)(`${me}/deposits/${e}`);try{const e=yield(0,pe.apiFetch)({path:t});yield qe(e)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving payout.","woocommerce-payments"))}}function*tt(){const e=(0,Le.addQueryArgs)(`${me}/deposits/overview-all`);try{const t=yield(0,pe.apiFetch)({path:e});yield $e(t)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield We()}}const rt=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Ye(e.dateBefore,!0),date_after:Ye(e.dateAfter),date_between:e.dateBetween&&[Ye(e.dateBetween[0]),Ye(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale}),ot=`${me}/deposits/download`;function nt(e){return(0,Le.addQueryArgs)(ot,rt(e))}function*at(e){const t=(0,Le.addQueryArgs)(`${me}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...rt(e)});try{const r=yield(0,pe.apiFetch)({path:t})||{};yield Ge(e,r.data),yield Ve(r.total_count);for(const e in r.data)yield le.controls.dispatch(_e,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving payouts.","woocommerce-payments")),yield Qe(e,null,t)}}function*it(e){const t=(0,Le.addQueryArgs)(`${me}/deposits/summary`,rt(e));try{const r=yield(0,pe.apiFetch)({path:t});yield Ze(e,r)}catch(t){yield Ke(e,null,t)}}const st={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY",SET_FRAUD_OUTCOME_TRANSACTIONS:"SET_FRAUD_OUTCOME_TRANSACTIONS",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS",SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY"},ct={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},ut=e=>e&&e.transactions||{},dt=(e,t)=>{const r=he(t);return ut(e)[r]||{}},lt=(e,t)=>dt(e,t).data||[],pt=(e,t)=>dt(e,t).error||{},mt=(e,t)=>{const r=he(t);return ut(e).summary[r]||{}},_t=(e,t)=>mt(e,t).data||{},yt=(e,t)=>mt(e,t).error||{},ht=(e,t,r)=>{const o=he(r);return ut(e).fraudProtection?.[t]?.[o]||{}},ft=(e,t,r)=>ht(e,t,r).data||[],Et=(e,t,r)=>ht(e,t,r).error||{},St=(e,t,r)=>{const o=he(r);return ut(e).fraudProtection?.[t]?.summary[o]||{}},gt=(e,t,r)=>St(e,t,r).data||{},Tt=(e,t,r)=>St(e,t,r).error||{};function wt(e,t){return{type:st.SET_TRANSACTIONS,query:e,data:t}}function Rt(e,t,r){return{type:st.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function vt(e,t){return{type:st.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Ot(e,t,r){return{type:st.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function bt(e,t,r){return{type:st.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function At(e,t,r){return{type:st.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function It(e,t,r){return{type:st.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function Nt(e,t,r){return{type:st.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const Dt=e=>({user_email:e.userEmail,match:e.match,date_before:Ye(e.dateBefore,!0),date_after:Ye(e.dateAfter),date_between:e.dateBetween&&[Ye(e.dateBetween[0]),Ye(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,type_is_in:e.typeIsIn,source_device_is:e.sourceDeviceIs,source_device_is_not:e.sourceDeviceIsNot,channel_is:e.channelIs,channel_is_not:e.channelIsNot,customer_country_is:e.customerCountryIs,customer_country_is_not:e.customerCountryIsNot,risk_level_is:e.riskLevelIs,risk_level_is_not:e.riskLevelIsNot,store_currency_is:e.storeCurrencyIs,loan_id_is:e.loanIdIs,deposit_id:e.depositId,customer_currency_is:e.customerCurrencyIs,customer_currency_is_not:e.customerCurrencyIsNot,source_is:e.sourceIs,source_is_not:e.sourceIsNot,search:e.search,user_timezone:je()(new Date).format("Z"),locale:e.locale});function*Mt(e){const t=(0,Le.addQueryArgs)(`${me}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Dt(e)});try{const r=yield(0,pe.apiFetch)({path:t});yield wt(e,r.data||[])}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transactions.","woocommerce-payments")),yield Rt(e,null,t)}}const Ct=`${me}/transactions/download`;function Pt(e){return(0,Le.addQueryArgs)(Ct,Dt(e))}function*Ft(e){const t=(0,Le.addQueryArgs)(`${me}/transactions/summary`,Dt(e));try{const r=yield(0,pe.apiFetch)({path:t});yield vt(e,r)}catch(t){yield Ot(e,null,t)}}function*Ut(e,t){const r=(0,Le.addQueryArgs)(`${me}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...Dt(t)});try{const o=yield(0,pe.apiFetch)({path:r});yield bt(e,t,o.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield bt(e,t,[]));yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transactions.","woocommerce-payments")),yield At(e,t,r)}}function*xt(e,t){const r=(0,Le.addQueryArgs)(`${me}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),o={count:0,total:0};try{const n=yield(0,pe.apiFetch)({path:r});yield It(e,t,n||o)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield It(e,t,o));yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving on review transactions.","woocommerce-payments")),yield Nt(e,t,r)}}function kt(e,t){return(0,Le.addQueryArgs)(`${me}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...Dt(t)})}const Lt={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},zt=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},jt=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},Bt=(e,t)=>zt(e,t),Ht=(e,t)=>jt(e,t);function Yt(e,t){return{type:Lt.SET_CHARGE,id:e,data:t}}function qt(e,t,r){return{type:Lt.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*$t(e){try{const t=yield(0,pe.apiFetch)({path:`${me}/charges/${e}`});yield Yt(e,t)}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield qt(e,null,t)}}function*Wt(e){try{const t=yield(0,pe.apiFetch)({path:`${me}/charges/order/${e}`});yield Yt(e,t)}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield qt(e,null,t)}}const Gt={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Vt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Qt=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Zt(e,t){return{id:e,type:Gt.SET_TIMELINE,data:t}}function Kt(e,t){return{id:e,type:Gt.SET_ERROR_FOR_TIMELINE,error:t}}function*Xt(e){try{const t=yield(0,pe.apiFetch)({path:`${me}/timeline/${e}`});yield Zt(e,t.data)}catch(t){yield Kt(e,t)}}const Jt={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},er={byId:{},queries:{},summary:{},cached:{}},tr=e=>e&&e.disputes||{},rr=(e,t)=>(tr(e).byId||{})[t],or=(e,t)=>{const r=tr(e).byId||{};return r[t]?.error},nr=(e,t)=>(tr(e).cached||{})[t],ar=(e,t)=>{const r=((e,t)=>{const r=he(t);return(tr(e).queries||{})[r]||{}})(e,t).data||[];return r.map(nr.bind(void 0,e))},ir=(e,t)=>((e,t)=>{const r=he(t);return(tr(e).summary||{})[r]||{}})(e,t).data||{};var sr=function(e){return e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT",e}(sr||{});const cr=sr;function ur(e,t){return{type:cr.SET_PAYMENT_INTENT,id:e,data:t}}function dr(e,t){return{type:cr.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*lr(e,t){const r=e.payment_intent;try{yield(0,pe.apiFetch)({path:"/wc/v3/payments/refund/",method:"post",data:{charge_id:e.id,amount:e.amount,reason:t,order_id:e?.order?.id}}),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getTimeline"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield le.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Refunded payment #%s.","woocommerce-payments"),r))}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.sprintf)((0,W.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),r))}}function*pr(e){try{const t=yield(0,pe.apiFetch)({path:`${me}/payment_intents/${e}`});yield ur(e,t)}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield dr(e,t)}}function mr(e){return{type:Jt.SET_DISPUTE,data:e}}function _r(e,t,r){return{type:Jt.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function yr(e,t){return{type:Jt.SET_DISPUTES,query:e,data:t}}function hr(e,t){return{type:Jt.SET_DISPUTES_SUMMARY,query:e,data:t}}function*fr(e){const{id:t,payment_intent:r}=e;try{yield le.controls.dispatch(_e,"startResolution","getDispute",[t]);const e=yield(0,pe.apiFetch)({path:`${me}/disputes/${t}/close`,method:"post"});yield mr(e),yield pr(r),yield le.controls.dispatch(_e,"finishResolution","getDispute",[t]);const o=e.order?(0,W.sprintf)((0,W.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,W.__)("You have accepted the dispute.","woocommerce-payments");yield le.controls.dispatch("core/notices","createSuccessNotice",o)}catch(e){const r=(0,W.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield le.controls.dispatch("core/notices","createErrorNotice",r),yield le.controls.dispatch(_e,"finishResolution","getDispute",[t])}}(0,W.__)("Bank cannot process","woocommerce-payments"),(0,W.__)("Check returned","woocommerce-payments"),(0,W.__)("Credit not processed","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments"),(0,W.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments"),(0,W.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,W.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments"),(0,W.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,W.__)("Customer initiated","woocommerce-payments"),(0,W.__)("Debit not authorized","woocommerce-payments"),(0,W.__)("Duplicate","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,W.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,W.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,W.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),(0,W.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,W.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,W.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,W.__)("Transaction unauthorized","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting unauthorized transactions with you, the business.","woocommerce-payments"),(0,W.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make an unauthorized transaction. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments"),(0,W.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments"),(0,W.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),(0,W.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,W.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,W.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,W.__)("General","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments"),(0,W.__)("Incorrect account details","woocommerce-payments"),(0,W.__)("Insufficient funds","woocommerce-payments"),(0,W.__)("Product not received","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,W.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments"),(0,W.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),(0,W.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,W.__)("The cardholder claims they did not receive the product.","woocommerce-payments"),(0,W.__)("Product unacceptable","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,W.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,W.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),(0,W.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),(0,W.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),(0,W.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),(0,W.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments"),(0,W.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,W.__)("Subscription canceled","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,W.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,W.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),(0,W.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,W.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,W.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,W.__)("Unrecognized","woocommerce-payments"),(0,W.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,W.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,W.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,W.__)("Get your customer to withdraw the dispute by helping them identify the payment. Otherwise, challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments"),(0,W.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,W.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,W.__)("Non-compliant","woocommerce-payments"),(0,W.__)("Your customer’s bank claims this payment violates Visa’s rules.","woocommerce-payments"),(0,W.__)("This transaction is being reviewed under Visa’s network compliance rules.","woocommerce-payments");const Er={warning_needs_response:(0,W.__)("Inquiry: Response needed","woocommerce-payments"),warning_under_review:(0,W.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,W.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,W.__)("Response needed","woocommerce-payments"),under_review:(0,W.__)("Under review","woocommerce-payments"),charge_refunded:(0,W.__)("Charge refunded","woocommerce-payments"),won:(0,W.__)("Won","woocommerce-payments"),lost:(0,W.__)("Lost","woocommerce-payments")},Sr=(Object.entries(Er).map(([e,t])=>({label:t,value:e})).filter(function(e){return null!=e}),["needs_response","warning_needs_response"]),gr=((0,W.__)("Dispute currency","woocommerce-payments"),(0,W.__)("All currencies","woocommerce-payments"),(0,W.__)("Show","woocommerce-payments"),(0,W.__)("Needs response","woocommerce-payments"),(0,W.__)("All disputes","woocommerce-payments"),(0,W.__)("Advanced filters","woocommerce-payments"),(()=>{const e=window.wc?.wcSettings,t=e?.getSetting?.("wcVersion");return null==t?"":String(t)})()),Tr=parseFloat(gr),wr=(Tr<7.8?(0,W.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,W.__)("Disputes match <select /> filters","woocommerce-payments"),(0,W.__)("Disputed on date","woocommerce-payments"),(0,W.__)("Remove dispute date filter","woocommerce-payments"),(0,W.__)("Select a dispute date filter match","woocommerce-payments"),Tr<7.8?(0,W.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,W.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,W.__)("Select a dispute date","woocommerce-payments"),(0,W.__)("Before","woocommerce-payments"),(0,W.__)("After","woocommerce-payments"),(0,W.__)("Between","woocommerce-payments"),(0,W.__)("Status","woocommerce-payments"),(0,W.__)("Remove dispute status filter","woocommerce-payments"),(0,W.__)("Select a dispute status filter match","woocommerce-payments"),Tr<7.8?(0,W.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,W.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,W.__)("Select a dispute status","woocommerce-payments"),(0,W._x)("Is","dispute status","woocommerce-payments"),(0,W._x)("Is not","dispute status","woocommerce-payments"),e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:Ye(e.dateBefore,!0),date_after:Ye(e.dateAfter),date_between:e.dateBetween&&[Ye(e.dateBetween[0]),Ye(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?Sr:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale})),Rr=`${me}/disputes/download`;function vr(e){return(0,Le.addQueryArgs)(Rr,wr(e))}function*Or(e){const t=(0,Le.addQueryArgs)(`${me}/disputes/${e}`);try{const e=yield(0,pe.apiFetch)({path:t});yield mr(e)}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving dispute.","woocommerce-payments")),yield _r(e,void 0,t)}}function*br(e){const t=(0,Le.addQueryArgs)(`${me}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,X.snakeCase)(e.orderBy),direction:e.order,...wr(e)});try{const r=yield(0,pe.apiFetch)({path:t})||{};yield yr(e,r.data)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving disputes.","woocommerce-payments"))}}function*Ar(e){const t=(0,Le.addQueryArgs)(`${me}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...wr(e)});try{const r=yield(0,pe.apiFetch)({path:t});yield hr(e,r)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const Ir={SET_SETTINGS:"SET_SETTINGS",SET_SETTINGS_VALUES:"SET_SETTINGS_VALUES",SET_IS_SAVING_SETTINGS:"SET_IS_SAVING_SETTINGS",SET_SELECTED_PAYMENT_METHOD:"SET_SELECTED_PAYMENT_METHOD",SET_UNSELECTED_PAYMENT_METHOD:"SET_UNSELECTED_PAYMENT_METHOD"},Nr={isDirty:!1,isSaving:!1,savingError:null,data:{}},Dr={},Mr=[],Cr=e=>e&&e.settings||Dr,Pr=e=>Cr(e).data||Dr,Fr=e=>Pr(e).duplicated_payment_method_ids||Dr,Ur=e=>Pr(e).is_wcpay_enabled||!1,xr=e=>Pr(e).enabled_payment_method_ids||Mr,kr=e=>Pr(e).available_payment_method_ids||Mr,Lr=e=>Pr(e).payment_method_statuses||Dr,zr=e=>Cr(e).isSaving||!1,jr=e=>Cr(e).isDirty||!1,Br=e=>Pr(e).account_statement_descriptor||"",Hr=e=>Pr(e).account_statement_descriptor_kanji||"",Yr=e=>Pr(e).account_statement_descriptor_kana||"",qr=e=>Pr(e).account_business_support_email||"",$r=e=>Pr(e).account_business_support_phone||"",Wr=e=>Pr(e).account_domestic_currency||"",Gr=e=>Pr(e).deposit_schedule_interval||"",Vr=e=>Pr(e).deposit_schedule_weekly_anchor||"",Qr=e=>Pr(e).deposit_schedule_monthly_anchor||"",Zr=e=>Pr(e).deposit_delay_days||"7",Kr=e=>Pr(e).deposit_completed_waiting_period||!1,Xr=e=>Pr(e).deposit_status||"",Jr=e=>Pr(e).deposit_restrictions||"",eo=e=>Pr(e).is_manual_capture_enabled||!1,to=e=>Pr(e).is_test_mode_enabled||!1,ro=e=>Pr(e).is_test_mode_onboarding||!1,oo=e=>Pr(e).is_dev_mode_enabled||!1,no=e=>Pr(e).is_payment_request_enabled||!1,ao=e=>Pr(e).is_express_checkout_in_payment_methods_enabled||!1,io=e=>Pr(e).is_debug_log_enabled||!1,so=e=>Pr(e).is_multi_currency_enabled||!1,co=e=>Pr(e).payment_request_button_type||"",uo=e=>Pr(e).payment_request_button_size||"",lo=e=>Pr(e).payment_request_button_theme||"",po=e=>{const t=Pr(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},mo=e=>Pr(e).is_saved_cards_enabled||!1,_o=e=>Cr(e).savingError,yo=e=>Pr(e).is_card_present_eligible||!1,ho=e=>Pr(e).is_wcpay_subscriptions_enabled||!1,fo=e=>Pr(e).is_wcpay_subscriptions_eligible||!1,Eo=e=>Pr(e).is_subscriptions_plugin_active||!1,So=e=>Pr(e).is_woopay_enabled||!1,go=e=>Pr(e).is_woopay_global_theme_support_enabled||!1,To=e=>Pr(e).woopay_custom_message||"",wo=e=>Pr(e).woopay_store_logo||"",Ro=e=>Pr(e).current_protection_level||"basic",vo=e=>Pr(e).advanced_fraud_protection_settings||Mr,Oo=e=>Pr(e).show_woopay_incompatibility_notice||!1,bo=e=>Pr(e).is_stripe_billing_enabled||!1,Ao=e=>Pr(e).is_migrating_stripe_billing||!1,Io=e=>Pr(e).stripe_billing_subscription_count||0,No=e=>Pr(e).stripe_billing_migrated_count||0,Do=e=>Pr(e).account_communications_email||"",Mo=e=>Pr(e).express_checkout_product_methods||Mr,Co=e=>Pr(e).express_checkout_cart_methods||Mr,Po=e=>Pr(e).express_checkout_checkout_methods||Mr,Fo=window.wp.apiFetch;var Uo=r.n(Fo);function xo(e){return{type:Ir.SET_SETTINGS_VALUES,payload:e}}function ko(e){return xo({is_saved_cards_enabled:e})}function Lo(e){return xo({is_card_present_eligible:e})}function zo(e){return xo({payment_request_button_type:e})}function jo(e){return xo({payment_request_button_size:e})}function Bo(e){return xo({payment_request_button_theme:e})}function Ho(e){return xo({payment_request_button_border_radius:e})}function Yo(e){return{type:Ir.SET_SETTINGS,data:e}}function qo(e){return xo({is_wcpay_enabled:e})}function $o(e){return xo({is_payment_request_enabled:e})}function Wo(e){return xo({is_express_checkout_in_payment_methods_enabled:e})}function Go(e){return xo({enabled_payment_method_ids:[...e]})}function Vo(e,t){return{type:Ir.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function Qo(e){return{type:Ir.SET_SELECTED_PAYMENT_METHOD,id:e}}function Zo(e){return{type:Ir.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Ko(e){return xo({is_manual_capture_enabled:e})}function Xo(e){return xo({is_test_mode_enabled:e})}function Jo(e){return xo({is_debug_log_enabled:e})}function en(e){return xo({is_multi_currency_enabled:e})}function tn(e){return xo({is_wcpay_subscriptions_enabled:e})}function rn(e){return xo({account_statement_descriptor:e})}function on(e){return xo({account_statement_descriptor_kanji:e})}function nn(e){return xo({account_statement_descriptor_kana:e})}function an(e){return xo({account_business_support_email:e})}function sn(e){return xo({account_business_support_phone:e})}function cn(e){return xo({deposit_schedule_interval:e})}function un(e){return xo({deposit_schedule_weekly_anchor:e})}function dn(e){return xo({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*ln(){let e=null;try{const e=(0,le.select)(_e).getSettings();yield Vo(!0,null);const t=yield(0,pe.apiFetch)({path:`${me}/settings`,method:"post",data:e});yield xo({payment_method_statuses:t.data.payment_method_statuses}),yield(0,le.dispatch)("core/notices").createSuccessNotice((0,W.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,le.dispatch)("core/notices").createErrorNotice((0,W.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,le.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield Vo(!1,e)}return null===e}function pn(e){return xo({is_woopay_enabled:e})}function mn(e){return xo({is_woopay_global_theme_support_enabled:e})}function _n(e){return xo({woopay_custom_message:e})}function yn(e){return xo({woopay_store_logo:e})}function hn(e){return xo({current_protection_level:e})}function fn(e){return xo({advanced_fraud_protection_settings:e})}function En(e){return xo({is_stripe_billing_enabled:e})}function Sn(e){return xo({account_communications_email:e})}function gn(e){return xo({express_checkout_product_methods:[...e]})}function Tn(e){return xo({express_checkout_cart_methods:[...e]})}function wn(e){return xo({express_checkout_checkout_methods:[...e]})}function*Rn(){try{yield(0,le.dispatch)(_e).startResolution("scheduleStripeBillingMigration"),yield(0,pe.apiFetch)({path:`${me}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,le.dispatch)("core/notices").createErrorNotice((0,W.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,le.dispatch)(_e).finishResolution("scheduleStripeBillingMigration")}function vn(e,t){return Uo()({path:`${me}/settings/${e}`,method:"post",data:{value:t}}).catch(()=>{(0,le.dispatch)("core/notices").createErrorNotice((0,W.__)("Error saving option","woocommerce-payments"))})}function*On(){const e=`${me}/settings`;try{const t=yield(0,pe.apiFetch)({path:e});yield Yo(t)}catch(e){yield(0,le.dispatch)("core/notices").createErrorNotice((0,W.__)("Error retrieving settings.","woocommerce-payments"))}}const bn=e=>()=>{const{updateExpressCheckoutProductMethods:t,updateExpressCheckoutCartMethods:r,updateExpressCheckoutCheckoutMethods:o}=(0,le.useDispatch)(_e),n=(0,le.useSelect)(e=>e(_e).getExpressCheckoutProductMethods()),a=(0,le.useSelect)(e=>e(_e).getExpressCheckoutCartMethods()),i=(0,le.useSelect)(e=>e(_e).getExpressCheckoutCheckoutMethods()),s={product:n,cart:a,checkout:i},c={product:t,cart:r,checkout:o};return[[n.includes(e)&&"product",a.includes(e)&&"cart",i.includes(e)&&"checkout"].filter(Boolean),(t,r)=>{c[t](r?[...s[t],e]:s[t].filter(t=>t!==e))}]},An=(bn("payment_request"),bn("woopay"),bn("amazon_pay"),{SET_CARD_READER_STATS:"SET_CARD_READER_STATS",SET_ERROR_FOR_CARD_READER_STATS:"SET_ERROR_FOR_CARD_READER_STATS",SET_READERS:"SET_READERS",SET_ERROR_FOR_CARD_READERS:"SET_ERROR_FOR_CARD_READERS"}),In=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},Nn=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},Dn=e=>e.readers&&e.readers.list?e.readers.list:{};function Mn(e,t){return{type:An.SET_CARD_READER_STATS,id:e,data:t}}function Cn(e,t){return{type:An.SET_READERS,query:e,data:t}}function Pn(e,t,r){return{type:An.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function Fn(e,t){return{type:An.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*Un(e,t){try{const r=yield(0,pe.apiFetch)({path:`${me}/readers/charges/${t}`});yield Mn(e,r)}catch(t){yield Pn(e,null,t)}}function*xn(e){const t=(0,Le.addQueryArgs)(`${me}/readers`,{limit:e.limit});try{const r=yield(0,pe.apiFetch)({path:t})||{};yield Cn(e,r)}catch(e){yield Fn(null,e)}}var kn=function(e){return e.SET_ACTIVE_LOAN_SUMMARY="SET_ACTIVE_LOAN_SUMMARY",e.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY="SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY",e.SET_LOANS="SET_LOANS",e.SET_ERROR_FOR_LOANS="SET_ERROR_FOR_LOANS",e}(kn||{});const Ln=kn,zn={},jn=(e=zn,t)=>{switch(t.type){case Ln.SET_ACTIVE_LOAN_SUMMARY:return{...e,summary:t.data,summaryError:void 0};case Ln.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return{...e,summary:void 0,summaryError:t.error};case Ln.SET_LOANS:return{...e,loans:t.data,loansError:void 0};case Ln.SET_ERROR_FOR_LOANS:return{...e,loans:void 0,loansError:t.error}}return e};(Object.getOwnPropertyDescriptor(jn,"name")||{}).writable||Object.defineProperty(jn,"name",{value:"default",configurable:!0});const Bn=e=>e&&e.capital||{},Hn=e=>Bn(e).summary,Yn=e=>Bn(e).summaryError,qn=e=>Bn(e).loans||[],$n=e=>Bn(e).loansError;function Wn(e){return{type:Ln.SET_ACTIVE_LOAN_SUMMARY,data:e}}function Gn(e){return{type:Ln.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function Vn(e){return{type:Ln.SET_LOANS,data:e.data}}function Qn(e){return{type:Ln.SET_ERROR_FOR_LOANS,error:e}}function*Zn(){const e=`${me}/capital/active_loan_summary`;try{const t=yield(0,pe.apiFetch)({path:e});yield Wn(t)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Gn(e)}}function*Kn(){const e=`${me}/capital/loans`;try{const t=yield(0,pe.apiFetch)({path:e});yield Vn(t)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Qn(e)}}const Xn={SET_DOCUMENTS:"SET_DOCUMENTS",SET_ERROR_FOR_DOCUMENTS:"SET_ERROR_FOR_DOCUMENTS",SET_DOCUMENTS_SUMMARY:"SET_DOCUMENTS_SUMMARY",SET_ERROR_FOR_DOCUMENTS_SUMMARY:"SET_ERROR_FOR_DOCUMENTS_SUMMARY"},Jn={summary:{}},ea=e=>e&&e.documents||{},ta=(e,t)=>{const r=he(t);return ea(e)[r]||{}},ra=(e,t)=>ta(e,t).data||[],oa=(e,t)=>ta(e,t).error||{},na=(e,t)=>{const r=he(t);return ea(e).summary[r]||{}},aa=(e,t)=>na(e,t).data||{},ia=(e,t)=>na(e,t).error||{};function sa(e,t){return{type:Xn.SET_DOCUMENTS,query:e,data:t}}function ca(e,t,r){return{type:Xn.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function ua(e,t){return{type:Xn.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function da(e,t,r){return{type:Xn.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const la=e=>({user_email:e.userEmail,match:e.match,date_before:Ye(e.dateBefore,!0),date_after:Ye(e.dateAfter),date_between:e.dateBetween&&[Ye(e.dateBetween[0]),Ye(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*pa(e){const t=(0,Le.addQueryArgs)(`${me}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...la(e)});try{const r=yield(0,pe.apiFetch)({path:t});yield sa(e,r.data||[])}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving documents.","woocommerce-payments")),yield ca(e,null,t)}}function*ma(e){const t=(0,Le.addQueryArgs)(`${me}/documents/summary`,la(e));try{const r=yield(0,pe.apiFetch)({path:t});yield ua(e,r)}catch(t){yield da(e,null,t)}}const _a={},ya=({paymentIntents:e},t)=>{const r=e?.[t];return r?.data||{}},ha=({paymentIntents:e},t)=>{const r=e?.[t];return r?.error||{}},fa={SET_AUTHORIZATIONS:"SET_AUTHORIZATIONS",SET_AUTHORIZATION:"SET_AUTHORIZATION",SET_ERROR_FOR_AUTHORIZATIONS:"SET_ERROR_FOR_AUTHORIZATIONS",SET_AUTHORIZATIONS_SUMMARY:"SET_AUTHORIZATIONS_SUMMARY",SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:"SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY",SET_IS_REQUESTING_AUTHORIZATION:"SET_IS_REQUESTING_AUTHORIZATION"},Ea={summary:{},byId:{},isRequesting:!1},Sa=e=>e&&e.authorizations||{},ga=(e,t)=>{const r=he(t);return Sa(e)[r]||{}},Ta=(e,t)=>ga(e,t).data||[],wa=(e,t)=>(Sa(e).byId||{})[t],Ra=(e,t)=>ga(e,t).error||{},va=(e,t)=>{const r=he(t);return Sa(e).summary[r]||{}},Oa=(e,t)=>va(e,t).data||{},ba=(e,t)=>va(e,t).error||{},Aa=e=>Sa(e).isRequesting,Ia=e=>{const t={wcpay_missing_order:(0,W.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,W.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,W.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,W.__)("This payment cannot be processed in its current state.","woocommerce-payments"),wcpay_capture_error:e=>"amount_too_small"===e.data?.error_type?(e=>{if(!e.data?.extra_details?.minimum_amount||!e.data?.extra_details?.minimum_amount_currency)return(0,W.__)("The payment amount is too small to be processed.","woocommerce-payments");const t=e.data.extra_details.minimum_amount_currency,r=Ue(e.data.extra_details.minimum_amount,t);return(0,W.sprintf)((0,W.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),r,t.toUpperCase())})(e):(0,W.__)("The payment capture failed to complete.","woocommerce-payments"),wcpay_cancel_error:(0,W.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,W.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")}[e.code??""];return"function"==typeof t?t(e):t??(0,W.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function Na(e,t){return{type:fa.SET_AUTHORIZATIONS,data:t,query:e}}function Da(e,t){return{type:fa.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function Ma(e){return{type:fa.SET_AUTHORIZATION,data:e}}function Ca(e,t){return{type:fa.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function Pa(e){return{type:fa.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*Fa(e,t){try{yield le.controls.dispatch(_e,"startResolution","getAuthorization",[e]),yield le.controls.dispatch(_e,"setIsRequestingAuthorization",!0);const r=yield(0,pe.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield Ma(o),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getAuthorizations"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getTimeline"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getTransactions"),yield le.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,W.sprintf)((0,W.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),o=Ia(e);yield le.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield le.controls.dispatch(_e,"finishResolution","getAuthorization",[e]),yield le.controls.dispatch(_e,"setIsRequestingAuthorization",!1)}}function*Ua(e,t){try{yield le.controls.dispatch(_e,"startResolution","getAuthorization",[e]),yield le.controls.dispatch(_e,"setIsRequestingAuthorization",!0);const r=yield(0,pe.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),o={payment_intent_id:r.id,captured:"succeeded"===r.status};yield Ma(o),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getAuthorizations"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getTimeline"),yield le.controls.dispatch(_e,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield le.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,W.sprintf)((0,W.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),o=Ia(e);yield le.controls.dispatch("core/notices","createErrorNotice",`${r} ${o}`)}finally{yield le.controls.dispatch(_e,"finishResolution","getAuthorization",[e]),yield le.controls.dispatch(_e,"setIsRequestingAuthorization",!1)}}function xa(e,t){return{type:fa.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*ka(e){let{paged:t=1,per_page:r=25,orderby:o="created",order:n="asc"}=e;"capture_by"===o&&(o="created");const a=(0,Le.addQueryArgs)(`${me}/authorizations`,{page:t,pagesize:r,sort:o,direction:n});try{const t=yield(0,pe.apiFetch)({path:a});yield Na(e,t.data??[])}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield Da(e,t)}}function*La(e){try{if(e){const t=yield(0,pe.apiFetch)({path:`${me}/authorizations/${e}`}),{is_captured:r,payment_intent_id:o,created:n}=t;yield Ma({payment_intent_id:o,captured:r,created:n})}}catch(e){"authorization_missing"!==e.code&&(yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving authorization.","woocommerce-payments")))}}function*za(e){const t=(0,Le.addQueryArgs)(`${me}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,pe.apiFetch)({path:t});yield Ca(e,r??[])}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield xa(e,t)}}var ja=function(e){return e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES",e}(ja||{});const Ba=ja,Ha={},Ya=({files:e},t)=>{const r=e?.[t];return r?.data||{}},qa=({files:e},t)=>{const r=e?.[t];return r?.error||{}};function $a(e,t){return{type:Ba.SET_FILE,id:e,data:t}}function Wa(e,t){return{type:Ba.SET_ERROR_FOR_FILES,id:e,error:t}}function*Ga(e){try{const t=yield(0,pe.apiFetch)({path:`${me}/file/${e}/details`});yield $a(e,t)}catch(t){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving file.","woocommerce-payments")),yield Wa(e,t)}}let Va=function(e){return e.SET_PM_PROMOTIONS="SET_PM_PROMOTIONS",e.SET_ERROR_FOR_PM_PROMOTIONS="SET_ERROR_FOR_PM_PROMOTIONS",e}({});const Qa={pmPromotions:void 0,pmPromotionsError:void 0},Za=e=>e.pmPromotions?.pmPromotions??[],Ka=e=>e.pmPromotions?.pmPromotionsError;function Xa(e){return function(e){return"object"==typeof e&&null!==e&&"code"in e&&"string"==typeof e.code}(e)?e:{code:"unknown_error"}}function Ja(e){return{type:Va.SET_PM_PROMOTIONS,data:e}}function ei(e){return{type:Va.SET_ERROR_FOR_PM_PROMOTIONS,error:e}}function*ti(e){const t=`${me}/pm-promotions/${e}/activate`;try{yield(0,pe.apiFetch)({path:t,method:"POST"}),yield le.controls.dispatch("core/notices","createSuccessNotice",(0,W.__)("Promotion activated successfully!","woocommerce-payments")),yield le.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error activating promotion. Please try again.","woocommerce-payments")),yield le.controls.dispatch("wc/payments","updateErrorForPmPromotions",Xa(e))}}function*ri(e){const t=`${me}/pm-promotions/${e}/dismiss`;try{yield(0,pe.apiFetch)({path:t,method:"POST"}),yield le.controls.dispatch("core/notices","createSuccessNotice",(0,W.__)("Promotion dismissed.","woocommerce-payments")),yield le.controls.dispatch("wc/payments","invalidateResolution","getPmPromotions",[])}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error dismissing promotion. Please try again.","woocommerce-payments")),yield le.controls.dispatch("wc/payments","updateErrorForPmPromotions",Xa(e))}}function oi(e){if("object"!=typeof e||null===e)return!1;const t=e;return"string"==typeof t.id&&"string"==typeof t.promo_id&&"string"==typeof t.payment_method&&"string"==typeof t.payment_method_title&&"string"==typeof t.type&&("spotlight"===t.type||"badge"===t.type)&&"string"==typeof t.title&&"string"==typeof t.description&&"string"==typeof t.cta_label&&"string"==typeof t.tc_url&&"string"==typeof t.tc_label}function*ni(){const e=`${me}/pm-promotions`;try{const t=yield(0,pe.apiFetch)({path:e});if(r=t,!Array.isArray(r)||!r.every(oi))throw new Error("Invalid promotions data received from API");yield le.controls.dispatch("wc/payments","updatePmPromotions",t)}catch(e){yield le.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving promotions. Please try again later.","woocommerce-payments")),yield le.controls.dispatch("wc/payments","updateErrorForPmPromotions",(t=e,function(e){return"object"==typeof e&&null!==e&&"code"in e}(t)?t:{code:"unknown_error"}))}var t,r}(0,le.registerStore)(_e,{reducer:(0,le.combineReducers)({deposits:(e=fe,{type:t,query:r={},data:o=[],error:n})=>{const a=he(r);switch(t){case ye.SET_DEPOSIT:return{...e,byId:{...e.byId,[o.id]:o}};case ye.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:o}};case ye.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:n}};case ye.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,X.keyBy)(o,"id")},queries:{...e.queries,[a]:{data:(0,X.map)(o,"id")}}};case ye.SET_DEPOSITS_COUNT:return{...e,count:o};case ye.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:n}}};case ye.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:o}}};case ye.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:n}}};case ye.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:o}}}return e},transactions:(e=ct,{type:t,query:r={},data:o=[],error:n,status:a})=>{const i=he(r);switch(t){case st.SET_TRANSACTIONS:return{...e,[i]:{data:o}};case st.SET_ERROR_FOR_TRANSACTIONS:return{...e,[i]:{error:n}};case st.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:o}}};case st.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{error:n}}};case st.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{data:o}}}};case st.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{error:n}}}};case st.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{data:o}}}}};case st.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{error:n}}}}}}return e},charges:(e={},{type:t,id:r,data:o,error:n})=>{switch(t){case Lt.SET_CHARGE:e={...e,[r]:{...e[r],data:o}};break;case Lt.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:n}}}return e},timeline:(e={},{type:t,id:r,data:o,error:n})=>{switch(t){case Gt.SET_TIMELINE:e={...e,[r]:{data:o}};break;case Gt.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:n}}}return e},disputes:(e=er,{type:t,query:r={},data:o=[],id:n,error:a})=>{const i=he(r);switch(t){case Jt.SET_DISPUTE:return{...e,byId:{...e.byId,[o.id]:o}};case Jt.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[n]:{error:a}}};break;case Jt.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,X.keyBy)(o,"dispute_id")},queries:{...e.queries,[i]:{data:(0,X.map)(o,"dispute_id")}}};case Jt.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:o}}}}return e},settings:(e=Nr,{type:t,...r})=>{switch(t){case Ir.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case Ir.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case Ir.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case Ir.SET_SELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case Ir.SET_UNSELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter(e=>e!==r.id)}}}return e},readers:(e={},{type:t,id:r,data:o,error:n})=>{switch(t){case An.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:o}};break;case An.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:n}};break;case An.SET_READERS:e={...e,list:o}}return e},capital:jn,documents:(e=Jn,{type:t,query:r={},data:o=[],error:n})=>{const a=he(r);switch(t){case Xn.SET_DOCUMENTS:return{...e,[a]:{data:o}};case Xn.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:n}};case Xn.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:o}}};case Xn.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:n}}}}return e},paymentIntents:(e=_a,t)=>{const{type:r,id:o}=t;switch(r){case cr.SET_PAYMENT_INTENT:return{...e,[o]:{...e[o],data:t.data}};case cr.SET_ERROR_FOR_PAYMENT_INTENT:return{...e,[o]:{...e[o],error:t.error}};default:return e}},authorizations:(e=Ea,t)=>{switch(t.type){case fa.SET_AUTHORIZATION:{const{data:r}=t;return{...e,byId:{...e.byId,[r.payment_intent_id]:{...e.byId[r.payment_intent_id],...r}}}}case fa.SET_AUTHORIZATIONS:{const{data:r,query:o}=t;return{...e,[he(o)]:{data:r}}}case fa.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:o}=t;return{...e,[he(o)]:{error:r}}}case fa.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:o}=t;return{...e,summary:{...e.summary,[he(o)]:{data:r||{}}}}}case fa.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:o}=t;return{...e,summary:{...e.summary,[he(r)]:{error:o||""}}}}case fa.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return{...e,isRequesting:r}}}return e},files:(e=Ha,t)=>{const{type:r,id:o}=t;switch(r){case Ba.SET_FILE:return{...e,[o]:{...e[o],data:t.data}};case Ba.SET_ERROR_FOR_FILES:return{...e,[o]:{...e[o],error:t.error}};default:return e}},pmPromotions:(e=Qa,t)=>{switch(t.type){case Va.SET_PM_PROMOTIONS:return{...e,pmPromotions:t.data,pmPromotionsError:void 0};case Va.SET_ERROR_FOR_PM_PROMOTIONS:return{...e,pmPromotions:void 0,pmPromotionsError:t.error}}return e}}),actions:{...t,...a,...c,...l,...h,...S,...w,...O,...I,..._,...C,...U,...L},controls:pe.controls,selectors:{...e,...n,...s,...d,...m,...E,...T,...v,...A,...D,...M,...F,...k},resolvers:{...o,...i,...u,...p,...f,...g,...R,...b,...N,...y,...P,...x,...z}});const ai=()=>{const e=window.location.pathname+window.location.search;return e.includes("path=%2Fpayments%2Foverview")?"wcpay-overview":e.includes("path=%2Fpayments%2Fsettings")?"wcpay-settings":e.includes("page=wc-settings")&&e.includes("tab=checkout")?"wc-settings-payments":"unknown"},ii=()=>{const{pmPromotions:e,isLoading:t}=(0,le.useSelect)(e=>{const{getPmPromotions:t,getPmPromotionsError:r,isResolving:o}=e(_e);return{pmPromotions:t(),pmPromotionsError:r(),isLoading:o("getPmPromotions")}}),{activatePmPromotion:r,dismissPmPromotion:o}=(()=>{const{activatePmPromotion:e,dismissPmPromotion:t}=(0,le.useDispatch)(_e);return{activatePmPromotion:e,dismissPmPromotion:t}})(),n=(0,j.useMemo)(()=>e?.find(e=>"spotlight"===e.type),[e]),a=(0,j.useCallback)(()=>({promo_id:n?.promo_id,payment_method:n?.payment_method,display_context:"spotlight",source:ai(),path:window.location.pathname+window.location.search}),[n?.promo_id,n?.payment_method]),i=(0,j.useCallback)(()=>{Ce("wcpay_payment_method_promotion_view",a())},[a]),s=(0,j.useCallback)(()=>{n&&(Ce("wcpay_payment_method_promotion_activate_click",a()),r(n.id))},[a,r,n]),c=(0,j.useCallback)(()=>{if(n&&(Ce("wcpay_payment_method_promotion_link_click",{...a(),link_type:"terms"}),n.tc_url))try{const e=new URL(n.tc_url);"https:"!==e.protocol&&"http:"!==e.protocol||window.open(n.tc_url,"_blank","noopener,noreferrer")}catch{}},[a,n]),u=(0,j.useCallback)(()=>{n&&(Ce("wcpay_payment_method_promotion_dismiss_click",a()),o(n.id))},[a,o,n]);return t?null:e&&0!==e.length&&n?(0,q.jsx)(de,{badge:n.badge_text,badgeType:n.badge_type,heading:n.title,description:n.description,footnote:n.footnote,image:n.image,primaryButtonLabel:n.cta_label,onPrimaryClick:s,secondaryButtonLabel:n.tc_label,onSecondaryClick:c,onDismiss:u,onView:i}):null},si=()=>{const e=document.getElementById("wcpay-payments-settings-spotlight");e&&(0,B.H)(e).render((0,q.jsx)(ii,{}))};"interactive"===document.readyState||"complete"===document.readyState?si():window.addEventListener("DOMContentLoaded",si)})()})();