%PDF- %PDF-
Direktori : /var/www/byggtema.eco-n-tech.co.uk/wp-content/plugins/woocommerce/assets/client/admin/data/ |
Current File : /var/www/byggtema.eco-n-tech.co.uk/wp-content/plugins/woocommerce/assets/client/admin/data/index.js |
/*! For license information please see index.js.LICENSE.txt */ !function(){var e={2864:function(e,t,r){"use strict";var n=r(49556),o=r(25592),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},25592:function(e,t,r){"use strict";var n=r(22698),o=r(49556),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=s(n,a,arguments);if(c&&u){var r=c(t,"length");r.configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var p=function(){return s(n,i,arguments)};u?u(e.exports,"apply",{value:p}):e.exports.apply=p},29203:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},54274:function(e){var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++)t.push((e[r]>>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3)for(var o=e[n]<<16|e[n+1]<<8|e[n+2],i=0;i<4;i++)8*n+6*i<=8*e.length?r.push(t.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<e.length;o=++n%4)0!=o&&r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(n))>>>6-2*o);return r}},e.exports=r},74944:function(e){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,r=Object.isFrozen,n=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,i=Object.freeze,a=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,l=c.construct;u||(u=function(e,t,r){return e.apply(t,r)}),i||(i=function(e){return e}),a||(a=function(e){return e}),l||(l=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t))))});var p,d=_(Array.prototype.forEach),f=_(Array.prototype.pop),y=_(Array.prototype.push),m=_(String.prototype.toLowerCase),g=_(String.prototype.match),h=_(String.prototype.replace),E=_(String.prototype.indexOf),S=_(String.prototype.trim),T=_(RegExp.prototype.test),v=(p=TypeError,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return l(p,t)});function _(e){return function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return u(e,t,n)}}function A(e,n){t&&t(e,null);for(var o=n.length;o--;){var i=n[o];if("string"==typeof i){var a=m(i);a!==i&&(r(n)||(n[o]=a),i=a)}e[i]=!0}return e}function b(t){var r=s(null),n=void 0;for(n in t)u(e,t,[n])&&(r[n]=t[n]);return r}function R(e,t){for(;null!==e;){var r=o(e,t);if(r){if(r.get)return _(r.get);if("function"==typeof r.value)return _(r.value)}e=n(e)}return function(e){return console.warn("fallback value for",e),null}}var w=i(["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"]),k=i(["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"]),O=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=i(["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"]),I=i(["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"]),N=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C=i(["#text"]),U=i(["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"]),L=i(["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"]),D=i(["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"]),x=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=a(/\{\{[\s\S]*|[\s\S]*\}\}/gm),M=a(/<%[\s\S]*|[\s\S]*%>/gm),G=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),q=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),W=a(/^(?:\w+script|data):/i),H=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i),B="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};function z(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}var $=function(){return"undefined"==typeof window?null:window},Q=function(e,t){if("object"!==(void 0===e?"undefined":B(e))||"function"!=typeof e.createPolicy)return null;var r=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(r=t.currentScript.getAttribute(n));var o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$(),r=function(t){return e(t)};if(r.version="2.3.6",r.removed=[],!t||!t.document||9!==t.document.nodeType)return r.isSupported=!1,r;var n=t.document,o=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,c=t.Node,u=t.Element,l=t.NodeFilter,p=t.NamedNodeMap,_=void 0===p?t.NamedNodeMap||t.MozNamedAttrMap:p,J=t.HTMLFormElement,V=t.DOMParser,K=t.trustedTypes,Z=u.prototype,X=R(Z,"cloneNode"),ee=R(Z,"nextSibling"),te=R(Z,"childNodes"),re=R(Z,"parentNode");if("function"==typeof s){var ne=o.createElement("template");ne.content&&ne.content.ownerDocument&&(o=ne.content.ownerDocument)}var oe=Q(K,n),ie=oe?oe.createHTML(""):"",ae=o,se=ae.implementation,ce=ae.createNodeIterator,ue=ae.createDocumentFragment,le=ae.getElementsByTagName,pe=n.importNode,de={};try{de=b(o).documentMode?o.documentMode:{}}catch(e){}var fe={};r.isSupported="function"==typeof re&&se&&void 0!==se.createHTMLDocument&&9!==de;var ye=F,me=M,ge=G,he=j,Ee=W,Se=H,Te=q,ve=null,_e=A({},[].concat(z(w),z(k),z(O),z(I),z(C))),Ae=null,be=A({},[].concat(z(U),z(L),z(D),z(x))),Re=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}})),we=null,ke=null,Oe=!0,Pe=!0,Ie=!1,Ne=!1,Ce=!1,Ue=!1,Le=!1,De=!1,xe=!1,Fe=!1,Me=!0,Ge=!0,je=!1,qe={},We=null,He=A({},["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"]),Ye=null,Be=A({},["audio","video","img","source","image","track"]),ze=null,$e=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml",Ke=Ve,Ze=!1,Xe=void 0,et=["application/xhtml+xml","text/html"],tt="text/html",rt=void 0,nt=null,ot=o.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},at=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":B(e))||(e={}),e=b(e),ve="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS):_e,Ae="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR):be,ze="ADD_URI_SAFE_ATTR"in e?A(b($e),e.ADD_URI_SAFE_ATTR):$e,Ye="ADD_DATA_URI_TAGS"in e?A(b(Be),e.ADD_DATA_URI_TAGS):Be,We="FORBID_CONTENTS"in e?A({},e.FORBID_CONTENTS):He,we="FORBID_TAGS"in e?A({},e.FORBID_TAGS):{},ke="FORBID_ATTR"in e?A({},e.FORBID_ATTR):{},qe="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Pe=!1!==e.ALLOW_DATA_ATTR,Ie=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=e.SAFE_FOR_TEMPLATES||!1,Ce=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Ge=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Te=e.ALLOWED_URI_REGEXP||Te,Ke=e.NAMESPACE||Ve,e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Re.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Re.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Re.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xe=Xe=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?tt:e.PARSER_MEDIA_TYPE,rt="application/xhtml+xml"===Xe?function(e){return e}:m,Ne&&(Pe=!1),xe&&(De=!0),qe&&(ve=A({},[].concat(z(C))),Ae=[],!0===qe.html&&(A(ve,w),A(Ae,U)),!0===qe.svg&&(A(ve,k),A(Ae,L),A(Ae,x)),!0===qe.svgFilters&&(A(ve,O),A(Ae,L),A(Ae,x)),!0===qe.mathMl&&(A(ve,I),A(Ae,D),A(Ae,x))),e.ADD_TAGS&&(ve===_e&&(ve=b(ve)),A(ve,e.ADD_TAGS)),e.ADD_ATTR&&(Ae===be&&(Ae=b(Ae)),A(Ae,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&A(ze,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(We===He&&(We=b(We)),A(We,e.FORBID_CONTENTS)),Ge&&(ve["#text"]=!0),Ce&&A(ve,["html","head","body"]),ve.table&&(A(ve,["tbody"]),delete we.tbody),i&&i(e),nt=e)},st=A({},["mi","mo","mn","ms","mtext"]),ct=A({},["foreignobject","desc","title","annotation-xml"]),ut=A({},k);A(ut,O),A(ut,P);var lt=A({},I);A(lt,N);var pt=function(e){var t=re(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});var r=m(e.tagName),n=m(t.tagName);if(e.namespaceURI===Je)return t.namespaceURI===Ve?"svg"===r:t.namespaceURI===Qe?"svg"===r&&("annotation-xml"===n||st[n]):Boolean(ut[r]);if(e.namespaceURI===Qe)return t.namespaceURI===Ve?"math"===r:t.namespaceURI===Je?"math"===r&&ct[n]:Boolean(lt[r]);if(e.namespaceURI===Ve){if(t.namespaceURI===Je&&!ct[n])return!1;if(t.namespaceURI===Qe&&!st[n])return!1;var o=A({},["title","style","font","a","script"]);return!lt[r]&&(o[r]||!ut[r])}return!1},dt=function(e){y(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},ft=function(e,t){try{y(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){y(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(De||xe)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){var t=void 0,r=void 0;if(Le)e="<remove></remove>"+e;else{var n=g(e,/^[\r\n\t ]+/);r=n&&n[0]}"application/xhtml+xml"===Xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=oe?oe.createHTML(e):e;if(Ke===Ve)try{t=(new V).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Ze?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&r&&a.insertBefore(o.createTextNode(r),a.childNodes[0]||null),Ke===Ve?le.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:a},mt=function(e){return ce.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},gt=function(e){return e instanceof J&&("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)},ht=function(e){return"object"===(void 0===c?"undefined":B(c))?e instanceof c:e&&"object"===(void 0===e?"undefined":B(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Et=function(e,t,n){fe[e]&&d(fe[e],(function(e){e.call(r,t,n,nt)}))},St=function(e){var t=void 0;if(Et("beforeSanitizeElements",e,null),gt(e))return dt(e),!0;if(g(e.nodeName,/[\u0080-\uFFFF]/))return dt(e),!0;var n=rt(e.nodeName);if(Et("uponSanitizeElement",e,{tagName:n,allowedTags:ve}),!ht(e.firstElementChild)&&(!ht(e.content)||!ht(e.content.firstElementChild))&&T(/<[/\w]/g,e.innerHTML)&&T(/<[/\w]/g,e.textContent))return dt(e),!0;if("select"===n&&T(/<template/i,e.innerHTML))return dt(e),!0;if(!ve[n]||we[n]){if(!we[n]&&vt(n)){if(Re.tagNameCheck instanceof RegExp&&T(Re.tagNameCheck,n))return!1;if(Re.tagNameCheck instanceof Function&&Re.tagNameCheck(n))return!1}if(Ge&&!We[n]){var o=re(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(X(i[a],!0),ee(e))}return dt(e),!0}return e instanceof u&&!pt(e)?(dt(e),!0):"noscript"!==n&&"noembed"!==n||!T(/<\/no(script|embed)/i,e.innerHTML)?(Ne&&3===e.nodeType&&(t=e.textContent,t=h(t,ye," "),t=h(t,me," "),e.textContent!==t&&(y(r.removed,{element:e.cloneNode()}),e.textContent=t)),Et("afterSanitizeElements",e,null),!1):(dt(e),!0)},Tt=function(e,t,r){if(Me&&("id"===t||"name"===t)&&(r in o||r in ot))return!1;if(Pe&&!ke[t]&&T(ge,t));else if(Oe&&T(he,t));else if(!Ae[t]||ke[t]){if(!(vt(e)&&(Re.tagNameCheck instanceof RegExp&&T(Re.tagNameCheck,e)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(e))&&(Re.attributeNameCheck instanceof RegExp&&T(Re.attributeNameCheck,t)||Re.attributeNameCheck instanceof Function&&Re.attributeNameCheck(t))||"is"===t&&Re.allowCustomizedBuiltInElements&&(Re.tagNameCheck instanceof RegExp&&T(Re.tagNameCheck,r)||Re.tagNameCheck instanceof Function&&Re.tagNameCheck(r))))return!1}else if(ze[t]);else if(T(Te,h(r,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(r,"data:")||!Ye[e])if(Ie&&!T(Ee,h(r,Se,"")));else if(r)return!1;return!0},vt=function(e){return e.indexOf("-")>0},_t=function(e){var t=void 0,n=void 0,o=void 0,i=void 0;Et("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};for(i=a.length;i--;){var c=t=a[i],u=c.name,l=c.namespaceURI;if(n=S(t.value),o=rt(u),s.attrName=o,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,Et("uponSanitizeAttribute",e,s),n=s.attrValue,!s.forceKeepAttr&&(ft(u,e),s.keepAttr))if(T(/\/>/i,n))ft(u,e);else{Ne&&(n=h(n,ye," "),n=h(n,me," "));var p=rt(e.nodeName);if(Tt(p,o,n))try{l?e.setAttributeNS(l,u,n):e.setAttribute(u,n),f(r.removed)}catch(e){}}}Et("afterSanitizeAttributes",e,null)}},At=function e(t){var r=void 0,n=mt(t);for(Et("beforeSanitizeShadowDOM",t,null);r=n.nextNode();)Et("uponSanitizeShadowNode",r,null),St(r)||(r.content instanceof a&&e(r.content),_t(r));Et("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e,o){var i=void 0,s=void 0,u=void 0,l=void 0,p=void 0;if((Ze=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw v("toString is not a function");if("string"!=typeof(e=e.toString()))throw v("dirty is not a string, aborting")}if(!r.isSupported){if("object"===B(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ht(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ue||at(o),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){var d=rt(e.nodeName);if(!ve[d]||we[d])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)1===(s=(i=yt("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?i=s:i.appendChild(s);else{if(!De&&!Ne&&!Ce&&-1===e.indexOf("<"))return oe&&Fe?oe.createHTML(e):e;if(!(i=yt(e)))return De?null:Fe?ie:""}i&&Le&&dt(i.firstChild);for(var f=mt(je?e:i);u=f.nextNode();)3===u.nodeType&&u===l||St(u)||(u.content instanceof a&&At(u.content),_t(u),l=u);if(l=null,je)return e;if(De){if(xe)for(p=ue.call(i.ownerDocument);i.firstChild;)p.appendChild(i.firstChild);else p=i;return Ae.shadowroot&&(p=pe.call(n,p,!0)),p}var y=Ce?i.outerHTML:i.innerHTML;return Ce&&ve["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&T(Y,i.ownerDocument.doctype.name)&&(y="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+y),Ne&&(y=h(y,ye," "),y=h(y,me," ")),oe&&Fe?oe.createHTML(y):y},r.setConfig=function(e){at(e),Ue=!0},r.clearConfig=function(){nt=null,Ue=!1},r.isValidAttribute=function(e,t,r){nt||at({});var n=rt(e),o=rt(t);return Tt(n,o,r)},r.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],y(fe[e],t))},r.removeHook=function(e){fe[e]&&f(fe[e])},r.removeHooks=function(e){fe[e]&&(fe[e]=[])},r.removeAllHooks=function(){fe={}},r}()}()},59748:function(e){"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(t+i);for(var a,s=r.call(arguments,1),c=function(){if(this instanceof a){var t=i.apply(this,s.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,s.concat(r.call(arguments)))},u=Math.max(0,i.length-s.length),l=[],p=0;p<u;p++)l.push("$"+p);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var d=function(){};d.prototype=i.prototype,a.prototype=new d,d.prototype=null}return a}},22698:function(e,t,r){"use strict";var n=r(59748);e.exports=Function.prototype.bind||n},49556:function(e,t,r){"use strict";var n,o=SyntaxError,i=Function,a=TypeError,s=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var u=function(){throw new a},l=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,p=r(71732)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},y="undefined"==typeof Uint8Array?n:d(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":p?d([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?d(d([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?d((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?d((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?d(""[Symbol.iterator]()):n,"%Symbol%":p?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":y,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=d(o.prototype))}return m[t]=r,r},h={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=r(22698),S=r(22786),T=E.call(Function.call,Array.prototype.concat),v=E.call(Function.apply,Array.prototype.splice),_=E.call(Function.call,String.prototype.replace),A=E.call(Function.call,String.prototype.slice),b=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R=/\\(\\)?/g,w=function(e){var t=A(e,0,1),r=A(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return _(e,b,(function(e,t,r,o){n[n.length]=r?_(o,R,"$1"):t||e})),n},k=function(e,t){var r,n=e;if(S(h,n)&&(n="%"+(r=h[n])[0]+"%"),S(m,n)){var i=m[n];if(i===f&&(i=g(n)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');var r=w(e),n=r.length>0?r[0]:"",i=k("%"+n+"%",t),s=i.name,u=i.value,l=!1,p=i.alias;p&&(n=p[0],v(r,T([0,1],p)));for(var d=1,f=!0;d<r.length;d+=1){var y=r[d],g=A(y,0,1),h=A(y,-1);if(('"'===g||"'"===g||"`"===g||'"'===h||"'"===h||"`"===h)&&g!==h)throw new o("property names with quotes must have matching quotes");if("constructor"!==y&&f||(l=!0),S(m,s="%"+(n+="."+y)+"%"))u=m[s];else if(null!=u){if(!(y in u)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&d+1>=r.length){var E=c(u,y);u=(f=!!E)&&"get"in E&&!("originalValue"in E.get)?E.get:u[y]}else f=S(u,y),u=u[y];f&&!l&&(m[s]=u)}}return u}},71732:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(76849);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},76849:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},22786:function(e,t,r){"use strict";var n=r(22698);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},17476:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},5681:function(e,t,r){var n,o,i,a,s;n=r(54274),o=r(29203).utf8,i=r(17476),a=r(29203).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):o.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,p=-1732584194,d=271733878,f=0;f<r.length;f++)r[f]=16711935&(r[f]<<8|r[f]>>>24)|4278255360&(r[f]<<24|r[f]>>>8);r[c>>>5]|=128<<c%32,r[14+(c+64>>>9<<4)]=c;var y=s._ff,m=s._gg,g=s._hh,h=s._ii;for(f=0;f<r.length;f+=16){var E=u,S=l,T=p,v=d;u=y(u,l,p,d,r[f+0],7,-680876936),d=y(d,u,l,p,r[f+1],12,-389564586),p=y(p,d,u,l,r[f+2],17,606105819),l=y(l,p,d,u,r[f+3],22,-1044525330),u=y(u,l,p,d,r[f+4],7,-176418897),d=y(d,u,l,p,r[f+5],12,1200080426),p=y(p,d,u,l,r[f+6],17,-1473231341),l=y(l,p,d,u,r[f+7],22,-45705983),u=y(u,l,p,d,r[f+8],7,1770035416),d=y(d,u,l,p,r[f+9],12,-1958414417),p=y(p,d,u,l,r[f+10],17,-42063),l=y(l,p,d,u,r[f+11],22,-1990404162),u=y(u,l,p,d,r[f+12],7,1804603682),d=y(d,u,l,p,r[f+13],12,-40341101),p=y(p,d,u,l,r[f+14],17,-1502002290),u=m(u,l=y(l,p,d,u,r[f+15],22,1236535329),p,d,r[f+1],5,-165796510),d=m(d,u,l,p,r[f+6],9,-1069501632),p=m(p,d,u,l,r[f+11],14,643717713),l=m(l,p,d,u,r[f+0],20,-373897302),u=m(u,l,p,d,r[f+5],5,-701558691),d=m(d,u,l,p,r[f+10],9,38016083),p=m(p,d,u,l,r[f+15],14,-660478335),l=m(l,p,d,u,r[f+4],20,-405537848),u=m(u,l,p,d,r[f+9],5,568446438),d=m(d,u,l,p,r[f+14],9,-1019803690),p=m(p,d,u,l,r[f+3],14,-187363961),l=m(l,p,d,u,r[f+8],20,1163531501),u=m(u,l,p,d,r[f+13],5,-1444681467),d=m(d,u,l,p,r[f+2],9,-51403784),p=m(p,d,u,l,r[f+7],14,1735328473),u=g(u,l=m(l,p,d,u,r[f+12],20,-1926607734),p,d,r[f+5],4,-378558),d=g(d,u,l,p,r[f+8],11,-2022574463),p=g(p,d,u,l,r[f+11],16,1839030562),l=g(l,p,d,u,r[f+14],23,-35309556),u=g(u,l,p,d,r[f+1],4,-1530992060),d=g(d,u,l,p,r[f+4],11,1272893353),p=g(p,d,u,l,r[f+7],16,-155497632),l=g(l,p,d,u,r[f+10],23,-1094730640),u=g(u,l,p,d,r[f+13],4,681279174),d=g(d,u,l,p,r[f+0],11,-358537222),p=g(p,d,u,l,r[f+3],16,-722521979),l=g(l,p,d,u,r[f+6],23,76029189),u=g(u,l,p,d,r[f+9],4,-640364487),d=g(d,u,l,p,r[f+12],11,-421815835),p=g(p,d,u,l,r[f+15],16,530742520),u=h(u,l=g(l,p,d,u,r[f+2],23,-995338651),p,d,r[f+0],6,-198630844),d=h(d,u,l,p,r[f+7],10,1126891415),p=h(p,d,u,l,r[f+14],15,-1416354905),l=h(l,p,d,u,r[f+5],21,-57434055),u=h(u,l,p,d,r[f+12],6,1700485571),d=h(d,u,l,p,r[f+3],10,-1894986606),p=h(p,d,u,l,r[f+10],15,-1051523),l=h(l,p,d,u,r[f+1],21,-2054922799),u=h(u,l,p,d,r[f+8],6,1873313359),d=h(d,u,l,p,r[f+15],10,-30611744),p=h(p,d,u,l,r[f+6],15,-1560198380),l=h(l,p,d,u,r[f+13],21,1309151649),u=h(u,l,p,d,r[f+4],6,-145523070),d=h(d,u,l,p,r[f+11],10,-1120210379),p=h(p,d,u,l,r[f+2],15,718787259),l=h(l,p,d,u,r[f+9],21,-343485551),u=u+E>>>0,l=l+S>>>0,p=p+T>>>0,d=d+v>>>0}return n.endian([u,l,p,d])})._ff=function(e,t,r,n,o,i,a){var s=e+(t&r|~t&n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._gg=function(e,t,r,n,o,i,a){var s=e+(t&n|r&~n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._hh=function(e,t,r,n,o,i,a){var s=e+(t^r^n)+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._ii=function(e,t,r,n,o,i,a){var s=e+(r^(t|~n))+(o>>>0)+a;return(s<<i|s>>>32-i)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(s(e,t));return t&&t.asBytes?r:t&&t.asString?a.bytesToString(r):n.bytesToHex(r)}},38419:function(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&c&&"function"==typeof c.get?c.get:null,l=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,h=String.prototype.match,E=String.prototype.slice,S=String.prototype.replace,T=String.prototype.toUpperCase,v=String.prototype.toLowerCase,_=RegExp.prototype.test,A=Array.prototype.concat,b=Array.prototype.join,R=Array.prototype.slice,w=Math.floor,k="function"==typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,N="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,C=Object.prototype.propertyIsEnumerable,U=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||_.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-w(-e):w(e);if(n!==e){var o=String(n),i=E.call(t,o.length+1);return S.call(o,r,"$&_")+"."+S.call(S.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return S.call(t,r,"$&_")}var D=r(31780).custom,x=D&&j(D)?D:null;function F(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function M(e){return S.call(String(e),/"/g,""")}function G(e){return!("[object Array]"!==H(e)||N&&"object"==typeof e&&N in e)}function j(e){if(I)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!P)return!1;try{return P.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var s=r||{};if(W(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(W(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!W(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return B(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var T=String(t);return m?L(t,T):T}if("bigint"==typeof t){var _=String(t)+"n";return m?L(t,_):_}var w=void 0===s.depth?5:s.depth;if(void 0===n&&(n=0),n>=w&&w>0&&"object"==typeof t)return G(t)?"[Array]":"[Object]";var O,D=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=b.call(Array(e.indent+1)," ")}return{base:r,prev:b.call(Array(t+1),r)}}(s,n);if(void 0===o)o=[];else if(Y(o,t)>=0)return"[Circular]";function q(t,r,i){if(r&&(o=R.call(o)).push(r),i){var a={depth:s.depth};return W(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,n+1,o)}return e(t,s,n+1,o)}if("function"==typeof t){var z=function(e){if(e.name)return e.name;var t=h.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),Z=K(t,q);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(Z.length>0?" { "+b.call(Z,", ")+" }":"")}if(j(t)){var X=I?S.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):P.call(t);return"object"!=typeof t||I?X:$(X)}if((O=t)&&"object"==typeof O&&("undefined"!=typeof HTMLElement&&O instanceof HTMLElement||"string"==typeof O.nodeName&&"function"==typeof O.getAttribute)){for(var ee="<"+v.call(String(t.nodeName)),te=t.attributes||[],re=0;re<te.length;re++)ee+=" "+te[re].name+"="+F(M(te[re].value),"double",s);return ee+=">",t.childNodes&&t.childNodes.length&&(ee+="..."),ee+"</"+v.call(String(t.nodeName))+">"}if(G(t)){if(0===t.length)return"[]";var ne=K(t,q);return D&&!function(e){for(var t=0;t<e.length;t++)if(Y(e[t],"\n")>=0)return!1;return!0}(ne)?"["+V(ne,D)+"]":"[ "+b.call(ne,", ")+" ]"}if(function(e){return!("[object Error]"!==H(e)||N&&"object"==typeof e&&N in e)}(t)){var oe=K(t,q);return"cause"in t&&!C.call(t,"cause")?"{ ["+String(t)+"] "+b.call(A.call("[cause]: "+q(t.cause),oe),", ")+" }":0===oe.length?"["+String(t)+"]":"{ ["+String(t)+"] "+b.call(oe,", ")+" }"}if("object"==typeof t&&c){if(x&&"function"==typeof t[x])return t[x]();if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{u.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ie=[];return a.call(t,(function(e,r){ie.push(q(r,t,!0)+" => "+q(e,t))})),J("Map",i.call(t),ie,D)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ae=[];return l.call(t,(function(e){ae.push(q(e,t))})),J("Set",u.call(t),ae,D)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Q("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Q("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Q("WeakRef");if(function(e){return!("[object Number]"!==H(e)||N&&"object"==typeof e&&N in e)}(t))return $(q(Number(t)));if(function(e){if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}(t))return $(q(k.call(t)));if(function(e){return!("[object Boolean]"!==H(e)||N&&"object"==typeof e&&N in e)}(t))return $(y.call(t));if(function(e){return!("[object String]"!==H(e)||N&&"object"==typeof e&&N in e)}(t))return $(q(String(t)));if(!function(e){return!("[object Date]"!==H(e)||N&&"object"==typeof e&&N in e)}(t)&&!function(e){return!("[object RegExp]"!==H(e)||N&&"object"==typeof e&&N in e)}(t)){var se=K(t,q),ce=U?U(t)===Object.prototype:t instanceof Object||t.constructor===Object,ue=t instanceof Object?"":"null prototype",le=!ce&&N&&Object(t)===t&&N in t?E.call(H(t),8,-1):ue?"Object":"",pe=(ce||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(le||ue?"["+b.call(A.call([],le||[],ue||[]),": ")+"] ":"");return 0===se.length?pe+"{}":D?pe+"{"+V(se,D)+"}":pe+"{ "+b.call(se,", ")+" }"}return String(t)};var q=Object.prototype.hasOwnProperty||function(e){return e in this};function W(e,t){return q.call(e,t)}function H(e){return m.call(e)}function Y(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function B(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return B(E.call(e,0,t.maxStringLength),t)+n}return F(S.call(S.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",t)}function z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+T.call(t.toString(16))}function $(e){return"Object("+e+")"}function Q(e){return e+" { ? }"}function J(e,t,r,n){return e+" ("+t+") {"+(n?V(r,n):b.call(r,", "))+"}"}function V(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+b.call(e,","+r)+"\n"+t.prev}function K(e,t){var r=G(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=W(e,o)?t(e[o],e):""}var i,a="function"==typeof O?O(e):[];if(I){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)W(e,c)&&(r&&String(Number(c))===c&&c<e.length||I&&i["$"+c]instanceof Symbol||(_.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof O)for(var u=0;u<a.length;u++)C.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}},38243:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},79119:function(e,t,r){"use strict";var n=r(67576),o=r(93649),i=r(38243);e.exports={formats:i,parse:o,stringify:n}},93649:function(e,t,r){"use strict";var n=r(7173),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var p=0;r.depth>0&&null!==(s=a.exec(i))&&p<r.depth;){if(p+=1,!r.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+i.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:c(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==u&&(a[u]=o):a={0:o}}o=a}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,p),f=-1,y=t.charset;if(t.charsetSentinel)for(r=0;r<d.length;++r)0===d[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[r]?y="utf-8":"utf8=%26%2310003%3B"===d[r]&&(y="iso-8859-1"),f=r,r=d.length);for(r=0;r<d.length;++r)if(r!==f){var m,g,h=d[r],E=h.indexOf("]="),S=-1===E?h.indexOf("="):E+1;-1===S?(m=t.decoder(h,a.decoder,y,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(h.slice(0,S),a.decoder,y,"key"),g=n.maybeMap(c(h.slice(S+1),t),(function(e){return t.decoder(e,a.decoder,y,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===y&&(g=s(g)),h.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(u,m)?u[m]=n.combine(u[m],g):u[m]=g}return u}(e,r):e,p=r.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var y=d[f],m=u(y,l[y],r,"string"==typeof e);p=n.merge(p,m,r)}return!0===r.allowSparse?p:n.compact(p)}},67576:function(e,t,r){"use strict";var n=r(44852),o=r(7173),i=r(38243),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=String.prototype.split,l=Array.prototype.push,p=function(e,t){l.apply(e,c(t)?t:[t])},d=Date.prototype.toISOString,f=i.default,y={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m={},g=function e(t,r,i,a,s,l,d,f,g,h,E,S,T,v,_){for(var A,b=t,R=_,w=0,k=!1;void 0!==(R=R.get(m))&&!k;){var O=R.get(t);if(w+=1,void 0!==O){if(O===w)throw new RangeError("Cyclic object value");k=!0}void 0===R.get(m)&&(w=0)}if("function"==typeof d?b=d(r,b):b instanceof Date?b=h(b):"comma"===i&&c(b)&&(b=o.maybeMap(b,(function(e){return e instanceof Date?h(e):e}))),null===b){if(a)return l&&!T?l(r,y.encoder,v,"key",E):r;b=""}if("string"==typeof(A=b)||"number"==typeof A||"boolean"==typeof A||"symbol"==typeof A||"bigint"==typeof A||o.isBuffer(b)){if(l){var P=T?r:l(r,y.encoder,v,"key",E);if("comma"===i&&T){for(var I=u.call(String(b),","),N="",C=0;C<I.length;++C)N+=(0===C?"":",")+S(l(I[C],y.encoder,v,"value",E));return[S(P)+"="+N]}return[S(P)+"="+S(l(b,y.encoder,v,"value",E))]}return[S(r)+"="+S(String(b))]}var U,L=[];if(void 0===b)return L;if("comma"===i&&c(b))U=[{value:b.length>0?b.join(",")||null:void 0}];else if(c(d))U=d;else{var D=Object.keys(b);U=f?D.sort(f):D}for(var x=0;x<U.length;++x){var F=U[x],M="object"==typeof F&&void 0!==F.value?F.value:b[F];if(!s||null!==M){var G=c(b)?"function"==typeof i?i(r,F):r:r+(g?"."+F:"["+F+"]");_.set(t,w);var j=n();j.set(m,_),p(L,e(M,G,i,a,s,l,d,f,g,h,E,S,T,v,j))}}return L};e.exports=function(e,t){var r,o=e,u=function(e){if(!e)return y;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||y.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=y.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:y.addQueryPrefix,allowDots:void 0===e.allowDots?y.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:y.charsetSentinel,delimiter:void 0===e.delimiter?y.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:y.encode,encoder:"function"==typeof e.encoder?e.encoder:y.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:y.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:y.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:y.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:y.strictNullHandling}}(t);"function"==typeof u.filter?o=(0,u.filter)("",o):c(u.filter)&&(r=u.filter);var l,d=[];if("object"!=typeof o||null===o)return"";l=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[l];r||(r=Object.keys(o)),u.sort&&r.sort(u.sort);for(var m=n(),h=0;h<r.length;++h){var E=r[h];u.skipNulls&&null===o[E]||p(d,g(o[E],E,f,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,m))}var S=d.join(u.delimiter),T=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?T+="utf8=%26%2310003%3B&":T+="utf8=%E2%9C%93&"),S.length>0?T+S:""}},7173:function(e,t,r){"use strict";var n=r(38243),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:u}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",u=0;u<s.length;++u){var l=s.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=s(t,n)),i(t)&&i(r)?(r.forEach((function(r,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&r&&"object"==typeof r?t[i]=e(a,r,n):t.push(r)}else t[i]=r})),t):Object.keys(r).reduce((function(t,i){var a=r[i];return o.call(t,i)?t[i]=e(t[i],a,n):t[i]=a,t}),a)}}},44852:function(e,t,r){"use strict";var n=r(49556),o=r(2864),i=r(38419),a=n("%TypeError%"),s=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),d=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),y=o("Map.prototype.has",!0),m=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new a("Side channel does not contain "+i(e))},get:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(c){if(t)return d(t,n)}else if(r)return function(e,t){var r=m(e,t);return r&&r.value}(r,n)},has:function(n){if(s&&n&&("object"==typeof n||"function"==typeof n)){if(e)return p(e,n)}else if(c){if(t)return y(t,n)}else if(r)return function(e,t){return!!m(e,t)}(r,n);return!1},set:function(n,o){s&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new s),l(e,n,o)):c?(t||(t=new c),f(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=m(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},31780:function(){}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{COUNTRIES_STORE_NAME:function(){return _i},DAY:function(){return ce},EXPORT_STORE_NAME:function(){return Fs},HOUR:function(){return se},IMPORT_STORE_NAME:function(){return ac},ITEMS_STORE_NAME:function(){return wa},MAX_PER_PAGE:function(){return oe},MINUTE:function(){return ae},MONTH:function(){return le},NAMESPACE:function(){return te},NAVIGATION_STORE_NAME:function(){return na},NOTES_STORE_NAME:function(){return qo},ONBOARDING_STORE_NAME:function(){return Qn},OPTIONS_STORE_NAME:function(){return Nt},PAYMENT_GATEWAYS_STORE_NAME:function(){return $a},PLUGINS_STORE_NAME:function(){return qt},QUERY_DEFAULTS:function(){return pe},REPORTS_STORE_NAME:function(){return oi},REVIEWS_STORE_NAME:function(){return go},SECOND:function(){return ie},SETTINGS_STORE_NAME:function(){return Pe},USER_STORE_NAME:function(){return Vn},WCS_NAMESPACE:function(){return ne},WC_ADMIN_NAMESPACE:function(){return re},WEEK:function(){return ue},getFilterQuery:function(){return ls},getLeaderboard:function(){return aa},getReportChartData:function(){return Ss},getReportTableData:function(){return _s},getReportTableQuery:function(){return vs},getSummaryNumbers:function(){return fs},getTooltipValueFormat:function(){return Ts},getVisibleTasks:function(){return ss},isRestApiError:function(){return We},pluginNames:function(){return Ne},searchItemsByString:function(){return sa},useOptionsHydration:function(){return ts},useSettings:function(){return ns},useUser:function(){return as},useUserPreferences:function(){return is},withCurrentUserHydration:function(){return Za},withNavigationHydration:function(){return Xa},withOnboardingHydration:function(){return Ka},withOptionsHydration:function(){return rs},withPluginsHydration:function(){return es},withSettingsHydration:function(){return Va}});var e={};r.r(e),r.d(e,{getDirtyKeys:function(){return z},getIsDirty:function(){return $},getLastSettingsErrorForGroup:function(){return K},getSetting:function(){return V},getSettings:function(){return B},getSettingsError:function(){return Z},getSettingsForGroup:function(){return Q},getSettingsGroupNames:function(){return Y},isUpdateSettingsRequesting:function(){return J}});var t={};r.r(t),r.d(t,{clearIsDirty:function(){return ve},clearSettings:function(){return be},persistSettingsForGroup:function(){return Ae},setIsRequesting:function(){return Te},updateAndPersistSettingsForGroup:function(){return _e},updateErrorForGroup:function(){return Se},updateSettingsForGroup:function(){return Ee}});var o={};r.r(o),r.d(o,{getSettings:function(){return we},getSettingsForGroup:function(){return ke}});var i={};r.r(i),r.d(i,{getActivePlugins:function(){return Ce},getInstalledPlugins:function(){return Ue},getJetpackConnectUrl:function(){return Fe},getPaypalOnboardingStatus:function(){return Ge},getPluginInstallState:function(){return Me},getPluginsError:function(){return De},getRecommendedPlugins:function(){return je},isJetpackConnected:function(){return xe},isPluginsRequesting:function(){return Le}});var a={};r.r(a),r.d(a,{activatePlugins:function(){return nt},connectToJetpack:function(){return it},connectToJetpackWithFailureRedirect:function(){return st},createErrorNotice:function(){return Ze},dismissRecommendedPlugins:function(){return ut},installAndActivatePlugins:function(){return ot},installJetpackAndConnect:function(){return at},installPlugins:function(){return rt},setError:function(){return Je},setIsRequesting:function(){return Qe},setPaypalOnboardingStatus:function(){return Xe},setRecommendedPlugins:function(){return et},updateActivePlugins:function(){return ze},updateInstalledPlugins:function(){return $e},updateIsJetpackConnected:function(){return Ve},updateJetpackConnectUrl:function(){return Ke}});var s={};r.r(s),r.d(s,{getOption:function(){return dt},getOptionsRequestingError:function(){return ft},getOptionsUpdatingError:function(){return mt},isOptionsUpdating:function(){return yt}});var c={};r.r(c),r.d(c,{receiveOptions:function(){return Tt},setIsUpdating:function(){return At},setRequestingError:function(){return vt},setUpdatingError:function(){return _t},updateOptions:function(){return bt}});var u={};r.r(u),r.d(u,{getOption:function(){return It}});var l={};r.r(l),r.d(l,{getActivePlugins:function(){return Ut},getInstalledPlugins:function(){return Lt},getJetpackConnectUrl:function(){return xt},getPaypalOnboardingStatus:function(){return Mt},getRecommendedPlugins:function(){return jt},isJetpackConnected:function(){return Dt}});var p={};r.r(p),r.d(p,{getEmailPrefill:function(){return rr},getFreeExtensions:function(){return $t},getOnboardingError:function(){return er},getPaymentGatewaySuggestions:function(){return Xt},getProductTypes:function(){return nr},getProfileItems:function(){return Qt},getTask:function(){return Zt},getTaskList:function(){return Kt},getTaskLists:function(){return Jt},getTaskListsByIds:function(){return Vt},isOnboardingRequesting:function(){return tr}});var d={};r.r(d),r.d(d,{actionTask:function(){return Dn},actionTaskError:function(){return vn},actionTaskRequest:function(){return _n},actionTaskSuccess:function(){return An},dismissTask:function(){return In},dismissTaskError:function(){return nn},dismissTaskRequest:function(){return on},dismissTaskSuccess:function(){return an},getFreeExtensionsError:function(){return Yr},getFreeExtensionsSuccess:function(){return Br},getProductTypesError:function(){return Rn},getProductTypesSuccess:function(){return bn},getTaskListsError:function(){return Jr},getTaskListsSuccess:function(){return Vr},hideTaskList:function(){return Cn},hideTaskListError:function(){return ln},hideTaskListRequest:function(){return pn},hideTaskListSuccess:function(){return dn},keepCompletedTaskList:function(){return wn},keepCompletedTaskListSuccess:function(){return hn},optimisticallyCompleteTask:function(){return Ln},optimisticallyCompleteTaskRequest:function(){return gn},setEmailPrefill:function(){return Tn},setError:function(){return zr},setIsRequesting:function(){return $r},setPaymentMethods:function(){return Sn},setProfileItems:function(){return Qr},snoozeTask:function(){return On},snoozeTaskError:function(){return Kr},snoozeTaskRequest:function(){return Zr},snoozeTaskSuccess:function(){return Xr},undoDismissTask:function(){return Nn},undoDismissTaskError:function(){return sn},undoDismissTaskRequest:function(){return cn},undoDismissTaskSuccess:function(){return un},undoSnoozeTask:function(){return Pn},undoSnoozeTaskError:function(){return en},undoSnoozeTaskRequest:function(){return tn},undoSnoozeTaskSuccess:function(){return rn},unhideTaskList:function(){return Un},unhideTaskListError:function(){return fn},unhideTaskListRequest:function(){return yn},unhideTaskListSuccess:function(){return mn},updateProfileItems:function(){return kn},visitedTask:function(){return En}});var f={};r.r(f),r.d(f,{getEmailPrefill:function(){return Mn},getFreeExtensions:function(){return Yn},getPaymentGatewaySuggestions:function(){return Hn},getProductTypes:function(){return Bn},getProfileItems:function(){return Fn},getTask:function(){return Wn},getTaskList:function(){return qn},getTaskLists:function(){return Gn},getTaskListsByIds:function(){return jn}});var y={};r.r(y),r.d(y,{getReviews:function(){return Zn},getReviewsError:function(){return eo},getReviewsTotalCount:function(){return Xn}});var m={};r.r(m),r.d(m,{deleteReview:function(){return so},setError:function(){return lo},setReview:function(){return uo},setReviewIsUpdating:function(){return co},updateReview:function(){return ao},updateReviews:function(){return io}});var g={};r.r(g),r.d(g,{getReviews:function(){return yo},getReviewsTotalCount:function(){return mo}});var h={};r.r(h),r.d(h,{getNotes:function(){return Eo},getNotesError:function(){return So},isNotesRequesting:function(){return To}});var E={};r.r(E),r.d(E,{batchUpdateNotes:function(){return Io},removeAllNotes:function(){return Po},removeNote:function(){return Oo},setError:function(){return xo},setIsRequesting:function(){return Fo},setNote:function(){return Co},setNoteIsUpdating:function(){return Uo},setNotes:function(){return Lo},setNotesQuery:function(){return Do},triggerNoteAction:function(){return ko},updateNote:function(){return No}});var S={};r.r(S),r.d(S,{getNotes:function(){return jo}});var T={};r.r(T),r.d(T,{getReportItems:function(){return Bo},getReportItemsError:function(){return Yo},getReportStats:function(){return zo},getReportStatsError:function(){return $o}});var v={};r.r(v),r.d(v,{setReportItems:function(){return Xo},setReportItemsError:function(){return Zo},setReportStats:function(){return ei},setReportStatsError:function(){return ti}});var _={};r.r(_),r.d(_,{getReportItems:function(){return ri},getReportStats:function(){return ni}});var A={};r.r(A),r.d(A,{getCountries:function(){return ci},getCountry:function(){return ui},getLocale:function(){return si},getLocales:function(){return ai}});var b={};r.r(b),r.d(b,{getCountriesError:function(){return gi},getCountriesSuccess:function(){return mi},getLocalesError:function(){return yi},getLocalesSuccess:function(){return fi}});var R={};r.r(R),r.d(R,{getCountries:function(){return vi},getCountry:function(){return Ti},getLocale:function(){return Ei},getLocales:function(){return Si}});var w={};r.r(w),r.d(w,{getFavorites:function(){return Ri},getMenuItems:function(){return bi},getPersistedQuery:function(){return ki},isNavigationRequesting:function(){return wi}});var k={};r.r(k),r.d(k,{addFavorite:function(){return ea},addFavoriteFailure:function(){return $i},addFavoriteRequest:function(){return zi},addFavoriteSuccess:function(){return Qi},addMenuItems:function(){return Wi},getFavoritesFailure:function(){return Hi},getFavoritesRequest:function(){return Yi},getFavoritesSuccess:function(){return Bi},onHistoryChange:function(){return Xi},onLoad:function(){return Zi},removeFavorite:function(){return ta},removeFavoriteFailure:function(){return Vi},removeFavoriteRequest:function(){return Ji},removeFavoriteSuccess:function(){return Ki},setMenuItems:function(){return qi}});var O={};r.r(O),r.d(O,{getFavorites:function(){return ra}});var P={};r.r(P),r.d(P,{getItems:function(){return ua},getItemsError:function(){return pa},getItemsTotalCount:function(){return la}});var I={};r.r(I),r.d(I,{createProductFromTemplate:function(){return va},setError:function(){return Sa},setItem:function(){return ga},setItems:function(){return ha},setItemsTotalCount:function(){return Ea},updateProductStock:function(){return Ta}});var N={};r.r(N),r.d(N,{getItems:function(){return Aa},getItemsTotalCount:function(){return Ra},getReviewsTotalCount:function(){return ba}});var C={};r.r(C),r.d(C,{getPaymentGatewayError:function(){return Ua},getPaymentGatewayRequest:function(){return Ca},getPaymentGatewaySuccess:function(){return La},getPaymentGatewaysError:function(){return Na},getPaymentGatewaysRequest:function(){return Pa},getPaymentGatewaysSuccess:function(){return Ia},updatePaymentGateway:function(){return Ma},updatePaymentGatewayError:function(){return Fa},updatePaymentGatewayRequest:function(){return xa},updatePaymentGatewaySuccess:function(){return Da}});var U={};r.r(U),r.d(U,{getPaymentGateway:function(){return qa},getPaymentGateways:function(){return ja}});var L={};r.r(L),r.d(L,{getPaymentGateway:function(){return Wa},getPaymentGatewayError:function(){return Ya},getPaymentGateways:function(){return Ha},isPaymentGatewayUpdating:function(){return Ba}});var D={};r.r(D),r.d(D,{getError:function(){return Ps},getExportId:function(){return Os},isExportRequesting:function(){return ks}});var x={};r.r(x),r.d(x,{setError:function(){return Ds},setExportId:function(){return Us},setIsRequesting:function(){return Ls},startExport:function(){return xs}});var F={};r.r(F),r.d(F,{getFormSettings:function(){return js},getImportError:function(){return Hs},getImportStarted:function(){return Gs},getImportStatus:function(){return qs},getImportTotals:function(){return Ws}});var M={};r.r(M),r.d(M,{setImportError:function(){return rc},setImportPeriod:function(){return Zs},setImportStarted:function(){return Ks},setImportStatus:function(){return ec},setImportTotals:function(){return tc},setSkipPrevious:function(){return Xs},updateImportation:function(){return nc}});var G={};r.r(G),r.d(G,{getImportStatus:function(){return oc},getImportTotals:function(){return ic}}),window.wp.coreData;var j=window.wp.data,q=window.wp.dataControls;const W="wc/admin/settings";function H(e,t){return`${e}:${JSON.stringify(t,Object.keys(t).sort())}`}const Y=e=>[...new Set(Object.keys(e).map((e=>function(e){const t=e.indexOf(":");return t<0?e:e.substring(0,t)}(e))))],B=(e,t)=>{const r={},n=e[t]&&e[t].data||[];return 0===n.length||n.forEach((n=>{r[n]=e[H(t,n)].data})),r},z=(e,t)=>e[t].dirty||[],$=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const n=z(e,t);return 0!==n.length&&r.some((e=>n.includes(e)))},Q=(e,t,r)=>{const n=B(e,t);return r.reduce(((e,t)=>(e[t]=n[t]||{},e)),{})},J=(e,t)=>e[t]&&Boolean(e[t].isRequesting);function V(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e=>e;const i=H(t,r),a=e[i]&&e[i].data||n;return o(a,n)}const K=(e,t)=>{const r=e[t].data;return 0===r.length?e[t].error:[...r].pop().error},Z=(e,t,r)=>r?e[H(t,r)].error||!1:e[t]&&e[t].error||!1;var X=window.wp.i18n,ee=window.lodash;const te="/wc-analytics",re="/wc-admin",ne="/wc/v1",oe=100,ie=1e3,ae=60*ie,se=60*ae,ce=24*se,ue=7*ce,le=365*ce/12,pe={pageSize:25,period:"month",compare:"previous_year",noteTypes:["info","marketing","survey","warning"]};var de="UPDATE_SETTINGS_FOR_GROUP",fe="UPDATE_ERROR_FOR_GROUP",ye="CLEAR_SETTINGS",me="SET_IS_REQUESTING",ge="CLEAR_IS_DIRTY";const he=j.controls&&j.controls.resolveSelect?j.controls.resolveSelect:q.select;function Ee(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Date;return{type:de,group:e,data:t,time:r}}function Se(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date;return{type:fe,group:e,data:t,error:r,time:n}}function Te(e,t){return{type:me,group:e,isRequesting:t}}function ve(e){return{type:ge,group:e}}function*_e(e,t){yield Ee(e,t),yield*Ae(e)}function*Ae(e){yield Te(e,!0);const t=yield he(W,"getDirtyKeys",e);if(0===t.length)return void(yield Te(e,!1));const r=yield he(W,"getSettingsForGroup",e,t),n=`${te}/settings/${e}/batch`,o=t.reduce(((e,t)=>{const n=Object.keys(r[t]).map((e=>({id:e,value:r[t][e]})));return(0,ee.concat)(e,n)}),[]);try{const t=yield(0,q.apiFetch)({path:n,method:"POST",data:{update:o}});if(yield Te(e,!1),!t)throw new Error((0,X.__)("There was a problem updating your settings.","woocommerce"));yield ve(e)}catch(t){throw yield Se(e,null,t),yield Te(e,!1),t}}function be(){return{type:ye}}const Re=j.controls&&j.controls.dispatch?j.controls.dispatch:q.dispatch;function*we(e){yield Re(W,"setIsRequesting",e,!0);try{const t=te+"/settings/"+e;return Ee(e,{[e]:(yield(0,q.apiFetch)({path:t,method:"GET"})).reduce(((e,t)=>(e[t.id]=t.value,e)),{})})}catch(t){return Se(e,null,t.message)}}function*ke(e){return we(e)}const Oe=(e,t)=>{let{group:r,groupIds:n,data:o,time:i,error:a}=t;return n.forEach((t=>{e[H(r,t)]={data:o[t],lastReceived:i,error:a}})),e};(0,j.registerStore)(W,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:t,group:r,data:n,error:o,time:i,isRequesting:a}=arguments.length>1?arguments[1]:void 0;const s={};switch(t){case me:e={...e,[r]:{...e[r],isRequesting:a}};break;case ge:e={...e,[r]:{...e[r],dirty:[]}};break;case de:case fe:const t=n?Object.keys(n):[];e=null===n?{...e,[r]:{data:e[r]?e[r].data:[],error:o,lastReceived:i}}:{...e,[r]:{data:e[r]&&e[r].data?[...e[r].data,...t]:t,error:o,lastReceived:i,isRequesting:!1,dirty:e[r]&&e[r].dirty?(0,ee.union)(e[r].dirty,t):t},...Oe(s,{group:r,groupIds:t,data:n,time:i,error:o})};break;case ye:e={}}return e},actions:t,controls:q.controls,selectors:e,resolvers:o});const Pe=W,Ie="wc/admin/plugins",Ne={"facebook-for-woocommerce":(0,X.__)("Facebook for WooCommerce","woocommerce"),jetpack:(0,X.__)("Jetpack","woocommerce"),"klarna-checkout-for-woocommerce":(0,X.__)("Klarna Checkout for WooCommerce","woocommerce"),"klarna-payments-for-woocommerce":(0,X.__)("Klarna Payments for WooCommerce","woocommerce"),"mailchimp-for-woocommerce":(0,X.__)("Mailchimp for WooCommerce","woocommerce"),"creative-mail-by-constant-contact":(0,X.__)("Creative Mail for WooCommerce","woocommerce"),"woocommerce-gateway-paypal-express-checkout":(0,X.__)("WooCommerce PayPal","woocommerce"),"woocommerce-gateway-stripe":(0,X.__)("WooCommerce Stripe","woocommerce"),"woocommerce-payfast-gateway":(0,X.__)("WooCommerce PayFast","woocommerce"),"woocommerce-payments":(0,X.__)("WooCommerce Payments","woocommerce"),"woocommerce-services":(0,X.__)("WooCommerce Shipping & Tax","woocommerce"),"woocommerce-services:shipping":(0,X.__)("WooCommerce Shipping & Tax","woocommerce"),"woocommerce-services:tax":(0,X.__)("WooCommerce Shipping & Tax","woocommerce"),"woocommerce-shipstation-integration":(0,X.__)("WooCommerce ShipStation Gateway","woocommerce"),"woocommerce-mercadopago":(0,X.__)("Mercado Pago payments for WooCommerce","woocommerce"),"google-listings-and-ads":(0,X.__)("Google Listings and Ads","woocommerce"),"woo-razorpay":(0,X.__)("Razorpay","woocommerce"),mailpoet:(0,X.__)("MailPoet","woocommerce"),"pinterest-for-woocommerce":(0,X.__)("Pinterest for WooCommerce","woocommerce")},Ce=e=>e.active||[],Ue=e=>e.installed||[],Le=(e,t)=>e.requesting[t]||!1,De=(e,t)=>e.errors[t]||!1,xe=e=>e.jetpackConnection,Fe=(e,t)=>e.jetpackConnectUrls[t.redirect_url],Me=(e,t)=>e.active.includes(t)?"activated":e.installed.includes(t)?"installed":"unavailable",Ge=e=>e.paypalOnboardingStatus,je=(e,t)=>e.recommended[t];var qe;!function(e){e.UPDATE_ACTIVE_PLUGINS="UPDATE_ACTIVE_PLUGINS",e.UPDATE_INSTALLED_PLUGINS="UPDATE_INSTALLED_PLUGINS",e.SET_IS_REQUESTING="SET_IS_REQUESTING",e.SET_ERROR="SET_ERROR",e.UPDATE_JETPACK_CONNECTION="UPDATE_JETPACK_CONNECTION",e.UPDATE_JETPACK_CONNECT_URL="UPDATE_JETPACK_CONNECT_URL",e.SET_PAYPAL_ONBOARDING_STATUS="SET_PAYPAL_ONBOARDING_STATUS",e.SET_RECOMMENDED_PLUGINS="SET_RECOMMENDED_PLUGINS"}(qe||(qe={}));const We=e=>void 0!==e.code&&void 0!==e.message,He=j.controls&&j.controls.dispatch?j.controls.dispatch:q.dispatch,Ye=j.controls&&j.controls.resolveSelect?j.controls.resolveSelect:q.select;class Be extends Error{constructor(e,t){super(e),this.data=t}}function ze(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:qe.UPDATE_ACTIVE_PLUGINS,active:e,replace:t}}function $e(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:qe.UPDATE_INSTALLED_PLUGINS,installed:e,replace:t}}function Qe(e,t){return{type:qe.SET_IS_REQUESTING,selector:e,isRequesting:t}}function Je(e,t){return{type:qe.SET_ERROR,selector:e,error:t}}function Ve(e){return{type:qe.UPDATE_JETPACK_CONNECTION,jetpackConnection:e}}function Ke(e,t){return{type:qe.UPDATE_JETPACK_CONNECT_URL,jetpackConnectUrl:t,redirectUrl:e}}const Ze=e=>He("core/notices","createNotice","error",e);function Xe(e){return{type:qe.SET_PAYPAL_ONBOARDING_STATUS,paypalOnboardingStatus:e}}function et(e,t){return{type:qe.SET_RECOMMENDED_PLUGINS,recommendedType:e,plugins:t}}function*tt(e,t,r){yield Je("installPlugins",r);let n=r;throw(r instanceof Error||We(r))&&t[0]&&(n={[t[0]]:[r.message]}),((e,t)=>"object"==typeof t&&null!==t&&e[0]in t)(t,n)?new Be(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"install";return(0,X.sprintf)((0,X._n)("Could not %(actionType)s %(pluginName)s plugin, %(error)s","Could not %(actionType)s the following plugins: %(pluginName)s with these Errors: %(error)s",Object.keys(e).length||1,"woocommerce"),{actionType:t,pluginName:Object.keys(e).join(", "),error:Object.values(e).join(", \n")})}(n,e),n):new Be(`Unexpected Plugin Error: ${JSON.stringify(n)}`,n)}function*rt(e){yield Qe("installPlugins",!0);try{const t=yield(0,q.apiFetch)({path:`${re}/plugins/install`,method:"POST",data:{plugins:e.join(",")}});if(t.data.installed.length&&(yield $e(t.data.installed)),Object.keys(t.errors.errors).length)throw t.errors.errors;return yield Qe("installPlugins",!1),t}catch(t){yield tt("install",e,t)}}function*nt(e){yield Qe("activatePlugins",!0);try{const t=yield(0,q.apiFetch)({path:`${re}/plugins/activate`,method:"POST",data:{plugins:e.join(",")}});if(t.data.activated.length&&(yield ze(t.data.activated)),Object.keys(t.errors.errors).length)throw t.errors.errors;return yield Qe("activatePlugins",!1),t}catch(t){yield tt("activate",e,t)}}function*ot(e){try{const t=yield He(Ie,"installPlugins",e),r=yield He(Ie,"activatePlugins",e);return{...r,data:{...r.data,...t.data}}}catch(e){throw e}}function*it(e){const t=yield Ye(Ie,"getJetpackConnectUrl",{redirect_url:e("admin.php?page=wc-admin")}),r=yield Ye(Ie,"getPluginsError","getJetpackConnectUrl");if(r)throw new Error(r);return t}function*at(e,t){try{yield He(Ie,"installPlugins",["jetpack"]),yield He(Ie,"activatePlugins",["jetpack"]);const e=yield He(Ie,"connectToJetpack",t);window.location.href=e}catch(t){if(!(t instanceof Error))throw t;yield e(t.message)}}function*st(e,t,r){try{const e=yield He(Ie,"connectToJetpack",r);window.location.href=e}catch(r){if(!(r instanceof Error))throw r;yield t(r.message),window.location.href=e}}const ct=["payments"];function*ut(e){if(!ct.includes(e))return[];const t=yield Ye(Ie,"getRecommendedPlugins",e);let r;yield et(e,[]);try{const e=re+"/payment-gateway-suggestions/dismiss";r=yield(0,q.apiFetch)({path:e,method:"POST"})}catch(e){r=!1}return r||(yield et(e,t)),r}var lt=window.wp.url;const pt="wc/admin/options",dt=(e,t)=>e[t],ft=(e,t)=>e.requestingErrors[t]||!1,yt=e=>e.isUpdating||!1,mt=e=>e.updatingError||!1;var gt="RECEIVE_OPTIONS",ht="SET_IS_UPDATING",Et="SET_REQUESTING_ERROR",St="SET_UPDATING_ERROR";function Tt(e){return{type:gt,options:e}}function vt(e,t){return{type:Et,error:e,name:t}}function _t(e){return{type:St,error:e}}function At(e){return{type:ht,isUpdating:e}}function*bt(e){yield At(!0),yield Tt(e);try{const t=yield(0,q.apiFetch)({path:re+"/options",method:"POST",data:e});return yield At(!1),{success:!0,...t}}catch(e){return yield _t(e),{success:!1,...e}}}var Rt=window.wp.apiFetch,wt=r.n(Rt);let kt=[];const Ot={},Pt={...q.controls,BATCH_FETCH(e){let{optionName:t}=e;return kt.push(t),new Promise((e=>{setTimeout((function(){if(Ot[t])return Ot[t].then((t=>{e(t)}));const r=[...new Set(kt)].join(","),n=re+"/options?options="+r,o=wt()({path:n});o.then((t=>e(t))),kt.forEach((e=>{Ot[e]=o,Ot[e].then((()=>{delete Ot[e]}))})),kt=[]}),1)}))}};function*It(e){try{const r=yield(t=e,{type:"BATCH_FETCH",optionName:t});yield Tt(r)}catch(t){yield vt(t,e)}var t}(0,j.registerStore)(pt,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isUpdating:!1,requestingErrors:{}},{type:t,options:r,error:n,isUpdating:o,name:i}=arguments.length>1?arguments[1]:void 0;switch(t){case gt:e={...e,...r};break;case ht:e={...e,isUpdating:o};break;case Et:e={...e,requestingErrors:{[i]:n}};break;case St:e={...e,error:n,updatingError:n,isUpdating:!1}}return e},actions:c,controls:Pt,selectors:s,resolvers:u});const Nt=pt,Ct=j.controls&&j.controls.resolveSelect?j.controls.resolveSelect:q.select;function*Ut(){yield Qe("getActivePlugins",!0);try{const e=re+"/plugins/active",t=yield(0,q.apiFetch)({path:e,method:"GET"});yield ze(t.plugins,!0)}catch(e){yield Je("getActivePlugins",e)}}function*Lt(){yield Qe("getInstalledPlugins",!0);try{const e=re+"/plugins/installed",t=yield(0,q.apiFetch)({path:e,method:"GET"});yield $e(t.plugins,!0)}catch(e){yield Je("getInstalledPlugins",e)}}function*Dt(){yield Qe("isJetpackConnected",!0);try{const e="/jetpack/v4/connection",t=yield(0,q.apiFetch)({path:e,method:"GET"});yield Ve(t.isActive)}catch(e){yield Je("isJetpackConnected",e)}yield Qe("isJetpackConnected",!1)}function*xt(e){yield Qe("getJetpackConnectUrl",!0);try{const t=(0,lt.addQueryArgs)(re+"/plugins/connect-jetpack",e),r=yield(0,q.apiFetch)({path:t,method:"GET"});yield Ke(e.redirect_url,r.connectAction)}catch(e){yield Je("getJetpackConnectUrl",e)}yield Qe("getJetpackConnectUrl",!1)}function*Ft(){const e=yield Ct(Nt,"getOption","woocommerce-ppcp-settings"),t=e.merchant_email_production&&e.merchant_id_production&&e.client_id_production&&e.client_secret_production;yield Xe({production:{state:t?"onboarded":"unknown",onboarded:!!t}})}function*Mt(){yield Qe("getPaypalOnboardingStatus",!0);const e=yield Ct(Ie,"getPluginsError","getPaypalOnboardingStatus");if(e&&e.data&&404===e.data.status)yield Ft();else try{const e="/wc-paypal/v1/onboarding/get-status",t=yield(0,q.apiFetch)({path:e,method:"GET"});yield Xe(t)}catch(e){yield Ft(),yield Je("getPaypalOnboardingStatus",e)}yield Qe("getPaypalOnboardingStatus",!1)}const Gt=["payments"];function*jt(e){if(!Gt.includes(e))return[];yield Qe("getRecommendedPlugins",!0);try{const t=re+"/payment-gateway-suggestions",r=yield(0,q.apiFetch)({path:t,method:"GET"});yield et(e,r)}catch(e){yield Je("getRecommendedPlugins",e)}yield Qe("getRecommendedPlugins",!1)}(0,j.registerStore)(Ie,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{active:[],installed:[],requesting:{},errors:{},jetpackConnectUrls:{},recommended:{}},t=arguments.length>1?arguments[1]:void 0;if(t&&"type"in t)switch(t.type){case qe.UPDATE_ACTIVE_PLUGINS:e={...e,active:t.replace?t.active:(0,ee.concat)(e.active,t.active),requesting:{...e.requesting,getActivePlugins:!1,activatePlugins:!1},errors:{...e.errors,getActivePlugins:!1,activatePlugins:!1}};break;case qe.UPDATE_INSTALLED_PLUGINS:e={...e,installed:t.replace?t.installed:(0,ee.concat)(e.installed,t.installed),requesting:{...e.requesting,getInstalledPlugins:!1,installPlugins:!1},errors:{...e.errors,getInstalledPlugins:!1,installPlugin:!1}};break;case qe.SET_IS_REQUESTING:e={...e,requesting:{...e.requesting,[t.selector]:t.isRequesting}};break;case qe.SET_ERROR:e={...e,requesting:{...e.requesting,[t.selector]:!1},errors:{...e.errors,[t.selector]:t.error}};break;case qe.UPDATE_JETPACK_CONNECTION:e={...e,jetpackConnection:t.jetpackConnection};break;case qe.UPDATE_JETPACK_CONNECT_URL:e={...e,jetpackConnectUrls:{...e.jetpackConnectUrls,[t.redirectUrl]:t.jetpackConnectUrl}};break;case qe.SET_PAYPAL_ONBOARDING_STATUS:e={...e,paypalOnboardingStatus:t.paypalOnboardingStatus};break;case qe.SET_RECOMMENDED_PLUGINS:e={...e,recommended:{...e.recommended,[t.recommendedType]:t.plugins}}}return e},actions:a,controls:q.controls,selectors:i,resolvers:l});const qt=Ie,Wt="wc/admin/onboarding";var Ht={};function Yt(e){return[e]}function Bt(e,t,r){var n;if(e.length!==t.length)return!1;for(n=r;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function zt(e,t){var r,n=t||Yt;function o(e){var t,n,o,i,a,s=r,c=!0;for(t=0;t<e.length;t++){if(!(a=n=e[t])||"object"!=typeof a){c=!1;break}s.has(n)?s=s.get(n):(o=new WeakMap,s.set(n,o),s=o)}return s.has(Ht)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=c,s.set(Ht,i)),s.get(Ht)}function i(){r=new WeakMap}function a(){var t,r,i,a,s,c=arguments.length;for(a=new Array(c),i=0;i<c;i++)a[i]=arguments[i];for((t=o(s=n.apply(null,a))).isUniqueByDependants||(t.lastDependants&&!Bt(s,t.lastDependants,0)&&t.clear(),t.lastDependants=s),r=t.head;r;){if(Bt(r.args,a,1))return r!==t.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=t.head,r.prev=null,t.head.prev=r,t.head=r),r.val;r=r.next}return r={val:e.apply(null,a)},a[0]=null,r.args=a,t.head&&(t.head.prev=r,r.next=t.head),t.head=r,r.val}return a.getDependants=n,a.clear=i,i(),a}const $t=e=>e.freeExtensions||[],Qt=e=>e.profileItems||{},Jt=zt((e=>Object.values(e.taskLists)),(e=>[e.taskLists])),Vt=zt(((e,t)=>t.map((t=>e.taskLists[t]))),((e,t)=>t.map((t=>e.taskLists[t])))),Kt=(e,t)=>e.taskLists[t],Zt=(e,t)=>Object.keys(e.taskLists).reduce(((r,n)=>r||e.taskLists[n].tasks.find((e=>e.id===t))),void 0),Xt=e=>e.paymentMethods||[],er=(e,t)=>e.errors[t]||!1,tr=(e,t)=>e.requesting[t]||!1,rr=e=>e.emailPrefill||"",nr=e=>e.productTypes||[];var or="SET_ERROR",ir="SET_IS_REQUESTING",ar="SET_PROFILE_ITEMS",sr="SET_EMAIL_PREFILL",cr="GET_PAYMENT_METHODS_SUCCESS",ur="GET_PRODUCT_TYPES_SUCCESS",lr="GET_PRODUCT_TYPES_ERROR",pr="GET_FREE_EXTENSIONS_ERROR",dr="GET_FREE_EXTENSIONS_SUCCESS",fr="GET_TASK_LISTS_ERROR",yr="GET_TASK_LISTS_SUCCESS",mr="DISMISS_TASK_ERROR",gr="DISMISS_TASK_REQUEST",hr="DISMISS_TASK_SUCCESS",Er="UNDO_DISMISS_TASK_ERROR",Sr="UNDO_DISMISS_TASK_REQUEST",Tr="UNDO_DISMISS_TASK_SUCCESS",vr="SNOOZE_TASK_ERROR",_r="SNOOZE_TASK_REQUEST",Ar="SNOOZE_TASK_SUCCESS",br="UNDO_SNOOZE_TASK_ERROR",Rr="UNDO_SNOOZE_TASK_REQUEST",wr="UNDO_SNOOZE_TASK_SUCCESS",kr="HIDE_TASK_LIST_ERROR",Or="HIDE_TASK_LIST_REQUEST",Pr="HIDE_TASK_LIST_SUCCESS",Ir="UNHIDE_TASK_LIST_ERROR",Nr="UNHIDE_TASK_LIST_REQUEST",Cr="UNHIDE_TASK_LIST_SUCCESS",Ur="OPTIMISTICALLY_COMPLETE_TASK_REQUEST",Lr="ACTION_TASK_ERROR",Dr="ACTION_TASK_REQUEST",xr="ACTION_TASK_SUCCESS",Fr="VISITED_TASK",Mr="KEEP_COMPLETED_TASKS_SUCCESS",Gr=window.wp.hooks,jr=r(79119),qr=window.wp.deprecated,Wr=r.n(qr);class Hr{constructor(){this.filteredTasks=(0,Gr.applyFilters)("woocommerce_admin_onboarding_task_list",[],function(){const e=window.location&&window.location.search;if(!e)return{};const t=e.substring(1);return(0,jr.parse)(t)}()),this.filteredTasks&&this.filteredTasks.length>0&&Wr()("woocommerce_admin_onboarding_task_list",{version:"2.10.0",alternative:"TaskLists::add_task()",plugin:"@woocommerce/data"}),this.tasks=this.filteredTasks.reduce(((e,t)=>({...e,[t.key]:t})),{})}hasDeprecatedTasks(){return this.filteredTasks.length>0}getPostData(){return this.hasDeprecatedTasks()?{extended_tasks:this.filteredTasks.map((e=>({title:e.title,content:e.content,additional_info:e.additionalInfo,time:e.time,level:e.level?parseInt(e.level,10):3,list_id:e.type||"extended",can_view:e.visible,id:e.key,is_snoozeable:e.allowRemindMeLater,is_dismissable:e.isDismissable,is_complete:e.completed})))}:null}mergeDeprecatedCallbackFunctions(e){if(this.filteredTasks.length>0)for(const t of e)t.tasks=t.tasks.map((e=>this.tasks&&this.tasks[e.id]?{...this.tasks[e.id],...e,isDeprecated:!0}:e));return e}static possiblyPruneTaskData(e,t){return e.time||e.title?e:t.reduce(((t,r)=>({...t,[r]:e[r]})),{id:e.id})}}function Yr(e){return{type:pr,error:e}}function Br(e){return{type:dr,freeExtensions:e}}function zr(e,t){return{type:or,selector:e,error:t}}function $r(e,t){return{type:ir,selector:e,isRequesting:t}}function Qr(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:ar,profileItems:e,replace:t}}function Jr(e){return{type:fr,error:e}}function Vr(e){return{type:yr,taskLists:e}}function Kr(e,t){return{type:vr,taskId:e,error:t}}function Zr(e){return{type:_r,taskId:e}}function Xr(e){return{type:Ar,task:e}}function en(e,t){return{type:br,taskId:e,error:t}}function tn(e){return{type:Rr,taskId:e}}function rn(e){return{type:wr,task:e}}function nn(e,t){return{type:mr,taskId:e,error:t}}function on(e){return{type:gr,taskId:e}}function an(e){return{type:hr,task:e}}function sn(e,t){return{type:Er,taskId:e,error:t}}function cn(e){return{type:Sr,taskId:e}}function un(e){return{type:Tr,task:e}}function ln(e,t){return{type:kr,taskListId:e,error:t}}function pn(e){return{type:Or,taskListId:e}}function dn(e){return{type:Pr,taskList:e,taskListId:e.id}}function fn(e,t){return{type:Ir,taskListId:e,error:t}}function yn(e){return{type:Nr,taskListId:e}}function mn(e){return{type:Cr,taskList:e,taskListId:e.id}}function gn(e){return{type:Ur,taskId:e}}function hn(e,t){return{type:Mr,taskListId:e,keepCompletedTaskList:t}}function En(e){return{type:Fr,taskId:e}}function Sn(e){return{type:cr,paymentMethods:e}}function Tn(e){return{type:sr,emailPrefill:e}}function vn(e,t){return{type:Lr,taskId:e,error:t}}function _n(e){return{type:Dr,taskId:e}}function An(e){return{type:xr,task:e}}function bn(e){return{type:ur,productTypes:e}}function Rn(e){return{type:lr,error:e}}function*wn(e){const t=yield j.controls.dispatch(pt,"updateOptions",{woocommerce_task_list_keep_completed:"yes"});t&&t.success&&(yield hn(e,"yes"))}function*kn(e){yield $r("updateProfileItems",!0),yield zr("updateProfileItems",null);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/profile`,method:"POST",data:e});if(t&&"success"===t.status)return yield Qr(e),yield $r("updateProfileItems",!1),t;throw new Error}catch(e){throw yield zr("updateProfileItems",e),yield $r("updateProfileItems",!1),e}}function*On(e){yield Zr(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/snooze`,method:"POST"});yield Xr(Hr.possiblyPruneTaskData(t,["isSnoozed","isDismissed","snoozedUntil"]))}catch(t){throw yield Kr(e,t),new Error}}function*Pn(e){yield tn(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/undo_snooze`,method:"POST"});yield rn(Hr.possiblyPruneTaskData(t,["isSnoozed","isDismissed","snoozedUntil"]))}catch(t){throw yield en(e,t),new Error}}function*In(e){yield on(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/dismiss`,method:"POST"});yield an(Hr.possiblyPruneTaskData(t,["isDismissed","isSnoozed"]))}catch(t){throw yield nn(e,t),new Error}}function*Nn(e){yield cn(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/undo_dismiss`,method:"POST"});yield un(Hr.possiblyPruneTaskData(t,["isDismissed","isSnoozed"]))}catch(t){throw yield sn(e,t),new Error}}function*Cn(e){yield pn(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/hide`,method:"POST"});yield dn(t)}catch(t){throw yield ln(e,t),new Error}}function*Un(e){yield yn(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/unhide`,method:"POST"});yield mn(t)}catch(t){throw yield fn(e,t),new Error}}function*Ln(e){yield gn(e)}function*Dn(e){yield _n(e);try{const t=yield(0,q.apiFetch)({path:`${re}/onboarding/tasks/${e}/action`,method:"POST"});yield An(Hr.possiblyPruneTaskData(t,["isActioned"]))}catch(t){throw yield vn(e,t),new Error}}const xn=j.controls&&j.controls.resolveSelect?j.controls.resolveSelect:q.select;function*Fn(){try{const e=yield(0,q.apiFetch)({path:re+"/onboarding/profile",method:"GET"});yield Qr(e,!0)}catch(e){yield zr("getProfileItems",e)}}function*Mn(){try{const e=yield(0,q.apiFetch)({path:re+"/onboarding/profile/experimental_get_email_prefill",method:"GET"});yield Tn(e.email)}catch(e){yield zr("getEmailPrefill",e)}}function*Gn(){const e=new Hr;try{const t=yield(0,q.apiFetch)({path:re+"/onboarding/tasks",method:e.hasDeprecatedTasks()?"POST":"GET",data:e.getPostData()});e.mergeDeprecatedCallbackFunctions(t),yield Vr(t)}catch(e){yield Jr(e)}}function*jn(){yield xn(Wt,"getTaskLists")}function*qn(){yield xn(Wt,"getTaskLists")}function*Wn(){yield xn(Wt,"getTaskLists")}function*Hn(){try{const e=yield(0,q.apiFetch)({path:re+"/payment-gateway-suggestions",method:"GET"});yield Sn(e)}catch(e){yield zr("getPaymentGatewaySuggestions",e)}}function*Yn(){try{const e=yield(0,q.apiFetch)({path:re+"/onboarding/free-extensions",method:"GET"});yield Br(e)}catch(e){yield Yr(e)}}function*Bn(){try{const e=yield(0,q.apiFetch)({path:re+"/onboarding/product-types",method:"GET"});yield bn(e)}catch(e){yield Rn(e)}}const zn={errors:{},freeExtensions:[],profileItems:{business_extensions:null,completed:null,industry:null,number_employees:null,other_platform:null,other_platform_name:null,product_count:null,product_types:null,revenue:null,selling_venues:null,setup_client:null,skipped:null,theme:null,wccom_connected:null,is_agree_marketing:null,store_email:null},emailPrefill:"",paymentMethods:[],productTypes:[],requesting:{},taskLists:{}},$n=(e,t)=>Object.keys(e).reduce(((r,n)=>({...r,[n]:{...e[n],tasks:e[n].tasks.map((e=>t.id===e.id?{...e,...t}:e))}})),{...e});(0,j.registerStore)(Wt,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zn,{freeExtensions:t,type:r,profileItems:n,emailPrefill:o,paymentMethods:i,productTypes:a,replace:s,error:c,isRequesting:u,selector:l,task:p,taskId:d,taskListId:f,taskList:y,taskLists:m,keepCompletedTaskList:g}=arguments.length>1?arguments[1]:void 0;switch(r){case ar:return{...e,profileItems:s?n:{...e.profileItems,...n}};case sr:return{...e,emailPrefill:o};case or:return{...e,errors:{...e.errors,[l]:c}};case ir:return{...e,requesting:{...e.requesting,[l]:u}};case cr:return{...e,paymentMethods:i};case ur:return{...e,productTypes:a};case lr:return{...e,errors:{...e.errors,productTypes:c}};case pr:return{...e,errors:{...e.errors,getFreeExtensions:c}};case dr:return{...e,freeExtensions:t};case fr:return{...e,errors:{...e.errors,getTaskLists:c}};case yr:return{...e,taskLists:m.reduce(((e,t)=>({...e,[t.id]:t})),e.taskLists||{})};case mr:return{...e,errors:{...e.errors,dismissTask:c},taskLists:$n(e.taskLists,{id:d,isDismissed:!1})};case gr:return{...e,requesting:{...e.requesting,dismissTask:!0},taskLists:$n(e.taskLists,{id:d,isDismissed:!0})};case hr:return{...e,requesting:{...e.requesting,dismissTask:!1},taskLists:$n(e.taskLists,p)};case Er:return{...e,errors:{...e.errors,undoDismissTask:c},taskLists:$n(e.taskLists,{id:d,isDismissed:!0})};case Sr:return{...e,requesting:{...e.requesting,undoDismissTask:!0},taskLists:$n(e.taskLists,{id:d,isDismissed:!1})};case Tr:return{...e,requesting:{...e.requesting,undoDismissTask:!1},taskLists:$n(e.taskLists,p)};case vr:return{...e,errors:{...e.errors,snoozeTask:c},taskLists:$n(e.taskLists,{id:d,isSnoozed:!1})};case _r:return{...e,requesting:{...e.requesting,snoozeTask:!0},taskLists:$n(e.taskLists,{id:d,isSnoozed:!0})};case Ar:return{...e,requesting:{...e.requesting,snoozeTask:!1},taskLists:$n(e.taskLists,p)};case br:return{...e,errors:{...e.errors,undoSnoozeTask:c},taskLists:$n(e.taskLists,{id:d,isSnoozed:!0})};case Rr:return{...e,requesting:{...e.requesting,undoSnoozeTask:!0},taskLists:$n(e.taskLists,{id:d,isSnoozed:!1})};case wr:return{...e,requesting:{...e.requesting,undoSnoozeTask:!1},taskLists:$n(e.taskLists,p)};case kr:return{...e,errors:{...e.errors,hideTaskList:c},taskLists:{...e.taskLists,[f]:{...e.taskLists[f],isHidden:!1,isVisible:!0}}};case Or:return{...e,requesting:{...e.requesting,hideTaskList:!0},taskLists:{...e.taskLists,[f]:{...e.taskLists[f],isHidden:!0,isVisible:!1}}};case Pr:return{...e,requesting:{...e.requesting,hideTaskList:!1},taskLists:{...e.taskLists,[f]:y}};case Ir:return{...e,errors:{...e.errors,unhideTaskList:c},taskLists:{...e.taskLists,[f]:{...e.taskLists[f],isHidden:!0,isVisible:!1}}};case Nr:return{...e,requesting:{...e.requesting,unhideTaskList:!0},taskLists:{...e.taskLists,[f]:{...e.taskLists[f],isHidden:!1,isVisible:!0}}};case Cr:return{...e,requesting:{...e.requesting,unhideTaskList:!1},taskLists:{...e.taskLists,[f]:y}};case Mr:return{...e,taskLists:{...e.taskLists,[f]:{...e.taskLists[f],keepCompletedTaskList:g}}};case Ur:return{...e,taskLists:$n(e.taskLists,{id:d,isComplete:!0})};case Fr:return{...e,taskLists:$n(e.taskLists,{id:d,isVisited:!0})};case Lr:return{...e,errors:{...e.errors,actionTask:c},taskLists:$n(e.taskLists,{id:d,isActioned:!1})};case Dr:return{...e,requesting:{...e.requesting,actionTask:!0},taskLists:$n(e.taskLists,{id:d,isActioned:!0})};case xr:return{...e,requesting:{...e.requesting,actionTask:!1},taskLists:$n(e.taskLists,p)};default:return e}},actions:d,controls:q.controls,selectors:p,resolvers:f});const Qn=Wt,Jn="core",Vn=Jn,Kn="wc/admin/reviews",Zn=(e,t)=>{const r=JSON.stringify(t);return(e.reviews[r]&&e.reviews[r].data||[]).map((t=>e.data[t]))},Xn=(e,t)=>{const r=JSON.stringify(t);return e.reviews[r]&&e.reviews[r].totalCount},eo=(e,t)=>{const r=JSON.stringify(t);return e.errors[r]};var to="UPDATE_REVIEWS",ro="SET_REVIEW",no="SET_ERROR",oo="SET_REVIEW_IS_UPDATING";function io(e,t,r){return{type:to,reviews:t,query:e,totalCount:r}}function*ao(e,t,r){yield co(e,!0);try{const n=(0,lt.addQueryArgs)(`${te}/products/reviews/${e}`,r||{}),o=yield(0,q.apiFetch)({path:n,method:"PUT",data:t});yield uo(e,o),yield co(e,!1)}catch(t){throw yield lo("updateReview",t),yield co(e,!1),new Error}}function*so(e){yield co(e,!0);try{const t=`${te}/products/reviews/${e}`,r=yield(0,q.apiFetch)({path:t,method:"DELETE"});return yield uo(e,r),yield co(e,!1),r}catch(t){throw yield lo("deleteReview",t),yield co(e,!1),new Error}}function co(e,t){return{type:oo,reviewId:e,isUpdating:t}}function uo(e,t){return{type:ro,reviewId:e,reviewData:t}}function lo(e,t){return{type:no,query:e,error:t}}const po=e=>({type:"FETCH_WITH_HEADERS",options:e});var fo={...q.controls,FETCH_WITH_HEADERS(e){let{options:t}=e;return wt()({...t,parse:!1}).then((e=>Promise.all([e.headers,e.status,e.json()]))).then((e=>{let[t,r,n]=e;return{headers:t,status:r,data:n}}))}};function*yo(e){try{const t=(0,lt.addQueryArgs)(`${te}/products/reviews`,e),r=yield po({path:t,method:"GET"}),n=parseInt(r.headers.get("x-wp-total"),10);yield io(e,r.data,n)}catch(t){yield lo(e,t)}}function*mo(e){yield yo(e)}(0,j.registerStore)(Kn,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{reviews:{},errors:{},data:{}},{type:t,query:r,reviews:n,reviewId:o,reviewData:i,totalCount:a,error:s,isUpdating:c}=arguments.length>1?arguments[1]:void 0;switch(t){case to:const t=[],u=n.reduce(((r,n)=>(t.push(n.id),r[n.id]={...e.data[n.id]||{},...n},r)),{});return{...e,reviews:{...e.reviews,[JSON.stringify(r)]:{data:t,totalCount:a}},data:{...e.data,...u}};case ro:return{...e,data:{...e.data,[o]:i}};case no:return{...e,errors:{...e.errors,[JSON.stringify(r)]:s}};case oo:return{...e,data:{...e.data,[o]:{...e.data[o],isUpdating:c}}};default:return e}},actions:m,controls:fo,selectors:y,resolvers:g});const go=Kn,ho="wc/admin/notes",Eo=zt(((e,t)=>(e.noteQueries[JSON.stringify(t)]||[]).map((t=>e.notes[t]))),((e,t)=>[e.noteQueries[JSON.stringify(t)],e.notes])),So=(e,t)=>e.errors[t]||!1,To=(e,t)=>e.requesting[t]||!1;var vo="SET_ERROR",_o="SET_NOTE",Ao="SET_NOTE_IS_UPDATING",bo="SET_NOTES",Ro="SET_NOTES_QUERY",wo="SET_IS_REQUESTING";function*ko(e,t){yield Fo("triggerNoteAction",!0);const r=`${te}/admin/notes/${e}/action/${t}`;try{const t=yield(0,q.apiFetch)({path:r,method:"POST"});yield No(e,t),yield Fo("triggerNoteAction",!1)}catch(e){throw yield xo("triggerNoteAction",e),yield Fo("triggerNoteAction",!1),new Error}}function*Oo(e){yield Fo("removeNote",!0),yield Uo(e,!0);try{const t=`${te}/admin/notes/delete/${e}`,r=yield(0,q.apiFetch)({path:t,method:"DELETE"});return yield Co(e,r),yield Fo("removeNote",!1),r}catch(t){throw yield xo("removeNote",t),yield Fo("removeNote",!1),yield Uo(e,!1),new Error}}function*Po(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};yield Fo("removeAllNotes",!0);try{const t=(0,lt.addQueryArgs)(`${te}/admin/notes/delete/all`,e),r=yield(0,q.apiFetch)({path:t,method:"DELETE"});return yield Lo(r),yield Fo("removeAllNotes",!1),r}catch(e){throw yield xo("removeAllNotes",e),yield Fo("removeAllNotes",!1),new Error}}function*Io(e,t){yield Fo("batchUpdateNotes",!0);try{const r=`${te}/admin/notes/update`,n=yield(0,q.apiFetch)({path:r,method:"PUT",data:{noteIds:e,...t}});yield Lo(n),yield Fo("batchUpdateNotes",!1)}catch(e){throw yield xo("updateNote",e),yield Fo("batchUpdateNotes",!1),new Error}}function*No(e,t){yield Fo("updateNote",!0),yield Uo(e,!0);try{const r=`${te}/admin/notes/${e}`,n=yield(0,q.apiFetch)({path:r,method:"PUT",data:t});yield Co(e,n),yield Fo("updateNote",!1),yield Uo(e,!1)}catch(t){throw yield xo("updateNote",t),yield Fo("updateNote",!1),yield Uo(e,!1),new Error}}function Co(e,t){return{type:_o,noteId:e,noteFields:t}}function Uo(e,t){return{type:Ao,noteId:e,isUpdating:t}}function Lo(e){return{type:bo,notes:e}}function Do(e,t){return{type:Ro,query:e,noteIds:t}}function xo(e,t){return{type:vo,error:t,selector:e}}function Fo(e,t){return{type:wo,selector:e,isRequesting:t}}var Mo=r(74944);let Go=!1;function*jo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,lt.addQueryArgs)(`${te}/admin/notes`,e);try{const r=yield(0,q.apiFetch)({path:t});if(!Go){const e=r.reduce(((e,t)=>((0,Mo.sanitize)(t.content,{ALLOWED_TAGS:[]}).length>320&&e.push(t.name),e)),[]);e.length&&(console.warn((0,X.sprintf)((0,X.__)("WooCommerce Admin will soon limit inbox note contents to 320 characters. For more information, please visit %s. The following notes currently exceeds that limit:","woocommerce"),"https://developer.woocommerce.com/?p=10749")+"\n"+e.map(((e,t)=>` ${t+1}. ${e}`)).join("\n")),Go=!0)}yield Lo(r),yield Do(e,r.map((e=>e.id)))}catch(e){yield xo("getNotes",e)}}(0,j.registerStore)(ho,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},noteQueries:{},notes:{},requesting:{}},{error:t,isRequesting:r,isUpdating:n,noteFields:o,noteId:i,noteIds:a,notes:s,query:c,selector:u,type:l}=arguments.length>1?arguments[1]:void 0;switch(l){case bo:e={...e,notes:{...e.notes,...s.reduce(((e,t)=>(e[t.id]=t,e)),{})}};break;case Ro:e={...e,noteQueries:{...e.noteQueries,[JSON.stringify(c)]:a}};break;case vo:e={...e,errors:{...e.errors,[u]:t}};break;case _o:e={...e,notes:{...e.notes,[i]:o}};break;case Ao:e={...e,notes:{...e.notes,[i]:{...e.notes[i],isUpdating:n}}};break;case wo:e={...e,requesting:{...e.requesting,[u]:r}}}return e},actions:E,controls:q.controls,selectors:h,resolvers:S});const qo=ho,Wo="wc/admin/reports",Ho={},Yo=(e,t,r)=>{const n=H(t,r);return e.itemErrors[n]||!1},Bo=(e,t,r)=>{const n=H(t,r);return e.items[n]||Ho},zo=(e,t,r)=>{const n=H(t,r);return e.stats[n]||Ho},$o=(e,t,r)=>{const n=H(t,r);return e.statErrors[n]||!1};var Qo="SET_ITEM_ERROR",Jo="SET_STAT_ERROR",Vo="SET_REPORT_ITEMS",Ko="SET_REPORT_STATS";function Zo(e,t,r){const n=H(e,t);return{type:Qo,resourceName:n,error:r}}function Xo(e,t,r){const n=H(e,t);return{type:Vo,resourceName:n,items:r}}function ei(e,t,r){const n=H(e,t);return{type:Ko,resourceName:n,stats:r}}function ti(e,t,r){const n=H(e,t);return{type:Jo,resourceName:n,error:r}}function*ri(e,t){const r={parse:!1,path:(0,lt.addQueryArgs)(`${te}/reports/${e}`,t)};try{const n=yield po(r),o=n.data,i=parseInt(n.headers.get("x-wp-total"),10),a=parseInt(n.headers.get("x-wp-totalpages"),10);yield Xo(e,t,{data:o,totalResults:i,totalPages:a})}catch(r){yield Zo(e,t,r)}}function*ni(e,t){const r={parse:!1,path:(0,lt.addQueryArgs)(`${te}/reports/${e}/stats`,t)};try{const n=yield po(r),o=n.data,i=parseInt(n.headers.get("x-wp-total"),10),a=parseInt(n.headers.get("x-wp-totalpages"),10);yield ei(e,t,{data:o,totalResults:i,totalPages:a})}catch(r){yield ti(e,t,r)}}(0,j.registerStore)(Wo,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{itemErrors:{},items:{},statErrors:{},stats:{}},{type:t,items:r,stats:n,error:o,resourceName:i}=arguments.length>1?arguments[1]:void 0;switch(t){case Vo:return{...e,items:{...e.items,[i]:r}};case Ko:return{...e,stats:{...e.stats,[i]:n}};case Qo:return{...e,itemErrors:{...e.itemErrors,[i]:o}};case Jo:return{...e,statErrors:{...e.statErrors,[i]:o}};default:return e}},actions:v,controls:fo,selectors:T,resolvers:_});const oi=Wo,ii="wc/admin/countries",ai=e=>e.locales,si=(e,t)=>{const r=t.split(":")[0];return e.locales[r]},ci=e=>e.countries,ui=(e,t)=>e.countries.find((e=>e.code===t));var li,pi;(pi=li||(li={})).GET_LOCALES_ERROR="GET_LOCALES_ERROR",pi.GET_LOCALES_SUCCESS="GET_LOCALES_SUCCESS",pi.GET_COUNTRIES_ERROR="GET_COUNTRIES_ERROR",pi.GET_COUNTRIES_SUCCESS="GET_COUNTRIES_SUCCESS";var di=li;function fi(e){return{type:di.GET_LOCALES_SUCCESS,locales:e}}function yi(e){return{type:di.GET_LOCALES_ERROR,error:e}}function mi(e){return{type:di.GET_COUNTRIES_SUCCESS,countries:e}}function gi(e){return{type:di.GET_COUNTRIES_ERROR,error:e}}const hi=j.controls&&j.controls.resolveSelect?j.controls.resolveSelect:q.select;function*Ei(){yield hi(ii,"getLocales")}function*Si(){try{const e=te+"/data/countries/locales";return fi(yield(0,q.apiFetch)({path:e,method:"GET"}))}catch(e){return yi(e)}}function*Ti(){yield hi(ii,"getCountries")}function*vi(){try{const e=te+"/data/countries";return mi(yield(0,q.apiFetch)({path:e,method:"GET"}))}catch(e){return gi(e)}}(0,j.registerStore)(ii,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},locales:{},countries:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case di.GET_LOCALES_SUCCESS:e={...e,locales:t.locales};break;case di.GET_LOCALES_ERROR:e={...e,errors:{...e.errors,locales:t.error}};break;case di.GET_COUNTRIES_SUCCESS:e={...e,countries:t.countries};break;case di.GET_COUNTRIES_ERROR:e={...e,errors:{...e.errors,countries:t.error}}}return e},actions:b,controls:q.controls,selectors:A,resolvers:R});const _i=ii,Ai="woocommerce-navigation",bi=e=>(0,Gr.applyFilters)("woocommerce_navigation_menu_items",e.menuItems),Ri=e=>e.favorites||[],wi=(e,t)=>e.requesting[t]||!1,ki=e=>e.persistedQuery||{};var Oi=window.wc.navigation,Pi="ADD_MENU_ITEMS",Ii="SET_MENU_ITEMS",Ni="ON_HISTORY_CHANGE",Ci="ADD_FAVORITE_FAILURE",Ui="ADD_FAVORITE_REQUEST",Li="ADD_FAVORITE_SUCCESS",Di="GET_FAVORITES_FAILURE",xi="GET_FAVORITES_REQUEST",Fi="GET_FAVORITES_SUCCESS",Mi="REMOVE_FAVORITE_FAILURE",Gi="REMOVE_FAVORITE_REQUEST",ji="REMOVE_FAVORITE_SUCCESS";function qi(e){return{type:Ii,menuItems:e}}function Wi(e){return{type:Pi,menuItems:e}}function Hi(e){return{type:Di,error:e}}function Yi(e){return{type:xi,favorites:e}}function Bi(e){return{type:Fi,favorites:e}}function zi(e){return{type:Ui,favorite:e}}function $i(e,t){return{type:Ci,favorite:e,error:t}}function Qi(e){return{type:Li,favorite:e}}function Ji(e){return{type:Gi,favorite:e}}function Vi(e,t){return{type:Mi,favorite:e,error:t}}function Ki(e,t){return{type:ji,favorite:e,error:t}}function*Zi(){yield Xi()}function*Xi(){const e=(0,Oi.getPersistedQuery)();if(!Object.keys(e).length)return null;yield{type:Ni,persistedQuery:e}}function*ea(e){yield zi(e);try{const t=yield wt()({path:`${re}/navigation/favorites/me`,method:"POST",data:{item_id:e}});if(t)return yield Qi(e),t;throw new Error}catch(t){throw yield $i(e,t),new Error}}function*ta(e){yield Ji(e);try{const t=yield wt()({path:`${re}/navigation/favorites/me`,method:"DELETE",data:{item_id:e}});if(t)return yield Ki(e),t;throw new Error}catch(t){throw yield Vi(e,t),new Error}}function*ra(){yield Yi();try{const e=yield(0,q.apiFetch)({path:`${re}/navigation/favorites/me`});if(e)return void(yield Bi(e));throw new Error}catch(e){throw yield Hi(e),new Error}}(0,j.registerStore)(Ai,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{error:null,menuItems:[],favorites:[],requesting:{},persistedQuery:{}},{type:t,error:r,favorite:n,favorites:o,menuItems:i,persistedQuery:a}=arguments.length>1?arguments[1]:void 0;switch(t){case Ii:e={...e,menuItems:i};break;case Pi:e={...e,menuItems:[...e.menuItems,...i]};break;case Ni:e={...e,persistedQuery:a};break;case Di:e={...e,requesting:{...e.requesting,getFavorites:!1}};break;case xi:e={...e,requesting:{...e.requesting,getFavorites:!0}};break;case Fi:e={...e,favorites:o,requesting:{...e.requesting,getFavorites:!1}};break;case Ci:e={...e,error:r,requesting:{...e.requesting,addFavorite:!1}};break;case Ui:e={...e,requesting:{...e.requesting,addFavorite:!0}};break;case Li:const t=e.favorites.includes(n)?e.favorites:[...e.favorites,n];e={...e,favorites:t,menuItems:e.menuItems.map((e=>e.id===n?{...e,menuId:"favorites"}:e)),requesting:{...e.requesting,addFavorite:!1}};break;case Mi:e={...e,requesting:{...e.requesting,error:r,removeFavorite:!1}};break;case Gi:e={...e,requesting:{...e.requesting,removeFavorite:!0}};break;case ji:const s=e.favorites.filter((e=>e!==n));e={...e,favorites:s,menuItems:e.menuItems.map((e=>e.id===n?{...e,menuId:"plugins"}:e)),requesting:{...e.requesting,removeFavorite:!1}}}return e},actions:k,controls:q.controls,resolvers:O,selectors:w}),(async()=>{const{onLoad:e,onHistoryChange:t}=(0,j.dispatch)(Ai);await e(),(0,Oi.addHistoryListener)((async()=>{setTimeout((async()=>{await t()}),0)}))})();const na=Ai,oa="wc/admin/items";var ia=window.wc.date;function aa(e){const t="leaderboards",{per_page:r,persisted_query:n,query:o,select:i,filterQuery:a}=e,{getItems:s,getItemsError:c,isResolving:u}=i(oa),l={isRequesting:!1,isError:!1,rows:[]},p=(0,ia.getCurrentDates)(o,e.defaultDateRange),d={...a,after:(0,ia.appendTimestamp)(p.primary.after,"start"),before:(0,ia.appendTimestamp)(p.primary.before,"end"),per_page:r,persisted_query:JSON.stringify(n)},f=s(t,d);if(u("getItems",[t,d]))return{...l,isRequesting:!0};if(c(t,d))return{...l,isError:!0};const y=f.get(e.id);return{...l,rows:null==y?void 0:y.rows}}function sa(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{getItems:o,getItemsError:i,isResolving:a}=e,s={};let c=!1,u=!1;return r.forEach((e=>{const r={search:e,per_page:10,...n};o(t,r).forEach(((e,t)=>{s[t]=e})),a("getItems",[t,r])&&(c=!0),i(t,r)&&(u=!0)})),{items:s,isRequesting:c,isError:u}}function ca(e,t){const{_fields:r,page:n,per_page:o,...i}=t;return H("total-"+e,i)}const ua=zt((function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;const o=H(t,r),i=e.items[o]&&e.items[o].data;return i?i.reduce(((r,n)=>(r.set(n,e.data[t][n]),r)),new Map):n}),((e,t,r)=>{const n=H(t,r);return[e.items[n]]})),la=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const o=ca(t,r),i=e.items.hasOwnProperty(o)?e.items[o]:n;return i},pa=(e,t,r)=>{const n=H(t,r);return e.errors[n]};var da="SET_ITEM",fa="SET_ITEMS",ya="SET_ITEMS_TOTAL_COUNT",ma="SET_ERROR";function ga(e,t,r){return{type:da,id:t,item:r,itemType:e}}function ha(e,t,r,n){return{type:fa,items:r,itemType:e,query:t,totalCount:n}}function Ea(e,t,r){return{type:ya,itemType:e,query:t,totalCount:r}}function Sa(e,t,r){return{type:ma,itemType:e,query:t,error:r}}function*Ta(e,t){const r={...e,stock_quantity:t},{id:n,parent_id:o,type:i}=r;yield ga("products",n,r);let a=te;a+="variation"===i?`/products/${o}/variations/${n}`:`/products/${n}`;try{return yield(0,q.apiFetch)({path:a,method:"PUT",data:r}),!0}catch(t){return yield ga("products",n,e),yield Sa("products",n,t),!1}}function*va(e,t){try{const r=(0,lt.addQueryArgs)(`${re}/onboarding/tasks/create_product_from_template`,t||{}),n=yield(0,q.apiFetch)({path:r,method:"POST",data:e});return yield ga("products",n.id,n),n}catch(e){throw yield Sa("createProductFromTemplate",t,e),e}}function*_a(e,t){const r="categories"===e?"products/categories":e,n=(0,lt.addQueryArgs)(`${te}/${r}`,t),o=-1===t.per_page,i=o?q.apiFetch:po,a=yield i({path:n,method:"GET"});if(o)return{items:a,totalCount:a.length};const s=parseInt(a.headers.get("x-wp-total"),10);return{items:a.data,totalCount:s}}function*Aa(e,t){try{const{items:r,totalCount:n}=yield _a(e,t);yield Ea(e,t,n),yield ha(e,t,r)}catch(r){yield Sa(e,t,r)}}function*ba(e,t){yield Ra(e,t)}function*Ra(e,t){try{const r={...t,page:1,per_page:1},{totalCount:n}=yield _a(e,r);yield Ea(e,t,n)}catch(r){yield Sa(e,t,r)}}(0,j.registerStore)(oa,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{items:{},errors:{},data:{}},{type:t,id:r,itemType:n,query:o,item:i,items:a,totalCount:s,error:c}=arguments.length>1?arguments[1]:void 0;switch(t){case da:const t=e.data[n]||{};return{...e,data:{...e.data,[n]:{...t,[r]:{...t[r]||{},...i}}}};case fa:const u=[],l=a.reduce(((e,t)=>(u.push(t.id),e[t.id]=t,e)),{}),p=H(n,o);return{...e,items:{...e.items,[p]:{data:u}},data:{...e.data,[n]:{...e.data[n],...l}}};case ya:const d=ca(n,o);return{...e,items:{...e.items,[d]:s}};case ma:return{...e,errors:{...e.errors,[H(n,o)]:c}};default:return e}},actions:I,controls:fo,selectors:P,resolvers:N});const wa=oa;var ka;!function(e){e.GET_PAYMENT_GATEWAYS_REQUEST="GET_PAYMENT_GATEWAYS_REQUEST",e.GET_PAYMENT_GATEWAYS_SUCCESS="GET_PAYMENT_GATEWAYS_SUCCESS",e.GET_PAYMENT_GATEWAYS_ERROR="GET_PAYMENT_GATEWAYS_ERROR",e.UPDATE_PAYMENT_GATEWAY_REQUEST="UPDATE_PAYMENT_GATEWAY_REQUEST",e.UPDATE_PAYMENT_GATEWAY_SUCCESS="UPDATE_PAYMENT_GATEWAY_SUCCESS",e.UPDATE_PAYMENT_GATEWAY_ERROR="UPDATE_PAYMENT_GATEWAY_ERROR",e.GET_PAYMENT_GATEWAY_REQUEST="GET_PAYMENT_GATEWAY_REQUEST",e.GET_PAYMENT_GATEWAY_SUCCESS="GET_PAYMENT_GATEWAY_SUCCESS",e.GET_PAYMENT_GATEWAY_ERROR="GET_PAYMENT_GATEWAY_ERROR"}(ka||(ka={}));const Oa="wc/payment-gateways";function Pa(){return{type:ka.GET_PAYMENT_GATEWAYS_REQUEST}}function Ia(e){return{type:ka.GET_PAYMENT_GATEWAYS_SUCCESS,paymentGateways:e}}function Na(e){return{type:ka.GET_PAYMENT_GATEWAYS_ERROR,error:e}}function Ca(){return{type:ka.GET_PAYMENT_GATEWAY_REQUEST}}function Ua(e){return{type:ka.GET_PAYMENT_GATEWAY_ERROR,error:e}}function La(e){return{type:ka.GET_PAYMENT_GATEWAY_SUCCESS,paymentGateway:e}}function Da(e){return{type:ka.UPDATE_PAYMENT_GATEWAY_SUCCESS,paymentGateway:e}}function xa(){return{type:ka.UPDATE_PAYMENT_GATEWAY_REQUEST}}function Fa(e){return{type:ka.UPDATE_PAYMENT_GATEWAY_ERROR,error:e}}function*Ma(e,t){try{yield xa();const r=yield(0,q.apiFetch)({method:"PUT",path:"wc/v3/payment_gateways/"+e,body:JSON.stringify(t)});if(r&&r.id===e)return yield Da(r),r}catch(e){throw yield Fa(e),e}}const Ga=j.controls&&j.controls.dispatch?j.controls.dispatch:q.dispatch;function*ja(){yield Pa();try{const e=yield(0,q.apiFetch)({path:"wc/v3/payment_gateways"});yield Ia(e);for(let t=0;t<e.length;t++)yield Ga(Oa,"finishResolution","getPaymentGateway",[e[t].id])}catch(e){yield Na(e)}}function*qa(e){yield Ca();try{const t=yield(0,q.apiFetch)({path:"wc/v3/payment_gateways/"+e});if(t&&t.id)return yield La(t),t}catch(e){yield Ua(e)}}function Wa(e,t){return e.paymentGateways.find((e=>e.id===t))}function Ha(e){return e.paymentGateways}function Ya(e,t){return e.errors[t]||null}function Ba(e){return e.isUpdating||!1}function za(e,t){const r=e.paymentGateways.findIndex((e=>e.id===t.id));return-1===r?{...e,paymentGateways:[...e.paymentGateways,t],isUpdating:!1}:{...e,paymentGateways:[...e.paymentGateways.slice(0,r),t,...e.paymentGateways.slice(r+1)],isUpdating:!1}}const $a=Oa;(0,j.registerStore)(Oa,{actions:C,selectors:L,resolvers:U,controls:q.controls,reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{paymentGateways:[],isUpdating:!1,errors:{}},t=arguments.length>1?arguments[1]:void 0;if(t&&"type"in t)switch(t.type){case ka.GET_PAYMENT_GATEWAYS_REQUEST:case ka.GET_PAYMENT_GATEWAY_REQUEST:return e;case ka.GET_PAYMENT_GATEWAYS_SUCCESS:return{...e,paymentGateways:t.paymentGateways};case ka.GET_PAYMENT_GATEWAYS_ERROR:return{...e,errors:{...e.errors,getPaymentGateways:t.error}};case ka.GET_PAYMENT_GATEWAY_ERROR:return{...e,errors:{...e.errors,getPaymentGateway:t.error}};case ka.UPDATE_PAYMENT_GATEWAY_REQUEST:return{...e,isUpdating:!0};case ka.UPDATE_PAYMENT_GATEWAY_SUCCESS:case ka.GET_PAYMENT_GATEWAY_SUCCESS:return za(e,t.paymentGateway);case ka.UPDATE_PAYMENT_GATEWAY_ERROR:return{...e,errors:{...e.errors,updatePaymentGateway:t.error},isUpdating:!1}}return e}});var Qa=window.wp.compose,Ja=window.wp.element;const Va=(e,t)=>(0,Qa.createHigherOrderComponent)((r=>n=>{const o=(0,Ja.useRef)(t);return(0,j.useSelect)(((t,r)=>{if(!o.current)return;const{isResolving:n,hasFinishedResolution:i}=t(W),{startResolution:a,finishResolution:s,updateSettingsForGroup:c,clearIsDirty:u}=r.dispatch(W);n("getSettings",[e])||i("getSettings",[e])||(a("getSettings",[e]),c(e,o.current),u(e),s("getSettings",[e]))}),[]),(0,Ja.createElement)(r,{...n})}),"withSettingsHydration"),Ka=e=>{let t=!1;return(0,Qa.createHigherOrderComponent)((r=>n=>{const o=(0,Ja.useRef)(e);return(0,j.useSelect)(((e,r)=>{if(!o.current)return;const{isResolving:n,hasFinishedResolution:i}=e(Wt),{startResolution:a,finishResolution:s,setProfileItems:c}=r.dispatch(Wt),{profileItems:u}=o.current;!u||t||n("getProfileItems",[])||i("getProfileItems",[])||(a("getProfileItems",[]),c(u,!0),s("getProfileItems",[]),t=!0)}),[]),(0,Ja.createElement)(r,{...n})}),"withOnboardingHydration")},Za=e=>(0,Qa.createHigherOrderComponent)((t=>r=>{const n=(0,Ja.useRef)(e);return(0,j.useSelect)(((e,t)=>{if(!n.current)return;const{isResolving:r,hasFinishedResolution:o}=e(Jn),{startResolution:i,finishResolution:a,receiveCurrentUser:s}=t.dispatch(Jn);r("getCurrentUser")||o("getCurrentUser")||(i("getCurrentUser",[]),s(n.current),a("getCurrentUser",[]))})),(0,Ja.createElement)(t,{...r})}),"withCurrentUserHydration"),Xa=e=>(0,Qa.createHigherOrderComponent)((t=>r=>{const n=(0,Ja.useRef)(e);return(0,j.useSelect)(((e,t)=>{if(!n.current)return;const{isResolving:r,hasFinishedResolution:o}=e(Ai),{startResolution:i,finishResolution:a,setMenuItems:s}=t.dispatch(Ai);r("getMenuItems")||o("getMenuItems")||(i("getMenuItems",[]),s(n.current.menuItems),a("getMenuItems",[]))})),(0,Ja.createElement)(t,{...r})}),"withNavigationHydration"),es=e=>(0,Qa.createHigherOrderComponent)((t=>r=>{const n=(0,Ja.useRef)(e);return(0,j.useSelect)(((e,t)=>{if(!n.current)return;const{isResolving:r,hasFinishedResolution:o}=e(Ie),{startResolution:i,finishResolution:a,updateActivePlugins:s,updateInstalledPlugins:c,updateIsJetpackConnected:u}=t.dispatch(Ie);r("getActivePlugins",[])||o("getActivePlugins",[])||(i("getActivePlugins",[]),i("getInstalledPlugins",[]),i("isJetpackConnected",[]),s(n.current.activePlugins,!0),c(n.current.installedPlugins,!0),u(!(!n.current.jetpackStatus||!n.current.jetpackStatus.isActive)),a("getActivePlugins",[]),a("getInstalledPlugins",[]),a("isJetpackConnected",[]))}),[]),(0,Ja.createElement)(t,{...r})}),"withPluginsHydration"),ts=e=>{const t=(0,Ja.useRef)(e);(0,j.useSelect)(((e,r)=>{if(!t.current)return;const{isResolving:n,hasFinishedResolution:o}=e(pt),{startResolution:i,finishResolution:a,receiveOptions:s}=r.dispatch(pt);Object.keys(t.current).forEach((e=>{n("getOption",[e])||o("getOption",[e])||(i("getOption",[e]),s({[e]:t.current[e]}),a("getOption",[e]))}))}),[])},rs=e=>(0,Qa.createHigherOrderComponent)((t=>r=>(ts(e),(0,Ja.createElement)(t,{...r}))),"withOptionsHydration"),ns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const{requestedSettings:r,settingsError:n,isRequesting:o,isDirty:i}=(0,j.useSelect)((r=>{const{getLastSettingsErrorForGroup:n,getSettingsForGroup:o,getIsDirty:i,isUpdateSettingsRequesting:a}=r(W);return{requestedSettings:o(e,t),settingsError:Boolean(n(e)),isRequesting:a(e),isDirty:i(e,t)}}),[e,...t.sort()]),{persistSettingsForGroup:a,updateAndPersistSettingsForGroup:s,updateSettingsForGroup:c}=(0,j.useDispatch)(W),u=(0,Ja.useCallback)(((t,r)=>{c(e,{[t]:r})}),[e]),l=(0,Ja.useCallback)((()=>{a(e)}),[e]),p=(0,Ja.useCallback)(((t,r)=>{s(e,{[t]:r})}),[e]);return{settingsError:n,isRequesting:o,isDirty:i,...r,persistSettings:l,updateAndPersistSettings:p,updateSettings:u}},os=e=>{const t=e.woocommerce_meta||{};return(0,ee.mapValues)(t,((e,t)=>{if(!e||0===e.length)return"";try{return JSON.parse(e)}catch(r){return r instanceof Error?console.error(`Error parsing value '${e}' for ${t}`,r.message):console.error(`Unexpected Error parsing value '${e}' for ${t} ${r}`),""}}))},is=()=>{const e=(0,j.useDispatch)(Jn),{addEntities:t,receiveCurrentUser:r,saveEntityRecord:n}=e;let{saveUser:o}=e;const i=(0,j.useSelect)((e=>{const{getCurrentUser:t,getEntity:r,getEntityRecord:n,getLastEntitySaveError:o,hasStartedResolution:i,hasFinishedResolution:a}=e(Jn);return{isRequesting:i("getCurrentUser")&&!a("getCurrentUser"),user:t(),getCurrentUser:t,getEntity:r,getEntityRecord:n,getLastEntitySaveError:o}})),a=i.user?os(i.user):{};return{isRequesting:i.isRequesting,...a,updateUserPreferences:e=>{"function"!=typeof o&&(o=async e=>(Boolean(i.getEntity("root","user"))||await t([{name:"user",kind:"root",baseURL:"/wp/v2/users",plural:"users"}]),await n("root","user",e),i.getEntityRecord("root","user",e.id)));const a=i.getCurrentUser();return async function(e,t,r,n,o){const i=(0,ee.mapValues)(o,JSON.stringify);if(0===Object.keys(i).length)return{error:new Error("Invalid woocommerce_meta data for update."),updatedUser:void 0};e({...t,woocommerce_meta:{...t.woocommerce_meta,...i}});const a=await r({id:t.id,woocommerce_meta:i});return void 0===a?{error:n("root","user",t.id),updatedUser:a}:{updatedUser:{...a,woocommerce_meta:os(a)}}}(r,a,o,i.getLastEntitySaveError,e)}}},as=()=>{const e=(0,j.useSelect)((e=>{const{getCurrentUser:t,hasStartedResolution:r,hasFinishedResolution:n}=e(Jn);return{isRequesting:r("getCurrentUser")&&!n("getCurrentUser"),user:t(),getCurrentUser:t}}));return{currentUserCan:t=>!(!e.user||!e.user.is_super_admin)||!(!e.user||!e.user.capabilities[t]),user:e.user,isRequesting:e.isRequesting}};function ss(e){const t=Date.now();return e.filter((e=>!e.isDismissed&&(!e.isSnoozed||e.snoozedUntil<t)))}var cs=window.moment,us=r.n(cs);function ls(e){const{endpoint:t,query:r,limitBy:n,filters:o=[],advancedFilters:i={}}=e;return r.search?(n||[t]).reduce(((e,t)=>(e[t]=r[t],e)),{}):o.map((e=>function(e,t,r){const n=r[e.param];if(!n)return{};if("advanced"===n){const e=(0,Oi.getActiveFiltersFromQuery)(r,t.filters);if(0===e.length)return{};const n=(0,Oi.getQueryFromActiveFilters)(e.map((e=>function(e,t){const r=e.filters[t.key];if("Date"!==(0,ee.get)(r,["input","component"]))return t;const{rule:n,value:o}=t,i={after:"start",before:"end"};if(Array.isArray(o)){const[e,r]=o;return Object.assign({},t,{value:[(0,ia.appendTimestamp)(us()(e),i.after),(0,ia.appendTimestamp)(us()(r),i.before)]})}return Object.assign({},t,{value:(0,ia.appendTimestamp)(us()(o),i[n])})}(t,e))),{},t.filters);return{match:r.match||"all",...n}}const o=(0,ee.find)((0,Oi.flattenFilters)(e.filters),{value:n});if(!o)return{};if(o.settings&&o.settings.param){const{param:e}=o.settings;return r[e]?{[e]:r[e]}:{}}return{[e.param]:n}}(e,i,r))).reduce(((e,t)=>Object.assign(e,t)),{})}const ps=["stock","customers"];function ds(e){const{endpoint:t,dataType:r,query:n,fields:o,defaultDateRange:i}=e,a=(0,ia.getCurrentDates)(n,i),s=(0,ia.getIntervalForQuery)(n,i),c=ls(e),u=a[r].before;return(0,ee.includes)(ps,t)?{...c,fields:o}:{order:"asc",interval:s,per_page:oe,after:(0,ia.appendTimestamp)(a[r].after,"start"),before:(0,ia.appendTimestamp)(u,"end"),segmentby:n.segmentby,fields:o,...c}}function fs(e){const{endpoint:t,select:r}=e,{getReportStats:n,getReportStatsError:o,isResolving:i}=r(Wo),a={isRequesting:!1,isError:!1,totals:{primary:null,secondary:null}},s=ds({...e,dataType:"primary"}),c=n(t,s);if(i("getReportStats",[t,s]))return{...a,isRequesting:!0};if(o(t,s))return{...a,isError:!0};const u=c&&c.data&&c.data.totals||null,l=ds({...e,dataType:"secondary"}),p=n(t,l);if(i("getReportStats",[t,l]))return{...a,isRequesting:!0};if(o(t,l))return{...a,isError:!0};const d=p&&p.data&&p.data.totals||null;return{...a,totals:{primary:u,secondary:d}}}const ys={isEmpty:!1,isError:!1,isRequesting:!0,data:{totals:{},intervals:[]}},ms={isEmpty:!1,isError:!0,isRequesting:!1,data:{totals:{},intervals:[]}},gs={isEmpty:!0,isError:!1,isRequesting:!1,data:{totals:{},intervals:[]}},hs=[],Es=(0,ee.memoize)(((e,t,r)=>({isEmpty:!1,isError:!1,isRequesting:!1,data:{totals:t,intervals:r}})),((e,t,r)=>[e,t.length,r.length].join(":")));function Ss(e){const{endpoint:t}=e;let r=e.selector;e.select&&!e.selector&&(Wr()("option.select",{version:"1.7.0",hint:"You can pass the report selectors through option.selector now."}),r=e.select(Wo));const{getReportStats:n,getReportStatsError:o,isResolving:i}=r,a=ds(e),s=n(t,a);if(i("getReportStats",[t,a]))return ys;if(o(t,a))return ms;if(function(e,t){return!(e&&e.data&&e.data.totals&&!(0,ee.isNull)(e.data.totals)&&((0,ee.includes)(ps,t)||e.data.intervals&&0!==e.data.intervals.length))}(s,t))return gs;const c=s&&s.data&&s.data.totals||null;let u=s&&s.data&&s.data.intervals||hs;if(s.totalResults>oe){let e=!0,r=!1;const c=[],l=Math.ceil(s.totalResults/oe);let p=1;for(let s=2;s<=l;s++){const u={...a,page:s},d=n(t,u);if(!i("getReportStats",[t,u])){if(o(t,u)){r=!0,e=!1;break}if(c.push(d),p++,p===l){e=!1;break}}}if(e)return ys;if(r)return ms;(0,ee.forEach)(c,(function(e){e.data&&e.data.intervals&&Array.isArray(e.data.intervals)&&(u=u.concat(e.data.intervals))}))}return Es(H(t,a),c,u)}function Ts(e,t){switch(e){case"currency":return t;case"percent":return".0%";case"number":default:return",";case"average":return",.2r"}}function vs(e){const{query:t,tableQuery:r={}}=e,n=ls(e),o=(0,ia.getCurrentDates)(t,e.defaultDateRange),i=(0,ee.includes)(ps,e.endpoint);return{orderby:t.orderby||"date",order:t.order||"desc",after:i?void 0:(0,ia.appendTimestamp)(o.primary.after,"start"),before:i?void 0:(0,ia.appendTimestamp)(o.primary.before,"end"),page:t.paged||1,per_page:t.per_page||pe.pageSize,...n,...r}}function _s(e){const{endpoint:t}=e;let r=e.selector;e.select&&!e.selector&&(Wr()("option.select",{version:"1.7.0",hint:"You can pass the report selectors through option.selector now."}),r=e.select(Wo));const{getReportItems:n,getReportItemsError:o,hasFinishedResolution:i}=r,a=vs(e),s={query:a,isRequesting:!1,isError:!1,items:{data:[],totalResults:0}},c=n(t,a);return i("getReportItems",[t,a])?o(t,a)?{...s,isError:!0}:{...s,items:c}:{...s,isRequesting:!0}}const As="wc/admin/export";var bs=r(5681),Rs=r.n(bs);const ws=e=>Rs()(H("export",e)),ks=(e,t,r)=>Boolean(e.requesting[t]&&e.requesting[t][ws(r)]),Os=(e,t,r)=>e.exportIds[t]&&e.exportIds[t][ws(r)],Ps=(e,t,r)=>e.errors[t]&&e.errors[t][ws(r)];var Is="SET_EXPORT_ID",Ns="SET_ERROR",Cs="SET_IS_REQUESTING";function Us(e,t,r){return{type:Is,exportType:e,exportArgs:t,exportId:r}}function Ls(e,t,r){return{type:Cs,selector:e,selectorArgs:t,isRequesting:r}}function Ds(e,t,r){return{type:Ns,selector:e,selectorArgs:t,error:r}}function*xs(e,t){yield Ls("startExport",{type:e,args:t},!0);try{const r=yield po({path:`${te}/reports/${e}/export`,method:"POST",data:{report_args:t,email:!0}});yield Ls("startExport",{type:e,args:t},!1);const{export_id:n,message:o}=r.data;if(!n)throw new Error(o);return yield Us(e,t,n),r.data}catch(r){throw yield Ds("startExport",{type:e,args:t},r.message),yield Ls("startExport",{type:e,args:t},!1),r}}(0,j.registerStore)(As,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{errors:{},requesting:{},exportMeta:{},exportIds:{}},{error:t,exportArgs:r,exportId:n,exportType:o,isRequesting:i,selector:a,selectorArgs:s,type:c}=arguments.length>1?arguments[1]:void 0;switch(c){case Cs:return{...e,requesting:{...e.requesting,[a]:{...e.requesting[a],[ws(s)]:i}}};case Is:return{...e,exportMeta:{...e.exportMeta,[n]:{exportType:o,exportArgs:r}},exportIds:{...e.exportIds,[o]:{...e.exportIds[o],[ws({type:o,args:r})]:n}}};case Ns:return{...e,errors:{...e.errors,[a]:{...e.errors[a],[ws(s)]:t}}};default:return e}},actions:x,controls:fo,selectors:D});const Fs=As,Ms="wc/admin/import",Gs=e=>{const{activeImport:t,lastImportStartTimestamp:r}=e;return{activeImport:t,lastImportStartTimestamp:r}||{}},js=e=>{const{period:t,skipPrevious:r}=e;return{period:t,skipPrevious:r}||{}},qs=(e,t)=>{const r=JSON.stringify(t);return e.importStatus[r]||{}},Ws=(e,t)=>{const{importTotals:r,lastImportStartTimestamp:n}=e;return{...r[JSON.stringify(t)],lastImportStartTimestamp:n}||{}},Hs=(e,t)=>{const r=JSON.stringify(t);return e.errors[r]||!1};var Ys="SET_IMPORT_DATE",Bs="SET_IMPORT_ERROR",zs="SET_IMPORT_PERIOD",$s="SET_IMPORT_STARTED",Qs="SET_IMPORT_STATUS",Js="SET_IMPORT_TOTALS",Vs="SET_SKIP_IMPORTED";function Ks(e){return{type:$s,activeImport:e}}function Zs(e,t){return t?{type:Ys,date:e}:{type:zs,date:e}}function Xs(e){return{type:Vs,skipPrevious:e}}function ec(e,t){return{type:Qs,importStatus:t,query:e}}function tc(e,t){return{type:Js,importTotals:t,query:e}}function rc(e,t){return{type:Bs,error:t,query:e}}function*nc(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];yield Ks(t);try{return yield(0,q.apiFetch)({path:e,method:"POST"})}catch(t){throw yield rc(e,t),t}}function*oc(e){try{const t=(0,lt.addQueryArgs)(`${te}/reports/import/status`,(0,ee.omit)(e,["timestamp"])),r=yield(0,q.apiFetch)({path:t});yield ec(e,r)}catch(t){yield rc(e,t)}}function*ic(e){try{const t=(0,lt.addQueryArgs)(`${te}/reports/import/totals`,e),r=yield(0,q.apiFetch)({path:t});yield tc(e,r)}catch(t){yield rc(e,t)}}(0,j.registerStore)(Ms,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{activeImport:!1,importStatus:{},importTotals:{},errors:{},lastImportStartTimestamp:0,period:{date:us()().format((0,X.__)("MM/DD/YYYY","woocommerce")),label:"all"},skipPrevious:!0},{type:t,query:r,importStatus:n,importTotals:o,activeImport:i,date:a,error:s,skipPrevious:c}=arguments.length>1?arguments[1]:void 0;switch(t){case $s:e={...e,activeImport:i,lastImportStartTimestamp:i?Date.now():e.lastImportStartTimestamp};break;case zs:e={...e,period:{...e.period,label:a},activeImport:!1};break;case Ys:e={...e,period:{date:a,label:"custom"},activeImport:!1};break;case Vs:e={...e,skipPrevious:c,activeImport:!1};break;case Qs:e={...e,importStatus:{...e.importStatus,[JSON.stringify(r)]:n},errors:{...e.errors,[JSON.stringify(r)]:!1}};break;case Js:e={...e,importTotals:{...e.importTotals,[JSON.stringify(r)]:o}};break;case Bs:e={...e,errors:{...e.errors,[JSON.stringify(r)]:s}}}return e},actions:M,controls:q.controls,selectors:F,resolvers:G});const ac=Ms}(),(window.wc=window.wc||{}).data=n}();