@orderingstack/front-components-product-configurator 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DefaultDeviceCode-CnKwsh6j.mjs +201 -0
- package/dist/DefaultDeviceCode-eT4w9geC.js +5 -0
- package/dist/Logo-ByIuMLVG.js +61 -0
- package/dist/Logo-C535H7gA.mjs +90 -0
- package/dist/index.cjs.js +27 -16
- package/dist/index.es.js +14442 -9648
- package/dist/src/App.d.ts +2 -0
- package/dist/src/clients/ProductConfiguratorClient.d.ts +11 -0
- package/dist/{components → src/components}/Counter/Counter.d.ts +1 -2
- package/dist/src/components/DisplayState/DisplayState.d.ts +2 -0
- package/dist/src/components/Extra/Extra.d.ts +2 -0
- package/dist/src/components/Extra/index.d.ts +2 -0
- package/dist/src/components/Footer/Footer.d.ts +5 -0
- package/dist/src/components/Footer/index.d.ts +2 -0
- package/dist/{components → src/components}/GroupStateInfo/GroupStateInfo.d.ts +2 -2
- package/dist/src/components/InfoLine/InfoLine.d.ts +7 -0
- package/dist/{components → src/components}/MenuItemsDispatcher/MenuItemsDispatcher.d.ts +2 -3
- package/dist/{components → src/components}/MenuOptions/MenuOptions.d.ts +1 -2
- package/dist/{components → src/components}/MenuOptions/MenuOptionsDefaultUI.d.ts +1 -2
- package/dist/{components → src/components}/MenuProduct/MenuProduct.d.ts +3 -3
- package/dist/{components → src/components}/MenuProduct/useMenuProduct.d.ts +1 -1
- package/dist/{components → src/components}/MenuProductRoot/MenuProductRoot.d.ts +2 -3
- package/dist/{components → src/components}/MenuProductRoot/MenuProductRootDefaultUI.d.ts +1 -2
- package/dist/{components → src/components}/MenuProductRoot/MenuProductRootDefaultUIModal.d.ts +1 -2
- package/dist/{components → src/components}/Price/Price.d.ts +1 -2
- package/dist/{components → src/components}/ProductConfigurator/ProductConfigurator.d.ts +1 -2
- package/dist/{components → src/components}/ProductConfigurator/useProductConfigurator.d.ts +1 -1
- package/dist/{components → src/components}/SimpleCheckbox/SimpleCheckbox.d.ts +1 -2
- package/dist/{components → src/components}/SimpleRadio/SimpleRadio.d.ts +1 -2
- package/dist/src/components/SimpleRadioWithImage/SimpleRadioWithImage.d.ts +2 -0
- package/dist/src/components/SimpleRadioWithImage/index.d.ts +2 -0
- package/dist/{components → src/components}/SubmitRow/SubmitRow.d.ts +1 -2
- package/dist/{context → src/context}/Components.d.ts +1 -1
- package/dist/{context → src/context}/GroupsValidation.d.ts +2 -2
- package/dist/{context → src/context}/ProductData.d.ts +2 -2
- package/dist/src/index.d.ts +0 -0
- package/dist/src/state/index.d.ts +6 -0
- package/dist/src/translations/i18n.d.ts +1 -0
- package/dist/src/types/index.d.ts +129 -0
- package/dist/{utils → src/utils}/formatPrice.d.ts +1 -1
- package/dist/src/utils/getAttrs.d.ts +1 -0
- package/dist/src/utils/translations.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +1 -130
- package/package.json +2 -1
- package/dist/components/DisplayState/DisplayState.d.ts +0 -2
- package/dist/components/InfoLine/InfoLine.d.ts +0 -8
- package/dist/state/index.d.ts +0 -6
- package/dist/vite-env.d.ts +0 -1
- /package/dist/{components → src/components}/Counter/index.d.ts +0 -0
- /package/dist/{components → src/components}/DisplayState/index.d.ts +0 -0
- /package/dist/{components → src/components}/GroupStateInfo/index.d.ts +0 -0
- /package/dist/{components → src/components}/InfoLine/index.d.ts +0 -0
- /package/dist/{components → src/components}/MenuItemsDispatcher/index.d.ts +0 -0
- /package/dist/{components → src/components}/MenuItemsDispatcher/useMenuItemsDispatcher.d.ts +0 -0
- /package/dist/{components → src/components}/MenuOptions/index.d.ts +0 -0
- /package/dist/{components → src/components}/MenuOptions/useMenuOptions.d.ts +0 -0
- /package/dist/{components → src/components}/MenuProduct/index.d.ts +0 -0
- /package/dist/{components → src/components}/MenuProductRoot/index.d.ts +0 -0
- /package/dist/{components → src/components}/Price/index.d.ts +0 -0
- /package/dist/{components → src/components}/ProductConfigurator/index.d.ts +0 -0
- /package/dist/{components → src/components}/SimpleCheckbox/index.d.ts +0 -0
- /package/dist/{components → src/components}/SimpleRadio/index.d.ts +0 -0
- /package/dist/{components → src/components}/SubmitRow/index.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useEmitFilter.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useExpand.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useValidate.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useWindow.d.ts +0 -0
- /package/dist/{state → src/state}/expandedItems.d.ts +0 -0
- /package/dist/{state → src/state}/filter.d.ts +0 -0
- /package/dist/{state → src/state}/validate.d.ts +0 -0
- /package/dist/{translations → src/translations}/dictionary.d.ts +0 -0
- /package/dist/{utils → src/utils}/cleanSelected.d.ts +0 -0
- /package/dist/{utils → src/utils}/countPrice.d.ts +0 -0
- /package/dist/{utils → src/utils}/filter.d.ts +0 -0
- /package/dist/{utils → src/utils}/formatValues.d.ts +0 -0
- /package/dist/{utils → src/utils}/getContext.d.ts +0 -0
- /package/dist/{utils → src/utils}/getProduct.d.ts +0 -0
- /package/dist/{utils → src/utils}/getSelCtxCntFromSelectedState.d.ts +0 -0
- /package/dist/{utils → src/utils}/getValidSelectedState.d.ts +0 -0
- /package/dist/{utils → src/utils}/groupsValidation.d.ts +0 -0
- /package/dist/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/setSelected.d.ts +0 -0
- /package/dist/{utils → src/utils}/validate.d.ts +0 -0
- /package/dist/{utils → src/utils}/validationMessagesToRefactor.d.ts +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
"use strict";Object.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tu(e){return Ja(e)||eu(e)||Za(e)||Xa()}function fi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function di(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fi(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ru={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},nu=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_e(this,e),this.init(t,r)}return Te(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||ru,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,i,a){return a&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,di(di({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),De=new nu,tt=function(){function e(){_e(this,e),this.observers={}}return Te(e,[{key:"on",value:function(r,n){var i=this;return r.split(" ").forEach(function(a){i.observers[a]=i.observers[a]||[],i.observers[a].push(n)}),this}},{key:"off",value:function(r,n){if(!!this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(i){return i!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(this.observers[r]){var o=[].concat(this.observers[r]);o.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(u){u.apply(u,[r].concat(i))})}}}]),e}();function Tt(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function gi(e){return e==null?"":""+e}function iu(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function Fn(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(i())return{};var o=n(a.shift());!e[o]&&r&&(e[o]=new r),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:n(a.shift())}}function hi(e,t,r){var n=Fn(e,t,Object),i=n.obj,a=n.k;i[a]=r}function au(e,t,r,n){var i=Fn(e,t,Object),a=i.obj,o=i.k;a[o]=a[o]||[],n&&(a[o]=a[o].concat(r)),n||a[o].push(r)}function ur(e,t){var r=Fn(e,t),n=r.obj,i=r.k;if(!!n)return n[i]}function pi(e,t,r){var n=ur(e,r);return n!==void 0?n:ur(t,r)}function eo(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):eo(e[n],t[n],r):e[n]=t[n]);return e}function pt(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ou={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function su(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return ou[t]}):e}var Ar=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,uu=[" ",",","?","!",";"];function lu(e,t,r){t=t||"",r=r||"";var n=uu.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!i.test(e);if(!a){var o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a}function mi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mi(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cu(e){var t=fu();return function(){var n=Ve(e),i;if(t){var a=Ve(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function fu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function to(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var n=t.split(r),i=e,a=0;a<n.length;++a){if(!i||typeof i[n[a]]=="string"&&a+1<n.length)return;if(i[n[a]]===void 0){for(var o=2,s=n.slice(a,a+o).join(r),u=i[s];u===void 0&&n.length>a+o;)o++,s=n.slice(a,a+o).join(r),u=i[s];if(u===void 0)return;if(u===null)return null;if(t.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var l=n.slice(a+o).join(r);return l?to(u,l,r):void 0}i=i[n[a]]}return i}}var du=function(e){Pr(r,e);var t=cu(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return _e(this,r),i=t.call(this),Ar&&tt.call(et(i)),i.data=n||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Te(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,l=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[i,a];o&&typeof o!="string"&&(f=f.concat(o)),o&&typeof o=="string"&&(f=f.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(f=i.split("."));var c=ur(this.data,f);return c||!l||typeof o!="string"?c:to(this.data&&this.data[i]&&this.data[i][a],o,u)}},{key:"addResource",value:function(i,a,o,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},l=this.options.keySeparator;l===void 0&&(l=".");var f=[i,a];o&&(f=f.concat(l?o.split(l):o)),i.indexOf(".")>-1&&(f=i.split("."),s=a,a=f[1]),this.addNamespaces(a),hi(this.data,f,s),u.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in o)(typeof o[u]=="string"||Object.prototype.toString.apply(o[u])==="[object Array]")&&this.addResource(i,a,u,o[u],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[i,a];i.indexOf(".")>-1&&(f=i.split("."),s=o,o=a,a=f[1]),this.addNamespaces(a);var c=ur(this.data,f)||{};s?eo(c,o,u):c=Zt(Zt({},c),o),hi(this.data,f,c),l.silent||this.emit("added",i,a,o)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Zt(Zt({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(tt),ro={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,i,a){var o=this;return t.forEach(function(s){o.processors[s]&&(r=o.processors[s].process(r,n,i,a))}),r}};function vi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vi(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gu(e){var t=hu();return function(){var n=Ve(e),i;if(t){var a=Ve(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function hu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var yi={},bi=function(e){Pr(r,e);var t=gu(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _e(this,r),i=t.call(this),Ar&&tt.call(et(i)),iu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,et(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=De.create("translator"),i}return Te(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ns||this.options.defaultNS||[],l=o&&i.indexOf(o)>-1,f=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!lu(i,o,s);if(l&&!f){var c=i.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:i,namespaces:u};var g=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(g[0])>-1)&&(u=g.shift()),i=g.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(Ie(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,f=this.extractFromKey(i[i.length-1],a),c=f.key,g=f.namespaces,d=g[g.length-1],h=a.lng||this.language,b=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(b){var y=a.nsSeparator||this.options.nsSeparator;return u?(p.res="".concat(d).concat(y).concat(c),p):"".concat(d).concat(y).concat(c)}return u?(p.res=c,p):c}var p=this.resolve(i,a),m=p&&p.res,O=p&&p.usedKey||c,w=p&&p.exactUsedKey||c,E=Object.prototype.toString.apply(m),x=["[object Number]","[object Function]","[object RegExp]"],T=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,k=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(I&&m&&k&&x.indexOf(E)<0&&!(typeof T=="string"&&E==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,m,ye(ye({},a),{},{ns:g})):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");return u?(p.res=D,p):D}if(l){var F=E==="[object Array]",j=F?[]:{},U=F?w:O;for(var B in m)if(Object.prototype.hasOwnProperty.call(m,B)){var re="".concat(U).concat(l).concat(B);j[B]=this.translate(re,ye(ye({},a),{joinArrays:!1,ns:g})),j[B]===re&&(j[B]=m[B])}m=j}}else if(I&&typeof T=="string"&&E==="[object Array]")m=m.join(T),m&&(m=this.extendTranslation(m,i,a,o));else{var K=!1,ne=!1,H=a.count!==void 0&&typeof a.count!="string",ie=r.hasDefaultValue(a),G=H?this.pluralResolver.getSuffix(h,a.count,a):"",ce=a["defaultValue".concat(G)]||a.defaultValue;!this.isValidLookup(m)&&ie&&(K=!0,m=ce),this.isValidLookup(m)||(ne=!0,m=c);var Me=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,se=Me&&ne?void 0:m,ue=ie&&ce!==m&&this.options.updateMissing;if(ne||K||ue){if(this.logger.log(ue?"updateKey":"missingKey",h,d,c,ue?ce:m),l){var Ae=this.resolve(c,ye(ye({},a),{},{keySeparator:!1}));Ae&&Ae.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.")}var he=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(var ae=0;ae<z.length;ae++)he.push(z[ae]);else this.options.saveMissingTo==="all"?he=this.languageUtils.toResolveHierarchy(a.lng||this.language):he.push(a.lng||this.language);var q=function(le,fe,Se){var v=ie&&Se!==m?Se:se;s.options.missingKeyHandler?s.options.missingKeyHandler(le,d,fe,v,ue,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(le,d,fe,v,ue,a),s.emit("missingKey",le,d,fe,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&H?he.forEach(function(W){s.pluralResolver.getSuffixes(W,a).forEach(function(le){q([W],c+le,a["defaultValue".concat(le)]||ce)})}):q(he,c,ce))}m=this.extendTranslation(m,i,a,p,o),ne&&m===c&&this.options.appendNamespaceToMissingKey&&(m="".concat(d,":").concat(c)),(ne||K)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(c):c,K?m:void 0):m=this.options.parseMissingKeyHandler(m))}return u?(p.res=m,p):m}},{key:"extendTranslation",value:function(i,a,o,s,u){var l=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,ye(ye({},this.options.interpolation.defaultVariables),o),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(ye(ye({},o),{interpolation:ye(ye({},this.options.interpolation),o.interpolation)}));var f=typeof i=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),c;if(f){var g=i.match(this.interpolator.nestingRegexp);c=g&&g.length}var d=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(d=ye(ye({},this.options.interpolation.defaultVariables),d)),i=this.interpolator.interpolate(i,d,o.lng||this.language,o),f){var h=i.match(this.interpolator.nestingRegexp),b=h&&h.length;c<b&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var m=arguments.length,O=new Array(m),w=0;w<m;w++)O[w]=arguments[w];return u&&u[0]===O[0]&&!o.context?(l.logger.warn("It seems you are nesting recursively key: ".concat(O[0]," in key: ").concat(a[0])),null):l.translate.apply(l,O.concat([a]))},o)),o.interpolation&&this.interpolator.reset()}var y=o.postProcess||this.options.postProcess,p=typeof y=="string"?[y]:y;return i!=null&&p&&p.length&&o.applyPostProcessor!==!1&&(i=ro.handle(p,i,a,this.options&&this.options.postProcessPassResolved?ye({i18nResolved:s},o):o,this)),i}},{key:"resolve",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,u,l,f,c;return typeof i=="string"&&(i=[i]),i.forEach(function(g){if(!a.isValidLookup(s)){var d=a.extractFromKey(g,o),h=d.key;u=h;var b=d.namespaces;a.options.fallbackNS&&(b=b.concat(a.options.fallbackNS));var y=o.count!==void 0&&typeof o.count!="string",p=y&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),m=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",O=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);b.forEach(function(w){a.isValidLookup(s)||(c=w,!yi["".concat(O[0],"-").concat(w)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(c)&&(yi["".concat(O[0],"-").concat(w)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(O.join(", "),`" won't get resolved as namespace "`).concat(c,'" 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!!!")),O.forEach(function(E){if(!a.isValidLookup(s)){f=E;var x=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(x,h,E,w,o);else{var T;y&&(T=a.pluralResolver.getSuffix(E,o.count,o));var I="".concat(a.options.pluralSeparator,"zero");if(y&&(x.push(h+T),p&&x.push(h+I)),m){var k="".concat(h).concat(a.options.contextSeparator).concat(o.context);x.push(k),y&&(x.push(k+T),p&&x.push(k+I))}}for(var D;D=x.pop();)a.isValidLookup(s)||(l=D,s=a.getResource(E,w,D,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:l,usedLng:f,usedNS:c}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),r}(tt);function Wr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pu=function(){function e(t){_e(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=De.create("languageUtils")}return Te(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Wr(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Wr(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Wr(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(a){if(!i){var o=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&r.forEach(function(a){if(!i){var o=n.getLanguagePartFromCode(a);if(n.isSupportedCode(o))return i=o;i=n.options.supportedLngs.find(function(s){if(s.indexOf(o)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),o=[],s=function(l){!l||(i.isSupportedCode(l)?o.push(l):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),a.forEach(function(u){o.indexOf(u)<0&&s(i.formatLanguageCode(u))}),o}}]),e}(),mu=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],vu={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},yu=["v1","v2","v3"],Si={zero:0,one:1,two:2,few:3,many:4,other:5};function bu(){var e={};return mu.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:vu[t.fc]}})}),e}var Su=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_e(this,e),this.languageUtils=t,this.options=r,this.logger=De.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=bu()}return Te(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(o,s){return Si[o]-Si[s]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):a.numbers.map(function(o){return n.getSuffix(r,o,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),o=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!yu.includes(this.options.compatibilityJSON)}}]),e}();function Oi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Oi(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ou=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_e(this,e),this.logger=De.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Te(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:su,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?pt(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?pt(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?pt(n.nestingPrefix):n.nestingPrefixEscaped||pt("$t("),this.nestingSuffix=n.nestingSuffix?pt(n.nestingSuffix):n.nestingSuffixEscaped||pt(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,a){var o=this,s,u,l,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(y){return y.replace(/\$/g,"$$$$")}var g=function(p){if(p.indexOf(o.formatSeparator)<0){var m=pi(n,f,p);return o.alwaysFormat?o.format(m,void 0,i,$e($e($e({},a),n),{},{interpolationkey:p})):m}var O=p.split(o.formatSeparator),w=O.shift().trim(),E=O.join(o.formatSeparator).trim();return o.format(pi(n,f,w),E,i,$e($e($e({},a),n),{},{interpolationkey:w}))};this.resetRegExp();var d=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,h=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:function(p){return c(p)}},{regex:this.regexp,safeValue:function(p){return o.escapeValue?c(o.escape(p)):c(p)}}];return b.forEach(function(y){for(l=0;s=y.regex.exec(r);){var p=s[1].trim();if(u=g(p),u===void 0)if(typeof d=="function"){var m=d(r,s,a);u=typeof m=="string"?m:""}else if(a&&a.hasOwnProperty(p))u="";else if(h){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=gi(u));var O=y.safeValue(u);if(r=r.replace(s[0],O),h?(y.regex.lastIndex+=u.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,l++,l>=o.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,u=$e({},a);u.applyPostProcessor=!1,delete u.defaultValue;function l(d,h){var b=this.nestingOptionsSeparator;if(d.indexOf(b)<0)return d;var y=d.split(new RegExp("".concat(b,"[ ]*{"))),p="{".concat(y[1]);d=y[0],p=this.interpolate(p,u);var m=p.match(/'/g),O=p.match(/"/g);(m&&m.length%2===0&&!O||O.length%2!==0)&&(p=p.replace(/'/g,'"'));try{u=JSON.parse(p),h&&(u=$e($e({},h),u))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),w),"".concat(d).concat(b).concat(p)}return delete u.defaultValue,d}for(;o=this.nestingRegexp.exec(r);){var f=[],c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var g=o[1].split(this.formatSeparator).map(function(d){return d.trim()});o[1]=g.shift(),f=g,c=!0}if(s=n(l.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=gi(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),c&&(s=f.reduce(function(d,h){return i.format(d,h,a.lng,$e($e({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),e}();function wi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wi(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wi(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wu(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(t==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var a=i.split(";");a.forEach(function(o){if(!!o){var s=o.split(":"),u=tu(s),l=u[0],f=u.slice(1),c=f.join(":").trim().replace(/^'+|'+$/g,"");r[l.trim()]||(r[l.trim()]=c),c==="false"&&(r[l.trim()]=!1),c==="true"&&(r[l.trim()]=!0),isNaN(c)||(r[l.trim()]=parseInt(c,10))}})}}return{formatName:t,formatOptions:r}}function mt(e){var t={};return function(n,i,a){var o=i+JSON.stringify(a),s=t[o];return s||(s=e(i,a),t[o]=s),s(n)}}var Eu=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_e(this,e),this.logger=De.create("formatter"),this.options=t,this.formats={number:mt(function(r,n){var i=new Intl.NumberFormat(r,n);return function(a){return i.format(a)}}),currency:mt(function(r,n){var i=new Intl.NumberFormat(r,Je(Je({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:mt(function(r,n){var i=new Intl.DateTimeFormat(r,Je({},n));return function(a){return i.format(a)}}),relativetime:mt(function(r,n){var i=new Intl.RelativeTimeFormat(r,Je({},n));return function(a){return i.format(a,n.range||"day")}}),list:mt(function(r,n){var i=new Intl.ListFormat(r,Je({},n));return function(a){return i.format(a)}})},this.init(t)}return Te(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=mt(n)}},{key:"format",value:function(r,n,i,a){var o=this,s=n.split(this.formatSeparator),u=s.reduce(function(l,f){var c=wu(f),g=c.formatName,d=c.formatOptions;if(o.formats[g]){var h=l;try{var b=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},y=b.locale||b.lng||a.locale||a.lng||i;h=o.formats[g](l,y,Je(Je(Je({},d),a),b))}catch(p){o.logger.warn(p)}return h}else o.logger.warn("there was no format function for ".concat(g));return l},r);return u}}]),e}();function Ei(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ei(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ei(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pu(e){var t=Au();return function(){var n=Ve(e),i;if(t){var a=Ve(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Au(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cu(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var xu=function(e){Pr(r,e);var t=Pu(r);function r(n,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return _e(this,r),o=t.call(this),Ar&&tt.call(et(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=De.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return Te(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,l={},f={},c={},g={};return i.forEach(function(d){var h=!0;a.forEach(function(b){var y="".concat(d,"|").concat(b);!o.reload&&u.store.hasResourceBundle(d,b)?u.state[y]=2:u.state[y]<0||(u.state[y]===1?f[y]===void 0&&(f[y]=!0):(u.state[y]=1,h=!1,f[y]===void 0&&(f[y]=!0),l[y]===void 0&&(l[y]=!0),g[b]===void 0&&(g[b]=!0)))}),h||(c[d]=!0)}),(Object.keys(l).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(f),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(g)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],l=s[1];a&&this.emit("failedLoading",u,l,a),o&&this.store.addResourceBundle(u,l,o),this.state[i]=a?-1:2;var f={};this.queue.forEach(function(c){au(c.loaded,[u],l),Cu(c,i),a&&c.errors.push(a),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(function(g){f[g]||(f[g]={});var d=c.loaded[g];d.length&&d.forEach(function(h){f[g][h]===void 0&&(f[g][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(c){return!c.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!i.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:l,callback:f});return}return this.readingCalls++,this.backend[o](i,a,function(c,g){if(s.readingCalls--,s.waitingReads.length>0){var d=s.waitingReads.shift();s.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&g&&u<s.maxRetries){setTimeout(function(){s.read.call(s,i,a,o,u+1,l*2,f)},l);return}f(c,g)})}},{key:"prepareLoading",value:function(i,a){var o=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var l=this.queueLoad(i,a,s,u);if(!l.toLoad.length)return l.pending.length||u(),null;l.toLoad.forEach(function(f){o.loadOne(f)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),u=s[0],l=s[1];this.read(u,l,"read",void 0,void 0,function(f,c){f&&a.logger.warn("".concat(o,"loading namespace ").concat(l," for language ").concat(u," failed"),f),!f&&c&&a.logger.log("".concat(o,"loaded namespace ").concat(l," for language ").concat(u),c),a.loaded(i,f,c)})}},{key:"saveMissing",value:function(i,a,o,s,u){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(a,'" 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}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(i,a,o,s,null,Pi(Pi({},l),{},{isUpdate:u})),!(!i||!i[0])&&this.store.addResource(i[0],a,o,s))}}]),r}(tt);function _u(){return{debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(Ie(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),Ie(t[2])==="object"||Ie(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ai(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ci(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ci(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ci(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tu(e){var t=Nu();return function(){var n=Ve(e),i;if(t){var a=Ve(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return zt(this,i)}}function Nu(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xt(){}function $u(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var lr=function(e){Pr(r,e);var t=Tu(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(_e(this,r),n=t.call(this),Ar&&tt.call(et(n)),n.options=Ai(i),n.services={},n.logger=De,n.modules={external:[]},$u(et(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),zt(n,et(n));setTimeout(function(){n.init(i,a)},0)}return n}return Te(r,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=_u();this.options=je(je(je({},s),this.options),Ai(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=je(je({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function u(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?De.init(u(this.modules.logger),this.options):De.init(null,this.options);var l;this.modules.formatter?l=this.modules.formatter:typeof Intl!="undefined"&&(l=Eu);var f=new pu(this.options);this.store=new du(this.options.resources,this.options);var c=this.services;c.logger=De,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Su(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=u(l),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ou(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new xu(u(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(p){for(var m=arguments.length,O=new Array(m>1?m-1:0),w=1;w<m;w++)O[w-1]=arguments[w];i.emit.apply(i,[p].concat(O))}),this.modules.languageDetector&&(c.languageDetector=u(this.modules.languageDetector),c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=u(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new bi(this.services,this.options),this.translator.on("*",function(p){for(var m=arguments.length,O=new Array(m>1?m-1:0),w=1;w<m;w++)O[w-1]=arguments[w];i.emit.apply(i,[p].concat(O))}),this.modules.external.forEach(function(p){p.init&&p.init(i)})}if(this.format=this.options.interpolation.format,o||(o=Xt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(p){i[p]=function(){var m;return(m=i.store)[p].apply(m,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(p){i[p]=function(){var m;return(m=i.store)[p].apply(m,arguments),i}});var b=Tt(),y=function(){var m=function(w,E){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),b.resolve(E),o(w,E)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return m(null,i.t.bind(i));i.changeLanguage(i.options.lng,m)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),b}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xt,s=o,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var l=[],f=function(d){if(!!d){var h=a.services.languageUtils.toResolveHierarchy(d);h.forEach(function(b){l.indexOf(b)<0&&l.push(b)})}};if(u)f(u);else{var c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.forEach(function(g){return f(g)})}this.options.preload&&this.options.preload.forEach(function(g){return f(g)}),this.services.backendConnector.load(l,this.options.ns,function(g){!g&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(g)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Tt();return i||(i=this.languages),a||(a=this.options.ns),o||(o=Xt),this.services.backendConnector.reload(i,a,function(u){s.resolve(),o(u)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&ro.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a<this.languages.length;a++){var o=this.languages[a];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Tt();this.emit("languageChanging",i);var u=function(g){o.language=g,o.languages=o.services.languageUtils.toResolveHierarchy(g),o.resolvedLanguage=void 0,o.setResolvedLanguage(g)},l=function(g,d){d?(u(d),o.translator.changeLanguage(d),o.isLanguageChangingTo=void 0,o.emit("languageChanged",d),o.logger.log("languageChanged",d)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(g,function(){return o.t.apply(o,arguments)})},f=function(g){!i&&!g&&o.services.languageDetector&&(g=[]);var d=typeof g=="string"?g:o.services.languageUtils.getBestMatchFromCodes(g);d&&(o.language||u(d),o.translator.language||o.translator.changeLanguage(d),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(d)),o.loadResources(d,function(h){l(h,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function l(f,c){var g;if(Ie(c)!=="object"){for(var d=arguments.length,h=new Array(d>2?d-2:0),b=2;b<d;b++)h[b-2]=arguments[b];g=s.options.overloadTranslationOptionHandler([f,c].concat(h))}else g=je({},c);g.lng=g.lng||l.lng,g.lngs=g.lngs||l.lngs,g.ns=g.ns||l.ns,g.keyPrefix=g.keyPrefix||o||l.keyPrefix;var y=s.options.keySeparator||".",p=g.keyPrefix?"".concat(g.keyPrefix).concat(y).concat(f):f;return s.t(p,g)};return typeof i=="string"?u.lng=i:u.lngs=i,u.ns=a,u.keyPrefix=o,u}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(d,h){var b=a.services.backendConnector.state["".concat(d,"|").concat(h)];return b===-1||b===2};if(o.precheck){var c=o.precheck(this,f);if(c!==void 0)return c}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,i)&&(!u||f(l,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Tt();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){o.options.ns.indexOf(u)<0&&o.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),a&&a(u)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Tt();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(l){return s.indexOf(l)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(l){o.resolve(),a&&a(l)}),o):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["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"];return a.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xt,s=je(je(je({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var l=["store","services","language"];return l.forEach(function(f){u[f]=i[f]}),u.services=je({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new bi(u.services,u.options),u.translator.on("*",function(f){for(var c=arguments.length,g=new Array(c>1?c-1:0),d=1;d<c;d++)g[d-1]=arguments[d];u.emit.apply(u,[f].concat(g))}),u.init(s,o),u.translator.options=u.options,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(tt);Be(lr,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new lr(e,t)});var ve=lr.createInstance();ve.createInstance=lr.createInstance;ve.createInstance;ve.init;ve.loadResources;ve.reloadResources;ve.use;ve.changeLanguage;ve.getFixedT;ve.t;ve.exists;ve.setDefaultNamespace;ve.hasLoadedNamespace;ve.loadNamespaces;ve.loadLanguages;var qt=e=>e.type==="checkbox",bt=e=>e instanceof Date,be=e=>e==null;const no=e=>typeof e=="object";var ge=e=>!be(e)&&!Array.isArray(e)&&no(e)&&!bt(e),io=e=>ge(e)&&e.target?qt(e.target)?e.target.checked:e.target.value:e,Iu=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ao=(e,t)=>e.has(Iu(t)),At=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,$=(e,t,r)=>{if(!t||!ge(e))return r;const n=At(t.split(/[,[\].]+?/)).reduce((i,a)=>be(i)?i:i[a],e);return te(n)||n===e?te(e[t])?r:e[t]:n};const cr={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ce={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ge={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},oo=N.default.createContext(null),He=()=>N.default.useContext(oo),so=e=>{const{children:t,...r}=e;return N.default.createElement(oo.Provider,{value:r},t)};var uo=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Ce.all&&(t._proxyFormState[o]=!n||Ce.all),r&&(r[o]=!0),e[o]}});return i},Oe=e=>ge(e)&&!Object.keys(e).length,lo=(e,t,r)=>{const{name:n,...i}=e;return Oe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||Ce.all))},Ee=e=>Array.isArray(e)?e:[e],co=(e,t,r)=>r&&t?e===t:!e||!t||e===t||Ee(e).some(n=>n&&(n.startsWith(t)||t.startsWith(n)));function Cr(e){const t=N.default.useRef(e);t.current=e,N.default.useEffect(()=>{const r=!e.disabled&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function fo(e){const t=He(),{control:r=t.control,disabled:n,name:i,exact:a}=e||{},[o,s]=N.default.useState(r._formState),u=N.default.useRef(!0),l=N.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=N.default.useRef(i);return f.current=i,Cr({disabled:n,next:c=>u.current&&co(f.current,c.name,a)&&lo(c,l.current)&&s({...r._formState,...c}),subject:r._subjects.state}),N.default.useEffect(()=>{u.current=!0;const c=r._proxyFormState.isDirty&&r._getDirty();return c!==r._formState.isDirty&&r._subjects.state.next({isDirty:c}),r._updateValid(),()=>{u.current=!1}},[r]),uo(o,r,l.current,!1)}var Ue=e=>typeof e=="string",go=(e,t,r,n,i)=>Ue(e)?(n&&t.watch.add(e),$(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),$(r,a))):(n&&(t.watchAll=!0),r),Ru=e=>{const t=e.constructor&&e.constructor.prototype;return ge(t)&&t.hasOwnProperty("isPrototypeOf")},kn=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function we(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(kn&&(e instanceof Blob||e instanceof FileList))&&(r||ge(e)))if(t=r?[]:{},!Array.isArray(e)&&!Ru(e))t=e;else for(const n in e)t[n]=we(e[n]);else return e;return t}function fr(e){const t=He(),{control:r=t.control,name:n,defaultValue:i,disabled:a,exact:o}=e||{},s=N.default.useRef(n);s.current=n,Cr({disabled:a,subject:r._subjects.watch,next:f=>{co(s.current,f.name,o)&&l(we(go(s.current,r._names,f.values||r._formValues,!1,i)))}});const[u,l]=N.default.useState(r._getWatch(n,i));return N.default.useEffect(()=>r._removeUnmounted()),u}function ho(e){const t=He(),{name:r,control:n=t.control,shouldUnregister:i}=e,a=ao(n._names.array,r),o=fr({control:n,name:r,defaultValue:$(n._formValues,r,$(n._defaultValues,r,e.defaultValue)),exact:!0}),s=fo({control:n,name:r}),u=N.default.useRef(n.register(r,{...e.rules,value:o}));return N.default.useEffect(()=>{const l=(f,c)=>{const g=$(n._fields,f);g&&(g._f.mount=c)};return l(r,!0),()=>{const f=n._options.shouldUnregister||i;(a?f&&!n._stateFlags.action:f)?n.unregister(r):l(r,!1)}},[r,n,a,i]),{field:{name:r,value:o,onChange:N.default.useCallback(l=>u.current.onChange({target:{value:io(l),name:r},type:cr.CHANGE}),[r]),onBlur:N.default.useCallback(()=>u.current.onBlur({target:{value:$(n._formValues,r),name:r},type:cr.BLUR}),[r,n]),ref:l=>{const f=$(n._fields,r);f&&l&&(f._f.ref={focus:()=>l.focus(),select:()=>l.select(),setCustomValidity:c=>l.setCustomValidity(c),reportValidity:()=>l.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!$(s.errors,r)},isDirty:{enumerable:!0,get:()=>!!$(s.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!$(s.touchedFields,r)},error:{enumerable:!0,get:()=>$(s.errors,r)}})}}const Lu=e=>e.render(ho(e));var po=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},Mn=e=>/^\w*$/.test(e),mo=e=>At(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Q(e,t,r){let n=-1;const i=Mn(t)?[t]:mo(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let u=r;if(n!==o){const l=e[s];u=ge(l)||Array.isArray(l)?l:isNaN(+i[n+1])?{}:[]}e[s]=u,e=e[s]}return e}const dr=(e,t,r)=>{for(const n of r||Object.keys(e)){const i=$(e,n);if(i){const{_f:a,...o}=i;if(a&&t(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else ge(o)&&dr(o,t)}}};var Ze=()=>{const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},Gr=(e,t,r={})=>r.shouldFocus||te(r.shouldFocus)?r.focusName||`${e}.${te(r.focusIndex)?t:r.focusIndex}.`:"",mn=e=>({isOnSubmit:!e||e===Ce.onSubmit,isOnBlur:e===Ce.onBlur,isOnChange:e===Ce.onChange,isOnAll:e===Ce.all,isOnTouch:e===Ce.onTouched}),vn=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))),vo=(e,t,r)=>{const n=At($(e,r));return Q(n,"root",t[r]),Q(e,r,n),e},St=e=>typeof e=="boolean",jn=e=>e.type==="file",Ot=e=>typeof e=="function",gr=e=>{if(!kn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},nr=e=>Ue(e)||N.default.isValidElement(e),Dn=e=>e.type==="radio",hr=e=>e instanceof RegExp;const xi={value:!1,isValid:!1},_i={value:!0,isValid:!0};var yo=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?_i:{value:e[0].value,isValid:!0}:_i:xi}return xi};const Ti={isValid:!1,value:null};var bo=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ti):Ti;function Ni(e,t,r="validate"){if(nr(e)||Array.isArray(e)&&e.every(nr)||St(e)&&!e)return{type:r,message:nr(e)?e:"",ref:t}}var vt=e=>ge(e)&&!hr(e)?e:{value:e,message:""},yn=async(e,t,r,n,i)=>{const{ref:a,refs:o,required:s,maxLength:u,minLength:l,min:f,max:c,pattern:g,validate:d,name:h,valueAsNumber:b,mount:y,disabled:p}=e._f;if(!y||p)return{};const m=o?o[0]:a,O=F=>{n&&m.reportValidity&&(m.setCustomValidity(St(F)?"":F||""),m.reportValidity())},w={},E=Dn(a),x=qt(a),T=E||x,I=(b||jn(a))&&te(a.value)&&te(t)||gr(a)&&a.value===""||t===""||Array.isArray(t)&&!t.length,k=po.bind(null,h,r,w),D=(F,j,U,B=Ge.maxLength,re=Ge.minLength)=>{const K=F?j:U;w[h]={type:F?B:re,message:K,ref:a,...k(F?B:re,K)}};if(i?!Array.isArray(t)||!t.length:s&&(!T&&(I||be(t))||St(t)&&!t||x&&!yo(o).isValid||E&&!bo(o).isValid)){const{value:F,message:j}=nr(s)?{value:!!s,message:s}:vt(s);if(F&&(w[h]={type:Ge.required,message:j,ref:m,...k(Ge.required,j)},!r))return O(j),w}if(!I&&(!be(f)||!be(c))){let F,j;const U=vt(c),B=vt(f);if(!be(t)&&!isNaN(t)){const re=a.valueAsNumber||t&&+t;be(U.value)||(F=re>U.value),be(B.value)||(j=re<B.value)}else{const re=a.valueAsDate||new Date(t),K=ie=>new Date(new Date().toDateString()+" "+ie),ne=a.type=="time",H=a.type=="week";Ue(U.value)&&t&&(F=ne?K(t)>K(U.value):H?t>U.value:re>new Date(U.value)),Ue(B.value)&&t&&(j=ne?K(t)<K(B.value):H?t<B.value:re<new Date(B.value))}if((F||j)&&(D(!!F,U.message,B.message,Ge.max,Ge.min),!r))return O(w[h].message),w}if((u||l)&&!I&&(Ue(t)||i&&Array.isArray(t))){const F=vt(u),j=vt(l),U=!be(F.value)&&t.length>F.value,B=!be(j.value)&&t.length<j.value;if((U||B)&&(D(U,F.message,j.message),!r))return O(w[h].message),w}if(g&&!I&&Ue(t)){const{value:F,message:j}=vt(g);if(hr(F)&&!t.match(F)&&(w[h]={type:Ge.pattern,message:j,ref:a,...k(Ge.pattern,j)},!r))return O(j),w}if(d){if(Ot(d)){const F=await d(t),j=Ni(F,m);if(j&&(w[h]={...j,...k(Ge.validate,j.message)},!r))return O(j.message),w}else if(ge(d)){let F={};for(const j in d){if(!Oe(F)&&!r)break;const U=Ni(await d[j](t),m,j);U&&(F={...U,...k(j,U.message)},O(U.message),r&&(w[h]=F))}if(!Oe(F)&&(w[h]={ref:m,...F},!r))return w}}return O(!0),w};function zr(e,t){return[...e,...Ee(t)]}var qr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Kr(e,t,r){return[...e.slice(0,t),...Ee(r),...e.slice(t)]}var Yr=(e,t,r)=>Array.isArray(e)?(te(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function Qr(e,t){return[...Ee(t),...Ee(e)]}function Fu(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return At(n).length?n:[]}var Jr=(e,t)=>te(t)?[]:Fu(e,Ee(t).sort((r,n)=>r-n)),Zr=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function ku(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=te(e)?n++:e[t[n++]];return e}function Mu(e){for(const t in e)if(!te(e[t]))return!1;return!0}function me(e,t){const r=Mn(t)?[t]:mo(t),n=r.length==1?e:ku(e,r),i=r[r.length-1];let a;n&&delete n[i];for(let o=0;o<r.slice(0,-1).length;o++){let s=-1,u;const l=r.slice(0,-(o+1)),f=l.length-1;for(o>0&&(a=e);++s<l.length;){const c=l[s];u=u?u[c]:e[c],f===s&&(ge(u)&&Oe(u)||Array.isArray(u)&&Mu(u))&&(a?delete a[c]:delete e[c]),a=u}}return e}var $i=(e,t,r)=>(e[t]=r,e);function ju(e){const t=He(),{control:r=t.control,name:n,keyName:i="id",shouldUnregister:a}=e,[o,s]=N.default.useState(r._getFieldArray(n)),u=N.default.useRef(r._getFieldArray(n).map(Ze)),l=N.default.useRef(o),f=N.default.useRef(n),c=N.default.useRef(!1);f.current=n,l.current=o,r._names.array.add(n),e.rules&&r.register(n,e.rules),Cr({next:({values:E,name:x})=>{if(x===f.current||!x){const T=$(E,f.current);Array.isArray(T)&&(s(T),u.current=T.map(Ze))}},subject:r._subjects.array});const g=N.default.useCallback(E=>{c.current=!0,r._updateFieldArray(n,E)},[r,n]),d=(E,x)=>{const T=Ee(we(E)),I=zr(r._getFieldArray(n),T);r._names.focus=Gr(n,I.length-1,x),u.current=zr(u.current,T.map(Ze)),g(I),s(I),r._updateFieldArray(n,I,zr,{argA:qr(E)})},h=(E,x)=>{const T=Ee(we(E)),I=Qr(r._getFieldArray(n),T);r._names.focus=Gr(n,0,x),u.current=Qr(u.current,T.map(Ze)),g(I),s(I),r._updateFieldArray(n,I,Qr,{argA:qr(E)})},b=E=>{const x=Jr(r._getFieldArray(n),E);u.current=Jr(u.current,E),g(x),s(x),r._updateFieldArray(n,x,Jr,{argA:E})},y=(E,x,T)=>{const I=Ee(we(x)),k=Kr(r._getFieldArray(n),E,I);r._names.focus=Gr(n,E,T),u.current=Kr(u.current,E,I.map(Ze)),g(k),s(k),r._updateFieldArray(n,k,Kr,{argA:E,argB:qr(x)})},p=(E,x)=>{const T=r._getFieldArray(n);Zr(T,E,x),Zr(u.current,E,x),g(T),s(T),r._updateFieldArray(n,T,Zr,{argA:E,argB:x},!1)},m=(E,x)=>{const T=r._getFieldArray(n);Yr(T,E,x),Yr(u.current,E,x),g(T),s(T),r._updateFieldArray(n,T,Yr,{argA:E,argB:x},!1)},O=(E,x)=>{const T=we(x),I=$i(r._getFieldArray(n),E,T);u.current=[...I].map((k,D)=>!k||D===E?Ze():u.current[D]),g(I),s([...I]),r._updateFieldArray(n,I,$i,{argA:E,argB:T},!0,!1)},w=E=>{const x=Ee(we(E));u.current=x.map(Ze),g([...x]),s([...x]),r._updateFieldArray(n,[...x],T=>T,{},!0,!1)};return N.default.useEffect(()=>{if(r._stateFlags.action=!1,vn(n,r._names)&&r._subjects.state.next({}),c.current&&(!mn(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([n]).then(E=>{const x=$(E.errors,n),T=$(r._formState.errors,n);(T?!x&&T.type:x&&x.type)&&(x?Q(r._formState.errors,n,x):me(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const E=$(r._fields,n);E&&E._f&&yn(E,$(r._formValues,n),r._options.criteriaMode===Ce.all,r._options.shouldUseNativeValidation,!0).then(x=>!Oe(x)&&r._subjects.state.next({errors:vo(r._formState.errors,x,n)}))}r._subjects.watch.next({name:n,values:r._formValues}),r._names.focus&&dr(r._fields,E=>!!E&&E.startsWith(r._names.focus||"")),r._names.focus="",r._proxyFormState.isValid&&r._updateValid()},[o,n,r]),N.default.useEffect(()=>(!$(r._formValues,n)&&r._updateFieldArray(n),()=>{(r._options.shouldUnregister||a)&&r.unregister(n)}),[n,r,i,a]),{swap:N.default.useCallback(p,[g,n,r]),move:N.default.useCallback(m,[g,n,r]),prepend:N.default.useCallback(h,[g,n,r]),append:N.default.useCallback(d,[g,n,r]),remove:N.default.useCallback(b,[g,n,r]),insert:N.default.useCallback(y,[g,n,r]),update:N.default.useCallback(O,[g,n,r]),replace:N.default.useCallback(w,[g,n,r]),fields:N.default.useMemo(()=>o.map((E,x)=>({...E,[i]:u.current[x]||Ze()})),[o,i])}}function Xr(){let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}}var pr=e=>be(e)||!no(e);function st(e,t){if(pr(e)||pr(t))return e===t;if(bt(e)&&bt(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(bt(a)&&bt(o)||ge(a)&&ge(o)||Array.isArray(a)&&Array.isArray(o)?!st(a,o):a!==o)return!1}}return!0}var So=e=>e.type==="select-multiple",Du=e=>Dn(e)||qt(e),en=e=>gr(e)&&e.isConnected,Oo=e=>{for(const t in e)if(Ot(e[t]))return!0;return!1};function mr(e,t={}){const r=Array.isArray(e);if(ge(e)||r)for(const n in e)Array.isArray(e[n])||ge(e[n])&&!Oo(e[n])?(t[n]=Array.isArray(e[n])?[]:{},mr(e[n],t[n])):be(e[n])||(t[n]=!0);return t}function wo(e,t,r){const n=Array.isArray(e);if(ge(e)||n)for(const i in e)Array.isArray(e[i])||ge(e[i])&&!Oo(e[i])?te(t)||pr(r[i])?r[i]=Array.isArray(e[i])?mr(e[i],[]):{...mr(e[i])}:wo(e[i],be(t)?{}:t[i],r[i]):st(e[i],t[i])?delete r[i]:r[i]=!0;return r}var tn=(e,t)=>wo(e,t,mr(t)),Eo=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>te(e)?e:t?e===""?NaN:e&&+e:r&&Ue(e)?new Date(e):n?n(e):e;function rn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return jn(t)?t.files:Dn(t)?bo(e.refs).value:So(t)?[...t.selectedOptions].map(({value:r})=>r):qt(t)?yo(e.refs).value:Eo(te(t.value)?e.ref.value:t.value,e)}var Uu=(e,t,r,n)=>{const i={};for(const a of e){const o=$(t,a);o&&Q(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Nt=e=>te(e)?e:hr(e)?e.source:ge(e)?hr(e.value)?e.value.source:e.value:e,Vu=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ii(e,t,r){const n=$(e,r);if(n||Mn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=$(t,a),s=$(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};i.pop()}return{name:r}}var Bu=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Hu=(e,t)=>!At($(e,t)).length&&me(e,t);const Wu={mode:Ce.onSubmit,reValidateMode:Ce.onChange,shouldFocusError:!0};function Gu(e={},t){let r={...Wu,...e};const n=e.resetOptions&&e.resetOptions.keepDirtyValues;let i={submitCount:0,isDirty:!1,isLoading:!0,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},a={},o=ge(r.defaultValues)?we(r.defaultValues)||{}:{},s=r.shouldUnregister?{}:we(o),u={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},f,c=0;const g={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={watch:Xr(),array:Xr(),state:Xr()},h=mn(r.mode),b=mn(r.reValidateMode),y=r.criteriaMode===Ce.all,p=v=>P=>{clearTimeout(c),c=window.setTimeout(v,P)},m=async()=>{if(g.isValid){const v=r.resolver?Oe((await k()).errors):await F(a,!0);v!==i.isValid&&(i.isValid=v,d.state.next({isValid:v}))}},O=v=>g.isValidating&&d.state.next({isValidating:v}),w=(v,P=[],C,R,L=!0,_=!0)=>{if(R&&C){if(u.action=!0,_&&Array.isArray($(a,v))){const M=C($(a,v),R.argA,R.argB);L&&Q(a,v,M)}if(_&&Array.isArray($(i.errors,v))){const M=C($(i.errors,v),R.argA,R.argB);L&&Q(i.errors,v,M),Hu(i.errors,v)}if(g.touchedFields&&_&&Array.isArray($(i.touchedFields,v))){const M=C($(i.touchedFields,v),R.argA,R.argB);L&&Q(i.touchedFields,v,M)}g.dirtyFields&&(i.dirtyFields=tn(o,s)),d.state.next({name:v,isDirty:U(v,P),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Q(s,v,P)},E=(v,P)=>{Q(i.errors,v,P),d.state.next({errors:i.errors})},x=(v,P,C,R)=>{const L=$(a,v);if(L){const _=$(s,v,te(C)?$(o,v):C);te(_)||R&&R.defaultChecked||P?Q(s,v,P?_:rn(L._f)):K(v,_),u.mount&&m()}},T=(v,P,C,R,L)=>{let _=!1,M=!1;const ee={name:v};if(!C||R){g.isDirty&&(M=i.isDirty,i.isDirty=ee.isDirty=U(),_=M!==ee.isDirty);const J=st($(o,v),P);M=$(i.dirtyFields,v),J?me(i.dirtyFields,v):Q(i.dirtyFields,v,!0),ee.dirtyFields=i.dirtyFields,_=_||g.dirtyFields&&M!==!J}if(C){const J=$(i.touchedFields,v);J||(Q(i.touchedFields,v,C),ee.touchedFields=i.touchedFields,_=_||g.touchedFields&&J!==C)}return _&&L&&d.state.next(ee),_?ee:{}},I=(v,P,C,R)=>{const L=$(i.errors,v),_=g.isValid&&St(P)&&i.isValid!==P;if(e.delayError&&C?(f=p(()=>E(v,C)),f(e.delayError)):(clearTimeout(c),f=null,C?Q(i.errors,v,C):me(i.errors,v)),(C?!st(L,C):L)||!Oe(R)||_){const M={...R,..._&&St(P)?{isValid:P}:{},errors:i.errors,name:v};i={...i,...M},d.state.next(M)}O(!1)},k=async v=>await r.resolver(s,r.context,Uu(v||l.mount,a,r.criteriaMode,r.shouldUseNativeValidation)),D=async v=>{const{errors:P}=await k();if(v)for(const C of v){const R=$(P,C);R?Q(i.errors,C,R):me(i.errors,C)}else i.errors=P;return P},F=async(v,P,C={valid:!0})=>{for(const R in v){const L=v[R];if(L){const{_f:_,...M}=L;if(_){const ee=l.array.has(_.name),J=await yn(L,$(s,_.name),y,r.shouldUseNativeValidation,ee);if(J[_.name]&&(C.valid=!1,P))break;!P&&($(J,_.name)?ee?vo(i.errors,J,_.name):Q(i.errors,_.name,J[_.name]):me(i.errors,_.name))}M&&await F(M,P,C)}}return C.valid},j=()=>{for(const v of l.unMount){const P=$(a,v);P&&(P._f.refs?P._f.refs.every(C=>!en(C)):!en(P._f.ref))&&he(v)}l.unMount=new Set},U=(v,P)=>(v&&P&&Q(s,v,P),!st(ce(),o)),B=(v,P,C)=>go(v,l,{...u.mount?s:te(P)?o:Ue(v)?{[v]:P}:P},C,P),re=v=>At($(u.mount?s:o,v,e.shouldUnregister?$(o,v,[]):[])),K=(v,P,C={})=>{const R=$(a,v);let L=P;if(R){const _=R._f;_&&(!_.disabled&&Q(s,v,Eo(P,_)),L=gr(_.ref)&&be(P)?"":P,So(_.ref)?[..._.ref.options].forEach(M=>M.selected=L.includes(M.value)):_.refs?qt(_.ref)?_.refs.length>1?_.refs.forEach(M=>(!M.defaultChecked||!M.disabled)&&(M.checked=Array.isArray(L)?!!L.find(ee=>ee===M.value):L===M.value)):_.refs[0]&&(_.refs[0].checked=!!L):_.refs.forEach(M=>M.checked=M.value===L):jn(_.ref)?_.ref.value="":(_.ref.value=L,_.ref.type||d.watch.next({name:v})))}(C.shouldDirty||C.shouldTouch)&&T(v,L,C.shouldTouch,C.shouldDirty,!0),C.shouldValidate&&G(v)},ne=(v,P,C)=>{for(const R in P){const L=P[R],_=`${v}.${R}`,M=$(a,_);(l.array.has(v)||!pr(L)||M&&!M._f)&&!bt(L)?ne(_,L,C):K(_,L,C)}},H=(v,P,C={})=>{const R=$(a,v),L=l.array.has(v),_=we(P);Q(s,v,_),L?(d.array.next({name:v,values:s}),(g.isDirty||g.dirtyFields)&&C.shouldDirty&&(i.dirtyFields=tn(o,s),d.state.next({name:v,dirtyFields:i.dirtyFields,isDirty:U(v,_)}))):R&&!R._f&&!be(_)?ne(v,_,C):K(v,_,C),vn(v,l)&&d.state.next({}),d.watch.next({name:v}),!u.mount&&t()},ie=async v=>{const P=v.target;let C=P.name;const R=$(a,C),L=()=>P.type?rn(R._f):io(v);if(R){let _,M;const ee=L(),J=v.type===cr.BLUR||v.type===cr.FOCUS_OUT,Ks=!Vu(R._f)&&!r.resolver&&!$(i.errors,C)&&!R._f.deps||Bu(J,$(i.touchedFields,C),i.isSubmitted,b,h),Br=vn(C,l,J);Q(s,C,ee),J?(R._f.onBlur&&R._f.onBlur(v),f&&f(0)):R._f.onChange&&R._f.onChange(v);const Hr=T(C,ee,J,!1),Ys=!Oe(Hr)||Br;if(!J&&d.watch.next({name:C,type:v.type}),Ks)return g.isValid&&m(),Ys&&d.state.next({name:C,...Br?{}:Hr});if(!J&&Br&&d.state.next({}),O(!0),r.resolver){const{errors:oi}=await k([C]),Qs=Ii(i.errors,a,C),si=Ii(oi,a,Qs.name||C);_=si.error,C=si.name,M=Oe(oi)}else _=(await yn(R,$(s,C),y,r.shouldUseNativeValidation))[C],_?M=!1:g.isValid&&(M=await F(a,!0));R._f.deps&&G(R._f.deps),I(C,M,_,Hr)}},G=async(v,P={})=>{let C,R;const L=Ee(v);if(O(!0),r.resolver){const _=await D(te(v)?v:L);C=Oe(_),R=v?!L.some(M=>$(_,M)):C}else v?(R=(await Promise.all(L.map(async _=>{const M=$(a,_);return await F(M&&M._f?{[_]:M}:M)}))).every(Boolean),!(!R&&!i.isValid)&&m()):R=C=await F(a);return d.state.next({...!Ue(v)||g.isValid&&C!==i.isValid?{}:{name:v},...r.resolver||!v?{isValid:C}:{},errors:i.errors,isValidating:!1}),P.shouldFocus&&!R&&dr(a,_=>_&&$(i.errors,_),v?L:l.mount),R},ce=v=>{const P={...o,...u.mount?s:{}};return te(v)?P:Ue(v)?$(P,v):v.map(C=>$(P,C))},Me=(v,P)=>({invalid:!!$((P||i).errors,v),isDirty:!!$((P||i).dirtyFields,v),isTouched:!!$((P||i).touchedFields,v),error:$((P||i).errors,v)}),se=v=>{v?Ee(v).forEach(P=>me(i.errors,P)):i.errors={},d.state.next({errors:i.errors})},ue=(v,P,C)=>{const R=($(a,v,{_f:{}})._f||{}).ref;Q(i.errors,v,{...P,ref:R}),d.state.next({name:v,errors:i.errors,isValid:!1}),C&&C.shouldFocus&&R&&R.focus&&R.focus()},Ae=(v,P)=>Ot(v)?d.watch.subscribe({next:C=>v(B(void 0,P),C)}):B(v,P,!0),he=(v,P={})=>{for(const C of v?Ee(v):l.mount)l.mount.delete(C),l.array.delete(C),$(a,C)&&(P.keepValue||(me(a,C),me(s,C)),!P.keepError&&me(i.errors,C),!P.keepDirty&&me(i.dirtyFields,C),!P.keepTouched&&me(i.touchedFields,C),!r.shouldUnregister&&!P.keepDefaultValue&&me(o,C));d.watch.next({}),d.state.next({...i,...P.keepDirty?{isDirty:U()}:{}}),!P.keepIsValid&&m()},z=(v,P={})=>{let C=$(a,v);const R=St(P.disabled);return Q(a,v,{...C||{},_f:{...C&&C._f?C._f:{ref:{name:v}},name:v,mount:!0,...P}}),l.mount.add(v),C?R&&Q(s,v,P.disabled?void 0:$(s,v,rn(C._f))):x(v,!0,P.value),{...R?{disabled:P.disabled}:{},...r.shouldUseNativeValidation?{required:!!P.required,min:Nt(P.min),max:Nt(P.max),minLength:Nt(P.minLength),maxLength:Nt(P.maxLength),pattern:Nt(P.pattern)}:{},name:v,onChange:ie,onBlur:ie,ref:L=>{if(L){z(v,P),C=$(a,v);const _=te(L.value)&&L.querySelectorAll&&L.querySelectorAll("input,select,textarea")[0]||L,M=Du(_),ee=C._f.refs||[];if(M?ee.find(J=>J===_):_===C._f.ref)return;Q(a,v,{_f:{...C._f,...M?{refs:[...ee.filter(en),_,...Array.isArray($(o,v))?[{}]:[]],ref:{type:_.type,name:v}}:{ref:_}}}),x(v,!1,void 0,_)}else C=$(a,v,{}),C._f&&(C._f.mount=!1),(r.shouldUnregister||P.shouldUnregister)&&!(ao(l.array,v)&&u.action)&&l.unMount.add(v)}}},ae=()=>r.shouldFocusError&&dr(a,v=>v&&$(i.errors,v),l.mount),q=(v,P)=>async C=>{C&&(C.preventDefault&&C.preventDefault(),C.persist&&C.persist());let R=!0,L=we(s);d.state.next({isSubmitting:!0});try{if(r.resolver){const{errors:_,values:M}=await k();i.errors=_,L=M}else await F(a);Oe(i.errors)?(d.state.next({errors:{},isSubmitting:!0}),await v(L,C)):(P&&await P({...i.errors},C),ae())}catch(_){throw R=!1,_}finally{i.isSubmitted=!0,d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Oe(i.errors)&&R,submitCount:i.submitCount+1,errors:i.errors})}},W=(v,P={})=>{$(a,v)&&(te(P.defaultValue)?H(v,$(o,v)):(H(v,P.defaultValue),Q(o,v,P.defaultValue)),P.keepTouched||me(i.touchedFields,v),P.keepDirty||(me(i.dirtyFields,v),i.isDirty=P.defaultValue?U(v,$(o,v)):U()),P.keepError||(me(i.errors,v),g.isValid&&m()),d.state.next({...i}))},le=(v,P={})=>{const C=v||o,R=we(C),L=v&&!Oe(v)?R:o;if(P.keepDefaultValues||(o=C),!P.keepValues){if(P.keepDirtyValues||n)for(const _ of l.mount)$(i.dirtyFields,_)?Q(L,_,$(s,_)):H(_,$(L,_));else{if(kn&&te(v))for(const _ of l.mount){const M=$(a,_);if(M&&M._f){const ee=Array.isArray(M._f.refs)?M._f.refs[0]:M._f.ref;if(gr(ee)){const J=ee.closest("form");if(J){J.reset();break}}}}a={}}s=e.shouldUnregister?P.keepDefaultValues?we(o):{}:R,d.array.next({values:L}),d.watch.next({values:L})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!u.mount&&t(),u.mount=!g.isValid||!!P.keepIsValid,u.watch=!!e.shouldUnregister,d.state.next({submitCount:P.keepSubmitCount?i.submitCount:0,isDirty:P.keepDirty||P.keepDirtyValues?i.isDirty:!!(P.keepDefaultValues&&!st(v,o)),isSubmitted:P.keepIsSubmitted?i.isSubmitted:!1,dirtyFields:P.keepDirty||P.keepDirtyValues?i.dirtyFields:P.keepDefaultValues&&v?tn(o,v):{},touchedFields:P.keepTouched?i.touchedFields:{},errors:P.keepErrors?i.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},fe=(v,P)=>le(Ot(v)?v(s):v,P),Se=(v,P={})=>{const C=$(a,v),R=C&&C._f;if(R){const L=R.refs?R.refs[0]:R.ref;L.focus&&(L.focus(),P.shouldSelect&&L.select())}};return Ot(r.defaultValues)&&r.defaultValues().then(v=>{fe(v,r.resetOptions),d.state.next({isLoading:!1})}),{control:{register:z,unregister:he,getFieldState:Me,_executeSchema:k,_focusError:ae,_getWatch:B,_getDirty:U,_updateValid:m,_removeUnmounted:j,_updateFieldArray:w,_getFieldArray:re,_reset:le,_subjects:d,_proxyFormState:g,get _fields(){return a},get _formValues(){return s},get _stateFlags(){return u},set _stateFlags(v){u=v},get _defaultValues(){return o},get _names(){return l},set _names(v){l=v},get _formState(){return i},set _formState(v){i=v},get _options(){return r},set _options(v){r={...r,...v}}},trigger:G,register:z,handleSubmit:q,watch:Ae,setValue:H,getValues:ce,reset:fe,resetField:W,clearErrors:se,unregister:he,setError:ue,setFocus:Se,getFieldState:Me}}function Po(e={}){const t=N.default.useRef(),[r,n]=N.default.useState({isDirty:!1,isValidating:!1,isLoading:!0,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Ot(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Gu(e,()=>n(a=>({...a}))),formState:r});const i=t.current.control;return i._options=e,Cr({subject:i._subjects.state,next:a=>{lo(a,i._proxyFormState,!0)&&(i._formState={...i._formState,...a},n({...i._formState}))}}),N.default.useEffect(()=>{i._stateFlags.mount||(i._proxyFormState.isValid&&i._updateValid(),i._stateFlags.mount=!0),i._stateFlags.watch&&(i._stateFlags.watch=!1,i._subjects.state.next({})),i._removeUnmounted()}),N.default.useEffect(()=>{e.values&&!st(e.values,i._defaultValues)&&i._reset(e.values,i._options.resetOptions)},[e.values,i]),N.default.useEffect(()=>{r.submitCount&&i._focusError()},[i,r.submitCount]),t.current.formState=uo(r,i),t.current}var zu=Object.freeze(Object.defineProperty({__proto__:null,Controller:Lu,FormProvider:so,appendErrors:po,get:$,set:Q,useController:ho,useFieldArray:ju,useForm:Po,useFormContext:He,useFormState:fo,useWatch:fr},Symbol.toStringTag,{value:"Module"})),Ao=(e=>(e.FULL_PAGE="FULL_PAGE",e.MODAL="MODAL",e))(Ao||{}),Co=(e=>(e.SIMPLE="SIMPLE",e.COMPLEX="COMPLEX",e.QUANTITY="QUANTITY",e))(Co||{}),Un=(e=>(e.SELECT="selCtx",e.FILTER="fltCtx",e))(Un||{}),Vn=(e=>(e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.PRODUCT="3e/product",e))(Vn||{}),xe=(e=>(e.OK="OK",e.TOO_MUCH="TOO_MUCH",e.NOT_ENOUGHT="NOT_ENOUGHT",e.IGNORE="IGNORE",e))(xe||{});const qu=(e,t,r)=>{var i,a;if(e==="selected"||e==="filter")return[];if(r[t]===e)return[r];let n=_o(e,t,(i=r.items)!=null?i:[]);return n!=null&&n.length||(n=xo(e,t,(a=r.items)!=null?a:[]),n.length),n},xo=(e,t,r)=>{const n=Ku(r),i=_o(e,t,n);return i!=null&&i.length?i:n!=null&&n.length?xo(e,t,n):[]},Ku=e=>{let t=[];return Array.isArray(e)&&(t=e.map(r=>{if(Array.isArray(r==null?void 0:r.items))return r.items}).filter(r=>r!==void 0)),t.flat(1)},_o=(e,t,r)=>{let n=[];return Array.isArray(r)&&(n=r.filter(i=>{if(i&&i[t]===e)return!0})),n},Yu=(e,t,r,n)=>{const i=qu(t,r,n),a=Qu(e,i).filter(o=>o!==null&&typeof o!="undefined");return a.length?a[0]:null},Qu=(e,t)=>{let r=[];return Array.isArray(t)&&t.length&&(r=t.map(n=>Ju(e,n))),r},Ju=(e,t)=>{if(t.id===e)return t;let r=No(e,t.items);return r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):(r=To(e,t.items),r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):null)},To=(e,t)=>{const r=Zu(t),n=No(e,r);return n!=null&&n.length?n:r!=null&&r.length?To(e,r):[]},Zu=e=>{let t=[];return Array.isArray(e)&&(t=e.map(r=>{if(Array.isArray(r==null?void 0:r.items))return r.items}).filter(r=>r!==void 0)),t.flat(1)},No=(e,t)=>Array.isArray(t)?t.filter(n=>{if(n&&n.id===e)return!0}):[],Bn=(e,t)=>{let r=0;for(const[n,i]of Object.entries(e))if(i){for(const[a,o]of Object.entries(i))if(o){const s=Yu(a,n,Un.SELECT,t);s&&(s==null?void 0:s.price)?r+=parseFloat(s.price)*o:s||console.warn(`Error finding product: ${a} in selCtx: ${n}`)}}return r},$o=e=>{const{price:t,state:{selected:r}={}}=e;return(!t||parseFloat(t||"1")===0)&&r?`${Bn(r,e)||"0"}`:t};var Xu=typeof global=="object"&&global&&global.Object===Object&&global,Io=Xu,el=typeof self=="object"&&self&&self.Object===Object&&self,tl=Io||el||Function("return this")(),We=tl,rl=We.Symbol,rt=rl,Ro=Object.prototype,nl=Ro.hasOwnProperty,il=Ro.toString,$t=rt?rt.toStringTag:void 0;function al(e){var t=nl.call(e,$t),r=e[$t];try{e[$t]=void 0;var n=!0}catch{}var i=il.call(e);return n&&(t?e[$t]=r:delete e[$t]),i}var ol=Object.prototype,sl=ol.toString;function ul(e){return sl.call(e)}var ll="[object Null]",cl="[object Undefined]",Ri=rt?rt.toStringTag:void 0;function Ct(e){return e==null?e===void 0?cl:ll:Ri&&Ri in Object(e)?al(e):ul(e)}function nt(e){return e!=null&&typeof e=="object"}var fl="[object Symbol]";function dl(e){return typeof e=="symbol"||nt(e)&&Ct(e)==fl}var gl=Array.isArray,wt=gl,hl=/\s/;function pl(e){for(var t=e.length;t--&&hl.test(e.charAt(t)););return t}var ml=/^\s+/;function vl(e){return e&&e.slice(0,pl(e)+1).replace(ml,"")}function lt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Li=0/0,yl=/^[-+]0x[0-9a-f]+$/i,bl=/^0b[01]+$/i,Sl=/^0o[0-7]+$/i,Ol=parseInt;function Lo(e){if(typeof e=="number")return e;if(dl(e))return Li;if(lt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=lt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vl(e);var r=bl.test(e);return r||Sl.test(e)?Ol(e.slice(2),r?2:8):yl.test(e)?Li:+e}var Fi=1/0,wl=17976931348623157e292;function ki(e){if(!e)return e===0?e:0;if(e=Lo(e),e===Fi||e===-Fi){var t=e<0?-1:1;return t*wl}return e===e?e:0}var El="[object AsyncFunction]",Pl="[object Function]",Al="[object GeneratorFunction]",Cl="[object Proxy]";function Fo(e){if(!lt(e))return!1;var t=Ct(e);return t==Pl||t==Al||t==El||t==Cl}var xl=We["__core-js_shared__"],nn=xl,Mi=function(){var e=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _l(e){return!!Mi&&Mi in e}var Tl=Function.prototype,Nl=Tl.toString;function dt(e){if(e!=null){try{return Nl.call(e)}catch{}try{return e+""}catch{}}return""}var $l=/[\\^$.*+?()[\]{}|]/g,Il=/^\[object .+?Constructor\]$/,Rl=Function.prototype,Ll=Object.prototype,Fl=Rl.toString,kl=Ll.hasOwnProperty,Ml=RegExp("^"+Fl.call(kl).replace($l,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jl(e){if(!lt(e)||_l(e))return!1;var t=Fo(e)?Ml:Il;return t.test(dt(e))}function Dl(e,t){return e==null?void 0:e[t]}function gt(e,t){var r=Dl(e,t);return jl(r)?r:void 0}var Ul=gt(We,"WeakMap"),bn=Ul,ji=Object.create,Vl=function(){function e(){}return function(t){if(!lt(t))return{};if(ji)return ji(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Bl=Vl;function Hl(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Wl=function(){try{var e=gt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Di=Wl;function Gl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var zl=9007199254740991,ql=/^(?:0|[1-9]\d*)$/;function Kl(e,t){var r=typeof e;return t=t==null?zl:t,!!t&&(r=="number"||r!="symbol"&&ql.test(e))&&e>-1&&e%1==0&&e<t}function ko(e,t,r){t=="__proto__"&&Di?Di(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Hn(e,t){return e===t||e!==e&&t!==t}var Yl=Object.prototype,Ql=Yl.hasOwnProperty;function Mo(e,t,r){var n=e[t];(!(Ql.call(e,t)&&Hn(n,r))||r===void 0&&!(t in e))&&ko(e,t,r)}function xr(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?ko(r,s,u):Mo(r,s,u)}return r}var Jl=9007199254740991;function jo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Jl}function Wn(e){return e!=null&&jo(e.length)&&!Fo(e)}var Zl=Object.prototype;function _r(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Zl;return e===r}function Xl(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ec="[object Arguments]";function Ui(e){return nt(e)&&Ct(e)==ec}var Do=Object.prototype,tc=Do.hasOwnProperty,rc=Do.propertyIsEnumerable,nc=Ui(function(){return arguments}())?Ui:function(e){return nt(e)&&tc.call(e,"callee")&&!rc.call(e,"callee")},Uo=nc;function ic(){return!1}var Vo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vi=Vo&&typeof module=="object"&&module&&!module.nodeType&&module,ac=Vi&&Vi.exports===Vo,Bi=ac?We.Buffer:void 0,oc=Bi?Bi.isBuffer:void 0,sc=oc||ic,Bt=sc,uc="[object Arguments]",lc="[object Array]",cc="[object Boolean]",fc="[object Date]",dc="[object Error]",gc="[object Function]",hc="[object Map]",pc="[object Number]",mc="[object Object]",vc="[object RegExp]",yc="[object Set]",bc="[object String]",Sc="[object WeakMap]",Oc="[object ArrayBuffer]",wc="[object DataView]",Ec="[object Float32Array]",Pc="[object Float64Array]",Ac="[object Int8Array]",Cc="[object Int16Array]",xc="[object Int32Array]",_c="[object Uint8Array]",Tc="[object Uint8ClampedArray]",Nc="[object Uint16Array]",$c="[object Uint32Array]",X={};X[Ec]=X[Pc]=X[Ac]=X[Cc]=X[xc]=X[_c]=X[Tc]=X[Nc]=X[$c]=!0;X[uc]=X[lc]=X[Oc]=X[cc]=X[wc]=X[fc]=X[dc]=X[gc]=X[hc]=X[pc]=X[mc]=X[vc]=X[yc]=X[bc]=X[Sc]=!1;function Ic(e){return nt(e)&&jo(e.length)&&!!X[Ct(e)]}function Gn(e){return function(t){return e(t)}}var Bo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ut=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,Rc=Ut&&Ut.exports===Bo,an=Rc&&Io.process,Lc=function(){try{var e=Ut&&Ut.require&&Ut.require("util").types;return e||an&&an.binding&&an.binding("util")}catch{}}(),Et=Lc,Hi=Et&&Et.isTypedArray,Fc=Hi?Gn(Hi):Ic,zn=Fc,kc=Object.prototype,Mc=kc.hasOwnProperty;function Ho(e,t){var r=wt(e),n=!r&&Uo(e),i=!r&&!n&&Bt(e),a=!r&&!n&&!i&&zn(e),o=r||n||i||a,s=o?Xl(e.length,String):[],u=s.length;for(var l in e)(t||Mc.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Kl(l,u)))&&s.push(l);return s}function Wo(e,t){return function(r){return e(t(r))}}var jc=Wo(Object.keys,Object),Dc=jc,Uc=Object.prototype,Vc=Uc.hasOwnProperty;function Go(e){if(!_r(e))return Dc(e);var t=[];for(var r in Object(e))Vc.call(e,r)&&r!="constructor"&&t.push(r);return t}function qn(e){return Wn(e)?Ho(e):Go(e)}function Bc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Hc=Object.prototype,Wc=Hc.hasOwnProperty;function Gc(e){if(!lt(e))return Bc(e);var t=_r(e),r=[];for(var n in e)n=="constructor"&&(t||!Wc.call(e,n))||r.push(n);return r}function Kn(e){return Wn(e)?Ho(e,!0):Gc(e)}var zc=gt(Object,"create"),Ht=zc;function qc(){this.__data__=Ht?Ht(null):{},this.size=0}function Kc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yc="__lodash_hash_undefined__",Qc=Object.prototype,Jc=Qc.hasOwnProperty;function Zc(e){var t=this.__data__;if(Ht){var r=t[e];return r===Yc?void 0:r}return Jc.call(t,e)?t[e]:void 0}var Xc=Object.prototype,ef=Xc.hasOwnProperty;function tf(e){var t=this.__data__;return Ht?t[e]!==void 0:ef.call(t,e)}var rf="__lodash_hash_undefined__";function nf(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ht&&t===void 0?rf:t,this}function ct(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ct.prototype.clear=qc;ct.prototype.delete=Kc;ct.prototype.get=Zc;ct.prototype.has=tf;ct.prototype.set=nf;function af(){this.__data__=[],this.size=0}function Tr(e,t){for(var r=e.length;r--;)if(Hn(e[r][0],t))return r;return-1}var of=Array.prototype,sf=of.splice;function uf(e){var t=this.__data__,r=Tr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():sf.call(t,r,1),--this.size,!0}function lf(e){var t=this.__data__,r=Tr(t,e);return r<0?void 0:t[r][1]}function cf(e){return Tr(this.__data__,e)>-1}function ff(e,t){var r=this.__data__,n=Tr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ye.prototype.clear=af;Ye.prototype.delete=uf;Ye.prototype.get=lf;Ye.prototype.has=cf;Ye.prototype.set=ff;var df=gt(We,"Map"),Wt=df;function gf(){this.size=0,this.__data__={hash:new ct,map:new(Wt||Ye),string:new ct}}function hf(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Nr(e,t){var r=e.__data__;return hf(t)?r[typeof t=="string"?"string":"hash"]:r.map}function pf(e){var t=Nr(this,e).delete(e);return this.size-=t?1:0,t}function mf(e){return Nr(this,e).get(e)}function vf(e){return Nr(this,e).has(e)}function yf(e,t){var r=Nr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ht(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ht.prototype.clear=gf;ht.prototype.delete=pf;ht.prototype.get=mf;ht.prototype.has=vf;ht.prototype.set=yf;function zo(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var bf=Wo(Object.getPrototypeOf,Object),qo=bf;function Sf(){this.__data__=new Ye,this.size=0}function Of(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function wf(e){return this.__data__.get(e)}function Ef(e){return this.__data__.has(e)}var Pf=200;function Af(e,t){var r=this.__data__;if(r instanceof Ye){var n=r.__data__;if(!Wt||n.length<Pf-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ht(n)}return r.set(e,t),this.size=r.size,this}function qe(e){var t=this.__data__=new Ye(e);this.size=t.size}qe.prototype.clear=Sf;qe.prototype.delete=Of;qe.prototype.get=wf;qe.prototype.has=Ef;qe.prototype.set=Af;function Cf(e,t){return e&&xr(t,qn(t),e)}function xf(e,t){return e&&xr(t,Kn(t),e)}var Ko=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wi=Ko&&typeof module=="object"&&module&&!module.nodeType&&module,_f=Wi&&Wi.exports===Ko,Gi=_f?We.Buffer:void 0,zi=Gi?Gi.allocUnsafe:void 0;function Tf(e,t){if(t)return e.slice();var r=e.length,n=zi?zi(r):new e.constructor(r);return e.copy(n),n}function Nf(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}function Yo(){return[]}var $f=Object.prototype,If=$f.propertyIsEnumerable,qi=Object.getOwnPropertySymbols,Rf=qi?function(e){return e==null?[]:(e=Object(e),Nf(qi(e),function(t){return If.call(e,t)}))}:Yo,Yn=Rf;function Lf(e,t){return xr(e,Yn(e),t)}var Ff=Object.getOwnPropertySymbols,kf=Ff?function(e){for(var t=[];e;)zo(t,Yn(e)),e=qo(e);return t}:Yo,Qo=kf;function Mf(e,t){return xr(e,Qo(e),t)}function Jo(e,t,r){var n=t(e);return wt(e)?n:zo(n,r(e))}function Sn(e){return Jo(e,qn,Yn)}function jf(e){return Jo(e,Kn,Qo)}var Df=gt(We,"DataView"),On=Df,Uf=gt(We,"Promise"),wn=Uf,Vf=gt(We,"Set"),En=Vf,Ki="[object Map]",Bf="[object Object]",Yi="[object Promise]",Qi="[object Set]",Ji="[object WeakMap]",Zi="[object DataView]",Hf=dt(On),Wf=dt(Wt),Gf=dt(wn),zf=dt(En),qf=dt(bn),at=Ct;(On&&at(new On(new ArrayBuffer(1)))!=Zi||Wt&&at(new Wt)!=Ki||wn&&at(wn.resolve())!=Yi||En&&at(new En)!=Qi||bn&&at(new bn)!=Ji)&&(at=function(e){var t=Ct(e),r=t==Bf?e.constructor:void 0,n=r?dt(r):"";if(n)switch(n){case Hf:return Zi;case Wf:return Ki;case Gf:return Yi;case zf:return Qi;case qf:return Ji}return t});var Pt=at,Kf=Object.prototype,Yf=Kf.hasOwnProperty;function Qf(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Yf.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Jf=We.Uint8Array,vr=Jf;function Qn(e){var t=new e.constructor(e.byteLength);return new vr(t).set(new vr(e)),t}function Zf(e,t){var r=t?Qn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Xf=/\w*$/;function ed(e){var t=new e.constructor(e.source,Xf.exec(e));return t.lastIndex=e.lastIndex,t}var Xi=rt?rt.prototype:void 0,ea=Xi?Xi.valueOf:void 0;function td(e){return ea?Object(ea.call(e)):{}}function rd(e,t){var r=t?Qn(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var nd="[object Boolean]",id="[object Date]",ad="[object Map]",od="[object Number]",sd="[object RegExp]",ud="[object Set]",ld="[object String]",cd="[object Symbol]",fd="[object ArrayBuffer]",dd="[object DataView]",gd="[object Float32Array]",hd="[object Float64Array]",pd="[object Int8Array]",md="[object Int16Array]",vd="[object Int32Array]",yd="[object Uint8Array]",bd="[object Uint8ClampedArray]",Sd="[object Uint16Array]",Od="[object Uint32Array]";function wd(e,t,r){var n=e.constructor;switch(t){case fd:return Qn(e);case nd:case id:return new n(+e);case dd:return Zf(e,r);case gd:case hd:case pd:case md:case vd:case yd:case bd:case Sd:case Od:return rd(e,r);case ad:return new n;case od:case ld:return new n(e);case sd:return ed(e);case ud:return new n;case cd:return td(e)}}function Ed(e){return typeof e.constructor=="function"&&!_r(e)?Bl(qo(e)):{}}var Pd="[object Map]";function Ad(e){return nt(e)&&Pt(e)==Pd}var ta=Et&&Et.isMap,Cd=ta?Gn(ta):Ad,xd=Cd,_d="[object Set]";function Td(e){return nt(e)&&Pt(e)==_d}var ra=Et&&Et.isSet,Nd=ra?Gn(ra):Td,$d=Nd,Id=1,Rd=2,Ld=4,Zo="[object Arguments]",Fd="[object Array]",kd="[object Boolean]",Md="[object Date]",jd="[object Error]",Xo="[object Function]",Dd="[object GeneratorFunction]",Ud="[object Map]",Vd="[object Number]",es="[object Object]",Bd="[object RegExp]",Hd="[object Set]",Wd="[object String]",Gd="[object Symbol]",zd="[object WeakMap]",qd="[object ArrayBuffer]",Kd="[object DataView]",Yd="[object Float32Array]",Qd="[object Float64Array]",Jd="[object Int8Array]",Zd="[object Int16Array]",Xd="[object Int32Array]",eg="[object Uint8Array]",tg="[object Uint8ClampedArray]",rg="[object Uint16Array]",ng="[object Uint32Array]",Y={};Y[Zo]=Y[Fd]=Y[qd]=Y[Kd]=Y[kd]=Y[Md]=Y[Yd]=Y[Qd]=Y[Jd]=Y[Zd]=Y[Xd]=Y[Ud]=Y[Vd]=Y[es]=Y[Bd]=Y[Hd]=Y[Wd]=Y[Gd]=Y[eg]=Y[tg]=Y[rg]=Y[ng]=!0;Y[jd]=Y[Xo]=Y[zd]=!1;function ir(e,t,r,n,i,a){var o,s=t&Id,u=t&Rd,l=t&Ld;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!lt(e))return e;var f=wt(e);if(f){if(o=Qf(e),!s)return Hl(e,o)}else{var c=Pt(e),g=c==Xo||c==Dd;if(Bt(e))return Tf(e,s);if(c==es||c==Zo||g&&!i){if(o=u||g?{}:Ed(e),!s)return u?Mf(e,xf(o,e)):Lf(e,Cf(o,e))}else{if(!Y[c])return i?e:{};o=wd(e,c,s)}}a||(a=new qe);var d=a.get(e);if(d)return d;a.set(e,o),$d(e)?e.forEach(function(y){o.add(ir(y,t,r,y,e,a))}):xd(e)&&e.forEach(function(y,p){o.set(p,ir(y,t,r,p,e,a))});var h=l?u?jf:Sn:u?Kn:qn,b=f?void 0:h(e);return Gl(b||e,function(y,p){b&&(p=y,y=e[p]),Mo(o,p,ir(y,t,r,p,e,a))}),o}var ig=1,ag=4;function ts(e){return ir(e,ig|ag)}var og="__lodash_hash_undefined__";function sg(e){return this.__data__.set(e,og),this}function ug(e){return this.__data__.has(e)}function yr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ht;++t<r;)this.add(e[t])}yr.prototype.add=yr.prototype.push=sg;yr.prototype.has=ug;function lg(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function cg(e,t){return e.has(t)}var fg=1,dg=2;function rs(e,t,r,n,i,a){var o=r&fg,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var c=-1,g=!0,d=r&dg?new yr:void 0;for(a.set(e,t),a.set(t,e);++c<s;){var h=e[c],b=t[c];if(n)var y=o?n(b,h,c,t,e,a):n(h,b,c,e,t,a);if(y!==void 0){if(y)continue;g=!1;break}if(d){if(!lg(t,function(p,m){if(!cg(d,m)&&(h===p||i(h,p,r,n,a)))return d.push(m)})){g=!1;break}}else if(!(h===b||i(h,b,r,n,a))){g=!1;break}}return a.delete(e),a.delete(t),g}function gg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function hg(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var pg=1,mg=2,vg="[object Boolean]",yg="[object Date]",bg="[object Error]",Sg="[object Map]",Og="[object Number]",wg="[object RegExp]",Eg="[object Set]",Pg="[object String]",Ag="[object Symbol]",Cg="[object ArrayBuffer]",xg="[object DataView]",na=rt?rt.prototype:void 0,on=na?na.valueOf:void 0;function _g(e,t,r,n,i,a,o){switch(r){case xg:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Cg:return!(e.byteLength!=t.byteLength||!a(new vr(e),new vr(t)));case vg:case yg:case Og:return Hn(+e,+t);case bg:return e.name==t.name&&e.message==t.message;case wg:case Pg:return e==t+"";case Sg:var s=gg;case Eg:var u=n&pg;if(s||(s=hg),e.size!=t.size&&!u)return!1;var l=o.get(e);if(l)return l==t;n|=mg,o.set(e,t);var f=rs(s(e),s(t),n,i,a,o);return o.delete(e),f;case Ag:if(on)return on.call(e)==on.call(t)}return!1}var Tg=1,Ng=Object.prototype,$g=Ng.hasOwnProperty;function Ig(e,t,r,n,i,a){var o=r&Tg,s=Sn(e),u=s.length,l=Sn(t),f=l.length;if(u!=f&&!o)return!1;for(var c=u;c--;){var g=s[c];if(!(o?g in t:$g.call(t,g)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var b=!0;a.set(e,t),a.set(t,e);for(var y=o;++c<u;){g=s[c];var p=e[g],m=t[g];if(n)var O=o?n(m,p,g,t,e,a):n(p,m,g,e,t,a);if(!(O===void 0?p===m||i(p,m,r,n,a):O)){b=!1;break}y||(y=g=="constructor")}if(b&&!y){var w=e.constructor,E=t.constructor;w!=E&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof E=="function"&&E instanceof E)&&(b=!1)}return a.delete(e),a.delete(t),b}var Rg=1,ia="[object Arguments]",aa="[object Array]",er="[object Object]",Lg=Object.prototype,oa=Lg.hasOwnProperty;function Fg(e,t,r,n,i,a){var o=wt(e),s=wt(t),u=o?aa:Pt(e),l=s?aa:Pt(t);u=u==ia?er:u,l=l==ia?er:l;var f=u==er,c=l==er,g=u==l;if(g&&Bt(e)){if(!Bt(t))return!1;o=!0,f=!1}if(g&&!f)return a||(a=new qe),o||zn(e)?rs(e,t,r,n,i,a):_g(e,t,u,r,n,i,a);if(!(r&Rg)){var d=f&&oa.call(e,"__wrapped__"),h=c&&oa.call(t,"__wrapped__");if(d||h){var b=d?e.value():e,y=h?t.value():t;return a||(a=new qe),i(b,y,r,n,a)}}return g?(a||(a=new qe),Ig(e,t,r,n,i,a)):!1}function ns(e,t,r,n,i){return e===t?!0:e==null||t==null||!nt(e)&&!nt(t)?e!==e&&t!==t:Fg(e,t,r,n,ns,i)}var kg=Math.max,Mg=Math.min;function jg(e,t,r){return e>=Mg(t,r)&&e<kg(t,r)}function br(e,t,r){return t=ki(t),r===void 0?(r=t,t=0):r=ki(r),e=Lo(e),jg(e,t,r)}var Dg="[object Map]",Ug="[object Set]",Vg=Object.prototype,Bg=Vg.hasOwnProperty;function Re(e){if(e==null)return!0;if(Wn(e)&&(wt(e)||typeof e=="string"||typeof e.splice=="function"||Bt(e)||zn(e)||Uo(e)))return!e.length;var t=Pt(e);if(t==Dg||t==Ug)return!e.size;if(_r(e))return!Go(e).length;for(var r in e)if(Bg.call(e,r))return!1;return!0}function Hg(e,t){return ns(e,t)}const Wg=["id","selCtx","fltCtx"],is=".",as="#dot",os="#FIX_NUMBER",Gg=e=>us(ts(e),Kg),zg=e=>{const t=e.replaceAll(is,as);return/^\d+$/.test(t)?`${os}${t}`:t},qg=e=>e.replaceAll(as,is).replaceAll(os,""),Kg=(e,t)=>ss(e,t,zg),Yg=(e,t)=>ss(e,t,qg),ss=(e,t,r)=>{let n=t;function i(a){const o={};for(const s in a)if(a.hasOwnProperty(s)){const u=r(s);let l=a[s];typeof a[s]=="object"&&a[s]!==null&&(l=i(a[s])),o[u]=l}return o}return Wg.includes(e)&&(typeof t=="string"||t instanceof String)&&(n=r(t)),(e==="selected"||e==="filter")&&(n=i(t)),n},us=(e,t)=>(Object.keys(e).forEach(r=>{const n=e[r];e[r]=t(r,n),typeof n=="object"&&n!==null&&us(n,t)}),e),ls=e=>{const t=JSON.parse(JSON.stringify(e));for(const[r,n]of Object.entries(t))if(n&&!Array.isArray(n)){const i=t[r];for(const[a,o]of Object.entries(i))o===!1&&delete i[a];Object.keys(i).length===0&&delete t[r]}else delete t[r];return t},Qg=e=>Yg("selected",e);var sa;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(sa||(sa={}));var ua;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(ua||(ua={}));var Le;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.GROUP_UPSELL="3e/group/upsell",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query",e.CMS="3e/cms"})(Le||(Le={}));var la;(function(e){e.GROUP="group",e.PRODUCT="product"})(la||(la={}));var ca;(function(e){e.CREATOR="CREATOR",e.CUSTOMER="CUSTOMER",e.COUPONS="COUPON",e.KIOSK="KIOSK",e.WAITER="WAITER",e.MANAGER="MANAGER",e.VIEWER="VIEWER",e.DRIVER="DRIVER",e.STAFF="STAFF"})(ca||(ca={}));var fa;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.BOLT_DINE_IN="BOLT_DINE_IN",e.TAZZ_DELIVERY="TAZZ_DELIVERY",e.TAZZ_TAKE_AWAY="TAZZ_TAKE_AWAY",e.UPMENU_DELIVERY="UPMENU_DELIVERY",e.UPMENU_TAKE_AWAY="UPMENU_TAKE_AWAY",e.UPMENU_DINE_IN="UPMENU_DINE_IN"})(fa||(fa={}));var da;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT",e.TAZZ="TAZZ",e.POS="POS",e.UPMENU="UPMENU",e.APP="APP"})(da||(da={}));var ga;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT",e.TAZZ="TAZZ",e.UPMENU="UPMENU"})(ga||(ga={}));var ha;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(ha||(ha={}));var pa;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(pa||(pa={}));var ma;(function(e){e.POINTS_TOTAL="x-rbi-loyalty-points",e.POINTS_EARNED="x-rbi-points-earned",e.REWARDS="x-rbi-rewards",e.OFFERS="x-rbi-offers",e.CUSTOMER_NAME="x-customer-name"})(ma||(ma={}));var va;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(va||(va={}));var ya;(function(e){e.GROUP="group",e.PRODUCT="product"})(ya||(ya={}));var ba;(function(e){e.ORDER_MESSAGE="OrderMessage",e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(ba||(ba={}));const Jg=e=>e==="true"||e===!0,Zg=e=>`options--${e}`,cs=e=>{const{details:{media:t=[]}={}}=e,r=t.find(n=>n.name==="MAIN_IMG")||t[0]||{};return(r==null?void 0:r.url)||""},Sa=e=>{var r,n;return!(((r=e==null?void 0:e.attrs)==null?void 0:r.hidden)===!0||((n=e==null?void 0:e._)==null?void 0:n.hidden)==="true")};function fs(e,t){var r;if(!t.items)return null;for(let n=0;n<((r=t.items)==null?void 0:r.length);n++){const i=t.items[n];if(i.selCtx===e&&(i.kind===Le.OPTIONS||i.kind===Le.GROUP||i.kind===Le.GROUP_UPSELL))return i;if(i.items&&i.items.length>0){const a=fs(e,i);if(a)return a}}return null}const Kt=e=>e===Le.OPTIONS||e===Le.CONFIG||e===Le.GROUP_UPSELL,Pn=e=>{var t,r,n,i,a,o,s;return e?!!(Kt(e==null?void 0:e.kind)&&((t=e==null?void 0:e.attrs)==null?void 0:t.selMin)==="1"&&((r=e==null?void 0:e.attrs)==null?void 0:r.selMax)==="2"&&((n=e==null?void 0:e.attrs)==null?void 0:n.qtyMin)&&((i=e==null?void 0:e.attrs)==null?void 0:i.qtyMin)===((a=e==null?void 0:e.attrs)==null?void 0:a.qtyMax)&&((s=(o=e==null?void 0:e.items)==null?void 0:o.filter(u=>{var l;return((l=u==null?void 0:u._)==null?void 0:l.hidden)!=="true"}))==null?void 0:s.length)===2):!1},Oa=(e,t,r)=>{var a,o,s;const n=Number((a=e==null?void 0:e.attrs)==null?void 0:a.qtyMax)-r<0?!1:`${Number((o=e==null?void 0:e.attrs)==null?void 0:o.qtyMax)-r}`;return{product:(s=e==null?void 0:e.items)==null?void 0:s.find(u=>(u==null?void 0:u.id)!==t),value:n}},Xg=(e,t,r,n)=>{var s,u,l,f;const i=(s=e==null?void 0:e.items)==null?void 0:s.find(c=>(c==null?void 0:c.id)!==t),a=(u=e==null?void 0:e.attrs)==null?void 0:u.qtyMax;return r?!!i&&!!((l=n==null?void 0:n[i.selCtx])!=null&&l[i.id])&&((f=n==null?void 0:n[i.selCtx])==null?void 0:f[i.id])!==!1?{clickedProductValue:"1",secondProductValue:Number(a)-1<0?!1:`${Number(a)-1}`,secondProduct:i}:{clickedProductValue:a,secondProductValue:!1,secondProduct:i}:{clickedProductValue:!1,secondProductValue:a,secondProduct:i}};function eh(e){let t;const r=new Set,n=(l,f)=>{const c=typeof l=="function"?l(t):l;if(c!==t){const g=t;t=f?c:Object.assign({},t,c),r.forEach(d=>d(t,g))}},i=()=>t,a=(l,f=i,c=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let g=f(t);function d(){const h=f(t);if(!c(g,h)){const b=g;l(g=h,b)}}return r.add(d),()=>r.delete(d)},u={setState:n,getState:i,subscribe:(l,f,c)=>f||c?a(l,f,c):(r.add(l),()=>r.delete(l)),destroy:()=>r.clear()};return t=e(n,i,u),u}const th=typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),wa=th?S.useEffect:S.useLayoutEffect;function rh(e){const t=typeof e=="function"?eh(e):e,r=(n=t.getState,i=Object.is)=>{const[,a]=S.useReducer(y=>y+1,0),o=t.getState(),s=S.useRef(o),u=S.useRef(n),l=S.useRef(i),f=S.useRef(!1),c=S.useRef();c.current===void 0&&(c.current=n(o));let g,d=!1;(s.current!==o||u.current!==n||l.current!==i||f.current)&&(g=n(o),d=!i(c.current,g)),wa(()=>{d&&(c.current=g),s.current=o,u.current=n,l.current=i,f.current=!1});const h=S.useRef(o);wa(()=>{const y=()=>{try{const m=t.getState(),O=u.current(m);l.current(c.current,O)||(s.current=m,c.current=O,a())}catch{f.current=!0,a()}},p=t.subscribe(y);return t.getState()!==h.current&&y(),p},[]);const b=d?g:c.current;return S.useDebugValue(b),b};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}const nh=e=>({filter:{},initialSelected:{},setInitialFilter:t=>{e(()=>({filter:{...t}}))},setInitialSelected:t=>{e(()=>({initialSelected:t}))},setFilter:(t,r)=>{e(({filter:n})=>({filter:{...n,[t]:{...n[t],...r}}}))}}),ih=(e,t)=>Sr(e,t,"isSelCntAllowedToIncrement")&&Sr(e,t,"isQtyCntAllowedToIncrement")&&An(e,t,"isQtyCntAllowedToIncrement")&&An(e,t,"isQtyCntAllowedToIncrement"),ah=(e,t,r)=>{var a;const{selCtx:n}=e;return((a=r==null?void 0:r[n])==null?void 0:a.parentKind)===Vn.PRODUCT?Ea(e,t)&&Sr(e,r,"isQtyCntAllowedToIncrement"):Ea(e,t)&&Sr(e,r,"isQtyCntAllowedToIncrement")&&An(e,r,"isQtyCntAllowedToIncrement")},Ea=(e,t)=>{const{qtyMax:r}=e;return Number(t)<Number(r||Number.MAX_SAFE_INTEGER)},Sr=(e,t,r)=>{var a;const{selCtx:n}=e,i=(a=t==null?void 0:t[n])==null?void 0:a[r];return ds(i)?!0:i},An=(e,t,r)=>{var s;const{selCtx:n}=e,i=(s=t==null?void 0:t[n])==null?void 0:s.parentSelCtx,a=t==null?void 0:t[i],o=a==null?void 0:a[r];return ds(o)?!0:o},ds=e=>typeof e=="undefined",gs=(e,t,r)=>{const n=t[e];let i=0,a=0;if(n)for(const[,o]of Object.entries(n))parseInt(o)>0&&(i+=1,a+=Number(o));else r&&r.forEach(o=>{if(t[o.selCtx])for(const[,s]of Object.entries(t[o.selCtx]))parseInt(s)>0&&(i+=1,a+=Number(s))});return[i,a]},oh=(e,t)=>{var i;const{id:r,selCtx:n}=e;return Number(((i=t==null?void 0:t[n])==null?void 0:i[r])||0)},sh=(e,t)=>({validationMap:{},isOnSubmitted:!1,currency:"z\u0142",refreshFormDt:"",setInitialValidate:()=>{e(()=>({validationMap:{},isOnSubmitted:!1}))},setValidationMap:r=>{const{productSelCtx:n,attrs:i,actualSelCnt:a,actualQtyCnt:o,isPassedFiltering:s,nestedLvl:u,parentSelCtx:l,parentKind:f}=r,{qtyMin:c,qtyMax:g,selMin:d,selMax:h}=i||{};(g||h)&&e(({validationMap:y})=>({validationMap:{...y,[n]:{parentSelCtx:l,isSelCntAllowedToIncrement:a<Number(h||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:o<Number(g||Number.MAX_SAFE_INTEGER),parentKind:f,nestedLvl:u,isValid:br(a,Number(d||0),Number(h||Number.MAX_SAFE_INTEGER)+1)&&br(o,Number(c||0),Number(g||Number.MAX_SAFE_INTEGER)+1),isPassedFiltering:s}}}))},isInputEnabled:r=>{const n=t().validationMap;return ih(r,n)},isInputCounterIncrementEnabled:(r,n)=>{const i=t().validationMap,a=oh(r,n);return ah(r,a,i)},getInvalidSelCtxArray:()=>{const r=t().validationMap,n=[];for(const[i]of Object.entries(r)){const{isValid:a,isPassedFiltering:o}=r[i];a===!1&&o===!0&&n.push(i)}return n},setIsOnSubmittedOnTrue:()=>{console.log("isOnSubmitted"),e(()=>({isOnSubmitted:!0}))},getValidationMap:()=>t().validationMap,setCurrency:r=>{e(()=>({currency:r}))},refreshForm:()=>{e(()=>({refreshFormDt:`${new Date}`}))}}),uh=(e,t)=>({expanded:{},toggleExpanded:(r,n,i)=>{const a=t().expanded[r+n+i];e(()=>({expanded:{...t().expanded,[r+n+i]:a!==void 0?!a:!1}}))},resetExpanded:()=>{e(()=>({expanded:{}}))}}),oe=rh((e,t)=>({...nh(e),...sh(e,t),...uh(e,t)}));function hs(e,t){if(!t)return null;for(const r of t){if(r.id===e)return r;if(r.items){const n=hs(e,r.items);if(n)return n}}return null}function lh(e,t){return hs(e,t)!==null}function ch(e,t){if(t==null||Re(t))return{};try{const r=ts(t);for(const[n,i]of Object.entries(r))i&&typeof i=="object"&&!Array.isArray(i)&&Object.keys(i).forEach(a=>{lh(a,e.items)||(console.warn(`deleting selected selCtx ${n} id ${a}, not found in product`),delete r[n][a])});return ls(r)}catch(r){return console.error(r),t}}function fh(e){var p;const[t,r]=S.useState(Number(e.quantity)||1),n=Gg(e),{state:{filter:i={}}={}}=n,a=ch(n,(p=n.state)==null?void 0:p.selected),o=oe(m=>m.setInitialFilter),s=oe(m=>m.setInitialSelected),u=oe(m=>m.setInitialValidate),l=oe(m=>m.resetExpanded),f=oe(m=>m.filter),c=oe(m=>m.setCurrency),g=oe(m=>m.setIsOnSubmittedOnTrue),d=oe(m=>m.refreshFormDt),h=oe(m=>m.getInvalidSelCtxArray),b=()=>{r(m=>m+1)},y=()=>{t>1&&r(m=>m-1)};return S.useEffect(()=>{u(),o(i),s(a),l()},[e]),{encodedProduct:n,initSelected:a,initFilter:i,filter:f,setCurrency:c,setIsOnSubmittedOnTrue:g,getInvalidSelCtxArray:h,productQuantity:t,increaseProductQuantity:b,decreaseProductQuantity:y,refreshFormDt:d}}const $r=(e,t)=>{var o;const{filter:r={},fltCtx:n=""}=e,i=(t==null?void 0:t[n])||{};if(!r||!Object.keys(r).length||!i)return!0;const a=(o=Object.keys(i))==null?void 0:o.filter(s=>{var l;const u=(l=Object.keys((r==null?void 0:r[s])||{}))==null?void 0:l.filter(f=>{var c;if(((c=r==null?void 0:r[s])==null?void 0:c[f])===(i==null?void 0:i[s]))return!0});return(u==null?void 0:u.length)>0});return(a==null?void 0:a.length)>0},ps=(e,t)=>{const{items:r,filter:n}=e,i=[],a=[],o=s=>{s&&!Re(n)&&s.forEach(u=>{const{items:l=[]}=u;t?i.push(u):a.push(u),l.length>0&&o(l)})};return o(r),{productsToSelect:i,productsToUnselect:a}},dh=(e,t)=>{e.map(({selCtx:r,id:n})=>{t(`selected.${r}.${n}`,!1)})},ms=(e,t,r)=>{e.map(({selCtx:n,id:i})=>{var o;const a=(o=r[n])==null?void 0:o[i];a&&t(`selected.${n}.${i}`,a.toString())})};function vs(e,t,r,n){const{selCtx:i,attrs:a={}}=e,o=oe(p=>p.initialSelected),s=oe(p=>p.currency),{setValue:u,getValues:l}=He(),{selected:f={},filter:c={}}=l(),g=$r(e,c),d=oe(p=>p.isOnSubmitted),h=oe(p=>p.setValidationMap),[b,y]=gs(e.selCtx,f,e.items);return h({productSelCtx:i,attrs:a,actualQtyCnt:y,actualSelCnt:b,nestedLvl:t,isPassedFiltering:g,parentSelCtx:n,parentKind:r}),S.useEffect(()=>{const{productsToSelect:p,productsToUnselect:m}=ps(e,g);ms(p,u,o)},[g]),{isFilterValidated:g,selected:f,isOnSubmitted:d,selCnt:b,qtyCnt:y,currency:s}}var Ir={exports:{}},Yt={};/*
|
|
3
|
-
|
|
4
|
-
(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Th={normalizePrecision:function(t){var r=t.reduce(function(n,i){return Math.max(n.getPrecision(),i.getPrecision())});return t.map(function(n){return n.getPrecision()!==r?n.convertPrecision(r):n})},minimum:function(t){var r=xa(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.lessThan(o)?a:o}),a},maximum:function(t){var r=xa(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.greaterThan(o)?a:o}),a}};function Ss(e){return!isNaN(parseInt(e))&&isFinite(e)}function Nh(e){return Ss(e)&&e<=100&&e>=0}function $h(e){return e.length>0&&e.every(function(t){return t>=0})&&e.some(function(t){return t>0})}function Ta(e){return e%2===0}function Na(e){return Ss(e)&&!Number.isInteger(e)}function Ih(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var r=t.split(".")[1];return r?r.length:0}function It(e){return Math.abs(e)%1===.5}function Rh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,n){var i=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){i.readyState===4&&(i.status>=200&&i.status<400?r(JSON.parse(i.responseText)):n(new Error(i.statusText)))},onerror:function(){n(new Error("Network error"))}});i.open("GET",e,!0),Lh(i,t.headers),i.send()})}function Lh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var r in t)e.setRequestHeader(r,t[r]);return e}function jt(e){return typeof e=="undefined"}function Os(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",r={};return Object.entries(e).forEach(function(n){if(Vt(n[1])==="object"){var i=Os(n[1]);Object.entries(i).forEach(function(a){r[n[0]+t+a[0]]=a[1]})}else r[n[0]]=n[1]}),r}function Fh(e){return Boolean(e)&&(Vt(e)==="object"||typeof e=="function")&&typeof e.then=="function"}function ws(){var e=function(n,i){var a=function(u){return Math.pow(10,Ih(u))},o=Math.max(a(n),a(i));return Math.round(n*o)*Math.round(i*o)/(o*o)},t={HALF_ODD:function(n){var i=Math.round(n);return It(n)&&Ta(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return It(n)?Ta(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return It(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return It(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return It(n)?Math.sign(n)*Math.ceil(Math.abs(n)):Math.round(n)},DOWN:function(n){return Math.floor(n)}};return{add:function(n,i){return n+i},subtract:function(n,i){return n-i},multiply:function(n,i){return Na(n)||Na(i)?e(n,i):n*i},divide:function(n,i){return n/i},modulo:function(n,i){return n%i},round:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return t[i](n)}}}var kh=ws();function Mh(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return t!==null?t.slice(1).filter(function(n){return!jt(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return jt(this.getMatches().find(n))?0:this.getMatches()[kh.add(this.getMatches().findIndex(n),1)].split("").length},getCurrencyDisplay:function(){var n={USD:"code",dollar:"name",$:"symbol"};return n[this.getMatches().find(function(i){return i==="USD"||i==="dollar"||i==="$"})]},getStyle:function(){return jt(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!jt(this.getMatches().find(function(n){return n===","}))}}}function jh(e){var t=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;for(var o in a)i=i.replace("{{".concat(o,"}}"),a[o]);return i},r=function(i,a){return Rh(t(e.endpoint,{from:i,to:a}),{headers:e.headers})};return{getExchangeRate:function(i,a){return(Fh(e.endpoint)?e.endpoint:r(i,a)).then(function(o){return Os(o)[t(e.propertyPath,{from:i,to:a})]})}}}function Gt(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!e)throw new r(t)}function Dh(e){Gt(Nh(e),"You must provide a numeric value between 0 and 100.",RangeError)}function Uh(e){Gt($h(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function sn(e){Gt(Number.isInteger(e),"You must provide an integer.",TypeError)}var Z=ws(),Vh=function e(t){var r=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),n=r.amount,i=r.currency,a=r.precision;sn(n),sn(a);var o=e.globalLocale,s=e.globalFormat,u=e.globalRoundingMode,l=e.globalFormatRoundingMode,f=Object.assign({},e.globalExchangeRatesApi),c=function(h){var b=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},h),Object.assign({},{locale:this.locale},h));return Object.assign(e({amount:b.amount,currency:b.currency,precision:b.precision}),{locale:b.locale})},g=function(h){Gt(this.hasSameCurrency(h),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return n},getCurrency:function(){return i},getLocale:function(){return this.locale||o},setLocale:function(h){return c.call(this,{locale:h})},getPrecision:function(){return a},convertPrecision:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;sn(h);var y=this.getPrecision(),p=h>y,m=p?Z.multiply:Z.divide,O=p?[h,y]:[y,h],w=Math.pow(10,Z.subtract.apply(Z,O));return c.call(this,{amount:Z.round(m(this.getAmount(),w),b),precision:h})},add:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return c.call(this,{amount:Z.add(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},subtract:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return c.call(this,{amount:Z.subtract(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},multiply:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return c.call(this,{amount:Z.round(Z.multiply(this.getAmount(),h),b)})},divide:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return c.call(this,{amount:Z.round(Z.divide(this.getAmount(),h),b)})},percentage:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return Dh(h),this.multiply(Z.divide(h,100),b)},allocate:function(h){var b=this;Uh(h);for(var y=h.reduce(function(w,E){return Z.add(w,E)}),p=this.getAmount(),m=h.map(function(w){var E=Math.floor(Z.divide(Z.multiply(b.getAmount(),w),y));return p=Z.subtract(p,E),c.call(b,{amount:E})}),O=0;p>0;)h[O]>0&&(m[O]=m[O].add(c.call(this,{amount:1})),p=Z.subtract(p,1)),O+=1;return m},convert:function(h){var b=this,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=y.endpoint,m=p===void 0?f.endpoint:p,O=y.propertyPath,w=O===void 0?f.propertyPath||"rates.{{to}}":O,E=y.headers,x=E===void 0?f.headers:E,T=y.roundingMode,I=T===void 0?u:T,k=Object.assign({},{endpoint:m,propertyPath:w,headers:x,roundingMode:I});return jh(k).getExchangeRate(this.getCurrency(),h).then(function(D){return Gt(!jt(D),'No rate was found for the destination currency "'.concat(h,'".'),TypeError),c.call(b,{amount:Z.round(Z.multiply(b.getAmount(),parseFloat(D)),k.roundingMode),currency:h})})},equalsTo:function(h){return this.hasSameAmount(h)&&this.hasSameCurrency(h)},lessThan:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()<b[1].getAmount()},lessThanOrEqual:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()<=b[1].getAmount()},greaterThan:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()>b[1].getAmount()},greaterThanOrEqual:function(h){g.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()>=b[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return Z.modulo(this.getAmount(),Math.pow(10,a))!==0},hasCents:function(){return Z.modulo(this.getAmount(),Math.pow(10,a))!==0},hasSameCurrency:function(h){return this.getCurrency()===h.getCurrency()},hasSameAmount:function(h){var b=e.normalizePrecision([this,h]);return b[0].getAmount()===b[1].getAmount()},toFormat:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,y=Mh(h);return this.toRoundedUnit(y.getMinimumFractionDigits(),b).toLocaleString(this.getLocale(),{currencyDisplay:y.getCurrencyDisplay(),useGrouping:y.getUseGrouping(),minimumFractionDigits:y.getMinimumFractionDigits(),style:y.getStyle(),currency:this.getCurrency()})},toUnit:function(){return Z.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,y=Math.pow(10,h);return Z.divide(Z.round(Z.multiply(this.toUnit(),y),b),y)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},Bh=Object.assign(Vh,Eh,Ph,Th);const ar=(e,t="PLN")=>{e=e.toString();const r=e.replace(",","."),n=Number(r)*100;return isNaN(n)?"0.00":Bh({amount:Math.round(n),currency:t}).toFormat("0,0.00")},Hh=(e,t,r=1)=>{const n=parseFloat(e.toString());let i=!1,a=ar(`${r*n}`);const o=`${ar(`${a}`)}`;return n<parseFloat(t)&&(i=!0,a=`${ar(`${t}`)}`),{displayPriceFrom:i,formattedEndPriceWithPriceMin:a,formattedEndPrice:o}};function Rr(e){const{price:t,addPlusBefore:r=!1,size:n="md",showIfPriceZero:i=!1,minPrice:a="0.00",hiddenIfPriceZero:o=!1}=e,s=parseFloat(a),u=t>s?t:a,l=ar(`${u}`);return!t&&i===!1?null:r?V("span",{style:{visibility:`${!t&&o?"hidden":"visible"}`},className:"",children:["\xA0",`+${l}`]}):t<s?V("span",{className:"",children:["\xA0",`od ${l}`]}):A("span",{className:"",children:l})}function Wh(e,t){const{selCtx:r,id:n}=e,i=oe(s=>s.expanded),a=S.useMemo(()=>Gh(r,n,t,i),[r,n,t,i]),o=oe(s=>s.toggleExpanded);return{isExpanded:a,toggleExpanded:o}}const Gh=(e,t,r,n)=>{const i=n[e+t+r];return i!==void 0?i:!0};var zh=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,qh={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Kh=function(t){return qh[t]},Yh=function(t){return t.replace(zh,Kh)};function $a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ia(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$a(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$a(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Yh},Es,Qh=S.createContext();function Jh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn=Ia(Ia({},Cn),e)}function Zh(){return Cn}var Xh=function(){function e(){_e(this,e),this.usedNamespaces={}}return Te(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(i){n.usedNamespaces[i]||(n.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ep(e){Es=e}function tp(){return Es}var rp={type:"3rdParty",init:function(t){Jh(t.options.react),ep(t)}};function np(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var Ra={};function xn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Ra[t[0]]||(typeof t[0]=="string"&&(Ra[t[0]]=new Date),np.apply(void 0,t))}function La(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function i(){setTimeout(function(){e.off("initialized",i)},0),r()};e.on("initialized",n)}})}function ip(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var o=function(u,l){var f=t.services.backendConnector.state["".concat(u,"|").concat(l)];return f===-1||f===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}function ap(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return xn("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(a,o){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}):ip(e,t,r)}function op(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){l=!0,i=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sp(e,t){return Ja(e)||op(e,t)||Za(e,t)||Xa()}function Fa(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function un(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fa(Object(r),!0).forEach(function(n){Be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fa(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var up=function(t,r){var n=S.useRef();return S.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function Jn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=S.useContext(Qh)||{},i=n.i18n,a=n.defaultNS,o=r||i||tp();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new Xh),!o){xn("You will need to pass in an i18next instance by using initReactI18next");var s=function(k){return Array.isArray(k)?k[k.length-1]:k},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}o.options.react&&o.options.react.wait!==void 0&&xn("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var l=un(un(un({},Zh()),o.options.react),t),f=l.useSuspense,c=l.keyPrefix,g=e||a||o.options&&o.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(g);var d=(o.isInitialized||o.initializedStoreOnce)&&g.every(function(I){return ap(I,o,l)});function h(){return o.getFixedT(null,l.nsMode==="fallback"?g:g[0],c)}var b=S.useState(h),y=sp(b,2),p=y[0],m=y[1],O=g.join(),w=up(O),E=S.useRef(!0);S.useEffect(function(){var I=l.bindI18n,k=l.bindI18nStore;E.current=!0,!d&&!f&&La(o,g,function(){E.current&&m(h)}),d&&w&&w!==O&&E.current&&m(h);function D(){E.current&&m(h)}return I&&o&&o.on(I,D),k&&o&&o.store.on(k,D),function(){E.current=!1,I&&o&&I.split(" ").forEach(function(F){return o.off(F,D)}),k&&o&&k.split(" ").forEach(function(F){return o.store.off(F,D)})}},[o,O]);var x=S.useRef(!0);S.useEffect(function(){E.current&&!x.current&&m(h),x.current=!1},[o,c]);var T=[p,o,d];if(T.t=p,T.i18n=o,T.ready=d,d||!d&&!f)return T;throw new Promise(function(I){La(o,g,function(){I()})})}var Ps=[],lp=Ps.forEach,cp=Ps.slice;function fp(e){return lp.call(cp.call(arguments,1),function(t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r])}),e}var ka=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,dp=function(t,r,n){var i=n||{};i.path=i.path||"/";var a=encodeURIComponent(r),o="".concat(t,"=").concat(a);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!ka.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!ka.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var u=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},Ma={create:function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),i&&(a.domain=i),document.cookie=dp(t,encodeURIComponent(r),a)},read:function(t){for(var r="".concat(t,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},gp={name:"cookie",lookup:function(t){var r;if(t.lookupCookie&&typeof document!="undefined"){var n=Ma.read(t.lookupCookie);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupCookie&&typeof document!="undefined"&&Ma.create(r.lookupCookie,t,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},hp={name:"querystring",lookup:function(t){var r;if(typeof window!="undefined"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),a=i.split("&"),o=0;o<a.length;o++){var s=a[o].indexOf("=");if(s>0){var u=a[o].substring(0,s);u===t.lookupQuerystring&&(r=a[o].substring(s+1))}}}return r}},Rt=null,ja=function(){if(Rt!==null)return Rt;try{Rt=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Rt=!1}return Rt},pp={name:"localStorage",lookup:function(t){var r;if(t.lookupLocalStorage&&ja()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupLocalStorage&&ja()&&window.localStorage.setItem(r.lookupLocalStorage,t)}},Lt=null,Da=function(){if(Lt!==null)return Lt;try{Lt=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Lt=!1}return Lt},mp={name:"sessionStorage",lookup:function(t){var r;if(t.lookupSessionStorage&&Da()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupSessionStorage&&Da()&&window.sessionStorage.setItem(r.lookupSessionStorage,t)}},vp={name:"navigator",lookup:function(t){var r=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)r.push(navigator.languages[n]);navigator.userLanguage&&r.push(navigator.userLanguage),navigator.language&&r.push(navigator.language)}return r.length>0?r:void 0}},yp={name:"htmlTag",lookup:function(t){var r,n=t.htmlTag||(typeof document!="undefined"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},bp={name:"path",lookup:function(t){var r;if(typeof window!="undefined"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof n[t.lookupFromPathIndex]!="string")return;r=n[t.lookupFromPathIndex].replace("/","")}else r=n[0].replace("/","")}return r}},Sp={name:"subdomain",lookup:function(t){var r=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,n=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(!!n)return n[r]}};function Op(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var As=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};_e(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}return Te(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r,this.options=fp(n,this.options||{},Op()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(gp),this.addDetector(hp),this.addDetector(pp),this.addDetector(mp),this.addDetector(vp),this.addDetector(yp),this.addDetector(bp),this.addDetector(Sp)}},{key:"addDetector",value:function(r){this.detectors[r.name]=r}},{key:"detect",value:function(r){var n=this;r||(r=this.options.order);var i=[];return r.forEach(function(a){if(n.detectors[a]){var o=n.detectors[a].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(r,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||n.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(r,i.options)}))}}]),e}();As.type="languageDetector";const wp={"OS.ProductConfigurator.Selected.Message.From":"od","OS.ProductConfigurator.Selected.Message.UpTo":"do","OS.ProductConfigurator.Selected.Message.Choose":"Wybierz","OS.ProductConfigurator.Selected.Message.Options":"opcji","OS.ProductConfigurator.Selected.Message.OneOption":"Wybierz 1 opcj\u0119","OS.ProductConfigurator.Quantity.Message.UpTo":"do","OS.ProductConfigurator.Quantity.Message.From":"od","OS.ProductConfigurator.Quantity.Message.Max":"maksymalnie","OS.ProductConfigurator.Quantity.Message.Quantity":"ilo\u015Bci","OS.ProductConfigurator.Quantity.Message.OneOption":"Wybierz maksymalnie jedn\u0105 opcj\u0119","OS.ProductConfigurator.Add":"Dodaj","OS.ProductConfigurator.Back":"Wr\xF3\u0107","OS.ProductConfigurator.ShowMore":"Poka\u017C wi\u0119cej","OS.ProductConfigurator.ShowLess":"Poka\u017C mniej"},Ep={"OS.ProductConfigurator.Selected.Message.From":"from","OS.ProductConfigurator.Selected.Message.UpTo":"up to","OS.ProductConfigurator.Selected.Message.Choose":"Choose","OS.ProductConfigurator.Selected.Message.Options":"options","OS.ProductConfigurator.Selected.Message.OneOption":"Choose one option","OS.ProductConfigurator.Quantity.Message.UpTo":"up to","OS.ProductConfigurator.Quantity.Message.From":"from","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"quantity","OS.ProductConfigurator.Quantity.Message.OneOption":"Choose maximum one option","OS.ProductConfigurator.Add":"Add","OS.ProductConfigurator.Back":"Back","OS.ProductConfigurator.ShowMore":"Show more","OS.ProductConfigurator.ShowLess":"Show less"},Pp={"OS.ProductConfigurator.Selected.Message.From":"ab","OS.ProductConfigurator.Selected.Message.UpTo":"bis","OS.ProductConfigurator.Selected.Message.Choose":"W\xE4hle","OS.ProductConfigurator.Selected.Message.Options":"Optionen","OS.ProductConfigurator.Selected.Message.OneOption":"W\xE4hle eine Option","OS.ProductConfigurator.Quantity.Message.UpTo":"ab","OS.ProductConfigurator.Quantity.Message.From":"aus","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"Menge","OS.ProductConfigurator.Quantity.Message.OneOption":"W\xE4hle bis zu 1 Option aus","OS.ProductConfigurator.Add":"Hinzuf\xFCgen","OS.ProductConfigurator.Back":"Zur\xFCck","OS.ProductConfigurator.ShowMore":"Zeig mehr","OS.ProductConfigurator.ShowLess":"Zeig weniger"},Ap={"OS.ProductConfigurator.Selected.Message.From":"from","OS.ProductConfigurator.Selected.Message.UpTo":"up to","OS.ProductConfigurator.Selected.Message.Choose":"Choose","OS.ProductConfigurator.Selected.Message.Options":"options","OS.ProductConfigurator.Selected.Message.OneOption":"Choose one option","OS.ProductConfigurator.Quantity.Message.UpTo":"up to","OS.ProductConfigurator.Quantity.Message.From":"from","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"quantity","OS.ProductConfigurator.Quantity.Message.OneOption":"Choose maximum one option","OS.ProductConfigurator.Add":"Add","OS.ProductConfigurator.Back":"Back","OS.ProductConfigurator.ShowMore":"Show more","OS.ProductConfigurator.ShowLess":"Show less"};ve.use(As).use(rp).init({resources:{pl:{translation:wp},en:{translation:Ep},de:{translation:Pp},cs:{translation:Ap}}});const Cp=(e,t,r,n)=>{let i="",a="";const o=Number(e),s=Number(t);return o>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.From")} ${o}`,o>r&&(a=xe.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.UpTo")} ${s}`,s<r&&(a=xe.TOO_MUCH)),o>=0||s>=0&&r<o?(i=`${n("OS.ProductConfigurator.Quantity.Message.Max")}${i}`,i+=` ${n("OS.ProductConfigurator.Quantity.Message.Quantity")}`):o===1&&o===1?i=`${n("OS.ProductConfigurator.Quantity.Message.OneOption")}`:(i="",a=xe.IGNORE),r>=o&&r<=s&&(a=xe.OK),{message:i,validationStatus:a}},xp=(e,t,r,n)=>{let i="",a="";const o=parseInt(e||"-1"),s=parseInt(t||"-1");return o>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.From")} ${o}`,o>r&&(a=xe.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.UpTo")} ${s}`,s<r&&(a=xe.TOO_MUCH)),o>=0||s>=0?(i=`${n("OS.ProductConfigurator.Selected.Message.Choose")}${i}`,i+=` ${n("OS.ProductConfigurator.Selected.Message.Options")}`):(i="",a=xe.IGNORE),o===1&&s===1&&(i=`${n("OS.ProductConfigurator.Selected.Message.OneOption")}`),r>=o&&r<=s&&(a=xe.OK),{message:i,validationStatus:a}},_p=e=>{const{optionsItem:t,parentSelCtx:r,selected:n,isOnSubmitted:i,actualQtyCnt:a,actualSelCnt:o,children:s}=e,{selCtx:u,details:l={},id:f,attrs:c={}}=t,{qtyMin:g,qtyMax:d,selMin:h,selMax:b}=c,{name:y,description:p}=l.literals||{},{t:m}=Jn(),{isExpanded:O,toggleExpanded:w}=Wh(t,r),{validationStatus:E,message:x}=xp(h,b,o,m),{validationStatus:T,message:I}=Cp(g,d,a,m),k=E===xe.OK,D=T===xe.OK,F=!k&&i&&!!x,j=!D&&i&&!!I;return V("div",{className:"pt-1 mb-3",id:Zg(u),children:[V("div",{className:"flex text-xl font-semibold",children:[A("p",{className:"",children:y}),y&&y!==" "&&V(Fe,{children:[A("div",{className:"ml-auto",children:A(Rr,{price:Bn(n,t)})}),A("svg",{className:`size-8 ml-2 text-black cursor-pointer ${!O&&"rotate-180"}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",onClick:()=>w(u,f,r),children:A("polyline",{points:"18 15 12 9 6 15"})})]})]}),A("p",{className:`${p&&"mb-2"}`,children:p}),!1,A("div",{className:"flex",children:V("div",{children:[A(Ca,{isOk:k,isErr:F,info:x}),A(Ca,{isOk:D,isErr:j,info:I})]})}),A("div",{className:`${O?"block":"hidden"}`,children:s})]})},Cs=N.default.createContext(null);function Lr(){const e=S.useContext(Cs);if(!e)throw new Error("Missing ComponentsContext");return e}const Tp=e=>{const{optionsItem:t,parentSelCtx:r,nestedLvl:n,parentKind:i,rootProduct:a}=e,{isFilterValidated:o,selected:s,isOnSubmitted:u,selCnt:l,qtyCnt:f,currency:c}=vs(t,n,i,r),{MenuOptionsUI:g}=Lr();if(!o)return null;const d=A(Zn,{productItems:t.items,parentProduct:t,rootProduct:a,nestedLvl:n+1}),h={optionsItem:t,parentSelCtx:r,selected:s,isOnSubmitted:u,actualQtyCnt:f,actualSelCnt:l,currency:c,nestedLvl:n};return g?A(g,{...h,children:d}):A(_p,{...h,children:d})},Np=e=>{var y;const{product:t,inputId:r,isDisabled:n,registerProps:i,size:a="lg",children:o,parentProduct:s}=e,{details:{literals:u}={}}=t,{name:l="",description:f=""}=u||{},c=$o(t),g=cs(t),{watch:d}=He(),h=d("selected");Pn(s);const b=S.useRef(!((y=s==null?void 0:s.items)!=null&&y.some(p=>{var m;return(m=h==null?void 0:h[p==null?void 0:p.selCtx])==null?void 0:m[p.id]})));return S.useEffect(()=>{setTimeout(()=>{var m;const p=!((m=s==null?void 0:s.items)!=null&&m.some(O=>{var w;return(w=h==null?void 0:h[O==null?void 0:O.selCtx])==null?void 0:w[O.id]}));b.current=p},10)},[s==null?void 0:s.items,h]),V("div",{className:`flex items-center justify-center p-2 pl-3 my-1 rounded-lg bg-white border-2 border-gray-200 ${n&&"opacity-50"}`,children:[A("input",{type:"checkbox",className:`simple-checkbox checkbox-${a} mr-4`,id:r,disabled:n,...i,value:"1"}),g&&A("div",{className:"flex w-20 mr-2 max-h-24",children:A("img",{alt:"Product image",className:"h-auto max-w-full",src:g})}),A("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:V("div",{className:"relative",children:[A("p",{className:"w-full text-lg font-semibold",children:l}),A("p",{className:"text-sm text-gray-600",children:f})]})}),A("div",{className:"ml-auto",children:o}),A("label",{htmlFor:r,children:A(Rr,{price:parseFloat(c||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})},$p=e=>{const{product:t,inputId:r,inputValue:n,registerProps:i,isChecked:a,size:o="lg",children:s}=e,{details:{literals:u}={}}=t,{name:l="",description:f=""}=u||{},c=$o(t),g=cs(t);return V("div",{className:"flex items-center justify-between p-2 pl-3 my-1 bg-white border-2 border-gray-200 rounded-xl",children:[A("input",{type:"radio",className:`simple-radio radio-${o} mr-4`,id:r,...i,value:n,checked:a}),g&&A("div",{className:"flex w-20 mr-2 max-h-24",children:A("img",{alt:"Product image",className:"h-auto max-w-full",src:g})}),A("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:V("div",{className:"relative",children:[A("p",{className:"w-full text-lg font-semibold",children:l}),A("p",{className:"text-sm text-gray-600",children:f})]})}),A("div",{className:"ml-auto",children:s}),A("label",{htmlFor:r,children:A(Rr,{price:parseFloat(c||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})};function xs(e){const{value:t=0,add:r,subtract:n,disabledSubtract:i,disabledAdd:a,size:o="md"}=e;return V("div",{className:`counter counter-${o} flex flex-row justify-center items-center p-1 border rounded-md border-[rgba(229,231,235,255)] product-quantity`,children:[A("button",{type:"button",className:"quantity-button small",onClick:n,disabled:i,children:V("svg",{className:"size-4 text-black",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[A("path",{stroke:"none",d:"M0 0h24v24H0z"}),A("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),A("span",{className:"font-semibold text-gray-700 product-quantity-value",children:t}),A("button",{className:"quantity-button small",type:"button",onClick:r,disabled:a,children:V("svg",{className:"size-4 text-green-600 ",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[A("path",{stroke:"none",d:"M0 0h24v24H0z"}),A("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),A("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})}function Ip(e,t,r){const{watch:n,setValue:i,getValues:a,unregister:o}=He(),{id:s,selCtx:u,emit:l={},fltCtx:f}=e,c=n(`selected.${u}.${s}`);return S.useEffect(()=>{var b,y,p;if(!r||r>1)return;const g=`filterWithCnt.${f}`,d=`filterWithCnt.${f}.${u}`,h=`filter.${f}`;if(t&&c&&f)if(Re(l)){const m=a(d);(b=Object.keys(m||{}))==null||b.forEach(O=>{o(`${d}.${O}`);const w=Object.keys(a(g)||{});Re(w)?o(`${h}.${O}`):w.forEach(E=>{E!==u&&!a(`${g}.${E}.${O}`)&&o(`${h}.${O}`)})});return}else{const m=a(d),O=a(g);(y=Object.keys(l))==null||y.forEach(w=>{var E;(E=Object.keys(m||{}))==null||E.forEach(x=>{l[x]||(o(`${h}.${x}`),o(`${d}.${x}`))}),Object.keys(O||{}).forEach(x=>{x!==u&&w in a(g==null?void 0:g[x])&&o(`${g}.${x}.${w}`)}),i(`${h}.${w}`,l[w]),i(`${d}.${w}`,{cnt:1,value:l[w]})});return}c&&f&&!Re(l)&&((p=Object.keys(l))==null||p.forEach(m=>{i(`filter.${f}.${m}`,l[m]);const O=a(`${d}.${m}.cnt`)||0;i(`${d}.${m}`,{cnt:O+1,value:l[m]})}))},[c]),{}}function Rp(){const e=oe(n=>n.getInvalidSelCtxArray),t=oe(n=>n.isInputEnabled),r=oe(n=>n.isInputCounterIncrementEnabled);return{getInvalidSelCtxArray:e,isInputEnabled:t,isInputCounterIncrementEnabled:r}}const Ua=(e,t)=>{Object.keys(e).forEach(r=>{t(`selected.${r}`,e[r])})},_n=(e,t,r)=>{const n=t(`selected.${e}`);r(`selected.${e}`,Object.keys(n).reduce((i,a)=>(i[a]=!1,i),{}))},Ft=(e,t,r,n,i,a)=>{var g,d;const{items:o,state:s,emit:u,fltCtx:l,selCtx:f}=r,{selected:c={}}=s||{};if(console.log("selected/unselected product",r,n),n){Ua(c,e);const h=b=>{var y;!Array.isArray(b)||Re(s==null?void 0:s.selected)||(y=b==null?void 0:b.filter(p=>{var m,O;return!!((O=(m=s.selected)==null?void 0:m[`${p.selCtx}`])!=null&&O[`${p.id}`])}))==null||y.map(p=>{if(p.state&&"selected"in p.state){const{state:{selected:m}}=p;Ua(m,e)}Array.isArray(p.items)&&h(p.items)})};h(o)}else{Object.keys(c).forEach(b=>{_n(b,t,e)});const h=b=>{!Array.isArray(b)||b.map(y=>{const{selCtx:p}=y;t(`selected.${p}`)&&_n(p,t,e),h(y.items)})};if(h(o),a&&a<2&&!Re(u)){(g=Object.keys(u))==null||g.forEach(m=>{const O=`filterWithCnt.${l}.${m}.${u[m]}`,w=t(O)||0;w<2?i(O):e(O,w-1)});const b=`filterWithCnt.${l}`,y=`filterWithCnt.${l}.${f}`,p=`filter.${l}`;(d=Object.keys(u))==null||d.forEach(m=>{var w,E,x;const O=t(`${y}.${m}`)||0;if(O)if(O>1)e(`${y}.${m}`,O-1);else{i(`${y}.${m}`);const T=t(b)||{},I=(w=Object.keys(T))==null?void 0:w.filter(k=>k!==f);if(!I)i(`${p}.${m}`);else{const k=I==null?void 0:I.find(D=>{var F;return!!((F=T==null?void 0:T[`${D}`])!=null&&F[`${m}`])});if(!k)i(`${p}.${m}`);else{const D=(x=(E=T==null?void 0:T[`${k}`])==null?void 0:E[`${m}`])==null?void 0:x.value;e(`${p}.${m}`,D)}}}})}}},or=(e,t)=>{var r;if(!e.items||Re(e.items))return null;for(let n=0;n<((r=e.items)==null?void 0:r.length);n++){const i=e.items[n];if(i.selCtx&&i.selCtx===t&&i.kind===Le.PRODUCT)return i;if(Kt(i.kind)&&i.items&&i.items.length>0){const a=or(i,t);if(a)return a}}return null};function Lp(e,t,r,n){var G,ce,Me;const{id:i,selCtx:a,emit:o={},fltCtx:s}=e,{allowMultiple:u,selMin:l,selMax:f}=t,{isInputEnabled:c,isInputCounterIncrementEnabled:g}=Rp(),d=oe(se=>se.refreshForm),h=oe(se=>se.currency),{watch:b,getValues:y,setValue:p,register:m,unregister:O}=He(),w=b(`selected.${a}.${i}`),{selected:E={}}=y(),x=Number(w||0),T=l==="1"&&f==="1";Ip(e,T,r);const I=!T,k=Pn(n),D=Jg(u),F=k&&x>0||x>(T?1:0),j=k&&x<Number((ce=(G=n==null?void 0:n.attrs)==null?void 0:G.qtyMax)!=null?ce:0)||g(e,E)&&(c(e)||x),U=Number(((Me=E==null?void 0:E[a])==null?void 0:Me[i])||0)>0,B=k||c(e)||x,re=`${T?"radio":"selected"}.${a}.${i}`,K=m(re,{onChange:se=>{ie(se)}}),ne=()=>{var Ae,he;if(p(`selected.${a}.${i}`,`${x+1}`),Pn(n)){const{product:z,value:ae}=Oa(n,i,x+1);p(`selected.${z==null?void 0:z.selCtx}.${z==null?void 0:z.id}`,ae),(ae==="0"||ae===!1)&&Ft(p,y,z,!1,O,r)}const ue=(he=(Ae=Object.keys(E))==null?void 0:Ae.map(z=>{var ae;return{key:z,subProductId:(ae=or(e,z))==null?void 0:ae.id}}))==null?void 0:he.filter(z=>!!z.subProductId);x===0&&(ue==null||ue.forEach(z=>{p(`selected.${z.key}.${z.subProductId}`,`${x+1}`)}))},H=()=>{var Ae,he,z,ae;const se=x-1;if(p(`selected.${a}.${i}`,`${se}`),k){const{product:q,value:W}=Oa(n,i,se);p(`selected.${q==null?void 0:q.selCtx}.${q==null?void 0:q.id}`,W),W==="1"&&Ft(p,y,q,!0,O,r)}const ue=(he=(Ae=Object.keys(E))==null?void 0:Ae.map(q=>{var W;return{key:q,subProductId:(W=or(e,q))==null?void 0:W.id}}))==null?void 0:he.filter(q=>!!q.subProductId);if(se===0&&(ue==null||ue.forEach(q=>{p(`selected.${q.key}.${q.subProductId}`,`${se}`)})),I&&se===0){p(`selected.${a}.${i}`,!1),(z=Object.keys(o))==null||z.forEach(W=>{const le=`filterWithCnt.${s}.${W}.${o[W]}`,fe=y(le)||0;fe<2?O(le):p(le,fe-1)});const q=W=>{!Array.isArray(W)||W.map(le=>{const{selCtx:fe}=le;y(`selected.${fe}`)&&_n(fe,y,p),q(le.items)})};if(q(e.items),r&&r<2&&!Re(o)){const W=`filterWithCnt.${s}`,le=`filterWithCnt.${s}.${a}`,fe=`filter.${s}`;(ae=Object.keys(o))==null||ae.forEach(Se=>{var P,C,R;const v=y(`${le}.${Se}`)||0;if(v)if(v>1)p(`${le}.${Se}`,v-1);else{O(`${le}.${Se}`);const L=y(W)||{},_=(P=Object.keys(L))==null?void 0:P.filter(M=>M!==a);if(!_)O(`${fe}.${Se}`);else{const M=_==null?void 0:_.find(ee=>{var J;return!!((J=L==null?void 0:L[`${ee}`])!=null&&J[`${Se}`])});if(!M)O(`${fe}.${Se}`);else{const ee=(R=(C=L==null?void 0:L[`${M}`])==null?void 0:C[`${Se}`])==null?void 0:R.value;p(`${fe}.${Se}`,ee)}}}})}}},ie=se=>{var z;const{target:{checked:ue,name:Ae,defaultValue:he}}=se;if(k){const{clickedProductValue:ae,secondProductValue:q,secondProduct:W}=Xg(n,i,ue,E);console.log("handleOnInputChange clickedProductValue",ae,q),p(`selected.${e==null?void 0:e.selCtx}.${e==null?void 0:e.id}`,ae),p(`selected.${W==null?void 0:W.selCtx}.${W==null?void 0:W.id}`,q),Ft(p,y,e,ue,O,r),Ft(p,y,W,q!==!1,O,r);return}if(Ft(p,y,e,ue,O,r),T){const ae=(z=n==null?void 0:n.items)==null?void 0:z.filter(W=>W.id!==e.id);for(const W of Object.keys(E||{}))(ae!=null&&ae.some(fe=>!!or(fe,W))?W:!1)&&p(`selected.${W}`,!1);const q="selected."+Ae.replace("radio.","").split(".")[0];p(q,{[he]:"1"}),d()}};return{registerProps:K,isRadio:T,isCheckbox:I,isCounter:D,isDecrementEnabled:F,isIncrementEnabled:j,isChecked:U,isCheckboxEnabled:B,handleCounterIncrementQty:ne,handleCounterDecrementQty:H,counterValue:x,handleOnInputChange:ie,inputId:`${a}.${i}`,radioInputValue:i,currency:h}}const Fp=e=>{const{product:t,parentAttrs:r,nestedLvl:n,parentProduct:i,rootProduct:a}=e,{registerProps:o,inputId:s,radioInputValue:u,isRadio:l,isCheckbox:f,isCounter:c,isDecrementEnabled:g,isIncrementEnabled:d,isChecked:h,isCheckboxEnabled:b,counterValue:y,handleCounterIncrementQty:p,handleCounterDecrementQty:m,currency:O}=Lp(t,r,n,i),{MenuProductUI:w}=Lr(),E={product:t,nestedLvl:n,registerProps:o,inputId:s,radioInputValue:u,isRadio:l,isCheckbox:f,isCounter:c,isDecrementEnabled:g,isIncrementEnabled:d,isChecked:h,isCheckboxEnabled:b,counterValue:y,handleCounterIncrementQty:p,handleCounterDecrementQty:m,currency:O,parentProduct:i},x=A(Zn,{productItems:t.items,parentProduct:t,nestedLvl:n+1,rootProduct:a});return w?A(w,{...E,children:x}):A(kp,{...E,children:x})},kp=e=>{const{product:t,nestedLvl:r,registerProps:n,inputId:i,radioInputValue:a,isRadio:o,isCheckbox:s,isCounter:u,isDecrementEnabled:l,isIncrementEnabled:f,isChecked:c,isCheckboxEnabled:g,counterValue:d,handleCounterIncrementQty:h,handleCounterDecrementQty:b,children:y,parentProduct:p}=e,m=A(xs,{value:d,add:h,subtract:b,disabledSubtract:!l,disabledAdd:!f}),O=()=>o?A($p,{product:t,inputId:i,inputValue:a,registerProps:n,isChecked:c,children:A(Fe,{children:u&&m})}):s?A(Np,{product:t,inputId:i,registerProps:n,isDisabled:!g,parentProduct:p,children:A(Fe,{children:u&&m})}):null,w=!Re(t.items)&&d,E=ui.useTransition(w,{from:{opacity:0,transform:"translateY(-10px)"},enter:{opacity:1,transform:"translateY(0)"}});return V("div",{children:[O(),w?E((x,T)=>T&&A(ui.animated.div,{className:`border-l-2 border-gray-300 ${r>=1&&"ml-4 pl-4"}`,style:x,children:y},r+1)):null]})};function Mp(){return{isMenuProductToShow:r=>r.kind===Le.PRODUCT&&Sa(r),isMenuOptionsToShow:r=>Kt(r.kind)&&Sa(r)}}function Zn(e){const{productItems:t,nestedLvl:r=1,parentProduct:n,rootProduct:i,showOutsideAvailabilitySlotItems:a}=e,{attrs:o={},selCtx:s,kind:u}=n,{isMenuProductToShow:l,isMenuOptionsToShow:f}=Mp(),{MenuItemsUI:c}=Lr(),d={productItems:t,parentProduct:n,renderMenuItem:h=>{var b;return a!==!0&&(h==null?void 0:h.outsideAvailabilitySlot)===!0||Kt(h.kind)&&!((b=h==null?void 0:h.items)!=null&&b.find(y=>{var p,m;return((p=y==null?void 0:y.attrs)==null?void 0:p.hidden)!==!0&&((m=y==null?void 0:y._)==null?void 0:m.hidden)!=="true"}))?A(Fe,{}):f(h)?A(Tp,{optionsItem:h,parentSelCtx:s,parentKind:u,nestedLvl:r,rootProduct:i}):l(h)?A(Fp,{product:h,parentAttrs:o,parentProduct:n,nestedLvl:r,rootProduct:i}):A(Fe,{})},rootProduct:i};return c?A(c,{...d}):A(jp,{...d})}function jp(e){const{productItems:t,parentProduct:r,renderMenuItem:n}=e,i=r.kind!==Le.PRODUCT,a=99,o=3,[s,u]=S.useState(i?o:a),{t:l}=Jn(),f=()=>{u(a)},c=()=>{u(o)};return A(Fe,{children:t.map((g,d)=>{if(d<s)return V("div",{children:[n(g),s===a&&i&&t.length===d+1&&Va(l("OS.ProductConfigurator.ShowLess"),c,!1)]},`${r.id}--${g.id}--${d}`);if(d===s)return Va(l("OS.ProductConfigurator.ShowMore"),f,!0)})})}const Va=(e,t,r)=>A("div",{className:"flex justify-center w-full",children:V("button",{className:"flex px-2 text-lg font-semibold text-black",onClick:t,children:[e,V("svg",{className:`-mr-2 size-7 ${!r&&"rotate-180"}`,width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[A("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",A("polyline",{points:"7 7 12 12 17 7"})," ",A("polyline",{points:"7 13 12 18 17 13"})]})]})},`${e}`),_s=()=>{const{watch:e}=He(),t=e("selected"),r=e("filter"),n=e("filterWithCnt"),i=oe(a=>a.validationMap);return console.log({selected:t,validationMap:i,filter:r,filterWithCnt:n}),V("div",{className:"flex flex-col items-center py-4",children:[A("h2",{className:"mb-4 text-2xl font-bold tracking-wide",children:"Selected State"}),Object.keys(t).map(a=>A("div",{children:Object.values(t[a]).filter(o=>o).length>0&&V(Fe,{children:[V("p",{className:"text-lg font-semibold",children:[a,":"]}),Object.keys(t[a]).map(o=>A(N.default.Fragment,{children:t[a][o]&&V("p",{children:[o,":",t[a][o].toString()]})},o))]})},a))]})};function Ba(e){const{finalPrice:t,isBackIcon:r=!0,handleGoBack:n,displayPriceFrom:i=!1,productQuantity:a,increaseProductQuantity:o,decreaseProductQuantity:s,handleOnSubmit:u}=e,{t:l}=Jn();return V("div",{className:"flex items-center justify-around w-full h-16 px-4",children:[r&&V("button",{className:"inline-flex items-center px-2 py-1 font-bold text-red-600 border-2 border-red-600 border-solid rounded hover:bg-red-200",onClick:n,children:[V("svg",{className:"size-5 text-red-600",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[A("path",{stroke:"none",d:"M0 0h24v24H0z"}),A("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),A("line",{x1:"5",y1:"12",x2:"11",y2:"18"}),A("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]}),A("span",{className:"uppercase",children:`${l("OS.ProductConfigurator.Back")}`})]}),A("div",{className:"px-3",children:A(xs,{value:a,add:o,subtract:s,disabledSubtract:a===1,size:"lg"})}),V("button",{type:"submit",className:"flex items-center justify-center w-2/4 px-2 py-1 font-bold text-white bg-green-600 border-2 border-green-600 border-solid rounded hover:bg-green-800 sm:w-3/5",style:{opacity:`${i?"0.4":"1"}`},disabled:i,onClick:u,children:[V("svg",{className:"size-5 mr-2 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[A("circle",{cx:"9",cy:"21",r:"1"})," ",A("circle",{cx:"20",cy:"21",r:"1"}),A("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),i?A("span",{children:`${l("OS.ProductConfigurator.Selected.Message.From")} ${t}`}):A("span",{className:"uppercase",children:`${l("OS.ProductConfigurator.Add")} ${t}`})]})]})}const tr=640,Ts=e=>{const{isModal:t=!1}=e,[r,n]=S.useState(window.innerWidth),[i,a]=S.useState(window.innerHeight),[o,s]=S.useState(window.innerWidth<=tr),[u,l]=S.useState(window.innerWidth>tr&&!t);function f(){n(window.innerWidth),a(window.innerHeight)}return S.useEffect(()=>(window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}),[]),S.useEffect(()=>{l(window.innerWidth>tr&&!t),s(window.innerWidth<=tr)},[r,e,t]),{isSm:u,isMobile:o,width:r,windowHeight:i}};function Ns(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Ns(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function kt(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Ns(e))&&(n&&(n+=" "),n+=t);return n}const Fr=typeof window=="undefined"||typeof document=="undefined";let Qe=Fr?S.useEffect:S.useLayoutEffect;function Ke(e){let t=S.useRef(e);return Qe(()=>{t.current=e},[e]),t}function kr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Qt(){let e=[],t=[],r={enqueue(n){t.push(n)},addEventListener(n,i,a,o){return n.addEventListener(i,a,o),r.add(()=>n.removeEventListener(i,a,o))},requestAnimationFrame(...n){let i=requestAnimationFrame(...n);return r.add(()=>cancelAnimationFrame(i))},nextFrame(...n){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...n))},setTimeout(...n){let i=setTimeout(...n);return r.add(()=>clearTimeout(i))},microTask(...n){let i={current:!0};return kr(()=>{i.current&&n[0]()}),r.add(()=>{i.current=!1})},add(n){return e.push(n),()=>{let i=e.indexOf(n);if(i>=0){let[a]=e.splice(i,1);a()}}},dispose(){for(let n of e.splice(0))n()},async workQueue(){for(let n of t.splice(0))await n()}};return r}function Xn(){let[e]=S.useState(Qt);return S.useEffect(()=>()=>e.dispose(),[e]),e}let pe=function(e){let t=Ke(e);return N.default.useCallback((...r)=>t.current(...r),[t])},ln={serverHandoffComplete:!1};function xt(){let[e,t]=S.useState(ln.serverHandoffComplete);return S.useEffect(()=>{e!==!0&&t(!0)},[e]),S.useEffect(()=>{ln.serverHandoffComplete===!1&&(ln.serverHandoffComplete=!0)},[]),e}var Ha;let Dp=0;function Wa(){return++Dp}let _t=(Ha=N.default.useId)!=null?Ha:function(){let e=xt(),[t,r]=N.default.useState(e?Wa:null);return Qe(()=>{t===null&&r(Wa())},[t]),t!=null?""+t:void 0};function de(e,t,...r){if(e in t){let i=t[e];return typeof i=="function"?i(...r):i}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,de),n}function ei(e){return Fr?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Tn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ot=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ot||{}),$s=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))($s||{}),Up=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Up||{});function Vp(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Tn)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Is=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Is||{});function Bp(e,t=0){var r;return e===((r=ei(e))==null?void 0:r.body)?!1:de(t,{[0](){return e.matches(Tn)},[1](){let n=e;for(;n!==null;){if(n.matches(Tn))return!0;n=n.parentElement}return!1}})}function ut(e){e==null||e.focus({preventScroll:!0})}let Hp=["textarea","input"].join(",");function Wp(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Hp))!=null?r:!1}function Gp(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),a=t(n);if(i===null||a===null)return 0;let o=i.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function sr(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?r?Gp(e):e:Vp(e);i.length>0&&(o=o.filter(d=>!i.includes(d))),n=n!=null?n:a.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(n))-1;if(t&4)return Math.max(0,o.indexOf(n))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=t&32?{preventScroll:!0}:{},f=0,c=o.length,g;do{if(f>=c||f+c<=0)return 0;let d=u+f;if(t&16)d=(d+c)%c;else{if(d<0)return 3;if(d>=c)return 1}g=o[d],g==null||g.focus(l),f+=s}while(g!==a.activeElement);return t&6&&Wp(g)&&g.select(),g.hasAttribute("tabindex")||g.setAttribute("tabindex","0"),2}function cn(e,t,r){let n=Ke(t);S.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function zp(e,t,r=!0){let n=S.useRef(!1);S.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function i(o,s){if(!n.current||o.defaultPrevented)return;let u=function f(c){return typeof c=="function"?f(c()):Array.isArray(c)||c instanceof Set?c:[c]}(e),l=s(o);if(l!==null&&!!l.getRootNode().contains(l)){for(let f of u){if(f===null)continue;let c=f instanceof HTMLElement?f:f.current;if(c!=null&&c.contains(l)||o.composed&&o.composedPath().includes(c))return}return!Bp(l,Is.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}}let a=S.useRef(null);cn("mousedown",o=>{var s,u;n.current&&(a.current=((u=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:u[0])||o.target)},!0),cn("click",o=>{!a.current||(i(o,()=>a.current),a.current=null)},!0),cn("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}let Rs=Symbol();function qp(e,t=!0){return Object.assign(e,{[Rs]:t})}function ke(...e){let t=S.useRef(e);S.useEffect(()=>{t.current=e},[e]);let r=pe(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Rs]))?void 0:r}var Or=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Or||{}),ze=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(ze||{});function Ne({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:a=!0,name:o}){let s=Ls(t,e);if(a)return rr(s,r,n,o);let u=i!=null?i:0;if(u&2){let{static:l=!1,...f}=s;if(l)return rr(f,r,n,o)}if(u&1){let{unmount:l=!0,...f}=s;return de(l?0:1,{[0](){return null},[1](){return rr({...f,hidden:!0,style:{display:"none"}},r,n,o)}})}return rr(s,r,n,o)}function rr(e,t={},r,n){let{as:i=r,children:a,refName:o="ref",...s}=fn(e,["unmount","static"]),u=e.ref!==void 0?{[o]:e.ref}:{},l=typeof a=="function"?a(t):a;s.className&&typeof s.className=="function"&&(s.className=s.className(t));let f={};if(t){let c=!1,g=[];for(let[d,h]of Object.entries(t))typeof h=="boolean"&&(c=!0),h===!0&&g.push(d);c&&(f["data-headlessui-state"]=g.join(" "))}if(i===S.Fragment&&Object.keys(Ga(s)).length>0){if(!S.isValidElement(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map(c=>` - ${c}`).join(`
|
|
15
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(c=>` - ${c}`).join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),zu=require("react-spring"),tv=require("react-dom");function rv(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Yt=rv(w);var Tr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mn={exports:{}},Gr={};var Ku;function nv(){if(Ku)return Gr;Ku=1;var e=w,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,u,c){var l,f={},p=null,y=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(y=u.ref);for(l in u)n.call(u,l)&&!a.hasOwnProperty(l)&&(f[l]=u[l]);if(s&&s.defaultProps)for(l in u=s.defaultProps,u)f[l]===void 0&&(f[l]=u[l]);return{$$typeof:t,type:s,key:p,ref:y,props:f,_owner:i.current}}return Gr.Fragment=r,Gr.jsx=o,Gr.jsxs=o,Gr}var zr={};var Yu;function iv(){return Yu||(Yu=1,process.env.NODE_ENV!=="production"&&(function(){var e=w,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),h=Symbol.iterator,b="@@iterator";function _(R){if(R===null||typeof R!="object")return null;var q=h&&R[h]||R[b];return typeof q=="function"?q:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(R){{for(var q=arguments.length,X=new Array(q>1?q-1:0),se=1;se<q;se++)X[se-1]=arguments[se];E("error",R,X)}}function E(R,q,X){{var se=m.ReactDebugCurrentFrame,me=se.getStackAddendum();me!==""&&(q+="%s",X=X.concat([me]));var Ee=X.map(function(ge){return String(ge)});Ee.unshift("Warning: "+q),Function.prototype.apply.call(console[R],console,Ee)}}var g=!1,v=!1,O=!1,A=!1,S=!1,T;T=Symbol.for("react.module.reference");function P(R){return!!(typeof R=="string"||typeof R=="function"||R===n||R===a||S||R===i||R===c||R===l||A||R===y||g||v||O||typeof R=="object"&&R!==null&&(R.$$typeof===p||R.$$typeof===f||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===T||R.getModuleId!==void 0))}function N(R,q,X){var se=R.displayName;if(se)return se;var me=q.displayName||q.name||"";return me!==""?X+"("+me+")":X}function M(R){return R.displayName||"Context"}function U(R){if(R==null)return null;if(typeof R.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case l:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case s:var q=R;return M(q)+".Consumer";case o:var X=R;return M(X._context)+".Provider";case u:return N(R,R.render,"ForwardRef");case f:var se=R.displayName||null;return se!==null?se:U(R.type)||"Memo";case p:{var me=R,Ee=me._payload,ge=me._init;try{return U(ge(Ee))}catch{return null}}}return null}var F=Object.assign,D=0,$,B,k,Q,K,ee,G;function ne(){}ne.__reactDisabledLog=!0;function te(){{if(D===0){$=console.log,B=console.info,k=console.warn,Q=console.error,K=console.group,ee=console.groupCollapsed,G=console.groupEnd;var R={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:R,log:R,warn:R,error:R,group:R,groupCollapsed:R,groupEnd:R})}D++}}function ce(){{if(D--,D===0){var R={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},R,{value:$}),info:F({},R,{value:B}),warn:F({},R,{value:k}),error:F({},R,{value:Q}),group:F({},R,{value:K}),groupCollapsed:F({},R,{value:ee}),groupEnd:F({},R,{value:G})})}D<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=m.ReactCurrentDispatcher,re;function le(R,q,X){{if(re===void 0)try{throw Error()}catch(me){var se=me.stack.trim().match(/\n( *(at )?)/);re=se&&se[1]||""}return`
|
|
2
|
+
`+re+R}}var _e=!1,de;{var ae=typeof WeakMap=="function"?WeakMap:Map;de=new ae}function fe(R,q){if(!R||_e)return"";{var X=de.get(R);if(X!==void 0)return X}var se;_e=!0;var me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ee;Ee=ue.current,ue.current=null,te();try{if(q){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(Je){se=Je}Reflect.construct(R,[],ge)}else{try{ge.call()}catch(Je){se=Je}R.call(ge.prototype)}}else{try{throw Error()}catch(Je){se=Je}R()}}catch(Je){if(Je&&se&&typeof Je.stack=="string"){for(var pe=Je.stack.split(`
|
|
3
|
+
`),Ke=se.stack.split(`
|
|
4
|
+
`),Le=pe.length-1,$e=Ke.length-1;Le>=1&&$e>=0&&pe[Le]!==Ke[$e];)$e--;for(;Le>=1&&$e>=0;Le--,$e--)if(pe[Le]!==Ke[$e]){if(Le!==1||$e!==1)do if(Le--,$e--,$e<0||pe[Le]!==Ke[$e]){var st=`
|
|
5
|
+
`+pe[Le].replace(" at new "," at ");return R.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",R.displayName)),typeof R=="function"&&de.set(R,st),st}while(Le>=1&&$e>=0);break}}}finally{_e=!1,ue.current=Ee,ce(),Error.prepareStackTrace=me}var Er=R?R.displayName||R.name:"",tr=Er?le(Er):"";return typeof R=="function"&&de.set(R,tr),tr}function he(R,q,X){return fe(R,!1)}function je(R){var q=R.prototype;return!!(q&&q.isReactComponent)}function It(R,q,X){if(R==null)return"";if(typeof R=="function")return fe(R,je(R));if(typeof R=="string")return le(R);switch(R){case c:return le("Suspense");case l:return le("SuspenseList")}if(typeof R=="object")switch(R.$$typeof){case u:return he(R.render);case f:return It(R.type,q,X);case p:{var se=R,me=se._payload,Ee=se._init;try{return It(Ee(me),q,X)}catch{}}}return""}var Xe=Object.prototype.hasOwnProperty,ze={},ie=m.ReactDebugCurrentFrame;function Ae(R){if(R){var q=R._owner,X=It(R.type,R._source,q?q.type:null);ie.setExtraStackFrame(X)}else ie.setExtraStackFrame(null)}function at(R,q,X,se,me){{var Ee=Function.call.bind(Xe);for(var ge in R)if(Ee(R,ge)){var pe=void 0;try{if(typeof R[ge]!="function"){var Ke=Error((se||"React class")+": "+X+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof R[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ke.name="Invariant Violation",Ke}pe=R[ge](q,ge,se,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Le){pe=Le}pe&&!(pe instanceof Error)&&(Ae(me),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",se||"React class",X,ge,typeof pe),Ae(null)),pe instanceof Error&&!(pe.message in ze)&&(ze[pe.message]=!0,Ae(me),d("Failed %s type: %s",X,pe.message),Ae(null))}}}var ot=Array.isArray;function kt(R){return ot(R)}function Or(R){{var q=typeof Symbol=="function"&&Symbol.toStringTag,X=q&&R[Symbol.toStringTag]||R.constructor.name||"Object";return X}}function St(R){try{return Fn(R),!1}catch{return!0}}function Fn(R){return""+R}function $n(R){if(St(R))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Or(R)),Fn(R)}var ta=m.ReactCurrentOwner,Bu={key:!0,ref:!0,__self:!0,__source:!0},Br,x;function j(R){if(Xe.call(R,"ref")){var q=Object.getOwnPropertyDescriptor(R,"ref").get;if(q&&q.isReactWarning)return!1}return R.ref!==void 0}function L(R){if(Xe.call(R,"key")){var q=Object.getOwnPropertyDescriptor(R,"key").get;if(q&&q.isReactWarning)return!1}return R.key!==void 0}function V(R,q){typeof R.ref=="string"&&ta.current}function W(R,q){{var X=function(){Br||(Br=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};X.isReactWarning=!0,Object.defineProperty(R,"key",{get:X,configurable:!0})}}function J(R,q){{var X=function(){x||(x=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};X.isReactWarning=!0,Object.defineProperty(R,"ref",{get:X,configurable:!0})}}var z=function(R,q,X,se,me,Ee,ge){var pe={$$typeof:t,type:R,key:q,ref:X,props:ge,_owner:Ee};return pe._store={},Object.defineProperty(pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:se}),Object.defineProperty(pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.freeze&&(Object.freeze(pe.props),Object.freeze(pe)),pe};function Z(R,q,X,se,me){{var Ee,ge={},pe=null,Ke=null;X!==void 0&&($n(X),pe=""+X),L(q)&&($n(q.key),pe=""+q.key),j(q)&&(Ke=q.ref,V(q,me));for(Ee in q)Xe.call(q,Ee)&&!Bu.hasOwnProperty(Ee)&&(ge[Ee]=q[Ee]);if(R&&R.defaultProps){var Le=R.defaultProps;for(Ee in Le)ge[Ee]===void 0&&(ge[Ee]=Le[Ee])}if(pe||Ke){var $e=typeof R=="function"?R.displayName||R.name||"Unknown":R;pe&&W(ge,$e),Ke&&J(ge,$e)}return z(R,pe,Ke,me,se,ta.current,ge)}}var oe=m.ReactCurrentOwner,Oe=m.ReactDebugCurrentFrame;function Fe(R){if(R){var q=R._owner,X=It(R.type,R._source,q?q.type:null);Oe.setExtraStackFrame(X)}else Oe.setExtraStackFrame(null)}var wt;wt=!1;function et(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Ut(){{if(oe.current){var R=U(oe.current.type);if(R)return`
|
|
6
|
+
|
|
7
|
+
Check the render method of \``+R+"`."}return""}}function ra(R){return""}var Hr={};function na(R){{var q=Ut();if(!q){var X=typeof R=="string"?R:R.displayName||R.name;X&&(q=`
|
|
8
|
+
|
|
9
|
+
Check the top-level render call using <`+X+">.")}return q}}function Wr(R,q){{if(!R._store||R._store.validated||R.key!=null)return;R._store.validated=!0;var X=na(q);if(Hr[X])return;Hr[X]=!0;var se="";R&&R._owner&&R._owner!==oe.current&&(se=" It was passed a child from "+U(R._owner.type)+"."),Fe(R),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,se),Fe(null)}}function Hu(R,q){{if(typeof R!="object")return;if(kt(R))for(var X=0;X<R.length;X++){var se=R[X];et(se)&&Wr(se,q)}else if(et(R))R._store&&(R._store.validated=!0);else if(R){var me=_(R);if(typeof me=="function"&&me!==R.entries)for(var Ee=me.call(R),ge;!(ge=Ee.next()).done;)et(ge.value)&&Wr(ge.value,q)}}}function zm(R){{var q=R.type;if(q==null||typeof q=="string")return;var X;if(typeof q=="function")X=q.propTypes;else if(typeof q=="object"&&(q.$$typeof===u||q.$$typeof===f))X=q.propTypes;else return;if(X){var se=U(q);at(X,R.props,"prop",se,R)}else if(q.PropTypes!==void 0&&!wt){wt=!0;var me=U(q);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",me||"Unknown")}typeof q.getDefaultProps=="function"&&!q.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Km(R){{for(var q=Object.keys(R.props),X=0;X<q.length;X++){var se=q[X];if(se!=="children"&&se!=="key"){Fe(R),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Fe(null);break}}R.ref!==null&&(Fe(R),d("Invalid attribute `ref` supplied to `React.Fragment`."),Fe(null))}}var Wu={};function Gu(R,q,X,se,me,Ee){{var ge=P(R);if(!ge){var pe="";(R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(pe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ke=ra();Ke?pe+=Ke:pe+=Ut();var Le;R===null?Le="null":kt(R)?Le="array":R!==void 0&&R.$$typeof===t?(Le="<"+(U(R.type)||"Unknown")+" />",pe=" Did you accidentally export a JSX literal instead of a component?"):Le=typeof R,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Le,pe)}var $e=Z(R,q,X,me,Ee);if($e==null)return $e;if(ge){var st=q.children;if(st!==void 0)if(se)if(kt(st)){for(var Er=0;Er<st.length;Er++)Hu(st[Er],R);Object.freeze&&Object.freeze(st)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Hu(st,R)}if(Xe.call(q,"key")){var tr=U(R),Je=Object.keys(q).filter(function(ev){return ev!=="key"}),ia=Je.length>0?"{key: someKey, "+Je.join(": ..., ")+": ...}":"{key: someKey}";if(!Wu[tr+ia]){var Xm=Je.length>0?"{"+Je.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX:
|
|
10
|
+
let props = %s;
|
|
11
|
+
<%s {...props} />
|
|
12
|
+
React keys must be passed directly to JSX without using spread:
|
|
13
|
+
let props = %s;
|
|
14
|
+
<%s key={someKey} {...props} />`,ia,tr,Xm,tr),Wu[tr+ia]=!0}}return R===n?Km($e):zm($e),$e}}function Ym(R,q,X){return Gu(R,q,X,!0)}function Jm(R,q,X){return Gu(R,q,X,!1)}var Zm=Jm,Qm=Ym;zr.Fragment=n,zr.jsx=Zm,zr.jsxs=Qm})()),zr}var Ju;function av(){return Ju||(Ju=1,process.env.NODE_ENV==="production"?Mn.exports=nv():Mn.exports=iv()),Mn.exports}var I=av();function bt(e){"@babel/helpers - typeof";return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(e)}function pt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ov(e,t){if(bt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fp(e){var t=ov(e,"string");return bt(t)=="symbol"?t:t+""}function Zu(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fp(n.key),n)}}function ht(e,t,r){return t&&Zu(e.prototype,t),r&&Zu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bs(e,t){return bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},bs(e,t)}function Oi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bs(e,t)}function Sn(e,t){if(t&&(bt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rt(e)}function Pt(e,t,r){return(t=Fp(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $p(e){if(Array.isArray(e))return e}function sv(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Qu(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mp(e,t){if(e){if(typeof e=="string")return Qu(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qu(e,t):void 0}}function kp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uv(e){return $p(e)||sv(e)||Mp(e)||kp()}function Xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xu(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xu(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var cv={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},lv=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pt(this,e),this.init(t,r)}return ht(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||cv,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,i,a){return a&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,ec(ec({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e})(),Tt=new lv,Zt=(function(){function e(){pt(this,e),this.observers={}}return ht(e,[{key:"on",value:function(r,n){var i=this;return r.split(" ").forEach(function(a){i.observers[a]=i.observers[a]||[],i.observers[a].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(i){return i!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];if(this.observers[r]){var o=[].concat(this.observers[r]);o.forEach(function(u){u.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(u){u.apply(u,[r].concat(i))})}}}]),e})();function Kr(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function tc(e){return e==null?"":""+e}function fv(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function eu(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(i())return{};var o=n(a.shift());!e[o]&&r&&(e[o]=new r),Object.prototype.hasOwnProperty.call(e,o)?e=e[o]:e={}}return i()?{}:{obj:e,k:n(a.shift())}}function rc(e,t,r){var n=eu(e,t,Object),i=n.obj,a=n.k;i[a]=r}function dv(e,t,r,n){var i=eu(e,t,Object),a=i.obj,o=i.k;a[o]=a[o]||[],a[o].push(r)}function ni(e,t){var r=eu(e,t),n=r.obj,i=r.k;if(n)return n[i]}function nc(e,t,r){var n=ni(e,r);return n!==void 0?n:ni(t,r)}function Up(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Up(e[n],t[n],r):e[n]=t[n]);return e}function Sr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var pv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function hv(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return pv[t]}):e}var Ei=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,gv=[" ",",","?","!",";"];function mv(e,t,r){t=t||"",r=r||"";var n=gv.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!i.test(e);if(!a){var o=e.indexOf(r);o>0&&!i.test(e.substring(0,o))&&(a=!0)}return a}function ic(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ic(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vv(e){var t=yv();return function(){var n=Rt(e),i;if(t){var a=Rt(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sn(this,i)}}function yv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vp(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,a=0;a<n.length;++a){if(!i||typeof i[n[a]]=="string"&&a+1<n.length)return;if(i[n[a]]===void 0){for(var o=2,s=n.slice(a,a+o).join(r),u=i[s];u===void 0&&n.length>a+o;)o++,s=n.slice(a,a+o).join(r),u=i[s];if(u===void 0)return;if(u===null)return null;if(t.endsWith(s)){if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s]}var c=n.slice(a+o).join(r);return c?Vp(u,c,r):void 0}i=i[n[a]]}return i}}var bv=(function(e){Oi(r,e);var t=vv(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return pt(this,r),i=t.call(this),Ei&&Zt.call(Jt(i)),i.data=n||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ht(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},u=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,l=[i,a];o&&typeof o!="string"&&(l=l.concat(o)),o&&typeof o=="string"&&(l=l.concat(u?o.split(u):o)),i.indexOf(".")>-1&&(l=i.split("."));var f=ni(this.data,l);return f||!c||typeof o!="string"?f:Vp(this.data&&this.data[i]&&this.data[i][a],o,u)}},{key:"addResource",value:function(i,a,o,s){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var l=[i,a];o&&(l=l.concat(c?o.split(c):o)),i.indexOf(".")>-1&&(l=i.split("."),s=a,a=l[1]),this.addNamespaces(a),rc(this.data,l,s),u.silent||this.emit("added",i,a,o,s)}},{key:"addResources",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var u in o)(typeof o[u]=="string"||Object.prototype.toString.apply(o[u])==="[object Array]")&&this.addResource(i,a,u,o[u],{silent:!0});s.silent||this.emit("added",i,a,o)}},{key:"addResourceBundle",value:function(i,a,o,s,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[i,a];i.indexOf(".")>-1&&(l=i.split("."),s=o,o=a,a=l[1]),this.addNamespaces(a);var f=ni(this.data,l)||{};s?Up(f,o,u):f=kn(kn({},f),o),rc(this.data,l,f),c.silent||this.emit("added",i,a,o)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?kn(kn({},{}),this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var a=this.getDataByLanguage(i),o=a&&Object.keys(a)||[];return!!o.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r})(Zt),qp={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,i,a){var o=this;return t.forEach(function(s){o.processors[s]&&(r=o.processors[s].process(r,n,i,a))}),r}};function ac(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ye(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ac(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ac(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _v(e){var t=Ov();return function(){var n=Rt(e),i;if(t){var a=Rt(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sn(this,i)}}function Ov(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var oc={},sc=(function(e){Oi(r,e);var t=_v(r);function r(n){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return pt(this,r),i=t.call(this),Ei&&Zt.call(Jt(i)),fv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,Jt(i)),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Tt.create("translator"),i}return ht(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var o=this.resolve(i,a);return o&&o.res!==void 0}},{key:"extractFromKey",value:function(i,a){var o=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ns||this.options.defaultNS||[],c=o&&i.indexOf(o)>-1,l=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!mv(i,o,s);if(c&&!l){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:u};var p=i.split(o);(o!==s||o===s&&this.options.ns.indexOf(p[0])>-1)&&(u=p.shift()),i=p.join(s)}return typeof u=="string"&&(u=[u]),{key:i,namespaces:u}}},{key:"translate",value:function(i,a,o){var s=this;if(bt(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var u=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=this.extractFromKey(i[i.length-1],a),f=l.key,p=l.namespaces,y=p[p.length-1],h=a.lng||this.language,b=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(b){var _=a.nsSeparator||this.options.nsSeparator;return u?(m.res="".concat(y).concat(_).concat(f),m):"".concat(y).concat(_).concat(f)}return u?(m.res=f,m):f}var m=this.resolve(i,a),d=m&&m.res,E=m&&m.usedKey||f,g=m&&m.exactUsedKey||f,v=Object.prototype.toString.apply(d),O=["[object Number]","[object Function]","[object RegExp]"],A=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,T=typeof d!="string"&&typeof d!="boolean"&&typeof d!="number";if(S&&d&&T&&O.indexOf(v)<0&&!(typeof A=="string"&&v==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,d,Ye(Ye({},a),{},{ns:p})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return u?(m.res=P,m):P}if(c){var N=v==="[object Array]",M=N?[]:{},U=N?g:E;for(var F in d)if(Object.prototype.hasOwnProperty.call(d,F)){var D="".concat(U).concat(c).concat(F);M[F]=this.translate(D,Ye(Ye({},a),{joinArrays:!1,ns:p})),M[F]===D&&(M[F]=d[F])}d=M}}else if(S&&typeof A=="string"&&v==="[object Array]")d=d.join(A),d&&(d=this.extendTranslation(d,i,a,o));else{var $=!1,B=!1,k=a.count!==void 0&&typeof a.count!="string",Q=r.hasDefaultValue(a),K=k?this.pluralResolver.getSuffix(h,a.count,a):"",ee=a["defaultValue".concat(K)]||a.defaultValue;!this.isValidLookup(d)&&Q&&($=!0,d=ee),this.isValidLookup(d)||(B=!0,d=f);var G=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,ne=G&&B?void 0:d,te=Q&&ee!==d&&this.options.updateMissing;if(B||$||te){if(this.logger.log(te?"updateKey":"missingKey",h,y,f,te?ee:d),c){var ce=this.resolve(f,Ye(Ye({},a),{},{keySeparator:!1}));ce&&ce.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.")}var ue=[],re=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&re&&re[0])for(var le=0;le<re.length;le++)ue.push(re[le]);else this.options.saveMissingTo==="all"?ue=this.languageUtils.toResolveHierarchy(a.lng||this.language):ue.push(a.lng||this.language);var _e=function(ae,fe,he){var je=Q&&he!==d?he:ne;s.options.missingKeyHandler?s.options.missingKeyHandler(ae,y,fe,je,te,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(ae,y,fe,je,te,a),s.emit("missingKey",ae,y,fe,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?ue.forEach(function(de){s.pluralResolver.getSuffixes(de,a).forEach(function(ae){_e([de],f+ae,a["defaultValue".concat(ae)]||ee)})}):_e(ue,f,ee))}d=this.extendTranslation(d,i,a,m,o),B&&d===f&&this.options.appendNamespaceToMissingKey&&(d="".concat(y,":").concat(f)),(B||$)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(y,":").concat(f):f,$?d:void 0):d=this.options.parseMissingKeyHandler(d))}return u?(m.res=d,m):d}},{key:"extendTranslation",value:function(i,a,o,s,u){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Ye(Ye({},this.options.interpolation.defaultVariables),o),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init(Ye(Ye({},o),{interpolation:Ye(Ye({},this.options.interpolation),o.interpolation)}));var l=typeof i=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(l){var p=i.match(this.interpolator.nestingRegexp);f=p&&p.length}var y=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(y=Ye(Ye({},this.options.interpolation.defaultVariables),y)),i=this.interpolator.interpolate(i,y,o.lng||this.language,o),l){var h=i.match(this.interpolator.nestingRegexp),b=h&&h.length;f<b&&(o.nest=!1)}o.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var d=arguments.length,E=new Array(d),g=0;g<d;g++)E[g]=arguments[g];return u&&u[0]===E[0]&&!o.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},o)),o.interpolation&&this.interpolator.reset()}var _=o.postProcess||this.options.postProcess,m=typeof _=="string"?[_]:_;return i!=null&&m&&m.length&&o.applyPostProcessor!==!1&&(i=qp.handle(m,i,a,this.options&&this.options.postProcessPassResolved?Ye({i18nResolved:s},o):o,this)),i}},{key:"resolve",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,u,c,l,f;return typeof i=="string"&&(i=[i]),i.forEach(function(p){if(!a.isValidLookup(s)){var y=a.extractFromKey(p,o),h=y.key;u=h;var b=y.namespaces;a.options.fallbackNS&&(b=b.concat(a.options.fallbackNS));var _=o.count!==void 0&&typeof o.count!="string",m=_&&!o.ordinal&&o.count===0&&a.pluralResolver.shouldUseIntlApi(),d=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",E=o.lngs?o.lngs:a.languageUtils.toResolveHierarchy(o.lng||a.language,o.fallbackLng);b.forEach(function(g){a.isValidLookup(s)||(f=g,!oc["".concat(E[0],"-").concat(g)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(f)&&(oc["".concat(E[0],"-").concat(g)]=!0,a.logger.warn('key "'.concat(u,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(f,'" 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!!!")),E.forEach(function(v){if(!a.isValidLookup(s)){l=v;var O=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(O,h,v,g,o);else{var A;_&&(A=a.pluralResolver.getSuffix(v,o.count,o));var S="".concat(a.options.pluralSeparator,"zero");if(_&&(O.push(h+A),m&&O.push(h+S)),d){var T="".concat(h).concat(a.options.contextSeparator).concat(o.context);O.push(T),_&&(O.push(T+A),m&&O.push(T+S))}}for(var P;P=O.pop();)a.isValidLookup(s)||(c=P,s=a.getResource(v,g,P,o))}}))})}}),{res:s,usedKey:u,exactUsedKey:c,usedLng:l,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,o){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,o,s):this.resourceStore.getResource(i,a,o,s)}}],[{key:"hasDefaultValue",value:function(i){var a="defaultValue";for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&a===o.substring(0,a.length)&&i[o]!==void 0)return!0;return!1}}]),r})(Zt);function aa(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Ev=(function(){function e(t){pt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tt.create("languageUtils")}return ht(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(a){return a.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=aa(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=aa(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=aa(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var i;return r.forEach(function(a){if(!i){var o=n.formatLanguageCode(a);(!n.options.supportedLngs||n.isSupportedCode(o))&&(i=o)}}),!i&&this.options.supportedLngs&&r.forEach(function(a){if(!i){var o=n.getLanguagePartFromCode(a);if(n.isSupportedCode(o))return i=o;i=n.options.supportedLngs.find(function(s){if(s.indexOf(o)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,a=this.getFallbackCodes(n||this.options.fallbackLng||[],r),o=[],s=function(c){c&&(i.isSupportedCode(c)?o.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),a.forEach(function(u){o.indexOf(u)<0&&s(i.formatLanguageCode(u))}),o}}]),e})(),Sv=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],wv={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Av=["v1","v2","v3"],uc={zero:0,one:1,two:2,few:3,many:4,other:5};function xv(){var e={};return Sv.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:wv[t.fc]}})}),e}var Tv=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pt(this,e),this.languageUtils=t,this.options=r,this.logger=Tt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=xv()}return ht(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(a){return"".concat(n).concat(a)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(o,s){return uc[o]-uc[s]}).map(function(o){return"".concat(n.options.prepend).concat(o)}):a.numbers.map(function(o){return n.getSuffix(r,o,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(r,i);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(n)):this.getSuffixRetroCompatible(a,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,a=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),o=r.numbers[a];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var s=function(){return i.options.prepend&&o.toString()?i.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!Av.includes(this.options.compatibilityJSON)}}]),e})();function cc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cc(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rv=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(this,e),this.logger=Tt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return ht(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:hv,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Sr(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Sr(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Sr(n.nestingPrefix):n.nestingPrefixEscaped||Sr("$t("),this.nestingSuffix=n.nestingSuffix?Sr(n.nestingSuffix):n.nestingSuffixEscaped||Sr(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,a){var o=this,s,u,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(_){return _.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(o.formatSeparator)<0){var d=nc(n,l,m);return o.alwaysFormat?o.format(d,void 0,i,vt(vt(vt({},a),n),{},{interpolationkey:m})):d}var E=m.split(o.formatSeparator),g=E.shift().trim(),v=E.join(o.formatSeparator).trim();return o.format(nc(n,l,g),v,i,vt(vt(vt({},a),n),{},{interpolationkey:g}))};this.resetRegExp();var y=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,h=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return o.escapeValue?f(o.escape(m)):f(m)}}];return b.forEach(function(_){for(c=0;s=_.regex.exec(r);){var m=s[1].trim();if(u=p(m),u===void 0)if(typeof y=="function"){var d=y(r,s,a);u=typeof d=="string"?d:""}else if(a&&a.hasOwnProperty(m))u="";else if(h){u=s[0];continue}else o.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),u="";else typeof u!="string"&&!o.useRawValueToEscape&&(u=tc(u));var E=_.safeValue(u);if(r=r.replace(s[0],E),h?(_.regex.lastIndex+=u.length,_.regex.lastIndex-=s[0].length):_.regex.lastIndex=0,c++,c>=o.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,s,u=vt({},a);u.applyPostProcessor=!1,delete u.defaultValue;function c(y,h){var b=this.nestingOptionsSeparator;if(y.indexOf(b)<0)return y;var _=y.split(new RegExp("".concat(b,"[ ]*{"))),m="{".concat(_[1]);y=_[0],m=this.interpolate(m,u);var d=m.match(/'/g),E=m.match(/"/g);(d&&d.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{u=JSON.parse(m),h&&(u=vt(vt({},h),u))}catch(g){return this.logger.warn("failed parsing options string in nesting for key ".concat(y),g),"".concat(y).concat(b).concat(m)}return delete u.defaultValue,y}for(;o=this.nestingRegexp.exec(r);){var l=[],f=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){var p=o[1].split(this.formatSeparator).map(function(y){return y.trim()});o[1]=p.shift(),l=p,f=!0}if(s=n(c.call(this,o[1].trim(),u),u),s&&o[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=tc(s)),s||(this.logger.warn("missed to resolve ".concat(o[1]," for nesting ").concat(r)),s=""),f&&(s=l.reduce(function(y,h){return i.format(y,h,a.lng,vt(vt({},a),{},{interpolationkey:o[1].trim()}))},s.trim())),r=r.replace(o[0],s),this.regexp.lastIndex=0}return r}}]),e})();function lc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lc(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pv(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(t==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var a=i.split(";");a.forEach(function(o){if(o){var s=o.split(":"),u=uv(s),c=u[0],l=u.slice(1),f=l.join(":").trim().replace(/^'+|'+$/g,"");r[c.trim()]||(r[c.trim()]=f),f==="false"&&(r[c.trim()]=!1),f==="true"&&(r[c.trim()]=!0),isNaN(f)||(r[c.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:r}}function wr(e){var t={};return function(n,i,a){var o=i+JSON.stringify(a),s=t[o];return s||(s=e(i,a),t[o]=s),s(n)}}var Cv=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};pt(this,e),this.logger=Tt.create("formatter"),this.options=t,this.formats={number:wr(function(r,n){var i=new Intl.NumberFormat(r,n);return function(a){return i.format(a)}}),currency:wr(function(r,n){var i=new Intl.NumberFormat(r,Vt(Vt({},n),{},{style:"currency"}));return function(a){return i.format(a)}}),datetime:wr(function(r,n){var i=new Intl.DateTimeFormat(r,Vt({},n));return function(a){return i.format(a)}}),relativetime:wr(function(r,n){var i=new Intl.RelativeTimeFormat(r,Vt({},n));return function(a){return i.format(a,n.range||"day")}}),list:wr(function(r,n){var i=new Intl.ListFormat(r,Vt({},n));return function(a){return i.format(a)}})},this.init(t)}return ht(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=wr(n)}},{key:"format",value:function(r,n,i,a){var o=this,s=n.split(this.formatSeparator),u=s.reduce(function(c,l){var f=Pv(l),p=f.formatName,y=f.formatOptions;if(o.formats[p]){var h=c;try{var b=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},_=b.locale||b.lng||a.locale||a.lng||i;h=o.formats[p](c,_,Vt(Vt(Vt({},y),a),b))}catch(m){o.logger.warn(m)}return h}else o.logger.warn("there was no format function for ".concat(p));return c},r);return u}}]),e})();function fc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fc(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jv(e){var t=Iv();return function(){var n=Rt(e),i;if(t){var a=Rt(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sn(this,i)}}function Iv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nv(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Lv=(function(e){Oi(r,e);var t=jv(r);function r(n,i,a){var o,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return pt(this,r),o=t.call(this),Ei&&Zt.call(Jt(o)),o.backend=n,o.store=i,o.services=a,o.languageUtils=a.languageUtils,o.options=s,o.logger=Tt.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(a,s.backend,s),o}return ht(r,[{key:"queueLoad",value:function(i,a,o,s){var u=this,c={},l={},f={},p={};return i.forEach(function(y){var h=!0;a.forEach(function(b){var _="".concat(y,"|").concat(b);!o.reload&&u.store.hasResourceBundle(y,b)?u.state[_]=2:u.state[_]<0||(u.state[_]===1?l[_]===void 0&&(l[_]=!0):(u.state[_]=1,h=!1,l[_]===void 0&&(l[_]=!0),c[_]===void 0&&(c[_]=!0),p[b]===void 0&&(p[b]=!0)))}),h||(f[y]=!0)}),(Object.keys(c).length||Object.keys(l).length)&&this.queue.push({pending:l,pendingCount:Object.keys(l).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(l),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(i,a,o){var s=i.split("|"),u=s[0],c=s[1];a&&this.emit("failedLoading",u,c,a),o&&this.store.addResourceBundle(u,c,o),this.state[i]=a?-1:2;var l={};this.queue.forEach(function(f){dv(f.loaded,[u],c),Nv(f,i),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(p){l[p]||(l[p]={});var y=f.loaded[p];y.length&&y.forEach(function(h){l[p][h]===void 0&&(l[p][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,a,o){var s=this,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,l=arguments.length>5?arguments[5]:void 0;if(!i.length)return l(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:a,fcName:o,tried:u,wait:c,callback:l});return}return this.readingCalls++,this.backend[o](i,a,function(f,p){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(f&&p&&u<s.maxRetries){setTimeout(function(){s.read.call(s,i,a,o,u+1,c*2,l)},c);return}l(f,p)})}},{key:"prepareLoading",value:function(i,a){var o=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(i,a,s,u);if(!c.toLoad.length)return c.pending.length||u(),null;c.toLoad.forEach(function(l){o.loadOne(l)})}},{key:"load",value:function(i,a,o){this.prepareLoading(i,a,{},o)}},{key:"reload",value:function(i,a,o){this.prepareLoading(i,a,{reload:!0},o)}},{key:"loadOne",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),u=s[0],c=s[1];this.read(u,c,"read",void 0,void 0,function(l,f){l&&a.logger.warn("".concat(o,"loading namespace ").concat(c," for language ").concat(u," failed"),l),!l&&f&&a.logger.log("".concat(o,"loaded namespace ").concat(c," for language ").concat(u),f),a.loaded(i,l,f)})}},{key:"saveMissing",value:function(i,a,o,s,u){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(o,'" as the namespace "').concat(a,'" 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}o==null||o===""||(this.backend&&this.backend.create&&this.backend.create(i,a,o,s,null,dc(dc({},c),{},{isUpdate:u})),!(!i||!i[0])&&this.store.addResource(i[0],a,o,s))}}]),r})(Zt);function Dv(){return{debug:!1,initImmediate:!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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(bt(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),bt(t[2])==="object"||bt(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function pc(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function hc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hc(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fv(e){var t=$v();return function(){var n=Rt(e),i;if(t){var a=Rt(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return Sn(this,i)}}function $v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Un(){}function Mv(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var ii=(function(e){Oi(r,e);var t=Fv(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(pt(this,r),n=t.call(this),Ei&&Zt.call(Jt(n)),n.options=pc(i),n.services={},n.logger=Tt,n.modules={external:[]},Mv(Jt(n)),a&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,a),Sn(n,Jt(n));setTimeout(function(){n.init(i,a)},0)}return n}return ht(r,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(o=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=Dv();this.options=At(At(At({},s),this.options),pc(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=At(At({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function u(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Tt.init(u(this.modules.logger),this.options):Tt.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Cv);var l=new Ev(this.options);this.store=new bv(this.options.resources,this.options);var f=this.services;f.logger=Tt,f.resourceStore=this.store,f.languageUtils=l,f.pluralResolver=new Tv(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=u(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Rv(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Lv(u(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var d=arguments.length,E=new Array(d>1?d-1:0),g=1;g<d;g++)E[g-1]=arguments[g];i.emit.apply(i,[m].concat(E))}),this.modules.languageDetector&&(f.languageDetector=u(this.modules.languageDetector),f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=u(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new sc(this.services,this.options),this.translator.on("*",function(m){for(var d=arguments.length,E=new Array(d>1?d-1:0),g=1;g<d;g++)E[g-1]=arguments[g];i.emit.apply(i,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(i)})}if(this.format=this.options.interpolation.format,o||(o=Un),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var y=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];y.forEach(function(m){i[m]=function(){var d;return(d=i.store)[m].apply(d,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(m){i[m]=function(){var d;return(d=i.store)[m].apply(d,arguments),i}});var b=Kr(),_=function(){var d=function(g,v){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),b.resolve(v),o(g,v)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return d(null,i.t.bind(i));i.changeLanguage(i.options.lng,d)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),b}},{key:"loadResources",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Un,s=o,u=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(u&&u.toLowerCase()==="cimode")return s();var c=[],l=function(y){if(y){var h=a.services.languageUtils.toResolveHierarchy(y);h.forEach(function(b){c.indexOf(b)<0&&c.push(b)})}};if(u)l(u);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(p){return l(p)})}this.options.preload&&this.options.preload.forEach(function(p){return l(p)}),this.services.backendConnector.load(c,this.options.ns,function(p){!p&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(i,a,o){var s=Kr();return i||(i=this.languages),a||(a=this.options.ns),o||(o=Un),this.services.backendConnector.reload(i,a,function(u){s.resolve(),o(u)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&qp.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var a=0;a<this.languages.length;a++){var o=this.languages[a];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}},{key:"changeLanguage",value:function(i,a){var o=this;this.isLanguageChangingTo=i;var s=Kr();this.emit("languageChanging",i);var u=function(p){o.language=p,o.languages=o.services.languageUtils.toResolveHierarchy(p),o.resolvedLanguage=void 0,o.setResolvedLanguage(p)},c=function(p,y){y?(u(y),o.translator.changeLanguage(y),o.isLanguageChangingTo=void 0,o.emit("languageChanged",y),o.logger.log("languageChanged",y)):o.isLanguageChangingTo=void 0,s.resolve(function(){return o.t.apply(o,arguments)}),a&&a(p,function(){return o.t.apply(o,arguments)})},l=function(p){!i&&!p&&o.services.languageDetector&&(p=[]);var y=typeof p=="string"?p:o.services.languageUtils.getBestMatchFromCodes(p);y&&(o.language||u(y),o.translator.language||o.translator.changeLanguage(y),o.services.languageDetector&&o.services.languageDetector.cacheUserLanguage(y)),o.loadResources(y,function(h){c(h,y)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(l):l(i),s}},{key:"getFixedT",value:function(i,a,o){var s=this,u=function c(l,f){var p;if(bt(f)!=="object"){for(var y=arguments.length,h=new Array(y>2?y-2:0),b=2;b<y;b++)h[b-2]=arguments[b];p=s.options.overloadTranslationOptionHandler([l,f].concat(h))}else p=At({},f);p.lng=p.lng||c.lng,p.lngs=p.lngs||c.lngs,p.ns=p.ns||c.ns,p.keyPrefix=p.keyPrefix||o||c.keyPrefix;var _=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(_).concat(l):l;return s.t(m,p)};return typeof i=="string"?u.lng=i:u.lngs=i,u.ns=a,u.keyPrefix=o,u}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var a=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var l=function(y,h){var b=a.services.backendConnector.state["".concat(y,"|").concat(h)];return b===-1||b===2};if(o.precheck){var f=o.precheck(this,l);if(f!==void 0)return f}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||l(s,i)&&(!u||l(c,i)))}},{key:"loadNamespaces",value:function(i,a){var o=this,s=Kr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(u){o.options.ns.indexOf(u)<0&&o.options.ns.push(u)}),this.loadResources(function(u){s.resolve(),a&&a(u)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var o=Kr();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],u=i.filter(function(c){return s.indexOf(c)<0});return u.length?(this.options.preload=s.concat(u),this.loadResources(function(c){o.resolve(),a&&a(c)}),o):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var a=["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"];return a.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Un,s=At(At(At({},this.options),a),{isClone:!0}),u=new r(s);(a.debug!==void 0||a.prefix!==void 0)&&(u.logger=u.logger.clone(a));var c=["store","services","language"];return c.forEach(function(l){u[l]=i[l]}),u.services=At({},this.services),u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u.translator=new sc(u.services,u.options),u.translator.on("*",function(l){for(var f=arguments.length,p=new Array(f>1?f-1:0),y=1;y<f;y++)p[y-1]=arguments[y];u.emit.apply(u,[l].concat(p))}),u.init(s,o),u.translator.options=u.options,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r})(Zt);Pt(ii,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ii(e,t)});var Ge=ii.createInstance();Ge.createInstance=ii.createInstance;Ge.createInstance;Ge.init;Ge.loadResources;Ge.reloadResources;Ge.use;Ge.changeLanguage;Ge.getFixedT;Ge.t;Ge.exists;Ge.setDefaultNamespace;Ge.hasLoadedNamespace;Ge.loadNamespaces;Ge.loadLanguages;var wn=e=>e.type==="checkbox",ar=e=>e instanceof Date,Ue=e=>e==null;const tu=e=>typeof e=="object";var Ce=e=>!Ue(e)&&!Array.isArray(e)&&tu(e)&&!ar(e),_s=e=>Ce(e)&&e.target?wn(e.target)?e.target.checked:e.target.value:e,Bp=(e,t)=>t.split(".").some((r,n,i)=>!isNaN(Number(r))&&e.has(i.slice(0,n).join("."))),Hp=e=>{const t=e.constructor&&e.constructor.prototype;return Ce(t)&&t.hasOwnProperty("isPrototypeOf")},Si=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function be(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Si&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Ce(e)&&Hp(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=be(e[i]));return n}const Ht={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},lt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},yt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Wp="root",Gp=["__proto__","constructor","prototype"],kv=/^\w*$/;var An=e=>kv.test(e),ye=e=>e===void 0;const Uv=/[.[\]'"]/;var wi=e=>e.split(Uv).filter(Boolean),H=(e,t,r)=>{if(!t||!Ce(e))return r;const n=An(t)?[t]:wi(t);if(n.some(a=>Gp.includes(a)))return r;const i=n.reduce((a,o)=>Ue(a)?void 0:a[o],e);return ye(i)||i===e?ye(e[t])?r:e[t]:i},Ze=e=>typeof e=="boolean",qe=e=>typeof e=="function",ve=(e,t,r)=>{let n=-1;const i=An(t)?[t]:wi(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let u=r;if(n!==o){const c=e[s];u=Ce(c)||Array.isArray(c)?c:isNaN(+i[n+1])?{}:[]}if(Gp.includes(s))return;e[s]=u,e=e[s]}};const ru=w.createContext(null);ru.displayName="HookFormControlContext";const Ai=()=>w.useContext(ru);var zp=(e,t,r,n=!0)=>{const i={};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==lt.all&&(t._proxyFormState[o]=!n||lt.all),r&&(r[o]=!0),e[o]}});return i};const xi=Si?w.useLayoutEffect:w.useEffect;function nu(e){const t=Ai(),{control:r=t,disabled:n,name:i,exact:a}=e||{},[o,s]=w.useState(()=>({...r._formState,defaultValues:r._defaultValues})),u=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return xi(()=>r._subscribe({name:i,formState:u.current,exact:a,callback:c=>{!n&&s({...r._formState,...c,defaultValues:r._defaultValues})}}),[i,n,a]),w.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),w.useMemo(()=>zp(o,r,u.current,!1),[o,r])}var Be=e=>typeof e=="string",Os=(e,t,r,n,i)=>Be(e)?(n&&t.watch.add(e),H(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),H(r,a))):(n&&(t.watchAll=!0),r),Es=e=>Ue(e)||!tu(e);const gc=(e,t)=>t.length===0&&!Array.isArray(e)&&!Hp(e);function tt(e,t,r=new WeakMap){if(e===t)return!0;if(Es(e)||Es(t))return Object.is(e,t);if(ar(e)&&ar(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;if(gc(e,n)||gc(t,i))return Object.is(e,t);if(!n.length&&Array.isArray(e)!==Array.isArray(t))return!1;const a=r.get(e);if(a&&a.has(t))return!0;if(a)a.add(t);else{const o=new WeakSet;o.add(t),r.set(e,o)}for(const o of n){const s=e[o];if(!(o in t))return!1;if(o!=="ref"){const u=t[o];if(ar(s)&&ar(u)||(Ce(s)||Array.isArray(s))&&(Ce(u)||Array.isArray(u))?!tt(s,u,r):!Object.is(s,u))return!1}}return!0}function mn(e){const t=Ai(),{control:r=t,name:n,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},u=w.useRef(i),c=w.useRef(s),l=w.useRef(void 0),f=w.useRef(r),p=w.useRef(n);c.current=s;const[y,h]=w.useState(()=>{const g=r._getWatch(n,u.current);return c.current?c.current(g):g}),b=w.useCallback(g=>{const v=Os(n,r._names,g||r._formValues,!1,u.current);return c.current?c.current(v):v},[r._formValues,r._names,n]),_=w.useCallback(g=>{if(!a){const v=Os(n,r._names,g||r._formValues,!1,u.current);if(c.current){const O=c.current(v);tt(O,l.current)||(h(O),l.current=O)}else h(v)}},[r._formValues,r._names,a,n]);xi(()=>((f.current!==r||!tt(p.current,n))&&(f.current=r,p.current=n,_()),r._subscribe({name:n,formState:{values:!0},exact:o,callback:g=>{_(g.values)}})),[r,o,n,_]),w.useEffect(()=>r._removeUnmounted());const m=f.current!==r,d=p.current,E=w.useMemo(()=>{if(a)return null;const g=!m&&!tt(d,n);return m||g?b():null},[a,m,n,d,b]);return E!==null?E:y}function Kp(e){const t=Ai(),{name:r,disabled:n,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,u=Bp(i._names.array,r),c=w.useMemo(()=>H(i._formValues,r,H(i._defaultValues,r,o)),[i,r,o]),l=mn({control:i,name:r,defaultValue:c,exact:s}),f=nu({control:i,name:r,exact:s}),p=w.useRef(e),y=w.useRef(null),h=w.useRef(i.register(r,{...e.rules,value:l,...Ze(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const b=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!H(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!H(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!H(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!H(f.validatingFields,r)},error:{enumerable:!0,get:()=>H(f.errors,r)}}),[f,r]),_=w.useCallback(g=>{const v=_s(g);return H(i._fields,r)||(h.current=i.register(r,{...p.current.rules,value:v})),h.current.onChange({target:{value:_s(g),name:r},type:Ht.CHANGE})},[r,i]),m=w.useCallback(()=>h.current.onBlur({target:{value:H(i._formValues,r),name:r},type:Ht.BLUR}),[r,i._formValues]),d=w.useCallback(g=>{g&&(y.current={focus:()=>qe(g.focus)&&g.focus(),select:()=>qe(g.select)&&g.select(),setCustomValidity:O=>qe(g.setCustomValidity)&&g.setCustomValidity(O),reportValidity:()=>qe(g.reportValidity)&&g.reportValidity()});const v=H(i._fields,r);v&&v._f&&g&&(v._f.ref=y.current)},[i._fields,r]),E=w.useMemo(()=>({name:r,value:l,...Ze(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:_,onBlur:m,ref:d}),[r,n,f.disabled,_,m,d,l]);return w.useEffect(()=>{const g=i._options.shouldUnregister||a;i.register(r,{...p.current.rules,...Ze(p.current.disabled)?{disabled:p.current.disabled}:{}});const v=(O,A)=>{const S=H(i._fields,O);S&&S._f&&(S._f.mount=A)};if(v(r,!0),g){const O=be(H(a?i._defaultValues:i._options.values||i._defaultValues,r,H(i._options.defaultValues,r,p.current.defaultValue)));ve(i._defaultValues,r,O),ye(H(i._formValues,r))&&ve(i._formValues,r,O)}if(!u&&i.register(r),y.current){const O=H(i._fields,r);O&&O._f&&(O._f.ref=y.current)}return()=>{(u?g&&!i._state.action:g)?i.unregister(r):v(r,!1)}},[r,i,u,a]),w.useEffect(()=>{i._setDisabledField({disabled:n,name:r})},[n,r,i]),w.useMemo(()=>({field:E,formState:f,fieldState:b}),[E,f,b])}const Vv=e=>e.render(Kp(e)),Yp=e=>{const t={};for(const r of Object.keys(e))if(tu(e[r])&&e[r]!==null){const n=Yp(e[r]);for(const i of Object.keys(n))t[`${r}.${i}`]=n[i]}else t[r]=e[r];return t},iu=w.createContext(null);iu.displayName="HookFormContext";const hr=()=>w.useContext(iu),Jp=({children:e,watch:t,getValues:r,getFieldState:n,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:u,formState:c,resetField:l,reset:f,handleSubmit:p,unregister:y,control:h,register:b,setFocus:_,subscribe:m})=>{const d=w.useMemo(()=>({watch:t,getValues:r,getFieldState:n,setError:i,clearErrors:a,setValue:o,setValues:s,trigger:u,formState:c,resetField:l,reset:f,handleSubmit:p,unregister:y,control:h,register:b,setFocus:_,subscribe:m}),[a,h,c,n,r,p,b,f,l,i,_,o,s,m,u,y,t]);return w.createElement(iu.Provider,{value:d},w.createElement(ru.Provider,{value:d.control},e))},qv="post";function Bv(e){const t=hr(),[r,n]=w.useState(!1),{control:i=t.control,onSubmit:a,children:o,action:s,method:u=qv,headers:c,encType:l,onError:f,render:p,onSuccess:y,validateStatus:h,...b}=e,_=w.useCallback(async m=>{let d=!1,E="";await i.handleSubmit(async g=>{const v=new FormData;let O="";try{O=JSON.stringify(g)}catch{}const A=Yp(g);for(const S in A)v.append(S,A[S]);if(a&&await a({data:g,event:m,method:u,formData:v,formDataJson:O}),s)try{const S=[c&&c["Content-Type"],l].some(P=>P&&P.includes("json")),T=await fetch(String(s),{method:u,headers:{...c,...l&&l!=="multipart/form-data"?{"Content-Type":l}:{}},body:S?O:v});T&&(h?!h(T.status):T.status<200||T.status>=300)?(d=!0,f&&f({response:T}),E=String(T.status)):y&&y({response:T})}catch(S){d=!0,f&&f({error:S})}})(m),d&&i&&(i._subjects.state.next({isSubmitSuccessful:!1}),i.setError("root.server",{type:E}))},[i,a,u,s,c,l,h,f,y]);return w.useEffect(()=>{n(!0)},[]),p?w.createElement(w.Fragment,null,p({submit:_})):w.createElement("form",{noValidate:r,action:s,method:u,encType:l,onSubmit:_,...b},o)}const Hv=({control:e,disabled:t,exact:r,name:n,render:i})=>i(nu({control:e,name:n,disabled:t,exact:r}));var Zp=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},au=e=>Array.isArray(e)?e.filter(Boolean):[],nt=e=>Array.isArray(e)?e:[e],mc=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}};function Qp(e,t){const r={};for(const n in e)if(e.hasOwnProperty(n)){const i=e[n],a=t[n];if(i&&Ce(i)&&a){const o=Qp(i,a);Ce(o)&&(r[n]=o)}else e[n]&&(r[n]=a)}return r}var Me=e=>Ce(e)&&!Object.keys(e).length,ou=e=>e.type==="file",ai=e=>{if(!Si)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Xp=e=>e.type==="select-multiple",su=e=>e.type==="radio",Wv=e=>su(e)||wn(e),oa=e=>ai(e)&&e.isConnected;function Gv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;){if(Ue(e)){e=void 0;break}e=e[t[n]],n++}return e}function zv(e){for(const t in e)if(e.hasOwnProperty(t)&&!ye(e[t]))return!1;return!0}function De(e,t){if(Be(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const r=Array.isArray(t)?t:An(t)?[t]:wi(t),n=r.length===1?e:Gv(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(Ce(n)&&Me(n)||Array.isArray(n)&&zv(n))&&De(e,r.slice(0,-1)),e}var Kv=e=>{for(const t in e)if(qe(e[t]))return!0;return!1};function eh(e){return Array.isArray(e)||Ce(e)&&!Kv(e)}function Ss(e,t={}){for(const r in e){const n=e[r];eh(n)?(t[r]=Array.isArray(n)?[]:{},Ss(n,t[r])):ye(n)||(t[r]=!0)}return t}function ws(e){if(e!==!1){if(e===!0)return!0;if(Array.isArray(e)){const t=e.map(r=>ws(r));return t.some(r=>r!==void 0)?t:void 0}if(Ce(e)){const t={};for(const r in e){const n=ws(e[r]);ye(n)||(t[r]=n)}return Object.keys(t).length?t:void 0}}}function rr(e,t,r){r||(r=Ss(t));for(const n in e){const i=e[n];if(eh(i))ye(t)||Es(r[n])?r[n]=Ss(i,Array.isArray(i)?[]:{}):rr(i,Ue(t)?{}:t[n],r[n]);else{const a=t[n];r[n]=!tt(i,a)}}return ws(r)||{}}const vc={value:!1,isValid:!1},yc={value:!0,isValid:!0};var th=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ye(e[0].attributes.value)?ye(e[0].value)||e[0].value===""?yc:{value:e[0].value,isValid:!0}:yc:vc}return vc},rh=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ye(e)?e:t?e===""?NaN:e&&+e:r&&Be(e)?new Date(e):n?n(e):e;const bc={isValid:!1,value:null};var nh=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,bc):bc;function _c(e){const t=e.ref;return ou(t)?t.files:su(t)?nh(e.refs).value:Xp(t)?[...t.selectedOptions].map(({value:r})=>r):wn(t)?th(e.refs).value:rh(ye(t.value)?e.ref.value:t.value,e)}var Yv=(e,t,r,n)=>{const i={};for(const a of e){const o=H(t,a);o&&ve(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},oi=e=>e instanceof RegExp,Yr=e=>ye(e)?e:oi(e)?e.source:Ce(e)?oi(e.value)?e.value.source:e.value:e,Gt=e=>({isOnSubmit:!e||e===lt.onSubmit,isOnBlur:e===lt.onBlur,isOnChange:e===lt.onChange,isOnAll:e===lt.all,isOnTouch:e===lt.onTouched});const Oc="AsyncFunction";var Jv=e=>{if(!e||!e.validate)return!1;if(qe(e.validate))return e.validate.constructor.name===Oc;if(Ce(e.validate)){for(const t in e.validate)if(e.validate[t].constructor.name===Oc)return!0}return!1},Zv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),zn=(e,t,r)=>{if(r)return!1;if(t.watchAll||t.watch.has(e))return!0;for(const n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===".")return!0;return!1};const Rr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=H(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)return!0;if(o.ref&&t(o.ref,o.name)&&!n)return!0;if(Rr(s,t))break}else if(Ce(s)&&Rr(s,t))break}}};function Ec(e,t,r){const n=H(e,r);if(n||An(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=H(t,a),s=H(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};if(s&&s.root&&s.root.type)return{name:`${a}.root`,error:s.root};i.pop()}return{name:r}}var Qv=(e,t,r,n)=>{r(e);const{name:i,...a}=e,o=Object.keys(a);return!o.length||n&&o.length>=Object.keys(t).length||o.find(s=>t[s]===(!n||lt.all))},Xv=(e,t,r)=>!e||!t||e===t||nt(e).some(n=>n&&(r?n===t:n.startsWith(t)||t.startsWith(n))),ey=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,ty=(e,t)=>!au(H(e,t)).length&&De(e,t),As=(e,t,r)=>{const n=H(e,r),i=Array.isArray(n)?n:[];return ve(i,Wp,t[r]),ve(e,r,i),e};function Sc(e,t,r="validate"){if(Be(e)||Array.isArray(e)&&e.every(Be)||Ze(e)&&!e)return{type:r,message:Be(e)?e:"",ref:t}}var Ar=e=>Ce(e)&&!oi(e)?e:{value:e,message:""},xs=async(e,t,r,n,i,a)=>{const{ref:o,refs:s,required:u,maxLength:c,minLength:l,min:f,max:p,pattern:y,validate:h,name:b,valueAsNumber:_,mount:m}=e._f,d=H(r,b);if(!m||t.has(b))return{};const E=s?s[0]:o,g=M=>{if(i&&E.reportValidity){const U=Ze(M)?"":M||"";s?s.forEach(F=>F.setCustomValidity(U)):E.setCustomValidity(U),E.reportValidity()}},v={},O=su(o),A=wn(o),S=O||A,T=(_||ou(o))&&ye(o.value)&&ye(d)||ai(o)&&o.value===""||d===""||Array.isArray(d)&&!d.length,P=Zp.bind(null,b,n,v),N=(M,U,F,D=yt.maxLength,$=yt.minLength)=>{const B=M?U:F;v[b]={type:M?D:$,message:B,ref:o,...P(M?D:$,B)}};if(a?!Array.isArray(d)||!d.length:u&&(!S&&(T||Ue(d))||Ze(d)&&!d||A&&!th(s).isValid||O&&!nh(s).isValid)){const{value:M,message:U}=Be(u)?{value:!!u,message:u}:Ar(u);if(M&&(v[b]={type:yt.required,message:U,ref:E,...P(yt.required,U)},!n))return g(U),v}if(!T&&(!Ue(f)||!Ue(p))){let M,U;const F=Ar(p),D=Ar(f);if(!Ue(d)&&!isNaN(d)){const $=o.valueAsNumber||d&&+d;Ue(F.value)||(M=$>F.value),Ue(D.value)||(U=$<D.value)}else{const $=o.valueAsDate||new Date(d),B=K=>new Date(new Date().toDateString()+" "+K),k=o.type=="time",Q=o.type=="week";Be(F.value)&&d&&(M=k?B(d)>B(F.value):Q?d>F.value:$>new Date(F.value)),Be(D.value)&&d&&(U=k?B(d)<B(D.value):Q?d<D.value:$<new Date(D.value))}if((M||U)&&(N(!!M,F.message,D.message,yt.max,yt.min),!n))return g(v[b].message),v}if((c||l)&&!T&&(Be(d)||a&&Array.isArray(d))){const M=Ar(c),U=Ar(l),F=!Ue(M.value)&&d.length>+M.value,D=!Ue(U.value)&&d.length<+U.value;if((F||D)&&(N(F,M.message,U.message),!n))return g(v[b].message),v}if(y&&!T&&Be(d)){const{value:M,message:U}=Ar(y);if(oi(M)&&!d.match(M)&&(v[b]={type:yt.pattern,message:U,ref:o,...P(yt.pattern,U)},!n))return g(U),v}if(h){if(qe(h)){const M=await h(d,r),U=Sc(M,E);if(U&&(v[b]={...U,...P(yt.validate,U.message)},!n))return g(U.message),v}else if(Ce(h)){let M={};for(const U in h){if(!Me(M)&&!n)break;const F=Sc(await h[U](d,r),E,U);F&&(M={...F,...P(U,F.message)},g(F.message),n&&(v[b]=M))}if(!Me(M)&&(v[b]={ref:E,...M},!n))return v}}return g(!0),v};const ry={mode:lt.onSubmit,reValidateMode:lt.onChange,shouldFocusError:!0},sa="form",ih={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function ah(e={}){let t={...ry,...e},r={...be(ih),isLoading:qe(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},n={},i=Ce(t.defaultValues)||Ce(t.values)?be(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:be(i),o={action:!1,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},u,c=0,l=0,f=Gt(t.mode),p=Gt(t.reValidateMode);const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={...y};let b={...h};const _={array:mc(),state:mc()},m=t.criteriaMode===lt.all,d=x=>j=>{clearTimeout(c),c=setTimeout(x,j)},E=async x=>{if(!o.keepIsValid&&!t.disabled&&(h.isValid||b.isValid||x)){let j;t.resolver?(j=Me((await U()).errors),g()):j=await $({fields:n,onlyCheckValid:!0,eventType:Ht.VALID}),j!==r.isValid&&_.state.next({isValid:j})}},g=(x,j)=>{!t.disabled&&(h.isValidating||h.validatingFields||b.isValidating||b.validatingFields)&&((x||Array.from(s.mount)).forEach(L=>{L&&(j?ve(r.validatingFields,L,j):De(r.validatingFields,L))}),_.state.next({validatingFields:r.validatingFields,isValidating:!Me(r.validatingFields)}))},v=()=>{r.dirtyFields=rr(i,a)},O=(x,j=[],L,V,W=!0,J=!0)=>{if(V&&L&&!t.disabled){if(o.action=!0,J&&Array.isArray(H(n,x))){const z=L(H(n,x),V.argA,V.argB);W&&ve(n,x,z)}if(J&&Array.isArray(H(r.errors,x))){const z=L(H(r.errors,x),V.argA,V.argB);W&&ve(r.errors,x,z),ty(r.errors,x)}if((h.touchedFields||b.touchedFields)&&J&&Array.isArray(H(r.touchedFields,x))){const z=L(H(r.touchedFields,x),V.argA,V.argB);W&&ve(r.touchedFields,x,z)}(h.dirtyFields||b.dirtyFields)&&v(),_.state.next({name:x,isDirty:k(x,j),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ve(a,x,j)},A=(x,j)=>{ve(r.errors,x,j),r.errors={...r.errors},_.state.next({errors:r.errors})},S=x=>{r.errors=x,_.state.next({errors:r.errors,isValid:!1})},T=x=>{const j=An(x)?[x]:wi(x);let L=a,V=i;for(let W=0;W<j.length-1;W++){const J=j[W];if(L=Ue(L)?L:L[J],V=Ue(V)?V:V[J],L===null&&V!==null)return!0}return!1},P=(x,j,L,V)=>{const W=H(n,x);if(W){if(T(x))return;const J=ye(H(a,x)),z=H(a,x,ye(L)?H(i,x):L);ye(z)||V&&V.defaultChecked||j?ve(a,x,j?z:_c(W._f)):ee(x,z),o.mount&&!o.action&&(E(),J&&r.isDirty&&(h.isDirty||b.isDirty)&&(k()||(r.isDirty=!1,_.state.next({...r}))),e.shouldUnregister&&J&&!ye(H(a,x))&&zn(x,s)&&(o.watch=!0))}},N=(x,j,L,V,W)=>{let J=!1,z=!1;const Z={name:x};if(!t.disabled){if(!L||V){const oe=tt(H(i,x),j);(h.isDirty||b.isDirty)&&(z=r.isDirty,r.isDirty=Z.isDirty=!oe||k(),J=z!==Z.isDirty),z=!!H(r.dirtyFields,x),oe!==r.isDirty?r.dirtyFields=rr(i,a):oe?De(r.dirtyFields,x):ve(r.dirtyFields,x,!0),Z.dirtyFields=r.dirtyFields,J=J||(h.dirtyFields||b.dirtyFields)&&z!==!oe}if(L){const oe=H(r.touchedFields,x);oe||(ve(r.touchedFields,x,L),Z.touchedFields=r.touchedFields,J=J||(h.touchedFields||b.touchedFields)&&oe!==L)}J&&W&&_.state.next(Z)}return J?Z:{}},M=(x,j,L,V)=>{const W=H(r.errors,x),J=(h.isValid||b.isValid)&&Ze(j)&&r.isValid!==j;if(t.delayError&&L?(u=d(()=>A(x,L)),u(t.delayError)):(clearTimeout(c),u=null,L?ve(r.errors,x,L):De(r.errors,x),r.errors={...r.errors}),(L?!tt(W,L):W)||!Me(V)||J){const z={...V,...J&&Ze(j)?{isValid:j}:{},errors:r.errors,name:x};r={...r,...z},_.state.next(z)}},U=async x=>(g(x,!0),await t.resolver(a,t.context,Yv(x||s.mount,n,t.criteriaMode,t.shouldUseNativeValidation))),F=async x=>{const{errors:j}=await U(x);if(g(x),x){for(const L of x){const V=H(j,L);V?s.array.has(L)&&Ce(V)&&!Object.keys(V).some(W=>!Number.isNaN(Number(W)))?As(r.errors,{[L]:V},L):ve(r.errors,L,V):De(r.errors,L)}r.errors={...r.errors}}else r.errors=j;return j},D=async({name:x,eventType:j})=>{if(e.validate){const L=await e.validate({formValues:a,formState:r,name:x,eventType:j});if(Ce(L))for(const V in L){const W=L[V];W&&fe(`${sa}.${V}`,{message:Be(W.message)?W.message:"",type:W.type||yt.validate})}else Be(L)||!L?fe(sa,{message:L||"",type:yt.validate}):ae(sa);return L}return!0},$=async({fields:x,onlyCheckValid:j,name:L,eventType:V,context:W={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(W.runRootValidation=!0,!await D({name:L,eventType:V})&&(W.valid=!1,j)))return W.valid;for(const J in x){const z=x[J];if(z){const{_f:Z,...oe}=z;if(Z){const Oe=s.array.has(Z.name),Fe=z._f&&Jv(z._f),wt=h.validatingFields||h.isValidating||b.validatingFields||b.isValidating;Fe&&wt&&g([Z.name],!0);const et=await xs(z,s.disabled,a,m,t.shouldUseNativeValidation&&!j,Oe);if(Fe&&wt&&g([Z.name]),et[Z.name]&&(W.valid=!1,j)||(!j&&(H(et,Z.name)?Oe?As(r.errors,et,Z.name):ve(r.errors,Z.name,et[Z.name]):De(r.errors,Z.name)),e.shouldUseNativeValidation&&et[Z.name]))break}!Me(oe)&&await $({context:W,onlyCheckValid:j,fields:oe,name:J,eventType:V})}}return W.valid},B=()=>{for(const x of s.unMount){const j=H(n,x);j&&(j._f.refs?j._f.refs.every(L=>!oa(L)):!oa(j._f.ref))&&Xe(x)}s.unMount=new Set},k=(x,j)=>!t.disabled&&(x&&j&&ve(a,x,j),!tt(o.mount?a:i,i)),Q=(x,j,L)=>Os(x,s,{...o.mount?a:ye(j)?i:Be(x)?{[x]:j}:j},L,j),K=x=>au(H(o.mount?a:i,x,t.shouldUnregister?H(i,x,[]):[])),ee=(x,j,L={},V=!1,W=!1)=>{const J=H(n,x);let z=j;if(J){const Z=J._f;Z&&(!Z.disabled&&ve(a,x,rh(j,Z)),z=ai(Z.ref)&&Ue(j)?"":j,Xp(Z.ref)?[...Z.ref.options].forEach(oe=>oe.selected=z.includes(oe.value)):Z.refs?wn(Z.ref)?Z.refs.forEach(oe=>{(!oe.defaultChecked||!oe.disabled)&&(Array.isArray(z)?oe.checked=!!z.find(Oe=>Oe===oe.value):oe.checked=z===oe.value||!!z)}):Z.refs.forEach(oe=>oe.checked=oe.value===z):ou(Z.ref)?Z.ref.value="":(Z.ref.value=z,!Z.ref.type&&!W&&_.state.next({name:x,values:V?a:be(a)})))}(L.shouldDirty||L.shouldTouch)&&N(x,z,L.shouldTouch,L.shouldDirty,!W),L.shouldValidate&&le(x)},G=(x,j,L,V=!1,W=!1)=>{for(const J in j){if(!j.hasOwnProperty(J))return;const z=j[J],Z=x+"."+J,oe=H(n,Z);(s.array.has(x)||Ce(z)||oe&&!oe._f)&&!ar(z)?G(Z,z,L,V,W):ee(Z,z,L,V,W)}},ne=(x,j,L,V,W=!1)=>{const J=H(n,x),z=s.array.has(x),Z=V?j:be(j),oe=H(a,x),Oe=tt(oe,Z);if(Oe||ve(a,x,Z),z)_.array.next({name:x,values:V?a:be(a)}),(h.isDirty||h.dirtyFields||b.isDirty||b.dirtyFields)&&L.shouldDirty&&(v(),W||_.state.next({name:x,dirtyFields:r.dirtyFields,isDirty:k(x,Z)}));else{const Fe=Array.isArray(Z)&&!Z.length||Me(Z);!J||J._f||Ue(Z)||Fe?ee(x,Z,L,V,W):G(x,Z,L,V,W)}if(!Oe&&!W){const Fe=zn(x,s),wt=V?a:be(a);_.state.next({...Fe&&r,name:o.mount||Fe?x:void 0,values:wt})}},te=(x,j,L={})=>ne(x,j,L,!1),ce=(x,j={})=>{const L=qe(x)?x(a):x;if(!tt(a,L)){a={...a,...L};for(const V of s.mount)ne(V,H(L,V),j,!0,!0);_.state.next({...r,name:void 0,type:void 0,...l?{values:a}:{}}),j.shouldValidate&&E()}},ue=async x=>{o.mount=!0;const j=x.target;let L=j.name,V=!0;const W=H(n,L),J=z=>{V=Number.isNaN(z)||ar(z)&&isNaN(z.getTime())||tt(z,H(a,L,z))};if(W){let z,Z;const oe=j.type?_c(W._f):_s(x),Oe=x.type===Ht.BLUR||x.type===Ht.FOCUS_OUT,Fe=!Zv(W._f)&&!e.validate&&!t.resolver&&!H(r.errors,L)&&!W._f.deps,wt=Fe||ey(Oe,H(r.touchedFields,L),r.isSubmitted,p,f),et=zn(L,s,Oe);ve(a,L,oe),Oe?(!j||!j.readOnly)&&(W._f.onBlur&&W._f.onBlur(x),u&&u(0)):W._f.onChange&&W._f.onChange(x);const Ut=N(L,oe,Oe),ra=!Me(Ut)||et;if(!Oe&&_.state.next({name:L,type:x.type,...l?{values:be(a)}:{}}),wt)return(!Fe||!r.isValid)&&(h.isValid||b.isValid)&&(t.mode==="onBlur"?Oe&&E():Oe||E()),ra&&_.state.next({name:L,...et?{}:Ut});if(!t.resolver&&e.validate&&await D({name:L,eventType:x.type}),!Oe&&et&&_.state.next({...r}),t.resolver){const{errors:Hr}=await U([L]);if(g([L]),J(oe),!V){!Me(Ut)&&_.state.next(Ut);return}const na=Ec(r.errors,n,L),Wr=Ec(Hr,n,na.name||L);z=Wr.error,L=Wr.name,Z=Me(Hr)}else g([L],!0),z=(await xs(W,s.disabled,a,m,t.shouldUseNativeValidation))[L],g([L]),J(oe),V&&(z?Z=!1:(h.isValid||b.isValid)&&(Z=await $({fields:n,onlyCheckValid:!0,name:L,eventType:x.type})));V&&(W._f.deps&&(!Array.isArray(W._f.deps)||W._f.deps.length>0)&&le(W._f.deps),M(L,Z,z,Ut))}},re=(x,j)=>{if(H(r.errors,j)&&x.focus)return x.focus(),1},le=async(x,j={})=>{let L,V;const W=nt(x);if(t.resolver){const J=await F(ye(x)?x:W);L=Me(J),V=x?!W.some(z=>H(J,z)):L}else x?(V=(await Promise.all(W.map(async J=>{const z=H(n,J);return await $({fields:z&&z._f?{[J]:z}:z,eventType:Ht.TRIGGER})}))).every(Boolean),!(!V&&!r.isValid)&&E()):V=L=await $({fields:n,name:x,eventType:Ht.TRIGGER});return _.state.next({...!Be(x)||(h.isValid||b.isValid)&&L!==r.isValid?{}:{name:x},...t.resolver||!x?{isValid:L}:{},errors:r.errors}),j.shouldFocus&&!V&&Rr(n,re,x?W:s.mount),V},_e=(x,j)=>{let L={...o.mount?a:i};return j&&(L=Qp(j.dirtyFields?r.dirtyFields:r.touchedFields,L)),ye(x)?L:Be(x)?H(L,x):x.map(V=>H(L,V))},de=(x,j)=>({invalid:!!H((j||r).errors,x),isDirty:!!H((j||r).dirtyFields,x),error:H((j||r).errors,x),isValidating:!!H(r.validatingFields,x),isTouched:!!H((j||r).touchedFields,x)}),ae=x=>{const j=x?nt(x):void 0;j?.forEach(L=>De(r.errors,L)),j?j.forEach(L=>{_.state.next({name:L,errors:r.errors})}):_.state.next({errors:{}})},fe=(x,j,L)=>{const V=(H(n,x,{_f:{}})._f||{}).ref,W=H(r.errors,x)||{},{ref:J,message:z,type:Z,...oe}=W;ve(r.errors,x,{...oe,...j,ref:V}),_.state.next({name:x,errors:r.errors,isValid:!1}),L&&L.shouldFocus&&V&&V.focus&&V.focus()},he=(x,j)=>{if(qe(x)){l++;const{unsubscribe:L}=_.state.subscribe({next:W=>"values"in W&&x(W.values||Q(void 0,j),W)});let V=!1;return{unsubscribe:()=>{V||(V=!0,l--,L())}}}return Q(x,j,!0)},je=x=>{var j;const L=!!(!((j=x.formState)===null||j===void 0)&&j.values);L&&l++;const{unsubscribe:V}=_.state.subscribe({next:J=>{if(Xv(x.name,J.name,x.exact)&&Qv(J,x.formState||h,$n,x.reRenderRoot)){const z={...a};x.callback({values:z,...r,...J,defaultValues:i})}}});if(!L)return V;let W=!1;return()=>{W||(W=!0,l--,V())}},It=x=>(o.mount=!0,b={...b,...x.formState},je({...x,formState:{...y,...x.formState}})),Xe=(x,j={})=>{for(const L of x?nt(x):s.mount)s.mount.delete(L),s.array.delete(L),j.keepValue||(De(n,L),De(a,L)),!j.keepError&&De(r.errors,L),!j.keepDirty&&De(r.dirtyFields,L),!j.keepTouched&&De(r.touchedFields,L),!j.keepIsValidating&&De(r.validatingFields,L),!t.shouldUnregister&&!j.keepDefaultValue&&De(i,L);_.state.next({values:be(a)}),_.state.next({...r,...j.keepDirty?{isDirty:k()}:{}}),!j.keepIsValid&&E()},ze=({disabled:x,name:j})=>{if(Ze(x)&&o.mount||x||s.disabled.has(j)){const W=s.disabled.has(j)!==!!x;x?s.disabled.add(j):s.disabled.delete(j),W&&o.mount&&!o.action&&E()}},ie=(x,j={})=>{let L=H(n,x);const V=Ze(j.disabled)||Ze(t.disabled),W=!s.registerName.has(x)&&L&&L._f&&!L._f.mount;return ve(n,x,{...L||{},_f:{...L&&L._f?L._f:{ref:{name:x}},name:x,mount:!0,...j}}),s.mount.add(x),L&&!W?ze({disabled:Ze(j.disabled)?j.disabled:t.disabled,name:x}):P(x,!0,j.value),{...V?{disabled:j.disabled||t.disabled}:{},...t.progressive?{required:!!j.required,min:Yr(j.min),max:Yr(j.max),minLength:Yr(j.minLength),maxLength:Yr(j.maxLength),pattern:Yr(j.pattern)}:{},name:x,onChange:ue,onBlur:ue,ref:J=>{if(J){s.registerName.add(x),ie(x,j),s.registerName.delete(x),L=H(n,x);const z=ye(J.value)&&J.querySelectorAll&&J.querySelectorAll("input,select,textarea")[0]||J,Z=Wv(z),oe=L._f.refs||[];if(Z?oe.find(Oe=>Oe===z):z===L._f.ref)return;ve(n,x,{_f:{...L._f,...Z?{refs:[...oe.filter(oa),z,...Array.isArray(H(i,x))?[{}]:[]],ref:{type:z.type,name:x}}:{ref:z}}}),P(x,!1,void 0,z)}else L=H(n,x,{}),L._f&&(L._f.mount=!1),(t.shouldUnregister||j.shouldUnregister)&&!(Bp(s.array,x)&&o.action)&&s.unMount.add(x)}}},Ae=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&Rr(n,re,s.mount),at=x=>{Ze(x)&&(_.state.next({disabled:x}),Rr(n,(j,L)=>{const V=H(n,L);V&&(j.disabled=V._f.disabled||x,Array.isArray(V._f.refs)&&V._f.refs.forEach(W=>{W.disabled=V._f.disabled||x}))},0,!1))},ot=(x,j)=>async L=>{let V;L&&(L.preventDefault&&L.preventDefault(),L.persist&&L.persist());let W=be(a);if(_.state.next({isSubmitting:!0}),t.resolver){const{errors:J,values:z}=await U();g(),r.errors=J,W=be(z)}else await $({fields:n,eventType:Ht.SUBMIT});if(s.disabled.size)for(const J of s.disabled)De(W,J);if(De(r.errors,Wp),Me(r.errors)){_.state.next({errors:{}});try{await x(W,L)}catch(J){V=J}}else j&&await j({...r.errors},L),Ae(),setTimeout(Ae);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Me(r.errors)&&!V,submitCount:r.submitCount+1,errors:r.errors}),V)throw V},kt=(x,j={})=>{H(n,x)&&(ye(j.defaultValue)?te(x,be(H(i,x))):(te(x,j.defaultValue),ve(i,x,be(j.defaultValue))),j.keepTouched||De(r.touchedFields,x),j.keepDirty||(De(r.dirtyFields,x),r.isDirty=j.defaultValue?k(x,be(H(i,x))):k()),j.keepError||(De(r.errors,x),h.isValid&&E()),_.state.next({...r}))},Or=(x,j={})=>{const L=x?be(x):i,V=be(L),W=Me(x),J=V;if(j.keepDefaultValues||(i=L),!j.keepValues){if(j.keepDirtyValues){const z=new Set([...s.mount,...Object.keys(rr(i,a))]);for(const Z of Array.from(z)){const oe=H(r.dirtyFields,Z),Oe=H(a,Z),Fe=H(J,Z);oe&&!ye(Oe)?ve(J,Z,Oe):!oe&&!ye(Fe)&&te(Z,Fe)}}else{if(Si&&ye(x))for(const z of s.mount){const Z=H(n,z);if(Z&&Z._f){const oe=Array.isArray(Z._f.refs)?Z._f.refs[0]:Z._f.ref;if(ai(oe)){const Oe=oe.closest("form");if(Oe){Oe.reset();break}}}}if(j.keepFieldsRef)for(const z of s.mount)te(z,H(J,z));else n={}}if(t.shouldUnregister){if(a=j.keepDefaultValues?be(i):{},j.keepFieldsRef)for(const z of s.mount)ve(a,z,H(J,z))}else a=be(J);_.array.next({values:{...J}}),_.state.next({values:{...J}})}s={mount:j.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!h.isValid||!!j.keepIsValid||!!j.keepDirtyValues||!t.shouldUnregister&&!Me(J),o.watch=!!t.shouldUnregister,o.keepIsValid=!!j.keepIsValid,o.action=!1,j.keepErrors||(r.errors={}),_.state.next({submitCount:j.keepSubmitCount?r.submitCount:0,isDirty:W?!1:j.keepDirty?r.isDirty:j.keepValues?k():!!(j.keepDefaultValues&&!tt(x,i)),isSubmitted:j.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:W?{}:j.keepDirtyValues?j.keepDefaultValues&&a?rr(i,a):r.dirtyFields:j.keepDefaultValues&&x?rr(i,x):j.keepDirty?r.dirtyFields:{},touchedFields:j.keepTouched?r.touchedFields:{},errors:j.keepErrors?r.errors:{},isSubmitSuccessful:j.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},St=(x,j)=>Or(qe(x)?x(a):x,{...t.resetOptions,...j}),Fn=(x,j={})=>{const L=H(n,x),V=L&&L._f;if(V){const W=V.refs?V.refs[0]:V.ref;W.focus&&setTimeout(()=>{W.focus(),j.shouldSelect&&qe(W.select)&&W.select()})}},$n=x=>{r={...r,...x}},Br={control:{register:ie,unregister:Xe,getFieldState:de,handleSubmit:ot,setError:fe,_subscribe:je,_runSchema:U,_updateIsValidating:g,_focusError:Ae,_getWatch:Q,_getDirty:k,_setValid:E,_setFieldArray:O,_setDisabledField:ze,_setErrors:S,_getFieldArray:K,_reset:Or,_resetDefaultValues:()=>qe(t.defaultValues)&&t.defaultValues().then(x=>{St(x,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:B,_disableForm:at,_subjects:_,_proxyFormState:h,get _fields(){return n},get _formValues(){return a},get _state(){return o},set _state(x){o=x},get _defaultValues(){return i},get _names(){return s},set _names(x){s=x},get _formState(){return r},get _options(){return t},set _options(x){t={...t,...x},f=Gt(t.mode),p=Gt(t.reValidateMode)}},subscribe:It,trigger:le,register:ie,handleSubmit:ot,watch:he,setValue:te,setValues:ce,getValues:_e,reset:St,resetField:kt,resetDefaultValues:(x,j={})=>{if(i=be(x),!j.keepDirty){const L=rr(i,a);r.dirtyFields=L,r.isDirty=!Me(L)}j.keepIsValid||E(),_.state.next({...r,defaultValues:i})},clearErrors:ae,unregister:Xe,setError:fe,setFocus:Fn,getFieldState:de};return{...Br,formControl:Br}}var qt=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const r=(Math.random()*16+e)%16|0;return(t=="x"?r:r&3|8).toString(16)})},ua=(e,t,r={})=>r.shouldFocus||ye(r.shouldFocus)?r.focusName||`${e}.${ye(r.focusIndex)?t:r.focusIndex}.`:"",ca=(e,t)=>[...e,...nt(t)],la=e=>Array.isArray(e)?e.map(()=>{}):void 0;function fa(e,t,r){return[...e.slice(0,t),...nt(r),...e.slice(t)]}var da=(e,t,r)=>Array.isArray(e)?(ye(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[],pa=(e,t)=>[...nt(t),...nt(e)];function ny(e,t){let r=0;const n=[...e];for(const i of t)n.splice(i-r,1),r++;return au(n).length?n:[]}var ha=(e,t)=>ye(t)?[]:ny(e,nt(t).sort((r,n)=>r-n)),ga=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},wc=(e,t,r)=>(e[t]=r,e);function iy(e){const t=Ai(),{control:r=t,name:n,keyName:i="id",disabled:a,shouldUnregister:o,rules:s}=e,[u,c]=w.useState(r._getFieldArray(n)),l=w.useRef(r._getFieldArray(n).map(qt)),f=w.useRef(!1);a||r._names.array.add(n),w.useMemo(()=>!a&&s&&u.length>=0&&r.register(n,s),[r,n,u.length,s,a]),xi(()=>{if(!a)return r._subjects.array.subscribe({next:({values:v,name:O})=>{if(O===n||!O){const A=H(v,n);Array.isArray(A)?(c(A),l.current=A.map(qt)):O||(c([]),l.current=[])}}}).unsubscribe},[r,n,a]);const p=w.useCallback(v=>{f.current=!0,r._setFieldArray(n,v)},[r,n]),y=(v,O)=>{if(a)return;const A=nt(be(v)),S=ca(r._getFieldArray(n),A);r._names.focus=ua(n,S.length-1,O),l.current=ca(l.current,A.map(qt)),p(S),c(S),r._setFieldArray(n,S,ca,{argA:la(v)})},h=(v,O)=>{if(a)return;const A=nt(be(v)),S=pa(r._getFieldArray(n),A);r._names.focus=ua(n,0,O),l.current=pa(l.current,A.map(qt)),p(S),c(S),r._setFieldArray(n,S,pa,{argA:la(v)})},b=v=>{if(a)return;const O=ha(r._getFieldArray(n),v);l.current=ha(l.current,v),p(O),c(O),!Array.isArray(H(r._fields,n))&&ve(r._fields,n,void 0),r._setFieldArray(n,O,ha,{argA:v})},_=(v,O,A)=>{if(a)return;const S=nt(be(O)),T=fa(r._getFieldArray(n),v,S);r._names.focus=ua(n,v,A),l.current=fa(l.current,v,S.map(qt)),p(T),c(T),r._setFieldArray(n,T,fa,{argA:v,argB:la(O)})},m=(v,O)=>{if(a)return;const A=r._getFieldArray(n);ga(A,v,O),ga(l.current,v,O),p(A),c(A),r._setFieldArray(n,A,ga,{argA:v,argB:O},!1)},d=(v,O)=>{if(a)return;const A=r._getFieldArray(n);da(A,v,O),da(l.current,v,O),p(A),c(A),r._setFieldArray(n,A,da,{argA:v,argB:O},!1)},E=(v,O)=>{if(a)return;const A=be(O),S=wc(r._getFieldArray(n),v,A);l.current=[...S].map((T,P)=>!T||P===v?qt():l.current[P]),p(S),c([...S]),r._setFieldArray(n,S,wc,{argA:v,argB:A},!0,!1)},g=v=>{if(a)return;const O=nt(be(v));l.current=O.map(qt),p([...O]),c([...O]),r._setFieldArray(n,[...O],A=>A,{},!0,!1)};return w.useEffect(()=>{if(a)return;r._state.action=!1,zn(n,r._names)&&r._subjects.state.next({...r._formState});const v=Gt(r._options.mode);if(f.current&&(!v.isOnSubmit||r._formState.isSubmitted)&&!Gt(r._options.reValidateMode).isOnSubmit&&!v.isOnBlur)if(r._options.resolver)r._runSchema([n]).then(O=>{r._updateIsValidating([n]);const A=H(O.errors,n),S=H(r._formState.errors,n);(S?!A&&S.type||A&&(S.type!==A.type||S.message!==A.message):A&&A.type)&&(A?ve(r._formState.errors,n,A):De(r._formState.errors,n),r._subjects.state.next({errors:r._formState.errors}))});else{const O=H(r._fields,n);O&&O._f&&!(Gt(r._options.reValidateMode).isOnSubmit&&Gt(r._options.mode).isOnSubmit)&&xs(O,r._names.disabled,r._formValues,r._options.criteriaMode===lt.all,r._options.shouldUseNativeValidation,!0).then(A=>!Me(A)&&r._subjects.state.next({errors:As(r._formState.errors,A,n)}))}r._subjects.state.next({name:n,values:be(r._formValues)}),r._names.focus&&Rr(r._fields,(O,A)=>{if(r._names.focus&&A.startsWith(r._names.focus)&&O.focus)return O.focus(),1}),r._names.focus="",r._setValid(),f.current=!1},[u,n,r,a]),w.useEffect(()=>(a||!H(r._formValues,n)&&r._setFieldArray(n),()=>{if(a)return;const v=!(r._options.shouldUnregister||o),O=(A,S)=>{const T=H(r._fields,A);T&&T._f&&(T._f.mount=S)};f.current&&v&&r._subjects.state.next({name:n,values:be(r._formValues)}),v?O(n,!1):r.unregister(n)}),[n,r,i,o,a]),{swap:w.useCallback(m,[p,n,r,a]),move:w.useCallback(d,[p,n,r,a]),prepend:w.useCallback(h,[p,n,r,a]),append:w.useCallback(y,[p,n,r,a]),remove:w.useCallback(b,[p,n,r,a]),insert:w.useCallback(_,[p,n,r,a]),update:w.useCallback(E,[p,n,r,a]),replace:w.useCallback(g,[p,n,r,a]),fields:w.useMemo(()=>u.map((v,O)=>({...v,...Ze(a)?{disabled:a}:{},[i]:l.current[O]||qt()})),[u,i,a])}}function oh(e={}){const t=w.useRef(void 0),r=w.useRef(void 0),n=w.useRef(e.formControl),[i,a]=w.useState(()=>({...be(ih),isLoading:qe(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:qe(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&n.current!==e.formControl)if(n.current=e.formControl,e.formControl)t.current={...e.formControl,formState:i},e.defaultValues&&!qe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:s,...u}=ah(e);t.current={...u,formState:i}}const o=t.current.control;return o._options=e,xi(()=>{const s=o._subscribe({formState:o._proxyFormState,callback:()=>a({...o._formState,defaultValues:o._defaultValues}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),o._formState.isReady=!0,s},[o]),w.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),w.useEffect(()=>{e.mode&&(o._options.mode=e.mode),e.reValidateMode&&(o._options.reValidateMode=e.reValidateMode)},[o,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(o._setErrors(e.errors),o._focusError())},[o,e.errors]),w.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[o,e.shouldUnregister]),w.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==i.isDirty&&o._subjects.state.next({isDirty:s})}},[o,i.isDirty]),w.useEffect(()=>{var s;e.values&&!tt(e.values,r.current)?(o._reset(e.values,{keepFieldsRef:!0,...o._options.resetOptions}),!((s=o._options.resetOptions)===null||s===void 0)&&s.keepIsValid||o._setValid(),r.current=e.values,a(u=>({...u}))):o._resetDefaultValues()},[o,e.values]),w.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=w.useMemo(()=>zp(i,o),[o,i]),t.current}const ay=e=>e.render(mn({name:e.names,...e})),oy=Object.freeze(Object.defineProperty({__proto__:null,Controller:Vv,Form:Bv,FormProvider:Jp,FormStateSubscribe:Hv,Watch:ay,appendErrors:Zp,createFormControl:ah,get:H,set:ve,useController:Kp,useFieldArray:iy,useForm:oh,useFormContext:hr,useFormState:nu,useWatch:mn},Symbol.toStringTag,{value:"Module"}));var sh=typeof global=="object"&&global&&global.Object===Object&&global,sy=typeof self=="object"&&self&&self.Object===Object&&self,Ct=sh||sy||Function("return this")(),Qt=Ct.Symbol,uh=Object.prototype,uy=uh.hasOwnProperty,cy=uh.toString,Jr=Qt?Qt.toStringTag:void 0;function ly(e){var t=uy.call(e,Jr),r=e[Jr];try{e[Jr]=void 0;var n=!0}catch{}var i=cy.call(e);return n&&(t?e[Jr]=r:delete e[Jr]),i}var fy=Object.prototype,dy=fy.toString;function py(e){return dy.call(e)}var hy="[object Null]",gy="[object Undefined]",Ac=Qt?Qt.toStringTag:void 0;function Ir(e){return e==null?e===void 0?gy:hy:Ac&&Ac in Object(e)?ly(e):py(e)}function Xt(e){return e!=null&&typeof e=="object"}var my="[object Symbol]";function vy(e){return typeof e=="symbol"||Xt(e)&&Ir(e)==my}var Pr=Array.isArray,yy=/\s/;function by(e){for(var t=e.length;t--&&yy.test(e.charAt(t)););return t}var _y=/^\s+/;function Oy(e){return e&&e.slice(0,by(e)+1).replace(_y,"")}function Cr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xc=NaN,Ey=/^[-+]0x[0-9a-f]+$/i,Sy=/^0b[01]+$/i,wy=/^0o[0-7]+$/i,Ay=parseInt;function ch(e){if(typeof e=="number")return e;if(vy(e))return xc;if(Cr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Cr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Oy(e);var r=Sy.test(e);return r||wy.test(e)?Ay(e.slice(2),r?2:8):Ey.test(e)?xc:+e}var Tc=1/0,xy=17976931348623157e292;function Rc(e){if(!e)return e===0?e:0;if(e=ch(e),e===Tc||e===-Tc){var t=e<0?-1:1;return t*xy}return e===e?e:0}var Ty="[object AsyncFunction]",Ry="[object Function]",Py="[object GeneratorFunction]",Cy="[object Proxy]";function lh(e){if(!Cr(e))return!1;var t=Ir(e);return t==Ry||t==Py||t==Ty||t==Cy}var ma=Ct["__core-js_shared__"],Pc=(function(){var e=/[^.]+$/.exec(ma&&ma.keys&&ma.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function jy(e){return!!Pc&&Pc in e}var Iy=Function.prototype,Ny=Iy.toString;function gr(e){if(e!=null){try{return Ny.call(e)}catch{}try{return e+""}catch{}}return""}var Ly=/[\\^$.*+?()[\]{}|]/g,Dy=/^\[object .+?Constructor\]$/,Fy=Function.prototype,$y=Object.prototype,My=Fy.toString,ky=$y.hasOwnProperty,Uy=RegExp("^"+My.call(ky).replace(Ly,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vy(e){if(!Cr(e)||jy(e))return!1;var t=lh(e)?Uy:Dy;return t.test(gr(e))}function qy(e,t){return e?.[t]}function mr(e,t){var r=qy(e,t);return Vy(r)?r:void 0}var Ts=mr(Ct,"WeakMap"),Cc=Object.create,By=(function(){function e(){}return function(t){if(!Cr(t))return{};if(Cc)return Cc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),jc=(function(){try{var e=mr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function Hy(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Wy=9007199254740991,Gy=/^(?:0|[1-9]\d*)$/;function zy(e,t){var r=typeof e;return t=t??Wy,!!t&&(r=="number"||r!="symbol"&&Gy.test(e))&&e>-1&&e%1==0&&e<t}function Ky(e,t,r){t=="__proto__"&&jc?jc(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function uu(e,t){return e===t||e!==e&&t!==t}var Yy=Object.prototype,Jy=Yy.hasOwnProperty;function Zy(e,t,r){var n=e[t];(!(Jy.call(e,t)&&uu(n,r))||r===void 0&&!(t in e))&&Ky(e,t,r)}var Qy=9007199254740991;function fh(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Qy}function dh(e){return e!=null&&fh(e.length)&&!lh(e)}var Xy=Object.prototype;function cu(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Xy;return e===r}function eb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var tb="[object Arguments]";function Ic(e){return Xt(e)&&Ir(e)==tb}var ph=Object.prototype,rb=ph.hasOwnProperty,nb=ph.propertyIsEnumerable,hh=Ic((function(){return arguments})())?Ic:function(e){return Xt(e)&&rb.call(e,"callee")&&!nb.call(e,"callee")};function ib(){return!1}var gh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Nc=gh&&typeof module=="object"&&module&&!module.nodeType&&module,ab=Nc&&Nc.exports===gh,Lc=ab?Ct.Buffer:void 0,ob=Lc?Lc.isBuffer:void 0,vn=ob||ib,sb="[object Arguments]",ub="[object Array]",cb="[object Boolean]",lb="[object Date]",fb="[object Error]",db="[object Function]",pb="[object Map]",hb="[object Number]",gb="[object Object]",mb="[object RegExp]",vb="[object Set]",yb="[object String]",bb="[object WeakMap]",_b="[object ArrayBuffer]",Ob="[object DataView]",Eb="[object Float32Array]",Sb="[object Float64Array]",wb="[object Int8Array]",Ab="[object Int16Array]",xb="[object Int32Array]",Tb="[object Uint8Array]",Rb="[object Uint8ClampedArray]",Pb="[object Uint16Array]",Cb="[object Uint32Array]",Te={};Te[Eb]=Te[Sb]=Te[wb]=Te[Ab]=Te[xb]=Te[Tb]=Te[Rb]=Te[Pb]=Te[Cb]=!0;Te[sb]=Te[ub]=Te[_b]=Te[cb]=Te[Ob]=Te[lb]=Te[fb]=Te[db]=Te[pb]=Te[hb]=Te[gb]=Te[mb]=Te[vb]=Te[yb]=Te[bb]=!1;function jb(e){return Xt(e)&&fh(e.length)&&!!Te[Ir(e)]}function lu(e){return function(t){return e(t)}}var mh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,pn=mh&&typeof module=="object"&&module&&!module.nodeType&&module,Ib=pn&&pn.exports===mh,va=Ib&&sh.process,jr=(function(){try{var e=pn&&pn.require&&pn.require("util").types;return e||va&&va.binding&&va.binding("util")}catch{}})(),Dc=jr&&jr.isTypedArray,fu=Dc?lu(Dc):jb,Nb=Object.prototype,Lb=Nb.hasOwnProperty;function Db(e,t){var r=Pr(e),n=!r&&hh(e),i=!r&&!n&&vn(e),a=!r&&!n&&!i&&fu(e),o=r||n||i||a,s=o?eb(e.length,String):[],u=s.length;for(var c in e)Lb.call(e,c)&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zy(c,u)))&&s.push(c);return s}function vh(e,t){return function(r){return e(t(r))}}var Fb=vh(Object.keys,Object),$b=Object.prototype,Mb=$b.hasOwnProperty;function yh(e){if(!cu(e))return Fb(e);var t=[];for(var r in Object(e))Mb.call(e,r)&&r!="constructor"&&t.push(r);return t}function kb(e){return dh(e)?Db(e):yh(e)}var yn=mr(Object,"create");function Ub(){this.__data__=yn?yn(null):{},this.size=0}function Vb(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var qb="__lodash_hash_undefined__",Bb=Object.prototype,Hb=Bb.hasOwnProperty;function Wb(e){var t=this.__data__;if(yn){var r=t[e];return r===qb?void 0:r}return Hb.call(t,e)?t[e]:void 0}var Gb=Object.prototype,zb=Gb.hasOwnProperty;function Kb(e){var t=this.__data__;return yn?t[e]!==void 0:zb.call(t,e)}var Yb="__lodash_hash_undefined__";function Jb(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yn&&t===void 0?Yb:t,this}function lr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lr.prototype.clear=Ub;lr.prototype.delete=Vb;lr.prototype.get=Wb;lr.prototype.has=Kb;lr.prototype.set=Jb;function Zb(){this.__data__=[],this.size=0}function Ti(e,t){for(var r=e.length;r--;)if(uu(e[r][0],t))return r;return-1}var Qb=Array.prototype,Xb=Qb.splice;function e_(e){var t=this.__data__,r=Ti(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Xb.call(t,r,1),--this.size,!0}function t_(e){var t=this.__data__,r=Ti(t,e);return r<0?void 0:t[r][1]}function r_(e){return Ti(this.__data__,e)>-1}function n_(e,t){var r=this.__data__,n=Ti(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function $t(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}$t.prototype.clear=Zb;$t.prototype.delete=e_;$t.prototype.get=t_;$t.prototype.has=r_;$t.prototype.set=n_;var bn=mr(Ct,"Map");function i_(){this.size=0,this.__data__={hash:new lr,map:new(bn||$t),string:new lr}}function a_(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ri(e,t){var r=e.__data__;return a_(t)?r[typeof t=="string"?"string":"hash"]:r.map}function o_(e){var t=Ri(this,e).delete(e);return this.size-=t?1:0,t}function s_(e){return Ri(this,e).get(e)}function u_(e){return Ri(this,e).has(e)}function c_(e,t){var r=Ri(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function vr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vr.prototype.clear=i_;vr.prototype.delete=o_;vr.prototype.get=s_;vr.prototype.has=u_;vr.prototype.set=c_;function l_(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var f_=vh(Object.getPrototypeOf,Object);function d_(){this.__data__=new $t,this.size=0}function p_(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function h_(e){return this.__data__.get(e)}function g_(e){return this.__data__.has(e)}var m_=200;function v_(e,t){var r=this.__data__;if(r instanceof $t){var n=r.__data__;if(!bn||n.length<m_-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new vr(n)}return r.set(e,t),this.size=r.size,this}function Lt(e){var t=this.__data__=new $t(e);this.size=t.size}Lt.prototype.clear=d_;Lt.prototype.delete=p_;Lt.prototype.get=h_;Lt.prototype.has=g_;Lt.prototype.set=v_;var bh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fc=bh&&typeof module=="object"&&module&&!module.nodeType&&module,y_=Fc&&Fc.exports===bh,$c=y_?Ct.Buffer:void 0;$c&&$c.allocUnsafe;function b_(e,t){return e.slice()}function __(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}function O_(){return[]}var E_=Object.prototype,S_=E_.propertyIsEnumerable,Mc=Object.getOwnPropertySymbols,w_=Mc?function(e){return e==null?[]:(e=Object(e),__(Mc(e),function(t){return S_.call(e,t)}))}:O_;function A_(e,t,r){var n=t(e);return Pr(e)?n:l_(n,r(e))}function Rs(e){return A_(e,kb,w_)}var Ps=mr(Ct,"DataView"),Cs=mr(Ct,"Promise"),js=mr(Ct,"Set"),kc="[object Map]",x_="[object Object]",Uc="[object Promise]",Vc="[object Set]",qc="[object WeakMap]",Bc="[object DataView]",T_=gr(Ps),R_=gr(bn),P_=gr(Cs),C_=gr(js),j_=gr(Ts),ct=Ir;(Ps&&ct(new Ps(new ArrayBuffer(1)))!=Bc||bn&&ct(new bn)!=kc||Cs&&ct(Cs.resolve())!=Uc||js&&ct(new js)!=Vc||Ts&&ct(new Ts)!=qc)&&(ct=function(e){var t=Ir(e),r=t==x_?e.constructor:void 0,n=r?gr(r):"";if(n)switch(n){case T_:return Bc;case R_:return kc;case P_:return Uc;case C_:return Vc;case j_:return qc}return t});var I_=Object.prototype,N_=I_.hasOwnProperty;function L_(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&N_.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var si=Ct.Uint8Array;function du(e){var t=new e.constructor(e.byteLength);return new si(t).set(new si(e)),t}function D_(e,t){var r=du(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var F_=/\w*$/;function $_(e){var t=new e.constructor(e.source,F_.exec(e));return t.lastIndex=e.lastIndex,t}var Hc=Qt?Qt.prototype:void 0,Wc=Hc?Hc.valueOf:void 0;function M_(e){return Wc?Object(Wc.call(e)):{}}function k_(e,t){var r=du(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var U_="[object Boolean]",V_="[object Date]",q_="[object Map]",B_="[object Number]",H_="[object RegExp]",W_="[object Set]",G_="[object String]",z_="[object Symbol]",K_="[object ArrayBuffer]",Y_="[object DataView]",J_="[object Float32Array]",Z_="[object Float64Array]",Q_="[object Int8Array]",X_="[object Int16Array]",eO="[object Int32Array]",tO="[object Uint8Array]",rO="[object Uint8ClampedArray]",nO="[object Uint16Array]",iO="[object Uint32Array]";function aO(e,t,r){var n=e.constructor;switch(t){case K_:return du(e);case U_:case V_:return new n(+e);case Y_:return D_(e);case J_:case Z_:case Q_:case X_:case eO:case tO:case rO:case nO:case iO:return k_(e);case q_:return new n;case B_:case G_:return new n(e);case H_:return $_(e);case W_:return new n;case z_:return M_(e)}}function oO(e){return typeof e.constructor=="function"&&!cu(e)?By(f_(e)):{}}var sO="[object Map]";function uO(e){return Xt(e)&&ct(e)==sO}var Gc=jr&&jr.isMap,cO=Gc?lu(Gc):uO,lO="[object Set]";function fO(e){return Xt(e)&&ct(e)==lO}var zc=jr&&jr.isSet,dO=zc?lu(zc):fO,_h="[object Arguments]",pO="[object Array]",hO="[object Boolean]",gO="[object Date]",mO="[object Error]",Oh="[object Function]",vO="[object GeneratorFunction]",yO="[object Map]",bO="[object Number]",Eh="[object Object]",_O="[object RegExp]",OO="[object Set]",EO="[object String]",SO="[object Symbol]",wO="[object WeakMap]",AO="[object ArrayBuffer]",xO="[object DataView]",TO="[object Float32Array]",RO="[object Float64Array]",PO="[object Int8Array]",CO="[object Int16Array]",jO="[object Int32Array]",IO="[object Uint8Array]",NO="[object Uint8ClampedArray]",LO="[object Uint16Array]",DO="[object Uint32Array]",Se={};Se[_h]=Se[pO]=Se[AO]=Se[xO]=Se[hO]=Se[gO]=Se[TO]=Se[RO]=Se[PO]=Se[CO]=Se[jO]=Se[yO]=Se[bO]=Se[Eh]=Se[_O]=Se[OO]=Se[EO]=Se[SO]=Se[IO]=Se[NO]=Se[LO]=Se[DO]=!0;Se[mO]=Se[Oh]=Se[wO]=!1;function Kn(e,t,r,n,i,a){var o;if(o!==void 0)return o;if(!Cr(e))return e;var s=Pr(e);if(s)o=L_(e);else{var u=ct(e),c=u==Oh||u==vO;if(vn(e))return b_(e);if(u==Eh||u==_h||c&&!i)o=c?{}:oO(e);else{if(!Se[u])return i?e:{};o=aO(e,u)}}a||(a=new Lt);var l=a.get(e);if(l)return l;a.set(e,o),dO(e)?e.forEach(function(y){o.add(Kn(y,t,r,y,e,a))}):cO(e)&&e.forEach(function(y,h){o.set(h,Kn(y,t,r,h,e,a))});var f=Rs,p=s?void 0:f(e);return Hy(p||e,function(y,h){p&&(h=y,y=e[h]),Zy(o,h,Kn(y,t,r,h,e,a))}),o}var FO=1,$O=4;function Sh(e){return Kn(e,FO|$O)}var MO="__lodash_hash_undefined__";function kO(e){return this.__data__.set(e,MO),this}function UO(e){return this.__data__.has(e)}function ui(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new vr;++t<r;)this.add(e[t])}ui.prototype.add=ui.prototype.push=kO;ui.prototype.has=UO;function VO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function qO(e,t){return e.has(t)}var BO=1,HO=2;function wh(e,t,r,n,i,a){var o=r&BO,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(e),l=a.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,y=r&HO?new ui:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],b=t[f];if(n)var _=o?n(b,h,f,t,e,a):n(h,b,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(y){if(!VO(t,function(m,d){if(!qO(y,d)&&(h===m||i(h,m,r,n,a)))return y.push(d)})){p=!1;break}}else if(!(h===b||i(h,b,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function WO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function GO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var zO=1,KO=2,YO="[object Boolean]",JO="[object Date]",ZO="[object Error]",QO="[object Map]",XO="[object Number]",eE="[object RegExp]",tE="[object Set]",rE="[object String]",nE="[object Symbol]",iE="[object ArrayBuffer]",aE="[object DataView]",Kc=Qt?Qt.prototype:void 0,ya=Kc?Kc.valueOf:void 0;function oE(e,t,r,n,i,a,o){switch(r){case aE:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case iE:return!(e.byteLength!=t.byteLength||!a(new si(e),new si(t)));case YO:case JO:case XO:return uu(+e,+t);case ZO:return e.name==t.name&&e.message==t.message;case eE:case rE:return e==t+"";case QO:var s=WO;case tE:var u=n&zO;if(s||(s=GO),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=KO,o.set(e,t);var l=wh(s(e),s(t),n,i,a,o);return o.delete(e),l;case nE:if(ya)return ya.call(e)==ya.call(t)}return!1}var sE=1,uE=Object.prototype,cE=uE.hasOwnProperty;function lE(e,t,r,n,i,a){var o=r&sE,s=Rs(e),u=s.length,c=Rs(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var p=s[f];if(!(o?p in t:cE.call(t,p)))return!1}var y=a.get(e),h=a.get(t);if(y&&h)return y==t&&h==e;var b=!0;a.set(e,t),a.set(t,e);for(var _=o;++f<u;){p=s[f];var m=e[p],d=t[p];if(n)var E=o?n(d,m,p,t,e,a):n(m,d,p,e,t,a);if(!(E===void 0?m===d||i(m,d,r,n,a):E)){b=!1;break}_||(_=p=="constructor")}if(b&&!_){var g=e.constructor,v=t.constructor;g!=v&&"constructor"in e&&"constructor"in t&&!(typeof g=="function"&&g instanceof g&&typeof v=="function"&&v instanceof v)&&(b=!1)}return a.delete(e),a.delete(t),b}var fE=1,Yc="[object Arguments]",Jc="[object Array]",Vn="[object Object]",dE=Object.prototype,Zc=dE.hasOwnProperty;function pE(e,t,r,n,i,a){var o=Pr(e),s=Pr(t),u=o?Jc:ct(e),c=s?Jc:ct(t);u=u==Yc?Vn:u,c=c==Yc?Vn:c;var l=u==Vn,f=c==Vn,p=u==c;if(p&&vn(e)){if(!vn(t))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new Lt),o||fu(e)?wh(e,t,r,n,i,a):oE(e,t,u,r,n,i,a);if(!(r&fE)){var y=l&&Zc.call(e,"__wrapped__"),h=f&&Zc.call(t,"__wrapped__");if(y||h){var b=y?e.value():e,_=h?t.value():t;return a||(a=new Lt),i(b,_,r,n,a)}}return p?(a||(a=new Lt),lE(e,t,r,n,i,a)):!1}function Ah(e,t,r,n,i){return e===t?!0:e==null||t==null||!Xt(e)&&!Xt(t)?e!==e&&t!==t:pE(e,t,r,n,Ah,i)}var hE=Math.max,gE=Math.min;function mE(e,t,r){return e>=gE(t,r)&&e<hE(t,r)}function ci(e,t,r){return t=Rc(t),r===void 0?(r=t,t=0):r=Rc(r),e=ch(e),mE(e,t,r)}var vE="[object Map]",yE="[object Set]",bE=Object.prototype,_E=bE.hasOwnProperty;function _t(e){if(e==null)return!0;if(dh(e)&&(Pr(e)||typeof e=="string"||typeof e.splice=="function"||vn(e)||fu(e)||hh(e)))return!e.length;var t=ct(e);if(t==vE||t==yE)return!e.size;if(cu(e))return!yh(e).length;for(var r in e)if(_E.call(e,r))return!1;return!0}function OE(e,t){return Ah(e,t)}const EE=["id","selCtx","fltCtx"],xh=".",Th="#dot",Rh="#FIX_NUMBER",SE=e=>Ch(Sh(e),xE),wE=e=>{const t=e.replaceAll(xh,Th);return/^\d+$/.test(t)?`${Rh}${t}`:t},AE=e=>e.replaceAll(Th,xh).replaceAll(Rh,""),xE=(e,t)=>Ph(e,t,wE),TE=(e,t)=>Ph(e,t,AE),Ph=(e,t,r)=>{let n=t;function i(a){const o={};for(const s in a)if(a.hasOwnProperty(s)){const u=r(s);let c=a[s];typeof a[s]=="object"&&a[s]!==null&&(c=i(a[s])),o[u]=c}return o}return EE.includes(e)&&(typeof t=="string"||t instanceof String)&&(n=r(t)),(e==="selected"||e==="filter")&&(n=i(t)),n},Ch=(e,t)=>(Object.keys(e).forEach(r=>{const n=e[r];e[r]=t(r,n),typeof n=="object"&&n!==null&&Ch(n,t)}),e),jh=e=>{const t=JSON.parse(JSON.stringify(e));for(const[r,n]of Object.entries(t))if(n&&!Array.isArray(n)){const i=t[r];for(const[a,o]of Object.entries(i))o===!1&&delete i[a];Object.keys(i).length===0&&delete t[r]}else delete t[r];return t},RE=e=>TE("selected",e);var Qc;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(Qc||(Qc={}));var Xc;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(Xc||(Xc={}));var Ot;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.GROUP_UPSELL="3e/group/upsell",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query",e.CMS="3e/cms"})(Ot||(Ot={}));var el;(function(e){e.GROUP="group",e.PRODUCT="product"})(el||(el={}));var tl;(function(e){e.CREATOR="CREATOR",e.CUSTOMER="CUSTOMER",e.COUPONS="COUPON",e.KIOSK="KIOSK",e.WAITER="WAITER",e.MANAGER="MANAGER",e.VIEWER="VIEWER",e.DRIVER="DRIVER",e.STAFF="STAFF"})(tl||(tl={}));var rl;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.BOLT_DINE_IN="BOLT_DINE_IN",e.TAZZ_DELIVERY="TAZZ_DELIVERY",e.TAZZ_TAKE_AWAY="TAZZ_TAKE_AWAY",e.UPMENU_DELIVERY="UPMENU_DELIVERY",e.UPMENU_TAKE_AWAY="UPMENU_TAKE_AWAY",e.UPMENU_DINE_IN="UPMENU_DINE_IN"})(rl||(rl={}));var nl;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT",e.TAZZ="TAZZ",e.POS="POS",e.UPMENU="UPMENU",e.APP="APP"})(nl||(nl={}));var il;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT",e.TAZZ="TAZZ",e.UPMENU="UPMENU"})(il||(il={}));var al;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(al||(al={}));var ol;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(ol||(ol={}));var sl;(function(e){e.POINTS_TOTAL="x-rbi-loyalty-points",e.POINTS_EARNED="x-rbi-points-earned",e.REWARDS="x-rbi-rewards",e.OFFERS="x-rbi-offers",e.CUSTOMER_NAME="x-customer-name"})(sl||(sl={}));var ul;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(ul||(ul={}));var cl;(function(e){e.GROUP="group",e.PRODUCT="product"})(cl||(cl={}));var ll;(function(e){e.ORDER_MESSAGE="OrderMessage",e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(ll||(ll={}));const PE=e=>e==="true"||e===!0,CE=e=>`options--${e}`,Ih=e=>{const{details:{media:t=[]}={}}=e;return(t.find(n=>n.name==="MAIN_IMG")||t[0]||{})?.url||""},fl=e=>!(e?.attrs?.hidden===!0||e?._?.hidden==="true");function Nh(e,t){if(!t.items)return null;for(let r=0;r<t.items?.length;r++){const n=t.items[r];if(n.selCtx===e&&(n.kind===Ot.OPTIONS||n.kind===Ot.GROUP||n.kind===Ot.GROUP_UPSELL))return n;if(n.items&&n.items.length>0){const i=Nh(e,n);if(i)return i}}return null}const xn=e=>e===Ot.OPTIONS||e===Ot.CONFIG||e===Ot.GROUP_UPSELL,Is=e=>e?!!(xn(e?.kind)&&e?.attrs?.selMin==="1"&&e?.attrs?.selMax==="2"&&e?.attrs?.qtyMin&&e?.attrs?.qtyMin===e?.attrs?.qtyMax&&e?.items?.filter(t=>t?._?.hidden!=="true")?.length===2):!1,dl=(e,t,r)=>{const n=Number(e?.attrs?.qtyMax)-r<0?!1:`${Number(e?.attrs?.qtyMax)-r}`;return{product:e?.items?.find(a=>a?.id!==t),value:n}},jE=(e,t,r,n)=>{const i=e?.items?.find(s=>s?.id!==t),a=e?.attrs?.qtyMax;return r?!!i&&!!n?.[i.selCtx]?.[i.id]&&n?.[i.selCtx]?.[i.id]!==!1?{clickedProductValue:"1",secondProductValue:Number(a)-1<0?!1:`${Number(a)-1}`,secondProduct:i}:{clickedProductValue:a,secondProductValue:!1,secondProduct:i}:{clickedProductValue:!1,secondProductValue:a,secondProduct:i}};function IE(e){let t;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(t):c;if(f!==t){const p=t;t=l?f:Object.assign({},t,f),r.forEach(y=>y(t,p))}},i=()=>t,a=(c,l=i,f=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=l(t);function y(){const h=l(t);if(!f(p,h)){const b=p;c(p=h,b)}}return r.add(y),()=>r.delete(y)},u={setState:n,getState:i,subscribe:(c,l,f)=>l||f?a(c,l,f):(r.add(c),()=>r.delete(c)),destroy:()=>r.clear()};return t=e(n,i,u),u}const NE=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),pl=NE?w.useEffect:w.useLayoutEffect;function hl(e){const t=typeof e=="function"?IE(e):e,r=(n=t.getState,i=Object.is)=>{const[,a]=w.useReducer(_=>_+1,0),o=t.getState(),s=w.useRef(o),u=w.useRef(n),c=w.useRef(i),l=w.useRef(!1),f=w.useRef();f.current===void 0&&(f.current=n(o));let p,y=!1;(s.current!==o||u.current!==n||c.current!==i||l.current)&&(p=n(o),y=!i(f.current,p)),pl(()=>{y&&(f.current=p),s.current=o,u.current=n,c.current=i,l.current=!1});const h=w.useRef(o);pl(()=>{const _=()=>{try{const d=t.getState(),E=u.current(d);c.current(f.current,E)||(s.current=d,f.current=E,a())}catch{l.current=!0,a()}},m=t.subscribe(_);return t.getState()!==h.current&&_(),m},[]);const b=y?p:f.current;return w.useDebugValue(b),b};return Object.assign(r,t),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[r,t];return{next(){const i=n.length<=0;return{value:n.shift(),done:i}}}},r}const LE={};function DE(e,t){return(r,n,i)=>{var a;const o={name:void 0,anonymousActionType:void 0};typeof((a=o?.serialize)==null?void 0:a.options)<"u"&&console.warn("[zustand devtools middleware]: `serialize.options` is deprecated, just use `serialize`");let s;try{s=window.__REDUX_DEVTOOLS_EXTENSION__||window.top.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!s)return(LE&&"production")!=="production"&&typeof window<"u"&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(r,n,i);let u=Object.create(s.connect(o)),c=!1;Object.defineProperty(i,"devtools",{get:()=>(c||(console.warn("[zustand devtools middleware] `devtools` property on the store is deprecated it will be removed in the next major.\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly"),c=!0),u),set:h=>{c||(console.warn("[zustand devtools middleware] `api.devtools` is deprecated, it will be removed in the next major.\nYou shouldn't interact with the extension directly. But in case you still want to you can patch `window.__REDUX_DEVTOOLS_EXTENSION__` directly"),c=!0),u=h}});let l=!1;Object.defineProperty(u,"prefix",{get:()=>(l||(console.warn("[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\nWe no longer prefix the actions/names"+o.name===void 0?", pass the `name` option to create a separate instance of devtools for each store.":", because the `name` option already creates a separate instance of devtools for each store."),l=!0),""),set:()=>{l||(console.warn("[zustand devtools middleware] along with `api.devtools`, `api.devtools.prefix` is deprecated.\nWe no longer prefix the actions/names"+o.name===void 0?", pass the `name` option to create a separate instance of devtools for each store.":", because the `name` option already creates a separate instance of devtools for each store."),l=!0)}});let f=!0;i.setState=(h,b,_)=>{r(h,b),f&&u.send(_===void 0?{type:o.anonymousActionType||"anonymous"}:typeof _=="string"?{type:_}:_,n())};const p=(...h)=>{const b=f;f=!1,r(...h),f=b},y=e(i.setState,n,i);if(u.init(y),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const b=i.dispatch;i.dispatch=(..._)=>{_[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),b(..._)}}return u.subscribe(h=>{var b;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ba(h.payload,_=>{if(_.type==="__setState"){p(_.state);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(h.payload.type){case"RESET":return p(y),u.init(i.getState());case"COMMIT":return u.init(i.getState());case"ROLLBACK":return ba(h.state,_=>{p(_),u.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ba(h.state,_=>{p(_)});case"IMPORT_STATE":{const{nextLiftedState:_}=h.payload,m=(b=_.computedStates.slice(-1)[0])==null?void 0:b.state;if(!m)return;p(m),u.send(null,_);return}case"PAUSE_RECORDING":return f=!f}return}}),y}}const ba=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)},gl=e=>({filter:{},initialSelected:{},setInitialFilter:t=>{e(()=>({filter:{...t}}))},setInitialSelected:t=>{e(()=>({initialSelected:t}))},setFilter:(t,r)=>{e(({filter:n})=>({filter:{...n,[t]:{...n[t],...r}}}))}});var Lh=(e=>(e.FULL_PAGE="FULL_PAGE",e.MODAL="MODAL",e))(Lh||{}),Dh=(e=>(e.SIMPLE="SIMPLE",e.COMPLEX="COMPLEX",e.QUANTITY="QUANTITY",e))(Dh||{}),pu=(e=>(e.SELECT="selCtx",e.FILTER="fltCtx",e))(pu||{}),hu=(e=>(e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.PRODUCT="3e/product",e))(hu||{}),ft=(e=>(e.OK="OK",e.TOO_MUCH="TOO_MUCH",e.NOT_ENOUGHT="NOT_ENOUGHT",e.IGNORE="IGNORE",e))(ft||{});const FE=(e,t)=>li(e,t,"isSelCntAllowedToIncrement")&&li(e,t,"isQtyCntAllowedToIncrement")&&Ns(e,t,"isQtyCntAllowedToIncrement")&&Ns(e,t,"isQtyCntAllowedToIncrement"),$E=(e,t,r)=>{const{selCtx:n}=e;return r?.[n]?.parentKind===hu.PRODUCT?ml(e,t)&&li(e,r,"isQtyCntAllowedToIncrement"):ml(e,t)&&li(e,r,"isQtyCntAllowedToIncrement")&&Ns(e,r,"isQtyCntAllowedToIncrement")},ml=(e,t)=>{const{qtyMax:r}=e;return Number(t)<Number(r||Number.MAX_SAFE_INTEGER)},li=(e,t,r)=>{const{selCtx:n}=e,i=t?.[n]?.[r];return Fh(i)?!0:i},Ns=(e,t,r)=>{const{selCtx:n}=e,i=t?.[n]?.parentSelCtx,o=t?.[i]?.[r];return Fh(o)?!0:o},Fh=e=>typeof e>"u",$h=(e,t,r)=>{const n=t[e];let i=0,a=0;if(n)for(const[,o]of Object.entries(n))parseInt(o)>0&&(i+=1,a+=Number(o));else r&&r.forEach(o=>{if(t[o.selCtx])for(const[,s]of Object.entries(t[o.selCtx]))parseInt(s)>0&&(i+=1,a+=Number(s))});return[i,a]},ME=(e,t)=>{const{id:r,selCtx:n}=e;return Number(t?.[n]?.[r]||0)},vl=(e,t)=>({validationMap:{},isOnSubmitted:!1,currency:"zł",refreshFormDt:"",setInitialValidate:()=>{e(()=>({validationMap:{},isOnSubmitted:!1}))},setValidationMap:r=>{const{productSelCtx:n,attrs:i,actualSelCnt:a,actualQtyCnt:o,isPassedFiltering:s,nestedLvl:u,parentSelCtx:c,parentKind:l}=r,{qtyMin:f,qtyMax:p,selMin:y,selMax:h}=i||{};(p||h)&&e(({validationMap:_})=>({validationMap:{..._,[n]:{parentSelCtx:c,isSelCntAllowedToIncrement:a<Number(h||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:o<Number(p||Number.MAX_SAFE_INTEGER),parentKind:l,nestedLvl:u,isValid:ci(a,Number(y||0),Number(h||Number.MAX_SAFE_INTEGER)+1)&&ci(o,Number(f||0),Number(p||Number.MAX_SAFE_INTEGER)+1),isPassedFiltering:s}}}))},isInputEnabled:r=>{const n=t().validationMap;return FE(r,n)},isInputCounterIncrementEnabled:(r,n)=>{const i=t().validationMap,a=ME(r,n);return $E(r,a,i)},getInvalidSelCtxArray:()=>{const r=t().validationMap,n=[];for(const[i]of Object.entries(r)){const{isValid:a,isPassedFiltering:o}=r[i];a===!1&&o===!0&&n.push(i)}return n},setIsOnSubmittedOnTrue:()=>{console.log("isOnSubmitted"),e(()=>({isOnSubmitted:!0}))},getValidationMap:()=>t().validationMap,setCurrency:r=>{e(()=>({currency:r}))},refreshForm:()=>{e(()=>({refreshFormDt:`${new Date}`}))}}),yl=(e,t)=>({expanded:{},toggleExpanded:(r,n,i)=>{const a=t().expanded[r+n+i];e(()=>({expanded:{...t().expanded,[r+n+i]:a!==void 0?!a:!1}}))},resetExpanded:()=>{e(()=>({expanded:{}}))}}),Ie=process.env.NODE_ENV!=="production"&&typeof window=="object"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?hl(DE((e,t)=>({...gl(e),...vl(e,t),...yl(e,t)}))):hl((e,t)=>({...gl(e),...vl(e,t),...yl(e,t)}));function Mh(e,t){if(!t)return null;for(const r of t){if(r.id===e)return r;if(r.items){const n=Mh(e,r.items);if(n)return n}}return null}function kE(e,t){return Mh(e,t)!==null}function UE(e,t){if(t==null||_t(t))return{};try{const r=Sh(t);for(const[n,i]of Object.entries(r))i&&typeof i=="object"&&!Array.isArray(i)&&Object.keys(i).forEach(a=>{kE(a,e.items)||(console.warn(`deleting selected selCtx ${n} id ${a}, not found in product`),delete r[n][a])});return jh(r)}catch(r){return console.error(r),t}}function VE(e){const[t,r]=w.useState(Number(e.quantity)||1),n=SE(e),{state:{filter:i={}}={}}=n,a=UE(n,n.state?.selected),o=Ie(m=>m.setInitialFilter),s=Ie(m=>m.setInitialSelected),u=Ie(m=>m.setInitialValidate),c=Ie(m=>m.resetExpanded),l=Ie(m=>m.filter),f=Ie(m=>m.setCurrency),p=Ie(m=>m.setIsOnSubmittedOnTrue),y=Ie(m=>m.refreshFormDt),h=Ie(m=>m.getInvalidSelCtxArray),b=()=>{r(m=>m+1)},_=()=>{t>1&&r(m=>m-1)};return w.useEffect(()=>{u(),o(i),s(a),c()},[e]),{encodedProduct:n,initSelected:a,initFilter:i,filter:l,setCurrency:f,setIsOnSubmittedOnTrue:p,getInvalidSelCtxArray:h,productQuantity:t,increaseProductQuantity:b,decreaseProductQuantity:_,refreshFormDt:y}}const Pi=(e,t)=>{const{filter:r={},fltCtx:n=""}=e,i=t?.[n]||{};return!r||!Object.keys(r).length||!i?!0:Object.keys(i)?.filter(o=>Object.keys(r?.[o]||{})?.filter(u=>{if(r?.[o]?.[u]===i?.[o])return!0})?.length>0)?.length>0},kh=(e,t)=>{const{items:r,filter:n}=e,i=[],a=[],o=s=>{s&&!_t(n)&&s.forEach(u=>{const{items:c=[]}=u;t?i.push(u):a.push(u),c.length>0&&o(c)})};return o(r),{productsToSelect:i,productsToUnselect:a}},qE=(e,t)=>{e.map(({selCtx:r,id:n})=>{t(`selected.${r}.${n}`,!1)})},Uh=(e,t,r)=>{e.map(({selCtx:n,id:i})=>{const a=r[n]?.[i];a&&t(`selected.${n}.${i}`,a.toString())})};function Vh(e,t,r,n){const{selCtx:i,attrs:a={}}=e,o=Ie(m=>m.initialSelected),s=Ie(m=>m.currency),{setValue:u,getValues:c}=hr(),{selected:l={},filter:f={}}=c(),p=Pi(e,f),y=Ie(m=>m.isOnSubmitted),h=Ie(m=>m.setValidationMap),[b,_]=$h(e.selCtx,l,e.items);return h({productSelCtx:i,attrs:a,actualQtyCnt:_,actualSelCnt:b,nestedLvl:t,isPassedFiltering:p,parentSelCtx:n,parentKind:r}),w.useEffect(()=>{const{productsToSelect:m,productsToUnselect:d}=kh(e,p);Uh(m,u,o)},[p]),{isFilterValidated:p,selected:l,isOnSubmitted:y,selCnt:b,qtyCnt:_,currency:s}}const BE=(e,t,r)=>{if(e==="selected"||e==="filter")return[];if(r[t]===e)return[r];let n=Bh(e,t,r.items??[]);return n?.length||(n=qh(e,t,r.items??[]),n.length),n},qh=(e,t,r)=>{const n=HE(r),i=Bh(e,t,n);return i?.length?i:n?.length?qh(e,t,n):[]},HE=e=>{let t=[];return Array.isArray(e)&&(t=e.map(r=>{if(Array.isArray(r?.items))return r.items}).filter(r=>r!==void 0)),t.flat(1)},Bh=(e,t,r)=>{let n=[];return Array.isArray(r)&&(n=r.filter(i=>{if(i&&i[t]===e)return!0})),n},WE=(e,t,r,n)=>{const i=BE(t,r,n),a=GE(e,i).filter(o=>o!==null&&typeof o<"u");return a.length?a[0]:null},GE=(e,t)=>{let r=[];return Array.isArray(t)&&t.length&&(r=t.map(n=>zE(e,n))),r},zE=(e,t)=>{if(t.id===e)return t;let r=Wh(e,t.items);return r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):(r=Hh(e,t.items),r.length?(r.length>1&&console.error(`More than one ${e} in context ${t.id}`),r[0]):null)},Hh=(e,t)=>{const r=KE(t),n=Wh(e,r);return n?.length?n:r?.length?Hh(e,r):[]},KE=e=>{let t=[];return Array.isArray(e)&&(t=e.map(r=>{if(Array.isArray(r?.items))return r.items}).filter(r=>r!==void 0)),t.flat(1)},Wh=(e,t)=>Array.isArray(t)?t.filter(n=>{if(n&&n.id===e)return!0}):[],Gh=(e,t)=>{let r=0;for(const[n,i]of Object.entries(e))if(i){for(const[a,o]of Object.entries(i))if(o){const s=WE(a,n,pu.SELECT,t);s&&s?.price?r+=parseFloat(s.price)*o:s||console.warn(`Error finding product: ${a} in selCtx: ${n}`)}}return r},zh=e=>{const{price:t,state:{selected:r}={}}=e;return(!t||parseFloat(t||"1")===0)&&r?`${Gh(r,e)||"0"}`:t};function bl(e){const{isOk:t,isErr:r,info:n}=e;return I.jsxs("p",{className:`${t?"text-green-600":r&&"text-red-600"} ml-1 flex`,children:[t&&YE,r&&JE,n]})}const YE=I.jsx("svg",{className:"size-6 text-green-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-testid":"form-check-mark",children:I.jsx("polyline",{points:"20 6 9 17 4 12"})}),JE=I.jsx("svg",{className:"size-6 text-red-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","data-testid":"form-exclamation-mark",children:I.jsx("path",{strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})});var ZE={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},QE={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function hn(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hn=function(t){return typeof t}:hn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hn(e)}function _l(e){return XE(e)||eS(e)||tS(e)||rS()}function XE(e){if(Array.isArray(e))return e}function eS(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function tS(e,t){if(e){if(typeof e=="string")return Ol(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ol(e,t)}}function Ol(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function rS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nS={normalizePrecision:function(t){var r=t.reduce(function(n,i){return Math.max(n.getPrecision(),i.getPrecision())});return t.map(function(n){return n.getPrecision()!==r?n.convertPrecision(r):n})},minimum:function(t){var r=_l(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.lessThan(o)?a:o}),a},maximum:function(t){var r=_l(t),n=r[0],i=r.slice(1),a=n;return i.forEach(function(o){a=a.greaterThan(o)?a:o}),a}};function Kh(e){return!isNaN(parseInt(e))&&isFinite(e)}function iS(e){return Kh(e)&&e<=100&&e>=0}function aS(e){return e.length>0&&e.every(function(t){return t>=0})&&e.some(function(t){return t>0})}function El(e){return e%2===0}function Sl(e){return Kh(e)&&!Number.isInteger(e)}function oS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var r=t.split(".")[1];return r?r.length:0}function Zr(e){return Math.abs(e)%1===.5}function sS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(r,n){var i=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){i.readyState===4&&(i.status>=200&&i.status<400?r(JSON.parse(i.responseText)):n(new Error(i.statusText)))},onerror:function(){n(new Error("Network error"))}});i.open("GET",e,!0),uS(i,t.headers),i.send()})}function uS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var r in t)e.setRequestHeader(r,t[r]);return e}function cn(e){return typeof e>"u"}function Yh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",r={};return Object.entries(e).forEach(function(n){if(hn(n[1])==="object"){var i=Yh(n[1]);Object.entries(i).forEach(function(a){r[n[0]+t+a[0]]=a[1]})}else r[n[0]]=n[1]}),r}function cS(e){return!!e&&(hn(e)==="object"||typeof e=="function")&&typeof e.then=="function"}function Jh(){var e=function(n,i){var a=function(u){return Math.pow(10,oS(u))},o=Math.max(a(n),a(i));return Math.round(n*o)*Math.round(i*o)/(o*o)},t={HALF_ODD:function(n){var i=Math.round(n);return Zr(n)&&El(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return Zr(n)?El(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return Zr(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return Zr(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return Zr(n)?Math.sign(n)*Math.ceil(Math.abs(n)):Math.round(n)},DOWN:function(n){return Math.floor(n)}};return{add:function(n,i){return n+i},subtract:function(n,i){return n-i},multiply:function(n,i){return Sl(n)||Sl(i)?e(n,i):n*i},divide:function(n,i){return n/i},modulo:function(n,i){return n%i},round:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return t[i](n)}}}var lS=Jh();function fS(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return t!==null?t.slice(1).filter(function(n){return!cn(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return cn(this.getMatches().find(n))?0:this.getMatches()[lS.add(this.getMatches().findIndex(n),1)].split("").length},getCurrencyDisplay:function(){var n={USD:"code",dollar:"name",$:"symbol"};return n[this.getMatches().find(function(i){return i==="USD"||i==="dollar"||i==="$"})]},getStyle:function(){return cn(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!cn(this.getMatches().find(function(n){return n===","}))}}}function dS(e){var t=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;for(var o in a)i=i.replace("{{".concat(o,"}}"),a[o]);return i},r=function(i,a){return sS(t(e.endpoint,{from:i,to:a}),{headers:e.headers})};return{getExchangeRate:function(i,a){return(cS(e.endpoint)?e.endpoint:r(i,a)).then(function(o){return Yh(o)[t(e.propertyPath,{from:i,to:a})]})}}}function _n(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!e)throw new r(t)}function pS(e){_n(iS(e),"You must provide a numeric value between 0 and 100.",RangeError)}function hS(e){_n(aS(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function _a(e){_n(Number.isInteger(e),"You must provide an integer.",TypeError)}var xe=Jh(),gS=function e(t){var r=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),n=r.amount,i=r.currency,a=r.precision;_a(n),_a(a);var o=e.globalLocale,s=e.globalFormat,u=e.globalRoundingMode,c=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),f=function(h){var b=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},h),Object.assign({},{locale:this.locale},h));return Object.assign(e({amount:b.amount,currency:b.currency,precision:b.precision}),{locale:b.locale})},p=function(h){_n(this.hasSameCurrency(h),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return n},getCurrency:function(){return i},getLocale:function(){return this.locale||o},setLocale:function(h){return f.call(this,{locale:h})},getPrecision:function(){return a},convertPrecision:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;_a(h);var _=this.getPrecision(),m=h>_,d=m?xe.multiply:xe.divide,E=m?[h,_]:[_,h],g=Math.pow(10,xe.subtract.apply(xe,E));return f.call(this,{amount:xe.round(d(this.getAmount(),g),b),precision:h})},add:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return f.call(this,{amount:xe.add(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},subtract:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return f.call(this,{amount:xe.subtract(b[0].getAmount(),b[1].getAmount()),precision:b[0].getPrecision()})},multiply:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return f.call(this,{amount:xe.round(xe.multiply(this.getAmount(),h),b)})},divide:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return f.call(this,{amount:xe.round(xe.divide(this.getAmount(),h),b)})},percentage:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;return pS(h),this.multiply(xe.divide(h,100),b)},allocate:function(h){var b=this;hS(h);for(var _=h.reduce(function(g,v){return xe.add(g,v)}),m=this.getAmount(),d=h.map(function(g){var v=Math.floor(xe.divide(xe.multiply(b.getAmount(),g),_));return m=xe.subtract(m,v),f.call(b,{amount:v})}),E=0;m>0;)h[E]>0&&(d[E]=d[E].add(f.call(this,{amount:1})),m=xe.subtract(m,1)),E+=1;return d},convert:function(h){var b=this,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=_.endpoint,d=m===void 0?l.endpoint:m,E=_.propertyPath,g=E===void 0?l.propertyPath||"rates.{{to}}":E,v=_.headers,O=v===void 0?l.headers:v,A=_.roundingMode,S=A===void 0?u:A,T=Object.assign({},{endpoint:d,propertyPath:g,headers:O,roundingMode:S});return dS(T).getExchangeRate(this.getCurrency(),h).then(function(P){return _n(!cn(P),'No rate was found for the destination currency "'.concat(h,'".'),TypeError),f.call(b,{amount:xe.round(xe.multiply(b.getAmount(),parseFloat(P)),T.roundingMode),currency:h})})},equalsTo:function(h){return this.hasSameAmount(h)&&this.hasSameCurrency(h)},lessThan:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()<b[1].getAmount()},lessThanOrEqual:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()<=b[1].getAmount()},greaterThan:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()>b[1].getAmount()},greaterThanOrEqual:function(h){p.call(this,h);var b=e.normalizePrecision([this,h]);return b[0].getAmount()>=b[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return xe.modulo(this.getAmount(),Math.pow(10,a))!==0},hasCents:function(){return xe.modulo(this.getAmount(),Math.pow(10,a))!==0},hasSameCurrency:function(h){return this.getCurrency()===h.getCurrency()},hasSameAmount:function(h){var b=e.normalizePrecision([this,h]);return b[0].getAmount()===b[1].getAmount()},toFormat:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,_=fS(h);return this.toRoundedUnit(_.getMinimumFractionDigits(),b).toLocaleString(this.getLocale(),{currencyDisplay:_.getCurrencyDisplay(),useGrouping:_.getUseGrouping(),minimumFractionDigits:_.getMinimumFractionDigits(),style:_.getStyle(),currency:this.getCurrency()})},toUnit:function(){return xe.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c,_=Math.pow(10,h);return xe.divide(xe.round(xe.multiply(this.toUnit(),_),b),_)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},mS=Object.assign(gS,ZE,QE,nS);const Yn=(e,t="PLN")=>{e=e.toString();const r=e.replace(",","."),n=Number(r)*100;return isNaN(n)?"0.00":mS({amount:Math.round(n),currency:t}).toFormat("0,0.00")},vS=(e,t,r=1)=>{const n=parseFloat(e.toString());let i=!1,a=Yn(`${r*n}`);const o=`${Yn(`${a}`)}`;return n<parseFloat(t)&&(i=!0,a=`${Yn(`${t}`)}`),{displayPriceFrom:i,formattedEndPriceWithPriceMin:a,formattedEndPrice:o}};function Ci(e){const{price:t,addPlusBefore:r=!1,size:n="md",showIfPriceZero:i=!1,minPrice:a="0.00",hiddenIfPriceZero:o=!1}=e,s=parseFloat(a),u=t>s?t:a,c=Yn(`${u}`);return!t&&i===!1?null:r?I.jsxs("span",{style:{visibility:`${!t&&o?"hidden":"visible"}`},className:"",children:[" ",`+${c}`]}):t<s?I.jsxs("span",{className:"",children:[" ",`od ${c}`]}):I.jsx("span",{className:"",children:c})}function yS(e,t){const{selCtx:r,id:n}=e,i=Ie(s=>s.expanded),a=w.useMemo(()=>bS(r,n,t,i),[r,n,t,i]),o=Ie(s=>s.toggleExpanded);return{isExpanded:a,toggleExpanded:o}}const bS=(e,t,r,n)=>{const i=n[e+t+r];return i!==void 0?i:!0};var _S=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,OS={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},ES=function(t){return OS[t]},SS=function(t){return t.replace(_S,ES)};function wl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wl(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ls={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:SS},Zh,wS=w.createContext();function AS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ls=Al(Al({},Ls),e)}function xS(){return Ls}var TS=(function(){function e(){pt(this,e),this.usedNamespaces={}}return ht(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(i){n.usedNamespaces[i]||(n.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e})();function RS(e){Zh=e}function PS(){return Zh}var CS={type:"3rdParty",init:function(t){AS(t.options.react),RS(t)}};function jS(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var xl={};function Ds(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&xl[t[0]]||(typeof t[0]=="string"&&(xl[t[0]]=new Date),jS.apply(void 0,t))}function Tl(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function i(){setTimeout(function(){e.off("initialized",i)},0),r()};e.on("initialized",n)}})}function IS(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var o=function(u,c){var l=t.services.backendConnector.state["".concat(u,"|").concat(c)];return l===-1||l===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!o(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}function NS(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Ds("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(a,o){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!o(a.isLanguageChangingTo,e))return!1}}):IS(e,t,r)}function LS(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(l){c=!0,i=l}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function DS(e,t){return $p(e)||LS(e,t)||Mp(e,t)||kp()}function Rl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Oa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rl(Object(r),!0).forEach(function(n){Pt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var FS=function(t,r){var n=w.useRef();return w.useEffect(function(){n.current=t},[t,r]),n.current};function gu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=w.useContext(wS)||{},i=n.i18n,a=n.defaultNS,o=r||i||PS();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new TS),!o){Ds("You will need to pass in an i18next instance by using initReactI18next");var s=function(T){return Array.isArray(T)?T[T.length-1]:T},u=[s,{},!1];return u.t=s,u.i18n={},u.ready=!1,u}o.options.react&&o.options.react.wait!==void 0&&Ds("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=Oa(Oa(Oa({},xS()),o.options.react),t),l=c.useSuspense,f=c.keyPrefix,p=a||o.options&&o.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],o.reportNamespaces.addUsedNamespaces&&o.reportNamespaces.addUsedNamespaces(p);var y=(o.isInitialized||o.initializedStoreOnce)&&p.every(function(S){return NS(S,o,c)});function h(){return o.getFixedT(null,c.nsMode==="fallback"?p:p[0],f)}var b=w.useState(h),_=DS(b,2),m=_[0],d=_[1],E=p.join(),g=FS(E),v=w.useRef(!0);w.useEffect(function(){var S=c.bindI18n,T=c.bindI18nStore;v.current=!0,!y&&!l&&Tl(o,p,function(){v.current&&d(h)}),y&&g&&g!==E&&v.current&&d(h);function P(){v.current&&d(h)}return S&&o&&o.on(S,P),T&&o&&o.store.on(T,P),function(){v.current=!1,S&&o&&S.split(" ").forEach(function(N){return o.off(N,P)}),T&&o&&T.split(" ").forEach(function(N){return o.store.off(N,P)})}},[o,E]);var O=w.useRef(!0);w.useEffect(function(){v.current&&!O.current&&d(h),O.current=!1},[o,f]);var A=[m,o,y];if(A.t=m,A.i18n=o,A.ready=y,y||!y&&!l)return A;throw new Promise(function(S){Tl(o,p,function(){S()})})}var Qh=[],$S=Qh.forEach,MS=Qh.slice;function kS(e){return $S.call(MS.call(arguments,1),function(t){if(t)for(var r in t)e[r]===void 0&&(e[r]=t[r])}),e}var Pl=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,US=function(t,r,n){var i=n||{};i.path=i.path||"/";var a=encodeURIComponent(r),o="".concat(t,"=").concat(a);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!Pl.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!Pl.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var u=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},Cl={create:function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),i&&(a.domain=i),document.cookie=US(t,encodeURIComponent(r),a)},read:function(t){for(var r="".concat(t,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(r)===0)return a.substring(r.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},VS={name:"cookie",lookup:function(t){var r;if(t.lookupCookie&&typeof document<"u"){var n=Cl.read(t.lookupCookie);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupCookie&&typeof document<"u"&&Cl.create(r.lookupCookie,t,r.cookieMinutes,r.cookieDomain,r.cookieOptions)}},qS={name:"querystring",lookup:function(t){var r;if(typeof window<"u"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),a=i.split("&"),o=0;o<a.length;o++){var s=a[o].indexOf("=");if(s>0){var u=a[o].substring(0,s);u===t.lookupQuerystring&&(r=a[o].substring(s+1))}}}return r}},Qr=null,jl=function(){if(Qr!==null)return Qr;try{Qr=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Qr=!1}return Qr},BS={name:"localStorage",lookup:function(t){var r;if(t.lookupLocalStorage&&jl()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupLocalStorage&&jl()&&window.localStorage.setItem(r.lookupLocalStorage,t)}},Xr=null,Il=function(){if(Xr!==null)return Xr;try{Xr=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Xr=!1}return Xr},HS={name:"sessionStorage",lookup:function(t){var r;if(t.lookupSessionStorage&&Il()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(r=n)}return r},cacheUserLanguage:function(t,r){r.lookupSessionStorage&&Il()&&window.sessionStorage.setItem(r.lookupSessionStorage,t)}},WS={name:"navigator",lookup:function(t){var r=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)r.push(navigator.languages[n]);navigator.userLanguage&&r.push(navigator.userLanguage),navigator.language&&r.push(navigator.language)}return r.length>0?r:void 0}},GS={name:"htmlTag",lookup:function(t){var r,n=t.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(r=n.getAttribute("lang")),r}},zS={name:"path",lookup:function(t){var r;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof n[t.lookupFromPathIndex]!="string")return;r=n[t.lookupFromPathIndex].replace("/","")}else r=n[0].replace("/","")}return r}},KS={name:"subdomain",lookup:function(t){var r=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[r]}};function YS(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}}var Xh=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};pt(this,e),this.type="languageDetector",this.detectors={},this.init(t,r)}return ht(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r,this.options=kS(n,this.options||{},YS()),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(VS),this.addDetector(qS),this.addDetector(BS),this.addDetector(HS),this.addDetector(WS),this.addDetector(GS),this.addDetector(zS),this.addDetector(KS)}},{key:"addDetector",value:function(r){this.detectors[r.name]=r}},{key:"detect",value:function(r){var n=this;r||(r=this.options.order);var i=[];return r.forEach(function(a){if(n.detectors[a]){var o=n.detectors[a].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(r,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||n.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(r,i.options)}))}}]),e})();Xh.type="languageDetector";const JS={"OS.ProductConfigurator.Selected.Message.From":"od","OS.ProductConfigurator.Selected.Message.UpTo":"do","OS.ProductConfigurator.Selected.Message.Choose":"Wybierz","OS.ProductConfigurator.Selected.Message.Options":"opcji","OS.ProductConfigurator.Selected.Message.OneOption":"Wybierz 1 opcję","OS.ProductConfigurator.Quantity.Message.UpTo":"do","OS.ProductConfigurator.Quantity.Message.From":"od","OS.ProductConfigurator.Quantity.Message.Max":"maksymalnie","OS.ProductConfigurator.Quantity.Message.Quantity":"ilości","OS.ProductConfigurator.Quantity.Message.OneOption":"Wybierz maksymalnie jedną opcję","OS.ProductConfigurator.Add":"Dodaj","OS.ProductConfigurator.Back":"Wróć","OS.ProductConfigurator.ShowMore":"Pokaż więcej","OS.ProductConfigurator.ShowLess":"Pokaż mniej"},ZS={"OS.ProductConfigurator.Selected.Message.From":"from","OS.ProductConfigurator.Selected.Message.UpTo":"up to","OS.ProductConfigurator.Selected.Message.Choose":"Choose","OS.ProductConfigurator.Selected.Message.Options":"options","OS.ProductConfigurator.Selected.Message.OneOption":"Choose one option","OS.ProductConfigurator.Quantity.Message.UpTo":"up to","OS.ProductConfigurator.Quantity.Message.From":"from","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"quantity","OS.ProductConfigurator.Quantity.Message.OneOption":"Choose maximum one option","OS.ProductConfigurator.Add":"Add","OS.ProductConfigurator.Back":"Back","OS.ProductConfigurator.ShowMore":"Show more","OS.ProductConfigurator.ShowLess":"Show less"},QS={"OS.ProductConfigurator.Selected.Message.From":"ab","OS.ProductConfigurator.Selected.Message.UpTo":"bis","OS.ProductConfigurator.Selected.Message.Choose":"Wähle","OS.ProductConfigurator.Selected.Message.Options":"Optionen","OS.ProductConfigurator.Selected.Message.OneOption":"Wähle eine Option","OS.ProductConfigurator.Quantity.Message.UpTo":"ab","OS.ProductConfigurator.Quantity.Message.From":"aus","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"Menge","OS.ProductConfigurator.Quantity.Message.OneOption":"Wähle bis zu 1 Option aus","OS.ProductConfigurator.Add":"Hinzufügen","OS.ProductConfigurator.Back":"Zurück","OS.ProductConfigurator.ShowMore":"Zeig mehr","OS.ProductConfigurator.ShowLess":"Zeig weniger"},XS={"OS.ProductConfigurator.Selected.Message.From":"from","OS.ProductConfigurator.Selected.Message.UpTo":"up to","OS.ProductConfigurator.Selected.Message.Choose":"Choose","OS.ProductConfigurator.Selected.Message.Options":"options","OS.ProductConfigurator.Selected.Message.OneOption":"Choose one option","OS.ProductConfigurator.Quantity.Message.UpTo":"up to","OS.ProductConfigurator.Quantity.Message.From":"from","OS.ProductConfigurator.Quantity.Message.Max":"max","OS.ProductConfigurator.Quantity.Message.Quantity":"quantity","OS.ProductConfigurator.Quantity.Message.OneOption":"Choose maximum one option","OS.ProductConfigurator.Add":"Add","OS.ProductConfigurator.Back":"Back","OS.ProductConfigurator.ShowMore":"Show more","OS.ProductConfigurator.ShowLess":"Show less"};Ge.use(Xh).use(CS).init({resources:{pl:{translation:JS},en:{translation:ZS},de:{translation:QS},cs:{translation:XS}}});const ew=(e,t,r,n)=>{let i="",a="";const o=Number(e),s=Number(t);return o>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.From")} ${o}`,o>r&&(a=ft.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Quantity.Message.UpTo")} ${s}`,s<r&&(a=ft.TOO_MUCH)),o>=0||s>=0&&r<o?(i=`${n("OS.ProductConfigurator.Quantity.Message.Max")}${i}`,i+=` ${n("OS.ProductConfigurator.Quantity.Message.Quantity")}`):o===1&&o===1?i=`${n("OS.ProductConfigurator.Quantity.Message.OneOption")}`:(i="",a=ft.IGNORE),r>=o&&r<=s&&(a=ft.OK),{message:i,validationStatus:a}},tw=(e,t,r,n)=>{let i="",a="";const o=parseInt(e||"-1"),s=parseInt(t||"-1");return o>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.From")} ${o}`,o>r&&(a=ft.NOT_ENOUGHT)),s>0&&(i+=` ${n("OS.ProductConfigurator.Selected.Message.UpTo")} ${s}`,s<r&&(a=ft.TOO_MUCH)),o>=0||s>=0?(i=`${n("OS.ProductConfigurator.Selected.Message.Choose")}${i}`,i+=` ${n("OS.ProductConfigurator.Selected.Message.Options")}`):(i="",a=ft.IGNORE),o===1&&s===1&&(i=`${n("OS.ProductConfigurator.Selected.Message.OneOption")}`),r>=o&&r<=s&&(a=ft.OK),{message:i,validationStatus:a}},rw=e=>{const{optionsItem:t,parentSelCtx:r,selected:n,isOnSubmitted:i,actualQtyCnt:a,actualSelCnt:o,children:s}=e,{selCtx:u,details:c={},id:l,attrs:f={}}=t,{qtyMin:p,qtyMax:y,selMin:h,selMax:b}=f,{name:_,description:m}=c.literals||{},{t:d}=gu(),{isExpanded:E,toggleExpanded:g}=yS(t,r),{validationStatus:v,message:O}=tw(h,b,o,d),{validationStatus:A,message:S}=ew(p,y,a,d),T=v===ft.OK,P=A===ft.OK,N=!T&&i&&!!O,M=!P&&i&&!!S;return I.jsxs("div",{className:"pt-1 mb-3",id:CE(u),children:[I.jsxs("div",{className:"flex text-xl font-semibold",children:[I.jsx("p",{className:"",children:_}),_&&_!==" "&&I.jsxs(I.Fragment,{children:[I.jsx("div",{className:"ml-auto",children:I.jsx(Ci,{price:Gh(n,t)})}),I.jsx("svg",{className:`size-8 ml-2 text-black cursor-pointer ${!E&&"rotate-180"}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",onClick:()=>g(u,l,r),children:I.jsx("polyline",{points:"18 15 12 9 6 15"})})]})]}),I.jsx("p",{className:`${m&&"mb-2"}`,children:m}),!1,I.jsx("div",{className:"flex",children:I.jsxs("div",{children:[I.jsx(bl,{isOk:T,isErr:N,info:O}),I.jsx(bl,{isOk:P,isErr:M,info:S})]})}),I.jsx("div",{className:`${E?"block":"hidden"}`,children:s})]})},eg=w.createContext(null);function ji(){const e=w.useContext(eg);if(!e)throw new Error("Missing ComponentsContext");return e}const nw=e=>{const{optionsItem:t,parentSelCtx:r,nestedLvl:n,parentKind:i,rootProduct:a}=e,{isFilterValidated:o,selected:s,isOnSubmitted:u,selCnt:c,qtyCnt:l,currency:f}=Vh(t,n,i,r),{MenuOptionsUI:p}=ji();if(!o)return null;const y=I.jsx(mu,{productItems:t.items,parentProduct:t,rootProduct:a,nestedLvl:n+1}),h={optionsItem:t,parentSelCtx:r,selected:s,isOnSubmitted:u,actualQtyCnt:l,actualSelCnt:c,currency:f,nestedLvl:n};return p?I.jsx(p,{...h,children:y}):I.jsx(rw,{...h,children:y})},iw=e=>{const{product:t,inputId:r,isDisabled:n,registerProps:i,size:a="lg",children:o,parentProduct:s}=e,{details:{literals:u}={}}=t,{name:c="",description:l=""}=u||{},f=zh(t),p=Ih(t),{watch:y}=hr(),h=y("selected");Is(s);const b=w.useRef(!s?.items?.some(_=>h?.[_?.selCtx]?.[_.id]));return w.useEffect(()=>{setTimeout(()=>{const _=!s?.items?.some(m=>h?.[m?.selCtx]?.[m.id]);b.current=_},10)},[s?.items,h]),I.jsxs("div",{className:`flex items-center justify-center p-2 pl-3 my-1 rounded-lg bg-white border-2 border-gray-200 ${n&&"opacity-50"}`,children:[I.jsx("input",{type:"checkbox",className:`simple-checkbox checkbox-${a} mr-4`,id:r,disabled:n,...i,value:"1"}),p&&I.jsx("div",{className:"flex w-20 mr-2 max-h-24",children:I.jsx("img",{alt:"Product image",className:"h-auto max-w-full",src:p})}),I.jsx("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:I.jsxs("div",{className:"relative",children:[I.jsx("p",{className:"w-full text-lg font-semibold",children:c}),I.jsx("p",{className:"text-sm text-gray-600",children:l})]})}),I.jsx("div",{className:"ml-auto",children:o}),I.jsx("label",{htmlFor:r,children:I.jsx(Ci,{price:parseFloat(f||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})},aw=e=>{const{product:t,inputId:r,inputValue:n,registerProps:i,isChecked:a,size:o="lg",children:s}=e,{details:{literals:u}={}}=t,{name:c="",description:l=""}=u||{},f=zh(t),p=Ih(t);return I.jsxs("div",{className:"flex items-center justify-between p-2 pl-3 my-1 bg-white border-2 border-gray-200 rounded-xl",children:[I.jsx("input",{type:"radio",className:`simple-radio radio-${o} mr-4`,id:r,...i,value:n,checked:a}),p&&I.jsx("div",{className:"flex w-20 mr-2 max-h-24",children:I.jsx("img",{alt:"Product image",className:"h-auto max-w-full",src:p})}),I.jsx("label",{htmlFor:r,className:"flex items-center justify-between w-full",children:I.jsxs("div",{className:"relative",children:[I.jsx("p",{className:"w-full text-lg font-semibold",children:c}),I.jsx("p",{className:"text-sm text-gray-600",children:l})]})}),I.jsx("div",{className:"ml-auto",children:s}),I.jsx("label",{htmlFor:r,children:I.jsx(Ci,{price:parseFloat(f||"0"),addPlusBefore:!0,showIfPriceZero:!0,hiddenIfPriceZero:!0})})]})};function tg(e){const{value:t=0,add:r,subtract:n,disabledSubtract:i,disabledAdd:a,size:o="md"}=e;return I.jsxs("div",{className:`counter counter-${o} flex flex-row justify-center items-center p-1 border rounded-md border-[rgba(229,231,235,255)] product-quantity`,children:[I.jsx("button",{type:"button",className:"quantity-button small",onClick:n,disabled:i,children:I.jsxs("svg",{className:"size-4 text-black",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),I.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),I.jsx("span",{className:"font-semibold text-gray-700 product-quantity-value",children:t}),I.jsx("button",{className:"quantity-button small",type:"button",onClick:r,disabled:a,children:I.jsxs("svg",{className:"size-4 text-green-600 ",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),I.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),I.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]})}function ow(e,t,r){const{watch:n,setValue:i,getValues:a,unregister:o}=hr(),{id:s,selCtx:u,emit:c={},fltCtx:l}=e,f=n(`selected.${u}.${s}`);return w.useEffect(()=>{if(!r||r>1)return;const p=`filterWithCnt.${l}`,y=`filterWithCnt.${l}.${u}`,h=`filter.${l}`;if(t&&f&&l)if(_t(c)){const b=a(y);Object.keys(b||{})?.forEach(_=>{o(`${y}.${_}`);const m=Object.keys(a(p)||{});_t(m)?o(`${h}.${_}`):m.forEach(d=>{d!==u&&!a(`${p}.${d}.${_}`)&&o(`${h}.${_}`)})});return}else{const b=a(y),_=a(p);Object.keys(c)?.forEach(m=>{Object.keys(b||{})?.forEach(d=>{c[d]||(o(`${h}.${d}`),o(`${y}.${d}`))}),Object.keys(_||{}).forEach(d=>{d!==u&&m in a(p?.[d])&&o(`${p}.${d}.${m}`)}),i(`${h}.${m}`,c[m]),i(`${y}.${m}`,{cnt:1,value:c[m]})});return}f&&l&&!_t(c)&&Object.keys(c)?.forEach(b=>{i(`filter.${l}.${b}`,c[b]);const _=a(`${y}.${b}.cnt`)||0;i(`${y}.${b}`,{cnt:_+1,value:c[b]})})},[f]),{}}function sw(){const e=Ie(n=>n.getInvalidSelCtxArray),t=Ie(n=>n.isInputEnabled),r=Ie(n=>n.isInputCounterIncrementEnabled);return{getInvalidSelCtxArray:e,isInputEnabled:t,isInputCounterIncrementEnabled:r}}const Nl=(e,t)=>{Object.keys(e).forEach(r=>{t(`selected.${r}`,e[r])})},Fs=(e,t,r)=>{const n=t(`selected.${e}`);r(`selected.${e}`,Object.keys(n).reduce((i,a)=>(i[a]=!1,i),{}))},en=(e,t,r,n,i,a)=>{const{items:o,state:s,emit:u,fltCtx:c,selCtx:l}=r,{selected:f={}}=s||{};if(console.log("selected/unselected product",r,n),n){Nl(f,e);const p=y=>{!Array.isArray(y)||_t(s?.selected)||y?.filter(h=>!!s.selected?.[`${h.selCtx}`]?.[`${h.id}`])?.map(h=>{if(h.state&&"selected"in h.state){const{state:{selected:b}}=h;Nl(b,e)}Array.isArray(h.items)&&p(h.items)})};p(o)}else{Object.keys(f).forEach(y=>{Fs(y,t,e)});const p=y=>{Array.isArray(y)&&y.map(h=>{const{selCtx:b}=h;t(`selected.${b}`)&&Fs(b,t,e),p(h.items)})};if(p(o),a&&a<2&&!_t(u)){Object.keys(u)?.forEach(_=>{const m=`filterWithCnt.${c}.${_}.${u[_]}`,d=t(m)||0;d<2?i(m):e(m,d-1)});const y=`filterWithCnt.${c}`,h=`filterWithCnt.${c}.${l}`,b=`filter.${c}`;Object.keys(u)?.forEach(_=>{const m=t(`${h}.${_}`)||0;if(m)if(m>1)e(`${h}.${_}`,m-1);else{i(`${h}.${_}`);const d=t(y)||{},E=Object.keys(d)?.filter(g=>g!==l);if(!E)i(`${b}.${_}`);else{const g=E?.find(v=>!!d?.[`${v}`]?.[`${_}`]);if(!g)i(`${b}.${_}`);else{const v=d?.[`${g}`]?.[`${_}`]?.value;e(`${b}.${_}`,v)}}}})}}},Jn=(e,t)=>{if(!e.items||_t(e.items))return null;for(let r=0;r<e.items?.length;r++){const n=e.items[r];if(n.selCtx&&n.selCtx===t&&n.kind===Ot.PRODUCT)return n;if(xn(n.kind)&&n.items&&n.items.length>0){const i=Jn(n,t);if(i)return i}}return null};function uw(e,t,r,n){const{id:i,selCtx:a,emit:o={},fltCtx:s}=e,{allowMultiple:u,selMin:c,selMax:l}=t,{isInputEnabled:f,isInputCounterIncrementEnabled:p}=sw(),y=Ie(K=>K.refreshForm),h=Ie(K=>K.currency),{watch:b,getValues:_,setValue:m,register:d,unregister:E}=hr(),g=b(`selected.${a}.${i}`),{selected:v={}}=_(),O=Number(g||0),A=c==="1"&&l==="1";ow(e,A,r);const S=!A,T=Is(n),P=PE(u),N=T&&O>0||O>(A?1:0),M=T&&O<Number(n?.attrs?.qtyMax??0)||p(e,v)&&(f(e)||O),U=Number(v?.[a]?.[i]||0)>0,F=T||f(e)||O,D=`${A?"radio":"selected"}.${a}.${i}`,$=d(D,{onChange:K=>{Q(K)}}),B=()=>{if(m(`selected.${a}.${i}`,`${O+1}`),Is(n)){const{product:G,value:ne}=dl(n,i,O+1);m(`selected.${G?.selCtx}.${G?.id}`,ne),(ne==="0"||ne===!1)&&en(m,_,G,!1,E,r)}const ee=Object.keys(v)?.map(G=>({key:G,subProductId:Jn(e,G)?.id}))?.filter(G=>!!G.subProductId);O===0&&ee?.forEach(G=>{m(`selected.${G.key}.${G.subProductId}`,`${O+1}`)})},k=()=>{const K=O-1;if(m(`selected.${a}.${i}`,`${K}`),T){const{product:G,value:ne}=dl(n,i,K);m(`selected.${G?.selCtx}.${G?.id}`,ne),ne==="1"&&en(m,_,G,!0,E,r)}const ee=Object.keys(v)?.map(G=>({key:G,subProductId:Jn(e,G)?.id}))?.filter(G=>!!G.subProductId);if(K===0&&ee?.forEach(G=>{m(`selected.${G.key}.${G.subProductId}`,`${K}`)}),S&&K===0){m(`selected.${a}.${i}`,!1),Object.keys(o)?.forEach(ne=>{const te=`filterWithCnt.${s}.${ne}.${o[ne]}`,ce=_(te)||0;ce<2?E(te):m(te,ce-1)});const G=ne=>{Array.isArray(ne)&&ne.map(te=>{const{selCtx:ce}=te;_(`selected.${ce}`)&&Fs(ce,_,m),G(te.items)})};if(G(e.items),r&&r<2&&!_t(o)){const ne=`filterWithCnt.${s}`,te=`filterWithCnt.${s}.${a}`,ce=`filter.${s}`;Object.keys(o)?.forEach(ue=>{const re=_(`${te}.${ue}`)||0;if(re)if(re>1)m(`${te}.${ue}`,re-1);else{E(`${te}.${ue}`);const le=_(ne)||{},_e=Object.keys(le)?.filter(de=>de!==a);if(!_e)E(`${ce}.${ue}`);else{const de=_e?.find(ae=>!!le?.[`${ae}`]?.[`${ue}`]);if(!de)E(`${ce}.${ue}`);else{const ae=le?.[`${de}`]?.[`${ue}`]?.value;m(`${ce}.${ue}`,ae)}}}})}}},Q=K=>{const{target:{checked:ee,name:G,defaultValue:ne}}=K;if(T){const{clickedProductValue:te,secondProductValue:ce,secondProduct:ue}=jE(n,i,ee,v);console.log("handleOnInputChange clickedProductValue",te,ce),m(`selected.${e?.selCtx}.${e?.id}`,te),m(`selected.${ue?.selCtx}.${ue?.id}`,ce),en(m,_,e,ee,E,r),en(m,_,ue,ce!==!1,E,r);return}if(en(m,_,e,ee,E,r),A){const te=n?.items?.filter(ue=>ue.id!==e.id);for(const ue of Object.keys(v||{}))te?.some(le=>!!Jn(le,ue))&&ue&&m(`selected.${ue}`,!1);const ce="selected."+G.replace("radio.","").split(".")[0];m(ce,{[ne]:"1"}),y()}};return{registerProps:$,isRadio:A,isCheckbox:S,isCounter:P,isDecrementEnabled:N,isIncrementEnabled:M,isChecked:U,isCheckboxEnabled:F,handleCounterIncrementQty:B,handleCounterDecrementQty:k,counterValue:O,handleOnInputChange:Q,inputId:`${a}.${i}`,radioInputValue:i,currency:h}}const cw=e=>{const{product:t,parentAttrs:r,nestedLvl:n,parentProduct:i,rootProduct:a}=e,{registerProps:o,inputId:s,radioInputValue:u,isRadio:c,isCheckbox:l,isCounter:f,isDecrementEnabled:p,isIncrementEnabled:y,isChecked:h,isCheckboxEnabled:b,counterValue:_,handleCounterIncrementQty:m,handleCounterDecrementQty:d,currency:E}=uw(t,r,n,i),{MenuProductUI:g}=ji(),v={product:t,nestedLvl:n,registerProps:o,inputId:s,radioInputValue:u,isRadio:c,isCheckbox:l,isCounter:f,isDecrementEnabled:p,isIncrementEnabled:y,isChecked:h,isCheckboxEnabled:b,counterValue:_,handleCounterIncrementQty:m,handleCounterDecrementQty:d,currency:E,parentProduct:i},O=I.jsx(mu,{productItems:t.items,parentProduct:t,nestedLvl:n+1,rootProduct:a});return g?I.jsx(g,{...v,children:O}):I.jsx(lw,{...v,children:O})},lw=e=>{const{product:t,nestedLvl:r,registerProps:n,inputId:i,radioInputValue:a,isRadio:o,isCheckbox:s,isCounter:u,isDecrementEnabled:c,isIncrementEnabled:l,isChecked:f,isCheckboxEnabled:p,counterValue:y,handleCounterIncrementQty:h,handleCounterDecrementQty:b,children:_,parentProduct:m}=e,d=I.jsx(tg,{value:y,add:h,subtract:b,disabledSubtract:!c,disabledAdd:!l}),E=()=>o?I.jsx(aw,{product:t,inputId:i,inputValue:a,registerProps:n,isChecked:f,children:I.jsx(I.Fragment,{children:u&&d})}):s?I.jsx(iw,{product:t,inputId:i,registerProps:n,isDisabled:!p,parentProduct:m,children:I.jsx(I.Fragment,{children:u&&d})}):null,g=!_t(t.items)&&y,v=zu.useTransition(g,{from:{opacity:0,transform:"translateY(-10px)"},enter:{opacity:1,transform:"translateY(0)"}});return I.jsxs("div",{children:[E(),g?v((O,A)=>A&&I.jsx(zu.animated.div,{className:`border-l-2 border-gray-300 ${r>=1&&"ml-4 pl-4"}`,style:O,children:_},r+1)):null]})};function fw(){return{isMenuProductToShow:r=>r.kind===Ot.PRODUCT&&fl(r),isMenuOptionsToShow:r=>xn(r.kind)&&fl(r)}}function mu(e){const{productItems:t,nestedLvl:r=1,parentProduct:n,rootProduct:i,showOutsideAvailabilitySlotItems:a}=e,{attrs:o={},selCtx:s,kind:u}=n,{isMenuProductToShow:c,isMenuOptionsToShow:l}=fw(),{MenuItemsUI:f}=ji(),y={productItems:t,parentProduct:n,renderMenuItem:h=>a!==!0&&h?.outsideAvailabilitySlot===!0||xn(h.kind)&&!h?.items?.find(b=>b?.attrs?.hidden!==!0&&b?._?.hidden!=="true")?I.jsx(I.Fragment,{}):l(h)?I.jsx(nw,{optionsItem:h,parentSelCtx:s,parentKind:u,nestedLvl:r,rootProduct:i}):c(h)?I.jsx(cw,{product:h,parentAttrs:o,parentProduct:n,nestedLvl:r,rootProduct:i}):I.jsx(I.Fragment,{}),rootProduct:i};return f?I.jsx(f,{...y}):I.jsx(dw,{...y})}function dw(e){const{productItems:t,parentProduct:r,renderMenuItem:n}=e,i=r.kind!==Ot.PRODUCT,a=99,o=3,[s,u]=w.useState(i?o:a),{t:c}=gu(),l=()=>{u(a)},f=()=>{u(o)};return I.jsx(I.Fragment,{children:t.map((p,y)=>{if(y<s)return I.jsxs("div",{children:[n(p),s===a&&i&&t.length===y+1&&Ll(c("OS.ProductConfigurator.ShowLess"),f,!1)]},`${r.id}--${p.id}--${y}`);if(y===s)return Ll(c("OS.ProductConfigurator.ShowMore"),l,!0)})})}const Ll=(e,t,r)=>I.jsx("div",{className:"flex justify-center w-full",children:I.jsxs("button",{className:"flex px-2 text-lg font-semibold text-black",onClick:t,children:[e,I.jsxs("svg",{className:`-mr-2 size-7 ${!r&&"rotate-180"}`,width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",I.jsx("polyline",{points:"7 7 12 12 17 7"})," ",I.jsx("polyline",{points:"7 13 12 18 17 13"})]})]})},`${e}`),rg=()=>{const{watch:e}=hr(),t=e("selected"),r=e("filter"),n=e("filterWithCnt"),i=Ie(a=>a.validationMap);return console.log({selected:t,validationMap:i,filter:r,filterWithCnt:n}),I.jsxs("div",{className:"flex flex-col items-center py-4",children:[I.jsx("h2",{className:"mb-4 text-2xl font-bold tracking-wide",children:"Selected State"}),Object.keys(t).map(a=>I.jsx("div",{children:Object.values(t[a]).filter(o=>o).length>0&&I.jsxs(I.Fragment,{children:[I.jsxs("p",{className:"text-lg font-semibold",children:[a,":"]}),Object.keys(t[a]).map(o=>I.jsx(w.Fragment,{children:t[a][o]&&I.jsxs("p",{children:[o,":",t[a][o].toString()]})},o))]})},a))]})};function Dl(e){const{finalPrice:t,isBackIcon:r=!0,handleGoBack:n,displayPriceFrom:i=!1,productQuantity:a,increaseProductQuantity:o,decreaseProductQuantity:s,handleOnSubmit:u}=e,{t:c}=gu();return I.jsxs("div",{className:"flex items-center justify-around w-full h-16 px-4",children:[r&&I.jsxs("button",{className:"inline-flex items-center px-2 py-1 font-bold text-red-600 border-2 border-red-600 border-solid rounded hover:bg-red-200",onClick:n,children:[I.jsxs("svg",{className:"size-5 text-red-600",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),I.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),I.jsx("line",{x1:"5",y1:"12",x2:"11",y2:"18"}),I.jsx("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]}),I.jsx("span",{className:"uppercase",children:`${c("OS.ProductConfigurator.Back")}`})]}),I.jsx("div",{className:"px-3",children:I.jsx(tg,{value:a,add:o,subtract:s,disabledSubtract:a===1,size:"lg"})}),I.jsxs("button",{type:"submit",className:"flex items-center justify-center w-2/4 px-2 py-1 font-bold text-white bg-green-600 border-2 border-green-600 border-solid rounded hover:bg-green-800 sm:w-3/5",style:{opacity:`${i?"0.4":"1"}`},disabled:i,onClick:u,children:[I.jsxs("svg",{className:"size-5 mr-2 text-white",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[I.jsx("circle",{cx:"9",cy:"21",r:"1"})," ",I.jsx("circle",{cx:"20",cy:"21",r:"1"}),I.jsx("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),i?I.jsx("span",{children:`${c("OS.ProductConfigurator.Selected.Message.From")} ${t}`}):I.jsx("span",{className:"uppercase",children:`${c("OS.ProductConfigurator.Add")} ${t}`})]})]})}const qn=640,ng=e=>{const{isModal:t=!1}=e,[r,n]=w.useState(window.innerWidth),[i,a]=w.useState(window.innerHeight),[o,s]=w.useState(window.innerWidth<=qn),[u,c]=w.useState(window.innerWidth>qn&&!t);function l(){n(window.innerWidth),a(window.innerHeight)}return w.useEffect(()=>(window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}),[]),w.useEffect(()=>{c(window.innerWidth>qn&&!t),s(window.innerWidth<=qn)},[r,e,t]),{isSm:u,isMobile:o,width:r,windowHeight:i}};function ig(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ig(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function tn(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ig(e))&&(n&&(n+=" "),n+=t);return n}var pw=Object.defineProperty,hw=(e,t,r)=>t in e?pw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ea=(e,t,r)=>(hw(e,typeof t!="symbol"?t+"":t,r),r);let gw=class{constructor(){Ea(this,"current",this.detect()),Ea(this,"handoffState","pending"),Ea(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Dt=new gw,dt=(e,t)=>{Dt.isServer?w.useEffect(e,t):w.useLayoutEffect(e,t)};function Ft(e){let t=w.useRef(e);return dt(()=>{t.current=e},[e]),t}let Pe=function(e){let t=Ft(e);return w.useCallback((...r)=>t.current(...r),[t])};function Ii(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function yr(){let e=[],t={addEventListener(r,n,i,a){return r.addEventListener(n,i,a),t.add(()=>r.removeEventListener(n,i,a))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Ii(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,i){let a=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:i}),this.add(()=>{Object.assign(r.style,{[n]:a})})},group(r){let n=yr();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let i of e.splice(n,1))i()}},dispose(){for(let r of e.splice(0))r()}};return t}function vu(){let[e]=w.useState(yr);return w.useEffect(()=>()=>e.dispose(),[e]),e}function mw(){let e=typeof document>"u";return"useSyncExternalStore"in Yt?(t=>t.useSyncExternalStore)(Yt)(()=>()=>{},()=>!1,()=>!e):!1}function Nr(){let e=mw(),[t,r]=Yt.useState(Dt.isHandoffComplete);return t&&Dt.isHandoffComplete===!1&&r(!1),Yt.useEffect(()=>{t!==!0&&r(!0)},[t]),Yt.useEffect(()=>Dt.handoff(),[]),e?!1:t}var Fl;let Lr=(Fl=w.useId)!=null?Fl:function(){let e=Nr(),[t,r]=w.useState(e?()=>Dt.nextId():null);return dt(()=>{t===null&&r(Dt.nextId())},[t]),t!=null?""+t:void 0};function He(e,t,...r){if(e in t){let i=t[e];return typeof i=="function"?i(...r):i}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,He),n}function ag(e){return Dt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let $s=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var ir=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(ir||{}),og=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(og||{}),vw=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(vw||{});function yw(e=document.body){return e==null?[]:Array.from(e.querySelectorAll($s)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var sg=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(sg||{});function bw(e,t=0){var r;return e===((r=ag(e))==null?void 0:r.body)?!1:He(t,{0(){return e.matches($s)},1(){let n=e;for(;n!==null;){if(n.matches($s))return!0;n=n.parentElement}return!1}})}var _w=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(_w||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ur(e){e?.focus({preventScroll:!0})}let Ow=["textarea","input"].join(",");function Ew(e){var t,r;return(r=(t=e?.matches)==null?void 0:t.call(e,Ow))!=null?r:!1}function Sw(e,t=r=>r){return e.slice().sort((r,n)=>{let i=t(r),a=t(n);if(i===null||a===null)return 0;let o=i.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Zn(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?r?Sw(e):e:yw(e);i.length>0&&o.length>1&&(o=o.filter(y=>!i.includes(y))),n=n??a.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(n))-1;if(t&4)return Math.max(0,o.indexOf(n))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},l=0,f=o.length,p;do{if(l>=f||l+f<=0)return 0;let y=u+l;if(t&16)y=(y+f)%f;else{if(y<0)return 3;if(y>=f)return 1}p=o[y],p?.focus(c),l+=s}while(p!==a.activeElement);return t&6&&Ew(p)&&p.select(),2}function ug(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ww(){return/Android/gi.test(window.navigator.userAgent)}function Aw(){return ug()||ww()}function Bn(e,t,r){let n=Ft(t);w.useEffect(()=>{function i(a){n.current(a)}return document.addEventListener(e,i,r),()=>document.removeEventListener(e,i,r)},[e,r])}function cg(e,t,r){let n=Ft(t);w.useEffect(()=>{function i(a){n.current(a)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}function xw(e,t,r=!0){let n=w.useRef(!1);w.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function i(o,s){if(!n.current||o.defaultPrevented)return;let u=s(o);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let c=(function l(f){return typeof f=="function"?l(f()):Array.isArray(f)||f instanceof Set?f:[f]})(e);for(let l of c){if(l===null)continue;let f=l instanceof HTMLElement?l:l.current;if(f!=null&&f.contains(u)||o.composed&&o.composedPath().includes(f))return}return!bw(u,sg.Loose)&&u.tabIndex!==-1&&o.preventDefault(),t(o,u)}let a=w.useRef(null);Bn("pointerdown",o=>{var s,u;n.current&&(a.current=((u=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:u[0])||o.target)},!0),Bn("mousedown",o=>{var s,u;n.current&&(a.current=((u=(s=o.composedPath)==null?void 0:s.call(o))==null?void 0:u[0])||o.target)},!0),Bn("click",o=>{Aw()||a.current&&(i(o,()=>a.current),a.current=null)},!0),Bn("touchend",o=>i(o,()=>o.target instanceof HTMLElement?o.target:null),!0),cg("blur",o=>i(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Tn(...e){return w.useMemo(()=>ag(...e),[...e])}let lg=Symbol();function Tw(e,t=!0){return Object.assign(e,{[lg]:t})}function Et(...e){let t=w.useRef(e);w.useEffect(()=>{t.current=e},[e]);let r=Pe(n=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(n):i.current=n)});return e.every(n=>n==null||n?.[lg])?void 0:r}function yu(e,t){let r=w.useRef([]),n=Pe(e);w.useEffect(()=>{let i=[...r.current];for(let[a,o]of t.entries())if(r.current[a]!==o){let s=n(t,i);return r.current=t,s}},[n,...t])}function fi(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var di=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(di||{}),zt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(zt||{});function gt({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:i,visible:a=!0,name:o,mergeRefs:s}){s=s??Rw;let u=fg(t,e);if(a)return Hn(u,r,n,o,s);let c=i??0;if(c&2){let{static:l=!1,...f}=u;if(l)return Hn(f,r,n,o,s)}if(c&1){let{unmount:l=!0,...f}=u;return He(l?0:1,{0(){return null},1(){return Hn({...f,hidden:!0,style:{display:"none"}},r,n,o,s)}})}return Hn(u,r,n,o,s)}function Hn(e,t={},r,n,i){let{as:a=r,children:o,refName:s="ref",...u}=Sa(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},l=typeof o=="function"?o(t):o;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t));let f={};if(t){let p=!1,y=[];for(let[h,b]of Object.entries(t))typeof b=="boolean"&&(p=!0),b===!0&&y.push(h);p&&(f["data-headlessui-state"]=y.join(" "))}if(a===w.Fragment&&Object.keys($l(u)).length>0){if(!w.isValidElement(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(b=>` - ${b}`).join(`
|
|
17
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(`
|
|
16
18
|
`)].join(`
|
|
17
|
-
`));return S.cloneElement(l,Object.assign({},Ls(l.props,Ga(fn(s,["ref"]))),f,u,Kp(l.ref,u.ref)))}return S.createElement(i,Object.assign({},fn(s,["ref"]),i!==S.Fragment&&u,i!==S.Fragment&&f),l)}function Kp(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}}function Ls(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...a){let o=r[n];for(let s of o){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;s(i,...a)}}});return t}function Pe(e){var t;return Object.assign(S.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Ga(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function fn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}function Yp(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&Qp(r)?!1:n}function Qp(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let Jp="div";var wr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(wr||{});let Nn=Pe(function(e,t){let{features:r=1,...n}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Ne({ourProps:i,theirProps:n,slot:{},defaultTag:Jp,name:"Hidden"})}),ti=S.createContext(null);ti.displayName="OpenClosedContext";var ft=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ft||{});function ri(){return S.useContext(ti)}function Zp({value:e,children:t}){return N.default.createElement(ti.Provider,{value:e},t)}var Fs=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Fs||{});function ks(e,t){let r=S.useRef([]),n=pe(e);S.useEffect(()=>{let i=[...r.current];for(let[a,o]of t.entries())if(r.current[a]!==o){let s=n(t,i);return r.current=t,s}},[n,...t])}function Xp(e,t,r){let n=Ke(t);S.useEffect(()=>{function i(a){n.current(a)}return window.addEventListener(e,i,r),()=>window.removeEventListener(e,i,r)},[e,r])}var Dt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Dt||{});function em(){let e=S.useRef(0);return Xp("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Mr(){let e=S.useRef(!1);return Qe(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jr(...e){return S.useMemo(()=>ei(...e),[...e])}function ni(e,t,r,n){let i=Ke(r);S.useEffect(()=>{e=e!=null?e:window;function a(o){i.current(o)}return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a,n)},[e,t,n])}let tm="div";var Ms=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Ms||{});let Mt=Object.assign(Pe(function(e,t){let r=S.useRef(null),n=ke(r,t),{initialFocus:i,containers:a,features:o=30,...s}=e;xt()||(o=1);let u=jr(r);rm({ownerDocument:u},Boolean(o&16));let l=nm({ownerDocument:u,container:r,initialFocus:i},Boolean(o&2));im({ownerDocument:u,container:r,containers:a,previousActiveElement:l},Boolean(o&8));let f=em(),c=pe(b=>{let y=r.current;!y||(p=>p())(()=>{de(f.current,{[Dt.Forwards]:()=>sr(y,ot.First,{skipElements:[b.relatedTarget]}),[Dt.Backwards]:()=>sr(y,ot.Last,{skipElements:[b.relatedTarget]})})})}),g=Xn(),d=S.useRef(!1),h={ref:n,onKeyDown(b){b.key=="Tab"&&(d.current=!0,g.requestAnimationFrame(()=>{d.current=!1}))},onBlur(b){let y=new Set(a==null?void 0:a.current);y.add(r);let p=b.relatedTarget;!p||p.dataset.headlessuiFocusGuard!=="true"&&(js(y,p)||(d.current?sr(r.current,de(f.current,{[Dt.Forwards]:()=>ot.Next,[Dt.Backwards]:()=>ot.Previous})|ot.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&ut(b.target)))}};return N.default.createElement(N.default.Fragment,null,Boolean(o&4)&&N.default.createElement(Nn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:wr.Focusable}),Ne({ourProps:h,theirProps:s,defaultTag:tm,name:"FocusTrap"}),Boolean(o&4)&&N.default.createElement(Nn,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:c,features:wr.Focusable}))}),{features:Ms});function rm({ownerDocument:e},t){let r=S.useRef(null);ni(e==null?void 0:e.defaultView,"focusout",i=>{!t||r.current||(r.current=i.target)},!0),ks(()=>{t||((e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ut(r.current),r.current=null)},[t]);let n=S.useRef(!1);S.useEffect(()=>(n.current=!1,()=>{n.current=!0,kr(()=>{!n.current||(ut(r.current),r.current=null)})}),[])}function nm({ownerDocument:e,container:t,initialFocus:r},n){let i=S.useRef(null),a=Mr();return ks(()=>{if(!n)return;let o=t.current;!o||kr(()=>{if(!a.current)return;let s=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===s){i.current=s;return}}else if(o.contains(s)){i.current=s;return}r!=null&&r.current?ut(r.current):sr(o,ot.First)===$s.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[n]),i}function im({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){let a=Mr();ni(e==null?void 0:e.defaultView,"focus",o=>{if(!i||!a.current)return;let s=new Set(r==null?void 0:r.current);s.add(t);let u=n.current;if(!u)return;let l=o.target;l&&l instanceof HTMLElement?js(s,l)?(n.current=l,ut(l)):(o.preventDefault(),o.stopPropagation(),ut(u)):ut(n.current)},!0)}function js(e,t){var r;for(let n of e)if((r=n.current)!=null&&r.contains(t))return!0;return!1}let yt=new Set,Xe=new Map;function za(e){e.setAttribute("aria-hidden","true"),e.inert=!0}function qa(e){let t=Xe.get(e);!t||(t["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",t["aria-hidden"]),e.inert=t.inert)}function am(e,t=!0){Qe(()=>{if(!t||!e.current)return;let r=e.current,n=ei(r);if(n){yt.add(r);for(let i of Xe.keys())i.contains(r)&&(qa(i),Xe.delete(i));return n.querySelectorAll("body > *").forEach(i=>{if(i instanceof HTMLElement){for(let a of yt)if(i.contains(a))return;yt.size===1&&(Xe.set(i,{"aria-hidden":i.getAttribute("aria-hidden"),inert:i.inert}),za(i))}}),()=>{if(yt.delete(r),yt.size>0)n.querySelectorAll("body > *").forEach(i=>{if(i instanceof HTMLElement&&!Xe.has(i)){for(let a of yt)if(i.contains(a))return;Xe.set(i,{"aria-hidden":i.getAttribute("aria-hidden"),inert:i.inert}),za(i)}});else for(let i of Xe.keys())qa(i),Xe.delete(i)}}},[t])}let Ds=S.createContext(!1);function om(){return S.useContext(Ds)}function $n(e){return N.default.createElement(Ds.Provider,{value:e.force},e.children)}function sm(e){let t=om(),r=S.useContext(Us),n=jr(e),[i,a]=S.useState(()=>{if(!t&&r!==null||Fr)return null;let o=n==null?void 0:n.getElementById("headlessui-portal-root");if(o)return o;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return S.useEffect(()=>{i!==null&&(n!=null&&n.body.contains(i)||n==null||n.body.appendChild(i))},[i,n]),S.useEffect(()=>{t||r!==null&&a(r.current)},[r,a,t]),i}let um=S.Fragment,lm=Pe(function(e,t){let r=e,n=S.useRef(null),i=ke(qp(f=>{n.current=f}),t),a=jr(n),o=sm(n),[s]=S.useState(()=>{var f;return Fr?null:(f=a==null?void 0:a.createElement("div"))!=null?f:null}),u=xt(),l=S.useRef(!1);return Qe(()=>{if(l.current=!1,!(!o||!s))return o.contains(s)||(s.setAttribute("data-headlessui-portal",""),o.appendChild(s)),()=>{l.current=!0,kr(()=>{var f;!l.current||!o||!s||(o.removeChild(s),o.childNodes.length<=0&&((f=o.parentElement)==null||f.removeChild(o)))})}},[o,s]),u?!o||!s?null:Js.createPortal(Ne({ourProps:{ref:i},theirProps:r,defaultTag:um,name:"Portal"}),s):null}),cm=S.Fragment,Us=S.createContext(null),fm=Pe(function(e,t){let{target:r,...n}=e,i={ref:ke(t)};return N.default.createElement(Us.Provider,{value:r},Ne({ourProps:i,theirProps:n,defaultTag:cm,name:"Popover.Group"}))}),In=Object.assign(lm,{Group:fm}),Vs=S.createContext(null);function Bs(){let e=S.useContext(Vs);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Bs),t}return e}function dm(){let[e,t]=S.useState([]);return[e.length>0?e.join(" "):void 0,S.useMemo(()=>function(r){let n=pe(a=>(t(o=>[...o,a]),()=>t(o=>{let s=o.slice(),u=s.indexOf(a);return u!==-1&&s.splice(u,1),s}))),i=S.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return N.default.createElement(Vs.Provider,{value:i},r.children)},[t])]}let gm="p",hm=Pe(function(e,t){let r=_t(),{id:n=`headlessui-description-${r}`,...i}=e,a=Bs(),o=ke(t);Qe(()=>a.register(n),[n,a.register]);let s={ref:o,...a.props,id:n};return Ne({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:gm,name:a.name||"Description"})}),ii=S.createContext(()=>{});ii.displayName="StackContext";var Rn=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Rn||{});function pm(){return S.useContext(ii)}function mm({children:e,onUpdate:t,type:r,element:n,enabled:i}){let a=pm(),o=pe((...s)=>{t==null||t(...s),a(...s)});return Qe(()=>{let s=i===void 0||i===!0;return s&&o(0,r,n),()=>{s&&o(1,r,n)}},[o,r,n,i]),N.default.createElement(ii.Provider,{value:o},e)}function vm(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}var ym=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ym||{}),bm=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(bm||{});let Sm={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Er=S.createContext(null);Er.displayName="DialogContext";function Jt(e){let t=S.useContext(Er);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Jt),r}return t}function Om(e,t,r=()=>[document.body]){S.useEffect(()=>{var n;if(!t||!e)return;let i=Qt(),a=window.pageYOffset;function o(l,f,c){let g=l.style.getPropertyValue(f);return Object.assign(l.style,{[f]:c}),i.add(()=>{Object.assign(l.style,{[f]:g})})}let s=e.documentElement,u=((n=e.defaultView)!=null?n:window).innerWidth-s.clientWidth;if(o(s,"overflow","hidden"),u>0){let l=s.clientWidth-s.offsetWidth,f=u-l;o(s,"paddingRight",`${f}px`)}if(vm()){o(e.body,"marginTop",`-${a}px`),window.scrollTo(0,0);let l=null;i.addEventListener(e,"click",f=>{if(f.target instanceof HTMLElement)try{let c=f.target.closest("a");if(!c)return;let{hash:g}=new URL(c.href),d=e.querySelector(g);d&&!r().some(h=>h.contains(d))&&(l=d)}catch{}},!0),i.addEventListener(e,"touchmove",f=>{f.target instanceof HTMLElement&&!r().some(c=>c.contains(f.target))&&f.preventDefault()},{passive:!1}),i.add(()=>{window.scrollTo(0,window.pageYOffset+a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})}return i.dispose},[e,t])}function wm(e,t){return de(t.type,Sm,e,t)}let Em="div",Pm=Or.RenderStrategy|Or.Static,Am=Pe(function(e,t){let r=_t(),{id:n=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:o,__demoMode:s=!1,...u}=e,[l,f]=S.useState(0),c=ri();i===void 0&&c!==null&&(i=de(c,{[ft.Open]:!0,[ft.Closed]:!1}));let g=S.useRef(new Set),d=S.useRef(null),h=ke(d,t),b=S.useRef(null),y=jr(d),p=e.hasOwnProperty("open")||c!==null,m=e.hasOwnProperty("onClose");if(!p&&!m)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!p)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!m)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof a!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let O=i?0:1,[w,E]=S.useReducer(wm,{titleId:null,descriptionId:null,panelRef:S.createRef()}),x=pe(()=>a(!1)),T=pe(H=>E({type:0,id:H})),I=xt()?s?!1:O===0:!1,k=l>1,D=S.useContext(Er)!==null,F=k?"parent":"leaf";am(d,k?I:!1);let j=pe(()=>{var H,ie;return[...Array.from((H=y==null?void 0:y.querySelectorAll("body > *, [data-headlessui-portal]"))!=null?H:[]).filter(G=>!(!(G instanceof HTMLElement)||G.contains(b.current)||w.panelRef.current&&G.contains(w.panelRef.current))),(ie=w.panelRef.current)!=null?ie:d.current]});zp(()=>j(),x,I&&!k),ni(y==null?void 0:y.defaultView,"keydown",H=>{H.defaultPrevented||H.key===Fs.Escape&&O===0&&(k||(H.preventDefault(),H.stopPropagation(),x()))}),Om(y,O===0&&!D,j),S.useEffect(()=>{if(O!==0||!d.current)return;let H=new IntersectionObserver(ie=>{for(let G of ie)G.boundingClientRect.x===0&&G.boundingClientRect.y===0&&G.boundingClientRect.width===0&&G.boundingClientRect.height===0&&x()});return H.observe(d.current),()=>H.disconnect()},[O,d,x]);let[U,B]=dm(),re=S.useMemo(()=>[{dialogState:O,close:x,setTitleId:T},w],[O,w,x,T]),K=S.useMemo(()=>({open:O===0}),[O]),ne={ref:h,id:n,role:"dialog","aria-modal":O===0?!0:void 0,"aria-labelledby":w.titleId,"aria-describedby":U};return N.default.createElement(mm,{type:"Dialog",enabled:O===0,element:d,onUpdate:pe((H,ie,G)=>{ie==="Dialog"&&de(H,{[Rn.Add](){g.current.add(G),f(ce=>ce+1)},[Rn.Remove](){g.current.add(G),f(ce=>ce-1)}})})},N.default.createElement($n,{force:!0},N.default.createElement(In,null,N.default.createElement(Er.Provider,{value:re},N.default.createElement(In.Group,{target:d},N.default.createElement($n,{force:!1},N.default.createElement(B,{slot:K,name:"Dialog.Description"},N.default.createElement(Mt,{initialFocus:o,containers:g,features:I?de(F,{parent:Mt.features.RestoreFocus,leaf:Mt.features.All&~Mt.features.FocusLock}):Mt.features.None},Ne({ourProps:ne,theirProps:u,slot:K,defaultTag:Em,features:Pm,visible:O===0,name:"Dialog"})))))))),N.default.createElement(Nn,{features:wr.Hidden,ref:b}))}),Cm="div",xm=Pe(function(e,t){let r=_t(),{id:n=`headlessui-dialog-overlay-${r}`,...i}=e,[{dialogState:a,close:o}]=Jt("Dialog.Overlay"),s=ke(t),u=pe(f=>{if(f.target===f.currentTarget){if(Yp(f.currentTarget))return f.preventDefault();f.preventDefault(),f.stopPropagation(),o()}}),l=S.useMemo(()=>({open:a===0}),[a]);return Ne({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:u},theirProps:i,slot:l,defaultTag:Cm,name:"Dialog.Overlay"})}),_m="div",Tm=Pe(function(e,t){let r=_t(),{id:n=`headlessui-dialog-backdrop-${r}`,...i}=e,[{dialogState:a},o]=Jt("Dialog.Backdrop"),s=ke(t);S.useEffect(()=>{if(o.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[o.panelRef]);let u=S.useMemo(()=>({open:a===0}),[a]);return N.default.createElement($n,{force:!0},N.default.createElement(In,null,Ne({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:_m,name:"Dialog.Backdrop"})))}),Nm="div",$m=Pe(function(e,t){let r=_t(),{id:n=`headlessui-dialog-panel-${r}`,...i}=e,[{dialogState:a},o]=Jt("Dialog.Panel"),s=ke(t,o.panelRef),u=S.useMemo(()=>({open:a===0}),[a]),l=pe(f=>{f.stopPropagation()});return Ne({ourProps:{ref:s,id:n,onClick:l},theirProps:i,slot:u,defaultTag:Nm,name:"Dialog.Panel"})}),Im="h2",Rm=Pe(function(e,t){let r=_t(),{id:n=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:a,setTitleId:o}]=Jt("Dialog.Title"),s=ke(t);S.useEffect(()=>(o(n),()=>o(null)),[n,o]);let u=S.useMemo(()=>({open:a===0}),[a]);return Ne({ourProps:{ref:s,id:n},theirProps:i,slot:u,defaultTag:Im,name:"Dialog.Title"})}),Ka=Object.assign(Am,{Backdrop:Tm,Panel:$m,Overlay:xm,Title:Rm,Description:hm});function Lm(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function dn(e,...t){e&&t.length>0&&e.classList.add(...t)}function gn(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Fm(e,t){let r=Qt();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[a,o]=[n,i].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(l=>l.includes("ms")?parseFloat(l):parseFloat(l)*1e3).sort((l,f)=>f-l);return u});if(a+o!==0){let s=r.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return r.add(()=>t()),r.dispose}function km(e,t,r,n){let i=r?"enter":"leave",a=Qt(),o=n!==void 0?Lm(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=de(i,{enter:()=>t.enter,leave:()=>t.leave}),u=de(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),l=de(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return gn(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),dn(e,...s,...l),a.nextFrame(()=>{gn(e,...l),dn(e,...u),Fm(e,()=>(gn(e,...s),dn(e,...t.entered),o()))}),a.dispose}function Mm({container:e,direction:t,classes:r,onStart:n,onStop:i}){let a=Mr(),o=Xn(),s=Ke(t);Qe(()=>{let u=Qt();o.add(u.dispose);let l=e.current;if(!!l&&s.current!=="idle"&&!!a.current)return u.dispose(),n.current(s.current),u.add(km(l,r.current,s.current==="enter",()=>{u.dispose(),i.current(s.current)})),u.dispose},[t])}function jm(...e){return e.filter(Boolean).join(" ")}function it(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let Dr=S.createContext(null);Dr.displayName="TransitionContext";var Dm=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Dm||{});function Um(){let e=S.useContext(Dr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Vm(){let e=S.useContext(Ur);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Ur=S.createContext(null);Ur.displayName="NestingContext";function Vr(e){return"children"in e?Vr(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Hs(e,t){let r=Ke(e),n=S.useRef([]),i=Mr(),a=Xn(),o=pe((d,h=ze.Hidden)=>{let b=n.current.findIndex(({el:y})=>y===d);b!==-1&&(de(h,{[ze.Unmount](){n.current.splice(b,1)},[ze.Hidden](){n.current[b].state="hidden"}}),a.microTask(()=>{var y;!Vr(n)&&i.current&&((y=r.current)==null||y.call(r))}))}),s=pe(d=>{let h=n.current.find(({el:b})=>b===d);return h?h.state!=="visible"&&(h.state="visible"):n.current.push({el:d,state:"visible"}),()=>o(d,ze.Unmount)}),u=S.useRef([]),l=S.useRef(Promise.resolve()),f=S.useRef({enter:[],leave:[],idle:[]}),c=pe((d,h,b)=>{u.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([y])=>y!==d)),t==null||t.chains.current[h].push([d,new Promise(y=>{u.current.push(y)})]),t==null||t.chains.current[h].push([d,new Promise(y=>{Promise.all(f.current[h].map(([p,m])=>m)).then(()=>y())})]),h==="enter"?l.current=l.current.then(()=>t==null?void 0:t.wait.current).then(()=>b(h)):b(h)}),g=pe((d,h,b)=>{Promise.all(f.current[h].splice(0).map(([y,p])=>p)).then(()=>{var y;(y=u.current.shift())==null||y()}).then(()=>b(h))});return S.useMemo(()=>({children:n,register:s,unregister:o,onStart:c,onStop:g,wait:l,chains:f}),[s,o,n,c,g,f,l])}function Bm(){}let Hm=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ya(e){var t;let r={};for(let n of Hm)r[n]=(t=e[n])!=null?t:Bm;return r}function Wm(e){let t=S.useRef(Ya(e));return S.useEffect(()=>{t.current=Ya(e)},[e]),t}let Gm="div",Ws=Or.RenderStrategy,Gs=Pe(function(e,t){let{beforeEnter:r,afterEnter:n,beforeLeave:i,afterLeave:a,enter:o,enterFrom:s,enterTo:u,entered:l,leave:f,leaveFrom:c,leaveTo:g,...d}=e,h=S.useRef(null),b=ke(h,t),y=d.unmount?ze.Unmount:ze.Hidden,{show:p,appear:m,initial:O}=Um(),[w,E]=S.useState(p?"visible":"hidden"),x=Vm(),{register:T,unregister:I}=x,k=S.useRef(null);S.useEffect(()=>T(h),[T,h]),S.useEffect(()=>{if(y===ze.Hidden&&!!h.current){if(p&&w!=="visible"){E("visible");return}return de(w,{hidden:()=>I(h),visible:()=>T(h)})}},[w,h,T,I,p,y]);let D=Ke({enter:it(o),enterFrom:it(s),enterTo:it(u),entered:it(l),leave:it(f),leaveFrom:it(c),leaveTo:it(g)}),F=Wm({beforeEnter:r,afterEnter:n,beforeLeave:i,afterLeave:a}),j=xt();S.useEffect(()=>{if(j&&w==="visible"&&h.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[h,w,j]);let U=O&&!m,B=(()=>!j||U||k.current===p?"idle":p?"enter":"leave")(),re=pe(G=>de(G,{enter:()=>F.current.beforeEnter(),leave:()=>F.current.beforeLeave(),idle:()=>{}})),K=pe(G=>de(G,{enter:()=>F.current.afterEnter(),leave:()=>F.current.afterLeave(),idle:()=>{}})),ne=Hs(()=>{E("hidden"),I(h)},x);Mm({container:h,classes:D,direction:B,onStart:Ke(G=>{ne.onStart(h,G,re)}),onStop:Ke(G=>{ne.onStop(h,G,K),G==="leave"&&!Vr(ne)&&(E("hidden"),I(h))})}),S.useEffect(()=>{!U||(y===ze.Hidden?k.current=null:k.current=p)},[p,U,w]);let H=d,ie={ref:b};return m&&p&&(typeof window=="undefined"||typeof document=="undefined")&&(H={...H,className:jm(d.className,...D.current.enter,...D.current.enterFrom)}),N.default.createElement(Ur.Provider,{value:ne},N.default.createElement(Zp,{value:de(w,{visible:ft.Open,hidden:ft.Closed})},Ne({ourProps:ie,theirProps:H,defaultTag:Gm,features:Ws,visible:w==="visible",name:"Transition.Child"})))}),Ln=Pe(function(e,t){let{show:r,appear:n=!1,unmount:i,...a}=e,o=S.useRef(null),s=ke(o,t);xt();let u=ri();if(r===void 0&&u!==null&&(r=de(u,{[ft.Open]:!0,[ft.Closed]:!1})),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,f]=S.useState(r?"visible":"hidden"),c=Hs(()=>{f("hidden")}),[g,d]=S.useState(!0),h=S.useRef([r]);Qe(()=>{g!==!1&&h.current[h.current.length-1]!==r&&(h.current.push(r),d(!1))},[h,r]);let b=S.useMemo(()=>({show:r,appear:n,initial:g}),[r,n,g]);S.useEffect(()=>{if(r)f("visible");else if(!Vr(c))f("hidden");else{let p=o.current;if(!p)return;let m=p.getBoundingClientRect();m.x===0&&m.y===0&&m.width===0&&m.height===0&&f("hidden")}},[r,c]);let y={unmount:i};return N.default.createElement(Ur.Provider,{value:c},N.default.createElement(Dr.Provider,{value:b},Ne({ourProps:{...y,as:S.Fragment,children:N.default.createElement(Gs,{ref:s,...y,...a})},theirProps:{},defaultTag:S.Fragment,features:Ws,visible:l==="visible",name:"Transition"})))}),zm=Pe(function(e,t){let r=S.useContext(Dr)!==null,n=ri()!==null;return N.default.createElement(N.default.Fragment,null,!r&&n?N.default.createElement(Ln,{ref:t,...e}):N.default.createElement(Gs,{ref:t,...e}))}),hn=Object.assign(Ln,{Child:zm,Root:Ln});function qm(e){const{children:t,isOpen:r,handleClose:n}=e,{isMobile:i}=Ts({isModal:!0});return A(Fe,{children:A(hn,{appear:!0,show:r,as:S.Fragment,children:A(Ka,{as:"div",className:"fixed inset-0 z-10 overflow-y-auto",style:{backgroundColor:"rgba(0,0,0,.75)"},onClose:n,children:V("div",{className:"min-h-screen text-center sm:px-4",children:[A(hn.Child,{as:S.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:A(Ka.Overlay,{className:"fixed inset-0"})}),A("span",{className:"inline-block h-screen align-middle","aria-hidden":"true",children:"\u200B"}),A(hn.Child,{as:S.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:V("div",{id:"modal-content",className:"inline-block overflow-hidden sm:rounded-2xl align-middle transition-all bg-white sm:shadow-xl h-screen sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]",children:[A("div",{className:"sticky top-0 z-10 flex items-center w-full px-3 text-lg font-medium leading-6 text-gray-900 bg-white h-14 modal-header",children:A("div",{className:"",children:V("svg",{className:"size-8 text-black cursor-pointer",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",onClick:n,children:[A("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",A("line",{x1:"5",y1:"12",x2:"19",y2:"12"})," ",A("line",{x1:"5",y1:"12",x2:"11",y2:"18"})," ",A("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]})})}),A("div",{className:"w-full",style:{height:`${i?"calc(100% - 56px)":"auto"}`},children:t})]})})]})})})})}function Km(e){var B,re,K,ne,H,ie,G,ce,Me,se;const{product:t,isOpen:r,handleGoBack:n,showDebugState:i=!1,countedProductPrice:a,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:l,children:f}=e,{minPrice:c="0"}=t,[g,d]=S.useState("auto"),[h,b]=S.useState(0);S.useEffect(()=>{b(1);const ue=setTimeout(()=>{E||b(2)},250);return()=>{clearTimeout(ue)}},[]);const{displayPriceFrom:y,formattedEndPrice:p}=Hh(a,c,o),m=S.useRef(null),O=S.useRef(null),{isSm:w,isMobile:E,windowHeight:x}=Ts({isModal:!0}),T=V(Fe,{children:[V("div",{className:kt("px-4 w-full",w&&"sm:sticky sm:top-0 sm:w-2/5"),ref:m,children:[((B=t.details)==null?void 0:B.media)&&t.details.media[0].url&&A("img",{className:kt("mx-auto mt-2 mb-6 max-h-[250px]",w&&"max-h-[450px]"),alt:(K=(re=t.details)==null?void 0:re.literals)==null?void 0:K.name,src:(ne=t.details)==null?void 0:ne.media[0].url}),A("div",{className:kt(!i&&"hidden"),children:A(_s,{})})]}),V("div",{className:kt("w-full",w&&"sm:w-3/5"),ref:O,children:[V("div",{className:"items-center w-full p-4",children:[V("div",{className:"flex justify-between w-full mb-4 text-2xl font-semibold",children:[V("span",{className:"",children:[(ie=(H=t.details)==null?void 0:H.literals)==null?void 0:ie.name," "]}),A(Rr,{price:e.countedProductPrice,minPrice:c})]}),A("span",{className:"text-gray-600",children:(ce=(G=t.details)==null?void 0:G.literals)==null?void 0:ce.description})]}),V("div",{className:`items-center justify-center w-full px-4 product-configuration ${(t==null?void 0:t.items)&&"py-2 bg-gray-100"}`,children:[f,A("div",{className:"sm:h-[64px]"})]}),w&&A("div",{className:"-mt-5 mb-2 bg-gray-100",children:A(Ba,{finalPrice:p,isBackIcon:!1,handleGoBack:n,displayPriceFrom:y,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:l})})]})]}),I=(Me=m==null?void 0:m.current)==null?void 0:Me.clientHeight,k=(se=O==null?void 0:O.current)==null?void 0:se.clientHeight,D=Number(I)+Number(k);D>window.innerHeight*.8||isNaN(D)?g!=="80vh"&&d("80vh"):g!=="auto"&&d("auto");const F=`${x-64-56}px`,j=!w,U={"--mobile-submit-row-top":`${x-64-80}px`};return A(qm,{isOpen:Boolean(r),handleClose:n,children:V("div",{id:"product-configurator-view",className:"size-full",style:{overflow:"hidden",textAlign:"left"},children:[A("div",{className:kt("flex relative flex-col items-start w-full form-body stretch",!j&&"sm:flex-row-reverse sm:pb-0",!E&&"mobile-scrollbar"),style:{height:`${E?F:g}`,minHeight:"400px",overflowY:"scroll"},children:T}),j&&A("div",{className:`w-full h-16 bg-white sm:fixed sm:bottom-0 ${E?"submit-row-mobile":"submit-row"}`,style:U,children:A(Ba,{handleGoBack:n,finalPrice:p,isBackIcon:!1,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:l})})]})})}const ai=(e,t={},r,n,i=0)=>{var o,s;const a=n||{};return(i===0||((o=t[e.selCtx])==null?void 0:o[e.id]))&&((s=e==null?void 0:e.items)==null||s.forEach(u=>{var l,f,c,g,d,h,b,y,p,m,O,w,E,x;if(Kt(u.kind)&&(((l=u==null?void 0:u.attrs)==null?void 0:l.selMin)||((f=u.attrs)==null?void 0:f.selMax)||((c=u.attrs)==null?void 0:c.qtyMin)||((g=u.attrs)==null?void 0:g.qtyMax)||((d=u.attrs)==null?void 0:d.allowMultiple))){const[T,I]=gs(u.selCtx,t,u.items),k=$r(e,r);a[u.selCtx]={isSelCntAllowedToIncrement:T<Number(((h=u==null?void 0:u.attrs)==null?void 0:h.selMax)||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:I<Number(((b=u==null?void 0:u.attrs)==null?void 0:b.qtyMax)||Number.MAX_SAFE_INTEGER),nestedLvl:i,isPassedFiltering:k,isValid:br(T,Number(((y=u.attrs)==null?void 0:y.selMin)||0),Number(((p=u.attrs)==null?void 0:p.selMax)||Number.MAX_SAFE_INTEGER)+1)&&br(I,Number(((m=u.attrs)==null?void 0:m.qtyMin)||0),Number(((O=u.attrs)==null?void 0:O.qtyMax)||Number.MAX_SAFE_INTEGER)+1)&&(((w=u.attrs)==null?void 0:w.allowMultiple)===!0||I-T===0)}}(u==null?void 0:u.items)&&((E=u.items)==null?void 0:E.length)>0&&((x=u.items)==null||x.forEach(T=>{ai(T,t,r,a,i+1)}))})),a},zs=N.default.createContext(null);function Ym({rootProduct:e,children:t}){return A(zs.Provider,{value:{rootProduct:e},children:t})}function Qm(e){const t=S.useContext(zs),r=fr({name:"selected"}),n=fr({name:"filter"}),[i,a]=S.useState(void 0);if(!t)throw new Error("Missing ComponentsContext");return S.useEffect(()=>{console.log("useGroupsValidation validationMap2 change")},[i]),S.useEffect(()=>{const o=ai(e,r,n);Hg(o,i)||a(o)},[r,n]),{validationMap2:i}}const Jm=e=>{const{product:t,showOutsideAvailabilitySlotItems:r}=e,{MenuProductRootUI:n}=Lr(),{validationMap2:i}=Qm(t),a=Re(t.items)?A(Fe,{}):A(Zn,{productItems:t.items,parentProduct:t,rootProduct:t,showOutsideAvailabilitySlotItems:r});return n?A(n,{...e,validationMap:i||{},children:a}):A(Km,{...e,validationMap:i||{},children:a})};const qs=N.default.createContext(null);function Zm({rootProduct:e,children:t}){return A(qs.Provider,{value:{rootProduct:e},children:t})}function Xm(){const e=S.useContext(qs);if(!e)throw new Error("Missing ComponentsContext");return e}function ev(e){const{product:t,lang:r="en",handleAddToCart:n,handleGoBack:i,isOpen:a,handleClose:o,currency:s,showDebugState:u=!1,showOutsideAvailabilitySlotItems:l}=e,{price:f}=t,{encodedProduct:c,initSelected:g,initFilter:d,productQuantity:h,setIsOnSubmittedOnTrue:b,increaseProductQuantity:y,decreaseProductQuantity:p,setCurrency:m}=fh(t);S.useEffect(()=>{ve.changeLanguage(r)},[r]),S.useEffect(()=>{m(s)},[s]);const O=Po({defaultValues:{selected:g,filter:d}}),{getValues:w}=O,E=Number((parseFloat(f||"0")+Bn(w("selected"),c)).toFixed(2)),x=()=>{var D;b();const I=ai(t,w("selected"),w("filter"));if(console.log("onSubmit product-configurator",I),Object.keys(I).some(function(F){return I[F].isValid===!1}))console.warn("INVALID VALIDATION MAP product-configurator",I);else{console.log("selected",w("selected"));const F=Qg(ls(w("selected"))),j=w("filter");(D=Object.keys(F||{}))==null||D.forEach(U=>{const B=fs(U,t);B&&($r(B,j)||delete F[U])}),console.log("decodedCleanedSelected product-configurator: ",F),n({price:E,quantity:h,selected:F,filter:j})}},T=()=>x();return A(Fe,{children:A(Zm,{rootProduct:t,children:A(Cs.Provider,{value:e.components,children:A(so,{...O,children:V("form",{children:[u&&A("div",{className:"hidden",children:A(_s,{})}),A(Ym,{rootProduct:c,children:A(Jm,{product:c,productQuantity:h,isOpen:a,handleClose:o,handleGoBack:i,handleOnSubmit:T,countedProductPrice:E,countedProductTotalPrice:E*h,increaseProductQuantity:y,decreaseProductQuantity:p,currency:s,showOutsideAvailabilitySlotItems:l})})]})})})})})}exports.ContextType=Un;exports.MainView=Ao;exports.ProductConfigurator=ev;exports.ProductKinds=Vn;exports.ProductTypes=Co;exports.SelMinSelMaxStatus=xe;exports.getProductToChangeInForm=ps;exports.hookForm=zu;exports.selectProductsInForm=ms;exports.unselectProductsInForm=dh;exports.useMenuOptions=vs;exports.useProductData=Xm;exports.useStore=oe;exports.validateProductFilter=$r;
|
|
19
|
+
`));let p=l.props,y=typeof p?.className=="function"?(...b)=>fi(p?.className(...b),u.className):fi(p?.className,u.className),h=y?{className:y}:{};return w.cloneElement(l,Object.assign({},fg(l.props,$l(Sa(u,["ref"]))),f,c,{ref:i(l.ref,c.ref)},h))}return w.createElement(a,Object.assign({},Sa(u,["ref"]),a!==w.Fragment&&c,a!==w.Fragment&&f),l)}function Rw(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function fg(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let i in n)i.startsWith("on")&&typeof n[i]=="function"?(r[i]!=null||(r[i]=[]),r[i].push(n[i])):t[i]=n[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](i,...a){let o=r[n];for(let s of o){if((i instanceof Event||i?.nativeEvent instanceof Event)&&i.defaultPrevented)return;s(i,...a)}}});return t}function it(e){var t;return Object.assign(w.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function $l(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Sa(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let Pw="div";var pi=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(pi||{});function Cw(e,t){var r;let{features:n=1,...i}=e,a={ref:t,"aria-hidden":(n&2)===2?!0:(r=i["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return gt({ourProps:a,theirProps:i,slot:{},defaultTag:Pw,name:"Hidden"})}let Ms=it(Cw),bu=w.createContext(null);bu.displayName="OpenClosedContext";var rt=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(rt||{});function _u(){return w.useContext(bu)}function jw({value:e,children:t}){return w.createElement(bu.Provider,{value:e},t)}function Iw(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Wt=[];Iw(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Wt[0]!==t.target&&(Wt.unshift(t.target),Wt=Wt.filter(r=>r!=null&&r.isConnected),Wt.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Nw(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=t?.getAttribute("disabled")==="";return n&&Lw(r)?!1:n}function Lw(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}var dg=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(dg||{});function pg(e,t,r,n){let i=Ft(r);w.useEffect(()=>{e=e??window;function a(o){i.current(o)}return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a,n)},[e,t,n])}function Rn(){let e=w.useRef(!1);return dt(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function hg(e){let t=Pe(e),r=w.useRef(!1);w.useEffect(()=>(r.current=!1,()=>{r.current=!0,Ii(()=>{r.current&&t()})}),[t])}var ln=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(ln||{});function Dw(){let e=w.useRef(0);return cg("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function gg(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let Fw="div";var mg=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(mg||{});function $w(e,t){let r=w.useRef(null),n=Et(r,t),{initialFocus:i,containers:a,features:o=30,...s}=e;Nr()||(o=1);let u=Tn(r);Uw({ownerDocument:u},!!(o&16));let c=Vw({ownerDocument:u,container:r,initialFocus:i},!!(o&2));qw({ownerDocument:u,container:r,containers:a,previousActiveElement:c},!!(o&8));let l=Dw(),f=Pe(b=>{let _=r.current;_&&(m=>m())(()=>{He(l.current,{[ln.Forwards]:()=>{Zn(_,ir.First,{skipElements:[b.relatedTarget]})},[ln.Backwards]:()=>{Zn(_,ir.Last,{skipElements:[b.relatedTarget]})}})})}),p=vu(),y=w.useRef(!1),h={ref:n,onKeyDown(b){b.key=="Tab"&&(y.current=!0,p.requestAnimationFrame(()=>{y.current=!1}))},onBlur(b){let _=gg(a);r.current instanceof HTMLElement&&_.add(r.current);let m=b.relatedTarget;m instanceof HTMLElement&&m.dataset.headlessuiFocusGuard!=="true"&&(vg(_,m)||(y.current?Zn(r.current,He(l.current,{[ln.Forwards]:()=>ir.Next,[ln.Backwards]:()=>ir.Previous})|ir.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&ur(b.target)))}};return w.createElement(w.Fragment,null,!!(o&4)&&w.createElement(Ms,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:pi.Focusable}),gt({ourProps:h,theirProps:s,defaultTag:Fw,name:"FocusTrap"}),!!(o&4)&&w.createElement(Ms,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:pi.Focusable}))}let Mw=it($w),rn=Object.assign(Mw,{features:mg});function kw(e=!0){let t=w.useRef(Wt.slice());return yu(([r],[n])=>{n===!0&&r===!1&&Ii(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=Wt.slice())},[e,Wt,t]),Pe(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function Uw({ownerDocument:e},t){let r=kw(t);yu(()=>{t||e?.activeElement===e?.body&&ur(r())},[t]),hg(()=>{t&&ur(r())})}function Vw({ownerDocument:e,container:t,initialFocus:r},n){let i=w.useRef(null),a=Rn();return yu(()=>{if(!n)return;let o=t.current;o&&Ii(()=>{if(!a.current)return;let s=e?.activeElement;if(r!=null&&r.current){if(r?.current===s){i.current=s;return}}else if(o.contains(s)){i.current=s;return}r!=null&&r.current?ur(r.current):Zn(o,ir.First)===og.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e?.activeElement})},[n]),i}function qw({ownerDocument:e,container:t,containers:r,previousActiveElement:n},i){let a=Rn();pg(e?.defaultView,"focus",o=>{if(!i||!a.current)return;let s=gg(r);t.current instanceof HTMLElement&&s.add(t.current);let u=n.current;if(!u)return;let c=o.target;c&&c instanceof HTMLElement?vg(s,c)?(n.current=c,ur(c)):(o.preventDefault(),o.stopPropagation(),ur(u)):ur(n.current)},!0)}function vg(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let yg=w.createContext(!1);function Bw(){return w.useContext(yg)}function ks(e){return w.createElement(yg.Provider,{value:e.force},e.children)}function Hw(e){let t=Bw(),r=w.useContext(bg),n=Tn(e),[i,a]=w.useState(()=>{if(!t&&r!==null||Dt.isServer)return null;let o=n?.getElementById("headlessui-portal-root");if(o)return o;if(n===null)return null;let s=n.createElement("div");return s.setAttribute("id","headlessui-portal-root"),n.body.appendChild(s)});return w.useEffect(()=>{i!==null&&(n!=null&&n.body.contains(i)||n==null||n.body.appendChild(i))},[i,n]),w.useEffect(()=>{t||r!==null&&a(r.current)},[r,a,t]),i}let Ww=w.Fragment;function Gw(e,t){let r=e,n=w.useRef(null),i=Et(Tw(l=>{n.current=l}),t),a=Tn(n),o=Hw(n),[s]=w.useState(()=>{var l;return Dt.isServer?null:(l=a?.createElement("div"))!=null?l:null}),u=w.useContext(Us),c=Nr();return dt(()=>{!o||!s||o.contains(s)||(s.setAttribute("data-headlessui-portal",""),o.appendChild(s))},[o,s]),dt(()=>{if(s&&u)return u.register(s)},[u,s]),hg(()=>{var l;!o||!s||(s instanceof Node&&o.contains(s)&&o.removeChild(s),o.childNodes.length<=0&&((l=o.parentElement)==null||l.removeChild(o)))}),c?!o||!s?null:tv.createPortal(gt({ourProps:{ref:i},theirProps:r,defaultTag:Ww,name:"Portal"}),s):null}let zw=w.Fragment,bg=w.createContext(null);function Kw(e,t){let{target:r,...n}=e,i={ref:Et(t)};return w.createElement(bg.Provider,{value:r},gt({ourProps:i,theirProps:n,defaultTag:zw,name:"Popover.Group"}))}let Us=w.createContext(null);function Yw(){let e=w.useContext(Us),t=w.useRef([]),r=Pe(a=>(t.current.push(a),e&&e.register(a),()=>n(a))),n=Pe(a=>{let o=t.current.indexOf(a);o!==-1&&t.current.splice(o,1),e&&e.unregister(a)}),i=w.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,w.useMemo(()=>function({children:a}){return w.createElement(Us.Provider,{value:i},a)},[i])]}let Jw=it(Gw),Zw=it(Kw),Vs=Object.assign(Jw,{Group:Zw});function Qw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Xw=typeof Object.is=="function"?Object.is:Qw,{useState:e0,useEffect:t0,useLayoutEffect:r0,useDebugValue:n0}=Yt;function i0(e,t,r){const n=t(),[{inst:i},a]=e0({inst:{value:n,getSnapshot:t}});return r0(()=>{i.value=n,i.getSnapshot=t,wa(i)&&a({inst:i})},[e,n,t]),t0(()=>(wa(i)&&a({inst:i}),e(()=>{wa(i)&&a({inst:i})})),[e]),n0(n),n}function wa(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Xw(r,n)}catch{return!0}}function a0(e,t,r){return t()}const o0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",s0=!o0,u0=s0?a0:i0,c0="useSyncExternalStore"in Yt?(e=>e.useSyncExternalStore)(Yt):u0;function l0(e){return c0(e.subscribe,e.getSnapshot,e.getSnapshot)}function f0(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(i){return n.add(i),()=>n.delete(i)},dispatch(i,...a){let o=t[i].call(r,...a);o&&(r=o,n.forEach(s=>s()))}}}function d0(){let e;return{before({doc:t}){var r;let n=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:t,d:r}){let n=t.documentElement,i=n.clientWidth-n.offsetWidth,a=e-i;r.style(n,"paddingRight",`${a}px`)}}}function p0(){return ug()?{before({doc:e,d:t,meta:r}){function n(i){return r.containers.flatMap(a=>a()).some(a=>a.contains(i))}t.microTask(()=>{var i;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=yr();s.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}let a=(i=window.scrollY)!=null?i:window.pageYOffset,o=null;t.addEventListener(e,"click",s=>{if(s.target instanceof HTMLElement)try{let u=s.target.closest("a");if(!u)return;let{hash:c}=new URL(u.href),l=e.querySelector(c);l&&!n(l)&&(o=l)}catch{}},!0),t.addEventListener(e,"touchstart",s=>{if(s.target instanceof HTMLElement)if(n(s.target)){let u=s.target;for(;u.parentElement&&n(u.parentElement);)u=u.parentElement;t.style(u,"overscrollBehavior","contain")}else t.style(s.target,"touchAction","none")}),t.addEventListener(e,"touchmove",s=>{if(s.target instanceof HTMLElement)if(n(s.target)){let u=s.target;for(;u.parentElement&&u.dataset.headlessuiPortal!==""&&!(u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth);)u=u.parentElement;u.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()},{passive:!1}),t.add(()=>{var s;let u=(s=window.scrollY)!=null?s:window.pageYOffset;a!==u&&window.scrollTo(0,a),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function h0(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function g0(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let or=f0(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:yr(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:g0(r)},i=[p0(),d0(),h0()];i.forEach(({before:a})=>a?.(n)),i.forEach(({after:a})=>a?.(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});or.subscribe(()=>{let e=or.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",i=r.count!==0;(i&&!n||!i&&n)&&or.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&or.dispatch("TEARDOWN",r)}});function m0(e,t,r){let n=l0(or),i=e?n.get(e):void 0,a=i?i.count>0:!1;return dt(()=>{if(!(!e||!t))return or.dispatch("PUSH",e,r),()=>or.dispatch("POP",e,r)},[t,e]),a}let Aa=new Map,nn=new Map;function Ml(e,t=!0){dt(()=>{var r;if(!t)return;let n=typeof e=="function"?e():e.current;if(!n)return;function i(){var o;if(!n)return;let s=(o=nn.get(n))!=null?o:1;if(s===1?nn.delete(n):nn.set(n,s-1),s!==1)return;let u=Aa.get(n);u&&(u["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",u["aria-hidden"]),n.inert=u.inert,Aa.delete(n))}let a=(r=nn.get(n))!=null?r:0;return nn.set(n,a+1),a!==0||(Aa.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),i},[e,t])}function v0({defaultContainers:e=[],portals:t,mainTreeNodeRef:r}={}){var n;let i=w.useRef((n=r?.current)!=null?n:null),a=Tn(i),o=Pe(()=>{var s,u,c;let l=[];for(let f of e)f!==null&&(f instanceof HTMLElement?l.push(f):"current"in f&&f.current instanceof HTMLElement&&l.push(f.current));if(t!=null&&t.current)for(let f of t.current)l.push(f);for(let f of(s=a?.querySelectorAll("html > *, body > *"))!=null?s:[])f!==document.body&&f!==document.head&&f instanceof HTMLElement&&f.id!=="headlessui-portal-root"&&(f.contains(i.current)||f.contains((c=(u=i.current)==null?void 0:u.getRootNode())==null?void 0:c.host)||l.some(p=>f.contains(p))||l.push(f));return l});return{resolveContainers:o,contains:Pe(s=>o().some(u=>u.contains(s))),mainTreeNodeRef:i,MainTreeNode:w.useMemo(()=>function(){return r!=null?null:w.createElement(Ms,{features:pi.Hidden,ref:i})},[i,r])}}let Ou=w.createContext(()=>{});Ou.displayName="StackContext";var qs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(qs||{});function y0(){return w.useContext(Ou)}function b0({children:e,onUpdate:t,type:r,element:n,enabled:i}){let a=y0(),o=Pe((...s)=>{t?.(...s),a(...s)});return dt(()=>{let s=i===void 0||i===!0;return s&&o(0,r,n),()=>{s&&o(1,r,n)}},[o,r,n,i]),w.createElement(Ou.Provider,{value:o},e)}let _g=w.createContext(null);function Og(){let e=w.useContext(_g);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Og),t}return e}function _0(){let[e,t]=w.useState([]);return[e.length>0?e.join(" "):void 0,w.useMemo(()=>function(r){let n=Pe(a=>(t(o=>[...o,a]),()=>t(o=>{let s=o.slice(),u=s.indexOf(a);return u!==-1&&s.splice(u,1),s}))),i=w.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return w.createElement(_g.Provider,{value:i},r.children)},[t])]}let O0="p";function E0(e,t){let r=Lr(),{id:n=`headlessui-description-${r}`,...i}=e,a=Og(),o=Et(t);dt(()=>a.register(n),[n,a.register]);let s={ref:o,...a.props,id:n};return gt({ourProps:s,theirProps:i,slot:a.slot||{},defaultTag:O0,name:a.name||"Description"})}let S0=it(E0),w0=Object.assign(S0,{});var A0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(A0||{}),x0=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(x0||{});let T0={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},hi=w.createContext(null);hi.displayName="DialogContext";function Pn(e){let t=w.useContext(hi);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Pn),r}return t}function R0(e,t,r=()=>[document.body]){m0(e,t,n=>{var i;return{containers:[...(i=n.containers)!=null?i:[],r]}})}function P0(e,t){return He(t.type,T0,e,t)}let C0="div",j0=di.RenderStrategy|di.Static;function I0(e,t){let r=Lr(),{id:n=`headlessui-dialog-${r}`,open:i,onClose:a,initialFocus:o,role:s="dialog",__demoMode:u=!1,...c}=e,[l,f]=w.useState(0),p=w.useRef(!1);s=(function(){return s==="dialog"||s==="alertdialog"?s:(p.current||(p.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")})();let y=_u();i===void 0&&y!==null&&(i=(y&rt.Open)===rt.Open);let h=w.useRef(null),b=Et(h,t),_=Tn(h),m=e.hasOwnProperty("open")||y!==null,d=e.hasOwnProperty("onClose");if(!m&&!d)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!m)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!d)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof i!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${i}`);if(typeof a!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let E=i?0:1,[g,v]=w.useReducer(P0,{titleId:null,descriptionId:null,panelRef:w.createRef()}),O=Pe(()=>a(!1)),A=Pe(ae=>v({type:0,id:ae})),S=Nr()?u?!1:E===0:!1,T=l>1,P=w.useContext(hi)!==null,[N,M]=Yw(),U={get current(){var ae;return(ae=g.panelRef.current)!=null?ae:h.current}},{resolveContainers:F,mainTreeNodeRef:D,MainTreeNode:$}=v0({portals:N,defaultContainers:[U]}),B=T?"parent":"leaf",k=y!==null?(y&rt.Closing)===rt.Closing:!1,Q=P||k?!1:S,K=w.useCallback(()=>{var ae,fe;return(fe=Array.from((ae=_?.querySelectorAll("body > *"))!=null?ae:[]).find(he=>he.id==="headlessui-portal-root"?!1:he.contains(D.current)&&he instanceof HTMLElement))!=null?fe:null},[D]);Ml(K,Q);let ee=T?!0:S,G=w.useCallback(()=>{var ae,fe;return(fe=Array.from((ae=_?.querySelectorAll("[data-headlessui-portal]"))!=null?ae:[]).find(he=>he.contains(D.current)&&he instanceof HTMLElement))!=null?fe:null},[D]);Ml(G,ee),xw(F,ae=>{ae.preventDefault(),O()},!(!S||T));let te=!(T||E!==0);pg(_?.defaultView,"keydown",ae=>{te&&(ae.defaultPrevented||ae.key===dg.Escape&&(ae.preventDefault(),ae.stopPropagation(),O()))}),R0(_,!(k||E!==0||P),F),w.useEffect(()=>{if(E!==0||!h.current)return;let ae=new ResizeObserver(fe=>{for(let he of fe){let je=he.target.getBoundingClientRect();je.x===0&&je.y===0&&je.width===0&&je.height===0&&O()}});return ae.observe(h.current),()=>ae.disconnect()},[E,h,O]);let[ue,re]=_0(),le=w.useMemo(()=>[{dialogState:E,close:O,setTitleId:A},g],[E,g,O,A]),_e=w.useMemo(()=>({open:E===0}),[E]),de={ref:b,id:n,role:s,"aria-modal":E===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":ue};return w.createElement(b0,{type:"Dialog",enabled:E===0,element:h,onUpdate:Pe((ae,fe)=>{fe==="Dialog"&&He(ae,{[qs.Add]:()=>f(he=>he+1),[qs.Remove]:()=>f(he=>he-1)})})},w.createElement(ks,{force:!0},w.createElement(Vs,null,w.createElement(hi.Provider,{value:le},w.createElement(Vs.Group,{target:h},w.createElement(ks,{force:!1},w.createElement(re,{slot:_e,name:"Dialog.Description"},w.createElement(rn,{initialFocus:o,containers:F,features:S?He(B,{parent:rn.features.RestoreFocus,leaf:rn.features.All&~rn.features.FocusLock}):rn.features.None},w.createElement(M,null,gt({ourProps:de,theirProps:c,slot:_e,defaultTag:C0,features:j0,visible:E===0,name:"Dialog"}))))))))),w.createElement($,null))}let N0="div";function L0(e,t){let r=Lr(),{id:n=`headlessui-dialog-overlay-${r}`,...i}=e,[{dialogState:a,close:o}]=Pn("Dialog.Overlay"),s=Et(t),u=Pe(l=>{if(l.target===l.currentTarget){if(Nw(l.currentTarget))return l.preventDefault();l.preventDefault(),l.stopPropagation(),o()}}),c=w.useMemo(()=>({open:a===0}),[a]);return gt({ourProps:{ref:s,id:n,"aria-hidden":!0,onClick:u},theirProps:i,slot:c,defaultTag:N0,name:"Dialog.Overlay"})}let D0="div";function F0(e,t){let r=Lr(),{id:n=`headlessui-dialog-backdrop-${r}`,...i}=e,[{dialogState:a},o]=Pn("Dialog.Backdrop"),s=Et(t);w.useEffect(()=>{if(o.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[o.panelRef]);let u=w.useMemo(()=>({open:a===0}),[a]);return w.createElement(ks,{force:!0},w.createElement(Vs,null,gt({ourProps:{ref:s,id:n,"aria-hidden":!0},theirProps:i,slot:u,defaultTag:D0,name:"Dialog.Backdrop"})))}let $0="div";function M0(e,t){let r=Lr(),{id:n=`headlessui-dialog-panel-${r}`,...i}=e,[{dialogState:a},o]=Pn("Dialog.Panel"),s=Et(t,o.panelRef),u=w.useMemo(()=>({open:a===0}),[a]),c=Pe(l=>{l.stopPropagation()});return gt({ourProps:{ref:s,id:n,onClick:c},theirProps:i,slot:u,defaultTag:$0,name:"Dialog.Panel"})}let k0="h2";function U0(e,t){let r=Lr(),{id:n=`headlessui-dialog-title-${r}`,...i}=e,[{dialogState:a,setTitleId:o}]=Pn("Dialog.Title"),s=Et(t);w.useEffect(()=>(o(n),()=>o(null)),[n,o]);let u=w.useMemo(()=>({open:a===0}),[a]);return gt({ourProps:{ref:s,id:n},theirProps:i,slot:u,defaultTag:k0,name:"Dialog.Title"})}let V0=it(I0),q0=it(F0),B0=it(M0),H0=it(L0),W0=it(U0),kl=Object.assign(V0,{Backdrop:q0,Panel:B0,Overlay:H0,Title:W0,Description:w0});function G0(e=0){let[t,r]=w.useState(e),n=Rn(),i=w.useCallback(u=>{n.current&&r(c=>c|u)},[t,n]),a=w.useCallback(u=>!!(t&u),[t]),o=w.useCallback(u=>{n.current&&r(c=>c&~u)},[r,n]),s=w.useCallback(u=>{n.current&&r(c=>c^u)},[r]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:o,toggleFlag:s}}function z0(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function xa(e,...t){e&&t.length>0&&e.classList.add(...t)}function Ta(e,...t){e&&t.length>0&&e.classList.remove(...t)}function K0(e,t){let r=yr();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:i}=getComputedStyle(e),[a,o]=[n,i].map(u=>{let[c=0]=u.split(",").filter(Boolean).map(l=>l.includes("ms")?parseFloat(l):parseFloat(l)*1e3).sort((l,f)=>f-l);return c}),s=a+o;if(s!==0){r.group(c=>{c.setTimeout(()=>{t(),c.dispose()},s),c.addEventListener(e,"transitionrun",l=>{l.target===l.currentTarget&&c.dispose()})});let u=r.addEventListener(e,"transitionend",c=>{c.target===c.currentTarget&&(t(),u())})}else t();return r.add(()=>t()),r.dispose}function Y0(e,t,r,n){let i=r?"enter":"leave",a=yr(),o=n!==void 0?z0(n):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let s=He(i,{enter:()=>t.enter,leave:()=>t.leave}),u=He(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),c=He(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Ta(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),xa(e,...t.base,...s,...c),a.nextFrame(()=>{Ta(e,...t.base,...s,...c),xa(e,...t.base,...s,...u),K0(e,()=>(Ta(e,...t.base,...s),xa(e,...t.base,...t.entered),o()))}),a.dispose}function J0({immediate:e,container:t,direction:r,classes:n,onStart:i,onStop:a}){let o=Rn(),s=vu(),u=Ft(r);dt(()=>{e&&(u.current="enter")},[e]),dt(()=>{let c=yr();s.add(c.dispose);let l=t.current;if(l&&u.current!=="idle"&&o.current)return c.dispose(),i.current(u.current),c.add(Y0(l,n.current,u.current==="enter",()=>{c.dispose(),a.current(u.current)})),c.dispose},[r])}function Bt(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ni=w.createContext(null);Ni.displayName="TransitionContext";var Z0=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Z0||{});function Q0(){let e=w.useContext(Ni);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function X0(){let e=w.useContext(Li);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Li=w.createContext(null);Li.displayName="NestingContext";function Di(e){return"children"in e?Di(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Eg(e,t){let r=Ft(e),n=w.useRef([]),i=Rn(),a=vu(),o=Pe((y,h=zt.Hidden)=>{let b=n.current.findIndex(({el:_})=>_===y);b!==-1&&(He(h,{[zt.Unmount](){n.current.splice(b,1)},[zt.Hidden](){n.current[b].state="hidden"}}),a.microTask(()=>{var _;!Di(n)&&i.current&&((_=r.current)==null||_.call(r))}))}),s=Pe(y=>{let h=n.current.find(({el:b})=>b===y);return h?h.state!=="visible"&&(h.state="visible"):n.current.push({el:y,state:"visible"}),()=>o(y,zt.Unmount)}),u=w.useRef([]),c=w.useRef(Promise.resolve()),l=w.useRef({enter:[],leave:[],idle:[]}),f=Pe((y,h,b)=>{u.current.splice(0),t&&(t.chains.current[h]=t.chains.current[h].filter(([_])=>_!==y)),t?.chains.current[h].push([y,new Promise(_=>{u.current.push(_)})]),t?.chains.current[h].push([y,new Promise(_=>{Promise.all(l.current[h].map(([m,d])=>d)).then(()=>_())})]),h==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>b(h)):b(h)}),p=Pe((y,h,b)=>{Promise.all(l.current[h].splice(0).map(([_,m])=>m)).then(()=>{var _;(_=u.current.shift())==null||_()}).then(()=>b(h))});return w.useMemo(()=>({children:n,register:s,unregister:o,onStart:f,onStop:p,wait:c,chains:l}),[s,o,n,f,p,l,c])}function eA(){}let tA=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Ul(e){var t;let r={};for(let n of tA)r[n]=(t=e[n])!=null?t:eA;return r}function rA(e){let t=w.useRef(Ul(e));return w.useEffect(()=>{t.current=Ul(e)},[e]),t}let nA="div",Sg=di.RenderStrategy;function iA(e,t){var r,n;let{beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s,enter:u,enterFrom:c,enterTo:l,entered:f,leave:p,leaveFrom:y,leaveTo:h,...b}=e,_=w.useRef(null),m=Et(_,t),d=(r=b.unmount)==null||r?zt.Unmount:zt.Hidden,{show:E,appear:g,initial:v}=Q0(),[O,A]=w.useState(E?"visible":"hidden"),S=X0(),{register:T,unregister:P}=S;w.useEffect(()=>T(_),[T,_]),w.useEffect(()=>{if(d===zt.Hidden&&_.current){if(E&&O!=="visible"){A("visible");return}return He(O,{hidden:()=>P(_),visible:()=>T(_)})}},[O,_,T,P,E,d]);let N=Ft({base:Bt(b.className),enter:Bt(u),enterFrom:Bt(c),enterTo:Bt(l),entered:Bt(f),leave:Bt(p),leaveFrom:Bt(y),leaveTo:Bt(h)}),M=rA({beforeEnter:i,afterEnter:a,beforeLeave:o,afterLeave:s}),U=Nr();w.useEffect(()=>{if(U&&O==="visible"&&_.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[_,O,U]);let F=v&&!g,D=g&&E&&v,$=!U||F?"idle":E?"enter":"leave",B=G0(0),k=Pe(te=>He(te,{enter:()=>{B.addFlag(rt.Opening),M.current.beforeEnter()},leave:()=>{B.addFlag(rt.Closing),M.current.beforeLeave()},idle:()=>{}})),Q=Pe(te=>He(te,{enter:()=>{B.removeFlag(rt.Opening),M.current.afterEnter()},leave:()=>{B.removeFlag(rt.Closing),M.current.afterLeave()},idle:()=>{}})),K=Eg(()=>{A("hidden"),P(_)},S),ee=w.useRef(!1);J0({immediate:D,container:_,classes:N,direction:$,onStart:Ft(te=>{ee.current=!0,K.onStart(_,te,k)}),onStop:Ft(te=>{ee.current=!1,K.onStop(_,te,Q),te==="leave"&&!Di(K)&&(A("hidden"),P(_))})});let G=b,ne={ref:m};return D?G={...G,className:fi(b.className,...N.current.enter,...N.current.enterFrom)}:ee.current&&(G.className=fi(b.className,(n=_.current)==null?void 0:n.className),G.className===""&&delete G.className),w.createElement(Li.Provider,{value:K},w.createElement(jw,{value:He(O,{visible:rt.Open,hidden:rt.Closed})|B.flags},gt({ourProps:ne,theirProps:G,defaultTag:nA,features:Sg,visible:O==="visible",name:"Transition.Child"})))}function aA(e,t){let{show:r,appear:n=!1,unmount:i=!0,...a}=e,o=w.useRef(null),s=Et(o,t);Nr();let u=_u();if(r===void 0&&u!==null&&(r=(u&rt.Open)===rt.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,l]=w.useState(r?"visible":"hidden"),f=Eg(()=>{l("hidden")}),[p,y]=w.useState(!0),h=w.useRef([r]);dt(()=>{p!==!1&&h.current[h.current.length-1]!==r&&(h.current.push(r),y(!1))},[h,r]);let b=w.useMemo(()=>({show:r,appear:n,initial:p}),[r,n,p]);w.useEffect(()=>{if(r)l("visible");else if(!Di(f))l("hidden");else{let E=o.current;if(!E)return;let g=E.getBoundingClientRect();g.x===0&&g.y===0&&g.width===0&&g.height===0&&l("hidden")}},[r,f]);let _={unmount:i},m=Pe(()=>{var E;p&&y(!1),(E=e.beforeEnter)==null||E.call(e)}),d=Pe(()=>{var E;p&&y(!1),(E=e.beforeLeave)==null||E.call(e)});return w.createElement(Li.Provider,{value:f},w.createElement(Ni.Provider,{value:b},gt({ourProps:{..._,as:w.Fragment,children:w.createElement(wg,{ref:s,..._,...a,beforeEnter:m,beforeLeave:d})},theirProps:{},defaultTag:w.Fragment,features:Sg,visible:c==="visible",name:"Transition"})))}function oA(e,t){let r=w.useContext(Ni)!==null,n=_u()!==null;return w.createElement(w.Fragment,null,!r&&n?w.createElement(Bs,{ref:t,...e}):w.createElement(wg,{ref:t,...e}))}let Bs=it(aA),wg=it(iA),sA=it(oA),Ra=Object.assign(Bs,{Child:sA,Root:Bs});function uA(e){const{children:t,isOpen:r,handleClose:n}=e,{isMobile:i}=ng({isModal:!0});return I.jsx(I.Fragment,{children:I.jsx(Ra,{appear:!0,show:r,as:w.Fragment,children:I.jsx(kl,{as:"div",className:"fixed inset-0 z-10 overflow-y-auto",style:{backgroundColor:"rgba(0,0,0,.75)"},onClose:n,children:I.jsxs("div",{className:"min-h-screen text-center sm:px-4",children:[I.jsx(Ra.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:I.jsx(kl.Overlay,{className:"fixed inset-0"})}),I.jsx("span",{className:"inline-block h-screen align-middle","aria-hidden":"true",children:""}),I.jsx(Ra.Child,{as:w.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:I.jsxs("div",{id:"modal-content",className:"inline-block overflow-hidden sm:rounded-2xl align-middle transition-all bg-white sm:shadow-xl h-screen sm:h-auto sm:max-h-[90vh] w-full sm:w-[640px]",children:[I.jsx("div",{className:"sticky top-0 z-10 flex items-center w-full px-3 text-lg font-medium leading-6 text-gray-900 bg-white h-14 modal-header",children:I.jsx("div",{className:"",children:I.jsxs("svg",{className:"size-8 text-black cursor-pointer",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",onClick:n,children:[I.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"})," ",I.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})," ",I.jsx("line",{x1:"5",y1:"12",x2:"11",y2:"18"})," ",I.jsx("line",{x1:"5",y1:"12",x2:"11",y2:"6"})]})})}),I.jsx("div",{className:"w-full",style:{height:`${i?"calc(100% - 56px)":"auto"}`},children:t})]})})]})})})})}function cA(e){const{product:t,isOpen:r,handleGoBack:n,showDebugState:i=!1,countedProductPrice:a,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:c,children:l}=e,{minPrice:f="0"}=t,[p,y]=w.useState("auto"),[h,b]=w.useState(0);w.useEffect(()=>{b(1);const F=setTimeout(()=>{v||b(2)},250);return()=>{clearTimeout(F)}},[]);const{displayPriceFrom:_,formattedEndPrice:m}=vS(a,f,o),d=w.useRef(null),E=w.useRef(null),{isSm:g,isMobile:v,windowHeight:O}=ng({isModal:!0}),A=I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:tn("px-4 w-full",g&&"sm:sticky sm:top-0 sm:w-2/5"),ref:d,children:[t.details?.media&&t.details.media[0].url&&I.jsx("img",{className:tn("mx-auto mt-2 mb-6 max-h-[250px]",g&&"max-h-[450px]"),alt:t.details?.literals?.name,src:t.details?.media[0].url}),I.jsx("div",{className:tn(!i&&"hidden"),children:I.jsx(rg,{})})]}),I.jsxs("div",{className:tn("w-full",g&&"sm:w-3/5"),ref:E,children:[I.jsxs("div",{className:"items-center w-full p-4",children:[I.jsxs("div",{className:"flex justify-between w-full mb-4 text-2xl font-semibold",children:[I.jsxs("span",{className:"",children:[t.details?.literals?.name," "]}),I.jsx(Ci,{price:e.countedProductPrice,minPrice:f})]}),I.jsx("span",{className:"text-gray-600",children:t.details?.literals?.description})]}),I.jsxs("div",{className:`items-center justify-center w-full px-4 product-configuration ${t?.items&&"py-2 bg-gray-100"}`,children:[l,I.jsx("div",{className:"sm:h-[64px]"})]}),g&&I.jsx("div",{className:"-mt-5 mb-2 bg-gray-100",children:I.jsx(Dl,{finalPrice:m,isBackIcon:!1,handleGoBack:n,displayPriceFrom:_,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:c})})]})]}),S=d?.current?.clientHeight,T=E?.current?.clientHeight,P=Number(S)+Number(T);P>window.innerHeight*.8||isNaN(P)?p!=="80vh"&&y("80vh"):p!=="auto"&&y("auto");const N=`${O-64-56}px`,M=!g,U={"--mobile-submit-row-top":`${O-64-80}px`};return I.jsx(uA,{isOpen:!!r,handleClose:n,children:I.jsxs("div",{id:"product-configurator-view",className:"size-full",style:{overflow:"hidden",textAlign:"left"},children:[I.jsx("div",{className:tn("flex relative flex-col items-start w-full form-body stretch",!M&&"sm:flex-row-reverse sm:pb-0",!v&&"mobile-scrollbar"),style:{height:`${v?N:p}`,minHeight:"400px",overflowY:"scroll"},children:A}),M&&I.jsx("div",{className:`w-full h-16 bg-white sm:fixed sm:bottom-0 ${v?"submit-row-mobile":"submit-row"}`,style:U,children:I.jsx(Dl,{handleGoBack:n,finalPrice:m,isBackIcon:!1,productQuantity:o,increaseProductQuantity:s,decreaseProductQuantity:u,handleOnSubmit:c})})]})})}const Eu=(e,t={},r,n,i=0)=>{const a=n||{};return(i===0||t[e.selCtx]?.[e.id])&&e?.items?.forEach(o=>{if(xn(o.kind)&&(o?.attrs?.selMin||o.attrs?.selMax||o.attrs?.qtyMin||o.attrs?.qtyMax||o.attrs?.allowMultiple)){const[s,u]=$h(o.selCtx,t,o.items),c=Pi(e,r);a[o.selCtx]={isSelCntAllowedToIncrement:s<Number(o?.attrs?.selMax||Number.MAX_SAFE_INTEGER),isQtyCntAllowedToIncrement:u<Number(o?.attrs?.qtyMax||Number.MAX_SAFE_INTEGER),nestedLvl:i,isPassedFiltering:c,isValid:ci(s,Number(o.attrs?.selMin||0),Number(o.attrs?.selMax||Number.MAX_SAFE_INTEGER)+1)&&ci(u,Number(o.attrs?.qtyMin||0),Number(o.attrs?.qtyMax||Number.MAX_SAFE_INTEGER)+1)&&(o.attrs?.allowMultiple===!0||u-s===0)}}o?.items&&o.items?.length>0&&o.items?.forEach(s=>{Eu(s,t,r,a,i+1)})}),a},Ag=w.createContext(null);function lA({rootProduct:e,children:t}){return I.jsx(Ag.Provider,{value:{rootProduct:e},children:t})}function fA(e){const t=w.useContext(Ag),r=mn({name:"selected"}),n=mn({name:"filter"}),[i,a]=w.useState(void 0);if(!t)throw new Error("Missing ComponentsContext");return w.useEffect(()=>{console.log("useGroupsValidation validationMap2 change")},[i]),w.useEffect(()=>{const o=Eu(e,r,n);OE(o,i)||a(o)},[r,n]),{validationMap2:i}}const dA=e=>{const{product:t,showOutsideAvailabilitySlotItems:r}=e,{MenuProductRootUI:n}=ji(),{validationMap2:i}=fA(t),a=_t(t.items)?I.jsx(I.Fragment,{}):I.jsx(mu,{productItems:t.items,parentProduct:t,rootProduct:t,showOutsideAvailabilitySlotItems:r});return n?I.jsx(n,{...e,validationMap:i||{},children:a}):I.jsx(cA,{...e,validationMap:i||{},children:a})},xg=w.createContext(null);function pA({rootProduct:e,children:t}){return I.jsx(xg.Provider,{value:{rootProduct:e},children:t})}function hA(){const e=w.useContext(xg);if(!e)throw new Error("Missing ComponentsContext");return e}function Tg(e,t){return function(){return e.apply(t,arguments)}}const{toString:gA}=Object.prototype,{getPrototypeOf:er}=Object,{iterator:Cn,toStringTag:Rg}=Symbol,On=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Pg=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),Cg=(e,t,r)=>e===Object.prototype||!r&&t===null,mA=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(r=>{if(Pg(r))return!1;const n=Object.getOwnPropertyDescriptor(e,r);return!!n&&n.configurable&&n.writable===!0})},En=(e,t)=>{let r=e;const n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);const i=er(r);if(Cg(r,i,r===e))return!1;if(On(r,t))return!0;r=i}return!1},vA=(e,t)=>e!=null&&En(e,t)?e[t]:void 0,yA=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=er(e);if(t===null&&mA(e))return e;const r=Object.create(null),n=Object.create(null),i=[];let a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);const o=a===e?t:er(a);if(Cg(a,o,a===e))break;const s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(const u of s)Pg(u)||On(n,u)||(r[u]=e[u],n[u]=!0);a=o}return r},Su=(e=>t=>{const r=gA.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),mt=e=>(e=e.toLowerCase(),t=>Su(t)===e),Fi=e=>t=>typeof t===e,{isArray:fr}=Array,dr=Fi("undefined");function Dr(e){return e!==null&&!dr(e)&&e.constructor!==null&&!dr(e.constructor)&&Qe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const jg=mt("ArrayBuffer");function bA(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&jg(e.buffer),t}const _A=Fi("string"),Qe=Fi("function"),Ig=Fi("number"),Fr=e=>e!==null&&typeof e=="object",OA=e=>e===!0||e===!1,Qn=e=>{if(!Fr(e))return!1;const t=er(e);return(t===null||t===Object.prototype||er(t)===null)&&!En(e,Rg)&&!En(e,Cn)},EA=e=>{if(!Fr(e)||Dr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},SA=mt("Date"),wA=mt("File"),AA=e=>!!(e&&typeof e.uri<"u"),xA=e=>e&&typeof e.getParts<"u",TA=mt("Blob"),RA=mt("FileList"),PA=mt("Set"),CA=e=>Fr(e)&&Qe(e.pipe);function jA(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vl=jA(),ql=typeof Vl.FormData<"u"?Vl.FormData:void 0,IA=e=>{if(!e)return!1;if(ql&&e instanceof ql)return!0;const t=er(e);if(!t||t===Object.prototype||!Qe(e.append))return!1;const r=Su(e);return r==="formdata"||r==="object"&&Qe(e.toString)&&e.toString()==="[object FormData]"},NA=mt("URLSearchParams"),[LA,DA,FA,$A]=["ReadableStream","Request","Response","Headers"].map(mt),MA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jn(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),fr(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(Dr(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(n=0;n<o;n++)s=a[n],t.call(null,e[s],s,e)}}function Ng(e,t){if(Dr(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const sr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lg=e=>!dr(e)&&e!==sr;function Hs(...e){const{caseless:t,skipUndefined:r}=Lg(this)&&this||{},n={},i=(a,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=t&&typeof o=="string"&&Ng(n,o)||o,u=On(n,s)?n[s]:void 0;Qn(u)&&Qn(a)?n[s]=Hs(u,a):Qn(a)?n[s]=Hs({},a):fr(a)?n[s]=a.slice():(!r||!dr(a))&&(n[s]=a)};for(let a=0,o=e.length;a<o;a++){const s=e[a];if(!s||Dr(s)||(jn(s,i),typeof s!="object"||fr(s)))continue;const u=Object.getOwnPropertySymbols(s);for(let c=0;c<u.length;c++){const l=u[c];JA.call(s,l)&&i(s[l],l)}}return n}const kA=(e,t,r,{allOwnKeys:n}={})=>(jn(t,(i,a)=>{r&&Qe(i)?Object.defineProperty(e,a,{__proto__:null,value:Tg(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),UA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VA=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},qA=(e,t,r,n)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&er(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},BA=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},HA=e=>{if(!e)return null;if(fr(e))return e;let t=e.length;if(!Ig(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},WA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&er(Uint8Array)),GA=(e,t)=>{const n=(e&&e[Cn]).call(e);let i;for(;(i=n.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},zA=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},KA=mt("HTMLFormElement"),YA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),{propertyIsEnumerable:JA}=Object.prototype,ZA=mt("RegExp"),Dg=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};jn(r,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(n[a]=o||i)}),Object.defineProperties(e,n)},QA=e=>{Dg(e,(t,r)=>{if(Qe(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(Qe(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},XA=(e,t)=>{const r={},n=i=>{i.forEach(a=>{r[a]=!0})};return fr(e)?n(e):n(String(e).split(t)),r},e1=()=>{},t1=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function r1(e){return!!(e&&Qe(e.append)&&e[Rg]==="FormData"&&e[Cn])}const n1=e=>{const t=new WeakSet,r=n=>{if(Fr(n)){if(t.has(n))return;if(Dr(n))return n;if(!("toJSON"in n)){t.add(n);let i;if(PA(n)){i=[];for(const a of n){const o=r(a);!dr(o)&&i.push(o)}}else i=fr(n)?[]:{},jn(n,(a,o)=>{const s=r(a);!dr(s)&&(i[o]=s)});return t.delete(n),i}}return n};return r(e)},i1=mt("AsyncFunction"),a1=e=>e&&(Fr(e)||Qe(e))&&Qe(e.then)&&Qe(e.catch),Fg=((e,t)=>e?setImmediate:t?((r,n)=>(sr.addEventListener("message",({source:i,data:a})=>{i===sr&&a===r&&n.length&&n.shift()()},!1),i=>{n.push(i),sr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qe(sr.postMessage)),o1=typeof queueMicrotask<"u"?queueMicrotask.bind(sr):typeof process<"u"&&process.nextTick||Fg,$g=e=>e!=null&&Qe(e[Cn]),s1=e=>e!=null&&En(e,Cn)&&$g(e),C={isArray:fr,isArrayBuffer:jg,isBuffer:Dr,isFormData:IA,isArrayBufferView:bA,isString:_A,isNumber:Ig,isBoolean:OA,isObject:Fr,isPlainObject:Qn,isEmptyObject:EA,isReadableStream:LA,isRequest:DA,isResponse:FA,isHeaders:$A,isUndefined:dr,isDate:SA,isFile:wA,isReactNativeBlob:AA,isReactNative:xA,isBlob:TA,isRegExp:ZA,isFunction:Qe,isStream:CA,isURLSearchParams:NA,isTypedArray:WA,isFileList:RA,forEach:jn,merge:Hs,extend:kA,trim:MA,stripBOM:UA,inherits:VA,toFlatObject:qA,kindOf:Su,kindOfTest:mt,endsWith:BA,toArray:HA,forEachEntry:GA,matchAll:zA,isHTMLForm:KA,hasOwnProperty:On,hasOwnProp:On,hasOwnInPrototypeChain:En,getSafeProp:vA,toSafeFlatObject:yA,reduceDescriptors:Dg,freezeMethods:QA,toObjectSet:XA,toCamelCase:YA,noop:e1,toFiniteNumber:t1,findKey:Ng,global:sr,isContextDefined:Lg,isSpecCompliantForm:r1,toJSONObject:n1,isAsyncFn:i1,isThenable:a1,setImmediate:Fg,asap:o1,isIterable:$g,isSafeIterable:s1},u1=C.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),c1=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
20
|
+
`).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim();const s=C.hasOwnProp(t,r);!r||s&&C.hasOwnProp(u1,r)||(r==="set-cookie"?s?t[r].push(n):t[r]=[n]:t[r]=s?t[r]+", "+n:n)}),t};function l1(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const f1=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),d1=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function wu(e,t){return C.isArray(e)?e.map(r=>wu(r,t)):l1(String(e).replace(t,""))}const p1=e=>wu(e,f1),h1=e=>wu(e,d1);function Mg(e){const t=Object.create(null);return C.forEach(e.toJSON(),(r,n)=>{t[n]=h1(r)}),t}const Bl=Symbol("internals");function an(e){return e&&String(e).trim().toLowerCase()}function Xn(e){return e===!1||e==null?e:C.isArray(e)?e.map(Xn):p1(String(e))}function g1(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const m1=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Pa(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function v1(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n<t;n++){const i=e.charCodeAt(n);if(i===34||i===92&&(n+=1,n>=t))return e;r+=e[n]}return r}function y1(e){const t=Object.create(null),r=String(e);let n=0,i=!1,a=!1;function o(s){const u=Pa(r.slice(n,s)),c=u.indexOf("=");if(c<1)return;const l=Pa(u.slice(0,c));if(!m1.test(l))return;const f=l.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=Pa(u.slice(c+1));t[f]=v1(p)}for(let s=0;s<r.length;s++){const u=r.charCodeAt(s);i?a?a=!1:u===92?a=!0:u===34&&(i=!1):u===34?i=!0:(u===44||u===59)&&(o(s),n=s+1)}return o(r.length),t}const b1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ca(e,t,r,n,i){if(C.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!C.isString(t)){if(C.isString(n))return t.indexOf(n)!==-1;if(C.isRegExp(n))return n.test(t)}}function _1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function O1(e,t){const r=C.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(i,a,o){return this[n].call(this,t,i,a,o)},configurable:!0})})}let We=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function a(s,u,c){const l=an(u);if(!l)return;const f=C.findKey(i,l);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||u]=Xn(s))}const o=(s,u)=>C.forEach(s,(c,l)=>a(c,l,u));if(C.isPlainObject(t)||t instanceof this.constructor)o(t,r);else if(C.isString(t)&&(t=t.trim())&&!b1(t))o(c1(t),r);else if(C.isObject(t)&&C.isSafeIterable(t)){let s=Object.create(null),u,c;for(const l of t){if(!C.isArray(l))throw new TypeError("Object iterator must return a key-value pair");c=l[0],C.hasOwnProp(s,c)?(u=s[c],s[c]=C.isArray(u)?[...u,l[1]]:[u,l[1]]):s[c]=l[1]}o(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=an(t),t){const n=C.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return g1(i);if(C.isFunction(r))return r.call(this,i,n);if(C.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=an(t),t){const n=C.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ca(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function a(o){if(o=an(o),o){const s=C.findKey(n,o);s&&(!r||Ca(n,n[s],s,r))&&(delete n[s],i=!0)}}return C.isArray(t)?t.forEach(a):a(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const a=r[n];(!t||Ca(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const r=this,n={};return C.forEach(this,(i,a)=>{const o=C.findKey(n,a);if(o){r[o]=Xn(i),delete r[a];return}const s=t?_1(a):String(a).trim();s!==a&&delete r[a],r[s]=Xn(i),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return C.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&C.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
21
|
+
`)}getSetCookie(){const t=this.get("set-cookie");return C.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return y1(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Bl]=this[Bl]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=an(o);n[s]||(O1(i,o),n[s]=!0)}return C.isArray(t)?t.forEach(a):a(t),this}};We.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);C.reduceDescriptors(We.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});C.freezeMethods(We);const gi="[REDACTED ****]";function E1(e){if(C.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(C.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function S1(e,t){const r=new Set(t.map(a=>String(a).toLowerCase())),n=[],i=a=>{if(a===null||typeof a!="object"||C.isBuffer(a))return a;if(n.indexOf(a)!==-1)return;a instanceof We&&(a=a.toJSON()),n.push(a);let o;if(C.isArray(a))o=[],a.forEach((s,u)=>{const c=i(s);C.isUndefined(c)||(o[u]=c)});else{if(!C.isPlainObject(a)&&E1(a))return n.pop(),a;o=Object.create(null);for(const[s,u]of Object.entries(a)){const c=r.has(s.toLowerCase())?gi:i(u);C.isUndefined(c)||(o[s]=c)}}return n.pop(),o};return i(e)}function Hl(e){try{return String(e)}catch{return""}}function w1(e){return e.errors.map(r=>{try{return r&&r.message?Hl(r.message):Hl(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Y=class kg extends Error{static from(t,r,n,i,a,o){let s=t.message;!s&&C.isArray(t.errors)&&t.errors.length&&(s=w1(t));const u=new kg(s,r||t.code,n,i,a);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,t.status!=null&&u.status==null&&(u.status=t.status),o&&Object.assign(u,o),u}constructor(t,r,n,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,r=t&&C.hasOwnProp(t,"redact")?t.redact:void 0,n=C.isArray(r)&&r.length>0?S1(t,r):C.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const A1=null,Ug=100;function Ws(e){return C.isPlainObject(e)||C.isArray(e)}function Vg(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function ja(e,t,r){return e?e.concat(t).map(function(i,a){return i=Vg(i),!r&&a?"["+i+"]":i}).join(r?".":""):t}function x1(e){return C.isArray(e)&&!e.some(Ws)}const T1=C.toFlatObject(C,{},null,function(t){return/^is[A-Z]/.test(t)});function $i(e,t,r){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(d,E)=>{const g=C.getSafeProp(r,d);return C.isUndefined(g)?E:g},i=n("metaTokens",!0),a=n("visitor")||b,o=n("dots",!1),s=n("indexes",!1),u=n("Blob")||typeof Blob<"u"&&Blob,c=n("maxDepth",Ug),l=u&&C.isSpecCompliantForm(t),f=[];if(!C.isFunction(a))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(C.isDate(d))return d.toISOString();if(C.isBoolean(d))return d.toString();if(!l&&C.isBlob(d))throw new Y("Blob is not supported. Use a Buffer instead.");if(C.isArrayBuffer(d)||C.isTypedArray(d)){if(l&&typeof u=="function")return new u([d]);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return d}function y(d){if(d>c)throw new Y("Object is too deeply nested ("+d+" levels). Max depth: "+c,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(d,E){if(c===1/0)return JSON.stringify(d);const g=[];return JSON.stringify(d,function(O,A){if(!C.isObject(A))return A;for(;g.length&&g[g.length-1]!==this;)g.pop();return g.push(A),y(E+g.length-1),A})}function b(d,E,g){let v=d;if(C.isReactNative(t)&&C.isReactNativeBlob(d))return t.append(ja(g,E,o),p(d)),!1;if(d&&!g&&typeof d=="object"){if(C.endsWith(E,"{}"))E=i?E:E.slice(0,-2),d=h(d,1);else if(C.isArray(d)&&x1(d)||(C.isFileList(d)||C.endsWith(E,"[]"))&&(v=C.toArray(d)))return E=Vg(E),v.forEach(function(A,S){!(C.isUndefined(A)||A===null)&&t.append(s===!0?ja([E],S,o):s===null?E:E+"[]",p(A))}),!1}return Ws(d)?!0:(t.append(ja(g,E,o),p(d)),!1)}const _=Object.assign(T1,{defaultVisitor:b,convertValue:p,isVisitable:Ws});function m(d,E,g=0){if(!C.isUndefined(d)){if(y(g),f.indexOf(d)!==-1)throw new Error("Circular reference detected in "+E.join("."));f.push(d),C.forEach(d,function(O,A){(!(C.isUndefined(O)||O===null)&&a.call(t,O,C.isString(A)?A.trim():A,E,_))===!0&&m(O,E?E.concat(A):[A],g+1)}),f.pop()}}if(!C.isObject(e))throw new TypeError("data must be an object");return m(e),t}function Wl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Au(e,t){this._pairs=[],e&&$i(e,this,t)}const qg=Au.prototype;qg.append=function(t,r){this._pairs.push([t,r])};qg.toString=function(t){const r=t?n=>t.call(this,n,Wl):Wl;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function R1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bg(e,t,r){if(!t)return e;e=e||"";const n=C.isFunction(r)?{serialize:r}:r,i=C.getSafeProp(n,"encode")||R1,a=C.getSafeProp(n,"serialize");let o;if(a?o=a(t,n):o=C.isURLSearchParams(t)?t.toString():new Au(t,n).toString(i),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const on=Symbol("internals");function Hg(e){return e?e.length:0}function Gl(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function sn(e,t){const r=e.handlers,n=Hg(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(a,o){r[a.index]!==a.handler&&t.handlerEntries.delete(o)}):t.handlerEntries.clear()),t.handlersLength=n}class zl{constructor(){this.handlers=[],this[on]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,r,n){const i={fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},a=this[on];this.handlers==null&&(this.handlers=[]),sn(this,a);const o=a.nextId++;return this.handlers.push(i),a.handlerEntries.set(o,{handler:i,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,o}eject(t){const r=this[on];sn(this,r);const n=r.handlerEntries.get(t);if(n){if(r.handlerEntries.delete(t),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,r.iterationDepth||(Gl(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],sn(this,this[on]))}forEach(t){const r=this[on];sn(this,r),r.iterationDepth++;try{C.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--r.iterationDepth||(sn(this,r),Gl(this.handlers),r.handlersLength=Hg(this.handlers))}}}const xu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},P1=typeof URLSearchParams<"u"?URLSearchParams:Au,C1=typeof FormData<"u"?FormData:null,j1=typeof Blob<"u"?Blob:null,I1={isBrowser:!0,classes:{URLSearchParams:P1,FormData:C1,Blob:j1},protocols:["http","https","file","blob","url","data"]},Tu=typeof window<"u"&&typeof document<"u",Gs=typeof navigator=="object"&&navigator||void 0,N1=Tu&&(!Gs||["ReactNative","NativeScript","NS"].indexOf(Gs.product)<0),L1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",D1=Tu&&window.location.href||"http://localhost",F1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Tu,hasStandardBrowserEnv:N1,hasStandardBrowserWebWorkerEnv:L1,navigator:Gs,origin:D1},Symbol.toStringTag,{value:"Module"})),ke={...F1,...I1};function $1(e,t){return $i(e,new ke.classes.URLSearchParams,{visitor:function(r,n,i,a){return ke.isNode&&C.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const Kl=Ug;function Wg(e){if(e>Kl)throw new Y("FormData field is too deeply nested ("+e+" levels). Max depth: "+Kl,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function M1(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)Wg(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function k1(e){const t={},r=Object.keys(e);let n;const i=r.length;let a;for(n=0;n<i;n++)a=r[n],t[a]=e[a];return t}function Gg(e){function t(r,n,i,a){Wg(a);let o=r[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),u=a>=r.length;return o=!o&&C.isArray(i)?i.length:o,u?(C.hasOwnProp(i,o)?i[o]=C.isArray(i[o])?i[o].concat(n):[i[o],n]:i[o]=n,!s):((!C.hasOwnProp(i,o)||!C.isObject(i[o]))&&(i[o]=[]),t(r,n,i[o],a)&&C.isArray(i[o])&&(i[o]=k1(i[o])),!s)}if(C.isFormData(e)&&C.isFunction(e.entries)){const r={};return C.forEachEntry(e,(n,i)=>{t(M1(n),i,r,0)}),r}return null}const zg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),xr=(e,t)=>e!=null&&C.hasOwnProp(e,t)?e[t]:void 0;function U1(e,t,r){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const In={transitional:xu,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,a=C.isObject(t);if(a&&C.isHTMLForm(t)&&(t=new FormData(t)),C.isFormData(t))return i?JSON.stringify(Gg(t)):t;if(C.isArrayBuffer(t)||C.isBuffer(t)||C.isStream(t)||C.isFile(t)||C.isBlob(t)||C.isReadableStream(t))return t;if(C.isArrayBufferView(t))return t.buffer;if(C.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){const u=xr(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return $1(t,u).toString();if((s=C.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=xr(this,"env"),l=c&&c.FormData;return $i(s?{"files[]":t}:t,l&&new l,u)}}return a||i?(r.setContentType("application/json",!1),U1(t)):t}],transformResponse:[function(t){const r=xr(this,"transitional")||In.transitional,n=r&&r.forcedJSONParsing,i=xr(this,"responseType"),a=i==="json";if(C.isResponse(t)||C.isReadableStream(t))return t;if(t&&C.isString(t)&&(n&&!i||a)){const s=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t,xr(this,"parseReviver"))}catch(u){if(s)throw u.name==="SyntaxError"?Y.from(u,Y.ERR_BAD_RESPONSE,this,null,xr(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ke.classes.FormData,Blob:ke.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(zg,e=>{In.headers[e]={}});function Ia(e,t){const r=this||In,n=t||r,i=We.from(n.headers);let a=n.data;return C.forEach(e,function(s){a=s.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Kg(e){return!!(e&&e.__CANCEL__)}let Nn=class extends Y{constructor(t,r,n){super(t??"canceled",Y.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function Yg(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Y("Request failed with status code "+r.status,r.status>=400&&r.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,r.config,r.request,r))}const V1=/[\t\n\r]/g;function Jg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(V1,"")}function Na(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function q1(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),l=n[a];o||(o=c),r[i]=u,n[i]=c;let f=a,p=0;for(;f!==i;)p+=r[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const y=l&&c-l;return y?Math.round(p*1e3/y):void 0}}function B1(e,t){let r=0,n=1e3/t,i,a;const o=(l,f=Date.now())=>{r=f,i=null,a&&(clearTimeout(a),a=null),e(...l)};return[(...l)=>{const f=Date.now(),p=f-r;p>=n?o(l,f):(i=l,a||(a=setTimeout(()=>{a=null,o(i)},n-p)))},()=>i&&o(i),(...l)=>o(l)]}const mi=(e,t,r=3)=>{let n=0;const i=q1(50,250);return B1(a=>{if(!a||!C.isNumber(a.loaded))return;const o=a.loaded,s=a.lengthComputable?a.total:void 0,u=Math.max(0,s!=null?Math.min(o,s):o),c=Math.max(0,u-n),l=i(c);n=Math.max(n,u);const f={loaded:u,total:s,progress:s?u/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s?(s-u)/l:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},r)},Yl=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Jl=(e,t=C.asap)=>(...r)=>t(()=>e(...r)),H1=ke.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ke.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ke.origin),ke.navigator&&/(msie|trident)/i.test(ke.navigator.userAgent)):()=>!0,W1=ke.hasStandardBrowserEnv?{write(e,t,r,n,i,a,o){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];C.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),C.isString(n)&&s.push(`path=${n}`),C.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push("secure"),C.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),i=n.indexOf("=");if(i!==-1&&n.slice(0,i)===e)try{return decodeURIComponent(n.slice(i+1))}catch{return n.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function G1(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z1(e,t){if(!t)return e;let r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const K1=/^https?:(?!\/\/)/i;function Y1(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${gi}`)}function J1(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${gi}@`),r=t.indexOf("#"),i=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${gi}`);return r===-1?i:`${i}#${Y1(t.slice(r+1))}`}function Zl(e,t){if(typeof e=="string"){const r=Jg(e);if(K1.test(r))throw new Y(`Invalid URL ${JSON.stringify(J1(r))}: missing "//" after protocol`,Y.ERR_INVALID_URL,t)}}function Zg(e,t,r,n){Zl(t,n);let i=!G1(t);return e&&(i||r===!1)?(Zl(e,n),z1(e,t)):t}const Ql=e=>e instanceof We?{...e}:e,Z1=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function pr(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(l,f,p,y){return C.isPlainObject(l)&&C.isPlainObject(f)?C.merge.call({caseless:y},l,f):C.isPlainObject(f)?C.merge({},f):C.isArray(f)?f.slice():f}function i(l,f,p,y){if(C.isUndefined(f)){if(!C.isUndefined(l))return n(void 0,l,p,y)}else return n(l,f,p,y)}function a(l,f){if(!C.isUndefined(f))return n(void 0,f)}function o(l,f){if(C.isUndefined(f)){if(!C.isUndefined(l))return n(void 0,l)}else return n(void 0,f)}function s(l){const f=C.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!C.isUndefined(f))if(C.isPlainObject(f)){if(C.hasOwnProp(f,l))return f[l]}else return;const p=C.hasOwnProp(e,"transitional")?e.transitional:void 0;if(C.isPlainObject(p)&&C.hasOwnProp(p,l))return p[l]}function u(l,f,p){if(C.hasOwnProp(t,p))return n(l,f);if(C.hasOwnProp(e,p))return n(void 0,l)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:u,headers:(l,f,p)=>i(Ql(l),Ql(f),p,!0)};return C.forEach(Z1({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=C.hasOwnProp(c,f)?c[f]:i,y=C.hasOwnProp(e,f)?e[f]:void 0,h=C.hasOwnProp(t,f)?t[f]:void 0,b=p(y,h,f);C.isUndefined(b)&&p!==u||(r[f]=b)}),C.hasOwnProp(t,"validateStatus")&&C.isUndefined(t.validateStatus)&&s("validateStatusUndefinedResolves")===!1&&(C.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const Q1=["content-type","content-length"];function X1(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,i])=>{Q1.includes(n.toLowerCase())&&e.set(n,i)})}const ex=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function Qg(e){const t=pr({},e),r=p=>C.hasOwnProp(t,p)?t[p]:void 0,n=r("data");let i=r("withXSRFToken");const a=r("xsrfHeaderName"),o=r("xsrfCookieName");let s=r("headers");const u=r("auth"),c=r("baseURL"),l=r("allowAbsoluteUrls"),f=r("url");if(t.headers=s=We.from(s),t.url=Bg(Zg(c,f,l,t),r("params"),r("paramsSerializer")),u){const p=C.getSafeProp(u,"username")||"",y=C.getSafeProp(u,"password")||"";try{s.set("Authorization","Basic "+btoa(p+":"+(y?ex(y):"")))}catch(h){throw Y.from(h,Y.ERR_BAD_OPTION_VALUE,e)}}if(C.isFormData(n)){const p=C.getSafeProp(n,"getHeaders");ke.hasStandardBrowserEnv||ke.hasStandardBrowserWebWorkerEnv||C.isReactNative(n)?s.setContentType(void 0):C.isFunction(p)&&X1(s,p.call(n),r("formDataHeaderPolicy"))}if(ke.hasStandardBrowserEnv&&(C.isFunction(i)&&(i=i(t)),i===!0||i==null&&H1(t.url))){const y=a&&o&&W1.read(o);y&&s.set(a,y)}return t}const tx=typeof XMLHttpRequest<"u",rx=tx&&function(e){return new Promise(function(r,n){const i=Qg(e);let a=i.data;const o=We.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:c}=i,l,f,p,y,h,b;function _(){y&&y(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function d(g){if(!m)return;if(m.status===0&&(Na(Jg(i.url))||Na(ke.origin))!=="file"&&!(m.responseURL&&m.responseURL.startsWith("file:"))){n(new Y("Request aborted",Y.ECONNABORTED,e,m)),_(),m=null;return}try{g?b&&b(g):h&&h()}catch(S){setTimeout(()=>{throw S})}if(!m)return;const v=We.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:v,config:e,request:m};Yg(function(T){r(T),_()},function(T){n(T),_()},A),m=null}"onloadend"in m?m.onloadend=d:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.startsWith("file:"))||setTimeout(d)},m.onabort=function(){m&&(n(new Y("Request aborted",Y.ECONNABORTED,e,m)),_(),m=null)},m.onerror=function(v){const O=v&&v.message?v.message:"Network Error",A=new Y(O,Y.ERR_NETWORK,e,m);A.event=v||null,n(A),_(),m=null},m.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const O=i.transitional||xu;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),n(new Y(v,O.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),_(),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&C.forEach(Mg(o),function(v,O){m.setRequestHeader(O,v)}),C.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),s&&s!=="json"&&(m.responseType=i.responseType),c&&([p,h,b]=mi(c,!0),m.addEventListener("progress",p)),u&&m.upload&&([f,y]=mi(u),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(l=g=>{m&&(n(!g||g.type?new Nn(null,e,m):g),m.abort(),_(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const E=Na(i.url);if(E&&!ke.protocols.includes(E)){n(new Y("Unsupported protocol "+E+":",Y.ERR_BAD_REQUEST,e)),_();return}m.send(a||null)})},nx=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const i=function(u){if(!n){n=!0,o();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Y?c:new Nn(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>{if(!n){if(u.aborted){i.call(u);return}u.addEventListener("abort",i,{once:!0})}});const{signal:s}=r;return s.unsubscribe=()=>C.asap(o),s},ix=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},ax=async function*(e,t){for await(const r of ox(e))yield*ix(r,t)},ox=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Xl=(e,t,r,n)=>{const i=ax(e,t);let a=0,o,s=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:l}=await i.next();if(c){s(),u.close();return}let f=l.byteLength;if(r){let p=a+=f;r(p)}u.enqueue(new Uint8Array(l))}catch(c){throw s(c),c}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},ef=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Xg=(e,t,r)=>t+2<r&&ef(e.charCodeAt(t+1))&&ef(e.charCodeAt(t+2)),tf=e=>e<=57?e-48:(e&223)-55,sx=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ux=e=>e===9||e===10||e===12||e===13||e===32,cx=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},lx=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},fx=e=>{const t=e.length;let r=0,n=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&Xg(e,a,t)&&(o=tf(e.charCodeAt(a+1))*16+tf(e.charCodeAt(a+2)),a+=2),!ux(o)){if(o===61){n++;continue}if(!sx(o)||n>0){i=!0;continue}r++}}return i||n>2||n>0&&(r+n)%4!==0||r%4===1?lx(e):cx(r)},dx=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let o=0;for(let s=0,u=i.length;s<u;s++){const c=i.charCodeAt(s);if(c===37&&Xg(i,s,u))o+=1,s+=2;else if(c<128)o+=1;else if(c<2048)o+=2;else if(c>=55296&&c<=56319&&s+1<u){const l=i.charCodeAt(s+1);l>=56320&&l<=57343?(o+=4,s++):o+=3}else o+=3}return o};function px(e){const t=typeof e=="string"?e.indexOf("#"):-1;return dx(t===-1?e:e.slice(0,t),fx)}const Ru="1.20.0",rf=64*1024,hx={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Wn}=C,gx=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),nf=e=>{if(!C.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},af=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mx=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},vx=e=>{const t=C.global!==void 0&&C.global!==null?C.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=C.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,s=i?Wn(i):typeof fetch=="function",u=Wn(a),c=Wn(o);if(!s)return!1;const l=s&&Wn(r),f=s&&(typeof n=="function"?(m=>d=>m.encode(d))(new n):async m=>new Uint8Array(await new a(m).arrayBuffer())),p=u&&l&&af(()=>{let m=!1;const d=new a(ke.origin,{body:new r,method:"POST",get duplex(){return m=!0,"half"}}),E=d.headers.has("Content-Type");return d.body!=null&&d.body.cancel(),m&&!E}),y=c&&l&&af(()=>C.isReadableStream(new o("").body)),h={stream:y&&(m=>m.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!h[m]&&(h[m]=(d,E)=>{let g=d&&d[m];if(g)return g.call(d);throw new Y(`Response type '${m}' is not supported`,Y.ERR_NOT_SUPPORT,E)})});const b=async m=>{if(m==null)return 0;if(C.isBlob(m))return m.size;if(C.isSpecCompliantForm(m))return(await new a(ke.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(C.isArrayBufferView(m)||C.isArrayBuffer(m))return m.byteLength;if(C.isURLSearchParams(m)&&(m=m+""),C.isString(m))return(await f(m)).byteLength},_=async(m,d)=>{const E=C.toFiniteNumber(m.getContentLength());return E??b(d)};return async m=>{let{url:d,method:E,data:g,signal:v,cancelToken:O,timeout:A,onDownloadProgress:S,onUploadProgress:T,responseType:P,headers:N,withCredentials:M="same-origin",fetchOptions:U,maxContentLength:F,maxBodyLength:D,maxRedirects:$}=Qg(m);const B=C.isNumber(F)&&F>-1,k=C.isNumber(D)&&D>-1,Q=re=>C.hasOwnProp(m,re)?m[re]:void 0;let K=i||fetch;P=P?(P+"").toLowerCase():"text";let ee=nx([v,O&&O.toAbortSignal()],A),G=null;const ne=ee&&ee.unsubscribe&&(()=>{ee.unsubscribe()});let te,ce=null;const ue=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,m,G);try{let re;const le=Q("auth");if(le){const ie=C.getSafeProp(le,"username")||"",Ae=C.getSafeProp(le,"password")||"";re={username:ie,password:Ae}}if(mx(d)){const ie=new URL(d,ke.origin);if(!re&&(ie.username||ie.password)){const Ae=nf(ie.username),at=nf(ie.password);re={username:Ae,password:at}}(ie.username||ie.password)&&(ie.username="",ie.password="",d=ie.href)}if(re&&(N.delete("authorization"),N.set("Authorization","Basic "+btoa(gx((re.username||"")+":"+(re.password||""))))),B&&typeof d=="string"&&d.startsWith("data:")&&px(d)>F)throw new Y("maxContentLength size of "+F+" exceeded",Y.ERR_BAD_RESPONSE,m,G);if(k&&E!=="get"&&E!=="head"){const ie=await b(g);if(typeof ie=="number"&&isFinite(ie)&&(te=ie,ie>D))throw ue()}const _e=k&&(C.isReadableStream(g)||C.isStream(g)),de=(ie,Ae,at)=>Xl(ie,rf,ot=>{if(k&&ot>D)throw ce=ue();Ae&&Ae(ot)},at);if(p&&E!=="get"&&E!=="head"&&(T||_e)){if(te=te??await _(N,g),te!==0||_e){let ie=new a(d,{method:"POST",body:g,duplex:"half"}),Ae;if(C.isFormData(g)&&(Ae=ie.headers.get("content-type"))&&N.setContentType(Ae),ie.body){const[at,ot]=T&&Yl(te,mi(Jl(T)))||[];g=de(ie.body,at,ot)}}}else if(_e&&!u&&l&&E!=="get"&&E!=="head")g=de(g);else if(_e&&u&&!p&&E!=="get"&&E!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,m,G);C.isString(M)||(M=M?"include":"omit");const ae=u&&"credentials"in a.prototype;if(C.isFormData(g)){const ie=N.getContentType();ie&&/^multipart\/form-data/i.test(ie)&&!/boundary=/i.test(ie)&&N.delete("content-type")}N.set("User-Agent","axios/"+Ru,!1);const fe=U==null?U:Object.assign(Object.create(null),U);fe&&(delete fe.body,delete fe.headers,delete fe.method,delete fe.signal,delete fe.duplex,delete fe.credentials);const he=Object.assign(Object.create(null),fe,{signal:ee,method:E.toUpperCase(),headers:Mg(N.normalize()),body:g,duplex:"half",credentials:ae?M:void 0});u&&(C.forEach(hx,(ie,Ae)=>{he[Ae]===void 0&&(he[Ae]=ie)}),he.signal===void 0&&(he.signal=null),he.body===void 0&&(he.body=null)),$===0&&(he.redirect="manual",fe&&(fe.redirect="manual")),G=u&&new a(d,he);let je=await(u?K(G,fe):K(d,he));const It=We.from(je.headers);if(B){const ie=C.toFiniteNumber(It.getContentLength());if(ie!=null&&ie>F)throw new Y("maxContentLength size of "+F+" exceeded",Y.ERR_BAD_RESPONSE,m,G)}const Xe=y&&(P==="stream"||P==="response");if(y&&je.body&&(S||B||Xe&&ne)){const ie={};["status","statusText","headers"].forEach(St=>{ie[St]=je[St]});const Ae=C.toFiniteNumber(It.getContentLength()),[at,ot]=S&&Yl(Ae,mi(Jl(S),!0))||[];let kt=0;const Or=St=>{if(B&&(kt=St,kt>F))throw new Y("maxContentLength size of "+F+" exceeded",Y.ERR_BAD_RESPONSE,m,G);at&&at(St)};je=new o(Xl(je.body,rf,Or,()=>{ot&&ot(),ne&&ne()}),ie)}P=P||"text";let ze=await h[C.findKey(h,P)||"text"](je,m);if(B&&!y&&!Xe){let ie;if(ze!=null&&(typeof ze.byteLength=="number"?ie=ze.byteLength:typeof ze.size=="number"?ie=ze.size:typeof ze=="string"&&(ie=typeof n=="function"?new n().encode(ze).byteLength:ze.length)),typeof ie=="number"&&ie>F)throw new Y("maxContentLength size of "+F+" exceeded",Y.ERR_BAD_RESPONSE,m,G)}return!Xe&&ne&&ne(),await new Promise((ie,Ae)=>{Yg(ie,Ae,{data:ze,headers:We.from(je.headers),status:je.status,statusText:je.statusText,config:m,request:G})})}catch(re){if(ne&&ne(),ee&&ee.aborted&&ee.reason instanceof Y){const le=ee.reason;throw le.config=m,G&&(le.request=G),re!==le&&Object.defineProperty(le,"cause",{__proto__:null,value:re,writable:!0,enumerable:!1,configurable:!0}),le}if(ce)throw G&&!ce.request&&(ce.request=G),ce;if(re instanceof Y)throw G&&!re.request&&(re.request=G),re;if(re&&re.name==="TypeError"&&/Load failed|fetch/i.test(re.message)){const le=new Y("Network Error",Y.ERR_NETWORK,m,G,re&&re.response);throw Object.defineProperty(le,"cause",{__proto__:null,value:re.cause||re,writable:!0,enumerable:!1,configurable:!0}),le}throw Y.from(re,re&&re.code,m,G,re&&re.response)}}},yx=new Map,em=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,a=[n,i,r];let o=a.length,s=o,u,c,l=yx;for(;s--;)u=a[s],c=l.get(u),c===void 0&&l.set(u,c=s?new Map:vx(t)),l=c;return c};em();const Pu={http:A1,xhr:rx,fetch:{get:em}};C.forEach(Pu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const of=e=>`- ${e}`,bx=e=>C.isFunction(e)||e===null||e===!1;function _x(e,t){e=C.isArray(e)?e:[e];const{length:r}=e;let n,i;const a={};for(let o=0;o<r;o++){n=e[o];let s;if(i=n,!bx(n)&&(i=Pu[(s=String(n)).toLowerCase()],i===void 0))throw new Y(`Unknown adapter '${s}'`);if(i&&(C.isFunction(i)||(i=i.get(t))))break;a[s||"#"+o]=i}if(!i){const o=Object.entries(a).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=r?o.length>1?`since :
|
|
22
|
+
`+o.map(of).join(`
|
|
23
|
+
`):" "+of(o[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+s,Y.ERR_NOT_SUPPORT)}return i}const tm={getAdapter:_x,adapters:Pu};function La(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Nn(null,e)}function Da(e){const t=C.toSafeFlatObject(e);return La(t),t.headers=We.from(C.getSafeProp(t,"headers")),t.data=Ia.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tm.getAdapter(t.adapter||In.adapter,t)(t).then(function(i){La(t),t.response=i;try{i.data=Ia.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=We.from(i.headers),i},function(i){if(!Kg(i)&&(La(t),i&&i.response)){t.response=i.response;try{i.response.data=Ia.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=We.from(i.response.headers)}return Promise.reject(i)})}const Mi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const sf={};Mi.transitional=function(t,r,n){function i(a,o){return"[Axios v"+Ru+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,s)=>{if(t===!1)throw new Y(i(o," has been removed"+(r?" in "+r:"")),Y.ERR_DEPRECATED);return r&&!sf[o]&&(sf[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,o,s):!0}};Mi.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Ox(e,t,r){if(typeof e!="object"||e===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const a=n[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const s=e[a],u=s===void 0||o(s,a,e);if(u!==!0)throw new Y("option "+a+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Y("Unknown option "+a,Y.ERR_BAD_OPTION)}}const ei={assertOptions:Ox,validators:Mi},Ve=ei.validators;let cr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new zl,response:new zl}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack;let o="";if(typeof a=="string"){const s=a.indexOf(`
|
|
24
|
+
`);o=s===-1?"":a.slice(s+1)}if(!n.stack)n.stack=o;else if(o){const s=o.indexOf(`
|
|
25
|
+
`),u=s===-1?-1:o.indexOf(`
|
|
26
|
+
`,s+1),c=u===-1?"":o.slice(u+1);String(n.stack).endsWith(c)||(n.stack+=`
|
|
27
|
+
`+o)}}catch{}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=pr(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:a}=r;n!==void 0&&ei.assertOptions(n,{silentJSONParsing:Ve.transitional(Ve.boolean),forcedJSONParsing:Ve.transitional(Ve.boolean),clarifyTimeoutError:Ve.transitional(Ve.boolean),legacyInterceptorReqResOrdering:Ve.transitional(Ve.boolean),advertiseZstdAcceptEncoding:Ve.transitional(Ve.boolean),validateStatusUndefinedResolves:Ve.transitional(Ve.boolean)},!1),i!=null&&(C.isFunction(i)?r.paramsSerializer={serialize:i}:ei.assertOptions(i,{encode:Ve.function,serialize:Ve.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ei.assertOptions(r,{baseUrl:Ve.spelling("baseURL"),withXsrfToken:Ve.spelling("withXSRFToken")},!0),r.method=(C.getSafeProp(r,"method")||C.getSafeProp(this.defaults,"method")||"get").toLowerCase();let o=a&&C.merge(a.common,a[r.method]);a&&C.forEach(zg.concat("common"),h=>{delete a[h]}),r.headers=We.concat(o,a);const s=[];let u=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(r)===!1)return;u=u&&b.synchronous;const _=r.transitional||xu;_&&_.legacyInterceptorReqResOrdering?s.unshift(b.fulfilled,b.rejected):s.push(b.fulfilled,b.rejected)});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let l,f=0,p;if(!u){const h=[Da.bind(this),void 0];for(h.unshift(...s),h.push(...c),p=h.length,l=Promise.resolve(r);f<p;)l=l.then(h[f++],h[f++]);return l}p=s.length;let y=r;for(;f<p;){const h=s[f++],b=s[f++];try{y=h?h(y):y}catch(_){if(!b){l=Promise.reject(_);break}try{const m=b.call(this,_);C.isThenable(m)&&(l=Promise.resolve(m).then(()=>Da.call(this,y)))}catch(m){l=Promise.reject(m)}break}}if(!l)try{l=Da.call(this,y)}catch(h){l=Promise.reject(h)}for(f=0,p=c.length;f<p;)l=l.then(c[f++],c[f++]);return l}getUri(t){t=pr(this.defaults,t);const r=Zg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Bg(r,t.params,t.paramsSerializer)}};C.forEach(["delete","get","head","options"],function(t){cr.prototype[t]=function(r,n){return this.request(pr(n||{},{method:t,url:r,data:n&&C.hasOwnProp(n,"data")?n.data:void 0}))}});C.forEach(["post","put","patch","query"],function(t){function r(n){return function(a,o,s){return this.request(pr(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}cr.prototype[t]=r(),t!=="query"&&(cr.prototype[t+"Form"]=r(!0))});let Ex=class rm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(i=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](i);n._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{n.subscribe(s),a=s}).then(i);return o.cancel=function(){n.unsubscribe(a)},o},t(function(a,o,s){n.reason||(n.reason=new Nn(a,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new rm(function(i){t=i}),cancel:t}}};function Sx(e){return function(r){return e.apply(null,r)}}function wx(e){return C.isObject(e)&&e.isAxiosError===!0}const ti={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ti).forEach(([e,t])=>{ti[t]===void 0&&(ti[t]=e)});function nm(e){const t=new cr(e),r=Tg(cr.prototype.request,t);return C.extend(r,cr.prototype,t,{allOwnKeys:!0}),C.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return nm(pr(e,i))},r}const Ne=nm(In);Ne.Axios=cr;Ne.CanceledError=Nn;Ne.CancelToken=Ex;Ne.isCancel=Kg;Ne.VERSION=Ru;Ne.toFormData=$i;Ne.AxiosError=Y;Ne.Cancel=Ne.CanceledError;Ne.all=function(t){return Promise.all(t)};Ne.spread=Sx;Ne.isAxiosError=wx;Ne.mergeConfig=pr;Ne.AxiosHeaders=We;Ne.formToJSON=e=>Gg(C.isHTMLForm(e)?new FormData(e):e);Ne.getAdapter=tm.getAdapter;Ne.HttpStatusCode=ti;Ne.default=Ne;const{Axios:s$,AxiosError:u$,CanceledError:c$,isCancel:l$,CancelToken:f$,VERSION:d$,all:p$,Cancel:h$,isAxiosError:g$,spread:m$,toFormData:v$,AxiosHeaders:y$,HttpStatusCode:b$,formToJSON:_$,getAdapter:O$,mergeConfig:E$,create:S$}=Ne;w.createContext(null);w.createContext({});var uf;(function(e){e.GROUP="group",e.PRODUCT="product"})(uf||(uf={}));var cf;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.INVALID=1]="INVALID",e[e.VALID=2]="VALID"})(cf||(cf={}));class Ax extends Error{}Ax.prototype.name="InvalidTokenError";var Gn={exports:{}},lf;function xx(){if(lf)return Gn.exports;lf=1;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(v,O,A){return Function.prototype.apply.call(v,O,A)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:r=function(v){return Object.getOwnPropertyNames(v)};function n(g){console&&console.warn&&console.warn(g)}var i=Number.isNaN||function(v){return v!==v};function a(){a.init.call(this)}Gn.exports=a,Gn.exports.once=m,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(g){if(typeof g!="number"||g<0||i(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");o=g}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||i(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function u(g){return g._maxListeners===void 0?a.defaultMaxListeners:g._maxListeners}a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(v){for(var O=[],A=1;A<arguments.length;A++)O.push(arguments[A]);var S=v==="error",T=this._events;if(T!==void 0)S=S&&T.error===void 0;else if(!S)return!1;if(S){var P;if(O.length>0&&(P=O[0]),P instanceof Error)throw P;var N=new Error("Unhandled error."+(P?" ("+P.message+")":""));throw N.context=P,N}var M=T[v];if(M===void 0)return!1;if(typeof M=="function")t(M,this,O);else for(var U=M.length,F=h(M,U),A=0;A<U;++A)t(F[A],this,O);return!0};function c(g,v,O,A){var S,T,P;if(s(O),T=g._events,T===void 0?(T=g._events=Object.create(null),g._eventsCount=0):(T.newListener!==void 0&&(g.emit("newListener",v,O.listener?O.listener:O),T=g._events),P=T[v]),P===void 0)P=T[v]=O,++g._eventsCount;else if(typeof P=="function"?P=T[v]=A?[O,P]:[P,O]:A?P.unshift(O):P.push(O),S=u(g),S>0&&P.length>S&&!P.warned){P.warned=!0;var N=new Error("Possible EventEmitter memory leak detected. "+P.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");N.name="MaxListenersExceededWarning",N.emitter=g,N.type=v,N.count=P.length,n(N)}return g}a.prototype.addListener=function(v,O){return c(this,v,O,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(v,O){return c(this,v,O,!0)};function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(g,v,O){var A={fired:!1,wrapFn:void 0,target:g,type:v,listener:O},S=l.bind(A);return S.listener=O,A.wrapFn=S,S}a.prototype.once=function(v,O){return s(O),this.on(v,f(this,v,O)),this},a.prototype.prependOnceListener=function(v,O){return s(O),this.prependListener(v,f(this,v,O)),this},a.prototype.removeListener=function(v,O){var A,S,T,P,N;if(s(O),S=this._events,S===void 0)return this;if(A=S[v],A===void 0)return this;if(A===O||A.listener===O)--this._eventsCount===0?this._events=Object.create(null):(delete S[v],S.removeListener&&this.emit("removeListener",v,A.listener||O));else if(typeof A!="function"){for(T=-1,P=A.length-1;P>=0;P--)if(A[P]===O||A[P].listener===O){N=A[P].listener,T=P;break}if(T<0)return this;T===0?A.shift():b(A,T),A.length===1&&(S[v]=A[0]),S.removeListener!==void 0&&this.emit("removeListener",v,N||O)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(v){var O,A,S;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[v]),this;if(arguments.length===0){var T=Object.keys(A),P;for(S=0;S<T.length;++S)P=T[S],P!=="removeListener"&&this.removeAllListeners(P);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(O=A[v],typeof O=="function")this.removeListener(v,O);else if(O!==void 0)for(S=O.length-1;S>=0;S--)this.removeListener(v,O[S]);return this};function p(g,v,O){var A=g._events;if(A===void 0)return[];var S=A[v];return S===void 0?[]:typeof S=="function"?O?[S.listener||S]:[S]:O?_(S):h(S,S.length)}a.prototype.listeners=function(v){return p(this,v,!0)},a.prototype.rawListeners=function(v){return p(this,v,!1)},a.listenerCount=function(g,v){return typeof g.listenerCount=="function"?g.listenerCount(v):y.call(g,v)},a.prototype.listenerCount=y;function y(g){var v=this._events;if(v!==void 0){var O=v[g];if(typeof O=="function")return 1;if(O!==void 0)return O.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function h(g,v){for(var O=new Array(v),A=0;A<v;++A)O[A]=g[A];return O}function b(g,v){for(;v+1<g.length;v++)g[v]=g[v+1];g.pop()}function _(g){for(var v=new Array(g.length),O=0;O<v.length;++O)v[O]=g[O].listener||g[O];return v}function m(g,v){return new Promise(function(O,A){function S(P){g.removeListener(v,T),A(P)}function T(){typeof g.removeListener=="function"&&g.removeListener("error",S),O([].slice.call(arguments))}E(g,v,T,{once:!0}),v!=="error"&&d(g,S,{once:!0})})}function d(g,v,O){typeof g.on=="function"&&E(g,"error",v,O)}function E(g,v,O,A){if(typeof g.on=="function")A.once?g.once(v,O):g.on(v,O);else if(typeof g.addEventListener=="function")g.addEventListener(v,function S(T){A.once&&g.removeEventListener(v,S),O(T)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g)}return Gn.exports}var Tx=xx(),Fa,ff;function Rx(){if(ff)return Fa;ff=1;function e(){this.__data__=[],this.size=0}return Fa=e,Fa}var $a,df;function im(){if(df)return $a;df=1;function e(t,r){return t===r||t!==t&&r!==r}return $a=e,$a}var Ma,pf;function ki(){if(pf)return Ma;pf=1;var e=im();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Ma=t,Ma}var ka,hf;function Px(){if(hf)return ka;hf=1;var e=ki(),t=Array.prototype,r=t.splice;function n(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():r.call(a,o,1),--this.size,!0}return ka=n,ka}var Ua,gf;function Cx(){if(gf)return Ua;gf=1;var e=ki();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Ua=t,Ua}var Va,mf;function jx(){if(mf)return Va;mf=1;var e=ki();function t(r){return e(this.__data__,r)>-1}return Va=t,Va}var qa,vf;function Ix(){if(vf)return qa;vf=1;var e=ki();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return qa=t,qa}var Ba,yf;function Ui(){if(yf)return Ba;yf=1;var e=Rx(),t=Px(),r=Cx(),n=jx(),i=Ix();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,Ba=a,Ba}var Ha,bf;function Nx(){if(bf)return Ha;bf=1;var e=Ui();function t(){this.__data__=new e,this.size=0}return Ha=t,Ha}var Wa,_f;function Lx(){if(_f)return Wa;_f=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return Wa=e,Wa}var Ga,Of;function Dx(){if(Of)return Ga;Of=1;function e(t){return this.__data__.get(t)}return Ga=e,Ga}var za,Ef;function Fx(){if(Ef)return za;Ef=1;function e(t){return this.__data__.has(t)}return za=e,za}var Ka,Sf;function am(){if(Sf)return Ka;Sf=1;var e=typeof Tr=="object"&&Tr&&Tr.Object===Object&&Tr;return Ka=e,Ka}var Ya,wf;function Mt(){if(wf)return Ya;wf=1;var e=am(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Ya=r,Ya}var Ja,Af;function Cu(){if(Af)return Ja;Af=1;var e=Mt(),t=e.Symbol;return Ja=t,Ja}var Za,xf;function $x(){if(xf)return Za;xf=1;var e=Cu(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=r.call(o,i),u=o[i];try{o[i]=void 0;var c=!0}catch{}var l=n.call(o);return c&&(s?o[i]=u:delete o[i]),l}return Za=a,Za}var Qa,Tf;function Mx(){if(Tf)return Qa;Tf=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Qa=r,Qa}var Xa,Rf;function Vi(){if(Rf)return Xa;Rf=1;var e=Cu(),t=$x(),r=Mx(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:n:a&&a in Object(s)?t(s):r(s)}return Xa=o,Xa}var eo,Pf;function om(){if(Pf)return eo;Pf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return eo=e,eo}var to,Cf;function sm(){if(Cf)return to;Cf=1;var e=Vi(),t=om(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var u=e(s);return u==n||u==i||u==r||u==a}return to=o,to}var ro,jf;function kx(){if(jf)return ro;jf=1;var e=Mt(),t=e["__core-js_shared__"];return ro=t,ro}var no,If;function Ux(){if(If)return no;If=1;var e=kx(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return no=r,no}var io,Nf;function um(){if(Nf)return io;Nf=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return io=r,io}var ao,Lf;function Vx(){if(Lf)return ao;Lf=1;var e=sm(),t=Ux(),r=om(),n=um(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,l=RegExp("^"+u.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||t(p))return!1;var y=e(p)?l:a;return y.test(n(p))}return ao=f,ao}var oo,Df;function qx(){if(Df)return oo;Df=1;function e(t,r){return t?.[r]}return oo=e,oo}var so,Ff;function $r(){if(Ff)return so;Ff=1;var e=Vx(),t=qx();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return so=r,so}var uo,$f;function ju(){if($f)return uo;$f=1;var e=$r(),t=Mt(),r=e(t,"Map");return uo=r,uo}var co,Mf;function qi(){if(Mf)return co;Mf=1;var e=$r(),t=e(Object,"create");return co=t,co}var lo,kf;function Bx(){if(kf)return lo;kf=1;var e=qi();function t(){this.__data__=e?e(null):{},this.size=0}return lo=t,lo}var fo,Uf;function Hx(){if(Uf)return fo;Uf=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return fo=e,fo}var po,Vf;function Wx(){if(Vf)return po;Vf=1;var e=qi(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return n.call(o,a)?o[a]:void 0}return po=i,po}var ho,qf;function Gx(){if(qf)return ho;qf=1;var e=qi(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return ho=n,ho}var go,Bf;function zx(){if(Bf)return go;Bf=1;var e=qi(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return go=r,go}var mo,Hf;function Kx(){if(Hf)return mo;Hf=1;var e=Bx(),t=Hx(),r=Wx(),n=Gx(),i=zx();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,mo=a,mo}var vo,Wf;function Yx(){if(Wf)return vo;Wf=1;var e=Kx(),t=Ui(),r=ju();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return vo=n,vo}var yo,Gf;function Jx(){if(Gf)return yo;Gf=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return yo=e,yo}var bo,zf;function Bi(){if(zf)return bo;zf=1;var e=Jx();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return bo=t,bo}var _o,Kf;function Zx(){if(Kf)return _o;Kf=1;var e=Bi();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return _o=t,_o}var Oo,Yf;function Qx(){if(Yf)return Oo;Yf=1;var e=Bi();function t(r){return e(this,r).get(r)}return Oo=t,Oo}var Eo,Jf;function Xx(){if(Jf)return Eo;Jf=1;var e=Bi();function t(r){return e(this,r).has(r)}return Eo=t,Eo}var So,Zf;function eT(){if(Zf)return So;Zf=1;var e=Bi();function t(r,n){var i=e(this,r),a=i.size;return i.set(r,n),this.size+=i.size==a?0:1,this}return So=t,So}var wo,Qf;function cm(){if(Qf)return wo;Qf=1;var e=Yx(),t=Zx(),r=Qx(),n=Xx(),i=eT();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var c=o[s];this.set(c[0],c[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=r,a.prototype.has=n,a.prototype.set=i,wo=a,wo}var Ao,Xf;function tT(){if(Xf)return Ao;Xf=1;var e=Ui(),t=ju(),r=cm(),n=200;function i(a,o){var s=this.__data__;if(s instanceof e){var u=s.__data__;if(!t||u.length<n-1)return u.push([a,o]),this.size=++s.size,this;s=this.__data__=new r(u)}return s.set(a,o),this.size=s.size,this}return Ao=i,Ao}var xo,ed;function rT(){if(ed)return xo;ed=1;var e=Ui(),t=Nx(),r=Lx(),n=Dx(),i=Fx(),a=tT();function o(s){var u=this.__data__=new e(s);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=r,o.prototype.get=n,o.prototype.has=i,o.prototype.set=a,xo=o,xo}var To,td;function nT(){if(td)return To;td=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return To=t,To}var Ro,rd;function iT(){if(rd)return Ro;rd=1;function e(t){return this.__data__.has(t)}return Ro=e,Ro}var Po,nd;function aT(){if(nd)return Po;nd=1;var e=cm(),t=nT(),r=iT();function n(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return n.prototype.add=n.prototype.push=t,n.prototype.has=r,Po=n,Po}var Co,id;function oT(){if(id)return Co;id=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(t[n],n,t))return!0;return!1}return Co=e,Co}var jo,ad;function sT(){if(ad)return jo;ad=1;function e(t,r){return t.has(r)}return jo=e,jo}var Io,od;function lm(){if(od)return Io;od=1;var e=aT(),t=oT(),r=sT(),n=1,i=2;function a(o,s,u,c,l,f){var p=u&n,y=o.length,h=s.length;if(y!=h&&!(p&&h>y))return!1;var b=f.get(o),_=f.get(s);if(b&&_)return b==s&&_==o;var m=-1,d=!0,E=u&i?new e:void 0;for(f.set(o,s),f.set(s,o);++m<y;){var g=o[m],v=s[m];if(c)var O=p?c(v,g,m,s,o,f):c(g,v,m,o,s,f);if(O!==void 0){if(O)continue;d=!1;break}if(E){if(!t(s,function(A,S){if(!r(E,S)&&(g===A||l(g,A,u,c,f)))return E.push(S)})){d=!1;break}}else if(!(g===v||l(g,v,u,c,f))){d=!1;break}}return f.delete(o),f.delete(s),d}return Io=a,Io}var No,sd;function uT(){if(sd)return No;sd=1;var e=Mt(),t=e.Uint8Array;return No=t,No}var Lo,ud;function cT(){if(ud)return Lo;ud=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i,a){n[++r]=[a,i]}),n}return Lo=e,Lo}var Do,cd;function lT(){if(cd)return Do;cd=1;function e(t){var r=-1,n=Array(t.size);return t.forEach(function(i){n[++r]=i}),n}return Do=e,Do}var Fo,ld;function fT(){if(ld)return Fo;ld=1;var e=Cu(),t=uT(),r=im(),n=lm(),i=cT(),a=lT(),o=1,s=2,u="[object Boolean]",c="[object Date]",l="[object Error]",f="[object Map]",p="[object Number]",y="[object RegExp]",h="[object Set]",b="[object String]",_="[object Symbol]",m="[object ArrayBuffer]",d="[object DataView]",E=e?e.prototype:void 0,g=E?E.valueOf:void 0;function v(O,A,S,T,P,N,M){switch(S){case d:if(O.byteLength!=A.byteLength||O.byteOffset!=A.byteOffset)return!1;O=O.buffer,A=A.buffer;case m:return!(O.byteLength!=A.byteLength||!N(new t(O),new t(A)));case u:case c:case p:return r(+O,+A);case l:return O.name==A.name&&O.message==A.message;case y:case b:return O==A+"";case f:var U=i;case h:var F=T&o;if(U||(U=a),O.size!=A.size&&!F)return!1;var D=M.get(O);if(D)return D==A;T|=s,M.set(O,A);var $=n(U(O),U(A),T,P,N,M);return M.delete(O),$;case _:if(g)return g.call(O)==g.call(A)}return!1}return Fo=v,Fo}var $o,fd;function dT(){if(fd)return $o;fd=1;function e(t,r){for(var n=-1,i=r.length,a=t.length;++n<i;)t[a+n]=r[n];return t}return $o=e,$o}var Mo,dd;function Iu(){if(dd)return Mo;dd=1;var e=Array.isArray;return Mo=e,Mo}var ko,pd;function pT(){if(pd)return ko;pd=1;var e=dT(),t=Iu();function r(n,i,a){var o=i(n);return t(n)?o:e(o,a(n))}return ko=r,ko}var Uo,hd;function hT(){if(hd)return Uo;hd=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,a=0,o=[];++n<i;){var s=t[n];r(s,n,t)&&(o[a++]=s)}return o}return Uo=e,Uo}var Vo,gd;function gT(){if(gd)return Vo;gd=1;function e(){return[]}return Vo=e,Vo}var qo,md;function mT(){if(md)return qo;md=1;var e=hT(),t=gT(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return n.call(o,s)}))}:t;return qo=a,qo}var Bo,vd;function vT(){if(vd)return Bo;vd=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return Bo=e,Bo}var Ho,yd;function Hi(){if(yd)return Ho;yd=1;function e(t){return t!=null&&typeof t=="object"}return Ho=e,Ho}var Wo,bd;function yT(){if(bd)return Wo;bd=1;var e=Vi(),t=Hi(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Wo=n,Wo}var Go,_d;function bT(){if(_d)return Go;_d=1;var e=yT(),t=Hi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&n.call(o,"callee")&&!i.call(o,"callee")};return Go=a,Go}var fn={exports:{}},zo,Od;function _T(){if(Od)return zo;Od=1;function e(){return!1}return zo=e,zo}fn.exports;var Ed;function fm(){return Ed||(Ed=1,(function(e,t){var r=Mt(),n=_T(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;e.exports=c})(fn,fn.exports)),fn.exports}var Ko,Sd;function OT(){if(Sd)return Ko;Sd=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Ko=r,Ko}var Yo,wd;function dm(){if(wd)return Yo;wd=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return Yo=t,Yo}var Jo,Ad;function ET(){if(Ad)return Jo;Ad=1;var e=Vi(),t=dm(),r=Hi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",c="[object Map]",l="[object Number]",f="[object Object]",p="[object RegExp]",y="[object Set]",h="[object String]",b="[object WeakMap]",_="[object ArrayBuffer]",m="[object DataView]",d="[object Float32Array]",E="[object Float64Array]",g="[object Int8Array]",v="[object Int16Array]",O="[object Int32Array]",A="[object Uint8Array]",S="[object Uint8ClampedArray]",T="[object Uint16Array]",P="[object Uint32Array]",N={};N[d]=N[E]=N[g]=N[v]=N[O]=N[A]=N[S]=N[T]=N[P]=!0,N[n]=N[i]=N[_]=N[a]=N[m]=N[o]=N[s]=N[u]=N[c]=N[l]=N[f]=N[p]=N[y]=N[h]=N[b]=!1;function M(U){return r(U)&&t(U.length)&&!!N[e(U)]}return Jo=M,Jo}var Zo,xd;function ST(){if(xd)return Zo;xd=1;function e(t){return function(r){return t(r)}}return Zo=e,Zo}var dn={exports:{}};dn.exports;var Td;function wT(){return Td||(Td=1,(function(e,t){var r=am(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(dn,dn.exports)),dn.exports}var Qo,Rd;function pm(){if(Rd)return Qo;Rd=1;var e=ET(),t=ST(),r=wT(),n=r&&r.isTypedArray,i=n?t(n):e;return Qo=i,Qo}var Xo,Pd;function AT(){if(Pd)return Xo;Pd=1;var e=vT(),t=bT(),r=Iu(),n=fm(),i=OT(),a=pm(),o=Object.prototype,s=o.hasOwnProperty;function u(c,l){var f=r(c),p=!f&&t(c),y=!f&&!p&&n(c),h=!f&&!p&&!y&&a(c),b=f||p||y||h,_=b?e(c.length,String):[],m=_.length;for(var d in c)(l||s.call(c,d))&&!(b&&(d=="length"||y&&(d=="offset"||d=="parent")||h&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||i(d,m)))&&_.push(d);return _}return Xo=u,Xo}var es,Cd;function xT(){if(Cd)return es;Cd=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return es=t,es}var ts,jd;function TT(){if(jd)return ts;jd=1;function e(t,r){return function(n){return t(r(n))}}return ts=e,ts}var rs,Id;function RT(){if(Id)return rs;Id=1;var e=TT(),t=e(Object.keys,Object);return rs=t,rs}var ns,Nd;function PT(){if(Nd)return ns;Nd=1;var e=xT(),t=RT(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))n.call(a,s)&&s!="constructor"&&o.push(s);return o}return ns=i,ns}var is,Ld;function CT(){if(Ld)return is;Ld=1;var e=sm(),t=dm();function r(n){return n!=null&&t(n.length)&&!e(n)}return is=r,is}var as,Dd;function jT(){if(Dd)return as;Dd=1;var e=AT(),t=PT(),r=CT();function n(i){return r(i)?e(i):t(i)}return as=n,as}var os,Fd;function IT(){if(Fd)return os;Fd=1;var e=pT(),t=mT(),r=jT();function n(i){return e(i,r,t)}return os=n,os}var ss,$d;function NT(){if($d)return ss;$d=1;var e=IT(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,o,s,u,c,l){var f=s&t,p=e(a),y=p.length,h=e(o),b=h.length;if(y!=b&&!f)return!1;for(var _=y;_--;){var m=p[_];if(!(f?m in o:n.call(o,m)))return!1}var d=l.get(a),E=l.get(o);if(d&&E)return d==o&&E==a;var g=!0;l.set(a,o),l.set(o,a);for(var v=f;++_<y;){m=p[_];var O=a[m],A=o[m];if(u)var S=f?u(A,O,m,o,a,l):u(O,A,m,a,o,l);if(!(S===void 0?O===A||c(O,A,s,u,l):S)){g=!1;break}v||(v=m=="constructor")}if(g&&!v){var T=a.constructor,P=o.constructor;T!=P&&"constructor"in a&&"constructor"in o&&!(typeof T=="function"&&T instanceof T&&typeof P=="function"&&P instanceof P)&&(g=!1)}return l.delete(a),l.delete(o),g}return ss=i,ss}var us,Md;function LT(){if(Md)return us;Md=1;var e=$r(),t=Mt(),r=e(t,"DataView");return us=r,us}var cs,kd;function DT(){if(kd)return cs;kd=1;var e=$r(),t=Mt(),r=e(t,"Promise");return cs=r,cs}var ls,Ud;function FT(){if(Ud)return ls;Ud=1;var e=$r(),t=Mt(),r=e(t,"Set");return ls=r,ls}var fs,Vd;function $T(){if(Vd)return fs;Vd=1;var e=$r(),t=Mt(),r=e(t,"WeakMap");return fs=r,fs}var ds,qd;function MT(){if(qd)return ds;qd=1;var e=LT(),t=ju(),r=DT(),n=FT(),i=$T(),a=Vi(),o=um(),s="[object Map]",u="[object Object]",c="[object Promise]",l="[object Set]",f="[object WeakMap]",p="[object DataView]",y=o(e),h=o(t),b=o(r),_=o(n),m=o(i),d=a;return(e&&d(new e(new ArrayBuffer(1)))!=p||t&&d(new t)!=s||r&&d(r.resolve())!=c||n&&d(new n)!=l||i&&d(new i)!=f)&&(d=function(E){var g=a(E),v=g==u?E.constructor:void 0,O=v?o(v):"";if(O)switch(O){case y:return p;case h:return s;case b:return c;case _:return l;case m:return f}return g}),ds=d,ds}var ps,Bd;function kT(){if(Bd)return ps;Bd=1;var e=rT(),t=lm(),r=fT(),n=NT(),i=MT(),a=Iu(),o=fm(),s=pm(),u=1,c="[object Arguments]",l="[object Array]",f="[object Object]",p=Object.prototype,y=p.hasOwnProperty;function h(b,_,m,d,E,g){var v=a(b),O=a(_),A=v?l:i(b),S=O?l:i(_);A=A==c?f:A,S=S==c?f:S;var T=A==f,P=S==f,N=A==S;if(N&&o(b)){if(!o(_))return!1;v=!0,T=!1}if(N&&!T)return g||(g=new e),v||s(b)?t(b,_,m,d,E,g):r(b,_,A,m,d,E,g);if(!(m&u)){var M=T&&y.call(b,"__wrapped__"),U=P&&y.call(_,"__wrapped__");if(M||U){var F=M?b.value():b,D=U?_.value():_;return g||(g=new e),E(F,D,m,d,g)}}return N?(g||(g=new e),n(b,_,m,d,E,g)):!1}return ps=h,ps}var hs,Hd;function UT(){if(Hd)return hs;Hd=1;var e=kT(),t=Hi();function r(n,i,a,o,s){return n===i?!0:n==null||i==null||!t(n)&&!t(i)?n!==n&&i!==i:e(n,i,a,o,r,s)}return hs=r,hs}var gs,Wd;function VT(){if(Wd)return gs;Wd=1;var e=UT();function t(r,n){return e(r,n)}return gs=t,gs}VT();class qT extends Tx.EventEmitter{constructor(){super()}notify(t,r){this.emit(`refreshTokenInvalid-${t}`,r)}}new qT;if(typeof TextEncoder!="function"){const e=require("text-encoding");global.TextEncoder=e.TextEncoder,global.TextDecoder=e.TextDecoder}w.createContext(void 0);var Gd={},zd;function BT(){return zd||(zd=1,(function(e){e()})((function(){function e(S,T){(T==null||T>S.length)&&(T=S.length);for(var P=0,N=Array(T);P<T;P++)N[P]=S[P];return N}function t(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function r(S,T,P){return T=u(T),f(S,l()?Reflect.construct(T,[],u(S).constructor):T.apply(S,P))}function n(S,T){if(!(S instanceof T))throw new TypeError("Cannot call a class as a function")}function i(S,T){for(var P=0;P<T.length;P++){var N=T[P];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(S,_(N.key),N)}}function a(S,T,P){return T&&i(S.prototype,T),P&&i(S,P),Object.defineProperty(S,"prototype",{writable:!1}),S}function o(S,T){var P=typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(!P){if(Array.isArray(S)||(P=m(S))||T){P&&(S=P);var N=0,M=function(){};return{s:M,n:function(){return N>=S.length?{done:!0}:{done:!1,value:S[N++]}},e:function($){throw $},f:M}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U,F=!0,D=!1;return{s:function(){P=P.call(S)},n:function(){var $=P.next();return F=$.done,$},e:function($){D=!0,U=$},f:function(){try{F||P.return==null||P.return()}finally{if(D)throw U}}}}function s(){return s=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(S,T,P){var N=y(S,T);if(N){var M=Object.getOwnPropertyDescriptor(N,T);return M.get?M.get.call(arguments.length<3?S:P):M.value}},s.apply(null,arguments)}function u(S){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},u(S)}function c(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),Object.defineProperty(S,"prototype",{writable:!1}),T&&p(S,T)}function l(){try{var S=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l=function(){return!!S})()}function f(S,T){if(T&&(typeof T=="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(S)}function p(S,T){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,N){return P.__proto__=N,P},p(S,T)}function y(S,T){for(;!{}.hasOwnProperty.call(S,T)&&(S=u(S))!==null;);return S}function h(S,T,P,N){var M=s(u(S.prototype),T,P);return typeof M=="function"?function(U){return M.apply(P,U)}:M}function b(S,T){if(typeof S!="object"||!S)return S;var P=S[Symbol.toPrimitive];if(P!==void 0){var N=P.call(S,T);if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(S)}function _(S){var T=b(S,"string");return typeof T=="symbol"?T:T+""}function m(S,T){if(S){if(typeof S=="string")return e(S,T);var P={}.toString.call(S).slice(8,-1);return P==="Object"&&S.constructor&&(P=S.constructor.name),P==="Map"||P==="Set"?Array.from(S):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?e(S,T):void 0}}(function(S){return{NativeAbortSignal:S.AbortSignal,NativeAbortController:S.AbortController}})(typeof self<"u"?self:Tr);function d(S){var T;try{T=new Event("abort")}catch{typeof document<"u"?document.createEvent?(T=document.createEvent("Event"),T.initEvent("abort",!1,!1)):(T=document.createEventObject(),T.type="abort"):T={type:"abort",bubbles:!1,cancelable:!1}}return T.reason=S,T}function E(S){if(S===void 0)if(typeof document>"u")S=new Error("This operation was aborted"),S.name="AbortError";else try{S=new DOMException("signal is aborted without reason"),Object.defineProperty(S,"name",{value:"AbortError"})}catch{S=new Error("This operation was aborted"),S.name="AbortError"}return S}var g=(function(){function S(){n(this,S),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return a(S,[{key:"addEventListener",value:function(P,N,M){P in this.listeners||(this.listeners[P]=[]),this.listeners[P].push({callback:N,options:M})}},{key:"removeEventListener",value:function(P,N){if(P in this.listeners){for(var M=this.listeners[P],U=0,F=M.length;U<F;U++)if(M[U].callback===N){M.splice(U,1);return}}}},{key:"dispatchEvent",value:function(P){var N=this;if(P.type in this.listeners){for(var M=this.listeners[P.type],U=M.slice(),F=function(){var k=U[D];try{k.callback.call(N,P)}catch(Q){Promise.resolve().then(function(){throw Q})}k.options&&k.options.once&&N.removeEventListener(P.type,k.callback)},D=0,$=U.length;D<$;D++)F();return!P.defaultPrevented}}}])})(),v=(function(S){function T(){var P;return n(this,T),P=r(this,T),P.listeners||g.call(P),Object.defineProperty(P,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(P,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(P,"reason",{value:void 0,writable:!0,configurable:!0}),P}return c(T,S),a(T,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(N){N.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,N)),h(T,"dispatchEvent",this)([N])}},{key:"throwIfAborted",value:function(){var N=this.aborted,M=this.reason,U=M===void 0?"Aborted":M;if(N)throw U}}],[{key:"timeout",value:function(N){var M=new O;return setTimeout(function(){return M.abort(new DOMException("This signal is timeout in ".concat(N,"ms"),"TimeoutError"))},N),M.signal}},{key:"any",value:function(N){var M=new O;function U(){M.abort(this.reason),F()}function F(){var k=o(N),Q;try{for(k.s();!(Q=k.n()).done;){var K=Q.value;K.removeEventListener("abort",U)}}catch(ee){k.e(ee)}finally{k.f()}}var D=o(N),$;try{for(D.s();!($=D.n()).done;){var B=$.value;if(B.aborted){M.abort(B.reason);break}else B.addEventListener("abort",U)}}catch(k){D.e(k)}finally{D.f()}return M.signal}}])})(g),O=(function(){function S(){n(this,S),Object.defineProperty(this,"signal",{value:new v,writable:!0,configurable:!0})}return a(S,[{key:"abort",value:function(P){var N=E(P),M=d(N);this.signal.reason=N,this.signal.dispatchEvent(M)}},{key:"toString",value:function(){return"[object AbortController]"}}])})();typeof Symbol<"u"&&Symbol.toStringTag&&(O.prototype[Symbol.toStringTag]="AbortController",v.prototype[Symbol.toStringTag]="AbortSignal");function A(S){return S.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof S.Request=="function"&&!S.Request.prototype.hasOwnProperty("signal")||!S.AbortController}(function(S){A(S)&&(S.AbortController=O,S.AbortSignal=v)})(typeof self<"u"?self:Tr)}))),Gd}BT();const HT=()=>{try{if(window)return 2e4;if(process.env.NODE_ENV==="test")return 500}catch{if(process.env.NODE_ENV==="test")return 500}return 2e4};Ne.create({baseURL:"http://localhost:8080",timeout:HT()});w.lazy(()=>Promise.resolve().then(()=>require("./DefaultDeviceCode-eT4w9geC.js")));w.createContext(null);var WT=Object.defineProperty,GT=(e,t,r)=>t in e?WT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nt=(e,t,r)=>GT(e,typeof t!="symbol"?t+"":t,r),Kt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function br(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zT=Object.prototype;function KT(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zT;return e===r}var Wi=KT;function YT(e,t){return function(r){return e(t(r))}}var hm=YT,JT=hm,ZT=JT(Object.keys,Object),QT=ZT,XT=Wi,eR=QT,tR=Object.prototype,rR=tR.hasOwnProperty;function nR(e){if(!XT(e))return eR(e);var t=[];for(var r in Object(e))rR.call(e,r)&&r!="constructor"&&t.push(r);return t}var gm=nR,iR=typeof Kt=="object"&&Kt&&Kt.Object===Object&&Kt,mm=iR,aR=mm,oR=typeof self=="object"&&self&&self.Object===Object&&self,sR=aR||oR||Function("return this")(),jt=sR,uR=jt,cR=uR.Symbol,Gi=cR,Kd=Gi,vm=Object.prototype,lR=vm.hasOwnProperty,fR=vm.toString,un=Kd?Kd.toStringTag:void 0;function dR(e){var t=lR.call(e,un),r=e[un];try{e[un]=void 0;var n=!0}catch{}var i=fR.call(e);return n&&(t?e[un]=r:delete e[un]),i}var pR=dR,hR=Object.prototype,gR=hR.toString;function mR(e){return gR.call(e)}var vR=mR,Yd=Gi,yR=pR,bR=vR,_R="[object Null]",OR="[object Undefined]",Jd=Yd?Yd.toStringTag:void 0;function ER(e){return e==null?e===void 0?OR:_R:Jd&&Jd in Object(e)?yR(e):bR(e)}var zi=ER;function SR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ln=SR,wR=zi,AR=Ln,xR="[object AsyncFunction]",TR="[object Function]",RR="[object GeneratorFunction]",PR="[object Proxy]";function CR(e){if(!AR(e))return!1;var t=wR(e);return t==TR||t==RR||t==xR||t==PR}var ym=CR,jR=jt,IR=jR["__core-js_shared__"],NR=IR,ms=NR,Zd=(function(){var e=/[^.]+$/.exec(ms&&ms.keys&&ms.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function LR(e){return!!Zd&&Zd in e}var DR=LR,FR=Function.prototype,$R=FR.toString;function MR(e){if(e!=null){try{return $R.call(e)}catch{}try{return e+""}catch{}}return""}var bm=MR,kR=ym,UR=DR,VR=Ln,qR=bm,BR=/[\\^$.*+?()[\]{}|]/g,HR=/^\[object .+?Constructor\]$/,WR=Function.prototype,GR=Object.prototype,zR=WR.toString,KR=GR.hasOwnProperty,YR=RegExp("^"+zR.call(KR).replace(BR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JR(e){if(!VR(e)||UR(e))return!1;var t=kR(e)?YR:HR;return t.test(qR(e))}var ZR=JR;function QR(e,t){return e?.[t]}var XR=QR,eP=ZR,tP=XR;function rP(e,t){var r=tP(e,t);return eP(r)?r:void 0}var _r=rP,nP=_r,iP=jt,aP=nP(iP,"DataView"),oP=aP,sP=_r,uP=jt,cP=sP(uP,"Map"),Nu=cP,lP=_r,fP=jt,dP=lP(fP,"Promise"),pP=dP,hP=_r,gP=jt,mP=hP(gP,"Set"),_m=mP,vP=_r,yP=jt,bP=vP(yP,"WeakMap"),_P=bP,zs=oP,Ks=Nu,Ys=pP,Js=_m,Zs=_P,Om=zi,Mr=bm,Qd="[object Map]",OP="[object Object]",Xd="[object Promise]",ep="[object Set]",tp="[object WeakMap]",rp="[object DataView]",EP=Mr(zs),SP=Mr(Ks),wP=Mr(Ys),AP=Mr(Js),xP=Mr(Zs),nr=Om;(zs&&nr(new zs(new ArrayBuffer(1)))!=rp||Ks&&nr(new Ks)!=Qd||Ys&&nr(Ys.resolve())!=Xd||Js&&nr(new Js)!=ep||Zs&&nr(new Zs)!=tp)&&(nr=function(e){var t=Om(e),r=t==OP?e.constructor:void 0,n=r?Mr(r):"";if(n)switch(n){case EP:return rp;case SP:return Qd;case wP:return Xd;case AP:return ep;case xP:return tp}return t});var Ki=nr;function TP(e){return e!=null&&typeof e=="object"}var Dn=TP,RP=zi,PP=Dn,CP="[object Arguments]";function jP(e){return PP(e)&&RP(e)==CP}var IP=jP,np=IP,NP=Dn,Em=Object.prototype,LP=Em.hasOwnProperty,DP=Em.propertyIsEnumerable,FP=np((function(){return arguments})())?np:function(e){return NP(e)&&LP.call(e,"callee")&&!DP.call(e,"callee")},Sm=FP,$P=Array.isArray,Yi=$P,MP=9007199254740991;function kP(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MP}var wm=kP,UP=ym,VP=wm;function qP(e){return e!=null&&VP(e.length)&&!UP(e)}var Lu=qP,vi={exports:{}};function BP(){return!1}var HP=BP;vi.exports;(function(e,t){var r=jt,n=HP,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?r.Buffer:void 0,u=s?s.isBuffer:void 0,c=u||n;e.exports=c})(vi,vi.exports);var Du=vi.exports,WP=zi,GP=wm,zP=Dn,KP="[object Arguments]",YP="[object Array]",JP="[object Boolean]",ZP="[object Date]",QP="[object Error]",XP="[object Function]",eC="[object Map]",tC="[object Number]",rC="[object Object]",nC="[object RegExp]",iC="[object Set]",aC="[object String]",oC="[object WeakMap]",sC="[object ArrayBuffer]",uC="[object DataView]",cC="[object Float32Array]",lC="[object Float64Array]",fC="[object Int8Array]",dC="[object Int16Array]",pC="[object Int32Array]",hC="[object Uint8Array]",gC="[object Uint8ClampedArray]",mC="[object Uint16Array]",vC="[object Uint32Array]",Re={};Re[cC]=Re[lC]=Re[fC]=Re[dC]=Re[pC]=Re[hC]=Re[gC]=Re[mC]=Re[vC]=!0;Re[KP]=Re[YP]=Re[sC]=Re[JP]=Re[uC]=Re[ZP]=Re[QP]=Re[XP]=Re[eC]=Re[tC]=Re[rC]=Re[nC]=Re[iC]=Re[aC]=Re[oC]=!1;function yC(e){return zP(e)&&GP(e.length)&&!!Re[WP(e)]}var bC=yC;function _C(e){return function(t){return e(t)}}var Fu=_C,yi={exports:{}};yi.exports;(function(e,t){var r=mm,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a&&r.process,s=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(yi,yi.exports);var $u=yi.exports,OC=bC,EC=Fu,ip=$u,ap=ip&&ip.isTypedArray,SC=ap?EC(ap):OC,Am=SC,wC=gm,AC=Ki,xC=Sm,TC=Yi,RC=Lu,PC=Du,CC=Wi,jC=Am,IC="[object Map]",NC="[object Set]",LC=Object.prototype,DC=LC.hasOwnProperty;function FC(e){if(e==null)return!0;if(RC(e)&&(TC(e)||typeof e=="string"||typeof e.splice=="function"||PC(e)||jC(e)||xC(e)))return!e.length;var t=AC(e);if(t==IC||t==NC)return!e.size;if(CC(e))return!wC(e).length;for(var r in e)if(DC.call(e,r))return!1;return!0}var $C=FC;const xm=br($C);var Tm={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Kt,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,o,s){var u=o.prototype;s.utc=function(b){var _={date:b,utc:!0,args:arguments};return new o(_)},u.utc=function(b){var _=s(this.toDate(),{locale:this.$L,utc:!0});return b?_.add(this.utcOffset(),r):_},u.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var c=u.parse;u.parse=function(b){b.utc&&(this.$u=!0),this.$utils().u(b.$offset)||(this.$offset=b.$offset),c.call(this,b)};var l=u.init;u.init=function(){if(this.$u){var b=this.$d;this.$y=b.getUTCFullYear(),this.$M=b.getUTCMonth(),this.$D=b.getUTCDate(),this.$W=b.getUTCDay(),this.$H=b.getUTCHours(),this.$m=b.getUTCMinutes(),this.$s=b.getUTCSeconds(),this.$ms=b.getUTCMilliseconds()}else l.call(this)};var f=u.utcOffset;u.utcOffset=function(b,_){var m=this.$utils().u;if(m(b))return this.$u?0:m(this.$offset)?f.call(this):this.$offset;if(typeof b=="string"&&(b=(function(v){v===void 0&&(v="");var O=v.match(n);if(!O)return null;var A=(""+O[0]).match(i)||["-",0,0],S=A[0],T=60*+A[1]+ +A[2];return T===0?0:S==="+"?T:-T})(b),b===null))return this;var d=Math.abs(b)<=16?60*b:b;if(d===0)return this.utc(_);var E=this.clone();if(_)return E.$offset=d,E.$u=!1,E;var g=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(E=this.local().add(d+g,r)).$offset=d,E.$x.$localOffset=g,E};var p=u.format;u.format=function(b){var _=b||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return p.call(this,_)},u.valueOf=function(){var b=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*b},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var y=u.toDate;u.toDate=function(b){return b==="s"&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():y.call(this)};var h=u.diff;u.diff=function(b,_,m){if(b&&this.$u===b.$u)return h.call(this,b,_,m);var d=this.local(),E=s(b).local();return h.call(d,E,_,m)}}})})(Tm);var MC=Tm.exports;const kC=br(MC);var Rm={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Kt,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(i,a,o){var s,u=function(p,y,h){h===void 0&&(h={});var b=new Date(p),_=(function(m,d){d===void 0&&(d={});var E=d.timeZoneName||"short",g=m+"|"+E,v=n[g];return v||(v=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:m,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:E}),n[g]=v),v})(y,h);return _.formatToParts(b)},c=function(p,y){for(var h=u(p,y),b=[],_=0;_<h.length;_+=1){var m=h[_],d=m.type,E=m.value,g=r[d];g>=0&&(b[g]=parseInt(E,10))}var v=b[3],O=v===24?0:v,A=b[0]+"-"+b[1]+"-"+b[2]+" "+O+":"+b[4]+":"+b[5]+":000",S=+p;return(o.utc(A).valueOf()-(S-=S%1e3))/6e4},l=a.prototype;l.tz=function(p,y){p===void 0&&(p=s);var h,b=this.utcOffset(),_=this.toDate(),m=_.toLocaleString("en-US",{timeZone:p}),d=Math.round((_-new Date(m))/1e3/60),E=15*-Math.round(_.getTimezoneOffset()/15)-d;if(!Number(E))h=this.utcOffset(0,y);else if(h=o(m,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(E,!0),y){var g=h.utcOffset();h=h.add(b-g,"minute")}return h.$x.$timezone=p,h},l.offsetName=function(p){var y=this.$x.$timezone||o.tz.guess(),h=u(this.valueOf(),y,{timeZoneName:p}).find(function(b){return b.type.toLowerCase()==="timezonename"});return h&&h.value};var f=l.startOf;l.startOf=function(p,y){if(!this.$x||!this.$x.$timezone)return f.call(this,p,y);var h=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return f.call(h,p,y).tz(this.$x.$timezone,!0)},o.tz=function(p,y,h){var b=h&&y,_=h||y||s,m=c(+o(),_);if(typeof p!="string")return o(p).tz(_);var d=(function(O,A,S){var T=O-60*A*1e3,P=c(T,S);if(A===P)return[T,A];var N=c(T-=60*(P-A)*1e3,S);return P===N?[T,P]:[O-60*Math.min(P,N)*1e3,Math.max(P,N)]})(o.utc(p,b).valueOf(),m,_),E=d[0],g=d[1],v=o(E).utcOffset(g);return v.$x.$timezone=_,v},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(p){s=p}}})})(Rm);var UC=Rm.exports;const VC=br(UC);var Pm={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Kt,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",o="second",s="minute",u="hour",c="day",l="week",f="month",p="quarter",y="year",h="date",b="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var D=["th","st","nd","rd"],$=F%100;return"["+F+(D[($-20)%10]||D[$]||D[0])+"]"}},E=function(F,D,$){var B=String(F);return!B||B.length>=D?F:""+Array(D+1-B.length).join($)+F},g={s:E,z:function(F){var D=-F.utcOffset(),$=Math.abs(D),B=Math.floor($/60),k=$%60;return(D<=0?"+":"-")+E(B,2,"0")+":"+E(k,2,"0")},m:function F(D,$){if(D.date()<$.date())return-F($,D);var B=12*($.year()-D.year())+($.month()-D.month()),k=D.clone().add(B,f),Q=$-k<0,K=D.clone().add(B+(Q?-1:1),f);return+(-(B+($-k)/(Q?k-K:K-k))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y,w:l,d:c,D:h,h:u,m:s,s:o,ms:a,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},v="en",O={};O[v]=d;var A="$isDayjsObject",S=function(F){return F instanceof M||!(!F||!F[A])},T=function F(D,$,B){var k;if(!D)return v;if(typeof D=="string"){var Q=D.toLowerCase();O[Q]&&(k=Q),$&&(O[Q]=$,k=Q);var K=D.split("-");if(!k&&K.length>1)return F(K[0])}else{var ee=D.name;O[ee]=D,k=ee}return!B&&k&&(v=k),k||!B&&v},P=function(F,D){if(S(F))return F.clone();var $=typeof D=="object"?D:{};return $.date=F,$.args=arguments,new M($)},N=g;N.l=T,N.i=S,N.w=function(F,D){return P(F,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var M=(function(){function F($){this.$L=T($.locale,null,!0),this.parse($),this.$x=this.$x||$.x||{},this[A]=!0}var D=F.prototype;return D.parse=function($){this.$d=(function(B){var k=B.date,Q=B.utc;if(k===null)return new Date(NaN);if(N.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var K=k.match(_);if(K){var ee=K[2]-1||0,G=(K[7]||"0").substring(0,3);return Q?new Date(Date.UTC(K[1],ee,K[3]||1,K[4]||0,K[5]||0,K[6]||0,G)):new Date(K[1],ee,K[3]||1,K[4]||0,K[5]||0,K[6]||0,G)}}return new Date(k)})($),this.init()},D.init=function(){var $=this.$d;this.$y=$.getFullYear(),this.$M=$.getMonth(),this.$D=$.getDate(),this.$W=$.getDay(),this.$H=$.getHours(),this.$m=$.getMinutes(),this.$s=$.getSeconds(),this.$ms=$.getMilliseconds()},D.$utils=function(){return N},D.isValid=function(){return this.$d.toString()!==b},D.isSame=function($,B){var k=P($);return this.startOf(B)<=k&&k<=this.endOf(B)},D.isAfter=function($,B){return P($)<this.startOf(B)},D.isBefore=function($,B){return this.endOf(B)<P($)},D.$g=function($,B,k){return N.u($)?this[B]:this.set(k,$)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function($,B){var k=this,Q=!!N.u(B)||B,K=N.p($),ee=function(_e,de){var ae=N.w(k.$u?Date.UTC(k.$y,de,_e):new Date(k.$y,de,_e),k);return Q?ae:ae.endOf(c)},G=function(_e,de){return N.w(k.toDate()[_e].apply(k.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(de)),k)},ne=this.$W,te=this.$M,ce=this.$D,ue="set"+(this.$u?"UTC":"");switch(K){case y:return Q?ee(1,0):ee(31,11);case f:return Q?ee(1,te):ee(0,te+1);case l:var re=this.$locale().weekStart||0,le=(ne<re?ne+7:ne)-re;return ee(Q?ce-le:ce+(6-le),te);case c:case h:return G(ue+"Hours",0);case u:return G(ue+"Minutes",1);case s:return G(ue+"Seconds",2);case o:return G(ue+"Milliseconds",3);default:return this.clone()}},D.endOf=function($){return this.startOf($,!1)},D.$set=function($,B){var k,Q=N.p($),K="set"+(this.$u?"UTC":""),ee=(k={},k[c]=K+"Date",k[h]=K+"Date",k[f]=K+"Month",k[y]=K+"FullYear",k[u]=K+"Hours",k[s]=K+"Minutes",k[o]=K+"Seconds",k[a]=K+"Milliseconds",k)[Q],G=Q===c?this.$D+(B-this.$W):B;if(Q===f||Q===y){var ne=this.clone().set(h,1);ne.$d[ee](G),ne.init(),this.$d=ne.set(h,Math.min(this.$D,ne.daysInMonth())).$d}else ee&&this.$d[ee](G);return this.init(),this},D.set=function($,B){return this.clone().$set($,B)},D.get=function($){return this[N.p($)]()},D.add=function($,B){var k,Q=this;$=Number($);var K=N.p(B),ee=function(te){var ce=P(Q);return N.w(ce.date(ce.date()+Math.round(te*$)),Q)};if(K===f)return this.set(f,this.$M+$);if(K===y)return this.set(y,this.$y+$);if(K===c)return ee(1);if(K===l)return ee(7);var G=(k={},k[s]=n,k[u]=i,k[o]=r,k)[K]||1,ne=this.$d.getTime()+$*G;return N.w(ne,this)},D.subtract=function($,B){return this.add(-1*$,B)},D.format=function($){var B=this,k=this.$locale();if(!this.isValid())return k.invalidDate||b;var Q=$||"YYYY-MM-DDTHH:mm:ssZ",K=N.z(this),ee=this.$H,G=this.$m,ne=this.$M,te=k.weekdays,ce=k.months,ue=k.meridiem,re=function(de,ae,fe,he){return de&&(de[ae]||de(B,Q))||fe[ae].slice(0,he)},le=function(de){return N.s(ee%12||12,de,"0")},_e=ue||function(de,ae,fe){var he=de<12?"AM":"PM";return fe?he.toLowerCase():he};return Q.replace(m,function(de,ae){return ae||(function(fe){switch(fe){case"YY":return String(B.$y).slice(-2);case"YYYY":return N.s(B.$y,4,"0");case"M":return ne+1;case"MM":return N.s(ne+1,2,"0");case"MMM":return re(k.monthsShort,ne,ce,3);case"MMMM":return re(ce,ne);case"D":return B.$D;case"DD":return N.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return re(k.weekdaysMin,B.$W,te,2);case"ddd":return re(k.weekdaysShort,B.$W,te,3);case"dddd":return te[B.$W];case"H":return String(ee);case"HH":return N.s(ee,2,"0");case"h":return le(1);case"hh":return le(2);case"a":return _e(ee,G,!0);case"A":return _e(ee,G,!1);case"m":return String(G);case"mm":return N.s(G,2,"0");case"s":return String(B.$s);case"ss":return N.s(B.$s,2,"0");case"SSS":return N.s(B.$ms,3,"0");case"Z":return K}return null})(de)||K.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function($,B,k){var Q,K=this,ee=N.p(B),G=P($),ne=(G.utcOffset()-this.utcOffset())*n,te=this-G,ce=function(){return N.m(K,G)};switch(ee){case y:Q=ce()/12;break;case f:Q=ce();break;case p:Q=ce()/3;break;case l:Q=(te-ne)/6048e5;break;case c:Q=(te-ne)/864e5;break;case u:Q=te/i;break;case s:Q=te/n;break;case o:Q=te/r;break;default:Q=te}return k?Q:N.a(Q)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return O[this.$L]},D.locale=function($,B){if(!$)return this.$L;var k=this.clone(),Q=T($,B,!0);return Q&&(k.$L=Q),k},D.clone=function(){return N.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},F})(),U=M.prototype;return P.prototype=U,[["$ms",a],["$s",o],["$m",s],["$H",u],["$W",c],["$M",f],["$y",y],["$D",h]].forEach(function(F){U[F[1]]=function(D){return this.$g(D,F[0],F[1])}}),P.extend=function(F,D){return F.$i||(F(D,M,P),F.$i=!0),P},P.locale=T,P.isDayjs=S,P.unix=function(F){return P(1e3*F)},P.en=O[v],P.Ls=O,P.p={},P})})(Pm);var qC=Pm.exports;const Mu=br(qC);Mu.extend(kC);Mu.extend(VC);var op;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(op||(op={}));var sp;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(sp||(sp={}));var gn;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.GROUP_UPSELL="3e/group/upsell",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query",e.CMS="3e/cms"})(gn||(gn={}));var up;(function(e){e.GROUP="group",e.PRODUCT="product"})(up||(up={}));var cp;(function(e){e.CREATOR="CREATOR",e.CUSTOMER="CUSTOMER",e.COUPONS="COUPON",e.KIOSK="KIOSK",e.WAITER="WAITER",e.MANAGER="MANAGER",e.VIEWER="VIEWER",e.DRIVER="DRIVER",e.STAFF="STAFF"})(cp||(cp={}));var lp;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.BOLT_DINE_IN="BOLT_DINE_IN",e.TAZZ_DELIVERY="TAZZ_DELIVERY",e.TAZZ_TAKE_AWAY="TAZZ_TAKE_AWAY",e.UPMENU_DELIVERY="UPMENU_DELIVERY",e.UPMENU_TAKE_AWAY="UPMENU_TAKE_AWAY",e.UPMENU_DINE_IN="UPMENU_DINE_IN"})(lp||(lp={}));var fp;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT",e.TAZZ="TAZZ",e.POS="POS",e.UPMENU="UPMENU",e.APP="APP"})(fp||(fp={}));var dp;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT",e.TAZZ="TAZZ",e.UPMENU="UPMENU"})(dp||(dp={}));var pp;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(pp||(pp={}));var hp;(function(e){e.CASH="CASH",e.CARD="CARD",e.CARD_CLOUD="CARD_CLOUD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(hp||(hp={}));var gp;(function(e){e.POINTS_TOTAL="x-rbi-loyalty-points",e.POINTS_EARNED="x-rbi-points-earned",e.REWARDS="x-rbi-rewards",e.OFFERS="x-rbi-offers",e.CUSTOMER_NAME="x-customer-name"})(gp||(gp={}));var mp;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(mp||(mp={}));var vp;(function(e){e.GROUP="group",e.PRODUCT="product"})(vp||(vp={}));var yp;(function(e){e.ORDER_MESSAGE="OrderMessage",e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(yp||(yp={}));function BC(){this.__data__=[],this.size=0}var HC=BC;function WC(e,t){return e===t||e!==e&&t!==t}var Cm=WC,GC=Cm;function zC(e,t){for(var r=e.length;r--;)if(GC(e[r][0],t))return r;return-1}var Ji=zC,KC=Ji,YC=Array.prototype,JC=YC.splice;function ZC(e){var t=this.__data__,r=KC(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():JC.call(t,r,1),--this.size,!0}var QC=ZC,XC=Ji;function ej(e){var t=this.__data__,r=XC(t,e);return r<0?void 0:t[r][1]}var tj=ej,rj=Ji;function nj(e){return rj(this.__data__,e)>-1}var ij=nj,aj=Ji;function oj(e,t){var r=this.__data__,n=aj(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var sj=oj,uj=HC,cj=QC,lj=tj,fj=ij,dj=sj;function kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}kr.prototype.clear=uj;kr.prototype.delete=cj;kr.prototype.get=lj;kr.prototype.has=fj;kr.prototype.set=dj;var Zi=kr,pj=Zi;function hj(){this.__data__=new pj,this.size=0}var gj=hj;function mj(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var vj=mj;function yj(e){return this.__data__.get(e)}var bj=yj;function _j(e){return this.__data__.has(e)}var Oj=_j,Ej=_r,Sj=Ej(Object,"create"),Qi=Sj,bp=Qi;function wj(){this.__data__=bp?bp(null):{},this.size=0}var Aj=wj;function xj(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Tj=xj,Rj=Qi,Pj="__lodash_hash_undefined__",Cj=Object.prototype,jj=Cj.hasOwnProperty;function Ij(e){var t=this.__data__;if(Rj){var r=t[e];return r===Pj?void 0:r}return jj.call(t,e)?t[e]:void 0}var Nj=Ij,Lj=Qi,Dj=Object.prototype,Fj=Dj.hasOwnProperty;function $j(e){var t=this.__data__;return Lj?t[e]!==void 0:Fj.call(t,e)}var Mj=$j,kj=Qi,Uj="__lodash_hash_undefined__";function Vj(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=kj&&t===void 0?Uj:t,this}var qj=Vj,Bj=Aj,Hj=Tj,Wj=Nj,Gj=Mj,zj=qj;function Ur(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ur.prototype.clear=Bj;Ur.prototype.delete=Hj;Ur.prototype.get=Wj;Ur.prototype.has=Gj;Ur.prototype.set=zj;var Kj=Ur,_p=Kj,Yj=Zi,Jj=Nu;function Zj(){this.size=0,this.__data__={hash:new _p,map:new(Jj||Yj),string:new _p}}var Qj=Zj;function Xj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var eI=Xj,tI=eI;function rI(e,t){var r=e.__data__;return tI(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xi=rI,nI=Xi;function iI(e){var t=nI(this,e).delete(e);return this.size-=t?1:0,t}var aI=iI,oI=Xi;function sI(e){return oI(this,e).get(e)}var uI=sI,cI=Xi;function lI(e){return cI(this,e).has(e)}var fI=lI,dI=Xi;function pI(e,t){var r=dI(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var hI=pI,gI=Qj,mI=aI,vI=uI,yI=fI,bI=hI;function Vr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Vr.prototype.clear=gI;Vr.prototype.delete=mI;Vr.prototype.get=vI;Vr.prototype.has=yI;Vr.prototype.set=bI;var _I=Vr,OI=Zi,EI=Nu,SI=_I,wI=200;function AI(e,t){var r=this.__data__;if(r instanceof OI){var n=r.__data__;if(!EI||n.length<wI-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new SI(n)}return r.set(e,t),this.size=r.size,this}var xI=AI,TI=Zi,RI=gj,PI=vj,CI=bj,jI=Oj,II=xI;function qr(e){var t=this.__data__=new TI(e);this.size=t.size}qr.prototype.clear=RI;qr.prototype.delete=PI;qr.prototype.get=CI;qr.prototype.has=jI;qr.prototype.set=II;var NI=qr;function LI(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var DI=LI,FI=_r,$I=(function(){try{var e=FI(Object,"defineProperty");return e({},"",{}),e}catch{}})(),MI=$I,Op=MI;function kI(e,t,r){t=="__proto__"&&Op?Op(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var jm=kI,UI=jm,VI=Cm,qI=Object.prototype,BI=qI.hasOwnProperty;function HI(e,t,r){var n=e[t];(!(BI.call(e,t)&&VI(n,r))||r===void 0&&!(t in e))&&UI(e,t,r)}var Im=HI,WI=Im,GI=jm;function zI(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),i?GI(r,s,u):WI(r,s,u)}return r}var ea=zI;function KI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var YI=KI,JI=9007199254740991,ZI=/^(?:0|[1-9]\d*)$/;function QI(e,t){var r=typeof e;return t=t??JI,!!t&&(r=="number"||r!="symbol"&&ZI.test(e))&&e>-1&&e%1==0&&e<t}var XI=QI,eN=YI,tN=Sm,rN=Yi,nN=Du,iN=XI,aN=Am,oN=Object.prototype,sN=oN.hasOwnProperty;function uN(e,t){var r=rN(e),n=!r&&tN(e),i=!r&&!n&&nN(e),a=!r&&!n&&!i&&aN(e),o=r||n||i||a,s=o?eN(e.length,String):[],u=s.length;for(var c in e)(t||sN.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||iN(c,u)))&&s.push(c);return s}var Nm=uN,cN=Nm,lN=gm,fN=Lu;function dN(e){return fN(e)?cN(e):lN(e)}var ku=dN,pN=ea,hN=ku;function gN(e,t){return e&&pN(t,hN(t),e)}var mN=gN;function vN(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var yN=vN,bN=Ln,_N=Wi,ON=yN,EN=Object.prototype,SN=EN.hasOwnProperty;function wN(e){if(!bN(e))return ON(e);var t=_N(e),r=[];for(var n in e)n=="constructor"&&(t||!SN.call(e,n))||r.push(n);return r}var AN=wN,xN=Nm,TN=AN,RN=Lu;function PN(e){return RN(e)?xN(e,!0):TN(e)}var Uu=PN,CN=ea,jN=Uu;function IN(e,t){return e&&CN(t,jN(t),e)}var NN=IN,bi={exports:{}};bi.exports;(function(e,t){var r=jt,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,o=a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(c,l){if(l)return c.slice();var f=c.length,p=s?s(f):new c.constructor(f);return c.copy(p),p}e.exports=u})(bi,bi.exports);var LN=bi.exports;function DN(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var FN=DN;function $N(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}var MN=$N;function kN(){return[]}var Lm=kN,UN=MN,VN=Lm,qN=Object.prototype,BN=qN.propertyIsEnumerable,Ep=Object.getOwnPropertySymbols,HN=Ep?function(e){return e==null?[]:(e=Object(e),UN(Ep(e),function(t){return BN.call(e,t)}))}:VN,Vu=HN,WN=ea,GN=Vu;function zN(e,t){return WN(e,GN(e),t)}var KN=zN;function YN(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Dm=YN,JN=hm,ZN=JN(Object.getPrototypeOf,Object),Fm=ZN,QN=Dm,XN=Fm,eL=Vu,tL=Lm,rL=Object.getOwnPropertySymbols,nL=rL?function(e){for(var t=[];e;)QN(t,eL(e)),e=XN(e);return t}:tL,$m=nL,iL=ea,aL=$m;function oL(e,t){return iL(e,aL(e),t)}var sL=oL,uL=Dm,cL=Yi;function lL(e,t,r){var n=t(e);return cL(e)?n:uL(n,r(e))}var Mm=lL,fL=Mm,dL=Vu,pL=ku;function hL(e){return fL(e,pL,dL)}var gL=hL,mL=Mm,vL=$m,yL=Uu;function bL(e){return mL(e,yL,vL)}var _L=bL,OL=Object.prototype,EL=OL.hasOwnProperty;function SL(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&EL.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var wL=SL,AL=jt,xL=AL.Uint8Array,TL=xL,Sp=TL;function RL(e){var t=new e.constructor(e.byteLength);return new Sp(t).set(new Sp(e)),t}var qu=RL,PL=qu;function CL(e,t){var r=t?PL(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var jL=CL,IL=/\w*$/;function NL(e){var t=new e.constructor(e.source,IL.exec(e));return t.lastIndex=e.lastIndex,t}var LL=NL,wp=Gi,Ap=wp?wp.prototype:void 0,xp=Ap?Ap.valueOf:void 0;function DL(e){return xp?Object(xp.call(e)):{}}var FL=DL,$L=qu;function ML(e,t){var r=t?$L(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var kL=ML,UL=qu,VL=jL,qL=LL,BL=FL,HL=kL,WL="[object Boolean]",GL="[object Date]",zL="[object Map]",KL="[object Number]",YL="[object RegExp]",JL="[object Set]",ZL="[object String]",QL="[object Symbol]",XL="[object ArrayBuffer]",eD="[object DataView]",tD="[object Float32Array]",rD="[object Float64Array]",nD="[object Int8Array]",iD="[object Int16Array]",aD="[object Int32Array]",oD="[object Uint8Array]",sD="[object Uint8ClampedArray]",uD="[object Uint16Array]",cD="[object Uint32Array]";function lD(e,t,r){var n=e.constructor;switch(t){case XL:return UL(e);case WL:case GL:return new n(+e);case eD:return VL(e,r);case tD:case rD:case nD:case iD:case aD:case oD:case sD:case uD:case cD:return HL(e,r);case zL:return new n;case KL:case ZL:return new n(e);case YL:return qL(e);case JL:return new n;case QL:return BL(e)}}var fD=lD,dD=Ln,Tp=Object.create,pD=(function(){function e(){}return function(t){if(!dD(t))return{};if(Tp)return Tp(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),hD=pD,gD=hD,mD=Fm,vD=Wi;function yD(e){return typeof e.constructor=="function"&&!vD(e)?gD(mD(e)):{}}var bD=yD,_D=Ki,OD=Dn,ED="[object Map]";function SD(e){return OD(e)&&_D(e)==ED}var wD=SD,AD=wD,xD=Fu,Rp=$u,Pp=Rp&&Rp.isMap,TD=Pp?xD(Pp):AD,RD=TD,PD=Ki,CD=Dn,jD="[object Set]";function ID(e){return CD(e)&&PD(e)==jD}var ND=ID,LD=ND,DD=Fu,Cp=$u,jp=Cp&&Cp.isSet,FD=jp?DD(jp):LD,$D=FD,MD=NI,kD=DI,UD=Im,VD=mN,qD=NN,BD=LN,HD=FN,WD=KN,GD=sL,zD=gL,KD=_L,YD=Ki,JD=wL,ZD=fD,QD=bD,XD=Yi,eF=Du,tF=RD,rF=Ln,nF=$D,iF=ku,aF=Uu,oF=1,sF=2,uF=4,km="[object Arguments]",cF="[object Array]",lF="[object Boolean]",fF="[object Date]",dF="[object Error]",Um="[object Function]",pF="[object GeneratorFunction]",hF="[object Map]",gF="[object Number]",Vm="[object Object]",mF="[object RegExp]",vF="[object Set]",yF="[object String]",bF="[object Symbol]",_F="[object WeakMap]",OF="[object ArrayBuffer]",EF="[object DataView]",SF="[object Float32Array]",wF="[object Float64Array]",AF="[object Int8Array]",xF="[object Int16Array]",TF="[object Int32Array]",RF="[object Uint8Array]",PF="[object Uint8ClampedArray]",CF="[object Uint16Array]",jF="[object Uint32Array]",we={};we[km]=we[cF]=we[OF]=we[EF]=we[lF]=we[fF]=we[SF]=we[wF]=we[AF]=we[xF]=we[TF]=we[hF]=we[gF]=we[Vm]=we[mF]=we[vF]=we[yF]=we[bF]=we[RF]=we[PF]=we[CF]=we[jF]=!0;we[dF]=we[Um]=we[_F]=!1;function ri(e,t,r,n,i,a){var o,s=t&oF,u=t&sF,c=t&uF;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!rF(e))return e;var l=XD(e);if(l){if(o=JD(e),!s)return HD(e,o)}else{var f=YD(e),p=f==Um||f==pF;if(eF(e))return BD(e,s);if(f==Vm||f==km||p&&!i){if(o=u||p?{}:QD(e),!s)return u?GD(e,qD(o,e)):WD(e,VD(o,e))}else{if(!we[f])return i?e:{};o=ZD(e,f,s)}}a||(a=new MD);var y=a.get(e);if(y)return y;a.set(e,o),nF(e)?e.forEach(function(_){o.add(ri(_,t,r,_,e,a))}):tF(e)&&e.forEach(function(_,m){o.set(m,ri(_,t,r,m,e,a))});var h=c?u?KD:zD:u?aF:iF,b=l?void 0:h(e);return kD(b||e,function(_,m){b&&(m=_,_=e[m]),UD(o,m,ri(_,t,r,m,e,a))}),o}var IF=ri,NF=IF,LF=1,DF=4;function FF(e){return NF(e,LF|DF)}var $F=FF;const qm=br($F);function MF(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var kF=MF,Ip=Gi,Np=Ip?Ip.prototype:void 0;Np&&Np.valueOf;function Bm(e,t){if(!t||!t.filter||!e||!e.filter||e.kind!==gn.CONFIG&&e.kind!==gn.OPTIONS&&e.kind!==gn.GROUP_UPSELL)return!0;if(e.filter&&e.items){const r=Object.values(e.filter).flat().filter(n=>{var i,a,o,s;return t.filter[(a=(i=e.items)==null?void 0:i[0])==null?void 0:a.fltCtx]&&Object.values(t.filter[(s=(o=e.items)==null?void 0:o[0])==null?void 0:s.fltCtx]).includes(n)});if(Array.isArray(r)&&r.length===0)return!1}return!0}const _i=(e,t,r=!1,n=0,i,a=1)=>{var o,s;if(!e)return 0;const u=i?.(e);if(u!==void 0)return u;const c=e.price?parseFloat(e.price):0,l=(o=e._)!=null&&o.basePrice?parseFloat((s=e._)==null?void 0:s.basePrice):c;let f=r?l*a:c*a;if(!(t!=null&&t.selected)||xm(t.selected))return f;const{items:p}=e,y=qm(t);return Bm(e,y)&&Array.isArray(p)&&p.forEach(h=>{let b=0;if(h.kind!=="3e/product")b=_i(h,y,r,n+1,i,a);else{const{selected:_={}}=y,{id:m}=h,d=h?.selCtx||e?.selCtx;if(_[d]&&d in _&&m in _[d]){const E=a*Number(_[d][m]);b=_i(h,y,r,n+1,i,E),delete y.selected[d][m]}}f+=b}),Math.round(100*f)/100},Qs=(e,t,r=0,n,i=1)=>{var a,o;if(!e)return 0;const s=n?.(e);if(s!==void 0)return s;let u=!((a=e._)!=null&&a.basePrice)||r===0?0:parseFloat((o=e._)==null?void 0:o.basePrice)*i;if(!(t!=null&&t.selected)||xm(t.selected))return u*i;const{items:c}=e,l=qm(t);return Bm(e,l)&&Array.isArray(c)&&c.forEach(f=>{let p=0;if(f.kind!=="3e/product")p=Qs(f,l,r+1,n,i);else{const{selected:y={}}=l,{id:h}=f,b=f?.selCtx||e?.selCtx;if(b in y&&h in y[b]){const _=i*Number(y[b][h]);p=Qs(f,l,r+1,n,_),delete l.selected[b][h]}}u+=p}),Math.round(100*u)/100},UF=({product:e,state:t,selected:r,cheapestGroupOptionsProduct:n,basePrice:i,dangerouslyOverwritePrice:a})=>{const o=_i(e,t,i,void 0,a),s=_i(e,e.state,i,void 0,a),u=i?Qs(e,t,void 0,a):void 0,c=e.minPrice&&Number(e.price)===o;let l=r||n||Number(e.price)===0?o||s:Number(e.price);return n!==void 0&&(l-=n),c&&e.minPrice&&(l=Number(e.minPrice)),{displayPrice:l,showAsMinPrice:c,calculatedPriceDefaultProductState:s,calculatedChildrensBasePrice:u}},VF=UF;function qF(){}var BF=qF,vs=_m,HF=BF,WF=kF,GF=1/0;vs&&1/WF(new vs([,-0]))[1]==GF;var Hm={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Kt,function(){return function(r,n,i){n.prototype.isBetween=function(a,o,s,u){var c=i(a),l=i(o),f=(u=u||"()")[0]==="(",p=u[1]===")";return(f?this.isAfter(c,s):!this.isBefore(c,s))&&(p?this.isBefore(l,s):!this.isAfter(l,s))||(f?this.isBefore(c,s):!this.isAfter(c,s))&&(p?this.isAfter(l,s):!this.isBefore(l,s))}}})})(Hm);var zF=Hm.exports;const KF=br(zF);Mu.extend(KF);var Wm={},YF=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),Gm="%[a-f0-9]{2}",Lp=new RegExp("("+Gm+")|([^%]+?)","gi"),Dp=new RegExp("("+Gm+")+","gi");function Xs(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],Xs(r),Xs(n))}function JF(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(Lp)||[],r=1;r<t.length;r++)e=Xs(t,r).join(""),t=e.match(Lp)||[];return e}}function ZF(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=Dp.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=JF(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Dp.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var o=i[a];e=e.replace(new RegExp(o,"g"),t[o])}return e}var QF=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return ZF(e)}},XF=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]},e$=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),a=0;a<n.length;a++){var o=n[a],s=e[o];(i?t.indexOf(o)!==-1:t(o,s,e))&&(r[o]=s)}return r};(function(e){const t=YF,r=QF,n=XF,i=e$,a=d=>d==null,o=Symbol("encodeFragmentIdentifier");function s(d){switch(d.arrayFormat){case"index":return E=>(g,v)=>{const O=g.length;return v===void 0||d.skipNull&&v===null||d.skipEmptyString&&v===""?g:v===null?[...g,[l(E,d),"[",O,"]"].join("")]:[...g,[l(E,d),"[",l(O,d),"]=",l(v,d)].join("")]};case"bracket":return E=>(g,v)=>v===void 0||d.skipNull&&v===null||d.skipEmptyString&&v===""?g:v===null?[...g,[l(E,d),"[]"].join("")]:[...g,[l(E,d),"[]=",l(v,d)].join("")];case"colon-list-separator":return E=>(g,v)=>v===void 0||d.skipNull&&v===null||d.skipEmptyString&&v===""?g:v===null?[...g,[l(E,d),":list="].join("")]:[...g,[l(E,d),":list=",l(v,d)].join("")];case"comma":case"separator":case"bracket-separator":{const E=d.arrayFormat==="bracket-separator"?"[]=":"=";return g=>(v,O)=>O===void 0||d.skipNull&&O===null||d.skipEmptyString&&O===""?v:(O=O===null?"":O,v.length===0?[[l(g,d),E,l(O,d)].join("")]:[[v,l(O,d)].join(d.arrayFormatSeparator)])}default:return E=>(g,v)=>v===void 0||d.skipNull&&v===null||d.skipEmptyString&&v===""?g:v===null?[...g,l(E,d)]:[...g,[l(E,d),"=",l(v,d)].join("")]}}function u(d){let E;switch(d.arrayFormat){case"index":return(g,v,O)=>{if(E=/\[(\d*)\]$/.exec(g),g=g.replace(/\[\d*\]$/,""),!E){O[g]=v;return}O[g]===void 0&&(O[g]={}),O[g][E[1]]=v};case"bracket":return(g,v,O)=>{if(E=/(\[\])$/.exec(g),g=g.replace(/\[\]$/,""),!E){O[g]=v;return}if(O[g]===void 0){O[g]=[v];return}O[g]=[].concat(O[g],v)};case"colon-list-separator":return(g,v,O)=>{if(E=/(:list)$/.exec(g),g=g.replace(/:list$/,""),!E){O[g]=v;return}if(O[g]===void 0){O[g]=[v];return}O[g]=[].concat(O[g],v)};case"comma":case"separator":return(g,v,O)=>{const A=typeof v=="string"&&v.includes(d.arrayFormatSeparator),S=typeof v=="string"&&!A&&f(v,d).includes(d.arrayFormatSeparator);v=S?f(v,d):v;const T=A||S?v.split(d.arrayFormatSeparator).map(P=>f(P,d)):v===null?v:f(v,d);O[g]=T};case"bracket-separator":return(g,v,O)=>{const A=/(\[\])$/.test(g);if(g=g.replace(/\[\]$/,""),!A){O[g]=v&&f(v,d);return}const S=v===null?[]:v.split(d.arrayFormatSeparator).map(T=>f(T,d));if(O[g]===void 0){O[g]=S;return}O[g]=[].concat(O[g],S)};default:return(g,v,O)=>{if(O[g]===void 0){O[g]=v;return}O[g]=[].concat(O[g],v)}}}function c(d){if(typeof d!="string"||d.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function l(d,E){return E.encode?E.strict?t(d):encodeURIComponent(d):d}function f(d,E){return E.decode?r(d):d}function p(d){return Array.isArray(d)?d.sort():typeof d=="object"?p(Object.keys(d)).sort((E,g)=>Number(E)-Number(g)).map(E=>d[E]):d}function y(d){const E=d.indexOf("#");return E!==-1&&(d=d.slice(0,E)),d}function h(d){let E="";const g=d.indexOf("#");return g!==-1&&(E=d.slice(g)),E}function b(d){d=y(d);const E=d.indexOf("?");return E===-1?"":d.slice(E+1)}function _(d,E){return E.parseNumbers&&!Number.isNaN(Number(d))&&typeof d=="string"&&d.trim()!==""?d=Number(d):E.parseBooleans&&d!==null&&(d.toLowerCase()==="true"||d.toLowerCase()==="false")&&(d=d.toLowerCase()==="true"),d}function m(d,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),c(E.arrayFormatSeparator);const g=u(E),v=Object.create(null);if(typeof d!="string"||(d=d.trim().replace(/^[?#&]/,""),!d))return v;for(const O of d.split("&")){if(O==="")continue;let[A,S]=n(E.decode?O.replace(/\+/g," "):O,"=");S=S===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?S:f(S,E),g(f(A,E),S,v)}for(const O of Object.keys(v)){const A=v[O];if(typeof A=="object"&&A!==null)for(const S of Object.keys(A))A[S]=_(A[S],E);else v[O]=_(A,E)}return E.sort===!1?v:(E.sort===!0?Object.keys(v).sort():Object.keys(v).sort(E.sort)).reduce((O,A)=>{const S=v[A];return S&&typeof S=="object"&&!Array.isArray(S)?O[A]=p(S):O[A]=S,O},Object.create(null))}e.extract=b,e.parse=m,e.stringify=(d,E)=>{if(!d)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),c(E.arrayFormatSeparator);const g=S=>E.skipNull&&a(d[S])||E.skipEmptyString&&d[S]==="",v=s(E),O={};for(const S of Object.keys(d))g(S)||(O[S]=d[S]);const A=Object.keys(O);return E.sort!==!1&&A.sort(E.sort),A.map(S=>{const T=d[S];return T===void 0?"":T===null?l(S,E):Array.isArray(T)?T.length===0&&E.arrayFormat==="bracket-separator"?l(S,E)+"[]":T.reduce(v(S),[]).join("&"):l(S,E)+"="+l(T,E)}).filter(S=>S.length>0).join("&")},e.parseUrl=(d,E)=>{E=Object.assign({decode:!0},E);const[g,v]=n(d,"#");return Object.assign({url:g.split("?")[0]||"",query:m(b(d),E)},E&&E.parseFragmentIdentifier&&v?{fragmentIdentifier:f(v,E)}:{})},e.stringifyUrl=(d,E)=>{E=Object.assign({encode:!0,strict:!0,[o]:!0},E);const g=y(d.url).split("?")[0]||"",v=e.extract(d.url),O=e.parse(v,{sort:!1}),A=Object.assign(O,d.query);let S=e.stringify(A,E);S&&(S=`?${S}`);let T=h(d.url);return d.fragmentIdentifier&&(T=`#${E[o]?l(d.fragmentIdentifier,E):d.fragmentIdentifier}`),`${g}${S}${T}`},e.pick=(d,E,g)=>{g=Object.assign({parseFragmentIdentifier:!0,[o]:!1},g);const{url:v,query:O,fragmentIdentifier:A}=e.parseUrl(d,g);return e.stringifyUrl({url:v,query:i(O,E),fragmentIdentifier:A},g)},e.exclude=(d,E,g)=>{const v=Array.isArray(E)?O=>!E.includes(O):(O,A)=>!E(O,A);return e.pick(d,v,g)}})(Wm);const ys=br(Wm),t$=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"],xt=class ut{constructor(){Nt(this,"getUrl",(t,r)=>{const n=ut.getMediaToolsUrl(t,r);return ut.status?`${ut.proxyUrl}?url=${encodeURIComponent(n)}`:n}),Nt(this,"setProxyUrl",async t=>{ut.interval&&(clearInterval(ut.interval),ut.interval=null);const r=await ut.checkStatus(t);return ut.proxyUrl=t,ut.interval=setInterval(()=>ut.checkStatus(t),6e4),r})}static getInstance(){return this.instance||(this.instance=new ut),this.instance}};Nt(xt,"instance"),Nt(xt,"proxyUrl"),Nt(xt,"status",!1),Nt(xt,"interval",null),Nt(xt,"getMediaToolsUrl",(e,t=500)=>{const r=ys.parseUrl(e);if(!(e.startsWith("https://orderingstackmedia.blob.core.windows.net/")||e.startsWith("https://orderingstack-mmedia-tools.azurewebsites.net/api/img/")))return e;const n=r.url.substring(r.url.lastIndexOf("."));return[".mp4",".avi",".mov",".svg",".gif",".pdf"].includes(n.toLowerCase())?ys.stringifyUrl({url:r.url.replace("https://orderingstackmedia.blob.core.windows.net/","https://orderingstack.azureedge.net/"),query:{...r.query}}):t$.includes(n)?ys.stringifyUrl({url:r.url.replace("https://orderingstackmedia.blob.core.windows.net/pictures/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/").replace("https://orderingstackmedia.blob.core.windows.net/source/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/"),query:{...r.query,w:t}}):e}),Nt(xt,"checkStatus",async e=>{try{return await Ne.get(`${e}/status`),xt.status=!0,!0}catch(t){return console.warn("ImageProxy is not available",t),xt.status=!1,!1}}),Nt(xt,"getStatus",()=>xt.status);function r$(e){const{product:t,lang:r="en",handleAddToCart:n,handleGoBack:i,isOpen:a,handleClose:o,currency:s,showDebugState:u=!1,showOutsideAvailabilitySlotItems:c}=e,{price:l}=t,{encodedProduct:f,initSelected:p,initFilter:y,productQuantity:h,setIsOnSubmittedOnTrue:b,increaseProductQuantity:_,decreaseProductQuantity:m,setCurrency:d}=VE(t);w.useEffect(()=>{Ge.changeLanguage(r)},[r]),w.useEffect(()=>{d(s)},[s]);const E=oh({defaultValues:{selected:p,filter:y}}),{getValues:g}=E,v=VF({product:t,selected:!0,state:{selected:g("selected")||{},filter:g("selected")||{}}})?.displayPrice,O=()=>{b();const S=Eu(t,g("selected"),g("filter"));if(console.log("onSubmit product-configurator",S),Object.keys(S).some(function(P){return S[P].isValid===!1}))console.warn("INVALID VALIDATION MAP product-configurator",S);else{console.log("selected",g("selected"));const P=RE(jh(g("selected"))),N=g("filter");Object.keys(P||{})?.forEach(M=>{const U=Nh(M,t);U&&(Pi(U,N)||delete P[M])}),console.log("decodedCleanedSelected product-configurator: ",P),n({price:v,quantity:h,selected:P,filter:N})}},A=()=>O();return I.jsx(I.Fragment,{children:I.jsx(pA,{rootProduct:t,children:I.jsx(eg.Provider,{value:e.components,children:I.jsx(Jp,{...E,children:I.jsxs("form",{children:[u&&I.jsx("div",{className:"hidden",children:I.jsx(rg,{})}),I.jsx(lA,{rootProduct:f,children:I.jsx(dA,{product:f,productQuantity:h,isOpen:a,handleClose:o,handleGoBack:i,handleOnSubmit:A,countedProductPrice:v,countedProductTotalPrice:v*h,increaseProductQuantity:_,decreaseProductQuantity:m,currency:s,showOutsideAvailabilitySlotItems:c})})]})})})})})}exports.ContextType=pu;exports.MainView=Lh;exports.ProductConfigurator=r$;exports.ProductKinds=hu;exports.ProductTypes=Dh;exports.SelMinSelMaxStatus=ft;exports.getProductToChangeInForm=kh;exports.hookForm=oy;exports.selectProductsInForm=Uh;exports.unselectProductsInForm=qE;exports.useMenuOptions=Vh;exports.useProductData=hA;exports.useStore=Ie;exports.validateProductFilter=Pi;
|