PageSourceSearch

https://static-awsprod-shop.lilysilk.com/fe/lilysilk-shop-server/p…/static/chunks/9848.d5ecfe5494fc3216.js

js lilysilk.com collected 2026-10-01 12:16:48 UTC 225,005 bytes, 356 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2dc9a0fd-f990-433b-956a-5e75572ae9e6",e._sentryDebugIdIdentifier="sentry-dbid-2dc9a0fd-f990-433b-956a-5e75572ae9e6")}catch(e){}}();var _sentryModuleMetadataGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_sentryModuleMetadataGlobal._sentryModuleMetadata=_sentryModuleMetadataGlobal._sentryModuleMetadata||{},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack]=Object.assign({},_sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack],{"_sentryBundlerPluginAppKey:sa-fe-lilysilk-server-webpack-plugin-application-key":!0}),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9848],{78242:function(e,t,r){"use strict";r.d(t,{Z:function(){return K}});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t;this._insertTag(((t=document.createElement("style")).setAttribute("data-emotion",this.key),void 0!==this.nonce&&t.setAttribute("nonce",this.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t))}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else r.appendChild(document.createTextNode(e));this.ctr++}
vendor: 4,149 bytes, line 1
1,t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),o=Math.abs,s=String.fromCharCode,a=Object.assign;function l(e,t,r){return e.replace(t,r)}function u(e,t){return e.indexOf(t)}function c(e,t){return 0|e.charCodeAt(t)}function d(e,t,r){return e.slice(t,r)}function h(e){return e.length}function p(e,t){return t.push(e),e}var f=1,g=1,y=0,m=0,v=0,b="";function w(e,t,r,n,o,s,a){return{value:e,root:t,parent:r,type:n,props:o,children:s,line:f,column:g,length:a,return:""}}function _(e,t){return a(w("",null,null,"",null,null,0),e,{length:-e.length},t)}function E(){return v=m<y?c(b,m++):0,g++,10===v&&(g=1,f++),v}function S(){return c(b,m)}function O(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function k(e){return f=g=1,y=h(b=e),m=0,[]}function x(e){var t,r;return(t=m-1,r=function e(t){for(;E();)switch(v){case t:return m;case 34:case 39:34!==t&&39!==t&&e(v);break;case 40:41===t&&e(t);break;case 92:E()}return m}(91===e?e+2:40===e?e+1:e),d(b,t,r)).trim()}var R="-ms-",A="-moz-",T="-webkit-",P="comm",C="rule",I="decl",N="@keyframes";function j(e,t){for(var r="",n=e.length,o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function L(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case I:return e.return=e.return||e.value;case P:return"";case N:return e.return=e.value+"{"+j(e.children,n)+"}";case C:e.value=e.props.join(",")}return h(r=j(e.children,n))?e.return=e.value+"{"+r+"}":""}function D(e,t,r,n,s,a,u,c,h,p,f){for(var g=s-1,y=0===s?a:[""],m=y.length,v=0,b=0,_=0;v<n;++v)for(var E=0,S=d(e,g+1,g=o(b=u[v])),O=e;E<m;++E)(O=(b>0?y[E]+" "+S:l(S,/&\f/g,y[E])).trim())&&(h[_++]=O);return w(e,t,r,0===s?C:c,h,p,f)}function Z(e,t,r,n){return w(e,t,r,I,d(e,0,n),d(e,n+1,-1),n)}var F=function(e,t,r){for(var n=0,o=0;n=o,o=S(),38===n&&12===o&&(t[r]=1),!O(o);)E();return d(b,e,m)},U=function(e,t){var r=-1,n=44;do switch(O(n)){case 0:38===n&&12===S()&&(t[r]=1),e[r]+=F(m-1,t,r);break;case 2:e[r]+=x(n);break;case 4:if(44===n){e[++r]=58===S()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=s(n)}while(n=E());return e},$=function(e,t){var r;return r=U(k(e),t),b="",r},z=new WeakMap,q=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||z.get(r))&&!n){z.set(e,!0);for(var o=[],s=$(t,o),a=r.props,l=0,u=0;l<s.length;l++)for(var c=0;c<a.length;c++,u++)e.props[u]=o[l]?s[l].replace(/&\f/g,a[c]):a[c]+" "+s[l]}}},V=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},B=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case I:e.return=function e(t,r){switch(45^c(t,0)?(((r<<2^c(t,0))<<2^c(t,1))<<2^c(t,2))<<2^c(t,3):0){case 5103:return T+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return T+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return T+t+A+t+R+t+t;case 6828:case 4268:return T+t+R+t+t;case 6165:return T+t+R+"flex-"+t+t;case 5187:return T+t+l(t,/(\w+).+(:[^]+)/,T+"box-$1$2"+R+"flex-$1$2")+t;case 5443:return T+t+R+"flex-item-"+l(t,/flex-|-self/,"")+t;case 4675:return T+t+R+"flex-line-pack"+l(t,/align-content|flex-|-self/,"")+t;case 5548:return T+t+R+l(t,"shrink","negative")+t;case 5292:return T+t+R+l(t,"basis","preferred-size")+t;case 6060:return T+"box-"+l(t,"-grow","")+T+t+R+l(t,"grow","positive")+t;case 4554:return T+l(t,/([^-])(transform)/g,"$1"+T+"$2")+t;case 6187:return l(l(l(t,/(zoom-|grab)/,T+"$1"),/(image-set)/,T+"$1"),t,"")+t;case 5495:case 3959:return l(t,/(image-set\([^]*)/,T+"$1$`$1");case 4968:return l(l(t,/(.+:)(flex-)?(.*)/,T+"box-pack:$3"+R+"flex-
1pack:$3"),/s.+-b[^;]+/,"justify")+T+t+t;case 4095:case 3583:case 4068:case 2532:return l(t,/(.+)-inline(.+)/,T+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(t)-1-r>6)switch(c(t,r+1)){case 109:if(45!==c(t,r+4))break;case 102:return l(t,/(.+:)(.+)-([^]+)/,"$1"+T+"$2-$3$1"+A+(108==c(t,r+3)?"$3":"$2-$3"))+t;case 115:return~u(t,"stretch")?e(l(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==c(t,r+1))break;case 6444:switch(c(t,h(t)-3-(~u(t,"!important")&&10))){case 107:return l(t,":",":"+T)+t;case 101:return l(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+T+(45===c(t,14)?"inline-":"")+"box$3$1"+T+"$2$3$1"+R+"$2box$3")+t}break;case 5936:switch(c(t,r+11)){case 114:return T+t+R+l(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return T+t+R+l(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return T+t+R+l(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return T+t+R+t+t}return t}(e.value,e.length);break;case N:return j([_(e,{value:l(e.value,"@","@"+T)})],n);case C:if(e.length){var o,s;return o=e.props,s=function(t){var r;switch(r=t,(r=/(::plac\w+|:read-\w+)/.exec(r))?r[0]:r){case":read-only":case":read-write":return j([_(e,{props:[l(t,/:(read-\w+)/,":"+A+"$1")]})],n);case"::placeholder":return j([_(e,{props:[l(t,/:(plac\w+)/,":"+T+"input-$1")]}),_(e,{props:[l(t,/:(plac\w+)/,":"+A+"$1")]}),_(e,{props:[l(t,/:(plac\w+)/,R+"input-$1")]})],n)}return""},o.map(s).join("")}}}],K=function(e){var t,r,o,a,y,_,R=e.key;if("css"===R){var A=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(A,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var T=e.stylisPlugins||B,C={},I=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+R+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)C[t[r]]=!0;I.push(e)});var N=(r=(t=[q,V].concat(T,[L,(o=function(e){_.insert(e)},function(e){!e.root&&(e=e.return)&&o(e)})])).length,function(e,n,o,s){for(var a="",l=0;l<r;l++)a+=t[l](e,n,o,s)||"";return a}),F=function(e){var t,r;return j((r=function e(t,r,n,o,a,y,_,k,R){for(var A,T=0,C=0,I=_,N=0,j=0,L=0,F=1,U=1,$=1,z=0,q="",V=a,B=y,K=o,W=q;U;)switch(L=z,z=E()){case 40:if(108!=L&&58==c(W,I-1)){-1!=u(W+=l(x(z),"&","&\f"),"&\f")&&($=-1);break}case 34:case 39:case 91:W+=x(z);break;case 9:case 10:case 13:case 32:W+=function(e){for(;v=S();)if(v<33)E();else break;return O(e)>2||O(v)>3?"":" "}(L);break;case 92:W+=function(e,t){for(var r;--t&&E()&&!(v<48)&&!(v>102)&&(!(v>57)||!(v<65))&&(!(v>70)||!(v<97)););return r=m+(t<6&&32==S()&&32==E()),d(b,e,r)}(m-1,7);continue;case 47:switch(S()){case 42:case 47:p(w(A=function(e,t){for(;E();)if(e+v===57)break;else if(e+v===84&&47===S())break;return"/*"+d(b,t,m-1)+"*"+s(47===e?e:E())}(E(),m),r,n,P,s(v),d(A,2,-2),0),R);break;default:W+="/"}break;case 123*F:k[T++]=h(W)*$;case 125*F:case 59:case 0:switch(z){case 0:case 125:U=0;case 59+C:-1==$&&(W=l(W,/\f/g,"")),j>0&&h(W)-I&&p(j>32?Z(W+";",o,n,I-1):Z(l(W," ","")+";",o,n,I-2),R);break;case 59:W+=";";default:if(p(K=D(W,r,n,T,C,a,k,q,V=[],B=[],I),y),123===z){if(0===C)e(W,r,K,K,V,y,I,k,B);else switch(99===N&&110===c(W,3)?100:N){case 100:case 108:case 109:case 115:e(t,K,K,o&&p(D(t,K,K,0,0,a,k,q,a,V=[],I),B),a,B,I,k,o?V:B);break;default:e(W,K,K,K,[""],B,0,k,B)}}}T=C=j=0,F=$=1,q=W="",I=_;break;case 58:I=1+h(W),j=L;default:if(F<1){if(123==z)--F;else if(125==z&&0==F++&&125==(v=m>0?c(b,--m):0,g--,10===v&&(g=1,f--),v))continue}switch(W+=s(z),z*F){case 38:$=C>0?1:(W+="\f",-1);break;case 44:k[T++]=(h(W)-1)*$,$=1;break;case 64:45===S()&&(W+=x(E())),N=S(),C=I=h(q=W+=function(e){for(;!O(S());)E();return d(b,e,m)}(m)),z++;break;case 45:45===L&&2==h(W)&&(F=0)}}return y}("",null,null,null,[""],t=k(t=e),0,[0],t),b="",r),N)};y=function(e,t,r,n){_=r,F(e?e+"{"+t.styles+"}":t.styles),n&&(U.inserted[t.name]=!0)};var U={key:R,sheet:new n({key:R,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:C,registered:{},insert:y};return U.sheet.hydrate(I),U}},36609:function(e,t,r){"use strict";r.d(t,{C:function(){return h},E:function(){return v},c:function(){return y},h:function(){return f}});var n,o=r(2265),s=r(78242),a=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},l=function(e,t,r){a(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next;while(void 0!==o)}},u=r(86156),c=r(24006),d=o.createContext("undefined"!=typeof HTMLElement?(0,s.Z)({key:"css"}):null),h=d.Provider,p=o.createContext({}),f={}.hasOwnProperty,g="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",y=function(e,t){var r={};for(var n in t)f.call(t,n)&&(r[n]=t[n]);return r[g]=e,r},m=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return a(t,r,n),(0,c.L)(function(){return l(t,r,n)}),null},v=(n=function(e,t,r){var n,s,a,l=e.css;"string"==typeof l&&void 0!==t.registered[l]&&(l=t.registered[l]);var c=e[g],d=[l],h="";"string"==typeof e.className?(n=t.registered,s=e.className,a="",s.split(" ").forEach(function(e){void 0!==n[e]?d.push(n[e]+";"):e&&(a+=e+" ")}),h=a):null!=e.className&&(h=e.className+" ");var y=(0,u.O)(d,void 0,o.useContext(p));h+=t.key+"-"+y.name;var v={};for(var b in e)f.call(e,b)&&"css"!==b&&b!==g&&(v[b]=e[b]);return v.className=h,r&&(v.ref=r),o.createElement(o.Fragment,null,o.createElement(m,{cache:t,serialized:y,isStringTag:"string"==typeof c}),o.createElement(c,v))},(0,o.forwardRef)(function(e,t){return n(e,(0,o.useContext)(d),t)}))},3146:function(e,t,r){"use strict";r.d(t,{iv:function(){return c}});var n,o,s=r(36609),a=r(2265);r(24006);var l=r(86156);r(78242),r(63285);var u=function(e,t){var r=arguments;if(null==t||!s.h.call(t,"css"))return a.createElement.apply(void 0,r);var n=r.length,o=Array(n);o[0]=s.E,o[1]=(0,s.c)(e,t);for(var l=2;l<n;l++)o[l]=r[l];return a.createElement.apply(null,o)};function c(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,l.O)(t)}n=u||(u={}),o||(o=n.JSX||(n.JSX={}))},81595:function(e,t,r){"use strict";r.d(t,{BX:function(){return l},HY:function(){return s},tZ:function(){return a}});var n=r(57437),o=r(36609);r(2265),r(78242),r(63285),r(86156),r(24006);var s=n.Fragment,a=function(e,t,r){return o.h.call(t,"css")?n.jsx(o.E,(0,o.c)(e,t),r):n.jsx(e,t,r)},l=function(e,t,r){return o.h.call(t,"css")?n.jsxs(o.E,(0,o.c)(e,t),r):n.jsxs(e,t,r)}},86156:function(e,t,r){"use strict";r.d(t,{O:function(){return y}});var n,o,s,a={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGr
1idRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},l=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},d=function(e){return null!=e&&"boolean"!=typeof e},h=(n=function(e){return c(e)?e:e.replace(l,"-$&").toLowerCase()},o=Object.create(null),function(e){return void 0===o[e]&&(o[e]=n(e)),o[e]}),p=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(u,function(e,t,r){return s={name:t,styles:r,next:s},t})}return 1===a[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function f(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return s={name:r.name,styles:r.styles,next:s},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)s={name:n.name,styles:n.styles,next:s},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=f(e,t,r[o])+";";else for(var s in r){var a=r[s];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=s+"{"+t[a]+"}":d(a)&&(n+=h(s)+":"+p(s,a)+";");else if(Array.isArray(a)&&"string"==typeof a[0]&&(null==t||void 0===t[a[0]]))for(var l=0;l<a.length;l++)d(a[l])&&(n+=h(s)+":"+p(s,a[l])+";");else{var u=f(e,t,a);switch(s){case"animation":case"animationName":n+=h(s)+":"+u+";";break;default:n+=s+"{"+u+"}"}}}return n}(e,t,r);case"function":if(void 0!==e){var o=s,a=r(e);return s=o,f(e,t,a)}}if(null==t)return r;var l=t[r];return void 0!==l?l:r}var g=/label:\s*([^\s;{]+)\s*(;|$)/g;function y(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n,o=!0,a="";s=void 0;var l=e[0];null==l||void 0===l.raw?(o=!1,a+=f(r,t,l)):a+=l[0];for(var u=1;u<e.length;u++)a+=f(r,t,e[u]),o&&(a+=l[u]);g.lastIndex=0;for(var c="";null!==(n=g.exec(a));)c+="-"+n[1];return{name:function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))*1540483477+((t>>>16)*59797<<16),t^=t>>>24,r=(65535&t)*1540483477+((t>>>16)*59797<<16)^(65535&r)*1540483477+((r>>>16)*59797<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r^=255&e.charCodeAt(n),r=(65535&r)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,(((r=(65535&r)*1540483477+((r>>>16)*59797<<16))^r>>>15)>>>0).toString(36)}(a)+c,styles:a,next:s}}},24006:function(e,t,r){"use strict";r.d(t,{L:function(){return a}});var n,o=r(2265),s=!!(n||(n=r.t(o,2))).useInsertionEffect&&(n||(n=r.t(o,2))).useInsertionEffect,a=s||function(e){return e()};s||o.useLayoutEffect},21009:function(e,t,r){"use strict";var n=r(2265),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=n.useState,a=n.useEffect,l=n.useLayoutEffect,u=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var d="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=s({inst:{value:r,getSnapshot:t}}),o=n[0].inst,d=n[1];return l(function(){o.value=r,o.getSnapshot=t,c(o)&&d({inst:o})},[e,r,t]),a(function(){return c(o)&&d({inst:o}),e(function(){c(o)&&d({inst:o})})},[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:d},63908:function(e,t,r){"use strict";e.exports=r(21009)},61542:function(e,t,r){"use strict";r.d(t,{Up:function(){return E},Vv:function(){return A},Xn:function(){return R},ch:function(){return S}});var n,o,s,a,l,u,c=r(2265);(n=a||(a={})).INITIAL="initial",n.PENDING="pending",n.REJECTED="rejected",n.RESOLVED="resolved",(o=l||(l={})).LOADING_STATUS="setLoadingStatus",o.RESET_OPTIONS="resetOptions",o.SET_BRAINTREE_INSTANCE="braintreeInstance",(s=u||(u={})).NUMBER="number",s.CVV="cvv",s.EXPIRATION_DATE="expirationDate",s.EXPIRATION_MONTH="expirationMonth",s.EXPIRATION_YEAR="expirationYear",s.POSTAL_CODE="postalCode";var d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function h(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function p(e,t,r){if(r||2==arguments.length)for(var n,o=0,s=t.length;o<s;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var f="data-react-paypal-script-id",g={DATA_JS_SDK_LIBRARY:"dataJsSdkLibrary",DATA_LIBRARY_VALUE:"react-paypal-js",DATA_NAMESPACE:"dataNamespace",DATA_SDK_INTEGRATION_SOURCE:"dataSdkIntegrationSource"},y="paypal";function m(e){return void 0===e&&(e=y),window[e]}function v(e){var t=e.reactComponentName,r=e.sdkComponentKey,n=e.sdkRequestedComponents,o=void 0===n?"":n,s=e.sdkDataNamespace,a=r.charAt(0).toUpperCase().concat(r.substring(1)),l="Unable to render <".concat(t," /> because window.").concat(void 0===s?y:s,".").concat(a," is undefined."),u="string"==typeof o?o:o.join(",");
1if(!u.includes(r)){var c=[u,r].filter(Boolean).join();l+="\nTo fix the issue, add '".concat(r,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(c,"'}}>`.")}return l}function b(e){e[f];var t=h(e,[f+""]);return"react-paypal-js-".concat(function(e){for(var t="",r=0;r<e.length;r++){var n=e[r].charCodeAt(0)*r;e[r+1]&&(n+=e[r+1].charCodeAt(0)*(r-1)),t+=String.fromCharCode(97+Math.abs(n)%26)}return t}(JSON.stringify(t)))}function w(e,t){var r,n,o,s;switch(t.type){case l.LOADING_STATUS:if("object"==typeof t.value)return d(d({},e),{loadingStatus:t.value.state,loadingStatusErrorMessage:t.value.message});return d(d({},e),{loadingStatus:t.value});case l.RESET_OPTIONS:return o=e.options[f],(null==(s=self.document.querySelector("script[".concat(f,'="').concat(o,'"]')))?void 0:s.parentNode)&&s.parentNode.removeChild(s),d(d({},e),{loadingStatus:a.PENDING,options:d(d(((r={})[g.DATA_SDK_INTEGRATION_SOURCE]=g.DATA_LIBRARY_VALUE,r),t.value),((n={})[f]="".concat(b(t.value)),n))});case l.SET_BRAINTREE_INSTANCE:return d(d({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var _=(0,c.createContext)(null);function E(){var e=function(e){if("function"==typeof(null==e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}((0,c.useContext)(_));return[d(d({},e),{isInitial:e.loadingStatus===a.INITIAL,isPending:e.loadingStatus===a.PENDING,isResolved:e.loadingStatus===a.RESOLVED,isRejected:e.loadingStatus===a.REJECTED}),e.dispatch]}(0,c.createContext)({});var S=function(e){var t,r,n=e.className,o=e.disabled,s=void 0!==o&&o,a=e.children,l=e.forceReRender,u=h(e,["className","disabled","children","forceReRender"]),f="".concat(void 0===n?"":n," ").concat(s?"paypal-buttons-disabled":"").trim(),y=(0,c.useRef)(null),b=(0,c.useRef)(null),w=((t=(0,c.useRef)(new Proxy({},{get:function(e,t,r){return"function"==typeof e[t]?function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e[t].apply(e,r)}:Reflect.get(e,t,r)}}))).current=Object.assign(t.current,u),t.current),_=E()[0],O=_.isResolved,k=_.options,x=(0,c.useState)(null),R=x[0],A=x[1],T=(0,c.useState)(!0),P=T[0],C=T[1],I=(0,c.useState)(null)[1];function N(){null!==b.current&&b.current.close().catch(function(){})}return(null===(r=b.current)||void 0===r?void 0:r.updateProps)&&b.current.updateProps({message:u.message}),(0,c.useEffect)(function(){if(!1===O)return N;var e=m(k.dataNamespace);if(void 0===e||void 0===e.Buttons)return I(function(){throw Error(v({reactComponentName:S.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:k.components,sdkDataNamespace:k[g.DATA_NAMESPACE]}))}),N;try{b.current=e.Buttons(d(d({},w),{onInit:function(e,t){A(t),"function"==typeof u.onInit&&u.onInit(e,t)}}))}catch(e){return I(function(){throw Error("Failed to render <PayPalButtons /> component. Failed to initialize:  ".concat(e))})}return!1===b.current.isEligible()?C(!1):y.current&&b.current.render(y.current).catch(function(e){null!==y.current&&0!==y.current.children.length&&I(function(){throw Error("Failed to render <PayPalButtons /> component. ".concat(e))})}),N},p(p([O],void 0===l?[]:l,!0),[u.fundingSource],!1)),(0,c.useEffect)(function(){null!==R&&(!0===s?R.disable().catch(function(){}):R.enable().catch(function(){}))},[s,R]),c.createElement(c.Fragment,null,P?c.createElement("div",{ref:y,style:s?{opacity:.38}:{},className:f}):a)};function O(e,t){void 0===t&&(t={});var r=document.createElement("script");return r.src=e,Object.keys(t).forEach(function(e){r.setAttribute(e,t[e]),"data-csp-nonce"===e&&r.setAttribute("nonce",t["data-csp-nonce"])}),r}function k(e,t){if("object"!=typeof e||null===e)throw Error("Expected an options object.");var r=e.environment;if(r&&"production"!==r&&"sandbox"!==r)throw Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==t&&"function"!=typeof t)throw Error("Expected PromisePonyfill to be a function.")}S.displayName="PayPalButtons","function"==typeof SuppressedError&&SuppressedError;var x=function(e){var t=e.className,r=e.children,n=h(e,["className","children"]),o=E()[0],s=o.isResolved,a=o.options,l=(0,c.useRef)(null),u=(0,c.useState)(!0),p=u[0],f=u[1],y=(0,c.useState)(null)[1],b=function(e){var t=l.current;if(!t||!e.isEligible())return f(!1);t.firstChild&&t.removeChild(t.firstChild),e.render(t).catch(function(e){null!==t&&0!==t.children.length&&y(function(){throw Error("Failed to render <PayPalMarks /> component. ".concat(e))})})};return(0,c.useEffect)(function(){if(!1!==s){var e=m(a[g.DATA_NAMESPACE]);if(void 0===e||void 0===e.Marks)return y(function(){throw Error(v({reactComponentName:x.displayName,sdkComponentKey:"marks",sdkRequestedComponents:a.components,sdkDataNamespace:a[g.DATA_NAMESPACE]}))});b(e.Marks(d({},n)))}},[s,n.fundingSource]),c.createElement(c.Fragment,null,p?c.createElement("div",{ref:l,className:void 0===t?"":t}):r)};x.displayName="PayPalMarks";var R=function(e){var t=e.className,r=e.forceReRender,n=h(e,["className","forceReRender"]),o=E()[0],s=o.isResolved,a=o.options,l=(0,c.useRef)(null),u=(0,c.useRef)(null),f=(0,c.useState)(null)[1];return(0,c.useEffect)(function(){if(!1!==s){var e=m(a[g.DATA_NAMESPACE]);if(void 0===e||void 0===e.Messages)return f(function(){throw Error(v({reactComponentName:R.displayName,sdkComponentKey:"messages",sdkRequestedComponents:a.components,sdkDataNamespace:a[g.DATA_NAMESPACE]}))});u.current=e.Messages(d({},n)),u.current.render(l.current).catch(function(e){null!==l.current&&0!==l.current.children.length&&f(function(){throw Error("Failed to render <PayPalMessages /> component. ".concat(e))})})}},p([s],void 0===r?[]:r,!0)),c.createElement("div",{ref:l,className:void 0===t?"":t})};R.displayName="PayPalMessages";var A=function(e){var t,r=e.options,n=void 0===r?{clientId:"test"}:r,o=e.children,s=e.deferLoading,u=void 0!==s&&s,h=(0,c.useReducer)(w,{options:d(d({},n),((t={})[g.DATA_JS_SDK_LIBRARY]=g.DATA_LIBRARY_VALUE,t[g.DATA_SDK_INTEGRATION_SOURCE]=g.DATA_LIBRARY_VALUE,t[f]="".concat(b(n)),t)),loadingStatus:u?a.INITIAL:a.PEND
1ING}),p=h[0],y=h[1];return(0,c.useEffect)(function(){if(!1===u&&p.loadingStatus===a.INITIAL)return y({type:l.LOADING_STATUS,value:a.PENDING});if(p.loadingStatus===a.PENDING){var e=!0;return(function(e,t){if(void 0===t&&(t=Promise),k(e,t),"undefined"==typeof document)return t.resolve(null);var r,n,o,s,a,l,u,c,d=(n=e.sdkBaseUrl,o=e.environment,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}(e,["sdkBaseUrl","environment"]),a=n||("sandbox"===o?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"),u=(l=Object.keys(s).filter(function(e){return void 0!==s[e]&&null!==s[e]&&""!==s[e]}).reduce(function(e,t){var r=s[t].toString();return"data"===(t=t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()})).substring(0,4)||"crossorigin"===t?e.attributes[t]=r:e.queryParams[t]=r,e},{queryParams:{},attributes:{}})).queryParams,c=l.attributes,u["merchant-id"]&&-1!==u["merchant-id"].indexOf(",")&&(c["data-merchant-id"]=u["merchant-id"],u["merchant-id"]="*"),{url:"".concat(a,"?").concat((r="",Object.keys(u).forEach(function(e){0!==r.length&&(r+="&"),r+=e+"="+u[e]}),r)),attributes:c}),h=d.url,p=d.attributes,f=p["data-namespace"]||"paypal",g=window[f];return(p["data-js-sdk-library"]||(p["data-js-sdk-library"]="paypal-js"),function(e,t){var r=document.querySelector('script[src="'.concat(e,'"]'));if(null===r)return null;var n=O(e,t),o=r.cloneNode();if(delete o.dataset.uidAuto,Object.keys(o.dataset).length!==Object.keys(n.dataset).length)return null;var s=!0;return Object.keys(o.dataset).forEach(function(e){o.dataset[e]!==n.dataset[e]&&(s=!1)}),s?r:null}(h,p)&&g)?t.resolve(g):(function(e,t){void 0===t&&(t=Promise),k(e,t);var r=e.url,n=e.attributes;if("string"!=typeof r||0===r.length)throw Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw Error("Expected attributes to be an object.");return new t(function(e,t){var o,s,a,l,u,c;if("undefined"==typeof document)return e();s=(o={url:r,attributes:n,onSuccess:function(){return e()},onError:function(){return t(Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}}).url,a=o.attributes,l=o.onSuccess,u=o.onError,(c=O(s,a)).onerror=u,c.onload=l,document.head.insertBefore(c,document.head.firstElementChild)})})({url:h,attributes:p},t).then(function(){var e=window[f];if(e)return e;throw Error("The window.".concat(f," global variable is not available."))})})(p.options).then(function(){e&&y({type:l.LOADING_STATUS,value:a.RESOLVED})}).catch(function(t){console.error("".concat("Failed to load the PayPal JS SDK script."," ").concat(t)),e&&y({type:l.LOADING_STATUS,value:{state:a.REJECTED,message:String(t)}})}),function(){e=!1}}},[p.options,u,p.loadingStatus]),c.createElement(_.Provider,{value:d(d({},p),{dispatch:y})},o)};function T(){}(0,c.createContext)({cardFieldsForm:null,fields:{},registerField:T,unregisterField:T})},46220:function(e,t,r){e.exports=r(94776)},94776:function(e,t,r){var n=r(95428);t.operation=function(e){return new n(t.timeouts(e),{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw Error("minTimeout is greater than maxTimeout");for(var n=[],o=0;o<t.retries;o++)n.push(this.createTimeout(o,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(o,t)),n.sort(function(e,t){return e-t}),n},t.createTimeout=function(e,t){return Math.min(Math.round((t.randomize?Math.random()+1:1)*Math.max(t.minTimeout,1)*Math.pow(t.factor,e)),t.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var o in n=[],e)"function"==typeof e[o]&&n.push(o);for(var s=0;s<n.length;s++){var a=n[s],l=e[a];e[a]=(function(n){var o=t.operation(r),s=Array.prototype.slice.call(arguments,1
1),a=s.pop();s.push(function(e){o.retry(e)||(e&&(arguments[0]=o.mainError()),a.apply(this,arguments))}),o.attempt(function(){n.apply(e,s)})}).bind(e,l),e[a].options=r}}},95428:function(e){function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),r=this._cachedTimeouts.slice(-1)}var n=this;return this._timer=setTimeout(function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout(function(){n._operationTimeoutCb(n._attempts)},n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)},r),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var o=this._errors[n],s=o.message,a=(e[s]||0)+1;e[s]=a,a>=r&&(t=o,r=a)}return t}},69917:function(e){e.exports={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}},639:function(e,t,r){"use strict";let n,o;r.d(t,{Z3:function(){return rM},gh:function(){return ne},uX:function(){return nt},iF:function(){return rS},aq:function(){return rO},Pl:function(){return rE},WO:function(){return rk},zt:function(){return rz},O9:function(){return rL},cj:function(){return na},dp:function(){return no},qx:function(){return rR},TD:function(){return rx},N:function(){return rA},K_:function(){return ni},S7:function(){return rT},oJ:function(){return rF},P$:function(){return rP},hX:function(){return rC},MB:function(){return rZ},kk:function(){return rI},uy:function(){return rN},Pt:function(){return ns},n5:function(){return rG},Bp:function(){return r_},ry:function(){return nn},u4:function(){return rU},KO:function(){return rq},Dv:function(){return rV},Uw:function(){return r4},i0:function(){return r6},fC:function(){return r5},Jx:function(){return r3},bn:function(){return rK},Gz:function(){return r8},iQ:function(){return r9},b9:function(){return rB},nA:function(){return rJ}});var s,a,l,u,c,d,h,p,f,g,y,m,v,b=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},w=r(32613),_=r(20937),E=r(28070),S=r(54492),O=r(46220);let k=Object.prototype.toString,x=e=>"[object Error]"===k.call(e),R=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred."]);class A extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}let T=(e,t,r)=>{let n=r.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=n,e};async function P(e,t){return new Promise((r,n)=>{t={...t},t.onFailedAttempt??=()=>{},t.shouldRetry??=()=>!0,t.retries??=10;let o=O.operation(t),s=()=>{o.stop(),n(t.signal?.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});let a=()=>{t.signal?.removeEventListener("abort",s),o.stop()};o.attempt(async s=>{try{let t=await e(s);a(),r(t)}catch(e){try{if(!(e instanceof Error))throw TypeError(`Non-error was thrown: "${e}". You should only throw errors.`);if(e instanceof A)throw e.originalError;if(e instanceof TypeError&&!function(e){if(!(e&&x(e)&&"TypeError"===e.name&&"string"==typeof e.message))return!1;let{message:t,stack:r}=e;return"Load failed"===t?void 0===r||"__sentry_captured__"in e:!!t.startsWith("error sending request for url")||R.has(t)}(e))throw e;if(T(e,s,t),await t.shouldRetry(e)||(o.stop(),n(e)),await t.onFailedAttempt(e),!o.retry(e))throw o.mainError()}catch(e){T(e,s,t),a(),n(e)}}})})}var C=r(2265);function I(e){return"function"==typeof e.write}function N(e){return"v"in e||"e"in e}function j(e){if("e"in e)throw e.e;if(!("v"in e))throw Error("[Bug] atom state is not initialized");return e.v}function L(e){return"function"==typeof(null==e?void 0:e.then)}function D(e,t,r){if(!r.p.has(e)){r.p.add(e);let n=()=>r.p.delete(e);t.then(n,n)}}function Z(e,t,r){let n=r.get(e),o=null==n?void 0:n.t,s=t.p;if(!(null==o?void 0:o.size))return s;if(!s.size)return o;let a=new Set(o);for(let e of s)a.add(e);return a}let F=(e,t,r,...n)=>r.read(...n),U=(e,t,r,...n)=>r.write(...n),$=(e,t,r)=>r.INTERNAL_onInit(t),z=(e,t,r,n)=>{var o;return null==(o=r.onMount)?void 0:o.call(r,n)},q=(e,t,r)=>{var n;let o=e[0],s=o.get(r);if(!s){let a=e[6],l=e[9];s={d:new Map,p:new Set,n:0},o.set(r,s),null==(n=a.i)||n.call(a,r),r.INTERNAL_onInit&&l(e,t,r)}return s},V=(e,t)=>{var r;let n=e[1],o=e[3],s=e[4],a=e[5],l=e[6],u=e[13];
1if(!l.f&&!o.size&&!s.size&&!a.size)return;let c=[],d=e=>{try{e()}catch(e){c.push(e)}};do{l.f&&d(l.f);let c=new Set;for(let e of o){let t=null==(r=n.get(e))?void 0:r.l;if(t)for(let e of t)c.add(e)}for(let e of(o.clear(),a))c.add(e);for(let e of(a.clear(),s))c.add(e);for(let e of(s.clear(),c))d(e);o.size&&u(e,t)}while(o.size||a.size||s.size);if(c.length)throw AggregateError(c)},B=(e,t)=>{let r=e[1],n=e[2],o=e[3],s=e[11],a=e[14],l=e[17];if(!o.size)return;let u=[],c=[],d=new WeakSet,h=new WeakSet,p=[],f=[];for(let r of o)p.push(r),f.push(s(e,t,r));for(;p.length;){let o=p.length-1,a=p[o],l=f[o];if(h.has(a)){p.pop(),f.pop();continue}if(d.has(a)){if(n.get(a)===l.n)u.push(a),c.push(l);else if(n.has(a))throw Error("[Bug] invalidated atom exists");h.add(a),p.pop(),f.pop();continue}for(let n of(d.add(a),Z(a,l,r)))d.has(n)||(p.push(n),f.push(s(e,t,n)))}for(let r=u.length-1;r>=0;--r){let s=u[r],d=c[r],h=!1;for(let e of d.d.keys())if(e!==s&&o.has(e)){h=!0;break}h&&(n.set(s,d.n),a(e,t,s),l(e,t,s)),n.delete(s)}},K=new WeakSet,W=(e,t,r)=>{var n,o;let s,a;let l=e[1],u=e[2],c=e[3],d=e[6],h=e[7],p=e[11],f=e[12],g=e[13],y=e[14],m=e[16],v=e[17],b=e[20],w=e[26],_=e[28],E=p(e,t,r),S=_[0];if(N(E)){if(l.has(r)&&u.get(r)!==E.n||E.m===S)return E.m=S,E;let n=!1;for(let[r,o]of E.d)if(y(e,t,r).n!==o){n=!0;break}if(!n)return E.m=S,E}let O=!0,k=new Set(E.d.keys()),x=()=>{for(let e of k)E.d.delete(e)},R=()=>{if(l.has(r)){let n=!c.size;v(e,t,r),n&&(g(e,t),f(e,t))}},A=E.n,T=u.get(r)===A;try{K.delete(t);let o=h(e,t,r,n=>{var o;
1if(n===r){let r=p(e,t,n);if(!N(r)){if("init"in n)b(e,t,n,n.init);else throw Error("no atom init")}return j(r)}let s=y(e,t,n);try{return j(s)}finally{k.delete(n),E.d.set(n,s.n),L(E.v)&&D(r,E.v,s),l.has(r)&&(null==(o=l.get(n))||o.t.add(r)),O||R()}},{get signal(){return s||(s=new AbortController),s.signal},get setSelf(){return console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),I(r)||console.warn("setSelf function cannot be used with read-only atom"),!a&&I(r)&&(a=(...n)=>{if(O&&console.warn("setSelf function cannot be called in sync"),!O)try{return m(e,t,r,n)}finally{g(e,t),f(e,t)}}),a}});if(K.has(t)&&console.warn("Detected store mutation during atom read. This is not supported."),b(e,t,r,o),L(o)){w(e,t,o,()=>null==s?void 0:s.abort());let r=()=>{x(),R()};o.then(r,r)}else x();return null==(n=d.r)||n.call(d,r),E.m=S,E}catch(e){if(function(e){if(!(e instanceof Error))return!1;let t=e.name,r=e.message.toLowerCase();return("RangeError"===t||"InternalError"===t)&&(r.includes("call stack")||r.includes("too much recursion")||r.includes("stack overflow"))}(e))throw e;return delete E.v,E.e=e,++E.n,E.m=S,E}finally{O=!1,E.n!==A&&T&&(u.set(r,E.n),c.add(r),null==(o=d.c)||o.call(d,r))}},H=(e,t,r)=>{let n=e[1],o=e[2],s=e[11],a=[r];for(;a.length;){let r=a.pop(),l=s(e,t,r);for(let u of Z(r,l,n)){let r=s(e,t,u);o.get(u)!==r.n&&(o.set(u,r.n),a.push(u))}}},G=(e,t,r,n)=>{let o=e[3],s=e[6],a=e[8],l=e[11],u=e[12],c=e[13],d=e[14],h=e[15],p=e[16],f=e[17],g=e[20],y=e[28],m=!0;try{return a(e,t,r,r=>j(d(e,t,r)),(n,...a)=>{var d;let v=l(e,t,n);try{if(n!==r)return p(e,t,n,a);{if(!("init"in n))throw Error("atom not writable");K.add(t);let r=v.n,l=a[0];g(e,t,n,l),f(e,t,n),r!==v.n&&(++y[0],o.add(n),h(e,t,n),null==(d=s.c)||d.call(s,n));return}}finally{m||(c(e,t),u(e,t))}},...n)}finally{m=!1}},Y=(e,t,r)=>{var n;let o=e[1],s=e[3],a=e[6],l=e[11],u=e[15],c=e[18],d=e[19],h=l(e,t,r),p=o.get(r);if(p&&h.d.size>0){for(let[o,d]of h.d)if(!p.d.has(o)){let h=l(e,t,o);c(e,t,o).t.add(r),p.d.add(o),d!==h.n&&(s.add(o),u(e,t,o),null==(n=a.c)||n.call(a,o))}for(let n of p.d)if(!h.d.has(n)){p.d.delete(n);let o=d(e,t,n);null==o||o.t.delete(r)}}},J=(e,t,r)=>{var n;let o=e[1],s=e[4],a=e[6],l=e[10],u=e[11],c=e[12],d=e[13],h=e[14],p=e[16],f=e[18],g=u(e,t,r),y=o.get(r);if(!y){for(let n of(h(e,t,r),g.d.keys()))f(e,t,n).t.add(r);y={l:new Set,d:new Set(g.d.keys()),t:new Set},o.set(r,y),I(r)&&r.onMount&&s.add(()=>{let n=!0;try{let o=l(e,t,r,(...o)=>{try{return p(e,t,r,o)}finally{n||(d(e,t),c(e,t))}});o&&(y.u=()=>{n=!0;try{o()}finally{n=!1}})}finally{n=!1}}),null==(n=a.m)||n.call(a,r)}return y},Q=(e,t,r)=>{var n,o;let s=e[1],a=e[5],l=e[6],u=e[11],c=e[19],d=u(e,t,r),h=s.get(r);if(!h||h.l.size)return h;let p=!1;for(let e of h.t)if(null==(n=s.get(e))?void 0:n.d.has(r)){p=!0;break}if(!p){for(let n of(h.u&&a.add(h.u),h=void 0,s.delete(r),d.d.keys())){let o=c(e,t,n);null==o||o.t.delete(r)}null==(o=l.u)||o.call(l,r);return}return h},X=(e,t,r,n)=>{let o=e[11],s=e[27],a=o(e,t,r),l="v"in a,u=a.v;if(L(n))for(let s of a.d.keys())D(r,n,o(e,t,s));a.v=n,delete a.e,l&&Object.is(u,a.v)||(++a.n,L(u)&&s(e,t,u))},ee=(e,t,r)=>j((0,e[14])(e,t,r)),et=(e,t,r,...n)=>{let o=e[3],s=e[12],a=e[13],l=e[16],u=o.size;try{return l(e,t,r,n)}finally{o.size!==u&&(a(e,t),s(e,t))}},er=(e,t,r,n)=>{let o=e[12],s=e[13],a=e[18],l=e[19],u=a(e,t,r).l;return u.add(n),s(e,t),o(e,t),()=>{u.delete(n),l(e,t,r),s(e,t),o(e,t)}},en=(e,t,r,n)=>{let o=e[25],s=o.get(r);if(!s){s=new Set,o.set(r,s);let e=()=>
1o.delete(r);r.then(e,e)}s.add(n)},ei=(e,t,r)=>{let n=e[25].get(r);null==n||n.forEach(e=>e())},eo=new WeakMap;function es(e){let t=eo.get(e);if(!t)throw Error("Store must be created by buildStore to read its building blocks");let r=t[24];return r?r(t,e):t}function ea(...e){let t={get:e=>n(r,t,e),set:(e,...n)=>o(r,t,e,...n),sub:(e,n)=>s(r,t,e,n)},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},F,U,$,z,q,V,B,W,H,G,Y,J,Q,X,ee,et,er,void 0,new WeakMap,en,ei,[0]].map((t,r)=>e[r]||t);eo.set(t,Object.freeze(r));let n=r[21],o=r[22],s=r[23];return t}let el=0;function eu(e){return e(this)}function ec(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}function ed(){return n?n():ea()}let eh=(0,C.createContext)(void 0);function ep(e){let t=(0,C.useContext)(eh);return(null==e?void 0:e.store)||t||(o||(o=ed(),globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=o),globalThis.__JOTAI_DEFAULT_STORE__!==o&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044")),o)}let ef=e=>"function"==typeof(null==e?void 0:e.then),eg=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},ey=C.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;if("rejected"===e.status)throw e.reason;throw eg(e),e}),em=new WeakMap,ev=(e,t,r)=>{let n=es(e),o=n[26],s=em.get(t);return s||(s=new Promise((a,l)=>{let u=t,c=e=>t=>{u===e&&a(t)},d=e=>t=>{u===e&&l(t)},h=()=>{try{let t=r();ef(t)?(em.set(t,s),u=t,t.then(c(t),d(t)),o(n,e,t,h)):a(t)}catch(e){l(e)}};t.then(c(t),d(t)),o(n,e,t,h)}),em.set(t,s)),s};function eb(e,t){let{delay:r,unstable_promiseStatus:n=!C.use}=t||{},o=ep(t),[[s,a,l],u]=(0,C.useReducer)(t=>{let r=o.get(e);return Object.is(t[0],r)&&t[1]===o&&t[2]===e?t:[r,o,e]},void 0,()=>[o.get(e),o,e]),c=s;if((a!==o||l!==e)&&(u(),c=o.get(e)),(0,C.useEffect)(()=>
1{let t=o.sub(e,()=>{if(n)try{let t=o.get(e);ef(t)&&eg(ev(o,t,()=>o.get(e)))}catch(e){}if("number"==typeof r){console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n  atom: Atom<Value>,\n  options: { delay: number },\n): Value {\n  const { delay } = options\n  const store = useStore(options)\n  const [value, setValue] = useState(() => store.get(atom))\n  useEffect(() => {\n    const unsub = store.sub(atom, () => {\n      setTimeout(() => setValue(store.get(atom)), delay)\n    })\n    return unsub\n  }, [store, atom, delay])\n  return value\n}\n"),setTimeout(u,r);return}u()});return u(),t},[o,e,r,n]),(0,C.useDebugValue)(c),ef(c)){let t=ev(o,c,()=>o.get(e));return n&&eg(t),ey(t)}return c}function ew(e,t){let r=ep(t);return(0,C.useCallback)(function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];if(!("write"in e))throw Error("not writable atom");return r.set(e,...n)},[r,e])}let e_=new WeakMap;function eE(e,t){let r=ep(t),n=eS(r);for(let[o,...s]of e)(!n.has(o)||(null==t?void 0:t.dangerouslyForceHydrate))&&(n.add(o),r.set(o,...s))}let eS=e=>{let t=e_.get(e);return t||(t=new WeakSet,e_.set(e,t)),t};function eO(e,t){let r=new Set(e),n=new Set(t);return e===t||r.size===n.size&&Array.from(r).every(n.has.bind(n))}function ek(e){return"write"in e}let ex=new WeakMap,eR={},{read:eA,write:eT}=function(e,t){let r=`atom${++el}`,n={toString(){return this.debugLabel?r+":"+this.debugLabel:r}};return n.init=null,n.read=eu,n.write=ec,n}(0);function eP(e,t,r){let[n,o,s,,a]=e,l=n.get(t);if(l)return l;if(r===e){let n=o.get(t);return n||(n=[ej(e,t,r),r],o.set(t,n)),n}let u=r??eR,c=s.get(u);c||(c=new WeakMap,s.set(u,c));let d=c.get(t);if(!d){let[n,o]=a?eP(a,t,r):[t];d=[t.read===eA?n:ej(e,t,o),o],c.set(t,d)}return d}function eC(e){for(let t of e[5])t()}function eI(e,t,r,n,o){if(r.read===eA&&ek(r)&&ek(t)&&r.write!==eT&&e!==n){let{write:s}=r;return t.write=eN(e,r.write.bind(r),n,o),()=>{t.write=s}}}function eN(e,t,r,n=r){return function(o,s,...a){return t(function(t){let[n]=eP(e,t,r);return o(n)},function(t,...o){let[a]=eP(e,t,r),l=eI(e,a,t,r,n);try{return s(a,...o)}finally{null==l||l()}},...a)}}function ej(e,t,r){var n;let o=Object.getOwnPropertyDescriptors(t);Object.keys(o).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>o[e].configurable=!0);let s=Object.create(Object.getPrototypeOf(t),o);return s.read!==eA&&(s.read=(n=t.read.bind(t),function(t,o){return n(function(n){let[o]=eP(e,n,r);return t(o)},o)})),ek(s)&&ek(t)&&s.write!==eT&&(s.write=eN(e,t.write.bind(t),r)),s}function eL(e,t){return function(r){let{atoms:n=[],atomFamilies:o=[],children:s,scope:a,name:l}=r,u=t(),c=Array.from(n,e=>Array.isArray(e)?e[0]:e);function d(){return[a??function({atoms:e=[],atomFamilies:t=[],parentStore:r,name:n}){let o=new WeakSet(e),s=ex.get(r),a=(null==s?void 0:s[3])??r,l=[new WeakMap,new WeakMap,new WeakMap,a,s,new Set,void 0],u=l[0],c=l[5],d=function(e){let t,r;let n=[...es(e[3])],o=n[21],s=n[22],a=n[23],l={};return n[21]=h(o),n[22]=function(t,r,n,...o){let[a,l]=eP(e,n),u=eI(e,a,n,l,e);try{return s(t,r,a,...o)}finally{null==u||u()}},n[23]=h(a),n[24]=function(o){return t??(t=p(o[0],u)),r??(r=[t,p(o[1],c),p(o[2]),f(o[3]),o[4],o[5],function(t){let r={get f(){return t.f},set f(i){t.f=i}};return Object.defineProperties(r,Object.fromEntries(["r","c","m","u"].map(r=>[r,{get:()=>l[r]??(l[r]=function(t){if(!t)return;let r=d(t);return r.add=function(r,n){if(void 0===r)return t.add(void 0,n);let[o]=eP(e,r);return t.add(o,n)},r}(t[r])),set(e){delete l[r],t[r]=e},configurable:!0,enumerable:!0}]))),Object.assign(r,t)}(o[6]),h(o[7]),h(o[8]),h(o[9]),h(o[10]),function(e,t){let r=h(t);return function(t,n,o){let s=e.get(o);if(s)return s;let a=r(t,n,o);return e.set(o,a),e.get(o)}}(t,o[11]),(e,...t)=>o[12](n,...t),(e,...t)=>o[13](n,...t),h(o[14]),h(o[15]),h(o[16]),h(o[17]),h(o[18]),h(o[19]),h(o[20]),h(o[21]),h(o[22]),h(o[23]),()=>o,o[25],(e,...t)=>o[26](n,...t),(e,...t)=>o[27](n,...t),o[28],...o.slice(25)]),r},ea(...n);function u(t){let r=new WeakMap;return function(n){let o,s,a=r.get(n);if(a)return a;let l=t(n);if(l)return a=new Proxy(l,{get:(t,r)=>"d"===r?o??(o=p(l.d,function(t){return r=>t(eP(e,r)[0])})):"p"===r?s??(s=f(l.p)):Reflect.get(l,r)}),r.set(n,a),a}}function c(e){let t=new WeakMap;return function(r){let n=t.get(r);if(n)return n;let o=e(r);if(o)return n={...o,d:f(o.d),t:f(o.t),get u(){return o.u},set u(M){o.u=M}},t.set(r,n),n}}function d(t,r){return function(n,...o){let[s]=eP(e,n);return(r?r(t):t)(s,...o)}}function h(t){return function(r,o,s,...a){let[l]=eP(e,s);return t(n,o,l,...a)}}function p(e,t){let r={get:d(e.get.bind(e),t),set:d(e.set.bind(e)),has:d(e.has.bind(e)),delete:d(e.delete.bind(e))};return"function"==typeof e.keys&&(r.keys=e.keys.bind(e),r[Symbol.iterator]=e[Symbol.iterator].bind(e),Object.defineProperty(r,"size",{enumerable:!1,
1configurable:!0,get:()=>e.size})),r}function f(t){return{get size(){return t.size},add:d(t.add.bind(t)),has:d(t.has.bind(t)),delete:d(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(d(e)),*[Symbol.iterator](){for(let r of t)yield eP(e,r)[0]}}}}(l);for(let t of(l[6]=d,Object.assign(d,{name:n}),ex.set(d,l),new Set(e)))u.set(t,[ej(l,t,l),l]);for(let e of new Set(t)){for(let t of e.getParams()){let r=e(t);u.has(r)||u.set(r,[ej(l,r,l),l])}let t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||u.has(t)?"REMOVE"!==e||o.has(t)||u.delete(t):u.set(t,[ej(l,t,l),l])});c.add(t)}return d}({atoms:c,atomFamilies:o,parentStore:u,name:l}),function(e){return u!==e.parentStore||!eO(c,e.atoms)||!eO(o,e.atomFamilies)||a!==e.providedScope}]}let[[h,p],f]=(0,C.useState)(d);if(p({atoms:c,atomFamilies:o,parentStore:u,providedScope:a})){let e=ex.get(h);e&&eC(e),f(d)}return eE(Array.from(n).filter(Array.isArray),{store:h}),(0,C.useEffect)(()=>{let e=ex.get(h);return()=>{e&&eC(e)}},[h]),(0,C.createElement)(e,{store:h,children:s})}}eL(function(e){let{children:t,store:r}=e,n=(0,C.useRef)(null);return r?(0,C.createElement)(eh.Provider,{value:r},t):(null===n.current&&(n.current=ed()),(0,C.createElement)(eh.Provider,{value:n.current},t))},ep);var eD=r(8883),eZ=r(19893),eM=function(){try{var e=(0,eZ.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),eF=function(e,t,r){"__proto__"==t&&eM?eM(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r},eU=r(84338),e$=function(e,t,r){(void 0===r||(0,eU.Z)(e[t],r))&&(void 0!==r||t in e)||eF(e,t,r)},ez=r(19045),eq=r(65933),eV="object"==typeof exports&&exports&&!exports.nodeType&&exports,eB=eV&&"object"==typeof module&&module&&!module.nodeType&&module,eK=eB&&eB.exports===eV?eq.Z.Buffer:void 0,eW=eK?eK.allocUnsafe:void 0,eH=function(e,t){if(t)return e.slice();var r=e.length,n=eW?eW(r):new e.constructor(r);return e.copy(n),n},eG=r(6408),eY=function(e){var t=new e.constructor(e.byteLength);return new eG.Z(t).set(new eG.Z(e)),t},eJ=function(e,t){var r=t?eY(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},eQ=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},eX=r(7632),e0=Object.create,e1=function(){function e(){}return function(t){if(!(0,eX.Z)(t))return{};if(e0)return e0(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),e2=(0,r(64400).Z)(Object.getPrototypeOf,Object),e3=r(17234),e5=r(70351),e6=r(82025),e4=r(82370),e8=r(23605),e9=r(98402),e7=r(59576),te=Object.prototype,tt=Function.prototype.toString,tr=te.hasOwnProperty,tn=tt.call(Object),ti=function(e){if(!(0,e4.Z)(e)||"[object Object]"!=(0,e7.Z)(e))return!1;var t=e2(e);if(null===t)return!0;var r=tr.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&tt.call(r)==tn},to=r(41580),ts=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},ta=Object.prototype.hasOwnProperty,tl=function(e,t,r){var n=e[t];ta.call(e,t)&&(0,eU.Z)(n,r)&&(void 0!==r||t in e)||eF(e,t,r)},tu=function(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var l=t[s],u=n?n(r[l],e[l],l,r,e):void 0;void 0===u&&(u=e[l]),o?eF(r,l,u):tl(r,l,u)}return r},tc=r(70836),td=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},th=Object.prototype.hasOwnProperty,tp=function(e){if(!(0,eX.Z)(e))return td(e);var t=(0,e3.Z)(e),r=[];for(var n in e)"constructor"==n&&(t||!th.call(e,n))||r.push(n);return r},tf=function(e){return(0,e6.Z)(e)?(0,tc.Z)(e,!0):tp(e)},tg=function(e,t,r,n,o,s,a){var l=ts(e,r),u=ts(t,r),c=a.get(u);if(c){e$(e,r,c);return}var d=s?s(l,u,r+"",e,t,a):void 0,h=void 0===d;if(h){var p=(0,E.Z)(u),f=!p&&(0,e8.Z)(u),g=!p&&!f&&(0,to.Z)(u);(d=u,p||f||g)?(0,E.Z)(l)?d=l:(0,e4.Z)(l)&&(0,e6.Z)(l)?d=eQ(l):f?(h=!1,d=eH(u,!0)):g?(h=!1,d=eJ(u,!0)):d=[]:ti(u)||(0,e5.Z)(u)?(d=l,(0,e5.Z)(l))?d=tu(l,tf(l)):(!(0,eX.Z)(l)||(0,e9.Z)(l))&&(d="function"!=typeof u.constructor||(0,e3.Z)(u)?{}:e1(e2(u))):h=!1}h&&(a.set(u,d),o(d,u,n,s,a),a.delete(u)),e$(e,r,d)},ty=function e(t,r,n,o,s){t!==r&&(0,ez.Z)(r,function(a,l){if(s||(s=new eD.Z),(0,eX.Z)(a))tg(t,r,l,n,e,o,s);else{var u=o?o(ts(t,l),a,l+"",t,r,s):void 0;void 0===u&&(u=a),e$(t,l,u)}},tf)},tm=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},tv=Math.max,tb=eM?function(e,t){return eM(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:_.Z,tw=Date.now,t_=(c=0,d=0,function(){var e=tw(),t=16-(e-d);if(d=e,t>0){if(++c>=800)return arguments[0]}else c=0;return tb.apply(void 0,arguments)}),tE=r(2864),tS=(h=function(e,t,r,n){ty(e,t,r,n)},s=function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(o=h.length>3&&"function"==typeof o?(n--,o):void 0,s&&(0,tE.Z)(t[0],t[1],s)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var a=t[r];a&&h(e,a,r,o)}return e},t_((l=a,u=_.Z,l=tv(void 0===l?s.length-1:l,0),function(){for(var e=arguments,t=-1,r=tv(e.length-l,0),n=Array(r);++t<r;)n[t]=e[l+t];t=-1;for(var o=Array(l+1);++t<l;)o[t]=e[t];return o[l]=u(n),tm(s,this,o)}),s+""));
1class tO extends Error{response;request;options;constructor(e,t,r){let n=e.status||0===e.status?e.status:"",o=e.statusText??"",s=`${n} ${o}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}}class tk extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}function tx(e){return e instanceof tk||e?.name===tk.name}class tR extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}}class tA extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){let t=e?.cause?e.cause instanceof Error?e.cause:new tR(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}}let tT=(()=>{let e=!1,t=!1,r="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&r)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!t})(),tP="function"==typeof globalThis.AbortController,tC="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,tI="function"==typeof globalThis.ReadableStream,tN="function"==typeof globalThis.FormData,tj=["get","post","put","patch","head","delete"],tL={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},tD=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,tZ=Symbol("stop");class tM{options;constructor(e){this.options=e}}let tF=e=>new tM(e),tU={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},t$={next:!0},tz={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},tq=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[r,n]of e)t+=tD+new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length+("string"==typeof n?new TextEncoder().encode(n).length:n.size);return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{}return 0},tV=(e,t,r)=>{let n;let o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},tB=(e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});let r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(tV(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})},tK=(e,t,r)=>{if(!e.body)return e;let n=tq(r??e.body);return new Request(e,{duplex:"half",body:tV(e.body,n,t)})},tW=e=>null!==e&&"object"==typeof e,tH=(...e)=>{for(let t of e)if((!tW(t)||Array.isArray(t))&&void 0!==t)throw TypeError("The `options` argument must be an object");return tX({},...e)},tG=(e={},t={})=>{let r=new globalThis.Headers(e),n=t instanceof globalThis.Headers;for(let[e,o]of new globalThis.Headers(t).entries())n&&"undefined"===o||void 0===o?r.delete(e):r.set(e,o);return r};function tY(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:tX(e[r]??[],t[r]??[])}let tJ=(e={},t={})=>({beforeRequest:tY(e,t,"beforeRequest"),beforeRetry:tY(e,t,"beforeRetry"),afterResponse:tY(e,t,"afterResponse"),beforeError:tY(e,t,"beforeError")}),tQ=(e,t)=>{let r=new URLSearchParams;
1for(let n of[e,t])if(void 0!==n){if(n instanceof URLSearchParams)for(let[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(let e of n){if(!Array.isArray(e)||2!==e.length)throw TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(tW(n))for(let[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else for(let[e,t]of new URLSearchParams(n).entries())r.append(e,t)}return r},tX=(...e)=>{let t,r={},n={},o={},s=[];for(let a of e)if(Array.isArray(a))Array.isArray(r)||(r=[]),r=[...r,...a];else if(tW(a)){for(let[e,n]of Object.entries(a)){if("signal"===e&&n instanceof globalThis.AbortSignal){s.push(n);continue}if("context"===e){if(null!=n&&(!tW(n)||Array.isArray(n)))throw TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}};continue}if("searchParams"===e){t=null==n?void 0:void 0===t?n:tQ(t,n);continue}tW(n)&&e in r&&(n=tX(r[e],n)),r={...r,[e]:n}}tW(a.hooks)&&(o=tJ(o,a.hooks),r.hooks=o),tW(a.headers)&&(n=tG(n,a.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:tC?r.signal=AbortSignal.any(s):r.signal=s.at(-1)),r},t0=e=>tj.includes(e)?e.toUpperCase():e,t1={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},t2=(e={})=>{if("number"==typeof e)return{...t1,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");let t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...t1,...t}};async function t3(e,t,r,n){return new Promise((o,s)=>{let a=setTimeout(()=>{r&&r.abort(),s(new tk(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(a)})})}async function t5(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));let s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}let t6=(e,t)=>{let r={};for(let n in t)Object.hasOwn(t,n)&&(n in tz||n in tU||n in e&&!(n in t$)||(r[n]=t[n]));return r},t4=e=>void 0!==e&&(Array.isArray(e)?e.length>0:e instanceof URLSearchParams?e.size>0:"object"==typeof e?Object.keys(e).length>0:"string"==typeof e?e.trim().length>0:!!e);class t8{static create(e,t){let r=new t8(e,t),n=async()=>{if("number"==typeof r.#e.timeout&&r.#e.timeout>2147483647)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await r.#t();for(let t of r.#e.hooks.afterResponse){let n;let o=r.#r(e.clone());try{n=await t(r.request,r.#n(),o,{retryCount:r.#i})}catch(t){throw r.#o(o),r.#o(e),t}if(n instanceof tM)throw r.#o(o),r.#o(e),new tA(n.options);let s=n instanceof globalThis.Response?n:e;o!==s&&r.#o(o),e!==s&&r.#o(e),e=s}if(r.#r(e),!e.ok&&("function"==typeof r.#e.throwHttpErrors?r.#e.throwHttpErrors(e.status):r.#e.throwHttpErrors)){let t=new tO(e,r.request,r.#n());for(let e of r.#e.hooks.beforeError)t=await e(t,{retryCount:r.#i});throw t}if(r.#e.onDownloadProgress){if("function"!=typeof r.#e.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!tI)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");let t=e.clone();return r.#o(e),tB(t,r.#e.onDownloadProgress)}return e},o=r.#s(n).finally(()=>{let e=r.#a;r.#l(e?.body??void 0),r.#l(r.request.body??void 0)});for(let[e,n]of Object.entries(tL))("bytes"!==e||"function"==typeof globalThis.Response?.prototype?.bytes)&&(o[e]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||n);let s=await o;if("json"===e){if(204===s.status)return"";let e=await s.text();return""===e?"":t.parseJson?t.parseJson(e):JSON.parse(e)}return s[e]()});return o}static #u(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#c;#i=0;#d;#e;#a;#h;#p;constructor(e,t={}){if(this.#d=e,this.#e={...t,headers:tG(this.#d.headers,t.headers),hooks:tJ({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:t0(t.method??this.#d.method??"GET"),prefixUrl:String(t.prefixUrl||""),retry:t2(t.retry),throwHttpErrors:t.throwHttpErrors??!0,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis),context:t.context??{}},"string"!=typeof this.#d&&!(this.#d instanceof URL||this.#d instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");
1if(this.#e.prefixUrl&&"string"==typeof this.#d){if(this.#d.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this.#e.prefixUrl.endsWith("/")||(this.#e.prefixUrl+="/"),this.#d=this.#e.prefixUrl+this.#d}tP&&tC&&(this.#h=this.#e.signal??this.#d.signal,this.#c=new globalThis.AbortController,this.#e.signal=this.#h?AbortSignal.any([this.#h,this.#c.signal]):this.#c.signal),tT&&(this.#e.duplex="half"),void 0!==this.#e.json&&(this.#e.body=this.#e.stringifyJson?.(this.#e.json)??JSON.stringify(this.#e.json),this.#e.headers.set("content-type",this.#e.headers.get("content-type")??"application/json"));let r=t.headers&&new globalThis.Headers(t.headers).has("content-type");if(this.#d instanceof globalThis.Request&&(tN&&this.#e.body instanceof globalThis.FormData||this.#e.body instanceof URLSearchParams)&&!r&&this.#e.headers.delete("content-type"),this.request=new globalThis.Request(this.#d,this.#e),t4(this.#e.searchParams)){let e="string"==typeof this.#e.searchParams?this.#e.searchParams.replace(/^\?/,""):new URLSearchParams(t8.#u(this.#e.searchParams)).toString(),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);this.request=new globalThis.Request(t,this.#e)}if(this.#e.onUploadProgress){if("function"!=typeof this.#e.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!tT)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#f(this.request,this.#e.body??void 0)}}#g(){let e=this.#e.retry.delay(this.#i),t=e;return!0===this.#e.retry.jitter?t=Math.random()*e:"function"==typeof this.#e.retry.jitter&&(!Number.isFinite(t=this.#e.retry.jitter(e))||t<0)&&(t=e),Math.min(this.#e.retry.backoffLimit??Number.POSITIVE_INFINITY,t)}async #y(e){if(this.#i++,this.#i>this.#e.retry.limit)throw e;let t=e instanceof Error?e:new tR(e);if(t instanceof tA)return t.customDelay??this.#g();if(!this.#e.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#e.retry.shouldRetry){let r=await this.#e.retry.shouldRetry({error:t,retryCount:this.#i});if(!1===r)throw e;if(!0===r)return this.#g()}if(tx(e)&&!this.#e.retry.retryOnTimeout)throw e;if(e instanceof tO||e?.name===tO.name){if(!this.#e.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#e.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let r=this.#e.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#g()}#r(e){return this.#e.parseJson&&(e.json=async()=>this.#e.parseJson(await e.text())),e}#l(e){e&&e.cancel().catch(()=>void 0)}#o(e){this.#l(e.body??void 0)}async #s(e){try{return await e()}catch(r){let t=Math.min(await this.#y(r),2147483647);if(this.#i<1)throw r;if(await t5(t,this.#h?{signal:this.#h}:{}),r instanceof tA&&r.customRequest){let e=this.#e.signal?new globalThis.Request(r.customRequest,{signal:this.#e.signal}):new globalThis.Request(r.customRequest);this.#m(e)}for(let e of this.#e.hooks.beforeRetry){let t=await e({request:this.request,options:this.#n(),error:r,retryCount:this.#i});if(t instanceof globalThis.Request){this.#m(t);break}if(t instanceof globalThis.Response)return t;if(t===tZ)return}return this.#s(e)}}async #t(){for(let e of(this.#c?.signal.aborted&&(this.#c=new globalThis.AbortController,this.#e.signal=this.#h?AbortSignal.any([this.#h,this.#c.signal]):this.#c.signal,this.request=new globalThis.Request(this.request,{signal:this.#e.signal})),this.#e.hooks.beforeRequest)){let t=await e(this.request,this.#n(),{retryCount:this.#i});if(t instanceof Response)return t;if(t instanceof globalThis.Request){this.#m(t);break}}let e=t6(this.request,this.#e);return(this.#a=this.request,this.request=this.#a.clone(),!1===this.#e.timeout)?this.#e.fetch(this.#a,e):t3(this.#a,e,this.#c,this.#e)}#n(){if(!this.#p){let{hooks:e,...t}=this.#e;this.#p=Object.freeze(t)}return this.#p}#m(e){this.#p=void 0,this.request=this.#f(e)}#f(e,t){return this.#e.onUploadProgress&&e.body?tK(e,this.#e.onUploadProgress,t??this.#e.body??void 0):e}}let t9=e=>{let t=(t,r)=>t8.create(t,tH(e,r));for(let r of tj)t[r]=(t,n)=>t8.create(t,tH(e,n,{method:r}));return t.create=e=>t9(tH(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),t9(tH(e,t))),t.stop=tZ,t.retry=tF,t},t7=t9();var re=r(95691),rt=r(36960),rr=r(11455),rn=r(38543),ri=r(79026),ro=r(83216),rs=r(2879),ra=r(41797),rl=r(64961),ru=(p=new WeakMap,f=new WeakMap,g=new WeakMap,y=new WeakMap,m=new WeakSet,v=new WeakSet,class extends ra.l{bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let r=this.options;this.options=(0,re._)(this,p).defaultMutationOptions(e),(0,rl.VS)(this.options,r)||(0,re._)(this,p).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,re._)(this,g),observer:this}),(null==r?void 0:r.mutationKey)&&this.options.mutationKey&&(0,rl.Ym)(r.mutationKey)!==(0,rl.Ym)(this.options.mutationKey)?this.reset():(null===(t=(0,re._)(this,g))||void 0===t?void 0:t.state.status)==="pending"&&(0,re._)(this,g).setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null===(e=(0,re._)(this,g))||void 0===e||e.removeObserver(this)}}onMutationUpdate(e){(0,rn._)(this,m,rc).call(this),(0,rn._)(this,v,rd).call(this,e)}getCurrentResult(){return(0,re._)(this,f)}reset(){var e;null===(e=(0,re._)(this,g))||void 0===e||e.removeObserver(this),(0,rr._)(this,g,void 0),(0,rn._)(this,m,rc).call(this),(0,rn._)(this,v,rd).call(this)}mutate(e,t){var r;return(0,rr._)(this,y,t),null===(r=(0,re._)(this,g))||void 0===r||r.removeObserver(this),(0,rr._)(this,g,(0,re._)(this,p).getMutationCache().build((0,re._)(this,p),this.options)),(0,re._)(this,g).addObserver(this),(0,re._)(this,g).execute(e)}constructor(e,t){super(),(0,ri._)(this,m),(0,ri._)(this,v),(0,rt._)(this,p,{writable:!0,value:void 0}),(0,rt._)(this,f,{writable:!0,value:void 0}),(0,rt._)(this,g,{writable:!0,value:void 0}),(0,rt._)(this,y,{writable:!0,value:void 0}),(0,rr._)(this,f,void 0),(0,rr._)(this,p,e),this.setOptions(t),this.bindMethods(),(0,rn._)(this,m,rc).call(this)}});function rc(){var e,t;let r=null!==(t=null===(e=(0,re._)(this,g))||void 0===e?void 0:e.state)&&void 0!==t?t:(0,ro.R)();(0,rr._)(this,f,{...r,isPending:"pending"===r.status,isSuccess:"success"===r.status,isError:"error"===r.status,isIdle:"idle"===r.status,mutate:this.mutate,reset:this.reset})}function rd(e){rs.Vr.batch(()=>
1{if((0,re._)(this,y)&&this.hasListeners()){var t,r,n,o,s,a,l,u;let c=(0,re._)(this,f).variables,d=(0,re._)(this,f).context,h={client:(0,re._)(this,p),meta:this.options.meta,mutationKey:this.options.mutationKey};(null==e?void 0:e.type)==="success"?(null===(t=(r=(0,re._)(this,y)).onSuccess)||void 0===t||t.call(r,e.data,c,d,h),null===(n=(o=(0,re._)(this,y)).onSettled)||void 0===n||n.call(o,e.data,null,c,d,h)):(null==e?void 0:e.type)==="error"&&(null===(s=(a=(0,re._)(this,y)).onError)||void 0===s||s.call(a,e.error,c,d,h),null===(l=(u=(0,re._)(this,y)).onSettled)||void 0===l||l.call(u,void 0,e.error,c,d,h))}this.listeners.forEach(e=>{e((0,re._)(this,f))})})}var rh=r(53813);function rp(e,t){let r=(0,rh.NL)(t),[n]=C.useState(()=>new ru(r,e));C.useEffect(()=>{n.setOptions(e)},[n,e]);let o=C.useSyncExternalStore(C.useCallback(e=>n.subscribe(rs.Vr.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),s=C.useCallback((e,t)=>{n.mutate(e,t).catch(rl.ZT)},[n]);if(o.error&&(0,rl.L3)(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var rf=r(82663),rg=r(81595),ry=r(38476);let rm=Symbol("RESET"),rv=e=>"function"==typeof(null==e?void 0:e.then),rb=function(e=()=>{try{return window.localStorage}catch(e){"undefined"!=typeof window&&console.warn(e);return}},t){var r;let n,o,s;let a={getItem:(t,r)=>{var s,a;let l=e=>{if(n!==(e=e||"")){try{o=JSON.parse(e,void 0)}catch(e){return r}n=e}return o},u=null!=(a=null==(s=e())?void 0:s.getItem(t))?a:null;return rv(u)?u.then(l):l(u)},setItem:(t,r)=>{var n;return null==(n=e())?void 0:n.setItem(t,JSON.stringify(r,void 0))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};try{s=null==(r=e())?void 0:r.subscribe}catch(e){}if(!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,r)=>{if(!(e() instanceof window.Storage))return()=>{};let n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),s){let e;a.subscribe=(e=s,(t,r,n)=>e(t,e=>{let t;try{t=JSON.parse(e||"",void 0)}catch(e){t=n}r(t)}))}return a}();var rw=new Map,r_=(e,t,r)=>{let n=rw.get(e);if(n)return n;let o=new Promise((n,o)=>{var s,a;if(document.getElementById(e))return n(!0);let l=document.createElement("script");l.setAttribute("type","text/javascript"),l.setAttribute("id",e),l.setAttribute("src",t),s=r,a=(e,t)=>{l.setAttribute(t,e)},((0,E.Z)(s)?b:w.Z)(s,"function"==typeof a?a:_.Z),l.addEventListener("load",n),l.addEventListener("error",()=>o(Error(`Error loading ${e}.`))),l.addEventListener("abort",()=>o(Error(`${e} loading aborted.`))),document.getElementsByTagName("head")[0].appendChild(l)});return rw.set(e,o),o},rE=class e extends Error{constructor(t,r,n){var o,s;super(t),this.type=r,this.timestamp=Date.now(),this.name=null!=(s=null==(o=this.constructor)?void 0:o.name)?s:"PaymentError",this.meta=null!=n?n:{},Object.setPrototypeOf(this,e.prototype)}static renderError(t,r){return new e(t,"RENDER",r)}static initError(t,r){return new e(t,"INIT",r)}static apiError(t,r){return new e(t,"API",r)}static businessError(t,r){return new e(t,"BUSINESS",r)}static unknownError(t,r){return new e(t,"UNKNOWN",r)}},rS={init:"init",created:"created",consulting:"consulting",confirmed:"confirmed",authorizing:"authorizing",authorised:"authorised",authorizationFailed:"authorizationFailed",authChecking:"authChecking",authChecked:"authCheched",capturing:"capturing",captured:"captured",captureFailed:"captureFailed",cancelling:"cancelling",cancelled:"cancelled",cancelFailed:"cancelFailed",paySucceed:"paySucceed",riskPreChecking:"riskPreChecking",riskPostChecking:"riskPostChecking",riskPreDecline:"riskPreDecline",riskPostDecline:"riskPostDecline"},rO={ADYEN:"ADYEN",AIRWALLEX:"AIRWALLEX",CHECKOUT:"CHECKOUT",KLARNA:"KLARNA",NUVEI:"NUVEI",PAYPAL:"PAYPAL",CARD:"CARD",YUNO:"YUNO"},rk={FAST:"fast",WALLET:"wallet"},rx=(e,t)=>{let r=e||"unknown error";return t?`${r} [trace-id: ${t}]`:r},rR=(e,t)=>t?`[${t}] -> ${e}`:e,rA=({cent:e,precision:t})=>{try{if(e&&(t||0===t))return e/Math.pow(10,t)}catch(e){}return null},rT=()=>{var e,t,r,n,o;return{acceptHeader:"*/*",colorDepth:null==(e=null==window?void 0:window.screen)?void 0:e.colorDepth,javaEnabled:!1,language:null==(t=null==window?void 0:window.navigator)?void 0:t.language,screenHeight:null==(r=null==window?void 0:window.screen)?void 0:r.height,screenWidth:null==(n=null==window?void 0:window.screen)?void 0:n.width,timeZoneOffset:new Date().getTimezoneOffset(),userAgent:null==(o=null==window?void 0:window.navigator)?void 0:o.userAgent}},rP=()=>{var e;return null==(e=null==window?void 0:window.location)?void 0:e.origin},rC=e=>{if(!e)return!1;let t=e.toLowerCase();return"applepay"===t||"apple_pay"===t},rI=e=>{if(!e)return!1;let t=e.toLowerCase();return"googlepay"===t||"google_pay"===t},rN=e=>(0,S.Z)([rS.cancelFailed,rS.cancelled,rS.authorizationFailed,rS.captureFailed,rS.riskPreDecline,rS.riskPostDecline],e),rj=(e,t)=>P(async()=>{var r,n;let o=null;try{o=await e(null==t?void 0:t.signal)}catch(e){throw new A((null==e?void 0:e.message)||"unknown error")}if(!(null==o?void 0:o.success))throw new A(rx(null==o?void 0:o.errMsg,null==(r=null==o?void 0:o.header)?void 0:r["trace-id"]));if(void 0===o.data.status)throw new A(rx(o.errMsg||"status is empty",null==(n=o.header)?void 0:n["trace-id"]));if((0,S.Z)([rS.paySucceed,rS.confirmed,rS.consulting,rS.created],null==o?void 0:o.data.status)||rN(null==o?void 0:o.data.status))return o;throw Error(`Polling times exceeded the maximum. status: ${null==o?void 0:o.data.status}`)},{retries:10,minTimeout:2e3,maxTimeout:2e3,factor:1,...t}),rL={lilyWhite:"#FCFBF0",lilyGreen:"#3B4021",green1:"#181C10",green2:"#292E18",green3:"#545C37",green4:"#868F61",grey1:"#8F8D83",grey2:"#E0DED3",grey3:"#EDEBDF",grey4:"#F6F4E7",red1:"#521A1A",red2:"#662121",red3:"#8F2E2E",transparentRed:"rgba(143, 46, 46, 0.05)",transparentWhite:"rgba(252, 251, 240, 0.70)",transparent:"transparent"},rD=()=>{let e=new URL(window.location.href);return e.searchParams.delete("redirectResult"),e.toString()},rZ=window.ApplePaySession?!!ApplePaySession.canMakePayments()||(console.log("此浏览器不支持进行Apple Pay支付."),!1):(console.log("此浏览器不支持Apple Pay."),!1),rM="lily",rF=e=>`${rM}-${e}`,rU=e=>{try{return JSON.stringify(e)}catch(e){return`JSON stringify error: ${e}`}},r$=function(){let e=(0,C.createContext)(null);function t({store:t,initialValues:r=[],children:n}){let o=(0,C.useRef)(t);return o.current||(o.current=ed()),eE(r,{store:o.current}),(0,C.createElement)(e.Provider,{value:o.current,children:n})}let r=t=>{let r=(0,C.useContext)(e);if(!r)throw Error("Missing Provider from createIsolation");return ep({store:r,...t})},n=eL(t,r);return{Provider:t,ScopeProvider:n,useStore:r,useAtom:(e,t)=>{var n;return[eb(e,n={store:r(),...t}
1),ew(e,n)]},useAtomValue:(e,t)=>eb(e,{store:r(),...t}),useSetAtom:(e,t)=>ew(e,{store:r(),...t})}}(),rz=r$.Provider;r$.useStore;var rq=r$.useAtom,rV=r$.useAtomValue,rB=r$.useSetAtom,rK=function(e){let t=(0,C.useRef)(e);t.current=(0,C.useMemo)(()=>e,[e]);let r=(0,C.useRef)(void 0);return r.current||(r.current=function(...e){return t.current.apply(this,e)}),r.current},rW={apiBase:"https://api.dev-sps-pci.lilysilk.com",authToken:"bNAMv6hG8FgEFPCDpDXPrbHKH7MIzAg8",pciConfig:{baseUrl:"http://localhost:3001",version:"",threeResult:"threeResult",home:""},allowedOrigins:["http://localhost:3001"]},rH={dev:{apiBase:"https://api.dev-sps-pci.lilysilk.com",authToken:"bNAMv6hG8FgEFPCDpDXPrbHKH7MIzAg8",pciConfig:{baseUrl:"https://static-awsdev-pay.lilysilk.com/fe/pci-card",version:"dev-dd18897",threeResult:"threeResult.html",home:"index.html"},allowedOrigins:["https://static-awsdev-pay.lilysilk.com"]},beta:{apiBase:"https://api.beta-sps-pci.lilysilk.com",authToken:"bNAMv6hG8FgEFPCDpDXPrbHKH7MIzAg8",pciConfig:{baseUrl:"https://static-awsbeta-pay.lilysilk.com/fe/pci-card",version:"beta-cf2ad67",threeResult:"threeResult.html",home:"index.html"},allowedOrigins:["https://static-awsbeta-pay.lilysilk.com"]},prod:{apiBase:"https://lilydata.sps-pci.lilysilk.com",authToken:"d61NANYHeGkH95p0Qtbydhc204zk4Ax4",pciConfig:{baseUrl:"https://static-awsprod-pay.lilysilk.com/fe/pci-card",version:"v0.3.2",threeResult:"threeResult.html",home:"index.html"},allowedOrigins:["https://static-awsprod-pay.lilysilk.com"]},gcpprod:{apiBase:"https://lilydata.sps-pci.lilysilk.com",authToken:"d61NANYHeGkH95p0Qtbydhc204zk4Ax4",pciConfig:{baseUrl:"https://static.lilysilk.com/fe/pci-card",version:"v0.3.2",threeResult:"threeResult.html",home:"index.html"},allowedOrigins:["https://static.lilysilk.com"]}},rG=e=>"prod"===e||"gcpprod"===e,rY=e=>tS({},rW,e?rH[e]:{},(e,t)=>{if((0,E.Z)(t))return t}),rJ=()=>{let e=(0,C.useRef)(!1);return(0,C.useEffect)(()=>(e.current=!1,()=>{e.current=!0}),[]),e},rQ=0,rX=!1,r0=!1,r1=async(e,t)=>{if(!rX&&!r0){r0=!0;try{let r=Date.now(),n=await e(t,r.toString()),o=Date.now(),s=Math.round((o-r)/2),a=n.data;rQ=a+s-o,rX=!0,console.log(`serverTimestamp is: ${a}, localTimestamp is: ${o}, networkDelay is: ${s}, serverTimeDiff is: ${rQ}`),console.log("Server time synced. Difference:",rQ,"ms")}catch(e){console.error("Failed to sync server time:",e),rQ=0}finally{r0=!1}}},r2=(e,t,r=!0)=>(!r||rX||r0||r1(e,t).catch(console.error),Date.now()+rQ),r3=(e,t=!0)=>{let{getServerTime:r}=(0,C.useContext)(ne);return(0,C.useEffect)(()=>{!t||rX||r0||r1(r,e).catch(console.error)},[]),()=>r2(r,e,t)},r5=({orderId:e,countryCode:t,storeCode:r,onSuccess:n,onError:o})=>{let{consultPayment:s}=(0,C.useContext)(ne),a=(0,C.useRef)(null),l=rp({mutationFn:async()=>{a.current&&a.current.abort();let n=new AbortController;a.current=n;let o=rD();return await rj(async()=>s({req_id:"web",paymentOrderId:e,countryCode:t,website:r,metadata:{returnUrl:o}},n.signal),{signal:n.signal})},onSuccess(e){null==n||n(e)},onError(e){null==o||o(e)}});return(0,C.useEffect)(()=>()=>{a.current&&a.current.abort()},[]),l},r6=({orderId:e,forterToken:t,onSubmit:r,onCompleted:n,onError:o})=>{let{confirmPayment:s}=(0,C.useContext)(ne),a=r3(e),l=(0,C.useRef)(null),u=rK(async u=>{var c,d,h,p,f,g,y,m,v,b,w,_;null==r||r({pspType:u.pspType,paymentType:u.paymentType});try{l.current&&l.current.abort();let r=new AbortController;l.current=r;let E=rD(),O=await rj(async()=>s({idempotencyId:(0,rf.Z)(),channel:"Web",pspType:u.pspType,paymentType:u.paymentType,pspId:u.pspId,paymentOrderId:e,returnUrl:E,paymentMethod:u.cardInfo?u.cardInfo:void 0,riskMetadata:{checkoutTime:a(),forterTokenCookie:(0,e9.Z)(t)?t():t},...u.external},r.signal),{signal:r.signal});if(O.data.status===rS.paySucceed)return null==n||n({pspType:u.pspType,pspId:u.pspId,paymentType:u.paymentType}),null;return(rN(O.data.status)||(0,S.Z)([rS.consulting,rS.created],O.data.status))&&(null==o||o(rE.apiError(rx(`confirm api invalid status: ${null==(c=null==O?void 0:O.data)?void 0:c.status}. api errorMessage is: ${(null==(h=null==(d=null==O?void 0:O.data)?void 0:d.paymentIntent)?void 0:h.errorMessage)||(null==(p=null==O?void 0:O.data)?void 0:p.errorMessage)}`,null==(f=O.header)?void 0:f["trace-id"]),{pspType:u.pspType,pspId:u.pspId,i18nKey:null==(y=null==(g=null==O?void 0:O.data)?void 0:g.paymentIntent)?void 0:y.lpsErrorType,apiMessage:(null==(v=null==(m=null==O?void 0:O.data)?void 0:m.paymentIntent)?void 0:v.errorMessage)||(null==(b=null==O?void 0:O.data)?void 0:b.errorMessage),needConsult:!!(null==(_=null==(w=null==O?void 0:O.data)?void 0:w.paymentIntent)?void 0:_.needConsult)}))),O.data}catch(e){if("AbortError"===e.name)return console.log("confirmPayment was cancelled"),null;return null==o||o(rE.apiError(e.message,{pspType:u.pspType,pspId:u.pspId,i18nKey:"confirmFailed"})),null}});return(0,C.useEffect)(()=>()=>{l.current&&l.current.abort()},[]),{confirm:u}},r4=({orderId:e,onSuccess:t,onError:r})=>{let{completePayment:n}=(0,C.useContext)(ne),o=(0,C.useRef)(null),s=rp({mutationFn:async t=>{let r=(null==t?void 0:t.orderId)||e;if(!r)throw Error("orderId is null");o.current&&o.current.abort();let s=new AbortController;return o.current=s,await rj(async()=>n({channel:"Web",paymentOrderId:r,pspType:null==t?void 0:t.pspType,...null==t?void 0:t.external},s.signal),{signal:s.signal})},onSuccess(e,r){null==t||t(e,r)},onError(e,t){null==r||r(e,t)}});return(0,C.useEffect)(()=>()=>{o.current&&o.current.abort()},[]),s},r8=({storeCode:e,countryCode:t,currency:r,amount:n,memberLevel:o,onError:s})=>{let{getQuickPaypalConfig:a}=(0,C.useContext)(ne),l=(0,C.useRef)(null),u=rp({mutationFn:async()=>{var s;l.current&&l.current.abort();let u=new AbortController;l.current=u;let c=await a({countryCode:t,website:e,currency:r,amount:n,member_level:o},u.signal);if(!c.success)throw Error(rx(c.message,null==(s=c.header)?void 0:s["trace-id"]));return c},onSuccess(e){},onError(e){"AbortError"===e.name?console.log("getQuickPaypalConfig was cancelled"):(console.error("consult error: ",e),null==s||s(e))}});return(0,C.useEffect)(()=>()=>{l.current&&l.current.abort()},[]),u},r9=()=>{let{reportError:e}=(0,C.useContext)(ne);return rK(async t=>{try{await e(t)}catch(e){console.error("sendErrorLog error: ",e)}})},r7=async(e,t)=>{try{return await e()}catch(e){throw tx(e)&&(e.message+=` | Params: ${rU(t)}`),e}},ne=C.createContext(null),nt=({env:e,sessionData:t,children:r})=>{let n=(0,C.useMemo)(()=>rY(e),[e]),o=(0,C.useRef)(t7.extend({prefixUrl:n.apiBase,credentials:"same-origin",timeout:3e4,retry:0,headers:{Authorization:`Bearer ${n.authToken}`}})),s=rK(async(e,r)=>{let n={sessionData:t,...e};return r7(()=>o.current.post("api/v1/payments/consult",{json:n,signal:r}).json(),n)}),a=rK(async(e,t)=>{let r={...e,paymentGroup:"fastPayment"};return r7(()=>o.current.post("api/v1/payments/fpconsult",{json:r,signal:t}).json(),r)}),l=rK(async(e,r)=>{let n={sessionData:t,...e};return r7(()=>o.current.post("api/v1/payments/confirm",{json:n,signal:r}).json(),n)}),u=rK(async(e,r)=>{let n={sessionData:t,...e};return r7(()=>o.current.post("api/v1/payments/complete",{json:n,signal:r}).json(),n)}),c=rK(async(e,r)=>{let n={sessionData:t,...e};return r7(()=>o.current.post("api/v1/payments/payments-details",{json:n,signal:r}).json(),n)}),d=rK(async e=>r7(()=>o.current.get(`api/v1/payments/${e}`).json(),{orderId:e})),h=rK(async(e,t)=>{let r={orderId:e,localTimeM:t};return r7(()=>o.current.get("risk/v1/forter/getTime",{searchParams:r}).json(),r)}),p=rK(async e=>r7(()=>o.current.post("api/v1/frontLogs/create",{json:e}).json(),e)),f=(0,C.useMemo)(()=>{let{pciConfig:t,allowedOrigins:r}=n;return{env:e,consultPayment:s,confirmPayment:l,completePayment:u,adyenPaymentsDetails:c,getPaymentStatus:d,getServerTime:h,getQuickPaypalConfig:a,reportError:p,pciBaseUrl:[t.baseUrl,t.version,t.home].filter(
1Boolean).join("/"),pciThreeResultBaseUrl:[t.baseUrl,t.version,t.threeResult].filter(Boolean).join("/"),allowedOrigins:r}},[e,n]);return(0,rg.tZ)(ne.Provider,{value:f,children:r})},nr=new Map,nn=function(e,t,r=rb,n){let o=(0,ry.cn)(null);return o.debugPrivate=!0,o.onMount=n=>{var o;return n(r.getItem(e,null)),null==(o=r.subscribe)?void 0:o.call(r,e,n,t)},(0,ry.cn)(e=>e(o),(n,s,a)=>{let l="function"==typeof a?a(n(o)):a;return l===rm?(s(o,t),r.removeItem(e)):rv(l)?l.then(t=>(s(o,t),r.setItem(e,t))):(s(o,l),r.setItem(e,l))})}("___LILYSILK_PAY_SDK_WEB_LAST_SELECTED_PAYMENT_METHOD___",null),ni=e=>{if(!nr.has(e)){let t=(0,ry.cn)(t=>t(nn)===e);nr.set(e,t)}return nr.get(e)},no=(0,ry.cn)({total:0,loadError:{}}),ns=(0,ry.cn)(!1),na=(0,ry.cn)(!0)},99399:function(e,t,r){"use strict";r.d(t,{m:function(){return k}});var n=r(639),o=r(2265),s=r(7632),a=r(65933),l=function(){return a.Z.Date.now()},u=r(38502),c=Math.max,d=Math.min,h=function(e,t,r){var n,o,a,h,p,f,g=0,y=!1,m=!1,v=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var r=n,s=o;return n=o=void 0,g=t,h=e.apply(s,r)}function w(e){var r=e-f,n=e-g;return void 0===f||r>=t||r<0||m&&n>=a}function _(){var e,r,n,o=l();if(w(o))return E(o);p=setTimeout(_,(e=o-f,r=o-g,n=t-e,m?d(n,a-r):n))}function E(e){return(p=void 0,v&&n)?b(e):(n=o=void 0,h)}function S(){var e,r=l(),s=w(r);if(n=arguments,o=this,f=r,s){if(void 0===p)return g=e=f,p=setTimeout(_,t),y?b(e):h;if(m)return clearTimeout(p),p=setTimeout(_,t),b(f)}return void 0===p&&(p=setTimeout(_,t)),h}return t=(0,u.Z)(t)||0,(0,s.Z)(r)&&(y=!!r.leading,a=(m="maxWait"in r)?c((0,u.Z)(r.maxWait)||0,t):a,v="trailing"in r?!!r.trailing:v),S.cancel=function(){void 0!==p&&clearTimeout(p),g=0,n=f=o=p=void 0},S.flush=function(){return void 0===p?h:E(l())},S},p=r(58062),f=r(3146),g=r(81595),y=(0,f.iv)({display:"inline-block",width:"2rem",height:"2rem",verticalAlign:"text-bottom",border:"3px solid currentColor",borderRightColor:"transparent",borderRadius:"50%",animation:"spinner-border 0.75s linear infinite","@keyframes spinner-border":{to:{transform:"rotate(360deg)"}}}),m=({className:e,css:t})=>(0,g.tZ)("div",{css:[y,t],className:e}),v=(0,f.iv)({label:"tip",fontSize:"14px",lineHeight:"18px",color:n.O9.lilyGreen}),b=(0,f.iv)({label:"loading",position:"absolute",display:"none",color:n.O9.lilyGreen,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:"transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86)"}),w=(0,f.iv)({[`&.${(0,n.oJ)(b.name)}-show-text`]:{display:"flex",alignItems:"center",justifyContent:"center"},[`&.${(0,n.oJ)(b.name)}-loading`]:{position:"relative",display:"inline-block",opacity:1}}),_=(0,f.iv)({label:"container",position:"relative",transition:"opacity 0.3s","&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:n.O9.lilyWhite,opacity:0,transition:"all 0.3s",content:'""',pointerEvents:"none"}}),E=(0,f.iv)({[`&.${(0,n.oJ)(_.name)}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}}),S=(0,f.iv)({}),O=(0,f.iv)({label:"nested-loading",position:"relative",[`& > div > .${(0,n.oJ)(b.name)}-loading`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:"400px",[`& .${(0,n.oJ)(v.name)}`]:{position:"absolute",top:"50%",width:"100%"},[`& .${(0,n.oJ)(S.name)}-indicator`]:{position:"absolute",top:0,right:0,bottom:0,left:0,margin:"auto"}}}),k=({loading:e=!1,delay:t=0,tip:r,indicator:s,children:a,className:l,wrapperClassName:u})=>{let[c,d]=(0,o.useState)(()=>e&&(!e||!t||!!Number.isNaN(Number(t))));(0,o.useEffect)(()=>{if(e){let e=h(()=>{d(!0)},t);return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}d(!1)},[t,e]);let f=(0,o.useMemo)(()=>void 0!==a,[a]),y=(0,g.BX)("div",{css:[b,w],className:(0,p.Z)({[`${(0,n.oJ)(b.name)}-loading`]:c,[`${(0,n.oJ)(b.name)}-show-text`]:!!r},l),"aria-live":"polite","aria-busy":c,children:[s||(0,g.tZ)(m,{css:S,className:(0,p.Z)(`${(0,n.oJ)(S.name)}-indicator`)}),r&&f?(0,g.tZ)("div",{css:v,children:r}):null]});return f?(0,g.BX)("div",{css:[O],className:(0,p.Z)(u),children:[c&&(0,g.tZ)("div",{children:y},"loading"),(0,g.tZ)("div",{css:[_,E],className:(0,p.Z)({[`${(0,n.oJ)(_.name)}-blur`]:c}),children:a},"container")]}):y}},51886:function(e,t,r){"use strict";r.d(t,{C:function(){return o}});var n={au:"en-AU",us:"en-US",ca:"en-CA",de:"de-DE",es:"es-ES",fr:"fr-FR",it:"it-IT",jp:"ja-JP",kr:"ko-KR",nl:"nl-NL",sg:"en-SG",se:"sv-SE",uk:"en-GB",ch:"de-CH"},o=e=>n[e]||"en-US"},12701:function(e,t,r){"use strict";r.d(t,{Uq:function(){return b},Yg:function(){return y},Kd:function(){return g}});var n=r(99399),o=r(639),s=r(2265),a=r(98402),l=r(61542),u=r(81595),c=r(38502),d=function(e,t,r){var n,o,s;return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=(r=(0,c.Z)(r))==r?r:0),void 0!==t&&(t=(t=(0,c.Z)(t))==t?t:0),n=(0,c.Z)(e),o=t,s=r,n==n&&(void 0!==s&&(n=n<=s?n:s),void 0!==o&&(n=n>=o?n:o)),n},h=r(46219),p=r(3146),f={au:"en_AU",us:"en_US",ca:"en_US",de:"de_DE",es:"es_ES",fr:"fr_FR",it:"it_IT",jp:"ja_JP",kr:"ko_KR",nl:"nl_NL",sg:"en_GB",se:"sv_SE",uk:"en_GB",ch:"de_DE"},g=e=>f[e]||"en-US",y=({height:e=48,onError:t,onSuccess:r,children:o})=>{let[{isPending:c,isRejected:d,isResolved:h}]=(0,l.Up)();return(0,s.useEffect)(()=>{d&&(null==t||t())},[d]),(0,s.useEffect)(()=>{h&&(null==r||r())},[h]),(0,u.tZ)(n.m,{loading:c,delay:500,children:c?e?(0,u.tZ)("div",{style:{height:e}}):null:h?(0,a.Z)(o)?o():o:null})},m="CREATE_ORDER_ERROR",v=(0,p.iv)({textAlign:"center"}),b=({fundingSource:e,disabled:t,paypalButtonStyle:r,onSubmit:n,onComplete:a,onError:c})=>{let{t:p}=(0,h.$G)(),f=(0,s.useMemo)(()=>({label:"paypal",layout:"vertical",tagline:!1,shape:"rect",color:"gold",height:(null==r?void 0:r.height)&&d(null==r?void 0:r.height,25,55),disableMaxWidth:!0}),[null==r?void 0:r.height]);return(0,u.tZ)(l.ch,{style:f,fundingSource:e,disabled:t,createOrder:async()=>{var e;try{let t=await (null==n?void 0:n());return(null==(e=null==t?void 0:t.paymentIntent)?void 0:e.paymentIntentId)||m}catch(e){return m}},onApprove:async({orderID:e})=>{await (null==a?void 0:a(e,!0))},onCancel:({orderID:e})=>{null==c||c(o.Pl.businessError("Paypal: user cancel",{silent:!0})),null==a||a(e,!1)},onError:e=>{let t=e.toString().includes("close")||e.toString().includes(m);null==c||c(o.Pl.businessError(e.toString(),{silent:t})),e.toString().includes("close")&&(null==a||a(null,!1))},children:(0,u.tZ)("div",{css:v,children:p("paymentMethodRenderFailed")})})}},29848:function(e,t,r){"use strict";r.r(t),r.d(t,{QuickPaypal:function(){return ru},default:function(){return rd}});var n,o,s,a,l,u,c,d,h,p,f,g,y,m,v,b,w,_,E,S,O,k,x,R=r(51886),A=r(12701),T=r(99399),P=r(639),C=r(2265),I=r(46219),N=r(36609),j=r(78242),L=r(3146),D=r(81595),Z=r(95691),F=r(36960),U=r(11455),$=r(18248),z=r(64961),q=r(38543),V=r(79026),B=r(2879),K=r(23661),W=r(60846),H=(a=new WeakMap,l=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,h=new WeakMap,p=new WeakMap,f=new WeakSet,class extends W.F{get meta(){return this.options.meta}get promise(){var e;return null===(e=(0,Z._)(this,d))||void 0===e?void 0:e.promise}setOptions(e){if(this.options={...(0,Z._)(this,h),...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=G(this.options);void 0!==e.data&&(this.setData(e.data,{updatedAt:e.dataUpdatedAt,manual:!0}),(0,U._)(this,a,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||(0,Z._)(this,u).remove(this)}setData(e,t){let r=(0,z.oE)(this.state.data,e,this.options);return(0,q._)(this,f,Y).call(this,{data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){(0,q._)(this,f,Y).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,r;let n=null===(t=(0,Z._)(this,d))||void 0===t?void 0:t.promise;return null===(r=(0,Z._)(this,d))||void 0===r||r.cancel(e),n?n.then(z.ZT).catch(z.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState((0,Z._)(this,a))}isActive(){return this.observers.some(e=>!1!==(0,z.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===z.CN||this.state.dataUpdateCount+this.state.errorUpdate
1Count===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,z.KC)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,z.Kp)(this.state.dataUpdatedAt,e))}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null==t||t.refetch({cancelRefetch:!1}),null===(e=(0,Z._)(this,d))||void 0===e||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());null==t||t.refetch({cancelRefetch:!1}),null===(e=(0,Z._)(this,d))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),(0,Z._)(this,u).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||((0,Z._)(this,d)&&((0,Z._)(this,p)?(0,Z._)(this,d).cancel({revert:!0}):(0,Z._)(this,d).cancelRetry()),this.scheduleGc()),(0,Z._)(this,u).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||(0,q._)(this,f,Y).call(this,{type:"invalidate"})}async fetch(e,t){var r,n,o,s,a,h,g,y,m,v,b,w;if("idle"!==this.state.fetchStatus&&(null===(r=(0,Z._)(this,d))||void 0===r?void 0:r.status())!=="rejected"){if(void 0!==this.state.data&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if((0,Z._)(this,d))return(0,Z._)(this,d).continueRetry(),(0,Z._)(this,d).promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let _=new AbortController,E=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>((0,U._)(this,p,!0),_.signal)})},S=()=>{let e=(0,z.cG)(this.options,t),r=(()=>{let e={client:(0,Z._)(this,c),queryKey:this.queryKey,meta:this.meta};return E(e),e})();return((0,U._)(this,p,!1),this.options.persister)?this.options.persister(e,r,this):e(r)},O=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:(0,Z._)(this,c),state:this.state,fetchFn:S};return E(e),e})();null===(n=this.options.behavior)||void 0===n||n.onFetch(O,this),(0,U._)(this,l,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(o=O.fetchOptions)||void 0===o?void 0:o.meta))&&(0,q._)(this,f,Y).call(this,{type:"fetch",meta:null===(s=O.fetchOptions)||void 0===s?void 0:s.meta}),(0,U._)(this,d,(0,K.Mz)({initialPromise:null==t?void 0:t.initialPromise,fn:O.fetchFn,onCancel:e=>{e instanceof K.p8&&e.revert&&this.setState({...(0,Z._)(this,l),fetchStatus:"idle"}),_.abort()},onFail:(e,t)=>{(0,q._)(this,f,Y).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,q._)(this,f,Y).call(this,{type:"pause"})},onContinue:()=>{(0,q._)(this,f,Y).call(this,{type:"continue"})},retry:O.options.retry,retryDelay:O.options.retryDelay,networkMode:O.options.networkMode,canRun:()=>!0}));try{let e=await (0,Z._)(this,d).start();if(void 0===e)throw Error("".concat(this.queryHash," data is undefined"));return this.setData(e),null===(a=(h=(0,Z._)(this,u).config).onSuccess)||void 0===a||a.call(h,e,this),null===(g=(y=(0,Z._)(this,u).config).onSettled)||void 0===g||g.call(y,e,this.state.error,this),e}catch(e){if(e instanceof K.p8){if(e.silent)return(0,Z._)(this,d).promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw(0,q._)(this,f,Y).call(this,{type:"error",error:e}),null===(m=(v=(0,Z._)(this,u).config).onError)||void 0===m||m.call(v,e,this),null===(b=(w=(0,Z._)(this,u).config).onSettled)||void 0===b||b.call(w,this.state.data,e,this),e}finally{this.scheduleGc()}}constructor(e){var t;super(),(0,V._)(this,f),(0,F._)(this,a,{writable:!0,value:void 0}),(0,F._)(this,l,{writable:!0,value:void 0}),(0,F._)(this,u,{writable:!0,value:void 0}),(0,F._)(this,c,{writable:!0,value:void 0}),(0,F._)(this,d,{writable:!0,value:void 0}),(0,F._)(this,h,{writable:!0,value:void 0}),(0,F._)(this,p,{writable:!0,value:void 0}),(0,U._)(this,p,!1),(0,U._)(this,h,e.defaultOptions),this.setOptions(e.options),this.observers=[],(0,U._)(this,c,e.client),(0,U._)(this,u,(0,Z._)(this,c).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,(0,U._)(this,a,G(this.options)),this.state=null!==(t=e.state)&&void 0!==t?t:(0,Z._)(this,a),this.scheduleGc()}});function G(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function Y(e){this.state=(t=>{var r,n,o,s;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...(o=t.data,s=this.options,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,K.Kw)(s.networkMode)?"fetching":"paused",...void 0===o&&{error:null,status:"pending"}}),fetchMeta:null!==(r=e.meta)&&void 0!==r?r:null};case"success":let a={...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!==(n=e.dataUpdatedAt)&&void 0!==n?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return(0,U._)(this,l,e.manual?a:void 0),a;case"error":let u=e.error;return{...t,error:u,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),B.Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),(0,Z._)(this,u).notify({query:this,type:"updated",action:e})})}var J=r(41797),Q=(g=new WeakMap,class extends J.l{build(e,t,r){var n;let o=t.queryKey,s=null!==(n=t.queryHash)&&void 0!==n?n:(0,z.Rm)(o,t),a=this.get(s);return a||(a=new H({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){(0,Z._)(this,g).has(e.queryHash)||((0,Z._)(this,g).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=(0,Z._)(this,g).get(e.queryHash);t&&(e.destroy(),t===e&&(0,Z._)(this,g).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){B.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return(0,Z._)(this,g).get(e)}getAll(){return[...(0,Z._)(this,g).values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,z._x)(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,z._x)(e,t)):t}notify(e){B.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){B.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){B.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}constructor(e={}){super(),(0,F._)(this,g,{writable:!0,value:void 0}),this.config=e,(0,U._)(this,g,new Map)}}),X=r(83216),ee=(y=new WeakMap,m=new WeakMap,v=new WeakMap,class extends J.l{build(e,t,r){let n=new X.m({client:e,mutationCache:this,mutationId:++(0,$._)(this,v).value,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){(0,Z._)(this,y).add(e);let t=et(e);if("string"==typeof t){let r=(0,Z._)(this,m).get(t);r?r.push(e):(0,Z._)(this,m).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if((0,Z._)(this,y).delete(e)){let t=et(e);if("string"==typeof t){let r=(0,Z._)(this,m).get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&(0,Z._)(this,m).delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=et(e);if("string"!=typeof t)return!0;{let r=(0,Z._)(this,m).get(t),n=null==r?void 0:r.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=et(e);if("string"!=typeof t)return Promise.resolve();{var r,n;let o=null===(r=(0,Z._)(this,m).get(t))||void 0===r?void 0:r.find(t=>
1t!==e&&t.state.isPaused);return null!==(n=null==o?void 0:o.continue())&&void 0!==n?n:Promise.resolve()}}clear(){B.Vr.batch(()=>{(0,Z._)(this,y).forEach(e=>{this.notify({type:"removed",mutation:e})}),(0,Z._)(this,y).clear(),(0,Z._)(this,m).clear()})}getAll(){return Array.from((0,Z._)(this,y))}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,z.X7)(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(t=>(0,z.X7)(e,t))}notify(e){B.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return B.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(z.ZT))))}constructor(e={}){super(),(0,F._)(this,y,{writable:!0,value:void 0}),(0,F._)(this,m,{writable:!0,value:void 0}),(0,F._)(this,v,{writable:!0,value:void 0}),this.config=e,(0,U._)(this,y,new Set),(0,U._)(this,m,new Map),(0,U._)(this,v,0)}});function et(e){var t;return null===(t=e.options.scope)||void 0===t?void 0:t.id}var er=r(35299),en=r(97743);function ei(e){return{onFetch:(t,r)=>{var n,o,s,a,l;let u=t.options,c=null===(s=t.fetchOptions)||void 0===s?void 0:null===(o=s.meta)||void 0===o?void 0:null===(n=o.fetchMore)||void 0===n?void 0:n.direction,d=(null===(a=t.state.data)||void 0===a?void 0:a.pages)||[],h=(null===(l=t.state.data)||void 0===l?void 0:l.pageParams)||[],p={pages:[],pageParams:[]},f=0,g=async()=>{let r=!1,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},o=(0,z.cG)(t.options,t.fetchOptions),s=async(e,s,a)=>{if(r)return Promise.reject();if(null==s&&e.pages.length)return Promise.resolve(e);let l=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:s,direction:a?"backward":"forward",meta:t.options.meta};return n(e),e})(),u=await o(l),{maxPages:c}=t.options,d=a?z.Ht:z.VX;return{pages:d(e.pages,u,c),pageParams:d(e.pageParams,s,c)}};if(c&&d.length){let e="backward"===c,t={pages:d,pageParams:h},r=(e?function(e,t){var r;let{pages:n,pageParams:o}=t;return n.length>0?null===(r=e.getPreviousPageParam)||void 0===r?void 0:r.call(e,n[0],n,o[0],o):void 0}:eo)(u,t);p=await s(t,r,e)}else{let t=null!=e?e:d.length;do{var a;let e=0===f?null!==(a=h[0])&&void 0!==a?a:u.initialPageParam:eo(u,p);if(f>0&&null==e)break;p=await s(p,e),f++}while(f<t)}return p};t.options.persister?t.fetchFn=()=>{var e,n;return null===(e=(n=t.options).persister)||void 0===e?void 0:e.call(n,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=g}}}function eo(e,t){let{pages:r,pageParams:n}=t,o=r.length-1;return r.length>0?e.getNextPageParam(r[o],r,n[o],n):void 0}var es=(b=new WeakMap,w=new WeakMap,_=new WeakMap,E=new WeakMap,S=new WeakMap,O=new WeakMap,k=new WeakMap,x=new WeakMap,class{mount(){(0,$._)(this,O).value++,1===(0,Z._)(this,O)&&((0,U._)(this,k,er.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),(0,Z._)(this,b).onFocus())})),(0,U._)(this,x,en.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),(0,Z._)(this,b).onOnline())})))}unmount(){var e,t;(0,$._)(this,O).value--,0===(0,Z._)(this,O)&&(null===(e=(0,Z._)(this,k))||void 0===e||e.call(this),(0,U._)(this,k,void 0),null===(t=(0,Z._)(this,x))||void 0===t||t.call(this),(0,U._)(this,x,void 0))}isFetching(e){return(0,Z._)(this,b).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return(0,Z._)(this,w).findAll({...e,status:"pending"}).length}getQueryData(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null===(t=(0,Z._)(this,b).get(r.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=(0,Z._)(this,b).build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,z.KC)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return(0,Z._)(this,b).findAll(e).map(e=>{let{queryKey:t,state:r}=e;return[t,r.data]})}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=(0,Z._)(this,b).get(n.queryHash),s=null==o?void 0:o.state.data,a=(0,z.SE)(t,s);if(void 0!==a)return(0,Z._)(this,b).build(this,n).setData(a,{...r,manual:!0})}
1setQueriesData(e,t,r){return B.Vr.batch(()=>(0,Z._)(this,b).findAll(e).map(e=>{let{queryKey:n}=e;return[n,this.setQueryData(n,t,r)]}))}getQueryState(e){var t;let r=this.defaultQueryOptions({queryKey:e});return null===(t=(0,Z._)(this,b).get(r.queryHash))||void 0===t?void 0:t.state}removeQueries(e){let t=(0,Z._)(this,b);B.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=(0,Z._)(this,b);return B.Vr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={revert:!0,...t};return Promise.all(B.Vr.batch(()=>(0,Z._)(this,b).findAll(e).map(e=>e.cancel(r)))).then(z.ZT).catch(z.ZT)}invalidateQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return B.Vr.batch(()=>{var r,n;return((0,Z._)(this,b).findAll(e).forEach(e=>{e.invalidate()}),(null==e?void 0:e.refetchType)==="none")?Promise.resolve():this.refetchQueries({...e,type:null!==(n=null!==(r=null==e?void 0:e.refetchType)&&void 0!==r?r:null==e?void 0:e.type)&&void 0!==n?n:"active"},t)})}refetchQueries(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={...r,cancelRefetch:null===(t=r.cancelRefetch)||void 0===t||t};return Promise.all(B.Vr.batch(()=>(0,Z._)(this,b).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(z.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(z.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=(0,Z._)(this,b).build(this,t);return r.isStaleByTime((0,z.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(z.ZT).catch(z.ZT)}fetchInfiniteQuery(e){return e.behavior=ei(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(z.ZT).catch(z.ZT)}ensureInfiniteQueryData(e){return e.behavior=ei(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return en.N.isOnline()?(0,Z._)(this,w).resumePausedMutations():Promise.resolve()}getQueryCache(){return(0,Z._)(this,b)}getMutationCache(){return(0,Z._)(this,w)}getDefaultOptions(){return(0,Z._)(this,_)}setDefaultOptions(e){(0,U._)(this,_,e)}setQueryDefaults(e,t){(0,Z._)(this,E).set((0,z.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...(0,Z._)(this,E).values()],r={};return t.forEach(t=>{(0,z.to)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){(0,Z._)(this,S).set((0,z.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...(0,Z._)(this,S).values()],r={};return t.forEach(t=>{(0,z.to)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...(0,Z._)(this,_).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,z.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===z.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return(null==e?void 0:e._defaulted)?e:{...(0,Z._)(this,_).mutations,...(null==e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){(0,Z._)(this,b).clear(),(0,Z._)(this,w).clear()}constructor(e={}){(0,F._)(this,b,{writable:!0,value:void 0}),(0,F._)(this,w,{writable:!0,value:void 0}),(0,F._)(this,_,{writable:!0,value:void 0}),(0,F._)(this,E,{writable:!0,value:void 0}),(0,F._)(this,S,{writable:!0,value:void 0}),(0,F._)(this,O,{writable:!0,value:void 0}),(0,F._)(this,k,{writable:!0,value:void 0}),(0,F._)(this,x,{writable:!0,value:void 0}),(0,U._)(this,b,e.queryCache||new Q),(0,U._)(this,w,e.mutationCache||new ee),(0,U._)(this,_,e.defaultOptions||{}),(0,U._)(this,E,new Map),(0,U._)(this,S,new Map),(0,U._)(this,O,0)}}),ea=r(53813),el=r(54492),eu=r(35400),ec=r(20919),ed=r(70351),eh=r(28070),ep=r(82025),ef=r(23605),eg=r(17234),ey=r(41580),em=Object.prototype.hasOwnProperty,ev=function(e){if(null==e)return!0;
1if((0,ep.Z)(e)&&((0,eh.Z)(e)||"string"==typeof e||"function"==typeof e.splice||(0,ef.Z)(e)||(0,ey.Z)(e)||(0,ed.Z)(e)))return!e.length;var t=(0,ec.Z)(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if((0,eg.Z)(e))return!(0,eu.Z)(e).length;for(var r in e)if(em.call(e,r))return!1;return!0},eb=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0},ew=r(32613),e_=function(e,t){var r=!0;return(0,ew.Z)(e,function(e,n,o){return r=!!t(e,n,o)}),r},eE=r(8883),eS=r(98721);function eO(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new eS.Z;++t<r;)this.add(e[t])}eO.prototype.add=eO.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},eO.prototype.has=function(e){return this.__data__.has(e)};var ek=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1},ex=function(e,t,r,n,o,s){var a=1&r,l=e.length,u=t.length;if(l!=u&&!(a&&u>l))return!1;var c=s.get(e),d=s.get(t);if(c&&d)return c==t&&d==e;var h=-1,p=!0,f=2&r?new eO:void 0;for(s.set(e,t),s.set(t,e);++h<l;){var g=e[h],y=t[h];if(n)var m=a?n(y,g,h,t,e,s):n(g,y,h,e,t,s);if(void 0!==m){if(m)continue;p=!1;break}if(f){if(!ek(t,function(e,t){if(!f.has(t)&&(g===e||o(g,e,r,n,s)))return f.push(t)})){p=!1;break}}else if(!(g===y||o(g,y,r,n,s))){p=!1;break}}return s.delete(e),s.delete(t),p},eR=r(40856),eA=r(6408),eT=r(84338),eP=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r},eC=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r},eI=eR.Z?eR.Z.prototype:void 0,eN=eI?eI.valueOf:void 0,ej=function(e,t,r,n,o,s,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!s(new eA.Z(e),new eA.Z(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,eT.Z)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=eP;case"[object Set]":var u=1&n;if(l||(l=eC),e.size!=t.size&&!u)break;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var d=ex(l(e),l(t),n,o,s,a);return a.delete(e),d;case"[object Symbol]":if(eN)return eN.call(e)==eN.call(t)}return!1},eL=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e},eD=function(e,t,r){var n=t(e);return(0,eh.Z)(e)?n:eL(n,r(e))},eZ=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s},eM=Object.prototype.propertyIsEnumerable,eF=Object.getOwnPropertySymbols,eU=eF?function(e){return null==e?[]:eZ(eF(e=Object(e)),function(t){return eM.call(e,t)})}:function(){return[]},e$=r(47799),ez=function(e){return eD(e,e$.Z,eU)},eq=Object.prototype.hasOwnProperty,eV=function(e,t,r,n,o,s){var a=1&r,l=ez(e),u=l.length;if(u!=ez(t).length&&!a)return!1;for(var c=u;c--;){var d=l[c];if(!(a?d in t:eq.call(t,d)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var f=!0;s.set(e,t),s.set(t,e);for(var g=a;++c<u;){var y=e[d=l[c]],m=t[d];if(n)var v=a?n(m,y,d,t,e,s):n(y,m,d,e,t,s);if(!(void 0===v?y===m||o(y,m,r,n,s):v)){f=!1;break}g||(g="constructor"==d)}if(f&&!g){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(f=!1)}return s.delete(e),s.delete(t),f},eB="[object Arguments]",eK="[object Array]",eW="[object Object]",eH=Object.prototype.hasOwnProperty,eG=function(e,t,r,n,o,s){var a=(0,eh.Z)(e),l=(0,eh.Z)(t),u=a?eK:(0,ec.Z)(e),c=l?eK:(0,ec.Z)(t);u=u==eB?eW:u,c=c==eB?eW:c;var d=u==eW,h=c==eW,p=u==c;if(p&&(0,ef.Z)(e)){if(!(0,ef.Z)(t))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new eE.Z),a||(0,ey.Z)(e)?ex(e,t,r,n,o,s):ej(e,t,u,r,n,o,s);if(!(1&r)){var f=d&&eH.call(e,"__wrapped__"),g=h&&eH.call(t,"__wrapped__");
1if(f||g){var y=f?e.value():e,m=g?t.value():t;return s||(s=new eE.Z),o(y,m,r,n,s)}}return!!p&&(s||(s=new eE.Z),eV(e,t,r,n,o,s))},eY=r(82370),eJ=function e(t,r,n,o,s){return t===r||(null!=t&&null!=r&&((0,eY.Z)(t)||(0,eY.Z)(r))?eG(t,r,n,o,e,s):t!=t&&r!=r)},eQ=function(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Object(e);o--;){var l=r[o];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<s;){var u=(l=r[o])[0],c=e[u],d=l[1];if(a&&l[2]){if(void 0===c&&!(u in e))return!1}else{var h=new eE.Z;if(n)var p=n(c,d,u,e,t,h);if(!(void 0===p?eJ(d,c,3,n,h):p))return!1}}return!0},eX=r(7632),e0=function(e){return e==e&&!(0,eX.Z)(e)},e1=function(e){for(var t=(0,e$.Z)(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,e0(o)]}return t},e2=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}},e3=function(e){var t=e1(e);return 1==t.length&&t[0][2]?e2(t[0][0],t[0][1]):function(r){return r===e||eQ(r,e,t)}},e5=r(82245),e6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e4=/^\w*$/,e8=function(e,t){if((0,eh.Z)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,e5.Z)(e))||e4.test(e)||!e6.test(e)||null!=t&&e in Object(t)};function e9(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(e9.Cache||eS.Z),r}e9.Cache=eS.Z;var e7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/\\(\\)?/g,tt=(o=(n=e9(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(e7,function(e,r,n,o){t.push(n?o.replace(te,"$1"):r||e)}),t},function(e){return 500===o.size&&o.clear(),e})).cache,n),tr=r(80659),tn=1/0,ti=eR.Z?eR.Z.prototype:void 0,to=ti?ti.toString:void 0,ts=function e(t){if("string"==typeof t)return t;if((0,eh.Z)(t))return(0,tr.Z)(t,e)+"";if((0,e5.Z)(t))return to?to.call(t):"";var r=t+"";return"0"==r&&1/t==-tn?"-0":r},ta=function(e,t){return(0,eh.Z)(e)?e:e8(e,t)?[e]:tt(null==e?"":ts(e))},tl=1/0,tu=function(e){if("string"==typeof e||(0,e5.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-tl?"-0":t},tc=function(e,t){t=ta(t,e);for(var r=0,n=t.length;null!=e&&r<n;)e=e[tu(t[r++])];return r&&r==n?e:void 0},td=function(e,t,r){var n=null==e?void 0:tc(e,t);return void 0===n?r:n},th=function(e,t){return null!=e&&t in Object(e)},tp=r(65482),tf=r(53934),tg=function(e,t,r){t=ta(t,e);for(var n=-1,o=t.length,s=!1;++n<o;){var a=tu(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&(0,tf.Z)(o)&&(0,tp.Z)(a,o)&&((0,eh.Z)(e)||(0,ed.Z)(e))},ty=r(20937),tm=r(62838),tv=function(e){var t,r,n;if("function"==typeof e)return e;if(null==e)return ty.Z;if("object"==typeof e){return(0,eh.Z)(e)?(t=e[0],r=e[1],e8(t)&&e0(r)?e2(tu(t),r):function(e){var n=td(e,t);return void 0===n&&n===r?null!=e&&tg(e,t,th):eJ(r,n,3)}):e3(e)}return e8(n=e)?(0,tm.Z)(tu(n)):function(e){return tc(e,n)}},tb=r(2864),tw=function(e,t,r){var n=(0,eh.Z)(e)?eb:e_;return r&&(0,tb.Z)(e,t,r)&&(t=void 0),n(e,tv(t,3))},t_=function(e,t){var r;return(0,ew.Z)(e,function(e,n,o){return!(r=t(e,n,o))}),!!r},tE=function(e,t,r){var n=(0,eh.Z)(e)?ek:t_;return r&&(0,tb.Z)(e,t,r)&&(t=void 0),n(e,tv(t,3))},tS=r(38476);let tO=(0,C.createContext)(null),tk={didCatch:!1,error:null};class tx extends C.Component{static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){for(var e,t,r=arguments.length,n=Array(r),o=0;o<r;o++)n[o]=arguments[o];let{error:s}=this.state;null!==s&&(null===(e=(t=this.props).onReset)||void 0===e||e.call(t,{args:n,reason:"imperative-api"}),this.setState(tk))}componentDidCatch(e,t){var r,n;null===(r=(n=this.props).onError)||void 0===r||r.call(n,e,t)}componentDidUpdate(e,t){var r,n;let{didCatch:o}=this.state,{resetKeys:s}=this.props;o&&null!==t.error&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.length!==t.length||e.some((e,r)=>!Object.is(e,t[r]))}(e.resetKeys,s)&&(null===(r=(n=this.props).onReset)||void 0===r||r.call(n,{next:s,prev:e.resetKeys,reason:"keys"}),this.setState(tk))}render(){let{children:e,fallbackRender:t,FallbackComponent:r,fallback:n}=this.props,{didCatch:o,error:s}=this.state,a=e;if(o){let e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)a=t(e);else if(r)a=(0,C.createElement)(r,e);else if(void 0!==n)a=n;else throw s}return(0,C.createElement)(tO.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=tk}}var tR=r(41764),tA=r(6937),tT=Math.max,tP=(s=function(e,t,r){var n=null==e?0:e.length;if(!n)return -1;var o=null==r?0:(0,tA.Z)(r);return o<0&&(o=tT(n+o,0)),(0,tR.Z)(e,tv(t,3),o)},function(e,t,r){var n=Object(e);
1if(!(0,ep.Z)(e)){var o=tv(t,3);e=(0,e$.Z)(e),t=function(e){return o(n[e],e,n)}}var a=s(e,t,r);return a>-1?n[o?e[a]:a]:void 0}),tC=r(82663),tI=r(98402),tN=r(61542),tj=r(32226),tL=(0,L.iv)`
2  /* 定义层级顺序 */
3  @layer lily-pay-normalize;
4
5  /*
61. Use a consistent sensible line-height in all browsers.
72. Prevent adjustments of font size after orientation changes in iOS.
83. Use a more readable tab size.
94. Use the user's configured \`sans\` font-family by default.
105. Use the user's configured \`sans\` font-feature-settings by default.
116. Use the user's configured \`sans\` font-variation-settings by default.
127. Disable tap highlights on iOS
13*/
14  line-height: 1.5; /* 1 */
15  -webkit-text-size-adjust: 100%; /* 2 */
16  -moz-tab-size: 4; /* 3 */
17  tab-size: 4; /* 3 */
18  font-family: "Futura-Book", "Futura", "Avenir", "Avenir Next", -apple-system,
19    BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", "Arial",
20    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
21    "Noto Color Emoji"; /* 4 */
22  font-feature-settings: normal; /* 5 */
23  font-variation-settings: normal; /* 6 */
24  -webkit-tap-highlight-color: transparent; /* 7 */
25
26  @layer lily-pay-normalize {
27    /*
281. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
292. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
30*/
31    & *,
32    & ::before,
33    & ::after {
34      box-sizing: border-box; /* 1 */
35      border-width: 0; /* 2 */
36      border-style: solid; /* 2 */
37      border-color: ${P.O9.grey2}; /* 2 */
38    }
39
40    & ::before,
41    & ::after {
42      --tw-content: "";
43    }
44
45    /*
461. Add the correct height in Firefox.
472. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
483. Ensure horizontal rules are visible by default.
49*/
50    & hr {
51      height: 0; /* 1 */
52      color: inherit; /* 2 */
53      border-top-width: 1px; /* 3 */
54    }
55
56    /*
57Add the correct text decoration in Chrome, Edge, and Safari.
58*/
59    & abbr:where([title]) {
60      text-decoration: underline dotted;
61    }
62
63    /*
64Remove the default font size and weight for headings.
65*/
66    & h1,
67    & h2,
68    & h3,
69    & h4,
70    & h5,
71    & h6 {
72      font-size: inherit;
73      font-weight: inherit;
74    }
75
76    /*
77Reset links to optimize for opt-in styling instead of opt-out.
78*/
79    & a {
80      color: inherit;
81      text-decoration: inherit;
82    }
83
84    /*
85Add the correct font weight in Edge and Safari.
86*/
87    & b,
88    & strong {
89      font-weight: bolder;
90    }
91
92    /*
931. Use the user's configured \`mono\` font-family by default.
942. Use the user's configured \`mono\` font-feature-settings by default.
953. Use the user's configured \`mono\` font-variation-settings by default.
964. Correct the odd \`em\` font sizing in all browsers.
97*/
98    & code,
99    & kbd,
100    & samp,
101    & pre {
102      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
103        "Liberation Mono", "Courier New", monospace; /* 1 */
104      font-feature-settings: normal; /* 2 */
105      font-variation-settings: normal; /* 3 */
106      font-size: 1em; /* 4 */
107    }
108
109    /*
110Add the correct font size in all browsers.
111*/
112    & small {
113      font-size: 80%;
114    }
115
116    /*
117Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
118*/
119    & sub,
120    & sup {
121      font-size: 75%;
122      line-height: 0;
123      position: relative;
124      vertical-align: baseline;
125    }
126
127    & sub {
128      bottom: -0.25em;
129    }
130
131    & sup {
132      top: -0.5em;
133    }
134
135    /*
1361. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
1372. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
1383. Remove gaps between table borders by default.
139*/
140    & table {
141      text-indent: 0; /* 1 */
142      border-color: inherit; /* 2 */
143      border-collapse: collapse; /* 3 */
144    }
145
146    /*
1471. Change the font styles in all browsers.
1482. Remove the margin in Firefox and Safari.
1493. Remove default padding in all browsers.
150*/
151    & button,
152    & input,
153    & optgroup,
154    & select,
155    & textarea {
156      font-family: inherit; /* 1 */
157      font-feature-settings: inherit; /* 1 */
158      font-variation-settings: inherit; /* 1 */
159      font-size: 100%; /* 1 */
160      font-weight: inherit; /* 1 */
161      line-height: inherit; /* 1 */
162      letter-spacing: inherit; /* 1 */
163      color: inherit; /* 1 */
164      margin: 0; /* 2 */
165      padding: 0; /* 3 */
166    }
167
168    /*
169Remove the inheritance of text transform in Edge and Firefox.
170*/
171    & button,
172    & select {
173      text-transform: none;
174    }
175
176    /*
1771. Correct the inability to style clickable types in iOS and Safari.
1782. Remove default button styles.
179*/
180    & button,
181    & input:where([type="button"]),
182    & input:where([type="reset"]),
183    & input:where([type="submit"]) {
184      -webkit-appearance: button; /* 1 */
185      background-color: transparent; /* 2 */
186      background-image: none; /* 2 */
187    }
188
189    /*
190Use the modern Firefox focus style for all focusable elements.
191*/
192    & :-moz-focusring {
193      outline: auto;
194    }
195
196    /*
197Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
198*/
199    & :-moz-ui-invalid {
200      box-shadow: none;
201    }
202
203    /*
204Add the correct vertical alignment in Chrome and Firefox.
205*/
206    & progress {
207      vertical-align: baseline;
208    }
209
210    /*
211Correct the cursor style of increment and decrement buttons in Safari.
212*/
213    & ::-webkit-inner-spin-button,
214    & ::-webkit-outer-spin-button {
215      height: auto;
216    }
217
218    /*
2191. Correct the odd appearance in Chrome and Safari.
2202. Correct the outline style in Safari.
221*/
222    & [type="search"] {
223      -webkit-appearance: textfield; /* 1 */
224      outline-offset: -2px; /* 2 */
225    }
226
227    /*
228Remove the inner padding in Chrome and Safari on macOS.
229*/
230    & ::-webkit-search-decoration {
231      -webkit-appearance: none;
232    }
233
234    /*
2351. Correct the inability to style clickable types in iOS and Safari.
2362. Change font properties to \`inherit\` in Safari.
237*/
238    & ::-webkit-file-upload-button {
239      -webkit-appearance: button; /* 1 */
240      font: inherit; /* 2 */
241    }
242
243    /*
244Add the correct display in Chrome and Safari.
245*/
246    & summary {
247      display: list-item;
248    }
249
250    /*
251Removes the default spacing and border for appropriate elements.
252*/
253    & blockquote,
254    & dl,
255    & dd,
256    & h1,
257    & h2,
258    & h3,
259    & h4,
260    & h5,
261    & h6,
262    & hr,
263    & figure,
264    & p,
265    & pre {
266      margin: 0;
267    }
268
269    & fieldset {
270      margin: 0;
271      padding: 0;
272    }
273
274    & legend {
275      padding: 0;
276    }
277
278    & ol,
279    & ul,
280    & menu {
281      list-style: none;
282      margin: 0;
283      padding: 0;
284    }
285
286    /*
287Reset default styling for dialogs.
288*/
289    & dialog {
290      padding: 0;
291    }
292
293    /*
294Prevent resizing textareas horizontally by default.
295*/
296    & textarea {
297      resize: vertical;
298    }
299
300    /*
3011. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
3022. Set the default placeholder color to the user's configured gray 400 color.
303*/
304    & input::placeholder,
305    & textarea::placeholder {
306      opacity: 1; /* 1 */
307      color: ${P.O9.grey1}; /* 2 */
308    }
309
310    /*
311Set the default cursor for buttons.
312*/
313    & button,
314    & [role="button"] {
315      cursor: pointer;
316    }
317
318    /*
319Make sure disabled buttons don't get the pointer cursor.
320*/
321    & :disabled {
322      cursor: default;
323    }
324
325    /*
3261. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
3272. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/je
327nsimmons/cssremedy/issues/14#issuecomment-634934210)
328   This can trigger a poorly considered lint error in some tools but is included by design.
329*/
330    & img,
331    & svg,
332    & video,
333    & canvas,
334    & audio,
335    & iframe,
336    & embed,
337    & object {
338      display: block; /* 1 */
339      vertical-align: middle; /* 2 */
340    }
341
342    /*
343Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
344*/
345    & img,
346    & video {
347      max-width: 100%;
348      height: auto;
349    }
350
351    /* Make elements with the HTML hidden attribute stay hidden by default */
352    & [hidden]:where(:not([hidden="until-found"])) {
353      display: none;
354    }
355  }
356`,tD=({children:e,...t})=>(0,D.tZ)("div",{css:tL,...t,children:e}),tZ=new es({defaultOptions:{queries:{staleTime:0,gcTime:0,refetchOnWindowFocus:!1,retry:!1},mutations:{retry:!1}}}),tM=({children:e})=>(0,D.tZ)(ea.aH,{client:tZ,children:e}),tF=(0,L.iv)({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%"}),tU=(0,L.iv)({fontSize:"16px",lineHeight:"22px",letterSpacing:"0.064px",marginBottom:"16px"}),t$=(0,L.iv)({display:"flex",cursor:"pointer",alignItems:"center",justifyContent:"center",fontFamily:"Futura-Demi",transition:"all 0.3s ease",border:"none",color:P.O9.lilyWhite,backgroundColor:P.O9.lilyGreen,padding:"8px 16px",fontSize:"12px"}),tz=({text:e,onButtonClick:t,buttonText:r})=>{let{t:n}=(0,I.$G)();return(0,D.BX)("div",{css:tF,children:[(0,D.tZ)("div",{css:tU,children:e}),(0,D.tZ)("button",{css:t$,onClick:t,children:r||n("retry")})]})},tq=({children:e,id:t,name:r,onRenderError:n})=>(0,D.tZ)(tx,{fallback:null,onError:e=>{n(P.Pl.initError(`${r} failed to load. ${null==e?void 0:e.message}`,{silent:!0,noConsult:!0,pspId:t,pspType:r}))},children:(0,D.tZ)(C.Suspense,{fallback:null,children:e})}),tV=({})=>{let{t:e}=(0,I.$G)();return e("initializationFailed")},tB=(0,C.lazy)(()=>r.e(3662).then(r.bind(r,13662))),tK=(0,C.lazy)(()=>Promise.all([r.e(4385),r.e(22)]).then(r.bind(r,10022))),tW=(0,C.lazy)(()=>r.e(328).then(r.bind(r,56783))),tH=(0,C.lazy)(()=>r.e(1192).then(r.bind(r,81192))),tG=(0,C.lazy)(()=>r.e(9844).then(r.bind(r,69844))),tY=(0,C.lazy)(()=>r.e(8036).then(r.bind(r,88036))),tJ=(0,C.lazy)(()=>r.e(9648).then(r.bind(r,69648))),tQ=(0,C.lazy)(()=>r.e(1483).then(r.bind(r,11483))),tX=({orderId:e,storeCode:t,amount:r,countryCode:n,forterToken:o,cardConfig:s,paymentServiceProviders:a,onComplete:l,onCompleted:u,onPaymentMethodSelected:c,onError:d,onSubmit:h,onRetry:p})=>{let f=(0,P.b9)(P.dp),[g,y]=(0,P.KO)(P.cj),m=(0,C.useMemo)(()=>(0,tS.cn)(e=>{let t=e(P.dp);return!ev(a)&&tw(a,e=>t.loadError[e.id])}),[a]),v=(0,P.Dv)(m),{confirm:b}=(0,P.i0)({orderId:e,forterToken:o,onSubmit:h,onCompleted:u,onError:d}),w=(0,P.bn)(e=>{f(t=>({total:a.length,loadError:{...t.loadError,[e]:!0}}))}),_=(0,P.bn)(e=>{"INIT"===e.type&&w(e.meta.pspId),null==d||d(e)}),E=(0,P.bn)(()=>{y(!1)});if(v)return(0,D.tZ)(tz,{text:(0,D.tZ)(tV,{}),onButtonClick:p});let S=o=>{var a;return o.type===P.aq.CARD?(0,D.tZ)(tB,{storeCode:t,orderId:e,cardConfig:s,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.ADYEN?(0,D.tZ)(tK,{storeCode:t,orderId:e,countryCode:n,amount:r,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onCompleted:u,onError:_,onInitSuccess:E}):o.type===P.aq.AIRWALLEX?(0,D.tZ)(tW,{storeCode:t,countryCode:n,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.CHECKOUT?(0,D.tZ)(tH,{storeCode:t,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.KLARNA?(0,D.tZ)(tG,{storeCode:t,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.NUVEI?(0,D.tZ)(tY,{config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.PAYPAL?tE(null==(a=o.paymentConfiguration)?void 0:a.paymentMethods,{type:P.WO.WALLET})&&(0,D.tZ)(tJ,{storeCode:t,countryCode:n,amount:r,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):o.type===P.aq.YUNO?(0,D.tZ)(tQ,{storeCode:t,countryCode:n,cardConfig:s,config:o,onPaymentMethodSelected:c,onSubmit:b,onComplete:l,onError:_,onInitSuccess:E}):null};return ev(a)?(0,D.tZ)("div",{style:{height:100}}):(0,D.tZ)(T.m,{loading:g,children:(0,D.tZ)("div",{style:{minHeight:100},children:a.map(e=>(0,D.tZ)(tq,{id:e.id,name:e.type,onRenderError:_,children:S(e)},e.type))})})},t0={googlepay:P.kk,applepay:P.hX},t1=(e,t)=>!!e&&!!t&&t.some(t=>{var r;return null==(r=t0[t])?void 0:r.call(t0,e)}),t2=(e,t)=>({...e,paymentConfiguration:{...e.paymentConfiguration,paymentMethods:t}}),t3=(e,t)=>
356{if(!e)return[];let r=e=>!t1(e,t);return e.map(e=>{var t,n,o;let s=null!=(o=null==(n=null==(t=e.paymentConfiguration)?void 0:t.paymentMethods)?void 0:n.filter(e=>r(e.type)))?o:[];return t2(e,s)})},t5=({})=>{let{t:e}=(0,I.$G)();return e("consultFailed")},t6=e=>{if(e&&(null==e?void 0:e.adyen))return{pspType:P.aq.ADYEN,external:{paymentResultInformation:{redirectResult:null==e?void 0:e.adyen}}}},t4=({channel:e,storeCode:t,countryCode:r,amount:n,orderId:o,forterToken:s,cardConfig:a,redirectResult:l,disabledPaymentMethods:u,transformProviders:c,onConsulted:d,onPaymentMethodSelected:h,onCompleted:p,onSubmit:f,onError:g})=>{var y;let m=(0,P.nA)(),v=(0,C.useRef)(0),b=(0,C.useRef)(0),w=(0,C.useRef)(0),_=(0,P.b9)(P.Pt),E=(0,P.iQ)(),{data:S,error:O,isPending:k,isSuccess:x,mutate:R}=(0,P.fC)({orderId:o,countryCode:r,storeCode:t,onSuccess:t=>{var r,n;null==d||d(null==t?void 0:t.data);let s=null==(r=null==t?void 0:t.data)?void 0:r.status;if((0,P.uy)(s)){let r=(0,P.TD)(`consult status error, order status is: ${s}`,null==(n=null==t?void 0:t.header)?void 0:n["trace-id"]);if(E({bizId:o,errorType:"BUSINESS",responseBody:(0,P.qx)(r,e)}),m.current)return;null==g||g(P.Pl.businessError(r,{i18nKey:"consultFailed"})),b.current++,b.current<=3&&R();return}!m.current&&(s===P.iF.confirmed?(v.current++,v.current<=3&&I(t6(l))):s===P.iF.paySucceed&&(null==F||F()))},onError(t){let r="AbortError"===t.name?`consultPayment polling was cancelled. reason: ${t.message}`:t.message;E({bizId:o,errorType:"CONSULT",responseBody:(0,P.qx)(r,e)})}}),{mutateAsync:A,mutate:I}=(0,P.Uw)({orderId:o,onSuccess(t,r){var n,s,a,l;let u=null==(n=null==t?void 0:t.data)?void 0:n.status;if(u===P.iF.paySucceed){if(m.current)return;null==F||F(r&&{pspType:r.pspType,pspId:r.pspId,paymentType:r.paymentType});return}let c=(0,P.TD)(`complete api invalid status: ${u}. api errorMessage is: ${null==(s=null==t?void 0:t.data)?void 0:s.errorMessage}`,null==(a=null==t?void 0:t.header)?void 0:a["trace-id"]);if(E({pspType:null==r?void 0:r.pspType,pspId:null==r?void 0:r.pspId,bizId:o,errorType:"API",responseBody:(0,P.qx)(c,e)}),!m.current){if(_(!1),null==g||g(P.Pl.apiError(c,{pspType:null==r?void 0:r.pspType,pspId:null==r?void 0:r.pspId,i18nKey:(null==(l=null==t?void 0:t.data)?void 0:l.lpsErrorCode)||"completeFailed"})),(0,el.Z)([P.iF.cancelled,P.iF.cancelFailed,P.iF.riskPostDecline,P.iF.captureFailed],u)){R();return}!k&&ev(null==S?void 0:S.data.paymentServiceProviders)&&(b.current++,b.current<=3&&R())}},onError(t,r){let n="AbortError"===t.name?`completePayment polling was cancelled. reason: ${t.message}`:t.message;E({pspType:null==r?void 0:r.pspType,pspId:null==r?void 0:r.pspId,bizId:o,errorType:"API",responseBody:(0,P.qx)(n,e)}),m.current||(_(!1),null==g||g(P.Pl.apiError(n,{pspType:null==r?void 0:r.pspType,pspId:null==r?void 0:r.pspId,i18nKey:"completeFailed"})))}}),N=(0,C.useMemo)(()=>{var e;return t3(null==(e=null==S?void 0:S.data)?void 0:e.paymentServiceProviders,u)},[null==(y=null==S?void 0:S.data)?void 0:y.paymentServiceProviders,u]),j=(0,C.useMemo)(()=>{var e;return null!=(e=null==c?void 0:c(N))?e:N},[N,c]),L=(0,P.bn)(async e=>{_(!0),null==f||f(e)}),Z=(0,P.bn)(async e=>await A(e)),F=(0,P.bn)(async e=>{_(!1),null==p||p(e)}),U=(0,P.bn)(t=>{E({pspType:t.meta.pspType,pspId:t.meta.pspId,bizId:o,errorType:t.type,responseBody:(0,P.qx)(t.message,e)}),_(!1),(t.meta.pspType===P.aq.YUNO&&!t.meta.noConsult||t.meta.pspType===P.aq.CARD&&t.meta.needConsult)&&(w.current++,w.current<=3&&R()),null==g||g(t)}),$=(0,P.bn)(()=>{w.current=0,b.current=0,v.current=0,R()}),z=(0,P.bn)(t=>{E({bizId:o,errorType:"BUSINESS",responseBody:(0,P.qx)(t,e)})});return(0,C.useEffect)(()=>{w.current=0,b.current=0,v.current=0,R()},[t,r,o,null==n?void 0:n.cent,null==n?void 0:n.currency]),(0,C.useEffect)(()=>{var e;if(!x)return;let t=null==(e=null==j?void 0:j.flatMap)?void 0:e.call(j,e=>{var t;return(null==(t=e.paymentConfiguration)?void 0:t.paymentMethods)||[]});if(ev(t)){z("all payment methods are empty");return}tw(t,e=>(0,P.hX)(e.type))&&!P.MB&&z("all payment methods are only apple pay. but current platform is not supported.")},[j,x,z]),O?(0,D.tZ)(tz,{text:(0,D.tZ)(t5,{}),onButtonClick:$}):(0,D.tZ)(T.m,{loading:k,children:(0,D.tZ)(tX,{orderId:o,storeCode:t,countryCode:r,amount:n,forterToken:s,cardConfig:a,paymentServiceProviders:j,onComplete:Z,onCompleted:F,onPaymentMethodSelected:h,onError:U,onSubmit:L,onRetry:$})})},t8=({storeCode:e,amount:t,forterToken:r,config:n,disabled:o,paypalButtonStyle:s,onSubmit:a,onComplete:l,onError:u})=>{var c,d;let h=(0,C.useRef)(""),p=(0,C.useRef)(),{env:f,confirmPayment:g}=(0,C.useContext)(P.gh),y=(0,P.n5)(f)?"production":"sandbox",m=null==(c=null==n?void 0:n.merchantConfiguration)?void 0:c.clientId,v=(0,A.Kd)(e),b=null==t?void 0:t.currency,w=(0,P.Jx)((null==(d=null==n?void 0:n.id)?void 0:d.toString())||""),_=`paypal-${y}-${m}-${v}-${b}`,E=(0,P.bn)(async()=>{var e;let t=await (null==a?void 0:a({pspType:P.aq.PAYPAL,paymentType:"fast",pspId:n.id}));if(!t)return null;let{orderId:o,sessionData:s}=t;h.current=s,p.current=o;let l=await g({idempotencyId:(0,tC.Z)(),channel:"Web",paymentOrderId:o,pspType:P.aq.PAYPAL,paymentType:"fast",pspId:n.id,returnUrl:window.location.href,browserInfo:{colorDepth:null==screen?void 0:screen.colorDepth,javaEnabled:null==navigator?void 0:navigator.javaEnabled,screenHeight:null==(e=null==window?void 0:window.screen)?void 0:e.he
356ight,screenWidth:null==screen?void 0:screen.width,timeZoneOffset:new Date().getTimezoneOffset(),userAgent:null==navigator?void 0:navigator.userAgent},riskMetadata:{checkoutTime:w(),forterTokenCookie:(0,tI.Z)(r)?r():r},sessionData:s});return null==l?void 0:l.data}),S=(0,P.bn)(async(e,t)=>await (null==l?void 0:l({pspId:n.id,pspType:P.aq.PAYPAL,paymentType:"wallet",sessionData:h.current},t))),O=(0,P.bn)(e=>{e.meta.pspType=n.type,e.meta.pspId=n.id,e.meta.bizId=p.current,null==u||u(e)}),k=(0,P.bn)(()=>{O(P.Pl.initError(`Paypal: script load failed. merchantConfiguration is ${(0,P.u4)(null==n?void 0:n.merchantConfiguration)}`,{silent:!0}))});return(0,D.tZ)(tN.Vv,{options:{clientId:m,environment:y,components:["buttons","messages","funding-eligibility"],intent:"capture",vault:!1,currency:b,locale:(0,A.Kd)(e),commit:!1,dataNamespace:_},children:(0,D.tZ)(A.Yg,{onError:k,height:null==s?void 0:s.height,children:(0,D.tZ)(A.Uq,{fundingSource:"paypal",disabled:o,paypalButtonStyle:s,onSubmit:E,onComplete:S,onError:O})})})},t9=(0,L.iv)({height:32}),t7=({storeCode:e,countryCode:t,amount:r,memberLevel:n,forterToken:o,disabled:s,paypalButtonStyle:a,onSubmit:l,onCompleted:u,onError:c})=>{let d=(0,P.iQ)(),h=(0,C.useRef)(null),{mutate:p}=(0,P.Uw)({onError(t){var r,n,o,s;let a="AbortError"===t.name?`QuickPaypal cancel complete polling was cancelled. reason: ${t.message}`:`QuickPaypal cancel complete error: ${t.message}`;d({pspType:P.aq.PAYPAL,bizId:null!=(s=null==(o=null==(n=null==(r=h.current)?void 0:r.orderId)?void 0:n.toString)?void 0:o.call(n))?s:`quick-paypal-${e}`,errorType:"API",responseBody:a})}}),{data:f,mutate:g,isPending:y,error:m}=(0,P.Gz)({storeCode:e,countryCode:t,currency:r.currency,amount:r.cent,memberLevel:n,onError(t){d({pspType:P.aq.PAYPAL,bizId:`quick-paypal-${e}`,errorType:"API",responseBody:t.message})}}),v=tP(null==f?void 0:f.data.paymentServiceProviders,e=>{var t;return e.type===P.aq.PAYPAL&&tE(null==(t=e.paymentConfiguration)?void 0:t.paymentMethods,{type:P.WO.FAST})}),b=(0,P.bn)(async e=>{let t=await (null==l?void 0:l(e));return h.current=t,t}),w=(0,P.bn)(async(e,t)=>{var r,n,o;t?null==u||u({...e,orderId:null==(r=h.current)?void 0:r.orderId}):h.current&&p({...e,orderId:null==(n=h.current)?void 0:n.orderId,external:{sessionData:null==(o=h.current)?void 0:o.sessionData}})}),_=(0,P.bn)(t=>{var r,n;d({pspType:t.meta.pspType,pspId:t.meta.pspId,bizId:null!=(n=null==(r=t.meta.bizId)?void 0:r.toString())?n:`quick-paypal-${e}`,errorType:t.type,responseBody:t.message}),null==c||c(t)});return(0,C.useEffect)(()=>{g()},[e,t,r.currency,r.cent,n]),m?(0,D.tZ)("div",{}):(0,D.tZ)(T.m,{loading:y,delay:200,children:v?(0,D.tZ)(tq,{id:v.id,name:v.type,onRenderError:_,children:(0,D.tZ)(t8,{storeCode:e,amount:r,forterToken:o,config:v,disabled:s,paypalButtonStyle:a,onSubmit:b,onComplete:w,onError:_})}):y&&(0,D.tZ)("div",{css:t9})})},re="Your payment didn't quite go through. Please try again, or use another payment method.",rt="Please check if your card information was entered correctly.",rr="Transaction was declined by your bank. Please try another payment method or contact your card issuer.",rn="Oops! The payment didn’t go through. Please use another method or card.",ri="You should not see this error.",ro={PROVIDER_INTERNAL_ERROR:re,PROVIDER_INVALID_CREDENTIALS:re,PROVIDER_UNAVAILABLE:re,PROVIDER_TIMEOUT:re,PROVIDER_INVALID_RESOURCE:re,PROVIDER_RESPONSE_PARSE_ERROR:re,PROVIDER_INVALID_REQUEST:re,PROVIDER_INVALID_API_VERSION:re,ACQUIRE_CONTINGENCY:re,TERMINAL_ERROR:re,UNKNOWN_ERROR:re,INVALID_PARAMETERS:rt,MISSING_PARAMETERS:rt,INVALID_AMOUNT:re,INVALID_CARD_DATA:rt,INVALID_CARD_NUMBER:"Please check if your card information was entered correctly.",INVALID_SECURITY_CODE:"Please check if your security code (CVV) was entered correctly.",INVALID_PAYMENT_METHOD:re,UNAVAILABLE_PAYMENT_METHOD:re,DUPLICATED_TRANSACTION:re,REQUESTS_EXCEEDED:re,INVALID_TRANSACTION:re,INVALID_MERCHANT:re,INVALID_STATUS:re,INVALID_API_VERSION:re,DECLINED_BY_PROVIDER:rr,DECLINED_BY_BANK:rr,DECLINED_GENERAL:rr,GENERIC_DECLINE:rr,INSUFFICIENT_FUNDS:"Insufficient funds. Please use another card or payment method.",EXPIRED_CARD:"
356Card expired. Please use another card or payment method.",EXPIRED:rr,DO_NOT_HONOR:rr,ISSUER_VIOLATION:rr,RESTRICTED_BY_BANK:rr,EXPIRED_BY_PROVIDER:"Your payment session has timed out. Please retry or choose another payment option.",REPORTED_STOLEN:rr,REPORTED_LOST:rr,FRAUD_VALIDATION:rn,AUTHENTICATION_FAILED:rn,AUTHENTICATION_FAILED_THREE_D_SECURE:rn,CHALLENGE_REQUIRED:ri,PENDING_PROVIDER_CONFIRMATION:ri,PENDING_REVIEW:"We’re reviewing your transaction. Please hold on for a moment.",REJECTED_THREE_D_SECURE_REQUIRED:rn,FIRST_USE:rn,COUNTRY_NOT_SUPPORTED:rn,CURRENCY_NOT_SUPPORTED:rn,CURRENCY_NOT_ALLOWED:rn,SUCCEEDED:"Payment approved — thank you for shopping with us!",PAYMENT_CANCELLED:"Payment couldn’t be completed. You can try again or choose another method.",CANCELLED_BY_USER:"Payment was canceled.Feel free to complete it later.",UNKNOWN_STATUS:rn,TRANSACTION_NOT_FOUND:rn,TO_REVERSE:rn,PENDING:ri,USER_RESTRICTION:rn,DISABLED:rn,UNSUPPORTED_OPERATION:rn,OPERATION_NOT_SUPPORTED:rn,SYSTEM_ERROR_MESSAGE:rn,INVALID_PARAMETERS_TELEPHONE_NUMBER:"Oops! The phone number is invalid. Please update it in your shipping address and try again.",paypal:"PayPal (Accept all Major Credit and Debit cards).",paypalPaylater:"PayPal Pay Later",creditCard:"Credit Card",retry:"Retry",placeOrder:"PLACE ORDER",initializationFailed:"Payment Method Initialization Error",consultFailed:"Consult Failed",completeFailed:re,confirmFailed:re,cardPaymentFailed:rn,yunoPaymentFailed:rn,paymentMethodRenderFailed:rn},rs={"en-AU":()=>r.e(5162).then(r.bind(r,35162)),"en-CA":()=>r.e(5437).then(r.bind(r,5437)),"en-GB":()=>r.e(1137).then(r.bind(r,31137)),"en-SG":()=>r.e(5637).then(r.bind(r,65637)),"ja-JP":()=>r.e(9465).then(r.bind(r,79465)),"ko-KR":()=>r.e(7956).then(r.bind(r,97956)),"de-DE":()=>r.e(4329).then(r.bind(r,14329)),"de-CH":()=>r.e(4174).then(r.bind(r,54174)),"fr-FR":()=>r.e(5482).then(r.bind(r,37760)),"es-ES":()=>r.e(2789).then(r.bind(r,82789)),"it-IT":()=>r.e(4990).then(r.bind(r,84990)),"nl-NL":()=>r.e(2744).then(r.bind(r,22744)),"sv-SE":()=>r.e(2650).then(r.bind(r,62650))},ra=e=>{var t;let r=tj.ZP.createInstance();return r.use((t=(e,t)=>{let r=rs[e];return r?r():Promise.reject(Error(`Language "${e}" not found`))},{type:"backend",init:function(e,t,r){},read:function(e,r,n){if("function"==typeof t){if(t.length<3){try{var o=t(e,r);o&&"function"==typeof o.then?o.then(function(e){return n(null,e&&e.default||e)}).catch(n):n(null,o)}catch(e){n(e)}return}t(e,r,n);return}n(null,t&&t[e]&&t[e][r])}})).use(I.Db).init({lng:e,fallbackLng:"en-US",partialBundledLanguages:!0,resources:{"en-US":{translation:ro}},interpolation:{escapeValue:!1},react:{useSuspense:!1},showSupportNotice:!1}),r},rl=(0,j.Z)({key:P.Z3}),ru=({env:e,countryCode:t,storeCode:r,amount:n,memberLevel:o,forterToken:s,disabled:a,paypalButtonStyle:l,onSubmit:u,onCompleted:c,onError:d})=>{let h=(0,R.C)(r),p=(0,C.useMemo)(()=>ra(h),[h]),f=(0,P.bn)(async e=>null==u?void 0:u(e)),g=(0,P.bn)(e=>{null==c||c(e)}),y=(0,P.bn)(e=>{var t,r;(null==(t=e.meta)?void 0:t.silent)||((null==(r=e.meta)?void 0:r.i18nKey)&&(e.message=p.t(e.meta.i18nKey)),null==d||d(e)),console.error(e)});return(0,D.tZ)(N.C,{value:rl,children:(0,D.tZ)(tM,{children:(0,D.tZ)(P.uX,{env:e,children:(0,D.tZ)(I.a3,{i18n:p,children:(0,D.tZ)(t7,{storeCode:r,countryCode:t,amount:n,memberLevel:o,forterToken:s,disabled:a,paypalButtonStyle:l,onSubmit:f,onCompleted:g,onError:y})})},e)})})},rc=(0,j.Z)({key:P.Z3}),rd=({channel:e,env:t,countryCode:r,storeCode:n,amount:o,orderId:s,forterToken:a,sessionData:l,cardConfig:u,redirectResult:c,disabledPaymentMethods:d,transformProviders:h,onConsulted:p,onPaymentMethodSelected:f,onSubmit:g,onCompleted:y,onError:m})=>{let v=(0,R.C)(n),b=(0,C.useMemo)(()=>ra(v),[v]),w=(0,P.bn)(e=>{null==g||g(e)}),_=(0,P.bn)(e=>{null==y||y(e)}),E=(0,P.bn)(e=>{var t,r,n;(null==(t=e.meta)?void 0:t.silent)||((null==(r=e.meta)?void 0:r.i18nKey)?e.message=b.t(e.meta.i18nKey):(null==(n=e.meta)?void 0:n.apiMessage)&&(e.message=e.meta.apiMessage),null==m||m(e)),console.error(e)});return(0,D.tZ)(tD,{children:(0,D.tZ)(N.C,{value:rc,children:(0,D.tZ)(P.zt,{children:(0,D.tZ)(tM,{children:(0,D.tZ)(P.uX,{env:t,sessionData:l,children:(0,D.tZ)(I.a3,{i18n:b,children:(0,D.tZ)(t4,{channel:e,storeCode:n,countryCode:r,orderId:s,amount:o,forterToken:a,cardConfig:u,redirectResult:c,disabledPaymentMethods:d,transformProviders:h,onConsulted:p,onPaymentMethodSelected:f,onCompleted:_,onSubmit:w,onError:E},s)})},t)})})})})}},35299:function(e,t,r){"use strict";r.d(t,{j:function(){return h}});var n,o,s,a=r(95691),l=r(36960),u=r(11455),c=r(41797),d=r(64961),h=new(n=new WeakMap,o=new WeakMap,s=new WeakMap,class extends c.l{onSubscribe(){(0,a._)(this,o)||this.setEventListener((0,a._)(this,s))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,a._)(this,o))||void 0===e||e.call(this),(0,u._)(this,o,void 0))}setEventListener(e){var t;(0,u._)(this,s,e),null===(t=(0,a._)(this,o))||void 0===t||t.call(this),(0,u._)(this,o,e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){(0,a._)(this,n)!==e&&((0,u._)(this,n,e),this.onFocus())}onFocus(){let e=this.isFocused();
356this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"==typeof(0,a._)(this,n)?(0,a._)(this,n):(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)!=="hidden"}constructor(){super(),(0,l._)(this,n,{writable:!0,value:void 0}),(0,l._)(this,o,{writable:!0,value:void 0}),(0,l._)(this,s,{writable:!0,value:void 0}),(0,u._)(this,s,e=>{if(!d.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}})},83216:function(e,t,r){"use strict";r.d(t,{R:function(){return v},m:function(){return m}});var n,o,s,a,l,u=r(95691),c=r(36960),d=r(11455),h=r(38543),p=r(79026),f=r(2879),g=r(60846),y=r(23661),m=(n=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakSet,class extends g.F{setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){(0,u._)(this,o).includes(e)||((0,u._)(this,o).push(e),this.clearGcTimeout(),(0,u._)(this,s).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){(0,d._)(this,o,(0,u._)(this,o).filter(t=>t!==e)),this.scheduleGc(),(0,u._)(this,s).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){(0,u._)(this,o).length||("pending"===this.state.status?this.scheduleGc():(0,u._)(this,s).remove(this))}continue(){var e,t;return null!==(t=null===(e=(0,u._)(this,a))||void 0===e?void 0:e.continue())&&void 0!==t?t:this.execute(this.state.variables)}async execute(e){var t,r,o,c,p,f,g,m,v,w,_,E,S,O,k,x,R,A,T,P,C;let I=()=>{(0,h._)(this,l,b).call(this,{type:"continue"})},N={client:(0,u._)(this,n),meta:this.options.meta,mutationKey:this.options.mutationKey};(0,d._)(this,a,(0,y.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,N):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{(0,h._)(this,l,b).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{(0,h._)(this,l,b).call(this,{type:"pause"})},onContinue:I,retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>(0,u._)(this,s).canRun(this)}));let j="pending"===this.state.status,L=!(0,u._)(this,a).canStart();try{if(j)I();else{(0,h._)(this,l,b).call(this,{type:"pending",variables:e,isPaused:L}),await (null===(w=(_=(0,u._)(this,s).config).onMutate)||void 0===w?void 0:w.call(_,e,this,N));let t=await (null===(E=(S=this.options).onMutate)||void 0===E?void 0:E.call(S,e,N));t!==this.state.context&&(0,h._)(this,l,b).call(this,{type:"pending",context:t,variables:e,isPaused:L})}let t=await (0,u._)(this,a).start();return await (null===(r=(o=(0,u._)(this,s).config).onSuccess)||void 0===r?void 0:r.call(o,t,e,this.state.context,this,N)),await (null===(c=(p=this.options).onSuccess)||void 0===c?void 0:c.call(p,t,e,this.state.context,N)),await (null===(f=(g=(0,u._)(this,s).config).onSettled)||void 0===f?void 0:f.call(g,t,null,this.state.variables,this.state.context,this,N)),await (null===(m=(v=this.options).onSettled)||void 0===m?void 0:m.call(v,t,null,e,this.state.context,N)),(0,h._)(this,l,b).call(this,{type:"success",data:t}),t}catch(t){try{throw await (null===(O=(k=(0,u._)(this,s).config).onError)||void 0===O?void 0:O.call(k,t,e,this.state.context,this,N)),await (null===(x=(R=this.options).onError)||void 0===x?void 0:x.call(R,t,e,this.state.context,N)),await (null===(A=(T=(0,u._)(this,s).config).onSettled)||void 0===A?void 0:A.call(T,void 0,t,this.state.variables,this.state.context,this,N)),await (null===(P=(C=this.options).onSettled)||void 0===P?void 0:P.call(C,void 0,t,e,this.state.context,N)),t}finally{(0,h._)(this,l,b).call(this,{type:"error",error:t})}}finally{(0,u._)(this,s).runNext(this)}}constructor(e){super(),(0,p._)(this,l),(0,c._)(this,n,{writable:!0,value:void 0}),(0,c._)(this,o,{writable:!0,value:void 0}),(0,c._)(this,s,{writable:!0,value:void 0}),(0,c._)(this,a,{writable:!0,value:void 0}),(0,d._)(this,n,e.client),this.mutationId=e.mutationId,(0,d._)(this,s,e.mutationCache),(0,d._)(this,o,[]),this.state=e.state||v(),this.setOptions(e.options),this.scheduleGc()}});function v(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}function b(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
356case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),f.Vr.batch(()=>{(0,u._)(this,o).forEach(t=>{t.onMutationUpdate(e)}),(0,u._)(this,s).notify({mutation:this,type:"updated",action:e})})}},2879:function(e,t,r){"use strict";r.d(t,{Vr:function(){return o}});var n=r(53730).Hp,o=function(){let e=[],t=0,r=e=>{e()},o=e=>{e()},s=n,a=n=>{t?e.push(n):s(()=>{r(n)})},l=()=>{let t=e;e=[],t.length&&s(()=>{o(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||l()}return r},batchCalls:e=>function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];a(()=>{e(...r)})},schedule:a,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{o=e},setScheduler:e=>{s=e}}}()},97743:function(e,t,r){"use strict";r.d(t,{N:function(){return h}});var n,o,s,a=r(95691),l=r(36960),u=r(11455),c=r(41797),d=r(64961),h=new(n=new WeakMap,o=new WeakMap,s=new WeakMap,class extends c.l{onSubscribe(){(0,a._)(this,o)||this.setEventListener((0,a._)(this,s))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,a._)(this,o))||void 0===e||e.call(this),(0,u._)(this,o,void 0))}setEventListener(e){var t;(0,u._)(this,s,e),null===(t=(0,a._)(this,o))||void 0===t||t.call(this),(0,u._)(this,o,e(this.setOnline.bind(this)))}setOnline(e){(0,a._)(this,n)!==e&&((0,u._)(this,n,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return(0,a._)(this,n)}constructor(){super(),(0,l._)(this,n,{writable:!0,value:void 0}),(0,l._)(this,o,{writable:!0,value:void 0}),(0,l._)(this,s,{writable:!0,value:void 0}),(0,u._)(this,n,!0),(0,u._)(this,s,e=>{if(!d.sk&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}})},60846:function(e,t,r){"use strict";r.d(t,{F:function(){return c}});var n,o=r(95691),s=r(36960),a=r(11455),l=r(53730),u=r(64961),c=(n=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,u.PN)(this.gcTime)&&(0,a._)(this,n,l.mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!=e?e:u.sk?1/0:3e5)}clearGcTimeout(){(0,o._)(this,n)&&(l.mr.clearTimeout((0,o._)(this,n)),(0,a._)(this,n,void 0))}constructor(){(0,s._)(this,n,{writable:!0,value:void 0})}})},23661:function(e,t,r){"use strict";r.d(t,{p8:function(){return u},Kw:function(){return l},Mz:function(){return c}});var n=r(35299),o=r(97743),s=r(64961);function a(e){return Math.min(1e3*2**e,3e4)}function l(e){return(null!=e?e:"online")!=="online"||o.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}};function c(e){let t,r=!1,c=0,d=function(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}(),h=()=>"pending"!==d.status,p=()=>n.j.isFocused()&&("always"===e.networkMode||o.N.isOnline())&&e.canRun(),f=()=>l(e.networkMode)&&e.canRun(),g=e=>{h()||(null==t||t(),d.resolve(e))},y=e=>{h()||(null==t||t(),d.reject(e))},m=()=>new Promise(r=>{var n;t=e=>{(h()||p())&&r(e)},null===(n=e.onPause)||void 0===n||n.call(e)}).then(()=>{if(t=void 0,!h()){var r;null===(r=e.onContinue)||void 0===r||r.call(e)}}),v=()=>{let t;if(h())return;let n=0===c?e.initialPromise:void 0;try{t=null!=n?n:e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch(t=>{var n,o,l;if(h())return;let u=null!==(o=e.retry)&&void 0!==o?o:s.sk?0:3,d=null!==(l=e.retryDelay)&&void 0!==l?l:a,f="function"==typeof d?d(c,t):d,g=!0===u||"number"==typeof u&&c<u||"function"==typeof u&&u(c,t);if(r||!g){y(t);return}c++,null===(n=e.onFail)||void 0===n||n.call(e,c,t),(0,s._v)(f).then(()=>
356p()?void 0:m()).then(()=>{r?y(t):v()})})};return{promise:d,status:()=>d.status,cancel:t=>{if(!h()){var r;let n=new u(t);y(n),null===(r=e.onCancel)||void 0===r||r.call(e,n)}},continue:()=>(null==t||t(),d),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:f,start:()=>(f()?v():m().then(v),d)}}},41797:function(e,t,r){"use strict";r.d(t,{l:function(){return n}});var n=class{subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}}},53730:function(e,t,r){"use strict";r.d(t,{Hp:function(){return d},mr:function(){return c}});var n,o,s=r(95691),a=r(36960),l=r(11455),u={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},c=new(n=new WeakMap,o=new WeakMap,class{setTimeoutProvider(e){(0,l._)(this,n,e)}setTimeout(e,t){return(0,s._)(this,n).setTimeout(e,t)}clearTimeout(e){(0,s._)(this,n).clearTimeout(e)}setInterval(e,t){return(0,s._)(this,n).setInterval(e,t)}clearInterval(e){(0,s._)(this,n).clearInterval(e)}constructor(){(0,a._)(this,n,{writable:!0,value:void 0}),(0,a._)(this,o,{writable:!0,value:void 0}),(0,l._)(this,n,u),(0,l._)(this,o,!1)}});function d(e){setTimeout(e,0)}},64961:function(e,t,r){"use strict";r.d(t,{CN:function(){return x},Ht:function(){return k},KC:function(){return c},Kp:function(){return u},L3:function(){return A},Nc:function(){return d},PN:function(){return l},Rm:function(){return f},SE:function(){return a},VS:function(){return v},VX:function(){return O},X7:function(){return p},Ym:function(){return g},ZT:function(){return s},_v:function(){return E},_x:function(){return h},cG:function(){return R},oE:function(){return S},sk:function(){return o},to:function(){return y}});var n=r(53730),o="undefined"==typeof window||"Deno"in globalThis;function s(){}function a(e,t){return"function"==typeof e?e(t):e}function l(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t){return"function"==typeof e?e(t):e}function d(e,t){return"function"==typeof e?e(t):e}function h(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:s,queryKey:a,stale:l}=e;if(a){if(n){if(t.queryHash!==f(a,t.options))return!1}else if(!y(t.queryKey,a))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!o||o===t.state.fetchStatus)&&(!s||!!s(t))}function p(e,t){let{exact:r,status:n,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(r){if(g(t.options.mutationKey)!==g(s))return!1}else if(!y(t.options.mutationKey,s))return!1}return(!n||t.state.status===n)&&(!o||!!o(t))}function f(e,t){return((null==t?void 0:t.queryKeyHashFn)||g)(e)}function g(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function y(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>y(e[r],t[r]))}var m=Object.prototype.hasOwnProperty;function v(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!_(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(_(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){return new Promise(t=>{n.mr.setTimeout(t,e)})}function S(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=b(t)&&b(r);if(!n&&!(w(t)&&w(r)))return r;let o=(n?t:Object.keys(t)).length,s=n?r:Object.keys(r),a=s.length,l=n?Array(a):{},u=0;for(let c=0;c<a;c++){let a=n?c:s[c],d=t[a],h=r[a];if(d===h){l[a]=d,(n?c<o:m.call(t,a))&&u++;continue}if(null===d||null===h||"object"!=typeof d||"object"!=typeof h){l[a]=h;continue}let p=e(d,h);l[a]=p,p===d&&u++}return o===a&&u===o?t:l}(e,t):t}function O(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=[...e,t];return r&&n.length>r?n.slice(1):n}function k(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var x=Symbol();function R(e,t){return!e.queryFn&&(null==t?void 0:t.initialPromise)?()=>t.initialPromise:e.queryFn&&e.queryFn!==x?e.queryFn:()=>Promise.reject(Error("Missing queryFn: '".concat(e.queryHash,"'")))}function A(e,t){return"function"==typeof e?e(...t):!!e}},53813:function(e,t,r){"use strict";r.d(t,{NL:function(){return a},aH:function(){return l}});var n=r(2265),o=r(57437),s=n.createContext(void 0),a=e=>{let t=n.useContext(s);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},l=e=>{let{client:t,children:r}=e;return n.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,o.jsx)(s.Provider,{value:t,children:r})}},58062:function(e,t,r){"use strict";t.Z=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t){if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n)}return o}(e))&&(n&&(n+=" "),n+=t);return n}},32226:function(e,t,r){"use strict";r.d(t,{ZP:function(){return ea}});var n=r(40257);let o=e=>"string"==typeof e,s=()=>{let e,t;let r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},a=e=>null==e?"":""+e,l=(e,t,r)=>
356{e.forEach(e=>{t[e]&&(r[e]=t[e])})},u=/###/g,c=e=>e&&e.indexOf("###")>-1?e.replace(u,"."):e,d=e=>!e||o(e),h=(e,t,r)=>{let n=o(t)?t.split("."):t,s=0;for(;s<n.length-1;){if(d(e))return{};let t=c(n[s]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++s}return d(e)?{}:{obj:e,k:c(n[s])}},p=(e,t,r)=>{let{obj:n,k:o}=h(e,t,Object);if(void 0!==n||1===t.length){n[o]=r;return}let s=t[t.length-1],a=t.slice(0,t.length-1),l=h(e,a,Object);for(;void 0===l.obj&&a.length;)s=`${a[a.length-1]}.${s}`,l=h(e,a=a.slice(0,a.length-1),Object),l?.obj&&void 0!==l.obj[`${l.k}.${s}`]&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=r},f=(e,t,r,n)=>{let{obj:o,k:s}=h(e,t,Object);o[s]=o[s]||[],o[s].push(r)},g=(e,t)=>{let{obj:r,k:n}=h(e,t);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},y=(e,t,r)=>{let n=g(e,r);return void 0!==n?n:g(t,r)},m=(e,t,r)=>{for(let n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?o(e[n])||e[n]instanceof String||o(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):m(e[n],t[n],r):e[n]=t[n]);return e},v=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let w=e=>o(e)?e.replace(/[&<>"'\/]/g,e=>b[e]):e;class _{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}let E=[" ",",","?","!",";"],S=new _(20),O=(e,t,r)=>{t=t||"",r=r||"";let n=E.filter(e=>0>t.indexOf(e)&&0>r.indexOf(e));if(0===n.length)return!0;let o=S.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`),s=!o.test(e);if(!s){let t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(s=!0)}return s},k=(e,t,r=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let n=t.split(r),o=e;for(let e=0;e<n.length;){let t;if(!o||"object"!=typeof o)return;let s="";for(let a=e;a<n.length;++a)if(a!==e&&(s+=r),s+=n[a],void 0!==(t=o[s])){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},x=e=>e?.replace(/_/g,"-"),R={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class A{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||R,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(o(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new A(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new A(this.logger,e)}}var T=new A;class P{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let r=this.observers[e].get(t)||0;this.observers[e].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,r])=>{for(let n=0;n<r;n++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,n])=>{for(let o=0;o<n;o++)r.apply(r,[e,...t])})}}class C extends P{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,n={}){let s;let a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,l=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):o(r)&&a?s.push(...r.split(a)):s.push(r)));let u=g(this.data,s);return(!u&&!t&&!r&&e.indexOf(".")>-1&&(e=s[0],t=s[1],r=s.slice(2).join(".")),!u&&l&&o(r))?k(this.data?.[e]?.[t],r,a):u}addResource(e,t,r,n,o={silent:!1}){let s=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator,a=[e,t];r&&(a=a.concat(s?r.split(s):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),p(this.data,a,n),o.silent||this.emit
356("added",e,t,r,n)}addResources(e,t,r,n={silent:!1}){for(let n in r)(o(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,o,s={silent:!1,skipCopy:!1}){let a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let l=g(this.data,a)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?m(l,r,o):l={...l,...r},p(this.data,a,l),s.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var I={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{t=this.processors[e]?.process(t,r,n,o)??t}),t}};let N=Symbol("i18next/PATH_KEY");function j(e,t){let{[N]:r}=e(function(){let e;let t=[],r=Object.create(null);return r.get=(n,o)=>(e?.revoke?.(),o===N)?t:(t.push(o),(e=Proxy.revocable(n,r)).proxy),Proxy.revocable(Object.create(null),r).proxy}()),n=t?.keySeparator??".",o=t?.nsSeparator??":";if(r.length>1&&o){let e=t?.ns,s=Array.isArray(e)?e:null;if(s&&s.length>1&&s.slice(1).includes(r[0]))return`${r[0]}${o}${r.slice(1).join(n)}`}return r.join(n)}let L={},D=e=>!o(e)&&"boolean"!=typeof e&&"number"!=typeof e;class Z extends P{constructor(e,t={}){super(),l(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
356i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=T.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let r={...t};if(null==e)return!1;let n=this.resolve(e,r);if(n?.res===void 0)return!1;let o=D(n.res);return!1!==r.returnObjects||!o}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");let n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=t.ns||this.options.defaultNS||[],a=r&&e.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!O(e,r,n);if(a&&!l){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o(s)?[s]:s};let a=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(a[0])>-1)&&(s=a.shift()),e=a.join(n)}return{key:e,namespaces:o(s)?[s]:s}}translate(e,t,r){let n="object"==typeof t?{...t}:t;if("object"!=typeof n&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof n&&(n={...n}),n||(n={}),null==e)return"";"function"==typeof e&&(e=j(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(e=>"function"==typeof e?j(e,{...this.options,...n}):String(e));let s=void 0!==n.returnDetails?n.returnDetails:this.options.returnDetails,a=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,{key:l,namespaces:u}=this.extractFromKey(e[e.length-1],n),c=u[u.length-1],d=void 0!==n.nsSeparator?n.nsSeparator:this.options.nsSeparator;void 0===d&&(d=":");let h=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h?.toLowerCase()==="cimode")return p?s?{res:`${c}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${d}${l}`:s?{res:l,usedKey:l,exactUsedKey:l,usedLng:h,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:l;let f=this.resolve(e,n),g=f?.res,y=f?.usedKey||l,m=f?.exactUsedKey||l,v=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,w=void 0!==n.count&&!o(n.count),_=Z.hasDefaultValue(n),E=w?this.pluralResolver.getSuffix(h,n.count,n):"",S=n.ordinal&&w?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",O=w&&!n.ordinal&&0===n.count,k=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${S}`]||n.defaultValue,x=g;b&&!g&&_&&(x=k);let R=D(x),A=Object.prototype.toString.apply(x);if(b&&x&&R&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(A)&&!(o(v)&&Array.isArray(x))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,x,{...n,ns:u}):`key '${l} (${this.language})' returned an object instead of string.`;return s?(f.res=e,f.usedParams=this.getUsedParamsDetails(n),f):e}if(a){let e=Array.isArray(x),t=e?[]:{},r=e?m:y;for(let e in x)if(Object.prototype.hasOwnProperty.call(x,e)){let o=`${r}${a}${e}`;_&&!g?t[e]=this.translate(o,{...n,defaultValue:D(k)?k[e]:void 0,joinArrays:!1,ns:u}):t[e]=this.translate(o,{...n,joinArrays:!1,ns:u}),t[e]===o&&(t[e]=x[e])}g=t}}else if(b&&o(v)&&Array.isArray(g))(g=g.join(v))&&(g=this.extendTranslation(g,e,n,r));else{let t=!1,o=!1;!this.isValidLookup(g)&&_&&(t=!0,g=k),this.isValidLookup(g)||(o=!0,g=l);let s=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&o?void 0:g,u=_&&k!==g&&this.options.updateMissing;if(o||t||u){if(this.logger.log(u?"updateKey":"missingKey",h,c,l,u?k:g),a){let e=this.resolve(l,{...n,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let r=0;r<t.length;r++)e.push(t[r]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(n.lng||this.language):e.push(n.lng||this.language);let r=(e,t,r)=>{let o=_&&r!==g?r:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,c,t,o,u,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,c,t,o,u,n),this.emit
356("missingKey",e,c,t,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{r([e],l+t,n[`defaultValue${t}`]||k)})}):r(e,l,k))}g=this.extendTranslation(g,e,n,f,r),o&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${c}${d}${l}`),(o||t)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${d}${l}`:l,t?g:void 0,n))}return s?(f.res=g,f.usedParams=this.getUsedParamsDetails(n),f):g}extendTranslation(e,t,r,n,s){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){let a;r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let l=o(e)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(l){let t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let u=r.replace&&!o(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,r.lng||this.language||n.usedLng,r),l){let t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(r.nest=!1)}!r.lng&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,(...e)=>s?.[0]!==e[0]||r.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),r)),r.interpolation&&this.interpolator.reset()}let a=r.postProcess||this.options.postProcess,l=o(a)?[a]:a;return null!=e&&l?.length&&!1!==r.applyPostProcessor&&(e=I.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,n,s,a,l;return o(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>"function"==typeof e?j(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(r))return;let u=this.extractFromKey(e,t),c=u.key;n=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));let h=void 0!==t.count&&!o(t.count),p=h&&!t.ordinal&&0===t.count,f=void 0!==t.context&&(o(t.context)||"number"==typeof t.context)&&""!==t.context,g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(e=>{this.isValidLookup(r)||(l=e,!L[`${g[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(l)&&(L[`${g[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${g.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(n=>{let o;if(this.isValidLookup(r))return;a=n;let l=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(l,c,n,e,t);else{let e;h&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,o=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(t.ordinal&&0===e.indexOf(o)&&l.push(c+e.replace(o,this.options.pluralSeparator)),l.push(c+e),p&&l.push(c+r)),f){let n=`${c}${this.options.contextSeparator||"_"}${t.context}`;l.push(n),h&&(t.ordinal&&0===e.indexOf(o)&&l.push(n+e.replace(o,this.options.pluralSeparator)),l.push(n+e),p&&l.push(n+r))}}for(;o=l.pop();)this.isValidLookup(r)||(s=o,r=this.getResource(n,e,o,t))}))})}),{res:r,usedKey:n,exactUsedKey:s,usedLng:a,usedNS:l}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,r,n={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}
356getUsedParamsDetails(e={}){let t=e.replace&&!o(e.replace),r=t?e.replace:e;if(t&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!t)for(let e of(r={...r},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete r[e];return r}static hasDefaultValue(e){let t="defaultValue";for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&void 0!==e[r])return!0;return!1}}class F{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create("languageUtils")}getScriptPartFromCode(e){if(!(e=x(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=x(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(o(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let r=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let r=this.getScriptPartFromCode(e);if(this.isSupportedCode(r))return t=r;let n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>{if(e===n||!(0>e.indexOf("-")&&0>n.indexOf("-"))&&(e.indexOf("-")>0&&0>n.indexOf("-")&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),o(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){let r=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),n=[],s=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return o(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&s(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&s(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&s(this.getLanguagePartFromCode(e))):o(e)&&s(this.formatLanguageCode(e)),r.forEach(e=>{0>n.indexOf(e)&&s(this.formatLanguageCode(e))}),n}}let U={zero:0,one:1,two:2,few:3,many:4,other:5},$={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class z{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=T.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let r;let n=x("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:o});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];try{r=new Intl.PluralRules(n,{type:o})}catch(o){if("undefined"==typeof Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),$;if(!e.match(/-|_/))return $;let n=this.languageUtils.getLanguagePartFromCode(e);r=this.getRule(n,t)}return this.pluralRulesCache[s]=r,r}needsPlural(e,t={}){let r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,r={}){return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let r=this.getRule(e,t);return(r||(r=this.getRule("dev",t)),r)?r.resolvedOptions().pluralCategories.sort((e,t)=>
356U[e]-U[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,r={}){let n=this.getRule(e,r);return n?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}let q=(e,t,r,n=".",s=!0)=>{let a=y(e,t,r);return!a&&s&&o(r)&&void 0===(a=k(e,r,n))&&(a=k(t,r,n)),a},V=e=>e.replace(/\$/g,"$$$$");class B{constructor(e={}){this.logger=T.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:r,useRawValueToEscape:n,prefix:o,prefixEscaped:s,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:f,nestingSuffixEscaped:g,nestingOptionsSeparator:y,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:w,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?v(o):s||"{{",this.suffix=a?v(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?v(h):p||v("$t("),this.nestingSuffix=f?v(f):g||v(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,n){let s,l,u;let c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=e=>{if(0>e.indexOf(this.formatSeparator)){let o=q(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}let o=e.split(this.formatSeparator),s=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(q(t,c,s,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:s})};this.resetRegExp();let h=n?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>V(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?V(this.escape(e)):V(e)}].forEach(t=>{for(u=0;s=t.regex.exec(e);){let r=s[1].trim();if(void 0===(l=d(r))){if("function"==typeof h){let t=h(e,s,n);l=o(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))l="";else if(p){l=s[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),l=""}else o(l)||this.useRawValueToEscape||(l=a(l));let c=t.safeValue(l);if(e=e.replace(s[0],c),p?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=s[0].length):t.regex.lastIndex=0,++u>=this.maxReplaces)break}}),e}nest(e,t,r={}){let n,s,l;let u=(e,t)=>{let r=this.nestingOptionsSeparator;if(0>e.indexOf(r))return e;let n=e.split(RegExp(`${v(r)}[ ]*{`)),o=`{${n[1]}`;e=n[0];let s=(o=this.interpolate(o,l)).match(/'/g),a=o.match(/"/g);((s?.length??0)%2!=0||a)&&(a?.length??0)%2==0||(o=o.replace(/'/g,'"'));try{l=JSON.parse(o),t&&(l={...t,...l})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${r}${o}`}return l.defaultValue&&l.defaultValue.indexOf(this.prefix)>-1&&delete l.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let c=[];(l=(l={...r}).replace&&!o(l.replace)?l.replace:l).applyPostProcessor=!1,delete l.defaultValue;let d=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(-1!==d&&(c=n[1].slice(d).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),n[1]=n[1].slice(0,d)),(s=t(u.call(this,n[1].trim(),l),l))&&n[0]===e&&!o(s))return s;o(s)||(s=a(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),s=""),c.length&&(s=c.reduce((e,t)=>
356this.format(e,t,r.lng,{...r,interpolationkey:n[1].trim()}),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}let K=e=>{let t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){let n=e.split("(");t=n[0].toLowerCase().trim();let o=n[1].substring(0,n[1].length-1);"currency"===t&&0>o.indexOf(":")?r.currency||(r.currency=o.trim()):"relativetime"===t&&0>o.indexOf(":")?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){let[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),s=t.trim();r[s]||(r[s]=o),"false"===o&&(r[s]=!1),"true"===o&&(r[s]=!0),isNaN(o)||(r[s]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}},W=e=>{let t={};return(r,n,o)=>{let s=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(s={...s,[o.interpolationkey]:void 0});let a=n+JSON.stringify(s),l=t[a];return l||(l=e(x(n),o),t[a]=l),l(r)}},H=e=>(t,r,n)=>e(x(r),n)(t);class G{constructor(e={}){this.logger=T.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let r=t.cacheInBuiltFormats?W:H;this.formats={number:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:r((e,t)=>{let r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:r((e,t)=>{let r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:r((e,t)=>{let r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:r((e,t)=>{let r=new Intl.ListFormat(e,{...t});return e=>r.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=W(t)}format(e,t,r,n={}){let o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&0>o[0].indexOf(")")&&o.find(e=>e.indexOf(")")>-1)){let e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{let{formatName:o,formatOptions:s}=K(t);if(this.formats[o]){let t=e;try{let a=n?.formatParams?.[n.interpolationkey]||{},l=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,l,{...s,...n,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}let Y=(e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)};class J extends P{constructor(e,t,r,n={}){super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=T.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,n.backend,n)}queueLoad(e,t,r,n){let o={},s={},a={},l={};return e.forEach(e=>{let n=!0;t.forEach(t=>{let a=`${e}|${t}`;!r.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===s[a]&&(s[a]=!0):(this.state[a]=1,n=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,r){let n=e.split("|"),o=n[0],s=n[1];t&&this.emit("failedLoading",o,s,t),!t&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);let a={};this.queue.forEach(r=>{f(r.loaded,[o],s),Y(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});let t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r,n=0,o=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:n,wait:o,callback:s});return}this.readingCalls++;let a=(a,l)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(a&&l&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,s)},o);return}s(a,l)},l=this.backend[r].bind(this.backend);if(2===l.length){try{let r=l(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}return}return l(e,t,a)}prepareLoading(e,t,r={}
356,n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();o(e)&&(e=this.languageUtils.toResolveHierarchy(e)),o(t)&&(t=[t]);let s=this.queueLoad(e,t,r,n);if(!s.toLoad.length)return s.pending.length||n(),null;s.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e,t=""){let r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,s)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&s&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,s),this.loaded(e,r,s)})}saveMissing(e,t,r,n,o,s={},a=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=r&&""!==r){if(this.backend?.create){let l={...s,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;(o=5===u.length?u(e,t,r,n,l):u(e,t,r,n))&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,r,n,a,l)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}let Q=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),o(e[1])&&(t.defaultValue=e[1]),o(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),X=e=>(o(e.ns)&&(e.ns=[e.ns]),o(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),o(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),ee=()=>{},et=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})},er="__i18next_supportNoticeShown",en=()=>"undefined"!=typeof globalThis&&!!globalThis[er]||void 0!==n&&!!n.env&&!!n.env.I18NEXT_NO_SUPPORT_NOTICE||void 0!==n&&!!n.env,ei=()=>{"undefined"!=typeof globalThis&&(globalThis[er]=!0)},eo=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf("Locize")>0||e?.constructor?.name?.indexOf("Locize")>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId));class es extends P{constructor(e={},t){if(super(),this.options=X(e),this.services={},this.logger=T,this.modules={external:[]},et(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(o(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let r=Q();this.options={...r,...this.options,...X(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation}
356,void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),"function"!=typeof this.options.overloadTranslationOptionHandler&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),!1===this.options.showSupportNotice||eo(this)||en()||("undefined"!=typeof console&&void 0!==console.info&&console.info("\uD83C\uDF10 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com \uD83D\uDC99"),ei());let n=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?T.init(n(this.modules.logger),this.options):T.init(null,this.options),e=this.modules.formatter?this.modules.formatter:G;let t=new F(this.options);this.store=new C(this.options.resources,this.options);let o=this.services;o.logger=T,o.resourceStore=this.store,o.languageUtils=t,o.pluralResolver=new z(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(o.formatter=n(e),o.formatter.init&&o.formatter.init(o,this.options),this.options.interpolation.format=o.formatter.format.bind(o.formatter)),o.interpolator=new B(this.options),o.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},o.backendConnector=new J(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init&&o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new Z(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ee),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=s(),l=()=>{let e=(e,r)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(r),t(e,r)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,t=ee){let r=t,n=o(e)?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(n?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return r();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};n?t(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,r){let n=s();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=ee),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&I.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let r=s();
356this.emit("languageChanging",e);let n=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(o,s)=>{s?this.isLanguageChangingTo===e&&(n(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,r.resolve((...e)=>this.t(...e)),t&&t(o,(...e)=>this.t(...e))},l=t=>{e||t||!this.services.languageDetector||(t=[]);let r=o(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(o(t)?[t]:t);s&&(this.language||n(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector?.cacheUserLanguage?.(s)),this.loadResources(s,e=>{a(e,s)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e):l(this.services.languageDetector.detect()),r}getFixedT(e,t,r){let n=(e,t,...o)=>{let s,a;(s="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(o)):{...t}).lng=s.lng||n.lng,s.lngs=s.lngs||n.lngs,s.ns=s.ns||n.ns,""!==s.keyPrefix&&(s.keyPrefix=s.keyPrefix||r||n.keyPrefix);let l={...this.options,...s};"function"==typeof s.keyPrefix&&(s.keyPrefix=j(s.keyPrefix,l));let u=this.options.keySeparator||".";return s.keyPrefix&&Array.isArray(e)?a=e.map(e=>("function"==typeof e&&(e=j(e,l)),`${s.keyPrefix}${u}${e}`)):("function"==typeof e&&(e=j(e,l)),a=s.keyPrefix?`${s.keyPrefix}${u}${e}`:e),this.t(a,s)};return o(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=r,n}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
356if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;let s=(e,t)=>{let r=this.services.backendConnector.state[`${e}|${t}`];return -1===r||0===r||2===r};if(t.precheck){let e=t.precheck(this,s);if(void 0!==e)return e}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,e)&&(!n||s(o,e)))}loadNamespaces(e,t){let r=s();return this.options.ns?(o(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){let r=s();o(e)&&(e=[e]);let n=this.options.preload||[],a=e.filter(e=>0>n.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=n.concat(a),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new F(Q());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){let r=new es(e,t);return r.createInstance=es.createInstance,r}cloneInstance(e={},t=ee){let r=e.forkResourceStore;r&&delete e.forkResourceStore;let n={...this.options,...e,isClone:!0},o=new es(n);if((void 0!==e.debug||void 0!==e.prefix)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){let e=Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((r,n)=>(r[n]={...e[t][n]},r),e[t]),e),{});o.store=new C(e,n),o.services.resourceStore=o.store}if(e.interpolation){let t={...Q().interpolation,...this.options.interpolation,...e.interpolation},r={...n,interpolation:t};o.services.interpolator=new B(r)}return o.translator=new Z(o.services,n),o.translator.on("*",(e,...t)=>{o.emit(e,...t)}),o.init(n,t),o.translator.options=n,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let ea=es.createInstance();ea.createInstance,ea.dir,ea.init,ea.loadResources,ea.reloadResources,ea.use,ea.changeLanguage,ea.getFixedT,ea.t,ea.exists,ea.setDefaultNamespace,ea.hasLoadedNamespace,ea.loadNamespaces,ea.loadLanguages},38476:function(e,t,r){"use strict";r.d(t,{cn:function(){return o}});let n=0;function o(e,t){let r=`atom${++n}`,o={toString(){return this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?o.read=e:(o.init=e,o.read=s,o.write=a),t&&(o.write=t),o}function s(e){return e(this)}function a(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}},46219:function(e,t,r){"use strict";let n;r.d(t,{a3:function(){return D},Db:function(){return S},$G:function(){return L}});var o=r(2265);r(32226),r(69917),Object.create(null);let s=(e,t,r,n)=>{let o=[r,{code:t,...n||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(o,"warn","react-i18next::",!0);p(o[0])&&(o[0]=`react-i18next:: ${o[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...o):console?.warn&&console.warn(...o)},a={},l=(e,t,r,n)=>{p(r)&&a[r]||(p(r)&&(a[r]=new Date),s(e,t,r,n))},u=(e,t)=>
356()=>{if(e.isInitialized)t();else{let r=()=>{setTimeout(()=>{e.off("initialized",r)},0),t()};e.on("initialized",r)}},c=(e,t,r)=>{e.loadNamespaces(t,u(e,r))},d=(e,t,r,n)=>{if(p(r)&&(r=[r]),e.options.preload&&e.options.preload.indexOf(t)>-1)return c(e,r,n);r.forEach(t=>{0>e.options.ns.indexOf(t)&&e.options.ns.push(t)}),e.loadLanguages(t,u(e,n))},h=(e,t,r={})=>t.languages&&t.languages.length?t.hasLoadedNamespace(e,{lng:r.lng,precheck:(t,n)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,e))return!1}}):(l(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0),p=e=>"string"==typeof e,f=e=>"object"==typeof e&&null!==e,g=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,y={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xa9","&#169;":"\xa9","&reg;":"\xae","&#174;":"\xae","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},m=e=>y[e],v={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(g,m),transDefaultProps:void 0},b=(e={})=>{v={...v,...e}},w=()=>v,_=e=>{n=e},E=()=>n,S={type:"3rdParty",init(e){b(e.options.react),_(e)}},O=(0,o.createContext)();class k{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}class x extends Error{constructor(e,t,r){super(e),this.name="TranslationParserError",this.position=t,this.translationString=r,Error.captureStackTrace&&Error.captureStackTrace(this,x)}}let R={"&nbsp;":"\xa0","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&copy;":"\xa9","&reg;":"\xae","&trade;":"™","&hellip;":"…","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&bull;":"•","&prime;":"′","&Prime;":"″","&lsaquo;":"‹","&rsaquo;":"›","&sect;":"\xa7","&para;":"\xb6","&middot;":"\xb7","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&euro;":"€","&pound;":"\xa3","&yen;":"\xa5","&cent;":"\xa2","&curren;":"\xa4","&times;":"\xd7","&divide;":"\xf7","&minus;":"−","&plusmn;":"\xb1","&ne;":"≠","&le;":"≤","&ge;":"≥","&asymp;":"≈","&equiv;":"≡","&infin;":"∞","&int;":"∫","&sum;":"∑","&prod;":"∏","&radic;":"√","&part;":"∂","&permil;":"‰","&deg;":"\xb0","&micro;":"\xb5","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;
356":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&Agrave;":"\xc0","&Aacute;":"\xc1","&Acirc;":"\xc2","&Atilde;":"\xc3","&Auml;":"\xc4","&Aring;":"\xc5","&AElig;":"\xc6","&Ccedil;":"\xc7","&Egrave;":"\xc8","&Eacute;":"\xc9","&Ecirc;":"\xca","&Euml;":"\xcb","&Igrave;":"\xcc","&Iacute;":"\xcd","&Icirc;":"\xce","&Iuml;":"\xcf","&ETH;":"\xd0","&Ntilde;":"\xd1","&Ograve;":"\xd2","&Oacute;":"\xd3","&Ocirc;":"\xd4","&Otilde;":"\xd5","&Ouml;":"\xd6","&Oslash;":"\xd8","&Ugrave;":"\xd9","&Uacute;":"\xda","&Ucirc;":"\xdb","&Uuml;":"\xdc","&Yacute;":"\xdd","&THORN;":"\xde","&szlig;":"\xdf","&agrave;":"\xe0","&aacute;":"\xe1","&acirc;":"\xe2","&atilde;":"\xe3","&auml;":"\xe4","&aring;":"\xe5","&aelig;":"\xe6","&ccedil;":"\xe7","&egrave;":"\xe8","&eacute;":"\xe9","&ecirc;":"\xea","&euml;":"\xeb","&igrave;":"\xec","&iacute;":"\xed","&icirc;":"\xee","&iuml;":"\xef","&eth;":"\xf0","&ntilde;":"\xf1","&ograve;":"\xf2","&oacute;":"\xf3","&ocirc;":"\xf4","&otilde;":"\xf5","&ouml;":"\xf6","&oslash;":"\xf8","&ugrave;":"\xf9","&uacute;":"\xfa","&ucirc;":"\xfb","&uuml;":"\xfc","&yacute;":"\xfd","&thorn;":"\xfe","&yuml;":"\xff","&iexcl;":"\xa1","&iquest;":"\xbf","&fnof;":"ƒ","&circ;":"ˆ","&tilde;":"˜","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&ordf;":"\xaa","&ordm;":"\xba","&macr;":"\xaf","&acute;":"\xb4","&cedil;":"\xb8","&sup1;":"\xb9","&sup2;":"\xb2","&sup3;":"\xb3","&frac14;":"\xbc","&frac12;":"\xbd","&frac34;":"\xbe","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦","&loz;":"◊","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&alefsym;":"ℵ"},A=RegExp(Object.keys(R).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),"g"),T=e=>e.replace(A,e=>R[e]).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&#x([0-9a-fA-F]+);/g,(e,t)=>String.fromCharCode(parseInt(t,16))),P=e=>{let t=[],r=0,n="",o=()=>{n&&(t.push({type:"Text",value:n,position:r-n.length}),n="")};for(;r<e.length;){let s=e[r];if("<"===s){let a=e.slice(r).match(/^<(\d+)>/);if(a)o(),t.push({type:"TagOpen",value:a[0],position:r,tagNumber:parseInt(a[1],10)}),r+=a[0].length;else{let a=e.slice(r).match(/^<\/(\d+)>/);a?(o(),t.push({type:"TagClose",value:a[0],position:r,tagNumber:parseInt(a[1],10)}),r+=a[0].length):(n+=s,r+=1)}}else n+=s,r+=1}return o(),t},C=(e,t,r)=>{let{type:n,props:s={}}=e;if(s.children&&Array.isArray(s.children)&&r){let{children:e,...r}=s;return o.createElement(n,r,...t)}return 0===t.length?o.createElement(n,s):1===t.length?o.createElement(n,s,t[0]):o.createElement(n,s,...t)};var I=r(63908);let N={t:(e,t)=>{if(p(t))return t;if(f(t)&&p(t.defaultValue))return t.defaultValue;if("function"==typeof e)return"";if(Array.isArray(e)){let t=e[e.length-1];return"function"==typeof t?"":t}return e},ready:!1},j=()=>()=>{},L=(e,t={})=>{let{i18n:r}=t,{i18n:n,defaultNS:s}=(0,o.useContext)(O)||{},a=r||n||E();a&&!a.reportNamespaces&&(a.reportNamespaces=new k),a||l(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");let u=(0,o.useMemo)(()=>({...w(),...a?.options?.react,...t}),[a,t]),{useSuspense:f,keyPrefix:g}=u,y=e||s||a?.options?.defaultNS,m=p(y)?[y]:y||["translation"],v=(0,o.useMemo)(()=>m,m);a?.reportNamespaces?.addUsedNamespaces?.(v);let b=(0,o.useRef)(0),_=(0,o.useCallback)(e=>{if(!a)return j;let{bindI18n:t,bindI18nStore:r}=u,n=()=>{b.current+=1,e()};return t&&a.on(t,n),r&&a.store.on(r,n),()=>{t&&t.split(" ").forEach(e=>a.off(e,n)),r&&r.split(" ").forEach(e=>a.store.off(e,n))}},[a,u]),S=(0,o.useRef)(),x=(0,o.useCallback)(()=>{if(!a)return N;let e=!!(a.isInitialized||a.initializedStoreOnce)&&v.every(e=>h(e,a,u)),r=t.lng||a.language,n=b.current,o=S.current;if(o&&o.ready===e&&o.lng===r&&o.keyPrefix===g&&o.revision===n)return o;let s={t:a.getFixedT(r,"fallback"===u.nsMode?v:v[0],g),ready:e,lng:r,keyPrefix:g,revision:n};return S.current=s,s},[a,v,g,u,t.lng]),[R,A]=(0,o.useState)(0),{t:T,ready:P}=(0,I.useSyncExternalStore)(_,x,x);(0,o.useEffect)(()=>
356{if(a&&!P&&!f){let e=()=>A(e=>e+1);t.lng?d(a,t.lng,v,e):c(a,v,e)}},[a,t.lng,v,P,f,R]);let C=a||{},L=(0,o.useRef)(null),D=(0,o.useRef)(),Z=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let r=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(r,"__original"))try{Object.defineProperty(r,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch(e){}return r},F=(0,o.useMemo)(()=>{let e=C?.language,t=C;C&&(L.current&&L.current.__original===C?D.current!==e?(t=Z(C),L.current=t,D.current=e):t=L.current:(t=Z(C),L.current=t,D.current=e));let r=P||f?T:(...e)=>(l(a,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),T(...e)),n=[r,t,P];return n.t=r,n.i18n=t,n.ready=P,n},[T,C,P,C.resolvedLanguage,C.language,C.languages]);if(a&&f&&!P)throw new Promise(e=>{let r=()=>e();t.lng?d(a,t.lng,v,r):c(a,v,r)});return F};function D({i18n:e,defaultNS:t,children:r}){let n=(0,o.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,o.createElement)(O.Provider,{value:n},r)}},82663:function(e,t,r){"use strict";let n;r.d(t,{Z:function(){return l}});var o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let s=new Uint8Array(16),a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));var l=function(e,t,r){return!o.randomUUID||t||e?function(e,t,r){let o=(e=e||{}).random??e.rng?.()??function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(s)}();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){if((r=r||0)<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=o[e];return t}return function(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}(o)}(e,t,r):o.randomUUID()}},6021:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(84338),o=function(e,t){for(var r=e.length;r--;)if((0,n.Z)(e[r][0],t))return r;return -1},s=Array.prototype.splice;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=o(t,e);return!(r<0)&&(r==t.length-1?t.pop():s.call(t,r,1),--this.size,!0)},a.prototype.get=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},a.prototype.has=function(e){return o(this.__data__,e)>-1},a.prototype.set=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var l=a},23196:function(e,t,r){"use strict";var n=r(19893),o=r(65933),s=(0,n.Z)(o.Z,"Map");t.Z=s},98721:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=(0,r(19893).Z)(Object,"create"),o=Object.prototype.hasOwnProperty,s=Object.prototype.hasOwnProperty;function a(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}a.prototype.clear=function(){this.__data__=n?n(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return n?void 0!==t[e]:s.call(t,e)},a.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this};var l=r(6021),u=r(23196),c=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},d=function(e,t){var r=e.__data__;return c(t)?r["string"==typeof t?"string":"hash"]:r.map};function h(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}h.prototype.clear=function(){this.size=0,this.__data__={hash:new a,map:new(u.Z||l.Z),str
356ing:new a}},h.prototype.delete=function(e){var t=d(this,e).delete(e);return this.size-=t?1:0,t},h.prototype.get=function(e){return d(this,e).get(e)},h.prototype.has=function(e){return d(this,e).has(e)},h.prototype.set=function(e,t){var r=d(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};var p=h},8883:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(6021),o=r(23196),s=r(98721);function a(e){var t=this.__data__=new n.Z(e);this.size=t.size}a.prototype.clear=function(){this.__data__=new n.Z,this.size=0},a.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},a.prototype.get=function(e){return this.__data__.get(e)},a.prototype.has=function(e){return this.__data__.has(e)},a.prototype.set=function(e,t){var r=this.__data__;if(r instanceof n.Z){var a=r.__data__;if(!o.Z||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new s.Z(a)}return r.set(e,t),this.size=r.size,this};var l=a},40856:function(e,t,r){"use strict";var n=r(65933).Z.Symbol;t.Z=n},6408:function(e,t,r){"use strict";var n=r(65933).Z.Uint8Array;t.Z=n},70836:function(e,t,r){"use strict";r.d(t,{Z:function(){return d}});var n=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},o=r(70351),s=r(28070),a=r(23605),l=r(65482),u=r(41580),c=Object.prototype.hasOwnProperty,d=function(e,t){var r=(0,s.Z)(e),d=!r&&(0,o.Z)(e),h=!r&&!d&&(0,a.Z)(e),p=!r&&!d&&!h&&(0,u.Z)(e),f=r||d||h||p,g=f?n(e.length,String):[],y=g.length;for(var m in e)(t||c.call(e,m))&&!(f&&("length"==m||h&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,l.Z)(m,y)))&&g.push(m);return g}},80659:function(e,t){"use strict";t.Z=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},32613:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var n,o,s=r(19045),a=r(47799),l=r(82025),u=(n=function(e,t){return e&&(0,s.Z)(e,t,a.Z)},function(e,t){if(null==e)return e;if(!(0,l.Z)(e))return n(e,t);for(var r=e.length,s=-1,a=Object(e);(o?s--:++s<r)&&!1!==t(a[s],s,a););return e})},41764:function(e,t){"use strict";t.Z=function(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return -1}},19045:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=function(e,t,r){for(var n=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++n];if(!1===t(o[l],l,o))break}return e}},59576:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(40856),o=Object.prototype,s=o.hasOwnProperty,a=o.toString,l=n.Z?n.Z.toStringTag:void 0,u=function(e){var t=s.call(e,l),r=e[l];try{e[l]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[l]=r:delete e[l]),o},c=Object.prototype.toString,d=n.Z?n.Z.toStringTag:void 0,h=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":d&&d in Object(e)?u(e):c.call(e)}},35400:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(17234),o=(0,r(64400).Z)(Object.keys,Object),s=Object.prototype.hasOwnProperty,a=function(e){if(!(0,n.Z)(e))return o(e);var t=[];for(var r in Object(e))s.call(e,r)&&"constructor"!=r&&t.push(r);return t}},62838:function(e,t){"use strict";t.Z=function(e){return function(t){return null==t?void 0:t[e]}}},20261:function(e,t){"use strict";var r="object"==typeof global&&global&&global.Object===Object&&global;t.Z=r},19893:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n,o=r(98402),s=r(65933).Z["__core-js_shared__"],a=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",l=r(7632),u=r(14158),c=/^\[object .+?Constructor\]$/,d=Object.prototype,h=Function.prototype.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=function(e,t){var r,n=null==e?void 0:e[t];return(r=n,(0,l.Z)(r)&&(!a||!(a in r))&&((0,o.Z)(r)?f:c).test((0,u.Z)(r)))?n:void 0}},20919:function(e,t,r){"use strict";r.d(t,{Z:function(){return O}});var n=r(19893),o=r(65933),s=(0,n.Z)(o.Z,"DataView"),a=r(23196),l=(0,n.Z)(o.Z,"Promise"),u=(0,n.Z)(o.Z,"Set"),c=(0,n.Z)(o.Z,"WeakMap"),d=r(59576),h=r(14158),p="[object Map]",f="[object Promise]",g="[object Set]",y="[object WeakMap]",m="[object DataView]",v=(0,h.Z)(s),b=(0,h.Z)(a.Z),w=(0,h.Z)(l),_=(0,h.Z)(u),E=(0,h.Z)(c),S=d.Z;(s&&S(new s(new ArrayBuffer(1)))!=m||a.Z&&S(new a.Z)!=p||l&&S(l.resolve())!=f||u&&S(new u)!=g||c&&S(new c)!=y)&&(S=function(e){var t=(0,d.Z)(e),r="[object Object]"==t?e.constructor:void 0,n=r?(0,h.Z)(r):"";if(n)switch(n){case v:return m;case b:return p;case w:return f;case _:return g;case E:return y}return t});var O=S},65482:function(e,t){"use strict";var r=/^(?:0|[1-9]\d*)$/;t.Z=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},2864:function(e,t,r){"use strict";var n=r(84338),o=r(82025),s=r(65482),a=r(7632);t.Z=function(e,t,r){if(!(0,a.Z)(r))return!1;var l=typeof t;return("number"==l?!!((0,o.Z)(r)&&(0,s.Z)(t,r.length)):"string"==l&&t in r)&&(0,n.Z)(r[t],e)}},17234:function(e,t){"use strict";var r=Object.prototype;t.Z=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},64400:function(e,t){"use strict";t.Z=function(e,t){return function(r){return e(t(r))}}},65933:function(e,t,r){"use strict";var n=r(20261),o="object"==typeof self&&self&&self.Object===Object&&self,s=n.Z||o||Function("return this")();t.Z=s},14158:function(e,t){"use strict";var r=Function.prototype.toString;t.Z=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},84338:function(e,t){"use strict";t.Z=function(e,t){return e===t||e!=e&&t!=t}},20937:function(e,t){"use strict";t.Z=function(e){return e}},54492:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(41764),o=function(e){return e!=e},s=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return -1},a=r(82025),l=r(2564),u=r(6937),c=r(80659),d=r(47799),h=function(e){var t;return null==e?[]:(t=(0,d.Z)(e),(0,c.Z)(t,function(t){return e[t]}))},p=Math.max,f=function(e,t,r,c){e=(0,a.Z)(e)?e:h(e),r=r&&!c?(0,u.Z)(r):0;var d,f,g=e.length;return r<0&&(r=p(g+r,0)),(0,l.Z)(e)?r<=g&&e.indexOf(t,r)>-1:!!g&&(d=e,f=r,(t==t?s(d,t,f):(0,n.Z)(d,o,f))>-1)}},70351:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var n=r(59576),o=r(82370),s=function(e){return(0,o.Z)(e)&&"[object Arguments]"==(0,n.Z)(e)},a=Object.prototype,l=a.hasOwnProperty,u=a.propertyIsEnumerable,c=s(function(){return arguments}())?s:function(e){return(0,o.Z)(e)&&l.call(e,"callee")&&!u.call(e,"callee")}},28070:function(e,t){"use strict";var r=Array.isArray;t.Z=r},82025:function(e,t,r){"use strict";var n=r(98402),o=r(53934);t.Z=function(e){return null!=e&&(0,o.Z)(e.length)&&!(0,n.Z)(e)}},23605:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(65933),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===o?n.Z.Buffer:void 0,l=(a?a.isBuffer:void 0)||function(){return!1}},98402:function(e,t,r){"use strict";var n=r(59576),o=r(7632);t.Z=function(e){if(!(0,o.Z)(e))return!1;var t=(0,n.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},53934:function(e,t){"use strict";t.Z=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7632:function(e,t){"use strict";t.Z=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},82370:function(e,t){"use strict";t.Z=function(e){return null!=e&&"object"==typeof e}},2564:function(e,t,r){"use strict";var n=r(59576),o=r(28070),s=r(82370);t.Z=function(e){return"string"==typeof e||!(0,o.Z)(e)&&(0,s.Z)(e)&&"[object String]"==(0,n.Z)(e)}},82245:function(e,t,r){"use strict";var n=r(59576),o=r(82370);t.Z=function(e){return"symbol"==typeof e||(0,o.Z)(e)&&"[object Symbol]"==(0,n.Z)(e)}},41580:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(59576),o=r(53934),s=r(82370),a={};
356a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var l=r(20261),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,c=u&&"object"==typeof module&&module&&!module.nodeType&&module,d=c&&c.exports===u&&l.Z.process,h=function(){try{var e=c&&c.require&&c.require("util").types;if(e)return e;return d&&d.binding&&d.binding("util")}catch(e){}}(),p=h&&h.isTypedArray,f=p?function(e){return p(e)}:function(e){return(0,s.Z)(e)&&(0,o.Z)(e.length)&&!!a[(0,n.Z)(e)]}},47799:function(e,t,r){"use strict";var n=r(70836),o=r(35400),s=r(82025);t.Z=function(e){return(0,s.Z)(e)?(0,n.Z)(e):(0,o.Z)(e)}},6937:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(38502),o=1/0,s=function(e){var t,r=(t=e)?(t=(0,n.Z)(t))===o||t===-o?(t<0?-1:1)*17976931348623157e292:t==t?t:0:0===t?t:0,s=r%1;return r==r?s?r-s:r:0}},38502:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=/\s/,o=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t},s=/^\s+/,a=r(7632),l=r(82245),u=0/0,c=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,p=parseInt,f=function(e){if("number"==typeof e)return e;if((0,l.Z)(e))return u;if((0,a.Z)(e)){var t,r="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.Z)(r)?r+"":r}if("string"!=typeof e)return 0===e?e:+e;e=(t=e)?t.slice(0,o(t)+1).replace(s,""):t;var n=d.test(e);return n||h.test(e)?p(e.slice(2),n?2:8):c.test(e)?u:+e}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.